hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
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
247
max_issues_repo_name
stringlengths
4
125
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
4
247
max_forks_repo_name
stringlengths
4
125
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
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
358327d55339c0cde8f97408cc8c6e1d08e55300
866
py
Python
eventstore_grpc/streams/tombstone.py
jmshnds/eventstore_grpc
cf6a5978bcdf5bb725a569b7373ce15ee4babb25
[ "MIT" ]
6
2021-02-04T15:48:28.000Z
2021-12-26T03:04:26.000Z
eventstore_grpc/streams/tombstone.py
jmshnds/eventstore_grpc
cf6a5978bcdf5bb725a569b7373ce15ee4babb25
[ "MIT" ]
1
2021-04-14T00:06:25.000Z
2021-04-14T07:28:34.000Z
eventstore_grpc/streams/tombstone.py
jmshnds/eventstore_grpc
cf6a5978bcdf5bb725a569b7373ce15ee4babb25
[ "MIT" ]
1
2021-04-14T17:22:54.000Z
2021-04-14T17:22:54.000Z
""" Tombstone stream. """ from typing import Union from eventstore_grpc.proto import streams_pb2, streams_pb2_grpc, shared_pb2 from eventstore_grpc import constants def tombstone_stream( stub: streams_pb2_grpc.StreamsStub, stream: str, expected_version: Union[int, str], **kwargs, ): """Tombstone....
29.862069
75
0.733256
""" Tombstone stream. """ from typing import Union from eventstore_grpc.proto import streams_pb2, streams_pb2_grpc, shared_pb2 from eventstore_grpc import constants def tombstone_stream( stub: streams_pb2_grpc.StreamsStub, stream: str, expected_version: Union[int, str], **kwargs, ): """Tombstone....
0
0
0
3a282a603b09fe771ed69d9c4619248a89c84965
88
py
Python
sys_web/apps.py
jamesperes/fred_sys
30e4b0cdc5d2fbe76c40a6ae4f26650e28590e4f
[ "Apache-2.0" ]
null
null
null
sys_web/apps.py
jamesperes/fred_sys
30e4b0cdc5d2fbe76c40a6ae4f26650e28590e4f
[ "Apache-2.0" ]
null
null
null
sys_web/apps.py
jamesperes/fred_sys
30e4b0cdc5d2fbe76c40a6ae4f26650e28590e4f
[ "Apache-2.0" ]
1
2018-10-15T21:52:33.000Z
2018-10-15T21:52:33.000Z
from django.apps import AppConfig
14.666667
33
0.75
from django.apps import AppConfig class SysWebConfig(AppConfig): name = 'sys_web'
0
30
23
9e69aad9e2c55ad699c47b42c6ccc627fb9b0e53
1,810
py
Python
Python/DL/Keras/predict-orbit.py
James-McNeill/Learning
3c4fe1a64240cdf5614db66082bd68a2f16d2afb
[ "MIT" ]
null
null
null
Python/DL/Keras/predict-orbit.py
James-McNeill/Learning
3c4fe1a64240cdf5614db66082bd68a2f16d2afb
[ "MIT" ]
null
null
null
Python/DL/Keras/predict-orbit.py
James-McNeill/Learning
3c4fe1a64240cdf5614db66082bd68a2f16d2afb
[ "MIT" ]
null
null
null
# Predicting the orbit trajectory # Function created to plot the output # Build model # Instantiate a Sequential model model = Sequential() # Add a Dense layer with 50 neurons and an input of 1 neuron model.add(Dense(50, input_shape=(1,), activation='relu')) # Add two Dense layers with 50 neurons and relu activatio...
35.490196
133
0.748619
# Predicting the orbit trajectory # Function created to plot the output def plot_orbit(model_preds): axeslim = int(len(model_preds)/2) plt.plot(np.arange(-axeslim, axeslim + 1),np.arange(-axeslim, axeslim + 1)**2,color="mediumslateblue") plt.plot(np.arange(-axeslim, axeslim + 1),model_preds,color="orange") plt...
383
0
22
f3f259426445bd6af585209580fa95c40c05f9a2
64,579
py
Python
appengine/monorail/tracker/tracker_bizobj.py
xswz8015/infra
f956b78ce4c39cc76acdda47601b86794ae0c1ba
[ "BSD-3-Clause" ]
null
null
null
appengine/monorail/tracker/tracker_bizobj.py
xswz8015/infra
f956b78ce4c39cc76acdda47601b86794ae0c1ba
[ "BSD-3-Clause" ]
7
2022-02-15T01:11:37.000Z
2022-03-02T12:46:13.000Z
appengine/monorail/tracker/tracker_bizobj.py
NDevTK/chromium-infra
d38e088e158d81f7f2065a38aa1ea1894f735ec4
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd """Business objects for the Monorail issue tracker. These are classes and functions that opera...
35.250546
80
0.732158
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file or at # https://developers.google.com/open-source/licenses/bsd """Business objects for the Monorail issue tracker. These are classes and functions that opera...
1,260
0
71
9f2e8f5899d963fef1779e7cb634f752703de003
2,502
py
Python
scripts/resnet_stacked.py
solomatov/cs229-project
9b04ddfaefc0b7ba302bc849e1259cad65f73fe8
[ "Apache-2.0" ]
null
null
null
scripts/resnet_stacked.py
solomatov/cs229-project
9b04ddfaefc0b7ba302bc849e1259cad65f73fe8
[ "Apache-2.0" ]
null
null
null
scripts/resnet_stacked.py
solomatov/cs229-project
9b04ddfaefc0b7ba302bc849e1259cad65f73fe8
[ "Apache-2.0" ]
null
null
null
""" Copyright 2017 JetBrains, s.r.o 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 ...
38.492308
167
0.735412
""" Copyright 2017 JetBrains, s.r.o 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 ...
0
0
0
ab3c14b9d3af64fcaaf9434bc017aabbcc9cbc82
1,889
py
Python
matchzoo/preprocessors/units/word_exact_match.py
ChrisRBXiong/MatchZoo-py
8883d0933a62610d71fec0215dce643630e03b1c
[ "Apache-2.0" ]
468
2019-07-03T02:43:52.000Z
2022-03-30T05:51:03.000Z
matchzoo/preprocessors/units/word_exact_match.py
ChrisRBXiong/MatchZoo-py
8883d0933a62610d71fec0215dce643630e03b1c
[ "Apache-2.0" ]
126
2019-07-04T15:51:57.000Z
2021-07-31T13:14:40.000Z
matchzoo/preprocessors/units/word_exact_match.py
ChrisRBXiong/MatchZoo-py
8883d0933a62610d71fec0215dce643630e03b1c
[ "Apache-2.0" ]
117
2019-07-04T11:31:08.000Z
2022-03-18T12:21:32.000Z
import numpy as np from .unit import Unit class WordExactMatch(Unit): """ WordExactUnit Class. Process unit to get a binary match list of two word index lists. The word index list is the word representation of a text. Examples: >>> import pandas >>> input_ = pandas.DataFrame({ ...
27.376812
78
0.536263
import numpy as np from .unit import Unit class WordExactMatch(Unit): """ WordExactUnit Class. Process unit to get a binary match list of two word index lists. The word index list is the word representation of a text. Examples: >>> import pandas >>> input_ = pandas.DataFrame({ ...
0
0
0
c178224c4abf244b4417bd5580d5f0da2d0b9ef6
1,392
py
Python
omigami/cli.py
omigami/omigami
80800901acd3523dfae4245f95d269e6e949a1eb
[ "MIT" ]
2
2021-06-29T12:03:09.000Z
2022-01-18T23:00:19.000Z
omigami/cli.py
omigami/omigami
80800901acd3523dfae4245f95d269e6e949a1eb
[ "MIT" ]
9
2021-06-11T14:23:37.000Z
2022-01-07T09:46:47.000Z
omigami/cli.py
omigami/omigami_client
80800901acd3523dfae4245f95d269e6e949a1eb
[ "MIT" ]
1
2021-11-24T17:59:39.000Z
2021-11-24T17:59:39.000Z
import pickle from pathlib import Path import click from click import ClickException from omigami.authentication import encrypt_credentials from omigami.omi_settings import get_credentials_path, get_credentials_folder_path @click.command() @click.option("--username", help="Your Omigami.com username") @click.option(...
27.294118
94
0.719109
import pickle from pathlib import Path import click from click import ClickException from omigami.authentication import encrypt_credentials from omigami.omi_settings import get_credentials_path, get_credentials_folder_path @click.command() @click.option("--username", help="Your Omigami.com username") @click.option(...
2
0
22
78e1ce1ea0489261164cc3e946dbfac0821a3c42
283
py
Python
ex109/teste.py
Jander94/Primeiros_comandos_python
188c89bdab8fa38ed58830397b1ce3328730bde3
[ "MIT" ]
null
null
null
ex109/teste.py
Jander94/Primeiros_comandos_python
188c89bdab8fa38ed58830397b1ce3328730bde3
[ "MIT" ]
null
null
null
ex109/teste.py
Jander94/Primeiros_comandos_python
188c89bdab8fa38ed58830397b1ce3328730bde3
[ "MIT" ]
null
null
null
import moeda moeda.limpar() v = float(input('Digite um valor: R$ ')) print(f'Aumentando 10% temos: {moeda.aumentar(v, 10, True)}') print(f'Diminuindo 20% temos: {moeda.diminuir(v, 20, True)}') print(f'O dobro é {moeda.dobro(v, True)}') print(f'A metade é {moeda.metade(v, True)}')
28.3
61
0.674912
import moeda moeda.limpar() v = float(input('Digite um valor: R$ ')) print(f'Aumentando 10% temos: {moeda.aumentar(v, 10, True)}') print(f'Diminuindo 20% temos: {moeda.diminuir(v, 20, True)}') print(f'O dobro é {moeda.dobro(v, True)}') print(f'A metade é {moeda.metade(v, True)}')
0
0
0
5dd8d07e766d7483edee062df37c73fd4685dd88
22,661
py
Python
keras_cv_attention_models/coco/data.py
dcleres/keras_cv_attention_models
264876673e369f23eff49b3b589b72f908a9625b
[ "MIT" ]
null
null
null
keras_cv_attention_models/coco/data.py
dcleres/keras_cv_attention_models
264876673e369f23eff49b3b589b72f908a9625b
[ "MIT" ]
null
null
null
keras_cv_attention_models/coco/data.py
dcleres/keras_cv_attention_models
264876673e369f23eff49b3b589b72f908a9625b
[ "MIT" ]
null
null
null
import tensorflow as tf import tensorflow_datasets as tfds from tensorflow import keras from keras_cv_attention_models.imagenet.data import init_mean_std_by_rescale_mode, random_crop_fraction COCO_LABELS = """person, bicycle, car, motorcycle, airplane, bus, train, truck, boat, traffic light, fire hydrant, stop sign, ...
52.7
155
0.690481
import tensorflow as tf import tensorflow_datasets as tfds from tensorflow import keras from keras_cv_attention_models.imagenet.data import init_mean_std_by_rescale_mode, random_crop_fraction COCO_LABELS = """person, bicycle, car, motorcycle, airplane, bus, train, truck, boat, traffic light, fire hydrant, stop sign, ...
16,719
14
402
472ca0ec9cc39d3078370904a7e7bd576cd512a2
761
py
Python
accounts/migrations/0006_auto_20210322_0832.py
Osca-M/django-oauth2
15bdd5c39e013c9f390eb586e64367e98ff59c4c
[ "MIT" ]
null
null
null
accounts/migrations/0006_auto_20210322_0832.py
Osca-M/django-oauth2
15bdd5c39e013c9f390eb586e64367e98ff59c4c
[ "MIT" ]
null
null
null
accounts/migrations/0006_auto_20210322_0832.py
Osca-M/django-oauth2
15bdd5c39e013c9f390eb586e64367e98ff59c4c
[ "MIT" ]
null
null
null
# Generated by Django 3.0.3 on 2021-03-22 08:32 from django.db import migrations, models import django.utils.timezone
30.44
190
0.646518
# Generated by Django 3.0.3 on 2021-03-22 08:32 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('accounts', '0005_auto_20210304_0836'), ] operations = [ migrations.AddField( model_name='user', ...
0
618
23
5e9bfc48762614f2506979c001a5b8a3571ec74b
6,229
py
Python
examples/rgb_rotate_warp.py
ic/depthai-python
fe6424277641dbff0f0fe705ddacdbb04a7bf06d
[ "MIT" ]
null
null
null
examples/rgb_rotate_warp.py
ic/depthai-python
fe6424277641dbff0f0fe705ddacdbb04a7bf06d
[ "MIT" ]
null
null
null
examples/rgb_rotate_warp.py
ic/depthai-python
fe6424277641dbff0f0fe705ddacdbb04a7bf06d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 """ This example shows usage of ImageManip to crop a rotated rectangle area on a frame, or perform various image transforms: rotate, mirror, flip, perspective transform. """ import depthai as dai import cv2 import numpy as np keyRotateDecr = 'z' keyRotateIncr = 'x' keyResizeInc = 'v' keyWarpTe...
35.392045
98
0.5773
#!/usr/bin/env python3 """ This example shows usage of ImageManip to crop a rotated rectangle area on a frame, or perform various image transforms: rotate, mirror, flip, perspective transform. """ import depthai as dai import cv2 import numpy as np keyRotateDecr = 'z' keyRotateIncr = 'x' keyResizeInc = 'v' keyWarpTe...
343
0
23
17755a716ca497a33024db00edf8f173f1e78c8c
454
py
Python
tests/unittests/dispatcher_functions/show_context/__init__.py
gohar94/azure-functions-python-worker
4322e53ddbcc1eea40c1b061b42653336d9003f6
[ "MIT" ]
277
2018-01-25T23:13:03.000Z
2022-02-22T06:12:04.000Z
tests/unittests/dispatcher_functions/show_context/__init__.py
gohar94/azure-functions-python-worker
4322e53ddbcc1eea40c1b061b42653336d9003f6
[ "MIT" ]
731
2018-01-18T18:54:38.000Z
2022-03-29T00:01:46.000Z
tests/unittests/dispatcher_functions/show_context/__init__.py
YunchuWang/azure-functions-python-worker
1f23e038a506c6412e4efbf07eb471a6afab0c2a
[ "MIT" ]
109
2018-01-18T02:22:57.000Z
2022-02-15T18:59:54.000Z
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import json import azure.functions as func
32.428571
76
0.69163
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import json import azure.functions as func def main(req: func.HttpRequest, context: func.Context) -> func.HttpResponse: result = { 'function_directory': context.function_directory, 'function_name': contex...
293
0
23
cf7c0d91e274616c0bd3b5dd09d02288d5be7453
11,888
py
Python
ploy/plain.py
ployground/ploy
9295b5597c09c434f170afbfd245d73f09affc39
[ "BSD-3-Clause" ]
32
2015-01-19T06:34:07.000Z
2021-07-27T08:48:28.000Z
ploy/plain.py
kernt/ploy
9295b5597c09c434f170afbfd245d73f09affc39
[ "BSD-3-Clause" ]
19
2015-01-30T23:30:39.000Z
2018-01-23T10:04:27.000Z
ploy/plain.py
kernt/ploy
9295b5597c09c434f170afbfd245d73f09affc39
[ "BSD-3-Clause" ]
9
2015-01-07T14:00:26.000Z
2019-03-10T20:15:37.000Z
from functools import partial from lazy import lazy from ploy.common import BaseMaster, BaseInstance from ploy.common import SSHKeyFingerprint from ploy.common import SSHKeyFingerprintAsk from ploy.common import SSHKeyFingerprintIgnore from ploy.common import SSHKeyFingerprintInstance from ploy.common import SSHKeyInfo...
38.597403
96
0.567379
from functools import partial from lazy import lazy from ploy.common import BaseMaster, BaseInstance from ploy.common import SSHKeyFingerprint from ploy.common import SSHKeyFingerprintAsk from ploy.common import SSHKeyFingerprintIgnore from ploy.common import SSHKeyFingerprintInstance from ploy.common import SSHKeyInfo...
10,658
367
214
0b9abeccea67432787d4967aab8648e7f676d869
4,415
py
Python
skultrafast/zero_finding.py
Tillsten/skultrafast
778eaf1539b6d85f21ac53b011472605673ef7e8
[ "BSD-3-Clause" ]
10
2019-02-17T15:57:51.000Z
2021-11-15T02:00:33.000Z
skultrafast/zero_finding.py
cZahn/skultrafast
23572ba9ea32238f34a8a15390fb572ecd8bc6fa
[ "BSD-3-Clause" ]
1
2019-01-17T11:56:38.000Z
2019-07-11T15:30:58.000Z
skultrafast/zero_finding.py
cZahn/skultrafast
23572ba9ea32238f34a8a15390fb572ecd8bc6fa
[ "BSD-3-Clause" ]
6
2018-11-08T14:11:06.000Z
2021-09-01T14:53:02.000Z
# -*- coding: utf-8 -*- """ Contains functions to find the time-zero and to interpolate the data. """ import numpy as np import skultrafast.dv as dv import scipy.ndimage as nd import matplotlib.pyplot as plt #from skultrafast.fitter import _coh_gaussian from scipy.linalg import lstsq from scipy.optimize import least_...
25.085227
99
0.551529
# -*- coding: utf-8 -*- """ Contains functions to find the time-zero and to interpolate the data. """ import numpy as np import skultrafast.dv as dv import scipy.ndimage as nd import matplotlib.pyplot as plt #from skultrafast.fitter import _coh_gaussian from scipy.linalg import lstsq from scipy.optimize import least_...
19
6
50
a6803725d5400b4ac3619b4f18d0768c8355442c
6,468
py
Python
utils/test/test_cmpdirs.py
golharam/genomics
ca0c7c239b0f04353e2f2fa897db9c24a1211596
[ "Artistic-2.0" ]
49
2015-01-03T17:09:10.000Z
2022-03-17T19:28:08.000Z
utils/test/test_cmpdirs.py
burkesquires/genomics
9dd93a23e6401bcaa2d2ac17e319d72b0c80a410
[ "AFL-3.0" ]
59
2015-04-16T14:21:04.000Z
2022-03-15T11:56:33.000Z
utils/test/test_cmpdirs.py
burkesquires/genomics
9dd93a23e6401bcaa2d2ac17e319d72b0c80a410
[ "AFL-3.0" ]
29
2015-01-29T08:50:44.000Z
2021-08-19T02:15:44.000Z
####################################################################### # Tests for cmpdirs.py ####################################################################### import unittest import os import tempfile import shutil from bcftbx.Md5sum import Md5Checker from bcftbx.test.mock_data import TestUtils,ExampleDirLangu...
45.230769
91
0.647341
####################################################################### # Tests for cmpdirs.py ####################################################################### import unittest import os import tempfile import shutil from bcftbx.Md5sum import Md5Checker from bcftbx.test.mock_data import TestUtils,ExampleDirLangu...
796
5,179
69
68dd16daf3339778319a442e4802bbfe6f999485
76
py
Python
rubicon/repository/utils/__init__.py
gforsyth/rubicon
b77c0bdfc73d3f5666f76c83240706c10cd2e88c
[ "Apache-2.0" ]
null
null
null
rubicon/repository/utils/__init__.py
gforsyth/rubicon
b77c0bdfc73d3f5666f76c83240706c10cd2e88c
[ "Apache-2.0" ]
null
null
null
rubicon/repository/utils/__init__.py
gforsyth/rubicon
b77c0bdfc73d3f5666f76c83240706c10cd2e88c
[ "Apache-2.0" ]
null
null
null
from rubicon.repository.utils.slugify import slugify __all__ = ["slugify"]
19
52
0.789474
from rubicon.repository.utils.slugify import slugify __all__ = ["slugify"]
0
0
0
2cd9f6565cecf480a63b62b31a3796167807b651
3,199
py
Python
bin/trimming_libraries2.py
Gabaldonlab/karyon
ba81828921b83b553f126892795253be1fd941ba
[ "MIT" ]
null
null
null
bin/trimming_libraries2.py
Gabaldonlab/karyon
ba81828921b83b553f126892795253be1fd941ba
[ "MIT" ]
2
2021-07-07T08:40:56.000Z
2022-01-06T16:10:27.000Z
bin/trimming_libraries2.py
Gabaldonlab/karyon
ba81828921b83b553f126892795253be1fd941ba
[ "MIT" ]
null
null
null
#!/bin/python import sys, numpy, os.path, re import argparse from Bio import SeqIO if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-l', '--library_file', help="File containing the library report generated by the script prepare_libraries.py") parser.add_argument('-p', '--p...
39.012195
190
0.648953
#!/bin/python import sys, numpy, os.path, re import argparse from Bio import SeqIO if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-l', '--library_file', help="File containing the library report generated by the script prepare_libraries.py") parser.add_argument('-p', '--p...
2,051
0
23
195d6bb65734f9c7e8588f4fa0e785dd42ba0b43
377
py
Python
src/util/filters.py
ayushgarg1804/Eventico
b0412c8fc15a94dc90cce6a1de55e4b2ac29ba83
[ "MIT" ]
2
2017-03-27T06:23:29.000Z
2017-04-20T17:48:25.000Z
src/util/filters.py
ayushgarg1804/Eventico
b0412c8fc15a94dc90cce6a1de55e4b2ac29ba83
[ "MIT" ]
null
null
null
src/util/filters.py
ayushgarg1804/Eventico
b0412c8fc15a94dc90cce6a1de55e4b2ac29ba83
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # @Author: amaneureka # @Date: 2017-03-30 13:53:13 # @Last Modified by: amaneureka # @Last Modified time: 2017-03-30 22:10:02 from dateutil import parser from .. import app @app.template_filter('strftime')
25.133333
42
0.697613
# -*- coding: utf-8 -*- # @Author: amaneureka # @Date: 2017-03-30 13:53:13 # @Last Modified by: amaneureka # @Last Modified time: 2017-03-30 22:10:02 from dateutil import parser from .. import app @app.template_filter('strftime') def _jinja2_filter_datetime(date, fmt): date = parser.parse(date) native = d...
119
0
22
a0036479429aa5c37e419622928e5d7314299531
762
py
Python
src/enjcli.py
adam-phelps/enjambre
2877ae6722648419520380744f8bfc986ec406e5
[ "MIT" ]
null
null
null
src/enjcli.py
adam-phelps/enjambre
2877ae6722648419520380744f8bfc986ec406e5
[ "MIT" ]
5
2020-07-03T00:02:43.000Z
2020-07-07T00:03:23.000Z
src/enjcli.py
adam-phelps/enjambre
2877ae6722648419520380744f8bfc986ec406e5
[ "MIT" ]
null
null
null
import argparse if __name__ == "__main__": myCli = EnjCLI() myvars = myCli.create_parser() print(myvars)
36.285714
107
0.664042
import argparse class EnjCLI: def __init__(self): pass def create_parser(self): ''' Create CLI with sensible defaults.''' parser = argparse.ArgumentParser(description='Enjambre robot manager') parser.add_argument('--add-robot', help='String name of robot.', required=False) ...
11
611
23
f75968317e392c13ae034cbf31f9db18911c4778
1,035
py
Python
tests/test_controls/test_valloxcontrol.py
jussike/kuappi
985040dc813c023dc1577f31ca7f6744d42c91de
[ "MIT" ]
null
null
null
tests/test_controls/test_valloxcontrol.py
jussike/kuappi
985040dc813c023dc1577f31ca7f6744d42c91de
[ "MIT" ]
null
null
null
tests/test_controls/test_valloxcontrol.py
jussike/kuappi
985040dc813c023dc1577f31ca7f6744d42c91de
[ "MIT" ]
null
null
null
from unittest import TestCase from unittest.mock import patch with patch('serial.Serial'): from controls.valloxcontrol import ValloxControl from valloxserial import vallox_serial
29.571429
66
0.66087
from unittest import TestCase from unittest.mock import patch with patch('serial.Serial'): from controls.valloxcontrol import ValloxControl from valloxserial import vallox_serial class TestValloxControl(TestCase): @patch('serial.Serial') def setUp(self, _): self.vc = ValloxControl() @patch.o...
587
241
23
d567ba6e73a3cd20207462b55671309948a986b0
1,881
py
Python
dataladmetadatamodel/mapper/gitmapper/utils.py
christian-monch/metadata-model
d8ac56c1708cb6040fbf96bfa8d0c389a2be7333
[ "MIT" ]
1
2021-02-12T09:54:46.000Z
2021-02-12T09:54:46.000Z
dataladmetadatamodel/mapper/gitmapper/utils.py
christian-monch/metadata-model
d8ac56c1708cb6040fbf96bfa8d0c389a2be7333
[ "MIT" ]
6
2021-02-11T08:10:21.000Z
2021-10-07T20:45:48.000Z
dataladmetadatamodel/mapper/gitmapper/utils.py
christian-monch/metadata-model
d8ac56c1708cb6040fbf96bfa8d0c389a2be7333
[ "MIT" ]
1
2021-02-16T15:30:37.000Z
2021-02-16T15:30:37.000Z
""" Simple lock interface. """ import os import time from dataclasses import dataclass from pathlib import Path from fasteners import InterProcessLock from dataladmetadatamodel.log import logger PID = os.getpid() GIT_MAPPER_LOCK_FILE_NAME = "metadata-model-git.lock" read_write_locked = dict() @dataclass
27.26087
81
0.669856
""" Simple lock interface. """ import os import time from dataclasses import dataclass from pathlib import Path from fasteners import InterProcessLock from dataladmetadatamodel.log import logger PID = os.getpid() GIT_MAPPER_LOCK_FILE_NAME = "metadata-model-git.lock" read_write_locked = dict() @dataclass class Lo...
1,412
39
114
418bc0b5811508162f31cbf97411a9da8a3cae6a
3,614
py
Python
fig5_gap_gene_patterning/fig5_1_train.py
sjx93/rnn_for_gene_network_2020
d2e16d836f35321923660777179e260065e3976c
[ "MIT" ]
5
2021-04-20T14:43:51.000Z
2022-02-09T07:43:11.000Z
fig5_gap_gene_patterning/fig5_1_train.py
sjx93/rnn_for_gene_network_2020
d2e16d836f35321923660777179e260065e3976c
[ "MIT" ]
null
null
null
fig5_gap_gene_patterning/fig5_1_train.py
sjx93/rnn_for_gene_network_2020
d2e16d836f35321923660777179e260065e3976c
[ "MIT" ]
1
2022-02-02T09:23:20.000Z
2022-02-02T09:23:20.000Z
import argparse import sys import csv import os import numpy as np import matplotlib.pyplot as plt import tensorflow as tf BATCH = 1 NUM_GENES = 4 N1 = 91 EXPLICIT_NOISE_LEVEL = 0.05 FLAGS = None if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('--output_name', type=int, default...
30.627119
118
0.657167
import argparse import sys import csv import os import numpy as np import matplotlib.pyplot as plt import tensorflow as tf BATCH = 1 NUM_GENES = 4 N1 = 91 EXPLICIT_NOISE_LEVEL = 0.05 FLAGS = None def main(_): if not os.path.exists(repr(FLAGS.output_name)): os.mkdir(repr(FLAGS.output_name)) if not os.path.e...
3,154
0
23
020786b949349a53cf4db9ee348166f29a7eb6d5
1,177
py
Python
get_key_code/UI.py
daviaws/missionText
7fb3bfce52e17f8156f8f5eca9a6a97f72e81adc
[ "Apache-2.0" ]
null
null
null
get_key_code/UI.py
daviaws/missionText
7fb3bfce52e17f8156f8f5eca9a6a97f72e81adc
[ "Apache-2.0" ]
null
null
null
get_key_code/UI.py
daviaws/missionText
7fb3bfce52e17f8156f8f5eca9a6a97f72e81adc
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- from tkinter import Tk, Text, BOTH, DISABLED, NORMAL, END APPNAME = "WRITER TEST" WELCOME_MSG = "Welcome to {}\n".format(APPNAME) ui = UI()
28.02381
81
0.587086
#!/usr/bin/python # -*- coding: utf-8 -*- from tkinter import Tk, Text, BOTH, DISABLED, NORMAL, END APPNAME = "WRITER TEST" WELCOME_MSG = "Welcome to {}\n".format(APPNAME) class Output(Text): def __init__(self, parent): Text.__init__(self, parent) self.parent = parent self....
833
-12
172
913187d7aa46aaed851077b7fe47f4c867251f46
179,184
py
Python
env/lib/python3.8/site-packages/CoreFoundation/_metadata.py
evilcomputer12/macOSAutoJoinAndRecordZoomSession
2157de803c1d67fe493ff330f1558892507e8e49
[ "MIT" ]
1
2021-02-06T21:00:00.000Z
2021-02-06T21:00:00.000Z
env/lib/python3.8/site-packages/CoreFoundation/_metadata.py
evilcomputer12/macOSAutoJoinAndRecordZoomSession
2157de803c1d67fe493ff330f1558892507e8e49
[ "MIT" ]
null
null
null
env/lib/python3.8/site-packages/CoreFoundation/_metadata.py
evilcomputer12/macOSAutoJoinAndRecordZoomSession
2157de803c1d67fe493ff330f1558892507e8e49
[ "MIT" ]
null
null
null
# This file is generated by objective.metadata # # Last update: Mon Mar 16 08:52:15 2020 # # flake8: noqa import objc, sys if sys.maxsize > 2 ** 32: else: misc = {} misc.update( { "CFXMLEntityInfo": objc.createStructType( "CFXMLEntityInfo", sel32or64( b"{_CFXMLE...
43.939186
15,638
0.585354
# This file is generated by objective.metadata # # Last update: Mon Mar 16 08:52:15 2020 # # flake8: noqa import objc, sys if sys.maxsize > 2 ** 32: def sel32or64(a, b): return b else: def sel32or64(a, b): return a misc = {} misc.update( { "CFXMLEntityInfo": objc.createStruct...
32
0
54
88e9e24537c107cf35819d0f210d7e1323014386
6,892
py
Python
graffati.py
yorozultd/nobrand
ee308f87f7f5929df803ffef11b3b79eec6e763b
[ "MIT" ]
null
null
null
graffati.py
yorozultd/nobrand
ee308f87f7f5929df803ffef11b3b79eec6e763b
[ "MIT" ]
null
null
null
graffati.py
yorozultd/nobrand
ee308f87f7f5929df803ffef11b3b79eec6e763b
[ "MIT" ]
null
null
null
import argparse import xml.etree.ElementTree as ET import requests import numpy from progress.bar import Bar bar = Bar('Sending', max=4000) try : dictdata = numpy.load("stockDictionary.npy",allow_pickle=True) except : if args.downloadStock or args.syncDictionary : pass else: print("Try ...
44.753247
208
0.56892
import argparse import xml.etree.ElementTree as ET import requests import numpy from progress.bar import Bar bar = Bar('Sending', max=4000) try : dictdata = numpy.load("stockDictionary.npy",allow_pickle=True) except : if args.downloadStock or args.syncDictionary : pass else: print("Try ...
6,207
0
112
f91a9125673179c020a6832b09b9961e0653f3b4
1,190
py
Python
main/judge.py
prajnamort/LambdaOJ2
5afc7ceb6022caa244f66032a19ebac14c4448da
[ "MIT" ]
2
2017-09-26T07:25:11.000Z
2021-11-24T04:19:40.000Z
main/judge.py
prajnamort/LambdaOJ2
5afc7ceb6022caa244f66032a19ebac14c4448da
[ "MIT" ]
50
2017-03-31T19:54:21.000Z
2022-03-11T23:14:22.000Z
main/judge.py
prajnamort/LambdaOJ2
5afc7ceb6022caa244f66032a19ebac14c4448da
[ "MIT" ]
7
2017-03-26T07:07:17.000Z
2019-12-05T01:05:41.000Z
import json import docker from django.conf import settings
26.444444
77
0.595798
import json import docker from django.conf import settings class JudgeError(Exception): pass def run_judge_in_docker(image, src_path, compiler, test_case_dir, sample_num, mem_limit, time_limit, volumes, max_wait_time=60, default_check=True, ta_check_file=''): ...
1,066
16
46
af1a36a84b57634789682556e1bc5fb8840adfd2
988
py
Python
migrations/versions/3acf60608a7d_.py
uk-gov-mirror/alphagov.digitalmarketplace-api
5a1db63691d0c4a435714837196ab6914badaf62
[ "MIT" ]
25
2015-01-14T10:45:13.000Z
2021-05-26T17:21:41.000Z
migrations/versions/3acf60608a7d_.py
uk-gov-mirror/alphagov.digitalmarketplace-api
5a1db63691d0c4a435714837196ab6914badaf62
[ "MIT" ]
641
2015-01-15T11:10:50.000Z
2021-06-15T22:18:42.000Z
migrations/versions/3acf60608a7d_.py
uk-gov-mirror/alphagov.digitalmarketplace-api
5a1db63691d0c4a435714837196ab6914badaf62
[ "MIT" ]
22
2015-06-13T15:37:45.000Z
2021-08-19T23:40:49.000Z
"""empty message Revision ID: 3acf60608a7d Revises: 48a5caa0a762 Create Date: 2015-03-26 11:26:40.461247 """ # revision identifiers, used by Alembic. revision = '3acf60608a7d' down_revision = '48a5caa0a762' from alembic import op import sqlalchemy as sa
26.702703
63
0.63664
"""empty message Revision ID: 3acf60608a7d Revises: 48a5caa0a762 Create Date: 2015-03-26 11:26:40.461247 """ # revision identifiers, used by Alembic. revision = '3acf60608a7d' down_revision = '48a5caa0a762' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - ...
682
0
46
99a07da7533ba8f77dc0c234de5c405d926f4bcd
2,993
py
Python
plain-python/6-search.py
Bio-Otto/pdbe-api-training
1d5016e463c86a0ccc55c4808eba9060dba191e4
[ "Apache-2.0" ]
1
2020-09-15T19:44:41.000Z
2020-09-15T19:44:41.000Z
plain-python/6-search.py
leelasd/pdbe-api-training
1d5016e463c86a0ccc55c4808eba9060dba191e4
[ "Apache-2.0" ]
null
null
null
plain-python/6-search.py
leelasd/pdbe-api-training
1d5016e463c86a0ccc55c4808eba9060dba191e4
[ "Apache-2.0" ]
1
2020-09-16T16:30:09.000Z
2020-09-16T16:30:09.000Z
#!/usr/bin/env python3 # Copyright 2018 EMBL - European Bioinformatics Institute # # 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 require...
27.971963
153
0.743735
#!/usr/bin/env python3 # Copyright 2018 EMBL - European Bioinformatics Institute # # 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 require...
480
0
46
b006a1505dde10f585964e815fc5f6d7bc4310b3
1,332
py
Python
JWTtoken.py
GabrielIFPB/wishlist-fastapi
1d39bf4c65dcc4491d0836487a218e67dbb07a80
[ "MIT" ]
null
null
null
JWTtoken.py
GabrielIFPB/wishlist-fastapi
1d39bf4c65dcc4491d0836487a218e67dbb07a80
[ "MIT" ]
null
null
null
JWTtoken.py
GabrielIFPB/wishlist-fastapi
1d39bf4c65dcc4491d0836487a218e67dbb07a80
[ "MIT" ]
null
null
null
from datetime import datetime, timedelta from fastapi import HTTPException from typing import Optional from fastapi.security import OAuth2PasswordBearer from fastapi import Depends from jose import JWTError, jwt from sqlalchemy.orm import Session from database import get_db from repository.user import User as ModelU...
28.340426
98
0.807808
from datetime import datetime, timedelta from fastapi import HTTPException from typing import Optional from fastapi.security import OAuth2PasswordBearer from fastapi import Depends from jose import JWTError, jwt from sqlalchemy.orm import Session from database import get_db from repository.user import User as ModelU...
753
0
46
c363e9764be7269bd2f3ccb3296697fed149ecb6
121
py
Python
crawler/scrapy_ffxiv/spiders/utils/xpath_utils.py
shengzhc/sc-ff14-scrapy
2d5b74980e47ec140a4b8d506079fcc94dde54a2
[ "MIT" ]
null
null
null
crawler/scrapy_ffxiv/spiders/utils/xpath_utils.py
shengzhc/sc-ff14-scrapy
2d5b74980e47ec140a4b8d506079fcc94dde54a2
[ "MIT" ]
null
null
null
crawler/scrapy_ffxiv/spiders/utils/xpath_utils.py
shengzhc/sc-ff14-scrapy
2d5b74980e47ec140a4b8d506079fcc94dde54a2
[ "MIT" ]
null
null
null
from scrapy import Selector
20.166667
48
0.702479
from scrapy import Selector def xpath_nodeset_intersection(ns1, ns2): return f"{ns1}[count(.|{ns2})=count({ns2})]"
69
0
23
100b8bb95eff4af5ae51ed66e320458976707130
297
py
Python
cogs/history.py
Chrovo/Productivity
4bdb7eecfb8ae16b013ce58a1b0421f8f791499e
[ "MIT" ]
null
null
null
cogs/history.py
Chrovo/Productivity
4bdb7eecfb8ae16b013ce58a1b0421f8f791499e
[ "MIT" ]
null
null
null
cogs/history.py
Chrovo/Productivity
4bdb7eecfb8ae16b013ce58a1b0421f8f791499e
[ "MIT" ]
null
null
null
import discord from discord.ext import commands, tasks class History(commands.Cog): """History commands."""
24.75
63
0.659933
import discord from discord.ext import commands, tasks class History(commands.Cog): """History commands.""" def __init__(self, bot:commands.Bot) -> None: self.bot = bot self.emoji = "🗺️" # create custom emojis later I guess. def setup(bot): bot.add_cog(History(bot))
140
0
50
447521bc7258b71f7c5b0baafe3fb7087a605cbf
3,151
py
Python
autoaug/cutmix.py
Dou-Yu-xuan/deep-learning-visal
82978f454c7f2662d0eb972b5a4a1e5d5961b232
[ "Apache-2.0" ]
150
2021-12-10T01:21:06.000Z
2022-03-30T08:13:42.000Z
autoaug/cutmix.py
Curdboycc/torch-template-for-deep-learning
da1ebc527d44c8c5a524e757a1d784ba37ec2d5c
[ "Apache-2.0" ]
2
2021-12-23T04:59:54.000Z
2021-12-23T06:23:24.000Z
autoaug/cutmix.py
Curdboycc/torch-template-for-deep-learning
da1ebc527d44c8c5a524e757a1d784ba37ec2d5c
[ "Apache-2.0" ]
54
2021-12-10T03:36:27.000Z
2022-03-22T11:57:12.000Z
import numpy as np import random from torch.utils.data.dataset import Dataset def cross_entropy(input, target, size_average=True): """ Cross entropy that accepts soft targets Args: pred: predictions for neural network targets: targets, can be soft size_average: if false, sum is retu...
29.726415
89
0.58299
import numpy as np import random from torch.utils.data.dataset import Dataset class CutMixCrossEntropyLoss(Module): def __init__(self, size_average=True): super().__init__() self.size_average = size_average def forward(self, input, target): if len(target.size()) == 1: targe...
1,996
17
225
6724f9b981c41398d8f6357187d6e007909b935e
9,929
py
Python
crawler.py
SpereShelde/Google_news
5cc87487a5b1747f8206ce13706e34023fd136a1
[ "MIT" ]
null
null
null
crawler.py
SpereShelde/Google_news
5cc87487a5b1747f8206ce13706e34023fd136a1
[ "MIT" ]
null
null
null
crawler.py
SpereShelde/Google_news
5cc87487a5b1747f8206ce13706e34023fd136a1
[ "MIT" ]
null
null
null
#Author: Zifan Wang | frank@zifan.wang import re import urllib.request import collections import time from textblob import TextBlob if __name__ == '__main__': print("Please input key words: ", end='') key_words = input().strip().replace(" ", "+") print("Please input result number limit: ", end='') l...
49.645
172
0.538524
#Author: Zifan Wang | frank@zifan.wang import re import urllib.request import collections import time from textblob import TextBlob class News: def __init__(self, link, source, title, time, sentiment) -> None: self.link = link self.source = source self.title = title self.time = tim...
281
-10
76
4fcb110526fb2eefbe683cd6a5d82c0424d6e695
201
py
Python
tests/test_net.py
PuchatekwSzortach/printed_characters_net
9478d4ecffeca040cc353676382d0ec775558458
[ "MIT" ]
1
2018-05-31T00:20:24.000Z
2018-05-31T00:20:24.000Z
tests/test_net.py
PuchatekwSzortach/printed_characters_net
9478d4ecffeca040cc353676382d0ec775558458
[ "MIT" ]
null
null
null
tests/test_net.py
PuchatekwSzortach/printed_characters_net
9478d4ecffeca040cc353676382d0ec775558458
[ "MIT" ]
null
null
null
import numpy as np import net.utilities
18.272727
55
0.626866
import numpy as np import net.utilities def test_sigmoid(): z = np.array([-1000, 0, 0, -1000]) expected = np.array([0, 0.5, 0.5, 0]) assert np.all(expected == net.utilities.sigmoid(z))
137
0
23
3f28d03dbf5cede9994a4d93451133a7e11c59f6
4,247
py
Python
insta/views.py
Ammoh-Moringa/-Instagram
e3f8cfff8f5a4f0d2698675af067f31c0f288388
[ "MIT" ]
null
null
null
insta/views.py
Ammoh-Moringa/-Instagram
e3f8cfff8f5a4f0d2698675af067f31c0f288388
[ "MIT" ]
null
null
null
insta/views.py
Ammoh-Moringa/-Instagram
e3f8cfff8f5a4f0d2698675af067f31c0f288388
[ "MIT" ]
null
null
null
from insta.forms import CommentForm, ImageForm, ProfileForm, SignupForm from django.shortcuts import render,redirect # Create your views here. from django.http import HttpResponse from django.contrib.auth import login, authenticate from django.contrib.sites.shortcuts import get_current_site from django.utils.encoding...
35.099174
86
0.658112
from insta.forms import CommentForm, ImageForm, ProfileForm, SignupForm from django.shortcuts import render,redirect # Create your views here. from django.http import HttpResponse from django.contrib.auth import login, authenticate from django.contrib.sites.shortcuts import get_current_site from django.utils.encoding...
2,668
0
162
0d34521a28efb3ba86ab8c34a4cd7d59dda535e8
13,906
py
Python
local_search/intra_route_operators.py
yorak/VeRyPy
0cb7a83279352ecba83117357589c83e576edaa2
[ "MIT" ]
156
2019-11-09T00:40:14.000Z
2022-03-31T10:05:50.000Z
local_search/intra_route_operators.py
yorak/VeRyPy
0cb7a83279352ecba83117357589c83e576edaa2
[ "MIT" ]
13
2020-03-07T10:56:38.000Z
2021-12-16T07:46:28.000Z
local_search/intra_route_operators.py
yorak/VeRyPy
0cb7a83279352ecba83117357589c83e576edaa2
[ "MIT" ]
47
2019-12-16T00:17:11.000Z
2022-03-27T12:47:24.000Z
# -*- coding: utf-8 -*- ############################################################################### """ This file is a part of the VeRyPy classical vehicle routing problem heuristic library and implements intra route (i.e. within one route) local search improvement heuristics such as 2-opt, one-point-move etc. All...
38.09863
83
0.454121
# -*- coding: utf-8 -*- ############################################################################### """ This file is a part of the VeRyPy classical vehicle routing problem heuristic library and implements intra route (i.e. within one route) local search improvement heuristics such as 2-opt, one-point-move etc. All...
0
0
0
20eb55b4a53b3f3d254ae290dd603fe847ecb9c7
1,277
py
Python
python/pbase/papp/log_printer.py
Impavidity/pinfrastructure
b5577fe1e140e0b360aec2834349ba87647eb000
[ "MIT" ]
10
2017-12-04T03:50:50.000Z
2020-09-25T07:24:32.000Z
python/pbase/papp/log_printer.py
Impavidity/pinfrastructure
b5577fe1e140e0b360aec2834349ba87647eb000
[ "MIT" ]
8
2018-07-14T09:45:38.000Z
2018-09-17T20:56:52.000Z
python/pbase/papp/log_printer.py
Impavidity/pinfrastructure
b5577fe1e140e0b360aec2834349ba87647eb000
[ "MIT" ]
1
2017-11-24T18:31:53.000Z
2017-11-24T18:31:53.000Z
import logging from pbase.papp import TRAIN_TAG, VALID_TAG, TEST_TAG from pbase.papp.logger import Logger
44.034483
111
0.684417
import logging from pbase.papp import TRAIN_TAG, VALID_TAG, TEST_TAG from pbase.papp.logger import Logger class LogPrinter(object): def __init__(self, tensorboard, logger_desc): self.tensorboard_logger = Logger(tensorboard) self.LOGGER = logging.getLogger(logger_desc + "[LogPrinter]") self.LOGGER.setLe...
1,069
4
97
a3feae5e18e01c13000d7015f2be22a22b2dc70e
1,232
py
Python
package_name/module_name.py
TobiasRosskopf/TEMPLATE_REPO_Python
01fa58bf7eb834b1e8778c1f5050f40e3bb3073c
[ "MIT" ]
null
null
null
package_name/module_name.py
TobiasRosskopf/TEMPLATE_REPO_Python
01fa58bf7eb834b1e8778c1f5050f40e3bb3073c
[ "MIT" ]
null
null
null
package_name/module_name.py
TobiasRosskopf/TEMPLATE_REPO_Python
01fa58bf7eb834b1e8778c1f5050f40e3bb3073c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3.8 # -*- coding: utf-8 -*- """ **Created:** ??.??.2022 **Modified:** ??.??.2022 **Authors:** [Tobias Rosskopf](mailto:tobirosskopf@gmail.com) <module_name>'s docstring """ class ClassName: """ Class for <ClassName> """ def __init__(self, name: str = "") -> None: ...
20.881356
64
0.525974
#!/usr/bin/env python3.8 # -*- coding: utf-8 -*- """ **Created:** ??.??.2022 **Modified:** ??.??.2022 **Authors:** [Tobias Rosskopf](mailto:tobirosskopf@gmail.com) <module_name>'s docstring """ class ClassName: """ Class for <ClassName> """ def __init__(self, name: str = "") -> None: ...
0
0
0
9e775379739c5b9f755c3f1728cc7138253c2861
2,241
py
Python
test/federated_aggregator/test_fedavg_aggregator.py
joarreg/Sherpa.ai-Federated-Learning-Framework
9da392bf71c9acf13761dde0f119622c62780c87
[ "Apache-2.0" ]
2
2021-11-14T12:04:39.000Z
2022-01-03T16:03:36.000Z
test/federated_aggregator/test_fedavg_aggregator.py
joarreg/Sherpa.ai-Federated-Learning-Framework
9da392bf71c9acf13761dde0f119622c62780c87
[ "Apache-2.0" ]
null
null
null
test/federated_aggregator/test_fedavg_aggregator.py
joarreg/Sherpa.ai-Federated-Learning-Framework
9da392bf71c9acf13761dde0f119622c62780c87
[ "Apache-2.0" ]
1
2022-01-19T16:29:46.000Z
2022-01-19T16:29:46.000Z
import numpy as np from shfl.federated_aggregator.fedavg_aggregator import FedAvgAggregator
32.955882
98
0.71129
import numpy as np from shfl.federated_aggregator.fedavg_aggregator import FedAvgAggregator def test_aggregated_weights(): num_clients = 10 num_layers = 5 tams = [[128, 64], [64, 64], [64, 64], [64, 32], [32, 10]] weights = [] for i in range(num_clients): weights.append([np.random.rand(t...
2,074
0
73
7d1270929a102898672c815d5daca60cc5cf81b7
1,309
py
Python
src/architecture_analysis/calculate_arch_neighborhood.py
mhnnunes/fla_nas_gnn
cf7f5c9143c4e6851eaef29af741ac8872364027
[ "Apache-2.0" ]
3
2021-04-12T08:06:00.000Z
2021-11-25T08:49:22.000Z
src/architecture_analysis/calculate_arch_neighborhood.py
mhnnunes/fla_nas_gnn
cf7f5c9143c4e6851eaef29af741ac8872364027
[ "Apache-2.0" ]
null
null
null
src/architecture_analysis/calculate_arch_neighborhood.py
mhnnunes/fla_nas_gnn
cf7f5c9143c4e6851eaef29af741ac8872364027
[ "Apache-2.0" ]
null
null
null
from scipy.sparse import load_npz from scipy.spatial import distance from joblib import Parallel from joblib import delayed def chunks(lst, n): """ Yield successive n-sized chunks from lst. from: https://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks """ f...
27.270833
95
0.601222
from scipy.sparse import load_npz from scipy.spatial import distance from joblib import Parallel from joblib import delayed def chunks(lst, n): """ Yield successive n-sized chunks from lst. from: https://stackoverflow.com/questions/312443/how-do-you-split-a-list-into-evenly-sized-chunks """ f...
214
0
23
c312677c9b145af44b4067a0170bfcb56054d6a7
4,839
py
Python
certs/3.5_post_process_remove_5_percentile.py
prchander/lsquic
4b677add01b750461a72642c9730b02efcb1b195
[ "BSD-3-Clause", "MIT" ]
null
null
null
certs/3.5_post_process_remove_5_percentile.py
prchander/lsquic
4b677add01b750461a72642c9730b02efcb1b195
[ "BSD-3-Clause", "MIT" ]
null
null
null
certs/3.5_post_process_remove_5_percentile.py
prchander/lsquic
4b677add01b750461a72642c9730b02efcb1b195
[ "BSD-3-Clause", "MIT" ]
1
2021-03-30T20:49:46.000Z
2021-03-30T20:49:46.000Z
import csv import numpy as np import os import re import scipy.stats import sys import time # Given a regular expression, list the files that match it, and ask for user input # Given a regular expression, list the directories that match it, and ask for user input # List the files with a regular expression # Change...
26.156757
139
0.659847
import csv import numpy as np import os import re import scipy.stats import sys import time # Given a regular expression, list the files that match it, and ask for user input def selectFile(regex, subdirs = False): files = [] if subdirs: for (dirpath, dirnames, filenames) in os.walk('.'): for file in filenames:...
2,571
0
110
9da76e1cea28b5c881b7a7dad13e5bf1c05bc48d
3,253
py
Python
modules/reminder_thread.py
Petricpwnz/NyAI
8fca182c45f677cbd1d128f0aa73b3ee61cfced9
[ "MIT" ]
1
2021-01-23T00:13:10.000Z
2021-01-23T00:13:10.000Z
modules/reminder_thread.py
Petricpwnz/NyAI
8fca182c45f677cbd1d128f0aa73b3ee61cfced9
[ "MIT" ]
null
null
null
modules/reminder_thread.py
Petricpwnz/NyAI
8fca182c45f677cbd1d128f0aa73b3ee61cfced9
[ "MIT" ]
null
null
null
import threading import time from datetime import datetime class StartOverException(Exception): """Raise to restart the reminder thread loop""" pass # TODO set a limit on reminders per user? also same for offlinemessages
39.192771
135
0.622195
import threading import time from datetime import datetime class StartOverException(Exception): """Raise to restart the reminder thread loop""" pass # TODO set a limit on reminders per user? also same for offlinemessages class ReminderThread(threading.Thread): def __init__(self, bot_object, bot): ...
2,765
18
237
4246075cb9e4c92be6ccb27f615aedd0c7f2efbc
592
py
Python
api/impi/api.py
tec-csf/TC3059-PF-Otono-2019-cesar
03341226387d090db063032524de6dd4cf6d0300
[ "MIT" ]
null
null
null
api/impi/api.py
tec-csf/TC3059-PF-Otono-2019-cesar
03341226387d090db063032524de6dd4cf6d0300
[ "MIT" ]
5
2021-03-19T08:32:12.000Z
2022-03-12T00:06:06.000Z
api/impi/api.py
tec-csf/TC3059-PF-Otono-2019-cesar
03341226387d090db063032524de6dd4cf6d0300
[ "MIT" ]
null
null
null
from flask.views import MethodView from flask import jsonify, request, abort, redirect, url_for from impi.get_impi import * import logging import json
23.68
60
0.633446
from flask.views import MethodView from flask import jsonify, request, abort, redirect, url_for from impi.get_impi import * import logging import json class ImpiAPI(MethodView): logger = logging.getLogger(__name__) def __init__(self): if (request.method != 'GET') and not request.json: abor...
291
127
23
d9dacfc2e3f4db256e6241bce30c59355dd174c9
5,618
py
Python
rasa_integration_testing/socketio_runner.py
nuecho/rasa-integration-testing
4e5f55634a8effb29011f32667983d96b7c69740
[ "Apache-2.0" ]
2
2020-09-29T13:53:51.000Z
2020-10-24T19:33:27.000Z
rasa_integration_testing/socketio_runner.py
nuecho/rasa-integration-testing
4e5f55634a8effb29011f32667983d96b7c69740
[ "Apache-2.0" ]
22
2020-05-27T17:15:56.000Z
2020-11-27T19:27:59.000Z
rasa_integration_testing/socketio_runner.py
nuecho/rasa-integration-testing
4e5f55634a8effb29011f32667983d96b7c69740
[ "Apache-2.0" ]
1
2021-02-06T03:58:52.000Z
2021-02-06T03:58:52.000Z
import os from threading import Condition from typing import Any, List, Optional, Tuple from socketio import Client, ClientNamespace from .common.configuration import configure from .comparator import JsonDataComparator from .interaction import Interaction, InteractionLoader from .runner import FailedInteraction, Sce...
32.853801
85
0.686365
import os from threading import Condition from typing import Any, List, Optional, Tuple from socketio import Client, ClientNamespace from .common.configuration import configure from .comparator import JsonDataComparator from .interaction import Interaction, InteractionLoader from .runner import FailedInteraction, Sce...
4,422
48
386
2aceb23fd02e8275e951cf2060549f774e907a9e
721
py
Python
examples/ts_surrogates.py
wmvanvliet/dyconnmap
15a830a5755ce198a33b245b18927c494c767a60
[ "BSD-3-Clause" ]
42
2020-02-09T02:21:25.000Z
2022-03-29T20:24:29.000Z
examples/ts_surrogates.py
wmvanvliet/dyconnmap
15a830a5755ce198a33b245b18927c494c767a60
[ "BSD-3-Clause" ]
74
2020-01-23T17:50:16.000Z
2022-02-28T04:08:01.000Z
examples/ts_surrogates.py
wmvanvliet/dyconnmap
15a830a5755ce198a33b245b18927c494c767a60
[ "BSD-3-Clause" ]
16
2020-03-04T04:53:00.000Z
2022-03-21T01:49:05.000Z
# -*- coding: utf-8 -*- import numpy as np np.set_printoptions(precision=3, linewidth=256) from dyconnmap.ts import fdr, surrogate_analysis if __name__ == "__main__": rng = np.random.RandomState(0) data = np.load( "/home/makism/Github/dyconnmap/examples/data/eeg_32chans_10secs.npy") ts1 = data[...
26.703704
82
0.628294
# -*- coding: utf-8 -*- import numpy as np np.set_printoptions(precision=3, linewidth=256) from dyconnmap.ts import fdr, surrogate_analysis if __name__ == "__main__": rng = np.random.RandomState(0) data = np.load( "/home/makism/Github/dyconnmap/examples/data/eeg_32chans_10secs.npy") ts1 = data[...
0
0
0
6c0fc595a138d36bf6a83c4ba2f8613292dfb360
576
py
Python
setup.py
ehenry2/xgbatch
476150b89b77f4f35400efcbbd3bb6a0afae4eef
[ "MIT" ]
5
2021-04-21T23:41:10.000Z
2022-03-11T03:58:43.000Z
setup.py
ehenry2/xgbatch
476150b89b77f4f35400efcbbd3bb6a0afae4eef
[ "MIT" ]
1
2021-04-26T23:22:50.000Z
2021-05-14T17:48:27.000Z
setup.py
ehenry2/xgbatch
476150b89b77f4f35400efcbbd3bb6a0afae4eef
[ "MIT" ]
2
2021-08-19T13:40:07.000Z
2021-09-08T09:00:45.000Z
import setuptools setuptools.setup( name="xgbatch", version="0.0.2", author="Eric Henry", description="High Performance Serving for XGBoost", url="https://github.com/ehenry2/xgbatch", packages=["xgbatch"], classifiers=[ "Programming Language :: Python :: 3", "License :: OSI...
23.04
55
0.565972
import setuptools setuptools.setup( name="xgbatch", version="0.0.2", author="Eric Henry", description="High Performance Serving for XGBoost", url="https://github.com/ehenry2/xgbatch", packages=["xgbatch"], classifiers=[ "Programming Language :: Python :: 3", "License :: OSI...
0
0
0
a0f318dc395eb35d33e7b41aad49e33d032dd153
1,443
py
Python
demoslogic/premises/migrations/0002_auto_20161126_1154.py
amstart/demoslogic
059575b502c21f8f27c66a26abee9a42fcb788b7
[ "MIT" ]
null
null
null
demoslogic/premises/migrations/0002_auto_20161126_1154.py
amstart/demoslogic
059575b502c21f8f27c66a26abee9a42fcb788b7
[ "MIT" ]
3
2021-06-08T20:04:58.000Z
2022-03-11T23:26:36.000Z
demoslogic/premises/migrations/0002_auto_20161126_1154.py
amstart/demoslogic
059575b502c21f8f27c66a26abee9a42fcb788b7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-26 10:54 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion
35.195122
154
0.613306
# -*- coding: utf-8 -*- # Generated by Django 1.10.2 on 2016-11-26 10:54 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('premises', '0001_initial'), ] operations = [ ...
0
1,231
23
7c912919a4189771d14d1e71b863486b960706a1
3,176
py
Python
examples/simple.py
lukevs/web3-flashbots
5e75ddc32a2379d71c7b01be3ccbe5f96167de06
[ "MIT" ]
1
2022-02-04T17:16:12.000Z
2022-02-04T17:16:12.000Z
examples/simple.py
lukevs/web3-flashbots
5e75ddc32a2379d71c7b01be3ccbe5f96167de06
[ "MIT" ]
null
null
null
examples/simple.py
lukevs/web3-flashbots
5e75ddc32a2379d71c7b01be3ccbe5f96167de06
[ "MIT" ]
null
null
null
from eth_account.signers.local import LocalAccount from web3.middleware import construct_sign_and_send_raw_middleware from flashbots import flashbot from flashbots.types import SignTx from eth_account.account import Account from web3 import Web3, HTTPProvider from web3.types import TxParams, Wei import os """ In thi...
29.682243
94
0.724181
from eth_account.signers.local import LocalAccount from web3.middleware import construct_sign_and_send_raw_middleware from flashbots import flashbot from flashbots.types import SignTx from eth_account.account import Account from web3 import Web3, HTTPProvider from web3.types import TxParams, Wei import os """ In thi...
0
0
0
8c5d973f7d9c4dc4175b419802410a93a609ceb9
2,861
py
Python
hsv_tool.py
Forkxz/Running-Robot
b2bb25f15423762bc06a6483f0ee1ecae4e93813
[ "MIT" ]
2
2020-12-30T15:26:10.000Z
2021-04-21T15:37:45.000Z
hsv_tool.py
Forkxz/Running-Robot
b2bb25f15423762bc06a6483f0ee1ecae4e93813
[ "MIT" ]
null
null
null
hsv_tool.py
Forkxz/Running-Robot
b2bb25f15423762bc06a6483f0ee1ecae4e93813
[ "MIT" ]
null
null
null
import cv2 as cv #hsv 调试 ## 调用次方法,传入文件路径 if __name__ == '__main__': ##使用: h=Hsv_change() h.inRange_byFilePath("chest/stage.jpg")
37.644737
107
0.54841
import cv2 as cv class Hsv_change: #hsv 调试 def __init__(self): self.i1 = 0 self.i2 = 0 self.i3 = 0 self.i4 = 0 self.i5 = 0 self.i6 = 0 pass def onChange(self,a, b, hsv): if a == 1: self.i1 = b elif a == 2: self...
2,594
-4
128
6aaa23a3d3e3b83112086898cfe3f0fd517c13ee
27,219
py
Python
pycroscopy/analysis/utils/atom_finding_general_gaussian.py
ealopez/pycroscopy
9f7c0543b67eaa0668296295fc5f492360c130a0
[ "MIT" ]
null
null
null
pycroscopy/analysis/utils/atom_finding_general_gaussian.py
ealopez/pycroscopy
9f7c0543b67eaa0668296295fc5f492360c130a0
[ "MIT" ]
null
null
null
pycroscopy/analysis/utils/atom_finding_general_gaussian.py
ealopez/pycroscopy
9f7c0543b67eaa0668296295fc5f492360c130a0
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ @author: Ondrej Dyck """ from __future__ import division, print_function, absolute_import, unicode_literals import numpy as np from scipy.optimize import least_squares import itertools as itt import multiprocessing as mp import time as tm import matplotlib.pyplot as plt from ....
45.289517
120
0.587274
# -*- coding: utf-8 -*- """ @author: Ondrej Dyck """ from __future__ import division, print_function, absolute_import, unicode_literals import numpy as np from scipy.optimize import least_squares import itertools as itt import multiprocessing as mp import time as tm import matplotlib.pyplot as plt from ....
5,519
0
81
6a59fecf66d836060c78579d9ecf16f890b01071
1,347
py
Python
tests.py
cyberorgnizm/passgeny
b492b36b0c3073cad322dc28175f60905e1f614a
[ "MIT" ]
null
null
null
tests.py
cyberorgnizm/passgeny
b492b36b0c3073cad322dc28175f60905e1f614a
[ "MIT" ]
null
null
null
tests.py
cyberorgnizm/passgeny
b492b36b0c3073cad322dc28175f60905e1f614a
[ "MIT" ]
null
null
null
import string import unittest from collections import Counter from main import extract_characters, generate_password if __name__ == '__main__': unittest.main()
39.617647
103
0.712695
import string import unittest from collections import Counter from main import extract_characters, generate_password class TestPasswordGenerator(unittest.TestCase): def setUp(self): self.length = 10 self.alphabets = 3 self.digits = 7 def test_extract_characters(self): """test...
71
1,088
23
fdc581749b6dd12f31f0df3c4004af6ba6ef1354
2,944
py
Python
tests/conftest.py
itemmanager/bungieapi
0c4326f88ea0f28a1dcab683dc08c8d21c940fc1
[ "MIT" ]
5
2022-01-06T21:05:53.000Z
2022-02-12T19:58:11.000Z
tests/conftest.py
itemmanager/bungieapi
0c4326f88ea0f28a1dcab683dc08c8d21c940fc1
[ "MIT" ]
8
2021-12-25T02:40:56.000Z
2022-03-28T03:31:41.000Z
tests/conftest.py
itemmanager/bungieapi
0c4326f88ea0f28a1dcab683dc08c8d21c940fc1
[ "MIT" ]
1
2022-01-30T23:53:25.000Z
2022-01-30T23:53:25.000Z
import asyncio import os import sys from datetime import datetime, timedelta import aiohttp import pytest from bungieapi.base import Token from bungieapi.client import Client, Credentials from bungieapi.forge import forge @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pytest.fixture @pyt...
25.162393
88
0.701427
import asyncio import os import sys from datetime import datetime, timedelta import aiohttp import pytest from bungieapi.base import Token from bungieapi.client import Client, Credentials from bungieapi.forge import forge @pytest.fixture def api_key() -> str: return os.environ["BUNGIE_API_KEY"] @pytest.fixtur...
2,133
0
332
cb2028dc0370b3c796bd4400d29bed6ec69cf172
2,595
py
Python
Tools/idle/eventparse.py
1byte2bytes/cpython
7fbaeb819ca7b20dca048217ff585ec195e999ec
[ "Unlicense", "TCL", "DOC", "AAL", "X11" ]
5
2022-03-26T21:53:36.000Z
2022-03-30T21:47:20.000Z
Tools/idle/eventparse.py
1byte2bytes/cpython
7fbaeb819ca7b20dca048217ff585ec195e999ec
[ "Unlicense", "TCL", "DOC", "AAL", "X11" ]
6
2020-11-18T15:48:14.000Z
2021-05-03T21:20:50.000Z
Tools/idle/eventparse.py
1byte2bytes/cpython
7fbaeb819ca7b20dca048217ff585ec195e999ec
[ "Unlicense", "TCL", "DOC", "AAL", "X11" ]
2
2015-07-16T08:14:13.000Z
2022-03-27T01:55:17.000Z
#! /usr/bin/env python """Parse event definitions out of comments in source files.""" import re import sys import os import string import getopt import glob import fileinput import pprint if __name__ == '__main__': sys.exit(main())
27.606383
70
0.463198
#! /usr/bin/env python """Parse event definitions out of comments in source files.""" import re import sys import os import string import getopt import glob import fileinput import pprint def main(): hits = [] sublist = [] args = sys.argv[1:] if not args: args = filter(lambda s: 'A' <= s[0] <...
2,310
0
46
ff23db65fc85c33f78cd5feeac8a1c90b6b0cfa7
4,229
py
Python
Sensor-Code-2018/Redundant Code/my_motion_colour_notReq.py
Max-Godfrey-2018/RoboCup-2018-Driving-Code
a39dc01f7c1213c8079216d49d376b317efbf5f3
[ "MIT" ]
1
2018-11-27T05:11:04.000Z
2018-11-27T05:11:04.000Z
Sensor-Code-2018/Redundant Code/my_motion_colour_notReq.py
Max-Godfrey-2018/RoboCup-2018-Driving-Code
a39dc01f7c1213c8079216d49d376b317efbf5f3
[ "MIT" ]
null
null
null
Sensor-Code-2018/Redundant Code/my_motion_colour_notReq.py
Max-Godfrey-2018/RoboCup-2018-Driving-Code
a39dc01f7c1213c8079216d49d376b317efbf5f3
[ "MIT" ]
null
null
null
#code based on example found at: #http://www.pyimagesearch.com/2015/09/14/ball-tracking-with-opencv/ # import the necessary packages from collections import deque import numpy as np import argparse import imutils import cv2 import time as t # construct the argument parse and parse the arguments ap = argparse.ArgumentP...
28.768707
67
0.655711
#code based on example found at: #http://www.pyimagesearch.com/2015/09/14/ball-tracking-with-opencv/ # import the necessary packages from collections import deque import numpy as np import argparse import imutils import cv2 import time as t # construct the argument parse and parse the arguments ap = argparse.ArgumentP...
0
0
0
79a67b9b8f00239bfef9ac890dc43cd796760657
5,686
py
Python
app/appwrite-functions/CreateDBCollection/.appwrite/appwrite/client.py
MME-Aufgaben-im-Winter-2021/projects-pagemuse-mme-2021-22
9f5fa9bc2dcf27520dbebde834f652188362338b
[ "MIT" ]
null
null
null
app/appwrite-functions/CreateDBCollection/.appwrite/appwrite/client.py
MME-Aufgaben-im-Winter-2021/projects-pagemuse-mme-2021-22
9f5fa9bc2dcf27520dbebde834f652188362338b
[ "MIT" ]
27
2022-02-24T11:53:35.000Z
2022-03-13T08:42:02.000Z
app/appwrite-functions/UpdateDBCollection/.appwrite/appwrite/client.py
MME-Aufgaben-im-Winter-2021/projects-pagemuse-mme-2021-22
9f5fa9bc2dcf27520dbebde834f652188362338b
[ "MIT" ]
null
null
null
import io import requests import os from .input_file import InputFile from .exception import AppwriteException
30.569892
139
0.517939
import io import requests import os from .input_file import InputFile from .exception import AppwriteException class Client: def __init__(self): self._chunk_size = 5*1024*1024 self._self_signed = False self._endpoint = 'https://HOSTNAME/v1' self._global_headers = { 'cont...
4,910
641
23
4c07c2d843d2683d0a737250b780360c8e38eb65
5,038
py
Python
registration_utils/register.py
jic-dtool/dtool_lookup_server
fc5ed28504eafb4e5d1f279897eb722f7a929b12
[ "MIT" ]
4
2021-11-03T21:55:21.000Z
2022-02-25T14:22:07.000Z
registration_utils/register.py
jic-dtool/dtool_lookup_server
fc5ed28504eafb4e5d1f279897eb722f7a929b12
[ "MIT" ]
19
2018-08-14T12:37:05.000Z
2022-02-23T21:32:37.000Z
registration_utils/register.py
jic-dtool/dtool_lookup_server
fc5ed28504eafb4e5d1f279897eb722f7a929b12
[ "MIT" ]
3
2020-03-09T13:47:06.000Z
2021-11-19T23:18:47.000Z
import click import requests import yaml from dtool_lookup_server.utils import ( iter_datasets_in_base_uri, generate_dataset_info, ) def get_projects(fpath): """Return projects dictionary.""" with open(fpath) as fh: projects = yaml.load(fh, Loader=yaml.FullLoader) return projects def ge...
30.719512
78
0.679436
import click import requests import yaml from dtool_lookup_server.utils import ( iter_datasets_in_base_uri, generate_dataset_info, ) def get_projects(fpath): """Return projects dictionary.""" with open(fpath) as fh: projects = yaml.load(fh, Loader=yaml.FullLoader) return projects def ge...
0
0
0
bec2099680dbaa88d6a1cab072c23f913e9e23fa
707
py
Python
km3pipe/io/tests/test_ch.py
KM3NeT/km3pipe
e27df0ceea02bcb26d128494a4e1d6a55e2f2e54
[ "MIT" ]
1
2021-01-26T01:57:56.000Z
2021-01-26T01:57:56.000Z
km3pipe/io/tests/test_ch.py
KM3NeT/km3pipe
e27df0ceea02bcb26d128494a4e1d6a55e2f2e54
[ "MIT" ]
null
null
null
km3pipe/io/tests/test_ch.py
KM3NeT/km3pipe
e27df0ceea02bcb26d128494a4e1d6a55e2f2e54
[ "MIT" ]
null
null
null
# Filename: test_ch.py # pylint: disable=locally-disabled,C0111,R0904,C0301,C0103,W0212 from km3pipe.testing import TestCase, patch, Mock from km3pipe.io.ch import CHPump __author__ = "Tamas Gal" __copyright__ = "Copyright 2018, Tamas Gal and the KM3NeT collaboration." __credits__ = [] __license__ = "MIT" __maintainer...
32.136364
73
0.756719
# Filename: test_ch.py # pylint: disable=locally-disabled,C0111,R0904,C0301,C0103,W0212 from km3pipe.testing import TestCase, patch, Mock from km3pipe.io.ch import CHPump __author__ = "Tamas Gal" __copyright__ = "Copyright 2018, Tamas Gal and the KM3NeT collaboration." __credits__ = [] __license__ = "MIT" __maintainer...
156
134
23
da65ae1903e7531796af350366f1a1c905737326
1,055
py
Python
scripts/main.py
dimadobriy/turtlebot3
b04cd1f7fb2ad7efeac043c22069e347d7cf6359
[ "Apache-2.0" ]
null
null
null
scripts/main.py
dimadobriy/turtlebot3
b04cd1f7fb2ad7efeac043c22069e347d7cf6359
[ "Apache-2.0" ]
null
null
null
scripts/main.py
dimadobriy/turtlebot3
b04cd1f7fb2ad7efeac043c22069e347d7cf6359
[ "Apache-2.0" ]
1
2020-10-14T15:07:01.000Z
2020-10-14T15:07:01.000Z
#!/usr/bin/env python # coding: utf-8 import rospy from traj_generator import TrajectoryGenerator from controller import Controller if __name__ == '__main__': # 1. Create new node rospy.init_node("main_node") rate = rospy.Rate(5) # controller freq in Hz # init our trajectory generator and co...
28.513514
99
0.599052
#!/usr/bin/env python # coding: utf-8 import rospy from traj_generator import TrajectoryGenerator from controller import Controller if __name__ == '__main__': # 1. Create new node rospy.init_node("main_node") rate = rospy.Rate(5) # controller freq in Hz # init our trajectory generator and co...
0
0
0
1f6f99fefcaa72b50ca3f77111a0e213e5d44f04
374
py
Python
qatrack/qa/tests/test_utils.py
mmmetwaly/qatrackplus
193bc22c0014891f5d97be32ccc73a08c7f7f81b
[ "MIT" ]
null
null
null
qatrack/qa/tests/test_utils.py
mmmetwaly/qatrackplus
193bc22c0014891f5d97be32ccc73a08c7f7f81b
[ "MIT" ]
null
null
null
qatrack/qa/tests/test_utils.py
mmmetwaly/qatrackplus
193bc22c0014891f5d97be32ccc73a08c7f7f81b
[ "MIT" ]
null
null
null
from django.test import TestCase from qatrack.qa import utils #============================================================================ #----------------------------------------------------------------------
26.714286
77
0.393048
from django.test import TestCase from qatrack.qa import utils #============================================================================ class TestUtils(TestCase): #---------------------------------------------------------------------- def test_unique(self): items = ["foo", "foo", "bar"] ...
100
5
49
84d3c9e993e46c35168c2cba4d2b5e8a4329395f
1,027
py
Python
data_test.py
dhlee-work/SKT-FellowShip3
4a4156a787155680c6cff5f5de7da3b412d29f40
[ "BSD-3-Clause" ]
null
null
null
data_test.py
dhlee-work/SKT-FellowShip3
4a4156a787155680c6cff5f5de7da3b412d29f40
[ "BSD-3-Clause" ]
null
null
null
data_test.py
dhlee-work/SKT-FellowShip3
4a4156a787155680c6cff5f5de7da3b412d29f40
[ "BSD-3-Clause" ]
null
null
null
import json # import json module # with statement with open('./data/spider/train_raw.json') as json_file: json_data = json.load(json_file) type(json_data) re_data = [] for idx, row in enumerate(json_data): bb = {} for i in ['db_id', 'query', 'question']: bb[i] = row[i] re_data.append(bb) ...
23.340909
151
0.651412
import json # import json module # with statement with open('./data/spider/train_raw.json') as json_file: json_data = json.load(json_file) type(json_data) re_data = [] for idx, row in enumerate(json_data): bb = {} for i in ['db_id', 'query', 'question']: bb[i] = row[i] re_data.append(bb) ...
0
0
0
ca171654fdf23cdf1b5a971f2123e10c51953e39
852
py
Python
algorithms/Others/fibonacci_dynamic_programming.py
OblackatO/ITSecurity_CS_Topics
c6a88021609e2df610b720061154dadddd35f537
[ "MIT" ]
null
null
null
algorithms/Others/fibonacci_dynamic_programming.py
OblackatO/ITSecurity_CS_Topics
c6a88021609e2df610b720061154dadddd35f537
[ "MIT" ]
null
null
null
algorithms/Others/fibonacci_dynamic_programming.py
OblackatO/ITSecurity_CS_Topics
c6a88021609e2df610b720061154dadddd35f537
[ "MIT" ]
null
null
null
# Example of Dynamic Programming for the fibonacci sequence. Extracted from https://www.youtube.com/watch?v=vYquumk4nWw # A naive recursive solution # A memoized solution # A bottom-up solution
23.027027
119
0.57277
# Example of Dynamic Programming for the fibonacci sequence. Extracted from https://www.youtube.com/watch?v=vYquumk4nWw # A naive recursive solution def fib(n): if n == 1 or n == 2: result = 1 else: result = fib(n-1) + fib(n-2) return result # A memoized solution def fib_2(n, memo): i...
565
0
89
9b302603d00072a91229dc97f52bad8340e5c7df
1,124
py
Python
engine/sitemap-generator/xml_to_html.py
hasadna/OpenPress
7aa99ed92c6aef975f59c0295681f02211fc7ab5
[ "MIT" ]
null
null
null
engine/sitemap-generator/xml_to_html.py
hasadna/OpenPress
7aa99ed92c6aef975f59c0295681f02211fc7ab5
[ "MIT" ]
null
null
null
engine/sitemap-generator/xml_to_html.py
hasadna/OpenPress
7aa99ed92c6aef975f59c0295681f02211fc7ab5
[ "MIT" ]
null
null
null
import sys import xml.etree.ElementTree as ET LINE_THRESHOLD = 10 TEXT_MATCHES = [".//HedLine_hl1/*/*", ".//Content/*/*"] TEXT_NODES = ['W','Q'] if __name__ == "__main__": main(sys.argv)
26.761905
98
0.565836
import sys import xml.etree.ElementTree as ET LINE_THRESHOLD = 10 TEXT_MATCHES = [".//HedLine_hl1/*/*", ".//Content/*/*"] TEXT_NODES = ['W','Q'] def parse_text_xml(xml_path): tree = ET.parse(xml_path) root = tree.getroot() lines_list = [] temp_line = [] last_y = None for match in TEX...
873
0
46
1ef3fa3251f0d8814e9a42d2cfaff34ae727a370
320
py
Python
examples/software_defined_assets/software_defined_assets_tests/test_spark_weather_assets.py
silentsokolov/dagster
510bf07bf6906294d5a239d60079c88211002ebf
[ "Apache-2.0" ]
null
null
null
examples/software_defined_assets/software_defined_assets_tests/test_spark_weather_assets.py
silentsokolov/dagster
510bf07bf6906294d5a239d60079c88211002ebf
[ "Apache-2.0" ]
null
null
null
examples/software_defined_assets/software_defined_assets_tests/test_spark_weather_assets.py
silentsokolov/dagster
510bf07bf6906294d5a239d60079c88211002ebf
[ "Apache-2.0" ]
null
null
null
from software_defined_assets.spark_weather_assets import spark_weather_assets from dagster import materialize from dagster.core.test_utils import instance_for_test
32
77
0.84375
from software_defined_assets.spark_weather_assets import spark_weather_assets from dagster import materialize from dagster.core.test_utils import instance_for_test def test_airport_weather_assets(): with instance_for_test() as instance: assert materialize(spark_weather_assets, instance=instance).success
131
0
23
d3e61f0bcef9a25df15a1c420c43ad58dba2425b
4,148
py
Python
lunr/db/migrations/versions/001_initial_migration.py
PythonGirlSam/lunr
9476436a46d377fab26674d41ac7444d98df1cbd
[ "Apache-2.0" ]
6
2015-11-09T14:16:26.000Z
2018-04-05T14:27:35.000Z
lunr/db/migrations/versions/001_initial_migration.py
PythonGirlSam/lunr
9476436a46d377fab26674d41ac7444d98df1cbd
[ "Apache-2.0" ]
16
2016-01-28T20:16:47.000Z
2019-03-07T07:30:29.000Z
lunr/db/migrations/versions/001_initial_migration.py
SaumyaRackspace/lunr
9476436a46d377fab26674d41ac7444d98df1cbd
[ "Apache-2.0" ]
18
2015-10-23T10:10:52.000Z
2020-12-15T07:11:52.000Z
# Copyright (c) 2011-2016 Rackspace US, 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 ...
31.424242
79
0.67406
# Copyright (c) 2011-2016 Rackspace US, 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 ...
476
0
46
b8a04e49bdb8d45ba1ff49fda54cb3a967501103
910
py
Python
Pandas_Stats.py
Bhaney44/Patent-Valuation
57af26f9ec60c85cbf6217358b70520a7b916189
[ "Apache-2.0" ]
null
null
null
Pandas_Stats.py
Bhaney44/Patent-Valuation
57af26f9ec60c85cbf6217358b70520a7b916189
[ "Apache-2.0" ]
null
null
null
Pandas_Stats.py
Bhaney44/Patent-Valuation
57af26f9ec60c85cbf6217358b70520a7b916189
[ "Apache-2.0" ]
null
null
null
import pandas as pd from pandas import DataFrame import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D df = pd.read_csv('Lite_Coin_12_Mos.csv') print(df.head()) print(df.tail()) print(df.index) print(df.columns) print("-----") print(df.describe()) #print mediuan print('median') print(df.median()...
15.964912
128
0.703297
import pandas as pd from pandas import DataFrame import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D df = pd.read_csv('Lite_Coin_12_Mos.csv') print(df.head()) print(df.tail()) print(df.index) print(df.columns) print("-----") print(df.describe()) #print mediuan print('median') print(df.median()...
0
0
0
8fc3213472f874ffef4a133ad7f509494145dee9
17,612
py
Python
main.py
PonygeekICY/CodyCloud-Server
9b64e8a58806b616a15f4f3a30370b5f2802ee28
[ "MIT" ]
1
2018-02-19T17:40:36.000Z
2018-02-19T17:40:36.000Z
main.py
PonygeekICY/CodyCloud-Server
9b64e8a58806b616a15f4f3a30370b5f2802ee28
[ "MIT" ]
null
null
null
main.py
PonygeekICY/CodyCloud-Server
9b64e8a58806b616a15f4f3a30370b5f2802ee28
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Name: CodyCloud Ngrok Server # Author: Icy(enderman1024@foxmail.com) # OS: Linux import time, socket, threading, os, sys, json if __name__ == "__main__": main()
26.765957
159
0.655973
#!/usr/bin/python3 # -*- coding: utf-8 -*- # Name: CodyCloud Ngrok Server # Author: Icy(enderman1024@foxmail.com) # OS: Linux import time, socket, threading, os, sys, json def init(): global LOGGER, KEY, STOP paths = ("./bin/","./cache/","./configs/","./logs/") for i in paths: path_fixer(i) try: configs = ...
16,491
33
828
6f2dcc0895c468d608e01b4c75e972a0baf2bb86
1,819
py
Python
src/osqp/tests/non_convex_test.py
vineetbansal/osqp_cuda
f456e830df84a3dc7ee13a11b9c8df2e59df40be
[ "Apache-2.0" ]
null
null
null
src/osqp/tests/non_convex_test.py
vineetbansal/osqp_cuda
f456e830df84a3dc7ee13a11b9c8df2e59df40be
[ "Apache-2.0" ]
null
null
null
src/osqp/tests/non_convex_test.py
vineetbansal/osqp_cuda
f456e830df84a3dc7ee13a11b9c8df2e59df40be
[ "Apache-2.0" ]
null
null
null
# Test osqp python module import osqp from osqp import constant, default_algebra # import osqppurepy as osqp import numpy as np from scipy import sparse # Unit Test import unittest import pytest import numpy.testing as nptest
31.912281
124
0.575591
# Test osqp python module import osqp from osqp import constant, default_algebra # import osqppurepy as osqp import numpy as np from scipy import sparse # Unit Test import unittest import pytest import numpy.testing as nptest class non_convex_tests(unittest.TestCase): def setUp(self): # Simple QP probl...
1,314
254
23
d99e0f224d1640231a5721ef8b5e83e536d27909
2,212
py
Python
neo3/contracts/interop/binary.py
Degget1986/neo-mamba
da7312d5027f3e9b0e5421495d5c00915bdfd786
[ "MIT" ]
null
null
null
neo3/contracts/interop/binary.py
Degget1986/neo-mamba
da7312d5027f3e9b0e5421495d5c00915bdfd786
[ "MIT" ]
null
null
null
neo3/contracts/interop/binary.py
Degget1986/neo-mamba
da7312d5027f3e9b0e5421495d5c00915bdfd786
[ "MIT" ]
null
null
null
from __future__ import annotations import base64 import base58 # type: ignore from neo3 import vm, contracts from neo3.contracts.interop import register @register("System.Binary.Serialize", 1 << 12, contracts.CallFlags.NONE) @register("System.Binary.Deserialize", 1 << 14, contracts.CallFlags.NONE) @register("Sys...
38.807018
93
0.694846
from __future__ import annotations import base64 import base58 # type: ignore from neo3 import vm, contracts from neo3.contracts.interop import register @register("System.Binary.Serialize", 1 << 12, contracts.CallFlags.NONE) def binary_serialize(engine: contracts.ApplicationEngine, stack_item: vm.StackItem) -> bytes...
1,286
0
176
f9f12dedc52949f3beb791a4827bf3a3a3c82cd8
1,672
py
Python
untitled/crossdoc/pie.py
ramanpreet1990/CSE_535_Multilingual_Search_System_For_Social_Network
0475a983ac0d08e4404e8fbde2ef78d077fd6540
[ "Apache-2.0" ]
1
2016-05-30T19:43:31.000Z
2016-05-30T19:43:31.000Z
untitled/crossdoc/pie.py
ramanpreet1990/CSE_535_Multilingual_Search_System_For_Social_Network
0475a983ac0d08e4404e8fbde2ef78d077fd6540
[ "Apache-2.0" ]
null
null
null
untitled/crossdoc/pie.py
ramanpreet1990/CSE_535_Multilingual_Search_System_For_Social_Network
0475a983ac0d08e4404e8fbde2ef78d077fd6540
[ "Apache-2.0" ]
null
null
null
from json import loads from os.path import isfile, splitext from sys import argv, exit from highcharts import Highchart DOCS = 'docs' RESPONSE = 'response' LANG = 'tweet_lang' COUNTRY = 'user_location' TITLE = 'title' TEXT = 'text' # Make sure we have the correct command line arguments if len(argv) ...
24.588235
95
0.667464
from json import loads from os.path import isfile, splitext from sys import argv, exit from highcharts import Highchart DOCS = 'docs' RESPONSE = 'response' LANG = 'tweet_lang' COUNTRY = 'user_location' TITLE = 'title' TEXT = 'text' # Make sure we have the correct command line arguments if len(argv) ...
0
0
0
29bc5246ba7ecd13d647eaa1873b9811b3aa153c
8,949
py
Python
multiproc_queues.py
okahilak/xcoord
255d30555f312a2afb0a0d42dce829b1f6ec2caa
[ "MIT" ]
null
null
null
multiproc_queues.py
okahilak/xcoord
255d30555f312a2afb0a0d42dce829b1f6ec2caa
[ "MIT" ]
null
null
null
multiproc_queues.py
okahilak/xcoord
255d30555f312a2afb0a0d42dce829b1f6ec2caa
[ "MIT" ]
1
2021-09-15T13:54:15.000Z
2021-09-15T13:54:15.000Z
from PyQt5 import QtCore, QtWidgets import sys from multiprocessing import Process, Queue from time import time import vtk from vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor import numpy as np from time import sleep # Some other functions I toyed with before I got the vtk example working ...
35.511905
131
0.602414
from PyQt5 import QtCore, QtWidgets import sys from multiprocessing import Process, Queue from time import time import vtk from vtk.qt.QVTKRenderWindowInteractor import QVTKRenderWindowInteractor import numpy as np from time import sleep # Some other functions I toyed with before I got the vtk example working def ad...
8,149
28
328
168b8c8988d0ef325a712b4234a66b5d4485b00e
4,066
py
Python
notebooks/2021-07/utility.py
ianozsvald/kaggle_optiver_volatility
9645e666e836dc37ca98a9ccbd9bafa0442b3e70
[ "MIT" ]
null
null
null
notebooks/2021-07/utility.py
ianozsvald/kaggle_optiver_volatility
9645e666e836dc37ca98a9ccbd9bafa0442b3e70
[ "MIT" ]
null
null
null
notebooks/2021-07/utility.py
ianozsvald/kaggle_optiver_volatility
9645e666e836dc37ca98a9ccbd9bafa0442b3e70
[ "MIT" ]
null
null
null
import os import pandas as pd from tqdm import tqdm if os.environ.get("USER") == "ian": ROOT = "/home/ian/data/kaggle/optiver_volatility/" else: ROOT = "/kaggle/input/optiver-realized-volatility-prediction" print(f"Utility says ROOT is {ROOT}") TRAIN_CSV = os.path.join(ROOT, "train.csv") TEST_CSV = os.path.jo...
38
98
0.631825
import os import pandas as pd from tqdm import tqdm if os.environ.get("USER") == "ian": ROOT = "/home/ian/data/kaggle/optiver_volatility/" else: ROOT = "/kaggle/input/optiver-realized-volatility-prediction" print(f"Utility says ROOT is {ROOT}") TRAIN_CSV = os.path.join(ROOT, "train.csv") TEST_CSV = os.path.jo...
407
0
46
a6e94f1b904c72dcba076eb53a57f6cc0e8df07e
156
py
Python
Guanabara/desafio06.py
manuellaAlvesVarella/python
eedb8362f0ebc8074f87d15c9e629e319ff29394
[ "MIT" ]
1
2022-03-25T20:42:20.000Z
2022-03-25T20:42:20.000Z
Guanabara/desafio06.py
manuellaAlvesVarella/python
eedb8362f0ebc8074f87d15c9e629e319ff29394
[ "MIT" ]
null
null
null
Guanabara/desafio06.py
manuellaAlvesVarella/python
eedb8362f0ebc8074f87d15c9e629e319ff29394
[ "MIT" ]
null
null
null
n = int(input('digite um número:')) d = n * 2 t = n * 3 r = n ** (1/2) print ('o dobro de {} é {} o triplo {} e a raiz quadrada é {:.0f}'.format(n,d,t,r))
26
83
0.519231
n = int(input('digite um número:')) d = n * 2 t = n * 3 r = n ** (1/2) print ('o dobro de {} é {} o triplo {} e a raiz quadrada é {:.0f}'.format(n,d,t,r))
0
0
0
8ccd287bf65bc7988f1940dfd466766b8aed01a5
1,782
py
Python
aliyun/api/rest/Ecs20130110CreateInstanceRequest.py
snowyxx/aliyun-python-demo
ed40887ddff440b85b77f9b2a1fcda11cca55c8b
[ "Apache-2.0" ]
null
null
null
aliyun/api/rest/Ecs20130110CreateInstanceRequest.py
snowyxx/aliyun-python-demo
ed40887ddff440b85b77f9b2a1fcda11cca55c8b
[ "Apache-2.0" ]
null
null
null
aliyun/api/rest/Ecs20130110CreateInstanceRequest.py
snowyxx/aliyun-python-demo
ed40887ddff440b85b77f9b2a1fcda11cca55c8b
[ "Apache-2.0" ]
null
null
null
''' Created by auto_sdk on 2015.11.25 ''' from aliyun.api.base import RestApi
42.428571
567
0.76431
''' Created by auto_sdk on 2015.11.25 ''' from aliyun.api.base import RestApi class Ecs20130110CreateInstanceRequest(RestApi): def __init__(self,domain='ecs.aliyuncs.com',port=80): RestApi.__init__(self,domain, port) self.ClientToken = None self.DataDisk_1_Category = None self.DataDisk_1_Size = None ...
1,574
27
99
461b5a94c2dc4ef30e616df559fc1fa9a0af6e92
1,535
py
Python
bin/util/plot.py
LBNL-ETA/AlphaBuilding-ResCommunity
549a081ebde7d52d62a0b61a368f1094a70a4d8b
[ "BSD-2-Clause" ]
2
2021-09-13T14:56:13.000Z
2022-01-12T10:21:04.000Z
bin/util/plot.py
LBNL-ETA/AlphaBuilding-ResCommunity
549a081ebde7d52d62a0b61a368f1094a70a4d8b
[ "BSD-2-Clause" ]
null
null
null
bin/util/plot.py
LBNL-ETA/AlphaBuilding-ResCommunity
549a081ebde7d52d62a0b61a368f1094a70a4d8b
[ "BSD-2-Clause" ]
null
null
null
import numpy as np
32.659574
133
0.572638
import numpy as np def plotStep(x, y, ax, style = None, **kwargs): ## Pad the first value y = np.pad(y, (1, 0), mode = 'edge') if style is None: l, = ax.step(x, y) elif kwargs is None: l, = ax.step(x, y, style) else: l, = ax.step(x, y, style, **kwargs) return l def...
1,442
0
73
677b7ed830986663c0c925794ef07be67a43106b
54,126
py
Python
skorch/net.py
MeRajat/skorch
6b013a1fa8b52cf781d54abbae515c755e1c6f9c
[ "BSD-3-Clause" ]
null
null
null
skorch/net.py
MeRajat/skorch
6b013a1fa8b52cf781d54abbae515c755e1c6f9c
[ "BSD-3-Clause" ]
null
null
null
skorch/net.py
MeRajat/skorch
6b013a1fa8b52cf781d54abbae515c755e1c6f9c
[ "BSD-3-Clause" ]
null
null
null
"""Neural net classes.""" import fnmatch from itertools import chain from functools import partial import re import tempfile import warnings import numpy as np from sklearn.base import BaseEstimator import torch from torch.utils.data import DataLoader from skorch.callbacks import EpochTimer from skorch.callbacks imp...
33.82875
79
0.587204
"""Neural net classes.""" import fnmatch from itertools import chain from functools import partial import re import tempfile import warnings import numpy as np from sklearn.base import BaseEstimator import torch from torch.utils.data import DataLoader from skorch.callbacks import EpochTimer from skorch.callbacks imp...
10,974
3,787
747
c8f8ad297b00d0ff8d03b823d3451f34cb74c850
2,381
py
Python
tikphish/tikphish_dec.py
shyamjangid07/Reverse-Engineering
469efabcd6057f7895d8d891f1fabdf2ffe730b0
[ "Apache-2.0" ]
337
2020-08-15T12:22:14.000Z
2022-03-29T06:05:15.000Z
tikphish/tikphish_dec.py
Wh014M/Reverse-Engineering
f7aae2c43f7ea4a6730964d085c07814b6660a53
[ "Apache-2.0" ]
3
2020-11-12T14:30:48.000Z
2021-05-18T16:56:22.000Z
tikphish/tikphish_dec.py
Wh014M/Reverse-Engineering
f7aae2c43f7ea4a6730964d085c07814b6660a53
[ "Apache-2.0" ]
83
2020-08-15T00:22:58.000Z
2022-03-31T08:40:23.000Z
# -*- coding: UTF-8 -*- #Colours Defined Variables W = '\033[1;37m' N = '\033[0m' R="\033[1;37m\033[31m" B = '\033[1;37m\033[34m' G = '\033[1;32m' Y = '\033[1;33;40m' #Decorators SBR = W+"("+R+"π"+W+")" SBG = W+"("+G+"π"+W+")" SRO = W+"("+R+">"+W+")" SGO = W+"("+G+">"+W+")" SEO = W+"("+R+"!"+W+")" newlin = "\...
23.116505
66
0.450231
# -*- coding: UTF-8 -*- #Colours Defined Variables W = '\033[1;37m' N = '\033[0m' R="\033[1;37m\033[31m" B = '\033[1;37m\033[34m' G = '\033[1;32m' Y = '\033[1;33;40m' #Decorators SBR = W+"("+R+"π"+W+")" SBG = W+"("+G+"π"+W+")" SRO = W+"("+R+">"+W+")" SGO = W+"("+G+">"+W+")" SEO = W+"("+R+"!"+W+")" newlin = "\...
0
0
0
5dc6adfbea0f503b61bd5379951cf06f3d25c883
1,932
py
Python
tests/utils_tests/testing_tests/assertions_tests/test_assert_is_image.py
beam2d/chainercv
55d34c07cbbd03642b71d375db579433859bd00e
[ "MIT" ]
1,600
2017-06-01T15:37:52.000Z
2022-03-09T08:39:09.000Z
tests/utils_tests/testing_tests/assertions_tests/test_assert_is_image.py
beam2d/chainercv
55d34c07cbbd03642b71d375db579433859bd00e
[ "MIT" ]
547
2017-06-01T06:43:16.000Z
2021-05-28T17:14:05.000Z
tests/utils_tests/testing_tests/assertions_tests/test_assert_is_image.py
beam2d/chainercv
55d34c07cbbd03642b71d375db579433859bd00e
[ "MIT" ]
376
2017-06-02T01:29:10.000Z
2022-03-13T11:19:59.000Z
import numpy as np import unittest from chainercv.utils import assert_is_image from chainercv.utils import testing @testing.parameterize( { 'img': np.random.randint(0, 256, size=(3, 48, 64)), 'color': True, 'check_range': True, 'valid': True}, { 'img': np.random.randint(0, 256, size=(...
32.745763
72
0.537267
import numpy as np import unittest from chainercv.utils import assert_is_image from chainercv.utils import testing @testing.parameterize( { 'img': np.random.randint(0, 256, size=(3, 48, 64)), 'color': True, 'check_range': True, 'valid': True}, { 'img': np.random.randint(0, 256, size=(...
239
22
49
64069bacd93abee587639507d2122231a4f593d7
3,275
py
Python
main.py
Zoey31/Console3DRenderer
876603b10c90fc55d4536608644248794600720f
[ "MIT" ]
null
null
null
main.py
Zoey31/Console3DRenderer
876603b10c90fc55d4536608644248794600720f
[ "MIT" ]
null
null
null
main.py
Zoey31/Console3DRenderer
876603b10c90fc55d4536608644248794600720f
[ "MIT" ]
null
null
null
import os import numpy as np theta_spacing = 0.07 phi_spacing = 0.02 R1 = 1 R2 = 2 K2 = 5 screen_width = 50 screen_height = 50 K1 = screen_width * K2 * 3 / (8 * (R1 + R2)) def calc_luminance(cos_a, cos_b, cos_phi, cos_theta, sin_a, sin_b, sin_phi, sin_theta): """ Luminance should be equal to: cosphi...
28.232759
107
0.598168
import os import numpy as np theta_spacing = 0.07 phi_spacing = 0.02 R1 = 1 R2 = 2 K2 = 5 screen_width = 50 screen_height = 50 K1 = screen_width * K2 * 3 / (8 * (R1 + R2)) def print_chararray(char_arr): pretty = str(b"x".join([b"".join(s) for s in char_arr]))[2:-2] return pretty.replace("x", "\n").replace(...
1,439
0
115
04a83dd369d05e08b65c8577ad28ddee5551d498
27,017
py
Python
scripts/batch/exp-comp.py
ixent/qosa-snee
cc103a2f50262cad1927976a0b7f99554362581d
[ "BSD-3-Clause" ]
1
2019-01-19T06:45:42.000Z
2019-01-19T06:45:42.000Z
scripts/batch/exp-comp.py
ixent/qosa-snee
cc103a2f50262cad1927976a0b7f99554362581d
[ "BSD-3-Clause" ]
null
null
null
scripts/batch/exp-comp.py
ixent/qosa-snee
cc103a2f50262cad1927976a0b7f99554362581d
[ "BSD-3-Clause" ]
3
2017-03-08T17:42:16.000Z
2021-05-28T16:01:30.000Z
#!/usr/bin/python #This script assumes that gnuplot is in the environment PATH import getopt, logging, sys, SneeqlLib, TossimLib, AvroraLib, os, UtilLib, checkTupleCount, RandomSeeder, networkLib, StatLib, GraphData optSneeqlRoot = os.getenv("SNEEQLROOT") optNumAgendaEvals = 2 optQueryDuration = UtilLib.monthsToSecond...
37.111264
580
0.718363
#!/usr/bin/python #This script assumes that gnuplot is in the environment PATH import getopt, logging, sys, SneeqlLib, TossimLib, AvroraLib, os, UtilLib, checkTupleCount, RandomSeeder, networkLib, StatLib, GraphData optSneeqlRoot = os.getenv("SNEEQLROOT") optNumAgendaEvals = 2 optQueryDuration = UtilLib.monthsToSecond...
24,097
0
469
007635507cec04ce1d6cd4bfc511f024fd543b31
4,242
py
Python
demos/bruno_demo.py
lupalab/flowscan
a0fc8fd25cb62c9eeb6583c3d7505d54b969f88c
[ "MIT" ]
4
2019-10-09T09:03:49.000Z
2020-11-08T16:59:48.000Z
demos/bruno_demo.py
lupalab/flowscan
a0fc8fd25cb62c9eeb6583c3d7505d54b969f88c
[ "MIT" ]
null
null
null
demos/bruno_demo.py
lupalab/flowscan
a0fc8fd25cb62c9eeb6583c3d7505d54b969f88c
[ "MIT" ]
null
null
null
import os import tensorflow as tf from ..experiments import runner import copy # noqa import numpy as np from datetime import datetime # noqa from ..data import pointcloud_fetcher as pfetcher from ..model import transforms as trans # noqa from ..experiments import simplebase_experiment as set_exp from ..experiments ...
31.656716
73
0.61339
import os import tensorflow as tf from ..experiments import runner import copy # noqa import numpy as np from datetime import datetime # noqa from ..data import pointcloud_fetcher as pfetcher from ..model import transforms as trans # noqa from ..experiments import simplebase_experiment as set_exp from ..experiments ...
3,812
0
23
3b193401daaad21805830b6dc8cedba6a22a9c50
329
py
Python
selfsup/multi/loaders/loader.py
abhaymittal/self-supervision
fe99e707bcccc0eed39dfe8a4651c433caf6f8c4
[ "BSD-3-Clause" ]
29
2017-04-13T17:39:43.000Z
2022-02-17T10:01:10.000Z
selfsup/multi/loaders/loader.py
abhaymittal/self-supervision
fe99e707bcccc0eed39dfe8a4651c433caf6f8c4
[ "BSD-3-Clause" ]
7
2017-05-10T07:30:16.000Z
2019-09-09T15:38:20.000Z
selfsup/multi/loaders/loader.py
abhaymittal/self-supervision
fe99e707bcccc0eed39dfe8a4651c433caf6f8c4
[ "BSD-3-Clause" ]
6
2017-09-10T15:57:26.000Z
2020-04-21T06:14:30.000Z
from __future__ import division, print_function, absolute_import
25.307692
64
0.693009
from __future__ import division, print_function, absolute_import class Loader: def __init__(self, batch_size=16, num_threads=5): self._batch_size = batch_size self._num_threads = num_threads def batch(self): raise NotImplemented('Cannot use base class') def start(self, sess): ...
169
-8
103
b2ff30049a6e8e88d79dfb15dcddc16cb38fa3e5
15,705
py
Python
enso/quasimode/__init__.py
toolness/community-enso
e688e14628765235bf3575401192fc66f4c57236
[ "BSD-3-Clause" ]
2
2015-12-02T16:54:36.000Z
2018-02-04T00:41:39.000Z
enso/quasimode/__init__.py
toolness/community-enso
e688e14628765235bf3575401192fc66f4c57236
[ "BSD-3-Clause" ]
null
null
null
enso/quasimode/__init__.py
toolness/community-enso
e688e14628765235bf3575401192fc66f4c57236
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2008, Humanized, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditi...
38.777778
79
0.638077
# Copyright (c) 2008, Humanized, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditi...
994
0
187
db83b41e625efe7bc0eb034cd249e583350bf10e
1,628
py
Python
tests/default_value.py
thielepaul/wirepas-mesh-messaging-python
cf2590880bbe96581efa8b5c58f052f2924c1a6e
[ "Apache-2.0" ]
null
null
null
tests/default_value.py
thielepaul/wirepas-mesh-messaging-python
cf2590880bbe96581efa8b5c58f052f2924c1a6e
[ "Apache-2.0" ]
2
2021-09-13T18:43:07.000Z
2021-11-23T15:38:02.000Z
tests/default_value.py
thielepaul/wirepas-mesh-messaging-python
cf2590880bbe96581efa8b5c58f052f2924c1a6e
[ "Apache-2.0" ]
2
2021-09-30T06:39:43.000Z
2021-11-11T15:36:21.000Z
# flake8: noqa import wirepas_mesh_messaging # Define list of default values used during testing GATEWAY_ID = "test_gateway" GATEWAY_STATE = wirepas_mesh_messaging.GatewayState.ONLINE SINK_ID = "sink3" RES_OK = wirepas_mesh_messaging.GatewayResultCode.GW_RES_OK RES_KO = wirepas_mesh_messaging.GatewayResultCode.GW_RES...
34.638298
124
0.761057
# flake8: noqa import wirepas_mesh_messaging # Define list of default values used during testing GATEWAY_ID = "test_gateway" GATEWAY_STATE = wirepas_mesh_messaging.GatewayState.ONLINE SINK_ID = "sink3" RES_OK = wirepas_mesh_messaging.GatewayResultCode.GW_RES_OK RES_KO = wirepas_mesh_messaging.GatewayResultCode.GW_RES...
0
0
0
03e5313ab99e9e85b495febfc66625b35374d101
449
py
Python
update.py
dreamflasher/merge-ics
fa60fde37d615e24ae280ee19638e536a18ac621
[ "Apache-2.0" ]
null
null
null
update.py
dreamflasher/merge-ics
fa60fde37d615e24ae280ee19638e536a18ac621
[ "Apache-2.0" ]
null
null
null
update.py
dreamflasher/merge-ics
fa60fde37d615e24ae280ee19638e536a18ac621
[ "Apache-2.0" ]
null
null
null
from ics import Calendar from urllib.request import urlopen url1 = "https://calendar.google.com/calendar/ical/marcel%40intuitionmachines.com/public/basic.ics" url2 = "https://calendar.google.com/calendar/ical/dreamflasher%40dreamflasher.de/public/basic.ics" c1 = Calendar(urlopen(url1).read().decode()) c2 = Calendar(url...
34.538462
98
0.746102
from ics import Calendar from urllib.request import urlopen url1 = "https://calendar.google.com/calendar/ical/marcel%40intuitionmachines.com/public/basic.ics" url2 = "https://calendar.google.com/calendar/ical/dreamflasher%40dreamflasher.de/public/basic.ics" c1 = Calendar(urlopen(url1).read().decode()) c2 = Calendar(url...
0
0
0
6523484e8372b27654ee33f716f12420da130d21
1,226
py
Python
Django Rest Pagination/Person/views.py
abhisheksahu92/Django-Rest-Framework
45ddafb93ed1f2e232d2f537f144bf79cb30bf3d
[ "MIT" ]
null
null
null
Django Rest Pagination/Person/views.py
abhisheksahu92/Django-Rest-Framework
45ddafb93ed1f2e232d2f537f144bf79cb30bf3d
[ "MIT" ]
null
null
null
Django Rest Pagination/Person/views.py
abhisheksahu92/Django-Rest-Framework
45ddafb93ed1f2e232d2f537f144bf79cb30bf3d
[ "MIT" ]
null
null
null
from django.shortcuts import render from rest_framework import viewsets from rest_framework.filters import SearchFilter,OrderingFilter from rest_framework.pagination import LimitOffsetPagination, PageNumberPagination,CursorPagination from .pagination import PersonPageNumberPagination,PersonLimitOffsetPagination,Person...
35.028571
101
0.82708
from django.shortcuts import render from rest_framework import viewsets from rest_framework.filters import SearchFilter,OrderingFilter from rest_framework.pagination import LimitOffsetPagination, PageNumberPagination,CursorPagination from .pagination import PersonPageNumberPagination,PersonLimitOffsetPagination,Person...
0
681
91
01c1505db97917d5641d2a4af8d2cea715ecfefb
911
py
Python
cooperate/renderers.py
johnnoone/cooperate
2ae8c71f2938c65406bf6b16352fc27174111393
[ "BSD-3-Clause" ]
null
null
null
cooperate/renderers.py
johnnoone/cooperate
2ae8c71f2938c65406bf6b16352fc27174111393
[ "BSD-3-Clause" ]
null
null
null
cooperate/renderers.py
johnnoone/cooperate
2ae8c71f2938c65406bf6b16352fc27174111393
[ "BSD-3-Clause" ]
null
null
null
import yaml __all__ = ['Renderer', 'StatusRenderer']
25.305556
50
0.45225
import yaml __all__ = ['Renderer', 'StatusRenderer'] class Renderer: pass class StatusRenderer(Renderer): def render(self, future, node, command): try: result = future.result() response = { 'node': node.name, 'command': command, ...
769
13
73
4e234da7542e4e7567b595d6cbbc623b5632fced
804
py
Python
backend/api/fixtures/operational/0013_add_notional_transfer_types.py
amichard/tfrs
ed3973016cc5c2ae48999d550a23b41a5ddad807
[ "Apache-2.0" ]
18
2017-05-10T21:55:11.000Z
2021-03-01T16:41:32.000Z
backend/api/fixtures/operational/0013_add_notional_transfer_types.py
amichard/tfrs
ed3973016cc5c2ae48999d550a23b41a5ddad807
[ "Apache-2.0" ]
1,167
2017-03-04T00:18:43.000Z
2022-03-03T22:31:51.000Z
backend/api/fixtures/operational/0013_add_notional_transfer_types.py
amichard/tfrs
ed3973016cc5c2ae48999d550a23b41a5ddad807
[ "Apache-2.0" ]
48
2017-03-09T17:19:39.000Z
2022-02-24T16:38:17.000Z
from django.db import transaction from api.management.data_script import OperationalDataScript from api.models.NotionalTransferType import NotionalTransferType class AddNotionalTransferTypes(OperationalDataScript): """ Adds Notional Transfer Types """ is_revertable = False comment = 'Adds Notiona...
25.935484
64
0.676617
from django.db import transaction from api.management.data_script import OperationalDataScript from api.models.NotionalTransferType import NotionalTransferType class AddNotionalTransferTypes(OperationalDataScript): """ Adds Notional Transfer Types """ is_revertable = False comment = 'Adds Notiona...
347
0
53
f77e498e171d62ea931b08f78a69f67276d0bd67
3,627
py
Python
test_parser.py
electricitymap/electricitymap-contrib
6572b12d1cef72c734b80273598e156ebe3c22ea
[ "MIT" ]
143
2022-01-01T10:56:58.000Z
2022-03-31T11:25:47.000Z
test_parser.py
electricitymap/electricitymap-contrib
6572b12d1cef72c734b80273598e156ebe3c22ea
[ "MIT" ]
276
2021-12-30T15:57:15.000Z
2022-03-31T14:57:16.000Z
test_parser.py
electricitymap/electricitymap-contrib
6572b12d1cef72c734b80273598e156ebe3c22ea
[ "MIT" ]
44
2021-12-30T19:48:42.000Z
2022-03-29T22:46:16.000Z
#!/usr/bin/env python3 """ Usage: poetry run test_parser FR production """ import datetime import logging import pprint import time import arrow import click from parsers.lib.parsers import PARSER_KEY_TO_DICT from parsers.lib.quality import ( ValidationError, validate_consumption, validate_exchange, ...
29.25
85
0.605183
#!/usr/bin/env python3 """ Usage: poetry run test_parser FR production """ import datetime import logging import pprint import time import arrow import click from parsers.lib.parsers import PARSER_KEY_TO_DICT from parsers.lib.quality import ( ValidationError, validate_consumption, validate_exchange, ...
0
0
0
f7c2ea97c5be72f34b806966ce8b9da48c15205d
1,295
py
Python
app/utils/token_help.py
luwenchang/service-template-py
ca507c9eefec03aa3f1696234ff8ccabcf97905d
[ "MIT" ]
null
null
null
app/utils/token_help.py
luwenchang/service-template-py
ca507c9eefec03aa3f1696234ff8ccabcf97905d
[ "MIT" ]
null
null
null
app/utils/token_help.py
luwenchang/service-template-py
ca507c9eefec03aa3f1696234ff8ccabcf97905d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __author__ = 'vincent' import uuid import json from redis_help import redis_client from werkzeug.security import generate_password_hash, check_password_hash from . import redis_help # 下面这个包 itsdangerous 用于生成确认令牌 from itsdangerous import TimedJSONWebSignatureSerializer as Serializer def gen...
23.125
73
0.70888
# -*- coding: utf-8 -*- __author__ = 'vincent' import uuid import json from redis_help import redis_client from werkzeug.security import generate_password_hash, check_password_hash from . import redis_help # 下面这个包 itsdangerous 用于生成确认令牌 from itsdangerous import TimedJSONWebSignatureSerializer as Serializer def gen...
0
0
0
04c193946272f9f2a1076b6707fdb12ee4c9d31e
6,934
py
Python
utils/scutils/redis_throttled_queue.py
abael/ScrapyCluster
93a0bd069fe005963b120719c0da9636f24cf289
[ "MIT" ]
null
null
null
utils/scutils/redis_throttled_queue.py
abael/ScrapyCluster
93a0bd069fe005963b120719c0da9636f24cf289
[ "MIT" ]
null
null
null
utils/scutils/redis_throttled_queue.py
abael/ScrapyCluster
93a0bd069fe005963b120719c0da9636f24cf289
[ "MIT" ]
null
null
null
import time from redis.exceptions import WatchError
36.882979
126
0.581338
import time from redis.exceptions import WatchError class RedisThrottledQueue(object): queue = None # the instantiated queue class window = None # the window to use to limit requests limit = None # number of requests in the given window redis_conn = None # the redis connection moderati...
0
6,857
23
b1d1f88c8f94744b386d4ad58c8303bca8695706
1,796
py
Python
discovery-provider/alembic/versions/273b8bcef694_user_bank_updates.py
Tenderize/audius-protocol
aa15844e3f12812fe8aaa81e2cb6e5c5fa89ff51
[ "Apache-2.0" ]
429
2019-08-14T01:34:07.000Z
2022-03-30T06:31:38.000Z
discovery-provider/alembic/versions/273b8bcef694_user_bank_updates.py
Tenderize/audius-protocol
aa15844e3f12812fe8aaa81e2cb6e5c5fa89ff51
[ "Apache-2.0" ]
998
2019-08-14T01:52:37.000Z
2022-03-31T23:17:22.000Z
discovery-provider/alembic/versions/273b8bcef694_user_bank_updates.py
Tenderize/audius-protocol
aa15844e3f12812fe8aaa81e2cb6e5c5fa89ff51
[ "Apache-2.0" ]
73
2019-10-04T04:24:16.000Z
2022-03-24T16:27:30.000Z
"""user bank updates Revision ID: 273b8bcef694 Revises: 2e02a681aeaa Create Date: 2021-06-22 17:22:00.102134 """ import logging from alembic import op import sqlalchemy as sa from sqlalchemy.orm import sessionmaker logger = logging.getLogger(__name__) # revision identifiers, used by Alembic. revision = "273b8bcef69...
26.411765
85
0.665367
"""user bank updates Revision ID: 273b8bcef694 Revises: 2e02a681aeaa Create Date: 2021-06-22 17:22:00.102134 """ import logging from alembic import op import sqlalchemy as sa from sqlalchemy.orm import sessionmaker logger = logging.getLogger(__name__) # revision identifiers, used by Alembic. revision = "273b8bcef69...
1,329
0
46
f2e4d2a23347f13fa0dc6bc850f055e77b8a1b81
741
py
Python
Mundo I/D032 - Ano bissexto.py
Orecruta/Exercicios-Python
129a15930ea22df1f0a7d6bd39a7ac28be515034
[ "MIT" ]
null
null
null
Mundo I/D032 - Ano bissexto.py
Orecruta/Exercicios-Python
129a15930ea22df1f0a7d6bd39a7ac28be515034
[ "MIT" ]
null
null
null
Mundo I/D032 - Ano bissexto.py
Orecruta/Exercicios-Python
129a15930ea22df1f0a7d6bd39a7ac28be515034
[ "MIT" ]
null
null
null
from datetime import date #Importa biblioteca para pegar data e hora do pc print('='*6, 'DESAFIO 032 - ANO BISSEXTO', '='*6) ano = int(input('| Digite o ano que quer analisar ou digite 0 para analisar o ano atual: ')) #Recebe ano digitado if ano == 0: ...
57
206
0.608637
from datetime import date #Importa biblioteca para pegar data e hora do pc print('='*6, 'DESAFIO 032 - ANO BISSEXTO', '='*6) ano = int(input('| Digite o ano que quer analisar ou digite 0 para analisar o ano atual: ')) #Recebe ano digitado if ano == 0: ...
0
0
0
8c5a56d61d658df76f0d0b0fdbdad53aebd701ce
510
py
Python
tests/r/test_bthe_b.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
199
2017-07-24T01:34:27.000Z
2022-01-29T00:50:55.000Z
tests/r/test_bthe_b.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
46
2017-09-05T19:27:20.000Z
2019-01-07T09:47:26.000Z
tests/r/test_bthe_b.py
hajime9652/observations
2c8b1ac31025938cb17762e540f2f592e302d5de
[ "Apache-2.0" ]
45
2017-07-26T00:10:44.000Z
2022-03-16T20:44:59.000Z
from __future__ import absolute_import from __future__ import division from __future__ import print_function import shutil import sys import tempfile from observations.r.bthe_b import bthe_b def test_bthe_b(): """Test module bthe_b.py by downloading bthe_b.csv and testing shape of extracted data has 100 row...
21.25
44
0.75098
from __future__ import absolute_import from __future__ import division from __future__ import print_function import shutil import sys import tempfile from observations.r.bthe_b import bthe_b def test_bthe_b(): """Test module bthe_b.py by downloading bthe_b.csv and testing shape of extracted data has 100 row...
0
0
0
b1ada3acaf49213ce32af6db987a5494596981b6
726
py
Python
buuctf/35-inndy_echo2/exp.py
RoderickChan/ctf_tasks
a021c6d86cade26448d099933f3caa856ed28360
[ "MIT" ]
null
null
null
buuctf/35-inndy_echo2/exp.py
RoderickChan/ctf_tasks
a021c6d86cade26448d099933f3caa856ed28360
[ "MIT" ]
null
null
null
buuctf/35-inndy_echo2/exp.py
RoderickChan/ctf_tasks
a021c6d86cade26448d099933f3caa856ed28360
[ "MIT" ]
null
null
null
from pwncli import * cli_script() p = gift['io'] e = gift['elf'] if gift['debug']: libc = gift['libc'] else: libc = ELF("/root/LibcSearcher/libc-database/other_libc_so/libc-2.23.so") p.sendline("%41$p,%43$p") msg = p.recvline() code_addr, libc_addr = msg.split(b",") code_base_addr = int16(code_addr.decode...
21.352941
123
0.701102
from pwncli import * cli_script() p = gift['io'] e = gift['elf'] if gift['debug']: libc = gift['libc'] else: libc = ELF("/root/LibcSearcher/libc-database/other_libc_so/libc-2.23.so") p.sendline("%41$p,%43$p") msg = p.recvline() code_addr, libc_addr = msg.split(b",") code_base_addr = int16(code_addr.decode...
0
0
0
f453bf6ee68b3ba5dab6bf69f37db730baa605d4
4,646
py
Python
merlin/examples/generator.py
robinson96/merlin
962b97ac037465f0fe285ceee6b77e554d8a29fe
[ "MIT" ]
null
null
null
merlin/examples/generator.py
robinson96/merlin
962b97ac037465f0fe285ceee6b77e554d8a29fe
[ "MIT" ]
null
null
null
merlin/examples/generator.py
robinson96/merlin
962b97ac037465f0fe285ceee6b77e554d8a29fe
[ "MIT" ]
null
null
null
############################################################################### # Copyright (c) 2019, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory # Written by the Merlin dev team, listed in the CONTRIBUTORS file. # <merlin@llnl.gov> # # LLNL-CODE-797170 # All righ...
34.932331
87
0.650667
############################################################################### # Copyright (c) 2019, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory # Written by the Merlin dev team, listed in the CONTRIBUTORS file. # <merlin@llnl.gov> # # LLNL-CODE-797170 # All righ...
217
0
46
7cd80880b8caf780c10faaaf7e062d2e3b67edba
2,741
py
Python
SerialController/Commands/PythonCommands/ImageProcessingOnly/ENG_Repop_Shiny_Backup.py
junkypoke/Poke-Controller
2303b8444d82cbd1a5cdfea241e57fdad2a837c6
[ "MIT" ]
2
2021-04-21T13:23:03.000Z
2021-04-21T13:23:06.000Z
SerialController/Commands/PythonCommands/ImageProcessingOnly/ENG_Repop_Shiny_Backup.py
junkypoke/Poke-Controller
2303b8444d82cbd1a5cdfea241e57fdad2a837c6
[ "MIT" ]
null
null
null
SerialController/Commands/PythonCommands/ImageProcessingOnly/ENG_Repop_Shiny_Backup.py
junkypoke/Poke-Controller
2303b8444d82cbd1a5cdfea241e57fdad2a837c6
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from Commands.PythonCommandBase import PythonCommand, ImageProcPythonCommand from Commands.Keys import KeyPress, Button, Direction, Stick, Hat
41.530303
116
0.511492
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from Commands.PythonCommandBase import PythonCommand, ImageProcPythonCommand from Commands.Keys import KeyPress, Button, Direction, Stick, Hat class AutoEncount(ImageProcPythonCommand): NAME = 'ENG_BU_リポップ色違い厳選' def __init__(self,cam): super().__init__(c...
2,563
123
23
ce78551b07e723b8b7250c7ee44819aabf9b8abd
3,054
py
Python
pyfermions/wavelets.py
illc-uva/pyfermions
d685f317470a2542d9c9c9e9b3fe6cb6fad76d07
[ "MIT" ]
10
2019-02-25T11:18:11.000Z
2021-08-17T15:40:50.000Z
pyfermions/wavelets.py
illc-uva/pyfermions
d685f317470a2542d9c9c9e9b3fe6cb6fad76d07
[ "MIT" ]
null
null
null
pyfermions/wavelets.py
illc-uva/pyfermions
d685f317470a2542d9c9c9e9b3fe6cb6fad76d07
[ "MIT" ]
3
2019-05-28T07:58:49.000Z
2021-03-19T22:46:00.000Z
from .signal import * __all__ = ["orthogonal_wavelet", "DAUBECHIES_D4"] class orthogonal_wavelet: """Orthogonal wavelet consisting of a scaling (low-pass) filter and a wavelet (high-pass) filter that together form a conjugate mirror filter (CMF) pair.""" @staticmethod def from_scaling_filter(scaling_fil...
41.835616
160
0.673543
from .signal import * __all__ = ["orthogonal_wavelet", "DAUBECHIES_D4"] class orthogonal_wavelet: """Orthogonal wavelet consisting of a scaling (low-pass) filter and a wavelet (high-pass) filter that together form a conjugate mirror filter (CMF) pair.""" def __init__(self, scaling_filter, wavelet_filter): ...
212
0
27
0f3ad93d2717be1e8643d8004f218577752f3160
3,105
py
Python
Chapter06/pyImage/classify.py
PacktPublishing/Artificial-Intelligence-for-IoT-Cookbook
c2f522c2a1dbb78c99e05abc3c0e8706618f4353
[ "MIT" ]
19
2019-11-06T08:00:03.000Z
2022-01-01T20:02:40.000Z
Chapter06/pyImage/classify.py
PacktPublishing/Artificial-Intelligence-for-IoT-Cookbook
c2f522c2a1dbb78c99e05abc3c0e8706618f4353
[ "MIT" ]
null
null
null
Chapter06/pyImage/classify.py
PacktPublishing/Artificial-Intelligence-for-IoT-Cookbook
c2f522c2a1dbb78c99e05abc3c0e8706618f4353
[ "MIT" ]
9
2020-02-17T23:44:16.000Z
2022-02-03T15:26:46.000Z
import numpy as np import torch from torch import nn from torch import optim import torch.nn.functional as F from torchvision import datasets, transforms, models from torch.utils.data.sampler import SubsetRandomSampler datadir = './data/train' valid_size = .3 epochs = 3 steps = 0 running_loss = 0 print_every = 10...
35.284091
170
0.698229
import numpy as np import torch from torch import nn from torch import optim import torch.nn.functional as F from torchvision import datasets, transforms, models from torch.utils.data.sampler import SubsetRandomSampler datadir = './data/train' valid_size = .3 epochs = 3 steps = 0 running_loss = 0 print_every = 10...
934
0
23
c0cab6f779ea527b45216df762bd80c3e9bebd5c
4,018
py
Python
setup.py
mccullerlp/msurrogate
26e0269ed2a2c370f45810522ac9cb47da033519
[ "Apache-2.0" ]
null
null
null
setup.py
mccullerlp/msurrogate
26e0269ed2a2c370f45810522ac9cb47da033519
[ "Apache-2.0" ]
null
null
null
setup.py
mccullerlp/msurrogate
26e0269ed2a2c370f45810522ac9cb47da033519
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function, unicode_literals import os import sys from os import path from setuptools import find_packages, setup from distutils.command.bdist import bdist from distutils.command.sdist import sdist version = '0.9.0.rc1' cmdclass = dic...
34.34188
118
0.575162
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import division, print_function, unicode_literals import os import sys from os import path from setuptools import find_packages, setup from distutils.command.bdist import bdist from distutils.command.sdist import sdist version = '0.9.0.rc1' def check_versi...
1,959
24
177
b9de21ee81e6f7d040e88cc620a6b32abf74bd05
1,743
py
Python
atest/resources/TestHelper.py
ldtri0209/robotframework
6bc11a350cbaf5d0801cc5431f32cc1435bb65df
[ "ECL-2.0", "Apache-2.0" ]
7
2015-02-25T10:55:02.000Z
2015-11-04T03:20:05.000Z
atest/resources/TestHelper.py
ldtri0209/robotframework
6bc11a350cbaf5d0801cc5431f32cc1435bb65df
[ "ECL-2.0", "Apache-2.0" ]
12
2015-02-24T17:00:06.000Z
2015-07-31T08:32:07.000Z
atest/resources/TestHelper.py
ldtri0209/robotframework
6bc11a350cbaf5d0801cc5431f32cc1435bb65df
[ "ECL-2.0", "Apache-2.0" ]
2
2015-12-15T11:00:35.000Z
2018-02-24T18:11:24.000Z
import os import sys from stat import S_IREAD, S_IWRITE from robot.api import logger
33.519231
79
0.634538
import os import sys from stat import S_IREAD, S_IWRITE from robot.api import logger class TestHelper: def set_read_only(self, path): os.chmod(path, S_IREAD) def set_read_write(self, path): os.chmod(path, S_IREAD | S_IWRITE) def get_output_name(self, *datasources): if not datas...
1,394
-4
266