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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
339bb5064b1dc2a952be7f83e155b219b35b2875 | 7,183 | py | Python | src/dscompiler/compiler/parser.py | Aimini/hm-51 | 2d46323388a0679b2f99d1a33f5a0d55a5f838e6 | [
"MIT"
] | null | null | null | src/dscompiler/compiler/parser.py | Aimini/hm-51 | 2d46323388a0679b2f99d1a33f5a0d55a5f838e6 | [
"MIT"
] | 20 | 2020-01-13T04:19:37.000Z | 2020-02-12T14:25:44.000Z | src/dscompiler/compiler/parser.py | Aimini/hm-51 | 2d46323388a0679b2f99d1a33f5a0d55a5f838e6 | [
"MIT"
] | null | null | null | ##########################################
# 2019-12-22 12:44:23
# AI
# dtoken compiler, compile all dtoken in all lines to
# machine code
##########################################
import enum
import tokenize
import tokenize
import json
from compiler.compile_error import CompileError
from . import micro_control
cl... | 34.042654 | 124 | 0.54991 |
339bc16769ba0009a337fbabcee9fa54f94a3b40 | 5,897 | py | Python | atom/nucleus/python/nucleus_api/models/bulk_transaction_vo.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/bulk_transaction_vo.py | AbhiGupta03/SDK | f3a61aae7a847f07f0c22a154ca88dc378e9d25e | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/bulk_transaction_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
"""
import pprint
import re # noqa: F401
import six
from nucleus_api.configuration i... | 25.864035 | 121 | 0.562659 |
339bd381d14e45f6793bb2c1c69058eff3310ac4 | 226 | py | Python | library_app/validators.py | V-Kopio/django-library-manager | 04431a61d8e794434bb66db313755efc80cdc795 | [
"MIT"
] | null | null | null | library_app/validators.py | V-Kopio/django-library-manager | 04431a61d8e794434bb66db313755efc80cdc795 | [
"MIT"
] | 15 | 2018-05-19T20:41:04.000Z | 2018-07-19T20:12:00.000Z | library_app/validators.py | V-Kopio/django-library-manager | 04431a61d8e794434bb66db313755efc80cdc795 | [
"MIT"
] | 1 | 2021-05-24T06:18:51.000Z | 2021-05-24T06:18:51.000Z | from django.core.exceptions import ValidationError
from .sample.utilities.isbn import valid_isbn
def validate_isbn(value):
if not valid_isbn(value):
raise ValidationError('%s is not a valid ISBN number' % value)
| 28.25 | 70 | 0.761062 |
339c119a58c45c16bbbbce99ffe101c7a9ec7a4c | 903 | py | Python | src/oscar/apps/checkout/calculators.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/checkout/calculators.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | src/oscar/apps/checkout/calculators.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | from oscar.core import prices
class OrderTotalCalculator(object):
"""
Calculator class for calculating the order total.
"""
def __init__(self, request=None):
# We store a reference to the request as the total may
# depend on the user or the other checkout data in the session... | 36.12 | 72 | 0.651163 |
339c4e0e360ed9ef9906f0e51b64a0dc13826259 | 84,007 | py | Python | tensorflow/contrib/learn/python/learn/estimators/head.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/learn/python/learn/estimators/head.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/learn/python/learn/estimators/head.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 39.237272 | 95 | 0.677051 |
339c4fca21bde7010fe75f46bd3eb584525835d3 | 289 | py | Python | compiler_gym/util/statistics.py | sparkingdark/CompilerGym | 48b4fda4bd336729f941ce932cd82d773fee6024 | [
"MIT"
] | 3 | 2021-02-25T17:51:27.000Z | 2021-05-23T10:33:28.000Z | compiler_gym/util/statistics.py | soumith/CompilerGym | a5422ea856588107b257951383c1c821bcdf65da | [
"MIT"
] | null | null | null | compiler_gym/util/statistics.py | soumith/CompilerGym | a5422ea856588107b257951383c1c821bcdf65da | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import numpy as np
def geometric_mean(iterable):
a = np.log(iterable)
return np.exp(a.sum() / len(a))
| 26.272727 | 65 | 0.716263 |
339c78734b374eaeba995c389e3e01998d883b83 | 136 | py | Python | iris_sdk/models/maps/reservation_list.py | NumberAI/python-bandwidth-iris | 0e05f79d68b244812afb97e00fd65b3f46d00aa3 | [
"MIT"
] | 2 | 2020-04-13T13:47:59.000Z | 2022-02-23T20:32:41.000Z | iris_sdk/models/maps/reservation_list.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2020-09-18T20:59:24.000Z | 2021-08-25T16:51:42.000Z | iris_sdk/models/maps/reservation_list.py | bandwidthcom/python-bandwidth-iris | dbcb30569631395041b92917252d913166f7d3c9 | [
"MIT"
] | 5 | 2018-12-12T14:39:50.000Z | 2020-11-17T21:42:29.000Z | #!/usr/bin/env python
from iris_sdk.models.maps.base_map import BaseMap
class ReservationListMap(BaseMap):
reservation_id = None
| 17 | 49 | 0.779412 |
339c7bbe7d3a8b31d7afcc712e971faf0deaa922 | 94,269 | py | Python | NBA Project/venv/Lib/site-packages/plotly/graph_objs/splom/marker/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 1 | 2020-08-08T21:56:11.000Z | 2020-08-08T21:56:11.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/splom/marker/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | 2 | 2021-03-31T19:54:17.000Z | 2021-06-02T02:33:56.000Z | NBA Project/venv/Lib/site-packages/plotly/graph_objs/splom/marker/__init__.py | EnriqueGambra/Most-Efficient-NBA-Players | ea67c28b5294dbc9713200a937deb9f4211ba754 | [
"MIT"
] | null | null | null | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Line(_BaseTraceHierarchyType):
# autocolorscale
# --------------
@property
def autocolorscale(self):
"""
Determines whether the colorscale is a default palette
(`autoc... | 37.798316 | 98 | 0.573455 |
339c7ce398e3d8d8290f90d5d066d8ead2796a1f | 1,169 | py | Python | site_scons/bygg/build_products.py | abingham/ackward | f1a45293de570f4b4429d9eaeb3f6c4da7d245bf | [
"MIT"
] | null | null | null | site_scons/bygg/build_products.py | abingham/ackward | f1a45293de570f4b4429d9eaeb3f6c4da7d245bf | [
"MIT"
] | null | null | null | site_scons/bygg/build_products.py | abingham/ackward | f1a45293de570f4b4429d9eaeb3f6c4da7d245bf | [
"MIT"
] | null | null | null | class BuildProducts(object):
'''A class to help keep track of build products in the build.
Really this is just a wrapper around a dict stored at the key
'BUILD_TOOL' in an environment. This class doesn't worry about
what stored in that dict, though it's generally things like
SharedLib configurators... | 29.225 | 68 | 0.587682 |
339cdc9c6063a454d05ca125fb7217d797469956 | 13,908 | py | Python | plugins/jira.py | PaddyYen/nebot | dd8f017ae3bf558eeaeab668c511736c951c8742 | [
"Apache-2.0"
] | 54 | 2016-02-15T23:15:22.000Z | 2022-01-07T22:02:33.000Z | plugins/jira.py | Archangel45/Matrix-NEB-Remix | 21f6437217e6b406632d575468f68692ffcb82ef | [
"Apache-2.0"
] | 12 | 2016-01-26T17:26:41.000Z | 2020-01-11T12:42:30.000Z | plugins/jira.py | Archangel45/Matrix-NEB-Remix | 21f6437217e6b406632d575468f68692ffcb82ef | [
"Apache-2.0"
] | 40 | 2016-01-25T13:07:50.000Z | 2020-08-14T12:37:39.000Z | from neb.engine import KeyValueStore, RoomContextStore
from neb.plugins import Plugin, admin_only
import getpass
import json
import re
import requests
import logging as log
class JiraPlugin(Plugin):
""" Plugin for interacting with JIRA.
jira version : Display version information for this platform.
jira ... | 35.032746 | 113 | 0.543716 |
339cf5d823204601acc9ee4aaf46f589f648d32d | 10,764 | py | Python | chaospy/distributions/operators/addition.py | lblonk/chaospy | 1759a4307c6134b74ce63ff44973195f1e185f94 | [
"MIT"
] | 1 | 2020-04-29T20:53:25.000Z | 2020-04-29T20:53:25.000Z | chaospy/distributions/operators/addition.py | agonzs11/Polinomio-del-caos | 5a415ece07e6535488174bac69a6c0fcc2ca272d | [
"MIT"
] | null | null | null | chaospy/distributions/operators/addition.py | agonzs11/Polinomio-del-caos | 5a415ece07e6535488174bac69a6c0fcc2ca272d | [
"MIT"
] | null | null | null | """
Addition operator.
Example usage
-------------
Distribution and a constant::
>>> distribution = chaospy.Normal(0, 1) + 10
>>> print(distribution)
Add(Normal(mu=0, sigma=1), 10)
>>> print(numpy.around(distribution.sample(5), 4))
[10.395 8.7997 11.6476 9.9553 11.1382]
>>> print(numpy.aro... | 34.610932 | 111 | 0.530193 |
339cfa7abd30c698a2781bfdead45f32adc26e35 | 41 | py | Python | src/elemeno_ai_sdk/datasources/__init__.py | elemeno-ai/elemeno-ai-sdk | 2737b2c9c575119bd40efcd8c5e91a98f9d8b6b1 | [
"Apache-2.0"
] | 1 | 2021-11-16T13:38:39.000Z | 2021-11-16T13:38:39.000Z | src/elemeno_ai_sdk/datasources/__init__.py | elemeno-ai/elemeno-ai-sdk | 2737b2c9c575119bd40efcd8c5e91a98f9d8b6b1 | [
"Apache-2.0"
] | null | null | null | src/elemeno_ai_sdk/datasources/__init__.py | elemeno-ai/elemeno-ai-sdk | 2737b2c9c575119bd40efcd8c5e91a98f9d8b6b1 | [
"Apache-2.0"
] | null | null | null | __version__ = '0.0.1'
from . import gcp
| 10.25 | 21 | 0.658537 |
339d0fe4c3f81652386275d031a1e2fa3f49a475 | 733 | py | Python | src/summarize_results.py | usaito/asymmetric-tri-rec-real | bd734362ffa498ba0ed44bdd536083246650949f | [
"Apache-2.0"
] | 17 | 2020-04-27T02:11:39.000Z | 2022-03-24T06:32:22.000Z | src/summarize_results.py | aaditkamat/asymmetric-tri-rec-real | 4cc44a31d12a6b373e71c7da0c2e02d22e864f63 | [
"Apache-2.0"
] | 4 | 2020-11-13T18:47:09.000Z | 2022-02-10T01:32:39.000Z | src/summarize_results.py | aaditkamat/asymmetric-tri-rec-real | 4cc44a31d12a6b373e71c7da0c2e02d22e864f63 | [
"Apache-2.0"
] | 3 | 2021-03-29T07:37:11.000Z | 2022-03-21T02:17:43.000Z | """
Code for summarizing experimental results for the paper
"Asymmetric Tri-training for Debiasing Missing-Not-At-Random Rating Feedback".
"""
import argparse
import yaml
from utils.preprocessor import preprocess_datasets
from utils.result_tools import (summarize_data_statistics, summarize_experimental_results)
parse... | 33.318182 | 90 | 0.750341 |
339d12e32d96e0d99b612d1fe632dd92488cbf47 | 337 | py | Python | python/setup.py | anton-musrevinu/sharpNAR | 689803d1c1d57728597d839cef8863af61a113b7 | [
"MIT"
] | null | null | null | python/setup.py | anton-musrevinu/sharpNAR | 689803d1c1d57728597d839cef8863af61a113b7 | [
"MIT"
] | null | null | null | python/setup.py | anton-musrevinu/sharpNAR | 689803d1c1d57728597d839cef8863af61a113b7 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name='sharpsmt',
version='0.1',
description='sharpsmt Library to query sdd trees',
url='http://github.com/storborg/funniest',
author='Anton Fuxjaeger',
author_email='a.fuxjaeger@outlook.com',
license='Open Source',
packages=['sharpsmt'],
... | 30.636364 | 56 | 0.658754 |
339d1bf4b0dfb84d509f0e0bc537bee0b8cea748 | 894 | py | Python | tests/test_models.py | isaaccorley/detcon-pytorch | a5e03faf0c27bdbe64b72625873c0b2d3a696f04 | [
"MIT"
] | 5 | 2021-10-30T05:10:42.000Z | 2022-03-26T08:44:17.000Z | tests/test_models.py | isaaccorley/detcon-pytorch | a5e03faf0c27bdbe64b72625873c0b2d3a696f04 | [
"MIT"
] | 2 | 2021-12-20T08:52:50.000Z | 2021-12-28T15:14:48.000Z | tests/test_models.py | isaaccorley/detcon-pytorch | a5e03faf0c27bdbe64b72625873c0b2d3a696f04 | [
"MIT"
] | 1 | 2022-02-01T11:02:40.000Z | 2022-02-01T11:02:40.000Z | from typing import Any, Generator
import pytest
import pytorch_lightning as pl
from _pytest.monkeypatch import MonkeyPatch
from detcon.models import DetConB
def mocked_log(*args: Any, **kwargs: Any) -> None:
pass
class TestDetConB:
@pytest.fixture
def module(self, monkeypatch: Generator[MonkeyPatch, N... | 28.83871 | 81 | 0.709172 |
339d39ba2673064b80a904af1553705e8214dbd0 | 6,243 | py | Python | thgsp/bga/mfs.py | bwdeng20/thgsp | 785b3ff291d72ee51e51e4cdbfd4bab63f8de9ac | [
"BSD-3-Clause"
] | 22 | 2021-01-13T05:15:38.000Z | 2022-01-17T01:37:29.000Z | thgsp/bga/mfs.py | bwdeng20/thgsp | 785b3ff291d72ee51e51e4cdbfd4bab63f8de9ac | [
"BSD-3-Clause"
] | 2 | 2021-03-26T04:36:39.000Z | 2022-01-11T16:17:56.000Z | thgsp/bga/mfs.py | bwdeng20/thgsp | 785b3ff291d72ee51e51e4cdbfd4bab63f8de9ac | [
"BSD-3-Clause"
] | 2 | 2021-01-13T05:15:43.000Z | 2022-01-01T12:51:32.000Z | from typing import List, Tuple
from scipy.sparse import lil_matrix, eye
from scipy.sparse.csgraph import structural_rank, breadth_first_order
from scipy.sparse.linalg import inv
from sksparse.cholmod import cholesky
from torch_sparse import SparseTensor
from thgsp.alg import dsatur
from .utils import laplace, biparti... | 34.683333 | 120 | 0.547333 |
339d42a27b441ffa483a8d27e5abe3ca42eb29ed | 1,494 | py | Python | src/kickoff_timer.py | mnuyens/forseti2 | 3c6d76ffac2b64d51f03d3922e3b388a4e35f1a8 | [
"Apache-2.0"
] | 1 | 2015-03-07T04:48:53.000Z | 2015-03-07T04:48:53.000Z | src/kickoff_timer.py | mnuyens/forseti2 | 3c6d76ffac2b64d51f03d3922e3b388a4e35f1a8 | [
"Apache-2.0"
] | null | null | null | src/kickoff_timer.py | mnuyens/forseti2 | 3c6d76ffac2b64d51f03d3922e3b388a4e35f1a8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Feb 20 01:34:13 2014
@author: ajc
countdown to kickoff.
"""
import pygame
import datetime
import time
def draw_text(surface, font, text, pos, color):
label = font.render(text, 1, color)
surface.blit(label, pos)
def main():
pygame.init()
window = pygame.d... | 28.730769 | 95 | 0.595716 |
339d8f3504ce8ba620239061319aba5e9a6c09ee | 1,588 | py | Python | pytreex/block/write/conllu.py | leotilli/pytreex | a40bfb9f33ffdb931993b30879830f1c898f1414 | [
"Apache-2.0"
] | null | null | null | pytreex/block/write/conllu.py | leotilli/pytreex | a40bfb9f33ffdb931993b30879830f1c898f1414 | [
"Apache-2.0"
] | null | null | null | pytreex/block/write/conllu.py | leotilli/pytreex | a40bfb9f33ffdb931993b30879830f1c898f1414 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
#
# Block for writing CoNLL-U files
# https://universaldependencies.github.io/docs/format.html
from __future__ import absolute_import
from __future__ import unicode_literals
from pytreex.block.write.basewriter import BaseWriter
from pytreex.core.util import file_stream
__author__... | 34.521739 | 117 | 0.585013 |
339da6f52465aa8734eb7decd52e7ef06c22574a | 9,816 | py | Python | qcodes/tests/test_autoloadable_channels.py | liangosc/Qcodes | 0f0a59fa4953e3ef44031e94459d1ff661f26473 | [
"MIT"
] | null | null | null | qcodes/tests/test_autoloadable_channels.py | liangosc/Qcodes | 0f0a59fa4953e3ef44031e94459d1ff661f26473 | [
"MIT"
] | 230 | 2020-08-17T06:08:33.000Z | 2022-03-29T12:06:58.000Z | qcodes/tests/test_autoloadable_channels.py | liangosc/Qcodes | 0f0a59fa4953e3ef44031e94459d1ff661f26473 | [
"MIT"
] | null | null | null | """
Test the auto-loadable channels and channels list. These channels are helpful
when dealing with channel types which can be added or deleted from an
instrument. Please note that `channel` in this context does not necessarily
mean a physical instrument channel, but rather an instrument sub-module.
"""
from typing im... | 33.848276 | 80 | 0.643134 |
339db8efa71e70367f01a53789d8d9ffa7793729 | 5,051 | py | Python | profiles_api/views.py | kurtnovice/profiles-rest-api | cc78fce6137e66446cf59dd5a99ee03ec623a74a | [
"MIT"
] | null | null | null | profiles_api/views.py | kurtnovice/profiles-rest-api | cc78fce6137e66446cf59dd5a99ee03ec623a74a | [
"MIT"
] | 8 | 2020-02-12T03:05:24.000Z | 2022-02-10T08:55:36.000Z | profiles_api/views.py | kurtnovice/profiles-rest-api | cc78fce6137e66446cf59dd5a99ee03ec623a74a | [
"MIT"
] | null | null | null | 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
#generate random token string, every request we add token to request
from rest_framework import filte... | 36.078571 | 97 | 0.673728 |
339e13e69f50daa5568de9a65065d66b698a1e89 | 3,652 | py | Python | envoy/datadog_checks/envoy/parser.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 4 | 2021-06-21T19:21:49.000Z | 2021-06-23T21:21:55.000Z | envoy/datadog_checks/envoy/parser.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2018-08-15T05:50:17.000Z | 2018-08-15T05:50:17.000Z | envoy/datadog_checks/envoy/parser.py | seants/integrations-core | 1e5548915fc24f1bbd095e845f0940c22992b09c | [
"BSD-3-Clause"
] | 1 | 2021-06-21T19:21:51.000Z | 2021-06-21T19:21:51.000Z | import re
from math import isnan
from six.moves import range, zip
from .errors import UnknownMetric, UnknownTags
from .metrics import METRIC_PREFIX, METRIC_TREE, METRICS
HISTOGRAM = re.compile(r'([P0-9.]+)\(([^,]+)')
PERCENTILE_SUFFIX = {
'P0': '.0percentile',
'P25': '.25percentile',
'P50': '.50percenti... | 29.691057 | 95 | 0.605422 |
339e3aa8ce49c8dd14bfbb1c0d7fc44d7fe21ef4 | 9,503 | py | Python | dipy/segment/mask.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | null | null | null | dipy/segment/mask.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | null | null | null | dipy/segment/mask.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | null | null | null | from __future__ import division, print_function, absolute_import
from warnings import warn
import numpy as np
from dipy.reconst.dti import fractional_anisotropy, color_fa
from scipy.ndimage.filters import median_filter
try:
from skimage.filters import threshold_otsu as otsu
except:
from .threshold import ot... | 32.10473 | 85 | 0.652741 |
339e436afe0d9ce542929a783f48815241f955c9 | 10,587 | py | Python | test/azure/low-level/Expected/AcceptanceTests/AzureParameterGroupingLowLevel/azureparametergroupinglowlevel/rest/parameter_grouping/_request_builders.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/azure/low-level/Expected/AcceptanceTests/AzureParameterGroupingLowLevel/azureparametergroupinglowlevel/rest/parameter_grouping/_request_builders.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/azure/low-level/Expected/AcceptanceTests/AzureParameterGroupingLowLevel/azureparametergroupinglowlevel/rest/parameter_grouping/_request_builders.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.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 ... | 36.888502 | 101 | 0.674318 |
339e53d4881c71bd10454f8f841f42624a25a4a4 | 524 | py | Python | commands/disablecommands.py | Dabomstew/goldenrod | 36c4f9e5321788779840371b09a78cc6b26b38b1 | [
"MIT"
] | 2 | 2015-05-20T00:42:03.000Z | 2015-05-23T04:18:42.000Z | commands/disablecommands.py | Dabomstew/goldenrod | 36c4f9e5321788779840371b09a78cc6b26b38b1 | [
"MIT"
] | null | null | null | commands/disablecommands.py | Dabomstew/goldenrod | 36c4f9e5321788779840371b09a78cc6b26b38b1 | [
"MIT"
] | null | null | null | from twisted.internet import reactor
import goldenrod
import config
def execute(parser, bot, user, args):
if not parser.checkPerms(bot, user, "owner") or not bot.isWhisperRequest():
return
newChannel = args.split()[0].strip().lower()
if newChannel == "":
return
goldenrod.remov... | 24.952381 | 80 | 0.652672 |
339e643392aea2a73f7f71c52e35e509ec45c6b7 | 10,013 | py | Python | dvc/scm/git/__init__.py | drorata/dvc | b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0 | [
"Apache-2.0"
] | null | null | null | dvc/scm/git/__init__.py | drorata/dvc | b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0 | [
"Apache-2.0"
] | null | null | null | dvc/scm/git/__init__.py | drorata/dvc | b6bc65fcbf269b94b7c1ce2d9dff641dedb039b0 | [
"Apache-2.0"
] | null | null | null | """Manages Git."""
from __future__ import unicode_literals
import os
import logging
from dvc.utils.compat import str, open
from dvc.utils import fix_env, relpath
from dvc.scm.base import (
Base,
SCMError,
FileNotInRepoError,
FileNotInTargetSubdirError,
)
from dvc.scm.git.tree import GitTree
logger ... | 30.809231 | 78 | 0.592929 |
339ea0fd10c3e92aad80c7490506005bd0caa073 | 1,312 | py | Python | 0x0F-python-object_relational_mapping/5-filter_cities.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | 0x0F-python-object_relational_mapping/5-filter_cities.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | 0x0F-python-object_relational_mapping/5-filter_cities.py | FatChicken277/holbertonschool-higher_level_programming | 520d6310a5e2a874f8c5f5185d0fb769b6412e7c | [
"CNRI-Python"
] | null | null | null | #!/usr/bin/python3
"""This module contains functions that lists all cities of that state,
using the specific database.
"""
import MySQLdb
import sys
def main_method():
"""It receives the input parameters and sends them to the
corresponding methods.
"""
args = sys.argv
host = "localhost"
... | 23.017544 | 70 | 0.612043 |
339eb4789be336464dcb7c60dec8fb8b641afe04 | 414 | py | Python | askci/plugins/pam_auth/urls.py | hpsee/askci | ef1e2e75481b71db7fbe774cb81938055aa596d0 | [
"MIT"
] | 3 | 2019-11-21T09:04:36.000Z | 2019-11-23T13:29:43.000Z | askci/plugins/pam_auth/urls.py | hpsee/askci | ef1e2e75481b71db7fbe774cb81938055aa596d0 | [
"MIT"
] | 13 | 2019-11-21T20:28:23.000Z | 2019-11-26T19:34:22.000Z | askci/plugins/pam_auth/urls.py | hpsee/askci | ef1e2e75481b71db7fbe774cb81938055aa596d0 | [
"MIT"
] | null | null | null | from django.conf.urls import url
from django.contrib.auth import views as auth_views
urlpatterns = [
url(
r"^login/$",
auth_views.LoginView.as_view(template_name="pam_auth/login.html"),
name="pam_auth-login",
),
url(
r"^logout/(?P<next>[\w\-\:/]+)?$",
auth_views.Logi... | 25.875 | 75 | 0.615942 |
339edf15cfadf1e28c559602aff72c98c786ad85 | 4,962 | py | Python | components/exp-test-agent/tests/test_inbound_tasks.py | sfahad1414/AGENT | 84069edc96b6190bb03ffd5099cbc8966061a563 | [
"Apache-2.0"
] | 15 | 2020-05-06T16:17:56.000Z | 2022-03-30T12:25:16.000Z | components/exp-test-agent/tests/test_inbound_tasks.py | dionny/AGENT | 8a833406b590e23623fcc67db99f6f964d002396 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:17:16.000Z | 2022-02-10T06:35:58.000Z | components/exp-test-agent/tests/test_inbound_tasks.py | dionny/AGENT | 8a833406b590e23623fcc67db99f6f964d002396 | [
"Apache-2.0"
] | 7 | 2020-04-07T18:47:55.000Z | 2022-03-30T12:14:58.000Z | from unittest.mock import patch, Mock, call
from inbound_tasks import start_session, stop_session, handle_planned_flow
@patch('inbound_tasks.AgentLoop')
@patch('inbound_tasks.general_memory')
@patch.dict('inbound_tasks.os.environ', {'RUNNER_URL': 'runner_url'})
@patch('inbound_tasks.LOGGER')
def test_start_session_w... | 36.218978 | 119 | 0.729141 |
339eeab89007ab6d46922efc3595c1d9c8639eb8 | 12,426 | py | Python | txweb2/resource.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | 1 | 2017-02-18T19:22:19.000Z | 2017-02-18T19:22:19.000Z | txweb2/resource.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | txweb2/resource.py | eventable/CalendarServer | 384444edb1966b530bc391789afbe3fb9cd6fd3e | [
"Apache-2.0"
] | null | null | null | # -*- test-case-name: txweb2.test.test_server,twext.web2.test.test_resource -*-
##
# Copyright (c) 2001-2007 Twisted Matrix Laboratories.
# Copyright (c) 2010-2015 Apple Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documenta... | 32.443864 | 79 | 0.63858 |
339ef6f690dd5430682d6ecd1c00069960e9a134 | 97,556 | py | Python | tests/test_ecs/test_ecs_boto3.py | pgajdos/moto | 9ec0ab45721bbc2f3770c38654d65faa6f562f77 | [
"Apache-2.0"
] | null | null | null | tests/test_ecs/test_ecs_boto3.py | pgajdos/moto | 9ec0ab45721bbc2f3770c38654d65faa6f562f77 | [
"Apache-2.0"
] | null | null | null | tests/test_ecs/test_ecs_boto3.py | pgajdos/moto | 9ec0ab45721bbc2f3770c38654d65faa6f562f77 | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
from datetime import datetime
from botocore.exceptions import ClientError
import boto3
import sure # noqa
import json
from moto.ec2 import utils as ec2_utils
from uuid import UUID
from moto import mock_ecs
from moto import mock_ec2
import pytest
@mock_ecs
def test_create_clu... | 35.269704 | 145 | 0.623314 |
339ef8b47d8795d6c42dd0a4d3ae7dbdba324f4c | 2,422 | py | Python | pyhanko_tests/test_pkcs11.py | ooguz/pyHanko | f1490d9ecaa74ce600e464a27807290d486acc6f | [
"MIT"
] | null | null | null | pyhanko_tests/test_pkcs11.py | ooguz/pyHanko | f1490d9ecaa74ce600e464a27807290d486acc6f | [
"MIT"
] | null | null | null | pyhanko_tests/test_pkcs11.py | ooguz/pyHanko | f1490d9ecaa74ce600e464a27807290d486acc6f | [
"MIT"
] | 1 | 2021-04-08T05:11:03.000Z | 2021-04-08T05:11:03.000Z | """
Tests for PKCS#11 functionality.
NOTE: these are not run in CI, due to lack of testing setup.
"""
import os
from io import BytesIO
import pytest
import logging
from freezegun import freeze_time
from pyhanko.pdf_utils.incremental_writer import IncrementalPdfFileWriter
from pyhanko.pdf_utils.reader import PdfFile... | 31.051282 | 79 | 0.717176 |
339f0e30aee6cbd6a3a5ffc35bd9ff467bc3593a | 32,720 | py | Python | src/CompartmentalSystems/smooth_reservoir_model.py | goujou/CompartmentalSystems | 4724555c33f11395ddc32738e8dfed7349ee155f | [
"MIT"
] | null | null | null | src/CompartmentalSystems/smooth_reservoir_model.py | goujou/CompartmentalSystems | 4724555c33f11395ddc32738e8dfed7349ee155f | [
"MIT"
] | null | null | null | src/CompartmentalSystems/smooth_reservoir_model.py | goujou/CompartmentalSystems | 4724555c33f11395ddc32738e8dfed7349ee155f | [
"MIT"
] | null | null | null | """Module for symbolical treatment of smooth reservoir models.
This module handles the symbolic treatment of compartmental/reservoir/pool
models.
It does not deal with numerical computations and model simulations,
but rather defines the underlying structure of the respective model.
All fluxes or matrix entries are s... | 37.437071 | 226 | 0.588814 |
339f302cec61bb9244c6223dbe5c59533c9a348a | 672 | py | Python | apollo/common/currencies.py | Aukbit/apollo | 0afd1360f5a102335c55afaf138e0ecb96644128 | [
"MIT"
] | null | null | null | apollo/common/currencies.py | Aukbit/apollo | 0afd1360f5a102335c55afaf138e0ecb96644128 | [
"MIT"
] | null | null | null | apollo/common/currencies.py | Aukbit/apollo | 0afd1360f5a102335c55afaf138e0ecb96644128 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python
# -*- coding: utf-8 -*-
# ----------------
# Settings for currency
# ----------------
# Using Babel's currency formatting
# http://babel.pocoo.org/docs/api/numbers/#babel.numbers.format_currency
# ----------------
GBP = 'gbp', '£', 'British Pound'
EUR = 'eur', '€', 'Euro'
USD = 'usd', '$', 'US ... | 25.846154 | 88 | 0.644345 |
339f3e7fecba6d63f8bc8fb21d7e2ffa37c07dc0 | 3,953 | py | Python | sdks/python/appcenter_sdk/models/GitHubMarketplacePurchase.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/GitHubMarketplacePurchase.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/GitHubMarketplacePurchase.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class GitHubMarketpl... | 27.262069 | 84 | 0.571465 |
339f7e8dd7a297009f09ea4c711b58af9512bb58 | 5,953 | py | Python | research/deeplab/input_preprocess.py | grananqvist/models | 594f5dc097b88287c8b20d44bf086218f3e5a0ae | [
"Apache-2.0"
] | null | null | null | research/deeplab/input_preprocess.py | grananqvist/models | 594f5dc097b88287c8b20d44bf086218f3e5a0ae | [
"Apache-2.0"
] | null | null | null | research/deeplab/input_preprocess.py | grananqvist/models | 594f5dc097b88287c8b20d44bf086218f3e5a0ae | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 39.686667 | 83 | 0.682177 |
339fa6e5a592468a491e17a8945647cd4fc8764f | 3,672 | py | Python | experiments/ashvin/icml2020/hand/pen/demo_bc2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/pen/demo_bc2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/ashvin/icml2020/hand/pen/demo_bc2.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | from rlkit.launchers.launcher_util import run_experiment
import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.experiments.ashvin.awr_rl import state_td3bc_experiment
from rlkit.launchers.arglauncher import run_variants
# from multiworld.envs.mujoco.cameras import hand_pen_v0
if __name__ == "__main__":
va... | 32.210526 | 93 | 0.596678 |
339fb1e77920d239d81704337573b68571700cd6 | 908 | py | Python | python/mxnet/ndarray/numpy/random.py | ckt624/incubator-mxnet | bcbdc1cc797064fafc0a46a3dd00d446a7c60357 | [
"Apache-2.0"
] | 4 | 2018-10-12T05:02:17.000Z | 2019-06-27T04:44:11.000Z | python/mxnet/ndarray/numpy/random.py | ckt624/incubator-mxnet | bcbdc1cc797064fafc0a46a3dd00d446a7c60357 | [
"Apache-2.0"
] | 4 | 2018-03-21T00:00:03.000Z | 2019-09-03T23:54:44.000Z | python/mxnet/ndarray/numpy/random.py | ckt624/incubator-mxnet | bcbdc1cc797064fafc0a46a3dd00d446a7c60357 | [
"Apache-2.0"
] | 1 | 2018-06-22T06:49:26.000Z | 2018-06-22T06:49:26.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 41.272727 | 68 | 0.772026 |
339fb818c9deace4a53c1e712c3a16aa9ad094fc | 2,146 | py | Python | code/config/config.py | dieterpl/iDogstra | 62ee246763e107335b9caf0a4f96239fa0953234 | [
"MIT"
] | null | null | null | code/config/config.py | dieterpl/iDogstra | 62ee246763e107335b9caf0a4f96239fa0953234 | [
"MIT"
] | null | null | null | code/config/config.py | dieterpl/iDogstra | 62ee246763e107335b9caf0a4f96239fa0953234 | [
"MIT"
] | null | null | null | import os
CAMERA_RESOLUTION = (640, 480) # the resolution to use for the raspberry pi camera
SCANLINE_DISTANCE = 5
DETECTION_SIZE_THRESHOLD = .001 # minimum size of a colored object, relative to the total image size
DEBUG_MODE = False # enable or disable debug mode
GRAPHICAL_OUTPUT = True # enable or disable gr... | 24.666667 | 118 | 0.764678 |
339fe39fc699370cb8f365520f10b92744c90cf0 | 4,567 | py | Python | moler/cmd/at/get_apns.py | AdamKlekowski/moler | 9d032bad402d9863685b2a8624320566512c14cc | [
"BSD-3-Clause"
] | null | null | null | moler/cmd/at/get_apns.py | AdamKlekowski/moler | 9d032bad402d9863685b2a8624320566512c14cc | [
"BSD-3-Clause"
] | null | null | null | moler/cmd/at/get_apns.py | AdamKlekowski/moler | 9d032bad402d9863685b2a8624320566512c14cc | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
AT+CGDCONT
AT commands specification:
google for: 3gpp specification 27.007
(always check against latest version of standard)
"""
__author__ = 'Adam Klekowski'
__copyright__ = 'Copyright (C) 2020, Nokia'
__email__ = 'adam.klekowski@nokia.com'
import re
from moler.cmd.at.genericat import ... | 37.434426 | 107 | 0.572805 |
33a0087e848b48369a68d4460e6efe361880e946 | 5,115 | py | Python | scripts/latent_smoothness_visualizer/latent_eps_visualizer.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | scripts/latent_smoothness_visualizer/latent_eps_visualizer.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | scripts/latent_smoothness_visualizer/latent_eps_visualizer.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import sys
from rlkit.misc.asset_loader import sync_down
from rlkit.misc.asset_loader import load_local_or_remote_file
import torch
import pickle
import numpy as np
from multiworld.core.image_env import ImageEnv
from rlkit.torch import pytorch_util as ptu
import matplotlib
matplotlib.use('Agg')
from torchvision.utils i... | 31.189024 | 130 | 0.709286 |
33a02454995f30a385fd6c3546b8295d812ef4de | 89 | py | Python | src/hub/dataload/sources/pharmgkb/__init__.py | ravila4/mychem.info | 9b63b5f0957b5e7b252ca8122734a363905036b3 | [
"Apache-2.0"
] | 10 | 2017-07-24T11:45:27.000Z | 2022-02-14T13:42:36.000Z | src/hub/dataload/sources/pharmgkb/__init__.py | veleritas/mychem.info | bb22357d4cbbc3c4865da224bf998f2cbc59f8f2 | [
"Apache-2.0"
] | 92 | 2017-06-22T16:49:20.000Z | 2022-03-24T20:50:01.000Z | src/hub/dataload/sources/pharmgkb/__init__.py | veleritas/mychem.info | bb22357d4cbbc3c4865da224bf998f2cbc59f8f2 | [
"Apache-2.0"
] | 11 | 2017-06-12T18:31:35.000Z | 2022-01-31T02:56:52.000Z | from .pharmgkb_dump import PharmGkbDumper
from .pharmgkb_upload import PharmGkbUploader
| 22.25 | 45 | 0.876404 |
33a02ab860baa7ba4e73c45e48411ad5a71448fb | 3,036 | py | Python | ads/common/object_storage_details.py | oracle/accelerated-data-science | d594ed0c8c1365daf4cf9e860daebc760fa9a24b | [
"UPL-1.0",
"Apache-2.0"
] | 20 | 2022-02-22T19:07:09.000Z | 2022-03-16T17:21:42.000Z | ads/common/object_storage_details.py | oracle/accelerated-data-science | d594ed0c8c1365daf4cf9e860daebc760fa9a24b | [
"UPL-1.0",
"Apache-2.0"
] | null | null | null | ads/common/object_storage_details.py | oracle/accelerated-data-science | d594ed0c8c1365daf4cf9e860daebc760fa9a24b | [
"UPL-1.0",
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*--
# Copyright (c) 2021 Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/
import json
import os
from dataclasses import dataclass
from urllib.parse import urlparse
from ads.common import a... | 30.36 | 111 | 0.623188 |
33a03de2c2ef38ea9871dfa542420d543959688a | 2,381 | py | Python | src/maho/modules/markov.py | evangelos-ch/maho-bot | 458c3ed0e4cb4d8edd300441b2defbc481aaf3f3 | [
"MIT"
] | null | null | null | src/maho/modules/markov.py | evangelos-ch/maho-bot | 458c3ed0e4cb4d8edd300441b2defbc481aaf3f3 | [
"MIT"
] | null | null | null | src/maho/modules/markov.py | evangelos-ch/maho-bot | 458c3ed0e4cb4d8edd300441b2defbc481aaf3f3 | [
"MIT"
] | 1 | 2021-02-16T13:06:56.000Z | 2021-02-16T13:06:56.000Z | """Cog wrapper module for the !log command and other markov operations."""
import random
from pathlib import Path
from collections import Counter
from discord.ext import commands
from maho import utils
def get_markov_message(lines) -> str:
"""Get a random message based on a markov chain."""
words_by_line = [l... | 33.535211 | 84 | 0.662747 |
33a0500739aa2f572455e38d140ce410675a24eb | 168 | py | Python | scripts/batchmanager_test.py | ATTPC/VAE-event-classification | aae331d44bffffec2ca8a6cdef71208899db0052 | [
"MIT"
] | null | null | null | scripts/batchmanager_test.py | ATTPC/VAE-event-classification | aae331d44bffffec2ca8a6cdef71208899db0052 | [
"MIT"
] | 2 | 2018-12-20T20:10:52.000Z | 2019-02-04T17:44:01.000Z | scripts/batchmanager_test.py | ATTPC/VAE-event-classification | aae331d44bffffec2ca8a6cdef71208899db0052 | [
"MIT"
] | null | null | null | import sys
sys.path.append("../src")
from batchmanager import BatchManager
import numpy as np
bm = BatchManager(20, 5, False)
# sys.exit()
for i in bm:
print(i)
| 14 | 37 | 0.696429 |
33a083f6d4793423ece9b8d426a7613ee5c58f61 | 490 | py | Python | ml-agents/mlagents/trainers/torch/components/reward_providers/extrinsic_reward_provider.py | mattinjersey/ml-agents | 7dcf947f541d661cc4a94b0e7758e1b12c6be078 | [
"Apache-2.0"
] | 2 | 2021-08-10T21:39:09.000Z | 2021-08-11T09:46:03.000Z | ml-agents/mlagents/trainers/torch/components/reward_providers/extrinsic_reward_provider.py | Rushoo26/ml-agents | c73616c176f383bebefc3a1895ed1265661a1236 | [
"Apache-2.0"
] | 1 | 2021-01-31T09:16:16.000Z | 2021-01-31T18:24:34.000Z | ml-agents/mlagents/trainers/torch/components/reward_providers/extrinsic_reward_provider.py | Rushoo26/ml-agents | c73616c176f383bebefc3a1895ed1265661a1236 | [
"Apache-2.0"
] | 1 | 2021-01-31T09:02:17.000Z | 2021-01-31T09:02:17.000Z | import numpy as np
from typing import Dict
from mlagents.trainers.buffer import AgentBuffer
from mlagents.trainers.torch.components.reward_providers.base_reward_provider import (
BaseRewardProvider,
)
class ExtrinsicRewardProvider(BaseRewardProvider):
def evaluate(self, mini_batch: AgentBuffer) -> np.ndarray... | 30.625 | 86 | 0.767347 |
33a0bcba4c2fb00d9e7807eda0711b892b8171f7 | 5,391 | py | Python | src/utils/parse_config.py | nobu-g/cohesion-analysis | bf2e22c1aff51f96fd2aaef6359839646548c3be | [
"MIT"
] | 12 | 2020-12-25T11:13:17.000Z | 2021-12-28T05:19:46.000Z | src/utils/parse_config.py | nobu-g/cohesion-analysis | bf2e22c1aff51f96fd2aaef6359839646548c3be | [
"MIT"
] | 1 | 2020-12-25T09:26:26.000Z | 2020-12-25T09:26:34.000Z | src/utils/parse_config.py | nobu-g/cohesion-analysis | bf2e22c1aff51f96fd2aaef6359839646548c3be | [
"MIT"
] | 1 | 2022-02-25T13:22:47.000Z | 2022-02-25T13:22:47.000Z | import os
import logging
from datetime import datetime
from functools import partial
from pathlib import Path
from logger import setup_logging
from utils import read_json, write_json
LOG_LEVELS = {
0: logging.WARNING,
1: logging.INFO,
2: logging.DEBUG
}
class ConfigParser:
def __init__(self, config,... | 37.699301 | 116 | 0.631052 |
33a0df8c54deff398f7d71ff146d153d9c2bcae3 | 1,367 | py | Python | modules/tools/mobileye_viewer/subplot_s_theta.py | DavidSplit/apollo-3.0 | 9f82838e857e4c9146952946cbc34b9f35098deb | [
"Apache-2.0"
] | 6 | 2019-10-11T07:57:49.000Z | 2022-02-23T15:23:41.000Z | modules/tools/mobileye_viewer/subplot_s_theta.py | DavidSplit/apollo-3.0 | 9f82838e857e4c9146952946cbc34b9f35098deb | [
"Apache-2.0"
] | null | null | null | modules/tools/mobileye_viewer/subplot_s_theta.py | DavidSplit/apollo-3.0 | 9f82838e857e4c9146952946cbc34b9f35098deb | [
"Apache-2.0"
] | 12 | 2019-10-11T07:57:49.000Z | 2022-03-16T05:13:00.000Z | #!/usr/bin/env python
###############################################################################
# Copyright 2017 The Apollo Authors. All Rights Reserved.
# Modifications Copyright (c) 2018 LG Electronics, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not ... | 36.945946 | 79 | 0.623994 |
33a0f176976632a60e1900d2b9f6e1eaab9d04b6 | 5,862 | py | Python | rep/estimators/sklearn.py | HolyBayes/rep | 8a8d70f87e148e6fd73ff0c3a8606e6074a5c47b | [
"Apache-2.0"
] | 726 | 2015-04-16T08:16:30.000Z | 2022-03-25T19:19:42.000Z | rep/estimators/sklearn.py | HolyBayes/rep | 8a8d70f87e148e6fd73ff0c3a8606e6074a5c47b | [
"Apache-2.0"
] | 86 | 2015-04-16T23:57:01.000Z | 2021-09-26T01:03:47.000Z | rep/estimators/sklearn.py | HolyBayes/rep | 8a8d70f87e148e6fd73ff0c3a8606e6074a5c47b | [
"Apache-2.0"
] | 167 | 2015-04-16T11:42:18.000Z | 2022-01-11T15:10:19.000Z | """
:class:`SklearnClassifier` and :class:`SklearnRegressor` are wrappers for algorithms from scikit-learn.
From user perspective, wrapped sklearn model behaves in the same way as non-wrapped,
but has one additional parameter *features* to choose necessary columns to use in training.
Typically, models from **REP** ar... | 36.867925 | 120 | 0.67332 |
33a0f42a08e437b6bde33317be9b8ffe682470f8 | 23,415 | py | Python | cn_proj/rdt.py | Carl-Rabbit/CS305-CN-Proj | d005c32674b7ce3f90e4099c536b3c914e133d7d | [
"Apache-2.0"
] | null | null | null | cn_proj/rdt.py | Carl-Rabbit/CS305-CN-Proj | d005c32674b7ce3f90e4099c536b3c914e133d7d | [
"Apache-2.0"
] | null | null | null | cn_proj/rdt.py | Carl-Rabbit/CS305-CN-Proj | d005c32674b7ce3f90e4099c536b3c914e133d7d | [
"Apache-2.0"
] | null | null | null | import sys
from USocket import UnreliableSocket
import utils
import USocket
import math
import threading
from queue import Queue
from queue import Empty
import time
import random
class RDTSocket(UnreliableSocket):
"""
The functions with which you are to build your RDT.
- recvfrom(bufsize)->bytes, addr
... | 39.889267 | 121 | 0.514884 |
33a0f4f57599ad45b60b30661b2e62b93924c85d | 1,046 | py | Python | tests/unit/test_analytic_km.py | Numerics88/n88tools | e982d3190897197db9612c65fcca57f9b52a576f | [
"MIT"
] | 1 | 2018-01-29T03:27:52.000Z | 2018-01-29T03:27:52.000Z | tests/unit/test_analytic_km.py | Numerics88/n88tools | e982d3190897197db9612c65fcca57f9b52a576f | [
"MIT"
] | 6 | 2019-12-17T00:09:03.000Z | 2021-01-18T19:14:49.000Z | tests/unit/test_analytic_km.py | Numerics88/n88tools | e982d3190897197db9612c65fcca57f9b52a576f | [
"MIT"
] | null | null | null | from __future__ import division
import unittest
from n88tools import analytic_km
import numpy as np
class TestAnalyticKM(unittest.TestCase):
def test_instantiate_Hexahedron(self):
'''Can instantiate Hexahedron'''
a = np.ones((3))
_ = analytic_km.Hexahedron(a)
def test_instantiate_Isot... | 28.27027 | 58 | 0.625239 |
33a104e630c937738a2fbd6f54f15d1fdf99f69a | 721 | py | Python | var/spack/repos/builtin/packages/r-fracdiff/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2020-09-10T22:50:08.000Z | 2021-01-12T22:18:54.000Z | var/spack/repos/builtin/packages/r-fracdiff/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2021-01-08T22:23:53.000Z | 2022-03-30T11:08:17.000Z | var/spack/repos/builtin/packages/r-fracdiff/package.py | kehw/spack | 4f49b1a9301447a8cf880c99820cad65e5c2d7e3 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class RFracdiff(RPackage):
"""Maximum likelihood estimation of the parameters of a
fractiona... | 37.947368 | 95 | 0.743412 |
33a11940a4ad01c2b61ad0d68ab4abb6fcf3005b | 961 | py | Python | tests/component/test_all_components.py | pauleveritt/wired_components | a9072d5fc48680d5ff895887842ffd0f06bc0081 | [
"MIT"
] | 1 | 2019-09-15T12:30:44.000Z | 2019-09-15T12:30:44.000Z | tests/component/test_all_components.py | pauleveritt/wired_components | a9072d5fc48680d5ff895887842ffd0f06bc0081 | [
"MIT"
] | null | null | null | tests/component/test_all_components.py | pauleveritt/wired_components | a9072d5fc48680d5ff895887842ffd0f06bc0081 | [
"MIT"
] | null | null | null | from zope.interface import directlyProvides
def test_all_components(app_container):
from wired_components.component import IAllComponents
from wired_components.fixtures import Breadcrumb
components = app_container.get(IAllComponents)
assert components['Breadcrumb'] == Breadcrumb
def test_all_compon... | 33.137931 | 62 | 0.788762 |
33a121373021d3c9ab1c5481672fa7dbec5e591b | 28,439 | py | Python | program_synthesis/karel/models/karel_model.py | kavigupta/program_synthesis | 0b04b1d3b63954ba3d404a8d96c4da18667a1b02 | [
"Apache-2.0"
] | null | null | null | program_synthesis/karel/models/karel_model.py | kavigupta/program_synthesis | 0b04b1d3b63954ba3d404a8d96c4da18667a1b02 | [
"Apache-2.0"
] | null | null | null | program_synthesis/karel/models/karel_model.py | kavigupta/program_synthesis | 0b04b1d3b63954ba3d404a8d96c4da18667a1b02 | [
"Apache-2.0"
] | null | null | null | import collections
import itertools
import numpy as np
import operator
import traceback
import torch
from torch import nn
from torch.autograd import Variable
from program_synthesis.common.models import beam_search
from program_synthesis.karel.dataset import data
from program_synthesis.karel.dataset import dataset
fr... | 41.037518 | 100 | 0.596259 |
33a121d789dd158d678512d19193c5ba2a4b6083 | 5,334 | py | Python | scripts/smart_create_gen/generate_smart_create.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | 1 | 2018-01-30T05:55:29.000Z | 2018-01-30T05:55:29.000Z | scripts/smart_create_gen/generate_smart_create.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | 3 | 2021-03-26T00:48:20.000Z | 2022-03-29T22:05:39.000Z | scripts/smart_create_gen/generate_smart_create.py | v-Ajnava/azure-cli | febec631d79bfca151e84267b5b409594bad598e | [
"MIT"
] | 1 | 2020-07-13T22:28:09.000Z | 2020-07-13T22:28:09.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 43.016129 | 276 | 0.662167 |
33a12a6f0643087c8c7b41c62386e902bac1632a | 15,782 | py | Python | intersight/apis/iaas_connector_pack_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/apis/iaas_connector_pack_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | intersight/apis/iaas_connector_pack_api.py | gumpcraca/intersight-python | 780e6703c739f329084beacbbf2ad7a6a2e59b2b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Intersight REST API
This is Intersight REST API
OpenAPI spec version: 1.0.9-255
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from s... | 55.766784 | 818 | 0.645482 |
33a16ef159a6fd4c9d2efa4985510534a8cf8da7 | 1,821 | py | Python | project_euler/problem_20/sol1.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | project_euler/problem_20/sol1.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | project_euler/problem_20/sol1.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | 1 | 2020-06-26T09:46:17.000Z | 2020-06-26T09:46:17.000Z | '''THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OT... | 26.014286 | 78 | 0.652389 |
33a174451a83e1083b33aa086b776b87bb2b4aaf | 3,254 | py | Python | further_exploration.py | alixdet/recombination_project | 56edfbf1d4ee25192641a99cea77d2ce8afc01a1 | [
"MIT"
] | null | null | null | further_exploration.py | alixdet/recombination_project | 56edfbf1d4ee25192641a99cea77d2ce8afc01a1 | [
"MIT"
] | null | null | null | further_exploration.py | alixdet/recombination_project | 56edfbf1d4ee25192641a99cea77d2ce8afc01a1 | [
"MIT"
] | null | null | null | """
Long project
SMILE unit
Ref :
- Kerdoncuff, Lambert & Achaz, 2020
"""
def find_the_culprit(bases1 :list, bases2 :list):
"""
based on four_gametes_test()
with 2 incomaptible polymorphism, removes the positions (i.e. the sequence)
that are responsible for the incompatibility (i.e. whom combinatio... | 29.053571 | 79 | 0.61217 |
33a1a029388471cdc9523b892f04fa8a5246964d | 1,264 | py | Python | setup.py | cluhmann/segmented | 05523e5f8fe686ab2895b9baf7705dedcd61b8ca | [
"MIT"
] | null | null | null | setup.py | cluhmann/segmented | 05523e5f8fe686ab2895b9baf7705dedcd61b8ca | [
"MIT"
] | null | null | null | setup.py | cluhmann/segmented | 05523e5f8fe686ab2895b9baf7705dedcd61b8ca | [
"MIT"
] | null | null | null | import codecs
import os
import sys
from setuptools import find_packages, setup
PROJECT_ROOT = os.path.dirname(os.path.realpath(__file__))
README_FILE = os.path.join(PROJECT_ROOT, "README.md")
VERSION_FILE = os.path.join(PROJECT_ROOT, "segmented", "version.py")
REQUIREMENTS_FILE = os.path.join(PROJECT_ROOT, "requireme... | 27.478261 | 68 | 0.727057 |
33a1b0ae083ce96bd033e991cd575bd39b512006 | 2,225 | py | Python | salt/thorium/key.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2018-09-19T22:42:54.000Z | 2018-09-19T22:42:54.000Z | salt/thorium/key.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | null | null | null | salt/thorium/key.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2019-07-23T13:42:23.000Z | 2019-07-23T13:42:23.000Z | # -*- coding: utf-8 -*-
'''
The key Thorium State is used to apply changes to the accepted/rejected/pending keys
.. versionadded:: Carbon
'''
# Import python libs
from __future__ import absolute_import
import time
# Import salt libs
import salt.key
def _get_key_api():
'''
Return the key api hook
'''
... | 29.276316 | 86 | 0.571236 |
33a1b3497d620ad55eab83afe50c4eb83c149c81 | 16,566 | py | Python | au/managedata.py | UKPLab/DiGAT | b044648a6c79428872a778908d3a8a689f0ac3e6 | [
"Apache-2.0"
] | 8 | 2016-06-22T17:02:45.000Z | 2020-11-16T23:46:13.000Z | au/managedata.py | UKPLab/DiGAT | b044648a6c79428872a778908d3a8a689f0ac3e6 | [
"Apache-2.0"
] | null | null | null | au/managedata.py | UKPLab/DiGAT | b044648a6c79428872a778908d3a8a689f0ac3e6 | [
"Apache-2.0"
] | 1 | 2019-02-25T04:40:04.000Z | 2019-02-25T04:40:04.000Z | import json
import os
import urllib
import time
import glob
import webapp2
import jinja2
from google.appengine.api import users
from google.appengine.ext import db
from au.data.access_control import may_see_managedata_view
from au.data.datastore import DocumentAnnotation, ArgumentationUnit, Document, \
UserData, C... | 39.822115 | 111 | 0.545817 |
33a1bf5b217dbf7201fb7429ac7bfc110fd81e48 | 625 | py | Python | setup.py | zzzsochi/resolver_deco | fe40ad5f931d1edd444d854cb2e3038a2cd16c7c | [
"BSD-3-Clause"
] | 1 | 2016-05-15T22:10:38.000Z | 2016-05-15T22:10:38.000Z | setup.py | zzzsochi/resolver_deco | fe40ad5f931d1edd444d854cb2e3038a2cd16c7c | [
"BSD-3-Clause"
] | null | null | null | setup.py | zzzsochi/resolver_deco | fe40ad5f931d1edd444d854cb2e3038a2cd16c7c | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup
setup(name='resolver_deco',
version='1.0.4',
description='Decorator for resolve function arguments',
classifiers=[
"License :: OSI Approved :: BSD License",
"Programming Language :: Python :: 3",
"Development Status :: 5 - Production/Stable"... | 29.761905 | 61 | 0.6208 |
33a1fa15bc1a3f888b382a00f6401daa09e19c8f | 2,881 | py | Python | py_hanabi/engine.py | krinj/hanabi-simulator | b77b04aa09bab8bd8d7b784e04bf8b9d5d76d1a6 | [
"MIT"
] | 1 | 2018-09-28T00:47:52.000Z | 2018-09-28T00:47:52.000Z | py_hanabi/engine.py | krinj/hanabi-simulator | b77b04aa09bab8bd8d7b784e04bf8b9d5d76d1a6 | [
"MIT"
] | null | null | null | py_hanabi/engine.py | krinj/hanabi-simulator | b77b04aa09bab8bd8d7b784e04bf8b9d5d76d1a6 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
This is the Hanabi simulator engine.
It first sets up the game state based on the settings.
Then it modifies the state based on a sequence of commands.
It allows the user to scrub back and forth between all actions.
"""
from typing import List
from py_hanabi.commands.command import Command... | 32.738636 | 102 | 0.641791 |
33a217b9d3b7a40b94a0618bcf7a327a0ba4fafa | 9,464 | py | Python | util/timit/old/timit_preprocess_mel40_spikegram32_8.py | HanSeokhyeon/Speech_recogniton_for_English_and_Korean | e0eaf1da1e1ac15f34402fea8cb330d008140d61 | [
"MIT"
] | null | null | null | util/timit/old/timit_preprocess_mel40_spikegram32_8.py | HanSeokhyeon/Speech_recogniton_for_English_and_Korean | e0eaf1da1e1ac15f34402fea8cb330d008140d61 | [
"MIT"
] | null | null | null | util/timit/old/timit_preprocess_mel40_spikegram32_8.py | HanSeokhyeon/Speech_recogniton_for_English_and_Korean | e0eaf1da1e1ac15f34402fea8cb330d008140d61 | [
"MIT"
] | null | null | null | # reference : https://github.com/Faur/TIMIT
# https://github.com/jameslyons/python_speech_features/issues/53
import os
import sys
import timeit; program_start_time = timeit.default_timer()
import random; random.seed(int(timeit.default_timer()))
from six.moves import cPickle
import numpy as np
import librosa
# a py... | 33.090909 | 128 | 0.616653 |
33a22337d38f7ec4e4ca552b9bc1f109931b6e3a | 1,594 | py | Python | magellan_models/model_generator/helper_funcs.py | 3mcloud/magellan-models | aae47496f240a5211e650a5c0efcbc95a15f7bb0 | [
"BSD-3-Clause"
] | 2 | 2021-08-11T18:15:28.000Z | 2021-08-11T18:33:38.000Z | magellan_models/model_generator/helper_funcs.py | 3mcloud/magellan-models | aae47496f240a5211e650a5c0efcbc95a15f7bb0 | [
"BSD-3-Clause"
] | null | null | null | magellan_models/model_generator/helper_funcs.py | 3mcloud/magellan-models | aae47496f240a5211e650a5c0efcbc95a15f7bb0 | [
"BSD-3-Clause"
] | null | null | null | """
Helper functions that are stored in a separate file to prevent circular dependencies
"""
def get_routes(open_api_spec: dict) -> list:
"""Returns the specific route names for an openapi spec
Args:
open_api_spec (dict): an OpenAPI specification
Returns:
list: a list of strings repr... | 28.464286 | 89 | 0.659348 |
33a23ac453dc64fb4f4e59b377f3cc8e4411918a | 33,202 | py | Python | MOOCdbFeatureExtract/program/feature_extract.py | rcmurray/WorkflowComponents | 368f8132ce5bef3ac3fb9d8e1a13a08f91764cfa | [
"BSD-4-Clause-UC"
] | 26 | 2016-09-14T18:15:29.000Z | 2021-12-01T20:01:29.000Z | MOOCdbFeatureExtract/program/feature_extract.py | rcmurray/WorkflowComponents | 368f8132ce5bef3ac3fb9d8e1a13a08f91764cfa | [
"BSD-4-Clause-UC"
] | 122 | 2017-09-12T15:22:03.000Z | 2021-09-27T17:25:08.000Z | MOOCdbFeatureExtract/program/feature_extract.py | rcmurray/WorkflowComponents | 368f8132ce5bef3ac3fb9d8e1a13a08f91764cfa | [
"BSD-4-Clause-UC"
] | 17 | 2017-02-16T16:04:41.000Z | 2021-02-06T05:36:44.000Z | """
Main feature extraction file. Consists of feature extraction scripts and their helper functions.
"""
import time
from sql_functions_feature_extract.sql_functions import *
import os
import getpass
import datetime
import sys
import platform
from logger import Logger
import traceback
import warnings
################... | 47.431429 | 225 | 0.630625 |
33a277719f20ce0a23c46300336967079278a9cd | 2,511 | py | Python | Common/Predictors/Keras/KerasPredictor.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 2 | 2020-03-04T11:18:38.000Z | 2020-05-10T15:36:42.000Z | Common/Predictors/Keras/KerasPredictor.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 6 | 2020-03-30T16:42:47.000Z | 2021-12-13T20:37:21.000Z | Common/Predictors/Keras/KerasPredictor.py | enriqueescobar-askida/Kinito.Finance | 5308748b64829ac798a858161f9b4a9e5829db44 | [
"MIT"
] | 1 | 2020-04-14T11:26:16.000Z | 2020-04-14T11:26:16.000Z | from numpy.core._multiarray_umath import ndarray
from Common.Predictors.AbstractPredictor import AbstractPredictor
from Common.Measures.Time.TimeSpan import TimeSpan
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import MinMaxScaler
from keras.models import Sequential
from keras.layers... | 38.045455 | 124 | 0.66826 |
33a299d9009faca0af670f64bb7709cd653fc98e | 1,785 | py | Python | src/encoded/audit/characterization.py | aperritano/encoded | c03f6799a2155377321877bf12c079c50b0e08ce | [
"MIT"
] | 102 | 2015-05-20T01:17:43.000Z | 2022-03-07T06:03:55.000Z | src/encoded/audit/characterization.py | aperritano/encoded | c03f6799a2155377321877bf12c079c50b0e08ce | [
"MIT"
] | 901 | 2015-01-07T23:11:57.000Z | 2022-03-18T13:56:12.000Z | src/encoded/audit/characterization.py | aperritano/encoded | c03f6799a2155377321877bf12c079c50b0e08ce | [
"MIT"
] | 65 | 2015-02-06T23:00:26.000Z | 2022-01-22T07:58:44.000Z | from snovault import (
AuditFailure,
audit_checker,
)
from .formatter import (
audit_link,
path_to_text,
space_in_words,
)
@audit_checker('Characterization', frame='object')
def audit_characterization_review_lane(value, system):
"""
Biosample and genetic modification characterizations need ... | 36.428571 | 96 | 0.584874 |
33a2eaacf67b86f8570441787cba9e9e394f849b | 18,304 | py | Python | src/cltk/phonology/greek/transcription.py | clemsciences/cltkv1 | 88bd45419e254f69c9467ce6b2543249c57d1503 | [
"MIT"
] | 2 | 2019-08-18T21:10:01.000Z | 2020-05-05T09:19:40.000Z | src/cltk/phonology/greek/transcription.py | clemsciences/cltkv1 | 88bd45419e254f69c9467ce6b2543249c57d1503 | [
"MIT"
] | 62 | 2019-02-01T18:48:11.000Z | 2020-08-19T17:52:53.000Z | src/cltk/phonology/greek/transcription.py | clemsciences/cltkv1 | 88bd45419e254f69c9467ce6b2543249c57d1503 | [
"MIT"
] | 8 | 2019-04-07T03:47:31.000Z | 2020-07-01T07:02:59.000Z | """Convert a word from Greek orthography into its hypothesized
pronunciation in the International Phonetic Alphabet (IPA).
https://raw.githubusercontent.com/j-duff/cltk/ipa/
cltk/phonology/greek/transcription.py
"""
import re
import unicodedata
from nltk.tokenize import wordpunct_tokenize
from cltk.core.cltk_logge... | 35.960707 | 86 | 0.501257 |
33a2ff371f11c6cde7f18d6f811d7df12b59abb6 | 3,445 | py | Python | tests/integration/num-buffers/num-buffers.py | lkucalaba/tiscamera | e1fa7b21bb4dd777ae8039dfa072cfa2daa88244 | [
"Apache-2.0"
] | 241 | 2015-02-20T09:10:41.000Z | 2022-03-18T08:53:26.000Z | tests/integration/num-buffers/num-buffers.py | lkucalaba/tiscamera | e1fa7b21bb4dd777ae8039dfa072cfa2daa88244 | [
"Apache-2.0"
] | 435 | 2015-01-19T10:18:01.000Z | 2022-03-28T08:03:08.000Z | tests/integration/num-buffers/num-buffers.py | lkucalaba/tiscamera | e1fa7b21bb4dd777ae8039dfa072cfa2daa88244 | [
"Apache-2.0"
] | 141 | 2015-01-03T17:54:08.000Z | 2022-02-09T09:55:15.000Z | #!/usr/bin/env python3
# Copyright 2020 The Imaging Source Europe GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | 26.098485 | 94 | 0.629318 |
33a3475abb8e5d6b06e8234aedd8e21043f1d735 | 6,010 | py | Python | asposewordscloud/models/list_update.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 14 | 2018-07-15T17:01:52.000Z | 2018-11-29T06:15:33.000Z | asposewordscloud/models/list_update.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 1 | 2018-09-28T12:59:34.000Z | 2019-10-08T08:42:59.000Z | asposewordscloud/models/list_update.py | aspose-words-cloud/aspose-words-cloud-python | 65c7b55fa4aac69b60d41e7f54aed231df285479 | [
"MIT"
] | 2 | 2020-12-21T07:59:17.000Z | 2022-02-16T21:41:25.000Z | # coding: utf-8
# -----------------------------------------------------------------------------------
# <copyright company="Aspose" file="list_update.py">
# Copyright (c) 2021 Aspose.Words for Cloud
# </copyright>
# <summary>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this ... | 38.525641 | 131 | 0.605491 |
33a349a17c19f95a78570ecb45927522c9ba0cf9 | 914 | py | Python | CS/CSC207/Project_Go_Go_Photo/markus-hooks/pre-commit.d/02-block_change_top_level_master.py | jerrysun103/uoft | 6264583d27c7db94596d29c73804e6d9155de191 | [
"MIT"
] | 1 | 2018-07-19T03:41:38.000Z | 2018-07-19T03:41:38.000Z | CS/CSC207/Project_Go_Go_Photo/markus-hooks/pre-commit.d/02-block_change_top_level_master.py | jerrysun103/uoft | 6264583d27c7db94596d29c73804e6d9155de191 | [
"MIT"
] | null | null | null | CS/CSC207/Project_Go_Go_Photo/markus-hooks/pre-commit.d/02-block_change_top_level_master.py | jerrysun103/uoft | 6264583d27c7db94596d29c73804e6d9155de191 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import os.path
import subprocess
import sys
if __name__ == '__main__':
print('[MarkUs] Checking whether top-level files/directories were created/modified...')
against = 'HEAD'
changed_files = subprocess.run(['git', 'diff-index', '--name-only', against], stdout=subprocess.... | 38.083333 | 130 | 0.647702 |
33a353303a95dfd7cd311dd3a65851daaa258f2d | 1,196 | py | Python | metrics.py | axki/srzoo | 305c5b29d6b82f1d0e5edd39cd9f36650212dca2 | [
"Apache-2.0"
] | null | null | null | metrics.py | axki/srzoo | 305c5b29d6b82f1d0e5edd39cd9f36650212dca2 | [
"Apache-2.0"
] | null | null | null | metrics.py | axki/srzoo | 305c5b29d6b82f1d0e5edd39cd9f36650212dca2 | [
"Apache-2.0"
] | null | null | null | import cv2
from skimage.metrics import structural_similarity, peak_signal_noise_ratio, mean_squared_error
import numpy as np
def get_y_component(rgb):
# cv2 assumes color channels is last
rgb = rgb.reshape(rgb.shape[1], rgb.shape[2], rgb.shape[0])
ycrcb = cv2.cvtColor(rgb, cv2.COLOR_RGB2YCrCb)
return ... | 27.181818 | 94 | 0.647993 |
33a382b9bc61ba1b0418b6ca683014988b4baab4 | 5,574 | py | Python | docs/source/conf.py | JeffLIrion/python-adb | ab99e77ef3c1a58f19597b0c34c93bd6dc56a1f3 | [
"Apache-2.0"
] | 1 | 2019-07-17T18:42:18.000Z | 2019-07-17T18:42:18.000Z | docs/source/conf.py | JeffLIrion/python-adb | ab99e77ef3c1a58f19597b0c34c93bd6dc56a1f3 | [
"Apache-2.0"
] | 1 | 2018-10-04T04:07:23.000Z | 2018-10-04T20:54:16.000Z | docs/source/conf.py | JeffLIrion/python-adb | ab99e77ef3c1a58f19597b0c34c93bd6dc56a1f3 | [
"Apache-2.0"
] | 1 | 2018-10-03T14:11:31.000Z | 2018-10-03T14:11:31.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 30.459016 | 117 | 0.64747 |
33a3ac55b05069c234badd7351557b7378a3e191 | 1,427 | py | Python | alipay/aop/api/domain/AlipayDataBillAccountbookereceiptQueryModel.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/AlipayDataBillAccountbookereceiptQueryModel.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/AlipayDataBillAccountbookereceiptQueryModel.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 AlipayDataBillAccountbookereceiptQueryModel(object):
def __init__(self):
self._agreement_no = None
self._file_id = None
@property
def agreement_no(self):
return s... | 25.482143 | 75 | 0.600561 |
33a3cb1cd209a3b4bf0e39f87d980f1f6a9fe999 | 4,585 | py | Python | lrtc_lib/active_learning/core/strategy/perceptron_ensemble.py | MovestaDev/low-resource-text-classification-framework | 4380755a65b35265e84ecbf4b87e872d79e8f079 | [
"Apache-2.0"
] | 57 | 2020-11-18T15:13:06.000Z | 2022-03-28T22:33:26.000Z | lrtc_lib/active_learning/core/strategy/perceptron_ensemble.py | MovestaDev/low-resource-text-classification-framework | 4380755a65b35265e84ecbf4b87e872d79e8f079 | [
"Apache-2.0"
] | 5 | 2021-02-23T22:11:07.000Z | 2021-12-13T00:13:48.000Z | lrtc_lib/active_learning/core/strategy/perceptron_ensemble.py | MovestaDev/low-resource-text-classification-framework | 4380755a65b35265e84ecbf4b87e872d79e8f079 | [
"Apache-2.0"
] | 14 | 2021-02-10T08:55:27.000Z | 2022-02-23T22:37:54.000Z | # (c) Copyright IBM Corporation 2020.
# LICENSE: Apache License 2.0 (Apache-2.0)
# http://www.apache.org/licenses/LICENSE-2.0
import numpy as np
import gc
from lrtc_lib.active_learning.strategies import ActiveLearningStrategies
from lrtc_lib.active_learning.active_learning_api import ActiveLearner
from lrtc_lib.data... | 42.850467 | 117 | 0.694656 |
33a3ff3119a6579b4a84135bb17c01bae60cb571 | 2,846 | py | Python | src/mars.py | megemini/DataCastle2017 | 261134f760d8c1bbfc3e65e1362b7710e601947d | [
"MIT"
] | null | null | null | src/mars.py | megemini/DataCastle2017 | 261134f760d8c1bbfc3e65e1362b7710e601947d | [
"MIT"
] | null | null | null | src/mars.py | megemini/DataCastle2017 | 261134f760d8c1bbfc3e65e1362b7710e601947d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import tornado.httpserver
import tornado.httpclient
import tornado.ioloop
import tornado.web
import os.path
import logging
import uuid
from runsocket import RunSocketHandler
from tornado import gen
from tornado.options import define, options, parse_command_line
define("p... | 27.104762 | 91 | 0.619817 |
33a4202ef0228533fb69ee5daada6c9ec94f05d4 | 46 | py | Python | libraries/mathy_mkdocs/mathy_mkdocs/__init__.py | justindujardin/mathy | 776ac528d4586d6ea558a7212adb3559ea487a3c | [
"MIT"
] | 95 | 2020-01-02T23:02:34.000Z | 2022-03-08T18:57:24.000Z | libraries/mathy_mkdocs/mathy_mkdocs/__init__.py | justindujardin/mathy | 776ac528d4586d6ea558a7212adb3559ea487a3c | [
"MIT"
] | 44 | 2020-01-05T03:07:45.000Z | 2021-08-11T20:45:53.000Z | libraries/mathy_mkdocs/mathy_mkdocs/__init__.py | justindujardin/mathy | 776ac528d4586d6ea558a7212adb3559ea487a3c | [
"MIT"
] | 5 | 2020-04-04T16:46:36.000Z | 2022-03-30T08:10:02.000Z | from .plugin import MathyMkDocsPlugin # noqa
| 23 | 45 | 0.804348 |
33a44aecc174268f425f94dcc47131617e50a7cb | 2,510 | py | Python | make_clock_video.py | zimeon/video_clock | c7349c1a50442965fee87b1d1ffdf26f70e0b718 | [
"Apache-2.0"
] | null | null | null | make_clock_video.py | zimeon/video_clock | c7349c1a50442965fee87b1d1ffdf26f70e0b718 | [
"Apache-2.0"
] | null | null | null | make_clock_video.py | zimeon/video_clock | c7349c1a50442965fee87b1d1ffdf26f70e0b718 | [
"Apache-2.0"
] | null | null | null | """Make a set of PNG images of clock and construct video."""
from PIL import Image, ImageDraw, ImageFont
from datetime import timedelta
import glob
import optparse
import os
import os.path
import subprocess
def make_images(frame_rate, duration, width, height):
"""Make a set of images."""
for filename in glob.... | 40.483871 | 75 | 0.599203 |
33a466a9cd923f70e4c69ddd8b18fdff8c48248c | 597 | py | Python | t/cffi_util.py | warmchang/umash | d56c343ce9bdf7d1eea59ab73898005bdf92888a | [
"MIT"
] | 108 | 2020-08-24T00:34:20.000Z | 2022-03-13T08:43:22.000Z | t/cffi_util.py | warmchang/umash | d56c343ce9bdf7d1eea59ab73898005bdf92888a | [
"MIT"
] | 26 | 2020-08-25T06:08:05.000Z | 2022-02-26T16:37:04.000Z | t/cffi_util.py | warmchang/umash | d56c343ce9bdf7d1eea59ab73898005bdf92888a | [
"MIT"
] | 7 | 2020-08-25T05:52:12.000Z | 2022-03-05T02:31:38.000Z | """
Utility functions to work with cffi.
"""
import re
def read_stripped_header(path, replacements={}):
"""Returns the contents of a header file without preprocessor directives."""
ret = ""
in_directive = False
with open(path) as f:
for line in f:
if in_directive or re.match(r"^\s... | 27.136364 | 80 | 0.552764 |
33a4a9f944b41e4b63270ac32dabeb45a5500a16 | 1,786 | py | Python | tests/integration/docusaurus/connecting_to_your_data/in_memory/pandas_python_example.py | UtahDave/great_expectations | 99a54370f7ebeea5d95bca726200db01c7326d68 | [
"Apache-2.0"
] | 2 | 2022-01-28T15:51:32.000Z | 2022-02-02T05:07:58.000Z | tests/integration/docusaurus/connecting_to_your_data/in_memory/pandas_python_example.py | UtahDave/great_expectations | 99a54370f7ebeea5d95bca726200db01c7326d68 | [
"Apache-2.0"
] | null | null | null | tests/integration/docusaurus/connecting_to_your_data/in_memory/pandas_python_example.py | UtahDave/great_expectations | 99a54370f7ebeea5d95bca726200db01c7326d68 | [
"Apache-2.0"
] | 1 | 2021-10-08T01:24:50.000Z | 2021-10-08T01:24:50.000Z | import pandas as pd
from ruamel import yaml
import great_expectations as ge
from great_expectations.core.batch import RuntimeBatchRequest
context = ge.get_context()
datasource_config = {
"name": "example_datasource",
"class_name": "Datasource",
"module_name": "great_expectations.datasource",
"executi... | 34.346154 | 109 | 0.739642 |
33a4bb4e29f5ac1dd5866a88fb1e75ea5d4dadbc | 111 | py | Python | office365/sharepoint/webparts/limited_webpart_manager.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/sharepoint/webparts/limited_webpart_manager.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/sharepoint/webparts/limited_webpart_manager.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | from office365.runtime.client_object import ClientObject
class LimitedWebPartManager(ClientObject):
pass
| 18.5 | 56 | 0.837838 |
33a4d72f7278462712a96b89739a8d48af98652a | 31,629 | py | Python | bertoverbert.py | scutcyr/BoB | c83e53b0514a8160f7b898c3ee8f56a0176f3f41 | [
"Apache-2.0"
] | 96 | 2021-06-16T09:06:52.000Z | 2022-03-26T09:56:32.000Z | bertoverbert.py | scutcyr/BoB | c83e53b0514a8160f7b898c3ee8f56a0176f3f41 | [
"Apache-2.0"
] | 16 | 2021-07-01T05:34:48.000Z | 2022-03-28T09:40:15.000Z | bertoverbert.py | scutcyr/BoB | c83e53b0514a8160f7b898c3ee8f56a0176f3f41 | [
"Apache-2.0"
] | 24 | 2021-06-19T15:58:31.000Z | 2022-03-14T09:17:19.000Z | # Copyright 2021 Haoyu Song
# 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, sof... | 48.28855 | 273 | 0.574789 |
33a5006185eadf6753ff645259b52b07966633f2 | 1,315 | py | Python | setup.py | perslev/sleep-utils | 9f9edf67f4cac6d8361243b4153bfe6351314844 | [
"MIT"
] | 1 | 2022-03-17T10:37:17.000Z | 2022-03-17T10:37:17.000Z | setup.py | perslev/sleep-utils | 9f9edf67f4cac6d8361243b4153bfe6351314844 | [
"MIT"
] | null | null | null | setup.py | perslev/sleep-utils | 9f9edf67f4cac6d8361243b4153bfe6351314844 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
with open('README.md') as readme_file:
readme = readme_file.read()
with open("requirements.txt") as req_file:
requirements = list(filter(None, req_file.read().split("\n")))
__version__ = None
with open("psg_utils/version.py") as version_file:
exec(version_file.... | 36.527778 | 138 | 0.660837 |
33a508368380abf07686abdc9fdc17a72ec200b4 | 3,157 | py | Python | 05/main.py | mevljas/Advent-of-code-2021 | e6160ce09ec0e3dd99d31592b7f209e8922bb4b5 | [
"MIT"
] | null | null | null | 05/main.py | mevljas/Advent-of-code-2021 | e6160ce09ec0e3dd99d31592b7f209e8922bb4b5 | [
"MIT"
] | null | null | null | 05/main.py | mevljas/Advent-of-code-2021 | e6160ce09ec0e3dd99d31592b7f209e8922bb4b5 | [
"MIT"
] | null | null | null | def read_file(filename):
"""
Read input file and save the lines.
:param filename: input file
:return: list of read lines (start and end)
"""
lines = []
with open(filename, 'r', encoding='UTF-8') as file:
for line in file:
start, end = line.strip().split('->')
... | 25.055556 | 77 | 0.481153 |
33a50a365baf074de532bfefe6619f50104942bc | 9,223 | py | Python | services/web/server/tests/unit/test_projects_handlers.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | services/web/server/tests/unit/test_projects_handlers.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | 2 | 2018-05-13T09:10:57.000Z | 2019-03-06T08:10:40.000Z | services/web/server/tests/unit/test_projects_handlers.py | oetiker/osparc-simcore | 00918bf8f000840cc70cc49458780a55858d52ea | [
"MIT"
] | null | null | null | # pylint:disable=wildcard-import
# pylint:disable=unused-import
# pylint:disable=unused-variable
# pylint:disable=unused-argument
# pylint:disable=redefined-outer-name
import collections
import json
from asyncio import Future
from copy import deepcopy
from pathlib import Path
from typing import Dict
import pytest
fro... | 34.935606 | 150 | 0.710723 |
33a53b04a292cb5922f3a18b5e72de7ff2cd5498 | 23,160 | py | Python | pgbot/commands/base.py | gresm/PygameCommunityBot | 0da081704baaaa6fd6464f7abe43e6ba5043952d | [
"MIT"
] | 17 | 2021-03-22T18:36:26.000Z | 2022-01-04T01:14:04.000Z | pgbot/commands/base.py | gresm/PygameCommunityBot | 0da081704baaaa6fd6464f7abe43e6ba5043952d | [
"MIT"
] | 71 | 2021-03-19T17:51:30.000Z | 2022-02-19T12:42:19.000Z | pgbot/commands/base.py | gresm/PygameCommunityBot | 0da081704baaaa6fd6464f7abe43e6ba5043952d | [
"MIT"
] | 19 | 2021-03-19T12:48:17.000Z | 2021-12-18T04:41:08.000Z | """
This file is a part of the source code for the PygameCommunityBot.
This project has been licensed under the MIT license.
Copyright (c) 2020-present PygameCommunityDiscord
This file defines the base class for the command handler classes and also
defines argument casting utilities
"""
from __future__ import annota... | 35.358779 | 89 | 0.523273 |
33a554b06fd6caff3f3768f8399002e3b90ea73c | 2,836 | py | Python | mediagoblin/plugins/basic_auth/__init__.py | acidburn0zzz/mediagoblin | 8fc57eaaa6e22358a1220a0baf589a4b20dd8cfe | [
"CC0-1.0"
] | 1 | 2018-12-19T00:05:55.000Z | 2018-12-19T00:05:55.000Z | mediagoblin/plugins/basic_auth/__init__.py | acidburn0zzz/mediagoblin | 8fc57eaaa6e22358a1220a0baf589a4b20dd8cfe | [
"CC0-1.0"
] | null | null | null | mediagoblin/plugins/basic_auth/__init__.py | acidburn0zzz/mediagoblin | 8fc57eaaa6e22358a1220a0baf589a4b20dd8cfe | [
"CC0-1.0"
] | null | null | null | # GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 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 versio... | 31.865169 | 77 | 0.730959 |
33a5819e4787ec4c6887d2f279de1f42f7dcbb3e | 24,257 | py | Python | salt/states/boto_s3_bucket.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2018-09-19T22:42:54.000Z | 2018-09-19T22:42:54.000Z | salt/states/boto_s3_bucket.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | null | null | null | salt/states/boto_s3_bucket.py | silviud/salt | 9d35ea66428a030d00ef1a2f3b93ecfe90be023c | [
"Apache-2.0"
] | 1 | 2019-07-23T13:42:23.000Z | 2019-07-23T13:42:23.000Z | # -*- coding: utf-8 -*-
'''
Manage S3 Buckets
=================
.. versionadded:: 2016.3.0
Create and destroy S3 buckets. Be aware that this interacts with Amazon's services,
and so may incur charges.
This module uses ``boto3``, which can be installed via package, or pip.
This module accepts explicit vpc credential... | 36.920852 | 146 | 0.546358 |
33a5970a3d9ec0b977f86678c55c169a1e077600 | 41,640 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/large_face_list_operations.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/cognitiveservices/azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/large_face_list_operations.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-cognitiveservices-vision-face/azure/cognitiveservices/vision/face/operations/large_face_list_operations.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 ... | 46.734007 | 153 | 0.676105 |
33a5c445f027acd6bc44737b5951c26e97a9ad10 | 7,002 | py | Python | orix/scalar/__init__.py | JoonatanL/orix | b8e6dfe4c3ac053e923b001b9bccec717db3e56c | [
"MIT"
] | 1 | 2020-05-28T01:57:35.000Z | 2020-05-28T01:57:35.000Z | orix/scalar/__init__.py | dnjohnstone/orix | b8e6dfe4c3ac053e923b001b9bccec717db3e56c | [
"MIT"
] | null | null | null | orix/scalar/__init__.py | dnjohnstone/orix | b8e6dfe4c3ac053e923b001b9bccec717db3e56c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018-2020 the orix developers
#
# This file is part of orix.
#
# orix 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) ... | 33.028302 | 80 | 0.609254 |
33a5c6f52ddd1636d7258a56dbf6108e4509acbc | 3,664 | py | Python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-01-24T08:54:57.000Z | 2022-01-24T08:54:57.000Z | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/_configuration.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2020_07_01/aio/_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 ... | 50.191781 | 130 | 0.707424 |
33a5d28b89a32065e3a63cf375fdf78526671621 | 3,151 | py | Python | alipay/aop/api/domain/AlipayCommerceIotDeviceTradevoiceSendModel.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/AlipayCommerceIotDeviceTradevoiceSendModel.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/AlipayCommerceIotDeviceTradevoiceSendModel.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 AlipayCommerceIotDeviceTradevoiceSendModel(object):
def __init__(self):
self._amount = None
self._biz_tid = None
self._msg_id = None
self._smid = None
self... | 27.163793 | 71 | 0.555062 |
33a6184ce636fe073a24744ed8cd6e7e4660ac02 | 2,535 | py | Python | ocr_train/ensemble_checkpoints.py | Sand0001/OCR_textrender_jap_chn_eng | 87a01946bb8cd5229d2babcdf42a18df5b3e561f | [
"MIT"
] | null | null | null | ocr_train/ensemble_checkpoints.py | Sand0001/OCR_textrender_jap_chn_eng | 87a01946bb8cd5229d2babcdf42a18df5b3e561f | [
"MIT"
] | null | null | null | ocr_train/ensemble_checkpoints.py | Sand0001/OCR_textrender_jap_chn_eng | 87a01946bb8cd5229d2babcdf42a18df5b3e561f | [
"MIT"
] | null | null | null | #-*- coding:utf-8 -*-
import os
import sys
import numpy as np
from imp import reload
from PIL import Image, ImageOps
from keras.layers import Input
from keras.models import Model
# import keras.backend as K
from keras.utils import multi_gpu_model
import dl_resnet_crnn as densenet
#import densenet
os.environ["CUDA_VISI... | 25.35 | 84 | 0.737673 |
33a61d35eb96cae01eac18f0e01bce7fa40071cb | 13,019 | py | Python | Clone of: EarningsRockets_DistilledBear_v1/main.py | imazen-private/Lean | 6c494d30ab5cb33996f2f28aaedacd6379051a1d | [
"Apache-2.0"
] | null | null | null | Clone of: EarningsRockets_DistilledBear_v1/main.py | imazen-private/Lean | 6c494d30ab5cb33996f2f28aaedacd6379051a1d | [
"Apache-2.0"
] | null | null | null | Clone of: EarningsRockets_DistilledBear_v1/main.py | imazen-private/Lean | 6c494d30ab5cb33996f2f28aaedacd6379051a1d | [
"Apache-2.0"
] | null | null | null | """
SEL(stock selection part)
Based on the 'Momentum Strategy with Market Cap and EV/EBITDA' strategy introduced by Jing Wu, 6 Feb 2018
adapted and recoded by Jack Simonson, Goldie Yalamanchi, Vladimir, Peter Guenther, and Leandro Maia
https://www.quantconnect.com/forum/discussion/3377/momentum-strategy-with-market-cap... | 42.685246 | 195 | 0.614487 |
33a67e3c5b49d0f6276f7e8d03b98bd0c2348d0f | 3,110 | py | Python | bitnest/field.py | MetroStar/bitnest | a8d9cef5a17a5366e088a774ae951a0f06f97ae7 | [
"MIT"
] | 4 | 2021-09-16T21:33:13.000Z | 2022-01-18T22:05:57.000Z | bitnest/field.py | MetroStar/bitnest | a8d9cef5a17a5366e088a774ae951a0f06f97ae7 | [
"MIT"
] | 1 | 2021-12-02T03:47:45.000Z | 2021-12-02T03:47:45.000Z | bitnest/field.py | MetroStar/bitnest | a8d9cef5a17a5366e088a774ae951a0f06f97ae7 | [
"MIT"
] | null | null | null | from typing import List
from bitnest.core import (
Symbol,
UniqueVariable,
Expression,
list_,
Integer,
ATTRIBUTE_MAPPING,
)
ATTRIBUTE_MAPPING.update(
{
Symbol("field_reference"): ["symbol", "name", "id"],
Symbol("field"): [
"symbol",
"field_type",
... | 26.581197 | 85 | 0.577814 |
33a689d20061a3adc00a69fa6c0ebf3075af292e | 5,485 | py | Python | media/forms.py | aaboffill/django-allmedia | 67ef405623574d90abf9eefac9a512f609300775 | [
"BSD-3-Clause"
] | null | null | null | media/forms.py | aaboffill/django-allmedia | 67ef405623574d90abf9eefac9a512f609300775 | [
"BSD-3-Clause"
] | null | null | null | media/forms.py | aaboffill/django-allmedia | 67ef405623574d90abf9eefac9a512f609300775 | [
"BSD-3-Clause"
] | null | null | null | # coding=utf-8
import json
from django import forms
from django.forms.util import ErrorList
from django.utils.translation import ugettext_lazy as _
from . import settings
from .fields.tags import ModelMultiTagSelectChoiceField
from .validators import FileFieldValidator
from .decorators import ajax_file_upload
from .mod... | 25.872642 | 116 | 0.694257 |
33a69595d60d81d16c821964bc340ee11f12bff0 | 319 | py | Python | savu/plugins/filters/denoising/median_filter_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 39 | 2015-03-30T14:03:42.000Z | 2022-03-16T16:50:33.000Z | savu/plugins/filters/denoising/median_filter_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 670 | 2015-02-11T11:08:09.000Z | 2022-03-21T09:27:57.000Z | savu/plugins/filters/denoising/median_filter_tools.py | elainehoml/Savu | e4772704606f71d6803d832084e10faa585e7358 | [
"Apache-2.0"
] | 54 | 2015-02-13T14:09:52.000Z | 2022-01-24T13:57:09.000Z | from savu.plugins.plugin_tools import PluginTools
class MedianFilterTools(PluginTools):
"""A plugin to apply 2D/3D median filter. The 3D capability is enabled
through padding. Note that the kernel_size in 2D will be kernel_size x
kernel_size and in 3D case kernel_size x kernel_size x kernel_size.
"""
| 39.875 | 74 | 0.77116 |
33a6b8e040a82baefc172bcfb4681a1c5e004320 | 5,940 | py | Python | lib/cli_interface.py | dpfried/mocs | d594a47c2e3125a30fe14c2bc646d0e0614cb8b2 | [
"MIT"
] | 8 | 2016-05-31T09:54:15.000Z | 2021-08-13T13:25:01.000Z | lib/cli_interface.py | dpfried/mocs | d594a47c2e3125a30fe14c2bc646d0e0614cb8b2 | [
"MIT"
] | null | null | null | lib/cli_interface.py | dpfried/mocs | d594a47c2e3125a30fe14c2bc646d0e0614cb8b2 | [
"MIT"
] | 10 | 2015-01-07T06:45:44.000Z | 2021-06-21T08:41:57.000Z | #!/usr/bin/python
from pipeline import map_representation, strip_dimensions, call_graphviz, call_rank,\
call_similarity, call_filter, function_help, TermExtraction, extract_terms
from database import ManagedSession
from mocs_database import create_query, filter_query
import write_dot
debug = False
def make_map(que... | 61.875 | 227 | 0.705556 |
33a6ca66e0f098738724507ff6893baa04f6cc03 | 992 | py | Python | src/production_file.py | AfricasVoices/Project-ICRAF | daa53a405df1572d6815acc551c07cd80bc86953 | [
"MIT"
] | null | null | null | src/production_file.py | AfricasVoices/Project-ICRAF | daa53a405df1572d6815acc551c07cd80bc86953 | [
"MIT"
] | 15 | 2019-03-18T13:20:17.000Z | 2020-06-16T11:54:58.000Z | src/production_file.py | AfricasVoices/Project-ICRAF | daa53a405df1572d6815acc551c07cd80bc86953 | [
"MIT"
] | null | null | null | from core_data_modules.traced_data.io import TracedDataCSVIO
from src.lib import PipelineConfiguration
class ProductionFile(object):
@staticmethod
#TODO: Generate production file per episode
def generate(data, production_csv_output_path):
production_keys = ["uid"]
for plan in PipelineConf... | 41.333333 | 96 | 0.707661 |
33a6dd1b4ec3964b07199bd8aa9742ca32eb2979 | 29,508 | py | Python | nusa_alphalens/plotting.py | Northeastern-Systematic-Alpha/alphalens | da7cbc6992a052f5d444414769f8e3564db97e8d | [
"Apache-2.0"
] | null | null | null | nusa_alphalens/plotting.py | Northeastern-Systematic-Alpha/alphalens | da7cbc6992a052f5d444414769f8e3564db97e8d | [
"Apache-2.0"
] | null | null | null | nusa_alphalens/plotting.py | Northeastern-Systematic-Alpha/alphalens | da7cbc6992a052f5d444414769f8e3564db97e8d | [
"Apache-2.0"
] | null | null | null | #
# Copyright 2017 Quantopian, 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 to in wr... | 31.593148 | 79 | 0.589569 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.