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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
73080631d619d74b5625f3d15beeb67e28d0ca6e | 7,320 | py | Python | analysis/fit.py | ibab/lhcb-b2dmumu | c1334c381032af9459602640e17541377fd16606 | [
"MIT"
] | 3 | 2019-06-24T10:56:34.000Z | 2019-06-24T10:57:11.000Z | analysis/fit.py | ibab/lhcb-b2dmumu | c1334c381032af9459602640e17541377fd16606 | [
"MIT"
] | null | null | null | analysis/fit.py | ibab/lhcb-b2dmumu | c1334c381032af9459602640e17541377fd16606 | [
"MIT"
] | null | null | null | import os
from sys import exit
from .log import get_logger
logger = get_logger()
def get_workspace():
from ROOT import RooWorkspace
return RooWorkspace('workspace')
def filter_content(lines):
lineno = 0
for line in lines:
line = line.strip()
if line and not line.startswith('#'):
... | 30.247934 | 138 | 0.606831 |
73081081e941369cc2bad2d1a6b62d60322d5b9f | 27,021 | py | Python | st2actions/tests/unit/test_actionchain.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2020-11-21T10:11:25.000Z | 2020-11-21T10:11:25.000Z | st2actions/tests/unit/test_actionchain.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 1 | 2015-06-08T15:27:11.000Z | 2015-06-08T15:27:11.000Z | st2actions/tests/unit/test_actionchain.py | UbuntuEvangelist/st2 | 36af04f2caa03b396fb8ab00fd6d700e827fda8d | [
"Apache-2.0"
] | 13 | 2017-01-12T11:07:20.000Z | 2019-04-19T09:55:49.000Z | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | 51.079395 | 99 | 0.688465 |
73082aa684adf7774dd927215f7d898108f75622 | 18,321 | py | Python | pmaf/database/_shared/_assemblers.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | 1 | 2021-07-02T06:24:17.000Z | 2021-07-02T06:24:17.000Z | pmaf/database/_shared/_assemblers.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | 1 | 2021-06-28T12:02:46.000Z | 2021-06-28T12:02:46.000Z | pmaf/database/_shared/_assemblers.py | mmtechslv/PhyloMAF | bab43dd4a4d2812951b1fdf4f1abb83edb79ea88 | [
"BSD-3-Clause"
] | null | null | null | from collections import Counter, defaultdict
from pmaf.database._shared._common import (
filter_interx_elements,
get_element_index_type,
get_element_type,
)
import pandas as pd
import numpy as np
from pmaf.internal._constants import MAIN_RANKS, VALID_RANKS
# from pmaf.internal._constants import VALID_RANKS
... | 30.332781 | 127 | 0.58916 |
73083a2849f7401c79278b8487d28fa8b4117b6b | 11,914 | py | Python | python/eet/pipelines/__init__.py | SidaZh/EET | 6414faa734abfdb666556304ca3df5b7f5e54c38 | [
"Apache-2.0"
] | null | null | null | python/eet/pipelines/__init__.py | SidaZh/EET | 6414faa734abfdb666556304ca3df5b7f5e54c38 | [
"Apache-2.0"
] | null | null | null | python/eet/pipelines/__init__.py | SidaZh/EET | 6414faa734abfdb666556304ca3df5b7f5e54c38 | [
"Apache-2.0"
] | null | null | null | #
# Created by djz on 2022/04/01.
#
import os
import torch
from typing import Any, Dict, List, Optional, Tuple, Union
from transformers import pipeline as ts_pipeline
from .fill_mask import FillMaskPipeline
from .token_classification import TokenClassificationPipeline
from .question_answering import QuestionAnsweringPi... | 40.941581 | 240 | 0.597448 |
73085370dd0ae578546e4f06c27e87ad769b743a | 387 | py | Python | practice/ai/machine-learning/digital-camera-day-or-night/digital-camera-day-or-night.py | zeyuanxy/HackerRank | 5194a4af780ece396501c215996685d1be529e73 | [
"MIT"
] | 4 | 2017-01-18T17:51:58.000Z | 2019-10-20T12:14:37.000Z | practice/ai/machine-learning/digital-camera-day-or-night/digital-camera-day-or-night.py | zeyuanxy/HackerRank | 5194a4af780ece396501c215996685d1be529e73 | [
"MIT"
] | null | null | null | practice/ai/machine-learning/digital-camera-day-or-night/digital-camera-day-or-night.py | zeyuanxy/HackerRank | 5194a4af780ece396501c215996685d1be529e73 | [
"MIT"
] | 8 | 2016-03-14T17:16:59.000Z | 2021-06-26T10:11:33.000Z | if __name__ == "__main__":
data = raw_input().strip(',\n').split(' ')
count = 0
total = 0
for pxl in data:
pxl = pxl.split(',')
mean = 0
for i in pxl:
mean += int(i)
mean /= 3
if mean < 70:
count += 1
total += 1
if float(count) ... | 21.5 | 46 | 0.426357 |
7308549529ad500ce369860b20120290f89fc511 | 1,719 | py | Python | torchmetrics/functional/regression/mean_squared_log_error.py | awaelchli/metrics | bb5ca011e1b31dfebe04574eb07be0af541c51fb | [
"Apache-2.0"
] | 1 | 2021-03-12T10:33:12.000Z | 2021-03-12T10:33:12.000Z | torchmetrics/functional/regression/mean_squared_log_error.py | awaelchli/metrics | bb5ca011e1b31dfebe04574eb07be0af541c51fb | [
"Apache-2.0"
] | null | null | null | torchmetrics/functional/regression/mean_squared_log_error.py | awaelchli/metrics | bb5ca011e1b31dfebe04574eb07be0af541c51fb | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 32.433962 | 106 | 0.726585 |
73085eff9cce9a4d7685d5de9bc743956ceecf5b | 12,795 | py | Python | solutions_automation/deployer.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 13 | 2020-09-02T09:05:08.000Z | 2022-03-12T02:43:24.000Z | solutions_automation/deployer.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 1,998 | 2020-06-15T11:46:10.000Z | 2022-03-24T22:12:41.000Z | solutions_automation/deployer.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 8 | 2020-09-29T06:50:35.000Z | 2021-06-14T03:30:52.000Z | from solutions_automation.dashboard_solutions.delegated_domain import DomainDelegationAutomated
from solutions_automation.dashboard_solutions.exposed import SolutionExposeDeployAutomated
from solutions_automation.dashboard_solutions.generic_flist import FlistAutomated
from solutions_automation.dashboard_solutions.kuber... | 28.947964 | 114 | 0.702227 |
7308983bd7f904cf20f949f7130200df0c997f77 | 131 | py | Python | terrascript/data/dedunumax/awslambda.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/data/dedunumax/awslambda.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/data/dedunumax/awslambda.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/data/dedunumax/awslambda.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:12:30 UTC)
__all__ = []
| 21.833333 | 73 | 0.755725 |
7308b5139e412e3cc23aedccb423f0f373c3e6d0 | 402 | py | Python | setup.py | jeantardelli/wargameRepo | 1e11ae40281f7eafa65ea6e40e045304b20e3824 | [
"MIT"
] | 1 | 2020-12-01T20:30:27.000Z | 2020-12-01T20:30:27.000Z | setup.py | jeantardelli/wargameRepo | 1e11ae40281f7eafa65ea6e40e045304b20e3824 | [
"MIT"
] | null | null | null | setup.py | jeantardelli/wargameRepo | 1e11ae40281f7eafa65ea6e40e045304b20e3824 | [
"MIT"
] | null | null | null | import setuptools
with open('README', 'r') as f:
readme = f.read()
setuptools.setup(
name='gamepkg-jean',
version='2.0.3',
packages=['wargame'],
url='https://pypi.org/project/gamepkg-jean/',
license='LICENSE.txt',
description='game pkg real',
long_description=readme,
author='jeanca... | 22.333333 | 49 | 0.639303 |
7308b56415b5e4c6ac87fb6c5d0daba839f21a63 | 3,484 | py | Python | ML/Utils/get_timestamps_test.py | jainris/FreeByrd | 695e28bc5ccb4f502c780f1053227394cf6deca3 | [
"MIT"
] | 1 | 2022-02-19T16:47:58.000Z | 2022-02-19T16:47:58.000Z | ML/Utils/get_timestamps_test.py | jainris/FreeByrd | 695e28bc5ccb4f502c780f1053227394cf6deca3 | [
"MIT"
] | null | null | null | ML/Utils/get_timestamps_test.py | jainris/FreeByrd | 695e28bc5ccb4f502c780f1053227394cf6deca3 | [
"MIT"
] | null | null | null | from ML.Utils import get_timestamps
import numpy as np
import pytest
from math import floor
def convert_ts_format_test(timestamps_to_test, expected_answers):
# Check that conversions are as expected when done by hand.
for i in range(len(timestamps_to_test)):
assert (
abs(
g... | 27.21875 | 89 | 0.52899 |
7309008b95a24dec53b8e545014296da3e0fd298 | 791 | py | Python | txt/saveTxt.py | wallaceleonel/Automatizando- | f8086f01f8c56041902b5f6b28accdac0f60ebe5 | [
"MIT"
] | 1 | 2021-10-06T22:58:46.000Z | 2021-10-06T22:58:46.000Z | txt/saveTxt.py | wallaceleonel/Automatizando- | f8086f01f8c56041902b5f6b28accdac0f60ebe5 | [
"MIT"
] | 4 | 2021-09-24T16:03:28.000Z | 2021-11-24T01:13:53.000Z | txt/saveTxt.py | wallaceleonel/Automatizando- | f8086f01f8c56041902b5f6b28accdac0f60ebe5 | [
"MIT"
] | null | null | null | # MODIFICANDO ARQUIVOS
valores_celulares [1400,2500,3000,8000,12000]
'''
'r' -> Usado somente para ler algo
'w' -> Usado somente para escrever algo
'r+' -> Usado para ler e escrever algo
'a' -> Usado para escrever algo
'''
#Criar menu de funcionalidades?
#with open ('valores_celulares.txt','w') as arquivo:
... | 23.969697 | 54 | 0.629583 |
730906d1e2e5d0f79d265c82c9eab2463e55f8b6 | 678 | py | Python | exa/__init__.py | rdmontgomery/exa | 8fc5cbda80dd8834a8b63cdee999a8394af90e5c | [
"Apache-2.0"
] | null | null | null | exa/__init__.py | rdmontgomery/exa | 8fc5cbda80dd8834a8b63cdee999a8394af90e5c | [
"Apache-2.0"
] | null | null | null | exa/__init__.py | rdmontgomery/exa | 8fc5cbda80dd8834a8b63cdee999a8394af90e5c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2015-2019, Exa Analytics Development Team
# Distributed under the terms of the Apache License 2.0
"""
Exa
#########
"""
import os
import tempfile
import logging.config
import yaml
with open(os.path.join(os.path.dirname(__file__),
'conf', 'logging.yml'), 'r') as f:
... | 28.25 | 74 | 0.628319 |
7309183dec5ff160ac3305f845983aaa55b22459 | 1,085 | py | Python | data/transcoder_evaluation_gfg/python/NUMBER_OF_SUBSTRINGS_WITH_ODD_DECIMAL_VALUE_IN_A_BINARY_STRING.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 241 | 2021-07-20T08:35:20.000Z | 2022-03-31T02:39:08.000Z | data/transcoder_evaluation_gfg/python/NUMBER_OF_SUBSTRINGS_WITH_ODD_DECIMAL_VALUE_IN_A_BINARY_STRING.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 49 | 2021-07-22T23:18:42.000Z | 2022-03-24T09:15:26.000Z | data/transcoder_evaluation_gfg/python/NUMBER_OF_SUBSTRINGS_WITH_ODD_DECIMAL_VALUE_IN_A_BINARY_STRING.py | mxl1n/CodeGen | e5101dd5c5e9c3720c70c80f78b18f13e118335a | [
"MIT"
] | 71 | 2021-07-21T05:17:52.000Z | 2022-03-29T23:49:28.000Z | # Copyright (c) 2019-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
def f_gold ( s ) :
n = len ( s )
auxArr = [ 0 for i in range ( n ) ]
if ( s [ 0 ] == '1' ) :
auxArr [ 0 ] = ... | 25.232558 | 64 | 0.480184 |
73094e6fe3fe28d00591ddbb2f03eaa3ac13dde9 | 43,445 | py | Python | lib/core/config.py | yushanshan05/Detectron-restful-ElectFence | babe7cb2009e6a67bdb36ece66986cd8fd606a66 | [
"Apache-2.0"
] | null | null | null | lib/core/config.py | yushanshan05/Detectron-restful-ElectFence | babe7cb2009e6a67bdb36ece66986cd8fd606a66 | [
"Apache-2.0"
] | 1 | 2018-08-20T21:56:22.000Z | 2018-08-20T21:56:22.000Z | lib/core/config.py | yushanshan05/Detectron-restful-ElectFence | babe7cb2009e6a67bdb36ece66986cd8fd606a66 | [
"Apache-2.0"
] | 1 | 2018-08-09T02:39:40.000Z | 2018-08-09T02:39:40.000Z | # Copyright (c) 2017-present, Facebook, 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... | 35.727796 | 80 | 0.670825 |
7309528da66428cc97c14ffe76d8ba164025919f | 36,653 | py | Python | frappe/core/doctype/user/user.py | abhishekbalam/frappe | 75326b2f23e433f356b699c4f7aa954d329150c5 | [
"MIT"
] | null | null | null | frappe/core/doctype/user/user.py | abhishekbalam/frappe | 75326b2f23e433f356b699c4f7aa954d329150c5 | [
"MIT"
] | null | null | null | frappe/core/doctype/user/user.py | abhishekbalam/frappe | 75326b2f23e433f356b699c4f7aa954d329150c5 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals, print_function
import frappe
from frappe.model.document import Document
from frappe.utils import cint, flt, has_gravatar, escape_html, format_datetime, now_datetime, get_formatte... | 32.236588 | 213 | 0.72889 |
73099be28e0a4b77a4785abe302afef9cf3871cb | 1,217 | py | Python | data_utils/jpeg_utils.py | gvalvano/idas | e1b112c8d0cd17b2b8486435dfe9de477bca2221 | [
"Apache-2.0"
] | 29 | 2020-07-04T00:04:28.000Z | 2022-03-18T01:49:34.000Z | idas/data_utils/jpeg_utils.py | gvalvano/unet_crf_as_rnn | 31b79741b77614764dcf3d2690fe0b0fab44934d | [
"Apache-2.0"
] | 2 | 2020-10-31T14:41:02.000Z | 2021-11-21T18:16:19.000Z | data_utils/jpeg_utils.py | gvalvano/idas | e1b112c8d0cd17b2b8486435dfe9de477bca2221 | [
"Apache-2.0"
] | 7 | 2020-10-21T01:02:52.000Z | 2021-11-14T16:52:18.000Z | """
Utilities for .jpg and .jpeg data
"""
# Copyright 2019 Gabriele Valvano
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unl... | 26.456522 | 82 | 0.688578 |
7309a7464182d704354a50b721277d15c73cc5e7 | 2,286 | py | Python | client/api/notebook.py | ucsb-pstat/Gofer-Grader | caee015adda1fb4792cc7ed532358604805a21c9 | [
"BSD-3-Clause"
] | 11 | 2018-10-12T09:18:46.000Z | 2022-03-11T00:57:20.000Z | client/api/notebook.py | ucsb-pstat/Gofer-Grader | caee015adda1fb4792cc7ed532358604805a21c9 | [
"BSD-3-Clause"
] | 15 | 2019-01-14T23:31:21.000Z | 2019-10-26T14:47:07.000Z | client/api/notebook.py | ucsb-pstat/Gofer-Grader | caee015adda1fb4792cc7ed532358604805a21c9 | [
"BSD-3-Clause"
] | 16 | 2018-10-12T13:40:47.000Z | 2022-01-15T00:26:02.000Z | """
Backwards compatibility shim for old okpy API
"""
import os
import inspect
from gofer.ok import check
class Notebook:
"""
Legacy class representing a notebook + associated tests.
Provided for drop-in compatibility with projects that
use a small subset of okpy's features.
"""
def __init__(s... | 32.657143 | 82 | 0.61811 |
7309ac9bc6dce42cf35f42bc1e154fd39b2e0d5a | 2,128 | py | Python | neutron_diagnose/command/router.py | zhuzhichaoTM/neutron-diagnose | 223d0d5edaf77a8264ce06d68adaa1b329bb9f1b | [
"Apache-2.0"
] | null | null | null | neutron_diagnose/command/router.py | zhuzhichaoTM/neutron-diagnose | 223d0d5edaf77a8264ce06d68adaa1b329bb9f1b | [
"Apache-2.0"
] | null | null | null | neutron_diagnose/command/router.py | zhuzhichaoTM/neutron-diagnose | 223d0d5edaf77a8264ce06d68adaa1b329bb9f1b | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 34.885246 | 78 | 0.68515 |
730a47b124bbb415b873f5fb3ffa3908e438c8d6 | 430 | py | Python | hs_modelinstance/migrations/0006_auto_20151216_1511.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_modelinstance/migrations/0006_auto_20151216_1511.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_modelinstance/migrations/0006_auto_20151216_1511.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | # -*- coding: utf-8 -*-
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('hs_modelinstance', '0005_auto_20151111_2129'),
]
operations = [
migrations.AlterField(
model_name='executedby',
name='model_name',
... | 20.47619 | 65 | 0.595349 |
730a573a79e7f76273b9f0672a0de8f8c1cb8a7e | 1,463 | py | Python | taxamo/models/calculateTaxOut.py | taxamo/taxamo-python | 190bdda68963860c131d2b1e9d31cd88de10d694 | [
"Apache-2.0"
] | 4 | 2016-03-14T03:59:08.000Z | 2020-06-21T07:58:38.000Z | taxamo/models/calculateTaxOut.py | taxamo/taxamo-python | 190bdda68963860c131d2b1e9d31cd88de10d694 | [
"Apache-2.0"
] | 2 | 2016-03-07T13:41:23.000Z | 2017-07-11T13:39:44.000Z | taxamo/models/calculateTaxOut.py | taxamo/taxamo-python | 190bdda68963860c131d2b1e9d31cd88de10d694 | [
"Apache-2.0"
] | 8 | 2016-01-13T14:32:19.000Z | 2021-08-16T11:14:06.000Z | #!/usr/bin/env python
"""
Copyright 2014-2021 by Taxamo
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 applic... | 38.5 | 141 | 0.703349 |
730a620180d455aa612ca2804d2af723dddd4141 | 11,690 | py | Python | src/dsutils/plotting.py | brendanhasz/dsutils | e780e904f7bf0ec5e14aa7ddb337f01f29779143 | [
"MIT"
] | 1 | 2019-09-14T16:59:34.000Z | 2019-09-14T16:59:34.000Z | src/dsutils/plotting.py | brendanhasz/dsutils | e780e904f7bf0ec5e14aa7ddb337f01f29779143 | [
"MIT"
] | null | null | null | src/dsutils/plotting.py | brendanhasz/dsutils | e780e904f7bf0ec5e14aa7ddb337f01f29779143 | [
"MIT"
] | 7 | 2020-01-19T14:40:08.000Z | 2022-01-14T12:50:30.000Z | """Plotting utilities.
* :func:`.plot_dist`
* :func:`.plot_line`
* :func:`.plot_dist`
"""
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.colors import to_rgba
COLORS = plt.rcParams['axes.prop_cycle'].by_key()['color']
def approx_kde(data, bins=500, bw=0.075):
"""A fast approximation to ke... | 33.688761 | 77 | 0.572027 |
730aa332b047e750e19dba3e375cc365dac8b3ba | 7,090 | py | Python | components/server/tests/external/data_model/meta/test_data_model.py | ICTU/quality-time | 88d80ea30e35bd5f0bf5cce7cb43dc9f439e91f5 | [
"Apache-2.0"
] | 33 | 2016-01-20T07:35:48.000Z | 2022-03-14T09:20:51.000Z | components/server/tests/external/data_model/meta/test_data_model.py | ICTU/quality-time | 88d80ea30e35bd5f0bf5cce7cb43dc9f439e91f5 | [
"Apache-2.0"
] | 2,410 | 2016-01-22T18:13:01.000Z | 2022-03-31T16:57:34.000Z | components/server/tests/external/data_model/meta/test_data_model.py | ICTU/quality-time | 88d80ea30e35bd5f0bf5cce7cb43dc9f439e91f5 | [
"Apache-2.0"
] | 21 | 2016-01-16T11:49:23.000Z | 2022-01-14T21:53:22.000Z | """Data model unit tests."""
from unittest.mock import patch
from external.data_model.meta.data_model import DataModel
from .base import MetaModelTestCase
class DataModelTest(MetaModelTestCase):
"""Data model unit tests."""
MODEL = DataModel
DESCRIPTION = "Description."
SCALES = dict(count=dict(na... | 41.952663 | 119 | 0.569111 |
730ab03a62c974798b84668ba7d3f0a8aa1a322b | 11,185 | py | Python | examples/development/collect_actions_SAC.py | JiazhengChai/synergy_DRL | c08e78e5fe39d9d46213e1bf07b8dafc2195b05a | [
"MIT"
] | 2 | 2020-01-07T04:12:42.000Z | 2021-12-21T22:25:31.000Z | examples/development/collect_actions_SAC.py | JiazhengChai/synergy_DRL | c08e78e5fe39d9d46213e1bf07b8dafc2195b05a | [
"MIT"
] | 11 | 2019-11-29T02:59:34.000Z | 2022-03-12T00:07:28.000Z | examples/development/collect_actions_SAC.py | JiazhengChai/synergy_DRL | c08e78e5fe39d9d46213e1bf07b8dafc2195b05a | [
"MIT"
] | 1 | 2020-04-28T12:06:40.000Z | 2020-04-28T12:06:40.000Z | import argparse
from distutils.util import strtobool
import json
import os
import pickle
from collections import OrderedDict
import tensorflow as tf
import numpy as np
from softlearning.policies.utils import get_policy_from_variant
from softlearning.samplers import rollouts,my_rollouts
def parse_args():
parser =... | 38.836806 | 133 | 0.523022 |
730ab135c13ddfd1f978a0d8bb713c88931baa3a | 1,346 | py | Python | python/meta_rl/meta_rl/utils.py | DamienLegros/iar-project | b34eabd791bf732fa38e44d2bb6df9b535b79c71 | [
"CC-BY-4.0"
] | null | null | null | python/meta_rl/meta_rl/utils.py | DamienLegros/iar-project | b34eabd791bf732fa38e44d2bb6df9b535b79c71 | [
"CC-BY-4.0"
] | null | null | null | python/meta_rl/meta_rl/utils.py | DamienLegros/iar-project | b34eabd791bf732fa38e44d2bb6df9b535b79c71 | [
"CC-BY-4.0"
] | null | null | null | import numpy as np
import random
import tensorflow as tf
import scipy.signal as signal
import os
# Copies one set of variables to another.
# Used to set worker network parameters to those of global network.
def update_target_graph(from_scope,to_scope):
from_vars = tf.compat.v1.get_collection(tf.compat.v1.GraphKeys.T... | 37.388889 | 97 | 0.68425 |
730af5bc5b3961de40fc67e9e297a09fd347e97f | 1,860 | py | Python | compute_image_moment_stats.py | YingK001/- | 11a66cdbddee16c69514b9530a727df0ac6e136f | [
"MIT"
] | 628 | 2015-03-25T17:32:30.000Z | 2021-07-30T18:24:33.000Z | compute_image_moment_stats.py | YingK001/- | 11a66cdbddee16c69514b9530a727df0ac6e136f | [
"MIT"
] | 4 | 2015-04-06T10:23:19.000Z | 2017-01-10T18:47:49.000Z | compute_image_moment_stats.py | YingK001/- | 11a66cdbddee16c69514b9530a727df0ac6e136f | [
"MIT"
] | 253 | 2015-03-25T18:08:43.000Z | 2022-01-26T22:35:05.000Z | import cPickle as pickle
import numpy as np
import skimage.measure
import data
target_path_pattern = "data/image_moment_stats_v1_%s.pkl"
for subset in ['train', 'test']:
print "loading subset %s..." % subset
d = data.load(subset)
print "computing image moment statistics for subset %s..." % subset
... | 28.615385 | 98 | 0.556452 |
730b0df7fd35d0aa58b75d60503b50e9df70ab3a | 3,099 | py | Python | spf/core/sitecloner.py | mehrdad-shokri/SPF | 344ac2ffdb2293d5e2d3540be27cd48e76b03f16 | [
"BSD-3-Clause"
] | 450 | 2015-05-15T14:58:26.000Z | 2022-03-19T21:26:31.000Z | spf/core/sitecloner.py | Warlockk/SPF | 344ac2ffdb2293d5e2d3540be27cd48e76b03f16 | [
"BSD-3-Clause"
] | 25 | 2015-09-17T07:06:01.000Z | 2020-06-19T10:56:22.000Z | spf/core/sitecloner.py | Warlockk/SPF | 344ac2ffdb2293d5e2d3540be27cd48e76b03f16 | [
"BSD-3-Clause"
] | 136 | 2015-05-23T21:27:14.000Z | 2022-03-17T05:42:56.000Z | #!/usr/bin/env python3
import subprocess
import os
import re
import sys
import urllib.request, urllib.parse, urllib.error
import urllib.request, urllib.error, urllib.parse
class SiteCloner():
def __init__(self, clone_dir="web_clones/"):
self.clone_dir = clone_dir
def fixForms(self, html, method="POST"... | 39.227848 | 228 | 0.55889 |
730b3764992acc2b2c9c4d27ae84676bef3027e9 | 465 | py | Python | colossalai/nn/data/base_dataset.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | 1 | 2021-11-02T14:00:27.000Z | 2021-11-02T14:00:27.000Z | colossalai/nn/data/base_dataset.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | null | null | null | colossalai/nn/data/base_dataset.py | rahulgupta9202/ColossalAI | 993088d45eaa032e39cf5959df2a506f0663bc2e | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from abc import ABC
from torch.utils.data import Dataset
from torchvision.transforms import transforms
from colossalai.builder import build_transform
class BaseDataset(Dataset, ABC):
def __init__(self, transform_pipeline: list):
transform_list = [build_t... | 25.833333 | 77 | 0.752688 |
730b7a666b3d7580b32a4334fbb381b0d8fe03e5 | 531 | py | Python | office365/sharepoint/search/relevantResults.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/sharepoint/search/relevantResults.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | office365/sharepoint/search/relevantResults.py | wreiner/Office365-REST-Python-Client | 476bbce4f5928a140b4f5d33475d0ac9b0783530 | [
"MIT"
] | null | null | null | from office365.runtime.client_value import ClientValue
from office365.sharepoint.search.simpleDataTable import SimpleDataTable
class RelevantResults(ClientValue):
def __init__(self):
super().__init__()
self.GroupTemplateId = None
self.ItemTemplateId = None
self.Properties = []
... | 29.5 | 71 | 0.689266 |
730b8c639e6bd59d48cf7be719c2481b2a85246c | 8,550 | py | Python | hyperbox/networks/utils.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | 1 | 2022-01-17T00:34:14.000Z | 2022-01-17T00:34:14.000Z | hyperbox/networks/utils.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | null | null | null | hyperbox/networks/utils.py | marsggbo/hyperbox | 91dcd04ad30164bcb12209d818df18961fa3f347 | [
"MIT"
] | null | null | null | import copy
import numpy as np
import omegaconf
import torch
import torch.nn as nn
import torch.nn.functional as F
from hyperbox.mutables.masker import __MASKERS__
from hyperbox.mutables.ops import BaseBatchNorm, BaseConvNd, FinegrainedModule, Linear
from hyperbox.mutables.spaces import ValueSpace
from hyp... | 40.909091 | 144 | 0.610175 |
730b8df5c20cc24ea94be02eeb312f78e02464e3 | 1,554 | py | Python | ERation/customer/migrations/0001_initial.py | mishelshaji/ERation | 0e755ae63ae2c9cc009e18b72425ac508670a1cf | [
"MIT"
] | null | null | null | ERation/customer/migrations/0001_initial.py | mishelshaji/ERation | 0e755ae63ae2c9cc009e18b72425ac508670a1cf | [
"MIT"
] | null | null | null | ERation/customer/migrations/0001_initial.py | mishelshaji/ERation | 0e755ae63ae2c9cc009e18b72425ac508670a1cf | [
"MIT"
] | null | null | null | # Generated by Django 3.0.3 on 2020-02-20 07:24
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('eadmin', '0001_initial'),
]
oper... | 51.8 | 220 | 0.700129 |
730bae5da52e613944c4f26f7c80efd5822d27a3 | 9,470 | py | Python | main.py | dalehumby/micropython | f47180b8608ba13cabe6424aad28574caba17d3a | [
"MIT"
] | 2 | 2021-05-02T18:57:06.000Z | 2021-09-06T19:15:05.000Z | main.py | dalehumby/micropython | f47180b8608ba13cabe6424aad28574caba17d3a | [
"MIT"
] | 2 | 2021-05-02T18:29:46.000Z | 2021-06-03T19:59:19.000Z | main.py | dalehumby/micropython | f47180b8608ba13cabe6424aad28574caba17d3a | [
"MIT"
] | 1 | 2022-02-06T15:45:42.000Z | 2022-02-06T15:45:42.000Z | """
Power Meter for recording electricity usage at home using MicroPython on ESP8266.
Tested with
- MicroPython 1.13
- Wemos D1 Mini:
- https://www.wemos.cc/en/latest/d1/d1_mini.html
- Pinout https://randomnerdtutorials.com/esp8266-pinout-reference-gpios/
"""
import gc
import btree
import esp
import network
impo... | 30.063492 | 107 | 0.625026 |
730bb365705b226b61658111e89b239d3814b0d2 | 50,481 | py | Python | pytorch_widedeep/models/wide_deep.py | FlyingWing/pytorch-widedeep | 91a255d08bc9bdd5a05669465b7cf0313849ec9c | [
"MIT"
] | null | null | null | pytorch_widedeep/models/wide_deep.py | FlyingWing/pytorch-widedeep | 91a255d08bc9bdd5a05669465b7cf0313849ec9c | [
"MIT"
] | null | null | null | pytorch_widedeep/models/wide_deep.py | FlyingWing/pytorch-widedeep | 91a255d08bc9bdd5a05669465b7cf0313849ec9c | [
"MIT"
] | null | null | null | import os
import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
from tqdm import trange
from torch.utils.data import DataLoader
from sklearn.model_selection import train_test_split
from ..losses import FocalLoss
from ._warmup import WarmUp
from ..metrics import Metric, MetricCallback, ... | 45.112601 | 121 | 0.586775 |
730bbcb837f7f2c3403643521940bc4baaa972bb | 1,405 | py | Python | scripts/extractAll.py | AndreHermanto/hpo-search | fef54f3dc5fcd8057a10180a9359e4e8f4a49ef5 | [
"MIT"
] | null | null | null | scripts/extractAll.py | AndreHermanto/hpo-search | fef54f3dc5fcd8057a10180a9359e4e8f4a49ef5 | [
"MIT"
] | null | null | null | scripts/extractAll.py | AndreHermanto/hpo-search | fef54f3dc5fcd8057a10180a9359e4e8f4a49ef5 | [
"MIT"
] | 1 | 2021-11-10T03:16:23.000Z | 2021-11-10T03:16:23.000Z | import sys
import json
import requests
# sample program to extract all HPO terms
# using the HPO api: documentation at https://hpo.jax.org/webjars/swagger-ui/3.20.9/index.html?url=/api/hpo/docs
API_URL = 'https://hpo.jax.org/api/hpo/term/'
# function to recursively search for children of an ontology
def get_children... | 35.125 | 112 | 0.607117 |
730be82572681b1992c68236fefc48719c90cdef | 2,854 | py | Python | MachineLearning/confusion_matrix.py | monocilindro/qgis-earthengine-examples | 82aea8926d34ed3f4ad4a4a345ddbd225819d28f | [
"MIT"
] | 646 | 2019-12-03T06:09:03.000Z | 2022-03-28T03:37:08.000Z | MachineLearning/confusion_matrix.py | csaybar/qgis-earthengine-examples | ba8942683834d2847ff3246bdd1859b36e50fe44 | [
"MIT"
] | 10 | 2019-12-30T03:42:44.000Z | 2021-05-22T07:34:07.000Z | MachineLearning/confusion_matrix.py | csaybar/qgis-earthengine-examples | ba8942683834d2847ff3246bdd1859b36e50fe44 | [
"MIT"
] | 219 | 2019-12-06T02:20:53.000Z | 2022-03-30T15:14:27.000Z | import ee
from ee_plugin import Map
# Define a region of interest as a point. Change the coordinates
# to get a classification of any place where there is imagery.
roi = ee.Geometry.Point(-122.3942, 37.7295)
# Load Landsat 5 input imagery.
landsat = ee.Image(ee.ImageCollection('LANDSAT/LT05/C01/T1_TOA')
# Filter... | 34.804878 | 89 | 0.722144 |
730bff1f0d21d37e4226a1cd2c47c92a69614282 | 35,173 | py | Python | aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/tests/test_handler.py | procivis/aries-cloudagent-python | 33389d7717fec29cd3b5d31a497079d389ddb586 | [
"Apache-2.0"
] | null | null | null | aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/tests/test_handler.py | procivis/aries-cloudagent-python | 33389d7717fec29cd3b5d31a497079d389ddb586 | [
"Apache-2.0"
] | 1 | 2020-11-23T08:02:37.000Z | 2020-11-23T08:02:37.000Z | aries_cloudagent/protocols/issue_credential/v2_0/formats/ld_proof/tests/test_handler.py | procivis/aries-cloudagent-python | 33389d7717fec29cd3b5d31a497079d389ddb586 | [
"Apache-2.0"
] | null | null | null | from copy import deepcopy
from asynctest import TestCase as AsyncTestCase
from asynctest import mock as async_mock
from marshmallow import ValidationError
from .. import handler as test_module
from .......core.in_memory import InMemoryProfile
from .......storage.vc_holder.base import VCHolder
from .......wallet.base ... | 37.457934 | 169 | 0.614392 |
730c037eaf207b15b243786018d135191dadd588 | 2,671 | py | Python | tests/test_verify.py | ascmitc/mhl | f7671941d0ef12d05a5043fb45f621e7ad2c3981 | [
"MIT"
] | 28 | 2019-10-07T18:59:29.000Z | 2022-03-19T23:05:04.000Z | tests/test_verify.py | ascmitc/mhl | f7671941d0ef12d05a5043fb45f621e7ad2c3981 | [
"MIT"
] | 93 | 2019-08-14T18:02:39.000Z | 2022-03-18T19:34:57.000Z | tests/test_verify.py | ascmitc/mhl | f7671941d0ef12d05a5043fb45f621e7ad2c3981 | [
"MIT"
] | 8 | 2020-11-04T14:33:42.000Z | 2022-02-15T04:19:25.000Z | """
__author__ = "Alexander Sahm"
__copyright__ = "Copyright 2020, Pomfort GmbH"
__license__ = "MIT"
__maintainer__ = "Patrick Renner, Alexander Sahm"
__email__ = "opensource@pomfort.com"
"""
import os
from freezegun import freeze_time
from click.testing import CliRunner
from ascmhl.history import MHLHistory
import ... | 32.975309 | 114 | 0.68027 |
730c6c062d3a1805e7d1c8b0af8a0a7bb5ffae78 | 12,336 | py | Python | tests/services/test_users.py | ryanvanasse/py42 | 4664c45d41c32f48323b552b7b11f885c055bff3 | [
"MIT"
] | null | null | null | tests/services/test_users.py | ryanvanasse/py42 | 4664c45d41c32f48323b552b7b11f885c055bff3 | [
"MIT"
] | null | null | null | tests/services/test_users.py | ryanvanasse/py42 | 4664c45d41c32f48323b552b7b11f885c055bff3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pytest
from tests.conftest import create_mock_error
from tests.conftest import create_mock_response
import py42.settings
from py42.exceptions import Py42ActiveLegalHoldError
from py42.exceptions import Py42BadRequestError
from py42.exceptions import Py42InternalServerError
from py42.exce... | 38.670846 | 108 | 0.677691 |
730ca76dfd48727b27bf14b1e7647b8dbc670b1b | 15,904 | py | Python | doslib/iodos.py | nw13slx/Doslib | 425eca912c598626f16fd061e9afd9ba7bec4eee | [
"MIT"
] | 1 | 2021-09-09T08:53:39.000Z | 2021-09-09T08:53:39.000Z | doslib/iodos.py | nw13slx/Doslib | 425eca912c598626f16fd061e9afd9ba7bec4eee | [
"MIT"
] | null | null | null | doslib/iodos.py | nw13slx/Doslib | 425eca912c598626f16fd061e9afd9ba7bec4eee | [
"MIT"
] | null | null | null | # data storage
#!/usr/bin/env python
import numpy as np
import os
class iodos:
'''this is the class that take care of the input and output of doscar '''
# virtual function
tally = None
par_symbol = ['s', 'p', 'd', 'f']
def _auto_terminate(self):
if self.end:
raise SystemExit... | 37.776722 | 167 | 0.505345 |
730cb6427b29701c4423b95092d889987d1e8b2c | 10,317 | py | Python | ptlflow/models/hd3/hd3.py | jasonbian97/ptlflow | 8a7307af1c0b241108f3125cb716d64a18c1b87e | [
"Apache-2.0"
] | 78 | 2021-06-15T03:11:33.000Z | 2022-03-25T05:51:25.000Z | ptlflow/models/hd3/hd3.py | jasonbian97/ptlflow | 8a7307af1c0b241108f3125cb716d64a18c1b87e | [
"Apache-2.0"
] | 12 | 2021-07-04T17:02:57.000Z | 2022-02-09T09:30:43.000Z | ptlflow/models/hd3/hd3.py | jasonbian97/ptlflow | 8a7307af1c0b241108f3125cb716d64a18c1b87e | [
"Apache-2.0"
] | 3 | 2021-07-27T21:28:51.000Z | 2021-09-17T10:06:27.000Z | from argparse import ArgumentParser, Namespace
from pathlib import Path
import numpy as np
try:
from spatial_correlation_sampler import SpatialCorrelationSampler
except ModuleNotFoundError:
from ptlflow.utils.correlation import IterSpatialCorrelationSampler as SpatialCorrelationSampler
import torch
import torc... | 38.640449 | 126 | 0.558108 |
730cbab548e35640ee53c09f1e387b434717620b | 4,333 | py | Python | rllib/models/tf/visionnet_v2.py | gfmartins/ray | 0d911b8f05ce80bdc14e740afdaa74a29c27a278 | [
"Apache-2.0"
] | 1 | 2021-06-17T08:35:56.000Z | 2021-06-17T08:35:56.000Z | rllib/models/tf/visionnet_v2.py | idthanm/ray | 948b1b09e82a8964acb7c5b69a7782ebdffc8a1b | [
"Apache-2.0"
] | null | null | null | rllib/models/tf/visionnet_v2.py | idthanm/ray | 948b1b09e82a8964acb7c5b69a7782ebdffc8a1b | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from ray.rllib.models.tf.tf_modelv2 import TFModelV2
from ray.rllib.models.tf.visionnet_v1 import _get_filter_config
from ray.rllib.models.tf.misc import normc_initializer, get_activation_fn
from ray.rllib.util... | 39.036036 | 76 | 0.564736 |
730cbf67ed91322e0d9e43b5bde00a20e37ac74a | 3,268 | py | Python | src/zptess/photometer/protocol/tessp.py | STARS4ALL/zptess | 9bbe91720f283756a0938c7ac4dde180c1e1eda2 | [
"MIT"
] | null | null | null | src/zptess/photometer/protocol/tessp.py | STARS4ALL/zptess | 9bbe91720f283756a0938c7ac4dde180c1e1eda2 | [
"MIT"
] | null | null | null | src/zptess/photometer/protocol/tessp.py | STARS4ALL/zptess | 9bbe91720f283756a0938c7ac4dde180c1e1eda2 | [
"MIT"
] | null | null | null | # ----------------------------------------------------------------------
# Copyright (c) 2014 Rafael Gonzalez.
#
# See the LICENSE file for details
# ----------------------------------------------------------------------
#--------------------
# System wide imports
# -------------------
import re
import datetime
# -... | 27.462185 | 98 | 0.588127 |
730cc43c7d773631c3c1d957bad0ddb41567a723 | 1,955 | py | Python | tests/test_knn.py | zhangfelix/Machine-Learning-Toolbox | f302fd62d7125a37546292ee12047de1022c4cca | [
"MIT"
] | null | null | null | tests/test_knn.py | zhangfelix/Machine-Learning-Toolbox | f302fd62d7125a37546292ee12047de1022c4cca | [
"MIT"
] | null | null | null | tests/test_knn.py | zhangfelix/Machine-Learning-Toolbox | f302fd62d7125a37546292ee12047de1022c4cca | [
"MIT"
] | null | null | null | # coding=utf-8
'''
test knn
'''
import numpy as np
from MLToolbox.tools import data
from MLToolbox.neighbors.knn import KNN
from sklearn.neighbors import KNeighborsClassifier
class TestKNN:
'''
test MLToolbox.neighbors.knn
'''
times = 0
def test_knn_calculate(self):
'''
test MLToolbo... | 38.333333 | 72 | 0.584655 |
730cde416dc033dbabb0ef52c3ceab8c98210e3d | 439 | py | Python | game/models/player.py | pitzer42/micro-tcg | eec416fb3b7b992a206ab900f3d85d172f494103 | [
"MIT"
] | null | null | null | game/models/player.py | pitzer42/micro-tcg | eec416fb3b7b992a206ab900f3d85d172f494103 | [
"MIT"
] | 2 | 2019-06-25T02:15:10.000Z | 2019-06-25T02:22:14.000Z | game/models/player.py | pitzer42/micro-tcg | eec416fb3b7b992a206ab900f3d85d172f494103 | [
"MIT"
] | 1 | 2019-06-12T00:35:41.000Z | 2019-06-12T00:35:41.000Z | from engine.models import assign_dict_to_obj
from game.models.card import Card
from game.models.resource import Resource
class Player:
def __init__(self, **kwargs):
self.name: str = None
self.hand: list[Card] = None
self.deck: list[Card] = None
self.field: list[Card] = None
... | 27.4375 | 44 | 0.660592 |
730ce70e9463ac738a03637d681f1cc797a58b2f | 171 | py | Python | Coding Theory/Lecture-4-Field/order.py | LuminolT/Cryptographic | 87fffae591eee9644641a4c511972df0c2a44df7 | [
"MIT"
] | null | null | null | Coding Theory/Lecture-4-Field/order.py | LuminolT/Cryptographic | 87fffae591eee9644641a4c511972df0c2a44df7 | [
"MIT"
] | null | null | null | Coding Theory/Lecture-4-Field/order.py | LuminolT/Cryptographic | 87fffae591eee9644641a4c511972df0c2a44df7 | [
"MIT"
] | 1 | 2022-03-07T13:56:55.000Z | 2022-03-07T13:56:55.000Z | for i in range(15):
round = 1
iter = (i + i) % 15
while iter != i:
iter += i
iter %= 15
round += 1
print(f'{i}\'s order: {round}')
| 19 | 35 | 0.421053 |
730cef0cdd00feb376d341ace7a9c1973da22fa3 | 30,033 | py | Python | mathics/core/definitions.py | rebcabin/mathics-core | 0cbf808fb9fb91e0a32d0aa9d1af1477d0258f41 | [
"Apache-2.0"
] | null | null | null | mathics/core/definitions.py | rebcabin/mathics-core | 0cbf808fb9fb91e0a32d0aa9d1af1477d0258f41 | [
"Apache-2.0"
] | null | null | null | mathics/core/definitions.py | rebcabin/mathics-core | 0cbf808fb9fb91e0a32d0aa9d1af1477d0258f41 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pickle
import os
import base64
import re
import bisect
from collections import defaultdict
import typing
from mathics.core.symbols import fully_qualified_symbol_name, strip_context, Symbol
from mathics.core.expression import Expression
from mathics.core.atoms im... | 35.542012 | 118 | 0.595678 |
730d0c7e0cfd37a16750b2e422e3c4b2dd9de0c1 | 398 | py | Python | runtests.py | webu/dalec | ddc4f3c4627c84c5a70e9052d28f77d6ff8755a7 | [
"BSD-3-Clause"
] | null | null | null | runtests.py | webu/dalec | ddc4f3c4627c84c5a70e9052d28f77d6ff8755a7 | [
"BSD-3-Clause"
] | null | null | null | runtests.py | webu/dalec | ddc4f3c4627c84c5a70e9052d28f77d6ff8755a7 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
if __name__ == "__main__":
os.environ["DJANGO_SETTINGS_MODULE"] = "tests.settings"
django.setup()
TestRunner = get_runner(settings)
test_runner = TestRunner(failfast=True)... | 24.875 | 59 | 0.736181 |
730d12d38fe901a57edbce3aafe2dd308808dd33 | 1,546 | py | Python | PythonNetCode/chapter4/4_2_simple_http_server.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | PythonNetCode/chapter4/4_2_simple_http_server.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | PythonNetCode/chapter4/4_2_simple_http_server.py | AirChen/PythonPractic | 676708237dc502ea9a60218a3ca134874bd18456 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Python Network Programming Cookbook -- Chapter - 4
# This program is optimized for Python 2.7.
# It may run on any other version with/without modifications.
import argparse
import sys
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
DEFAULT_HOST = '127.0.0.1'
DEFAULT_PORT = 8800
... | 29.730769 | 94 | 0.679172 |
730d20ef1afbe3f7cf42ac3315db36d80f8ec8a5 | 288 | py | Python | applications/site/index.py | dyvenia/timesheets | 5120acd66cbeb3ce43bff5acfee4cd6b14882962 | [
"MIT"
] | 13 | 2021-09-27T14:53:15.000Z | 2022-02-15T05:48:01.000Z | applications/site/index.py | dyvenia/timeflow | 7852872f591fbdb88be19f7b41ebb226e805fbd9 | [
"MIT"
] | 62 | 2022-02-15T09:52:52.000Z | 2022-03-31T12:50:13.000Z | applications/site/index.py | dyvenia/timesheets | 5120acd66cbeb3ce43bff5acfee4cd6b14882962 | [
"MIT"
] | 4 | 2022-03-02T15:24:03.000Z | 2022-03-30T10:59:38.000Z | from idom import html, use_state, component
@component
def site_index():
index, set_index = use_state(0)
def handle_click(event):
set_index(index + 1)
return html.div(
html.p(f"The Count Is {index}"), html.button({"onClick": handle_click}, "Add 1")
)
| 19.2 | 88 | 0.638889 |
730d98d5f8b217272e6efc189c2d663ac2b63288 | 11,846 | py | Python | libs/utils/metrics.py | yjh0410/actionformer_release | 7a97422111d3e29c8d2e14088c850c6975855ea7 | [
"MIT"
] | null | null | null | libs/utils/metrics.py | yjh0410/actionformer_release | 7a97422111d3e29c8d2e14088c850c6975855ea7 | [
"MIT"
] | null | null | null | libs/utils/metrics.py | yjh0410/actionformer_release | 7a97422111d3e29c8d2e14088c850c6975855ea7 | [
"MIT"
] | null | null | null | # Modified from official EPIC-Kitchens action detection evaluation code
# see https://github.com/epic-kitchens/C2-Action-Detection/blob/master/EvaluationCode/evaluate_detection_json_ek100.py
import os
import json
import pandas as pd
import numpy as np
from joblib import Parallel, delayed
from typing import List
from ty... | 36.78882 | 118 | 0.603326 |
730da386fae001a80a065af0ab521ffe01122059 | 61 | py | Python | embed/__init__.py | 3lLobo/embed | d77c2af78e88908afc5f81a1f681a9b3e4c5d6d6 | [
"MIT"
] | 1 | 2020-10-12T12:12:28.000Z | 2020-10-12T12:12:28.000Z | embed/__init__.py | 3lLobo/embed | d77c2af78e88908afc5f81a1f681a9b3e4c5d6d6 | [
"MIT"
] | null | null | null | embed/__init__.py | 3lLobo/embed | d77c2af78e88908afc5f81a1f681a9b3e4c5d6d6 | [
"MIT"
] | 1 | 2020-12-21T18:24:26.000Z | 2020-12-21T18:24:26.000Z | from .lpmodels import LinkPredictor
from .data import load
| 12.2 | 35 | 0.803279 |
730db8ebd44204d3eae798c0a42a536713bbf9e7 | 15,938 | py | Python | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/apimanagement/azure-mgmt-apimanagement/azure/mgmt/apimanagement/aio/operations/_policy_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 45.022599 | 201 | 0.685218 |
730dcecda9088d7cf361ae6ac09ec1398d55a45b | 260 | py | Python | app/recipe/serializers.py | anilbpoyraz/recipe-app-api | 947ff8c54b0abeb9a2a70825bd5bfe74944ccde3 | [
"MIT"
] | 4 | 2019-10-19T00:37:58.000Z | 2021-01-07T13:47:28.000Z | app/recipe/serializers.py | anilbpoyraz/recipe-app-api | 947ff8c54b0abeb9a2a70825bd5bfe74944ccde3 | [
"MIT"
] | 6 | 2020-06-05T23:49:51.000Z | 2022-02-10T10:45:43.000Z | app/recipe/serializers.py | anilbpoyraz/recipe-app-api | 947ff8c54b0abeb9a2a70825bd5bfe74944ccde3 | [
"MIT"
] | 2 | 2020-04-14T00:58:25.000Z | 2020-10-20T11:22:08.000Z | from rest_framework import serializers
from core.models import Tag
class TagSerializer(serializers.ModelSerializer):
"""Serializer for tag objects"""
class Meta:
model = Tag
fields = ('id', 'name')
read_only_fields = ('id',)
| 21.666667 | 49 | 0.661538 |
730ddf4200623653d72af347841dc42744314785 | 15 | py | Python | btd6_memory_info/generated/NinjaKiwi/LiNK/Api/api.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/NinjaKiwi/LiNK/Api/api.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/NinjaKiwi/LiNK/Api/api.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class Api: pass | 15 | 15 | 0.8 |
730df327a203470725ac67dcdde6a92b64b6bc8f | 7,399 | py | Python | experiments/vitchyr/probabilistic_goal_reaching/fancy_discount/exp_5_point2d_sweep_autoinit_qf_and_extra_discount_larger_rs.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2020-10-23T14:40:09.000Z | 2020-10-23T14:40:09.000Z | experiments/vitchyr/probabilistic_goal_reaching/fancy_discount/exp_5_point2d_sweep_autoinit_qf_and_extra_discount_larger_rs.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | null | null | null | experiments/vitchyr/probabilistic_goal_reaching/fancy_discount/exp_5_point2d_sweep_autoinit_qf_and_extra_discount_larger_rs.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1 | 2021-05-27T20:38:45.000Z | 2021-05-27T20:38:45.000Z | import rlkit.misc.hyperparameter as hyp
from rlkit.launchers.experiments.vitchyr.probabilistic_goal_reaching.launcher import \
probabilistic_goal_reaching_experiment
from rlkit.launchers.launcher_util import run_experiment
if __name__ == "__main__":
variant = dict(
qf_kwargs=dict(
hidden_si... | 31.619658 | 99 | 0.517908 |
730e1937551ec97c9170ca2fddf853fd2dcced22 | 13,391 | py | Python | python/evalrescallers_paper/regimen_plot.py | kerrimalone/tb-amr-benchmarking-paper | 27d918535b215ca78a4baffdfca172ea0610b00a | [
"MIT"
] | null | null | null | python/evalrescallers_paper/regimen_plot.py | kerrimalone/tb-amr-benchmarking-paper | 27d918535b215ca78a4baffdfca172ea0610b00a | [
"MIT"
] | null | null | null | python/evalrescallers_paper/regimen_plot.py | kerrimalone/tb-amr-benchmarking-paper | 27d918535b215ca78a4baffdfca172ea0610b00a | [
"MIT"
] | null | null | null | from collections import OrderedDict
import copy
import csv
import subprocess
from evalrescallers import who_treatment
from evalrescallers_paper import svg
def load_regimen_counts_tsv(infile, datasets):
with open(infile) as f:
all_data = {}
reader = csv.DictReader(f,delimiter='\t')
for d ... | 42.110063 | 176 | 0.558808 |
730e35f6a5b8ac9239eb47c1c04280c7f17b9b5b | 577 | py | Python | src/onecontainer_cloud_tool/services.py | intel/oneContainer-Cloud-Tool | 843fd4f6aa2e168ac7a7b544e05b92a7495e1121 | [
"BSD-3-Clause"
] | null | null | null | src/onecontainer_cloud_tool/services.py | intel/oneContainer-Cloud-Tool | 843fd4f6aa2e168ac7a7b544e05b92a7495e1121 | [
"BSD-3-Clause"
] | null | null | null | src/onecontainer_cloud_tool/services.py | intel/oneContainer-Cloud-Tool | 843fd4f6aa2e168ac7a7b544e05b92a7495e1121 | [
"BSD-3-Clause"
] | 3 | 2021-01-04T10:29:16.000Z | 2022-02-19T00:07:15.000Z | """cloud service factory."""
from typing import Optional
from onecontainer_cloud_tool.cloud.aws import AWS
from onecontainer_cloud_tool.cloud.m_azure import Azure
from onecontainer_cloud_tool.cloud.gcp import GCP
from onecontainer_cloud_tool.cloud.abstract_cloud import Cloud
def service(cloud="aws") -> Optional[Cloud... | 30.368421 | 69 | 0.714038 |
730e37d3a3e1ed716c3705464ab9eb235b618b34 | 2,067 | py | Python | repos/system_upgrade/el7toel8/actors/checkselinux/actor.py | adka1408/leapp-repository | be5a9603b57f86c65d395ba6a02b860cacae0fb6 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/checkselinux/actor.py | adka1408/leapp-repository | be5a9603b57f86c65d395ba6a02b860cacae0fb6 | [
"Apache-2.0"
] | null | null | null | repos/system_upgrade/el7toel8/actors/checkselinux/actor.py | adka1408/leapp-repository | be5a9603b57f86c65d395ba6a02b860cacae0fb6 | [
"Apache-2.0"
] | null | null | null | from leapp.actors import Actor
from leapp.tags import ChecksPhaseTag, IPUWorkflowTag
from leapp.models import SELinuxFacts, SelinuxPermissiveDecision, SelinuxRelabelDecision
from leapp.reporting import Report
from leapp.libraries.common.reporting import report_generic
class CheckSelinux(Actor):
"""
Check SELi... | 36.263158 | 103 | 0.631834 |
730e38029ae28d87c468df973975621278b8e87a | 22,012 | py | Python | mouse_burrows/algorithm/objects/burrow.py | david-zwicker/cv-mouse-burrows | 906476f49ff9711cd672feca5f70efedaab82b01 | [
"BSD-3-Clause"
] | 1 | 2016-03-06T05:16:38.000Z | 2016-03-06T05:16:38.000Z | mouse_burrows/algorithm/objects/burrow.py | david-zwicker/cv-mouse-burrows | 906476f49ff9711cd672feca5f70efedaab82b01 | [
"BSD-3-Clause"
] | null | null | null | mouse_burrows/algorithm/objects/burrow.py | david-zwicker/cv-mouse-burrows | 906476f49ff9711cd672feca5f70efedaab82b01 | [
"BSD-3-Clause"
] | null | null | null | '''
Created on Aug 28, 2014
@author: David Zwicker <dzwicker@seas.harvard.edu>
Holds classes describing mouse burrows
'''
from __future__ import division
import copy
import itertools
import numpy as np
from scipy import cluster
import shapely
from shapely import geometry
from utils.data_structures.cache import c... | 34.233281 | 83 | 0.575141 |
730e38c3b0bf04712227feae967fc996e3732a6f | 826 | py | Python | repl/base/sink.py | 946336/The-Worst-REPL-You-ve-Ever-Seen | 971f316b4b93441527a880835938a91d100f7e5d | [
"MIT"
] | null | null | null | repl/base/sink.py | 946336/The-Worst-REPL-You-ve-Ever-Seen | 971f316b4b93441527a880835938a91d100f7e5d | [
"MIT"
] | 6 | 2018-08-26T04:52:21.000Z | 2018-09-07T05:26:41.000Z | repl/base/sink.py | 946336/The-Worst-REPL-You-ve-Ever-Seen | 971f316b4b93441527a880835938a91d100f7e5d | [
"MIT"
] | null | null | null |
import io
import os, sys
class Wiretap(io.StringIO):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.__concerned_parties = []
self.__silent = False
@property
def listeners(self):
return self.__concerned_parties
def join(self, party):
... | 22.324324 | 57 | 0.588378 |
730e4de35a13d3ffe735a13a381341180fa102c4 | 2,699 | py | Python | tests/test_interoperability.py | casabre/WrappedExchangeArray.py | 856ca456a59708122503f258e00c0baa46fe0832 | [
"MIT"
] | null | null | null | tests/test_interoperability.py | casabre/WrappedExchangeArray.py | 856ca456a59708122503f258e00c0baa46fe0832 | [
"MIT"
] | 1 | 2021-05-18T20:40:19.000Z | 2021-05-18T20:40:19.000Z | tests/test_interoperability.py | casabre/wea.py | 856ca456a59708122503f258e00c0baa46fe0832 | [
"MIT"
] | null | null | null | import unittest
from multiprocessing import shared_memory
import numpy as np
import logging
from numpy.core.defchararray import lower
import pytest
from parameterized import parameterized
from src.wea.shared_memory import SharedExchangeArray, create_shared_array, \
attach_shared_array
@pytest.fixture(scope="class... | 31.752941 | 79 | 0.624676 |
730e834031f6061d7a647d93f03ee9b77b9b9609 | 1,256 | py | Python | doc/conf.py | lemoncheesecake/lemoncheesecake-requests | 3439dbf341c3baf973e9b94fb19e5ff968fa9be9 | [
"Apache-2.0"
] | 2 | 2021-11-02T18:06:24.000Z | 2021-11-15T10:58:12.000Z | doc/conf.py | lemoncheesecake/lemoncheesecake-requests | 3439dbf341c3baf973e9b94fb19e5ff968fa9be9 | [
"Apache-2.0"
] | null | null | null | doc/conf.py | lemoncheesecake/lemoncheesecake-requests | 3439dbf341c3baf973e9b94fb19e5ff968fa9be9 | [
"Apache-2.0"
] | null | null | null | import sys
sys.path.append("..")
from lemoncheesecake_requests.__version__ import __version__
project = 'lemoncheesecake-requests'
copyright = '2021, Nicolas Delon'
author = 'Nicolas Delon'
version = __version__
release = __version__
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx"
]
autodoc_t... | 23.259259 | 79 | 0.676752 |
730e8bb7600f05401549b45d847acf33be246b22 | 574 | py | Python | (3)Algorithms/contextlib_decorator.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (3)Algorithms/contextlib_decorator.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | (3)Algorithms/contextlib_decorator.py | mass9/Python | 66499164e36a4fe9630029d34b292ab06f849b2f | [
"MIT"
] | null | null | null | import contextlib
class Context(contextlib.ContextDecorator):
def __init__(self,how_used):
self.how_used = how_used
print('__init__({})'.format(how_used))
def __enter__(self):
print('__enter__({})'.format(self.how_used))
return self
def __exit(self, exc_type,exc_val,exc_t... | 20.5 | 52 | 0.66899 |
730e9c10a735de3abbc8423de39873c11f31253c | 14,982 | py | Python | python/paddle/fluid/profiler.py | chuckwoody/Paddle | d8a94ee87cea8509e64d0dc46e302c824e2c819e | [
"Apache-2.0"
] | 1 | 2020-02-26T13:44:57.000Z | 2020-02-26T13:44:57.000Z | python/paddle/fluid/profiler.py | chuckwoody/Paddle | d8a94ee87cea8509e64d0dc46e302c824e2c819e | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/profiler.py | chuckwoody/Paddle | d8a94ee87cea8509e64d0dc46e302c824e2c819e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 PaddlePaddle 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 app... | 42.805714 | 182 | 0.610199 |
730eb3d2b41d1dc048874188ba39047d07cae5a6 | 11,174 | py | Python | bonneville/states/network.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/states/network.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | null | null | null | bonneville/states/network.py | lowsodium/bonneville | 02a016380b56345594f20ee007c62e7e92821a8b | [
"Apache-2.0"
] | 3 | 2020-05-10T02:08:44.000Z | 2020-11-06T11:01:57.000Z | # -*- coding: utf-8 -*-
'''
Configuration of network interfaces.
====================================
The network module is used to create and manage network settings,
interfaces can be set as either managed or ignored. By default
all interfaces are ignored unless specified.
Please note that only Redhat-style network... | 28.075377 | 91 | 0.511903 |
730ec4e49f9acf6f1f7c13c6668a1640f6e31a9a | 800 | py | Python | app/suorganizer/celery.py | yayunl/llfselfhelp | 55994003ad51e1664a733c84ed6afcb9f28b6499 | [
"MIT"
] | null | null | null | app/suorganizer/celery.py | yayunl/llfselfhelp | 55994003ad51e1664a733c84ed6afcb9f28b6499 | [
"MIT"
] | 4 | 2021-04-08T21:37:08.000Z | 2021-09-22T19:31:17.000Z | app/suorganizer/celery.py | yayunl/llfselfhelp | 55994003ad51e1664a733c84ed6afcb9f28b6499 | [
"MIT"
] | null | null | null | import os
from celery import Celery
from django.conf import settings
# set the default Django settings module for the 'celery' program.
if os.environ.get('ENV') == 'dev':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', "suorganizer.settings.dev")
else:
os.environ.setdefault('DJANGO_SETTINGS_MODULE', "suorgani... | 32 | 80 | 0.76375 |
730ee0663e4d627bafddabe3b7707dee33be2585 | 11,800 | py | Python | examples/eo3/eo3_assemble.py | opendatacube/datacube-zarr | 1c05a0c92d81b4235d75bbb01adcb2da9ae8013b | [
"Apache-2.0"
] | null | null | null | examples/eo3/eo3_assemble.py | opendatacube/datacube-zarr | 1c05a0c92d81b4235d75bbb01adcb2da9ae8013b | [
"Apache-2.0"
] | null | null | null | examples/eo3/eo3_assemble.py | opendatacube/datacube-zarr | 1c05a0c92d81b4235d75bbb01adcb2da9ae8013b | [
"Apache-2.0"
] | null | null | null | import os
import re
import uuid
import warnings
from collections import defaultdict
from pathlib import Path
from typing import Dict, List, Optional, Tuple
import rasterio
import yaml
from eodatasets3 import images, serialise, validate
from eodatasets3.images import MeasurementRecord
from eodatasets3.model import Acce... | 35.223881 | 97 | 0.613559 |
730ef2773bc914110d93009ad9bb241ced070221 | 1,518 | py | Python | data_formatting/get_data.py | wadpac/SleepStageClassification | 5b288995e62bbd66faa66bd932b06af8a65f8445 | [
"Apache-2.0"
] | 24 | 2019-04-15T09:18:51.000Z | 2022-03-05T14:09:34.000Z | data_formatting/get_data.py | wadpac/SleepStageClassification | 5b288995e62bbd66faa66bd932b06af8a65f8445 | [
"Apache-2.0"
] | 2 | 2021-01-28T01:02:06.000Z | 2021-04-02T06:34:04.000Z | data_formatting/get_data.py | wadpac/SleepStageClassification | 5b288995e62bbd66faa66bd932b06af8a65f8445 | [
"Apache-2.0"
] | 11 | 2019-05-30T19:27:39.000Z | 2021-06-19T02:41:53.000Z | import sys,os
import pandas as pd
import h5py
import numpy as np
def main(argv):
partition_file = argv[0]
feat_file = argv[1]
rawdata_file = argv[2]
outdir = argv[3]
partition_df = pd.read_csv(partition_file)
users = list(set(partition_df['user'].astype(str)))
fname = os.path.basename(partition_file)
... | 31.625 | 96 | 0.65415 |
730ef97c49781f64fd998198bb9ab6dd7c00b2b6 | 3,813 | py | Python | sumo/log/log.py | dslaborg/sumo | 1e9bfedaff201d4bd37b4889b6091cc4b9c8ad01 | [
"MIT"
] | 3 | 2022-02-03T22:54:14.000Z | 2022-03-31T09:59:02.000Z | sumo/log/log.py | dslaborg/sumo | 1e9bfedaff201d4bd37b4889b6091cc4b9c8ad01 | [
"MIT"
] | null | null | null | sumo/log/log.py | dslaborg/sumo | 1e9bfedaff201d4bd37b4889b6091cc4b9c8ad01 | [
"MIT"
] | null | null | null | import argparse
import logging
import os
import sys
from argparse import Namespace
from typing import Union, Dict, Optional
import torch
from pytorch_lightning.loggers import LightningLoggerBase
from pytorch_lightning.loggers.base import rank_zero_experiment
from pytorch_lightning.utilities import rank_zero_only
from... | 30.504 | 118 | 0.640703 |
730f4359b67e9ec0c4e6ae950830c03a9fbce57e | 417 | py | Python | setup.py | groutr/conda-tools | f421fd324f306a713c0cb1a3845306758ff981f4 | [
"BSD-3-Clause"
] | 11 | 2016-07-07T00:27:01.000Z | 2019-12-02T08:47:16.000Z | setup.py | groutr/conda-tools | f421fd324f306a713c0cb1a3845306758ff981f4 | [
"BSD-3-Clause"
] | 8 | 2016-07-15T14:59:27.000Z | 2019-07-03T18:05:34.000Z | setup.py | groutr/conda-tools | f421fd324f306a713c0cb1a3845306758ff981f4 | [
"BSD-3-Clause"
] | 2 | 2016-07-13T22:24:51.000Z | 2016-11-16T18:03:46.000Z | from setuptools import find_packages
from setuptools import setup
import os
import glob
setup(name='conda_tools',
version='0.1',
description='Useful abstractions of conda environments and package cache',
author='Ryan Grout',
author_email='ryan@ryangrout.org',
url='https://github.com/groutr/conda-t... | 24.529412 | 78 | 0.707434 |
730f568fbc5c3588683f20df493876098a39b932 | 5,124 | py | Python | holoviews/tests/plotting/bokeh/testlinks.py | garibarba/holoviews | f0a1afd9267a44b682303e48fa853498b6716101 | [
"BSD-3-Clause"
] | null | null | null | holoviews/tests/plotting/bokeh/testlinks.py | garibarba/holoviews | f0a1afd9267a44b682303e48fa853498b6716101 | [
"BSD-3-Clause"
] | null | null | null | holoviews/tests/plotting/bokeh/testlinks.py | garibarba/holoviews | f0a1afd9267a44b682303e48fa853498b6716101 | [
"BSD-3-Clause"
] | null | null | null | from unittest import SkipTest
import numpy as np
from holoviews.core.spaces import DynamicMap
from holoviews.element import Curve, Polygons, Table, Scatter, Path, Points
from holoviews.plotting.links import (Link, RangeToolLink, DataLink)
try:
from holoviews.plotting.bokeh.util import bokeh_version
from boke... | 40.03125 | 94 | 0.604215 |
730f908454577e790d2aad2b2bfa11e128c68458 | 900 | py | Python | jumpscale/packages/vdc_dashboard/chats/zeroci.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 13 | 2020-09-02T09:05:08.000Z | 2022-03-12T02:43:24.000Z | jumpscale/packages/vdc_dashboard/chats/zeroci.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 1,998 | 2020-06-15T11:46:10.000Z | 2022-03-24T22:12:41.000Z | jumpscale/packages/vdc_dashboard/chats/zeroci.py | threefoldtech/js-sdk | 811f783ac34a60225175bab2d806802a87b9d5c7 | [
"Apache-2.0"
] | 8 | 2020-09-29T06:50:35.000Z | 2021-06-14T03:30:52.000Z | from jumpscale.sals.chatflows.chatflows import chatflow_step
from jumpscale.packages.vdc_dashboard.sals.solutions_chatflow import SolutionsChatflowDeploy
class ZeroCIDeploy(SolutionsChatflowDeploy):
SOLUTION_TYPE = "zeroci"
title = "ZeroCI"
HELM_REPO_NAME = "marketplace"
steps = [
"init_chatfl... | 30 | 92 | 0.64 |
730fc77e0d8b28700e3353aeee3e82b03e981ab1 | 9,997 | py | Python | doc/jupyter_execute/examples/init_containers/custom_init_container.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | doc/jupyter_execute/examples/init_containers/custom_init_container.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | doc/jupyter_execute/examples/init_containers/custom_init_container.py | edshee/seldon-core | 78c10fbca16a5e2a0c25b9673aa3deb220070e26 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# # Custom Init Containers with rclone and MinIO
#
# In this tutorial we will deep dive into some of the interals of how Storage Initilizers are used by Prepackaged Model Servers.
#
# We will also write a custom Init Container that will use `rclone` to download model artifacts f... | 42.181435 | 1,561 | 0.693308 |
730fc9af4e3286f258f205e1feecd0521d642c80 | 6,817 | py | Python | core/storage/topic/gae_models_test.py | yashdusing/oppia | c0218e13ba29f9bc25cc5ec6f7f13108ee4fdb9a | [
"Apache-2.0"
] | 3 | 2021-06-26T09:45:19.000Z | 2021-11-17T11:11:39.000Z | core/storage/topic/gae_models_test.py | import-keshav/oppia | 899b9755a6b795a8991e596055ac24065a8435e0 | [
"Apache-2.0"
] | 4 | 2019-08-15T10:49:21.000Z | 2022-03-02T05:10:20.000Z | core/storage/topic/gae_models_test.py | grishamjindal/oppia | 3a29329a446e30b3b70641cf0286e23fad85418f | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
#
# Copyright 2018 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 38.083799 | 79 | 0.650433 |
730fdfbad7a8defb8ceb6f9994748add76c14deb | 943 | py | Python | configs/selfsup/simsiam_kd_test/simsiamkd_olmh_dimcollapse_checkall_resnet18_4xb64-coslr-200e_in10p5r.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | null | null | null | configs/selfsup/simsiam_kd_test/simsiamkd_olmh_dimcollapse_checkall_resnet18_4xb64-coslr-200e_in10p5r.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | null | null | null | configs/selfsup/simsiam_kd_test/simsiamkd_olmh_dimcollapse_checkall_resnet18_4xb64-coslr-200e_in10p5r.py | dungdinhanh/mmselfsup | 67fc764f4f5512701f93e8e1fa39e09ee008a54a | [
"Apache-2.0"
] | 1 | 2022-03-15T11:31:48.000Z | 2022-03-15T11:31:48.000Z | _base_ = [
'../_test_/models/resnet18_simsiam_kd_olmh_dimcollapse.py',
'../_test_/datasets/imagenet10p5r_mocov2_wori_b64_cluster.py',
'../_test_/schedules/sgd_coslr-200e_in30p_kd.py',
'../_test_/default_runtime.py',
]
# set base learning rate
lr = 0.05
# additional hooks
custom_hooks = [
dict(type... | 27.735294 | 98 | 0.748674 |
730fe59161d2f398f252fec0ca7b9fb81ea6a61e | 1,840 | py | Python | tests/core/test_core.py | jirikuncar/renku-jupyterlab-ts | 53f9d984a133593b67906abac5ccc503c655c4e1 | [
"BSD-3-Clause"
] | 4 | 2018-10-04T11:51:34.000Z | 2021-04-07T19:34:47.000Z | tests/core/test_core.py | jirikuncar/renku-jupyterlab-ts | 53f9d984a133593b67906abac5ccc503c655c4e1 | [
"BSD-3-Clause"
] | 27 | 2018-09-28T20:28:18.000Z | 2021-08-31T21:47:45.000Z | tests/core/test_core.py | SwissDataScienceCenter/renku-jupyterlab-ts | 53f9d984a133593b67906abac5ccc503c655c4e1 | [
"BSD-3-Clause"
] | 1 | 2018-09-27T17:34:34.000Z | 2018-09-27T17:34:34.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2021 Swiss Data Science Center (SDSC)
# A partnership between École Polytechnique Fédérale de Lausanne (EPFL) and
# Eidgenössische Technische Hochschule Zürich (ETHZ).
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complian... | 38.333333 | 102 | 0.732609 |
730fe65f0405597c9aca2a5e13cb8f6efa3d9d7b | 5,334 | py | Python | tensor2tensor/data_generators/speech_recognition.py | shankharaj29/tensor2tensor | b89ba51a6fa9e0c20009cfb57ee8de04f7138392 | [
"Apache-2.0"
] | 1 | 2019-02-16T10:39:45.000Z | 2019-02-16T10:39:45.000Z | tensor2tensor/data_generators/speech_recognition.py | PedroLelis/tensor2tensor | 5a867d031bd493eeb7d2776e1118d1594ff0a623 | [
"Apache-2.0"
] | null | null | null | tensor2tensor/data_generators/speech_recognition.py | PedroLelis/tensor2tensor | 5a867d031bd493eeb7d2776e1118d1594ff0a623 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 36.534247 | 80 | 0.706974 |
7310040f587e614dcb8cc34feb61edb00c9f41e2 | 1,987 | py | Python | bin/generate_plugins.py | thg-consulting/InspectorTiger | 0a32be5a6112dde0943cd8f4063a49c0e96a85c2 | [
"MIT"
] | 13 | 2020-04-08T17:39:35.000Z | 2021-10-05T10:58:26.000Z | bin/generate_plugins.py | thg-consulting/InspectorTiger | 0a32be5a6112dde0943cd8f4063a49c0e96a85c2 | [
"MIT"
] | 5 | 2020-06-12T17:30:09.000Z | 2021-09-16T18:42:30.000Z | bin/generate_plugins.py | thg-consulting/it | 0a32be5a6112dde0943cd8f4063a49c0e96a85c2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import argparse
from importlib import import_module
from itertools import chain
from pathlib import Path
from textwrap import dedent
import it.plugins
from it import Inspector
BASE = Path(it.plugins.__file__).parent
def generate():
parser = argparse.ArgumentParser()
parser.add_argument... | 30.569231 | 69 | 0.546049 |
731021a98af278334f66a202f5c8b895c0faba81 | 1,328 | py | Python | infra/tools/dockerbuild/wheel_infra.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | infra/tools/dockerbuild/wheel_infra.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | infra/tools/dockerbuild/wheel_infra.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2017 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.
import os
from . import source
from . import builder
from . import util
from .build_types import Spec, UniversalSpec
from .builder import Builder
class I... | 30.181818 | 79 | 0.666416 |
731027b147691e52d352548cde7877883c568c10 | 283 | py | Python | exams/urls.py | timptner/farafmb.de | 2b154278d8b44ea3adecafcb8554c1b0b0055e01 | [
"MIT"
] | null | null | null | exams/urls.py | timptner/farafmb.de | 2b154278d8b44ea3adecafcb8554c1b0b0055e01 | [
"MIT"
] | 1 | 2022-02-17T20:28:19.000Z | 2022-02-17T20:28:19.000Z | exams/urls.py | timptner/farafmb.de | 2b154278d8b44ea3adecafcb8554c1b0b0055e01 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
app_name = 'exams'
urlpatterns = [
path('', views.InfoView.as_view(), name='info'),
path('submit/', views.SubmitView.as_view(), name='submit'),
path('submit/done/', views.SubmitDoneView.as_view(), name='submit_done'),
]
| 25.727273 | 77 | 0.678445 |
731048dc37e306187927e55722760805138cdb1c | 5,259 | py | Python | pyglm/models/shared_tuningcurve_glm.py | slinderman/theano_pyglm | c7fc11069dfe91b0eb7c96b8464fcd0f57442952 | [
"MIT"
] | 37 | 2015-04-08T15:11:51.000Z | 2022-01-05T19:32:58.000Z | pyglm/models/shared_tuningcurve_glm.py | slinderman/theano_pyglm | c7fc11069dfe91b0eb7c96b8464fcd0f57442952 | [
"MIT"
] | 2 | 2016-03-08T02:39:58.000Z | 2017-03-29T08:51:08.000Z | pyglm/models/shared_tuningcurve_glm.py | slinderman/theano_pyglm | c7fc11069dfe91b0eb7c96b8464fcd0f57442952 | [
"MIT"
] | 10 | 2015-02-25T21:47:50.000Z | 2020-03-06T00:21:48.000Z | """
Simple GLM with two neurons connected by a complete network with Gaussian weights.
"""
import numpy as np
SharedTuningCurveGlm = \
{
# Number of neurons (parametric model!)
'N' : 2,
'latent' :
{
'sharedtuningcurves' :
{
'type' : 'latent_type_with_... | 29.379888 | 82 | 0.257273 |
7310743d480b8cefa255a3350d489656c0dda821 | 4,057 | py | Python | sdk/identity/azure-identity/tests/test_authn_client.py | OlhaTkachenko/azure-sdk-for-python | 0e43638457cc0c44d4a5e4a287fb4e53674b3231 | [
"MIT"
] | null | null | null | sdk/identity/azure-identity/tests/test_authn_client.py | OlhaTkachenko/azure-sdk-for-python | 0e43638457cc0c44d4a5e4a287fb4e53674b3231 | [
"MIT"
] | null | null | null | sdk/identity/azure-identity/tests/test_authn_client.py | OlhaTkachenko/azure-sdk-for-python | 0e43638457cc0c44d4a5e4a287fb4e53674b3231 | [
"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.
# -------------------------------------------------------------------------
import json... | 39.009615 | 116 | 0.676608 |
7310b25b551c9f20e71e5e63e872b84ec566bd68 | 4,279 | py | Python | examples/miners/daily_ohlc.py | TheSnoozer/LiuAlgoTrader | 5ad4e46db126698399d338c4488aa4983385c2d8 | [
"MIT"
] | null | null | null | examples/miners/daily_ohlc.py | TheSnoozer/LiuAlgoTrader | 5ad4e46db126698399d338c4488aa4983385c2d8 | [
"MIT"
] | null | null | null | examples/miners/daily_ohlc.py | TheSnoozer/LiuAlgoTrader | 5ad4e46db126698399d338c4488aa4983385c2d8 | [
"MIT"
] | null | null | null | import math
from datetime import date, timedelta
from typing import Dict, List, Optional
import alpaca_trade_api as tradeapi
from talib import MAMA
from liualgotrader.common import config
from liualgotrader.common.decorators import timeit
from liualgotrader.common.market_data import \
get_historical_data_from_pol... | 31.463235 | 78 | 0.553634 |
731130d0a0a323085d666a2ba4c126936ddcb171 | 787 | py | Python | run_logger.py | Addy771/VESC-logger | fd13dda8a58038ee7cf81417be4de22935a825a5 | [
"MIT"
] | null | null | null | run_logger.py | Addy771/VESC-logger | fd13dda8a58038ee7cf81417be4de22935a825a5 | [
"MIT"
] | null | null | null | run_logger.py | Addy771/VESC-logger | fd13dda8a58038ee7cf81417be4de22935a825a5 | [
"MIT"
] | null | null | null | # VESC Logger
# Connects to a VESC with USB and repeatedly logs VESC parameters
# Config
base_filename = "vesc_log" # base name used for log files
poll_interval = 100 # How often to get VESC values in milliseconds
target_port = "COM3" # Name of serial port that VESC will connect on
import serial
impo... | 20.710526 | 74 | 0.660737 |
73113fc854bc651af4f31a5310638942ff5611e2 | 8,471 | py | Python | ros_workspace/src/testBot/scripts/testBot_generate_stats.py | pepojs/Swarm_robots | c651c32b3aae5b3774c9fc21db3c8982afcff213 | [
"MIT"
] | null | null | null | ros_workspace/src/testBot/scripts/testBot_generate_stats.py | pepojs/Swarm_robots | c651c32b3aae5b3774c9fc21db3c8982afcff213 | [
"MIT"
] | null | null | null | ros_workspace/src/testBot/scripts/testBot_generate_stats.py | pepojs/Swarm_robots | c651c32b3aae5b3774c9fc21db3c8982afcff213 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
import enum
import math
import time
import json
import csv
import os
class Display:
def __init__(self, file_name, file_stats_name):
self.file_name = file_name
self.file_stats_name = file_stats_name
self.file_stats = open(self.file_stats_name, 'a')
sel... | 30.692029 | 143 | 0.536891 |
73114c5eceffd16ea09dc53c0ba0251a1a689304 | 134 | py | Python | tests/test_init.py | darelight/flask-perm | f8c1f48d7bb376e1bca83afecd973c4cdf923753 | [
"MIT"
] | 8 | 2016-09-11T14:40:44.000Z | 2022-03-01T16:55:33.000Z | tests/test_init.py | darelight/flask-perm | f8c1f48d7bb376e1bca83afecd973c4cdf923753 | [
"MIT"
] | 1 | 2021-07-28T14:25:02.000Z | 2021-07-29T07:17:25.000Z | tests/test_init.py | darelight/flask-perm | f8c1f48d7bb376e1bca83afecd973c4cdf923753 | [
"MIT"
] | 7 | 2016-08-10T07:56:26.000Z | 2022-01-11T09:14:00.000Z | # -*- coding: utf-8 -*-
import pytest
from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_perm.core import db
| 19.142857 | 39 | 0.776119 |
73115da855f175b0f9fc6189659a3a16b000ffca | 56 | py | Python | 0x0C-python-almost_a_circle/tests/test_models/__init__.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | 0x0C-python-almost_a_circle/tests/test_models/__init__.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | 0x0C-python-almost_a_circle/tests/test_models/__init__.py | oluwaseun-ebenezer/holbertonschool-higher_level_programming | e830f969d3ca71abf0a2f6d4f7c64a82337eccd7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""Tests for the polygon models."""
| 14 | 35 | 0.660714 |
73118ea70f9eb6efc7809b1d352eec356887d50b | 3,537 | py | Python | bcbio/ngsalign/bowtie2.py | matanhofree/bcbio-nextgen | e6938cedb20ff3b7632165105941d71189e46aac | [
"MIT"
] | 1 | 2015-04-08T17:43:39.000Z | 2015-04-08T17:43:39.000Z | bcbio/ngsalign/bowtie2.py | matanhofree/bcbio-nextgen | e6938cedb20ff3b7632165105941d71189e46aac | [
"MIT"
] | null | null | null | bcbio/ngsalign/bowtie2.py | matanhofree/bcbio-nextgen | e6938cedb20ff3b7632165105941d71189e46aac | [
"MIT"
] | null | null | null | """Next gen sequence alignments with Bowtie2.
http://bowtie-bio.sourceforge.net/bowtie2/index.shtml
"""
import os
from itertools import ifilter, imap
import pysam
import sys
from bcbio.pipeline import config_utils
from bcbio.utils import file_exists, compose
from bcbio.distributed.transaction import file_transaction
... | 35.019802 | 91 | 0.649138 |
7311ab0393f506b342bf93961714a30dde43d826 | 7,218 | py | Python | pyvib/newmark.py | pawsen/pyvib | 4215ced8921cf45cb903377a460f0d494b7a271e | [
"BSD-2-Clause"
] | 6 | 2019-05-14T15:42:39.000Z | 2021-11-29T13:20:49.000Z | pyvib/newmark.py | pawsen/pyvib | 4215ced8921cf45cb903377a460f0d494b7a271e | [
"BSD-2-Clause"
] | 1 | 2020-04-08T11:41:24.000Z | 2020-04-08T11:41:24.000Z | pyvib/newmark.py | pawsen/pyvib | 4215ced8921cf45cb903377a460f0d494b7a271e | [
"BSD-2-Clause"
] | 2 | 2020-12-03T23:30:45.000Z | 2022-01-11T04:32:27.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import numpy as np
from scipy import linalg
from scipy.linalg import norm, solve
from .nonlinear_elements_newmark import NLS
class Newmark():
"""Nonlinear Newmark solver class.
Input M,C,K and nonlin.
See :func:`newmark_beta_nl` and :class:`.nolinear_elem... | 30.200837 | 79 | 0.484206 |
7311e903c913e6e97ff42084ac9cd26e626ceb04 | 2,164 | py | Python | research/slim/datasets/dataset_factory.py | jianzhnie/models | 123ceb62baca18f4befc22b21af3439463b34220 | [
"Apache-2.0"
] | 2 | 2021-12-01T12:24:57.000Z | 2021-12-08T14:10:46.000Z | research/slim/datasets/dataset_factory.py | jianzhnie/models | 123ceb62baca18f4befc22b21af3439463b34220 | [
"Apache-2.0"
] | 1 | 2020-11-17T09:35:24.000Z | 2020-11-17T09:35:24.000Z | research/slim/datasets/dataset_factory.py | jianzhnie/models | 123ceb62baca18f4befc22b21af3439463b34220 | [
"Apache-2.0"
] | null | null | null | # 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... | 31.823529 | 87 | 0.704251 |
73120a6351335d1c083764864130cc4d764fab61 | 2,406 | py | Python | pandas_ta/trend/increasing.py | MyBourse/pandas-ta | 5998e92e39b71cd79a6e75d7c599492181af5f65 | [
"MIT"
] | 2 | 2021-03-30T01:23:14.000Z | 2021-04-02T18:04:51.000Z | pandas_ta/trend/increasing.py | lukaszbinden/pandas-ta | 98478f8bf049a4c8748d6f3c795f4f335ced05ca | [
"MIT"
] | null | null | null | pandas_ta/trend/increasing.py | lukaszbinden/pandas-ta | 98478f8bf049a4c8748d6f3c795f4f335ced05ca | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from pandas_ta.utils import get_offset, verify_series
def increasing(close, length=None, strict=None, asint=None, offset=None, **kwargs):
"""Indicator: Increasing"""
# Validate Arguments
close = verify_series(close)
length = int(length) if length and length > 0 else 1
stric... | 32.513514 | 243 | 0.672901 |
7312152c974df12e1c55d32eb657132f520cbf5e | 2,254 | py | Python | AlgorithmsPractice/python/98_medium_Validate Binary Search Tree.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 58 | 2019-03-03T04:42:23.000Z | 2022-01-13T04:36:31.000Z | AlgorithmsPractice/python/98_medium_Validate Binary Search Tree.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | null | null | null | AlgorithmsPractice/python/98_medium_Validate Binary Search Tree.py | YangXiaoo/NoteBook | 37056acad7a05b876832f72ac34d3d1a41e0dd22 | [
"CNRI-Python",
"RSA-MD",
"CECILL-B"
] | 28 | 2019-08-11T01:25:00.000Z | 2021-08-22T06:46:06.000Z | """
Given a binary tree, determine if it is a valid binary search tree (BST).
Assume a BST is defined as follows:
The left subtree of a node contains only nodes with keys less than the node's key.
The right subtree of a node contains only nodes with keys greater than the node's key.
Both the left and right subtrees m... | 23.726316 | 109 | 0.58252 |
73121b2b3974f42e062230d8910271db37174c03 | 342 | py | Python | data/tracking/sampler/_sampling_algos/sequence_sampling/common/_algo.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 143 | 2021-12-03T02:33:36.000Z | 2022-03-29T00:01:48.000Z | data/tracking/sampler/_sampling_algos/sequence_sampling/common/_algo.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 33 | 2021-12-03T10:32:05.000Z | 2022-03-31T02:13:55.000Z | data/tracking/sampler/_sampling_algos/sequence_sampling/common/_algo.py | zhangzhengde0225/SwinTrack | 526be17f8ef266cb924c6939bd8dda23e9b73249 | [
"MIT"
] | 24 | 2021-12-04T06:46:42.000Z | 2022-03-30T07:57:47.000Z | import numpy as np
from data.tracking.sampler._sampling_algos.stateless.random import sampling, sampling_with_mask
def sample_one_positive(length, mask, rng_engine: np.random.Generator):
if mask is None:
z_index = sampling(length, rng_engine)
else:
z_index = sampling_with_mask(mask, rng_engine... | 28.5 | 95 | 0.754386 |
73122defca8d0f48c18a02a6dac66fbd0e329e68 | 5,462 | py | Python | var/spack/repos/builtin/packages/vecgeom/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | var/spack/repos/builtin/packages/vecgeom/package.py | BenWibking/spack | 49b3b43a4a9375210b578635d9240875a5f3106b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | var/spack/repos/builtin/packages/vecgeom/package.py | joequant/spack | e028ee0d5903045e1cdeb57550cbff61f2ffb2fa | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Vecgeom(CMakePackage, CudaPackage):
"""The vectorized geometry library for particle-detec... | 46.288136 | 106 | 0.674478 |
731234bcc4ff1cf2a24510d50c52c3b392b4e6b8 | 830 | py | Python | ficheros/Ejer3_Troceador/unificador.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | ficheros/Ejer3_Troceador/unificador.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | ficheros/Ejer3_Troceador/unificador.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Escribe un programa troceador.py que pedirá un fichero de una imagen o una canción y la troceará en archivos más pequeños de 521 bytes.
El programa irá numerandolos archivos (trozo1, trozo2, etc) Un segundo programa tomará los archivos troceados y recompondrá el archivo original
'''
def ab... | 24.411765 | 143 | 0.692771 |
731261fa10355711a650024fe3548ebe7fb3bd66 | 377 | py | Python | prov/tests/test_graphs.py | krischer/prov | 26965dcc7147e4b37a5ae4ba327467c6429cb3d3 | [
"MIT"
] | null | null | null | prov/tests/test_graphs.py | krischer/prov | 26965dcc7147e4b37a5ae4ba327467c6429cb3d3 | [
"MIT"
] | null | null | null | prov/tests/test_graphs.py | krischer/prov | 26965dcc7147e4b37a5ae4ba327467c6429cb3d3 | [
"MIT"
] | null | null | null | from __future__ import (absolute_import, division, print_function,
unicode_literals)
import unittest
from prov.tests.examples import tests
from prov.graph import prov_to_graph
class ProvGraphTestCase(unittest.TestCase):
def test_simple_graph_conversion(self):
for name, doc_func in... | 29 | 66 | 0.729443 |
73127203be02379316b94844cccc0d2492c824fa | 3,373 | py | Python | tests/test_models.py | kun-fang/avro-data-model | 1a657e20e666b534d0196888ae580ad7caddadeb | [
"MIT"
] | 9 | 2019-03-28T16:31:33.000Z | 2022-02-18T03:22:50.000Z | tests/test_models.py | kun-fang/avro-data-model | 1a657e20e666b534d0196888ae580ad7caddadeb | [
"MIT"
] | 3 | 2019-06-17T17:09:38.000Z | 2021-05-14T03:06:00.000Z | tests/test_models.py | kun-fang/avro-data-model | 1a657e20e666b534d0196888ae580ad7caddadeb | [
"MIT"
] | 2 | 2019-04-11T18:26:52.000Z | 2022-02-18T03:22:52.000Z | from avro.schema import SchemaFromJSONData
import pytest
from unittest import mock
from avro_models import core
from avro_models import models
TEST_INT_SCHEMA = {
"name": "Int",
"type": "int"
}
TEST_RECORD_SCHEMA = {
"name": "TestRecord",
"type": "record",
"fields": [
{
"name... | 27.647541 | 81 | 0.698784 |
7312bd0d8269f9b7d1a9f40770a80a47e7f10a7a | 1,549 | py | Python | tests/test_kubernetes_protection.py | mccbryan3/falconpy | ec4d3a574f2e9b06d046fc8d7ca6818f1f97331f | [
"Unlicense"
] | null | null | null | tests/test_kubernetes_protection.py | mccbryan3/falconpy | ec4d3a574f2e9b06d046fc8d7ca6818f1f97331f | [
"Unlicense"
] | null | null | null | tests/test_kubernetes_protection.py | mccbryan3/falconpy | ec4d3a574f2e9b06d046fc8d7ca6818f1f97331f | [
"Unlicense"
] | null | null | null | # test_kubernetes_protection.py
# This class tests the Kubernetes_Protection service class
import os
import sys
# Authentication via the test_authorization.py
from tests import test_authorization as Authorization
# Import our sibling src folder into the path
sys.path.append(os.path.abspath('src'))
# Classes to test - ... | 36.880952 | 85 | 0.659781 |
7312c2191670a66475559897e07e0bdb4eb78b0f | 111 | py | Python | basic/input.py | sdyz5210/python | 78f9999f94d92d9ca7fde6f18acec7d3abd422ef | [
"BSD-3-Clause"
] | null | null | null | basic/input.py | sdyz5210/python | 78f9999f94d92d9ca7fde6f18acec7d3abd422ef | [
"BSD-3-Clause"
] | null | null | null | basic/input.py | sdyz5210/python | 78f9999f94d92d9ca7fde6f18acec7d3abd422ef | [
"BSD-3-Clause"
] | null | null | null | name = raw_input()
print 'my name is',name
name = raw_input('please enter your name:')
print 'my name is',name | 22.2 | 43 | 0.711712 |
7312c613db87a0a7eb16cdaad267ccf4d4338908 | 481 | py | Python | pngparser/chunks/bkgd.py | AlexGuo1998/png-parser | 4d75f17f158acd6e1f86117bde2a0c5bfceede76 | [
"MIT"
] | 58 | 2019-09-22T20:52:14.000Z | 2022-03-13T21:31:56.000Z | pngparser/chunks/bkgd.py | AlexGuo1998/png-parser | 4d75f17f158acd6e1f86117bde2a0c5bfceede76 | [
"MIT"
] | 4 | 2020-01-14T11:10:21.000Z | 2021-12-27T15:21:39.000Z | pngparser/chunks/bkgd.py | AlexGuo1998/png-parser | 4d75f17f158acd6e1f86117bde2a0c5bfceede76 | [
"MIT"
] | 7 | 2021-02-14T19:39:03.000Z | 2021-12-25T07:39:49.000Z | from ..color import Color
from ..chunktypes import CHUNK_LENGTH_SIZE
class ChunkBkgd:
def __init__(self, type_: bytes, data: bytes, crc: bytes) -> None:
self.type = type_
self.data = data
self.crc = crc
def to_bytes(self) -> bytes:
length = len(self.data).to_bytes(CHUNK_LENGTH... | 28.294118 | 70 | 0.632017 |
7312e2ed65901ae7be9cf94cfaa18e1d0ea20d4c | 760 | py | Python | alipay/aop/api/response/AlipayMarketingCampaignPrizepoolPrizeCreateResponse.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/response/AlipayMarketingCampaignPrizepoolPrizeCreateResponse.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/response/AlipayMarketingCampaignPrizepoolPrizeCreateResponse.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.response.AlipayResponse import AlipayResponse
class AlipayMarketingCampaignPrizepoolPrizeCreateResponse(AlipayResponse):
def __init__(self):
super(AlipayMarketingCampaignPrizepoolPrizeCreateResponse, self).__init__()
s... | 29.230769 | 124 | 0.731579 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.