hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
max_stars_repo_head_hexsha
stringlengths
40
40
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
191k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
245
max_issues_repo_name
stringlengths
6
130
max_issues_repo_head_hexsha
stringlengths
40
40
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
67k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
245
max_forks_repo_name
stringlengths
6
130
max_forks_repo_head_hexsha
stringlengths
40
40
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
08fa3be07f84da2ca16f3fe5a61c4f6b686d24a2
3,285
py
Python
art/preprocessing/standardisation_mean_std/standardisation_mean_std_pytorch.py
btlorch/adversarial-robustness-toolbox
3789bd9fa7b6ea6f62e0ffe61df362dfa9f6df5e
[ "MIT" ]
1
2021-03-03T10:32:36.000Z
2021-03-03T10:32:36.000Z
art/preprocessing/standardisation_mean_std/standardisation_mean_std_pytorch.py
btlorch/adversarial-robustness-toolbox
3789bd9fa7b6ea6f62e0ffe61df362dfa9f6df5e
[ "MIT" ]
null
null
null
art/preprocessing/standardisation_mean_std/standardisation_mean_std_pytorch.py
btlorch/adversarial-robustness-toolbox
3789bd9fa7b6ea6f62e0ffe61df362dfa9f6df5e
[ "MIT" ]
null
null
null
# MIT License # # Copyright (C) The Adversarial Robustness Toolbox (ART) Authors 2020 # # Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated # documentation files (the "Software"), to deal in the Software without restriction, including without limitation the # r...
36.5
120
0.680061
import logging from typing import Optional, Tuple, TYPE_CHECKING from art.preprocessing.preprocessing import PreprocessorPyTorch if TYPE_CHECKING: import torch logger = logging.getLogger(__name__) class StandardisationMeanStdPyTorch(PreprocessorPyTorch): params = ["mean", "std", "apply_fit", "apply_predic...
true
true
08fa3be617590714cdd88daaf9e37b26fd90f280
8,845
py
Python
isi_sdk_8_1_0/isi_sdk_8_1_0/models/ndmp_contexts_backup_context.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
24
2018-06-22T14:13:23.000Z
2022-03-23T01:21:26.000Z
isi_sdk_8_1_0/isi_sdk_8_1_0/models/ndmp_contexts_backup_context.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
46
2018-04-30T13:28:22.000Z
2022-03-21T21:11:07.000Z
isi_sdk_8_1_0/isi_sdk_8_1_0/models/ndmp_contexts_backup_context.py
mohitjain97/isilon_sdk_python
a371f438f542568edb8cda35e929e6b300b1177c
[ "Unlicense" ]
29
2018-06-19T00:14:04.000Z
2022-02-08T17:51:19.000Z
# coding: utf-8 """ Isilon SDK Isilon SDK - Language bindings for the OneFS API # noqa: E501 OpenAPI spec version: 5 Contact: sdk@isilon.com Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class NdmpContextsBackupContext(...
28.440514
149
0.590503
import pprint import re import six class NdmpContextsBackupContext(object): swagger_types = { 'context_id': 'str', 'id': 'str', 'path': 'str', 'snapid': 'int', 'start_time': 'int', 'status': 'str', 'total_sessions': 'int', 'type': 'str' } ...
true
true
08fa3bf2348e565c08da29d2e48d53a7922e4d29
853
py
Python
SDK/CPP/tests/test_intrinsics.py
knicos/voltu
70b39da7069f8ffd7e33aeb5bdacc84fe4a78f01
[ "MIT" ]
4
2020-12-28T15:29:15.000Z
2021-06-27T12:37:15.000Z
SDK/CPP/tests/test_intrinsics.py
knicos/voltu
70b39da7069f8ffd7e33aeb5bdacc84fe4a78f01
[ "MIT" ]
null
null
null
SDK/CPP/tests/test_intrinsics.py
knicos/voltu
70b39da7069f8ffd7e33aeb5bdacc84fe4a78f01
[ "MIT" ]
2
2021-01-13T05:28:39.000Z
2021-05-04T03:37:11.000Z
import unittest import voltu import numpy as np class Intrinsics(unittest.TestCase): def test_default_ctor(self): intr = voltu.Intrinsics() self.assertIsNotNone(intr) def test_create(self): fx = 2.0 fy = 3.0 cx = 4.0 cy = 5.0 w = 6 h = 7 ...
21.325
60
0.468933
import unittest import voltu import numpy as np class Intrinsics(unittest.TestCase): def test_default_ctor(self): intr = voltu.Intrinsics() self.assertIsNotNone(intr) def test_create(self): fx = 2.0 fy = 3.0 cx = 4.0 cy = 5.0 w = 6 h = 7 ...
true
true
08fa3c6d214fdea95bf04579ae6a8c94266a8878
4,730
py
Python
tests/helpers/datamodules.py
aleSuglia/pytorch-lightning
16213b16356f5bd97b8cc8bf1849eacd68d658c5
[ "Apache-2.0" ]
3
2021-10-04T05:08:28.000Z
2021-10-04T06:04:06.000Z
tests/helpers/datamodules.py
truong2710-cyber/pytorch-lightning
4610fddb19d502e534b5c5d77c3dfd6f2e5359a5
[ "Apache-2.0" ]
2
2021-03-22T00:20:28.000Z
2021-06-25T11:35:33.000Z
tests/helpers/datamodules.py
truong2710-cyber/pytorch-lightning
4610fddb19d502e534b5c5d77c3dfd6f2e5359a5
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # 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 i...
38.770492
117
0.704651
from typing import Optional import torch from torch.utils.data import DataLoader from pytorch_lightning.core.datamodule import LightningDataModule from pytorch_lightning.utilities import _module_available from tests.helpers.datasets import MNIST, SklearnDataset, TrialMNIST _SKLEARN_AVAILABLE = _module_available("skl...
true
true
08fa3d078b45c347173508cefc588d887e0550e3
1,653
py
Python
module/blogmura.py
GK11years/test
64511b28a6e5a2a195a734ba3f158d4bd03fd5b9
[ "MIT" ]
null
null
null
module/blogmura.py
GK11years/test
64511b28a6e5a2a195a734ba3f158d4bd03fd5b9
[ "MIT" ]
3
2021-05-26T04:34:21.000Z
2021-06-01T12:15:21.000Z
module/blogmura.py
GK11years/test
64511b28a6e5a2a195a734ba3f158d4bd03fd5b9
[ "MIT" ]
null
null
null
import requests from bs4 import BeautifulSoup def remove_tags(results): # remove tag soup = BeautifulSoup(results, "html.parser") for data in soup(['style', 'script']): # Remove tags data.decompose() # return data by retrieving the tag content return ' '.join(soup.stripped_string...
26.238095
142
0.651543
import requests from bs4 import BeautifulSoup def remove_tags(results): soup = BeautifulSoup(results, "html.parser") for data in soup(['style', 'script']): data.decompose() return ' '.join(soup.stripped_strings) request_headers = { "user-agent": "Mozilla/5.0 (Macintosh; Int...
false
true
08fa3d6e68bd27ca11fd3786707d3174bd94ea22
677
py
Python
example/qt.py
martindurant/ROI
da698e414dad282920a284d0511ef72bced05e22
[ "BSD-2-Clause" ]
1
2021-03-09T23:41:27.000Z
2021-03-09T23:41:27.000Z
example/qt.py
martindurant/streamz-q
da698e414dad282920a284d0511ef72bced05e22
[ "BSD-2-Clause" ]
null
null
null
example/qt.py
martindurant/streamz-q
da698e414dad282920a284d0511ef72bced05e22
[ "BSD-2-Clause" ]
null
null
null
from PyQt5.QtWidgets import QApplication, QWidget import queue from streamz_q.plugin import from_q class QueueWidget(QWidget): """Simplest possible widget, passing drag events to a given Queue""" def __init__(self, q, **kwargs): self.q = q super().__init__(**kwargs) def mouseMoveEvent(se...
20.515152
72
0.62777
from PyQt5.QtWidgets import QApplication, QWidget import queue from streamz_q.plugin import from_q class QueueWidget(QWidget): def __init__(self, q, **kwargs): self.q = q super().__init__(**kwargs) def mouseMoveEvent(self, *args): self.q.put(args) super().mouseMoveEvent(*args...
true
true
08fa3db4505a181188e3d27d4f2ae45c1fbbf6f6
8,545
py
Python
xcube/core/resampling/spatial.py
bcdev/xcube
9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3
[ "MIT" ]
97
2018-06-26T13:02:55.000Z
2022-03-26T21:03:13.000Z
xcube/core/resampling/spatial.py
bcdev/xcube
9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3
[ "MIT" ]
524
2018-11-09T12:00:08.000Z
2022-03-31T17:00:13.000Z
xcube/core/resampling/spatial.py
bcdev/xcube
9d275ef3baef8fbcea5c1fbbfb84c3d0164aecd3
[ "MIT" ]
15
2019-07-09T08:46:03.000Z
2022-02-07T18:47:34.000Z
# The MIT License (MIT) # Copyright (c) 2021 by the xcube development team and contributors # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restriction, including without limitation...
41.480583
81
0.668578
from typing import Union, Callable, Mapping, Hashable, Any import numpy as np import xarray as xr from dask import array as da from xcube.core.gridmapping import GridMapping from xcube.core.gridmapping.helpers import scale_xy_res_and_size from .affine import affine_transform_dataset from .affine import resample_data...
true
true
08fa3ec22335043892363aef802d4bdcedca2ac7
474
py
Python
dsmpy/__init__.py
seismobassoon/dsmpy
4290269ff0998549a2eec25ed090417f8cf1bad7
[ "MIT" ]
null
null
null
dsmpy/__init__.py
seismobassoon/dsmpy
4290269ff0998549a2eec25ed090417f8cf1bad7
[ "MIT" ]
null
null
null
dsmpy/__init__.py
seismobassoon/dsmpy
4290269ff0998549a2eec25ed090417f8cf1bad7
[ "MIT" ]
null
null
null
import os from dsmpy.definitions import ROOT_DIR from .modelparameters import * # set global paths rootdsm_sh = os.path.join( ROOT_DIR, 'src_f90/tish/example/dsm_accuracy_check/') rootdsm_psv = os.path.join( ROOT_DIR, 'src_f90/tipsv/examples/') root_sac = os.path.join(ROOT_DIR, '../tests/sac_files/') root_sac_...
31.6
60
0.746835
import os from dsmpy.definitions import ROOT_DIR from .modelparameters import * rootdsm_sh = os.path.join( ROOT_DIR, 'src_f90/tish/example/dsm_accuracy_check/') rootdsm_psv = os.path.join( ROOT_DIR, 'src_f90/tipsv/examples/') root_sac = os.path.join(ROOT_DIR, '../tests/sac_files/') root_sac_2 = os.path.join(RO...
true
true
08fa3f5ff3ec688e018da3c7a2bf7cd42ea74bd2
2,289
py
Python
template_scripts/make_modelsMFA.py
dmccloskey/SBaaS_models
014783370e735719f3a6fc953b7c95af65be0bd6
[ "MIT" ]
null
null
null
template_scripts/make_modelsMFA.py
dmccloskey/SBaaS_models
014783370e735719f3a6fc953b7c95af65be0bd6
[ "MIT" ]
null
null
null
template_scripts/make_modelsMFA.py
dmccloskey/SBaaS_models
014783370e735719f3a6fc953b7c95af65be0bd6
[ "MIT" ]
null
null
null
import sys sys.path.append('C:/Users/dmccloskey-sbrg/Google Drive/SBaaS_base') from SBaaS_base.postgresql_settings import postgresql_settings from SBaaS_base.postgresql_orm import postgresql_orm # read in the settings file filename = 'C:/Users/dmccloskey-sbrg/Google Drive/SBaaS_base/settings_1.ini'; pg_settings = post...
48.702128
141
0.839231
import sys sys.path.append('C:/Users/dmccloskey-sbrg/Google Drive/SBaaS_base') from SBaaS_base.postgresql_settings import postgresql_settings from SBaaS_base.postgresql_orm import postgresql_orm filename = 'C:/Users/dmccloskey-sbrg/Google Drive/SBaaS_base/settings_1.ini'; pg_settings = postgresql_settings(filename); ...
true
true
08fa404e1828d711d8f51dd12071a145b925fc40
1,058
py
Python
sympy/stats/random_matrix.py
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
[ "MIT" ]
null
null
null
sympy/stats/random_matrix.py
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
[ "MIT" ]
null
null
null
sympy/stats/random_matrix.py
Michal-Gagala/sympy
3cc756c2af73b5506102abaeefd1b654e286e2c8
[ "MIT" ]
null
null
null
from sympy.core.basic import Basic from sympy.stats.rv import PSpace, _symbol_converter, RandomMatrixSymbol class RandomMatrixPSpace(PSpace): """ Represents probability space for random matrices. It contains the mechanics for handling the API calls for random matrices. """ def __new__(...
34.129032
76
0.617202
from sympy.core.basic import Basic from sympy.stats.rv import PSpace, _symbol_converter, RandomMatrixSymbol class RandomMatrixPSpace(PSpace): def __new__(cls, sym, model=None): sym = _symbol_converter(sym) if model: return Basic.__new__(cls, sym, model) else: ...
true
true
08fa41a86749e979430abae9359ecc27458c43ca
17,229
py
Python
src/the_tale/the_tale/game/emissaries/relations.py
al-arz/the-tale
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
[ "BSD-3-Clause" ]
null
null
null
src/the_tale/the_tale/game/emissaries/relations.py
al-arz/the-tale
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
[ "BSD-3-Clause" ]
null
null
null
src/the_tale/the_tale/game/emissaries/relations.py
al-arz/the-tale
542770257eb6ebd56a5ac44ea1ef93ff4ab19eb5
[ "BSD-3-Clause" ]
null
null
null
import smart_imports smart_imports.all() class STATE(rels_django.DjangoEnum): records = (('IN_GAME', 1, 'Работает'), ('OUT_GAME', 2, 'Вне игры')) class REMOVE_REASON(rels_django.DjangoEnum): records = (('NOT_REMOVED', 0, 'Не удалён'), ('KILLED', 1, 'Убит'), ('D...
50.973373
139
0.585002
import smart_imports smart_imports.all() class STATE(rels_django.DjangoEnum): records = (('IN_GAME', 1, 'Работает'), ('OUT_GAME', 2, 'Вне игры')) class REMOVE_REASON(rels_django.DjangoEnum): records = (('NOT_REMOVED', 0, 'Не удалён'), ('KILLED', 1, 'Убит'), ('D...
true
true
08fa4243ba5c715b2bf07d4321d4e230387e268f
1,870
py
Python
tests/keras/test_optimizers.py
xiaol/keras_
72084ffb9db5f2c4807793c0280e75ab50de36be
[ "MIT" ]
2
2017-06-27T10:03:36.000Z
2020-10-14T11:15:27.000Z
tests/keras/test_optimizers.py
xiaol/keras_
72084ffb9db5f2c4807793c0280e75ab50de36be
[ "MIT" ]
null
null
null
tests/keras/test_optimizers.py
xiaol/keras_
72084ffb9db5f2c4807793c0280e75ab50de36be
[ "MIT" ]
1
2019-10-13T07:21:56.000Z
2019-10-13T07:21:56.000Z
from __future__ import print_function import pytest from keras.utils.test_utils import get_test_data from keras.optimizers import SGD, RMSprop, Adagrad, Adadelta, Adam, Adamax from keras.models import Sequential from keras.layers.core import Dense, Activation from keras.utils.np_utils import to_categorical (X_train,...
27.910448
74
0.635829
from __future__ import print_function import pytest from keras.utils.test_utils import get_test_data from keras.optimizers import SGD, RMSprop, Adagrad, Adadelta, Adam, Adamax from keras.models import Sequential from keras.layers.core import Dense, Activation from keras.utils.np_utils import to_categorical (X_train,...
true
true
08fa431b746b00f3cce57bbc7ef28fe099b629a7
1,269
py
Python
src/python/utility/binding.py
andyjost/Sprite
7ecd6fc7d48d7f62da644e48c12c7b882e1a2929
[ "MIT" ]
1
2022-03-16T16:37:11.000Z
2022-03-16T16:37:11.000Z
src/python/utility/binding.py
andyjost/Sprite
7ecd6fc7d48d7f62da644e48c12c7b882e1a2929
[ "MIT" ]
null
null
null
src/python/utility/binding.py
andyjost/Sprite
7ecd6fc7d48d7f62da644e48c12c7b882e1a2929
[ "MIT" ]
null
null
null
del_ = object() class Binding(object): def __init__(self, mapping, key, value): self.committed = False self.key = key self.mapping = mapping self.value = value def commit(self): self.committed = True def __enter__(self): self.prev = self.mapping.get(self.key, del_) if self.value is...
23.072727
79
0.62569
del_ = object() class Binding(object): def __init__(self, mapping, key, value): self.committed = False self.key = key self.mapping = mapping self.value = value def commit(self): self.committed = True def __enter__(self): self.prev = self.mapping.get(self.key, del_) if self.value is...
true
true
08fa456809f29aed3cffe3e834cc362fa36b7ae5
690
py
Python
ahti/schema.py
City-of-Helsinki/ah
1a00df3f68a59e067af1f030c381ec9b809074da
[ "MIT" ]
null
null
null
ahti/schema.py
City-of-Helsinki/ah
1a00df3f68a59e067af1f030c381ec9b809074da
[ "MIT" ]
50
2019-11-20T15:05:58.000Z
2021-09-22T18:05:07.000Z
ahti/schema.py
City-of-Helsinki/ahti
1a00df3f68a59e067af1f030c381ec9b809074da
[ "MIT" ]
null
null
null
import graphene from django.conf import settings from django.utils.translation import gettext_lazy as _ from graphene_django.debug import DjangoDebug import categories.schema import features.schema _query_debug = {"debug": graphene.Field(DjangoDebug, name="_debug")} _query_default = { "__doc__": _("Ahti GraphQL A...
23.793103
77
0.752174
import graphene from django.conf import settings from django.utils.translation import gettext_lazy as _ from graphene_django.debug import DjangoDebug import categories.schema import features.schema _query_debug = {"debug": graphene.Field(DjangoDebug, name="_debug")} _query_default = { "__doc__": _("Ahti GraphQL A...
true
true
08fa457de4bf935aa74ea49389d3610e34fb81f5
4,179
py
Python
dask/tests/test_highgraph.py
ianthomas23/dask
7968e85e2edab95565ebbab1f936c9c549e29126
[ "BSD-3-Clause" ]
null
null
null
dask/tests/test_highgraph.py
ianthomas23/dask
7968e85e2edab95565ebbab1f936c9c549e29126
[ "BSD-3-Clause" ]
null
null
null
dask/tests/test_highgraph.py
ianthomas23/dask
7968e85e2edab95565ebbab1f936c9c549e29126
[ "BSD-3-Clause" ]
null
null
null
from functools import partial import os import pytest import dask import dask.array as da from dask.utils_test import inc from dask.highlevelgraph import HighLevelGraph, BasicLayer, Layer from dask.blockwise import Blockwise from dask.array.utils import assert_eq def test_visualize(tmpdir): pytest.importorskip(...
27.313725
94
0.61139
from functools import partial import os import pytest import dask import dask.array as da from dask.utils_test import inc from dask.highlevelgraph import HighLevelGraph, BasicLayer, Layer from dask.blockwise import Blockwise from dask.array.utils import assert_eq def test_visualize(tmpdir): pytest.importorskip(...
true
true
08fa45b48b88c2a43e7cbc872aeb3de34310f08f
1,229
py
Python
Scripts/simulation/open_street_director/open_street_director_commands.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/open_street_director/open_street_director_commands.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/open_street_director/open_street_director_commands.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\open_street_director\open_street_director_commands.py # Compiled at: 2016-07-18 22:40:09 # Size of s...
58.52381
140
0.820179
from server_commands.argument_helpers import TunableInstanceParam from sims4.commands import CommandType import sims4.commands, services @sims4.commands.Command('open_street.add_open_street_director') def add_open_street_director(open_street_director_type: TunableInstanceParam(sims4.resources.Types.OPEN_STREET_DIRECTO...
true
true
08fa4743d0a131fc4ba81416dae3a12748cace05
1,209
py
Python
networking_vsphere/utils/common_util.py
huadream/networking-vsphere
8669a78d4d2eb4620610fe7e4548cac7fbfa9e6a
[ "Apache-2.0" ]
8
2015-04-23T15:36:56.000Z
2019-03-06T13:23:28.000Z
networking_vsphere/utils/common_util.py
huadream/networking-vsphere
8669a78d4d2eb4620610fe7e4548cac7fbfa9e6a
[ "Apache-2.0" ]
1
2016-10-04T13:24:50.000Z
2016-10-04T13:24:50.000Z
networking_vsphere/utils/common_util.py
huadream/networking-vsphere
8669a78d4d2eb4620610fe7e4548cac7fbfa9e6a
[ "Apache-2.0" ]
19
2015-09-15T13:25:01.000Z
2019-09-03T08:23:21.000Z
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICEN...
35.558824
78
0.676592
def convert_propset_to_dict(propset_list): propset_dict = {} for prop in propset_list: propset_dict[prop.name] = prop.val return propset_dict def convert_objectupdate_to_dict(objectUpdate): changes = {} if (hasattr(objectUpdate, "changeSet") and objectUpdate.changeSet): ...
true
true
08fa49c5dcabd70e0c4eca86446b95703e4215ea
8,283
py
Python
designate-8.0.0/designate/backend/agent_backend/impl_knot2.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
null
null
null
designate-8.0.0/designate/backend/agent_backend/impl_knot2.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
5
2019-08-14T06:46:03.000Z
2021-12-13T20:01:25.000Z
designate-8.0.0/designate/backend/agent_backend/impl_knot2.py
scottwedge/OpenStack-Stein
7077d1f602031dace92916f14e36b124f474de15
[ "Apache-2.0" ]
2
2020-03-15T01:24:15.000Z
2020-07-22T20:34:26.000Z
# Copyright 2016 Hewlett Packard Enterprise Development Company LP # # Author: Federico Ceratto <federico.ceratto@hpe.com> # # 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....
34.656904
79
0.623083
import six from oslo_concurrency import lockutils from oslo_concurrency.processutils import ProcessExecutionError from oslo_config import cfg from oslo_log import log as logging from designate import exceptions from designate.backend.agent_backend import base from designate.utils import execute LOG = logging.getLo...
true
true
08fa4ae1681847a2acdce2f7c29b0edf2f55edc4
937
py
Python
label_studio/io_storages/utils.py
xhuaustc/label-studio
b787824a9e16f488a9b4cd2cef83e1ac526a64f3
[ "Apache-2.0" ]
1
2021-04-13T15:03:01.000Z
2021-04-13T15:03:01.000Z
label_studio/io_storages/utils.py
xhuaustc/label-studio
b787824a9e16f488a9b4cd2cef83e1ac526a64f3
[ "Apache-2.0" ]
1
2021-04-02T14:58:03.000Z
2021-04-02T14:59:54.000Z
label_studio/io_storages/utils.py
xhuaustc/label-studio
b787824a9e16f488a9b4cd2cef83e1ac526a64f3
[ "Apache-2.0" ]
1
2021-05-24T15:46:08.000Z
2021-05-24T15:46:08.000Z
"""This file and its contents are licensed under the Apache License 2.0. Please see the included NOTICE for copyright information and LICENSE for a copy of the license. """ import logging import re logger = logging.getLogger(__name__) # Put storage prefixes here uri_regex = r"[\s\'\"]?(?P<uri>(?P<storage>{})://([^/\s...
37.48
168
0.632871
import logging import re logger = logging.getLogger(__name__) uri_regex = r"[\s\'\"]?(?P<uri>(?P<storage>{})://([^/\s]+)/(.*?[^/\s]+/?[^\s\'\">]+))[\s\'\"]?" def get_uri_via_regex(data, prefixes=('s3', 'gs')): try: uri_regex_prepared = uri_regex.format('|'.join(prefixes)) r_match = re.search(uri...
true
true
08fa4b198c7f3caed012b6eed9ebb557173436b1
2,419
py
Python
src/data/get_raw_data.py
hpinsley/titanic
1436dc32c4f0b10586ce83c551d04010c81a9617
[ "MIT" ]
null
null
null
src/data/get_raw_data.py
hpinsley/titanic
1436dc32c4f0b10586ce83c551d04010c81a9617
[ "MIT" ]
null
null
null
src/data/get_raw_data.py
hpinsley/titanic
1436dc32c4f0b10586ce83c551d04010c81a9617
[ "MIT" ]
null
null
null
import os from dotenv import load_dotenv, find_dotenv import logging import requests from requests import session def extract_data(url, file_path): """ Extract data from the kaggle website """ login_url = "https://www.kaggle.com/account/login" with session() as c: # We need to first get th...
36.104478
86
0.651509
import os from dotenv import load_dotenv, find_dotenv import logging import requests from requests import session def extract_data(url, file_path): login_url = "https://www.kaggle.com/account/login" with session() as c: html_page = c.get(login_url).text index = html_page.index('antiFor...
true
true
08fa4b97666281137ae1b13420611458bbe3ebb8
1,034
py
Python
NaiveBayesFromScratch.py
pth051001/Gender-Recognition-by-Voice-with-different-ML-classification-methods
5158f951d8df52eeff229c80555194d50aeca41e
[ "MIT" ]
null
null
null
NaiveBayesFromScratch.py
pth051001/Gender-Recognition-by-Voice-with-different-ML-classification-methods
5158f951d8df52eeff229c80555194d50aeca41e
[ "MIT" ]
null
null
null
NaiveBayesFromScratch.py
pth051001/Gender-Recognition-by-Voice-with-different-ML-classification-methods
5158f951d8df52eeff229c80555194d50aeca41e
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt from scipy.stats import multivariate_normal class NaiveBayesFromScratch(): def __init__(self, X, y): self.num_examples, self.num_features = X.shape self.num_classes = len(np.unique(y)) def fit(self, X, y): self.classes_mean =...
36.928571
116
0.59381
import numpy as np import matplotlib.pyplot as plt from scipy.stats import multivariate_normal class NaiveBayesFromScratch(): def __init__(self, X, y): self.num_examples, self.num_features = X.shape self.num_classes = len(np.unique(y)) def fit(self, X, y): self.classes_mean =...
true
true
08fa4beb6915119a3bd239d648356ee2110e0a46
91
py
Python
data/studio21_generated/test/interview/2746/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/test/interview/2746/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
data/studio21_generated/test/interview/2746/starter_code.py
vijaykumawat256/Prompt-Summarization
614f5911e2acd2933440d909de2b4f86653dc214
[ "Apache-2.0" ]
null
null
null
class Solution: def compareVersion(self, version1: str, version2: str) -> int:
30.333333
66
0.648352
class Solution: def compareVersion(self, version1: str, version2: str) -> int:
false
true
08fa4bf6e1150d7e7b327b0ba1a1deb9b005e482
14,220
py
Python
code_florian/scripts/make_preds.py
artyompal/kaggle_salt
3c323755730745ac7bbfd106f1f20919cceef0ee
[ "MIT" ]
null
null
null
code_florian/scripts/make_preds.py
artyompal/kaggle_salt
3c323755730745ac7bbfd106f1f20919cceef0ee
[ "MIT" ]
1
2021-03-25T23:31:26.000Z
2021-03-25T23:31:28.000Z
code_florian/scripts/make_preds.py
artyompal/kaggle_salt
3c323755730745ac7bbfd106f1f20919cceef0ee
[ "MIT" ]
1
2018-11-08T09:30:38.000Z
2018-11-08T09:30:38.000Z
import os import pickle import sys import time import math import argparse from typing import Any, List import numpy as np import pandas as pd import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable import torch.backends.cudnn as cudnn import torch.nn.functional as F import...
37.92
116
0.612447
import os import pickle import sys import time import math import argparse from typing import Any, List import numpy as np import pandas as pd import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable import torch.backends.cudnn as cudnn import torch.nn.functional as F import...
true
true
08fa4c1807b9424b1885d88a0e88290fc0b084b5
1,929
py
Python
tools/test.py
likyoo/ZCls
568621aca3a8b090c93345f0858d52c5757f2f0e
[ "Apache-2.0" ]
1
2021-05-07T12:54:03.000Z
2021-05-07T12:54:03.000Z
tools/test.py
likyoo/ZCls
568621aca3a8b090c93345f0858d52c5757f2f0e
[ "Apache-2.0" ]
null
null
null
tools/test.py
likyoo/ZCls
568621aca3a8b090c93345f0858d52c5757f2f0e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- """ @date: 2020/9/18 上午9:15 @file: tests.py @author: zj @description: """ import os import numpy as np import torch from zcls.data.build import build_dataloader from zcls.model.recognizers.build import build_recognizer from zcls.engine.inference import do_evaluation from zcls.util.collect_en...
26.791667
72
0.728357
import os import numpy as np import torch from zcls.data.build import build_dataloader from zcls.model.recognizers.build import build_recognizer from zcls.engine.inference import do_evaluation from zcls.util.collect_env import collect_env_info from zcls.util import logging from zcls.util.distributed import get_devic...
true
true
08fa4c4859f83e1ef76456d70bb145ab457eadda
10,584
py
Python
Configuration/Applications/python/cmsDriverOptions.py
Nik-Menendez/L1Trigger
5336631cc0a517495869279ed7d3a4cac8d4e5e5
[ "Apache-2.0" ]
3
2018-08-24T19:10:26.000Z
2019-02-19T11:45:32.000Z
Configuration/Applications/python/cmsDriverOptions.py
Nik-Menendez/L1Trigger
5336631cc0a517495869279ed7d3a4cac8d4e5e5
[ "Apache-2.0" ]
3
2018-08-23T13:40:24.000Z
2019-12-05T21:16:03.000Z
Configuration/Applications/python/cmsDriverOptions.py
Nik-Menendez/L1Trigger
5336631cc0a517495869279ed7d3a4cac8d4e5e5
[ "Apache-2.0" ]
5
2018-08-21T16:37:52.000Z
2020-01-09T13:33:17.000Z
#! /usr/bin/env python # A Pyrelval Wrapper from __future__ import print_function import optparse import sys import os import re import Configuration.Applications from Configuration.Applications.ConfigBuilder import ConfigBuilder, defaultOptions import traceback from functools import reduce def checkModifier(era): ...
38.627737
192
0.609977
from __future__ import print_function import optparse import sys import os import re import Configuration.Applications from Configuration.Applications.ConfigBuilder import ConfigBuilder, defaultOptions import traceback from functools import reduce def checkModifier(era): from FWCore.ParameterSet.Config import Mo...
true
true
08fa4c917631c02bb0c4605d34b6c2c3d0c93dc8
6,188
py
Python
libs/units/composed_unit.py
mscansian/drpexe-uploader
de17baf9085155a046b8e5f68b0b3191a2ce1847
[ "MIT" ]
null
null
null
libs/units/composed_unit.py
mscansian/drpexe-uploader
de17baf9085155a046b8e5f68b0b3191a2ce1847
[ "MIT" ]
null
null
null
libs/units/composed_unit.py
mscansian/drpexe-uploader
de17baf9085155a046b8e5f68b0b3191a2ce1847
[ "MIT" ]
null
null
null
"""Composed units are quotients of products of other units (but not other composed units.) Utility methods here for working with abstract fractions.""" from units.abstract import AbstractUnit from units.compatibility import compatible def unbox(numer, denom, multiplier): """Attempts to convert the fractional unit...
32.397906
78
0.565288
from units.abstract import AbstractUnit from units.compatibility import compatible def unbox(numer, denom, multiplier): if not denom and not numer: return multiplier if not denom and len(numer) == 1 and multiplier == 1: return numer[0] return None def cancel(numer, denom): multipli...
true
true
08fa4cf85b500429d98fd610ad4442248db01fca
1,240
py
Python
setup.py
anisov/math-round
b3f891536dda79c5f3a0fab6e51e1683c96ef0f2
[ "MIT" ]
null
null
null
setup.py
anisov/math-round
b3f891536dda79c5f3a0fab6e51e1683c96ef0f2
[ "MIT" ]
1
2020-03-15T23:25:55.000Z
2020-03-15T23:25:55.000Z
setup.py
anisov/math-round
b3f891536dda79c5f3a0fab6e51e1683c96ef0f2
[ "MIT" ]
null
null
null
import os from setuptools import setup, Extension, find_packages def read(fname): with open(os.path.join(os.path.dirname(__file__), fname)) as f: return f.read() SRC_DIR = "math_round" REQUIRES = ['cython'] ext = Extension(name=SRC_DIR + '.c_math_round', sources=[SRC_DIR + "/c_math_round.py...
31.794872
89
0.58629
import os from setuptools import setup, Extension, find_packages def read(fname): with open(os.path.join(os.path.dirname(__file__), fname)) as f: return f.read() SRC_DIR = "math_round" REQUIRES = ['cython'] ext = Extension(name=SRC_DIR + '.c_math_round', sources=[SRC_DIR + "/c_math_round.py...
true
true
08fa4d3d1f3a4074879a8665f663c0715ca32d2a
549
py
Python
doc/filter.py
yuri1969/pgbouncer
f60acea0ee343e71fd8bf230d2c37260a7ad2c49
[ "0BSD" ]
1,535
2015-04-10T17:36:50.000Z
2022-03-31T08:31:44.000Z
doc/filter.py
RekGRpth/pgbouncer
8eb4c356daa0fe75eb99a6c0c5bbcf912319aec1
[ "0BSD" ]
586
2015-04-10T09:46:47.000Z
2022-03-30T18:52:03.000Z
doc/filter.py
RekGRpth/pgbouncer
8eb4c356daa0fe75eb99a6c0c5bbcf912319aec1
[ "0BSD" ]
374
2015-04-10T08:45:35.000Z
2022-03-23T09:55:43.000Z
#!/usr/bin/env python3 import fileinput import os import sys for line in fileinput.input(): # substitute package version if line.startswith('% '): line = line.replace('@PACKAGE_VERSION@', os.environ['PACKAGE_VERSION']) # drop level-1 header if line.startswith('# '): continue # decr...
26.142857
79
0.624772
import fileinput import os import sys for line in fileinput.input(): if line.startswith('% '): line = line.replace('@PACKAGE_VERSION@', os.environ['PACKAGE_VERSION']) if line.startswith('# '): continue if line.startswith('##'): line = line.replace('#', '', 1) if...
true
true
08fa4e8e7ef8ddbb54e1ef1db1dbd5188cceaf6f
2,201
py
Python
InformationScripting/scripts/table.py
dimitar-asenov/Envision
1ab5c846fca502b7fe73ae4aff59e8746248446c
[ "BSD-3-Clause" ]
75
2015-01-18T13:29:43.000Z
2022-01-14T08:02:01.000Z
InformationScripting/scripts/table.py
dimitar-asenov/Envision
1ab5c846fca502b7fe73ae4aff59e8746248446c
[ "BSD-3-Clause" ]
364
2015-01-06T10:20:21.000Z
2018-12-17T20:12:28.000Z
InformationScripting/scripts/table.py
dimitar-asenov/Envision
1ab5c846fca502b7fe73ae4aff59e8746248446c
[ "BSD-3-Clause" ]
14
2015-01-09T00:44:24.000Z
2022-02-22T15:01:44.000Z
import html from xml.etree import ElementTree from xml.etree.ElementTree import Element, SubElement from xml.dom import minidom def getNames(node): if node: names = getNames(node.parent) if node.symbolName(): names.append(node.symbolName()) return names else: return...
25.298851
76
0.614721
import html from xml.etree import ElementTree from xml.etree.ElementTree import Element, SubElement from xml.dom import minidom def getNames(node): if node: names = getNames(node.parent) if node.symbolName(): names.append(node.symbolName()) return names else: return...
true
true
08fa4f29b25bbee0eb03e9ea2eab23a4cac5f4e4
6,734
py
Python
board.py
samsepi0x0/TicTacToe-AI
3e15302443ff63e14c27cb1ced7aae5fa9525663
[ "MIT" ]
2
2021-06-14T09:07:40.000Z
2021-07-16T03:38:37.000Z
board.py
samsepi0x0/TicTacToe-AI
3e15302443ff63e14c27cb1ced7aae5fa9525663
[ "MIT" ]
null
null
null
board.py
samsepi0x0/TicTacToe-AI
3e15302443ff63e14c27cb1ced7aae5fa9525663
[ "MIT" ]
1
2021-06-14T08:57:47.000Z
2021-06-14T08:57:47.000Z
import sys import random class Point(): def __init__(self, x, y): self.x = int(x) self.y = int(y) def printPoint(self): return "("+str(self.x)+", "+str(self.y)+")" class Board(): def __init__(self): self.NONE, self.X, self.O = 0, 1, 2 self.game =[[0,0,0] for _ in ra...
34.182741
230
0.435402
import sys import random class Point(): def __init__(self, x, y): self.x = int(x) self.y = int(y) def printPoint(self): return "("+str(self.x)+", "+str(self.y)+")" class Board(): def __init__(self): self.NONE, self.X, self.O = 0, 1, 2 self.game =[[0,0,0] for _ in ra...
true
true
08fa4f3d8c2484a9c0197f48167adb6018f2835d
2,089
py
Python
xpop/data/italy.py
alexamici/xpop
940f935dfd125d5d51ab7b71a281196c55b29da4
[ "Apache-2.0" ]
null
null
null
xpop/data/italy.py
alexamici/xpop
940f935dfd125d5d51ab7b71a281196c55b29da4
[ "Apache-2.0" ]
null
null
null
xpop/data/italy.py
alexamici/xpop
940f935dfd125d5d51ab7b71a281196c55b29da4
[ "Apache-2.0" ]
null
null
null
import numpy as np import pandas as pd import xarray as xr def istat_deaths_to_pandas(path): istat = pd.read_csv(path, encoding="8859", na_values="n.d.", dtype={"GE": str}) # make a date index from GE def ge2month_day(x): return f"{x[:2]}-{x[2:]}" month_day = istat["GE"].map(ge2month_day).va...
29.013889
84
0.552896
import numpy as np import pandas as pd import xarray as xr def istat_deaths_to_pandas(path): istat = pd.read_csv(path, encoding="8859", na_values="n.d.", dtype={"GE": str}) def ge2month_day(x): return f"{x[:2]}-{x[2:]}" month_day = istat["GE"].map(ge2month_day).values istat["month_day"] ...
true
true
08fa51f95eac4a577d808a9cb2ccaac352ad194f
1,900
py
Python
eLarning_LMS/users/views.py
Sayed-Noman/E-Classroom-LMS
1f168fd92a265e8bee6ff0fe370114d9a5a1d666
[ "CC0-1.0" ]
1
2021-07-05T16:56:12.000Z
2021-07-05T16:56:12.000Z
eLarning_LMS/users/views.py
Sayed-Noman/E-Classroom-LMS
1f168fd92a265e8bee6ff0fe370114d9a5a1d666
[ "CC0-1.0" ]
null
null
null
eLarning_LMS/users/views.py
Sayed-Noman/E-Classroom-LMS
1f168fd92a265e8bee6ff0fe370114d9a5a1d666
[ "CC0-1.0" ]
null
null
null
from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect from users.forms import UserProfileInfoForm,UserForm from django.contrib.auth import authenticate,login,logout from django.urls import reverse from django.contrib.auth.decorators import login_required def index(request): ...
28.358209
70
0.647368
from django.shortcuts import render from django.http import HttpResponse, HttpResponseRedirect from users.forms import UserProfileInfoForm,UserForm from django.contrib.auth import authenticate,login,logout from django.urls import reverse from django.contrib.auth.decorators import login_required def index(request): ...
true
true
08fa5208f2bcc6029dc1f08918908c7ff7e606dd
23,934
py
Python
good_morning/good_morning.py
wangnmiaon5/stock_investiment
468850106db71add64be1c81afad8209578a68ab
[ "MIT" ]
205
2015-08-04T14:42:26.000Z
2022-02-14T21:54:01.000Z
good_morning/good_morning.py
wangnmiaon5/stock_investiment
468850106db71add64be1c81afad8209578a68ab
[ "MIT" ]
20
2015-11-16T16:08:32.000Z
2021-02-02T19:31:49.000Z
good_morning/good_morning.py
wangnmiaon5/stock_investiment
468850106db71add64be1c81afad8209578a68ab
[ "MIT" ]
94
2015-06-14T08:32:21.000Z
2022-01-13T17:26:19.000Z
# Copyright (c) 2015 Peter Cerno # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distrib...
43.675182
97
0.566433
import csv import json import numpy as np import pandas as pd import re import urllib.request from bs4 import BeautifulSoup from datetime import date class KeyRatiosDownloader(object): def __init__(self, table_prefix = u'morningstar_'): self._table_prefix = table_prefix def download(self, ticker, co...
true
true
08fa5211fa0b168cf01f797809ce2d68dcec8e13
3,019
py
Python
sipsorcery-servers/SIPSorcery.SIPAppServer/proxyscript-outboundproxy.py
sipsorceryc4b/sipsorcery
d7d3fc567acd8a9a64d876d70513537d60203bb9
[ "BSD-3-Clause" ]
null
null
null
sipsorcery-servers/SIPSorcery.SIPAppServer/proxyscript-outboundproxy.py
sipsorceryc4b/sipsorcery
d7d3fc567acd8a9a64d876d70513537d60203bb9
[ "BSD-3-Clause" ]
null
null
null
sipsorcery-servers/SIPSorcery.SIPAppServer/proxyscript-outboundproxy.py
sipsorceryc4b/sipsorcery
d7d3fc567acd8a9a64d876d70513537d60203bb9
[ "BSD-3-Clause" ]
null
null
null
import clr clr.AddReference('SIPSorcery.SIP.Core') from SIPSorcery.SIP import * m_appServerSocket = "udp:10.0.0.100:5061" m_registrarSocket = "udp:127.0.0.1:5001" m_regAgentSocket = "udp:127.0.0.1:5002" m_proxySocket = "udp:127.0.0.1:5060" if isreq: #===== SIP Request Processing ===== #sys.Log("r...
38.705128
120
0.679695
import clr clr.AddReference('SIPSorcery.SIP.Core') from SIPSorcery.SIP import * m_appServerSocket = "udp:10.0.0.100:5061" m_registrarSocket = "udp:127.0.0.1:5001" m_regAgentSocket = "udp:127.0.0.1:5002" m_proxySocket = "udp:127.0.0.1:5060" if isreq: req.Header.MaxForwards = req.Header.MaxForward...
true
true
08fa521aef0541ed284913ac55139dc5a5e7c91f
6,825
py
Python
test/test_simple_nested_architectures.py
kundajelab/fastISM
1573feccba1ad5d9f1cee508f5bb03c4aa09bb2b
[ "MIT" ]
12
2020-09-20T17:03:48.000Z
2022-03-16T06:51:52.000Z
test/test_simple_nested_architectures.py
kundajelab/fastISM
1573feccba1ad5d9f1cee508f5bb03c4aa09bb2b
[ "MIT" ]
5
2020-10-24T20:43:45.000Z
2022-02-25T19:40:47.000Z
test/test_simple_nested_architectures.py
kundajelab/fastISM
1573feccba1ad5d9f1cee508f5bb03c4aa09bb2b
[ "MIT" ]
2
2020-10-14T05:18:55.000Z
2022-02-21T07:34:14.000Z
import tensorflow as tf import unittest from context import fastISM def conv_block(input_shape=(108,4)): inp = tf.keras.Input(shape=input_shape) x = tf.keras.layers.Conv1D(20, 3, padding='same')(inp) x = tf.keras.layers.MaxPooling1D(3)(x) x = tf.keras.layers.Conv1D(20, 5, padding='same')(x) x = tf...
33.787129
83
0.565861
import tensorflow as tf import unittest from context import fastISM def conv_block(input_shape=(108,4)): inp = tf.keras.Input(shape=input_shape) x = tf.keras.layers.Conv1D(20, 3, padding='same')(inp) x = tf.keras.layers.MaxPooling1D(3)(x) x = tf.keras.layers.Conv1D(20, 5, padding='same')(x) x = tf...
true
true
08fa528fdac140292f998ade047f50d96d8f13d3
4,508
py
Python
libraries/edge/writer/estemplateresponsewriter.py
apache/incubator-sdap-edge
c725dad1098096048faed9a42a56f3cfc5c25bc5
[ "Apache-2.0" ]
6
2017-11-16T07:34:47.000Z
2021-11-10T19:20:10.000Z
libraries/edge/writer/estemplateresponsewriter.py
apache/incubator-sdap-edge
c725dad1098096048faed9a42a56f3cfc5c25bc5
[ "Apache-2.0" ]
5
2019-02-11T23:46:22.000Z
2019-12-02T21:47:31.000Z
libraries/edge/writer/estemplateresponsewriter.py
apache/incubator-sdap-edge
c725dad1098096048faed9a42a56f3cfc5c25bc5
[ "Apache-2.0" ]
9
2017-11-16T07:34:54.000Z
2021-11-10T19:20:02.000Z
from types import * import logging import urllib.request, urllib.parse, urllib.error import json from collections import OrderedDict from edge.httputility import HttpUtility from edge.writer.templateresponsewriter import TemplateResponseWriter class ESTemplateResponseWriter(TemplateResponseWriter): def __init__(s...
38.529915
113
0.613354
from types import * import logging import urllib.request, urllib.parse, urllib.error import json from collections import OrderedDict from edge.httputility import HttpUtility from edge.writer.templateresponsewriter import TemplateResponseWriter class ESTemplateResponseWriter(TemplateResponseWriter): def __init__(s...
true
true
08fa534e666755f227c0399e2e8e333ebb56e5c1
512
py
Python
tests/test_grammars.py
cskau/abnf
ae10ba6451fe75f9a9f275f2f4f2767e2155b5c3
[ "MIT" ]
18
2020-04-19T12:47:31.000Z
2022-01-18T13:47:46.000Z
tests/test_grammars.py
cskau/abnf
ae10ba6451fe75f9a9f275f2f4f2767e2155b5c3
[ "MIT" ]
6
2020-05-11T13:34:58.000Z
2021-12-17T17:11:20.000Z
tests/test_grammars.py
cskau/abnf
ae10ba6451fe75f9a9f275f2f4f2767e2155b5c3
[ "MIT" ]
5
2020-04-17T19:10:01.000Z
2021-08-15T02:13:14.000Z
import pytest import abnf.grammars import pkgutil from importlib import import_module @pytest.mark.parametrize("rfc", map(import_module, ['%s.%s' % (abnf.grammars.__name__, x[1]) for x in pkgutil.walk_packages(abnf.grammars.__path__) if x[1] == 'cors' or x[1].startswith('rfc')])) def test_grammar(rfc): """Catches ...
39.384615
194
0.6875
import pytest import abnf.grammars import pkgutil from importlib import import_module @pytest.mark.parametrize("rfc", map(import_module, ['%s.%s' % (abnf.grammars.__name__, x[1]) for x in pkgutil.walk_packages(abnf.grammars.__path__) if x[1] == 'cors' or x[1].startswith('rfc')])) def test_grammar(rfc): for rule in...
true
true
08fa53730ae59a3e7446ab83bb1b61443e01bd48
1,779
py
Python
fhirclient/r4models/verificationresult_tests.py
Healthedata1/Flask-PL
88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1
[ "MIT" ]
null
null
null
fhirclient/r4models/verificationresult_tests.py
Healthedata1/Flask-PL
88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1
[ "MIT" ]
null
null
null
fhirclient/r4models/verificationresult_tests.py
Healthedata1/Flask-PL
88a2f40ca430c4cbb9fbded7fc92fdc166ebb9f1
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated from FHIR 4.0.0-a53ec6ee1b on 2019-05-07. # 2019, SMART Health IT. import os import io import unittest import json from . import verificationresult from .fhirdate import FHIRDate class VerificationResultTests(unittest.TestCase): def i...
41.372093
195
0.668353
import os import io import unittest import json from . import verificationresult from .fhirdate import FHIRDate class VerificationResultTests(unittest.TestCase): def instantiate_from(self, filename): datadir = os.environ.get('FHIR_UNITTEST_DATADIR') or '' with io.open(os.path.join(d...
true
true
08fa543c0a1b1d9045b3086053f42f384403ff00
205,369
py
Python
h2o-py/tests/pyunit_utils/utilsPY.py
Sloug/h2o-3
74f3eeee85aea3513adef1a7b519865d314a068a
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/pyunit_utils/utilsPY.py
Sloug/h2o-3
74f3eeee85aea3513adef1a7b519865d314a068a
[ "Apache-2.0" ]
null
null
null
h2o-py/tests/pyunit_utils/utilsPY.py
Sloug/h2o-3
74f3eeee85aea3513adef1a7b519865d314a068a
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function from future import standard_library standard_library.install_aliases() from builtins import range from past.builtins import basestring from scipy.sparse import csr_matrix import sys, os import pandas as pd from six import string_types try: # works with python 2.7 not 3 ...
52.510611
178
0.66569
from __future__ import print_function from future import standard_library standard_library.install_aliases() from builtins import range from past.builtins import basestring from scipy.sparse import csr_matrix import sys, os import pandas as pd from six import string_types try: from StringIO import StringIO ...
true
true
08fa544c7371154dc83273f5ccc16196b808deb4
1,660
py
Python
Linked_Lists/SinglyLinkedList/12-singly-linked-list-alternate-odd-even-nodes.py
mahmutcankurt/DataStructures_Python
bfb81e3530b535c4e48c07548dc4a4f9a648bab2
[ "MIT" ]
1
2022-01-25T22:17:55.000Z
2022-01-25T22:17:55.000Z
Linked_Lists/SinglyLinkedList/12-singly-linked-list-alternate-odd-even-nodes.py
mahmutcankurt/DataStructures_Python
bfb81e3530b535c4e48c07548dc4a4f9a648bab2
[ "MIT" ]
null
null
null
Linked_Lists/SinglyLinkedList/12-singly-linked-list-alternate-odd-even-nodes.py
mahmutcankurt/DataStructures_Python
bfb81e3530b535c4e48c07548dc4a4f9a648bab2
[ "MIT" ]
null
null
null
class Node: def __init__(self): self.data = 0 self.next = None def printList(node): while(node is not None): print(node.data, end=" ") node = node.next print(" ") def newNode(key): temp = Node() temp.data = key temp.next = None return temp def insertBegin...
17.473684
47
0.53012
class Node: def __init__(self): self.data = 0 self.next = None def printList(node): while(node is not None): print(node.data, end=" ") node = node.next print(" ") def newNode(key): temp = Node() temp.data = key temp.next = None return temp def insertBegin...
true
true
08fa54f7c62679c64cc72062d532c070e0d7bcb8
2,147
py
Python
src/data_prep.py
jasoriya/HackerEarth-DL-3-Challenge
b1bd5b3955913327408541ef4b14c260b9014593
[ "MIT" ]
2
2018-08-09T19:34:14.000Z
2018-08-09T19:34:15.000Z
src/data_prep.py
jasoriya/HackerEarth-DL-3-Challenge
b1bd5b3955913327408541ef4b14c260b9014593
[ "MIT" ]
null
null
null
src/data_prep.py
jasoriya/HackerEarth-DL-3-Challenge
b1bd5b3955913327408541ef4b14c260b9014593
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Sun Apr 15 22:12:06 2018 @author: Shreyans """ import pandas as pd import numpy as np from keras import applications from keras.applications.resnet50 import preprocess_input from keras.preprocessing import image import os train_data = pd.read_csv("../data/meta-data/train.csv") ...
34.079365
106
0.693992
import pandas as pd import numpy as np from keras import applications from keras.applications.resnet50 import preprocess_input from keras.preprocessing import image import os train_data = pd.read_csv("../data/meta-data/train.csv") test_data = pd.read_csv("../data/meta-data/test.csv") def named_model(name): ...
true
true
08fa55f75de5c4eb0d66810add675166c0f6ebef
497
py
Python
Part3/slice_test.py
BaiMoHan/LearningPython_ING_202002
90d1152b66e8efa284b75b4b76fbf29d7d61e900
[ "MIT" ]
null
null
null
Part3/slice_test.py
BaiMoHan/LearningPython_ING_202002
90d1152b66e8efa284b75b4b76fbf29d7d61e900
[ "MIT" ]
null
null
null
Part3/slice_test.py
BaiMoHan/LearningPython_ING_202002
90d1152b66e8efa284b75b4b76fbf29d7d61e900
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2020/2/12 13:37 # @Author : Baimohan/PH # @Site : https://github.com/BaiMoHan # @File : slice_test.py # @Software: PyCharm my_tuple = (2020, 'China', 666, 'hope', 000, 'powerful') # 切片slice[start:end:step] [起始:终止:步长] print(my_tuple[1:3]) # 默认步长为1 pr...
29.235294
56
0.619718
my_tuple = (2020, 'China', 666, 'hope', 000, 'powerful') print(my_tuple[1:3]) print(my_tuple[-3:-1]) print(my_tuple[1:-2]) print(my_tuple[-3:4]) ano_tuple = (1, 2, 3, 4, 5, 6, 7, 8, 9) print(ano_tuple[2:8:2]) print(ano_tuple[2:8:3]) print(ano_tuple[2:-2:2])
true
true
08fa567ea4fed559e680d81ce257d716e4d8c2d9
20,693
py
Python
test/unit/metrics/test_create_group_metric_set.py
safwanhossain/fairlearn
87de12b6f3036fc61efdbf0b8918470064e5b783
[ "MIT" ]
1
2021-04-22T21:22:20.000Z
2021-04-22T21:22:20.000Z
test/unit/metrics/test_create_group_metric_set.py
safwanhossain/fairlearn
87de12b6f3036fc61efdbf0b8918470064e5b783
[ "MIT" ]
null
null
null
test/unit/metrics/test_create_group_metric_set.py
safwanhossain/fairlearn
87de12b6f3036fc61efdbf0b8918470064e5b783
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. import numpy as np import pytest from fairlearn.metrics import group_accuracy_score, group_roc_auc_score from fairlearn.metrics import create_group_metric_set from test.unit.input_convertors import conversions_for_1d def ...
44.215812
97
0.65051
import numpy as np import pytest from fairlearn.metrics import group_accuracy_score, group_roc_auc_score from fairlearn.metrics import create_group_metric_set from test.unit.input_convertors import conversions_for_1d def test_bad_model_type(): with pytest.raises(ValueError) as exception_context: create...
true
true
08fa57d828ed955e206e4c04a2a28ab37de932e0
1,572
py
Python
download_ml_model.py
Andrej1A/ml_with_django
0cc91b1234800703ab1567a382c3dee600255317
[ "MIT" ]
10
2019-04-15T11:21:33.000Z
2022-02-20T13:30:20.000Z
download_ml_model.py
Andrej1A/ml_with_django
0cc91b1234800703ab1567a382c3dee600255317
[ "MIT" ]
7
2020-08-14T17:04:02.000Z
2021-06-10T21:13:27.000Z
download_ml_model.py
Andrej1A/ml_with_django
0cc91b1234800703ab1567a382c3dee600255317
[ "MIT" ]
1
2020-08-14T16:32:36.000Z
2020-08-14T16:32:36.000Z
# use this script to download ml-model and store it under .media/models import requests def download_file_from_google_drive(file_id, destination): url = "https://docs.google.com/uc?export=download" session = requests.Session() response = session.get(url, params={'id': file_id}, stream=True) token ...
30.230769
71
0.66285
import requests def download_file_from_google_drive(file_id, destination): url = "https://docs.google.com/uc?export=download" session = requests.Session() response = session.get(url, params={'id': file_id}, stream=True) token = get_confirm_token(response) if token: params = {'id': fil...
true
true
08fa581c3cce3d2a65cc994db933d99a449bb335
4,486
py
Python
django_fsm/tests/test_basic_transitions.py
chris-erickson/django-fsm
f7d894c99d626ad3ec7d63a02677cc1d616e7e84
[ "MIT" ]
1
2016-03-24T21:08:42.000Z
2016-03-24T21:08:42.000Z
django_fsm/tests/test_basic_transitions.py
chris-erickson/django-fsm
f7d894c99d626ad3ec7d63a02677cc1d616e7e84
[ "MIT" ]
null
null
null
django_fsm/tests/test_basic_transitions.py
chris-erickson/django-fsm
f7d894c99d626ad3ec7d63a02677cc1d616e7e84
[ "MIT" ]
null
null
null
from django.db import models from django.test import TestCase from django_fsm import FSMField, TransitionNotAllowed, transition, can_proceed from django_fsm.signals import pre_transition, post_transition class BlogPost(models.Model): state = FSMField(default='new') @transition(field=state, source='new', tar...
33.984848
90
0.67432
from django.db import models from django.test import TestCase from django_fsm import FSMField, TransitionNotAllowed, transition, can_proceed from django_fsm.signals import pre_transition, post_transition class BlogPost(models.Model): state = FSMField(default='new') @transition(field=state, source='new', tar...
true
true
08fa5930bfde16b544ff8ea482823fb631da6844
33,861
py
Python
swig/python/osgeo/utils/gdal_retile.py
gajgeospatial/gdal-3.2.2
f03032b8b734f611d5b3039c0e5cdbf81adc306e
[ "Apache-2.0" ]
null
null
null
swig/python/osgeo/utils/gdal_retile.py
gajgeospatial/gdal-3.2.2
f03032b8b734f611d5b3039c0e5cdbf81adc306e
[ "Apache-2.0" ]
null
null
null
swig/python/osgeo/utils/gdal_retile.py
gajgeospatial/gdal-3.2.2
f03032b8b734f611d5b3039c0e5cdbf81adc306e
[ "Apache-2.0" ]
1
2022-02-21T06:31:07.000Z
2022-02-21T06:31:07.000Z
#!/usr/bin/env python3 ############################################################################### # $Id: gdal_retile.py 124baa7f71f15396a661014a81b6c5b0c82c8004 2020-10-14 17:29:39 +0300 Idan Miara $ # # Purpose: Module for retiling (merging) tiles and building tiled pyramids # Author: Christian Meuller, chris...
34.134073
137
0.590532
from __future__ import print_function import os import sys import shutil from osgeo import gdal from osgeo import ogr from osgeo import osr progress = gdal.TermProgress_nocb class AffineTransformDecorator(object): def __init__(self, transform): self.lrx = None self.lry = None self.geotr...
true
true
08fa5acaa2af8f825e7d59f426abe27ee94030d5
1,207
py
Python
Yatube/hw03_forms/posts/views.py
abi83/YaPractice
1c3a5670ee2f872d4f872623a392755318b893b5
[ "MIT" ]
3
2020-11-18T05:16:30.000Z
2021-03-08T06:36:01.000Z
Yatube/hw03_forms/posts/views.py
abi83/YaPractice
1c3a5670ee2f872d4f872623a392755318b893b5
[ "MIT" ]
null
null
null
Yatube/hw03_forms/posts/views.py
abi83/YaPractice
1c3a5670ee2f872d4f872623a392755318b893b5
[ "MIT" ]
1
2021-01-20T12:41:48.000Z
2021-01-20T12:41:48.000Z
from django.contrib.auth.decorators import login_required from django.shortcuts import render, get_object_or_404, redirect from .form import PostForm from .models import Post, Group def post_detail(request, post_id): post = Post.objects.get(pk=post_id) return render(request, 'post.html', { 'post': po...
22.773585
64
0.647887
from django.contrib.auth.decorators import login_required from django.shortcuts import render, get_object_or_404, redirect from .form import PostForm from .models import Post, Group def post_detail(request, post_id): post = Post.objects.get(pk=post_id) return render(request, 'post.html', { 'post': po...
true
true
08fa5d1e430e54581a6e9efc0a44670cecd67754
189
py
Python
states/api/serializers.py
veggieavocado/Woobak
2488efa462e2a2e5f32ee970aaf0e116b0d4703b
[ "MIT" ]
null
null
null
states/api/serializers.py
veggieavocado/Woobak
2488efa462e2a2e5f32ee970aaf0e116b0d4703b
[ "MIT" ]
7
2020-06-05T18:33:44.000Z
2022-02-12T13:29:58.000Z
states/api/serializers.py
veggieavocado/Woobak
2488efa462e2a2e5f32ee970aaf0e116b0d4703b
[ "MIT" ]
1
2018-08-04T21:12:44.000Z
2018-08-04T21:12:44.000Z
from rest_framework import serializers from states.models import State class StateSerializer(serializers.ModelSerializer): class Meta: model = State fields = "__all__"
23.625
51
0.740741
from rest_framework import serializers from states.models import State class StateSerializer(serializers.ModelSerializer): class Meta: model = State fields = "__all__"
true
true
08fa5dbe6e3a1ec4343ac7f7b8203579be598442
5,115
py
Python
build/lib/Graph_Sampling/SRW_RWF_ISRW.py
Alessi0X/Graph_Sampling
b906c35314ddfecca0132092a21d21ca8542073b
[ "MIT" ]
102
2019-04-23T12:54:49.000Z
2022-03-28T18:18:38.000Z
build/lib/Graph_Sampling/SRW_RWF_ISRW.py
Alessi0X/Graph_Sampling
b906c35314ddfecca0132092a21d21ca8542073b
[ "MIT" ]
5
2019-04-14T20:24:08.000Z
2021-04-06T14:08:10.000Z
build/lib/Graph_Sampling/SRW_RWF_ISRW.py
Alessi0X/Graph_Sampling
b906c35314ddfecca0132092a21d21ca8542073b
[ "MIT" ]
31
2019-06-01T02:09:59.000Z
2022-01-18T06:37:18.000Z
import random import time import datetime import io import array,re,itertools import numpy as np import networkx as nx import matplotlib.pyplot as plt from itertools import groupby class SRW_RWF_ISRW: def __init__(self): self.growth_size = 2 self.T = 100 #number of iterations #with a proba...
43.347458
96
0.665298
import random import time import datetime import io import array,re,itertools import numpy as np import networkx as nx import matplotlib.pyplot as plt from itertools import groupby class SRW_RWF_ISRW: def __init__(self): self.growth_size = 2 self.T = 100 self.fly_back_prob ...
true
true
08fa5de057409f1f9dd7b6ada7ce04efe2d8b7a8
2,830
py
Python
ament_tools/package_types/__init__.py
richmattes/ament_tools
2a25cdcc273fcd73e81e8a47fe892a0b5963307d
[ "Apache-2.0" ]
1
2020-05-19T14:33:49.000Z
2020-05-19T14:33:49.000Z
ros2_mod_ws/install/lib/python3.7/site-packages/ament_tools/package_types/__init__.py
mintforpeople/robobo-ros2-ios-port
1a5650304bd41060925ebba41d6c861d5062bfae
[ "Apache-2.0" ]
null
null
null
ros2_mod_ws/install/lib/python3.7/site-packages/ament_tools/package_types/__init__.py
mintforpeople/robobo-ros2-ios-port
1a5650304bd41060925ebba41d6c861d5062bfae
[ "Apache-2.0" ]
null
null
null
# Copyright 2015 Open Source Robotics Foundation, 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...
36.753247
99
0.648057
from collections import Counter import pkg_resources AMENT_PACKAGE_TYPES_ENTRY_POINT = 'ament.package_types' def package_exists_at(path): for package_type in get_package_types(): if package_type['package_exists_at'](path): return True return False def parse_package(path): for pack...
true
true
08fa5e0ae481d8b1a7683cb52cf993cb49a8c3ed
3,019
py
Python
InvenTree/InvenTree/version.py
rgilham/InvenTree
c6fd2281d689309007b06c46560e6f446ee931bd
[ "MIT" ]
null
null
null
InvenTree/InvenTree/version.py
rgilham/InvenTree
c6fd2281d689309007b06c46560e6f446ee931bd
[ "MIT" ]
null
null
null
InvenTree/InvenTree/version.py
rgilham/InvenTree
c6fd2281d689309007b06c46560e6f446ee931bd
[ "MIT" ]
null
null
null
""" Version information for InvenTree. Provides information on the current InvenTree version """ import subprocess import django import re import common.models INVENTREE_SW_VERSION = "0.2.4 pre" INVENTREE_API_VERSION = 6 """ Increment thi API version number whenever there is a significant change to the API that an...
27.445455
118
0.705532
import subprocess import django import re import common.models INVENTREE_SW_VERSION = "0.2.4 pre" INVENTREE_API_VERSION = 6 def inventreeInstanceName(): return common.models.InvenTreeSetting.get_setting("INVENTREE_INSTANCE", "") def inventreeInstanceTitle(): if common.models.InvenTreeSetting.get_settin...
true
true
08fa5e74d18fb9e9553382e3d3daa05df2a4baed
4,302
py
Python
transitfeed/__init__.py
mstarikov/transitfeed
c018d7b14f6fccaa670629c00c83a390b5461fc1
[ "Apache-2.0" ]
null
null
null
transitfeed/__init__.py
mstarikov/transitfeed
c018d7b14f6fccaa670629c00c83a390b5461fc1
[ "Apache-2.0" ]
null
null
null
transitfeed/__init__.py
mstarikov/transitfeed
c018d7b14f6fccaa670629c00c83a390b5461fc1
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python2.5 # Copyright (C) 2007 Google 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 la...
38.756757
86
0.783589
from __future__ import absolute_import # problems.py gets fully loaded right away. # TODO: Solve this problem cleanly # from .agency import * # from .fareattribute import * # from .farerule import * # from .frequency import * # from .gtfsfactory import * # from .gtfsfactoryuser import * # from .gtfsobjectbase import...
true
true
08fa5f12052d134e305a0fb20ac6d8f31fe91a06
230
py
Python
src/circuits/__about__.py
rblack42/sphinxcontrib-circuits
37d872eefac5c965f9e9e3533e1f460965c690ba
[ "BSD-3-Clause" ]
null
null
null
src/circuits/__about__.py
rblack42/sphinxcontrib-circuits
37d872eefac5c965f9e9e3533e1f460965c690ba
[ "BSD-3-Clause" ]
null
null
null
src/circuits/__about__.py
rblack42/sphinxcontrib-circuits
37d872eefac5c965f9e9e3533e1f460965c690ba
[ "BSD-3-Clause" ]
null
null
null
__title__ = 'circuits' __summary__ = 'Drawing Circuits with M4' __url__ = 'https://github.com/rblack42/rstParser' __version__ = '0.1-dev' __author__ = 'Roie R. Black' __email__ = 'rblack@austincc.edu' __license__ = 'BSD 3-Clause'
28.75
49
0.73913
__title__ = 'circuits' __summary__ = 'Drawing Circuits with M4' __url__ = 'https://github.com/rblack42/rstParser' __version__ = '0.1-dev' __author__ = 'Roie R. Black' __email__ = 'rblack@austincc.edu' __license__ = 'BSD 3-Clause'
true
true
08fa5f2c3dc5b826dcedbe313b8523bb720b8317
2,841
py
Python
django/core/management/commands/createcachetable.py
cheshire/django
d9c4eacbd95f6a02e67f669f294da2dc8967a630
[ "BSD-3-Clause" ]
1
2017-07-08T06:24:07.000Z
2017-07-08T06:24:07.000Z
django/core/management/commands/createcachetable.py
cheshire/django
d9c4eacbd95f6a02e67f669f294da2dc8967a630
[ "BSD-3-Clause" ]
null
null
null
django/core/management/commands/createcachetable.py
cheshire/django
d9c4eacbd95f6a02e67f669f294da2dc8967a630
[ "BSD-3-Clause" ]
null
null
null
from optparse import make_option from django.core.cache.backends.db import BaseDatabaseCache from django.core.management.base import LabelCommand from django.db import connections, router, transaction, models, DEFAULT_DB_ALIAS from django.db.utils import DatabaseError class Command(LabelCommand): help = "Creates ...
43.045455
97
0.598029
from optparse import make_option from django.core.cache.backends.db import BaseDatabaseCache from django.core.management.base import LabelCommand from django.db import connections, router, transaction, models, DEFAULT_DB_ALIAS from django.db.utils import DatabaseError class Command(LabelCommand): help = "Creates ...
false
true
08fa5fcffba1481dcf62189bba23a8cf7ee6b7e1
8,497
py
Python
render/camera.py
BaldrLector/NeuralTracking
ddf6a629937bc226b35928bea2f158aef833ed72
[ "MIT" ]
1
2021-05-14T15:45:13.000Z
2021-05-14T15:45:13.000Z
render/camera.py
BaldrLector/NeuralTracking
ddf6a629937bc226b35928bea2f158aef833ed72
[ "MIT" ]
null
null
null
render/camera.py
BaldrLector/NeuralTracking
ddf6a629937bc226b35928bea2f158aef833ed72
[ "MIT" ]
null
null
null
''' MIT License Copyright (c) 2019 Shunsuke Saito, Zeng Huang, and Ryota Natsume Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to us...
31.587361
104
0.604213
import cv2 import numpy as np from .glm import ortho class Camera: def __init__(self, width=1600, height=1200): focal = np.sqrt(width * width + height * height) self.focal_x = focal self.focal_y = focal self.principal_x = width / 2 self.principal_y ...
true
true
08fa5fe75710df17c80e143cd3bc1f3aaa0b4629
1,059
py
Python
7_22_hw-1.py
SenAarush/CS2020
f9ff51efe475c42c759c966f21be96f6ac2ba346
[ "MIT" ]
null
null
null
7_22_hw-1.py
SenAarush/CS2020
f9ff51efe475c42c759c966f21be96f6ac2ba346
[ "MIT" ]
null
null
null
7_22_hw-1.py
SenAarush/CS2020
f9ff51efe475c42c759c966f21be96f6ac2ba346
[ "MIT" ]
null
null
null
#9+99+8+89+7+…n terms a=int(input("Enter the range: ")) ### #(1*2)+(2*3)+(3*4)+….+(19*20) '''s=0 imt=0 for i in range(1,21): imt=i*(i+1) s=s+imt print(s)''' #1+¾ 5/9+ … n terms '''n=int(input("Enter the range: ")) a=-1 s=0 k=0 for i in range(1,n+1):#-1,1 a=a+2#1,3 k=(a)/(i**2) s=s+k print(s)''' #...
15.573529
38
0.461756
a=int(input("Enter the range: "))
true
true
08fa600572dba88c02902973d204677c30564482
7,554
py
Python
MainWindow.py
carlesbertran/Codi
bba7a5cc25dd9efd4a29400928db1d2d1cb77f9b
[ "MIT" ]
null
null
null
MainWindow.py
carlesbertran/Codi
bba7a5cc25dd9efd4a29400928db1d2d1cb77f9b
[ "MIT" ]
null
null
null
MainWindow.py
carlesbertran/Codi
bba7a5cc25dd9efd4a29400928db1d2d1cb77f9b
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(384, 371) self.centralWidget = QtWidgets.QWidget(MainWindow) sizePolicy = QtWidgets.QSizePolicy(QtW...
55.955556
114
0.725708
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(384, 371) self.centralWidget = QtWidgets.QWidget(MainWindow) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maxim...
true
true
08fa60a1bdca460047d1506f771096d7bffa41e4
7,153
py
Python
DSB2017/net_classifier.py
cbd-nslc/LungCancerDetector
50b2517814c68368a86752162d70b00115f9bd4a
[ "Apache-2.0" ]
null
null
null
DSB2017/net_classifier.py
cbd-nslc/LungCancerDetector
50b2517814c68368a86752162d70b00115f9bd4a
[ "Apache-2.0" ]
4
2020-11-13T19:07:55.000Z
2022-02-10T02:48:35.000Z
DSB2017/net_classifier.py
cbd-nslc/LungCancerDetector
50b2517814c68368a86752162d70b00115f9bd4a
[ "Apache-2.0" ]
1
2020-09-15T18:11:13.000Z
2020-09-15T18:11:13.000Z
import torch from torch import nn from DSB2017.layers import * from torch.nn import DataParallel from torch.backends import cudnn from torch.utils.data import DataLoader from torch import optim from torch.autograd import Variable from torch.utils.data import Dataset from scipy.ndimage.interpolation import rotate import...
40.642045
114
0.580875
import torch from torch import nn from DSB2017.layers import * from torch.nn import DataParallel from torch.backends import cudnn from torch.utils.data import DataLoader from torch import optim from torch.autograd import Variable from torch.utils.data import Dataset from scipy.ndimage.interpolation import rotate import...
true
true
08fa60fbd37d5ada8f807ad525d6e2c720c4a97a
11,374
py
Python
source/Mlos.Python/mlos/Grpc/OptimizerService_pb2_grpc.py
amueller/MLOS
8f79bfa27a6fd09c3e00187bae8d7177eaf55247
[ "MIT" ]
3
2020-12-19T17:16:43.000Z
2021-11-14T19:41:49.000Z
source/Mlos.Python/mlos/Grpc/OptimizerService_pb2_grpc.py
amueller/MLOS
8f79bfa27a6fd09c3e00187bae8d7177eaf55247
[ "MIT" ]
1
2020-11-05T20:17:10.000Z
2020-11-06T03:10:02.000Z
source/Mlos.Python/mlos/Grpc/OptimizerService_pb2_grpc.py
amueller/MLOS
8f79bfa27a6fd09c3e00187bae8d7177eaf55247
[ "MIT" ]
1
2021-10-30T12:24:52.000Z
2021-10-30T12:24:52.000Z
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! """Client and server classes corresponding to protobuf-defined services.""" import grpc from mlos.Grpc import OptimizerService_pb2 as mlos_dot_Grpc_dot_OptimizerService__pb2 class OptimizerServiceStub(object): """Exposes Bayesian Optimizer's f...
45.496
126
0.687005
import grpc from mlos.Grpc import OptimizerService_pb2 as mlos_dot_Grpc_dot_OptimizerService__pb2 class OptimizerServiceStub(object): def __init__(self, channel): self.CreateOptimizer = channel.unary_unary( '/mlos.optimizer_service.OptimizerService/CreateOptimizer', reque...
true
true
08fa6141b2ed1ddbf03b6f9d630740ba7df69e23
66,098
py
Python
zerver/lib/export.py
dmryabov/zulip
fd2a63b049277f3cc7267a4a5bdbb485c4933719
[ "Apache-2.0" ]
null
null
null
zerver/lib/export.py
dmryabov/zulip
fd2a63b049277f3cc7267a4a5bdbb485c4933719
[ "Apache-2.0" ]
null
null
null
zerver/lib/export.py
dmryabov/zulip
fd2a63b049277f3cc7267a4a5bdbb485c4933719
[ "Apache-2.0" ]
1
2017-10-22T16:36:33.000Z
2017-10-22T16:36:33.000Z
# This is the main code for the `./manage.py export` data export tool. # User docs: https://zulip.readthedocs.io/en/latest/production/export-and-import.html # # Most developers will interact with this primarily when they add a # new table to the schema, in which case they likely need to (1) add # it the lists in `ALL_Z...
38.496214
107
0.660444
# it to get_realm_config. import datetime from boto.s3.connection import S3Connection from boto.s3.key import Key # for mypy from django.apps import apps from django.conf import settings from django.forms.models import model_to_dict from django.utils.timezone import make_aware as timezone_make_aware from django.utils....
true
true
08fa615e4dc661892d6ad48dba8e6bff9016ac1d
2,203
py
Python
aviio_technical_component/aviio_technical_component.py
ckrogers/aviio_technical_component
85cc3209098d335aee404937c0117a869d31650a
[ "MIT" ]
null
null
null
aviio_technical_component/aviio_technical_component.py
ckrogers/aviio_technical_component
85cc3209098d335aee404937c0117a869d31650a
[ "MIT" ]
null
null
null
aviio_technical_component/aviio_technical_component.py
ckrogers/aviio_technical_component
85cc3209098d335aee404937c0117a869d31650a
[ "MIT" ]
null
null
null
import logging import os import pandas as pd from pathlib import Path import requests from requests.packages.urllib3.util.retry import Retry from requests.adapters import HTTPAdapter logger = logging.getLogger() logger.setLevel(logging.DEBUG) handler = logging.FileHandler("aviio_technical_component.log", "w", "utf-8"...
28.24359
87
0.698139
import logging import os import pandas as pd from pathlib import Path import requests from requests.packages.urllib3.util.retry import Retry from requests.adapters import HTTPAdapter logger = logging.getLogger() logger.setLevel(logging.DEBUG) handler = logging.FileHandler("aviio_technical_component.log", "w", "utf-8"...
true
true
08fa6188398f8062c8a67715619411637d66a33b
15,379
py
Python
tests/test_prob.py
Qottmann/pennylane
ba7cb0d27965bdb642d29648d70dd8246432eec0
[ "Apache-2.0" ]
null
null
null
tests/test_prob.py
Qottmann/pennylane
ba7cb0d27965bdb642d29648d70dd8246432eec0
[ "Apache-2.0" ]
null
null
null
tests/test_prob.py
Qottmann/pennylane
ba7cb0d27965bdb642d29648d70dd8246432eec0
[ "Apache-2.0" ]
null
null
null
# Copyright 2018-2020 Xanadu Quantum Technologies Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or...
32.24109
96
0.635672
import pytest import numpy as np import pennylane as qml np.random.seed(42) @pytest.fixture def init_state(scope="session"): def _init_state(n): state = np.random.random([2 ** n]) + np.random.random([2 ** n]) * 1j state /= np.linalg.norm(state) return state return _init_state ...
true
true
08fa61d60fc271acd911d6d25819107e2a38399a
8,323
py
Python
py/pki.py
peter279k/ldphp
ca335aa26ba431d192066a55ef49478f1b6f779a
[ "MIT" ]
12
2015-04-28T22:14:49.000Z
2021-06-09T14:27:25.000Z
py/pki.py
peter279k/ldphp
ca335aa26ba431d192066a55ef49478f1b6f779a
[ "MIT" ]
3
2018-08-04T22:10:38.000Z
2019-05-17T16:18:04.000Z
py/pki.py
peter279k/ldphp
ca335aa26ba431d192066a55ef49478f1b6f779a
[ "MIT" ]
3
2015-12-28T11:20:27.000Z
2020-03-10T12:09:12.000Z
#!/usr/bin/python CA_CER = ''' -----BEGIN CERTIFICATE----- MIICUjCCAbugAwIBAgIJANqd0HpLjwClMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV BAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMQ4wDAYDVQQKDAVXZWJJRDEOMAwG A1UEAwwFV2ViSUQwHhcNMTIxMTI5MjAyNjE5WhcNMTUxMTI5MjAyNjE5WjBCMQsw CQYDVQQGEwJVUzETMBEGA1UECAwKU29tZS1TdGF0ZTEOMAwGA1UECgwFV2ViSUQx ...
39.259434
157
0.738316
CA_CER = ''' -----BEGIN CERTIFICATE----- MIICUjCCAbugAwIBAgIJANqd0HpLjwClMA0GCSqGSIb3DQEBBQUAMEIxCzAJBgNV BAYTAlVTMRMwEQYDVQQIDApTb21lLVN0YXRlMQ4wDAYDVQQKDAVXZWJJRDEOMAwG A1UEAwwFV2ViSUQwHhcNMTIxMTI5MjAyNjE5WhcNMTUxMTI5MjAyNjE5WjBCMQsw CQYDVQQGEwJVUzETMBEGA1UECAwKU29tZS1TdGF0ZTEOMAwGA1UECgwFV2ViSUQx DjAMBgNVBAMMBVdlYk...
false
true
08fa632c52d7cb251e4c8d6b3e115190b6661fbe
1,157
py
Python
core/src/zeit/magazin/browser/tests/test_gallery.py
rickdg/vivi
16134ac954bf8425646d4ad47bdd1f372e089355
[ "BSD-3-Clause" ]
5
2019-05-16T09:51:29.000Z
2021-05-31T09:30:03.000Z
core/src/zeit/magazin/browser/tests/test_gallery.py
rickdg/vivi
16134ac954bf8425646d4ad47bdd1f372e089355
[ "BSD-3-Clause" ]
107
2019-05-24T12:19:02.000Z
2022-03-23T15:05:56.000Z
core/src/zeit/magazin/browser/tests/test_gallery.py
rickdg/vivi
16134ac954bf8425646d4ad47bdd1f372e089355
[ "BSD-3-Clause" ]
3
2020-08-14T11:01:17.000Z
2022-01-08T17:32:19.000Z
import zeit.magazin.testing class ZMOGalleryCRUD(zeit.magazin.testing.BrowserTestCase): def test_zmo_gallery_has_facebook_magazin_fields(self): b = self.browser b.open('http://localhost/++skin++vivi/repository/magazin') menu = b.getControl(name='add_menu') menu.displayValue = ['Ga...
37.322581
69
0.630078
import zeit.magazin.testing class ZMOGalleryCRUD(zeit.magazin.testing.BrowserTestCase): def test_zmo_gallery_has_facebook_magazin_fields(self): b = self.browser b.open('http://localhost/++skin++vivi/repository/magazin') menu = b.getControl(name='add_menu') menu.displayValue = ['Ga...
true
true
08fa63d13e038e245cea2df04139f67181453b10
2,499
py
Python
device/transport/mqtt/MQTT/mqtt_transport.py
ScreamBun/openc2-oif-device
1666b2d202e3adb8baab618ead7fa1de556c1c58
[ "Apache-2.0" ]
null
null
null
device/transport/mqtt/MQTT/mqtt_transport.py
ScreamBun/openc2-oif-device
1666b2d202e3adb8baab618ead7fa1de556c1c58
[ "Apache-2.0" ]
null
null
null
device/transport/mqtt/MQTT/mqtt_transport.py
ScreamBun/openc2-oif-device
1666b2d202e3adb8baab618ead7fa1de556c1c58
[ "Apache-2.0" ]
null
null
null
# mqtt_transport.py import re import ssl import uuid import etcd from functools import partial from paho.mqtt import client as mqtt from sb_utils import Consumer, safe_cast from time import sleep from callbacks import mqtt_on_connect, mqtt_on_log, mqtt_on_message, mqtt_on_publish, send_mqtt from config import Config ...
26.585106
103
0.714286
import re import ssl import uuid import etcd from functools import partial from paho.mqtt import client as mqtt from sb_utils import Consumer, safe_cast from time import sleep from callbacks import mqtt_on_connect, mqtt_on_log, mqtt_on_message, mqtt_on_publish, send_mqtt from config import Config etcd_client = etcd.C...
true
true
08fa652132a05c9c41201e380a9856caaadf4dc3
12,744
py
Python
Presenter_Program/serialrecall.py
m-j-carter/Synesthetic-Word-Presenter
a7afae1e9e1963a1653c8a6495358b6b57054525
[ "MIT" ]
null
null
null
Presenter_Program/serialrecall.py
m-j-carter/Synesthetic-Word-Presenter
a7afae1e9e1963a1653c8a6495358b6b57054525
[ "MIT" ]
null
null
null
Presenter_Program/serialrecall.py
m-j-carter/Synesthetic-Word-Presenter
a7afae1e9e1963a1653c8a6495358b6b57054525
[ "MIT" ]
null
null
null
## This file contains the classes PresentWords and Word, as used in the main timed word presenter program ## Word is its own class (instead of a list of strings) to allow for easy modifications ## Written By: Michael Carter, Oct./Nov. 2019 ## For my PSYCO 403/505 research project ## Notes/Changelog: ## - Still ki...
32.845361
140
0.684165
import math import time import pygame as pg from pygame.locals import * import pygame_textinput from uagame import Window from results import ResultsFile DEFAULT_FONT_COLOR = "gray" DEFAULT_FONT_SIZE = 36 DEFAULT_FONT_NAME = "Arial" BG_COLOR = "gray50" LINE_SPACING = 5 HEADER_SPACING = 25 ROWS_TO_DISPLAY = 12 W...
true
true
08fa65591d9414d217c066033ec2156a90922c71
1,363
py
Python
mr_code/linear_svm.py
appleface2050/Coursera-ML
e588fa5776a79d6516b2135124898a2db9da82ae
[ "MIT" ]
null
null
null
mr_code/linear_svm.py
appleface2050/Coursera-ML
e588fa5776a79d6516b2135124898a2db9da82ae
[ "MIT" ]
null
null
null
mr_code/linear_svm.py
appleface2050/Coursera-ML
e588fa5776a79d6516b2135124898a2db9da82ae
[ "MIT" ]
null
null
null
# coding:utf-8 import numpy as np import pandas as pd import sklearn.svm import seaborn as sns import scipy.io as sio import matplotlib.pyplot as plt mat = sio.loadmat('data/ex6data1.mat') print(mat.keys()) data = pd.DataFrame(mat.get('X'), columns=['X1', 'X2']) data['y'] = mat.get("y") print(data.head()) # print(da...
24.781818
82
0.647836
import numpy as np import pandas as pd import sklearn.svm import seaborn as sns import scipy.io as sio import matplotlib.pyplot as plt mat = sio.loadmat('data/ex6data1.mat') print(mat.keys()) data = pd.DataFrame(mat.get('X'), columns=['X1', 'X2']) data['y'] = mat.get("y") print(data.head()) fig, ax = plt.subplots(...
true
true
08fa65c0084e10cf56e4d8125a738e331447489d
2,432
py
Python
fuehr_report.py
Thorongil80/mpfeuer.py
921316300fc2a5a8544a88444d68166d251bb325
[ "MIT" ]
null
null
null
fuehr_report.py
Thorongil80/mpfeuer.py
921316300fc2a5a8544a88444d68166d251bb325
[ "MIT" ]
null
null
null
fuehr_report.py
Thorongil80/mpfeuer.py
921316300fc2a5a8544a88444d68166d251bb325
[ "MIT" ]
null
null
null
import config import mailer import datetime import dbcon from dateutil.relativedelta import * personen = dbcon.personen() abteilungsconfig = dbcon.abteilungsconfig() for p in dbcon.persons_fuehr(): person = {} person["id"] = str(p[0]) person["abteilung"] = str(p[1]) person["anrede"] = str(p[2]) person["name...
39.868852
148
0.640214
import config import mailer import datetime import dbcon from dateutil.relativedelta import * personen = dbcon.personen() abteilungsconfig = dbcon.abteilungsconfig() for p in dbcon.persons_fuehr(): person = {} person["id"] = str(p[0]) person["abteilung"] = str(p[1]) person["anrede"] = str(p[2]) person["name...
true
true
08fa6684e5aed07b6ab77ba4166ec8779952b91e
5,410
py
Python
configs/recognition/x3d/x3d_m_16x5x1_facebook_ucf101_rgb.py
ptoupas/mmaction2
1e1911295b63cffeba4c6f4809cb74d291c4505b
[ "Apache-2.0" ]
null
null
null
configs/recognition/x3d/x3d_m_16x5x1_facebook_ucf101_rgb.py
ptoupas/mmaction2
1e1911295b63cffeba4c6f4809cb74d291c4505b
[ "Apache-2.0" ]
null
null
null
configs/recognition/x3d/x3d_m_16x5x1_facebook_ucf101_rgb.py
ptoupas/mmaction2
1e1911295b63cffeba4c6f4809cb74d291c4505b
[ "Apache-2.0" ]
null
null
null
_base_ = ['../../_base_/models/x3d.py'] # dataset settings dataset_type = 'VideoDataset' data_root = '/second_ext4/ptoupas/data/ucf101/videos' data_root_val = '/second_ext4/ptoupas/data/ucf101/videos' ann_file_train = '/second_ext4/ptoupas/data/ucf101/ucf101_train_split_3_videos.txt' ann_file_val = '/second_ext4/ptou...
33.602484
126
0.62902
_base_ = ['../../_base_/models/x3d.py'] dataset_type = 'VideoDataset' data_root = '/second_ext4/ptoupas/data/ucf101/videos' data_root_val = '/second_ext4/ptoupas/data/ucf101/videos' ann_file_train = '/second_ext4/ptoupas/data/ucf101/ucf101_train_split_3_videos.txt' ann_file_val = '/second_ext4/ptoupas/data/ucf101/ucf...
true
true
08fa68a35e8e4886972d9610dbffb91a52293140
205
py
Python
JumpscaleLib/clients/gitea/client/EnumEditTeamOptionPermission.py
threefoldtech/jumpscale_lib9
03c1451133d777e5af106fcc6f75c1138bb997f2
[ "Apache-2.0" ]
2
2019-05-09T07:21:25.000Z
2019-08-05T06:37:53.000Z
JumpscaleLib/clients/gitea/client/EnumEditTeamOptionPermission.py
threefoldtech/jumpscale_lib9
03c1451133d777e5af106fcc6f75c1138bb997f2
[ "Apache-2.0" ]
664
2018-12-19T12:43:44.000Z
2019-08-23T04:24:42.000Z
JumpscaleLib/clients/gitea/client/EnumEditTeamOptionPermission.py
threefoldtech/jumpscale_lib9
03c1451133d777e5af106fcc6f75c1138bb997f2
[ "Apache-2.0" ]
7
2019-05-03T07:14:37.000Z
2019-08-05T12:36:52.000Z
# DO NOT EDIT THIS FILE. This file will be overwritten when re-running go-raml. from enum import Enum class EnumEditTeamOptionPermission(Enum): read = "read" write = "write" admin = "admin"
20.5
79
0.702439
from enum import Enum class EnumEditTeamOptionPermission(Enum): read = "read" write = "write" admin = "admin"
true
true
08fa68a5cc75169891e1f367af6cf4f8d8543e5d
2,650
py
Python
fooof/tests/test_core_utils.py
varman-m/fooof
6046c89bb3c87f30a8a368809a9d321c8c33e1a8
[ "Apache-2.0" ]
null
null
null
fooof/tests/test_core_utils.py
varman-m/fooof
6046c89bb3c87f30a8a368809a9d321c8c33e1a8
[ "Apache-2.0" ]
null
null
null
fooof/tests/test_core_utils.py
varman-m/fooof
6046c89bb3c87f30a8a368809a9d321c8c33e1a8
[ "Apache-2.0" ]
null
null
null
"""Tests for fooof.core.utils.""" from collections.abc import Iterable from itertools import repeat from fooof import FOOOF from fooof.core.utils import * from py.test import raises ################################################################################################### ##################################...
27.040816
99
0.559623
from collections.abc import Iterable from itertools import repeat from fooof import FOOOF from fooof.core.utils import * from py.test import raises def test_group_three(): dat = [0, 1, 2, 3, 4, 5] assert group_three(dat) == [[0, 1, 2], [3, 4, 5]] with raises(ValueError): group_three([0, 1, 2,...
true
true
08fa691e7978960012e179604898e8a84450bd64
3,622
py
Python
obaxutils.py
gCurse/obapps3
0f6b220274134718eac3e8ddd58cdc1b6765a44b
[ "MIT" ]
4
2020-10-27T22:10:20.000Z
2021-07-15T21:58:12.000Z
obaxutils.py
gCurse/obapps3
0f6b220274134718eac3e8ddd58cdc1b6765a44b
[ "MIT" ]
3
2021-04-15T07:07:24.000Z
2021-12-07T16:07:50.000Z
obaxutils.py
gCurse/obapps3
0f6b220274134718eac3e8ddd58cdc1b6765a44b
[ "MIT" ]
2
2020-09-02T23:10:27.000Z
2021-07-15T21:59:33.000Z
# obaxutils # # version 0.1.6 # utility functions for OBApps, OBHotkey, etc. # all xlib-dependent code goes here license = """ Copyright (c) 2010 Eric Bohlman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal ...
31.224138
85
0.624241
license = """ Copyright (c) 2010 Eric Bohlman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, di...
true
true
08fa698caf023034ecf21f508ac1d2633210d2eb
1,723
py
Python
src/editor/wxUI/wxTextEntryDialog.py
rehmanx/PandaEditor
125c79605fd46a045201e5ff6a88709764ac104f
[ "MIT" ]
null
null
null
src/editor/wxUI/wxTextEntryDialog.py
rehmanx/PandaEditor
125c79605fd46a045201e5ff6a88709764ac104f
[ "MIT" ]
null
null
null
src/editor/wxUI/wxTextEntryDialog.py
rehmanx/PandaEditor
125c79605fd46a045201e5ff6a88709764ac104f
[ "MIT" ]
null
null
null
import wx ID_BUTTON_OK = wx.NewId() ID_BUTTON_CANCEL = wx.NewId() class TextEntryDialog(wx.Frame): def __init__(self, parent, title, start_text): wx.Frame.__init__(self, parent) self.parent = parent self.title = title self.start_text = start_text self.SetTitle(title) ...
29.20339
89
0.591991
import wx ID_BUTTON_OK = wx.NewId() ID_BUTTON_CANCEL = wx.NewId() class TextEntryDialog(wx.Frame): def __init__(self, parent, title, start_text): wx.Frame.__init__(self, parent) self.parent = parent self.title = title self.start_text = start_text self.SetTitle(title) ...
true
true
08fa69f907460c599b70de156c378e4177287ddc
17,369
py
Python
test/unit/connections/btc/test_btc_relay_connection.py
blockchain-development-resources/bxgateway
761b5085f9c7c6527f0b9aaae06d2f70f3786db2
[ "MIT" ]
1
2021-11-26T07:49:24.000Z
2021-11-26T07:49:24.000Z
test/unit/connections/btc/test_btc_relay_connection.py
beepool/bxgateway
761b5085f9c7c6527f0b9aaae06d2f70f3786db2
[ "MIT" ]
null
null
null
test/unit/connections/btc/test_btc_relay_connection.py
beepool/bxgateway
761b5085f9c7c6527f0b9aaae06d2f70f3786db2
[ "MIT" ]
1
2021-09-06T02:10:08.000Z
2021-09-06T02:10:08.000Z
from typing import cast from mock import MagicMock from bxcommon.test_utils.abstract_test_case import AbstractTestCase from bxcommon.connections.connection_state import ConnectionState from bxcommon.connections.connection_type import ConnectionType from bxcommon.constants import DEFAULT_NETWORK_NUM, LOCALHOST from bx...
51.235988
125
0.735621
from typing import cast from mock import MagicMock from bxcommon.test_utils.abstract_test_case import AbstractTestCase from bxcommon.connections.connection_state import ConnectionState from bxcommon.connections.connection_type import ConnectionType from bxcommon.constants import DEFAULT_NETWORK_NUM, LOCALHOST from bx...
true
true
08fa6cad173e1dca830f206f34c6e1104c2cf874
2,545
py
Python
docker/docker-monolith/infra/ansible/my_gcp_inv.py
Otus-DevOps-2018-11/victorinausk_microservices
4ea6ecb4eafe84e5916dc386f64c44ea1481b702
[ "MIT" ]
null
null
null
docker/docker-monolith/infra/ansible/my_gcp_inv.py
Otus-DevOps-2018-11/victorinausk_microservices
4ea6ecb4eafe84e5916dc386f64c44ea1481b702
[ "MIT" ]
1
2019-03-25T05:26:27.000Z
2019-03-25T05:31:57.000Z
docker/docker-monolith/infra/ansible/my_gcp_inv.py
Otus-DevOps-2018-11/victorinausk_microservices
4ea6ecb4eafe84e5916dc386f64c44ea1481b702
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import subprocess import json import sqlite3 import argparse host = '' gcp_instances = """ CREATE TABLE IF NOT EXISTS gcp_instances ( id integer PRIMARY KEY, name text NOT NULL, ext_ip text NOT NULL, int_ip text NOT NULL, tags text NOT NULL ); """ def create_connecti...
24.471154
102
0.647544
import subprocess import json import sqlite3 import argparse host = '' gcp_instances = """ CREATE TABLE IF NOT EXISTS gcp_instances ( id integer PRIMARY KEY, name text NOT NULL, ext_ip text NOT NULL, int_ip text NOT NULL, tags text NOT NULL ); """ def create_connection(db_file): try: ...
true
true
08fa6fb18f891b9830053122266db894eec2d8cc
3,533
py
Python
pyeisen/family.py
akhambhati/pyEisen
62ec6cb3168ff6f5c9ef81e51b0041b4809d2613
[ "MIT" ]
null
null
null
pyeisen/family.py
akhambhati/pyEisen
62ec6cb3168ff6f5c9ef81e51b0041b4809d2613
[ "MIT" ]
null
null
null
pyeisen/family.py
akhambhati/pyEisen
62ec6cb3168ff6f5c9ef81e51b0041b4809d2613
[ "MIT" ]
null
null
null
""" Functions and Wrappers to define families of kernels for signal analysis. Author: Ankit N. Khambhati Adapted from: https://github.com/pennmem/ptsa_new/blob/master/ptsa/wavelet.py Last Updated: 2018/08/31 """ import numpy as np from scipy.signal import morlet as scipy_morlet def morlet(freqs, cycles, Fs, n_win=7...
34.980198
79
0.654401
import numpy as np from scipy.signal import morlet as scipy_morlet def morlet(freqs, cycles, Fs, n_win=7, complete=True): if len(freqs) < 1: raise ValueError('At least one frequency must be specified.') if len(cycles) != len(freqs): raise ValueError( 'Each frequency must have...
true
true
08fa6ff05206dcff62e4d123d8c55c9dfbf43d9c
644
py
Python
Python/Tkinter/Code With Harry/Tkinter 1 - CWH 10 - Entry Widget in Grid Layout.py
omkarsutar1255/Python-Data
169d0c54b23d9dd5a7f1aea41ab385121c3b3c63
[ "CC-BY-3.0" ]
null
null
null
Python/Tkinter/Code With Harry/Tkinter 1 - CWH 10 - Entry Widget in Grid Layout.py
omkarsutar1255/Python-Data
169d0c54b23d9dd5a7f1aea41ab385121c3b3c63
[ "CC-BY-3.0" ]
null
null
null
Python/Tkinter/Code With Harry/Tkinter 1 - CWH 10 - Entry Widget in Grid Layout.py
omkarsutar1255/Python-Data
169d0c54b23d9dd5a7f1aea41ab385121c3b3c63
[ "CC-BY-3.0" ]
null
null
null
from tkinter import * root = Tk() root.geometry('1000x600') def getvals(): print(f"The Username is = {uservalue.get()}") print(f"The Password is = {passvalue.get()}") user = Label(root, text='USERNAME') password = Label(root, text='PASSWORD') user.grid() password.grid(row=1) # variable classes in tkinter # Bool...
28
60
0.729814
from tkinter import * root = Tk() root.geometry('1000x600') def getvals(): print(f"The Username is = {uservalue.get()}") print(f"The Password is = {passvalue.get()}") user = Label(root, text='USERNAME') password = Label(root, text='PASSWORD') user.grid() password.grid(row=1) uservalue = StringVar() passvalue = ...
true
true
08fa704dbb020f46d183d11b79aa0f1eef1e1f3b
1,901
py
Python
minq/__init__.py
theodox/minq
c9afa3ace761fc272ba623b0b8a19fcdb90e0e31
[ "MIT" ]
61
2016-02-22T03:59:07.000Z
2022-03-22T01:42:09.000Z
minq/__init__.py
wongselent/minq
c9afa3ace761fc272ba623b0b8a19fcdb90e0e31
[ "MIT" ]
11
2016-02-23T02:04:49.000Z
2020-01-16T08:42:57.000Z
minq/__init__.py
wongselent/minq
c9afa3ace761fc272ba623b0b8a19fcdb90e0e31
[ "MIT" ]
18
2016-02-29T22:24:29.000Z
2022-02-21T09:56:59.000Z
""" minq: a query language for maya. TLDR: You are free to use this as you like, provided you preserve the copyright information. This copryight covers all of the modules in the minq project Copyright (c) 2016 Steve Theodore Permission is hereby granted, free of charge, to any person obtaining a copy of this softw...
37.27451
81
0.773803
from .core import * from .item_query import item, custom, native from .project import * from .nodes import * def using(*objects): return Scene(objects)
true
true
08fa706bf9471e658e061fe4c6309533889661fb
2,727
py
Python
factops/factops/cgrid.py
Bhaskers-Blu-Org1/skills-for-planning
98575d963e63d2c84075df9500c74c14f8a8553b
[ "ECL-2.0", "Apache-2.0" ]
2
2020-07-08T09:58:13.000Z
2021-03-19T05:40:29.000Z
factops/factops/cgrid.py
Bhaskers-Blu-Org1/skills-for-planning
98575d963e63d2c84075df9500c74c14f8a8553b
[ "ECL-2.0", "Apache-2.0" ]
6
2021-03-19T03:13:37.000Z
2022-03-11T23:57:41.000Z
factops/factops/cgrid.py
IBM/skills-for-planning
98575d963e63d2c84075df9500c74c14f8a8553b
[ "ECL-2.0", "Apache-2.0" ]
4
2019-08-30T15:12:07.000Z
2020-06-29T14:50:22.000Z
import matplotlib.pyplot as plt import numpy as np import seaborn as sns import time class CGridWorld: '''Continuous gridworld domain ''' def __init__(self, n_dims=2, discrete_actions=False): if discrete_actions: self.n_actions = 9 else: self.n_actions = n_dims ...
28.705263
82
0.548588
import matplotlib.pyplot as plt import numpy as np import seaborn as sns import time class CGridWorld: def __init__(self, n_dims=2, discrete_actions=False): if discrete_actions: self.n_actions = 9 else: self.n_actions = n_dims self.discrete_actions = discrete_actions...
true
true
08fa71bf6926e34643669ae1e43e90b229205713
28,546
py
Python
spatialpandas/geometry/base.py
ianthomas23/spatialpandas
b6809e79f615e0be6fda6845b9725b5f87529c56
[ "BSD-2-Clause" ]
207
2019-11-29T04:50:01.000Z
2022-03-29T07:31:55.000Z
spatialpandas/geometry/base.py
ianthomas23/spatialpandas
b6809e79f615e0be6fda6845b9725b5f87529c56
[ "BSD-2-Clause" ]
55
2019-12-02T13:33:37.000Z
2022-02-09T18:16:06.000Z
spatialpandas/geometry/base.py
ianthomas23/spatialpandas
b6809e79f615e0be6fda6845b9725b5f87529c56
[ "BSD-2-Clause" ]
18
2019-11-29T16:07:34.000Z
2022-03-31T10:54:20.000Z
import re from collections.abc import Container, Iterable from numbers import Integral import numpy as np import pandas as pd import pyarrow as pa from pandas.api.extensions import ExtensionArray, ExtensionDtype from pandas.api.types import is_array_like from .._optional_imports import gp, sg from ..spatialindex impo...
33.544066
107
0.580432
import re from collections.abc import Container, Iterable from numbers import Integral import numpy as np import pandas as pd import pyarrow as pa from pandas.api.extensions import ExtensionArray, ExtensionDtype from pandas.api.types import is_array_like from .._optional_imports import gp, sg from ..spatialindex impo...
true
true
08fa73f52d16c8625cf3767587d0b36b8fd7269a
2,556
py
Python
k8s/images/codalab/apps/queues/views.py
abdulari/codalab-competitions
fdfbb77ac62d56c6b4b9439935037f97ffcd1423
[ "Apache-2.0" ]
2
2021-12-20T11:39:03.000Z
2021-12-20T11:39:06.000Z
k8s/images/codalab/apps/queues/views.py
abdulari/codalab-competitions
fdfbb77ac62d56c6b4b9439935037f97ffcd1423
[ "Apache-2.0" ]
2
2022-01-27T22:35:11.000Z
2022-02-09T21:48:23.000Z
k8s/images/codalab/apps/queues/views.py
abdulari/codalab-competitions
fdfbb77ac62d56c6b4b9439935037f97ffcd1423
[ "Apache-2.0" ]
null
null
null
from braces.views import LoginRequiredMixin from django.core.exceptions import PermissionDenied, ValidationError from django.core.urlresolvers import reverse from django.forms.utils import ErrorList from django.http import HttpResponseRedirect from django.views.generic import ListView, CreateView, UpdateView, DeleteVie...
34.540541
111
0.708138
from braces.views import LoginRequiredMixin from django.core.exceptions import PermissionDenied, ValidationError from django.core.urlresolvers import reverse from django.forms.utils import ErrorList from django.http import HttpResponseRedirect from django.views.generic import ListView, CreateView, UpdateView, DeleteVie...
true
true
08fa774b57ab0ee7621b82a8be623bbf746e4e13
4,721
py
Python
tests/test-runners/run_all.py
AnythingTechPro/Nuitka
022d9484036f2334042c2432f6a19ec326db2d17
[ "Apache-2.0" ]
null
null
null
tests/test-runners/run_all.py
AnythingTechPro/Nuitka
022d9484036f2334042c2432f6a19ec326db2d17
[ "Apache-2.0" ]
null
null
null
tests/test-runners/run_all.py
AnythingTechPro/Nuitka
022d9484036f2334042c2432f6a19ec326db2d17
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2018, Kay Hayen, mailto:kay.hayen@gmail.com # # Python test originally created or extracted from other peoples work. The # parts from me are licensed as below. It is at least Free Software where # it's copied from other people. In these cases, that will normally be # ...
32.558621
114
0.666172
# indicated. # # 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 w...
true
true
08fa77e179b61a1f01fccc992658facb49e3de07
9,086
py
Python
acumos-package/acumos/metadata.py
acumos/acumos-python-client
d4faad0ed3fe6da0c8b0bfb23b548fa9ace546e5
[ "Apache-2.0", "CC-BY-4.0" ]
16
2018-07-28T00:01:57.000Z
2021-12-03T19:30:52.000Z
acumos-package/acumos/metadata.py
acumos/acumos-python-client
d4faad0ed3fe6da0c8b0bfb23b548fa9ace546e5
[ "Apache-2.0", "CC-BY-4.0" ]
null
null
null
acumos-package/acumos/metadata.py
acumos/acumos-python-client
d4faad0ed3fe6da0c8b0bfb23b548fa9ace546e5
[ "Apache-2.0", "CC-BY-4.0" ]
7
2018-07-30T21:48:45.000Z
2022-01-26T11:01:17.000Z
# -*- coding: utf-8 -*- # ===============LICENSE_START======================================================= # Acumos Apache-2.0 # =================================================================================== # Copyright (C) 2017-2018 AT&T Intellectual Property & Tech Mahindra. All rights reserved. # ===========...
43.266667
280
0.653753
import importlib import sys from types import ModuleType from pkg_resources import get_distribution, DistributionNotFound from os.path import basename, normpath, sep as pathsep from acumos.exc import AcumosError from acumos.modeling import _is_namedtuple BUILTIN_MODULE_NAMES = set(sys.builtin_module_names) PACKAGE_D...
true
true
08fa77e4419e388ad101d17f73585961bb4dbcb8
486
py
Python
searchApp/wsgi.py
nevooronni/searchApp
82f2531a3ba87aa3387cb3656dac65d9a222edfc
[ "MIT" ]
null
null
null
searchApp/wsgi.py
nevooronni/searchApp
82f2531a3ba87aa3387cb3656dac65d9a222edfc
[ "MIT" ]
null
null
null
searchApp/wsgi.py
nevooronni/searchApp
82f2531a3ba87aa3387cb3656dac65d9a222edfc
[ "MIT" ]
null
null
null
""" WSGI config for searchApp project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application from whitenoise.django import Djan...
25.578947
78
0.804527
import os from django.core.wsgi import get_wsgi_application from whitenoise.django import DjangoWhiteNoise os.environ.setdefault("DJANGO_SETTINGS_MODULE", "searchApp.settings") application = get_wsgi_application() application = DjangoWhiteNoise(application)
true
true
08fa77ebfadeeca3f374438bf41cf38341adf082
34,391
py
Python
client/verta/verta/_internal_utils/_utils.py
siriuslee/modeldb
25e8354e126f2ddeb99ff76bb8136544b65dd581
[ "Apache-2.0" ]
null
null
null
client/verta/verta/_internal_utils/_utils.py
siriuslee/modeldb
25e8354e126f2ddeb99ff76bb8136544b65dd581
[ "Apache-2.0" ]
null
null
null
client/verta/verta/_internal_utils/_utils.py
siriuslee/modeldb
25e8354e126f2ddeb99ff76bb8136544b65dd581
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import datetime import glob import inspect import itertools import json import numbers import os import re import string import subprocess import sys import threading import time import requests from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry from google.protobu...
32.352775
125
0.624262
import datetime import glob import inspect import itertools import json import numbers import os import re import string import subprocess import sys import threading import time import requests from requests.adapters import HTTPAdapter from urllib3.util.retry import Retry from google.protobuf import json_format fro...
true
true
08fa786edf3857f4436a48287826c8a8bfe0d339
740
py
Python
doc/doxme.py
Aseman-Land/QtAutoUpdater
44ba0d5372dd9d387655b9c68edb584bdc260620
[ "BSD-3-Clause" ]
2
2020-03-23T13:41:31.000Z
2020-08-10T15:14:56.000Z
doc/doxme.py
jjzhang166/QtAutoUpdater24
37d96b4fe4e6bca54e8a339a8e72d6ca53897086
[ "BSD-3-Clause" ]
1
2018-12-30T13:41:14.000Z
2018-12-30T13:41:14.000Z
doc/doxme.py
jjzhang166/QtAutoUpdater24
37d96b4fe4e6bca54e8a339a8e72d6ca53897086
[ "BSD-3-Clause" ]
1
2021-03-02T01:55:46.000Z
2021-03-02T01:55:46.000Z
#!/usr/bin/python # $1 The readme to be transformed # $pwd: dest dir import sys def readFirst(line, out): if line[0:2] != "# ": raise ValueError("Expected first line to start with '# '") # skip the first line out.write("[TOC]\n\n") readCounter = 0 def readMore(line, out): global readCounter if line[0:2] == "#...
18.974359
83
0.65
import sys def readFirst(line, out): if line[0:2] != "# ": raise ValueError("Expected first line to start with '# '") out.write("[TOC]\n\n") readCounter = 0 def readMore(line, out): global readCounter if line[0:2] == "##": out.write(line[1:] + " {{#qtautoupdater_readme_label_{}}}\n".format(readCounter)) r...
true
true
08fa79432b67fb852f4b4b9af03d7b481e779c2d
613
py
Python
Passiv-25/start_bot.py
JohnKearney1/Passiv-v2.5
16fa9ee4da833a6e366e9d01c8ac4d5095581c08
[ "Unlicense" ]
4
2021-03-14T06:41:12.000Z
2021-03-27T21:29:17.000Z
Passiv-25/start_bot.py
JohnKearney1/Passiv-v2.5
16fa9ee4da833a6e366e9d01c8ac4d5095581c08
[ "Unlicense" ]
1
2021-03-17T16:32:44.000Z
2021-03-29T00:51:39.000Z
Passiv-25/start_bot.py
JohnKearney1/Passiv-v2.5
16fa9ee4da833a6e366e9d01c8ac4d5095581c08
[ "Unlicense" ]
3
2021-03-14T06:41:19.000Z
2021-04-08T23:51:44.000Z
from subprocess import Popen from time import sleep import sys exchange = sys.argv[1] user = sys.argv[2] max_n_restarts = 30 restart_k = 0 while True: try: print(f"\nStarting {exchange} {user}") p = Popen(f"python3 {exchange}.py {user}", shell=True) p.wait() restart_k += 1 ...
22.703704
81
0.582382
from subprocess import Popen from time import sleep import sys exchange = sys.argv[1] user = sys.argv[2] max_n_restarts = 30 restart_k = 0 while True: try: print(f"\nStarting {exchange} {user}") p = Popen(f"python3 {exchange}.py {user}", shell=True) p.wait() restart_k += 1 ...
true
true
08fa7992e8da1b4a575c98cb59aa328d6b01e4ef
127,830
py
Python
pandas/tests/test_resample.py
buntwo/pandas
8e6b09ff3a09de58e82da6dcabbfddba61a743d6
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/test_resample.py
buntwo/pandas
8e6b09ff3a09de58e82da6dcabbfddba61a743d6
[ "BSD-3-Clause" ]
null
null
null
pandas/tests/test_resample.py
buntwo/pandas
8e6b09ff3a09de58e82da6dcabbfddba61a743d6
[ "BSD-3-Clause" ]
1
2018-10-05T04:56:16.000Z
2018-10-05T04:56:16.000Z
# pylint: disable=E1101 from warnings import catch_warnings from datetime import datetime, timedelta from functools import partial from textwrap import dedent import pytz import pytest import dateutil import numpy as np import pandas as pd import pandas.tseries.offsets as offsets import pandas.util.testing as tm fro...
39.223688
79
0.532551
from warnings import catch_warnings from datetime import datetime, timedelta from functools import partial from textwrap import dedent import pytz import pytest import dateutil import numpy as np import pandas as pd import pandas.tseries.offsets as offsets import pandas.util.testing as tm from pandas import (Series,...
true
true
08fa7a27cb469beff10d4867677ff814c43f3645
22,763
py
Python
yt/frontends/gadget/io.py
lconaboy/yt
d97c3cf6d7911cd12b8337784d3232068ebc59f6
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/frontends/gadget/io.py
lconaboy/yt
d97c3cf6d7911cd12b8337784d3232068ebc59f6
[ "BSD-3-Clause-Clear" ]
null
null
null
yt/frontends/gadget/io.py
lconaboy/yt
d97c3cf6d7911cd12b8337784d3232068ebc59f6
[ "BSD-3-Clause-Clear" ]
null
null
null
import os from collections import defaultdict import numpy as np from yt.frontends.sph.io import IOHandlerSPH from yt.units.yt_array import uconcatenate # type: ignore from yt.utilities.lib.particle_kdtree_tools import generate_smoothing_length from yt.utilities.logger import ytLogger as mylog from yt.utilities.on_d...
39.450607
87
0.512894
import os from collections import defaultdict import numpy as np from yt.frontends.sph.io import IOHandlerSPH from yt.units.yt_array import uconcatenate from yt.utilities.lib.particle_kdtree_tools import generate_smoothing_length from yt.utilities.logger import ytLogger as mylog from yt.utilities.on_demand_imports i...
true
true
08fa7a2b3c0ee7af0b4adce9e6ac489ee5e6efec
3,948
py
Python
src/SocialNetwork_API/serializers/user.py
mungpham/mungpham
3545dafdb498503d2f138d4b7515a7ae8f195994
[ "MIT" ]
null
null
null
src/SocialNetwork_API/serializers/user.py
mungpham/mungpham
3545dafdb498503d2f138d4b7515a7ae8f195994
[ "MIT" ]
null
null
null
src/SocialNetwork_API/serializers/user.py
mungpham/mungpham
3545dafdb498503d2f138d4b7515a7ae8f195994
[ "MIT" ]
null
null
null
from rest_framework import exceptions from rest_framework.validators import UniqueValidator from SocialNetwork_API.serializers import ServiceSerializer, serializers from SocialNetwork_API.const import UserType, ErrorMessage from SocialNetwork_API.models import User, Friend from SocialNetwork_API.services import UserSe...
39.089109
102
0.620314
from rest_framework import exceptions from rest_framework.validators import UniqueValidator from SocialNetwork_API.serializers import ServiceSerializer, serializers from SocialNetwork_API.const import UserType, ErrorMessage from SocialNetwork_API.models import User, Friend from SocialNetwork_API.services import UserSe...
true
true
08fa7ae7da29051d33c8d3a937604329ca987386
929
py
Python
camera.py
hectorpadin1/FICGames
6d75c3ef74f0d6d2881021833fe06cd67e207ab1
[ "MIT" ]
null
null
null
camera.py
hectorpadin1/FICGames
6d75c3ef74f0d6d2881021833fe06cd67e207ab1
[ "MIT" ]
null
null
null
camera.py
hectorpadin1/FICGames
6d75c3ef74f0d6d2881021833fe06cd67e207ab1
[ "MIT" ]
1
2022-03-29T15:38:18.000Z
2022-03-29T15:38:18.000Z
import pygame as pg from settings import * """ Clase que nos permite gestionar una vista aerea recortada. """ class Camera: def __init__(self, width, height): self.camera = pg.Rect(0, 0, width, height) self.width = width self.height = height # Obtener coordeneadas relativas a la posic...
29.967742
63
0.606028
import pygame as pg from settings import * class Camera: def __init__(self, width, height): self.camera = pg.Rect(0, 0, width, height) self.width = width self.height = height def apply(self, entity): return self.apply_rect(entity.rect) def apply_rect(self, rect): ...
true
true
08fa7b26d81245396fd21af75e6b7416a015c297
3,674
py
Python
src/encoded/tests/test_schema_formats.py
4dn-dcic/fourfron
29601961706d2371b982e57ae085e8ebec3b2714
[ "MIT" ]
11
2016-11-23T02:33:13.000Z
2021-06-18T14:21:20.000Z
src/encoded/tests/test_schema_formats.py
4dn-dcic/fourfron
29601961706d2371b982e57ae085e8ebec3b2714
[ "MIT" ]
1,159
2016-11-21T15:40:24.000Z
2022-03-29T03:18:38.000Z
src/encoded/tests/test_schema_formats.py
4dn-dcic/fourfron
29601961706d2371b982e57ae085e8ebec3b2714
[ "MIT" ]
5
2017-01-27T16:36:15.000Z
2019-06-14T14:39:54.000Z
import glob import io import json import pkg_resources import pytest import uuid from ..schema_formats import ACCESSION_CODES, ACCESSION_TEST_CODES, is_uri, is_uuid pytestmark = [pytest.mark.setone, pytest.mark.working, pytest.mark.schema, pytest.mark.unit] # Any legacy codes that have been discontinued and aren't...
43.738095
114
0.725912
import glob import io import json import pkg_resources import pytest import uuid from ..schema_formats import ACCESSION_CODES, ACCESSION_TEST_CODES, is_uri, is_uuid pytestmark = [pytest.mark.setone, pytest.mark.working, pytest.mark.schema, pytest.mark.unit] # but that have accessions that must still be parsed shou...
true
true
08fa7b2b56dd9ac93cd0f3c88381b55adb14d1bc
4,612
py
Python
transference.py
webpwnized/cryptography
52660c14aa71afe087cf380bb1e9d067fa639bc6
[ "MIT" ]
13
2017-02-20T21:42:08.000Z
2021-08-01T21:18:51.000Z
transference.py
webpwnized/cryptography
52660c14aa71afe087cf380bb1e9d067fa639bc6
[ "MIT" ]
1
2017-03-24T22:52:25.000Z
2017-03-26T23:14:08.000Z
transference.py
webpwnized/cryptography
52660c14aa71afe087cf380bb1e9d067fa639bc6
[ "MIT" ]
2
2019-02-19T05:01:58.000Z
2020-04-11T04:10:32.000Z
# Requires pip install bitarray from bitarray import bitarray import argparse, math def derive_transfer_function(pTransferFunctionString: str) -> list: lTransferFunction = list(map(int, pTransferFunctionString.split(','))) lTransferFunctionValid = True lLengthTransferFunction = len(lTransferFunction) ...
36.03125
301
0.645056
from bitarray import bitarray import argparse, math def derive_transfer_function(pTransferFunctionString: str) -> list: lTransferFunction = list(map(int, pTransferFunctionString.split(','))) lTransferFunctionValid = True lLengthTransferFunction = len(lTransferFunction) for i in range(0, lLengthTransf...
true
true
08fa7c73454c246300db5ef08d9d4a9eaebc9f72
2,112
py
Python
homeworkpal_project/homework/migrations/0001_initial.py
luiscberrocal/homeworkpal
342acf876264fade818b107f4af13cac067f1ace
[ "MIT" ]
null
null
null
homeworkpal_project/homework/migrations/0001_initial.py
luiscberrocal/homeworkpal
342acf876264fade818b107f4af13cac067f1ace
[ "MIT" ]
null
null
null
homeworkpal_project/homework/migrations/0001_initial.py
luiscberrocal/homeworkpal
342acf876264fade818b107f4af13cac067f1ace
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import autoslug.fields class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Homework', fields=[ ('id...
38.4
117
0.558712
from __future__ import unicode_literals from django.db import migrations, models import autoslug.fields class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Homework', fields=[ ('id', models.AutoField(prim...
true
true
08fa7d8a43f7f46c4a3f2a9e7f173a0ef295fc0e
9,305
py
Python
scanpy/tests/test_plotting.py
ioannisa92/scanpy
f428848ece1d7a4794090eb70a34a3b8f1953dee
[ "BSD-3-Clause" ]
1
2019-03-11T05:48:34.000Z
2019-03-11T05:48:34.000Z
scanpy/tests/test_plotting.py
ioannisa92/scanpy
f428848ece1d7a4794090eb70a34a3b8f1953dee
[ "BSD-3-Clause" ]
null
null
null
scanpy/tests/test_plotting.py
ioannisa92/scanpy
f428848ece1d7a4794090eb70a34a3b8f1953dee
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from matplotlib.testing import setup setup() import matplotlib.pyplot as pl from matplotlib.testing.compare import compare_images import os.path import scanpy as sc ROOT = os.path.dirname(os.path.abspath(__file__)) + '/_images/' tolerance = 15 sc.pl.set_rcParams_defaults() sc.set_figure_par...
41.726457
117
0.707147
from matplotlib.testing import setup setup() import matplotlib.pyplot as pl from matplotlib.testing.compare import compare_images import os.path import scanpy as sc ROOT = os.path.dirname(os.path.abspath(__file__)) + '/_images/' tolerance = 15 sc.pl.set_rcParams_defaults() sc.set_figure_params(dpi=40, color_map='v...
true
true
08fa7d8fc37f8085d1050ecc026bef947e94e56c
36,148
py
Python
patroni/dcs/__init__.py
wmendes-ionos/patroni
0057f9018bc0b8f78cd5c53d8a6ae7a06141e24d
[ "MIT" ]
1
2019-02-20T23:31:58.000Z
2019-02-20T23:31:58.000Z
patroni/dcs/__init__.py
wmendes-ionos/patroni
0057f9018bc0b8f78cd5c53d8a6ae7a06141e24d
[ "MIT" ]
null
null
null
patroni/dcs/__init__.py
wmendes-ionos/patroni
0057f9018bc0b8f78cd5c53d8a6ae7a06141e24d
[ "MIT" ]
null
null
null
import abc import dateutil import importlib import inspect import json import logging import os import pkgutil import re import six import sys import time from collections import defaultdict, namedtuple from copy import deepcopy from random import randint from six.moves.urllib_parse import urlparse, urlunparse, parse_...
38.414453
119
0.630381
import abc import dateutil import importlib import inspect import json import logging import os import pkgutil import re import six import sys import time from collections import defaultdict, namedtuple from copy import deepcopy from random import randint from six.moves.urllib_parse import urlparse, urlunparse, parse_...
true
true
08fa7f483b73e53c88a66e38ab56a09cfb186d33
12,797
py
Python
medtype-as-service/server/medtype_serving/server/helper.py
gaurav/medtype
18020d687e1537f76236652aa0a82f0ffbdaeeae
[ "Apache-2.0" ]
97
2020-05-04T14:41:46.000Z
2022-03-29T21:33:27.000Z
medtype-as-service/server/medtype_serving/server/helper.py
gaurav/medtype
18020d687e1537f76236652aa0a82f0ffbdaeeae
[ "Apache-2.0" ]
14
2020-11-17T11:21:47.000Z
2022-01-15T09:33:57.000Z
medtype-as-service/server/medtype_serving/server/helper.py
gaurav/medtype
18020d687e1537f76236652aa0a82f0ffbdaeeae
[ "Apache-2.0" ]
9
2020-07-12T17:46:26.000Z
2022-03-07T22:00:28.000Z
import argparse, pickle, logging, os, sys, time, uuid, warnings, itertools, pathlib from collections import OrderedDict from collections import defaultdict as ddict import zmq from termcolor import colored from zmq.utils import jsonapi __all__ = ['set_logger', 'get_args_parser', 'auto_bind', 'mergeList', 'clean_text'...
43.975945
195
0.704618
import argparse, pickle, logging, os, sys, time, uuid, warnings, itertools, pathlib from collections import OrderedDict from collections import defaultdict as ddict import zmq from termcolor import colored from zmq.utils import jsonapi __all__ = ['set_logger', 'get_args_parser', 'auto_bind', 'mergeList', 'clean_text'...
true
true
08fa7f9a48a35bf7225a67be4be0dace8dd6d0bc
17,463
py
Python
src/sentry/migrations/0044_auto__add_field_projectmember_is_active.py
NickPresta/sentry
ed3e6034ef560e18f392ba30071de860557b7b43
[ "BSD-3-Clause" ]
2
2015-10-14T12:45:32.000Z
2016-01-27T03:24:43.000Z
src/sentry/migrations/0044_auto__add_field_projectmember_is_active.py
simmetria/sentry
9731f26adb44847d1c883cca108afc0755cf21cc
[ "BSD-3-Clause" ]
null
null
null
src/sentry/migrations/0044_auto__add_field_projectmember_is_active.py
simmetria/sentry
9731f26adb44847d1c883cca108afc0755cf21cc
[ "BSD-3-Clause" ]
null
null
null
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'ProjectMember.is_active' db.add_column('sentry_projectmember', 'is_active', self.gf('djang...
79.739726
182
0.560557
import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): db.add_column('sentry_projectmember', 'is_active', self.gf('django.db.models.fields.BooleanField')(default=True), keep_defau...
true
true
08fa7fc465481403a73b485dbb2e4ce168bb025c
6,291
py
Python
function_limiter/limiter.py
Ed-XCF/Function-Limiter
592ce05c6f4b3afc848e0e501fbddb47fb86fc5d
[ "MIT" ]
3
2021-01-31T06:20:00.000Z
2021-08-04T13:10:33.000Z
function_limiter/limiter.py
Ed-XCF/Function-Limiter
592ce05c6f4b3afc848e0e501fbddb47fb86fc5d
[ "MIT" ]
3
2021-08-23T04:07:33.000Z
2021-11-17T10:08:51.000Z
function_limiter/limiter.py
Ed-XCF/Function-Limiter
592ce05c6f4b3afc848e0e501fbddb47fb86fc5d
[ "MIT" ]
2
2021-02-11T23:24:56.000Z
2021-08-23T04:00:40.000Z
"""Function-Limiter Extension for limiting callable functions.""" from functools import wraps import time import re import redis import json class RateLimitExceeded(Exception): pass time_periods = { 'second': 1, 'minute': 60, 'hour': 60 * 60, 'day': 60 * 60 * 24, 'week': 60 * 60 * 24 * 7, ...
32.261538
110
0.570339
from functools import wraps import time import re import redis import json class RateLimitExceeded(Exception): pass time_periods = { 'second': 1, 'minute': 60, 'hour': 60 * 60, 'day': 60 * 60 * 24, 'week': 60 * 60 * 24 * 7, 'month': 60 * 60 * 24 * 30, 'year': 60 * 60 * 24 * 365, } ...
true
true
08fa80457a000e8d11619735d38887387607cdf6
457
py
Python
oo/Pessoa.py
jonathannluan/pythonbirds
a400e9eac6fd9ef5978abec73ab7875d05bd0060
[ "MIT" ]
null
null
null
oo/Pessoa.py
jonathannluan/pythonbirds
a400e9eac6fd9ef5978abec73ab7875d05bd0060
[ "MIT" ]
null
null
null
oo/Pessoa.py
jonathannluan/pythonbirds
a400e9eac6fd9ef5978abec73ab7875d05bd0060
[ "MIT" ]
null
null
null
class Pessoa: def __init__(self,*filhos,nome=None,idade=35): self.filhos=list(filhos) self.idade = idade self.nome=nome def cumprimentar(self): return f'Olá' if __name__ == '__main__': helena=Pessoa(nome='Helena') p= Pessoa(helena,nome='Luan') print(p.cumprimentar()...
22.85
50
0.61488
class Pessoa: def __init__(self,*filhos,nome=None,idade=35): self.filhos=list(filhos) self.idade = idade self.nome=nome def cumprimentar(self): return f'Olá' if __name__ == '__main__': helena=Pessoa(nome='Helena') p= Pessoa(helena,nome='Luan') print(p.cumprimentar()...
true
true