hexsha
stringlengths
40
40
size
int64
3
1.03M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
3
972
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
78
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
3
972
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
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
3
972
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
78
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
3
1.03M
avg_line_length
float64
1.13
941k
max_line_length
int64
2
941k
alphanum_fraction
float64
0
1
26ae6b9eec60876cee6615b37836ae8c99446850
878
py
Python
tests/test_validate.py
pladdy/jsonschema-scratch
95e9c3a27b4121d6ebc74f5ac8c30b29a0c50fec
[ "MIT" ]
null
null
null
tests/test_validate.py
pladdy/jsonschema-scratch
95e9c3a27b4121d6ebc74f5ac8c30b29a0c50fec
[ "MIT" ]
3
2020-06-12T04:10:42.000Z
2020-07-03T15:06:32.000Z
tests/test_validate.py
pladdy/jsonschema-scratch
95e9c3a27b4121d6ebc74f5ac8c30b29a0c50fec
[ "MIT" ]
1
2020-06-13T01:11:49.000Z
2020-06-13T01:11:49.000Z
import http import json ammy = { "name": "red amulet", "description": "This amulet is red.", "type": "amulet", "armor-class-types": ["edged", "blunt", "mind", "energy"], } invalid_ammy = { "name": "red amulet", "description": "This amulet is red.", "type": "amulet", } def test_validate_o...
25.085714
72
0.676538
6598685e20f9dc15e7781a61dd436bab76164d22
4,289
py
Python
python/tests/test_async_writer.py
nii-gakunin-cloud/sinetstream
abcf8ce800c9970bb51b2eaff54f3845c40c114f
[ "Apache-2.0" ]
5
2020-03-24T15:28:53.000Z
2022-03-18T06:59:42.000Z
python/tests/test_async_writer.py
nii-gakunin-cloud/sinetstream
abcf8ce800c9970bb51b2eaff54f3845c40c114f
[ "Apache-2.0" ]
null
null
null
python/tests/test_async_writer.py
nii-gakunin-cloud/sinetstream
abcf8ce800c9970bb51b2eaff54f3845c40c114f
[ "Apache-2.0" ]
3
2020-03-24T15:28:52.000Z
2021-04-01T14:51:42.000Z
#!/usr/local/bin/python3.6 # vim: expandtab shiftwidth=4 # Copyright (C) 2019 National Institute of Informatics # # 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 own...
29.993007
84
0.727675
69683daa164109eaa040982b5c5cfe86e6ae6636
808
py
Python
manage.py
Ruterana/Hood
8d2c5f7daaf5af43ca74792cf7a13eeaf957d8f9
[ "MIT" ]
null
null
null
manage.py
Ruterana/Hood
8d2c5f7daaf5af43ca74792cf7a13eeaf957d8f9
[ "MIT" ]
null
null
null
manage.py
Ruterana/Hood
8d2c5f7daaf5af43ca74792cf7a13eeaf957d8f9
[ "MIT" ]
null
null
null
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Neiborhood.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that t...
35.130435
77
0.643564
d02854ab8a370474fd67f8bb30231936fb0c0544
3,585
py
Python
jardel.py
wellingtonfs/fsek-pessoal
c4e63eb36050614cab18f2ccc6eb5c62cd8b867d
[ "MIT" ]
null
null
null
jardel.py
wellingtonfs/fsek-pessoal
c4e63eb36050614cab18f2ccc6eb5c62cd8b867d
[ "MIT" ]
null
null
null
jardel.py
wellingtonfs/fsek-pessoal
c4e63eb36050614cab18f2ccc6eb5c62cd8b867d
[ "MIT" ]
4
2019-08-20T15:07:01.000Z
2020-03-10T13:53:18.000Z
#!/usr/bin/env python3 # so that script can be run from Brickman import termios, tty, sys from ev3dev.ev3 import * import colorsys # attach large motors to ports B and C, medium motor to port A motor_left = LargeMotor('outC') motor_right = LargeMotor('outD') Sensor_Cor = [ColorSensor('in2'), ColorSenso...
25.246479
88
0.520502
6f2126a50628b232f641d4f2737f6cbf73d29b02
2,052
py
Python
verbs/open.py
TheGoozah/fips
a421873f7ae2aeee86abc789d38c44ebaa06093b
[ "MIT" ]
1
2021-06-02T19:42:10.000Z
2021-06-02T19:42:10.000Z
verbs/open.py
TheGoozah/fips
a421873f7ae2aeee86abc789d38c44ebaa06093b
[ "MIT" ]
null
null
null
verbs/open.py
TheGoozah/fips
a421873f7ae2aeee86abc789d38c44ebaa06093b
[ "MIT" ]
null
null
null
"""implement the 'open' verb open open [config] """ import os import glob import subprocess from mod import log, util, settings, config, project #------------------------------------------------------------------------------- def run(fips_dir, proj_dir, args) : """run the 'open' verb (opens project in IDE)""" ...
34.779661
87
0.549708
2babce0c5337929a75ca4d518a84fd1cea779881
3,007
py
Python
deep_rl/common/util.py
jkulhanek/deep-rl-pytorch
6fa7ceee8524f002d4a8d93295b231f6b9b7c29c
[ "MIT" ]
7
2019-03-24T19:51:11.000Z
2022-01-27T17:20:29.000Z
deep_rl/common/util.py
jkulhanek/deep-rl-pytorch
6fa7ceee8524f002d4a8d93295b231f6b9b7c29c
[ "MIT" ]
null
null
null
deep_rl/common/util.py
jkulhanek/deep-rl-pytorch
6fa7ceee8524f002d4a8d93295b231f6b9b7c29c
[ "MIT" ]
4
2020-04-11T01:06:24.000Z
2021-07-18T01:22:36.000Z
from collections import OrderedDict, Callable import os from functools import partial import contextlib class DefaultOrderedDict(OrderedDict): # Source: http://stackoverflow.com/a/6190500/562769 def __init__(self, default_factory=None, *a, **kw): if (default_factory is not None and not isins...
31.989362
219
0.632857
a800b3b3d844bc5022073972f2edf84ece2273f5
2,034
py
Python
setup.py
s0ng/spotify-ripper
d0464193dead7bd3ac7580e98bde86a0f323acae
[ "MIT" ]
536
2016-10-05T15:31:29.000Z
2022-03-27T22:24:34.000Z
setup.py
s0ng/spotify-ripper
d0464193dead7bd3ac7580e98bde86a0f323acae
[ "MIT" ]
62
2016-10-11T01:53:38.000Z
2022-02-07T08:35:39.000Z
setup.py
s0ng/spotify-ripper
d0464193dead7bd3ac7580e98bde86a0f323acae
[ "MIT" ]
148
2016-10-04T11:54:01.000Z
2022-03-27T22:24:55.000Z
#!/usr/bin/env python # coding=utf-8 from setuptools import setup, find_packages import os def create_default_dir(): default_dir = os.path.normpath(os.path.realpath( (os.path.join(os.path.expanduser("~"), ".spotify-ripper")))) if not os.path.exists(default_dir): print("Creating default settin...
27.486486
76
0.605703
2ef6051d010bad7e47ffb12b9187b627e357a0e7
8,208
py
Python
util/utils.py
suntingtencent/face.evoLVe.PyTorch
be99ba87d2db3b96bbb85628dfd0aca78346b1aa
[ "MIT" ]
1
2019-01-26T03:41:09.000Z
2019-01-26T03:41:09.000Z
util/utils.py
XZJie-AILab/face.evoLVe.PyTorch
be99ba87d2db3b96bbb85628dfd0aca78346b1aa
[ "MIT" ]
null
null
null
util/utils.py
XZJie-AILab/face.evoLVe.PyTorch
be99ba87d2db3b96bbb85628dfd0aca78346b1aa
[ "MIT" ]
null
null
null
import torch import torchvision.transforms as transforms import torch.nn.functional as F from .verification import evaluate from datetime import datetime import matplotlib.pyplot as plt plt.switch_backend('agg') import numpy as np from PIL import Image import bcolz import io import os # Support: ['get_time', 'l2_no...
32.0625
302
0.640716
6da26fd3d50d37840a9a4ff25ea12eeed2ac29b4
27
py
Python
dem_tiler/handlers/__init__.py
kylebarron/dem-tiler
b10d1f61cf89c1a24af5643d0bd4ddee87c52508
[ "MIT" ]
10
2020-06-18T20:11:21.000Z
2022-03-11T00:52:41.000Z
dem_tiler/handlers/__init__.py
kylebarron/dem-mosaic-tiler
b10d1f61cf89c1a24af5643d0bd4ddee87c52508
[ "MIT" ]
6
2020-05-26T06:25:46.000Z
2020-06-08T00:14:11.000Z
dem_tiler/handlers/__init__.py
kylebarron/dem-mosaic-tiler
b10d1f61cf89c1a24af5643d0bd4ddee87c52508
[ "MIT" ]
2
2020-08-10T06:26:25.000Z
2021-07-19T13:14:53.000Z
"""dem_tiler: handlers."""
13.5
26
0.62963
3405dd73609119f952b2a0fe7b0212aa22b20b02
12,395
py
Python
yolo_batch/src/yolo_dataset.py
hellowaywewe/species-detection
6c9940c79af9c8763c211a03f4b44ca118b91c91
[ "Apache-2.0" ]
2
2021-12-31T11:41:47.000Z
2022-01-01T15:29:11.000Z
yolo_batch/src/yolo_dataset.py
xiuyanDL/species-detection
6c9940c79af9c8763c211a03f4b44ca118b91c91
[ "Apache-2.0" ]
null
null
null
yolo_batch/src/yolo_dataset.py
xiuyanDL/species-detection
6c9940c79af9c8763c211a03f4b44ca118b91c91
[ "Apache-2.0" ]
1
2021-12-31T08:29:48.000Z
2021-12-31T08:29:48.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...
40.907591
114
0.629125
6b0044f53d54db2a3ad02778f03911cd852a4edd
8,710
py
Python
dvg_fftw_welchpowerspectrum.py
Dennis-van-Gils/DvG_Arduino_lock-in_amp
4576aa529413c93c6e4d6152802349f5f0c3ee16
[ "MIT" ]
9
2020-07-02T15:23:18.000Z
2022-03-04T03:32:04.000Z
dvg_fftw_welchpowerspectrum.py
Dennis-van-Gils/DvG_Arduino_lock-in_amp
4576aa529413c93c6e4d6152802349f5f0c3ee16
[ "MIT" ]
3
2019-04-22T22:53:56.000Z
2021-11-02T20:13:43.000Z
dvg_fftw_welchpowerspectrum.py
Dennis-van-Gils/DvG_Arduino_lock-in_amp
4576aa529413c93c6e4d6152802349f5f0c3ee16
[ "MIT" ]
2
2021-11-05T14:34:22.000Z
2022-03-04T03:32:06.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Performs lightning-fast power-spectrum calculations on 1D time series data acquired at a fixed sampling frequency using Welch's method. The fast-Fourier transform (FFT) is performed by the excellent `fftw` (http://www.fftw.org/) library. It will plan the transformation...
36.596639
88
0.586797
0b2b2104fa2e1ff2a5055849b35b403618d282e7
9,190
py
Python
imperative/python/megengine/core/tensor/utils.py
Olalaye/MegEngine
695d24f24517536e6544b07936d189dbc031bbce
[ "Apache-2.0" ]
5,168
2020-03-19T06:10:04.000Z
2022-03-31T11:11:54.000Z
imperative/python/megengine/core/tensor/utils.py
Olalaye/MegEngine
695d24f24517536e6544b07936d189dbc031bbce
[ "Apache-2.0" ]
286
2020-03-25T01:36:23.000Z
2022-03-31T10:26:33.000Z
imperative/python/megengine/core/tensor/utils.py
Olalaye/MegEngine
695d24f24517536e6544b07936d189dbc031bbce
[ "Apache-2.0" ]
515
2020-03-19T06:10:05.000Z
2022-03-30T09:15:59.000Z
# -*- coding: utf-8 -*- # MegEngine is Licensed under the Apache License, Version 2.0 (the "License") # # Copyright (c) 2014-2021 Megvii Inc. All rights reserved. # # Unless required by applicable law or agreed to in writing, # software distributed under the License is distributed on an # "AS IS" BASIS, WITHOUT ARRANTI...
28.990536
88
0.604353
15b84e269edb65db67901709f2b744b9518670d9
657
py
Python
tools/quantization_test.py
KateHaeun/pycls
f3d87a36cb0a8adead31c7ad98f43facf7fe4c47
[ "MIT" ]
null
null
null
tools/quantization_test.py
KateHaeun/pycls
f3d87a36cb0a8adead31c7ad98f43facf7fe4c47
[ "MIT" ]
null
null
null
tools/quantization_test.py
KateHaeun/pycls
f3d87a36cb0a8adead31c7ad98f43facf7fe4c47
[ "MIT" ]
3
2021-06-02T05:03:01.000Z
2021-07-19T03:51:32.000Z
"""Test a quantized classification model.""" import pycls.core.config as config import pycls.core.distributed as dist import pycls.core.logging as logging import pycls.core.quantization_tester as tester from pycls.core.config import cfg logger = logging.get_logger(__name__) def main(): config.load_cfg_fom_args(...
27.375
83
0.739726
09d3e08038c0096de589a120e17a81b1b3dec58e
11,104
py
Python
cctk/mae_file.py
ekwan/cctk
85cb8d0b714a80e8e353987dc24006695f1d0532
[ "Apache-2.0" ]
10
2020-01-16T15:26:57.000Z
2022-01-15T23:12:00.000Z
cctk/mae_file.py
ekwan/cctk
85cb8d0b714a80e8e353987dc24006695f1d0532
[ "Apache-2.0" ]
2
2020-05-27T21:04:36.000Z
2020-09-26T20:49:53.000Z
cctk/mae_file.py
ekwan/cctk
85cb8d0b714a80e8e353987dc24006695f1d0532
[ "Apache-2.0" ]
2
2020-09-24T18:44:18.000Z
2021-08-05T20:35:51.000Z
import re import numpy as np import networkx as nx from cctk import File, Ensemble, ConformationalEnsemble, Molecule from cctk.helper_functions import get_number class MAEFile(File): """ Class representing Maestro ``.mae`` files. Attributes: name (str): name of file ensemble (Ensemble): ...
39.799283
150
0.530439
aafdb5a762a995164d6a9945e3c9b51fb648934a
7,479
py
Python
python/tools/freq_stepper.py
alexchartier/digital_rf
cb548266bac910eeee12c210cf31e36809a38565
[ "BSD-3-Clause" ]
null
null
null
python/tools/freq_stepper.py
alexchartier/digital_rf
cb548266bac910eeee12c210cf31e36809a38565
[ "BSD-3-Clause" ]
null
null
null
python/tools/freq_stepper.py
alexchartier/digital_rf
cb548266bac910eeee12c210cf31e36809a38565
[ "BSD-3-Clause" ]
null
null
null
#!python # ---------------------------------------------------------------------------- # Copyright (c) 2018 Johns Hopkins APL # All rights reserved. # # Distributed under the terms of the BSD 3-clause license. # # The full license is in the LICENSE file, distributed with this software. # ------------------------------...
37.395
126
0.567188
e644d44a3653633c71c8e0f17a0ecc1117c8855c
2,140
py
Python
models/nets/header.py
hitfeelee/rtm3d
0e80883e40cc225fc489db18c923bb71dca81c57
[ "MIT" ]
2
2021-01-22T01:21:24.000Z
2021-04-14T02:46:29.000Z
models/nets/header.py
hitfeelee/rtm3d
0e80883e40cc225fc489db18c923bb71dca81c57
[ "MIT" ]
5
2021-01-14T03:18:44.000Z
2021-05-26T02:24:45.000Z
models/nets/header.py
hitfeelee/rtm3d
0e80883e40cc225fc489db18c923bb71dca81c57
[ "MIT" ]
2
2021-04-14T02:46:35.000Z
2021-08-09T01:49:11.000Z
import torch import torch.nn as nn from utils import torch_utils class RTM3DHeader(nn.Module): def __init__(self, config): super(RTM3DHeader, self).__init__() self._config = config _in_ch = self._config.MODEL.OUT_CHANNELS _num_class = len(self._config.DATASET.OBJs) _num_con...
50.952381
112
0.621495
4fcc7bce10e095cbf0e94d8ec7d3f0855e7aa2a5
48,996
py
Python
Data_Analysis/Wrangler.py
pwinslow/Lepton-Number-Violation-at-100-TeV
e697142e8e1222a423d1e7bd1ea1e65d1b6f94b8
[ "MIT" ]
null
null
null
Data_Analysis/Wrangler.py
pwinslow/Lepton-Number-Violation-at-100-TeV
e697142e8e1222a423d1e7bd1ea1e65d1b6f94b8
[ "MIT" ]
null
null
null
Data_Analysis/Wrangler.py
pwinslow/Lepton-Number-Violation-at-100-TeV
e697142e8e1222a423d1e7bd1ea1e65d1b6f94b8
[ "MIT" ]
null
null
null
######################################################################################################## # This script transforms raw LHCO data to a set of features for machine learning and also provides a # # method for plotting probability densities. # ##################################################...
47.430784
151
0.695261
36d2192020121aa69f7cc948e5148237e5c88240
7,018
py
Python
tests/test_standardqueryoperators/test_skip_while.py
rlugojr/RxPy
9f9b1de0ab833e53b0d1626a3b43a6c9424f01ec
[ "ECL-2.0", "Apache-2.0" ]
78
2015-01-22T23:57:01.000Z
2021-06-04T15:16:22.000Z
tests/test_standardqueryoperators/test_skip_while.py
rlugojr/RxPy
9f9b1de0ab833e53b0d1626a3b43a6c9424f01ec
[ "ECL-2.0", "Apache-2.0" ]
1
2015-10-19T12:59:57.000Z
2015-10-19T12:59:57.000Z
tests/test_standardqueryoperators/test_skip_while.py
rlugojr/RxPy
9f9b1de0ab833e53b0d1626a3b43a6c9424f01ec
[ "ECL-2.0", "Apache-2.0" ]
11
2015-02-16T20:43:45.000Z
2018-05-30T11:46:50.000Z
from rx.observable import Observable from rx.testing import TestScheduler, ReactiveTest, is_prime on_next = ReactiveTest.on_next on_completed = ReactiveTest.on_completed on_error = ReactiveTest.on_error subscribe = ReactiveTest.subscribe subscribed = ReactiveTest.subscribed disposed = ReactiveTest.disposed created = R...
42.533333
269
0.6499
4db04b05b52c562e7f863bd739645dcc9eade399
1,091
py
Python
official/cv/deeptext/mindspore_hub_conf.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
77
2021-10-15T08:32:37.000Z
2022-03-30T13:09:11.000Z
official/cv/deeptext/mindspore_hub_conf.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
3
2021-10-30T14:44:57.000Z
2022-02-14T06:57:57.000Z
official/cv/deeptext/mindspore_hub_conf.py
leelige/mindspore
5199e05ba3888963473f2b07da3f7bca5b9ef6dc
[ "Apache-2.0" ]
24
2021-10-15T08:32:45.000Z
2022-03-24T18:45:20.000Z
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
40.407407
78
0.692942
01b1b47526af3faece151ead220044d04eaca6da
665
py
Python
greetings/manage.py
LaTonia-Mertica/greeting-django-app
661c81c2b0873f0170447930d54d5827ec25a201
[ "MIT" ]
null
null
null
greetings/manage.py
LaTonia-Mertica/greeting-django-app
661c81c2b0873f0170447930d54d5827ec25a201
[ "MIT" ]
null
null
null
greetings/manage.py
LaTonia-Mertica/greeting-django-app
661c81c2b0873f0170447930d54d5827ec25a201
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'greetings.settings') try: from django.core.management import execute_from_command_line except Im...
28.913043
73
0.679699
eb8300a92be37a18badd6551dcacd785ed5f2d5b
1,080
py
Python
setup.py
Nebukadneza/fints2ledger
bbef542eac40aa61df4617c818fa361d89d73b12
[ "MIT" ]
null
null
null
setup.py
Nebukadneza/fints2ledger
bbef542eac40aa61df4617c818fa361d89d73b12
[ "MIT" ]
null
null
null
setup.py
Nebukadneza/fints2ledger
bbef542eac40aa61df4617c818fa361d89d73b12
[ "MIT" ]
null
null
null
from setuptools import setup def readme(): with open('README.md') as f: return f.read() setup(name='fints2ledger', version='0.6.2', description='A tool for downloading transactions from FinTS banking APIs and sorting them into a ledger journal.', long_description=readme(), long_des...
28.421053
120
0.586111
89d57f33be8d05fd04c08998cc4533970fb2feee
748
py
Python
stage/migrations/0006_auto_20210916_1557.py
fkinyae/works
1191e60b32c9f398ba7c00276d00796ff5490c07
[ "MIT" ]
null
null
null
stage/migrations/0006_auto_20210916_1557.py
fkinyae/works
1191e60b32c9f398ba7c00276d00796ff5490c07
[ "MIT" ]
null
null
null
stage/migrations/0006_auto_20210916_1557.py
fkinyae/works
1191e60b32c9f398ba7c00276d00796ff5490c07
[ "MIT" ]
null
null
null
# Generated by Django 3.2.7 on 2021-09-16 12:57 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('stage', '0005_alter_image_profile'), ] operations = [ migrations.RemoveField( model_name='follow', name='followed', ...
21.371429
47
0.514706
a8efec1c87eeb17ba8f52081b1026c94b016bf70
3,648
py
Python
step/train_cam.py
jbeomlee93/AdvCAM
fa08f0ad4c1f764f3ccaf36883c0ae43342d34c5
[ "MIT" ]
68
2021-03-17T02:59:57.000Z
2022-03-31T12:48:10.000Z
step/train_cam.py
wanghaoyu33437/Anonymous-AdvCAM
fdaec85f436b5bbb0224fc3a0c9cf8bfa8005998
[ "MIT" ]
19
2021-03-25T12:05:42.000Z
2022-03-20T15:53:42.000Z
step/train_cam.py
wanghaoyu33437/Anonymous-AdvCAM
fdaec85f436b5bbb0224fc3a0c9cf8bfa8005998
[ "MIT" ]
12
2021-04-26T02:59:56.000Z
2022-03-29T08:19:20.000Z
import cv2 import torch from torch.backends import cudnn cudnn.enabled = True from torch.utils.data import DataLoader import torch.nn.functional as F import importlib import voc12.dataloader from misc import pyutils, torchutils from torch import autograd import os def validate(model, data_loader): print('valida...
34.415094
111
0.607182
e734f3b7fcfdeb8d0fe3587ff5abe3896d7605d8
1,602
py
Python
apollo/epsilon_checker.py
TylerMathis/apollo
0e37a37ec2f6e7fcfffa14c83f8c801f8422fa7b
[ "MIT" ]
null
null
null
apollo/epsilon_checker.py
TylerMathis/apollo
0e37a37ec2f6e7fcfffa14c83f8c801f8422fa7b
[ "MIT" ]
null
null
null
apollo/epsilon_checker.py
TylerMathis/apollo
0e37a37ec2f6e7fcfffa14c83f8c801f8422fa7b
[ "MIT" ]
null
null
null
from .verdict import Response, Correct, WrongAnswer, PresentationError def compare_eps(user, judge, eps): try: user = float(user) judge = float(judge) absolute = abs(judge - user) <= eps + 1e-10 if (judge == 0): return absolute relative = abs((judge - user) / ...
32.04
78
0.644819
f19c94962cc87b0f77cc91333a92df97d3996002
8,271
py
Python
src/dispatch/incident/models.py
r4is3/dispatch
097ef041758e4d5995b6f3826e3fe03bfc5c224e
[ "Apache-2.0" ]
null
null
null
src/dispatch/incident/models.py
r4is3/dispatch
097ef041758e4d5995b6f3826e3fe03bfc5c224e
[ "Apache-2.0" ]
null
null
null
src/dispatch/incident/models.py
r4is3/dispatch
097ef041758e4d5995b6f3826e3fe03bfc5c224e
[ "Apache-2.0" ]
null
null
null
from datetime import datetime from typing import List, Optional, Any from pydantic import validator from sqlalchemy import ( Column, DateTime, Float, ForeignKey, Integer, PrimaryKeyConstraint, String, Table, select, ) from sqlalchemy.ext.hybrid import hybrid_property from sqlalchemy...
35.497854
102
0.688913
136a36075d343ab321cbdbd792b734ac1dbc4dd9
3,746
py
Python
chapter3/Readercoin_/test/functional/multiwallet.py
MyawBug/Blockchain-By-Example
2d0495a130d1a9f91b7fb99359cbb8e9f7b9763d
[ "MIT" ]
51
2018-12-14T09:09:20.000Z
2022-03-28T03:25:45.000Z
chapter3/Readercoin_/test/functional/multiwallet.py
MyawBug/Blockchain-By-Example
2d0495a130d1a9f91b7fb99359cbb8e9f7b9763d
[ "MIT" ]
4
2019-08-02T18:23:17.000Z
2022-02-12T04:33:25.000Z
chapter3/Readercoin_/test/functional/multiwallet.py
xiaqingdoc/---
b15448739983b0787ffc963811294bcf44487303
[ "MIT" ]
42
2018-12-14T09:09:24.000Z
2022-03-31T01:49:35.000Z
#!/usr/bin/env python3 # Copyright (c) 2017 The Readercoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test multiwallet. Verify that a readercoind node can load multiple wallet files """ import os import shu...
41.164835
142
0.66551
b24919715bbd09366868029a979075945f20f6a6
5,486
py
Python
composer/models/bert/model.py
IanWorley/composer
e4d443012511b387ad495b4add3b3b101d729741
[ "Apache-2.0" ]
null
null
null
composer/models/bert/model.py
IanWorley/composer
e4d443012511b387ad495b4add3b3b101d729741
[ "Apache-2.0" ]
null
null
null
composer/models/bert/model.py
IanWorley/composer
e4d443012511b387ad495b4add3b3b101d729741
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 MosaicML. All Rights Reserved. """Implements a BERT wrapper around a :class:`.ComposerTransformer`.""" from __future__ import annotations from typing import TYPE_CHECKING, Mapping, Sequence, Union import torch from torchmetrics import Accuracy, MatthewsCorrcoef, MeanSquaredError, Metric, MetricColl...
40.940299
113
0.68374
0293c1b6701b671b15847dc057d26399c6a88eae
2,389
py
Python
playground/plugintest.py
einsweniger/mdt
906d765e387367654a02a36e9b5ba7aca4480ed6
[ "MIT" ]
9
2015-11-05T10:25:24.000Z
2019-03-04T09:01:41.000Z
playground/plugintest.py
einsweniger/mdt
906d765e387367654a02a36e9b5ba7aca4480ed6
[ "MIT" ]
15
2015-02-03T11:05:53.000Z
2017-11-20T12:43:46.000Z
playground/plugintest.py
einsweniger/mdt
906d765e387367654a02a36e9b5ba7aca4480ed6
[ "MIT" ]
2
2016-11-23T12:47:02.000Z
2018-11-01T18:19:20.000Z
import argparse import abc import collections import numbers import test.test_coroutines def attrs(**kwargs): def decorate(obj): for k in kwargs: setattr(obj, k, kwargs[k]) return decorate class Name(collections.Callable): def __call__(self, test): pass def __init__(self,...
23.89
118
0.614483
8f10db5bb72f2996584a8e2a7a233d71d2ae0040
39,724
py
Python
src/twisted/python/test/test_release.py
ndg63276/twisted
f672a20395e8beece6350631a70514f06c391bae
[ "Unlicense", "MIT" ]
null
null
null
src/twisted/python/test/test_release.py
ndg63276/twisted
f672a20395e8beece6350631a70514f06c391bae
[ "Unlicense", "MIT" ]
null
null
null
src/twisted/python/test/test_release.py
ndg63276/twisted
f672a20395e8beece6350631a70514f06c391bae
[ "Unlicense", "MIT" ]
null
null
null
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python.release} and L{twisted.python._release}. All of these tests are skipped on platforms other than Linux, as the release is only ever performed on Linux. """ import glob import functools import operator import os imp...
33.43771
88
0.603338
3d311d6e708c58d35ba42cbccf0e469f9ea147db
9,636
py
Python
afs/lla/BosServerLLAParse.py
chanke/afspy
525e7b3b53e58be515f11b83cc59ddb0765ef8e5
[ "BSD-2-Clause" ]
null
null
null
afs/lla/BosServerLLAParse.py
chanke/afspy
525e7b3b53e58be515f11b83cc59ddb0765ef8e5
[ "BSD-2-Clause" ]
null
null
null
afs/lla/BosServerLLAParse.py
chanke/afspy
525e7b3b53e58be515f11b83cc59ddb0765ef8e5
[ "BSD-2-Clause" ]
null
null
null
""" functions for parsing output from shell commands executed by lla.BosServer """ import datetime import re from BosServerLLAError import BosServerLLAError from afs.model import BNode def get_restart_times(ret, output, outerr, parse_param_list, logger): """ parses result from method of same name in lla.BosS...
33.458333
150
0.581465
78dc9e542ad8932b9c4f5e353298af0c78dff6d5
42,438
py
Python
sdk/python/pulumi_azure/appservice/environment_v3.py
roderik/pulumi-azure
f6d0c058d6f9111a709bc5f1515d1638f9d615f0
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/appservice/environment_v3.py
roderik/pulumi-azure
f6d0c058d6f9111a709bc5f1515d1638f9d615f0
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
sdk/python/pulumi_azure/appservice/environment_v3.py
roderik/pulumi-azure
f6d0c058d6f9111a709bc5f1515d1638f9d615f0
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
# coding=utf-8 # *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union, overload from .. import...
53.923761
291
0.696899
9883449d754b703140321f4eaa1bdbfbf1b7bc10
27,451
py
Python
web/addons/mail/tests/test_mail_message.py
diogocs1/comps
63df07f6cf21c41e4527c06e2d0499f23f4322e7
[ "Apache-2.0" ]
null
null
null
web/addons/mail/tests/test_mail_message.py
diogocs1/comps
63df07f6cf21c41e4527c06e2d0499f23f4322e7
[ "Apache-2.0" ]
null
null
null
web/addons/mail/tests/test_mail_message.py
diogocs1/comps
63df07f6cf21c41e4527c06e2d0499f23f4322e7
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
61.274554
217
0.641106
eb6c581882ba628589ac0d99b6740b864dc68cb6
16,350
py
Python
mbrl/util/mujoco.py
eanswer/mbrl-lib
576f4bea148bb674c79e85da51dccde50409d6a3
[ "MIT" ]
null
null
null
mbrl/util/mujoco.py
eanswer/mbrl-lib
576f4bea148bb674c79e85da51dccde50409d6a3
[ "MIT" ]
null
null
null
mbrl/util/mujoco.py
eanswer/mbrl-lib
576f4bea148bb674c79e85da51dccde50409d6a3
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved. # # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. from typing import Optional, Tuple, Union, cast import gym import gym.wrappers import hydra import numpy as np import ome...
40.671642
99
0.66367
c7981630e74b71834406fa968a115493be35170e
26,300
py
Python
mom6_tools/m6toolbox.py
NCAR/mom6-tools
e5a605eab97013a421a7ea8a93ae950f9e429730
[ "Apache-2.0" ]
8
2019-06-18T22:47:07.000Z
2022-02-10T16:22:47.000Z
mom6_tools/m6toolbox.py
NCAR/mom6-tools
e5a605eab97013a421a7ea8a93ae950f9e429730
[ "Apache-2.0" ]
5
2019-10-25T20:53:45.000Z
2020-10-06T18:56:46.000Z
mom6_tools/m6toolbox.py
NCAR/mom6-tools
e5a605eab97013a421a7ea8a93ae950f9e429730
[ "Apache-2.0" ]
8
2019-06-03T20:53:39.000Z
2021-12-10T22:41:58.000Z
""" A collection of useful functions... """ import numpy as np import numpy.ma as ma import tarfile from scipy.io import netcdf import xarray as xr from collections import OrderedDict import warnings def check_time_interval(ti,tf,nc): ''' Checks if year_start and year_end are within the time interval of the dataset''...
34.55979
120
0.570076
2b15d6f5eea3427159f316c106c48239a55207ab
3,140
py
Python
explore_theano/ffnn.py
AndreasMadsen/bachelor-code
115fd2b955de07f34cdec998ba2a7f103ae253e3
[ "MIT" ]
1
2015-06-16T06:53:52.000Z
2015-06-16T06:53:52.000Z
explore_theano/ffnn.py
AndreasMadsen/bachelor-code
115fd2b955de07f34cdec998ba2a7f103ae253e3
[ "MIT" ]
null
null
null
explore_theano/ffnn.py
AndreasMadsen/bachelor-code
115fd2b955de07f34cdec998ba2a7f103ae253e3
[ "MIT" ]
null
null
null
import matplotlib.pyplot as plt import numpy as np import theano import theano.tensor as T from datasets import generate_quadrant size = [2, 10, 4] eta = 0.4 momentum = 0.9 epochs = 400 # data input & output x = T.matrix('x') t = T.ivector('t') # forward pass W1 = theano.shared( np.random.randn(size[0], size[1]...
30.192308
95
0.659236
d1e12d102cd84fac01a7a6214abadce751fc9247
12,396
py
Python
emtgan/common.py
ai-health-care/EMT-CycleGAN
129d67bdb68137fe92bf3ca69fc2d4f4a83e87fa
[ "MIT" ]
null
null
null
emtgan/common.py
ai-health-care/EMT-CycleGAN
129d67bdb68137fe92bf3ca69fc2d4f4a83e87fa
[ "MIT" ]
null
null
null
emtgan/common.py
ai-health-care/EMT-CycleGAN
129d67bdb68137fe92bf3ca69fc2d4f4a83e87fa
[ "MIT" ]
1
2021-02-16T04:14:13.000Z
2021-02-16T04:14:13.000Z
import json import os with open('config.json', 'r') as f: config = json.load(f) root_dir = config.get('ROOT_DIR', '') data_dir = os.path.join(root_dir, 'data') model_dir = os.path.join(root_dir, 'saved_models') os.makedirs(model_dir, exist_ok=True) from itertools import chain import numpy as np import json impo...
31.382278
114
0.572927
f78ef081fb26eb1602d6daf472c05831daccf511
1,891
py
Python
tests/engine/inline_layout/test_inline_non_replaced.py
jonboland/colosseum
cbf974be54fd7f6fddbe7285704cfaf7a866c5c5
[ "BSD-3-Clause" ]
71
2015-04-13T09:44:14.000Z
2019-03-24T01:03:02.000Z
tests/engine/inline_layout/test_inline_non_replaced.py
jonboland/colosseum
cbf974be54fd7f6fddbe7285704cfaf7a866c5c5
[ "BSD-3-Clause" ]
35
2019-05-06T15:26:09.000Z
2022-03-28T06:30:33.000Z
tests/engine/inline_layout/test_inline_non_replaced.py
jonboland/colosseum
cbf974be54fd7f6fddbe7285704cfaf7a866c5c5
[ "BSD-3-Clause" ]
139
2015-05-30T18:37:43.000Z
2019-03-27T17:14:05.000Z
from colosseum.constants import AUTO, INLINE from colosseum.declaration import CSS from ...utils import LayoutTestCase, TestNode class WidthTests(LayoutTestCase): def test_no_horizontal_properties(self): node = TestNode( name='span', style=CSS(display=INLINE) ) nod...
28.223881
70
0.471179
a9cc5001bbeb024455fe3c94a161c187d0f65baa
818
py
Python
quality_from_b.py
tomekrzymyszkiewicz/TSP-simulated-annealing
f6d4cbd73ed48099bb545879cde83c974ecd6b03
[ "MIT" ]
null
null
null
quality_from_b.py
tomekrzymyszkiewicz/TSP-simulated-annealing
f6d4cbd73ed48099bb545879cde83c974ecd6b03
[ "MIT" ]
null
null
null
quality_from_b.py
tomekrzymyszkiewicz/TSP-simulated-annealing
f6d4cbd73ed48099bb545879cde83c974ecd6b03
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys import numpy as np import pandas as pd from matplotlib import pyplot as pllt from scipy.special import gamma def main(): if len(sys.argv)>1: data = pd.read_csv(str(sys.argv[1]),usecols=['graph_name','calculated_path_weight','defined_path_weight','b']) else: data = p...
31.461538
118
0.649144
6b9d6cc378db061952573961c5cb23c01aa648cd
2,529
py
Python
orders/views.py
halitdincer/etsynest
15b5a24382970ea893f8c0404e20ae9615e5b434
[ "MIT" ]
1
2022-01-14T21:40:46.000Z
2022-01-14T21:40:46.000Z
orders/views.py
halitdincer/etsynest
15b5a24382970ea893f8c0404e20ae9615e5b434
[ "MIT" ]
null
null
null
orders/views.py
halitdincer/etsynest
15b5a24382970ea893f8c0404e20ae9615e5b434
[ "MIT" ]
null
null
null
from django.shortcuts import render from django.http import JsonResponse from django.views.generic import ListView,DetailView from django.views.generic.base import TemplateView from django.utils import timezone from .models import Order,OrderItem class OrderListView(ListView): model = Order context_object_na...
37.191176
93
0.544484
68e45a2251b919e3a1e54ed2cb7964d51752a45f
5,477
py
Python
TheDigger_src/lib/waf.py
Jistrokz/TheDigger
d2831b0b8fdf75595c4049d885abb3e6a79b9a30
[ "MIT" ]
5
2021-06-20T16:49:06.000Z
2022-03-03T07:21:42.000Z
TheDigger_src/lib/waf.py
Jistrokz/TheDigger
d2831b0b8fdf75595c4049d885abb3e6a79b9a30
[ "MIT" ]
null
null
null
TheDigger_src/lib/waf.py
Jistrokz/TheDigger
d2831b0b8fdf75595c4049d885abb3e6a79b9a30
[ "MIT" ]
null
null
null
from requests.exceptions import TooManyRedirects, ConnectionError from TheDigger_src.utils.web_server_validator import WebServerValidator from TheDigger_src.utils.exceptions import WAFException, WebServerValidatorException from TheDigger_src.utils.request_handler import RequestHandler from TheDigger_src.utils.coloring ...
37.258503
125
0.610005
aa56294af55ce958366f8a6d23c72925ad815957
7,338
py
Python
Main.py
LiewMK/Pygame-SpriteGame-ProjectileMotion
784675223d865764d7e1dc574efc3b5b53b33405
[ "CC0-1.0" ]
null
null
null
Main.py
LiewMK/Pygame-SpriteGame-ProjectileMotion
784675223d865764d7e1dc574efc3b5b53b33405
[ "CC0-1.0" ]
null
null
null
Main.py
LiewMK/Pygame-SpriteGame-ProjectileMotion
784675223d865764d7e1dc574efc3b5b53b33405
[ "CC0-1.0" ]
null
null
null
import pygame import os from tkinter import * from level1 import * from level2 import * from level3 import * from level4 import * from level5 import* class mainmenu(): pygame.init() pygame.mixer.init() os.environ['SDL_VIDEO_WINDOW_POS'] = "%d,%d" % (70, 25) bg = pygame.image.load('MainMenu...
37.438776
95
0.455437
b11e1bdf3a67a2b1bd365ff70bba1df4bd7a7ecf
4,038
py
Python
55_Life/python/life.py
MartinThoma/basic-computer-games
bcd59488ff57bf7e52e152c6fc5fa964c76d0694
[ "Unlicense" ]
null
null
null
55_Life/python/life.py
MartinThoma/basic-computer-games
bcd59488ff57bf7e52e152c6fc5fa964c76d0694
[ "Unlicense" ]
null
null
null
55_Life/python/life.py
MartinThoma/basic-computer-games
bcd59488ff57bf7e52e152c6fc5fa964c76d0694
[ "Unlicense" ]
null
null
null
""" LIFE An implementation of John Conway's popular cellular automaton Ported by Dave LeCompte """ PAGE_WIDTH = 64 MAX_WIDTH = 70 MAX_HEIGHT = 24 def print_centered(msg): spaces = " " * ((PAGE_WIDTH - len(msg)) // 2) print(spaces + msg) def print_header(title): print_centered(title) print_cente...
23.206897
70
0.454681
9c1416479cb1af0eb592546e05f90ba4dd3ff5fc
5,430
py
Python
homeassistant/components/surepetcare/sensor.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
7
2019-02-07T14:14:12.000Z
2019-07-28T06:56:10.000Z
homeassistant/components/surepetcare/sensor.py
domwillcode/home-assistant
f170c80bea70c939c098b5c88320a1c789858958
[ "Apache-2.0" ]
47
2020-07-23T07:14:33.000Z
2022-03-31T06:01:46.000Z
homeassistant/components/surepetcare/sensor.py
klauern/home-assistant-core
c18ba6aec0627e6afb6442c678edb5ff2bb17db6
[ "Apache-2.0" ]
5
2020-03-29T00:29:13.000Z
2021-09-06T20:58:40.000Z
"""Support for Sure PetCare Flaps/Pets sensors.""" import logging from typing import Any, Dict, Optional from surepy import SureLockStateID, SureProductID from homeassistant.const import ( ATTR_VOLTAGE, CONF_ID, CONF_TYPE, DEVICE_CLASS_BATTERY, UNIT_PERCENTAGE, ) from homeassistant.core import cal...
29.351351
88
0.635175
bb66d58dc3efe04180995063e28aad40e413ba0d
291
py
Python
examples/errors2/components/dnsproblem2/component.py
gocept/batou
4d239996f464c406cde82c48155e5b8273a9063d
[ "BSD-2-Clause-FreeBSD" ]
34
2019-09-06T05:30:10.000Z
2022-03-12T01:25:38.000Z
examples/errors2/components/dnsproblem2/component.py
gocept/batou
4d239996f464c406cde82c48155e5b8273a9063d
[ "BSD-2-Clause-FreeBSD" ]
204
2019-09-05T14:41:12.000Z
2022-03-10T12:14:37.000Z
examples/errors2/components/dnsproblem2/component.py
gocept/batou
4d239996f464c406cde82c48155e5b8273a9063d
[ "BSD-2-Clause-FreeBSD" ]
25
2019-10-10T07:13:41.000Z
2022-03-24T14:52:25.000Z
from batou.component import Component from batou.utils import Address class DNSProblem2(Component): attribute_without_v6 = Address("localhost:22", require_v6=False) def configure(self): # Accessing `listen_v6` causes an error: self.attribute_without_v6.listen_v6
24.25
68
0.749141
220d0531cd02708df98da8c5cd47aeec1402292e
7,845
py
Python
README/functions.py
cnickle/penquins
3d09eeaa887f8ec56e65b7b6b87a51da824d3edf
[ "Apache-2.0" ]
null
null
null
README/functions.py
cnickle/penquins
3d09eeaa887f8ec56e65b7b6b87a51da824d3edf
[ "Apache-2.0" ]
3
2021-07-06T00:23:39.000Z
2021-11-20T14:59:33.000Z
README/functions.py
cnickle/penquins
3d09eeaa887f8ec56e65b7b6b87a51da824d3edf
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu Sep 19 18:46:23 2019 Functions to be used in fitting and calculations @author: Cameron """ import numpy as np from scipy.integrate import quad from scipy.integrate import dblquad from numba import jit import pandas as pd import matplotlib.pyplot as plt eV = 1 #Energy K = 1 #...
33.101266
99
0.555895
e63abc84154942e7b4a739113172dd9f4df28c15
18,333
py
Python
matrix/plugin.program.openwizard/resources/libs/common/config.py
nzmodbox/repo.modbox
5a5d77089f94f2fdde755ccc2e5f93e81f54f261
[ "Apache-2.0" ]
null
null
null
matrix/plugin.program.openwizard/resources/libs/common/config.py
nzmodbox/repo.modbox
5a5d77089f94f2fdde755ccc2e5f93e81f54f261
[ "Apache-2.0" ]
null
null
null
matrix/plugin.program.openwizard/resources/libs/common/config.py
nzmodbox/repo.modbox
5a5d77089f94f2fdde755ccc2e5f93e81f54f261
[ "Apache-2.0" ]
null
null
null
################################################################################ # Copyright (C) 2019 drinfernoo # # # # This Program is free software; you can redistribute it and/or modify ...
51.209497
130
0.598211
2d36cad24d564b91d0467bc3491891f3a3bfca9d
569
py
Python
todo/api.py
joyinsky/tododjango
a2449b08182646f00a5b54694ca8297d961f231e
[ "MIT" ]
1
2015-12-26T21:20:02.000Z
2015-12-26T21:20:02.000Z
todo/api.py
joyinsky/tododjango
a2449b08182646f00a5b54694ca8297d961f231e
[ "MIT" ]
null
null
null
todo/api.py
joyinsky/tododjango
a2449b08182646f00a5b54694ca8297d961f231e
[ "MIT" ]
null
null
null
#!/usr/bin/env python from django.conf.urls import patterns, include, url from rest_framework import viewsets, routers, serializers from .models import Todo class TodoSerializer(serializers.ModelSerializer): class Meta: model = Todo class TodoViewSet(viewsets.ModelViewSet): model = Todo seriali...
23.708333
82
0.738137
3b1ec2ca7bb8fa732580023379c58e88c6fd9f7c
1,077
py
Python
scripts/artifacts/pSettings.py
qubytelogic/abrignoni-ALEAPP
53724d5b7cacf2fb57c4aa4d10a929b4260ffb71
[ "MIT" ]
2
2020-11-18T21:43:06.000Z
2022-03-22T14:34:50.000Z
scripts/artifacts/pSettings.py
qubytelogic/abrignoni-ALEAPP
53724d5b7cacf2fb57c4aa4d10a929b4260ffb71
[ "MIT" ]
null
null
null
scripts/artifacts/pSettings.py
qubytelogic/abrignoni-ALEAPP
53724d5b7cacf2fb57c4aa4d10a929b4260ffb71
[ "MIT" ]
null
null
null
import sqlite3 import textwrap from scripts.artifact_report import ArtifactHtmlReport from scripts.ilapfuncs import logfunc, is_platform_windows def get_pSettings(files_found, report_folder, seeker): file_found = str(files_found[0]) db = sqlite3.connect(file_found) cursor = db.cursor() cursor.exe...
28.342105
131
0.675952
7f754a69a374bf61babff7902c57e86c45f527ef
17,993
py
Python
odoo-13.0/addons/l10n_ch/models/account_invoice.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/l10n_ch/models/account_invoice.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
odoo-13.0/addons/l10n_ch/models/account_invoice.py
VaibhavBhujade/Blockchain-ERP-interoperability
b5190a037fb6615386f7cbad024d51b0abd4ba03
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import re from odoo import models, fields, api, _ from odoo.exceptions import ValidationError, UserError from odoo.tools.float_utils import float_split_str from odoo.tools.misc import mod10r l10n_ch_ISR_NUMBER_LENGTH ...
47.981333
267
0.644473
f0a2241dd8ecada63ae43e0942dec04d3a306997
410
py
Python
tests/test_database.py
ltalirz/mofchecker
ea0bc5a05cc951f40aeb42d54fd5e30af4db21d9
[ "MIT" ]
5
2020-11-03T19:26:14.000Z
2021-11-11T12:20:18.000Z
tests/test_database.py
ltalirz/mofchecker
ea0bc5a05cc951f40aeb42d54fd5e30af4db21d9
[ "MIT" ]
114
2020-11-30T09:38:54.000Z
2022-03-25T04:02:25.000Z
tests/test_database.py
ltalirz/mofchecker
ea0bc5a05cc951f40aeb42d54fd5e30af4db21d9
[ "MIT" ]
3
2020-12-08T10:44:31.000Z
2021-08-23T15:00:25.000Z
# -*- coding: utf-8 -*- """Testing the database module""" from mofchecker.database import MOFCheckerDB def test_mofcheckerdb(): """Test the database lookup""" database = MOFCheckerDB() assert len(database.lookup_composition("H54 C90 N18 O12")) == 1 assert len(database.lookup_graph_hash("f75ab1f9032051...
34.166667
83
0.721951
a72e8dc1a12f9fba6c8b2f7176709a85531b074c
1,128
py
Python
adminmgr/media/code/A3/task2/BD_494_707_801_1130_Xc88Orx.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
9
2019-11-08T02:05:27.000Z
2021-12-13T12:06:35.000Z
adminmgr/media/code/A3/task2/BD_494_707_801_1130_Xc88Orx.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
6
2019-11-27T03:23:16.000Z
2021-06-10T19:15:13.000Z
adminmgr/media/code/A3/task2/BD_494_707_801_1130_Xc88Orx.py
IamMayankThakur/test-bigdata
cef633eb394419b955bdce479699d0115d8f99c3
[ "Apache-2.0" ]
4
2019-11-26T17:04:27.000Z
2021-12-13T11:57:03.000Z
import findspark findspark.init() from pyspark.sql import SparkSession from pyspark.sql.functions import explode from pyspark.sql.functions import split from pyspark.sql.types import StructType from pyspark.sql.functions import col spark = SparkSession\ .builder\ .appName("Task1_2")\ .getOrCreate() userSchema ...
36.387097
190
0.712766
b7bfe1f80b25e96deab0a50edfd16895060b1d4c
10,636
py
Python
test/functional/wallet_backup.py
driyal/driyal
7bcf75dc7e6df61243760071cff4b7bfd72f1535
[ "MIT" ]
null
null
null
test/functional/wallet_backup.py
driyal/driyal
7bcf75dc7e6df61243760071cff4b7bfd72f1535
[ "MIT" ]
null
null
null
test/functional/wallet_backup.py
driyal/driyal
7bcf75dc7e6df61243760071cff4b7bfd72f1535
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Copyright (c) 2014-2021 The DRiyal Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the wallet backup features. Test case is: 4 nodes. 1 2 and 3 send transactions between each other,...
41.065637
159
0.662749
16d66178946c3f9076a98f20174b8e29879d4f0a
8,128
py
Python
Model/predictor-dl-model/predictor_dl_model/trainer/hparams.py
rangaswamymr/incubator-bluemarlin
6cb60b2a41edc6509377f9eacb7660d199a9485b
[ "Apache-2.0" ]
null
null
null
Model/predictor-dl-model/predictor_dl_model/trainer/hparams.py
rangaswamymr/incubator-bluemarlin
6cb60b2a41edc6509377f9eacb7660d199a9485b
[ "Apache-2.0" ]
null
null
null
Model/predictor-dl-model/predictor_dl_model/trainer/hparams.py
rangaswamymr/incubator-bluemarlin
6cb60b2a41edc6509377f9eacb7660d199a9485b
[ "Apache-2.0" ]
null
null
null
# MIT License # Copyright (c) 2018 Artur Suilin # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, p...
37.114155
426
0.735974
caebdb2f116cc17fa758e605bcf40081f3b8c9b1
4,361
py
Python
Plugins/UnrealEnginePython/Binaries/Win64/Lib/site-packages/tensorflow/python/ops/image_grad.py
JustinACoder/H22-GR3-UnrealAI
361eb9ef1147f8a2991e5f98c4118cd823184adf
[ "MIT" ]
6
2022-02-04T18:12:24.000Z
2022-03-21T23:57:12.000Z
Lib/site-packages/tensorflow/python/ops/image_grad.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
null
null
null
Lib/site-packages/tensorflow/python/ops/image_grad.py
shfkdroal/Robot-Learning-in-Mixed-Adversarial-and-Collaborative-Settings
1fa4cd6a566c8745f455fc3d2273208f21f88ced
[ "bzip2-1.0.6" ]
1
2022-02-08T03:53:23.000Z
2022-02-08T03:53:23.000Z
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
34.338583
81
0.700069
7b7a62940f0b2a14bc7b02f4b89c1d68a324c753
1,439
py
Python
dosagelib/helpers.py
Null000/dosage
391313972cf6feda7db27c1a411e543af44581cd
[ "MIT" ]
22
2015-01-16T23:58:44.000Z
2022-02-02T03:32:19.000Z
dosagelib/helpers.py
Null000/dosage
391313972cf6feda7db27c1a411e543af44581cd
[ "MIT" ]
29
2015-01-03T10:07:38.000Z
2020-03-12T13:33:10.000Z
dosagelib/helpers.py
Null000/dosage
391313972cf6feda7db27c1a411e543af44581cd
[ "MIT" ]
13
2015-01-26T09:18:56.000Z
2022-03-17T09:40:42.000Z
# -*- coding: iso-8859-1 -*- # Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs # Copyright (C) 2012-2014 Bastian Kleineidam from .util import getQueryParams def queryNamer(paramName, usePageUrl=False): """Get name from URL query part.""" @classmethod def _namer(cls, imageUrl, pageUrl): ...
29.979167
63
0.644892
0fec38e739a93c454566a7a7e829464435e594b4
317
py
Python
ABC/abc001-abc050/abc029/c.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
2
2020-06-12T09:54:23.000Z
2021-05-04T01:34:07.000Z
ABC/abc001-abc050/abc029/c.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
961
2020-06-23T07:26:22.000Z
2022-03-31T21:34:52.000Z
ABC/abc001-abc050/abc029/c.py
KATO-Hiro/AtCoder
cbbdb18e95110b604728a54aed83a6ed6b993fde
[ "CC0-1.0" ]
null
null
null
# -*- coding: utf-8 -*- def main(): from itertools import product n = int(input()) # See: # https://docs.python.jp/3/library/itertools.html#itertools.product for j in sorted(list(product(['a', 'b', 'c'], repeat=n))): print(''.join(map(str, j))) if __name__ == '__main__': main()
18.647059
71
0.567823
2e59f60d5c528e92ab0f5a083d203d76e67f8439
890
py
Python
solver/core/function.py
robalar/A2_Project
33413ea622963ad200077de9a45d061b044ef3f2
[ "MIT" ]
null
null
null
solver/core/function.py
robalar/A2_Project
33413ea622963ad200077de9a45d061b044ef3f2
[ "MIT" ]
null
null
null
solver/core/function.py
robalar/A2_Project
33413ea622963ad200077de9a45d061b044ef3f2
[ "MIT" ]
null
null
null
from .expr import Expression class Function(Expression): name = None commutative = False nargs = 1 @property def derivative(self): return None def __new__(cls, *args): if len(args) > cls.nargs: raise ValueError('Too many args passed to {}'.format(c...
24.722222
88
0.569663
041ccca3a14a02334dd99d15921cbaa9cbc39b3f
857
py
Python
opencensus/metrics_quickstart_test.py
HoleCat/echarlosperros
b67460de0467e05b42a763c4430b26ecfd97c2aa
[ "Apache-2.0" ]
null
null
null
opencensus/metrics_quickstart_test.py
HoleCat/echarlosperros
b67460de0467e05b42a763c4430b26ecfd97c2aa
[ "Apache-2.0" ]
null
null
null
opencensus/metrics_quickstart_test.py
HoleCat/echarlosperros
b67460de0467e05b42a763c4430b26ecfd97c2aa
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
37.26087
75
0.742124
b04b2ce44ff529ecac2659dc04721691169f3bf7
1,342
py
Python
examples/italic.py
tresoldi/malign
dad7f2585db3b12f2edbf587f591463aed7c98f5
[ "MIT" ]
null
null
null
examples/italic.py
tresoldi/malign
dad7f2585db3b12f2edbf587f591463aed7c98f5
[ "MIT" ]
1
2020-08-07T13:01:29.000Z
2020-08-07T13:01:29.000Z
examples/italic.py
tresoldi/malign
dad7f2585db3b12f2edbf587f591463aed7c98f5
[ "MIT" ]
null
null
null
import os import csv from pathlib import Path from collections import defaultdict import catcoocc RESOURCE_PATH = Path(os.path.realpath(__file__)).parent.parent / "resources" def load_data(languages): # Collect data filename = RESOURCE_PATH / "northeuralex_italic.tsv" # Collect cogids cogid = defau...
24.851852
78
0.649031
bb9534a830f351f56cbb84e3496e9b2b288d8f1d
6,361
py
Python
pytorch_pretrained_bert/__main__.py
andrew4242/transformers
93e9971c54e060e528adfdb0ebe149f2b284d660
[ "Apache-2.0" ]
null
null
null
pytorch_pretrained_bert/__main__.py
andrew4242/transformers
93e9971c54e060e528adfdb0ebe149f2b284d660
[ "Apache-2.0" ]
null
null
null
pytorch_pretrained_bert/__main__.py
andrew4242/transformers
93e9971c54e060e528adfdb0ebe149f2b284d660
[ "Apache-2.0" ]
null
null
null
# coding: utf8 def main(): import sys if (len(sys.argv) < 4 or len(sys.argv) > 6) or sys.argv[1] not in ["bert", "gpt", "transfo_xl", "gpt2", "xlnet"]: print( "Should be used as one of: \n" ">> `pytorch_pretrained_bert bert TF_CHECKPOINT TF_CONFIG PYTORCH_DUMP_OUTPUT`, \n" ">> `p...
55.313043
146
0.580412
2b2123bb33d6cc1124b1de4626c8d986a45acd86
20,306
py
Python
Lander/Main_MoonLander.py
IrvKalb/pygwidgetsExamples
0239edfc8553bf51a95d330107dfec48ff1581c1
[ "BSD-3-Clause" ]
1
2022-01-05T13:35:08.000Z
2022-01-05T13:35:08.000Z
Lander/Main_MoonLander.py
IrvKalb/pygwidgetsExamples
0239edfc8553bf51a95d330107dfec48ff1581c1
[ "BSD-3-Clause" ]
null
null
null
Lander/Main_MoonLander.py
IrvKalb/pygwidgetsExamples
0239edfc8553bf51a95d330107dfec48ff1581c1
[ "BSD-3-Clause" ]
null
null
null
#Moon Lander, where we try to land in 1 of the 3 landing pads, and keep speed under 2 m/s import pygame from pygame.locals import * import sys import random import pygwidgets import pyghelpers BLACK = (0, 0, 0) WHITE = (255, 255, 255) RED = (255, 0, 0) YELLOW = (255, 255, 0) GREEN = (0, 255, 0) ORANGE = (255, 100, ...
33.343186
142
0.616025
6c82451086b41e84ad4586d411ffc25c3e3a2486
5,557
py
Python
bird/mdct_tools.py
mmoussallam/bird
6a362de7d3a52dfcddaed13e8c736d039b03fbb4
[ "BSD-3-Clause" ]
11
2015-02-02T21:41:41.000Z
2022-03-12T17:23:01.000Z
bird/mdct_tools.py
mmoussallam/bird
6a362de7d3a52dfcddaed13e8c736d039b03fbb4
[ "BSD-3-Clause" ]
1
2021-01-03T20:45:36.000Z
2021-01-04T16:02:49.000Z
bird/mdct_tools.py
mmoussallam/bird
6a362de7d3a52dfcddaed13e8c736d039b03fbb4
[ "BSD-3-Clause" ]
5
2016-04-06T20:42:27.000Z
2021-01-03T20:42:53.000Z
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Manuel Moussallam <manuel.moussallam@gmail.com> # # License: BSD (3-clause) import math import numpy as np from scipy import linalg from scipy.fftpack import fft, ifft import six def _framing(a, L): shape = a.shape[:-1] + (a.shape[-1] - L + 1...
23.447257
78
0.506568
135d86aae6a0f39fefe90508b4c01d4489506412
1,129
py
Python
pro1.py
griledchicken/VAMPY-2017-CS
1bc71734751850b580b481eac51c5c235d0ca9e2
[ "MIT" ]
null
null
null
pro1.py
griledchicken/VAMPY-2017-CS
1bc71734751850b580b481eac51c5c235d0ca9e2
[ "MIT" ]
null
null
null
pro1.py
griledchicken/VAMPY-2017-CS
1bc71734751850b580b481eac51c5c235d0ca9e2
[ "MIT" ]
null
null
null
import turtle as t def triangle(size): t.forward(size) t.right(120) t.forward(size*2) t.right(120) t.forward(size*3) t.right(120) t.forward(size*4) t.right(120) t.forward(size*5) t.right(120) t.forward(size*6) t.right(120) t.forward(size*7) t.right(120) t.forward(size*8) t.right(120) t.forward(size*9...
13.768293
23
0.647476
ee052f7e2f4cdb2b89ef700d4c610582802d401f
1,868
py
Python
ironic_inspector/migrations/versions/578f84f38d_inital_db_schema.py
mail2nsrajesh/ironic-inspector
7fa31ac6be2c1a03a0b2303b01e363cab14794a5
[ "Apache-2.0" ]
null
null
null
ironic_inspector/migrations/versions/578f84f38d_inital_db_schema.py
mail2nsrajesh/ironic-inspector
7fa31ac6be2c1a03a0b2303b01e363cab14794a5
[ "Apache-2.0" ]
null
null
null
ironic_inspector/migrations/versions/578f84f38d_inital_db_schema.py
mail2nsrajesh/ironic-inspector
7fa31ac6be2c1a03a0b2303b01e363cab14794a5
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Cisco Systems, Inc. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
29.1875
75
0.670236
4ed9014eabe49126bd4bac0a2f19df702b3d2933
1,261
py
Python
items.py
shawnantonucci/Zomb1e-Mud
05f6eeeae7487d3f03cbc1aa1872bf557201746e
[ "MIT" ]
1
2019-06-08T01:39:22.000Z
2019-06-08T01:39:22.000Z
items.py
shawnantonucci/Zomb1e-Mud
05f6eeeae7487d3f03cbc1aa1872bf557201746e
[ "MIT" ]
1
2019-06-04T06:15:09.000Z
2019-06-04T06:15:09.000Z
items.py
shawnantonucci/Zomb1e-Mud
05f6eeeae7487d3f03cbc1aa1872bf557201746e
[ "MIT" ]
null
null
null
class Weapon: def __init__(self): raise NotImplementedError("Do not create raw Weapon objects.") def __str__(self): return self.name class Rock(Weapon): def __init__(self): self.name = "Rock" self.description = "A rock the size of a baseball." self.damage = 5 ...
25.734694
74
0.618557
3fe8ebb16d842258bc5528008b78414254fb9acc
47,111
py
Python
keras-ResNet50/tensorflow/python/ops/gen_spectral_ops.py
wuh0007/severless_ML_live
088b78b06434583b7443ab877a6cdd80121bb8d1
[ "MIT" ]
1
2020-07-06T14:18:59.000Z
2020-07-06T14:18:59.000Z
keras-ResNet50/tensorflow/python/ops/gen_spectral_ops.py
wuh0007/severless_ML_live
088b78b06434583b7443ab877a6cdd80121bb8d1
[ "MIT" ]
null
null
null
keras-ResNet50/tensorflow/python/ops/gen_spectral_ops.py
wuh0007/severless_ML_live
088b78b06434583b7443ab877a6cdd80121bb8d1
[ "MIT" ]
null
null
null
"""Python wrappers around TensorFlow ops. This file is MACHINE GENERATED! Do not edit. Original C++ source file: spectral_ops.cc """ import collections as _collections import six as _six from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow from tensorflow.python.eager import context as _context from...
31.874831
2,090
0.675278
f8fbd355ee987eeac36dbe213f512a5ac5b67060
3,075
py
Python
test/unit_tests/test_init_workspace.py
dseifert/catkin
f972729b3f99479e0844e304b575b6f2a96c5779
[ "BSD-3-Clause" ]
250
2015-01-02T09:29:09.000Z
2022-03-28T08:48:28.000Z
test/unit_tests/test_init_workspace.py
dseifert/catkin
f972729b3f99479e0844e304b575b6f2a96c5779
[ "BSD-3-Clause" ]
456
2015-01-01T00:42:47.000Z
2022-03-22T13:36:33.000Z
test/unit_tests/test_init_workspace.py
dseifert/catkin
f972729b3f99479e0844e304b575b6f2a96c5779
[ "BSD-3-Clause" ]
261
2015-01-10T14:07:49.000Z
2022-03-26T13:29:58.000Z
import os import shutil import tempfile import unittest from os.path import join try: from catkin.init_workspace import init_workspace, _symlink_or_copy except ImportError as impe: raise ImportError( 'Please adjust your pythonpath before running this test: %s' % str(impe)) class InitWorkspaceTest(uni...
40.460526
81
0.522276
8e830a2f5c443ac94ea773ca1e7a56ade3172bce
258
py
Python
palindrome.py
Ratheshprabakar/Python-Programs
fca9d4f0b5f5f5693b3d7e25c6d890f4973dc19e
[ "MIT" ]
2
2019-07-10T06:32:05.000Z
2019-11-13T07:52:53.000Z
palindrome.py
Ratheshprabakar/Python-Programs
fca9d4f0b5f5f5693b3d7e25c6d890f4973dc19e
[ "MIT" ]
null
null
null
palindrome.py
Ratheshprabakar/Python-Programs
fca9d4f0b5f5f5693b3d7e25c6d890f4973dc19e
[ "MIT" ]
1
2019-10-12T06:56:13.000Z
2019-10-12T06:56:13.000Z
#Python program to check whether the number is a palindrome or not def palindrome(a): if(a[::-1]==a): print(a,"is palindrome") else: print(a,"is not a palindrome") def main(): a=input("Enter a number") palindrome(a) if __name__=='__main__': main()
19.846154
66
0.678295
6b90c5179ad41c3027104211c129a4081c39a60a
584
py
Python
Python/library_examples/sensors/optical/isl29125.py
treehopper-electronics/treehopper-sdk
1abe8aacd9723470e1a4ffe734cdecfda2110ae3
[ "MIT" ]
3
2018-03-16T07:00:42.000Z
2022-03-27T00:39:55.000Z
Python/library_examples/sensors/optical/isl29125.py
treehopper-electronics/treehopper-sdk
1abe8aacd9723470e1a4ffe734cdecfda2110ae3
[ "MIT" ]
16
2016-08-12T18:51:04.000Z
2021-04-16T16:14:07.000Z
Python/library_examples/sensors/optical/isl29125.py
treehopper-electronics/treehopper-sdk
1abe8aacd9723470e1a4ffe734cdecfda2110ae3
[ "MIT" ]
6
2015-11-04T15:53:49.000Z
2020-06-25T18:34:47.000Z
from time import sleep from treehopper.api import * from treehopper.libraries.sensors.optical import Isl29125 from colr import color def data_received(sender, red, green, blue): max_val = max(red, max(green, blue)) r = 255 * red / max_val g = 255 * green / max_val b = 255 * blue / max_val print(co...
26.545455
115
0.669521
31d8692254e889f496103927aa5475a765caa49f
4,564
py
Python
src/lava/lib/dl/slayer/block/rf.py
PeaBrane/lava-dl
b205b4e0466788c5232ff20497ac0fc433cbccca
[ "BSD-3-Clause" ]
null
null
null
src/lava/lib/dl/slayer/block/rf.py
PeaBrane/lava-dl
b205b4e0466788c5232ff20497ac0fc433cbccca
[ "BSD-3-Clause" ]
null
null
null
src/lava/lib/dl/slayer/block/rf.py
PeaBrane/lava-dl
b205b4e0466788c5232ff20497ac0fc433cbccca
[ "BSD-3-Clause" ]
null
null
null
# Copyright (C) 2021 Intel Corporation # SPDX-License-Identifier: BSD-3-Clause """Resonate and Fire layer blocks.""" import torch from . import base from ..neuron import rf from ..synapse import complex as synapse from ..axon import Delay class AbstractRF(torch.nn.Module): """Abstract Resonate and Fire block ...
31.475862
71
0.690403
19a53dfcd71eba6ea39ed9e2edae01a1d834dc74
39,166
py
Python
src/m1_Point.py
nandoltw/09-ImplementingClasses
0f1791ba782a8b5a98a757a621085742c1cf73e0
[ "MIT" ]
null
null
null
src/m1_Point.py
nandoltw/09-ImplementingClasses
0f1791ba782a8b5a98a757a621085742c1cf73e0
[ "MIT" ]
null
null
null
src/m1_Point.py
nandoltw/09-ImplementingClasses
0f1791ba782a8b5a98a757a621085742c1cf73e0
[ "MIT" ]
null
null
null
""" A simple Point class. NOTE: This is NOT rosegraphics -- it is your OWN Point class. Authors: David Mutchler, Vibha Alangar, Dave Fisher, Amanda Stouder, their colleagues and Thomas Nandola. """ # DONE: 1. PUT YOUR NAME IN THE ABOVE LINE. def main(): """ Calls the TEST functions in this modu...
33.734711
80
0.529464
f354a78723caeaabf67be50a9816a92727419d2c
5,969
py
Python
2_ConvolutionalGANs/scoring.py
PacktPublishing/Generative-Adversarial-Networks-with-PyTorch-1.0-Cookbook
c9b8dcf57e03a11683254ca2b662c3503b5ead36
[ "MIT" ]
9
2019-06-10T13:05:19.000Z
2021-11-08T13:10:48.000Z
2_ConvolutionalGANs/scoring.py
urantialife/Generative-Adversarial-Networks-with-PyTorch-1.0-Cookbook
a228d141b36b0a6276cf17d6ac5a8978b8df9a60
[ "MIT" ]
null
null
null
2_ConvolutionalGANs/scoring.py
urantialife/Generative-Adversarial-Networks-with-PyTorch-1.0-Cookbook
a228d141b36b0a6276cf17d6ac5a8978b8df9a60
[ "MIT" ]
7
2019-01-30T01:59:18.000Z
2020-09-19T05:47:07.000Z
""" This function calculates the Frechet Inception Distance between two datasets. """ import argparse import os import numpy as np import sys from scipy import linalg from scipy.misc import imread from PIL import Image import torch import torch.nn as nn import torchvision as tv import torch.nn.functional as F from to...
33.723164
77
0.612665
1064edd9327c9874ba52d70b4fc96d607b186e8b
3,556
py
Python
option/option.py
dustinmaurer/options-strategy-backtester
1974bfd672d163a39f928208f36a8470a99e1a48
[ "MIT" ]
null
null
null
option/option.py
dustinmaurer/options-strategy-backtester
1974bfd672d163a39f928208f36a8470a99e1a48
[ "MIT" ]
null
null
null
option/option.py
dustinmaurer/options-strategy-backtester
1974bfd672d163a39f928208f36a8470a99e1a48
[ "MIT" ]
1
2021-04-11T07:18:55.000Z
2021-04-11T07:18:55.000Z
"""The Option oobject stores (or solves for) all attributes of an option""" import scipy.stats as sps from scipy.special import ndtri import numpy as np from datetime import date, timedelta class Option: def __init__(self, underlying, kind, strike, expiration, iv=.2, value=None, delta=None): """ A ...
30.655172
147
0.580427
a219df200161163a0252f1444a6322873e6709d1
84
py
Python
inclearn/models/__init__.py
ZepengHuo/DER_growing_representation
d711034c550bcac40a6ec7dfa1c65a79589efe93
[ "MIT" ]
79
2021-03-29T07:50:31.000Z
2022-03-30T04:13:27.000Z
inclearn/models/__init__.py
ZepengHuo/DER_growing_representation
d711034c550bcac40a6ec7dfa1c65a79589efe93
[ "MIT" ]
20
2021-04-07T01:42:24.000Z
2022-03-18T08:59:30.000Z
inclearn/models/__init__.py
ZepengHuo/DER_growing_representation
d711034c550bcac40a6ec7dfa1c65a79589efe93
[ "MIT" ]
12
2021-07-02T02:33:54.000Z
2022-02-21T11:23:20.000Z
from .incmodel import IncModel from .align import Weight_Align from .bic import BiC
21
31
0.821429
30b9c9018b5c9851dde0a3273527b9eb77558731
959
py
Python
test_calculator.py
python-frederick/python-testing-101
5bbce304c76a73548612c6ab702f3ee43bf6b00d
[ "MIT" ]
9
2019-04-19T01:20:26.000Z
2022-03-17T00:17:53.000Z
test_calculator.py
SlikNik/python-testing-101
5bbce304c76a73548612c6ab702f3ee43bf6b00d
[ "MIT" ]
null
null
null
test_calculator.py
SlikNik/python-testing-101
5bbce304c76a73548612c6ab702f3ee43bf6b00d
[ "MIT" ]
6
2020-06-13T21:58:48.000Z
2022-03-01T11:08:56.000Z
import pytest from calculator import Calculator, CalculatorError def test_add(): calculator = Calculator() result = calculator.add(2, 3) assert result == 5 def test_add_weird_stuff(): calculator = Calculator() with pytest.raises(CalculatorError): result = calculator.add("two", 3) d...
16.824561
50
0.668405
8f07c8d8edf28b78cca982cdba8d73df3042ceaa
1,057
py
Python
app.py
DavidCastilloAlvarado/Movilnet_Object_detection_JS
6bc85b24deb40b74cf08e9395d889c9e46b40346
[ "MIT" ]
null
null
null
app.py
DavidCastilloAlvarado/Movilnet_Object_detection_JS
6bc85b24deb40b74cf08e9395d889c9e46b40346
[ "MIT" ]
null
null
null
app.py
DavidCastilloAlvarado/Movilnet_Object_detection_JS
6bc85b24deb40b74cf08e9395d889c9e46b40346
[ "MIT" ]
null
null
null
#!/usr/bin/env python from importlib import import_module import os from flask import Flask, render_template, Response # import camera driver #if os.environ.get('CAMERA'): # Camera = import_module('camera_' + os.environ['CAMERA']).Camera #else: # from camera import Camera from camera_opencv import Camera # Rasp...
26.425
77
0.66982
8c0c5efec21c547f948c11930d67575e95ab01a5
569
py
Python
model/group.py
BrotherGelo/Software-Testing_first_task
c46d5c000fdad2030c119e4cad3a8ba0a8d8aa3f
[ "Apache-2.0" ]
null
null
null
model/group.py
BrotherGelo/Software-Testing_first_task
c46d5c000fdad2030c119e4cad3a8ba0a8d8aa3f
[ "Apache-2.0" ]
null
null
null
model/group.py
BrotherGelo/Software-Testing_first_task
c46d5c000fdad2030c119e4cad3a8ba0a8d8aa3f
[ "Apache-2.0" ]
null
null
null
from sys import maxsize class Group: def __init__(self, name=None, header=None, footer=None, id=None): self.name = name self.footer = footer self.header = header self.id = id def __repr__(self): return "%s:%s:%s:%s" % (self.id, self.name, self.header, self.footer) ...
25.863636
103
0.58348
d7368e830bcf23126d257ec5df4b04eb8c54619b
1,504
py
Python
experiments/benchmarking/stress-ng/second/yaml2json.py
ljishen/kividry
931e7248f4a3447cf7a0378adb51a5ad380bd96a
[ "Apache-2.0" ]
null
null
null
experiments/benchmarking/stress-ng/second/yaml2json.py
ljishen/kividry
931e7248f4a3447cf7a0378adb51a5ad380bd96a
[ "Apache-2.0" ]
null
null
null
experiments/benchmarking/stress-ng/second/yaml2json.py
ljishen/kividry
931e7248f4a3447cf7a0378adb51a5ad380bd96a
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python import yaml import sys import os # usage: postprocess <stressor_class> <method> # # when <method> is given, we assume only one entry in the yaml output out_file_path = os.path.dirname(os.path.realpath(__file__))+'/out.yml'; with open(out_file_path, 'r') as f: y = yaml.load(f) stressor_cla...
30.08
77
0.563165
f4839ea12416affbdf97e2da9180f382b711554d
10,034
py
Python
mobie/utils.py
platybrowser/mobie-python
43341cd92742016a3a0d602325bb93b94c3b4c36
[ "MIT" ]
1
2020-03-03T01:33:06.000Z
2020-03-03T01:33:06.000Z
mobie/utils.py
platybrowser/mobie-python
43341cd92742016a3a0d602325bb93b94c3b4c36
[ "MIT" ]
4
2020-05-15T09:27:59.000Z
2020-05-29T19:15:00.000Z
mobie/utils.py
platybrowser/mobie-python
43341cd92742016a3a0d602325bb93b94c3b4c36
[ "MIT" ]
2
2020-06-08T07:06:01.000Z
2020-06-08T07:08:08.000Z
import argparse import json import multiprocessing import os from copy import deepcopy import mobie.metadata as metadata from cluster_tools.cluster_tasks import BaseClusterTask from elf.io import open_file from mobie.validation import validate_view_metadata from pybdv.util import get_key FILE_FORMATS = [ "bdv.hdf...
40.297189
112
0.64999
09b7144e50e8de2fe90f37d811761c53dd3b297a
2,127
py
Python
kubernetes/test/test_com_coreos_monitoring_v1_alertmanager_spec_security_context1_windows_options.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_com_coreos_monitoring_v1_alertmanager_spec_security_context1_windows_options.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
kubernetes/test/test_com_coreos_monitoring_v1_alertmanager_spec_security_context1_windows_options.py
mariusgheorghies/python
68ac7e168963d8b5a81dc493b1973d29e903a15b
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Kubernetes No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1.20.7 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import unitte...
38.672727
203
0.762106
5950cd1eacec191a06f75982c1b43d7e14c2ed52
1,396
py
Python
review_heatmap/libaddon/_vendor/common/__init__.py
kb1900/Anki-Addons
3b764af8657065c369d404025a3f11c964192a33
[ "MIT" ]
1
2019-06-23T04:46:24.000Z
2019-06-23T04:46:24.000Z
review_heatmap/libaddon/_vendor/common/__init__.py
kb1900/Anki-Addons
3b764af8657065c369d404025a3f11c964192a33
[ "MIT" ]
null
null
null
review_heatmap/libaddon/_vendor/common/__init__.py
kb1900/Anki-Addons
3b764af8657065c369d404025a3f11c964192a33
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Libaddon for Anki # # Copyright (C) 2018 Aristotelis P. <https//glutanimate.com/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # L...
39.885714
74
0.757163
e543c20c79fa89a4ab7fc69ec96b992dfd5a925c
6,626
py
Python
example/python2/py2_scan.py
rocky/python-spark
d3f966a4e8c191c51b1dcfa444026b4c6831984f
[ "MIT" ]
43
2016-04-24T15:20:16.000Z
2022-03-19T21:01:29.000Z
example/python2/py2_scan.py
rocky/python-spark
d3f966a4e8c191c51b1dcfa444026b4c6831984f
[ "MIT" ]
11
2016-06-01T16:06:38.000Z
2020-05-20T20:15:32.000Z
example/python2/py2_scan.py
rocky/python-spark
d3f966a4e8c191c51b1dcfa444026b4c6831984f
[ "MIT" ]
12
2016-05-24T12:15:04.000Z
2021-11-20T02:14:00.000Z
""" Simple SPARK-style scanner Copyright (c) 2016 Rocky Bernstein """ # from __future__ import print_function from spark_parser.scanner import GenericScanner from py2_token import PythonToken import re RESERVED_WORDS = re.split("\s+", """and as assert break class continue def del eval exec else elif for from global i...
29.9819
87
0.518714
7a03ffda9e3d03301b9dabfad506172532a6931e
718
py
Python
examples/opencv_face_detect.py
aallan/picamera2
d64fbe669e071402d11c043cf044f52f6b2edc57
[ "BSD-2-Clause" ]
null
null
null
examples/opencv_face_detect.py
aallan/picamera2
d64fbe669e071402d11c043cf044f52f6b2edc57
[ "BSD-2-Clause" ]
null
null
null
examples/opencv_face_detect.py
aallan/picamera2
d64fbe669e071402d11c043cf044f52f6b2edc57
[ "BSD-2-Clause" ]
null
null
null
#!/usr/bin/python3 import cv2 from null_preview import * from picamera2 import * # Grab images as numpy arrays and leave everything else to OpenCV. face_detector = cv2.CascadeClassifier("/usr/local/lib/python3.9/dist-packages/cv2/data/haarcascade_frontalface_default.xml") cv2.startWindowThread() picam2 = Picamera2...
25.642857
124
0.707521
839af6b68107ff0bc06f0d5b8cf93cdebaf85231
730
py
Python
venv/Classes/aula14a.py
jonassignoreti/Python-CursoemVideo
24f5932bed2fe98308321be7dd9326e65a942d4b
[ "MIT" ]
null
null
null
venv/Classes/aula14a.py
jonassignoreti/Python-CursoemVideo
24f5932bed2fe98308321be7dd9326e65a942d4b
[ "MIT" ]
null
null
null
venv/Classes/aula14a.py
jonassignoreti/Python-CursoemVideo
24f5932bed2fe98308321be7dd9326e65a942d4b
[ "MIT" ]
null
null
null
'''ESTRUTURA DE REPETIÇÃO WHILE, LAÇOS DE REPETIÇÃO (PARTE 2)''' print('*' * 40, '\nEquanto c < 10 faça:') c = 0 while c < 10: #Enquanto c < 10 faça: print(c, end=' ') c += 1 print('END') print('*' * 40, '\nEnquanto o valor digitado NÃO for 0 faça:') n = 1 while n != 0: #condição de PARADA n = int(input('D...
28.076923
119
0.571233
4f459f0a06b63bd9ba2588f050a27ac5718b7828
3,937
py
Python
setup.py
agreenbaum/nrm_analysis
4c7dfd9df6e6b14002266ecc984214e95f8a4ef8
[ "BSD-3-Clause" ]
2
2020-01-22T21:08:31.000Z
2022-01-21T16:34:26.000Z
setup.py
agreenbaum/nrm_analysis
4c7dfd9df6e6b14002266ecc984214e95f8a4ef8
[ "BSD-3-Clause" ]
2
2019-03-04T15:33:49.000Z
2019-10-23T15:02:03.000Z
setup.py
agreenbaum/nrm_analysis
4c7dfd9df6e6b14002266ecc984214e95f8a4ef8
[ "BSD-3-Clause" ]
7
2018-10-05T16:11:24.000Z
2021-03-22T13:01:02.000Z
#!/usr/bin/env python import os import subprocess import sys from setuptools import setup, find_packages, Extension, Command from setuptools.command.test import test as TestCommand try: from distutils.config import ConfigParser except ImportError: from configparser import ConfigParser conf = ConfigParser() co...
28.528986
111
0.635763
5c63000b55378dc9dccde06a2a5b1fa20cfb5257
6,346
py
Python
Question_41_50/answers/answer_45.py
OverHall27/Gasyori100knock
341c528eb4c0789034898ee1f7d0a4b2f8b23eff
[ "MIT" ]
null
null
null
Question_41_50/answers/answer_45.py
OverHall27/Gasyori100knock
341c528eb4c0789034898ee1f7d0a4b2f8b23eff
[ "MIT" ]
null
null
null
Question_41_50/answers/answer_45.py
OverHall27/Gasyori100knock
341c528eb4c0789034898ee1f7d0a4b2f8b23eff
[ "MIT" ]
null
null
null
import cv2 import numpy as np import matplotlib.pyplot as plt def BGR2GRAY(img): b = img[:, :, 0].copy() g = img[:, :, 1].copy() r = img[:, :, 2].copy() # Gray scale out = 0.2126 * r + 0.7152 * g + 0.0722 * b out = out.astype(np.uint8) return out def Canny(img): # Gaussian filter for g...
22.827338
89
0.56508
308307e6843263f37c4c98801b28e64237ba2aac
4,583
py
Python
iperf_wrapper.py
AleksandrVin/SpeedtestService
9385513e656a4935de0b29212ee9d62037db6ccc
[ "BSD-3-Clause" ]
null
null
null
iperf_wrapper.py
AleksandrVin/SpeedtestService
9385513e656a4935de0b29212ee9d62037db6ccc
[ "BSD-3-Clause" ]
null
null
null
iperf_wrapper.py
AleksandrVin/SpeedtestService
9385513e656a4935de0b29212ee9d62037db6ccc
[ "BSD-3-Clause" ]
null
null
null
import os import shlex import argparse import datetime import subprocess from typing import IO from io import TextIOWrapper from threading import Thread from balancer_routine import balancer_routine from balancer_routine import env_data class Iperf_wrapper(): def __init__(self, parameters: str = "-s -u", verbose...
33.948148
201
0.63561
b9d5db6c80a1a68774629157919b04b22b96d589
17,600
py
Python
detection/dpt_models/dpt.py
CASIA-IVA-Lab/DPT
62e6322b42f8de35d215aa3cdd458088161b5949
[ "Apache-2.0" ]
85
2021-07-07T06:54:06.000Z
2022-03-08T03:03:37.000Z
detection/dpt_models/dpt.py
CASIA-IVA-Lab/DPT
62e6322b42f8de35d215aa3cdd458088161b5949
[ "Apache-2.0" ]
11
2021-08-10T12:14:21.000Z
2022-03-03T01:39:20.000Z
detection/dpt_models/dpt.py
CASIA-IVA-Lab/DPT
62e6322b42f8de35d215aa3cdd458088161b5949
[ "Apache-2.0" ]
12
2021-08-02T09:04:24.000Z
2021-10-03T12:03:43.000Z
import torch import torch.nn as nn import torch.nn.functional as F from functools import partial from timm.models.layers import DropPath, to_2tuple, trunc_normal_ from timm.models.registry import register_model from timm.models.vision_transformer import _cfg from mmdet.models.builder import BACKBONES from mmdet.utils...
42.512077
176
0.603182
c8dcc67b62594216ed466662e5138a004682a292
107,232
py
Python
modules/s3/s3data.py
arnavsharma93/eden
2e559a277c4144ba4f4cdcd108460d025923671d
[ "MIT" ]
null
null
null
modules/s3/s3data.py
arnavsharma93/eden
2e559a277c4144ba4f4cdcd108460d025923671d
[ "MIT" ]
null
null
null
modules/s3/s3data.py
arnavsharma93/eden
2e559a277c4144ba4f4cdcd108460d025923671d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ S3 Data Views @copyright: 2009-2013 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restr...
38.066028
133
0.457923
87d809e99021a385f9a913188cfe0f0e53382d26
8,187
py
Python
src/deepnox/loggers/formatters/base_formatter.py
deepnox-io/python-wipbox
cd919ddb551b0b80f0c162c2d5e99a0ba6c81bba
[ "MIT" ]
2
2022-01-19T11:31:35.000Z
2022-01-19T11:50:07.000Z
src/deepnox/loggers/formatters/base_formatter.py
deepnox-io/python-wipbox
cd919ddb551b0b80f0c162c2d5e99a0ba6c81bba
[ "MIT" ]
3
2022-01-20T04:26:44.000Z
2022-03-22T02:03:49.000Z
src/deepnox/loggers/formatters/base_formatter.py
deepnox-io/python-wipbox
cd919ddb551b0b80f0c162c2d5e99a0ba6c81bba
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ Module: deepnox.loggers.formatters.base_formatter This file is a part of python-wipbox project. (c) 2021, Deepnox SAS. """ import logging import os import socket import traceback from datetime import datetime from typing import Any from deepnox.serializers.base_serializer import BaseSer...
30.662921
152
0.562844
b4586f8e70b068082992bbcda3c20bf2a25e8ac0
1,473
py
Python
venv/lib/python3.6/site-packages/phonenumbers/shortdata/region_ML.py
exdeam/opencrm
dfdcfdf99f0b42eb3959171927cb6574583f5ee0
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/phonenumbers/shortdata/region_ML.py
exdeam/opencrm
dfdcfdf99f0b42eb3959171927cb6574583f5ee0
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/phonenumbers/shortdata/region_ML.py
exdeam/opencrm
dfdcfdf99f0b42eb3959171927cb6574583f5ee0
[ "MIT" ]
null
null
null
"""Auto-generated file, do not edit by hand. ML metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_ML = PhoneMetadata(id='ML', country_code=None, international_prefix=None, general_desc=PhoneNumberDesc(national_number_pattern='[136-8]\\d{1,4}', possible_length=(2, 3...
105.214286
257
0.696538
f37e6bf5da7e1bbc794d70863a687876d8d7a512
1,629
py
Python
ansible/lib/ansible/modules/core/utilities/logic/assert.py
kiv-box/redis
966a0c3f0a51282cd173b42a6e249d23f4e89dec
[ "Apache-2.0" ]
null
null
null
ansible/lib/ansible/modules/core/utilities/logic/assert.py
kiv-box/redis
966a0c3f0a51282cd173b42a6e249d23f4e89dec
[ "Apache-2.0" ]
null
null
null
ansible/lib/ansible/modules/core/utilities/logic/assert.py
kiv-box/redis
966a0c3f0a51282cd173b42a6e249d23f4e89dec
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2012 Dag Wieers <dag@wieers.com> # # This file is part of Ansible # # Ansible 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 Lice...
28.578947
91
0.691222
23b23910d540b57e25c1a4730a0263a90ebf3465
3,228
py
Python
packages/arb-compiler-evm/tests/sol-syscall/truffle_runner.py
pangxieshousi/arbitrum
5a5d2c26970cb0495cd6772a7a895b6a0a90c413
[ "Apache-2.0" ]
1
2019-09-07T00:12:06.000Z
2019-09-07T00:12:06.000Z
packages/arb-compiler-evm/tests/sol-syscall/truffle_runner.py
pangxieshousi/arbitrum
5a5d2c26970cb0495cd6772a7a895b6a0a90c413
[ "Apache-2.0" ]
null
null
null
packages/arb-compiler-evm/tests/sol-syscall/truffle_runner.py
pangxieshousi/arbitrum
5a5d2c26970cb0495cd6772a7a895b6a0a90c413
[ "Apache-2.0" ]
null
null
null
# Copyright 2019, Offchain Labs, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
28.566372
87
0.635068
caa4ae7f3f2df81b353e8c96f0da934c63006eb8
47,702
py
Python
resources/python/flink/plan/DataSet.py
ATCP/flink-1.1.1
bf9aedcd16239409aa864b207f47739d3bf542ce
[ "BSD-3-Clause" ]
null
null
null
resources/python/flink/plan/DataSet.py
ATCP/flink-1.1.1
bf9aedcd16239409aa864b207f47739d3bf542ce
[ "BSD-3-Clause" ]
null
null
null
resources/python/flink/plan/DataSet.py
ATCP/flink-1.1.1
bf9aedcd16239409aa864b207f47739d3bf542ce
[ "BSD-3-Clause" ]
null
null
null
# ############################################################################### # 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 thi...
39.390586
132
0.652908
3f2a2494c459b49f53d1469b92e3f1d6d5c7fcac
2,668
py
Python
flowtorch/bijectors/ops/affine.py
sankethvedula/flowtorch
44a0f0eff842dd33ca17b01f4e02d8cdda005aa8
[ "MIT" ]
29
2020-12-19T00:29:42.000Z
2021-08-12T19:11:47.000Z
flowtorch/bijectors/ops/affine.py
sankethvedula/flowtorch
44a0f0eff842dd33ca17b01f4e02d8cdda005aa8
[ "MIT" ]
30
2020-12-29T04:42:38.000Z
2021-02-19T22:29:38.000Z
flowtorch/bijectors/ops/affine.py
sankethvedula/flowtorch
44a0f0eff842dd33ca17b01f4e02d8cdda005aa8
[ "MIT" ]
1
2021-05-06T21:25:45.000Z
2021-05-06T21:25:45.000Z
# Copyright (c) Meta Platforms, Inc from typing import Optional, Tuple import flowtorch import torch from flowtorch.bijectors.base import Bijector from flowtorch.ops import clamp_preserve_gradients from torch.distributions.utils import _sum_rightmost class Affine(Bijector): r""" Affine mapping :math:`\mathb...
31.023256
79
0.634183
3b9f6bc0e32695973532260e323778e5f0eb10d2
10,981
py
Python
rl3/ddpg.py
viclen/machine_learning_examples_v2
d47d572629899efe23bb26edffedfd464c0f77e4
[ "Apache-2.0" ]
1
2020-08-04T23:07:31.000Z
2020-08-04T23:07:31.000Z
rl3/ddpg.py
viclen/machine_learning_examples_v2
d47d572629899efe23bb26edffedfd464c0f77e4
[ "Apache-2.0" ]
null
null
null
rl3/ddpg.py
viclen/machine_learning_examples_v2
d47d572629899efe23bb26edffedfd464c0f77e4
[ "Apache-2.0" ]
null
null
null
# https://deeplearningcourses.com/c/cutting-edge-artificial-intelligence import numpy as np import tensorflow as tf import gym import matplotlib.pyplot as plt from datetime import datetime ### avoid crashing on Mac # doesn't seem to work from sys import platform as sys_pf if sys_pf == 'darwin': import matplotlib ...
33.891975
104
0.674164
e57bba9ed47eee5c0ff4bb57dd0b9812dc3b8e71
7,784
py
Python
ionoscloud/models/network_load_balancer_forwarding_rule_target.py
ionos-cloud/ionos-cloud-sdk-python
3c5804697c262898e6f6a438dc40e1b45a4bb5c9
[ "Apache-2.0" ]
null
null
null
ionoscloud/models/network_load_balancer_forwarding_rule_target.py
ionos-cloud/ionos-cloud-sdk-python
3c5804697c262898e6f6a438dc40e1b45a4bb5c9
[ "Apache-2.0" ]
null
null
null
ionoscloud/models/network_load_balancer_forwarding_rule_target.py
ionos-cloud/ionos-cloud-sdk-python
3c5804697c262898e6f6a438dc40e1b45a4bb5c9
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ CLOUD API IONOS Enterprise-grade Infrastructure as a Service (IaaS) solutions can be managed through the Cloud API, in addition or as an alternative to the \"Data Center Designer\" (DCD) browser-based tool. Both methods employ consistent concepts and features, deliver similar power and ...
36.037037
438
0.648381
3f3a62db02f2cf9d4f940f932f2cc0066ebaf7bb
685
py
Python
setup.py
gregology/spot-memair
301c95e98ebca8c97b5e52dbe115b4b5c5f87b1a
[ "MIT" ]
null
null
null
setup.py
gregology/spot-memair
301c95e98ebca8c97b5e52dbe115b4b5c5f87b1a
[ "MIT" ]
null
null
null
setup.py
gregology/spot-memair
301c95e98ebca8c97b5e52dbe115b4b5c5f87b1a
[ "MIT" ]
null
null
null
from setuptools import setup, find_packages setup( name='spot-memair', version='2018.5.28.0', description='updates memair with spot data', long_description=open('README.rst').read(), url='https://github.com/gregology/spot-memair', author='Greg Clarke', author_email='greg@gho.st', licens...
27.4
51
0.643796
da9c8131c05e52fef593d5d6cedd57a9836fed95
281
py
Python
examples/hotel_ratings/hotel_ratings.py
akshitsingla/amadeus-python
d8f3595e556b674998156f98d8a318045bb4c21c
[ "MIT" ]
null
null
null
examples/hotel_ratings/hotel_ratings.py
akshitsingla/amadeus-python
d8f3595e556b674998156f98d8a318045bb4c21c
[ "MIT" ]
null
null
null
examples/hotel_ratings/hotel_ratings.py
akshitsingla/amadeus-python
d8f3595e556b674998156f98d8a318045bb4c21c
[ "MIT" ]
null
null
null
from amadeus import Client, ResponseError amadeus = Client() try: ''' What travelers think about this hotel? ''' response = amadeus.e_reputation.hotel_sentiments.get(hotelIds = 'ADNYCCTB') # print(response.data) except ResponseError as error: raise error
21.615385
79
0.708185
6018ceb1118cc8a46cae97e5a041ed5350696beb
2,516
py
Python
nets/deeplabv3_training.py
andy1747369004/deeplabv3-plus-pytorch
296d3420c9940263fe598b7df8064ef6e8f5e495
[ "MIT" ]
1
2021-09-10T01:16:37.000Z
2021-09-10T01:16:37.000Z
nets/deeplabv3_training.py
andy1747369004/deeplabv3-plus-pytorch
296d3420c9940263fe598b7df8064ef6e8f5e495
[ "MIT" ]
null
null
null
nets/deeplabv3_training.py
andy1747369004/deeplabv3-plus-pytorch
296d3420c9940263fe598b7df8064ef6e8f5e495
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as F from torch import nn def CE_Loss(inputs, target, num_classes=21): n, c, h, w = inputs.size() nt, ht, wt = target.size() if h != ht and w != wt: inputs = F.interpolate(inputs, size=(ht, wt), mode="bilinear", align_corners=Tr...
44.140351
103
0.560413