hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | 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 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
80921e23cc31e76219e07a796509f7f2cead9036 | 3,218 | py | Python | wine-quality-prediction/extra code/support_plot.py | f-z/machine-learning-regression-project | 984fc6b779f4ddc1fa525a805d51ac76802e44d7 | [
"MIT"
] | 4 | 2020-11-08T20:04:14.000Z | 2021-09-11T17:19:35.000Z | wine-quality-prediction/extra code/support_plot.py | f-z/machine-learning-regression-project | 984fc6b779f4ddc1fa525a805d51ac76802e44d7 | [
"MIT"
] | null | null | null | wine-quality-prediction/extra code/support_plot.py | f-z/machine-learning-regression-project | 984fc6b779f4ddc1fa525a805d51ac76802e44d7 | [
"MIT"
] | 2 | 2020-02-10T19:35:53.000Z | 2020-11-18T17:22:28.000Z | import numpy as np
import matplotlib.pyplot as plt
from matplotlib.pyplot import cm
def plot_class_histograms(inputs, targets, bins=20, colors=None, ax=None):
"""
Plots histograms of 1d input data, split according to class
parameters
----------
inputs - 1d vector of input values (array-like)
t... | 36.568182 | 83 | 0.587943 |
9c0facc1f6e87d7c35f96af1c713dd54de9dd9bb | 1,773 | py | Python | vega/algorithms/nas/__init__.py | shaido987/vega | 14d5d49fb8bdf96bd1f3fcfac201ce6b6712c3b6 | [
"MIT"
] | 1 | 2021-05-08T07:47:44.000Z | 2021-05-08T07:47:44.000Z | vega/algorithms/nas/__init__.py | WholeG/vega | d1ccf1c3ce68a118bdb6775594ceed0f895911e7 | [
"MIT"
] | null | null | null | vega/algorithms/nas/__init__.py | WholeG/vega | d1ccf1c3ce68a118bdb6775594ceed0f895911e7 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the ... | 52.147059 | 114 | 0.720248 |
1948dde5290e2fd2027717f7b213043ccad3725d | 205 | py | Python | smarts-imitation/setup.py | zbzhu99/NGSIM_Imitation | 0af6ce327e4fc4da32eddb08ba0bba5403dac24e | [
"MIT"
] | 3 | 2022-01-28T01:33:04.000Z | 2022-02-21T13:43:43.000Z | smarts-imitation/setup.py | zbzhu99/NGSIM_GAIL | 0af6ce327e4fc4da32eddb08ba0bba5403dac24e | [
"MIT"
] | null | null | null | smarts-imitation/setup.py | zbzhu99/NGSIM_GAIL | 0af6ce327e4fc4da32eddb08ba0bba5403dac24e | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name="smarts_imitation",
version="0.1",
install_requires=["gym", "smarts", "opencv-python"],
packages=["smarts_imitation", "smarts_imitation.utils"],
)
| 22.777778 | 60 | 0.687805 |
c318b29d592eb29845ae738f294fbc99ef687a8b | 5,154 | py | Python | docs/conf.py | nameko/nameko-salesforce | 83d3a8c83b84545a1b9d280946c2e1d2f5ebac40 | [
"Apache-2.0"
] | 9 | 2019-03-01T11:26:42.000Z | 2021-02-07T15:35:28.000Z | docs/conf.py | Overseas-Student-Living/nameko-salesforce | d04130cdb8e7391616d77a5576b17dc5dca862ac | [
"Apache-2.0"
] | 4 | 2017-07-10T03:53:14.000Z | 2018-08-07T21:00:01.000Z | docs/conf.py | nameko/nameko-salesforce | 83d3a8c83b84545a1b9d280946c2e1d2f5ebac40 | [
"Apache-2.0"
] | 2 | 2021-03-18T07:29:34.000Z | 2021-12-29T11:00:39.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Nameko Salesforce documentation build configuration file, created by
# sphinx-quickstart on Wed Jun 7 22:48:11 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in... | 30.678571 | 79 | 0.688785 |
08bf49e4ca1891b29ae6c2ada243e59415c1c56a | 2,345 | py | Python | main.py | AresCyber/Alexander | a76a0f8779db5c84c2b0f8257bf1b1e6deb8e7e8 | [
"MIT"
] | null | null | null | main.py | AresCyber/Alexander | a76a0f8779db5c84c2b0f8257bf1b1e6deb8e7e8 | [
"MIT"
] | null | null | null | main.py | AresCyber/Alexander | a76a0f8779db5c84c2b0f8257bf1b1e6deb8e7e8 | [
"MIT"
] | null | null | null | from facerec import start_fr
from mms import sendalert
from augustlock import SmartLock
from mot import motion
from soundrl import backdoor,playsound,voicepass
def main():
while 1==1:
mot = motion()
granted = 0
if mot == 1:
playsound("Welcome, please present yo... | 33.028169 | 144 | 0.437527 |
36edbc2e716b360e7be811c411ceabaaf770405a | 265 | py | Python | fastreid/modeling/heads/__init__.py | NTU-ROSE/fast-reid | f4551a128ba17ef201301ccf3c986edae014cabd | [
"Apache-2.0"
] | 2,194 | 2020-04-06T01:37:56.000Z | 2022-03-30T22:17:28.000Z | fastreid/modeling/heads/__init__.py | NTU-ROSE/fast-reid | f4551a128ba17ef201301ccf3c986edae014cabd | [
"Apache-2.0"
] | 542 | 2020-04-14T08:00:05.000Z | 2022-03-29T07:39:40.000Z | fastreid/modeling/heads/__init__.py | NTU-ROSE/fast-reid | f4551a128ba17ef201301ccf3c986edae014cabd | [
"Apache-2.0"
] | 667 | 2020-04-08T02:06:03.000Z | 2022-03-29T00:57:32.000Z | # encoding: utf-8
"""
@author: liaoxingyu
@contact: sherlockliao01@gmail.com
"""
from .build import REID_HEADS_REGISTRY, build_heads
# import all the meta_arch, so they will be registered
from .embedding_head import EmbeddingHead
from .clas_head import ClasHead
| 22.083333 | 54 | 0.788679 |
386ed354c5928e86f3dc63dd66d84dbcdf7e6e6b | 1,559 | py | Python | tf_keras_demo/demo04.py | AlfaRomeo27/gcn | 552fb1862ea50bb383041661aea9e2643ac268f3 | [
"MIT"
] | null | null | null | tf_keras_demo/demo04.py | AlfaRomeo27/gcn | 552fb1862ea50bb383041661aea9e2643ac268f3 | [
"MIT"
] | null | null | null | tf_keras_demo/demo04.py | AlfaRomeo27/gcn | 552fb1862ea50bb383041661aea9e2643ac268f3 | [
"MIT"
] | null | null | null | import numpy as np
from tensorflow import keras
Sequential = keras.models.Sequential
Dense = keras.layers.Dense
Dropout = keras.layers.Dropout
Flatten = keras.layers.Flatten
Conv2D = keras.layers.Conv2D
MaxPooling2D = keras.layers.MaxPooling2D
SGD = keras.optimizers.SGD
BN = keras.layers.BatchNormalization
# Generate... | 34.644444 | 90 | 0.740218 |
e7e8a31d4399c18d3c488f2c5ef2c96e0e320652 | 2,213 | py | Python | src/compas_ags/ui/Rhino/AGS/dev/AGS__init_cmd.py | franaudo/ags | ea7c51427eb80da31f7bed896ef5ccc7d56da1bb | [
"MIT"
] | null | null | null | src/compas_ags/ui/Rhino/AGS/dev/AGS__init_cmd.py | franaudo/ags | ea7c51427eb80da31f7bed896ef5ccc7d56da1bb | [
"MIT"
] | null | null | null | src/compas_ags/ui/Rhino/AGS/dev/AGS__init_cmd.py | franaudo/ags | ea7c51427eb80da31f7bed896ef5ccc7d56da1bb | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import os
import errno
import shelve
import scriptcontext as sc
import compas
import compas_rhino
from compas.rpc import Proxy
from compas_ags.rhino import Scene
from compas_ags.rhino import Browser
from com... | 24.865169 | 114 | 0.605513 |
429ff093ebca0b242d74d0b76045836d3b90d53b | 4,695 | py | Python | hacking/checks/localization.py | disktnk/fhacking | bad09585e3037a3719a1a624c67eb81670569adc | [
"Apache-2.0"
] | 187 | 2015-01-10T16:17:20.000Z | 2019-04-14T11:45:25.000Z | venv/lib/python3.5/site-packages/hacking/checks/localization.py | pd-Shah/FlaskRecycle | 54060aa5c0eacefc0874ea01cbe6545000b416e0 | [
"MIT"
] | 4 | 2015-09-16T16:16:41.000Z | 2015-10-15T16:26:41.000Z | hacking/checks/localization.py | disktnk/fhacking | bad09585e3037a3719a1a624c67eb81670569adc | [
"Apache-2.0"
] | 48 | 2015-02-10T19:23:09.000Z | 2019-01-18T06:13:25.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed u... | 33.06338 | 76 | 0.50607 |
65d53a1af58f506fed021e1cc6e7687a09a5b5df | 35,185 | py | Python | python_modules/dagster/dagster_tests/core_tests/definitions_tests/decorators_tests/test_schedule.py | asamoal/dagster | 08fad28e4b608608ce090ce2e8a52c2cf9dd1b64 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/core_tests/definitions_tests/decorators_tests/test_schedule.py | asamoal/dagster | 08fad28e4b608608ce090ce2e8a52c2cf9dd1b64 | [
"Apache-2.0"
] | null | null | null | python_modules/dagster/dagster_tests/core_tests/definitions_tests/decorators_tests/test_schedule.py | asamoal/dagster | 08fad28e4b608608ce090ce2e8a52c2cf9dd1b64 | [
"Apache-2.0"
] | null | null | null | import inspect
import json
import re
from datetime import datetime, time
import pendulum
import pytest
from dateutil.relativedelta import relativedelta
from dagster import (
DagsterInvalidDefinitionError,
RunRequest,
ScheduleDefinition,
build_schedule_context,
daily_schedule,
hourly_schedule,
... | 33.864293 | 105 | 0.661901 |
85b0059ba57d31e9aa9bdf993466a039ace1149c | 7,170 | py | Python | configs/trainval/daotad/3.a.iv.py | klauscc/vedatad | c59f5ddc8fb227ef08baccbb513948bb1bb23857 | [
"Apache-2.0"
] | null | null | null | configs/trainval/daotad/3.a.iv.py | klauscc/vedatad | c59f5ddc8fb227ef08baccbb513948bb1bb23857 | [
"Apache-2.0"
] | null | null | null | configs/trainval/daotad/3.a.iv.py | klauscc/vedatad | c59f5ddc8fb227ef08baccbb513948bb1bb23857 | [
"Apache-2.0"
] | null | null | null | # 1. data
dataset_type = "Thumos14Dataset"
data_root = "data/thumos14/"
img_norm_cfg = dict(
mean=[123.675, 116.28, 103.53], std=[58.395, 57.12, 57.375], to_rgb=True
)
num_frames = 480
chunk_size = 32
img_shape = (112, 112)
overlap_ratio = 0.25
keep_ratio = 0.4
feat_downsample = 2
expid = "3.a.iv"
data = dict(
... | 28.91129 | 109 | 0.572943 |
0239b00d3f63f61d99ed99fa76df09cead637de8 | 4,411 | py | Python | venv/lib/python3.8/site-packages/validation/tests/test_float.py | julio9246/hg-poker-api | 56805601bc26bf8bb80e05235ae22a59a174af09 | [
"Apache-2.0"
] | 9 | 2017-12-01T21:31:12.000Z | 2019-08-30T15:36:41.000Z | venv/lib/python3.8/site-packages/validation/tests/test_float.py | julio9246/hg-poker-api | 56805601bc26bf8bb80e05235ae22a59a174af09 | [
"Apache-2.0"
] | 41 | 2017-09-06T15:18:06.000Z | 2022-01-03T23:10:54.000Z | venv/lib/python3.8/site-packages/validation/tests/test_float.py | julio9246/hg-poker-api | 56805601bc26bf8bb80e05235ae22a59a174af09 | [
"Apache-2.0"
] | 4 | 2019-01-02T21:17:38.000Z | 2021-01-25T10:48:01.000Z | import unittest
import math
from validation import validate_float
class ValidateFloatTestCase(unittest.TestCase):
def test_valid(self): # type: () -> None
validate_float(1.0)
validate_float(math.pi)
def test_int(self):
with self.assertRaises(TypeError):
validate_float(1)... | 34.193798 | 77 | 0.625935 |
a194001835321b7dedb0e7bcc49e1a9c5ad62bb4 | 2,564 | py | Python | Capwatch/CapwatchConfig.py | slackcc/capwatch | 83b5cb68b63fc918b5ae37763f82c2e1aa64c21b | [
"MIT"
] | null | null | null | Capwatch/CapwatchConfig.py | slackcc/capwatch | 83b5cb68b63fc918b5ae37763f82c2e1aa64c21b | [
"MIT"
] | null | null | null | Capwatch/CapwatchConfig.py | slackcc/capwatch | 83b5cb68b63fc918b5ae37763f82c2e1aa64c21b | [
"MIT"
] | null | null | null | import os
import json
import logging
from pathlib import Path
# Logger
log = logging.getLogger(__name__)
log.setLevel(os.environ.get("LOGLEVEL", "INFO"))
class CapwatchConfig(object):
def __init__(self, config_file=f"{Path.home()}/.capwatch/config.json"):
"""[summary]
Keyword Arguments:
... | 26.708333 | 101 | 0.553822 |
bc52b4935f524131491f05d7131f566541a44fbd | 120 | py | Python | forge/core/__init__.py | AndresMWeber/Forge | 90b2958a2a40d37b52232091bea9c3ddbd88566b | [
"MIT"
] | 1 | 2021-08-17T02:36:06.000Z | 2021-08-17T02:36:06.000Z | forge/core/__init__.py | AndresMWeber/Forge | 90b2958a2a40d37b52232091bea9c3ddbd88566b | [
"MIT"
] | 1 | 2017-06-12T04:32:54.000Z | 2017-06-12T04:32:54.000Z | forge/core/__init__.py | AndresMWeber/Forge | 90b2958a2a40d37b52232091bea9c3ddbd88566b | [
"MIT"
] | 1 | 2017-06-12T05:47:21.000Z | 2017-06-12T05:47:21.000Z | import core_utils
import channels
import colors
# import nodes
__all__ = ['colors', 'channels', 'core_utils', 'nodes']
| 17.142857 | 55 | 0.741667 |
2720696e79e825020077e03b5a3a254a36dd5f80 | 4,421 | py | Python | python/oneflow/compatible/single_client/test/ops/test_prelu.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 3,285 | 2020-07-31T05:51:22.000Z | 2022-03-31T15:20:16.000Z | python/oneflow/compatible/single_client/test/ops/test_prelu.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 2,417 | 2020-07-31T06:28:58.000Z | 2022-03-31T23:04:14.000Z | python/oneflow/compatible/single_client/test/ops/test_prelu.py | wangyuyue/oneflow | 0a71c22fe8355392acc8dc0e301589faee4c4832 | [
"Apache-2.0"
] | 520 | 2020-07-31T05:52:42.000Z | 2022-03-29T02:38:11.000Z | """
Copyright 2020 The OneFlow 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 applicable law or agr... | 37.786325 | 84 | 0.652567 |
d7ac7951edc71f063e1d7b9979e276954245583c | 265 | py | Python | data_analysis/test_moving_avg.py | seismicshaker/2018_agu_workshop | c4b5ff0d21e5cc3b86fabf8b4e331ce2b5c264a1 | [
"MIT"
] | null | null | null | data_analysis/test_moving_avg.py | seismicshaker/2018_agu_workshop | c4b5ff0d21e5cc3b86fabf8b4e331ce2b5c264a1 | [
"MIT"
] | null | null | null | data_analysis/test_moving_avg.py | seismicshaker/2018_agu_workshop | c4b5ff0d21e5cc3b86fabf8b4e331ce2b5c264a1 | [
"MIT"
] | null | null | null | import numpy as np
from .data_analysis import moving_average
#Define test for moving_avgerage
def test_moving_avg():
a = moving_average(np.ones(10),4)
assert np.all(np.isnan(a[:2]))
assert np.all(np.isnan(a[-2:]))
assert np.allclose(a[4:-4], 1)
| 20.384615 | 41 | 0.686792 |
32781eea9a2df8ecf709ad3179bcd7a62eaa78fe | 5,724 | py | Python | global_analysis.py | AnetaKaczynska/ProtoPNet | 7de2aa57833586ccfd8e63dc835c8cc9db727a2f | [
"MIT"
] | 1 | 2021-03-20T13:57:03.000Z | 2021-03-20T13:57:03.000Z | global_analysis.py | AnetaKaczynska/ProtoPNet | 7de2aa57833586ccfd8e63dc835c8cc9db727a2f | [
"MIT"
] | null | null | null | global_analysis.py | AnetaKaczynska/ProtoPNet | 7de2aa57833586ccfd8e63dc835c8cc9db727a2f | [
"MIT"
] | null | null | null | import argparse
import os
import re
import cv2
import matplotlib.pyplot as plt
import numpy as np
import torch.utils.data
import torchvision.datasets as datasets
import torchvision.transforms as transforms
import find_nearest
from helpers import makedir
from preprocess import preprocess_input_function
# Usage: pytho... | 41.478261 | 110 | 0.649196 |
1e8321ed0169da912928c264974f1476ef2760f8 | 970 | py | Python | core/mocks/typing.py | Kayuii/trezor-crypto | 6556616681a4e2d7e18817e8692d4f6e041dee01 | [
"MIT"
] | null | null | null | core/mocks/typing.py | Kayuii/trezor-crypto | 6556616681a4e2d7e18817e8692d4f6e041dee01 | [
"MIT"
] | 1 | 2019-02-08T00:22:42.000Z | 2019-02-13T09:41:54.000Z | core/mocks/typing.py | Kayuii/trezor-crypto | 6556616681a4e2d7e18817e8692d4f6e041dee01 | [
"MIT"
] | 2 | 2019-02-07T23:57:09.000Z | 2020-10-21T07:07:27.000Z | __names_get = [
'AbstractSet',
'AsyncIterable',
'AsyncIterator',
'Awaitable',
'ByteString',
'Callable',
'Container',
'DefaultDict',
'Dict',
'Generator',
'Generic',
'ItemsView',
'Iterable',
'Iterator',
'KeysView',
'List',
'Mapping',
'MappingView',
... | 13.857143 | 33 | 0.558763 |
a959cbb438e80e8ff0551a911cb3c5a181290d3a | 506 | py | Python | imblearn/over_sampling/__init__.py | cdchushig/imbalanced-learn | f02e7c7c2c021c85823cace405ca2c58ad4ff147 | [
"MIT"
] | 5,678 | 2016-07-19T10:22:35.000Z | 2022-03-31T22:46:41.000Z | imblearn/over_sampling/__init__.py | cdchushig/imbalanced-learn | f02e7c7c2c021c85823cace405ca2c58ad4ff147 | [
"MIT"
] | 759 | 2016-07-19T05:41:59.000Z | 2022-03-28T11:00:10.000Z | imblearn/over_sampling/__init__.py | cdchushig/imbalanced-learn | f02e7c7c2c021c85823cace405ca2c58ad4ff147 | [
"MIT"
] | 1,165 | 2016-07-19T22:56:42.000Z | 2022-03-31T22:46:45.000Z | """
The :mod:`imblearn.over_sampling` provides a set of method to
perform over-sampling.
"""
from ._adasyn import ADASYN
from ._random_over_sampler import RandomOverSampler
from ._smote import SMOTE
from ._smote import BorderlineSMOTE
from ._smote import KMeansSMOTE
from ._smote import SVMSMOTE
from ._smote import SMO... | 20.24 | 61 | 0.727273 |
a4ed9718d0672ff0d83b10c83457ba40ec00853d | 1,364 | py | Python | analyis_plot.py | aki2020/DataAnalysis | 079c3bd8c2efadff26faf126d09d7b90d3d96a5b | [
"MIT"
] | null | null | null | analyis_plot.py | aki2020/DataAnalysis | 079c3bd8c2efadff26faf126d09d7b90d3d96a5b | [
"MIT"
] | null | null | null | analyis_plot.py | aki2020/DataAnalysis | 079c3bd8c2efadff26faf126d09d7b90d3d96a5b | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# load data
file='data_sheet.xlsx'
data= pd.ExcelFile(file)
print(data.sheet_names)
# create data frame from data
df_col = data.parse('RD0557_ARC6_404_R3C4@lam940nm')
df_diffuser = data.parse('Diffuser_(RD0479_Jul20_OB6@940')
df_fanout = data.par... | 24.357143 | 60 | 0.741202 |
10875af914f503762eed0155d1d02cf11b2caa10 | 700 | py | Python | alipay/aop/api/response/AlipayOpenSpImageUploadResponse.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/AlipayOpenSpImageUploadResponse.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/AlipayOpenSpImageUploadResponse.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 AlipayOpenSpImageUploadResponse(AlipayResponse):
def __init__(self):
super(AlipayOpenSpImageUploadResponse, self).__init__()
self._image_id = None
@property
... | 26.923077 | 104 | 0.708571 |
9f1d56a5b81f228bb0aff7d6c954b35d7245171f | 2,909 | py | Python | core/domain/image_validation_services_test.py | yash10019coder/oppia | 8c349c61ac723a2fd507046b20957934cba70e3a | [
"Apache-2.0"
] | 2 | 2022-03-27T23:15:17.000Z | 2022-03-27T23:15:32.000Z | core/domain/image_validation_services_test.py | yash10019coder/oppia | 8c349c61ac723a2fd507046b20957934cba70e3a | [
"Apache-2.0"
] | null | null | null | core/domain/image_validation_services_test.py | yash10019coder/oppia | 8c349c61ac723a2fd507046b20957934cba70e3a | [
"Apache-2.0"
] | 2 | 2022-03-22T16:57:32.000Z | 2022-03-24T17:38:42.000Z | # Copyright 2020 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 required by applicable ... | 38.276316 | 80 | 0.676521 |
b07fd2223da8b16ffc8011f4443c2ac1d05c30a8 | 33,076 | py | Python | powerlaw.py | parkus/ffd | 3f1cc45af2d2ac0e0deac4c8922d74167908a2ab | [
"MIT"
] | 3 | 2019-01-09T13:50:16.000Z | 2020-10-07T17:51:15.000Z | powerlaw.py | parkus/ffd | 3f1cc45af2d2ac0e0deac4c8922d74167908a2ab | [
"MIT"
] | null | null | null | powerlaw.py | parkus/ffd | 3f1cc45af2d2ac0e0deac4c8922d74167908a2ab | [
"MIT"
] | 1 | 2020-03-09T16:09:11.000Z | 2020-03-09T16:09:11.000Z | from __future__ import division, print_function, absolute_import
from matplotlib import pyplot as plt
import numpy as np
import emcee
from scipy.optimize import minimize
from scipy.special import gammaln
from warnings import warn
from scipy.stats import kstest, pareto
from scipy.interpolate import interpn
import os
fr... | 36.956425 | 129 | 0.593058 |
7090259cb788ef2d91918f900e99a6399772d620 | 4,083 | py | Python | appqos/tests/test_caps.py | rjablonx/intel-cmt-cat | b127e2636608260dbd8547fa8444331981b1f636 | [
"BSD-3-Clause"
] | 1 | 2019-04-25T23:21:50.000Z | 2019-04-25T23:21:50.000Z | appqos/tests/test_caps.py | rjablonx/intel-cmt-cat | b127e2636608260dbd8547fa8444331981b1f636 | [
"BSD-3-Clause"
] | null | null | null | appqos/tests/test_caps.py | rjablonx/intel-cmt-cat | b127e2636608260dbd8547fa8444331981b1f636 | [
"BSD-3-Clause"
] | null | null | null | ################################################################################
# BSD LICENSE
#
# Copyright(c) 2019-2020 Intel Corporation. All rights reserved.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following condit... | 45.876404 | 136 | 0.747979 |
e1c5f955334dfba8befa4e9033bf33b83c2d8175 | 2,441 | py | Python | Code/Example_GraphSummarization.py | SHAFNehal/EAGL-GS | 467af6c614812fa3a46451d1ed414c10c4ca7996 | [
"MIT"
] | null | null | null | Code/Example_GraphSummarization.py | SHAFNehal/EAGL-GS | 467af6c614812fa3a46451d1ed414c10c4ca7996 | [
"MIT"
] | null | null | null | Code/Example_GraphSummarization.py | SHAFNehal/EAGL-GS | 467af6c614812fa3a46451d1ed414c10c4ca7996 | [
"MIT"
] | 1 | 2021-08-22T02:51:49.000Z | 2021-08-22T02:51:49.000Z | """
Created on Sun Jul 08 05:03:01 2018
@Project Title: Learning and Summarizing Graphical Models using Eigen Analysis of Graph Laplacian: An Application in Analysis of Multiple Chronic Conditions
@Project: EAGL (Simplification Based Graph Summarization)
@author: Syed Hasib AKhter Faruqui
"""
print('############... | 36.984848 | 158 | 0.602622 |
37072930fffc6e66cff88063fffe5a39124b87c3 | 397 | py | Python | src/python_project_template/python_version_printer.py | m0ga0/python-project-template | 20be6b4fc7e815557382aa477ef3f9fff37776eb | [
"MIT"
] | null | null | null | src/python_project_template/python_version_printer.py | m0ga0/python-project-template | 20be6b4fc7e815557382aa477ef3f9fff37776eb | [
"MIT"
] | null | null | null | src/python_project_template/python_version_printer.py | m0ga0/python-project-template | 20be6b4fc7e815557382aa477ef3f9fff37776eb | [
"MIT"
] | null | null | null | import sys
def print_python_version():
# This print statement uses Python 3.8 syntax
# tox will fail when trying to run this against Python 3.7
print(f"{sys.version=}")
# Comment out the above print statement and uncomment the following
# print statement to make tox pass for both Python 3.7 and P... | 26.466667 | 73 | 0.715365 |
e1a39ebde4e6069d7f1cd434ed1557603a41cda8 | 9,662 | py | Python | thumblelog/myproject/lib/python3.5/site-packages/flask_mongoengine/operation_tracker.py | HiroIshikawa/21playground | a203301d8fc4879ce817a3a879b8f2200710744c | [
"MIT"
] | 2 | 2016-04-03T06:30:45.000Z | 2017-05-22T08:36:54.000Z | thumblelog/myproject/lib/python3.5/site-packages/flask_mongoengine/operation_tracker.py | HiroIshikawa/21playground | a203301d8fc4879ce817a3a879b8f2200710744c | [
"MIT"
] | null | null | null | thumblelog/myproject/lib/python3.5/site-packages/flask_mongoengine/operation_tracker.py | HiroIshikawa/21playground | a203301d8fc4879ce817a3a879b8f2200710744c | [
"MIT"
] | null | null | null | import functools
import time
import inspect
import copy
import sys
import os
try:
import SocketServer
except ImportError:
import socketserver as SocketServer
import pymongo
import pymongo.collection
import pymongo.cursor
import pymongo.helpers
from bson import SON
__all__ = ['queries', 'inserts', 'updates',... | 30.479495 | 80 | 0.627406 |
78811cfefc92970f0594aea36d5ca6acc133bfd5 | 15,108 | py | Python | wilson/wcxf/converters/dsixtools.py | wilson-eft/wilson | 1686d08487881fe692f9d3c69b90dbcc16ba44c8 | [
"MIT"
] | 24 | 2018-04-16T15:01:39.000Z | 2022-01-26T07:16:22.000Z | wilson/wcxf/converters/dsixtools.py | wilson-eft/wilson | 1686d08487881fe692f9d3c69b90dbcc16ba44c8 | [
"MIT"
] | 85 | 2018-04-27T08:17:00.000Z | 2022-02-22T16:47:14.000Z | wilson/wcxf/converters/dsixtools.py | wilson-eft/wilson | 1686d08487881fe692f9d3c69b90dbcc16ba44c8 | [
"MIT"
] | 17 | 2018-04-27T07:59:35.000Z | 2022-02-09T22:46:05.000Z | import numpy as np
from collections import OrderedDict, defaultdict
import pylha
import json
import yaml
from math import sqrt
import ckmutil
from wilson.util import smeftutil
from . import dsixtools_definitions as definitions
import wilson
def load(stream, fmt='lha'):
"""Load a parameter file in DSixTools SLHA-l... | 39.862797 | 115 | 0.563145 |
e116e78196503a721c395b32b8d1d6b21cdc97e3 | 556 | pyde | Python | Processing/Section 9/Task_9_1/Task_9_1.pyde | Grigory526/2019-fall-polytech-cs | 1e87472fa128f6d69a3b99118e04ce4cce9ac70a | [
"MIT"
] | 1 | 2019-09-16T19:30:49.000Z | 2019-09-16T19:30:49.000Z | Processing/Section 9/Task_9_1/Task_9_1.pyde | Grigory526/2019-fall-polytech-cs | 1e87472fa128f6d69a3b99118e04ce4cce9ac70a | [
"MIT"
] | null | null | null | Processing/Section 9/Task_9_1/Task_9_1.pyde | Grigory526/2019-fall-polytech-cs | 1e87472fa128f6d69a3b99118e04ce4cce9ac70a | [
"MIT"
] | null | null | null | xCoordinate = [1,2,3,4,5,6,7,8,9,10]
def setup():
size(500,500)
smooth()
noStroke()
for i in range(len(xCoordinate)):
xCoordinate[i] = 35*i + 90
def draw():
background(50)
for i in range (len(xCoordinate)):
fill(200,40)
ellipse(xCoordinate[i], 250, 15*i, 15*i)
... | 24.173913 | 60 | 0.555755 |
059caaa5d59aaf7bae0ef6b0b23ab09cc0a7a540 | 562 | py | Python | eventstore_grpc/projections/result.py | jmshnds/eventstore_grpc | cf6a5978bcdf5bb725a569b7373ce15ee4babb25 | [
"MIT"
] | 6 | 2021-02-04T15:48:28.000Z | 2021-12-26T03:04:26.000Z | eventstore_grpc/projections/result.py | jmshnds/eventstore_grpc | cf6a5978bcdf5bb725a569b7373ce15ee4babb25 | [
"MIT"
] | 1 | 2021-04-14T00:06:25.000Z | 2021-04-14T07:28:34.000Z | eventstore_grpc/projections/result.py | jmshnds/eventstore_grpc | cf6a5978bcdf5bb725a569b7373ce15ee4babb25 | [
"MIT"
] | 1 | 2021-04-14T17:22:54.000Z | 2021-04-14T17:22:54.000Z | """Get projection results."""
from eventstore_grpc.proto import projections_pb2, projections_pb2_grpc
def get_projection_result(
stub: projections_pb2_grpc.ProjectionsStub, name: str, from_partition: str = None, **kwargs
) -> projections_pb2.ResultResp:
"""Gets a projection result."""
request = projectio... | 33.058824 | 95 | 0.743772 |
43ab49c5fd0180179224a5728568fdd2bd16e7b1 | 942 | py | Python | ftpd.py | Shaun289/pyftpdblackhole | bc6b223b6593ee058e4b8f63b64586d0dbb78a05 | [
"MIT"
] | null | null | null | ftpd.py | Shaun289/pyftpdblackhole | bc6b223b6593ee058e4b8f63b64586d0dbb78a05 | [
"MIT"
] | null | null | null | ftpd.py | Shaun289/pyftpdblackhole | bc6b223b6593ee058e4b8f63b64586d0dbb78a05 | [
"MIT"
] | null | null | null | import os
import sys
import tempfile
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer
from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.filesystems import UnixFilesystem
def on_file_received(handler, file):
print('remove file:'+file)
os.remove(file)
def main(po... | 28.545455 | 79 | 0.70913 |
00301b7dc2cdfefde8e17b9f630fb064214e27db | 123 | py | Python | dipy/io/tests/__init__.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | 8 | 2019-05-29T09:38:30.000Z | 2021-01-20T03:36:59.000Z | dipy/io/tests/__init__.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | 12 | 2021-03-09T03:01:16.000Z | 2022-03-11T23:59:36.000Z | dipy/io/tests/__init__.py | martcous/dipy | 6bff5655f03db19bde5aa951ffb91987983a889b | [
"MIT"
] | 2 | 2018-07-24T21:20:54.000Z | 2018-08-27T04:08:24.000Z | # init to allow relative imports in tests
# Test callable
from numpy.testing import Tester
test = Tester().test
del Tester
| 20.5 | 41 | 0.780488 |
71f5fe8c521d5560c6c031286d5276b5822e3385 | 63 | py | Python | terra/compute/__init__.py | NoahRJohnson/terra | 131954ee42fb5905ceff35101e34d89c5eb6de6c | [
"MIT"
] | null | null | null | terra/compute/__init__.py | NoahRJohnson/terra | 131954ee42fb5905ceff35101e34d89c5eb6de6c | [
"MIT"
] | 38 | 2019-10-17T18:47:56.000Z | 2021-12-07T16:17:44.000Z | terra/compute/__init__.py | NoahRJohnson/terra | 131954ee42fb5905ceff35101e34d89c5eb6de6c | [
"MIT"
] | 2 | 2019-10-08T22:00:50.000Z | 2019-10-23T18:59:24.000Z | from terra.compute.utils import compute
__all__ = ['compute']
| 15.75 | 39 | 0.761905 |
3912b4b0982c4430ec3ec46dd93b7d9b28aeb745 | 3,643 | py | Python | utils/pred_utils.py | sriharshav/instr | e864d37280c2db236529934bb0f62b8b7ed7488a | [
"MIT"
] | null | null | null | utils/pred_utils.py | sriharshav/instr | e864d37280c2db236529934bb0f62b8b7ed7488a | [
"MIT"
] | null | null | null | utils/pred_utils.py | sriharshav/instr | e864d37280c2db236529934bb0f62b8b7ed7488a | [
"MIT"
] | null | null | null | """
Various prediction utilities.
"""
import numpy as np
import os
import torch
from PIL import Image
import torchvision.transforms.functional as ttf
import yaml
from yacs.config import CfgNode
import cv2
from model.instr import INSTR
from utils.colormap import get_spaced_colors
YCB_OBJECTS = [
'003_cracker_box'... | 27.598485 | 93 | 0.632171 |
3bd9a921167239115bb9302a59e60a6f2a16f8d0 | 15,999 | py | Python | tests/contrib/mysql/test_mysql.py | mbmblbelt/dd-trace-py | 906fb7fa91d0ed59d263df74e14aacc8b2d70251 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/contrib/mysql/test_mysql.py | mbmblbelt/dd-trace-py | 906fb7fa91d0ed59d263df74e14aacc8b2d70251 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | tests/contrib/mysql/test_mysql.py | mbmblbelt/dd-trace-py | 906fb7fa91d0ed59d263df74e14aacc8b2d70251 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | import mysql
from ddtrace import Pin
from ddtrace.constants import ANALYTICS_SAMPLE_RATE_KEY
from ddtrace.contrib.mysql.patch import patch
from ddtrace.contrib.mysql.patch import unpatch
from tests.contrib.config import MYSQL_CONFIG
from tests.opentracer.utils import init_tracer
from ... import TracerTestCase
from ..... | 32.65102 | 101 | 0.546472 |
56856837e4fec961b57f7bb1f80e956d630c85ae | 1,452 | py | Python | pipeline/variable_framework/migrations/0001_initial.py | springborland/bk-sops | a9057672c10efb5f2414a805a30ead4092429c76 | [
"Apache-2.0"
] | 1 | 2021-05-19T04:31:34.000Z | 2021-05-19T04:31:34.000Z | pipeline/variable_framework/migrations/0001_initial.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | pipeline/variable_framework/migrations/0001_initial.py | ZhuoZhuoCrayon/bk-sops | d1475d53c19729915727ce7adc24e3226f15e332 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tencent is pleased to support the open source community by making 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community
Edition) available.
Copyright (C) 2017-2020 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in co... | 41.485714 | 115 | 0.703857 |
ba647ea36b83fe0571ce88251507a38bc9c22d14 | 920 | py | Python | Main/migrations/0080_auto_20210508_1352.py | Muhammet-Yildiz/Ecommerce_Website-HepsiOrada | 91935014ccc37e0ea57c8cbd2c4891941dcbb917 | [
"MIT"
] | 10 | 2021-06-01T19:30:00.000Z | 2021-06-28T16:16:20.000Z | Main/migrations/0080_auto_20210508_1352.py | Muhammet-Yildiz/HepsiOrada | 91935014ccc37e0ea57c8cbd2c4891941dcbb917 | [
"MIT"
] | null | null | null | Main/migrations/0080_auto_20210508_1352.py | Muhammet-Yildiz/HepsiOrada | 91935014ccc37e0ea57c8cbd2c4891941dcbb917 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.4 on 2021-05-08 10:52
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('Main', '0079_auto_20210507_2258'),
]
operations ... | 29.677419 | 122 | 0.630435 |
ad9a9b01cbf43de0a143601480b77f674ba05887 | 4,835 | py | Python | optimizers.py | Alienvlg/style_transfer | 9ec69db05a2522da7e4c88b2a50d8392e2b2e958 | [
"MIT"
] | 122 | 2016-09-02T09:25:58.000Z | 2022-02-28T04:13:36.000Z | optimizers.py | Alienvlg/style_transfer | 9ec69db05a2522da7e4c88b2a50d8392e2b2e958 | [
"MIT"
] | 23 | 2016-09-02T09:23:12.000Z | 2019-12-29T01:07:22.000Z | optimizers.py | Alienvlg/style_transfer | 9ec69db05a2522da7e4c88b2a50d8392e2b2e958 | [
"MIT"
] | 21 | 2016-09-16T19:20:40.000Z | 2022-01-31T13:30:23.000Z | """A module for function minimization."""
# pylint: disable=too-many-arguments, too-many-instance-attributes
from average import EWMA
import numpy as np
from num_utils import saxpy, BILINEAR, sdot, EPS, resize, roll2
class AdamOptimizer:
"""Implements the Adam gradient descent optimizer [4] with iterate averag... | 34.784173 | 93 | 0.576008 |
52f56014ae05431e6021f75e21040998717c82b4 | 726 | py | Python | Actuators/Notification/Main.py | lauracorssac/HOSA | 15b50c87a074c741b6fa19dbd29e9a2515719b8c | [
"MIT"
] | 1 | 2021-03-03T21:58:07.000Z | 2021-03-03T21:58:07.000Z | Actuators/Notification/Main.py | lauracorssac/HOSA | 15b50c87a074c741b6fa19dbd29e9a2515719b8c | [
"MIT"
] | null | null | null | Actuators/Notification/Main.py | lauracorssac/HOSA | 15b50c87a074c741b6fa19dbd29e9a2515719b8c | [
"MIT"
] | null | null | null | from http.server import HTTPServer, BaseHTTPRequestHandler
from mbp_client import MBPclient
from ImageUploader import ImageUploader
from PersonRecStatusFileManager import PersonRecStatusFileManager
from NotificationManager import NotificationManager
from ServerMQTTMessageManager import ServerMQTTMessageManager
import ... | 30.25 | 65 | 0.804408 |
8b0922563e8eb064e579c9da93a3fb95f57ae922 | 5,326 | py | Python | run_ssd512.py | zylo117/ssd_keras | fcbbb3ee1380516248b7c0ac736b64cc036cf0a5 | [
"Apache-2.0"
] | null | null | null | run_ssd512.py | zylo117/ssd_keras | fcbbb3ee1380516248b7c0ac736b64cc036cf0a5 | [
"Apache-2.0"
] | null | null | null | run_ssd512.py | zylo117/ssd_keras | fcbbb3ee1380516248b7c0ac736b64cc036cf0a5 | [
"Apache-2.0"
] | 3 | 2018-11-12T09:30:01.000Z | 2020-11-19T01:38:33.000Z | import cv2
import os
import matplotlib
matplotlib.use('TkAgg')
from keras import backend as K
from keras.models import load_model
from keras.preprocessing import image
from keras.optimizers import Adam
from imageio import imread
import numpy as np
import tensorflow as tf
import matplotlib
from matplotlib im... | 38.875912 | 120 | 0.640068 |
ada9c1547ee7c48aa3a592d38f95e7ee901cd283 | 581 | py | Python | setup.py | alephdata/countrytagger | 49b9bf948a02b6caf638df4adae50787baf9b22d | [
"MIT"
] | 4 | 2020-02-05T15:55:22.000Z | 2021-12-01T16:19:19.000Z | setup.py | alephdata/countrytagger | 49b9bf948a02b6caf638df4adae50787baf9b22d | [
"MIT"
] | 1 | 2020-09-25T01:14:42.000Z | 2020-09-28T01:16:04.000Z | setup.py | alephdata/countrytagger | 49b9bf948a02b6caf638df4adae50787baf9b22d | [
"MIT"
] | 2 | 2020-08-15T19:30:56.000Z | 2021-12-19T10:22:58.000Z | from setuptools import setup
with open('README.md') as f:
long_description = f.read()
setup(
name='countrytagger',
version='0.1.2',
description="Tag the names of countries and in text.",
url='https://github.com/alephdata/countrytagger',
author='OCCRP',
long_description=long_description,
... | 25.26087 | 58 | 0.660929 |
221378fe69a49d5cf02203e5b42271bf4736802d | 227 | py | Python | pybso/__init__.py | gegedenice/pybso | b1aa5624732a53c2544934bbbd6a89af9e0db5e9 | [
"MIT"
] | null | null | null | pybso/__init__.py | gegedenice/pybso | b1aa5624732a53c2544934bbbd6a89af9e0db5e9 | [
"MIT"
] | null | null | null | pybso/__init__.py | gegedenice/pybso | b1aa5624732a53c2544934bbbd6a89af9e0db5e9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This package automates the harvesting and graphic formatting of data
related to the opening of a set of publications identified by their doi.
"""
__version__ = "1.1.0" | 28.375 | 76 | 0.69163 |
4711a9dc3b5c6dbfe83a56da25fbeff217a4722a | 380 | py | Python | 2nd/core/others/read_sld.py | keitaroskmt/cpuex2020_1 | 33cdc033a6184286232f4ce7729030708213b6f8 | [
"BSD-3-Clause-Attribution",
"FSFAP"
] | null | null | null | 2nd/core/others/read_sld.py | keitaroskmt/cpuex2020_1 | 33cdc033a6184286232f4ce7729030708213b6f8 | [
"BSD-3-Clause-Attribution",
"FSFAP"
] | null | null | null | 2nd/core/others/read_sld.py | keitaroskmt/cpuex2020_1 | 33cdc033a6184286232f4ce7729030708213b6f8 | [
"BSD-3-Clause-Attribution",
"FSFAP"
] | 3 | 2020-10-08T04:16:58.000Z | 2021-10-11T13:19:30.000Z | file1 = open('windows/contest.ppm','r')
Lines = file1.readlines()
count = 0
for line in Lines:
a, b, c = line.split()
count += 6
A = int(a)
B = int(b)
C = int(c)
while A/10 >= 1 :
count += 1
A /= 10
while B/10 >= 1 :
count += 1
B /= 10
while ... | 18.095238 | 39 | 0.428947 |
8833fec6388cc6694aaddcaf3ceb8a3f2332b8bc | 2,712 | py | Python | dict.py | Sl-Sanda-Ru/Sinhala-Dict | 295eaa3060cd862c635e4ab9f18ad873d16cd623 | [
"Apache-2.0"
] | 2 | 2021-04-15T07:46:42.000Z | 2021-04-15T07:46:50.000Z | dict.py | Sl-Sanda-Ru/Sinhala-Dict | 295eaa3060cd862c635e4ab9f18ad873d16cd623 | [
"Apache-2.0"
] | null | null | null | dict.py | Sl-Sanda-Ru/Sinhala-Dict | 295eaa3060cd862c635e4ab9f18ad873d16cd623 | [
"Apache-2.0"
] | 1 | 2022-03-30T09:46:45.000Z | 2022-03-30T09:46:45.000Z | from time import sleep
from os import system,get_terminal_size,name
system('git stash && git pull')
clear = 'clear' if name == 'posix' else 'cls'
try:
from colorama import init,Fore
from bs4 import BeautifulSoup as bsp
from pyfiglet import Figlet
from requests import get
except ModuleNotFoundError:
system('pip3 in... | 27.393939 | 91 | 0.66556 |
21be1885a37e0e458373cfae5198823d307541c5 | 3,382 | py | Python | students/migrations/0008_auto_20180111_1101.py | Ostap1807/django-studentsdb | 5f1ed823c6254e066668883149d00a4012a12580 | [
"MIT"
] | null | null | null | students/migrations/0008_auto_20180111_1101.py | Ostap1807/django-studentsdb | 5f1ed823c6254e066668883149d00a4012a12580 | [
"MIT"
] | 1 | 2017-12-13T16:26:58.000Z | 2017-12-13T16:26:58.000Z | students/migrations/0008_auto_20180111_1101.py | Ostap1807/django-studentsdb | 5f1ed823c6254e066668883149d00a4012a12580 | [
"MIT"
] | 1 | 2019-09-24T13:08:17.000Z | 2019-09-24T13:08:17.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('students', '0007_remove_exam_result_group'),
]
operations = [
migrations.CreateModel(
... | 49.735294 | 136 | 0.599054 |
df9c7cc772e5118de0a6d0dfff87ac949fe94ddd | 2,748 | py | Python | instaclone/migrations/0001_initial.py | sharonmaswai/Instagram_Clone | c49d32dde712fd377cf866f1f371edc8e336fbfa | [
"Unlicense"
] | null | null | null | instaclone/migrations/0001_initial.py | sharonmaswai/Instagram_Clone | c49d32dde712fd377cf866f1f371edc8e336fbfa | [
"Unlicense"
] | 4 | 2020-06-05T21:32:12.000Z | 2021-09-08T01:06:04.000Z | instaclone/migrations/0001_initial.py | sharonmaswai/Instagram_Clone | c49d32dde712fd377cf866f1f371edc8e336fbfa | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.8 on 2019-06-25 11:22
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import tinymce.models
class Migration(migrations.Migration):
initial = True
dependencie... | 41.014925 | 140 | 0.597889 |
57d5cc7c6b25aa754a92d5e93871749c9936779a | 15,479 | py | Python | mindspore/nn/wrap/cell_wrapper.py | peng-zhihui/mindspore | 4e0bc761b228cece8b24a280f15b0915959071dc | [
"Apache-2.0"
] | 55 | 2020-12-17T10:26:06.000Z | 2022-03-28T07:18:26.000Z | mindspore/nn/wrap/cell_wrapper.py | 77zmf/mindspore | 4e0bc761b228cece8b24a280f15b0915959071dc | [
"Apache-2.0"
] | null | null | null | mindspore/nn/wrap/cell_wrapper.py | 77zmf/mindspore | 4e0bc761b228cece8b24a280f15b0915959071dc | [
"Apache-2.0"
] | 14 | 2021-01-29T02:39:47.000Z | 2022-03-23T05:00:26.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 34.551339 | 119 | 0.643646 |
5e18ca1f406550ea0c701d5ec20187802835adad | 85 | py | Python | src/fr/tagc/rainet/core/util/sql/Base.py | TAGC-Brun/RAINET-RNA | 4d5a6658c41d4ab28d7c3d168eed65fe79233b48 | [
"Linux-OpenIB"
] | null | null | null | src/fr/tagc/rainet/core/util/sql/Base.py | TAGC-Brun/RAINET-RNA | 4d5a6658c41d4ab28d7c3d168eed65fe79233b48 | [
"Linux-OpenIB"
] | null | null | null | src/fr/tagc/rainet/core/util/sql/Base.py | TAGC-Brun/RAINET-RNA | 4d5a6658c41d4ab28d7c3d168eed65fe79233b48 | [
"Linux-OpenIB"
] | null | null | null | from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
| 14.166667 | 55 | 0.823529 |
5b11d45381bd207ebce71873a664342130184959 | 6,393 | py | Python | superset/utils/log.py | amitmiran137/incubator-superset | 8593a13f00754973117beb0a95e7aca7fec4b00e | [
"Apache-2.0"
] | 1 | 2021-02-01T00:18:23.000Z | 2021-02-01T00:18:23.000Z | superset/utils/log.py | amitmiran137/incubator-superset | 8593a13f00754973117beb0a95e7aca7fec4b00e | [
"Apache-2.0"
] | 4 | 2021-03-02T01:53:30.000Z | 2021-10-06T22:56:01.000Z | superset/utils/log.py | amitmiran137/incubator-superset | 8593a13f00754973117beb0a95e7aca7fec4b00e | [
"Apache-2.0"
] | 2 | 2020-02-12T17:41:15.000Z | 2020-09-03T21:50:45.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... | 35.516667 | 88 | 0.62193 |
f42530788d32de356c4d662de8526714429c9719 | 665 | py | Python | release/stubs.min/Rhino/DocObjects/__init___parts/RhinoObjectSelectionEventArgs.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 182 | 2017-06-27T02:26:15.000Z | 2022-03-30T18:53:43.000Z | release/stubs.min/Rhino/DocObjects/__init___parts/RhinoObjectSelectionEventArgs.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 28 | 2017-06-27T13:38:23.000Z | 2022-03-15T11:19:44.000Z | release/stubs.min/Rhino/DocObjects/__init___parts/RhinoObjectSelectionEventArgs.py | htlcnn/ironpython-stubs | 780d829e2104b2789d5f4d6f32b0ec9f2930ca03 | [
"MIT"
] | 67 | 2017-06-28T09:43:59.000Z | 2022-03-20T21:17:10.000Z | class RhinoObjectSelectionEventArgs(EventArgs):
# no doc
Document=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: Document(self: RhinoObjectSelectionEventArgs) -> RhinoDoc
"""
RhinoObjects=property(lambda self: object(),lambda self,v: None,lambda self: None)
"""Get: Rhin... | 21.451613 | 84 | 0.711278 |
cf1ebc4478d68b0c7fdf504f540d7ba0138ec3b9 | 670 | py | Python | services/customers/app/tests/test_models.py | rafaeltardivo/micro-order | 310e4b10d0f2dee24d2e36b544c25dc1c062d6d6 | [
"MIT"
] | 1 | 2020-05-04T23:09:06.000Z | 2020-05-04T23:09:06.000Z | services/customers/app/tests/test_models.py | rafaeltardivo/micro-order | 310e4b10d0f2dee24d2e36b544c25dc1c062d6d6 | [
"MIT"
] | 5 | 2020-06-05T23:58:35.000Z | 2021-06-04T23:13:46.000Z | services/customers/app/tests/test_models.py | rafaeltardivo/micro-order | 310e4b10d0f2dee24d2e36b544c25dc1c062d6d6 | [
"MIT"
] | null | null | null | from app.models import Customer
from django.test import TestCase
from .factories import CustomerFactory
class CustomersModelTestCase(TestCase):
"""Test cases for Customer model."""
def setUp(self):
self.customer = CustomerFactory()
def test_create(self):
self.assertIsInstance(self.custo... | 24.814815 | 75 | 0.647761 |
7ee54d57b7f39980d3ea9830d34c4e83368085e3 | 3,277 | py | Python | doc/examples/plot_glcm.py | neurodebian/scikits.image-1 | 33206f87c5e0208e7ff0d5910ac082b3353fe04e | [
"BSD-3-Clause"
] | 3 | 2017-12-15T01:37:10.000Z | 2021-07-23T09:26:48.000Z | doc/examples/plot_glcm.py | neurodebian/scikits.image-1 | 33206f87c5e0208e7ff0d5910ac082b3353fe04e | [
"BSD-3-Clause"
] | null | null | null | doc/examples/plot_glcm.py | neurodebian/scikits.image-1 | 33206f87c5e0208e7ff0d5910ac082b3353fe04e | [
"BSD-3-Clause"
] | 1 | 2015-01-14T07:05:05.000Z | 2015-01-14T07:05:05.000Z | """
=====================
GLCM Texture Features
=====================
This example illustrates texture classification using texture
classification using grey level co-occurrence matrices (GLCMs).
A GLCM is a histogram of co-occurring greyscale values at a given
offset over an image.
In this example, samples of two di... | 33.783505 | 74 | 0.685078 |
07660b75b1ac0c9618fc014634da649f94d4cb8e | 1,627 | py | Python | setup.py | gxw815lyl/django-cms-1 | 1cb4b24453345d5dd9cbd4f8c2bc0ede39dd8d5a | [
"BSD-3-Clause"
] | 1 | 2020-04-09T19:53:43.000Z | 2020-04-09T19:53:43.000Z | setup.py | gxw815lyl/django-cms-1 | 1cb4b24453345d5dd9cbd4f8c2bc0ede39dd8d5a | [
"BSD-3-Clause"
] | 1 | 2019-04-19T13:16:41.000Z | 2019-04-19T13:16:41.000Z | setup.py | gxw815lyl/django-cms-1 | 1cb4b24453345d5dd9cbd4f8c2bc0ede39dd8d5a | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
import os
import cms
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independ... | 30.698113 | 88 | 0.647203 |
13de57995ce15b63f8322ba493d3a855996a73b0 | 2,141 | py | Python | src/reviews/context.py | kaka-lin/pycon.tw | 67809a5e43b03273ac8d8f5a1b6b3d3f73474be7 | [
"MIT"
] | 47 | 2015-12-19T10:23:11.000Z | 2018-06-13T08:07:33.000Z | src/reviews/context.py | kaka-lin/pycon.tw | 67809a5e43b03273ac8d8f5a1b6b3d3f73474be7 | [
"MIT"
] | 473 | 2018-12-01T13:01:48.000Z | 2022-03-30T07:10:42.000Z | src/reviews/context.py | kaka-lin/pycon.tw | 67809a5e43b03273ac8d8f5a1b6b3d3f73474be7 | [
"MIT"
] | 91 | 2018-07-26T02:38:59.000Z | 2022-01-16T02:38:31.000Z | from datetime import datetime
from collections import namedtuple
from django.conf import settings
from django.utils import timezone
from registry.helper import reg
# This code is located here, but not in context_processor
# because this is not intended to be processed at every page
# preparing these requires databa... | 31.955224 | 84 | 0.630079 |
77e8618c48245129776d99c98806af85db4a5442 | 146 | py | Python | pinax/messages/__init__.py | ICSGrade/ics-pinax-messages | 30afa2cad9cd5b1fcaa2c8a6bc3f748cef313d38 | [
"MIT"
] | 171 | 2015-11-19T16:09:55.000Z | 2022-03-01T18:32:20.000Z | pinax/messages/__init__.py | ICSGrade/ics-pinax-messages | 30afa2cad9cd5b1fcaa2c8a6bc3f748cef313d38 | [
"MIT"
] | 47 | 2015-10-21T17:33:10.000Z | 2022-01-21T18:38:19.000Z | pinax/messages/__init__.py | ICSGrade/ics-pinax-messages | 30afa2cad9cd5b1fcaa2c8a6bc3f748cef313d38 | [
"MIT"
] | 59 | 2016-01-27T17:42:20.000Z | 2022-01-22T01:58:39.000Z | import pkg_resources
default_app_config = "pinax.messages.apps.AppConfig"
__version__ = pkg_resources.get_distribution("pinax-messages").version
| 29.2 | 70 | 0.842466 |
4764f69479f9c3991946dcb2389783208e5c9bf6 | 11,496 | py | Python | sphinx/builders/linkcheck.py | mikiec84/sphinx | 061a4647c946e54deb160f3a0acb0848b03f0008 | [
"BSD-2-Clause"
] | null | null | null | sphinx/builders/linkcheck.py | mikiec84/sphinx | 061a4647c946e54deb160f3a0acb0848b03f0008 | [
"BSD-2-Clause"
] | null | null | null | sphinx/builders/linkcheck.py | mikiec84/sphinx | 061a4647c946e54deb160f3a0acb0848b03f0008 | [
"BSD-2-Clause"
] | 1 | 2018-11-29T06:45:05.000Z | 2018-11-29T06:45:05.000Z | # -*- coding: utf-8 -*-
"""
sphinx.builders.linkcheck
~~~~~~~~~~~~~~~~~~~~~~~~~
The CheckExternalLinksBuilder class.
:copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import socket
import codecs
import threading
from os import p... | 36.728435 | 87 | 0.553236 |
98dff36d6320c99c4b0aab0c108ed7a1c371f4a8 | 834 | py | Python | app/chat/migrations/0001_initial.py | dukuaris/justchat | cb892abfbac98b1623e02ea7db5f05d36fd65bae | [
"MIT"
] | null | null | null | app/chat/migrations/0001_initial.py | dukuaris/justchat | cb892abfbac98b1623e02ea7db5f05d36fd65bae | [
"MIT"
] | 6 | 2021-03-19T02:50:11.000Z | 2021-09-22T18:57:37.000Z | app/chat/migrations/0001_initial.py | dukuaris/justchat | cb892abfbac98b1623e02ea7db5f05d36fd65bae | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-05-04 01:01
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 30.888889 | 152 | 0.641487 |
b1832d0ec254ec967f4f2fb04deaa39d5802e794 | 1,374 | py | Python | egs/librispeech/ASR/pruned_transducer_stateless4/test_model.py | zhu-han/icefall | 9f6c748b3098e3e32c704c27c40ec31f2e9d376c | [
"Apache-2.0"
] | null | null | null | egs/librispeech/ASR/pruned_transducer_stateless4/test_model.py | zhu-han/icefall | 9f6c748b3098e3e32c704c27c40ec31f2e9d376c | [
"Apache-2.0"
] | 1 | 2021-11-28T07:19:28.000Z | 2021-11-28T07:19:28.000Z | egs/librispeech/ASR/pruned_transducer_stateless4/test_model.py | wgb14/icefall | ec5a112831b54471daa82ddb956112b88128577a | [
"Apache-2.0"
] | 1 | 2021-12-28T08:03:58.000Z | 2021-12-28T08:03:58.000Z | #!/usr/bin/env python3
# Copyright 2022 Xiaomi Corp. (authors: Fangjun Kuang)
#
# See ../../../../LICENSE for clarification regarding multiple 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... | 26.941176 | 74 | 0.716157 |
e530bf92a391f1ba36f3d84882344453eb2923ad | 1,150 | py | Python | students/k3342/laboratory_works/Shaidullina_Regina/laboratory_work_1/leaderboard/migrations/0002_comment.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 10 | 2020-03-20T09:06:12.000Z | 2021-07-27T13:06:02.000Z | students/k3342/laboratory_works/Shaidullina_Regina/laboratory_work_1/leaderboard/migrations/0002_comment.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 134 | 2020-03-23T09:47:48.000Z | 2022-03-12T01:05:19.000Z | students/k3342/laboratory_works/Shaidullina_Regina/laboratory_work_1/leaderboard/migrations/0002_comment.py | TonikX/ITMO_ICT_-WebProgramming_2020 | ba566c1b3ab04585665c69860b713741906935a0 | [
"MIT"
] | 71 | 2020-03-20T12:45:56.000Z | 2021-10-31T19:22:25.000Z | # Generated by Django 3.0.4 on 2020-04-18 16:33
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('leaderboard', '0001_init... | 37.096774 | 152 | 0.603478 |
a853287c89c0b856cb8b4ec2d094463abe468278 | 2,305 | py | Python | rcl_ntp_server/scripts_main.py | Ar-Ray-code/rcl-sync-ntp-server | f9149d8796c760d3e5ae8d0f460f3a31703dd98b | [
"Apache-2.0"
] | null | null | null | rcl_ntp_server/scripts_main.py | Ar-Ray-code/rcl-sync-ntp-server | f9149d8796c760d3e5ae8d0f460f3a31703dd98b | [
"Apache-2.0"
] | null | null | null | rcl_ntp_server/scripts_main.py | Ar-Ray-code/rcl-sync-ntp-server | f9149d8796c760d3e5ae8d0f460f3a31703dd98b | [
"Apache-2.0"
] | null | null | null | #!/bin/python3
import tkinter as tk
import rclpy
from rclpy.node import Node
from std_msgs.msg import UInt32
import ipaddress
import netifaces as ni
import psutil
import os
import socket
# from rclpy.qos import QoSProfile, QoSHistoryPolicy
class Application(tk.Frame):
def __init__(self, master=None):
se... | 28.109756 | 102 | 0.5718 |
ff6c87f50aedaab007469b90ea0ea3b65082c0c5 | 1,272 | py | Python | tutorials/classification/visualise.py | YipengHu/MPHY0041 | 6e9706eba2b9f9a2449539d7dea5f91dde807584 | [
"Apache-2.0"
] | 1 | 2022-02-21T23:05:49.000Z | 2022-02-21T23:05:49.000Z | tutorials/classification/visualise.py | YipengHu/MPHY0041 | 6e9706eba2b9f9a2449539d7dea5f91dde807584 | [
"Apache-2.0"
] | 2 | 2022-01-07T11:43:06.000Z | 2022-03-17T02:11:58.000Z | tutorials/classification/visualise.py | YipengHu/MPHY0041 | 6e9706eba2b9f9a2449539d7dea5f91dde807584 | [
"Apache-2.0"
] | null | null | null | # This is part of the tutorial materials in the UCL Module MPHY0041: Machine Learning in Medical Imaging
# run data.py before visualise the image data
import random
import h5py
from matplotlib import pyplot as plt
filename = './data/ultrasound_50frames.h5'
h5_file = h5py.File(filename, 'r')
# inspect nFrm frames fr... | 34.378378 | 104 | 0.686321 |
295b30bc389bd2fdf4557f42cddbc86e707b83e2 | 1,258 | py | Python | backend/src/baserow/api/urls.py | orlandoblooms/baserow | 79a77cad4dd05520339261d4f4c6440c8b04f9d0 | [
"MIT"
] | null | null | null | backend/src/baserow/api/urls.py | orlandoblooms/baserow | 79a77cad4dd05520339261d4f4c6440c8b04f9d0 | [
"MIT"
] | null | null | null | backend/src/baserow/api/urls.py | orlandoblooms/baserow | 79a77cad4dd05520339261d4f4c6440c8b04f9d0 | [
"MIT"
] | null | null | null | from django.urls import path, include
from drf_spectacular.views import SpectacularJSONAPIView, SpectacularRedocView
from baserow.core.registries import plugin_registry, application_type_registry
from .settings import urls as settings_urls
from .user import urls as user_urls
from .user_files import urls as user_file... | 35.942857 | 83 | 0.715421 |
d9c22f392499d7f65bce4db94903037170905a5d | 731 | py | Python | tasks/migrations/0005_auto_20200110_1249.py | huynhduyman/realestatecrm | 66fed5766f60260f45bff4f8ab58a895860d0d4a | [
"MIT"
] | null | null | null | tasks/migrations/0005_auto_20200110_1249.py | huynhduyman/realestatecrm | 66fed5766f60260f45bff4f8ab58a895860d0d4a | [
"MIT"
] | null | null | null | tasks/migrations/0005_auto_20200110_1249.py | huynhduyman/realestatecrm | 66fed5766f60260f45bff4f8ab58a895860d0d4a | [
"MIT"
] | null | null | null | # Generated by Django 2.2.4 on 2020-01-10 05:49
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tasks', '0004_task_teams'),
]
operations = [
migrations.AlterField(
model_name='task',
name='priority',
... | 30.458333 | 159 | 0.574555 |
02d35ed381ec803a978602c635c9c28d5f69a64a | 5,344 | py | Python | thesaurus/main.py | daanderuijter/Thesauri_Quality_Assessment | 386f4ee5c1ca8c774dda0971716de649fba0d6bd | [
"CC0-1.0"
] | null | null | null | thesaurus/main.py | daanderuijter/Thesauri_Quality_Assessment | 386f4ee5c1ca8c774dda0971716de649fba0d6bd | [
"CC0-1.0"
] | null | null | null | thesaurus/main.py | daanderuijter/Thesauri_Quality_Assessment | 386f4ee5c1ca8c774dda0971716de649fba0d6bd | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import lxml.etree as ET
import os.path
xml_filename = os.path.abspath('..\data\\') + "authexport_TOPIC_20181213.xml"
dom = ET.parse(xml_filename)
# In[2]:
def get_last_modified_date(root):
# returns a tuple with (yyyy, mm, dd, hh, mm, ss)
return tuple([root... | 29.202186 | 84 | 0.534805 |
75b62332ccac80680eeeae6a4d0773a059e8d3ef | 8,136 | py | Python | embuilder.py | emaxx-google/emscripten | d0e647bf266caad50943e78c9841e05e9c499a5d | [
"MIT"
] | null | null | null | embuilder.py | emaxx-google/emscripten | d0e647bf266caad50943e78c9841e05e9c499a5d | [
"MIT"
] | null | null | null | embuilder.py | emaxx-google/emscripten | d0e647bf266caad50943e78c9841e05e9c499a5d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright 2014 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
"""Tool to manage building of system libraries... | 30.701887 | 111 | 0.658186 |
5be59ad8af17673f9d4aaa8906eda94ee9e50be8 | 11,867 | py | Python | openpifpaf_posetrack/metric.py | vita-epfl/openpifpaf_posetrack | 282ba063450d523728637167420d9ade4d9c1e65 | [
"MIT"
] | 9 | 2021-03-04T04:47:27.000Z | 2021-03-30T01:48:55.000Z | openpifpaf_posetrack/metric.py | vita-epfl/openpifpaf_posetrack | 282ba063450d523728637167420d9ade4d9c1e65 | [
"MIT"
] | 4 | 2021-03-16T03:24:27.000Z | 2021-04-01T19:22:02.000Z | openpifpaf_posetrack/metric.py | vita-epfl/openpifpaf_posetrack | 282ba063450d523728637167420d9ade4d9c1e65 | [
"MIT"
] | null | null | null | from collections import defaultdict
import datetime
import glob
import json
import logging
import os
import subprocess
import numpy as np
import openpifpaf
from .constants import POSETRACK_INDEX2017TO2018
LOG = logging.getLogger(__name__)
class Posetrack(openpifpaf.metric.Base):
def __init__(self, *, images, c... | 34.397101 | 107 | 0.493385 |
7f49aa163c0efd76e190d32d4aaf15e0013493c6 | 63,200 | py | Python | biosppy/biometrics.py | Feverdreams/BMI | 243373de42409ff11fff62af22703c2ed57c08c2 | [
"BSD-3-Clause"
] | null | null | null | biosppy/biometrics.py | Feverdreams/BMI | 243373de42409ff11fff62af22703c2ed57c08c2 | [
"BSD-3-Clause"
] | null | null | null | biosppy/biometrics.py | Feverdreams/BMI | 243373de42409ff11fff62af22703c2ed57c08c2 | [
"BSD-3-Clause"
] | 1 | 2019-11-20T08:33:13.000Z | 2019-11-20T08:33:13.000Z | # -*- coding: utf-8 -*-
"""
biosppy.biometrics
------------------
This module provides classifier interfaces for identity recognition
(biometrics) applications. The core API methods are:
* enroll: add a new subject;
* dismiss: remove an existing subject;
* identify: determine the identity of collected biometric datase... | 26.950959 | 204 | 0.543908 |
831c6d0c2d84abaa38fe3b6ca591eaf9235cbd97 | 12,659 | py | Python | ua200.py | UAlbanyArchives/ua200 | 5f71ed78ba07a72d5c54b90b3b411ada91a67a0b | [
"MIT"
] | null | null | null | ua200.py | UAlbanyArchives/ua200 | 5f71ed78ba07a72d5c54b90b3b411ada91a67a0b | [
"MIT"
] | null | null | null | ua200.py | UAlbanyArchives/ua200 | 5f71ed78ba07a72d5c54b90b3b411ada91a67a0b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import sys
import shutil
import traceback
import simplejson
import hashlib
from openpyxl import load_workbook
from openpyxl import Workbook
import time
import datetime
import smtplib
from subprocess import Popen, PIPE, STDOUT
import bagit
startTime = time.time()
startTimeReadable = ... | 37.342183 | 280 | 0.651868 |
a7a7431421faf741375faef20c14d157e4e0b9c2 | 750 | py | Python | test/test_broadcast.py | betafcc/dataclass-util | 27b7eeaba8302f4c9ebf8c42e6392f2a94292771 | [
"MIT"
] | null | null | null | test/test_broadcast.py | betafcc/dataclass-util | 27b7eeaba8302f4c9ebf8c42e6392f2a94292771 | [
"MIT"
] | null | null | null | test/test_broadcast.py | betafcc/dataclass-util | 27b7eeaba8302f4c9ebf8c42e6392f2a94292771 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from operator import add, sub, mul, truediv
import pytest
from dataclass_util.operator import broadcast
@dataclass
class Rectangle:
x : int
y : int
width : int
height : int
@pytest.mark.parametrize('operator, a, b, expected', [
(add, Rectangle(10, 2... | 25.862069 | 74 | 0.64 |
ce99daa3260d02d26f84c5adb53c4a1cdd741095 | 447 | py | Python | pqcrypto/sign/sphincs_shake256_192s_robust.py | GaloisInc/pqcrypto | dd8c56fd876a397caef06a00d35537a4f9c1db28 | [
"BSD-3-Clause"
] | 15 | 2020-09-07T17:09:33.000Z | 2022-02-04T00:03:37.000Z | pqcrypto/sign/sphincs_shake256_192s_robust.py | GaloisInc/pqcrypto | dd8c56fd876a397caef06a00d35537a4f9c1db28 | [
"BSD-3-Clause"
] | 6 | 2020-09-07T18:19:04.000Z | 2022-03-24T06:48:14.000Z | pqcrypto/sign/sphincs_shake256_192s_robust.py | GaloisInc/pqcrypto | dd8c56fd876a397caef06a00d35537a4f9c1db28 | [
"BSD-3-Clause"
] | 4 | 2021-11-25T06:56:31.000Z | 2022-02-03T14:27:06.000Z | from .._sign.sphincs_shake256_192s_robust import ffi as __ffi, lib as __lib
from .common import _sign_generate_keypair_factory, _sign_sign_factory, _sign_verify_factory
PUBLIC_KEY_SIZE = __lib.CRYPTO_PUBLICKEYBYTES
SECRET_KEY_SIZE = __lib.CRYPTO_SECRETKEYBYTES
SIGNATURE_SIZE = __lib.CRYPTO_BYTES
generate_keypair = _s... | 40.636364 | 92 | 0.85906 |
1641eefe324c786ed01e1ed5f7095c4255aef559 | 2,451 | py | Python | Testing/Conditions.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-06-20T22:01:23.000Z | 2021-08-06T04:39:50.000Z | Testing/Conditions.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 5 | 2020-05-17T09:32:27.000Z | 2021-03-15T19:45:52.000Z | Testing/Conditions.py | freder/PageBotExamples | eb4ced53a673b9376e8357afa9ea0795b022b13c | [
"Ruby",
"MIT"
] | 2 | 2021-02-25T19:07:45.000Z | 2022-01-09T21:14:06.000Z | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# -----------------------------------------------------------------------------
#
# P A G E B O T E X A M P L E S
#
# Copyright (c) 2017 Thom Janssen <https://github.com/thomgb>
# www.pagebot.io
# Licensed under MIT conditions
#
# Supporting DrawBot, w... | 29.53012 | 87 | 0.609547 |
e4e93b61b62bd313238e6f5622b6d65de8a4187d | 37 | py | Python | lang/py/cookbook/v2/source/cb2_6_19_exm_3.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/cookbook/v2/source/cb2_6_19_exm_3.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | lang/py/cookbook/v2/source/cb2_6_19_exm_3.py | ch1huizong/learning | 632267634a9fd84a5f5116de09ff1e2681a6cc85 | [
"MIT"
] | null | null | null | met in Base1
met in Der1
met in Der2
| 9.25 | 12 | 0.756757 |
cf4c94a29ff2f7d9af2a0ed187620e4d6c10c51b | 2,314 | py | Python | examples/cgns_explore.py | tianboxi/cgnsutilities | 789ddfbbada4e9eb6f96d85af731e6e71cb17305 | [
"Apache-2.0"
] | null | null | null | examples/cgns_explore.py | tianboxi/cgnsutilities | 789ddfbbada4e9eb6f96d85af731e6e71cb17305 | [
"Apache-2.0"
] | null | null | null | examples/cgns_explore.py | tianboxi/cgnsutilities | 789ddfbbada4e9eb6f96d85af731e6e71cb17305 | [
"Apache-2.0"
] | null | null | null | import cgnsutilities as cu
import numpy as np
# BC type dictionary
BCdic = cu.BC
BClist = list(BCdic.keys())
BCval = list(BCdic.values())
print(BCdic)
# Read a grid
grid = cu.readGrid('./inputFiles/grid_absper_vis_latest_output.cgns')
#grid = cu.readGrid('./inputFiles/naca0012.cgns')
# Print some info
grid.printInfo(... | 32.591549 | 69 | 0.624892 |
7b1cf73597052fa89454770a3e1241eae355a166 | 16,427 | py | Python | spinup/orig_algos/pytorch/ppo_mpi/ppo.py | LinghengMeng/lstm_td3 | 2306a4f0e84417e92b9d77627abc8a7f1925f2b1 | [
"MIT"
] | 2 | 2021-04-22T01:17:37.000Z | 2021-07-22T09:56:44.000Z | spinup/orig_algos/pytorch/ppo_mpi/ppo.py | LinghengMeng/lstm_td3 | 2306a4f0e84417e92b9d77627abc8a7f1925f2b1 | [
"MIT"
] | null | null | null | spinup/orig_algos/pytorch/ppo_mpi/ppo.py | LinghengMeng/lstm_td3 | 2306a4f0e84417e92b9d77627abc8a7f1925f2b1 | [
"MIT"
] | 3 | 2021-05-05T10:27:12.000Z | 2021-07-23T14:42:42.000Z | import numpy as np
import torch
from torch.optim import Adam
import gym
import pybullet_envs
import time
import spinup.orig_algos.pytorch.ppo_mpi.core as core
from spinup.utils.logx import EpochLogger
from spinup.utils.mpi_pytorch import setup_pytorch_for_mpi, sync_params, mpi_avg_grads
from spinup.utils.mpi_tools impo... | 43.343008 | 97 | 0.585134 |
0d575e1875b0bc08a21d16bc5c1b3c9420eb873e | 1,818 | py | Python | tests/python/unit/test_op.py | Pandinosaurus/KungFu | 80dfa463450330e920b413f65cc49d8e013b84a9 | [
"Apache-2.0"
] | 291 | 2019-10-25T16:37:59.000Z | 2022-03-17T21:47:09.000Z | tests/python/unit/test_op.py | Pandinosaurus/KungFu | 80dfa463450330e920b413f65cc49d8e013b84a9 | [
"Apache-2.0"
] | 56 | 2019-10-26T08:25:33.000Z | 2021-09-07T11:11:51.000Z | tests/python/unit/test_op.py | Pandinosaurus/KungFu | 80dfa463450330e920b413f65cc49d8e013b84a9 | [
"Apache-2.0"
] | 53 | 2019-10-25T17:45:40.000Z | 2022-02-08T13:09:39.000Z | import tensorflow as tf
def test_counter():
from kungfu.tensorflow.ops import counter
c = counter()
with tf.Session() as sess:
for i in range(10):
n = sess.run(c)
assert (n == i)
def test_counter_init():
from kungfu.tensorflow.ops import counter
c = counter(init=1... | 25.971429 | 71 | 0.59516 |
372c090f4d7d80d61f0ae1d86f1634b0f3da57d1 | 967 | py | Python | components/resnet-cmle/resnet/resnet_model/setup.py | cbreuel/pipelines | 22a85b4af642b896b57293c0d15d0f20c995be99 | [
"Apache-2.0"
] | 9 | 2019-03-28T02:20:45.000Z | 2021-12-01T22:43:36.000Z | components/resnet-cmle/resnet/resnet_model/setup.py | cbreuel/pipelines | 22a85b4af642b896b57293c0d15d0f20c995be99 | [
"Apache-2.0"
] | 2 | 2019-10-17T16:51:43.000Z | 2019-10-18T01:18:35.000Z | components/resnet-cmle/resnet/resnet_model/setup.py | cbreuel/pipelines | 22a85b4af642b896b57293c0d15d0f20c995be99 | [
"Apache-2.0"
] | 4 | 2019-04-11T12:09:59.000Z | 2020-10-11T15:53:53.000Z | # Copyright 2018 Google LLC
#
# 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, ... | 33.344828 | 74 | 0.708376 |
8e00c8adecefa0bc744b5ad9602aefa68a56bdd1 | 7,586 | py | Python | self_critical/cider/pyciderevalcap/ciderD/ciderD_scorer.py | ezeli/InSentiCap_model | 96d4e3add5860f637eb0106b545d32998d03d643 | [
"MIT"
] | 4 | 2021-03-30T17:34:09.000Z | 2021-10-01T09:37:34.000Z | self_critical/cider/pyciderevalcap/ciderD/ciderD_scorer.py | ezeli/InSentiCap_model | 96d4e3add5860f637eb0106b545d32998d03d643 | [
"MIT"
] | 1 | 2021-07-15T08:04:24.000Z | 2021-07-15T08:54:54.000Z | self_critical/cider/pyciderevalcap/ciderD/ciderD_scorer.py | ezeli/InSentiCap_model | 96d4e3add5860f637eb0106b545d32998d03d643 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Tsung-Yi Lin <tl483@cornell.edu>
# Ramakrishna Vedantam <vrama91@vt.edu>
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from collections import defaultdict
import numpy as np
import math
def precook(s, n=4, out=False):
"""
... | 38.313131 | 116 | 0.593725 |
93b09988df6b170201da52ba7e14c524bac8ce09 | 2,717 | py | Python | tests/test_area_square_metres.py | putridparrot/PyUnits | 4f1095c6fc0bee6ba936921c391913dbefd9307c | [
"MIT"
] | null | null | null | tests/test_area_square_metres.py | putridparrot/PyUnits | 4f1095c6fc0bee6ba936921c391913dbefd9307c | [
"MIT"
] | null | null | null | tests/test_area_square_metres.py | putridparrot/PyUnits | 4f1095c6fc0bee6ba936921c391913dbefd9307c | [
"MIT"
] | null | null | null | # <auto-generated>
# This code was generated by the UnitCodeGenerator tool
#
# Changes to this file will be lost if the code is regenerated
# </auto-generated>
import unittest
import units.area.square_metres
class TestSquareMetresMethods(unittest.TestCase):
def test_convert_known_square_metres_to_square_kilometres(... | 55.44898 | 102 | 0.81671 |
31ca5bfb221ddce78f562bf400ed43b31f987d2d | 1,539 | py | Python | examples/fillxy1.py | yang69can/pyngl | 78a7040ce9de4b7a442b0c3b5faecccab2f01426 | [
"Apache-2.0"
] | 125 | 2016-11-24T09:04:28.000Z | 2022-01-22T14:06:56.000Z | examples/fillxy1.py | yang69can/pyngl | 78a7040ce9de4b7a442b0c3b5faecccab2f01426 | [
"Apache-2.0"
] | 52 | 2017-11-08T23:23:02.000Z | 2022-03-20T03:17:39.000Z | examples/fillxy1.py | yang69can/pyngl | 78a7040ce9de4b7a442b0c3b5faecccab2f01426 | [
"Apache-2.0"
] | 25 | 2017-08-27T10:50:43.000Z | 2022-01-29T14:56:05.000Z | #
# File:
# fillxy1.py
#
# Synopsis:
# Illustrates how to fill between curves in an XY plot.
#
# Categories:
# xy plots
#
# Author:
# Mary Haley
#
# Date of initial publication:
# August 2010, based on NCL example
#
# Description:
# This example shows how to set a resource for filling between ... | 25.229508 | 77 | 0.653021 |
64511cac4fb43df16a0674c65c1eacb204293658 | 21,484 | py | Python | tests/test_admin_actions.py | FidelityInternational/djangocms-moderation | 786a095b6d037975316b96648a954bdbeea42775 | [
"BSD-3-Clause"
] | null | null | null | tests/test_admin_actions.py | FidelityInternational/djangocms-moderation | 786a095b6d037975316b96648a954bdbeea42775 | [
"BSD-3-Clause"
] | null | null | null | tests/test_admin_actions.py | FidelityInternational/djangocms-moderation | 786a095b6d037975316b96648a954bdbeea42775 | [
"BSD-3-Clause"
] | null | null | null | import mock
from django.contrib.admin import ACTION_CHECKBOX_NAME
from django.test import TransactionTestCase
from django.urls import reverse
from cms.test_utils.testcases import CMSTestCase
from djangocms_versioning.constants import DRAFT, PUBLISHED
from djangocms_versioning.models import Version
from djangocms_ver... | 43.844898 | 108 | 0.690979 |
13a95998bb88b12e8e72208c5aa2f341c7f2ddfa | 3,088 | py | Python | test/functional/getblocktemplate_longpoll.py | paicoin/paicoin | 09f8029112e7a57548ee5b5202c260f8aee7f2e9 | [
"MIT"
] | 77 | 2018-07-04T14:03:42.000Z | 2021-12-19T17:11:14.000Z | test/functional/getblocktemplate_longpoll.py | paicoin/paicoin | 09f8029112e7a57548ee5b5202c260f8aee7f2e9 | [
"MIT"
] | 89 | 2018-06-20T03:48:55.000Z | 2022-02-10T06:50:56.000Z | test/functional/getblocktemplate_longpoll.py | paicoin/paicoin | 09f8029112e7a57548ee5b5202c260f8aee7f2e9 | [
"MIT"
] | 40 | 2018-06-15T12:59:35.000Z | 2021-12-12T15:49:56.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test longpolling with getblocktemplate."""
from test_framework.test_framework import PAIcoinTestFramew... | 42.888889 | 112 | 0.682319 |
8e2c4333506b9040aefece3f79eb160ad5d8adb3 | 506 | py | Python | aoj/21/aoj2198.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | 1 | 2018-11-12T15:18:55.000Z | 2018-11-12T15:18:55.000Z | aoj/21/aoj2198.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | aoj/21/aoj2198.py | knuu/competitive-programming | 16bc68fdaedd6f96ae24310d697585ca8836ab6e | [
"MIT"
] | null | null | null | while True:
N = int(input())
if not N: break
seeds = []
for i in range(N):
plant = input().split()
name, price = plant[0], int(plant[1])
seed_to_leaf, leaf_to_fruit = sum(map(int, plant[2:5])), sum(map(int, plant[5:7]))
num_per, sold, mult = int(plant[7]), int(plant[8]), ... | 36.142857 | 102 | 0.559289 |
7c06d859fbcd03f98d0c1eff3d628250a2e8c928 | 23,852 | py | Python | cinder/volume/san.py | alexpilotti/cinder | df2f070604dad61738ccd3113016f76f2af20cae | [
"Apache-2.0"
] | null | null | null | cinder/volume/san.py | alexpilotti/cinder | df2f070604dad61738ccd3113016f76f2af20cae | [
"Apache-2.0"
] | null | null | null | cinder/volume/san.py | alexpilotti/cinder | df2f070604dad61738ccd3113016f76f2af20cae | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Justin Santa Barbara
# 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.apach... | 36.526799 | 79 | 0.605148 |
ced3f061a3bce1336bbae6b52fbceb1ad2b6673e | 1,115 | py | Python | api/tacticalrmm/accounts/serializers.py | HighTech-Grace-Solutions/tacticalrmm | 37c5f94c66e978c542fd01becae69438523ec5d5 | [
"MIT"
] | 2 | 2021-04-29T13:34:07.000Z | 2021-04-29T13:34:11.000Z | api/tacticalrmm/accounts/serializers.py | HighTech-Grace-Solutions/tacticalrmm | 37c5f94c66e978c542fd01becae69438523ec5d5 | [
"MIT"
] | null | null | null | api/tacticalrmm/accounts/serializers.py | HighTech-Grace-Solutions/tacticalrmm | 37c5f94c66e978c542fd01becae69438523ec5d5 | [
"MIT"
] | 1 | 2021-04-12T03:17:30.000Z | 2021-04-12T03:17:30.000Z | import pyotp
from rest_framework.serializers import ModelSerializer, SerializerMethodField
from .models import User
class UserUISerializer(ModelSerializer):
class Meta:
model = User
fields = [
"dark_mode",
"show_community_scripts",
"agent_dblclick_action",
... | 21.862745 | 77 | 0.547085 |
536e47ea971b8f34e207831a0914ee988e1f133c | 27,896 | py | Python | Florence/VariationalPrinciple/DisplacementPotentialFormulation.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 65 | 2017-08-04T10:21:13.000Z | 2022-02-21T21:45:09.000Z | Florence/VariationalPrinciple/DisplacementPotentialFormulation.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 6 | 2018-06-03T02:29:20.000Z | 2022-01-18T02:30:22.000Z | Florence/VariationalPrinciple/DisplacementPotentialFormulation.py | jdlaubrie/florence | 830dca4a34be00d6e53cbec3007c10d438b27f57 | [
"MIT"
] | 10 | 2018-05-30T09:44:10.000Z | 2021-05-18T08:06:51.000Z | import numpy as np
from .VariationalPrinciple import VariationalPrinciple
from Florence import QuadratureRule, FunctionSpace
from Florence.FiniteElements.LocalAssembly.KinematicMeasures import *
from Florence.FiniteElements.LocalAssembly._KinematicMeasures_ import _KinematicMeasures_
from .DisplacementPotentialApproac... | 46.033003 | 144 | 0.656044 |
f2bf734af778f2df11f170c787ac86a760355aac | 44,556 | py | Python | tests/unit_tests/loop/test_loop_drawing.py | valassi/mg5amc_test | 2e04f23353051f64e1604b23105fe3faabd32869 | [
"NCSA"
] | 1 | 2016-07-09T00:05:56.000Z | 2016-07-09T00:05:56.000Z | tests/unit_tests/loop/test_loop_drawing.py | valassi/mg5amc_test | 2e04f23353051f64e1604b23105fe3faabd32869 | [
"NCSA"
] | 4 | 2022-03-10T09:13:31.000Z | 2022-03-30T16:15:01.000Z | tests/unit_tests/loop/test_loop_drawing.py | valassi/mg5amc_test | 2e04f23353051f64e1604b23105fe3faabd32869 | [
"NCSA"
] | 1 | 2022-03-10T09:02:00.000Z | 2022-03-10T09:02:00.000Z | ################################################################################
#
# Copyright (c) 2009 The MadGraph5_aMC@NLO Development team and Contributors
#
# This file is a part of the MadGraph5_aMC@NLO project, an application which
# automatically generates Feynman diagrams and matrix elements for arbitrary
# h... | 44.511489 | 106 | 0.543182 |
68d2ffe778be4bbd4782bb7c81fa8984ba18b2e6 | 1,703 | py | Python | examples/fiber_tracing/streamline_tracer/scripts/utility/scale_mesh.py | maierbn/opendihu | 577650e2f6b36a7306766b0f4176f8124458cbf0 | [
"MIT"
] | 17 | 2018-11-25T19:29:34.000Z | 2021-09-20T04:46:22.000Z | examples/fiber_tracing/streamline_tracer/scripts/utility/scale_mesh.py | maierbn/opendihu | 577650e2f6b36a7306766b0f4176f8124458cbf0 | [
"MIT"
] | 1 | 2020-11-12T15:15:58.000Z | 2020-12-29T15:29:24.000Z | examples/fiber_tracing/streamline_tracer/scripts/utility/scale_mesh.py | maierbn/opendihu | 577650e2f6b36a7306766b0f4176f8124458cbf0 | [
"MIT"
] | 4 | 2018-10-17T12:18:10.000Z | 2021-05-28T13:24:20.000Z | #!/usr/bin/env ../../../../../dependencies/python/install/bin/python3
# -*- coding: utf-8 -*-
#
# This script scales the node positions of a mesh and writes it to another file.
# This is necessary to adjust the mesh in same way the fibers were scaled.
#
# usage: ./scale_mesh.py <input filename> <output filename> <scal... | 32.132075 | 98 | 0.733412 |
22e2537ac076fe76254c83c7873649ac4d8bb977 | 42,342 | py | Python | azext_keyvault/mgmt/keyvault/operations/vaults_operations.py | jdmartinez36/azure-keyvault-cli-extension | 4dc674b9c30cac13e27347782c49b3ed7dca2e2f | [
"MIT"
] | 2 | 2019-06-12T13:44:34.000Z | 2020-06-01T13:24:04.000Z | azext_keyvault/mgmt/keyvault/operations/vaults_operations.py | jdmartinez36/azure-keyvault-cli-extension | 4dc674b9c30cac13e27347782c49b3ed7dca2e2f | [
"MIT"
] | 5 | 2018-04-26T01:14:29.000Z | 2021-01-05T00:45:39.000Z | azext_keyvault/mgmt/keyvault/operations/vaults_operations.py | jdmartinez36/azure-keyvault-cli-extension | 4dc674b9c30cac13e27347782c49b3ed7dca2e2f | [
"MIT"
] | 8 | 2018-04-24T22:52:48.000Z | 2021-11-16T06:29:28.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 ... | 45.627155 | 192 | 0.657857 |
f2b2a17b832a415a4d9ff607b29d1637993a7073 | 6,608 | py | Python | litex_boards/targets/aller.py | quiatvn/litex-boards | 70c32a978fb588b3144a9e3cf9a63562f5505b7f | [
"BSD-2-Clause"
] | null | null | null | litex_boards/targets/aller.py | quiatvn/litex-boards | 70c32a978fb588b3144a9e3cf9a63562f5505b7f | [
"BSD-2-Clause"
] | null | null | null | litex_boards/targets/aller.py | quiatvn/litex-boards | 70c32a978fb588b3144a9e3cf9a63562f5505b7f | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# This file is part of LiteX-Boards.
#
# Copyright (c) 2018-2019 Rohit Singh <rohit@rohitksingh.in>
# Copyright (c) 2019 Florent Kermarrec <florent@enjoy-digital.fr>
# SPDX-License-Identifier: BSD-2-Clause
import os
import argparse
import sys
from migen import *
from litex_boards.platforms ... | 40.292683 | 100 | 0.561289 |
c627710b1712e8b04e2a441d932e1f7a9757e12b | 11,011 | py | Python | script.module.urlresolver/lib/urlresolver/hmf.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 1 | 2021-05-09T19:55:51.000Z | 2021-05-09T19:55:51.000Z | script.module.urlresolver/lib/urlresolver/hmf.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | null | null | null | script.module.urlresolver/lib/urlresolver/hmf.py | TheWardoctor/wardoctors-repo | 893f646d9e27251ffc00ca5f918e4eb859a5c8f0 | [
"Apache-2.0"
] | 2 | 2020-04-01T22:11:12.000Z | 2020-05-07T23:54:52.000Z | """
URLResolver Addon for Kodi
Copyright (C) 2016 t0mm0, tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any late... | 39.325 | 126 | 0.586958 |
89f682e01c329553fcd138dc8dfbae50e16c0e4b | 1,401 | py | Python | api_tests/logs/views/test_log_detail.py | sf2ne/Playground | 95b2d222d7ac43baca0249acbfc34e043d6a95b3 | [
"Apache-2.0"
] | null | null | null | api_tests/logs/views/test_log_detail.py | sf2ne/Playground | 95b2d222d7ac43baca0249acbfc34e043d6a95b3 | [
"Apache-2.0"
] | 13 | 2020-03-24T15:29:41.000Z | 2022-03-11T23:15:28.000Z | api_tests/logs/views/test_log_detail.py | sf2ne/Playground | 95b2d222d7ac43baca0249acbfc34e043d6a95b3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import httplib as http
from nose.tools import * # noqa
from test_log_nodes_list import LogsTestCase
class TestLogDetail(LogsTestCase):
def test_log_detail_returns_data(self):
res = self.app.get(self.private_log_detail, auth=self.user.auth)
assert_equal(res.status_code, 2... | 40.028571 | 96 | 0.728765 |
253a9e028dc7373472f8a46e245dc6bdda85e3bf | 7,931 | py | Python | test_predictor.py | Mat-Bit/tcc-udesc | 67c4e28fac854472646c0ca76ca04c09842b1039 | [
"MIT"
] | null | null | null | test_predictor.py | Mat-Bit/tcc-udesc | 67c4e28fac854472646c0ca76ca04c09842b1039 | [
"MIT"
] | null | null | null | test_predictor.py | Mat-Bit/tcc-udesc | 67c4e28fac854472646c0ca76ca04c09842b1039 | [
"MIT"
] | null | null | null | #%% Importando as libs
import numpy as np
import math
from tensorflow.keras.applications.xception import preprocess_input
from tensorflow.keras.preprocessing import image
from tensorflow.keras.models import load_model
import os
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.metrics import roc_curve, ... | 28.631769 | 95 | 0.679738 |
39436e551da184b7c4305debe9b7b66d05996189 | 2,798 | py | Python | examples/views/button/paginator.py | Kraots/disnake | 9eb9ab81915dae7249ffb2b757dd6dee6090341e | [
"MIT"
] | null | null | null | examples/views/button/paginator.py | Kraots/disnake | 9eb9ab81915dae7249ffb2b757dd6dee6090341e | [
"MIT"
] | null | null | null | examples/views/button/paginator.py | Kraots/disnake | 9eb9ab81915dae7249ffb2b757dd6dee6090341e | [
"MIT"
] | null | null | null | import disnake
from disnake.ext import commands
bot = commands.Bot(command_prefix="-")
# Defines a simple view of buttons for the embed.
class Menu(disnake.ui.View):
def __init__(self, embeds: list[disnake.Embed]):
super().__init__(timeout=None)
# Sets the embed list variable.
self.embeds... | 35.871795 | 98 | 0.624732 |
96845771bc23ae0397b3209f4990ccfdd048b9db | 4,062 | py | Python | cirq-google/cirq_google/optimizers/two_qubit_gates/example.py | LLcat1217/Cirq | b88069f7b01457e592ad69d6b413642ef11a56b8 | [
"Apache-2.0"
] | 1 | 2022-02-02T07:13:54.000Z | 2022-02-02T07:13:54.000Z | cirq-google/cirq_google/optimizers/two_qubit_gates/example.py | bradyb/Cirq | 610b0d4ea3a7862169610797266734c844ddcc1f | [
"Apache-2.0"
] | 4 | 2022-01-16T14:12:15.000Z | 2022-02-24T03:58:46.000Z | cirq-google/cirq_google/optimizers/two_qubit_gates/example.py | bradyb/Cirq | 610b0d4ea3a7862169610797266734c844ddcc1f | [
"Apache-2.0"
] | null | null | null | # pylint: disable=wrong-or-nonexistent-copyright-notice
"""Example application of the two-qubit gate compilation algorithm.
This script demonstrates construction and usage of the GateTabulation class.
This object is used to compile arbitrary two qubit gates using products of the
form
k_3 A k_2 A k_1 A k_0
or
k_2 A k_... | 38.685714 | 94 | 0.718365 |
b8647c547f635ad5d2ff5ed9635d326192059d25 | 31,092 | py | Python | dnc.py | thaihungle/DMNC | 3ce17a9277bbeeb8125b588e86cc8aace67a0924 | [
"MIT"
] | 11 | 2018-04-26T10:56:03.000Z | 2021-03-20T08:46:25.000Z | dnc.py | thaihungle/DMNC | 3ce17a9277bbeeb8125b588e86cc8aace67a0924 | [
"MIT"
] | 1 | 2018-07-21T19:29:57.000Z | 2018-08-03T06:14:52.000Z | dnc.py | thaihungle/DMNC | 3ce17a9277bbeeb8125b588e86cc8aace67a0924 | [
"MIT"
] | 5 | 2019-02-20T23:51:38.000Z | 2019-12-05T05:41:55.000Z | import tensorflow as tf
import numpy as np
from tensorflow.python.ops.rnn_cell import LSTMStateTuple
from memory import Memory
import utility
import os
class DNC:
def __init__(self, controller_class, input_size, output_size, max_sequence_length=100,
memory_words_num = 256, memory_word_size = 64, ... | 45.926145 | 145 | 0.607713 |
2f6f5b29ca22514699de8a26f1306472901c025b | 1,566 | py | Python | magnet/utils/importer.py | sasano8/magnet-migrade | b5669b34a6a3b845df8df96dfedaf967df6b88e2 | [
"MIT"
] | null | null | null | magnet/utils/importer.py | sasano8/magnet-migrade | b5669b34a6a3b845df8df96dfedaf967df6b88e2 | [
"MIT"
] | 4 | 2021-03-24T23:38:22.000Z | 2021-03-31T07:24:30.000Z | magnet/utils/importer.py | sasano8/magnet-migrade | b5669b34a6a3b845df8df96dfedaf967df6b88e2 | [
"MIT"
] | null | null | null | import os
class FileInfo:
def __init__(self, file_name: str, path: str):
self.file_name = file_name
self.path = path
def walk_files(root_file_path: str):
"""
Enumrate models.py's path as sqlalchemy model definition.
This operation is useful for automatically importing sqlalchemy mode... | 32.625 | 86 | 0.628352 |
ca4bc68b7e4482128a42a706d10d3a19a47306e8 | 3,554 | py | Python | test_distortion.py | ceciledebezenac/segregation_index | 0e57b925450dad60e7cd9f987ba5ce499edccd8f | [
"MIT"
] | 1 | 2021-04-14T14:45:53.000Z | 2021-04-14T14:45:53.000Z | test_distortion.py | ceciledebezenac/segregation_index | 0e57b925450dad60e7cd9f987ba5ce499edccd8f | [
"MIT"
] | 1 | 2021-05-27T14:53:58.000Z | 2021-05-27T14:53:58.000Z | test_distortion.py | ceciledebezenac/segregation_index | 0e57b925450dad60e7cd9f987ba5ce499edccd8f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[42]:
from divergence import segregation_distortion as seg
from random_grid import random_grid as rdg
import geopandas as gdp
import pandas
import pickle as pck
import unittest
import random as rd
# In[43]:
#access the data for the test
f = open('test_data/fixature_pytho... | 36.639175 | 124 | 0.713281 |
3deb410c0f8b8f1e9b9a68438d3d9c9d237e66f1 | 11,992 | py | Python | src/features/feature_engineering.py | tbenali96/octofly | 9009c1d8b1b47e0cbe19e1013d74b77c874c4636 | [
"MIT"
] | null | null | null | src/features/feature_engineering.py | tbenali96/octofly | 9009c1d8b1b47e0cbe19e1013d74b77c874c4636 | [
"MIT"
] | null | null | null | src/features/feature_engineering.py | tbenali96/octofly | 9009c1d8b1b47e0cbe19e1013d74b77c874c4636 | [
"MIT"
] | null | null | null | import datetime
import logging
import os
from datetime import timedelta
from typing import List, Tuple
import streamlit as st
import numpy as np
import pandas as pd
from joblib import load, dump
from sklearn.preprocessing import MinMaxScaler, StandardScaler
SCALERS_MODEL_PATH = os.path.join("../../models/train_featur... | 38.935065 | 128 | 0.69438 |
0e98729300e8a53074c7add8dd174ce06be17a83 | 9,252 | py | Python | tensorflow_probability/python/distributions/pert.py | cafeal/probability | f968a32d601d29ec31a10568ccfe30263cf91ef2 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/pert.py | cafeal/probability | f968a32d601d29ec31a10568ccfe30263cf91ef2 | [
"Apache-2.0"
] | null | null | null | tensorflow_probability/python/distributions/pert.py | cafeal/probability | f968a32d601d29ec31a10568ccfe30263cf91ef2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The TensorFlow Probability Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 35.448276 | 80 | 0.666667 |
54ab709706f0c49a1f37bd9e91a8e2f73d687ad1 | 5,446 | py | Python | src/classes/datasets_bank.py | skoltech-nlp/coqas | bf0d8d3d1fffa0039114d7d64bacc020f5085c66 | [
"Apache-2.0"
] | 1 | 2021-12-02T09:19:39.000Z | 2021-12-02T09:19:39.000Z | src/classes/datasets_bank.py | skoltech-nlp/coqas | bf0d8d3d1fffa0039114d7d64bacc020f5085c66 | [
"Apache-2.0"
] | 2 | 2021-04-14T13:46:09.000Z | 2021-04-14T13:49:29.000Z | src/classes/datasets_bank.py | skoltech-nlp/coqas | bf0d8d3d1fffa0039114d7d64bacc020f5085c66 | [
"Apache-2.0"
] | null | null | null | """provides storing the train/dev/test data subsets and sampling batches from the train dataset"""
import numpy as np
from random import randint
from src.classes.utils import argsort_sequences_by_lens, get_sequences_by_indices
class DatasetsBank():
"""DatasetsBank provides storing the train/dev/test data subsets... | 49.963303 | 116 | 0.733566 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.