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
6848d05c72fa374d993685eb4210477d11796461
1,006
py
Python
profiler/undecorate_for_profiling.py
co2meal/-bnpy-dev
74f69afde6c9dac8de4c074842df53ae87a15ac1
[ "BSD-3-Clause" ]
null
null
null
profiler/undecorate_for_profiling.py
co2meal/-bnpy-dev
74f69afde6c9dac8de4c074842df53ae87a15ac1
[ "BSD-3-Clause" ]
null
null
null
profiler/undecorate_for_profiling.py
co2meal/-bnpy-dev
74f69afde6c9dac8de4c074842df53ae87a15ac1
[ "BSD-3-Clause" ]
null
null
null
''' undecorate_for_profiling.py Explore all the python functions in the user-specified directory, and remove decoration @profile from appropriate functions ''' import os if __name__ == '__main__': import argparse parser = argparse.ArgumentParser() parser.add_argument('rootdir') args = parser.parse_ar...
29.588235
69
0.624254
''' undecorate_for_profiling.py Explore all the python functions in the user-specified directory, and remove decoration @profile from appropriate functions ''' import os def main(bnpyrootdir): list_of_files = {} for (dirpath, contentdirs, contentfiles) in os.walk(bnpyrootdir): for fname in contentfil...
635
0
23
e0006a8f256b6783c06d6c65cdca6a156de2c8d9
1,734
py
Python
Proxy/MachineLearn/classification.py
Crispae/BBPRED
226c6347d986da4b0f573f1b7a978b9418d0eeb4
[ "MIT" ]
null
null
null
Proxy/MachineLearn/classification.py
Crispae/BBPRED
226c6347d986da4b0f573f1b7a978b9418d0eeb4
[ "MIT" ]
null
null
null
Proxy/MachineLearn/classification.py
Crispae/BBPRED
226c6347d986da4b0f573f1b7a978b9418d0eeb4
[ "MIT" ]
null
null
null
## classification.py __all__ = ["Lazy",] from .lazy import LazyClassifier from .utils import * from sklearn.model_selection import train_test_split import pandas
23.12
140
0.672434
## classification.py __all__ = ["Lazy",] from .lazy import LazyClassifier from .utils import * from sklearn.model_selection import train_test_split import pandas class Lazy: def _lazy_split(self,descriptors_data,test_size,random_state): if Data_frame_validator(descriptors_data): data...
824
523
181
9d438aadf58244488ff98e5078d8104573590578
3,099
py
Python
pkgs/sdk-pkg/src/genie/libs/sdk/libs/abstracted_libs/iosxr/subsection.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
94
2018-04-30T20:29:15.000Z
2022-03-29T13:40:31.000Z
pkgs/sdk-pkg/src/genie/libs/sdk/libs/abstracted_libs/iosxr/subsection.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
67
2018-12-06T21:08:09.000Z
2022-03-29T18:00:46.000Z
pkgs/sdk-pkg/src/genie/libs/sdk/libs/abstracted_libs/iosxr/subsection.py
jbronikowski/genielibs
200a34e5fe4838a27b5a80d5973651b2e34ccafb
[ "Apache-2.0" ]
49
2018-06-29T18:59:03.000Z
2022-03-10T02:07:59.000Z
# Python import logging from os import path # Abstract from genie.abstract import Lookup # Parser from genie.libs import parser from genie.metaparser.util.exceptions import SchemaEmptyParserError # unicon from unicon.eal.dialogs import Statement, Dialog log = logging.getLogger(__name__) def save_device_informatio...
26.042017
77
0.601162
# Python import logging from os import path # Abstract from genie.abstract import Lookup # Parser from genie.libs import parser from genie.metaparser.util.exceptions import SchemaEmptyParserError # unicon from unicon.eal.dialogs import Statement, Dialog log = logging.getLogger(__name__) def save_device_informatio...
0
0
0
fb43dcb45f5d7511c1b7ad5465521087e7f16242
3,879
py
Python
open_fmri/apps/dataset/migrations/0001_initial.py
rwblair/open_fmri
5e3052878b6d514553a074a6d9d44fe740daa034
[ "BSD-3-Clause" ]
5
2016-01-18T20:54:18.000Z
2021-02-10T10:43:59.000Z
open_fmri/apps/dataset/migrations/0001_initial.py
rwblair/open_fmri
5e3052878b6d514553a074a6d9d44fe740daa034
[ "BSD-3-Clause" ]
25
2015-12-02T17:37:45.000Z
2018-02-05T22:07:51.000Z
open_fmri/apps/dataset/migrations/0001_initial.py
rwblair/open_fmri
5e3052878b6d514553a074a6d9d44fe740daa034
[ "BSD-3-Clause" ]
6
2015-11-19T23:26:47.000Z
2021-02-10T10:44:01.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.core.validators
41.265957
224
0.565094
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.core.validators class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Dataset', fields=[ ...
0
3,719
23
9fc19f32a9cf06da8897f17f045d1bb765cb8c81
2,849
py
Python
packages/core/minos-microservice-saga/tests/test_saga/test_executions/test_repositories/test_abc.py
minos-framework/minos-python
9a6ad6783361f3d8a497a088808b55ea7a938c6c
[ "MIT" ]
247
2022-01-24T14:55:30.000Z
2022-03-25T12:06:17.000Z
packages/core/minos-microservice-saga/tests/test_saga/test_executions/test_repositories/test_abc.py
minos-framework/minos-python
9a6ad6783361f3d8a497a088808b55ea7a938c6c
[ "MIT" ]
168
2022-01-24T14:54:31.000Z
2022-03-31T09:31:09.000Z
packages/core/minos-microservice-saga/tests/test_saga/test_executions/test_repositories/test_abc.py
minos-framework/minos-python
9a6ad6783361f3d8a497a088808b55ea7a938c6c
[ "MIT" ]
21
2022-02-06T17:25:58.000Z
2022-03-27T04:50:29.000Z
import unittest from unittest.mock import ( AsyncMock, call, ) from uuid import ( UUID, ) from minos.saga import ( SagaExecution, SagaExecutionRepository, ) from tests.utils import ( ADD_ORDER, SagaTestCase, ) if __name__ == "__main__": unittest.main()
29.371134
69
0.692524
import unittest from unittest.mock import ( AsyncMock, call, ) from uuid import ( UUID, ) from minos.saga import ( SagaExecution, SagaExecutionRepository, ) from tests.utils import ( ADD_ORDER, SagaTestCase, ) class _SagaExecutionRepository(SagaExecutionRepository): async def _store(s...
2,014
338
207
fc3a1fcfc078a5900b3d3012da99b9ea49b5adb1
768
py
Python
data_assimilation/forwardModel.py
MagneticEarth/book.magneticearth.org
c8c1e3403b682a508a61053ce330b0e891992ef3
[ "CC-BY-4.0" ]
null
null
null
data_assimilation/forwardModel.py
MagneticEarth/book.magneticearth.org
c8c1e3403b682a508a61053ce330b0e891992ef3
[ "CC-BY-4.0" ]
null
null
null
data_assimilation/forwardModel.py
MagneticEarth/book.magneticearth.org
c8c1e3403b682a508a61053ce330b0e891992ef3
[ "CC-BY-4.0" ]
null
null
null
import numpy as np from scipy.integrate import solve_ivp import matplotlib.pyplot as plt
26.482759
83
0.605469
import numpy as np from scipy.integrate import solve_ivp import matplotlib.pyplot as plt def Lorenz63(t, y, sig, rho, beta): # Lorenz '63 model out = np.zeros_like(y) out[0] = sig * ( y[1] - y[0] ) out[1] = y[0] * ( rho - y[2] ) - y[1] out[2] = y[0] * y[1] - beta * y[2] return out def forwardMo...
632
0
47
25fcb95f8a4a06a86c76be9be03f3139ee47ed77
8,133
py
Python
samples/example_by.py
jokva/windrose
99a2f636a6558a29e7ded63d0d233f25dc7986b6
[ "CECILL-B", "BSD-3-Clause" ]
null
null
null
samples/example_by.py
jokva/windrose
99a2f636a6558a29e7ded63d0d233f25dc7986b6
[ "CECILL-B", "BSD-3-Clause" ]
null
null
null
samples/example_by.py
jokva/windrose
99a2f636a6558a29e7ded63d0d233f25dc7986b6
[ "CECILL-B", "BSD-3-Clause" ]
1
2020-10-04T18:48:35.000Z
2020-10-04T18:48:35.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function """ sample using "by" keyword """ import click # import matplotlib # matplotlib.use("Agg") # import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.cm as cm import numpy as np import pandas as pd from windrose ...
31.523256
110
0.624985
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function """ sample using "by" keyword """ import click # import matplotlib # matplotlib.use("Agg") # import matplotlib as mpl import matplotlib.pyplot as plt import matplotlib.cm as cm import numpy as np import pandas as pd from windrose ...
5,964
12
458
8aa086dfd06626e4b4e36485c4d38dd75160c536
8,316
py
Python
gt/reid.py
solapark/frcnn_keras_original
3561d1de18f41868efc9cec927761613d75a5dc3
[ "Apache-2.0" ]
null
null
null
gt/reid.py
solapark/frcnn_keras_original
3561d1de18f41868efc9cec927761613d75a5dc3
[ "Apache-2.0" ]
null
null
null
gt/reid.py
solapark/frcnn_keras_original
3561d1de18f41868efc9cec927761613d75a5dc3
[ "Apache-2.0" ]
null
null
null
import numpy as np import os, sys sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) import utility from epipolar import EPIPOLAR import cv2 if __name__ == '__main__': from option import args import pickle with open('/home/sap/frcnn_keras/mv_train_two_reid.pickle', 'rb') as f: ...
46.983051
162
0.641775
import numpy as np import os, sys sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__)))) import utility from epipolar import EPIPOLAR import cv2 class REID: def __init__(self, args): self.num_valid_cam = args.num_valid_cam self.num_nms = args.num_nms self.batch_size = ...
3,683
3,084
23
869daa2374c26f25d0517f0a880b5bc63581fcf1
3,413
py
Python
dagflow/sdk.py
GodQ/autoflow
74954dafb9cdb16c29b9f3a7d081a3f3a12e808a
[ "Apache-2.0" ]
1
2019-06-20T15:31:13.000Z
2019-06-20T15:31:13.000Z
dagflow/sdk.py
GodQ/dagflow
74954dafb9cdb16c29b9f3a7d081a3f3a12e808a
[ "Apache-2.0" ]
null
null
null
dagflow/sdk.py
GodQ/dagflow
74954dafb9cdb16c29b9f3a7d081a3f3a12e808a
[ "Apache-2.0" ]
null
null
null
__author__ = 'godq' import os import sys from dagflow.flow_operation import send_start_flow_msg as sdk_send_start_flow_msg, \ send_finish_step_msg as sdk_send_finish_step_msg from dagflow.loader import get_DagRepo_Object dag_repo = get_DagRepo_Object()
31.601852
98
0.745971
__author__ = 'godq' import os import sys from dagflow.flow_operation import send_start_flow_msg as sdk_send_start_flow_msg, \ send_finish_step_msg as sdk_send_finish_step_msg from dagflow.loader import get_DagRepo_Object dag_repo = get_DagRepo_Object() def send_finish_step_msg(dag_name, dag_run_id, step_name, st...
2,844
0
299
39e69d64294449e607d3625ba49e9a9d1fcc26c9
3,965
py
Python
writer.py
MrBoogie27/PlagiarismPrograms
05564131c6849747a9a7b8c56961d488cb5a2755
[ "MIT" ]
null
null
null
writer.py
MrBoogie27/PlagiarismPrograms
05564131c6849747a9a7b8c56961d488cb5a2755
[ "MIT" ]
null
null
null
writer.py
MrBoogie27/PlagiarismPrograms
05564131c6849747a9a7b8c56961d488cb5a2755
[ "MIT" ]
null
null
null
from common import compare_array from prepare_hash import run_binary_hasher import psycopg2 import tempfile from psycopg2 import sql TABLE_NAME='runs' TABLE_TEXT_MATCHES= 'text_matches' COLUMNS=('id', 'content', 'ASTHash') COLUMNS_MATCH=('first_runs_id', 'second_runs_id', 'match_AST_v1') PROBLEM_ID=3 COUNT_LIMIT = 10...
38.495146
87
0.538462
from common import compare_array from prepare_hash import run_binary_hasher import psycopg2 import tempfile from psycopg2 import sql TABLE_NAME='runs' TABLE_TEXT_MATCHES= 'text_matches' COLUMNS=('id', 'content', 'ASTHash') COLUMNS_MATCH=('first_runs_id', 'second_runs_id', 'match_AST_v1') PROBLEM_ID=3 COUNT_LIMIT = 10...
3,505
0
138
5c92b9919c5b5d586563d3d52b13ac345250227f
262
py
Python
api/static.py
hartliddell/api
73d44d2271c01fe7540fedeee9174c4032cbbbc0
[ "MIT" ]
null
null
null
api/static.py
hartliddell/api
73d44d2271c01fe7540fedeee9174c4032cbbbc0
[ "MIT" ]
null
null
null
api/static.py
hartliddell/api
73d44d2271c01fe7540fedeee9174c4032cbbbc0
[ "MIT" ]
null
null
null
"""Define a custom static storage class.""" from django.contrib.staticfiles.storage import ManifestStaticFilesStorage class RyrManifestStaticFilesStorage(ManifestStaticFilesStorage): """Define a custom static storage class.""" manifest_strict = False
29.111111
73
0.79771
"""Define a custom static storage class.""" from django.contrib.staticfiles.storage import ManifestStaticFilesStorage class RyrManifestStaticFilesStorage(ManifestStaticFilesStorage): """Define a custom static storage class.""" manifest_strict = False
0
0
0
f3e92c79550d52d83e93cc3237d16de166bd98cb
4,394
py
Python
todos/tests.py
shiniao/todoz
4cb2cf492f6cfac5e037da6e7b3b674ef548e62a
[ "MIT" ]
1
2020-01-13T03:32:11.000Z
2020-01-13T03:32:11.000Z
todos/tests.py
shiniao/todoz
4cb2cf492f6cfac5e037da6e7b3b674ef548e62a
[ "MIT" ]
6
2021-05-10T19:58:23.000Z
2022-02-26T20:29:39.000Z
todos/tests.py
shiniao/todoz
4cb2cf492f6cfac5e037da6e7b3b674ef548e62a
[ "MIT" ]
null
null
null
# Create your tests here. import json from django.contrib.auth.models import User from django.test import TestCase, Client from .models import Todo from django.utils import timezone import datetime class TestTodosModel(TestCase): """测试数据库model""" class TestTodosViews(TestCase): """测试视图函数""" # TODO tes...
32.072993
85
0.574192
# Create your tests here. import json from django.contrib.auth.models import User from django.test import TestCase, Client from .models import Todo from django.utils import timezone import datetime class TestTodosModel(TestCase): """测试数据库model""" def test_is_past(self): # 未来土豆 future_date = ...
2,581
5
292
955eed560456dca1edea91950d78789cf913e924
4,962
py
Python
quadtree.py
eug/quadtree
7a3154f06b8f52fd8338a7b73b5a8329c399281f
[ "MIT" ]
1
2021-09-02T07:57:29.000Z
2021-09-02T07:57:29.000Z
quadtree.py
eug/quadtree
7a3154f06b8f52fd8338a7b73b5a8329c399281f
[ "MIT" ]
null
null
null
quadtree.py
eug/quadtree
7a3154f06b8f52fd8338a7b73b5a8329c399281f
[ "MIT" ]
1
2020-11-05T05:57:37.000Z
2020-11-05T05:57:37.000Z
import bisect from scipy.spatial.distance import euclidean from common import (NO_QUADRANT, NORTH_EAST, NORTH_WEST, SOUTH_EAST, SOUTH_WEST, Boundary, Point, belongs, compute_knn, intersects, quadrants) from node import TreeNode # Constants for tuple access optimization BOUNDAR...
32.012903
78
0.601169
import bisect from scipy.spatial.distance import euclidean from common import (NO_QUADRANT, NORTH_EAST, NORTH_WEST, SOUTH_EAST, SOUTH_WEST, Boundary, Point, belongs, compute_knn, intersects, quadrants) from node import TreeNode # Constants for tuple access optimization BOUNDAR...
4,010
1
613
7289ee6470e2a8f5fb3a4ac360a43fd613597c4a
523
py
Python
competition/alibaba.py
Max-PJB/python-learning2
e8b05bef1574ee9abf8c90497e94ef20a7f4e3bd
[ "MIT" ]
null
null
null
competition/alibaba.py
Max-PJB/python-learning2
e8b05bef1574ee9abf8c90497e94ef20a7f4e3bd
[ "MIT" ]
null
null
null
competition/alibaba.py
Max-PJB/python-learning2
e8b05bef1574ee9abf8c90497e94ef20a7f4e3bd
[ "MIT" ]
null
null
null
# N, a, b, c, d = list(map(int, input().split())) # # # def jc(x): # r = 1 # for i in range(1, x + 1): # r *= i # return r # # res = int(jc(N * N) / (jc(a) * jc(b) * jc(c) * jc(d))) % # print(res) from collections import defaultdict n = int(input()) edges = defaultdict(list) for _ in range(n - 1): u, v = lis...
17.433333
68
0.529637
# N, a, b, c, d = list(map(int, input().split())) # # # def jc(x): # r = 1 # for i in range(1, x + 1): # r *= i # return r # # res = int(jc(N * N) / (jc(a) * jc(b) * jc(c) * jc(d))) % # print(res) from collections import defaultdict n = int(input()) edges = defaultdict(list) for _ in range(n - 1): u, v = lis...
107
0
23
5a8a1562596c85fca9c274efc7e80bd787910272
4,948
py
Python
neo4j/__main__.py
ank-forked/neo4j-python-driver
f7857791051e0a7499aea9da5f92256cef7eb014
[ "Apache-2.0" ]
null
null
null
neo4j/__main__.py
ank-forked/neo4j-python-driver
f7857791051e0a7499aea9da5f92256cef7eb014
[ "Apache-2.0" ]
null
null
null
neo4j/__main__.py
ank-forked/neo4j-python-driver
f7857791051e0a7499aea9da5f92256cef7eb014
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright (c) 2002-2015 "Neo Technology," # Network Engine for Objects in Lund AB [http://neotechnology.com] # # This file is part of Neo4j. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Li...
37.203008
92
0.599232
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Copyright (c) 2002-2015 "Neo Technology," # Network Engine for Objects in Lund AB [http://neotechnology.com] # # This file is part of Neo4j. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Li...
3,659
0
104
b1351f952c91be994aa5c5780c6c740a6d7dd951
1,506
py
Python
naga/shared/trainer.py
bright1993ff66/emoji2vec
08281486c3b3c6da9c5ecc13e140baefc6e48326
[ "MIT" ]
173
2016-10-03T18:28:13.000Z
2019-09-26T10:36:54.000Z
naga/shared/trainer.py
bright1993ff66/emoji2vec
08281486c3b3c6da9c5ecc13e140baefc6e48326
[ "MIT" ]
2
2016-10-25T18:28:48.000Z
2019-08-04T21:50:12.000Z
naga/shared/trainer.py
bright1993ff66/emoji2vec
08281486c3b3c6da9c5ecc13e140baefc6e48326
[ "MIT" ]
39
2016-10-04T13:35:29.000Z
2019-09-11T18:06:54.000Z
import tensorflow as tf class Trainer(object): """ Object representing a TensorFlow trainer. """
32.73913
108
0.579681
import tensorflow as tf class Trainer(object): """ Object representing a TensorFlow trainer. """ def __init__(self, optimizer, max_epochs, hooks=[]): self.loss = None self.optimizer = optimizer self.max_epochs = max_epochs self.hooks = hooks def __call__(self, bat...
1,341
0
54
916dd0a0fef78307533ccaae6243fb5d10a059e7
4,107
py
Python
test_dp_setting_initial_conditions_bem.py
whitews/dpconverge
0e00a7f1c0be8bd291cb68598ca2b2eaa1a47448
[ "BSD-3-Clause" ]
null
null
null
test_dp_setting_initial_conditions_bem.py
whitews/dpconverge
0e00a7f1c0be8bd291cb68598ca2b2eaa1a47448
[ "BSD-3-Clause" ]
null
null
null
test_dp_setting_initial_conditions_bem.py
whitews/dpconverge
0e00a7f1c0be8bd291cb68598ca2b2eaa1a47448
[ "BSD-3-Clause" ]
null
null
null
from dpconverge.data_set import DataSet import numpy as np import pandas as pd from matplotlib import pyplot from sklearn.datasets.samples_generator import make_blobs n_features = 2 points_per_feature = 100 centers = [[2, 1.35], [2, 2], [2, 3], [2.5, 1.5], [2.5, 2], [2.5, 2.5]] blob1, y1 = make_blobs( n_samples=1...
22.944134
76
0.637448
from dpconverge.data_set import DataSet import numpy as np import pandas as pd from matplotlib import pyplot from sklearn.datasets.samples_generator import make_blobs n_features = 2 points_per_feature = 100 centers = [[2, 1.35], [2, 2], [2, 3], [2.5, 1.5], [2.5, 2], [2.5, 2.5]] blob1, y1 = make_blobs( n_samples=1...
0
0
0
495def4124e4516ef147f20dbb2acf3dd3301455
102
py
Python
vit_pytorch/__init__.py
WilliamAshbee/vit-pytorch
a033eae5f6ad1c609c06b762371cc43ca3930662
[ "MIT" ]
null
null
null
vit_pytorch/__init__.py
WilliamAshbee/vit-pytorch
a033eae5f6ad1c609c06b762371cc43ca3930662
[ "MIT" ]
null
null
null
vit_pytorch/__init__.py
WilliamAshbee/vit-pytorch
a033eae5f6ad1c609c06b762371cc43ca3930662
[ "MIT" ]
null
null
null
from vit_pytorch.vit import ViT from vit_pytorch.vit3d import ViT3d from vit_pytorch.dino import Dino
25.5
35
0.852941
from vit_pytorch.vit import ViT from vit_pytorch.vit3d import ViT3d from vit_pytorch.dino import Dino
0
0
0
754d3a88e63c470befd4e37201725706f9d4214f
2,469
py
Python
pincer/objects/message/component.py
Kylianalex/Pincer
7ca530798a696c70e7d5c939902653575e3d8054
[ "MIT" ]
1
2021-11-04T13:20:23.000Z
2021-11-04T13:20:23.000Z
pincer/objects/message/component.py
Kylianalex/Pincer
7ca530798a696c70e7d5c939902653575e3d8054
[ "MIT" ]
1
2021-10-31T11:41:42.000Z
2021-10-31T11:41:42.000Z
pincer/objects/message/component.py
Kylianalex/Pincer
7ca530798a696c70e7d5c939902653575e3d8054
[ "MIT" ]
1
2021-11-17T13:55:07.000Z
2021-11-17T13:55:07.000Z
# Copyright Pincer 2021-Present # Full MIT License can be found in `LICENSE` at the project root. from __future__ import annotations from dataclasses import dataclass from typing import TYPE_CHECKING from ...utils.api_object import APIObject from ...utils.types import MISSING if TYPE_CHECKING: from typing impor...
34.774648
94
0.687323
# Copyright Pincer 2021-Present # Full MIT License can be found in `LICENSE` at the project root. from __future__ import annotations from dataclasses import dataclass from typing import TYPE_CHECKING from ...utils.api_object import APIObject from ...utils.types import MISSING if TYPE_CHECKING: from typing impor...
0
0
0
d1746864f4611777bffb76d6b2649465292c511c
1,771
py
Python
resources/unite_tax_to_newick.py
colinbrislawn/hundo
38f5da8e63fdbd314e99f4eff3668c8adb5a0a5f
[ "MIT" ]
null
null
null
resources/unite_tax_to_newick.py
colinbrislawn/hundo
38f5da8e63fdbd314e99f4eff3668c8adb5a0a5f
[ "MIT" ]
null
null
null
resources/unite_tax_to_newick.py
colinbrislawn/hundo
38f5da8e63fdbd314e99f4eff3668c8adb5a0a5f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 """ """ import click import os from collections import defaultdict from hundo.fasta import read_fasta, format_fasta_record @click.group() @click.pass_context def cli(obj): """ """ @cli.command("tax-to-newick") @click.argument("tax", type=click.File("r")) @click.argument(...
25.666667
70
0.578769
#!/usr/bin/env python # coding=utf-8 """ """ import click import os from collections import defaultdict from hundo.fasta import read_fasta, format_fasta_record @click.group() @click.pass_context def cli(obj): """ """ @cli.command("tax-to-newick") @click.argument("tax", type=click.File("r")) @click.argument(...
390
0
80
40c987a08a1ef8707bf650d224f8475fede83800
1,026
py
Python
venv/lib/python3.6/site-packages/marshmallow/base.py
aitoehigie/britecore_flask
eef1873dbe6b2cc21f770bc6dec783007ae4493b
[ "MIT" ]
null
null
null
venv/lib/python3.6/site-packages/marshmallow/base.py
aitoehigie/britecore_flask
eef1873dbe6b2cc21f770bc6dec783007ae4493b
[ "MIT" ]
1
2021-06-01T23:32:38.000Z
2021-06-01T23:32:38.000Z
venv/lib/python3.6/site-packages/marshmallow/base.py
aitoehigie/britecore_flask
eef1873dbe6b2cc21f770bc6dec783007ae4493b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Abstract base classes. These are necessary to avoid circular imports between core.py and fields.py. """ import copy class FieldABC(object): """Abstract base class from which all Field classes inherit. """ parent = None name = None class SchemaABC(object): """Abstract...
21.829787
76
0.658869
# -*- coding: utf-8 -*- """Abstract base classes. These are necessary to avoid circular imports between core.py and fields.py. """ import copy class FieldABC(object): """Abstract base class from which all Field classes inherit. """ parent = None name = None def serialize(self, attr, obj, access...
416
0
243
e8d6ac802de2774ffc5d0f5f58cb2e9373e7792f
2,501
py
Python
CRNNHandle.py
zuoyuwei/crnn_torch_trt
ba1f7e8d113a25325389ba2435cef9a548e55210
[ "MIT" ]
null
null
null
CRNNHandle.py
zuoyuwei/crnn_torch_trt
ba1f7e8d113a25325389ba2435cef9a548e55210
[ "MIT" ]
null
null
null
CRNNHandle.py
zuoyuwei/crnn_torch_trt
ba1f7e8d113a25325389ba2435cef9a548e55210
[ "MIT" ]
1
2020-07-29T05:20:04.000Z
2020-07-29T05:20:04.000Z
import torch from torchvision import transforms import os import cv2 import time import numpy as np # alphabetfrom .keys import alphabet import params from torch.autograd import Variable from PIL import Image from utils import strLabelConverter,resizeNormalize converter = strLabelConverter(params.alphabet) # converter...
27.788889
88
0.572171
import torch from torchvision import transforms import os import cv2 import time import numpy as np # alphabetfrom .keys import alphabet import params from torch.autograd import Variable from PIL import Image from utils import strLabelConverter,resizeNormalize converter = strLabelConverter(params.alphabet) # converter...
27
2,284
23
077dc1cf93a34eabf2a6423dfc342a97bc442c61
6,331
py
Python
tests/integration/worker/fixture.py
geometry-labs/icon-governance
2f084de358525808c6f05ab99a686463d2273c8b
[ "Apache-2.0" ]
null
null
null
tests/integration/worker/fixture.py
geometry-labs/icon-governance
2f084de358525808c6f05ab99a686463d2273c8b
[ "Apache-2.0" ]
23
2021-10-04T19:13:57.000Z
2022-02-16T23:50:15.000Z
tests/integration/worker/fixture.py
geometry-labs/icon-governance
2f084de358525808c6f05ab99a686463d2273c8b
[ "Apache-2.0" ]
null
null
null
peers = { ("54.95.16.98", "hxdabfd26d6c01038acae8081580fcce86c802fd01"), ("54.184.241.211", "hx016401bba6a5474e08c925b6390e1ef1d8e0adc9"), ("35.170.9.187", "hx9fa9d224306b0722099d30471b3c2306421aead7"), ("65.108.47.101", "hx54d6f19c3d16b2ef23c09c885ca1ba776aaa80e2"), ("13.91.36.115", "hxc5e0b88cb909...
66.642105
70
0.751856
peers = { ("54.95.16.98", "hxdabfd26d6c01038acae8081580fcce86c802fd01"), ("54.184.241.211", "hx016401bba6a5474e08c925b6390e1ef1d8e0adc9"), ("35.170.9.187", "hx9fa9d224306b0722099d30471b3c2306421aead7"), ("65.108.47.101", "hx54d6f19c3d16b2ef23c09c885ca1ba776aaa80e2"), ("13.91.36.115", "hxc5e0b88cb909...
0
0
0
d4db0e97f8dd644aa8041e83eae4beaa62181324
1,952
py
Python
Scripts_Python/Neuronal_20200417/CGAN/Discriminator.py
IshanBaliyan/DEEP-TFM_with_cGAN
8d711c025367031197e5b8c7c768fc9fbea406ce
[ "MIT" ]
1
2021-08-17T14:47:37.000Z
2021-08-17T14:47:37.000Z
Scripts_Python/Neuronal_20200417/CGAN/Discriminator.py
IshanBaliyan/DEEP-TFM_with_cGAN
8d711c025367031197e5b8c7c768fc9fbea406ce
[ "MIT" ]
null
null
null
Scripts_Python/Neuronal_20200417/CGAN/Discriminator.py
IshanBaliyan/DEEP-TFM_with_cGAN
8d711c025367031197e5b8c7c768fc9fbea406ce
[ "MIT" ]
1
2020-12-11T23:53:43.000Z
2020-12-11T23:53:43.000Z
import numpy as np import torch import torch.nn.functional as F import torch.nn as nn
33.655172
59
0.552254
import numpy as np import torch import torch.nn.functional as F import torch.nn as nn class Discriminator(nn.Module): def __init__(self, hidden_dim=1024): super(Discriminator, self).__init__() self.hidden_dim = hidden_dim self.conv1 = nn.Conv2d(33, 16, 4, 2, 1) self.conv...
1,769
10
84
68ae7d329b80fdf5298ee6cf2403df2d82abe871
12,483
py
Python
maci/distributions/real_nvp_bijector.py
bbrito/mapr2
5aa1a4c85c28918d9f16e5544793bf5574d7c49e
[ "Apache-2.0" ]
35
2019-01-13T17:55:03.000Z
2022-02-23T17:06:53.000Z
maci/distributions/real_nvp_bijector.py
arita37/mapr2
57f76875a4a6aed1850d3fb8604683bfe8a0e09b
[ "Apache-2.0" ]
18
2019-03-10T23:12:00.000Z
2022-03-21T22:17:09.000Z
maci/distributions/real_nvp_bijector.py
arita37/mapr2
57f76875a4a6aed1850d3fb8604683bfe8a0e09b
[ "Apache-2.0" ]
19
2019-01-13T20:47:00.000Z
2021-11-09T05:59:13.000Z
"""RealNVP bijector.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np ConditionalBijector = tf.contrib.distributions.bijectors.ConditionalBijector __all__ = [ "RealNVPBijector", ] def checkerboard(shape, p...
32.936675
79
0.564448
"""RealNVP bijector.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow as tf import numpy as np ConditionalBijector = tf.contrib.distributions.bijectors.ConditionalBijector __all__ = [ "RealNVPBijector", ] def checkerboard(shape, p...
8,279
0
266
e42334d7ea3bc94404b733cfe0daa07bc8199160
3,904
py
Python
politician/views.py
adborden/WeVoteBase
7fd612aee1d3638c8a74cc81873ce0687f62cf33
[ "MIT" ]
null
null
null
politician/views.py
adborden/WeVoteBase
7fd612aee1d3638c8a74cc81873ce0687f62cf33
[ "MIT" ]
null
null
null
politician/views.py
adborden/WeVoteBase
7fd612aee1d3638c8a74cc81873ce0687f62cf33
[ "MIT" ]
1
2020-03-04T00:22:39.000Z
2020-03-04T00:22:39.000Z
# politician/views.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404, render from django.contrib import messages from django.contrib.messages import get_messages from django.core.urlresolvers import reverse from ...
36.485981
147
0.742059
# politician/views.py # Brought to you by We Vote. Be good. # -*- coding: UTF-8 -*- from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404, render from django.contrib import messages from django.contrib.messages import get_messages from django.core.urlresolvers import reverse from ...
601
221
68
4ed568d66cbb02189b36d1ec6924ebb87e827d1e
6,209
py
Python
tests/compare_updates.py
cassianobecker/msbm
6ce22f93f63071dc3ca722d499db376ea678eb23
[ "MIT" ]
null
null
null
tests/compare_updates.py
cassianobecker/msbm
6ce22f93f63071dc3ca722d499db376ea678eb23
[ "MIT" ]
null
null
null
tests/compare_updates.py
cassianobecker/msbm
6ce22f93f63071dc3ca722d499db376ea678eb23
[ "MIT" ]
null
null
null
import sys sys.path.insert(0, '..') import updates_msbm_vi_iter import updates_msbm_vi import updates_msbm2_vi_iter import updates_msbm2_vi import os import util import init_msbm_vi as im import numpy as np import numpy.random as npr import pdb # ########################################################### # ########...
35.079096
113
0.565792
import sys sys.path.insert(0, '..') import updates_msbm_vi_iter import updates_msbm_vi import updates_msbm2_vi_iter import updates_msbm2_vi import os import util import init_msbm_vi as im import numpy as np import numpy.random as npr import pdb class TestUpdates: def __init__(self, updater_einsum, updater_iter,...
4,600
-3
239
90aec8fbaf7418768c7f684cf8a72125b93b8c1d
595
py
Python
module/tools/extra/graph_clean.py
ObliviousJamie/opic-prototype
a925ce9faa38b9a6c8976d4c63b47349a53fd07e
[ "BSD-3-Clause" ]
null
null
null
module/tools/extra/graph_clean.py
ObliviousJamie/opic-prototype
a925ce9faa38b9a6c8976d4c63b47349a53fd07e
[ "BSD-3-Clause" ]
null
null
null
module/tools/extra/graph_clean.py
ObliviousJamie/opic-prototype
a925ce9faa38b9a6c8976d4c63b47349a53fd07e
[ "BSD-3-Clause" ]
null
null
null
import networkx as nx
27.045455
73
0.633613
import networkx as nx class GraphClean: @staticmethod def prune_unconnected_components(graph): current = graph # Remove self loops for vertex in graph.nodes_with_selfloops(): graph.remove_edge(vertex, vertex) if not nx.is_connected(graph): connected_su...
508
41
23
4f7f939a65964f9c1af988a3620892d451aa3135
46,951
py
Python
utensor_cgen/backend/operators.py
dboyliao/utensor_cgen
aacd3adf4ee2a521a8eb2e75807fe3c1c0d1e1e5
[ "Apache-2.0" ]
1
2017-12-29T17:40:49.000Z
2017-12-29T17:40:49.000Z
utensor_cgen/backend/operators.py
dboyliao/utensor_cgen
aacd3adf4ee2a521a8eb2e75807fe3c1c0d1e1e5
[ "Apache-2.0" ]
1
2017-12-28T02:25:45.000Z
2017-12-28T02:25:45.000Z
utensor_cgen/backend/operators.py
dboyliao/utensor_cgen
aacd3adf4ee2a521a8eb2e75807fe3c1c0d1e1e5
[ "Apache-2.0" ]
3
2017-12-27T17:15:38.000Z
2017-12-29T06:43:00.000Z
# -*- coding:utf8 -*- r''' TODO: remove all tensorflow graph construction in `build_op_info` ''' import os import numpy as np import idx2numpy as idx2np import tensorflow as tf from utensor_cgen.ir import OperationInfo, TensorInfo from utensor_cgen.ir.converter import (AttrValueConverter, DataTypeConverter, ...
37.32194
114
0.629188
# -*- coding:utf8 -*- r''' TODO: remove all tensorflow graph construction in `build_op_info` ''' import os import numpy as np import idx2numpy as idx2np import tensorflow as tf from utensor_cgen.ir import OperationInfo, TensorInfo from utensor_cgen.ir.converter import (AttrValueConverter, DataTypeConverter, ...
40,455
3,736
817
f1f76e0897cbb9b84dcbbc0fc3e50e81b0c75e9b
2,993
py
Python
ndg/security/server/test/unit/wsgi/authn/test_httpbasicauth.py
cedadev/ndg_security_server
6873cc0de1a01ad05ddcbeb3f074a33923dc1ca1
[ "BSD-3-Clause" ]
null
null
null
ndg/security/server/test/unit/wsgi/authn/test_httpbasicauth.py
cedadev/ndg_security_server
6873cc0de1a01ad05ddcbeb3f074a33923dc1ca1
[ "BSD-3-Clause" ]
null
null
null
ndg/security/server/test/unit/wsgi/authn/test_httpbasicauth.py
cedadev/ndg_security_server
6873cc0de1a01ad05ddcbeb3f074a33923dc1ca1
[ "BSD-3-Clause" ]
1
2017-12-05T17:31:08.000Z
2017-12-05T17:31:08.000Z
#!/usr/bin/env python """Unit tests for WSGI HTTP Basic Auth handler NERC DataGrid Project """ __author__ = "P J Kershaw" __date__ = "13/10/09" __copyright__ = "(C) 2009 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Kershaw@stfc.ac.uk" __...
32.182796
80
0.636151
#!/usr/bin/env python """Unit tests for WSGI HTTP Basic Auth handler NERC DataGrid Project """ __author__ = "P J Kershaw" __date__ = "13/10/09" __copyright__ = "(C) 2009 Science and Technology Facilities Council" __license__ = "BSD - see LICENSE file in top-level directory" __contact__ = "Philip.Kershaw@stfc.ac.uk" __...
1,708
260
116
0c2450da8b64ba940ddbb47766c3145d609c2f49
4,725
py
Python
src/tankoh2/contour.py
sfreund-DLR/tankoh2
92ff080f7034a7eb1cdabed5089c79fd01af4d11
[ "MIT", "BSD-3-Clause" ]
null
null
null
src/tankoh2/contour.py
sfreund-DLR/tankoh2
92ff080f7034a7eb1cdabed5089c79fd01af4d11
[ "MIT", "BSD-3-Clause" ]
27
2021-11-03T19:53:00.000Z
2022-03-28T12:43:30.000Z
src/tankoh2/contour.py
sfreund-DLR/tankoh2
92ff080f7034a7eb1cdabed5089c79fd01af4d11
[ "MIT", "BSD-3-Clause" ]
null
null
null
"""methods for liners and domes""" import numpy as np from tankoh2 import pychain from tankoh2.service import log from tankoh2.exception import Tankoh2Error from tankoh2.utilities import updateName, copyAsJson # ######################################################################################### # Create Line...
37.8
116
0.631534
"""methods for liners and domes""" import numpy as np from tankoh2 import pychain from tankoh2.service import log from tankoh2.exception import Tankoh2Error from tankoh2.utilities import updateName, copyAsJson # ######################################################################################### # Create Line...
1,298
0
23
d9f39d299ff10da061d80b7dd42549838fdc0966
206
py
Python
test/test_local_grid_client.py
mari-linhares/Grid
e06a13f24667160b91cd5f682983453072877f30
[ "Apache-2.0" ]
null
null
null
test/test_local_grid_client.py
mari-linhares/Grid
e06a13f24667160b91cd5f682983453072877f30
[ "Apache-2.0" ]
null
null
null
test/test_local_grid_client.py
mari-linhares/Grid
e06a13f24667160b91cd5f682983453072877f30
[ "Apache-2.0" ]
null
null
null
import syft as sy import torch as th from grid.client import GridClient
18.727273
56
0.718447
import syft as sy import torch as th from grid.client import GridClient def test_local_grid_client(): hook = sy.TorchHook(th) gr_client = GridClient(addr="http://127.0.0.1:5000") assert True
109
0
23
f11ef309eb4e3feab167a5e7a7494a790d48b331
7,450
py
Python
tests/test_arg_check.py
lizeyan/tensorkit
2997a5914ec3c3ec72f91eb5906b5ee878fdc020
[ "MIT" ]
null
null
null
tests/test_arg_check.py
lizeyan/tensorkit
2997a5914ec3c3ec72f91eb5906b5ee878fdc020
[ "MIT" ]
null
null
null
tests/test_arg_check.py
lizeyan/tensorkit
2997a5914ec3c3ec72f91eb5906b5ee878fdc020
[ "MIT" ]
2
2020-10-15T06:41:32.000Z
2021-01-27T12:55:11.000Z
import unittest import pytest import tensorkit as tk from tensorkit import tensor as T from tensorkit.arg_check import * from tests.helper import *
38.402062
82
0.475168
import unittest import pytest import tensorkit as tk from tensorkit import tensor as T from tensorkit.arg_check import * from tests.helper import * class ArgCheckTestCase(TestCase): def test_validate_positive_int(self): for v in [1, 2, 3]: self.assertEqual(validate_positive_int('v', v), v) ...
7,075
12
212
9928c1c459906e3027e54332db9b7b9f35517297
930
py
Python
levels/chock_a_block.py
ungood/stockfighter-py
8fd6cc70177227164f3984670d352a89d9f0b0d5
[ "MIT" ]
null
null
null
levels/chock_a_block.py
ungood/stockfighter-py
8fd6cc70177227164f3984670d352a89d9f0b0d5
[ "MIT" ]
null
null
null
levels/chock_a_block.py
ungood/stockfighter-py
8fd6cc70177227164f3984670d352a89d9f0b0d5
[ "MIT" ]
null
null
null
#from stockfighter import Stockfighter import os, time # sf = Stockfighter() # # level = sf.levels['chock_a_block'] # info = level.start() # print(info) # # sf = Stockfighter() # print(sf.heartbeat()) # # venue = sf.venues['PVIEX'] # # stock = venue.stocks['SOF'] # for stock in venue.stocks: # print(stock) # # ORDE...
22.142857
90
0.588172
#from stockfighter import Stockfighter import os, time def create_parser(parent): pass # sf = Stockfighter() # # level = sf.levels['chock_a_block'] # info = level.start() # print(info) # # sf = Stockfighter() # print(sf.heartbeat()) # # venue = sf.venues['PVIEX'] # # stock = venue.stocks['SOF'] # for stock in ven...
14
0
23
f7e3107009c02c524f668486aee1490c29db37a3
3,471
py
Python
matmul.py
zangkaiqiang/pyaam
3c59026df17fb0b4588797026d5a2fe64d05fca9
[ "MIT" ]
2
2020-07-06T18:18:25.000Z
2021-01-20T08:05:21.000Z
matmul.py
zangkaiqiang/pyaam
3c59026df17fb0b4588797026d5a2fe64d05fca9
[ "MIT" ]
null
null
null
matmul.py
zangkaiqiang/pyaam
3c59026df17fb0b4588797026d5a2fe64d05fca9
[ "MIT" ]
3
2021-01-11T07:16:42.000Z
2021-07-28T11:37:01.000Z
######################################################################## # # License: BSD # Created: October 11, 2013 # Author: Francesc Alted # ######################################################################## """ Implementation of an out of core matrix-matrix multiplication for PyTables. ""...
28.925
77
0.53414
######################################################################## # # License: BSD # Created: October 11, 2013 # Author: Francesc Alted # ######################################################################## """ Implementation of an out of core matrix-matrix multiplication for PyTables. ""...
0
0
0
4bfa331a60755af393427cbeb23700e010675ae3
3,487
py
Python
English/CdeC.py
ehultee/glacio-CdeC
2cab0a2593abe9e23ced8704be9c794fbbce0576
[ "MIT" ]
2
2019-07-01T16:42:35.000Z
2021-11-07T20:03:30.000Z
English/CdeC.py
ehultee/glacio-CdeC
2cab0a2593abe9e23ced8704be9c794fbbce0576
[ "MIT" ]
18
2019-07-02T16:46:54.000Z
2019-08-02T18:19:15.000Z
English/CdeC.py
ehultee/glacio-CdeC
2cab0a2593abe9e23ced8704be9c794fbbce0576
[ "MIT" ]
2
2019-07-02T16:20:33.000Z
2021-01-27T11:47:14.000Z
## Helper functions to clean up Clubes de Ciencia notebooks ## 5 July 2019 EHU import xarray as xr import pandas as pd import numpy as np from oggm import utils def ice_to_freshwater(icevol, rho_ice=900, rho_water=1000): """Cleanly convert volume of glacial ice (km3) to equivalent volume fresh water (liter). ...
30.587719
102
0.629481
## Helper functions to clean up Clubes de Ciencia notebooks ## 5 July 2019 EHU import xarray as xr import pandas as pd import numpy as np from oggm import utils def ice_to_freshwater(icevol, rho_ice=900, rho_water=1000): """Cleanly convert volume of glacial ice (km3) to equivalent volume fresh water (liter). ...
0
0
0
891a6a2c0dd55610ffc22400d6c2676a3191cb6f
1,543
py
Python
skoleintra/schildren.py
svalgaard/fskintra
3ccf656ef1450e541c902d4c00ea1dadcf82085c
[ "BSD-2-Clause-FreeBSD" ]
9
2015-08-12T09:54:04.000Z
2021-06-21T08:35:39.000Z
skoleintra/schildren.py
svalgaard/fskintra
3ccf656ef1450e541c902d4c00ea1dadcf82085c
[ "BSD-2-Clause-FreeBSD" ]
29
2015-01-03T21:13:20.000Z
2020-11-12T08:23:56.000Z
skoleintra/schildren.py
svalgaard/fskintra
3ccf656ef1450e541c902d4c00ea1dadcf82085c
[ "BSD-2-Clause-FreeBSD" ]
11
2015-02-25T20:24:56.000Z
2018-11-16T07:37:37.000Z
# -*- coding: utf-8 -*- import re import config import surllib # Map of children => urlPrefix # 'Andrea 0A' => '/parent/1234/Andrea/' _children = None def getChildren(): '''Returns of list of "available" children in the system''' global _children if not _children: _children = dict() se...
27.553571
75
0.596889
# -*- coding: utf-8 -*- import re import config import surllib # Map of children => urlPrefix # 'Andrea 0A' => '/parent/1234/Andrea/' _children = None def getChildren(): '''Returns of list of "available" children in the system''' global _children def ckey(n): return tuple(n.rsplit(' ', 1)[::-1]) ...
399
0
73
b6fea9e2c246a5af265492ae8abcfc853cc92e50
297
py
Python
aula01/par_impar.py
Doni-zete/Praticas-Python
36a877a9f22f9992550fb6e3bdb89c751d6299ef
[ "MIT" ]
null
null
null
aula01/par_impar.py
Doni-zete/Praticas-Python
36a877a9f22f9992550fb6e3bdb89c751d6299ef
[ "MIT" ]
null
null
null
aula01/par_impar.py
Doni-zete/Praticas-Python
36a877a9f22f9992550fb6e3bdb89c751d6299ef
[ "MIT" ]
null
null
null
""" Decobrir se um numero é impar oou par """ print(25*"-") while True: numero = int(input("Digite um numero: ")) if (numero % 2) == 0: print(f"Numero digitado, {numero} é PAR: ") elif(numero % 2) != 0: print(f"Numero digitado, {numero} é IMPAR: ") print(25*"-")
21.214286
53
0.555556
""" Decobrir se um numero é impar oou par """ print(25*"-") while True: numero = int(input("Digite um numero: ")) if (numero % 2) == 0: print(f"Numero digitado, {numero} é PAR: ") elif(numero % 2) != 0: print(f"Numero digitado, {numero} é IMPAR: ") print(25*"-")
0
0
0
0167fb62df138c757952327fadf399fc12f32100
3,435
py
Python
tests/python/test_plotting.py
MichaelChirico/xgboost
028bdc174086d22dcda4130ca5955efca9a0eed7
[ "Apache-2.0" ]
1
2022-01-04T23:38:14.000Z
2022-01-04T23:38:14.000Z
tests/python/test_plotting.py
Nihilitior/xgboost
7366d3b20cad8e28ecef67d5130c71e81bb0b088
[ "Apache-2.0" ]
40
2021-09-10T06:17:11.000Z
2022-03-19T19:30:56.000Z
tests/python/test_plotting.py
Nihilitior/xgboost
7366d3b20cad8e28ecef67d5130c71e81bb0b088
[ "Apache-2.0" ]
1
2018-12-09T14:30:38.000Z
2018-12-09T14:30:38.000Z
import json import numpy as np import xgboost as xgb import testing as tm import pytest try: import matplotlib matplotlib.use('Agg') from matplotlib.axes import Axes from graphviz import Source except ImportError: pass pytestmark = pytest.mark.skipif(**tm.no_multiple(tm.no_matplotlib(), ...
35.05102
77
0.560116
import json import numpy as np import xgboost as xgb import testing as tm import pytest try: import matplotlib matplotlib.use('Agg') from matplotlib.axes import Axes from graphviz import Source except ImportError: pass pytestmark = pytest.mark.skipif(**tm.no_multiple(tm.no_matplotlib(), ...
2,845
147
23
982d1343458738175e9ac9c51f09078a5d70f3fc
1,386
py
Python
tests/components/test_branch.py
haowen-xu/tfsnippet-pre-alpha
31eb2cf692ac25b95cc815aaca53754d6db42d9f
[ "MIT" ]
null
null
null
tests/components/test_branch.py
haowen-xu/tfsnippet-pre-alpha
31eb2cf692ac25b95cc815aaca53754d6db42d9f
[ "MIT" ]
null
null
null
tests/components/test_branch.py
haowen-xu/tfsnippet-pre-alpha
31eb2cf692ac25b95cc815aaca53754d6db42d9f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import unittest import six import tensorflow as tf from tfsnippet.components import DictMapper, Linear, Dense from tests.helper import TestCase if __name__ == '__main__': unittest.main()
30.130435
71
0.565657
# -*- coding: utf-8 -*- import unittest import six import tensorflow as tf from tfsnippet.components import DictMapper, Linear, Dense from tests.helper import TestCase class DictMapperTestCase(TestCase): def test_construction(self): net = DictMapper({ 'a': Linear(2), 'b': Dense(...
1,075
14
77
dc034e6d00493ce71c20bb1a4fa5cb0e5ade07f9
1,076
py
Python
server.py
MusaTamzid05/simple_image_api
ea7a2b255c47732d7f79f7f9c59576eced23f3c6
[ "MIT" ]
null
null
null
server.py
MusaTamzid05/simple_image_api
ea7a2b255c47732d7f79f7f9c59576eced23f3c6
[ "MIT" ]
null
null
null
server.py
MusaTamzid05/simple_image_api
ea7a2b255c47732d7f79f7f9c59576eced23f3c6
[ "MIT" ]
null
null
null
from flask import Flask from flask_restful import Resource from flask_restful import Api import numpy as np import cv2 import werkzeug from flask_restful import reqparse parser = reqparse.RequestParser() parser.add_argument("file", type = werkzeug.datastructures.FileStorage, location = "files") app = Flask(__nam...
19.925926
91
0.672862
from flask import Flask from flask_restful import Resource from flask_restful import Api import numpy as np import cv2 import werkzeug from flask_restful import reqparse parser = reqparse.RequestParser() parser.add_argument("file", type = werkzeug.datastructures.FileStorage, location = "files") app = Flask(__nam...
502
7
104
762c4a4873f93d04b2ca0adffa5772acd9975495
1,428
py
Python
access-analyzer/step-functions-archive-findings/functions/evaluate-access-analyzer-finding/app.py
lulukelu/aws-iam-permissions-guardrails
cae485e3d8589c85f55c50c442ce47916345e00d
[ "Apache-2.0" ]
88
2020-04-02T02:56:27.000Z
2022-03-18T13:22:02.000Z
access-analyzer/step-functions-archive-findings/functions/evaluate-access-analyzer-finding/app.py
lulukelu/aws-iam-permissions-guardrails
cae485e3d8589c85f55c50c442ce47916345e00d
[ "Apache-2.0" ]
45
2020-06-26T11:11:28.000Z
2021-08-17T15:31:47.000Z
access-analyzer/step-functions-archive-findings/functions/evaluate-access-analyzer-finding/app.py
lulukelu/aws-iam-permissions-guardrails
cae485e3d8589c85f55c50c442ce47916345e00d
[ "Apache-2.0" ]
32
2020-04-02T02:56:28.000Z
2021-12-20T18:53:04.000Z
import logging logger = logging.getLogger() logger.setLevel(logging.INFO) import boto3 #Evaluate Risk Level #Return True to raise alert if risk level exceeds threshold #Return False to Archive finding
31.733333
111
0.740196
import logging logger = logging.getLogger() logger.setLevel(logging.INFO) import boto3 #Evaluate Risk Level #Return True to raise alert if risk level exceeds threshold #Return False to Archive finding def should_raise_alert(finding_details, tags, additional_context): if "error" in finding_details: logger.error(...
1,157
0
68
2e3fe88d47f02aa45547236534d02086aa6a58e7
3,372
py
Python
MobileRevelator/python/android_gls.py
ohunecker/MR
b0c93436c7964d87a0b8154f8b7662b1731124b9
[ "MIT" ]
98
2019-02-03T22:50:24.000Z
2022-03-17T12:50:56.000Z
MobileRevelator/python/android_gls.py
cewatkins/MR
5ba553fd0eb4c1d80842074a553119486f005822
[ "MIT" ]
10
2019-03-14T20:12:10.000Z
2020-05-23T10:37:54.000Z
MobileRevelator/python/android_gls.py
cewatkins/MR
5ba553fd0eb4c1d80842074a553119486f005822
[ "MIT" ]
30
2019-02-03T22:50:27.000Z
2022-03-30T12:37:30.000Z
#Pluginname="GLS Tracking (Android)" #Type=App import os import json import tempfile
42.15
148
0.472123
#Pluginname="GLS Tracking (Android)" #Type=App import os import json import tempfile def convertdata(filenames): zfields=[] row=0 for fsname in filenames: filename=tempfile.gettempdir()+"/"+fsname[fsname.rfind("/")+1:] if ctx.fs_file_extract(fsname,filename): print...
3,230
0
49
1129bbca49af3c3ae848c54738eec81269b88739
983
py
Python
utf7.py
CthUlhUzzz/unicode_crafter
b1b6b54e13d9afdf20c58abffe7a4986e35628d0
[ "WTFPL" ]
null
null
null
utf7.py
CthUlhUzzz/unicode_crafter
b1b6b54e13d9afdf20c58abffe7a4986e35628d0
[ "WTFPL" ]
null
null
null
utf7.py
CthUlhUzzz/unicode_crafter
b1b6b54e13d9afdf20c58abffe7a4986e35628d0
[ "WTFPL" ]
null
null
null
# Module for UTF-7 encoding from base64 import b64encode from utf16 import utf16_encode, UTF16_MAXIMUM_CODEPOINT DIRECT_CHARACTERS = '\'(),-./:?' UTF7_MAXIMUM_CODEPOINT = UTF16_MAXIMUM_CODEPOINT
31.709677
95
0.603255
# Module for UTF-7 encoding from base64 import b64encode from utf16 import utf16_encode, UTF16_MAXIMUM_CODEPOINT DIRECT_CHARACTERS = '\'(),-./:?' UTF7_MAXIMUM_CODEPOINT = UTF16_MAXIMUM_CODEPOINT def utf7_encode(codepoints, direct_characters=DIRECT_CHARACTERS): assert '+' not in direct_characters result_str...
761
0
23
48337410cf4a7f2042310786ee08e0b9f74679d0
6,939
py
Python
ping_me/ping.py
harshcrop/ping-me
274a07fd07356255763f516a47b37d9472041dcf
[ "Apache-2.0" ]
null
null
null
ping_me/ping.py
harshcrop/ping-me
274a07fd07356255763f516a47b37d9472041dcf
[ "Apache-2.0" ]
null
null
null
ping_me/ping.py
harshcrop/ping-me
274a07fd07356255763f516a47b37d9472041dcf
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """Command line execution listener module of ping-me""" from __future__ import print_function from dateutil import parser import argparse import datetime import getpass import hashlib import os import parsedatetime import sys import time import ping_me.authenticate import ping_me.engine home =...
39.651429
78
0.542729
# -*- coding: utf-8 -*- """Command line execution listener module of ping-me""" from __future__ import print_function from dateutil import parser import argparse import datetime import getpass import hashlib import os import parsedatetime import sys import time import ping_me.authenticate import ping_me.engine home =...
0
0
0
5cb7d5f6b4498ffbcd46a0a7bcd0f240d3cdfa19
443
py
Python
test/forecast.py
sambacha/pyblock
f8f207de36a2f91dfe5f61681eba0e371cb0c552
[ "MIT" ]
null
null
null
test/forecast.py
sambacha/pyblock
f8f207de36a2f91dfe5f61681eba0e371cb0c552
[ "MIT" ]
null
null
null
test/forecast.py
sambacha/pyblock
f8f207de36a2f91dfe5f61681eba0e371cb0c552
[ "MIT" ]
null
null
null
"""Test workflow of forecasting model.""" import sys sys.path.append("../Forecasting") import model def test_forecast(): """Optimize an ARIMA model and predict a few data points.""" START = 5 END = 10 print("Forecasting...") f = model.Forecast("../Forecasting/blockchain.csv") f.optimizeARIMA(...
26.058824
66
0.650113
"""Test workflow of forecasting model.""" import sys sys.path.append("../Forecasting") import model def test_forecast(): """Optimize an ARIMA model and predict a few data points.""" START = 5 END = 10 print("Forecasting...") f = model.Forecast("../Forecasting/blockchain.csv") f.optimizeARIMA(...
0
0
0
6286afe34c783abf3fab1f6006078941470e0023
6,221
py
Python
prototxt_basic.py
niekai1982/MobileNet-SSD
0fb307ff049865338017627d4f082a8fd8b12016
[ "MIT" ]
null
null
null
prototxt_basic.py
niekai1982/MobileNet-SSD
0fb307ff049865338017627d4f082a8fd8b12016
[ "MIT" ]
null
null
null
prototxt_basic.py
niekai1982/MobileNet-SSD
0fb307ff049865338017627d4f082a8fd8b12016
[ "MIT" ]
null
null
null
# prototxt_basic # ----------------------------------------------------------------
36.380117
100
0.561968
# prototxt_basic def data(txt_file, info): txt_file.write('name: "mxnet-mdoel"\n') txt_file.write('layer {\n') txt_file.write(' name: "data"\n') txt_file.write(' type: "Input"\n') txt_file.write(' top: "data"\n') txt_file.write(' input_param {\n') txt_file.write(' shape: { dim: 10 dim: 3 dim: 224 ...
5,849
0
281
0255284ab4263a817a1bbf24a0fc9d68856eaa0f
3,769
py
Python
tests/test_gregorian_calendar.py
ibalagurov/laughing-train
24c345b22230e695ddd461368f118d1f2bb8d379
[ "MIT" ]
null
null
null
tests/test_gregorian_calendar.py
ibalagurov/laughing-train
24c345b22230e695ddd461368f118d1f2bb8d379
[ "MIT" ]
null
null
null
tests/test_gregorian_calendar.py
ibalagurov/laughing-train
24c345b22230e695ddd461368f118d1f2bb8d379
[ "MIT" ]
null
null
null
""" Tests for checking gregorian calendar date. Astronomical year contains 365,2425 days: 365 for usual year and 366 for leap Leap years: 0.2425 is 97 / 400 or 1/4 - 1/100 + 1/400 It means: - each 4th year is leap, except 3 of 4 round dates - 2004, 2008, 2012 and etc are leap - 2000, 2400, 2800 and etc. is leap - 21...
36.592233
92
0.645795
""" Tests for checking gregorian calendar date. Astronomical year contains 365,2425 days: 365 for usual year and 366 for leap Leap years: 0.2425 is 97 / 400 or 1/4 - 1/100 + 1/400 It means: - each 4th year is leap, except 3 of 4 round dates - 2004, 2008, 2012 and etc are leap - 2000, 2400, 2800 and etc. is leap - 21...
0
0
0
f317684016dd3310bb8a93c672100e2f58bb2b7f
159
py
Python
arithmetic10.py
indraputra147/belajarpython
13ed3e73a75f25cc6c2c0e1fc7af17ffa53e5760
[ "MIT" ]
null
null
null
arithmetic10.py
indraputra147/belajarpython
13ed3e73a75f25cc6c2c0e1fc7af17ffa53e5760
[ "MIT" ]
null
null
null
arithmetic10.py
indraputra147/belajarpython
13ed3e73a75f25cc6c2c0e1fc7af17ffa53e5760
[ "MIT" ]
null
null
null
import math a = int(input("a = ")) b = int(input("b = ")) c = a + b d = a - b e = a * b f = a / b g = a % b h = math.log10(a) i = a**b print(c,d,e,f,g,h,i)
10.6
22
0.446541
import math a = int(input("a = ")) b = int(input("b = ")) c = a + b d = a - b e = a * b f = a / b g = a % b h = math.log10(a) i = a**b print(c,d,e,f,g,h,i)
0
0
0
feda14de5a8d251a97859d636e823d8fc7099816
193
py
Python
section_3/3_decorators_and_context_mgrs/decos.py
hgohel/Python-for-Everyday-Life
957963e67dca8c2d20a86fc7e66e818c80d013aa
[ "MIT" ]
43
2018-04-09T11:59:11.000Z
2022-01-29T14:27:37.000Z
section_3/3_decorators_and_context_mgrs/decos.py
hgohel/Python-for-Everyday-Life
957963e67dca8c2d20a86fc7e66e818c80d013aa
[ "MIT" ]
12
2019-11-03T16:50:39.000Z
2021-09-07T23:52:37.000Z
section_3/3_decorators_and_context_mgrs/decos.py
hgohel/Python-for-Everyday-Life
957963e67dca8c2d20a86fc7e66e818c80d013aa
[ "MIT" ]
45
2018-05-10T21:40:46.000Z
2022-03-01T05:50:07.000Z
# -*- coding: utf-8 -*- # !/usr/bin/env python3
24.125
40
0.595855
# -*- coding: utf-8 -*- # !/usr/bin/env python3 def greet(func): def decorated_func(*args, **kwargs): print('Hello!') return func(*args, **kwargs) return decorated_func
123
0
23
38a8181ed5c0474062640cb8571e1aa5db1c0d30
7,383
py
Python
server/generateconfig.py
ehackify/hnp
ba0e10e9ca390616dfa3888ceafc94672f41d26d
[ "MIT" ]
2
2020-04-29T09:58:21.000Z
2020-05-08T20:23:33.000Z
server/generateconfig.py
ehackify/hnp
ba0e10e9ca390616dfa3888ceafc94672f41d26d
[ "MIT" ]
1
2020-05-01T11:00:58.000Z
2020-05-01T11:00:58.000Z
server/generateconfig.py
ehackify/hnp
ba0e10e9ca390616dfa3888ceafc94672f41d26d
[ "MIT" ]
null
null
null
""" This is a helper script meant to generate a working config.py file from the config template. """ from getpass import getpass import json import os.path from random import choice import string import sys from urllib2 import urlopen import argparse el = string.ascii_letters + string.digits rand_str = lambda n: ''...
39.908108
111
0.629554
""" This is a helper script meant to generate a working config.py file from the config template. """ from getpass import getpass import json import os.path from random import choice import string import sys from urllib2 import urlopen import argparse el = string.ascii_letters + string.digits rand_str = lambda n: ''...
6,930
0
46
080aa373a3a2c4c389161bee26616e1cb5da3628
12,129
py
Python
cogs/admin.py
fossabot/Pawbot
6fb5d6c16adc02b155a70df91a44c930eddb493f
[ "MIT" ]
null
null
null
cogs/admin.py
fossabot/Pawbot
6fb5d6c16adc02b155a70df91a44c930eddb493f
[ "MIT" ]
null
null
null
cogs/admin.py
fossabot/Pawbot
6fb5d6c16adc02b155a70df91a44c930eddb493f
[ "MIT" ]
null
null
null
import time import aiohttp import traceback import discord import textwrap import io import json from dhooks import Webhook from utils.chat_formatting import pagify from contextlib import redirect_stdout from copy import copy from typing import Union from utils import repo, default, http, dataIO from discord.ext impor...
36.423423
236
0.574986
import time import aiohttp import traceback import discord import textwrap import io import json from dhooks import Webhook from utils.chat_formatting import pagify from contextlib import redirect_stdout from copy import copy from typing import Union from utils import repo, default, http, dataIO from discord.ext impor...
1,273
10,490
46
ff3989ef53fcbd5d6a133b5ce43e595a8a5131de
9,683
py
Python
SIX_DOF.py
HarrisonLeece/Circinus
d5934f9d59f6b63635d5d053e48339292394c106
[ "MIT" ]
null
null
null
SIX_DOF.py
HarrisonLeece/Circinus
d5934f9d59f6b63635d5d053e48339292394c106
[ "MIT" ]
null
null
null
SIX_DOF.py
HarrisonLeece/Circinus
d5934f9d59f6b63635d5d053e48339292394c106
[ "MIT" ]
null
null
null
''' @Authors: Harrison Leece, James Hribal, Max Fung, Nils Heidenreich @Purpose: Explore 6DOF rocket trajectory, esspecially quaternion rotation Learning resources: https://eater.net/quaternions ''' import numpy as np import oyaml as yaml import math class Rotator: ''' https://en.wikipedia.org/wiki/Quaternio...
35.996283
115
0.627388
''' @Authors: Harrison Leece, James Hribal, Max Fung, Nils Heidenreich @Purpose: Explore 6DOF rocket trajectory, esspecially quaternion rotation Learning resources: https://eater.net/quaternions ''' import numpy as np import oyaml as yaml import math class Rotator: def __init__(self): self.re = 0; self.i ...
4,917
7
725
480b454c4f3f99e6503621c21cc4b0ccfce7fa43
1,683
py
Python
warrior/Actions/DevActions/dev_actions.py
pavithra-gowda/warrior
19b153310552b986b86b5470fcfea9547a74c3a9
[ "Apache-2.0" ]
null
null
null
warrior/Actions/DevActions/dev_actions.py
pavithra-gowda/warrior
19b153310552b986b86b5470fcfea9547a74c3a9
[ "Apache-2.0" ]
1
2021-12-13T20:04:13.000Z
2021-12-13T20:04:13.000Z
warrior/Actions/DevActions/dev_actions.py
pavithra-gowda/warrior
19b153310552b986b86b5470fcfea9547a74c3a9
[ "Apache-2.0" ]
null
null
null
import Framework.Utils as Utils from Framework.Utils import data_utils from Fremework.Utils.testcase_Utils import pNote class MyActions(object): """" Default __init__ field must be used when using classes for keywords """ def full_name(self, student, first_name= 'first', last_name= 'last', full_name= 'fir...
36.586957
101
0.641711
import Framework.Utils as Utils from Framework.Utils import data_utils from Fremework.Utils.testcase_Utils import pNote class MyActions(object): """" Default __init__ field must be used when using classes for keywords """ def __init__(self): self.resultfile = Utils.config_Utils.resultfile s...
258
0
26
51104acb8b2c3ea9fc29d8399745835746c384e2
413
py
Python
scripts/avsb/visualize.py
maryprimary/frg
e789439f599eb884a6220ae5b471cf610b0c2b2a
[ "MIT" ]
null
null
null
scripts/avsb/visualize.py
maryprimary/frg
e789439f599eb884a6220ae5b471cf610b0c2b2a
[ "MIT" ]
12
2021-02-04T06:46:36.000Z
2021-07-01T00:43:38.000Z
scripts/avsb/visualize.py
maryprimary/frg
e789439f599eb884a6220ae5b471cf610b0c2b2a
[ "MIT" ]
null
null
null
'''显示结果''' import numpy from helpers.drawer import draw_heatmap def main(): '''入口''' lval = 5.20 rpath = 'heatmap8/avsb' uval = numpy.load('{0}/{1:.2f}U.npy'.format(rpath, lval)) draw_heatmap(uval[0, 0, 0, 0, :, :, 0]) draw_heatmap(uval[1, 1, 1, 1, :, :, 0]) draw_heatmap(uval[1, 0, 0, 1, :...
21.736842
61
0.544794
'''显示结果''' import numpy from helpers.drawer import draw_heatmap def main(): '''入口''' lval = 5.20 rpath = 'heatmap8/avsb' uval = numpy.load('{0}/{1:.2f}U.npy'.format(rpath, lval)) draw_heatmap(uval[0, 0, 0, 0, :, :, 0]) draw_heatmap(uval[1, 1, 1, 1, :, :, 0]) draw_heatmap(uval[1, 0, 0, 1, :...
0
0
0
d2c57943c6d4a8aba77f42d9392defc82e3aa234
1,509
py
Python
tests/test_j2sparql.py
vliz-be-opsci/pykg2tbl
0455c5b58a0bde5e3453cd2242e89f7870d49d68
[ "MIT" ]
null
null
null
tests/test_j2sparql.py
vliz-be-opsci/pykg2tbl
0455c5b58a0bde5e3453cd2242e89f7870d49d68
[ "MIT" ]
null
null
null
tests/test_j2sparql.py
vliz-be-opsci/pykg2tbl
0455c5b58a0bde5e3453cd2242e89f7870d49d68
[ "MIT" ]
null
null
null
import unittest import pytest import sys import os from util4tests import enable_test_logging, run_single_test, log from pykg2tbl import KG2TblService, KGFileSource, KG2EndpointSource, J2SparqlBuilder ALL_TRIPLES_SPARQL = "SELECT * WHERE { ?s ?p ?o. } LIMIT 10" BODC_ENDPOINT = "http://vocab.nerc.ac.uk/sparql/sparql"...
36.804878
102
0.71173
import unittest import pytest import sys import os from util4tests import enable_test_logging, run_single_test, log from pykg2tbl import KG2TblService, KGFileSource, KG2EndpointSource, J2SparqlBuilder ALL_TRIPLES_SPARQL = "SELECT * WHERE { ?s ?p ?o. } LIMIT 10" BODC_ENDPOINT = "http://vocab.nerc.ac.uk/sparql/sparql"...
1,003
16
111
acc786eefab7f0810d55f87c6a7ce8c231f23c01
18,029
py
Python
tutorials/evoked/30_eeg_erp.py
ts2-lescot/mne-python
e4b16dc57a6a188aa06332b73d911e8131972522
[ "BSD-3-Clause" ]
null
null
null
tutorials/evoked/30_eeg_erp.py
ts2-lescot/mne-python
e4b16dc57a6a188aa06332b73d911e8131972522
[ "BSD-3-Clause" ]
1
2021-04-24T05:21:19.000Z
2021-04-27T07:47:52.000Z
tutorials/evoked/30_eeg_erp.py
ts2-lescot/mne-python
e4b16dc57a6a188aa06332b73d911e8131972522
[ "BSD-3-Clause" ]
1
2021-01-07T23:08:52.000Z
2021-01-07T23:08:52.000Z
""" .. _tut-erp: EEG processing and Event Related Potentials (ERPs) ================================================== This tutorial shows how to perform standard ERP analyses in MNE-Python. Most of the material here is covered in other tutorials too, but for convenience the functions and methods most useful for ERP ...
47.32021
79
0.645349
""" .. _tut-erp: EEG processing and Event Related Potentials (ERPs) ================================================== This tutorial shows how to perform standard ERP analyses in MNE-Python. Most of the material here is covered in other tutorials too, but for convenience the functions and methods most useful for ERP ...
0
0
0
e3bdde5ca15cdab92e7ceb01b1e2eb574d075a1d
164
py
Python
problemsets/Codeforces/Python/A1095.py
juarezpaulino/coderemite
a4649d3f3a89d234457032d14a6646b3af339ac1
[ "Apache-2.0" ]
null
null
null
problemsets/Codeforces/Python/A1095.py
juarezpaulino/coderemite
a4649d3f3a89d234457032d14a6646b3af339ac1
[ "Apache-2.0" ]
null
null
null
problemsets/Codeforces/Python/A1095.py
juarezpaulino/coderemite
a4649d3f3a89d234457032d14a6646b3af339ac1
[ "Apache-2.0" ]
null
null
null
""" * * Author: Juarez Paulino(coderemite) * Email: juarez.paulino@gmail.com * """ n,k=int(input()),0 s,x,t='',1,input() while k<n: s+=t[k];k+=x;x+=1 print(s)
16.4
38
0.579268
""" * * Author: Juarez Paulino(coderemite) * Email: juarez.paulino@gmail.com * """ n,k=int(input()),0 s,x,t='',1,input() while k<n: s+=t[k];k+=x;x+=1 print(s)
0
0
0
13523c859982e146b74d5680ca538f2bf774a03e
2,746
py
Python
axonius_api_client/cli/grp_system/grp_central_core/cmd_restore_from_aws_s3.py
rwils83/axonius_api_client
1990ed4d1287482a4648dc51edcaa5eb08255f5b
[ "MIT" ]
null
null
null
axonius_api_client/cli/grp_system/grp_central_core/cmd_restore_from_aws_s3.py
rwils83/axonius_api_client
1990ed4d1287482a4648dc51edcaa5eb08255f5b
[ "MIT" ]
3
2021-05-18T14:28:30.000Z
2021-09-06T20:01:56.000Z
axonius_api_client/cli/grp_system/grp_central_core/cmd_restore_from_aws_s3.py
rwils83/axonius_api_client
1990ed4d1287482a4648dc51edcaa5eb08255f5b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Command line interface for Axonius API Client.""" from ....tools import json_dump from ...context import CONTEXT_SETTINGS, click from ...options import AUTH, add_options KEY_NAME = click.option( "--key-name", "-kn", "key_name", help="Key name of file object in [bucket_name] t...
23.878261
75
0.671158
# -*- coding: utf-8 -*- """Command line interface for Axonius API Client.""" from ....tools import json_dump from ...context import CONTEXT_SETTINGS, click from ...options import AUTH, add_options KEY_NAME = click.option( "--key-name", "-kn", "key_name", help="Key name of file object in [bucket_name] t...
0
0
0
f20965bf4a26da4bfb598e4cc77e1c9347070578
496
py
Python
algoanim/sorts/yslow.py
Gaming32/Python-AlgoAnim
c6df06e263f52d57ca91471830ff8fa14f1d85db
[ "MIT" ]
null
null
null
algoanim/sorts/yslow.py
Gaming32/Python-AlgoAnim
c6df06e263f52d57ca91471830ff8fa14f1d85db
[ "MIT" ]
null
null
null
algoanim/sorts/yslow.py
Gaming32/Python-AlgoAnim
c6df06e263f52d57ca91471830ff8fa14f1d85db
[ "MIT" ]
null
null
null
from algoanim.array import Array from algoanim.sort import Sort SORT_CLASS = YSlowSort
18.37037
40
0.461694
from algoanim.array import Array from algoanim.sort import Sort def yslow(A, l, r): if r - l > 0: if A[r] < A[l]: A[l], A[r] = A[r], A[l] m = (r - l + 1) // 2 for _ in [0, 1]: A = yslow(A, l, r-m) A = yslow(A, l + m, r) A = yslow(A, l + 1, r...
307
52
46
5e317ecf395a2349de6f2351a075fe488ace4261
22,311
py
Python
tests/test_parser.py
shaljam/streaming-form-data
65f764fe521c38db681c3ef384d6b998496df79b
[ "MIT" ]
null
null
null
tests/test_parser.py
shaljam/streaming-form-data
65f764fe521c38db681c3ef384d6b998496df79b
[ "MIT" ]
null
null
null
tests/test_parser.py
shaljam/streaming-form-data
65f764fe521c38db681c3ef384d6b998496df79b
[ "MIT" ]
1
2020-10-13T03:21:46.000Z
2020-10-13T03:21:46.000Z
from contextlib import contextmanager from io import BytesIO import hashlib from numpy import random import pytest from requests_toolbelt import MultipartEncoder from streaming_form_data import ParseFailedException, StreamingFormDataParser from streaming_form_data.targets import ( BaseTarget, FileTarget, ...
23.836538
81
0.640626
from contextlib import contextmanager from io import BytesIO import hashlib from numpy import random import pytest from requests_toolbelt import MultipartEncoder from streaming_form_data import ParseFailedException, StreamingFormDataParser from streaming_form_data.targets import ( BaseTarget, FileTarget, ...
20,716
0
942
6a4411330754e041753c15c87e2436746005b50d
1,998
py
Python
oshi/lme.py
netgroup/Dreamer-Management-Scripts
11fe627ff2fb601f0b1c41c42ae4a6f8a9f5cb21
[ "Apache-2.0" ]
null
null
null
oshi/lme.py
netgroup/Dreamer-Management-Scripts
11fe627ff2fb601f0b1c41c42ae4a6f8a9f5cb21
[ "Apache-2.0" ]
null
null
null
oshi/lme.py
netgroup/Dreamer-Management-Scripts
11fe627ff2fb601f0b1c41c42ae4a6f8a9f5cb21
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python import re import sys import os from subprocess import Popen,PIPE if __name__ == '__main__': push_rules()
25.615385
108
0.683183
#!/usr/bin/python import re import sys import os from subprocess import Popen,PIPE def get_if_index(in_if_name): output = Popen(['ovs-vsctl find Interface name=%s' % in_if_name], shell=True, stdout=PIPE).communicate()[0] if output != None and output != "" : return re.search( r'ofport(.*): (\d*)', output).group(2...
1,764
0
92
f2d19c9aaacf2f6a53e0a55c017ae4dcf96f3238
3,034
py
Python
taxon/backends/memory.py
jdp/taxon
822ac9c92d3aa57484e328c99a5af8a8002991d6
[ "MIT" ]
7
2015-01-10T07:25:24.000Z
2018-05-04T17:47:42.000Z
taxon/backends/memory.py
jdp/taxon
822ac9c92d3aa57484e328c99a5af8a8002991d6
[ "MIT" ]
null
null
null
taxon/backends/memory.py
jdp/taxon
822ac9c92d3aa57484e328c99a5af8a8002991d6
[ "MIT" ]
null
null
null
import operator try: from collections import Counter except ImportError: from ._counter import Counter from .backend import Backend from ..query import Query
31.604167
86
0.542518
import operator try: from collections import Counter except ImportError: from ._counter import Counter from .backend import Backend from ..query import Query class MemoryBackend(Backend): def __init__(self): self.empty() def tag_items(self, tag, *items): if tag not in self.tags: ...
2,539
8
319
0ac474e1e7533b08c8837044f8fe017e777d82e6
364
py
Python
experiment_data_and_analysis/AccuracyAnalysis/mayavi_example.py
JakeFountain/Spooky
e0a2d4ea878467d6bc7f385220f29c85fd65a190
[ "Apache-2.0" ]
null
null
null
experiment_data_and_analysis/AccuracyAnalysis/mayavi_example.py
JakeFountain/Spooky
e0a2d4ea878467d6bc7f385220f29c85fd65a190
[ "Apache-2.0" ]
null
null
null
experiment_data_and_analysis/AccuracyAnalysis/mayavi_example.py
JakeFountain/Spooky
e0a2d4ea878467d6bc7f385220f29c85fd65a190
[ "Apache-2.0" ]
2
2019-03-12T02:06:32.000Z
2019-05-12T15:29:41.000Z
from mayavi import mlab n_mer, n_long = 6, 11 dphi = np.pi / 1000.0 phi = np.arange(0.0, 2 * pi + 0.5 * dphi, dphi) mu = phi * n_mer x = np.cos(mu) * (1 + np.cos(n_long * mu / n_mer) * 0.5) y = np.sin(mu) * (1 + np.cos(n_long * mu / n_mer) * 0.5) z = np.sin(n_long * mu / n_mer) * 0.5 t = np.sin(mu) mlab.plot3d(x, y, z...
33.090909
63
0.590659
from mayavi import mlab n_mer, n_long = 6, 11 dphi = np.pi / 1000.0 phi = np.arange(0.0, 2 * pi + 0.5 * dphi, dphi) mu = phi * n_mer x = np.cos(mu) * (1 + np.cos(n_long * mu / n_mer) * 0.5) y = np.sin(mu) * (1 + np.cos(n_long * mu / n_mer) * 0.5) z = np.sin(n_long * mu / n_mer) * 0.5 t = np.sin(mu) mlab.plot3d(x, y, z...
0
0
0
1274f1dac29488da85dd79cccab14802e253602b
689
py
Python
src/absolute_uri.py
nigma/djutil
85b7c21acbcd4d3e8cef4246cdb5049cbede8748
[ "MIT" ]
1
2015-04-16T14:43:25.000Z
2015-04-16T14:43:25.000Z
src/absolute_uri.py
nigma/djutil
85b7c21acbcd4d3e8cef4246cdb5049cbede8748
[ "MIT" ]
null
null
null
src/absolute_uri.py
nigma/djutil
85b7c21acbcd4d3e8cef4246cdb5049cbede8748
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- from __future__ import unicode_literals try: from urlparse import urljoin except ImportError: from urllib.parse import urljoin from django.contrib.sites.models import get_current_site
27.56
66
0.718433
#-*- coding: utf-8 -*- from __future__ import unicode_literals try: from urlparse import urljoin except ImportError: from urllib.parse import urljoin from django.contrib.sites.models import get_current_site def add_domain(path, domain, secure=False): if path.startswith("http://") or path.startswith("ht...
423
0
46
f8369411bcf3950b58aef28e018e3ef6c0a4a4f1
367
py
Python
revolver/group.py
michaelcontento/revolver
bbae82df0804ff2708a82fd0016b776664ee2deb
[ "Apache-2.0" ]
1
2015-05-16T17:55:26.000Z
2015-05-16T17:55:26.000Z
revolver/group.py
michaelcontento/revolver
bbae82df0804ff2708a82fd0016b776664ee2deb
[ "Apache-2.0" ]
null
null
null
revolver/group.py
michaelcontento/revolver
bbae82df0804ff2708a82fd0016b776664ee2deb
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, with_statement from cuisine import group_check as get from cuisine import group_create as create from cuisine import group_ensure as ensure from cuisine import group_user_add as user_add from cuisine import group_user_check as user_check from c...
33.363636
64
0.836512
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, with_statement from cuisine import group_check as get from cuisine import group_create as create from cuisine import group_ensure as ensure from cuisine import group_user_add as user_add from cuisine import group_user_check as user_check from c...
0
0
0
29951beb8b1b68a35ede1131be3ff6ad070a45f5
3,777
py
Python
evaluation/consuming_service_generator.py
Peniac/NSE-CSC
7bb313b59f3b92c1349b03bc11e8fb17512e1518
[ "Apache-2.0" ]
null
null
null
evaluation/consuming_service_generator.py
Peniac/NSE-CSC
7bb313b59f3b92c1349b03bc11e8fb17512e1518
[ "Apache-2.0" ]
null
null
null
evaluation/consuming_service_generator.py
Peniac/NSE-CSC
7bb313b59f3b92c1349b03bc11e8fb17512e1518
[ "Apache-2.0" ]
null
null
null
''' Definitions 1. consuming service: is a network service that requires the consumption of additional VNF(s) that pertain to a different service, i.e., providing services. 2. CSC engaged VNFs (w.r.t. the consuming service): are exactly two distinct VNFs. One VNF forwards the traffic to the receiver CSC engaged ...
53.197183
278
0.735769
''' Definitions 1. consuming service: is a network service that requires the consumption of additional VNF(s) that pertain to a different service, i.e., providing services. 2. CSC engaged VNFs (w.r.t. the consuming service): are exactly two distinct VNFs. One VNF forwards the traffic to the receiver CSC engaged ...
0
0
0
553ba126daefa4225f49cd1ed880ebdf7092f4f9
428
py
Python
quickstart/models.py
gladsonvm/drf-nested
e53cfa116c76ce573207401035edfac6a46cd1be
[ "MIT" ]
null
null
null
quickstart/models.py
gladsonvm/drf-nested
e53cfa116c76ce573207401035edfac6a46cd1be
[ "MIT" ]
null
null
null
quickstart/models.py
gladsonvm/drf-nested
e53cfa116c76ce573207401035edfac6a46cd1be
[ "MIT" ]
null
null
null
from django.db import models from django.contrib.auth.models import User # Create your models here.
25.176471
70
0.752336
from django.db import models from django.contrib.auth.models import User # Create your models here. class UserProfile(models.Model): add_info = models.CharField(null=True, blank=True, max_length=100) user = models.OneToOneField(User) class nestedmodel(models.Model): info = models.CharField(null=True, bl...
0
278
46
f2c87a50078598a9e64acc7a01d1bb775a171f62
3,915
py
Python
check_backup_age.py
martialblog/check_backup_age
1203a458be6f27ed30fcdb49b1f8c8a80a695782
[ "MIT" ]
null
null
null
check_backup_age.py
martialblog/check_backup_age
1203a458be6f27ed30fcdb49b1f8c8a80a695782
[ "MIT" ]
null
null
null
check_backup_age.py
martialblog/check_backup_age
1203a458be6f27ed30fcdb49b1f8c8a80a695782
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import sys import os import argparse import re import datetime import subprocess class EXIT(): """ Exit codes from: https://docs.icinga.com/latest/en/pluginapi.html """ OK = 0 WARN = 1 CRIT = 2 UNKOWN = 3 def commandline(args): """ Settings for the c...
25.422078
123
0.603831
#!/usr/bin/env python3 import sys import os import argparse import re import datetime import subprocess class EXIT(): """ Exit codes from: https://docs.icinga.com/latest/en/pluginapi.html """ OK = 0 WARN = 1 CRIT = 2 UNKOWN = 3 def commandline(args): """ Settings for the c...
228
0
23
5e8f943f19843c86705229924cd80deefbcb73fd
2,170
py
Python
ooobuild/lo/xml/sax/x_fast_token_handler.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/xml/sax/x_fast_token_handler.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
ooobuild/lo/xml/sax/x_fast_token_handler.py
Amourspirit/ooo_uno_tmpl
64e0c86fd68f24794acc22d63d8d32ae05dd12b8
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
40.185185
208
0.731336
# coding: utf-8 # # Copyright 2022 :Barry-Thomas-Paul: Moss # # Licensed under the Apache License, Version 2.0 (the "License") # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http: // www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
0
0
0
220fea1a916c09c767cc2366cd7504e5daae93e3
5,216
py
Python
cap2/pipeline/short_read/amrs.py
nanusefue/CAP2-1
670b343ac7629fe0e64e86263ae420b01952f427
[ "MIT" ]
9
2020-07-10T15:45:12.000Z
2022-01-19T10:44:13.000Z
cap2/pipeline/short_read/amrs.py
nanusefue/CAP2-1
670b343ac7629fe0e64e86263ae420b01952f427
[ "MIT" ]
14
2020-06-15T16:04:54.000Z
2022-03-12T01:05:47.000Z
cap2/pipeline/short_read/amrs.py
nanusefue/CAP2-1
670b343ac7629fe0e64e86263ae420b01952f427
[ "MIT" ]
5
2021-01-05T01:26:48.000Z
2022-01-23T11:20:49.000Z
import luigi import subprocess from os.path import join, dirname, basename from ..utils.cap_task import CapTask from ..config import PipelineConfig from ..utils.conda import CondaPackage from ..preprocessing.clean_reads import CleanReads from ..databases.amr_db import GrootDB, MegaResDB, CardDB
31.047619
96
0.568252
import luigi import subprocess from os.path import join, dirname, basename from ..utils.cap_task import CapTask from ..config import PipelineConfig from ..utils.conda import CondaPackage from ..preprocessing.clean_reads import CleanReads from ..databases.amr_db import GrootDB, MegaResDB, CardDB class GrootAMR(CapTa...
4,137
709
69
a94350db177c24901064b6f7d2929cd25fa5ae9d
3,981
py
Python
apps/users/managers.py
dlooto/driver-vision
676256891971df1d5eee990be54fb31f485d0ae3
[ "MIT" ]
2
2020-06-16T01:52:47.000Z
2021-03-24T08:34:23.000Z
apps/users/managers.py
dlooto/driver-vision
676256891971df1d5eee990be54fb31f485d0ae3
[ "MIT" ]
2
2020-02-12T03:09:54.000Z
2020-06-05T22:47:17.000Z
apps/users/managers.py
dlooto/driver-vision
676256891971df1d5eee990be54fb31f485d0ae3
[ "MIT" ]
null
null
null
#coding=utf-8 # # Created on Mar 21, 2014, by Junn # # from django.contrib.auth.models import BaseUserManager from django.utils import timezone from utils import eggs, logs, http from django.core.cache import cache VALID_ATTRS = ('nickname', 'email', 'phone', 'gender', 'avatar')
32.900826
107
0.542828
#coding=utf-8 # # Created on Mar 21, 2014, by Junn # # from django.contrib.auth.models import BaseUserManager from django.utils import timezone from utils import eggs, logs, http from django.core.cache import cache VALID_ATTRS = ('nickname', 'email', 'phone', 'gender', 'avatar') def mk_key(id): return 'u%s' % i...
836
3,055
50
9c6838ed116deb3a2770d9b6ad5a6c062dbeb8a7
430
py
Python
Python/WebCam GUI Filters/Gray.py
abhijeet007rocks8/Useful-Scripts
2c8bd8c1cca4960c2333806194af7341497269e1
[ "MIT" ]
32
2021-10-02T07:30:48.000Z
2022-03-20T13:43:32.000Z
Python/WebCam GUI Filters/Gray.py
abhijeet007rocks8/Useful-Scripts
2c8bd8c1cca4960c2333806194af7341497269e1
[ "MIT" ]
170
2021-10-02T07:13:00.000Z
2022-03-31T20:40:51.000Z
Python/WebCam GUI Filters/Gray.py
abhijeet007rocks8/Useful-Scripts
2c8bd8c1cca4960c2333806194af7341497269e1
[ "MIT" ]
69
2021-10-02T07:30:53.000Z
2022-03-30T08:25:54.000Z
import cv2 import numpy as np import mediapipe as mp cap = cv2.VideoCapture(0) ret, frame = cap. read () while (True): ret, frame = cap. read () frame = cv2.flip(frame,1) gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) cv2.imshow('Gray Filter', gray) if cv2.waitKey(10) & 0xFF==ord('q'): brea...
25.294118
50
0.64186
import cv2 import numpy as np import mediapipe as mp cap = cv2.VideoCapture(0) ret, frame = cap. read () while (True): ret, frame = cap. read () frame = cv2.flip(frame,1) gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) cv2.imshow('Gray Filter', gray) if cv2.waitKey(10) & 0xFF==ord('q'): brea...
0
0
0
8bb0a1ae516f4e3eaeb925931a16ef163067e5bd
1,537
py
Python
tests/test_models.py
alexwlchan/docstore
dcffa76cb74e685e5ac027be6536d9662cad460f
[ "MIT" ]
40
2019-01-13T18:46:18.000Z
2022-03-26T00:41:53.000Z
tests/test_models.py
alexwlchan/docstore
dcffa76cb74e685e5ac027be6536d9662cad460f
[ "MIT" ]
48
2019-03-02T10:42:42.000Z
2022-03-21T08:26:11.000Z
tests/test_models.py
alexwlchan/docstore
dcffa76cb74e685e5ac027be6536d9662cad460f
[ "MIT" ]
1
2021-07-13T22:46:36.000Z
2021-07-13T22:46:36.000Z
import datetime import uuid import pytest from docstore.models import Dimensions, Document, File, Thumbnail, from_json, to_json @pytest.mark.parametrize("documents", [[1, 2, 3], {"a", "b", "c"}])
25.196721
85
0.62069
import datetime import uuid import pytest from docstore.models import Dimensions, Document, File, Thumbnail, from_json, to_json def is_recent(ds): return (datetime.datetime.now() - ds).seconds < 2 def test_document_defaults(): d1 = Document(title="My test document") assert uuid.UUID(d1.id) assert ...
1,219
0
114
97bbb23607a0663fc7bb7eb63651800524c61af0
778
py
Python
setup.py
JanStgmnn/meta-labs-python
a05caba7e5eb0630b304e2aedf5d4a4aa3036f44
[ "MIT" ]
1
2021-05-24T19:02:08.000Z
2021-05-24T19:02:08.000Z
setup.py
JanStgmnn/meta-labs-python
a05caba7e5eb0630b304e2aedf5d4a4aa3036f44
[ "MIT" ]
null
null
null
setup.py
JanStgmnn/meta-labs-python
a05caba7e5eb0630b304e2aedf5d4a4aa3036f44
[ "MIT" ]
null
null
null
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="metalabs_sdk", # Replace with your own username version="0.1.1", author="Jeffrey Annaraj", author_email="jannaraj@baffled.dev", description="SDK for MetaLabs AP...
32.416667
58
0.650386
import setuptools with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setuptools.setup( name="metalabs_sdk", # Replace with your own username version="0.1.1", author="Jeffrey Annaraj", author_email="jannaraj@baffled.dev", description="SDK for MetaLabs AP...
0
0
0
ed85d29525ec40eeaef723354135ec53e29dbcf5
1,415
py
Python
azure-mgmt-web/azure/mgmt/web/models/file_system_application_logs_config.py
HydAu/AzureSDKForPython
5cbe34e9e0b8ea1faacc9f205633ccc0b885c0f3
[ "Apache-2.0" ]
null
null
null
azure-mgmt-web/azure/mgmt/web/models/file_system_application_logs_config.py
HydAu/AzureSDKForPython
5cbe34e9e0b8ea1faacc9f205633ccc0b885c0f3
[ "Apache-2.0" ]
null
null
null
azure-mgmt-web/azure/mgmt/web/models/file_system_application_logs_config.py
HydAu/AzureSDKForPython
5cbe34e9e0b8ea1faacc9f205633ccc0b885c0f3
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft and contributors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of ...
35.375
76
0.640989
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft and contributors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of ...
37
0
27
b82ef50205094d9997859ea3617022b4bad7350f
63
py
Python
__init__.py
DavidJRobertson/kicad_scripts
4fbc687033260ea6ec919717e0d37ca0d7a9cf37
[ "BSD-3-Clause" ]
368
2016-07-27T06:42:36.000Z
2022-03-31T23:11:25.000Z
__init__.py
mehmetcanbudak/kicad_scripts
7a874fd59d6162636062032e4d2c66b205b52fbe
[ "BSD-3-Clause" ]
37
2017-06-01T08:15:20.000Z
2022-02-19T17:51:34.000Z
__init__.py
mehmetcanbudak/kicad_scripts
7a874fd59d6162636062032e4d2c66b205b52fbe
[ "BSD-3-Clause" ]
114
2017-01-05T05:08:16.000Z
2022-03-28T06:03:15.000Z
from __future__ import absolute_import from . import teardrops
21
38
0.857143
from __future__ import absolute_import from . import teardrops
0
0
0
3e19b4d28b24361d206d389e5a2aa96dbbe59313
1,252
py
Python
ndk/definitions/contact.py
VunkLai/ndk
76894d2b81297ed0b7b48a35227d919d50e8fb64
[ "MIT" ]
1
2020-10-23T07:02:52.000Z
2020-10-23T07:02:52.000Z
ndk/definitions/contact.py
VunkLai/ndk
76894d2b81297ed0b7b48a35227d919d50e8fb64
[ "MIT" ]
null
null
null
ndk/definitions/contact.py
VunkLai/ndk
76894d2b81297ed0b7b48a35227d919d50e8fb64
[ "MIT" ]
null
null
null
import attr from ndk.construct import Construct from ndk.directives import * from ndk.options import contact as options @attr.s
32.102564
70
0.746006
import attr from ndk.construct import Construct from ndk.directives import * from ndk.options import contact as options @attr.s class ContactDirective(Construct): __object_type__ = 'contact' contact_name = PrimaryKey() alias = StringField() contactgroups = OneToMany('ContactGroup') minimum_impo...
25
1,073
22
45e2397e2dec44f82a2719f8b237ca83b5d8a294
17,416
py
Python
examples/task_seq2seq_autotitle.py
sijunx/bert4keras
eb2d7a5ccdf89d724a0e62d55a5292faaf01f395
[ "Apache-2.0" ]
null
null
null
examples/task_seq2seq_autotitle.py
sijunx/bert4keras
eb2d7a5ccdf89d724a0e62d55a5292faaf01f395
[ "Apache-2.0" ]
null
null
null
examples/task_seq2seq_autotitle.py
sijunx/bert4keras
eb2d7a5ccdf89d724a0e62d55a5292faaf01f395
[ "Apache-2.0" ]
null
null
null
#! -*- coding: utf-8 -*- # bert做Seq2Seq任务,采用UNILM方案 # 介绍链接:https://kexue.fm/archives/6933 from __future__ import print_function import glob import os import numpy as np import sys from bert4keras.backend import keras, K from bert4keras.layers import Loss from bert4keras.models import build_transformer_model, tf from...
44.65641
1,517
0.676906
#! -*- coding: utf-8 -*- # bert做Seq2Seq任务,采用UNILM方案 # 介绍链接:https://kexue.fm/archives/6933 from __future__ import print_function import glob import os import numpy as np import sys from bert4keras.backend import keras, K from bert4keras.layers import Loss from bert4keras.models import build_transformer_model, tf from...
17,796
0
250
792aa9f0d16f371e267c4f2fcb7bdd16c329c1d1
706
py
Python
solutions/791/791-yongjoonseo.py
iknoom/LeetCode-Solutions
85c034dfaf1455bcd69c19a2009197934d83f08e
[ "MIT" ]
4
2021-01-13T11:37:57.000Z
2021-01-17T04:56:46.000Z
solutions/791/791-yongjoonseo.py
iknoom/LeetCode-Solutions
85c034dfaf1455bcd69c19a2009197934d83f08e
[ "MIT" ]
9
2021-01-21T11:16:29.000Z
2021-02-23T14:27:00.000Z
solutions/791/791-yongjoonseo.py
iknoom/LeetCode-Solutions
85c034dfaf1455bcd69c19a2009197934d83f08e
[ "MIT" ]
14
2021-01-14T14:36:07.000Z
2021-02-05T09:17:10.000Z
# check # lowercase letters # count all the letters of T which S contains # save indices of letters in T
27.153846
54
0.447592
# check # lowercase letters # count all the letters of T which S contains # save indices of letters in T class Solution: def customSortString(self, S: str, T: str) -> str: result = [0] * len(T) indices = [] counts = dict() for i in range(len(T)): if T[i] in S: ...
558
-6
49
0773b38a64aebeeea57ebbff37f79409955ec330
2,699
py
Python
hata/ext/rpc/utils.py
albertopoljak/hata
96d0b3182eb4f5291eaf36bd23d521787c6b01f1
[ "0BSD" ]
null
null
null
hata/ext/rpc/utils.py
albertopoljak/hata
96d0b3182eb4f5291eaf36bd23d521787c6b01f1
[ "0BSD" ]
null
null
null
hata/ext/rpc/utils.py
albertopoljak/hata
96d0b3182eb4f5291eaf36bd23d521787c6b01f1
[ "0BSD" ]
1
2020-09-17T20:10:15.000Z
2020-09-17T20:10:15.000Z
__all__ = () from sys import platform as PLATFORM from os.path import join as join_paths from os import listdir as list_directory, environ as ENVIRONMENTAL_VARIABLES from tempfile import gettempdir as get_temporary_directory from scarletio import set_docs from .constants import PAYLOAD_KEY_EVENT, EVENT_ERROR, PAYLOA...
27.824742
79
0.614672
__all__ = () from sys import platform as PLATFORM from os.path import join as join_paths from os import listdir as list_directory, environ as ENVIRONMENTAL_VARIABLES from tempfile import gettempdir as get_temporary_directory from scarletio import set_docs from .constants import PAYLOAD_KEY_EVENT, EVENT_ERROR, PAYLOA...
748
0
88
ce80efef261b5805f2ccac2cfca1a8c03c9fd576
31,202
py
Python
cdam_convert_twine.py
jerrytron/twine-story-export
72574627969e8fd79ad246b7532874f223e2c88f
[ "MIT" ]
2
2017-08-26T12:25:31.000Z
2021-06-01T19:35:25.000Z
cdam_convert_twine.py
jerrytron/twine-story-export
72574627969e8fd79ad246b7532874f223e2c88f
[ "MIT" ]
null
null
null
cdam_convert_twine.py
jerrytron/twine-story-export
72574627969e8fd79ad246b7532874f223e2c88f
[ "MIT" ]
null
null
null
#!/usr/bin/env python # encoding=utf8 import os import re import sys import struct import pprint import random import argparse import datetime import tiddlywiki as tiddly import cdam_gen_files as gen import importlib import bitarray importlib.reload(sys) # sys.setdefaultencoding('utf8') VERSION = "1.0" BINARY_VER =...
34.325633
196
0.56538
#!/usr/bin/env python # encoding=utf8 import os import re import sys import struct import pprint import random import argparse import datetime import tiddlywiki as tiddly import cdam_gen_files as gen import importlib import bitarray importlib.reload(sys) # sys.setdefaultencoding('utf8') VERSION = "1.0" BINARY_VER =...
29,872
32
395
757f80125b8c8f5468871f3caa0abaecb1d48b89
3,847
py
Python
autolab_core/primitives.py
SnehalD14/autolab_core
c271f1f84283ab5d368618eb85754a549aeae4a3
[ "Apache-2.0" ]
23
2021-04-02T09:02:04.000Z
2022-03-22T05:31:03.000Z
autolab_core/primitives.py
SnehalD14/autolab_core
c271f1f84283ab5d368618eb85754a549aeae4a3
[ "Apache-2.0" ]
35
2021-04-12T09:41:05.000Z
2022-03-26T13:32:46.000Z
autolab_core/primitives.py
SnehalD14/autolab_core
c271f1f84283ab5d368618eb85754a549aeae4a3
[ "Apache-2.0" ]
16
2021-03-30T11:55:45.000Z
2022-03-30T07:10:59.000Z
""" Common geometric primitives. Author: Jeff Mahler """ import numpy as np class Box(object): """A 2D box or 3D rectangular prism. Attributes ---------- dims : :obj:`numpy.ndarray` of float Maximal extent in x, y, and (optionally) z. width : float Maximal extent in x. height...
26.531034
86
0.570315
""" Common geometric primitives. Author: Jeff Mahler """ import numpy as np class Box(object): """A 2D box or 3D rectangular prism. Attributes ---------- dims : :obj:`numpy.ndarray` of float Maximal extent in x, y, and (optionally) z. width : float Maximal extent in x. height...
352
0
52
f174753cba9198ba54b664cbc54c27b45c67aedf
1,699
py
Python
test/test_events.py
klevio/python-sparkpost
007fb26ff5d046a639a88273265fd0775573a8e2
[ "Apache-2.0" ]
null
null
null
test/test_events.py
klevio/python-sparkpost
007fb26ff5d046a639a88273265fd0775573a8e2
[ "Apache-2.0" ]
null
null
null
test/test_events.py
klevio/python-sparkpost
007fb26ff5d046a639a88273265fd0775573a8e2
[ "Apache-2.0" ]
null
null
null
import pytest import responses from sparkpost import SparkPost from sparkpost.exceptions import SparkPostAPIException @responses.activate @responses.activate @responses.activate @responses.activate
25.742424
75
0.616245
import pytest import responses from sparkpost import SparkPost from sparkpost.exceptions import SparkPostAPIException @responses.activate def test_success_events_message(): responses.add( responses.GET, 'https://api.sparkpost.com/api/v1/events/message', status=200, content_type='a...
1,404
0
88
76276d63683f2ee0d6c3b6270c2b69939a2ed7ab
195
py
Python
src/util.py
sajtizsolt/dumas
4b7e307535bcc93a75784449bc44055d6dd0730b
[ "MIT" ]
3
2021-08-17T08:14:40.000Z
2021-09-05T10:21:11.000Z
src/util.py
sajtizsolt/dumas
4b7e307535bcc93a75784449bc44055d6dd0730b
[ "MIT" ]
null
null
null
src/util.py
sajtizsolt/dumas
4b7e307535bcc93a75784449bc44055d6dd0730b
[ "MIT" ]
null
null
null
import sys
19.5
43
0.74359
import sys def print_exception_and_exit(): print_message_and_exit(sys.exc_info()[1]) def print_message_and_exit(message): print('\n Error:') print(message, file=sys.stderr) sys.exit()
138
0
46
7f796b84e36ede142a0744e292e9d72736a1a043
1,984
py
Python
3.7.0/lldb-3.7.0.src/test/functionalities/plugins/commands/TestPluginCommands.py
androm3da/clang_sles
2ba6d0711546ad681883c42dfb8661b842806695
[ "MIT" ]
3
2016-02-10T14:18:40.000Z
2018-02-05T03:15:56.000Z
3.7.0/lldb-3.7.0.src/test/functionalities/plugins/commands/TestPluginCommands.py
androm3da/clang_sles
2ba6d0711546ad681883c42dfb8661b842806695
[ "MIT" ]
1
2016-02-10T15:40:03.000Z
2016-02-10T15:40:03.000Z
3.7.0/lldb-3.7.0.src/test/functionalities/plugins/commands/TestPluginCommands.py
androm3da/clang_sles
2ba6d0711546ad681883c42dfb8661b842806695
[ "MIT" ]
null
null
null
""" Test that plugins that load commands work correctly. """ import os, time import re import unittest2 import lldb from lldbtest import * import lldbutil if __name__ == '__main__': import atexit lldb.SBDebugger.Initialize() atexit.register(lambda: lldb.SBDebugger.Terminate()) unittest2.main()
29.176471
122
0.673387
""" Test that plugins that load commands work correctly. """ import os, time import re import unittest2 import lldb from lldbtest import * import lldbutil class PluginCommandTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). TestBase.setUp(s...
162
1,485
23
d32e2039cde94b64ddb6c5940d4f74d989163e2b
1,923
py
Python
ros2/code_map_localization/code_map_localization/webcam.py
wzli/CodeMapLocalization
613c021cccbcb4c0f1d42252a9bcb6396b230bea
[ "MIT" ]
2
2020-07-12T16:02:20.000Z
2020-09-06T14:08:43.000Z
ros2/code_map_localization/code_map_localization/webcam.py
wzli/CodeMapLocalization
613c021cccbcb4c0f1d42252a9bcb6396b230bea
[ "MIT" ]
null
null
null
ros2/code_map_localization/code_map_localization/webcam.py
wzli/CodeMapLocalization
613c021cccbcb4c0f1d42252a9bcb6396b230bea
[ "MIT" ]
null
null
null
import rclpy from rclpy.node import Node from geometry_msgs.msg import PoseStamped from code_map_localization_msgs.msg import Localization from .convert_message import convert_to_ros_msgs from codemap.webcam import WebCamLocalization import ctypes import time libcodemap = ctypes.cdll.LoadLibrary('libcodemap.so') i...
36.283019
78
0.702028
import rclpy from rclpy.node import Node from geometry_msgs.msg import PoseStamped from code_map_localization_msgs.msg import Localization from .convert_message import convert_to_ros_msgs from codemap.webcam import WebCamLocalization import ctypes import time libcodemap = ctypes.cdll.LoadLibrary('libcodemap.so') cla...
1,450
17
99
598d337979ee892594fed1712e2db68a0df4498d
2,017
py
Python
snakypy/dotctrl/actions/unlink.py
williamcanin/dotctrl
c3d8f07efce777cf67c478e96a03afbe37c0107e
[ "MIT" ]
6
2021-04-20T23:17:28.000Z
2022-01-29T21:17:00.000Z
snakypy/dotctrl/actions/unlink.py
williamcanin/dotctrl
c3d8f07efce777cf67c478e96a03afbe37c0107e
[ "MIT" ]
5
2021-05-27T11:33:45.000Z
2021-06-28T08:03:00.000Z
snakypy/dotctrl/actions/unlink.py
williamcanin/dotctrl
c3d8f07efce777cf67c478e96a03afbe37c0107e
[ "MIT" ]
1
2021-06-23T05:03:33.000Z
2021-06-23T05:03:33.000Z
from contextlib import suppress from os import remove from os.path import islink, join from sys import exit from snakypy.helpers import FG, printer from snakypy.dotctrl.config.base import Base from snakypy.dotctrl.utils import check_init, join_two, listing_files, rm_garbage_config
34.775862
88
0.530987
from contextlib import suppress from os import remove from os.path import islink, join from sys import exit from snakypy.helpers import FG, printer from snakypy.dotctrl.config.base import Base from snakypy.dotctrl.utils import check_init, join_two, listing_files, rm_garbage_config class UnlinkCommand(Base): def...
50
1,659
23
437e22c8435e0564c4897390e72feb8a3af89a11
1,191
py
Python
arhuaco/sensors/source/log_metrics.py
kuronosec/arhuaco
6eec1691dd03b2e3726ae8c2101588b45d58b6d7
[ "Apache-2.0" ]
1
2020-08-08T02:17:34.000Z
2020-08-08T02:17:34.000Z
arhuaco/sensors/source/log_metrics.py
kuronosec/arhuaco
6eec1691dd03b2e3726ae8c2101588b45d58b6d7
[ "Apache-2.0" ]
null
null
null
arhuaco/sensors/source/log_metrics.py
kuronosec/arhuaco
6eec1691dd03b2e3726ae8c2101588b45d58b6d7
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2019 Andres Gomez Ramirez. # All Rights Reserved. import sys import time import subprocess import logging import os.path import time from arhuaco.sensors.source.source import Source
29.775
68
0.598657
# Copyright (c) 2019 Andres Gomez Ramirez. # All Rights Reserved. import sys import time import subprocess import logging import os.path import time from arhuaco.sensors.source.source import Source class LogMetrics(Source): def __init__(self, dataPath): # Initialize entities super(LogMetrics, se...
883
4
104
c5ccd7c06343a21e1742dea0fdd5652c02cb7257
4,685
py
Python
__init__.py
in4lio/yupp
38d4002d2f07c31940b2be572a1c205d6bf63546
[ "MIT" ]
44
2015-09-15T17:14:05.000Z
2021-08-22T10:35:05.000Z
__init__.py
in4lio/yupp
38d4002d2f07c31940b2be572a1c205d6bf63546
[ "MIT" ]
null
null
null
__init__.py
in4lio/yupp
38d4002d2f07c31940b2be572a1c205d6bf63546
[ "MIT" ]
1
2015-09-22T22:27:28.000Z
2015-09-22T22:27:28.000Z
r""" http://github.com/in4lio/yupp/ __ __ _____ _____ /\ \ /\ \ /\ _ \ _ \ \ \ \_\/ \_\/ \_\ \ \_\ \ \ \__ /\____/\ __/\ __/ \/_/\_\/___/\ \_\/\ \_\/ \/_/ \/_/ \/_/ Python 'yupp' Codec Support """ from __future__ import absolute_import from __future__ import division from __future__ im...
29.099379
85
0.522519
r""" http://github.com/in4lio/yupp/ __ __ _____ _____ /\ \ /\ \ /\ _ \ _ \ \ \ \_\/ \_\/ \_\ \ \_\ \ \ \__ /\____/\ __/\ __/ \/_/\_\/___/\ \_\/\ \_\/ \/_/ \/_/ \/_/ Python 'yupp' Codec Support """ from __future__ import absolute_import from __future__ import division from __future__ im...
2,724
0
110
6f4fefcc76d7ffae881a56693f6ae63af3836838
1,430
py
Python
rtmplib/packet.py
genba2/pinybotbeta-enhanced
564ae7c363ee00ad2ae0e05d74e08e58de3d1d2f
[ "MIT" ]
null
null
null
rtmplib/packet.py
genba2/pinybotbeta-enhanced
564ae7c363ee00ad2ae0e05d74e08e58de3d1d2f
[ "MIT" ]
null
null
null
rtmplib/packet.py
genba2/pinybotbeta-enhanced
564ae7c363ee00ad2ae0e05d74e08e58de3d1d2f
[ "MIT" ]
null
null
null
import time HANDSHAKE_LENGTH = 1536 class Handshake(object): """ A handshake packet. @ivar first: The first 4 bytes of the packet, represented as an unsigned long. @type first: 32bit unsigned int. @ivar second: The second 4 bytes of the packet, represented as an unsigned long. ...
26.481481
78
0.633566
import time HANDSHAKE_LENGTH = 1536 class Handshake(object): """ A handshake packet. @ivar first: The first 4 bytes of the packet, represented as an unsigned long. @type first: 32bit unsigned int. @ivar second: The second 4 bytes of the packet, represented as an unsigned long. ...
178
0
27
433a9cc460319ac1dc362de667e3e4fbb75f3448
1,052
py
Python
kits/python/mediocre/main.py
ppinchuk/Lux-Design-2021
8a04ad48c6749cafc9aca986f14e75daaa31c789
[ "Apache-2.0" ]
null
null
null
kits/python/mediocre/main.py
ppinchuk/Lux-Design-2021
8a04ad48c6749cafc9aca986f14e75daaa31c789
[ "Apache-2.0" ]
null
null
null
kits/python/mediocre/main.py
ppinchuk/Lux-Design-2021
8a04ad48c6749cafc9aca986f14e75daaa31c789
[ "Apache-2.0" ]
null
null
null
from typing import Dict import sys from mediocre_agent import agent if __name__ == "__main__": def read_input(): """ Reads input from stdin """ try: return input() except EOFError as eof: raise SystemExit(eof) step = 0 observation = Observ...
26.974359
54
0.521863
from typing import Dict import sys from mediocre_agent import agent if __name__ == "__main__": def read_input(): """ Reads input from stdin """ try: return input() except EOFError as eof: raise SystemExit(eof) step = 0 class Observation(D...
109
13
57
c0f7fbc32344fbe01dd0f5e9a00e97f8421dc665
650
py
Python
core/agent.py
ihgalis/queue_simulation
a49412417cedbdb1fe7943390a6f805489c33aaa
[ "MIT" ]
null
null
null
core/agent.py
ihgalis/queue_simulation
a49412417cedbdb1fe7943390a6f805489c33aaa
[ "MIT" ]
null
null
null
core/agent.py
ihgalis/queue_simulation
a49412417cedbdb1fe7943390a6f805489c33aaa
[ "MIT" ]
null
null
null
class Agent(object): """ represents the agent who takes the calls from the queue """ def __init__(self, id, free, minutes_till_ready=0): """ constructor just sets the id :param name: string """ self.id = id self.free = free self.minutes_till_rea...
23.214286
60
0.578462
class Agent(object): """ represents the agent who takes the calls from the queue """ def __init__(self, id, free, minutes_till_ready=0): """ constructor just sets the id :param name: string """ self.id = id self.free = free self.minutes_till_rea...
0
0
0
c262beba650fdb2c95f431d3157ae61c710ef51a
324
py
Python
config/wsgi.py
drixselecta/homebytwo
29d26ce9f5586943e3b64c95aa4ce9ea7263bd10
[ "MIT" ]
7
2018-03-10T20:58:59.000Z
2021-08-22T17:18:09.000Z
config/wsgi.py
HomebyTwo/homebytwo
29d26ce9f5586943e3b64c95aa4ce9ea7263bd10
[ "MIT" ]
69
2017-02-01T21:15:43.000Z
2022-02-26T09:33:27.000Z
config/wsgi.py
drixselecta/homebytwo
29d26ce9f5586943e3b64c95aa4ce9ea7263bd10
[ "MIT" ]
null
null
null
from os import environ from pathlib import Path from django.core.wsgi import get_wsgi_application from config import get_project_root_path, import_env_vars import_env_vars(Path(get_project_root_path(), "envdir")) environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.base") application = get_wsgi_applicatio...
24.923077
68
0.833333
from os import environ from pathlib import Path from django.core.wsgi import get_wsgi_application from config import get_project_root_path, import_env_vars import_env_vars(Path(get_project_root_path(), "envdir")) environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.base") application = get_wsgi_applicatio...
0
0
0
592da9c69b2699031221663c32e6918ce48f5588
18
py
Python
acmicpc/15733/15733.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
3
2019-03-09T05:19:23.000Z
2019-04-06T09:26:36.000Z
acmicpc/15733/15733.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
1
2020-02-23T10:38:04.000Z
2020-02-23T10:38:04.000Z
acmicpc/15733/15733.py
love-adela/algorithm
4ccd02173c96f8369962f1fd4e5166a221690fa2
[ "MIT" ]
2
2017-11-20T14:06:06.000Z
2020-07-20T00:17:47.000Z
print("I'm Sexy")
9
17
0.611111
print("I'm Sexy")
0
0
0
1f5d038875e16e0fe3a4bf4b7a051aa57494670c
1,343
py
Python
run_init_images.py
alchem0x2A/paper.ZnVO
b36839ee52867c6892177b6152daa7a5b4fd4109
[ "MIT" ]
null
null
null
run_init_images.py
alchem0x2A/paper.ZnVO
b36839ee52867c6892177b6152daa7a5b4fd4109
[ "MIT" ]
null
null
null
run_init_images.py
alchem0x2A/paper.ZnVO
b36839ee52867c6892177b6152daa7a5b4fd4109
[ "MIT" ]
null
null
null
import sys import os, os.path # May need this for the path issue for gpaw-python sys.path.append(os.path.dirname(os.path.abspath(__file__))) from src.structure import get_structure from src.supercell import make_super, add_adatom from src.neb import neb, calc_img import shutil from ase.parallel import paropen, parprint...
27.979167
81
0.613552
import sys import os, os.path # May need this for the path issue for gpaw-python sys.path.append(os.path.dirname(os.path.abspath(__file__))) from src.structure import get_structure from src.supercell import make_super, add_adatom from src.neb import neb, calc_img import shutil from ase.parallel import paropen, parprint...
791
0
22
9d8dfad20f0cd219f29ef974ce7e0abe3aeec538
959
py
Python
360agent/plugins/gpu.py
vfuse/360agent
947e5ffe6a9e2ef22665f4b2b98c882e698fb201
[ "BSD-3-Clause" ]
88
2017-01-26T14:26:37.000Z
2021-12-31T17:07:03.000Z
360agent/plugins/gpu.py
vfuse/360agent
947e5ffe6a9e2ef22665f4b2b98c882e698fb201
[ "BSD-3-Clause" ]
26
2016-12-27T12:28:16.000Z
2022-02-24T08:11:45.000Z
360agent/plugins/gpu.py
vfuse/360agent
947e5ffe6a9e2ef22665f4b2b98c882e698fb201
[ "BSD-3-Clause" ]
28
2017-04-11T08:40:00.000Z
2021-10-05T06:43:04.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- import plugins import sys if __name__ == '__main__': Plugin().execute()
28.205882
87
0.535975
#!/usr/bin/env python # -*- coding: utf-8 -*- import plugins import sys class Plugin(plugins.BasePlugin): __name__ = 'gpu' def run(self, *unused): ''' expirimental plugin used to collect GPU load from OpenHardWareMonitor (Windows) ''' data = {} if sys.platform == "win3...
0
812
23
c08b1e1fb17569d5d4677af2fce155f334018648
3,794
py
Python
core/argo/core/network/ResEnc.py
szokejokepu/natural-rws
bb1ad4ca3ec714e6bf071d2136593dc853492b68
[ "MIT" ]
null
null
null
core/argo/core/network/ResEnc.py
szokejokepu/natural-rws
bb1ad4ca3ec714e6bf071d2136593dc853492b68
[ "MIT" ]
null
null
null
core/argo/core/network/ResEnc.py
szokejokepu/natural-rws
bb1ad4ca3ec714e6bf071d2136593dc853492b68
[ "MIT" ]
null
null
null
import tensorflow as tf import sonnet as snt from .build_utils import residual_stack, maybe_set_l2_conv_contractive_regularizer from .AbstractResNetLayer import AbstractResNetLayer class ResEnc(AbstractResNetLayer): """ res enc used in VQ """ #TODO remove biases before batch norm, see if it makes any diffe...
39.113402
114
0.495519
import tensorflow as tf import sonnet as snt from .build_utils import residual_stack, maybe_set_l2_conv_contractive_regularizer from .AbstractResNetLayer import AbstractResNetLayer class ResEnc(AbstractResNetLayer): """ res enc used in VQ """ #TODO remove biases before batch norm, see if it makes any diffe...
3,395
0
53
904a75d44462d0b84d10192273337b4d499672b8
1,366
py
Python
xrpl/models/transactions/payment_channel_fund.py
mDuo13/xrpl-py
70f927dcd2dbb8644b3e210b0a8de2a214e71e3d
[ "0BSD" ]
null
null
null
xrpl/models/transactions/payment_channel_fund.py
mDuo13/xrpl-py
70f927dcd2dbb8644b3e210b0a8de2a214e71e3d
[ "0BSD" ]
null
null
null
xrpl/models/transactions/payment_channel_fund.py
mDuo13/xrpl-py
70f927dcd2dbb8644b3e210b0a8de2a214e71e3d
[ "0BSD" ]
null
null
null
""" Represents a PaymentChannelFund transaction on the XRP Ledger. A PaymentChannelFund transaction adds additional XRP to an open payment channel, and optionally updates the expiration time of the channel. Only the source address of the channel can use this transaction. `See PaymentChannelFund <https://xrpl.org/payme...
35.947368
86
0.770864
""" Represents a PaymentChannelFund transaction on the XRP Ledger. A PaymentChannelFund transaction adds additional XRP to an open payment channel, and optionally updates the expiration time of the channel. Only the source address of the channel can use this transaction. `See PaymentChannelFund <https://xrpl.org/payme...
0
0
0
65b2babb163c94ccd29863798b7089a565f8bf1e
13,980
py
Python
nlcpy/ufuncs/operations.py
SX-Aurora/nlcpy
0a53eec8778073bc48b12687b7ce37ab2bf2b7e0
[ "BSD-3-Clause" ]
11
2020-07-31T02:21:55.000Z
2022-03-10T03:12:11.000Z
nlcpy/ufuncs/operations.py
SX-Aurora/nlcpy
0a53eec8778073bc48b12687b7ce37ab2bf2b7e0
[ "BSD-3-Clause" ]
null
null
null
nlcpy/ufuncs/operations.py
SX-Aurora/nlcpy
0a53eec8778073bc48b12687b7ce37ab2bf2b7e0
[ "BSD-3-Clause" ]
null
null
null
# # * The source code in this file is developed independently by NEC Corporation. # # # NLCPy License # # # Copyright (c) 2020-2021 NEC Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following cond...
20
88
0.722318
# # * The source code in this file is developed independently by NEC Corporation. # # # NLCPy License # # # Copyright (c) 2020-2021 NEC Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following cond...
0
0
0