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
1c566f6711f94ebcc790509c9f0dca0ac3dcd7b6
2,178
py
Python
src/cinnamon/common/dev_utils.py
zelros/cinnamon
9fbac281ed3ab2a1ce61fb48d845f3a6e97d1221
[ "MIT" ]
51
2021-11-18T10:52:30.000Z
2022-03-17T10:23:09.000Z
src/cinnamon/common/dev_utils.py
zelros/cinnamon
9fbac281ed3ab2a1ce61fb48d845f3a6e97d1221
[ "MIT" ]
3
2021-11-28T01:09:01.000Z
2022-03-16T10:32:13.000Z
src/cinnamon/common/dev_utils.py
zelros/cinnamon
9fbac281ed3ab2a1ce61fb48d845f3a6e97d1221
[ "MIT" ]
4
2021-11-22T14:11:45.000Z
2022-03-08T09:06:11.000Z
import sys import numpy as np def safe_isinstance(obj, class_path_str): # this function is copy-paste from the code of the SHAP Python library # Copyright (c) 2018 Scott Lundberg """ Acts as a safe version of isinstance without having to explicitly import packages which may not exist in the users...
32.507463
100
0.656566
import sys import numpy as np def safe_isinstance(obj, class_path_str): # this function is copy-paste from the code of the SHAP Python library # Copyright (c) 2018 Scott Lundberg """ Acts as a safe version of isinstance without having to explicitly import packages which may not exist in the users...
165
0
23
5470e7784f571f8520059dbc8ba8a2f138177195
3,451
py
Python
experiment/custom.py
joshrule/list-routines-human-experiments
9ea3a4fc92e4f4e5886897c9981f87a3c1554fa3
[ "MIT" ]
null
null
null
experiment/custom.py
joshrule/list-routines-human-experiments
9ea3a4fc92e4f4e5886897c9981f87a3c1554fa3
[ "MIT" ]
null
null
null
experiment/custom.py
joshrule/list-routines-human-experiments
9ea3a4fc92e4f4e5886897c9981f87a3c1554fa3
[ "MIT" ]
null
null
null
# this file imports custom routes into the experiment server from flask import Blueprint, render_template, request, jsonify, Response, abort, current_app from jinja2 import TemplateNotFound from functools import wraps from sqlalchemy import or_ from psiturk.psiturk_config import PsiturkConfig from psiturk.experiment_...
33.504854
92
0.596349
# this file imports custom routes into the experiment server from flask import Blueprint, render_template, request, jsonify, Response, abort, current_app from jinja2 import TemplateNotFound from functools import wraps from sqlalchemy import or_ from psiturk.psiturk_config import PsiturkConfig from psiturk.experiment_...
1,554
0
88
8e55a8243222f4eea762e2e6dd828ccf7834139f
11,951
py
Python
pyvision/misc/NeuralStyleTransfer/neural_style.py
indiradutta/PyVision
cf74da32a3469ddcce9917ac1f2fcaaeefdeacdf
[ "BSD-3-Clause" ]
31
2020-05-03T07:03:01.000Z
2022-01-29T15:29:22.000Z
pyvision/misc/NeuralStyleTransfer/neural_style.py
indiradutta/PyVision
cf74da32a3469ddcce9917ac1f2fcaaeefdeacdf
[ "BSD-3-Clause" ]
13
2020-05-25T14:23:46.000Z
2021-08-04T10:38:02.000Z
pyvision/misc/NeuralStyleTransfer/neural_style.py
indiradutta/PyVision
cf74da32a3469ddcce9917ac1f2fcaaeefdeacdf
[ "BSD-3-Clause" ]
12
2020-05-24T22:26:59.000Z
2021-08-03T18:30:51.000Z
from __future__ import print_function import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from PIL import Image import matplotlib.pyplot as plt import cv2 import os import time import warnings import torchvision.transforms as transforms import torchvision.models as models ...
36.325228
194
0.581876
from __future__ import print_function import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim from PIL import Image import matplotlib.pyplot as plt import cv2 import os import time import warnings import torchvision.transforms as transforms import torchvision.models as models ...
7,322
3,891
304
cf4230e4fe27a9d2bee940f3b6ff8bd1ac61c716
4,219
py
Python
rdtools/test/energy_from_power_test.py
kperrynrel/rdtools
4ca70e3e2cec85fead10cb8e6ef5e098eeb6f686
[ "MIT" ]
107
2017-08-06T19:46:49.000Z
2022-03-31T09:42:21.000Z
rdtools/test/energy_from_power_test.py
kperrynrel/rdtools
4ca70e3e2cec85fead10cb8e6ef5e098eeb6f686
[ "MIT" ]
247
2017-07-11T18:18:12.000Z
2022-03-22T20:27:03.000Z
rdtools/test/energy_from_power_test.py
kperrynrel/rdtools
4ca70e3e2cec85fead10cb8e6ef5e098eeb6f686
[ "MIT" ]
53
2017-07-11T18:03:11.000Z
2022-03-25T15:25:00.000Z
import pandas as pd import numpy as np from rdtools import energy_from_power import pytest @pytest.fixture @pytest.fixture
36.686957
89
0.711069
import pandas as pd import numpy as np from rdtools import energy_from_power import pytest @pytest.fixture def times(): return pd.date_range(start='20200101 12:00', end='20200101 13:00', freq='15T') @pytest.fixture def power(times): return pd.Series([1.0, 2.0, 3.0, 2.0, 1.0], index=times) def test_energy_...
3,760
0
320
30f60c27fdf86153413afe6545e96be85a9660a6
6,266
py
Python
tests/plugins/test_trainer.py
baajur/transfer-nlp
85515b73165c299b7a9b96d3608bd4e8ee567154
[ "MIT" ]
307
2019-03-26T11:06:41.000Z
2022-02-20T00:34:25.000Z
tests/plugins/test_trainer.py
baajur/transfer-nlp
85515b73165c299b7a9b96d3608bd4e8ee567154
[ "MIT" ]
30
2019-04-14T01:35:48.000Z
2021-04-15T20:11:59.000Z
tests/plugins/test_trainer.py
baajur/transfer-nlp
85515b73165c299b7a9b96d3608bd4e8ee567154
[ "MIT" ]
19
2019-04-13T20:36:51.000Z
2020-07-05T15:19:17.000Z
import copy import unittest from pathlib import Path import ignite import ignite.metrics as metrics import torch.nn as nn import torch.optim as optim from ignite.metrics import Precision, Recall, MetricsLambda from transfer_nlp.plugins.config import ExperimentConfig from transfer_nlp.plugins.regularizers import L1 fr...
34.428571
108
0.633738
import copy import unittest from pathlib import Path import ignite import ignite.metrics as metrics import torch.nn as nn import torch.optim as optim from ignite.metrics import Precision, Recall, MetricsLambda from transfer_nlp.plugins.config import ExperimentConfig from transfer_nlp.plugins.regularizers import L1 fr...
2,597
17
149
e57f9a2cd28feb4907367078aeae3bfbf6954e64
1,981
py
Python
examples/sample_graph_io.py
AtsushiHashimoto/isolated_clique_enumeration
9ff817f57d929b5db07265fe6d85013c13825869
[ "MIT" ]
null
null
null
examples/sample_graph_io.py
AtsushiHashimoto/isolated_clique_enumeration
9ff817f57d929b5db07265fe6d85013c13825869
[ "MIT" ]
null
null
null
examples/sample_graph_io.py
AtsushiHashimoto/isolated_clique_enumeration
9ff817f57d929b5db07265fe6d85013c13825869
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding: utf-8 import sys sys.path.append('../isoclique') import isoclique as ic import networkx as nx import random import time if __name__ == '__main__': E = nx.karate_club_graph().edges() ''' encode_method=None E = [[x,y] for x,y in E] ''' ''' # generate a graph...
25.075949
80
0.604745
#!/usr/bin/env python # coding: utf-8 import sys sys.path.append('../isoclique') import isoclique as ic import networkx as nx import random import time def generate_random_color(): return '#{:X}{:X}{:X}'.format(*[random.randint(16, 255) for _ in range(3)]) def generate_random_color_list(num): colors = [None]...
213
0
45
bb94caafab4b061ddf434e878675f029bd90ddc3
1,351
py
Python
async_sched/client/stop_schedule.py
justengel/async_sched
f980722d51d15025522b2265426b0188ff368418
[ "MIT" ]
1
2020-10-19T13:36:20.000Z
2020-10-19T13:36:20.000Z
async_sched/client/stop_schedule.py
justengel/async_sched
f980722d51d15025522b2265426b0188ff368418
[ "MIT" ]
null
null
null
async_sched/client/stop_schedule.py
justengel/async_sched
f980722d51d15025522b2265426b0188ff368418
[ "MIT" ]
null
null
null
""" module to run with the -m flag python -m async_sched.client.stop_schedule "Task 1" --list_schedules 1 """ import argparse from async_sched.client.client import stop_schedule from async_sched.utils import DEFAULT_HOST, DEFAULT_PORT __all__ = ['NAME', 'get_argparse', 'main'] NAME = 'stop_schedule' if __name...
30.704545
118
0.694301
""" module to run with the -m flag python -m async_sched.client.stop_schedule "Task 1" --list_schedules 1 """ import argparse from async_sched.client.client import stop_schedule from async_sched.utils import DEFAULT_HOST, DEFAULT_PORT __all__ = ['NAME', 'get_argparse', 'main'] NAME = 'stop_schedule' def get_arg...
780
0
46
dcc581968ca295a357b08c7c307d5de440b0fc66
750
py
Python
scripts/create_arcade_structure.py
netor27/codefights-arcade-solutions
69701ab06d45902c79ec9221137f90b75969d8c8
[ "MIT" ]
null
null
null
scripts/create_arcade_structure.py
netor27/codefights-arcade-solutions
69701ab06d45902c79ec9221137f90b75969d8c8
[ "MIT" ]
null
null
null
scripts/create_arcade_structure.py
netor27/codefights-arcade-solutions
69701ab06d45902c79ec9221137f90b75969d8c8
[ "MIT" ]
null
null
null
import os if __name__ == "__main__": main()
27.777778
67
0.604
import os def main(): directory = 'arcade/python/' new_language = 'go' file_extension = '.go' not_implemented_text = '# Not implemented yet!' for root, dirs, files in os.walk(directory): for file in files: #with open(os.path.join(root, file), "r") as auto: print("{} - {}".format(root, ...
677
0
23
9cdbf43c6bb2fc49d0d9c3c7070ac23cecedc8ba
2,515
py
Python
hw4/cost_functions.py
Self-Education-Liavontsi-Brechka/deep-rl
6d984754a800c7c9e95b6afc2625186f0f3949d3
[ "MIT" ]
null
null
null
hw4/cost_functions.py
Self-Education-Liavontsi-Brechka/deep-rl
6d984754a800c7c9e95b6afc2625186f0f3949d3
[ "MIT" ]
null
null
null
hw4/cost_functions.py
Self-Education-Liavontsi-Brechka/deep-rl
6d984754a800c7c9e95b6afc2625186f0f3949d3
[ "MIT" ]
null
null
null
import numpy as np # ======================================================== # # Environment-specific cost functions: # # ======================================================== # # Cost function for a whole trajectory: #
26.197917
98
0.572167
import numpy as np # ======================================================== # # Environment-specific cost functions: # def cheetah_cost_fn(state, action, next_state): if len(state.shape) > 1: heading_penalty_factor = 10 scores = np.zeros((state.shape[0],)) # dont move front shin back ...
2,191
0
92
71641442b48fcb540d58aa7924dc51d87597fe90
638
py
Python
incomplete/rasterizer/rasterizer/examples/e3.py
Python3pkg/500lines
e9c05e45d6eedf36ceef67ec5f817a39a07980fb
[ "CC-BY-3.0" ]
1
2021-03-21T13:12:07.000Z
2021-03-21T13:12:07.000Z
incomplete/rasterizer/rasterizer/examples/e3.py
Python3pkg/500lines
e9c05e45d6eedf36ceef67ec5f817a39a07980fb
[ "CC-BY-3.0" ]
null
null
null
incomplete/rasterizer/rasterizer/examples/e3.py
Python3pkg/500lines
e9c05e45d6eedf36ceef67ec5f817a39a07980fb
[ "CC-BY-3.0" ]
null
null
null
from .. import * import math
31.9
79
0.559561
from .. import * import math def run(image): s = Scene() radius = 0.02 angle = 1 distance = 0.02 colors = [Color.hex("#1f77b4"), Color.hex("#ff7f0e"), Color.hex("#2ca02c"), Color.hex("#d62728"), Color.hex("#9467bd"), Color.hex("#8c564b")] for i in range(500): obj = Circle(...
586
0
23
584d4ec76437a2dae5db22356666e3dee4b7ea7b
140
py
Python
titan/services_pkg/pythondockerimage/dodo_layer_configs.py
mnieber/gen
65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9
[ "MIT" ]
null
null
null
titan/services_pkg/pythondockerimage/dodo_layer_configs.py
mnieber/gen
65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9
[ "MIT" ]
null
null
null
titan/services_pkg/pythondockerimage/dodo_layer_configs.py
mnieber/gen
65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9
[ "MIT" ]
null
null
null
from titan.dodo_pkg.layer import LayerConfig
15.555556
44
0.657143
from titan.dodo_pkg.layer import LayerConfig def get(): def inner(): return dict() return LayerConfig(lambda x: inner())
71
0
23
7cda3433bb42ceaec12a2a6b3207ab866dbb3fda
9,582
py
Python
mindspore/python/mindspore/nn/optim/asgd.py
TangYuan-Liu/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
[ "Apache-2.0" ]
1
2022-03-05T02:59:21.000Z
2022-03-05T02:59:21.000Z
mindspore/python/mindspore/nn/optim/asgd.py
TangYuan-Liu/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
[ "Apache-2.0" ]
null
null
null
mindspore/python/mindspore/nn/optim/asgd.py
TangYuan-Liu/mindspore
fb8fd3338605bb34fa5cea054e535a8b1d753fab
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
48.887755
120
0.639741
# Copyright 2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to...
2,504
0
53
5bad650851f7b0cbf50d0e6ebffea0953ad01118
74
py
Python
Imaobong Tom/Phase 1/Python Basic 1/Day 6/No. 7.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
6
2020-05-23T19:53:25.000Z
2021-05-08T20:21:30.000Z
Imaobong Tom/Phase 1/Python Basic 1/Day 6/No. 7.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
8
2020-05-14T18:53:12.000Z
2020-07-03T00:06:20.000Z
Imaobong Tom/Phase 1/Python Basic 1/Day 6/No. 7.py
CodedLadiesInnovateTech/-python-challenge-solutions
430cd3eb84a2905a286819eef384ee484d8eb9e7
[ "MIT" ]
39
2020-05-10T20:55:02.000Z
2020-09-12T17:40:59.000Z
import multiprocessing print("cpu count is", multiprocessing.cpu_count())
24.666667
50
0.810811
import multiprocessing print("cpu count is", multiprocessing.cpu_count())
0
0
0
479f77bbedf520f3b25d4023b4602b2cea4a5723
1,076
py
Python
src/alexapi/device_platforms/baseplatform.py
jaimeburnap/AlexaPi
72b28a488ecde06559c71062a8966fa9264e7120
[ "MIT" ]
null
null
null
src/alexapi/device_platforms/baseplatform.py
jaimeburnap/AlexaPi
72b28a488ecde06559c71062a8966fa9264e7120
[ "MIT" ]
null
null
null
src/alexapi/device_platforms/baseplatform.py
jaimeburnap/AlexaPi
72b28a488ecde06559c71062a8966fa9264e7120
[ "MIT" ]
null
null
null
from abc import ABCMeta, abstractmethod
19.925926
68
0.634758
from abc import ABCMeta, abstractmethod class BasePlatform: __metaclass__ = ABCMeta _trigger_callback = None def __init__(self, config, platform_name): self._config = config self._pconfig = {} if config['platforms']['common']: self._pconfig = config['platforms']['com...
506
506
23
4549ff92bbc002de34a10cdc05a42eeb0d80f5b0
7,917
py
Python
toolkit/pxt/project.py
AlexGustafsson/ev3-emulator-toolkit
641737660839dc85e2caaab9431518597b8fd263
[ "Unlicense" ]
null
null
null
toolkit/pxt/project.py
AlexGustafsson/ev3-emulator-toolkit
641737660839dc85e2caaab9431518597b8fd263
[ "Unlicense" ]
null
null
null
toolkit/pxt/project.py
AlexGustafsson/ev3-emulator-toolkit
641737660839dc85e2caaab9431518597b8fd263
[ "Unlicense" ]
null
null
null
import json import lzma import struct import logging from typing import Tuple, Iterator, List from lzma import LZMAError, LZMADecompressor from toolkit.uf2.uf2 import UF2 log = logging.getLogger(__name__)
38.432039
128
0.610585
import json import lzma import struct import logging from typing import Tuple, Iterator, List from lzma import LZMAError, LZMADecompressor from toolkit.uf2.uf2 import UF2 log = logging.getLogger(__name__) class Project: def __init__(self, archive: UF2) -> None: self.__archive = archive self.__me...
200
7,486
23
75f2d906b67f4f1b42186950bed3db63b5663f18
1,052
py
Python
thrift/lib/py/util/tests/test_struct_to_dict.py
fakeNetflix/facebook-repo-fbthrift
24f2357142d1da8c89f4cabc6cb144d83749b3c6
[ "Apache-2.0" ]
null
null
null
thrift/lib/py/util/tests/test_struct_to_dict.py
fakeNetflix/facebook-repo-fbthrift
24f2357142d1da8c89f4cabc6cb144d83749b3c6
[ "Apache-2.0" ]
null
null
null
thrift/lib/py/util/tests/test_struct_to_dict.py
fakeNetflix/facebook-repo-fbthrift
24f2357142d1da8c89f4cabc6cb144d83749b3c6
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import unittest from collections import OrderedDict from thrift.test.sample_structs.ttypes import DummyStruct, Struct from thrift.util import struct_to_dict
26.974359
65
0.365019
#!/usr/bin/env python3 import unittest from collections import OrderedDict from thrift.test.sample_structs.ttypes import DummyStruct, Struct from thrift.util import struct_to_dict class TestStructToDict(unittest.TestCase): def test_struct_to_dict(self) -> None: dummy_struct = DummyStruct(1) test_...
800
21
49
c79ffa48d78326240c4713dfec5579970ec4d627
1,822
py
Python
txtable/formatters/base_formatter.py
atomgomba/txtable
324569a09e64dde5e1e1039ad38fa342752b0e02
[ "Unlicense" ]
9
2015-12-22T14:31:52.000Z
2021-01-09T09:46:35.000Z
txtable/formatters/base_formatter.py
atomgomba/txtable
324569a09e64dde5e1e1039ad38fa342752b0e02
[ "Unlicense" ]
1
2017-04-21T23:05:46.000Z
2018-02-05T11:44:43.000Z
txtable/formatters/base_formatter.py
atomgomba/txtable
324569a09e64dde5e1e1039ad38fa342752b0e02
[ "Unlicense" ]
1
2020-07-09T03:14:21.000Z
2020-07-09T03:14:21.000Z
import os from abc import abstractmethod from collections.abc import Sequence from ..options_merger import OptionsMerger
31.413793
104
0.631723
import os from abc import abstractmethod from collections.abc import Sequence from ..options_merger import OptionsMerger class BaseFormatter(metaclass=OptionsMerger): options = { "header_separator": True } width = -1 height = -1 raw_column_widths = [] def __init__(self, **kwargs): ...
1,208
468
23
badc2bba52dbc79fe661f60444073a6165ce4de2
1,346
py
Python
dj_cqrs/management/commands/cqrs_diff_sync.py
maxipavlovic/django-cqrs
d401819b5bca7c2e833d44e8426251fdd4b6b8b9
[ "Apache-2.0" ]
52
2020-05-28T13:25:36.000Z
2022-03-05T12:31:45.000Z
dj_cqrs/management/commands/cqrs_diff_sync.py
maxipavlovic/django-cqrs
d401819b5bca7c2e833d44e8426251fdd4b6b8b9
[ "Apache-2.0" ]
26
2020-07-30T08:17:13.000Z
2022-02-18T12:54:38.000Z
dj_cqrs/management/commands/cqrs_diff_sync.py
maxipavlovic/django-cqrs
d401819b5bca7c2e833d44e8426251fdd4b6b8b9
[ "Apache-2.0" ]
15
2020-05-28T13:25:40.000Z
2022-03-07T04:14:36.000Z
# Copyright © 2021 Ingram Micro Inc. All rights reserved. import sys from dj_cqrs.constants import NO_QUEUE from dj_cqrs.management.commands.cqrs_sync import Command as SyncCommand from dj_cqrs.registries import MasterRegistry from django.core.management.base import BaseCommand, CommandError
29.26087
75
0.605498
# Copyright © 2021 Ingram Micro Inc. All rights reserved. import sys from dj_cqrs.constants import NO_QUEUE from dj_cqrs.management.commands.cqrs_sync import Command as SyncCommand from dj_cqrs.registries import MasterRegistry from django.core.management.base import BaseCommand, CommandError class Command(BaseCom...
845
180
23
d54ace02bb6705a177142d6f2e33dd5df9cf857f
2,448
py
Python
seamseg/utils/snapshot.py
gladcolor/seamseg
9e6c7e2828f32b311a7b0c16b279ac194e8aaf94
[ "BSD-3-Clause" ]
21
2022-01-12T16:47:59.000Z
2022-03-29T07:33:03.000Z
cirtorch/utils/snapshot.py
Tarekbouamer/Image-Retrieval-for-Image-Based-Localization
fcad9af4f558bebb3cbec1d08e49603a452f439d
[ "BSD-3-Clause" ]
6
2022-01-18T01:30:46.000Z
2022-03-21T12:06:06.000Z
cirtorch/utils/snapshot.py
Tarekbouamer/Image-Retrieval-for-Image-Based-Localization
fcad9af4f558bebb3cbec1d08e49603a452f439d
[ "BSD-3-Clause" ]
2
2022-02-11T15:29:28.000Z
2022-03-23T13:48:22.000Z
import torch from .misc import config_to_string def _load_pretraining_dict(model, state_dict): """Load state dictionary from a pre-training snapshot This is an even less strict version of `model.load_state_dict(..., False)`, which also ignores parameters from `state_dict` that don't have the same sha...
32.210526
114
0.640114
import torch from .misc import config_to_string def save_snapshot(file, config, epoch, last_score, best_score, global_step, **kwargs): data = { "config": config_to_string(config), "state_dict": dict(kwargs), "training_meta": { "epoch": epoch, "last_score": last_sco...
1,549
0
69
bea00290a4b5f831b2703c083765a837cb4ccbc6
24,100
py
Python
model/classifier.py
ChristianLin0420/Simulating-Brain-signal-to-control-Hand-Movement-using-GPT2
cb2e441a81f947ba17bb921f4b374953ecf6818c
[ "MIT" ]
null
null
null
model/classifier.py
ChristianLin0420/Simulating-Brain-signal-to-control-Hand-Movement-using-GPT2
cb2e441a81f947ba17bb921f4b374953ecf6818c
[ "MIT" ]
null
null
null
model/classifier.py
ChristianLin0420/Simulating-Brain-signal-to-control-Hand-Movement-using-GPT2
cb2e441a81f947ba17bb921f4b374953ecf6818c
[ "MIT" ]
null
null
null
# import tensorflow as tf # def get_pretrained_classfier(path = '/home/jupyter-ivanljh123/Simulating-Brain-signal-to-control-Hand-Movement-using-GPT2/pretrained/09_0.92'): # #load pretrained model # model = tf.keras.models.load_model(path) # model.trainable = False # return model import mne impor...
41.056218
192
0.567137
# import tensorflow as tf # def get_pretrained_classfier(path = '/home/jupyter-ivanljh123/Simulating-Brain-signal-to-control-Hand-Movement-using-GPT2/pretrained/09_0.92'): # #load pretrained model # model = tf.keras.models.load_model(path) # model.trainable = False # return model import mne impor...
22,635
0
114
8164823363354336da9fbbeab20553cfcb10749b
2,054
py
Python
test_feishu_20210822/ui_test/page/calendar_page.py
ti132520/pytest-vlog
c6688ed2b1c5e10b91057a22e672dffc1cd54d53
[ "CC0-1.0" ]
null
null
null
test_feishu_20210822/ui_test/page/calendar_page.py
ti132520/pytest-vlog
c6688ed2b1c5e10b91057a22e672dffc1cd54d53
[ "CC0-1.0" ]
null
null
null
test_feishu_20210822/ui_test/page/calendar_page.py
ti132520/pytest-vlog
c6688ed2b1c5e10b91057a22e672dffc1cd54d53
[ "CC0-1.0" ]
2
2021-04-12T14:40:22.000Z
2021-08-28T08:47:27.000Z
import random from selenium.webdriver.common.by import By from ui_test.page.base_page import BasePage
47.767442
108
0.685492
import random from selenium.webdriver.common.by import By from ui_test.page.base_page import BasePage class CalendarPage(BasePage): __ADD_CALENDAR_ICON_XPATH = '//*[@id="calendar-tab"]/div[1]/div/div[1]/div[5]/div[1]/div[2]/div/div/div' __CREATE_CALENDAR_XPATH = '//*[text()="新建日历"]' __SUMMARY_XPATH = '//*...
1,259
741
23
67cc539629e1f0c248477d6c7f97e8b4b753227c
718
py
Python
setup.py
poorna-kumar/v-coco
43287b2e1bb987e664a6848f0ff47961beca3bc1
[ "MIT" ]
131
2017-06-17T09:00:54.000Z
2022-03-09T12:49:44.000Z
setup.py
poorna-kumar/v-coco
43287b2e1bb987e664a6848f0ff47961beca3bc1
[ "MIT" ]
10
2018-04-18T07:16:32.000Z
2021-04-05T23:29:14.000Z
setup.py
poorna-kumar/v-coco
43287b2e1bb987e664a6848f0ff47961beca3bc1
[ "MIT" ]
36
2017-07-21T05:14:38.000Z
2022-03-29T11:57:53.000Z
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE_fast_rcnn for details] # Written by Ross Girshick # -------------------------------------------------------- import numpy as np from distutils.core import setup from dist...
24.758621
68
0.587744
# -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE_fast_rcnn for details] # Written by Ross Girshick # -------------------------------------------------------- import numpy as np from distutils.core import setup from dist...
0
0
0
b407f971125e15429df9fe5495b16a574b40dc54
2,923
py
Python
downloaded_kernels/university_rankings/converted_notebooks/kernel_175.py
josepablocam/common-code-extraction
a6978fae73eee8ece6f1db09f2f38cf92f03b3ad
[ "MIT" ]
null
null
null
downloaded_kernels/university_rankings/converted_notebooks/kernel_175.py
josepablocam/common-code-extraction
a6978fae73eee8ece6f1db09f2f38cf92f03b3ad
[ "MIT" ]
null
null
null
downloaded_kernels/university_rankings/converted_notebooks/kernel_175.py
josepablocam/common-code-extraction
a6978fae73eee8ece6f1db09f2f38cf92f03b3ad
[ "MIT" ]
2
2021-07-12T00:48:08.000Z
2021-08-11T12:53:05.000Z
#!/usr/bin/env python # coding: utf-8 # In[ ]: # This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's several helpful packages to load in import numpy as np # linear algebra i...
24.982906
112
0.72973
#!/usr/bin/env python # coding: utf-8 # In[ ]: # This Python 3 environment comes with many helpful analytics libraries installed # It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python # For example, here's several helpful packages to load in import numpy as np # linear algebra i...
0
0
0
f870a0467dc926deab127c8396e403b3c160fd4f
795
py
Python
mopidy_ytmusic/__init__.py
ppepos/mopidy-ytmusic
4d0f2e078740b4426d87d75e68755d58d83e4875
[ "Apache-2.0" ]
null
null
null
mopidy_ytmusic/__init__.py
ppepos/mopidy-ytmusic
4d0f2e078740b4426d87d75e68755d58d83e4875
[ "Apache-2.0" ]
null
null
null
mopidy_ytmusic/__init__.py
ppepos/mopidy-ytmusic
4d0f2e078740b4426d87d75e68755d58d83e4875
[ "Apache-2.0" ]
1
2021-01-06T03:58:40.000Z
2021-01-06T03:58:40.000Z
import logging import pathlib import pkg_resources from mopidy import config, ext __version__ = pkg_resources.get_distribution("Mopidy-YTMusic").version logger = logging.getLogger(__name__)
22.714286
70
0.700629
import logging import pathlib import pkg_resources from mopidy import config, ext __version__ = pkg_resources.get_distribution("Mopidy-YTMusic").version logger = logging.getLogger(__name__) class Extension(ext.Extension): dist_name = "Mopidy-YTMusic" ext_name = "ytmusic" version = __version__ de...
374
203
23
a8bcd1f71c665c65437b5cadce21ebf805f3349e
2,502
py
Python
code/main.py
DataNetworkAnalysis/WhiteBox-Part2
d66c9f646f150caa30aaba89be266f1c2a37d803
[ "MIT" ]
1
2019-12-11T16:44:19.000Z
2019-12-11T16:44:19.000Z
code/main.py
DataNetworkAnalysis/WhiteBox-Part2
d66c9f646f150caa30aaba89be266f1c2a37d803
[ "MIT" ]
null
null
null
code/main.py
DataNetworkAnalysis/WhiteBox-Part2
d66c9f646f150caa30aaba89be266f1c2a37d803
[ "MIT" ]
null
null
null
from loaddata import TitanicData, HousePriceData, CervicalCancerData from models import Classifier, Regressor import json import os import argparse if __name__ == '__main__': # arguments parser = argparse.ArgumentParser() parser.add_argument('--model', type=str, choices=['LR','DT','RF','XGB','DNN'],...
41.016393
158
0.67546
from loaddata import TitanicData, HousePriceData, CervicalCancerData from models import Classifier, Regressor import json import os import argparse def model_train(file_path, dataset, model_type, savedir, **kwargs): # load data # TODO: 아래 나머지 채울것 if dataset=='titanic': titanic = TitanicData(file_p...
1,047
0
23
47306ab415775a9ba960d301b060a9c59d9ab03e
239
py
Python
src/__main__.py
thiagoluiznunes/vehicle-detection
66041e51038481a3a3d12e81d7fed3cac2a798a6
[ "MIT" ]
null
null
null
src/__main__.py
thiagoluiznunes/vehicle-detection
66041e51038481a3a3d12e81d7fed3cac2a798a6
[ "MIT" ]
null
null
null
src/__main__.py
thiagoluiznunes/vehicle-detection
66041e51038481a3a3d12e81d7fed3cac2a798a6
[ "MIT" ]
null
null
null
"Main" import sys from detection.detection import capture_video, run_detection if __name__ == '__main__': VIDEO = sys.argv[1] XML = sys.argv[2] CAP, CAR_CASCADE = capture_video(VIDEO, XML) run_detection(CAP, CAR_CASCADE)
21.727273
60
0.715481
"Main" import sys from detection.detection import capture_video, run_detection if __name__ == '__main__': VIDEO = sys.argv[1] XML = sys.argv[2] CAP, CAR_CASCADE = capture_video(VIDEO, XML) run_detection(CAP, CAR_CASCADE)
0
0
0
bebbdfad7041f13149ba4a0e66c08befd2b8f10a
53
py
Python
DTL/pycis/__init__.py
rocktavious/DevToolsLib
117200c91a3361e04f7c8e07d2ed4999bbcfc469
[ "MIT" ]
1
2015-03-23T18:52:12.000Z
2015-03-23T18:52:12.000Z
DTL/pycis/__init__.py
rocktavious/DevToolsLib
117200c91a3361e04f7c8e07d2ed4999bbcfc469
[ "MIT" ]
null
null
null
DTL/pycis/__init__.py
rocktavious/DevToolsLib
117200c91a3361e04f7c8e07d2ed4999bbcfc469
[ "MIT" ]
2
2017-05-21T12:50:41.000Z
2021-10-17T03:32:45.000Z
'''pyCis - Python Console Intelligence System'''
26.5
48
0.679245
'''pyCis - Python Console Intelligence System'''
0
0
0
db2acab406e33c5fb54bef03413f005ada21a946
1,237
py
Python
VoiceAssistant/wakeword/scripts/split_audio_into_chunks.py
pbazard/Voice-Assistant
c9ccdd311fa689cfd8bb43d5e4e3cb94cb690a29
[ "MIT" ]
null
null
null
VoiceAssistant/wakeword/scripts/split_audio_into_chunks.py
pbazard/Voice-Assistant
c9ccdd311fa689cfd8bb43d5e4e3cb94cb690a29
[ "MIT" ]
null
null
null
VoiceAssistant/wakeword/scripts/split_audio_into_chunks.py
pbazard/Voice-Assistant
c9ccdd311fa689cfd8bb43d5e4e3cb94cb690a29
[ "MIT" ]
null
null
null
import os import argparse from pydub import AudioSegment from pydub.utils import make_chunks if __name__ == "__main__": parser = argparse.ArgumentParser(description="script to split audio files into chunks") parser.add_argument('--seconds', type=int, default=None, help='if set to None...
35.342857
97
0.632175
import os import argparse from pydub import AudioSegment from pydub.utils import make_chunks def main(args): def chunk_and_save(file): audio = AudioSegment.from_file(file) length = args.seconds * 1000 # this is in milliseconds chunks = make_chunks(audio, length) names = [] ...
493
0
23
76c551ea88a31e6d7f1685e828255591af86aeb0
2,954
py
Python
backend/Lib/site-packages/djongo/sql2mongo/functions.py
bharish1997/Djangular
5060cfa8d5c986347d83e35628603c5c265df365
[ "Apache-2.0" ]
1
2021-09-15T01:36:55.000Z
2021-09-15T01:36:55.000Z
onboarding/Lib/site-packages/djongo/sql2mongo/functions.py
USPCodeLabSanca/on.boarding-2021.2---Filtro-de-Receitas
273c0f852c66ecec840dc8db4bd3894ef727beb0
[ "MIT" ]
null
null
null
onboarding/Lib/site-packages/djongo/sql2mongo/functions.py
USPCodeLabSanca/on.boarding-2021.2---Filtro-de-Receitas
273c0f852c66ecec840dc8db4bd3894ef727beb0
[ "MIT" ]
1
2022-03-12T01:09:35.000Z
2022-03-12T01:09:35.000Z
import abc from sqlparse.sql import Token from ..exceptions import SQLDecodeError from .sql_tokens import AliasableToken, SQLToken from . import query as query_module from typing import Union as U
23.444444
66
0.546716
import abc from sqlparse.sql import Token from ..exceptions import SQLDecodeError from .sql_tokens import AliasableToken, SQLToken from . import query as query_module from typing import Union as U class SQLFunc(AliasableToken): @abc.abstractmethod def __init__(self, *args): super().__init__(*args) ...
1,902
599
246
38f5bfad3ea3c080258aa50507cfc6f2bc6204cf
3,061
py
Python
examples/payout_example.py
adyaksaw/xendit-python
47b05f2a6582104a274dc12a172c6421de86febc
[ "MIT" ]
10
2020-10-31T23:34:34.000Z
2022-03-08T19:08:55.000Z
examples/payout_example.py
adyaksaw/xendit-python
47b05f2a6582104a274dc12a172c6421de86febc
[ "MIT" ]
22
2020-07-30T14:25:07.000Z
2022-03-31T03:55:46.000Z
examples/payout_example.py
adyaksaw/xendit-python
47b05f2a6582104a274dc12a172c6421de86febc
[ "MIT" ]
11
2020-07-28T08:09:40.000Z
2022-03-18T00:14:02.000Z
import time from print_running_function import print_running_function # Hackish method to import from another directory # Useful while xendit-python isn't released yet to the public import importlib.machinery loader = importlib.machinery.SourceFileLoader("xendit", "../xendit/__init__.py") xendit = loader.lo...
30.61
81
0.595557
import time from print_running_function import print_running_function # Hackish method to import from another directory # Useful while xendit-python isn't released yet to the public import importlib.machinery loader = importlib.machinery.SourceFileLoader("xendit", "../xendit/__init__.py") xendit = loader.lo...
2,314
274
122
b7b18e06985b828d1f5a5fab650aa921dbe618a6
2,317
py
Python
src/Testing/ZopeTestCase/layer.py
hitotsunorb1/Zope
6beac6385e1a302903889561385013874ef94cb1
[ "ZPL-2.1" ]
null
null
null
src/Testing/ZopeTestCase/layer.py
hitotsunorb1/Zope
6beac6385e1a302903889561385013874ef94cb1
[ "ZPL-2.1" ]
1
2020-11-11T07:11:31.000Z
2020-11-11T07:11:31.000Z
src/Testing/ZopeTestCase/layer.py
hitotsunorb1/Zope
6beac6385e1a302903889561385013874ef94cb1
[ "ZPL-2.1" ]
null
null
null
############################################################################## # # Copyright (c) 2007 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
27.915663
78
0.596461
############################################################################## # # Copyright (c) 2007 Zope Foundation and Contributors. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFTWARE IS PROVIDED "AS I...
353
0
52
1bded35fd5a778a23250e91822980c606179d908
3,075
py
Python
p4_symbolic/bmv2/test_sdiff.py
googleinterns/p4-symbolic
8c5ea48ecd9f82313a1c1137beac7c5b885a3a66
[ "Apache-2.0" ]
4
2020-07-05T14:48:27.000Z
2020-11-17T06:21:38.000Z
p4_symbolic/bmv2/test_sdiff.py
googleinterns/p4-symbolic
8c5ea48ecd9f82313a1c1137beac7c5b885a3a66
[ "Apache-2.0" ]
35
2020-06-09T21:39:00.000Z
2020-08-14T23:11:49.000Z
p4_symbolic/bmv2/test_sdiff.py
googleinterns/p4-symbolic-test-gen
8c5ea48ecd9f82313a1c1137beac7c5b885a3a66
[ "Apache-2.0" ]
1
2021-06-28T16:19:10.000Z
2021-06-28T16:19:10.000Z
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
33.791209
77
0.665691
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
0
0
0
e0d30687357b3d24efe8b36641a97e71e73bfd75
1,094
py
Python
LeetCode/941 Valid Mountain Array.py
gesuwen/Algorithms
0c9cf4412d76f8b69ef68cc80636323f5a0e5786
[ "MIT" ]
null
null
null
LeetCode/941 Valid Mountain Array.py
gesuwen/Algorithms
0c9cf4412d76f8b69ef68cc80636323f5a0e5786
[ "MIT" ]
null
null
null
LeetCode/941 Valid Mountain Array.py
gesuwen/Algorithms
0c9cf4412d76f8b69ef68cc80636323f5a0e5786
[ "MIT" ]
null
null
null
# Array # Given an array A of integers, return true if and only if it is a valid mountain array. # # Recall that A is a mountain array if and only if: # # A.length >= 3 # There exists some i with 0 < i < A.length - 1 such that: # A[0] < A[1] < ... A[i-1] < A[i] # A[i] > A[i+1] > ... > A[B.length - 1] # # # Example 1: ...
19.890909
88
0.447898
# Array # Given an array A of integers, return true if and only if it is a valid mountain array. # # Recall that A is a mountain array if and only if: # # A.length >= 3 # There exists some i with 0 < i < A.length - 1 such that: # A[0] < A[1] < ... A[i-1] < A[i] # A[i] > A[i+1] > ... > A[B.length - 1] # # # Example 1: ...
0
561
23
d1e501c49ee52212b8f59a9a2a45755ca8874896
1,408
py
Python
fluentcheck/assertions_check/uuids.py
jstoebel/fluentcheck
9258dab4f46776b5df50528f5028ce2d11a443c5
[ "MIT" ]
83
2018-05-31T13:21:06.000Z
2022-03-20T14:27:49.000Z
fluentcheck/assertions_check/uuids.py
jstoebel/fluentcheck
9258dab4f46776b5df50528f5028ce2d11a443c5
[ "MIT" ]
20
2019-02-10T15:07:44.000Z
2021-04-02T13:18:52.000Z
fluentcheck/assertions_check/uuids.py
jstoebel/fluentcheck
9258dab4f46776b5df50528f5028ce2d11a443c5
[ "MIT" ]
11
2019-02-16T21:33:11.000Z
2022-03-25T03:39:52.000Z
from uuid import UUID from ..exceptions import CheckError
35.2
98
0.674716
from uuid import UUID from ..exceptions import CheckError def is_uuid1(check_obj): try: assert (UUID(check_obj.value).version == 1) return check_obj except (AssertionError, AttributeError, ValueError) as e: raise CheckError('{} is not a valid uuid1 exception: {}'.format(check_obj._val...
1,253
0
92
226bcb639bcea4f89452d8260ed27685fd41e137
759
py
Python
song_wave_mfcc.py
flpxzglgh/Audio_Recognition
8c6f8faac769cf82edf37215a8393b3ae7ae2484
[ "Apache-2.0" ]
null
null
null
song_wave_mfcc.py
flpxzglgh/Audio_Recognition
8c6f8faac769cf82edf37215a8393b3ae7ae2484
[ "Apache-2.0" ]
null
null
null
song_wave_mfcc.py
flpxzglgh/Audio_Recognition
8c6f8faac769cf82edf37215a8393b3ae7ae2484
[ "Apache-2.0" ]
null
null
null
import numpy as np import librosa, librosa.display import matplotlib.pyplot as plt FIG_SIZE = (15,10) file = "/home/jack/Documents/python/PycharmProjects/untitled2/show the wav/dog.wav" signal, sample_rate = librosa.load(file, sr=22050) plt.figure(figsize=FIG_SIZE) librosa.display.waveplot(signal, sample_rate, alph...
23.71875
96
0.766798
import numpy as np import librosa, librosa.display import matplotlib.pyplot as plt FIG_SIZE = (15,10) file = "/home/jack/Documents/python/PycharmProjects/untitled2/show the wav/dog.wav" signal, sample_rate = librosa.load(file, sr=22050) plt.figure(figsize=FIG_SIZE) librosa.display.waveplot(signal, sample_rate, alph...
0
0
0
57d40dbc484ce0db4aa72866ecf2dcba902c500d
5,999
py
Python
lexa/train.py
zplizzi/lexa
880587889d77c7d3906766b765017f2d552d3942
[ "MIT" ]
44
2021-07-23T17:51:08.000Z
2022-03-28T14:36:36.000Z
lexa/train.py
ricklentz/lexa
bf112056e0d7f9e044dce053ddc757600cd99d2e
[ "MIT" ]
2
2021-12-15T15:30:45.000Z
2022-02-25T06:43:14.000Z
lexa/train.py
ricklentz/lexa
bf112056e0d7f9e044dce053ddc757600cd99d2e
[ "MIT" ]
5
2021-11-12T15:26:17.000Z
2022-03-23T14:43:56.000Z
import os import functools import tools import tensorflow as tf import numpy as np import pickle import pathlib import off_policy from dreamer import Dreamer, setup_dreamer, create_envs, count_steps, make_dataset, parse_dreamer_args if __name__ == '__main__': args, remaining = parse_dreamer_args() main(args.log...
37.968354
117
0.689448
import os import functools import tools import tensorflow as tf import numpy as np import pickle import pathlib import off_policy from dreamer import Dreamer, setup_dreamer, create_envs, count_steps, make_dataset, parse_dreamer_args class GCDreamer(Dreamer): def __init__(self, config, logger, dataset): if confi...
4,594
1,000
69
dd753fb20cd8313d42bfbb3e511710e61007af76
1,403
py
Python
demo.py
longphungtuan94/Vietnamese-Text-to-Speech
5c33f9fb76f0595894aeeba72de87cf1c910484a
[ "MIT" ]
10
2021-07-23T04:32:29.000Z
2021-07-23T09:21:30.000Z
demo.py
longphungtuan94/Vietnamese-Text-to-Speech
5c33f9fb76f0595894aeeba72de87cf1c910484a
[ "MIT" ]
null
null
null
demo.py
longphungtuan94/Vietnamese-Text-to-Speech
5c33f9fb76f0595894aeeba72de87cf1c910484a
[ "MIT" ]
null
null
null
from notebook_utils import synthesize from utils import hparams as hp import utils.text.cleaners as cleaners from scipy.io import wavfile import numpy as np import string import argparse SAMPLE_RATE = 22050 parser = argparse.ArgumentParser() parser.add_argument( '-t','--text', help='Input text', default='Đó ...
33.404762
148
0.776907
from notebook_utils import synthesize from utils import hparams as hp import utils.text.cleaners as cleaners from scipy.io import wavfile import numpy as np import string import argparse SAMPLE_RATE = 22050 parser = argparse.ArgumentParser() parser.add_argument( '-t','--text', help='Input text', default='Đó ...
0
0
0
7c7496a8a6a1bfcefbfa135e9975141cf430e090
97,316
py
Python
Python-Django-2016/Django/Clase1/Otras-cosas/Secretos-Ocultos-en-Shoppy/secretos_ocultos_shoppy.py
juandc/platzi-courses
27443bdb40a35100b9c839e2d598bc3cf4e43032
[ "MIT" ]
3
2017-09-14T23:14:21.000Z
2018-03-22T20:07:37.000Z
Python-Django-2016/Django/Clase1/Otras-cosas/Secretos-Ocultos-en-Shoppy/secretos_ocultos_shoppy.py
juandc/platzi-courses
27443bdb40a35100b9c839e2d598bc3cf4e43032
[ "MIT" ]
null
null
null
Python-Django-2016/Django/Clase1/Otras-cosas/Secretos-Ocultos-en-Shoppy/secretos_ocultos_shoppy.py
juandc/platzi-courses
27443bdb40a35100b9c839e2d598bc3cf4e43032
[ "MIT" ]
null
null
null
5351 4c69 7465 2066 6f72 6d61 7420 3300 0400 0101 0040 2020 0000 003b 0000 0000 0000 0000 0000 0000 0000 003b 0000 0001 0000 0000 0000 0000 0000 0001 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0500 0000 0603 e200 0000 0026 03fb 03f1 03ec 03f6 03e7 03e2 0000 0000 ...
39.965503
39
0.799992
5351 4c69 7465 2066 6f72 6d61 7420 3300 0400 0101 0040 2020 0000 003b 0000 0000 0000 0000 0000 0000 0000 003b 0000 0001 0000 0000 0000 0000 0000 0001 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0500 0000 0603 e200 0000 0026 03fb 03f1 03ec 03f6 03e7 03e2 0000 0000 ...
0
0
0
103b3b6fa26ddafed59d61877346426128a9cccd
98
py
Python
user_manager/apps.py
MOOCworkbench/MOOCworkbench
c478dd4f185c50e0a48319e2b30d418533c32a34
[ "MIT" ]
null
null
null
user_manager/apps.py
MOOCworkbench/MOOCworkbench
c478dd4f185c50e0a48319e2b30d418533c32a34
[ "MIT" ]
1
2017-07-09T17:38:21.000Z
2017-07-09T17:38:22.000Z
user_manager/apps.py
MOOCworkbench/MOOCworkbench
c478dd4f185c50e0a48319e2b30d418533c32a34
[ "MIT" ]
null
null
null
from django.apps import AppConfig
16.333333
35
0.77551
from django.apps import AppConfig class UsermanagerConfig(AppConfig): name = 'user_manager'
0
40
23
d44507b5881867a40ebc7d9814b02d79cb0ac398
1,478
py
Python
evt_utils.py
PramuPerera/OCDA
05e6872e74c0de83be45fb4002c103cb85586b4a
[ "MIT" ]
2
2020-11-27T05:15:14.000Z
2021-02-25T08:29:11.000Z
evt_utils.py
PramuPerera/OCDA
05e6872e74c0de83be45fb4002c103cb85586b4a
[ "MIT" ]
null
null
null
evt_utils.py
PramuPerera/OCDA
05e6872e74c0de83be45fb4002c103cb85586b4a
[ "MIT" ]
null
null
null
import numpy as np import sys
22.059701
62
0.731394
import numpy as np import sys class Model: def __init__(self, flag, evt_init): self.flag = flag self.weibull_model = evt_init def evt_train(data_raw, tail_size, max_min_flag): model = Model(max_min_flag, libmr.MR()) if(model.flag=='reverse_weibull'): data_scores = data_raw elif(model.flag=='weibull'): ...
1,340
-9
115
655bfaa0580d1348ce0b1d12d16a88e2e3cd8b82
872
py
Python
cpecat/importer/mongodb.py
dtechspace/ics-asset-management
6e81f41e1a70f17139a03d1c6ddcbe281082048f
[ "Apache-2.0" ]
6
2019-04-03T16:44:53.000Z
2021-04-23T00:05:29.000Z
cpecat/importer/mongodb.py
dtechspace/ics-asset-management
6e81f41e1a70f17139a03d1c6ddcbe281082048f
[ "Apache-2.0" ]
null
null
null
cpecat/importer/mongodb.py
dtechspace/ics-asset-management
6e81f41e1a70f17139a03d1c6ddcbe281082048f
[ "Apache-2.0" ]
1
2019-08-03T01:13:16.000Z
2019-08-03T01:13:16.000Z
# Copyright © 2018, D-Tech, LLC, All Rights Reserved. # Disclaimer: This software is provided "AS IS" without warrantees. # D-Tech, LLC has no oblication to provide any maintainence, update # or support for this software. Under no circumstances shall D-Tech, # LLC be liable to any parties for direct, indirect, s...
36.333333
74
0.71445
# Copyright © 2018, D-Tech, LLC, All Rights Reserved. # Disclaimer: This software is provided "AS IS" without warrantees. # D-Tech, LLC has no oblication to provide any maintainence, update # or support for this software. Under no circumstances shall D-Tech, # LLC be liable to any parties for direct, indirect, s...
0
0
0
4eeb67d3fb0e092dadda64c2b4bb57e0787c936e
264
py
Python
auto_ripper_daemon/wmi_drives.py
puujam/auto_ripper_gui
bc181d15c7f1ee285b160ac2a71722b313c514f1
[ "MIT" ]
null
null
null
auto_ripper_daemon/wmi_drives.py
puujam/auto_ripper_gui
bc181d15c7f1ee285b160ac2a71722b313c514f1
[ "MIT" ]
null
null
null
auto_ripper_daemon/wmi_drives.py
puujam/auto_ripper_gui
bc181d15c7f1ee285b160ac2a71722b313c514f1
[ "MIT" ]
null
null
null
import wmi _wmi_handle = None
16.5
40
0.700758
import wmi _wmi_handle = None def get_wmi_handle(): global _wmi_handle if not _wmi_handle: _wmi_handle = wmi.WMI() return _wmi_handle def list_all_cd_drives(): wmi_handle = get_wmi_handle() return wmi_handle.Win32_CDRomDrive()
188
0
46
ed86567615814ed6b1df203b44fe9a5a11ecc9b9
35,212
py
Python
ludwig/hyperopt/execution.py
louixs/ludwig
20d8f9c48123d3b71e38615fbc365cf8d392f971
[ "Apache-2.0" ]
null
null
null
ludwig/hyperopt/execution.py
louixs/ludwig
20d8f9c48123d3b71e38615fbc365cf8d392f971
[ "Apache-2.0" ]
null
null
null
ludwig/hyperopt/execution.py
louixs/ludwig
20d8f9c48123d3b71e38615fbc365cf8d392f971
[ "Apache-2.0" ]
null
null
null
import datetime import os import uuid import copy import json import shutil import threading import time from abc import ABC, abstractmethod from pathlib import Path from typing import Union, Optional, Tuple from ludwig.api import LudwigModel from ludwig.backend import RAY, initialize_backend from ludwig.callbacks imp...
39.387025
134
0.61445
import datetime import os import uuid import copy import json import shutil import threading import time from abc import ABC, abstractmethod from pathlib import Path from typing import Union, Optional, Tuple from ludwig.api import LudwigModel from ludwig.backend import RAY, initialize_backend from ludwig.callbacks imp...
32,232
965
336
f0bba06cfab2c3f5fcca39974e0df5ac721b92b1
3,890
py
Python
panorama.py
guilhermetiaki/panorama
cb54ab55edc83c5de90c1dc05366b9da9c53f429
[ "MIT" ]
null
null
null
panorama.py
guilhermetiaki/panorama
cb54ab55edc83c5de90c1dc05366b9da9c53f429
[ "MIT" ]
null
null
null
panorama.py
guilhermetiaki/panorama
cb54ab55edc83c5de90c1dc05366b9da9c53f429
[ "MIT" ]
null
null
null
import sys import cv2 import numpy as np if __name__=='__main__': # Create SIFT object sift = cv2.xfeatures2d.SIFT_create() # Create Flann Matcher Object flann = cv2.FlannBasedMatcher(dict(algorithm = 0, trees = 5), dict(checks = 50)) # Gets list of image files from arguments files = sys.argv...
46.86747
94
0.61491
import sys import cv2 import numpy as np if __name__=='__main__': # Create SIFT object sift = cv2.xfeatures2d.SIFT_create() # Create Flann Matcher Object flann = cv2.FlannBasedMatcher(dict(algorithm = 0, trees = 5), dict(checks = 50)) # Gets list of image files from arguments files = sys.argv...
0
0
0
53796539e9f974240a760125bd32430c5dfe371e
1,916
py
Python
newton/newton/urls.py
onap/multicloud-openstack
d0e41eb1b1a1cb79365836da728908ed26253db4
[ "CC-BY-4.0" ]
4
2018-10-24T15:20:14.000Z
2020-03-09T06:29:11.000Z
newton/newton/urls.py
onap/multicloud-openstack
d0e41eb1b1a1cb79365836da728908ed26253db4
[ "CC-BY-4.0" ]
null
null
null
newton/newton/urls.py
onap/multicloud-openstack
d0e41eb1b1a1cb79365836da728908ed26253db4
[ "CC-BY-4.0" ]
2
2020-08-03T13:45:44.000Z
2021-09-15T21:10:26.000Z
# Copyright (c) 2017-2018 Wind River Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
41.652174
81
0.675887
# Copyright (c) 2017-2018 Wind River Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
0
0
0
914aa18e70796937dd0f34fdcc92a6c1474148d1
3,159
py
Python
tools/deploy_tls_secret.py
ravidbro/assisted-service
846f2dc89d10b74ed95cb99a6a8888902fb11497
[ "Apache-2.0" ]
68
2020-08-04T16:30:21.000Z
2022-03-18T02:44:58.000Z
tools/deploy_tls_secret.py
ravidbro/assisted-service
846f2dc89d10b74ed95cb99a6a8888902fb11497
[ "Apache-2.0" ]
3,554
2020-07-12T17:27:13.000Z
2022-03-31T21:54:04.000Z
tools/deploy_tls_secret.py
ravidbro/assisted-service
846f2dc89d10b74ed95cb99a6a8888902fb11497
[ "Apache-2.0" ]
129
2020-07-06T11:43:32.000Z
2022-03-29T01:29:30.000Z
import argparse import os import textwrap import deployment_options import utils if __name__ == "__main__": main()
40.5
115
0.606838
import argparse import os import textwrap import deployment_options import utils def get_ca(output_dir, force_replace=False): ca_subject = "/CN=Assisted Installer" ca_expiration = 365 ca_csr_path = os.path.join(output_dir, "ca.csr") ca_key_path = os.path.join(output_dir, "ca-key.pem") if force_...
2,965
0
69
858136d0e81d8a35cd6f59dfb49158c21227411c
125
py
Python
tests/__init__.py
glentner/taskflow
635114ff4b8521333c6857b410289680fb0d28a1
[ "Apache-2.0" ]
null
null
null
tests/__init__.py
glentner/taskflow
635114ff4b8521333c6857b410289680fb0d28a1
[ "Apache-2.0" ]
null
null
null
tests/__init__.py
glentner/taskflow
635114ff4b8521333c6857b410289680fb0d28a1
[ "Apache-2.0" ]
null
null
null
# SPDX-FileCopyrightText: 2022 Geoffrey Lentner # SPDX-License-Identifier: Apache-2.0 """Automated tests for HyperShell."""
25
47
0.768
# SPDX-FileCopyrightText: 2022 Geoffrey Lentner # SPDX-License-Identifier: Apache-2.0 """Automated tests for HyperShell."""
0
0
0
6e0d48f6e4cf7aa9e19a92ed2d50365a9ebfba4e
2,835
py
Python
billing/management/commands/create_invoices.py
jayvdb/django-customer-billing
8d8b3b111a357b4fae0c0c249c1fc2cfdced3b27
[ "MIT" ]
13
2017-11-18T14:31:27.000Z
2021-11-04T08:08:33.000Z
billing/management/commands/create_invoices.py
jayvdb/django-customer-billing
8d8b3b111a357b4fae0c0c249c1fc2cfdced3b27
[ "MIT" ]
3
2020-09-16T04:03:18.000Z
2020-10-05T07:17:57.000Z
billing/management/commands/create_invoices.py
jayvdb/django-customer-billing
8d8b3b111a357b4fae0c0c249c1fc2cfdced3b27
[ "MIT" ]
5
2019-09-10T22:24:52.000Z
2021-10-06T10:43:55.000Z
import logging from datetime import timedelta, date import progressbar import structlog from collections import defaultdict from django.core.management.base import BaseCommand from django.utils import timezone, dateparse from ...actions.accounts import create_invoices from ...models import Account logger = structl...
35
110
0.614815
import logging from datetime import timedelta, date import progressbar import structlog from collections import defaultdict from django.core.management.base import BaseCommand from django.utils import timezone, dateparse from ...actions.accounts import create_invoices from ...models import Account def set_debug(log...
2,228
200
69
1974437be38fa8eb48c375389aa374a16dd27ff4
16,355
py
Python
code/imagenet.py
modestyachts/ImageNetV2
a4cda818c419f67cf5c5c12987580bd8ad525876
[ "MIT" ]
173
2019-02-15T19:29:25.000Z
2022-03-25T19:01:13.000Z
code/imagenet.py
modestyachts/ImageNetV2
a4cda818c419f67cf5c5c12987580bd8ad525876
[ "MIT" ]
8
2019-03-11T01:35:48.000Z
2021-11-18T09:46:01.000Z
code/imagenet.py
modestyachts/ImageNetV2
a4cda818c419f67cf5c5c12987580bd8ad525876
[ "MIT" ]
21
2019-03-06T02:25:29.000Z
2022-03-16T09:30:29.000Z
from collections import namedtuple import concurrent import io import json import os import pathlib import pickle import tarfile import boto3 import imageio import numpy as np import utils ClassInfo = namedtuple('ClassInfo', ['wnid', 'cid', 'synset', 'wikipedia_pages', 'gloss'])
43.49734
115
0.607887
from collections import namedtuple import concurrent import io import json import os import pathlib import pickle import tarfile import boto3 import imageio import numpy as np import utils ClassInfo = namedtuple('ClassInfo', ['wnid', 'cid', 'synset', 'wikipedia_pages', 'gloss']) class UnknownDataPartError(Excepti...
15,241
24
803
7818643cff5c96139c9fe4369630b053cc07f79b
983
py
Python
captioning_model.py
nishprabhu/image_captioning
4bf84c9f37b2d35a071cb28b62ad08081ebe0a29
[ "MIT" ]
null
null
null
captioning_model.py
nishprabhu/image_captioning
4bf84c9f37b2d35a071cb28b62ad08081ebe0a29
[ "MIT" ]
null
null
null
captioning_model.py
nishprabhu/image_captioning
4bf84c9f37b2d35a071cb28b62ad08081ebe0a29
[ "MIT" ]
null
null
null
""" Contains the Encoder-Decoder model for image captioning """ import torch.nn as nn from cnn import CNN from rnn import RNN from transformer import Transformer class CaptioningModel(nn.Module): """ Image captioning model """ def forward(self, images, captions, predict=False): """ Forward pass of ...
30.71875
86
0.666328
""" Contains the Encoder-Decoder model for image captioning """ import torch.nn as nn from cnn import CNN from rnn import RNN from transformer import Transformer class CaptioningModel(nn.Module): """ Image captioning model """ def __init__( self, encoder_output_dim, decoder_type, vocab_size, embedd...
484
0
27
fdb664142db713f5a0b10cb56dda1aca470117c1
6,323
py
Python
parser-spark/dataset_us_filter_and_score_calc.py
whitemike889/HappiTweet
601d19d68808c1987e531ce4c4f0b12fd2063e6e
[ "Apache-2.0" ]
1
2016-11-09T15:24:40.000Z
2016-11-09T15:24:40.000Z
parser-spark/dataset_us_filter_and_score_calc.py
whitemike889/HappiTweet
601d19d68808c1987e531ce4c4f0b12fd2063e6e
[ "Apache-2.0" ]
null
null
null
parser-spark/dataset_us_filter_and_score_calc.py
whitemike889/HappiTweet
601d19d68808c1987e531ce4c4f0b12fd2063e6e
[ "Apache-2.0" ]
1
2019-02-08T12:45:47.000Z
2019-02-08T12:45:47.000Z
from pyspark import SparkContext import json import gzip import marshal ''' Configuration Parameters ''' tweetsFile = "/tmp/ist169518/out_*/part*" outFileProcessedDataset = "/tmp/ist169518/filtered-scored" # Emotional Lexicons # csv files with first column with the word, and second with the score separated with comm...
43.013605
564
0.636565
from pyspark import SparkContext import json import gzip import marshal ''' Configuration Parameters ''' tweetsFile = "/tmp/ist169518/out_*/part*" outFileProcessedDataset = "/tmp/ist169518/filtered-scored" # Emotional Lexicons # csv files with first column with the word, and second with the score separated with comm...
3,016
0
159
979ada8c50cccc64907ed8b9f0e0ddeefde7b80e
13,560
py
Python
ServerComponent/venv/Lib/site-packages/pythonrv/rv.py
CDU55/FakeNews
707bd48dd78851081d98ad21bbdadfc2720bd644
[ "MIT" ]
2
2019-01-06T13:31:10.000Z
2020-12-11T04:05:44.000Z
pythonrv/rv.py
tgwizard/pythonrv
e50198cc6d48d8c6c6badbe8a1cd46eb0182839a
[ "MIT" ]
37
2020-10-20T08:30:53.000Z
2020-12-22T13:15:45.000Z
pythonrv/rv.py
tgwizard/pythonrv
e50198cc6d48d8c6c6badbe8a1cd46eb0182839a
[ "MIT" ]
1
2020-10-19T14:55:23.000Z
2020-10-19T14:55:23.000Z
# -*- coding: utf-8 -*- import logging from . import instrumentation from .dotdict import dotdict ################################################################## ### defaults and constants ################################################################## PRE = 'pre' POST = 'post' DEFAULT_MAX_HISTORY_SIZE = 2 I...
31.830986
118
0.60236
# -*- coding: utf-8 -*- import logging from . import instrumentation from .dotdict import dotdict ################################################################## ### defaults and constants ################################################################## PRE = 'pre' POST = 'post' DEFAULT_MAX_HISTORY_SIZE = 2 I...
10,160
79
1,450
452e279a6193abc88461babe810211a3f8d434ff
1,661
py
Python
main.py
kirantambe/koinex-status-ticker
487028a00605912e9fee97f4b29f260a2ab4f66f
[ "MIT" ]
null
null
null
main.py
kirantambe/koinex-status-ticker
487028a00605912e9fee97f4b29f260a2ab4f66f
[ "MIT" ]
1
2021-06-01T21:56:55.000Z
2021-06-01T21:56:55.000Z
main.py
kirantambe/koinex-status-ticker
487028a00605912e9fee97f4b29f260a2ab4f66f
[ "MIT" ]
1
2018-01-16T03:51:09.000Z
2018-01-16T03:51:09.000Z
import rumps import requests import json API_URL = 'https://koinex.in/api/ticker' UPDATE_INTERVAL = 60 CURRENCIES = { 'Bitcoin': 'BTC', 'Ethereum': 'ETH', 'Ripple': 'XRP', 'Litecoin': 'LTC', 'Bitcoin Cash': 'BCH', } if __name__ == "__main__": KoinexStatusBarApp().run()
26.790323
77
0.587598
import rumps import requests import json API_URL = 'https://koinex.in/api/ticker' UPDATE_INTERVAL = 60 CURRENCIES = { 'Bitcoin': 'BTC', 'Ethereum': 'ETH', 'Ripple': 'XRP', 'Litecoin': 'LTC', 'Bitcoin Cash': 'BCH', } class KoinexStatusBarApp(rumps.App): def __init__(self): super(Koin...
1,210
129
23
28ffd69e7ef8dbd17b98a27cd9ae9af36d7611c5
345
py
Python
materials/migrations/0079_remove_property_require_input_files.py
mgovoni-devel/MatD3
5b68d147f886bce427f92bb560159e62cec2d4e7
[ "BSD-2-Clause-FreeBSD" ]
7
2019-09-14T07:24:09.000Z
2021-06-15T16:15:05.000Z
materials/migrations/0079_remove_property_require_input_files.py
mgovoni-devel/MatD3
5b68d147f886bce427f92bb560159e62cec2d4e7
[ "BSD-2-Clause-FreeBSD" ]
14
2019-12-05T01:49:19.000Z
2021-06-23T18:34:51.000Z
materials/migrations/0079_remove_property_require_input_files.py
mgovoni-devel/MatD3
5b68d147f886bce427f92bb560159e62cec2d4e7
[ "BSD-2-Clause-FreeBSD" ]
2
2019-11-06T21:16:57.000Z
2019-11-30T10:51:44.000Z
# Generated by Django 2.1.7 on 2019-05-03 02:36 from django.db import migrations
19.166667
49
0.611594
# Generated by Django 2.1.7 on 2019-05-03 02:36 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('materials', '0078_auto_20190501_1418'), ] operations = [ migrations.RemoveField( model_name='property', name='require_input_...
0
239
23
381e48031db6b3bb9ab5198242c5568c48b161ff
2,668
py
Python
ag-res.py
Murilodsv/py-jules
601ca9e6fbad7fe82404f5296babb04583ddda95
[ "MIT" ]
null
null
null
ag-res.py
Murilodsv/py-jules
601ca9e6fbad7fe82404f5296babb04583ddda95
[ "MIT" ]
null
null
null
ag-res.py
Murilodsv/py-jules
601ca9e6fbad7fe82404f5296babb04583ddda95
[ "MIT" ]
1
2020-04-13T17:23:54.000Z
2020-04-13T17:23:54.000Z
# -*- coding: utf-8 -*- """ Created on Tue Apr 20 13:32:20 2021 #--- ag csv results to single file based on dashboard_dbs #--- Murilo Vianna (murilodsv@gmail.com) #--- Jul, 2021. #--- Dev-log in: https://github.com/Murilodsv/py-jules @author: muril """ # DEBUG import os; os.chdir('C:/Murilo/py-jules'...
24.477064
97
0.508996
# -*- coding: utf-8 -*- """ Created on Tue Apr 20 13:32:20 2021 #--- ag csv results to single file based on dashboard_dbs #--- Murilo Vianna (murilodsv@gmail.com) #--- Jul, 2021. #--- Dev-log in: https://github.com/Murilodsv/py-jules @author: muril """ # DEBUG import os; os.chdir('C:/Murilo/py-jules'...
0
0
0
0c558aec93fa79ac6f2a75def0307f6ce81beb32
5,131
py
Python
whoosh/components/physics.py
Normangorman/whoosh
8ada8f9f628e05d8bfefcc5043588635893749ee
[ "MIT" ]
null
null
null
whoosh/components/physics.py
Normangorman/whoosh
8ada8f9f628e05d8bfefcc5043588635893749ee
[ "MIT" ]
8
2017-03-04T20:05:32.000Z
2017-03-05T11:19:54.000Z
whoosh/components/physics.py
Normangorman/whoosh
8ada8f9f628e05d8bfefcc5043588635893749ee
[ "MIT" ]
null
null
null
""" With a physics component, you can fly. Well, not for long. You'll shortly fall to your death. """ import pymunk import whoosh.maths from whoosh.components.base import BaseComponent class PhysicsComponent(BaseComponent): """ Useful for recreating Angry Birds. GameWorld.add_blob will automatically add t...
34.206667
124
0.613331
""" With a physics component, you can fly. Well, not for long. You'll shortly fall to your death. """ import pymunk import whoosh.maths from whoosh.components.base import BaseComponent class PhysicsComponent(BaseComponent): """ Useful for recreating Angry Birds. GameWorld.add_blob will automatically add t...
1,047
0
83
4e495dffd0d869055bac37afb26467d046ccb7f1
4,484
py
Python
Class/lxd.py
Ne00n/woodKubernetes
cd9676791784d47abbbeff9119e359ed1d365209
[ "MIT" ]
2
2021-06-28T19:56:33.000Z
2022-03-26T20:53:13.000Z
Class/lxd.py
Ne00n/woodKubernetes
cd9676791784d47abbbeff9119e359ed1d365209
[ "MIT" ]
null
null
null
Class/lxd.py
Ne00n/woodKubernetes
cd9676791784d47abbbeff9119e359ed1d365209
[ "MIT" ]
null
null
null
from Class.rqlite import rqlite import subprocess, socket, psutil, json, time
44.39604
175
0.554416
from Class.rqlite import rqlite import subprocess, socket, psutil, json, time class LXD(rqlite): def run(self): hostname = socket.gethostname() if "." in hostname: sub = hostname.split(".", 1)[0] else: sub = hostname hostMemory = int(psutil.virtual_memory()...
4,251
-3
158
84d4b18eac7654bdf85e72d7b5a31e2cb42edd6d
426
py
Python
sessao02/3_14-Strings-e-aspas/aula14.py
Ruteski/CursoPythonOM
afe5ad5e50f903dab370be2b76966a81f07e51dd
[ "MIT" ]
null
null
null
sessao02/3_14-Strings-e-aspas/aula14.py
Ruteski/CursoPythonOM
afe5ad5e50f903dab370be2b76966a81f07e51dd
[ "MIT" ]
null
null
null
sessao02/3_14-Strings-e-aspas/aula14.py
Ruteski/CursoPythonOM
afe5ad5e50f903dab370be2b76966a81f07e51dd
[ "MIT" ]
null
null
null
""" str - string """ print('aspas simples') print("aspas duplas") print(123456) # integer, conversao implicita para string print("essa é uma 'string' (str).") print('essa é uma "string" (str).') print('essa é uma \'string\' (str).') print("essa é uma \"string\" (str).") # '\' caracter de escape print('essa é uma \n...
28.4
94
0.640845
""" str - string """ print('aspas simples') print("aspas duplas") print(123456) # integer, conversao implicita para string print("essa é uma 'string' (str).") print('essa é uma "string" (str).') print('essa é uma \'string\' (str).') print("essa é uma \"string\" (str).") # '\' caracter de escape print('essa é uma \n...
0
0
0
252fe390e7915720b251a28ef29a97c0d83ca6b6
3,195
py
Python
utils/PingMonitor.py
ianfixes/MOOS-python-utils
1c34f3b8cde4fdcee48a8ee128a3c160eb17d722
[ "WTFPL" ]
3
2015-07-09T17:51:20.000Z
2016-04-14T23:06:04.000Z
utils/PingMonitor.py
ifreecarve/MOOS-python-utils
1c34f3b8cde4fdcee48a8ee128a3c160eb17d722
[ "WTFPL" ]
null
null
null
utils/PingMonitor.py
ifreecarve/MOOS-python-utils
1c34f3b8cde4fdcee48a8ee128a3c160eb17d722
[ "WTFPL" ]
3
2015-03-31T04:18:21.000Z
2016-10-22T04:55:16.000Z
#!/usr/bin/env python ########################################################################### # # Written in 2009 by Ian Katz <ijk5@mit.edu> # Terms: WTFPL (http://sam.zoy.org/wtfpl/) # See COPYING and WARRANTY files included in this distribution # #####################################...
26.404959
75
0.554617
#!/usr/bin/env python ########################################################################### # # Written in 2009 by Ian Katz <ijk5@mit.edu> # Terms: WTFPL (http://sam.zoy.org/wtfpl/) # See COPYING and WARRANTY files included in this distribution # #####################################...
978
5
157
2738c23c527ee5c92714e30191c89b5224c64772
6,399
py
Python
notebooks/cluster_diff.py
SLIPO-EU/tutorial
15f4e0bc8c3ef2b937daa23e7b759ecf44fce5d7
[ "Apache-2.0" ]
1
2020-11-03T14:59:01.000Z
2020-11-03T14:59:01.000Z
notebooks/cluster_diff.py
SLIPO-EU/tutorial
15f4e0bc8c3ef2b937daa23e7b759ecf44fce5d7
[ "Apache-2.0" ]
null
null
null
notebooks/cluster_diff.py
SLIPO-EU/tutorial
15f4e0bc8c3ef2b937daa23e7b759ecf44fce5d7
[ "Apache-2.0" ]
1
2021-07-16T08:33:36.000Z
2021-07-16T08:33:36.000Z
import numpy as np import matplotlib from matplotlib import colors from matplotlib import cm import matplotlib.pyplot as plt import folium from folium.plugins import HeatMap from folium.plugins import MarkerCluster from loci.analytics import bbox, kwds_freq from wordcloud import WordCloud from pysal.viz.mapclassify imp...
39.257669
110
0.649164
import numpy as np import matplotlib from matplotlib import colors from matplotlib import cm import matplotlib.pyplot as plt import folium from folium.plugins import HeatMap from folium.plugins import MarkerCluster from loci.analytics import bbox, kwds_freq from wordcloud import WordCloud from pysal.viz.mapclassify imp...
0
0
0
28ec1648de23d76658c175b1386f4cad995021d8
1,245
py
Python
web_service/routes.py
DigitalSlideArchive-Legacy/openseadragon-annotations
a21ea4ea9217fed54c8033655905c9bfd0f73714
[ "Apache-2.0" ]
5
2019-06-20T11:33:11.000Z
2022-02-22T05:18:57.000Z
web_service/routes.py
dgutman/openseadragon-annotations
a21ea4ea9217fed54c8033655905c9bfd0f73714
[ "Apache-2.0" ]
6
2015-11-13T02:23:26.000Z
2015-11-13T02:59:39.000Z
web_service/routes.py
dgutman/openseadragon-annotations
a21ea4ea9217fed54c8033655905c9bfd0f73714
[ "Apache-2.0" ]
3
2019-06-05T06:36:39.000Z
2020-01-21T18:44:35.000Z
from flask import Blueprint, request, jsonify import pymongo client = pymongo.MongoClient('localhost',27017) db = client.TCGA_Slide_DB dsa = Blueprint('dsa', __name__) @dsa.route('/annotations', methods=['POST','OPTIONS']) @dsa.route('/annotations', methods=['GET','OPTIONS'])
26.489362
111
0.670683
from flask import Blueprint, request, jsonify import pymongo client = pymongo.MongoClient('localhost',27017) db = client.TCGA_Slide_DB dsa = Blueprint('dsa', __name__) @dsa.route('/annotations', methods=['POST','OPTIONS']) def add_annotation(): ants = db.annotations layers = db.layers layer_ids = [] if request.j...
921
0
44
36ff3a574d98dd0cd2cbcc3a1fca29102aabc0ab
310
py
Python
pandaproxy/proxyinterface/InterfaceUtils.py
PanDAWMS/panda-proxy
731bf01d6684f52798a750bf049078c6eb11ed59
[ "Apache-2.0" ]
null
null
null
pandaproxy/proxyinterface/InterfaceUtils.py
PanDAWMS/panda-proxy
731bf01d6684f52798a750bf049078c6eb11ed59
[ "Apache-2.0" ]
null
null
null
pandaproxy/proxyinterface/InterfaceUtils.py
PanDAWMS/panda-proxy
731bf01d6684f52798a750bf049078c6eb11ed59
[ "Apache-2.0" ]
null
null
null
import urllib # make response
25.833333
50
0.651613
import urllib # make response def makeResponse(errorCode,errorMsg,msgData=None): tmpDict = {'StatusCode':errorCode, 'ErrorMsg':errorMsg} if msgData != None: for tmpKey,tmpVal in msgData.iteritems(): tmpDict[tmpKey] = tmpVal return urllib.urlencode(tmpDict)
252
0
22
e17f6d568d613d2e443e5b7d238b343bc66b1e9f
13,497
py
Python
api/applications/tests/tests_consignee.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
3
2019-05-15T09:30:39.000Z
2020-04-22T16:14:23.000Z
api/applications/tests/tests_consignee.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
85
2019-04-24T10:39:35.000Z
2022-03-21T14:52:12.000Z
api/applications/tests/tests_consignee.py
django-doctor/lite-api
1ba278ba22ebcbb977dd7c31dd3701151cd036bf
[ "MIT" ]
1
2021-01-17T11:12:19.000Z
2021-01-17T11:12:19.000Z
from unittest import mock from django.urls import reverse from parameterized import parameterized from rest_framework import status from api.applications.models import PartyOnApplication from lite_content.lite_api.strings import PartyErrors from api.parties.enums import PartyType, SubType from api.parties.models impo...
42.046729
120
0.647255
from unittest import mock from django.urls import reverse from parameterized import parameterized from rest_framework import status from api.applications.models import PartyOnApplication from lite_content.lite_api.strings import PartyErrors from api.parties.enums import PartyType, SubType from api.parties.models impo...
967
12,064
23
79895f188c2944c177144735db79756865f27abf
135
py
Python
examples/test.py
wenhaoLong/vnpyTrader
ff37e288042b9d9f9350a1c528a53c77d56ae849
[ "MIT" ]
null
null
null
examples/test.py
wenhaoLong/vnpyTrader
ff37e288042b9d9f9350a1c528a53c77d56ae849
[ "MIT" ]
null
null
null
examples/test.py
wenhaoLong/vnpyTrader
ff37e288042b9d9f9350a1c528a53c77d56ae849
[ "MIT" ]
2
2021-03-07T18:13:21.000Z
2021-12-13T10:20:10.000Z
from datetime import datetime theTime = '2019-12-20 10:22:00' theTime = datetime.strptime(theTime, '%Y-%m-%d %H:%M:%S') print(theTime)
27
57
0.703704
from datetime import datetime theTime = '2019-12-20 10:22:00' theTime = datetime.strptime(theTime, '%Y-%m-%d %H:%M:%S') print(theTime)
0
0
0
2d736d0062b6e948713706823725292816caa5aa
281
py
Python
test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/_patch.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
35
2018-04-03T12:15:53.000Z
2022-03-11T14:03:34.000Z
test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/_patch.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
652
2017-08-28T22:44:41.000Z
2022-03-31T21:20:31.000Z
test/multiapi/Expected/AcceptanceTests/Multiapi/multiapi/_patch.py
qwordy/autorest.python
6b12df51c2a39a1285546b5a771b69f5896e794f
[ "MIT" ]
29
2017-08-28T20:57:01.000Z
2022-03-11T14:03:38.000Z
import importlib import sys
21.615385
59
0.704626
import importlib import sys class PatchAddedModel(object): pass def patch_sdk(): try: models = sys.modules['multiapi.models'] except KeyError: models = importlib.import_module('multiapi.models') setattr(models, 'PatchAddedModel', PatchAddedModel)
189
18
46
aa2f7feda85faef5b61caf8be8c265bbb931ba4a
2,399
py
Python
web/signup.py
obuseme/ultra-motivator
c5614c56ffbb772dd56e0754939e7f5ca83a4efb
[ "MIT" ]
1
2019-06-25T10:38:09.000Z
2019-06-25T10:38:09.000Z
web/signup.py
obuseme/ultra-motivator
c5614c56ffbb772dd56e0754939e7f5ca83a4efb
[ "MIT" ]
null
null
null
web/signup.py
obuseme/ultra-motivator
c5614c56ffbb772dd56e0754939e7f5ca83a4efb
[ "MIT" ]
null
null
null
#!C:\Python27\python.exe -u #!/usr/bin/env python import MySQLdb import hashlib import cgi import uuid print "Content-type: text/html" print print """ <html> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <titl...
27.895349
217
0.668195
#!C:\Python27\python.exe -u #!/usr/bin/env python import MySQLdb import hashlib import cgi import uuid def hash_password(password): salt = uuid.uuid4().hex return hashlib.sha256(salt.encode() + password.encode()).hexdigest() + ':' + salt def show_signup_ui(): print """ <div class="center"> <form metho...
600
0
46
f0b4b8d709e298308c2f9d1b29640fe2e1adca65
53
py
Python
__init__.py
halibot-extra/reminders
846015f77e0b19a8e080b92300341b256680ff25
[ "BSD-3-Clause" ]
null
null
null
__init__.py
halibot-extra/reminders
846015f77e0b19a8e080b92300341b256680ff25
[ "BSD-3-Clause" ]
null
null
null
__init__.py
halibot-extra/reminders
846015f77e0b19a8e080b92300341b256680ff25
[ "BSD-3-Clause" ]
null
null
null
from .reminders import Reminders Default = Reminders
17.666667
32
0.830189
from .reminders import Reminders Default = Reminders
0
0
0
5675e059b9df2fa439860e2f1865a5c3d88be675
389
py
Python
src/pbbt/__init__.py
prometheusresearch/pbbt
35e6e4f49a1055892f487720f1c6ec15144956ff
[ "MIT" ]
2
2021-03-16T15:57:31.000Z
2021-10-06T23:13:26.000Z
src/pbbt/__init__.py
prometheusresearch/pbbt
35e6e4f49a1055892f487720f1c6ec15144956ff
[ "MIT" ]
1
2021-02-05T00:20:30.000Z
2021-02-05T00:20:30.000Z
src/pbbt/__init__.py
prometheusresearch/pbbt
35e6e4f49a1055892f487720f1c6ec15144956ff
[ "MIT" ]
3
2021-02-15T20:37:02.000Z
2021-10-06T23:13:28.000Z
# # Copyright (c) 2013, Prometheus Research, LLC # Released under MIT license, see `LICENSE` for details. # from .check import maybe, oneof, choiceof, listof, tupleof, dictof, raises from .core import Test, Field, Record from .ctl import Control from .load import locate, Location from .run import run, main from .std ...
24.3125
74
0.755784
# # Copyright (c) 2013, Prometheus Research, LLC # Released under MIT license, see `LICENSE` for details. # from .check import maybe, oneof, choiceof, listof, tupleof, dictof, raises from .core import Test, Field, Record from .ctl import Control from .load import locate, Location from .run import run, main from .std ...
0
0
0
6f8d0521295c7f3c3553377938008c734099b2e4
8,335
py
Python
monai/networks/blocks/evonorm_primitives.py
vsivan97/MONAI
33cb186b4664bb032fe9837b305c0a06cdf6d289
[ "Apache-2.0" ]
null
null
null
monai/networks/blocks/evonorm_primitives.py
vsivan97/MONAI
33cb186b4664bb032fe9837b305c0a06cdf6d289
[ "Apache-2.0" ]
null
null
null
monai/networks/blocks/evonorm_primitives.py
vsivan97/MONAI
33cb186b4664bb032fe9837b305c0a06cdf6d289
[ "Apache-2.0" ]
null
null
null
import torch import torch.nn as nn class EvonormPrimitive(nn.Module): """Abstract base class for the evonorm primitive layers """ class PrimitiveAdd(EvonormPrimitive): """ Primitive Add Operation """ class PrimitiveMul(EvonormPrimitive): """Primitive Multiply Operation """ class PrimitiveDiv...
25.646154
93
0.612358
import torch import torch.nn as nn class EvonormPrimitive(nn.Module): """Abstract base class for the evonorm primitive layers """ def __init__(self): if type(self) is EvonormPrimitive: raise NotImplementedError super().__init__() class PrimitiveAdd(EvonormPrimitive): """ Pr...
3,847
0
1,304
13e9e73cd2166b1dd4288634db847b0f80559bd0
638
py
Python
why_this_song/hello.py
AnikaZN/Why-This-Song
378c1b3ec646bd9547a1b6078aff0d8288aee729
[ "MIT" ]
null
null
null
why_this_song/hello.py
AnikaZN/Why-This-Song
378c1b3ec646bd9547a1b6078aff0d8288aee729
[ "MIT" ]
null
null
null
why_this_song/hello.py
AnikaZN/Why-This-Song
378c1b3ec646bd9547a1b6078aff0d8288aee729
[ "MIT" ]
null
null
null
import spotipy from spotipy.oauth2 import SpotifyClientCredentials from dotenv import load_dotenv load_dotenv() lz_uri = 'spotify:artist:36QJpDe2go2KgaRleHCDTp' client_credentials_manager = SpotifyClientCredentials(client_id='CLIENT_ID', client_secret='CLIENT_SECRET') spotify =...
31.9
80
0.706897
import spotipy from spotipy.oauth2 import SpotifyClientCredentials from dotenv import load_dotenv load_dotenv() lz_uri = 'spotify:artist:36QJpDe2go2KgaRleHCDTp' client_credentials_manager = SpotifyClientCredentials(client_id='CLIENT_ID', client_secret='CLIENT_SECRET') spotify =...
0
0
0
fd6fc943eb6801b99b92a5393c37a1580b20f02b
12,467
py
Python
methods.py
b-eastwood/hvir-calc-py
8f03c8ccc76c139090586a9698b238d689275641
[ "MIT" ]
null
null
null
methods.py
b-eastwood/hvir-calc-py
8f03c8ccc76c139090586a9698b238d689275641
[ "MIT" ]
2
2019-12-06T05:30:49.000Z
2019-12-09T01:34:37.000Z
methods.py
b-eastwood/hvir-calc-py
8f03c8ccc76c139090586a9698b238d689275641
[ "MIT" ]
2
2019-10-24T03:20:14.000Z
2019-10-25T21:15:32.000Z
import logging
40.609121
117
0.520093
import logging def normal_clamp(value, min_v=0, max_v=1): value = max(min_v, value) # Clamp to 1 if > 1 value = min(max_v, value) # Clamp to 0 if < 0 return value class HvirCalculator: def __init__(self): self.defaults = {} def calc_a_limits(self, mass_limit: float, length_limit: floa...
11,892
0
558
6a0f23a0820038366117b6940c55981c78f29074
9,204
gyp
Python
src/win32/base/win32_base.gyp
kbc-developers/Mozc
97f225ceb1759eedd58f4f09b16411bcb5a62885
[ "BSD-3-Clause" ]
null
null
null
src/win32/base/win32_base.gyp
kbc-developers/Mozc
97f225ceb1759eedd58f4f09b16411bcb5a62885
[ "BSD-3-Clause" ]
null
null
null
src/win32/base/win32_base.gyp
kbc-developers/Mozc
97f225ceb1759eedd58f4f09b16411bcb5a62885
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2010-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and ...
31.412969
79
0.492938
# Copyright 2010-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and ...
0
0
0
af6bf12e8e0fddddc4541185f09c24a1979e62a2
10,443
py
Python
gcnf/tests/test_all.py
vojtechcima/gcn
3f58d830140a3a598241fd0e8987e6b6a201fb17
[ "MIT" ]
1
2020-01-25T17:28:33.000Z
2020-01-25T17:28:33.000Z
gcnf/tests/test_all.py
It4innovations/gcnf
3f58d830140a3a598241fd0e8987e6b6a201fb17
[ "MIT" ]
4
2020-11-13T18:35:36.000Z
2022-02-10T00:33:27.000Z
gcnf/tests/test_all.py
vojtechcima/gcn
3f58d830140a3a598241fd0e8987e6b6a201fb17
[ "MIT" ]
null
null
null
from ..graph import Arc, ArcType, Node, NodeType, Graph, GraphType, GraphSet from ..gcn import GCN import tensorflow as tf import numpy as np tf.compat.v1.disable_eager_execution()
33.471154
106
0.580868
from ..graph import Arc, ArcType, Node, NodeType, Graph, GraphType, GraphSet from ..gcn import GCN import tensorflow as tf import numpy as np tf.compat.v1.disable_eager_execution() def test(): nt = NodeType(4, name="A") n1 = Node(nt, [1,2,3]) n2 = Node(nt, [1,2,3]) n3 = Node(nt, [1,2,3]) at = Ar...
10,070
0
184
7c5287d5f30d1e189bec1a817fbbd548b9794070
1,445
py
Python
twitter-user-search.py
dlukose/python-twitter-examples
75f92b1615900caff6dfc61efa162e2d316ace61
[ "MIT" ]
573
2015-01-23T17:45:23.000Z
2022-03-25T00:53:47.000Z
twitter-user-search.py
dlukose/python-twitter-examples
75f92b1615900caff6dfc61efa162e2d316ace61
[ "MIT" ]
8
2015-08-19T01:09:26.000Z
2019-04-26T14:27:49.000Z
twitter-user-search.py
dlukose/python-twitter-examples
75f92b1615900caff6dfc61efa162e2d316ace61
[ "MIT" ]
351
2015-01-29T14:38:56.000Z
2022-02-16T11:55:45.000Z
#!/usr/bin/env python #----------------------------------------------------------------------- # twitter-user-search # - performs a search for users matching a certain query #----------------------------------------------------------------------- from twitter import * #----------------------------------------------...
40.138889
81
0.333564
#!/usr/bin/env python #----------------------------------------------------------------------- # twitter-user-search # - performs a search for users matching a certain query #----------------------------------------------------------------------- from twitter import * #----------------------------------------------...
0
0
0
676e4cab3ab5b305a470a50adb623276a1d3a2cc
928
py
Python
33birthday.py
qht1028/homework
b62312e6ca56ce94c436bce09349cddba640418a
[ "MIT" ]
null
null
null
33birthday.py
qht1028/homework
b62312e6ca56ce94c436bce09349cddba640418a
[ "MIT" ]
null
null
null
33birthday.py
qht1028/homework
b62312e6ca56ce94c436bce09349cddba640418a
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # You are probably well aware of the 'birthday paradox' # https://en.wikipedia.org/wiki/Birthday_problem # Let's try simulating it # You will need a list for the 365 day calendar # You will need a set number of people (e.g. 25) # During each 'trial' you do the following # Choose a person # Git ...
23.2
78
0.665948
#!/usr/bin/env python3 # You are probably well aware of the 'birthday paradox' # https://en.wikipedia.org/wiki/Birthday_problem # Let's try simulating it # You will need a list for the 365 day calendar # You will need a set number of people (e.g. 25) # During each 'trial' you do the following # Choose a person # Git ...
0
0
0
17ebc7736e514d30b76194c300f947beaedc9a68
2,387
py
Python
tests/test_vanilla_option.py
donlelef/vanilla-option-pricing
4c8069d69464419c005f3fe690c5aa515a67b421
[ "MIT" ]
16
2018-09-07T16:05:37.000Z
2022-02-26T10:13:09.000Z
tests/test_vanilla_option.py
SoftwareImpacts/SIMPAC-2020-53
e09992c4f4eda09329c33c7c1ab63b3537995f9a
[ "MIT" ]
1
2020-10-11T12:00:25.000Z
2020-10-11T12:00:25.000Z
tests/test_vanilla_option.py
SoftwareImpacts/SIMPAC-2020-53
e09992c4f4eda09329c33c7c1ab63b3537995f9a
[ "MIT" ]
3
2020-10-27T14:06:47.000Z
2021-06-30T19:07:34.000Z
from datetime import datetime, timedelta import numpy as np import pytest from pytest import fixture from vanilla_option_pricing.option import VanillaOption, option_list_to_pandas_dataframe, \ pandas_dataframe_to_option_list @fixture @fixture
31
105
0.693758
from datetime import datetime, timedelta import numpy as np import pytest from pytest import fixture from vanilla_option_pricing.option import VanillaOption, option_list_to_pandas_dataframe, \ pandas_dataframe_to_option_list @fixture def option(): return VanillaOption( spot=100, strike=100, ...
1,946
0
182
ae096ee88b212f4a391b7e5dc2153efe9d33ecc8
470
py
Python
clicky/__init__.py
kennedy/my_pet_flask
56dfc749f0dd4e763923212d9d3f50ff61a1f3ec
[ "Unlicense" ]
null
null
null
clicky/__init__.py
kennedy/my_pet_flask
56dfc749f0dd4e763923212d9d3f50ff61a1f3ec
[ "Unlicense" ]
null
null
null
clicky/__init__.py
kennedy/my_pet_flask
56dfc749f0dd4e763923212d9d3f50ff61a1f3ec
[ "Unlicense" ]
null
null
null
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_caching import Cache
24.736842
48
0.67234
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_caching import Cache def create_app(in_config = {}): app = Flask(__name__) config = { "CACHE_TYPE": "SimpleCache", "CACHE_DEFAULT_TIMEOUT": 300, "DATABASE": 'file::memory:?cache=shared' } config.update(i...
350
0
23
53e0f031cdd5149c25021ee8bc58246a6902eccd
9,179
py
Python
bot/modules/help/cog.py
runs-15/BotGabutReborn
1773b526dc4d26936051a3eba7baa8bcb50c8999
[ "MIT" ]
null
null
null
bot/modules/help/cog.py
runs-15/BotGabutReborn
1773b526dc4d26936051a3eba7baa8bcb50c8999
[ "MIT" ]
null
null
null
bot/modules/help/cog.py
runs-15/BotGabutReborn
1773b526dc4d26936051a3eba7baa8bcb50c8999
[ "MIT" ]
null
null
null
from inspect import formatargvalues import discord, datetime, db, time, os import pandas as pd from discord import Embed from discord.ext.commands import Cog, command from apscheduler.schedulers.asyncio import AsyncIOScheduler from apscheduler.triggers.cron import CronTrigger # from discord_components import Button, Bu...
51.858757
301
0.556706
from inspect import formatargvalues import discord, datetime, db, time, os import pandas as pd from discord import Embed from discord.ext.commands import Cog, command from apscheduler.schedulers.asyncio import AsyncIOScheduler from apscheduler.triggers.cron import CronTrigger # from discord_components import Button, Bu...
8,205
0
318
182cecda9848e31de612a655300a6bab9574d2cf
144
py
Python
textpp_ptbr/__init__.py
fernandosola/textpp-ptbr
ff74dc3cbc4ec26aebd9ecb2b98cb6e37aadea58
[ "MIT" ]
2
2020-11-23T00:22:41.000Z
2021-12-02T15:33:57.000Z
textpp_ptbr/__init__.py
fernandosola/textpp-ptbr
ff74dc3cbc4ec26aebd9ecb2b98cb6e37aadea58
[ "MIT" ]
null
null
null
textpp_ptbr/__init__.py
fernandosola/textpp-ptbr
ff74dc3cbc4ec26aebd9ecb2b98cb6e37aadea58
[ "MIT" ]
2
2020-07-24T17:59:02.000Z
2021-11-22T19:50:52.000Z
import logging from ._version import __version__ __all__ = [ "__version__", ] logger = logging.getLogger(__name__) logging.basicConfig()
13.090909
36
0.75
import logging from ._version import __version__ __all__ = [ "__version__", ] logger = logging.getLogger(__name__) logging.basicConfig()
0
0
0
0ecf5a07666ee6a8c83d6ab7c0e3d345412e293f
142
py
Python
pygame_rl/scenario/gridworld/envs/__init__.py
sc420/pygame-rl
f81da559385876616d99c74b43e4345f53d086d2
[ "MIT" ]
6
2019-02-18T09:34:34.000Z
2021-11-09T06:58:02.000Z
pygame_rl/scenario/gridworld/envs/__init__.py
ebola777/pygame-soccer
f81da559385876616d99c74b43e4345f53d086d2
[ "MIT" ]
3
2019-03-14T03:10:48.000Z
2019-07-15T08:11:25.000Z
pygame_rl/scenario/gridworld/envs/__init__.py
ebola777/pygame-soccer
f81da559385876616d99c74b43e4345f53d086d2
[ "MIT" ]
4
2019-02-13T13:41:17.000Z
2019-07-22T13:33:15.000Z
from pygame_rl.scenario.gridworld.envs.gridworld_v0 import GridworldV0 from pygame_rl.scenario.gridworld.envs.gridworld_v1 import GridworldV1
47.333333
70
0.887324
from pygame_rl.scenario.gridworld.envs.gridworld_v0 import GridworldV0 from pygame_rl.scenario.gridworld.envs.gridworld_v1 import GridworldV1
0
0
0
b031d8859a161a6483042dd0f6a128547266436d
3,138
py
Python
lj/kodo/qiniu_big_fetch.py
shliujing/qn-python-sdk
6a659b4197b7847b604b42cb223850977bcc86dc
[ "MIT" ]
null
null
null
lj/kodo/qiniu_big_fetch.py
shliujing/qn-python-sdk
6a659b4197b7847b604b42cb223850977bcc86dc
[ "MIT" ]
null
null
null
lj/kodo/qiniu_big_fetch.py
shliujing/qn-python-sdk
6a659b4197b7847b604b42cb223850977bcc86dc
[ "MIT" ]
null
null
null
#! /usr/bin/env python # -*- coding: utf-8 -*- # 该脚本平均每小时提交 4万5千多条URL # 推荐 0.3s,方便及时停止抓取, 一天提交10万~15万 URL PS:因为URL一旦提交到队列中,就不可修改 # python qiniu_big_fetch.py <ak> <sk> <bucket> <zone(z0 z1)> <file_path> <sleep_time> import urlparse, hmac, hashlib, base64, commands, sys, time def Qiniu_token(access_key, secret_key...
30.466019
164
0.657425
#! /usr/bin/env python # -*- coding: utf-8 -*- # 该脚本平均每小时提交 4万5千多条URL # 推荐 0.3s,方便及时停止抓取, 一天提交10万~15万 URL PS:因为URL一旦提交到队列中,就不可修改 # python qiniu_big_fetch.py <ak> <sk> <bucket> <zone(z0 z1)> <file_path> <sleep_time> import urlparse, hmac, hashlib, base64, commands, sys, time def __token(data, secret_key): data =...
366
0
46
98aac9f08dcd786f3965c48675c876d21625fec8
827
py
Python
ex041.py
Jordemar-D-Bousquet/Exercicios_Python
705d4c83720db033841f01aa843e4dbab08f1423
[ "MIT" ]
null
null
null
ex041.py
Jordemar-D-Bousquet/Exercicios_Python
705d4c83720db033841f01aa843e4dbab08f1423
[ "MIT" ]
null
null
null
ex041.py
Jordemar-D-Bousquet/Exercicios_Python
705d4c83720db033841f01aa843e4dbab08f1423
[ "MIT" ]
null
null
null
# Exercício Python 041: A Confederação Nacional de Natação precisa de um programa que leia o ano de nascimento de um atleta e mostre sua categoria, de acordo com a idade: # - Até 9 anos: MIRIM # - Até 14 anos: INFANTIL # - Até 19 anos: JÚNIOR # - Até 25 anos: SÊNIOR # - Acima de 25 anos: MASTER from datetime import da...
35.956522
170
0.666264
# Exercício Python 041: A Confederação Nacional de Natação precisa de um programa que leia o ano de nascimento de um atleta e mostre sua categoria, de acordo com a idade: # - Até 9 anos: MIRIM # - Até 14 anos: INFANTIL # - Até 19 anos: JÚNIOR # - Até 25 anos: SÊNIOR # - Acima de 25 anos: MASTER from datetime import da...
0
0
0
e42808877787064d5b283b378f39bbc5e12378a9
15,161
py
Python
core/builder.py
JeremieMelo/ADEPT
f79f518197798735cb684b373e11cdcc8a80d872
[ "MIT" ]
5
2022-02-26T09:14:47.000Z
2022-03-20T22:57:06.000Z
core/builder.py
JeremieMelo/ADEPT
f79f518197798735cb684b373e11cdcc8a80d872
[ "MIT" ]
null
null
null
core/builder.py
JeremieMelo/ADEPT
f79f518197798735cb684b373e11cdcc8a80d872
[ "MIT" ]
null
null
null
""" Description: Author: Jiaqi Gu (jqgu@utexas.edu) Date: 2021-03-31 17:48:41 LastEditors: Jiaqi Gu (jqgu@utexas.edu) LastEditTime: 2021-09-26 00:51:50 """ from typing import Tuple import torch import torch.nn as nn from pyutils.config import configs from pyutils.datasets import get_dataset from pyutils.loss import A...
38.092965
107
0.625816
""" Description: Author: Jiaqi Gu (jqgu@utexas.edu) Date: 2021-03-31 17:48:41 LastEditors: Jiaqi Gu (jqgu@utexas.edu) LastEditTime: 2021-09-26 00:51:50 """ from typing import Tuple import torch import torch.nn as nn from pyutils.config import configs from pyutils.datasets import get_dataset from pyutils.loss import A...
14,044
0
161
db43bd7f34ca9a0dab0726a6ecdfc1b618b92bcc
3,889
py
Python
mdx/mdx_inline_graphviz.py
Macuyiko/markdown-slide-editor
2a4c87a2d0f1436c0d954c15cf732529fa710278
[ "MIT" ]
1
2021-02-05T11:34:03.000Z
2021-02-05T11:34:03.000Z
mdx/mdx_inline_graphviz.py
Macuyiko/markdown-slide-editor
2a4c87a2d0f1436c0d954c15cf732529fa710278
[ "MIT" ]
1
2021-01-27T07:28:37.000Z
2021-01-27T07:28:37.000Z
mdx/mdx_inline_graphviz.py
Macuyiko/markdown-slide-editor
2a4c87a2d0f1436c0d954c15cf732529fa710278
[ "MIT" ]
null
null
null
""" Graphviz extensions for Markdown. Renders the output inline, eliminating the need to configure an output directory. Supports outputs types of SVG and PNG. The output will be taken from the filename specified in the tag. Example: {% dot attack_plan.svg digraph G { rankdir=LR Earth [peripheries=...
33.817391
89
0.492157
""" Graphviz extensions for Markdown. Renders the output inline, eliminating the need to configure an output directory. Supports outputs types of SVG and PNG. The output will be taken from the filename specified in the tag. Example: {% dot attack_plan.svg digraph G { rankdir=LR Earth [peripheries=...
97
2,861
69
7c1c31ce09a9e1f080af2c0aeec36568a257c15b
6,668
py
Python
django_tenants/management/commands/__init__.py
sim1234/django-tenants
a8b98c5c779214f8003dd766ab754936d0afc26c
[ "MIT" ]
514
2015-06-12T00:31:32.000Z
2020-06-08T17:49:23.000Z
django_tenants/management/commands/__init__.py
sim1234/django-tenants
a8b98c5c779214f8003dd766ab754936d0afc26c
[ "MIT" ]
363
2015-06-12T07:04:04.000Z
2020-06-09T17:10:17.000Z
django_tenants/management/commands/__init__.py
sim1234/django-tenants
a8b98c5c779214f8003dd766ab754936d0afc26c
[ "MIT" ]
159
2015-06-12T13:09:15.000Z
2020-06-04T00:48:35.000Z
from django.conf import settings from django.core.management import call_command, get_commands, load_command_class from django.core.management.base import BaseCommand, CommandError from django.db import connection from django_tenants.utils import get_tenant_model, get_public_schema_name class BaseTenantCommand(Base...
40.412121
119
0.630924
from django.conf import settings from django.core.management import call_command, get_commands, load_command_class from django.core.management.base import BaseCommand, CommandError from django.db import connection from django_tenants.utils import get_tenant_model, get_public_schema_name class BaseTenantCommand(Base...
3,998
18
342
ab3f775cb7374eac2051620fdd7cdbce1cc66db1
2,739
py
Python
benchmarks/hybrid/CloudPred/run_rt.py
icsme2020/WS-DREAM
80a97f0a5cc272596d96fa86f4b5a42ae76e437c
[ "MIT" ]
6
2020-11-17T06:13:48.000Z
2021-09-18T02:35:23.000Z
benchmarks/hybrid/CloudPred/run_rt.py
icsme2020/WS-DREAM
80a97f0a5cc272596d96fa86f4b5a42ae76e437c
[ "MIT" ]
1
2021-06-15T12:40:03.000Z
2021-08-03T08:56:02.000Z
benchmarks/hybrid/CloudPred/run_rt.py
icsme2020/WS-DREAM
80a97f0a5cc272596d96fa86f4b5a42ae76e437c
[ "MIT" ]
4
2021-04-13T12:15:54.000Z
2022-02-09T13:07:15.000Z
######################################################## # run_rt.py # Author: Jamie Zhu <jimzhu@GitHub> # Created: 2014/2/6 # Last updated: 2014/5/8 # Implemented approach: CloudPred # Evaluation metrics: MAE, NMAE, RMSE, MRE, NPRE ######################################################## import numpy as np ...
37.013514
95
0.592187
######################################################## # run_rt.py # Author: Jamie Zhu <jimzhu@GitHub> # Created: 2014/2/6 # Last updated: 2014/5/8 # Implemented approach: CloudPred # Evaluation metrics: MAE, NMAE, RMSE, MRE, NPRE ######################################################## import numpy as np ...
0
0
0
fc8dbab2b7fb198b91aac32c54d87a4df0c062ed
8,492
py
Python
model/Spacial_plan1/blocks.py
Ji-Xinyou/DIP-proj-DepthEstimation
5432c14ce1d0cdc9b8b6ab0a273678ffbe6086bd
[ "MIT" ]
null
null
null
model/Spacial_plan1/blocks.py
Ji-Xinyou/DIP-proj-DepthEstimation
5432c14ce1d0cdc9b8b6ab0a273678ffbe6086bd
[ "MIT" ]
null
null
null
model/Spacial_plan1/blocks.py
Ji-Xinyou/DIP-proj-DepthEstimation
5432c14ce1d0cdc9b8b6ab0a273678ffbe6086bd
[ "MIT" ]
null
null
null
import torch import torch.nn as nn import torch.nn.functional as functional class upsampling(nn.Module): ''' net from Deeper depth prediction with fully convolutional residual networks Args of __init__(): in_channels: the # of channels of the input out_channels: the # of chann...
34.803279
80
0.567122
import torch import torch.nn as nn import torch.nn.functional as functional class Encoder_resnet50(nn.Module): def __init__(self, base): super(Encoder_resnet50, self).__init__() # encoder is a pretrained resnet, inherit the architecture self.conv1 = base.conv1 self.bn1 = base.b...
5,810
13
296
083cb4ce86096b6fab23bf3454e86f0003ae1c15
1,040
py
Python
ove/algorithm/dain/networks/S2D_models.py
iBobbyTS/OpenVideoEnhance
64d12d7a4c344798e5d60eafd20f8f554f852e84
[ "MIT" ]
3
2020-12-20T14:15:19.000Z
2021-03-23T12:23:38.000Z
ove/algorithm/dain/networks/S2D_models.py
iBobbyTS/OpenVideoEnhance
64d12d7a4c344798e5d60eafd20f8f554f852e84
[ "MIT" ]
1
2022-01-17T06:39:20.000Z
2022-01-18T08:12:38.000Z
ove/algorithm/dain/networks/S2D_models.py
iBobbyTS/OpenVideoEnhance
64d12d7a4c344798e5d60eafd20f8f554f852e84
[ "MIT" ]
1
2021-03-03T22:53:05.000Z
2021-03-03T22:53:05.000Z
import math import torch import torch.nn as nn from .GeneralModels import BasicBlock
29.714286
87
0.548077
import math import torch import torch.nn as nn from .GeneralModels import BasicBlock class S2DF(nn.Module): def __init__(self): super().__init__() self.block1 = nn.Sequential( nn.Conv2d(3, 64, kernel_size=(7, 7), stride=(1, 1), padding=3, bias=False), nn.ReLU(inplace=True) ...
877
1
76
48c5c5617976f7b80305873a131e1154cb4d429a
264
py
Python
CodeFights/centuryFromYear.py
JLJTECH/TutorialTesting
f2dbbd49a86b3b086d0fc156ac3369fb74727f86
[ "MIT" ]
null
null
null
CodeFights/centuryFromYear.py
JLJTECH/TutorialTesting
f2dbbd49a86b3b086d0fc156ac3369fb74727f86
[ "MIT" ]
null
null
null
CodeFights/centuryFromYear.py
JLJTECH/TutorialTesting
f2dbbd49a86b3b086d0fc156ac3369fb74727f86
[ "MIT" ]
null
null
null
#CodeFights #Given a year, return the century it is in. The first century spans from the year 1 up to and including the year 100, the second - from the year 101 up to and including the year 200, etc.
52.8
187
0.727273
#CodeFights #Given a year, return the century it is in. The first century spans from the year 1 up to and including the year 100, the second - from the year 101 up to and including the year 200, etc. def centuryFromYear(year): return int((year - 1) / 100 + 1)
42
0
23
2957004fff23b269ba5c9c204177c35f3460e9ba
867
py
Python
itunes_connect_pilot.py
xyla-io/bot_itunes_connect
b84df272e85cacd8f7845daa6bb7b23bd4571bcd
[ "MIT" ]
null
null
null
itunes_connect_pilot.py
xyla-io/bot_itunes_connect
b84df272e85cacd8f7845daa6bb7b23bd4571bcd
[ "MIT" ]
null
null
null
itunes_connect_pilot.py
xyla-io/bot_itunes_connect
b84df272e85cacd8f7845daa6bb7b23bd4571bcd
[ "MIT" ]
null
null
null
from raspador import Pilot, UserInteractor, BrowserInteractor from typing import Dict, List
25.5
95
0.696655
from raspador import Pilot, UserInteractor, BrowserInteractor from typing import Dict, List class iTunesConnectPilot(Pilot): config: Dict[str, any] sign_in_wait = 3.0 def __init__(self, config: Dict[str, any], user: UserInteractor, browser: BrowserInteractor): self.config = config super().__init__(user=...
445
308
23
b44738b9b529cbb2a559bc5bb34b69d4df22862a
138
py
Python
mmdet/version.py
dmy1997/DHRNet
a1adeade8075758f940f5c9edda4393d3f67426c
[ "Apache-2.0" ]
null
null
null
mmdet/version.py
dmy1997/DHRNet
a1adeade8075758f940f5c9edda4393d3f67426c
[ "Apache-2.0" ]
1
2021-03-26T07:19:51.000Z
2021-05-21T05:36:12.000Z
mmdet/version.py
dmy1997/DHRNet
a1adeade8075758f940f5c9edda4393d3f67426c
[ "Apache-2.0" ]
null
null
null
# GENERATED VERSION FILE # TIME: Thu May 6 12:37:04 2021 __version__ = '1.2.0+unknown' short_version = '1.2.0' version_info = (1, 2, 0)
19.714286
32
0.673913
# GENERATED VERSION FILE # TIME: Thu May 6 12:37:04 2021 __version__ = '1.2.0+unknown' short_version = '1.2.0' version_info = (1, 2, 0)
0
0
0
bc739c336cba3a55680b1b743c4ba434c0f1e5dd
3,818
py
Python
franka_panda/pybullet_simulation/rope.py
carmelrabinov/contrastive-domain-randomization
f6fc6173a072da821d1b2ab6bd9558bf7e609bd4
[ "MIT" ]
5
2021-06-08T14:57:35.000Z
2021-07-30T17:12:00.000Z
franka_panda/pybullet_simulation/rope.py
carmelrabinov/contrastive-domain-randomization
f6fc6173a072da821d1b2ab6bd9558bf7e609bd4
[ "MIT" ]
null
null
null
franka_panda/pybullet_simulation/rope.py
carmelrabinov/contrastive-domain-randomization
f6fc6173a072da821d1b2ab6bd9558bf7e609bd4
[ "MIT" ]
5
2021-06-08T14:57:41.000Z
2022-03-03T10:52:11.000Z
import pybullet_data import pybullet as p import numpy as np if __name__ == '__main__': p.connect(p.GUI) p.setAdditionalSearchPath(pybullet_data.getDataPath()) plane = p.createCollisionShape(p.GEOM_PLANE) p.changeDynamics(plane, -1, lateralFriction=1) p.createMultiBody(0, plane) p.setGravity...
40.617021
163
0.592981
import pybullet_data import pybullet as p import numpy as np class TextureRope: @classmethod def load(cls, basePosition: np.ndarray = [0, 0, 1], baseOrientation: np.ndarray = [0, 0, 0, 1], length: int = 80, thickness: float = 0.015, physicsClientId: int = 0) -> int: sphereRadius = thick...
3,253
85
23
6ed8da6da189ba8a484a059fc6aed4672f0c2f0d
662
py
Python
assets_new_new/data/2021-03-05/json_for_classification/get_classification_file_with_padim_segment.py
ggzhang0071/PaDiM-Anomaly-Detection-Localization-master
823404d45be078348328c7c6cd16e8ac11a51587
[ "Apache-2.0" ]
null
null
null
assets_new_new/data/2021-03-05/json_for_classification/get_classification_file_with_padim_segment.py
ggzhang0071/PaDiM-Anomaly-Detection-Localization-master
823404d45be078348328c7c6cd16e8ac11a51587
[ "Apache-2.0" ]
null
null
null
assets_new_new/data/2021-03-05/json_for_classification/get_classification_file_with_padim_segment.py
ggzhang0071/PaDiM-Anomaly-Detection-Localization-master
823404d45be078348328c7c6cd16e8ac11a51587
[ "Apache-2.0" ]
null
null
null
from get_classification_file_with_original_annotation import get_image_label_dict_from_original_annotation, get_classification_file_based_on_label original_annotation_path="/git/PaDiM-master/assets_new_new/data/2021-03-05/json_for_classification" image_data_root="/git/PaDiM-master/kangqiang_result/segment_image_resul...
66.2
147
0.906344
from get_classification_file_with_original_annotation import get_image_label_dict_from_original_annotation, get_classification_file_based_on_label original_annotation_path="/git/PaDiM-master/assets_new_new/data/2021-03-05/json_for_classification" image_data_root="/git/PaDiM-master/kangqiang_result/segment_image_resul...
0
0
0
9694b173393bf97b637e9f4591da6ed55639fb6b
1,393
py
Python
test_programs/configWriter.py
hackpsu-tech/hackPSUS2018-rfid
0f33b588ddbf4a82ced9a25ba8a8384649b16017
[ "MIT" ]
null
null
null
test_programs/configWriter.py
hackpsu-tech/hackPSUS2018-rfid
0f33b588ddbf4a82ced9a25ba8a8384649b16017
[ "MIT" ]
2
2018-04-02T14:32:13.000Z
2018-08-20T22:54:15.000Z
test_programs/configWriter.py
hackpsu-tech/hackPSUS2018-rfid
0f33b588ddbf4a82ced9a25ba8a8384649b16017
[ "MIT" ]
null
null
null
#!/usr/bin/python """ This application reads key value pairs from the command line input and writes to a dictionary, which is then written to a config file The preferred file extension is .cfg """ import signal import sys import HackPSUconfig as config #Initialize a dictionary and define the save and configFile variab...
27.86
133
0.740847
#!/usr/bin/python """ This application reads key value pairs from the command line input and writes to a dictionary, which is then written to a config file The preferred file extension is .cfg """ import signal import sys import HackPSUconfig as config #Initialize a dictionary and define the save and configFile variab...
0
0
0
6bfb814ea616ff65d9e7fd08ee83b2e4756f1452
473
py
Python
criminals/migrations/0007_auto_20210220_1756.py
Three-Dev-Musketeers/Mumbai_Police
293fbc1d81db459c23649c9c6b1eef8c38da1939
[ "MIT" ]
5
2021-02-19T20:37:35.000Z
2021-12-19T06:41:50.000Z
criminals/migrations/0007_auto_20210220_1756.py
Divesh2201/Mumbai_Police
dfabf8494de2c790178541ee20d37d3002ca12af
[ "MIT" ]
1
2021-10-04T17:37:51.000Z
2021-10-05T10:50:36.000Z
criminals/migrations/0007_auto_20210220_1756.py
Divesh2201/Mumbai_Police
dfabf8494de2c790178541ee20d37d3002ca12af
[ "MIT" ]
4
2021-03-05T05:44:20.000Z
2021-04-25T17:23:16.000Z
# Generated by Django 3.1.6 on 2021-02-20 12:26 from django.db import migrations, models
24.894737
128
0.591966
# Generated by Django 3.1.6 on 2021-02-20 12:26 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('criminals', '0006_auto_20210220_0039'), ] operations = [ migrations.AlterField( model_name='criminalsinfo', name='ge...
0
359
23
e77acee0e7c8543927359213b9828e1f5e62e248
1,480
py
Python
src/decoders/base_decoder.py
rproskuryakov/ai-journey-2020
ff589b5bfff2aa957f0b8308918cc1d6de764413
[ "MIT" ]
1
2021-03-05T16:02:08.000Z
2021-03-05T16:02:08.000Z
src/decoders/base_decoder.py
rproskuryakov/ai-journey-2020
ff589b5bfff2aa957f0b8308918cc1d6de764413
[ "MIT" ]
null
null
null
src/decoders/base_decoder.py
rproskuryakov/ai-journey-2020
ff589b5bfff2aa957f0b8308918cc1d6de764413
[ "MIT" ]
null
null
null
import logging from abc import ABC from abc import abstractmethod from typing import List import torch logger = logging.getLogger(__name__)
30.833333
102
0.586486
import logging from abc import ABC from abc import abstractmethod from typing import List import torch logger = logging.getLogger(__name__) class BaseDecoder(ABC): @abstractmethod def __init__(self, letters: List[str], *args, **kwargs): self.letters = letters self.blank_id = kwargs.get("bla...
1,079
234
23
b268de0e9446cae60748eb0b16a566e030c7f11b
836
py
Python
tests/test_load_config.py
Tommo565/titanic-mlflow
5bdaad5b90313db212fb2547eb5476a41ff22ccc
[ "MIT" ]
1
2022-02-06T19:57:54.000Z
2022-02-06T19:57:54.000Z
tests/test_load_config.py
Tommo565/titanic-mlflow
5bdaad5b90313db212fb2547eb5476a41ff22ccc
[ "MIT" ]
null
null
null
tests/test_load_config.py
Tommo565/titanic-mlflow
5bdaad5b90313db212fb2547eb5476a41ff22ccc
[ "MIT" ]
null
null
null
import os from src.utils.utils import load_config def test_load_config(): """Test the load_config function""" config = load_config(".env.test") assert config["app_name"] == os.getenv("APP_NAME") assert config["parameters_path"] == os.getenv("PARAMETERS_PATH") assert config["artifact_path"] == os...
41.8
76
0.7189
import os from src.utils.utils import load_config def test_load_config(): """Test the load_config function""" config = load_config(".env.test") assert config["app_name"] == os.getenv("APP_NAME") assert config["parameters_path"] == os.getenv("PARAMETERS_PATH") assert config["artifact_path"] == os...
0
0
0
7c87a8a9a811d1766417700029f13134caee55c9
2,927
py
Python
hierarkey/forms.py
rixx/django-hierarkey
e61f03bd1a35489905f3b08fdc18755f1ed07973
[ "Apache-2.0" ]
16
2017-04-09T16:41:50.000Z
2022-03-07T17:39:55.000Z
hierarkey/forms.py
rixx/django-hierarkey
e61f03bd1a35489905f3b08fdc18755f1ed07973
[ "Apache-2.0" ]
13
2017-04-08T06:54:49.000Z
2022-03-07T08:55:15.000Z
hierarkey/forms.py
rixx/django-hierarkey
e61f03bd1a35489905f3b08fdc18755f1ed07973
[ "Apache-2.0" ]
6
2017-07-12T19:20:10.000Z
2020-07-21T14:18:50.000Z
import logging from django import forms from django.core.files import File from django.core.files.storage import default_storage from django.core.files.uploadedfile import UploadedFile from django.utils.crypto import get_random_string from django.utils.translation import gettext_lazy as _ logger = logging.getLogger(_...
37.525641
102
0.568842
import logging from django import forms from django.core.files import File from django.core.files.storage import default_storage from django.core.files.uploadedfile import UploadedFile from django.utils.crypto import get_random_string from django.utils.translation import gettext_lazy as _ logger = logging.getLogger(_...
238
0
27
66bc83c1998fe5920bedce5f0b443cae6461ddf5
950
py
Python
ensg2hugo.py
tingmanz/trgn_assignment4
21ff919ae55693025c67d9401280a9455779fcdd
[ "MIT" ]
null
null
null
ensg2hugo.py
tingmanz/trgn_assignment4
21ff919ae55693025c67d9401280a9455779fcdd
[ "MIT" ]
null
null
null
ensg2hugo.py
tingmanz/trgn_assignment4
21ff919ae55693025c67d9401280a9455779fcdd
[ "MIT" ]
null
null
null
#!/usr/bin/python import sys import re import pandas as pd import csv if sys.argv[1].startswith("-f"): col_number = int(sys.argv[1][2]) - 1 input_file = sys.argv[2] else: col_number = 0 input_file = sys.argv[1] name_dict = {} with open("Homo_sapiens.GRCh37.75.gtf", "r") as f: for line in f: i...
27.142857
82
0.651579
#!/usr/bin/python import sys import re import pandas as pd import csv if sys.argv[1].startswith("-f"): col_number = int(sys.argv[1][2]) - 1 input_file = sys.argv[2] else: col_number = 0 input_file = sys.argv[1] name_dict = {} with open("Homo_sapiens.GRCh37.75.gtf", "r") as f: for line in f: i...
0
0
0
f635f9009cad44c08999f18e44479f6b58e99477
1,090
py
Python
238.Product_of_Array_Except_Self.py
wanxin-code/leetcode
524d744202c4c887fda0a60861f80b30d706da67
[ "MIT" ]
1
2019-10-17T10:39:27.000Z
2019-10-17T10:39:27.000Z
238.Product_of_Array_Except_Self.py
wanxin-code/leetcode
524d744202c4c887fda0a60861f80b30d706da67
[ "MIT" ]
null
null
null
238.Product_of_Array_Except_Self.py
wanxin-code/leetcode
524d744202c4c887fda0a60861f80b30d706da67
[ "MIT" ]
null
null
null
#Array """ Idea: let forward[i] = nums[0]*nums[1]*...*nums[i-1] ,backward[i] = backward[i] = nums[i+1]*nums[i+2]*...*nums[n], then, res[i] = forward[i]*backward[i] """ import unittest unittest.main()
27.25
108
0.566055
#Array """ Idea: let forward[i] = nums[0]*nums[1]*...*nums[i-1] ,backward[i] = backward[i] = nums[i+1]*nums[i+2]*...*nums[n], then, res[i] = forward[i]*backward[i] """ class Solution: def productExceptSelf(self, nums): forward = [1] #forward[i] = nums[0]*nums[1]*...*nums[i-1] for item in nums[:-1...
717
90
71