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
1c0b4c4bf7931e6c7838dd441f9c17ecad63e5c6
4,782
py
Python
dlkit/abstract_osid/hierarchy/searches.py
UOC/dlkit
a9d265db67e81b9e0f405457464e762e2c03f769
[ "MIT" ]
2
2018-02-23T12:16:11.000Z
2020-10-08T17:54:24.000Z
dlkit/abstract_osid/hierarchy/searches.py
UOC/dlkit
a9d265db67e81b9e0f405457464e762e2c03f769
[ "MIT" ]
87
2017-04-21T18:57:15.000Z
2021-12-13T19:43:57.000Z
dlkit/abstract_osid/hierarchy/searches.py
UOC/dlkit
a9d265db67e81b9e0f405457464e762e2c03f769
[ "MIT" ]
1
2018-03-01T16:44:25.000Z
2018-03-01T16:44:25.000Z
"""Implementations of hierarchy abstract base class searches.""" # pylint: disable=invalid-name # Method names comply with OSID specification. # pylint: disable=no-init # Abstract classes do not define __init__. # pylint: disable=too-few-public-methods # Some interfaces are specified as 'markers' and includ...
38.564516
112
0.698453
import abc class HierarchySearch: __metaclass__ = abc.ABCMeta @abc.abstractmethod def search_among_hierarchies(self, hierarchy_ids): pass @abc.abstractmethod def order_hierarchy_results(self, hierarchy_search_order): pass @abc.abstractmethod def get_hierarchy_search_reco...
true
true
1c0b4de7b02fb8c1b9b0d0b76bf1243b59dbf4d5
46,049
py
Python
sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_11_01_preview/operations/_services_operations.py
JianpingChen/azure-sdk-for-python
3072fc8c0366287fbaea1b02493a50259c3248a2
[ "MIT" ]
3
2020-06-23T02:25:27.000Z
2021-09-07T18:48:11.000Z
sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_11_01_preview/operations/_services_operations.py
JianpingChen/azure-sdk-for-python
3072fc8c0366287fbaea1b02493a50259c3248a2
[ "MIT" ]
510
2019-07-17T16:11:19.000Z
2021-08-02T08:38:32.000Z
sdk/appplatform/azure-mgmt-appplatform/azure/mgmt/appplatform/v2020_11_01_preview/operations/_services_operations.py
JianpingChen/azure-sdk-for-python
3072fc8c0366287fbaea1b02493a50259c3248a2
[ "MIT" ]
5
2019-09-04T12:51:37.000Z
2020-09-16T07:28:40.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
49.408798
203
0.66553
from typing import TYPE_CHECKING import warnings from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error from azure.core.paging import ItemPaged from azure.core.pipeline import PipelineResponse from azure.core.pipeline.transport import HttpR...
true
true
1c0b4e6c105d370c464c750d607a9d5b2285db41
1,905
py
Python
src/sentry/models/identity.py
cloudbuy/sentry
08d7c0ccf9e9fe92147d18c1fdcad1832532e264
[ "BSD-3-Clause" ]
null
null
null
src/sentry/models/identity.py
cloudbuy/sentry
08d7c0ccf9e9fe92147d18c1fdcad1832532e264
[ "BSD-3-Clause" ]
null
null
null
src/sentry/models/identity.py
cloudbuy/sentry
08d7c0ccf9e9fe92147d18c1fdcad1832532e264
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import from django.conf import settings from django.db import models from django.utils import timezone from sentry.db.models import ( ArrayField, BoundedPositiveIntegerField, EncryptedJsonField, FlexibleForeignKey, Model ) # TODO(dcramer): pull in enum library class IdentityS...
29.765625
77
0.713386
from __future__ import absolute_import from django.conf import settings from django.db import models from django.utils import timezone from sentry.db.models import ( ArrayField, BoundedPositiveIntegerField, EncryptedJsonField, FlexibleForeignKey, Model ) class IdentityStatus(object): UNKNOWN = 0 VAL...
true
true
1c0b4f1458327f77417199d4f8159cc94c3a9e02
19,423
py
Python
mdrsl/rule_models/mids/objective_function/mids_objective_function_without_value_reuse.py
joschout/Multi-Directional-Rule-Set-Learning
ef0620b115f4e0fd7fba3e752d238a8020c1ca6b
[ "Apache-2.0" ]
3
2020-08-03T19:25:44.000Z
2021-06-27T22:25:55.000Z
mdrsl/rule_models/mids/objective_function/mids_objective_function_without_value_reuse.py
joschout/Multi-Directional-Rule-Set-Learning
ef0620b115f4e0fd7fba3e752d238a8020c1ca6b
[ "Apache-2.0" ]
null
null
null
mdrsl/rule_models/mids/objective_function/mids_objective_function_without_value_reuse.py
joschout/Multi-Directional-Rule-Set-Learning
ef0620b115f4e0fd7fba3e752d238a8020c1ca6b
[ "Apache-2.0" ]
2
2020-08-07T22:54:28.000Z
2021-02-18T06:11:01.000Z
from typing import List, Optional, Dict, Set, Tuple import time import numpy as np from mdrsl.rule_models.mids.cover.cover_checker import CoverChecker from mdrsl.rule_models.mids.cover.cover_metric import get_avg_incorrect_cover_size from mdrsl.rule_models.mids.objective_function.mids_objective_function_abstract impo...
46.245238
143
0.668846
from typing import List, Optional, Dict, Set, Tuple import time import numpy as np from mdrsl.rule_models.mids.cover.cover_checker import CoverChecker from mdrsl.rule_models.mids.cover.cover_metric import get_avg_incorrect_cover_size from mdrsl.rule_models.mids.objective_function.mids_objective_function_abstract impo...
true
true
1c0b4f44f1c0eef7461bfb4bcd30cdcbbcebcb68
74
py
Python
ramda/take.py
Rafi993/pyramda
4fa7fe28d5eaa798b702d28bdd3948515cb88f48
[ "MIT" ]
1
2018-08-05T04:41:14.000Z
2018-08-05T04:41:14.000Z
ramda/take.py
Rafi993/pyramda
4fa7fe28d5eaa798b702d28bdd3948515cb88f48
[ "MIT" ]
3
2018-06-12T18:42:05.000Z
2018-07-23T11:50:25.000Z
ramda/take.py
slavaGanzin/pyramda
4fa7fe28d5eaa798b702d28bdd3948515cb88f48
[ "MIT" ]
null
null
null
from ramda.curry import curry @curry def take(n, xs): return xs[:n]
10.571429
29
0.662162
from ramda.curry import curry @curry def take(n, xs): return xs[:n]
true
true
1c0b4f840af72968301d888ca137930cee510dca
2,557
py
Python
sequence_qc/plot_noise_by_tlen.py
msk-access/sequence_qc
a90ecd70c402472078b2a0a2ed20fc9727551ddd
[ "Apache-2.0" ]
null
null
null
sequence_qc/plot_noise_by_tlen.py
msk-access/sequence_qc
a90ecd70c402472078b2a0a2ed20fc9727551ddd
[ "Apache-2.0" ]
18
2019-12-06T16:57:39.000Z
2021-06-17T19:39:55.000Z
sequence_qc/plot_noise_by_tlen.py
msk-access/sequence_qc
a90ecd70c402472078b2a0a2ed20fc9727551ddd
[ "Apache-2.0" ]
null
null
null
import numpy as np import pandas as pd import plotly.figure_factory as ff SUBSTITUTION_TYPES_COMBINED = [ [["G>T", "C>A"], "C>A"], [["C>G", "G>C"], "C>G"], [["G>A", "C>T"], "C>T"], [["T>A", "A>T"], "T>A"], [["A>G", "T>C"], "T>C"], [["T>G", "A>C"], "T>G"], ] COLORS = ["#556278", "#C1292E", "#...
24.825243
74
0.556903
import numpy as np import pandas as pd import plotly.figure_factory as ff SUBSTITUTION_TYPES_COMBINED = [ [["G>T", "C>A"], "C>A"], [["C>G", "G>C"], "C>G"], [["G>A", "C>T"], "C>T"], [["T>A", "A>T"], "T>A"], [["A>G", "T>C"], "T>C"], [["T>G", "A>C"], "T>G"], ] COLORS = ["#556278", "#C1292E", "#...
true
true
1c0b5096c7a4d5aeb281bd8152d4d10360e79a82
8,400
py
Python
tensorflow_gan/examples/self_attention_estimator/estimator_lib.py
Aerochip7/gan
d3648c0f3996bd9e5564c05a44ff4215e5156cbd
[ "Apache-2.0" ]
null
null
null
tensorflow_gan/examples/self_attention_estimator/estimator_lib.py
Aerochip7/gan
d3648c0f3996bd9e5564c05a44ff4215e5156cbd
[ "Apache-2.0" ]
null
null
null
tensorflow_gan/examples/self_attention_estimator/estimator_lib.py
Aerochip7/gan
d3648c0f3996bd9e5564c05a44ff4215e5156cbd
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2022 The TensorFlow GAN Authors. # # 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 applicabl...
39.622642
88
0.73381
from __future__ import absolute_import from __future__ import division from __future__ import print_function import functools import tensorflow.compat.v1 as tf from tensorflow_gan.examples.self_attention_estimator import eval_lib import tensorflow_gan as tfgan def get_tpu_run_config_from_hparams(hparams): tf....
true
true
1c0b516addad1d752dfe7133a5d2468e9363ccde
6,268
py
Python
ml/kubeflow-argo/components/kubeflow/taxi_model/trainer/taxi.py
dk-wei/GCP-code-snippets
c23ca7f2981b5df946448b20a54f823ce52bba05
[ "Apache-2.0" ]
null
null
null
ml/kubeflow-argo/components/kubeflow/taxi_model/trainer/taxi.py
dk-wei/GCP-code-snippets
c23ca7f2981b5df946448b20a54f823ce52bba05
[ "Apache-2.0" ]
null
null
null
ml/kubeflow-argo/components/kubeflow/taxi_model/trainer/taxi.py
dk-wei/GCP-code-snippets
c23ca7f2981b5df946448b20a54f823ce52bba05
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
34.822222
80
0.711391
from __future__ import division from __future__ import print_function import tensorflow as tf from tensorflow_transform import coders as tft_coders from tensorflow_transform.tf_metadata import dataset_schema MAX_CATEGORICAL_FEATURE_VALUES = [24, 31, 12] CATEGORICAL_FEATURE_KEYS = [ 'trip_start_hour', 'trip...
true
true
1c0b51aca77c4b19028caa88a505ff732c876854
6,425
py
Python
reinforcement/tensorflow/minigo/gtp_extensions.py
lukmaz/training
7d000a2acc75cf6d800576a869112ac40f175098
[ "Apache-2.0" ]
44
2018-11-07T18:52:33.000Z
2019-07-06T12:48:18.000Z
reinforcement/tensorflow/minigo/gtp_extensions.py
lukmaz/training
7d000a2acc75cf6d800576a869112ac40f175098
[ "Apache-2.0" ]
12
2018-12-13T18:04:36.000Z
2019-06-14T20:49:33.000Z
reinforcement/tensorflow/minigo/gtp_extensions.py
lukmaz/training
7d000a2acc75cf6d800576a869112ac40f175098
[ "Apache-2.0" ]
44
2018-11-09T21:04:52.000Z
2019-06-24T07:40:28.000Z
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
38.473054
90
0.621012
import gtp import sys import sgf_wrapper import itertools import go import coords def parse_message(message): message = gtp.pre_engine(message).strip() first, rest = (message.split(" ", 1) + [None])[:2] if first.isdigit(): message_id = int(first) if rest is not None: command,...
true
true
1c0b524e1480f6fa5a875ec12f0682264265c4f0
5,817
py
Python
src/datasets/megadepth.py
Collebt/LoFTR_implement
f63c3fe08a1868380ed9a20dcddf4e8949a816e4
[ "Apache-2.0" ]
4
2021-05-09T15:16:11.000Z
2021-12-04T06:13:14.000Z
src/datasets/megadepth.py
Collebt/LoFTR_implement
f63c3fe08a1868380ed9a20dcddf4e8949a816e4
[ "Apache-2.0" ]
1
2021-10-08T13:40:19.000Z
2021-10-08T13:40:19.000Z
src/datasets/megadepth.py
Collebt/LoFTR_implement
f63c3fe08a1868380ed9a20dcddf4e8949a816e4
[ "Apache-2.0" ]
1
2021-05-19T09:18:52.000Z
2021-05-19T09:18:52.000Z
import os.path as osp import numpy as np import torch import torch.nn.functional as F from torch.utils.data import Dataset from loguru import logger from src.utils.dataset import read_megadepth_gray, read_megadepth_depth class MegaDepthDataset(Dataset): def __init__(self, root_dir, ...
46.536
129
0.58776
import os.path as osp import numpy as np import torch import torch.nn.functional as F from torch.utils.data import Dataset from loguru import logger from src.utils.dataset import read_megadepth_gray, read_megadepth_depth class MegaDepthDataset(Dataset): def __init__(self, root_dir, ...
true
true
1c0b52d15d12e36678a0f2a2d2956aa47180c3dc
7,145
py
Python
gitignore_plugin.py
chilian/sublime-gitignorer
f38ce9be6e615798e2284dd23bee7a2943d47543
[ "WTFPL" ]
null
null
null
gitignore_plugin.py
chilian/sublime-gitignorer
f38ce9be6e615798e2284dd23bee7a2943d47543
[ "WTFPL" ]
null
null
null
gitignore_plugin.py
chilian/sublime-gitignorer
f38ce9be6e615798e2284dd23bee7a2943d47543
[ "WTFPL" ]
null
null
null
import sublime import subprocess import os import os.path import threading import platform from time import sleep # Used for output suppression when calling subprocess functions; see # http://stackoverflow.com/questions/10251391/suppressing-output-in-python-subprocess-call devnull = open(os.devnull, 'w') # Used to pr...
32.330317
90
0.674598
import sublime import subprocess import os import os.path import threading import platform from time import sleep devnull = open(os.devnull, 'w') if platform.system() == 'Windows': startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags = subprocess.STARTF_USESHOWWINDOW startupinfo.wShowWindow = subpro...
true
true
1c0b539e0a4af16afee88b28ec3510739bb911da
5,471
py
Python
docs/source/conf.py
sc104501/transmission-rpc
1d5dcf2e8a97fe3bab0ba4d18fa3bbeb862e2a89
[ "MIT" ]
61
2018-11-18T02:09:47.000Z
2022-03-30T03:11:51.000Z
docs/source/conf.py
sc104501/transmission-rpc
1d5dcf2e8a97fe3bab0ba4d18fa3bbeb862e2a89
[ "MIT" ]
138
2018-09-18T21:29:35.000Z
2022-03-31T09:38:58.000Z
docs/source/conf.py
sc104501/transmission-rpc
1d5dcf2e8a97fe3bab0ba4d18fa3bbeb862e2a89
[ "MIT" ]
22
2020-05-19T20:58:38.000Z
2022-02-08T03:53:44.000Z
# # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or ...
31.442529
83
0.6465
project = "transmission-rpc" copyright = "2018-2020, Trim21 <trim21me@gmail.com>" author = "Trim21 <trim21me@gmail.com>" extensions = [ "sphinx.ext.autodoc", "sphinx.ext.viewcode", "sphinx.ext.githubpages", "sphinx_rtd_theme", ] templates_path = ["_templates"] source_suffix = ".rst" master_doc...
true
true
1c0b5435d8a41bfa9b4379a4dc5c249dc30ea88b
4,976
py
Python
docs/sample_code/distributed_training/resnet50_distributed_training_pipeline.py
mindspore-ai/docs
e7cbd69fe2bbd7870aa4591510ed3342ec6a3d41
[ "Apache-2.0", "CC-BY-4.0" ]
288
2020-03-28T07:00:25.000Z
2021-12-26T14:56:31.000Z
docs/sample_code/distributed_training/resnet50_distributed_training_pipeline.py
mindspore-ai/docs
e7cbd69fe2bbd7870aa4591510ed3342ec6a3d41
[ "Apache-2.0", "CC-BY-4.0" ]
1
2021-07-21T08:11:58.000Z
2021-07-21T08:11:58.000Z
docs/sample_code/distributed_training/resnet50_distributed_training_pipeline.py
mindspore-ai/docs
e7cbd69fe2bbd7870aa4591510ed3342ec6a3d41
[ "Apache-2.0", "CC-BY-4.0" ]
37
2020-03-30T06:38:37.000Z
2021-09-17T05:47:59.000Z
# Copyright 2020-2021 Huawei Technologies Co., Ltd # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
37.413534
105
0.703577
import os import mindspore.nn as nn from mindspore import dtype as mstype import mindspore.ops as ops import mindspore.dataset as ds import mindspore.dataset.vision.c_transforms as vision import mindspore.dataset.transforms.c_transforms as C from mindspore.communication import init, get_rank, get_group_size from mindsp...
true
true
1c0b545aee581aba071c890b0e3e0ee011bc33ec
91
py
Python
2_PROGII/00_exercicios_05.py
Julymusso/IFES
939277c375dacc7750705c5593537d80ab4cbc0e
[ "MIT" ]
null
null
null
2_PROGII/00_exercicios_05.py
Julymusso/IFES
939277c375dacc7750705c5593537d80ab4cbc0e
[ "MIT" ]
null
null
null
2_PROGII/00_exercicios_05.py
Julymusso/IFES
939277c375dacc7750705c5593537d80ab4cbc0e
[ "MIT" ]
null
null
null
def divisores(k): for i in range (1,k+1): if k % i == 0: print (i)
18.2
27
0.417582
def divisores(k): for i in range (1,k+1): if k % i == 0: print (i)
true
true
1c0b547cf90c0bb42d7b83a61f4c4855e7f6e885
1,100
py
Python
string_session.py
RoyalBoy69/OUB
d450fd55bbf2e292bc1a70e669217b79106edc7a
[ "Naumen", "Condor-1.1", "MS-PL" ]
39
2020-05-11T11:51:34.000Z
2022-03-04T19:23:40.000Z
string_session.py
RoyalBoy69/OUB
d450fd55bbf2e292bc1a70e669217b79106edc7a
[ "Naumen", "Condor-1.1", "MS-PL" ]
50
2020-05-30T14:04:05.000Z
2021-12-19T22:43:36.000Z
string_session.py
RoyalBoy69/OUB
d450fd55bbf2e292bc1a70e669217b79106edc7a
[ "Naumen", "Condor-1.1", "MS-PL" ]
615
2020-04-27T14:50:53.000Z
2022-03-12T19:54:32.000Z
#!/usr/bin/env python3 # (c) https://t.me/TelethonChat/37677 and SpEcHiDe # # Licensed under the Raphielscape Public License, Version 1.d (the "License"); # you may not use this file except in compliance with the License. # from telethon.sync import TelegramClient from telethon.sessions import StringSession print("""...
39.285714
96
0.766364
from telethon.sync import TelegramClient from telethon.sessions import StringSession print("""Please go-to my.telegram.org Login using your Telegram account Click on API Development Tools Create a new application, by entering the required details Check your Telegram saved messages section to copy the STRING_SESSION""...
true
true
1c0b54dc6fde870e2b8692336a431a716534dcce
313
py
Python
sample.py
claudetech/python-slack-log-handler
98e6cbec7c39642f4be7dc87aa064fb57dd0b046
[ "MIT" ]
33
2015-02-12T01:29:47.000Z
2020-08-20T19:20:31.000Z
sample.py
claudetech/python-slack-log-handler
98e6cbec7c39642f4be7dc87aa064fb57dd0b046
[ "MIT" ]
6
2015-03-30T18:02:07.000Z
2021-06-17T20:41:31.000Z
sample.py
claudetech/python-slack-log-handler
98e6cbec7c39642f4be7dc87aa064fb57dd0b046
[ "MIT" ]
14
2015-03-10T15:36:53.000Z
2019-10-01T17:23:38.000Z
import os import logging from slack_log_handler import SlackLogHandler WEBHOOK_URL = os.getenv('SLACK_URL') slack_handler = SlackLogHandler(WEBHOOK_URL) slack_handler.setLevel(logging.WARNING) logger = logging.getLogger(__name__) logger.addHandler(slack_handler) logger.error('Oh my god, an error occurred!')
22.357143
45
0.821086
import os import logging from slack_log_handler import SlackLogHandler WEBHOOK_URL = os.getenv('SLACK_URL') slack_handler = SlackLogHandler(WEBHOOK_URL) slack_handler.setLevel(logging.WARNING) logger = logging.getLogger(__name__) logger.addHandler(slack_handler) logger.error('Oh my god, an error occurred!')
true
true
1c0b5584d570fb8a8c57c20ba234237c3e3352b5
1,326
py
Python
allinone/geo8_choropleth.py
punch872/EyeWarnYou
71ea21a8b3f1ae213478d735a10a240524b89702
[ "MIT" ]
1
2019-03-04T08:37:26.000Z
2019-03-04T08:37:26.000Z
allinone/geo8_choropleth.py
punch872/EyeWarnYou
71ea21a8b3f1ae213478d735a10a240524b89702
[ "MIT" ]
null
null
null
allinone/geo8_choropleth.py
punch872/EyeWarnYou
71ea21a8b3f1ae213478d735a10a240524b89702
[ "MIT" ]
null
null
null
#1.0 Import Library import json import folium import pandas as pd from folium.plugins import MarkerCluster #Load Data geo_data = json.load(open("thailand.json")) emp_data = pd.read_csv("us-unemployment.csv") data = pd.read_csv("data/output-2015.csv") lat = data['latitude'] lon = data['longitude'] elevation = data['in...
24.109091
176
0.700603
import json import folium import pandas as pd from folium.plugins import MarkerCluster geo_data = json.load(open("thailand.json")) emp_data = pd.read_csv("us-unemployment.csv") data = pd.read_csv("data/output-2015.csv") lat = data['latitude'] lon = data['longitude'] elevation = data['input_string'] def color_change...
true
true
1c0b558acc29e41b5386774fe673f6e54bd1dcd5
4,195
py
Python
examples/deep_learning/object_detection/object_detection_from_camera.py
chokobole/felicia-examples
83303cf0f4bf688e9794ee574394d98619a16007
[ "BSD-3-Clause" ]
null
null
null
examples/deep_learning/object_detection/object_detection_from_camera.py
chokobole/felicia-examples
83303cf0f4bf688e9794ee574394d98619a16007
[ "BSD-3-Clause" ]
null
null
null
examples/deep_learning/object_detection/object_detection_from_camera.py
chokobole/felicia-examples
83303cf0f4bf688e9794ee574394d98619a16007
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2019 The Felicia Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import numpy as np import import_order_resolver # Should be before import felicia_py import felicia_py as fel import felicia_py.command_line...
34.105691
96
0.663886
import sys import numpy as np import import_order_resolver import felicia_py as fel import felicia_py.command_line_interface as cli from felicia.core.protobuf.bounding_box_pb2 import ImageWithBoundingBoxesMessage from felicia.core.protobuf.master_data_pb2 import NodeInfo from felicia.core.protobuf.channel_pb2 impor...
true
true
1c0b55ef4c6c4495a3ba91dd11cb3260ee83b085
4,001
py
Python
rolepermissions/permissions.py
wtayyeb/django-role-permissions
f4dec0ffef1547006b4356fa46424c1a3337de9d
[ "MIT" ]
null
null
null
rolepermissions/permissions.py
wtayyeb/django-role-permissions
f4dec0ffef1547006b4356fa46424c1a3337de9d
[ "MIT" ]
null
null
null
rolepermissions/permissions.py
wtayyeb/django-role-permissions
f4dec0ffef1547006b4356fa46424c1a3337de9d
[ "MIT" ]
null
null
null
from __future__ import unicode_literals from rolepermissions.exceptions import ( RolePermissionScopeException, CheckerNotRegistered) from rolepermissions.roles import get_user_roles, get_or_create_permission, _clear_user_available_perm_names class PermissionsManager(object): _checkers = {} @classmethod ...
31.753968
120
0.704574
from __future__ import unicode_literals from rolepermissions.exceptions import ( RolePermissionScopeException, CheckerNotRegistered) from rolepermissions.roles import get_user_roles, get_or_create_permission, _clear_user_available_perm_names class PermissionsManager(object): _checkers = {} @classmethod ...
true
true
1c0b563368430c026025a6f61704375a2b97b4d4
13,636
py
Python
Packs/BeyondTrust_Password_Safe/Integrations/BeyondTrust_Password_Safe/BeyondTrust_Password_Safe.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
799
2016-08-02T06:43:14.000Z
2022-03-31T11:10:11.000Z
Packs/BeyondTrust_Password_Safe/Integrations/BeyondTrust_Password_Safe/BeyondTrust_Password_Safe.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
9,317
2016-08-07T19:00:51.000Z
2022-03-31T21:56:04.000Z
Packs/BeyondTrust_Password_Safe/Integrations/BeyondTrust_Password_Safe/BeyondTrust_Password_Safe.py
diCagri/content
c532c50b213e6dddb8ae6a378d6d09198e08fc9f
[ "MIT" ]
1,297
2016-08-04T13:59:00.000Z
2022-03-31T23:43:06.000Z
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * ''' IMPORTS ''' import json import requests from typing import List, Dict # Disable insecure warnings requests.packages.urllib3.disable_warnings() ''' GLOBALS/PARAMS ''' USERNAME = demisto.params().get('credentials'...
30.302222
120
0.660751
import demistomock as demisto from CommonServerPython import * from CommonServerUserPython import * import json import requests from typing import List, Dict requests.packages.urllib3.disable_warnings() USERNAME = demisto.params().get('credentials', {}).get('identifier') PASSWORD = demisto.params().get('credential...
true
true
1c0b563d1d75998d4371d6be65b3077f691c6211
3,165
py
Python
lurker/spiders/beyond.py
JasherIO/lurker
2c366e55d3113dc6d9a7323aeaa8d7fd2d132b39
[ "MIT" ]
null
null
null
lurker/spiders/beyond.py
JasherIO/lurker
2c366e55d3113dc6d9a7323aeaa8d7fd2d132b39
[ "MIT" ]
null
null
null
lurker/spiders/beyond.py
JasherIO/lurker
2c366e55d3113dc6d9a7323aeaa8d7fd2d132b39
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Usage: scrapy crawl beyond -a url="https://teambeyond.net/forum/tournaments/164-astronauts-2000-rocket-league-3v3-1217-700pm-est/standings/" import scrapy import validators from ..items import Player import logging TEAMS_SELECTOR = '#ipsTabs_elTourneyTabs_standings_panel > div > div > tabl...
48.692308
161
0.690047
import scrapy import validators from ..items import Player import logging TEAMS_SELECTOR = '#ipsTabs_elTourneyTabs_standings_panel > div > div > table > tbody > tr > td > a::attr(href)' TEAM_ROWS_SELECTOR = '#ipsTabs_elTourneyTabs_standings_panel > div > div > table > tbody > tr' TEAM_LINK_SELECTOR = 'td > a::attr(...
true
true
1c0b56cc500fca0607c0a3bc426e68a3129c9ee0
7,210
py
Python
start_up/static_information.py
Matrixeigs/energy_management_system
b2af6a3cfa71173f33d798e943f605d802aed19f
[ "MIT" ]
68
2017-11-21T02:49:11.000Z
2022-03-25T07:14:42.000Z
start_up/static_information.py
yifeili/energy_management_system
b2af6a3cfa71173f33d798e943f605d802aed19f
[ "MIT" ]
null
null
null
start_up/static_information.py
yifeili/energy_management_system
b2af6a3cfa71173f33d798e943f605d802aed19f
[ "MIT" ]
34
2017-11-21T02:52:15.000Z
2022-03-27T14:35:25.000Z
""" Static information generation for energy management system """ import modelling.local_ems_pb2 as static_model import time def static_information_generation(*args): # Static informaiton generation for local ems local_models = args[0] info = static_model.local_sources_model() dg_info = static_mode...
46.217949
112
0.70319
import modelling.local_ems_pb2 as static_model import time def static_information_generation(*args): local_models = args[0] info = static_model.local_sources_model() dg_info = static_model.local_sources_model.DgType() ug_info = static_model.local_sources_model.DgType() ess_info = static_mod...
true
true
1c0b56f8708af9c78df0af494de17d5b816a4c01
9,208
py
Python
tests/tests.py
Williano/django-sms
d2e0bbb51dd8e478b186ce1a8264f097d980a13c
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
29
2021-01-18T09:09:59.000Z
2022-03-22T16:56:20.000Z
tests/tests.py
Williano/django-sms
d2e0bbb51dd8e478b186ce1a8264f097d980a13c
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
9
2021-01-31T19:29:42.000Z
2021-05-04T10:56:48.000Z
tests/tests.py
Williano/django-sms
d2e0bbb51dd8e478b186ce1a8264f097d980a13c
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
6
2021-02-19T01:40:45.000Z
2022-02-09T08:40:24.000Z
import os import sys import shutil import tempfile from typing import List, Type, Optional from io import StringIO from unittest.mock import MagicMock from django.dispatch import receiver # type: ignore from django.test import SimpleTestCase, override_settings # type: ignore import sms from sms import send_sms fr...
33.728938
79
0.623805
import os import sys import shutil import tempfile from typing import List, Type, Optional from io import StringIO from unittest.mock import MagicMock from django.dispatch import receiver from django.test import SimpleTestCase, override_settings import sms from sms import send_sms from sms.backends import dummy, ...
true
true
1c0b58cc3005fe3d3eadb917c0978b9a1381473e
653
py
Python
zone/forms.py
Alampulo/instazone
53d7c9469d75fdf1ab86fcb46045e273bea8b59c
[ "MIT" ]
null
null
null
zone/forms.py
Alampulo/instazone
53d7c9469d75fdf1ab86fcb46045e273bea8b59c
[ "MIT" ]
null
null
null
zone/forms.py
Alampulo/instazone
53d7c9469d75fdf1ab86fcb46045e273bea8b59c
[ "MIT" ]
2
2018-12-16T15:39:04.000Z
2018-12-17T15:03:01.000Z
from django import forms from django.contrib.auth.forms import UserCreationForm from .models import * class SignupForm(UserCreationForm): email = forms.EmailField(max_length=200, help_text='Required') class Meta: model = User fields = ('username', 'email', 'password1', 'password2') class NewP...
24.185185
66
0.660031
from django import forms from django.contrib.auth.forms import UserCreationForm from .models import * class SignupForm(UserCreationForm): email = forms.EmailField(max_length=200, help_text='Required') class Meta: model = User fields = ('username', 'email', 'password1', 'password2') class NewP...
true
true
1c0b595ba1637db2a65cd19f314321c541b65440
589
py
Python
PerceptualMetric/psrc/perceptree/test/data/dummy_tree_image.py
PolasekT/ICTree
d13ad603101805bcc288411504ecffd6f2e1f365
[ "MIT" ]
3
2021-12-09T22:37:03.000Z
2022-02-16T13:40:44.000Z
PerceptualMetric/psrc/perceptree/test/data/dummy_tree_image.py
PolasekT/ICTree
d13ad603101805bcc288411504ecffd6f2e1f365
[ "MIT" ]
null
null
null
PerceptualMetric/psrc/perceptree/test/data/dummy_tree_image.py
PolasekT/ICTree
d13ad603101805bcc288411504ecffd6f2e1f365
[ "MIT" ]
3
2021-12-09T22:37:08.000Z
2022-02-03T14:38:39.000Z
# -*- coding: utf-8 -*- """ Wrapper for testing tree file. """ from typing import Tuple import base64 import numpy as np import struct def dummy_tree_image_dict(shape: Tuple[int, int, int]) -> dict: data = np.random.random_sample(size=shape).flatten() pack_format = f"{len(data)}f" packed = struct.pack...
19
63
0.568761
from typing import Tuple import base64 import numpy as np import struct def dummy_tree_image_dict(shape: Tuple[int, int, int]) -> dict: data = np.random.random_sample(size=shape).flatten() pack_format = f"{len(data)}f" packed = struct.pack(pack_format, *data) encoded = base64.b64encode(packed) ...
true
true
1c0b5a787bda2c2c27c8b49a3d82d23b1b5e5634
398
py
Python
nomad_coders/users/migrations/0004_user_profile_image.py
sh21kang/nomadcoder
74f907ac837fa4dcf1967c79ec1522aa225aa1d4
[ "MIT" ]
null
null
null
nomad_coders/users/migrations/0004_user_profile_image.py
sh21kang/nomadcoder
74f907ac837fa4dcf1967c79ec1522aa225aa1d4
[ "MIT" ]
null
null
null
nomad_coders/users/migrations/0004_user_profile_image.py
sh21kang/nomadcoder
74f907ac837fa4dcf1967c79ec1522aa225aa1d4
[ "MIT" ]
null
null
null
# Generated by Django 2.0.6 on 2018-06-29 11:42 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0003_auto_20180629_1437'), ] operations = [ migrations.AddField( model_name='user', name='profile_image', ...
20.947368
61
0.59799
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0003_auto_20180629_1437'), ] operations = [ migrations.AddField( model_name='user', name='profile_image', field=models.ImageField(null=True, up...
true
true
1c0b5b9e8c37ca4976460d56e0d987cd0d7097ec
6,604
py
Python
compare_access_lists.py
jfilliben/compare-ios-lists
c4c821f67da13970d8f46efb502a229c1f25372b
[ "MIT" ]
2
2016-02-03T22:22:49.000Z
2016-11-18T14:54:12.000Z
compare_access_lists.py
jfilliben/compare-ios-lists
c4c821f67da13970d8f46efb502a229c1f25372b
[ "MIT" ]
null
null
null
compare_access_lists.py
jfilliben/compare-ios-lists
c4c821f67da13970d8f46efb502a229c1f25372b
[ "MIT" ]
null
null
null
# compare_access_lists.py # # Automates check of 3rd party access-list # from contextlib import contextmanager import netmiko from netmiko import ConnectHandler from netmiko.ssh_exception import NetMikoTimeoutException, NetMikoAuthenticationException import getpass import argparse # #use variables for constants # def ...
34.395833
129
0.601908
from contextlib import contextmanager import netmiko from netmiko import ConnectHandler from netmiko.ssh_exception import NetMikoTimeoutException, NetMikoAuthenticationException import getpass import argparse def build_router_dict(router_name, ssh_username, ssh_password, global_verbose): routerDict = { 'de...
false
true
1c0b5be84df485f29d942da93b9f27fa91f17236
496
py
Python
mnist/main.py
stallmanifold/kaggle
8854d5b7ceb98908b48aaf0ad8ffb94196d059dd
[ "BSD-3-Clause" ]
null
null
null
mnist/main.py
stallmanifold/kaggle
8854d5b7ceb98908b48aaf0ad8ffb94196d059dd
[ "BSD-3-Clause" ]
null
null
null
mnist/main.py
stallmanifold/kaggle
8854d5b7ceb98908b48aaf0ad8ffb94196d059dd
[ "BSD-3-Clause" ]
1
2018-09-11T19:38:05.000Z
2018-09-11T19:38:05.000Z
import mnist.logistic_tf as logistic_tf import mnist.conv_tf as conv_tf import mnist.kaggle as kaggle def execute_analysis(): labels = logistic_tf.train_and_test() kd = kaggle.kaggle_data(labels) return kd def execute_analysis_conv(): labels = conv_tf.execute_analysis() kd = ka...
22.545455
80
0.719758
import mnist.logistic_tf as logistic_tf import mnist.conv_tf as conv_tf import mnist.kaggle as kaggle def execute_analysis(): labels = logistic_tf.train_and_test() kd = kaggle.kaggle_data(labels) return kd def execute_analysis_conv(): labels = conv_tf.execute_analysis() kd = ka...
true
true
1c0b5c3d5905c8e9ea37ab908bb1812491c46dda
2,890
py
Python
src/Luna.Agent/Luna.Agent/Agent/Code/CodeUtils.py
isabella232/projectluna
36692c018cbb658947380db45d844a5fffccefee
[ "MIT" ]
null
null
null
src/Luna.Agent/Luna.Agent/Agent/Code/CodeUtils.py
isabella232/projectluna
36692c018cbb658947380db45d844a5fffccefee
[ "MIT" ]
1
2021-02-24T00:13:02.000Z
2021-02-24T00:13:02.000Z
src/Luna.Agent/Luna.Agent/Agent/Code/CodeUtils.py
isabella232/projectluna
36692c018cbb658947380db45d844a5fffccefee
[ "MIT" ]
null
null
null
import os import tempfile import requests import zipfile import shutil from Agent.Mgmt.ControlPlane import ControlPlane from Agent import app from datetime import datetime, timedelta class CodeUtils(object): """The class provides Git utilitiy functions""" # TODO: need to make a copy for each run so it do...
38.026316
108
0.625952
import os import tempfile import requests import zipfile import shutil from Agent.Mgmt.ControlPlane import ControlPlane from Agent import app from datetime import datetime, timedelta class CodeUtils(object): @staticmethod def getLocalCodeFolder(subscriptionId, productName, deploymentName, version, ba...
true
true
1c0b5c6aceb4cd19971c424d406045a475c4c5d2
6,467
py
Python
glance/common/scripts/image_import/main.py
venusource/glance
a8b4b845a0ced6746cee720f2cb191b73b0d3060
[ "Apache-2.0" ]
null
null
null
glance/common/scripts/image_import/main.py
venusource/glance
a8b4b845a0ced6746cee720f2cb191b73b0d3060
[ "Apache-2.0" ]
null
null
null
glance/common/scripts/image_import/main.py
venusource/glance
a8b4b845a0ced6746cee720f2cb191b73b0d3060
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
38.724551
79
0.650997
__all__ = [ 'run', ] from oslo_concurrency import lockutils from oslo_utils import excutils import six from glance.api.v2 import images as v2_api from glance.common import exception from glance.common.scripts import utils as script_utils from glance.common import store_utils from glance.common import utils as co...
true
true
1c0b5c71ff2e905a5db50b57d99cc19975cda7a3
684,515
py
Python
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/models/_models_py3.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
8
2021-01-13T23:44:08.000Z
2021-03-17T10:13:36.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/models/_models_py3.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
4
2019-04-17T17:57:49.000Z
2020-04-24T21:11:22.000Z
sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_12_01/models/_models_py3.py
vbarbaresi/azure-sdk-for-python
397ba46c51d001ff89c66b170f5576cf8f49c05f
[ "MIT" ]
2
2021-05-23T16:46:31.000Z
2021-05-26T23:51:09.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may ...
41.233359
540
0.668567
import datetime from typing import Dict, List, Optional, Union from azure.core.exceptions import HttpResponseError import msrest.serialization from ._network_management_client_enums import * class AddressSpace(msrest.serialization.Model): _attribute_map = { 'address_prefixes': {'key': 'addressPrefixes...
true
true
1c0b5cc19d4b1cd0e23acabd265d566aa5e5b666
97,356
py
Python
tests/jobs.py
beattymg/airflow
859952cfbdeb45368c6a09d0be51d05302d2f0b6
[ "MIT", "BSD-3-Clause", "BSD-2-Clause", "Apache-2.0" ]
6
2016-04-20T20:40:43.000Z
2022-02-20T10:32:00.000Z
tests/jobs.py
beattymg/airflow
859952cfbdeb45368c6a09d0be51d05302d2f0b6
[ "MIT", "BSD-3-Clause", "BSD-2-Clause", "Apache-2.0" ]
8
2017-09-07T22:20:35.000Z
2021-05-14T17:35:27.000Z
tests/jobs.py
beattymg/airflow
859952cfbdeb45368c6a09d0be51d05302d2f0b6
[ "MIT", "BSD-3-Clause", "BSD-2-Clause", "Apache-2.0" ]
8
2016-04-13T21:22:46.000Z
2020-07-31T18:31:59.000Z
# -*- coding: utf-8 -*- # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software ...
35.570332
115
0.610039
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import datetime import logging import os import shutil import unittest import six import socket import threading from tempfile import mkdtemp from airflow import Airflo...
true
true
1c0b5d1723b924946bd3445539a31387d2756efa
126
py
Python
Python/src/examples/types.py
nikolabebic95/LoopsOptimizationTests
2053edddce2daad674b884e6826151413bb759b0
[ "MIT" ]
null
null
null
Python/src/examples/types.py
nikolabebic95/LoopsOptimizationTests
2053edddce2daad674b884e6826151413bb759b0
[ "MIT" ]
null
null
null
Python/src/examples/types.py
nikolabebic95/LoopsOptimizationTests
2053edddce2daad674b884e6826151413bb759b0
[ "MIT" ]
null
null
null
def main(): lst = [] for i in range(5): lst.append(i) print(lst) if __name__ == '__main__': main()
11.454545
26
0.492063
def main(): lst = [] for i in range(5): lst.append(i) print(lst) if __name__ == '__main__': main()
true
true
1c0b5db8ba0d7f91a5d66b812032946479ef5ba2
4,730
py
Python
azure/mgmt/network/v2017_06_01/models/frontend_ip_configuration.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
2
2020-07-29T14:22:17.000Z
2020-11-06T18:47:40.000Z
azure/mgmt/network/v2017_06_01/models/frontend_ip_configuration.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
1
2016-08-01T07:37:04.000Z
2016-08-01T07:37:04.000Z
azure/mgmt/network/v2017_06_01/models/frontend_ip_configuration.py
EnjoyLifeFund/py36pkgs
0ac677fbbfa7b6d8c527fe2c759ba05117b07fd2
[ "MIT", "BSD-2-Clause", "BSD-3-Clause" ]
1
2020-12-12T21:04:41.000Z
2020-12-12T21:04:41.000Z
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
48.265306
176
0.679281
from .sub_resource import SubResource class FrontendIPConfiguration(SubResource): _validation = { 'inbound_nat_rules': {'readonly': True}, 'inbound_nat_pools': {'readonly': True}, 'outbound_nat_rules': {'readonly': True}, 'load_balancing_rules': {'readonly': True}, } _at...
true
true
1c0b5e2b3f25ad1386f1f7ae0a880b695545875b
6,640
py
Python
assignment_2/code/Part 1/datasets.py
nilsleh/deepLearning2020
8b4b1c3092afb1411c2d5d95cafc768c77d26688
[ "MIT" ]
null
null
null
assignment_2/code/Part 1/datasets.py
nilsleh/deepLearning2020
8b4b1c3092afb1411c2d5d95cafc768c77d26688
[ "MIT" ]
null
null
null
assignment_2/code/Part 1/datasets.py
nilsleh/deepLearning2020
8b4b1c3092afb1411c2d5d95cafc768c77d26688
[ "MIT" ]
null
null
null
############################################################################### # MIT License # # Copyright (c) 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, inc...
30.319635
104
0.626807
import random import numpy as np import torch import torch.utils.data as data import sys import math def check_even(length): if length % 2 == 0: return True return False def check_baum_sweet(binary_string): zeros_list = binary_string.split('1') lengths = [check_even(len(block)) for bloc...
true
true
1c0b5ee2d65f0023a317e12635803cbe84446205
462
py
Python
brambling/migrations/0012_customformfield_help_text.py
Shivanjain023/django-brambling
17539b82df37f22bd2b4293e73142b887c916344
[ "BSD-3-Clause" ]
8
2015-05-06T18:26:15.000Z
2018-02-07T22:18:32.000Z
brambling/migrations/0012_customformfield_help_text.py
Shivanjain023/django-brambling
17539b82df37f22bd2b4293e73142b887c916344
[ "BSD-3-Clause" ]
578
2015-01-05T21:37:17.000Z
2018-02-14T16:43:50.000Z
brambling/migrations/0012_customformfield_help_text.py
Shivanjain023/django-brambling
17539b82df37f22bd2b4293e73142b887c916344
[ "BSD-3-Clause" ]
1
2015-08-20T16:59:32.000Z
2015-08-20T16:59:32.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('brambling', '0011_auto_20150603_1708'), ] operations = [ migrations.AddField( model_name='customformfield', ...
22
63
0.616883
from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('brambling', '0011_auto_20150603_1708'), ] operations = [ migrations.AddField( model_name='customformfield', name='help_text'...
true
true
1c0b60540ff2aa534f933dc644f91c36d21d88f5
7,977
py
Python
google/cloud/aiplatform/utils/worker_spec_utils.py
dizcology/python-aiplatform
1a135775966c8a2303ded529eba514dcf9db7205
[ "Apache-2.0" ]
1
2021-11-27T00:41:48.000Z
2021-11-27T00:41:48.000Z
google/cloud/aiplatform/utils/worker_spec_utils.py
orionnye/python-aiplatform
e3ea683bf754832340853a15bdb0a0662500a70f
[ "Apache-2.0" ]
1
2021-03-02T18:25:00.000Z
2021-03-02T18:25:00.000Z
google/cloud/aiplatform/utils/worker_spec_utils.py
orionnye/python-aiplatform
e3ea683bf754832340853a15bdb0a0662500a70f
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
35.140969
88
0.626927
from typing import NamedTuple, Optional, Dict, Union, List from google.cloud.aiplatform import utils from google.cloud.aiplatform.compat.types import ( accelerator_type as gca_accelerator_type_compat, ) class _WorkerPoolSpec(NamedTuple): replica_count: int = 0 machine_type: str = "n1-standard-4" ac...
true
true
1c0b62d44a826d8e59bea4e57c52f7d8e3762764
5,836
py
Python
openpeerpower/components/mqtt/lock.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
1
2021-07-08T20:09:55.000Z
2021-07-08T20:09:55.000Z
openpeerpower/components/mqtt/lock.py
pcaston/core
e74d946cef7a9d4e232ae9e0ba150d18018cfe33
[ "Apache-2.0" ]
47
2021-02-21T23:43:07.000Z
2022-03-31T06:07:10.000Z
openpeerpower/components/mqtt/lock.py
OpenPeerPower/core
f673dfac9f2d0c48fa30af37b0a99df9dd6640ee
[ "Apache-2.0" ]
null
null
null
"""Support for MQTT locks.""" import functools import voluptuous as vol from openpeerpower.components import lock from openpeerpower.components.lock import LockEntity from openpeerpower.const import CONF_NAME, CONF_OPTIMISTIC, CONF_VALUE_TEMPLATE from openpeerpower.core import OpenPeerPower, callback import openpeerp...
33.348571
87
0.667066
import functools import voluptuous as vol from openpeerpower.components import lock from openpeerpower.components.lock import LockEntity from openpeerpower.const import CONF_NAME, CONF_OPTIMISTIC, CONF_VALUE_TEMPLATE from openpeerpower.core import OpenPeerPower, callback import openpeerpower.helpers.config_validation...
true
true
1c0b633fa56c6ee108b98eec4e4a4f914e8f11cb
3,633
py
Python
office365/runtime/auth/authentication_context.py
domdinicola/Office365-REST-Python-Client
c64adb6c3fdc2786e0c9529e8b0f4c3ee207d2a0
[ "MIT" ]
null
null
null
office365/runtime/auth/authentication_context.py
domdinicola/Office365-REST-Python-Client
c64adb6c3fdc2786e0c9529e8b0f4c3ee207d2a0
[ "MIT" ]
null
null
null
office365/runtime/auth/authentication_context.py
domdinicola/Office365-REST-Python-Client
c64adb6c3fdc2786e0c9529e8b0f4c3ee207d2a0
[ "MIT" ]
null
null
null
from office365.runtime.auth.base_authentication_context import BaseAuthenticationContext from office365.runtime.auth.providers.acs_token_provider import ACSTokenProvider from office365.runtime.auth.providers.oauth_token_provider import OAuthTokenProvider from office365.runtime.auth.providers.saml_token_provider import ...
41.284091
109
0.6752
from office365.runtime.auth.base_authentication_context import BaseAuthenticationContext from office365.runtime.auth.providers.acs_token_provider import ACSTokenProvider from office365.runtime.auth.providers.oauth_token_provider import OAuthTokenProvider from office365.runtime.auth.providers.saml_token_provider import ...
true
true
1c0b63e8b73c206d21f1104cf5183bbbee066286
500
py
Python
contentbox/views.py
mahoyen/web
1d190a86e3277315804bfcc0b8f9abd4f9c1d780
[ "MIT" ]
null
null
null
contentbox/views.py
mahoyen/web
1d190a86e3277315804bfcc0b8f9abd4f9c1d780
[ "MIT" ]
null
null
null
contentbox/views.py
mahoyen/web
1d190a86e3277315804bfcc0b8f9abd4f9c1d780
[ "MIT" ]
null
null
null
from django.contrib.auth.mixins import PermissionRequiredMixin from django.urls import reverse from django.views.generic import UpdateView from contentbox.models import ContentBox class EditContentBoxView(PermissionRequiredMixin, UpdateView): model = ContentBox template_name = 'contentbox/edit.html' fiel...
25
62
0.736
from django.contrib.auth.mixins import PermissionRequiredMixin from django.urls import reverse from django.views.generic import UpdateView from contentbox.models import ContentBox class EditContentBoxView(PermissionRequiredMixin, UpdateView): model = ContentBox template_name = 'contentbox/edit.html' fiel...
true
true
1c0b642883c43b23c7963af947a0ec657c4ee2b6
1,486
py
Python
simulation/simulation/geometry/material.py
wtrnoguchi/superposition
a3ce049000ea8b014c4cac1bfe84d8b399862ef9
[ "MIT" ]
2
2022-03-09T21:33:46.000Z
2022-03-12T06:14:41.000Z
simulation/simulation/geometry/material.py
wtrnoguchi/superposition
a3ce049000ea8b014c4cac1bfe84d8b399862ef9
[ "MIT" ]
null
null
null
simulation/simulation/geometry/material.py
wtrnoguchi/superposition
a3ce049000ea8b014c4cac1bfe84d8b399862ef9
[ "MIT" ]
null
null
null
class Material(object): def __init__( self, name=None, Ns=None, Ka=None, Kd=None, Ks=None, Ni=None, d=None, illum=None, map_Kd=None, ): self.__name = name self.__Ns = Ns ...
18.345679
40
0.512786
class Material(object): def __init__( self, name=None, Ns=None, Ka=None, Kd=None, Ks=None, Ni=None, d=None, illum=None, map_Kd=None, ): self.__name = name self.__Ns = Ns ...
true
true
1c0b64e563e09d099ec92a14eea8bd08e4c5d3bc
19,272
py
Python
sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_triggers_operations.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
1
2021-06-02T08:01:35.000Z
2021-06-02T08:01:35.000Z
sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_triggers_operations.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
1
2020-03-06T05:57:16.000Z
2020-03-06T05:57:16.000Z
sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/operations/_triggers_operations.py
tzhanl/azure-sdk-for-python
18cd03f4ab8fd76cc0498f03e80fbc99f217c96e
[ "MIT" ]
null
null
null
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
47.70297
224
0.678549
import uuid from msrest.pipeline import ClientRawResponse from msrest.polling import LROPoller, NoPolling from msrestazure.polling.arm_polling import ARMPolling from .. import models class TriggersOperations(object): models = models def __init__(self, client, config, serializer, deserializer): se...
true
true
1c0b64fd3d991b9f9a7feeceb07e5e76e3089b7a
2,729
py
Python
classification/tflearn-stuff/run-prediction.py
vanthaiunghoa/ourBlock
c106ddc030707c91af1e4ceff6b3a6086f727d8d
[ "MIT" ]
null
null
null
classification/tflearn-stuff/run-prediction.py
vanthaiunghoa/ourBlock
c106ddc030707c91af1e4ceff6b3a6086f727d8d
[ "MIT" ]
null
null
null
classification/tflearn-stuff/run-prediction.py
vanthaiunghoa/ourBlock
c106ddc030707c91af1e4ceff6b3a6086f727d8d
[ "MIT" ]
1
2019-12-26T18:05:37.000Z
2019-12-26T18:05:37.000Z
# restore all of our data structures import pickle import nltk from nltk.stem.lancaster import LancasterStemmer stemmer = LancasterStemmer() # things we need for Tensorflow import numpy as np import tflearn import tensorflow as tf import random data = pickle.load( open( "training_data", "rb" ) ) words = data['words']...
32.105882
88
0.661414
import pickle import nltk from nltk.stem.lancaster import LancasterStemmer stemmer = LancasterStemmer() import numpy as np import tflearn import tensorflow as tf import random data = pickle.load( open( "training_data", "rb" ) ) words = data['words'] classes = data['classes'] train_x = data['train_x'] train_y = data['...
true
true
1c0b65207a2406eb6ee229b8ff6704e2fbf12ff6
2,645
py
Python
STGCN/models/base_model.py
ArashAhmadian/AirTrafficSTGCN
ae705d14f6aace31633bd26cfd69b227c6596fe0
[ "MIT" ]
null
null
null
STGCN/models/base_model.py
ArashAhmadian/AirTrafficSTGCN
ae705d14f6aace31633bd26cfd69b227c6596fe0
[ "MIT" ]
2
2022-02-14T00:46:42.000Z
2022-03-28T00:00:16.000Z
STGCN/models/base_model.py
ArashAhmadian/AirTrafficSTGCN
ae705d14f6aace31633bd26cfd69b227c6596fe0
[ "MIT" ]
2
2022-02-13T21:30:13.000Z
2022-02-14T00:27:13.000Z
# @Time : Jan. 12, 2019 19:01 # @Author : Veritas YIN # @FileName : base_model.py # @Version : 1.0 # @IDE : PyCharm # @Github : https://github.com/VeritasYin/Project_Orion from models.layers import * from os.path import join as pjoin import tensorflow as tf import sys def build_model(inputs, n_his, Ks,...
35.743243
114
0.628733
from models.layers import * from os.path import join as pjoin import tensorflow as tf import sys def build_model(inputs, n_his, Ks, Kt, blocks, keep_prob): x = inputs[:, 0:n_his, :, :] print(x.get_shape()) Ko = n_his for i, channels in enumerate(blocks): x = st_conv_block(x, Ks, ...
true
true
1c0b65504eb351d3cde14781797b732bc82d0d08
3,574
py
Python
lib/model/rpn/generate_anchors.py
Flsahkong/faster-rcnn.pytorch
f2b4753f3ca86a19c2701d28aa135a81b2a21c25
[ "MIT" ]
null
null
null
lib/model/rpn/generate_anchors.py
Flsahkong/faster-rcnn.pytorch
f2b4753f3ca86a19c2701d28aa135a81b2a21c25
[ "MIT" ]
null
null
null
lib/model/rpn/generate_anchors.py
Flsahkong/faster-rcnn.pytorch
f2b4753f3ca86a19c2701d28aa135a81b2a21c25
[ "MIT" ]
null
null
null
from __future__ import print_function # -------------------------------------------------------- # Faster R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick and Sean Bell # -------------------------------------------------------- import numpy as n...
30.033613
88
0.545327
from __future__ import print_function import numpy as np import pdb # # >> load output/rpn_cachedir/faster_rcnn_VOC2007_ZF_stage1_rpn/anchors.mat # >> anchors # # anchors = # # -83 -39 100 56 # -175 -87 192 104 # -359 -183 376 200 # -55 -55 72 72 # -119 -...
true
true
1c0b66a18995146cc37312ebb6a97a6f2c9a40d3
32,773
py
Python
sentence_transformers/SentenceTransformer.py
AlexeyVatolin/sentence-transformers
084b80cd351b135a1d48211ec4f4aea37f01a641
[ "Apache-2.0" ]
null
null
null
sentence_transformers/SentenceTransformer.py
AlexeyVatolin/sentence-transformers
084b80cd351b135a1d48211ec4f4aea37f01a641
[ "Apache-2.0" ]
null
null
null
sentence_transformers/SentenceTransformer.py
AlexeyVatolin/sentence-transformers
084b80cd351b135a1d48211ec4f4aea37f01a641
[ "Apache-2.0" ]
null
null
null
import json import logging import os import shutil from collections import OrderedDict from typing import List, Dict, Tuple, Iterable, Type, Union, Callable from zipfile import ZipFile import requests import numpy as np from numpy import ndarray import transformers import torch from torch import nn, Tensor, device from...
44.589116
276
0.598786
import json import logging import os import shutil from collections import OrderedDict from typing import List, Dict, Tuple, Iterable, Type, Union, Callable from zipfile import ZipFile import requests import numpy as np from numpy import ndarray import transformers import torch from torch import nn, Tensor, device from...
true
true
1c0b66c96a3d1daf90ef808b5ecd5f0d0ddcfbf8
1,548
py
Python
1_1_Image_Representation/Green Screen Car Streamlit.py
Bren0Miranda/Udacity-Computer-Vision-Nanodegree-
834bb274c9d514308947544bd819f514b275e167
[ "MIT" ]
null
null
null
1_1_Image_Representation/Green Screen Car Streamlit.py
Bren0Miranda/Udacity-Computer-Vision-Nanodegree-
834bb274c9d514308947544bd819f514b275e167
[ "MIT" ]
null
null
null
1_1_Image_Representation/Green Screen Car Streamlit.py
Bren0Miranda/Udacity-Computer-Vision-Nanodegree-
834bb274c9d514308947544bd819f514b275e167
[ "MIT" ]
null
null
null
import cv2 import numpy as np from PIL import Image import streamlit as st import matplotlib.pyplot as plt import matplotlib.image as mpimg st.set_option('deprecation.showfileUploaderEncoding', False) img_file = st.file_uploader("Upload da imagem", type=["png", "jpg", "jpeg"]) img_file_background = st.file_uploader(...
30.96
96
0.665375
import cv2 import numpy as np from PIL import Image import streamlit as st import matplotlib.pyplot as plt import matplotlib.image as mpimg st.set_option('deprecation.showfileUploaderEncoding', False) img_file = st.file_uploader("Upload da imagem", type=["png", "jpg", "jpeg"]) img_file_background = st.file_uploader(...
true
true
1c0b683783e7331d3bc464bbfea86a683ee05000
17,054
py
Python
main_gui.py
oscarcx123/afk-arena-tools
6cf4b0165a78049af7bcfffc3bc11e94255bf115
[ "BSD-3-Clause" ]
49
2019-10-21T06:18:45.000Z
2021-09-13T03:02:18.000Z
main_gui.py
oscarcx123/afk-arena-tools
6cf4b0165a78049af7bcfffc3bc11e94255bf115
[ "BSD-3-Clause" ]
12
2020-01-09T13:39:48.000Z
2021-01-21T16:18:46.000Z
main_gui.py
oscarcx123/afk-arena-tools
6cf4b0165a78049af7bcfffc3bc11e94255bf115
[ "BSD-3-Clause" ]
7
2020-01-16T08:40:38.000Z
2021-09-15T11:35:01.000Z
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'main_gui.ui' # # Created by: PyQt5 UI code generator 5.13.0 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainW...
59.629371
101
0.703706
from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(801, 555) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") ...
true
true
1c0b6839428e472751aa2e3560d8379eeb1ba0b0
5,140
py
Python
examples/chart_data_tools.py
adgear/XlsxWriter
79bcaad28d57ac29038b1c74bccc6d611b7a385e
[ "BSD-2-Clause-FreeBSD" ]
1
2019-07-12T02:58:59.000Z
2019-07-12T02:58:59.000Z
examples/chart_data_tools.py
adgear/XlsxWriter
79bcaad28d57ac29038b1c74bccc6d611b7a385e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
examples/chart_data_tools.py
adgear/XlsxWriter
79bcaad28d57ac29038b1c74bccc6d611b7a385e
[ "BSD-2-Clause-FreeBSD" ]
null
null
null
####################################################################### # # A demo of an various Excel chart data tools that are available via # an XlsxWriter chart. # # These include, Trendlines, Data Labels, Error Bars, Drop Lines, # High-Low Lines and Up-Down Bars. # # Copyright 2013-2019, John McNamara, jmcnamara@c...
25.829146
71
0.581518
import xlsxwriter workbook = xlsxwriter.Workbook('chart_data_tools.xlsx') worksheet = workbook.add_worksheet() bold = workbook.add_format({'bold': 1}) headings = ['Number', 'Data 1', 'Data 2'] data = [ [2, 3, 4, 5, 6, 7], [10, 40, 50, 20, 10, 50], [30, 60, 70, 50, 40, 30], ] worksheet.write_row('A1', hea...
true
true
1c0b68ceae7220e132dfd222979ef5e48d0cf87d
56
py
Python
network_moments/torch/utils/stats/__init__.py
ModarTensai/network_moments
aadd4dacb12d7238c66e6a77c3c56fc84242a0fd
[ "MIT" ]
6
2018-07-28T17:06:01.000Z
2020-08-17T00:14:27.000Z
network_moments/torch/utils/stats/__init__.py
xmodar/network_moments
aadd4dacb12d7238c66e6a77c3c56fc84242a0fd
[ "MIT" ]
null
null
null
network_moments/torch/utils/stats/__init__.py
xmodar/network_moments
aadd4dacb12d7238c66e6a77c3c56fc84242a0fd
[ "MIT" ]
1
2018-08-09T14:23:20.000Z
2018-08-09T14:23:20.000Z
from . import gaussian from .stats import * del stats
9.333333
22
0.732143
from . import gaussian from .stats import * del stats
true
true
1c0b694f13a5e8bef49da6054fd555607baaa20b
5,428
py
Python
nekoyume/game.py
incl/nekoyume
25bf9b9c1f512ac4ca4bf9465d391c242360f489
[ "MIT" ]
null
null
null
nekoyume/game.py
incl/nekoyume
25bf9b9c1f512ac4ca4bf9465d391c242360f489
[ "MIT" ]
null
null
null
nekoyume/game.py
incl/nekoyume
25bf9b9c1f512ac4ca4bf9465d391c242360f489
[ "MIT" ]
null
null
null
import functools from coincurve import PrivateKey from flask import (Blueprint, Response, g, redirect, render_template, request, session, url_for) from flask_babel import Babel from sqlalchemy import func from .models import LevelUp, Move, Node, User, cache, db game = Blueprint('game', __name__, ...
31.55814
78
0.600405
import functools from coincurve import PrivateKey from flask import (Blueprint, Response, g, redirect, render_template, request, session, url_for) from flask_babel import Babel from sqlalchemy import func from .models import LevelUp, Move, Node, User, cache, db game = Blueprint('game', __name__, ...
true
true
1c0b6ac5d74195eca53264d399c9555701b91a97
456
py
Python
source.py
fabiomolinar/excel-files-merger
5cbd9c92582e5532fb75f3a095195f76a86bc6ce
[ "MIT" ]
null
null
null
source.py
fabiomolinar/excel-files-merger
5cbd9c92582e5532fb75f3a095195f76a86bc6ce
[ "MIT" ]
null
null
null
source.py
fabiomolinar/excel-files-merger
5cbd9c92582e5532fb75f3a095195f76a86bc6ce
[ "MIT" ]
null
null
null
import os import glob import pandas as pd path_sources = r"./sources/*.xls" path_output = r"./output/output.xlsx" data = pd.DataFrame() for file in glob.glob(path_sources): df = pd.read_excel(file, header=None) data = data.append(df, ignore_index=True, sort=False) data = data.dropna(how="all") if os.path.ex...
25.333333
57
0.72807
import os import glob import pandas as pd path_sources = r"./sources/*.xls" path_output = r"./output/output.xlsx" data = pd.DataFrame() for file in glob.glob(path_sources): df = pd.read_excel(file, header=None) data = data.append(df, ignore_index=True, sort=False) data = data.dropna(how="all") if os.path.ex...
true
true
1c0b6ba6a2b01140f7d320f437ba21799e2bc20c
15,300
py
Python
src/common/ExporterTypes.py
terra-dashboard/staketaxcsv
5793105488bf799c61aee64a45f44e9ae8fef397
[ "MIT" ]
null
null
null
src/common/ExporterTypes.py
terra-dashboard/staketaxcsv
5793105488bf799c61aee64a45f44e9ae8fef397
[ "MIT" ]
null
null
null
src/common/ExporterTypes.py
terra-dashboard/staketaxcsv
5793105488bf799c61aee64a45f44e9ae8fef397
[ "MIT" ]
null
null
null
# CSV formats FORMAT_DEFAULT = "default" FORMAT_BALANCES = "balances" FORMAT_ACCOINTING = "accointing" FORMAT_BITCOINTAX = "bitcointax" FORMAT_COINLEDGER = "coinledger" FORMAT_COINPANDA = "coinpanda" FORMAT_COINTRACKING = "cointracking" FORMAT_COINTRACKER = "cointracker" FORMAT_CRYPTOCOM = "cryptocom" FORMAT_CRYPTOTAXC...
31.546392
114
0.773333
FORMAT_DEFAULT = "default" FORMAT_BALANCES = "balances" FORMAT_ACCOINTING = "accointing" FORMAT_BITCOINTAX = "bitcointax" FORMAT_COINLEDGER = "coinledger" FORMAT_COINPANDA = "coinpanda" FORMAT_COINTRACKING = "cointracking" FORMAT_COINTRACKER = "cointracker" FORMAT_CRYPTOCOM = "cryptocom" FORMAT_CRYPTOTAXCALCULATOR = "c...
true
true
1c0b6ba8ddaa2167fb06023467218b97e7e6da32
3,482
py
Python
rfcutils/dataset_helper_fn.py
RFChallenge/rfchallenge_starter
724a52f68541d3f9c3f460d88fe4e2be9662aa49
[ "MIT" ]
6
2021-08-20T06:01:04.000Z
2022-01-05T14:24:32.000Z
rfcutils/dataset_helper_fn.py
RFChallenge/rfchallenge_starter
724a52f68541d3f9c3f460d88fe4e2be9662aa49
[ "MIT" ]
1
2021-08-19T16:32:28.000Z
2021-08-19T16:32:28.000Z
rfcutils/dataset_helper_fn.py
RFChallenge/rfchallenge_starter
724a52f68541d3f9c3f460d88fe4e2be9662aa49
[ "MIT" ]
null
null
null
import os import warnings import numpy as np import pickle from .sigmf_helper_fn import write_sigmf_file, read_sigmf_file def load_dataset_sample(idx, dataset_type, sig_type): foldername = os.path.join('dataset',dataset_type,sig_type) filename = f'{sig_type}_{dataset_type}_{idx:04d}' # Special handling fo...
54.40625
161
0.739518
import os import warnings import numpy as np import pickle from .sigmf_helper_fn import write_sigmf_file, read_sigmf_file def load_dataset_sample(idx, dataset_type, sig_type): foldername = os.path.join('dataset',dataset_type,sig_type) filename = f'{sig_type}_{dataset_type}_{idx:04d}' if 'sep_' in data...
true
true
1c0b6e2c4294f68ecf902b95dc67faf21415a290
2,521
py
Python
Deep learning project/Smile detection/train_model_smile.py
sozand/My-Portfolio
cb644212b277896112db4f1685e01fc4cafe39c5
[ "Apache-2.0" ]
null
null
null
Deep learning project/Smile detection/train_model_smile.py
sozand/My-Portfolio
cb644212b277896112db4f1685e01fc4cafe39c5
[ "Apache-2.0" ]
null
null
null
Deep learning project/Smile detection/train_model_smile.py
sozand/My-Portfolio
cb644212b277896112db4f1685e01fc4cafe39c5
[ "Apache-2.0" ]
null
null
null
# คำสั่ง # python train_model_smile.py --dataset ../datasets/SMILEsmileD --model output/lenet.hdf5 from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report from tensorflow.keras.preprocessing.image import img_to_array from ten...
32.320513
89
0.748512
from sklearn.preprocessing import LabelEncoder from sklearn.model_selection import train_test_split from sklearn.metrics import classification_report from tensorflow.keras.preprocessing.image import img_to_array from tensorflow.keras.utils import to_categorical from pyimagesearch.nn.conv import LeNet from imutils impo...
true
true
1c0b6e51bafde0aeb34f7a5691eed763fe7f8d8c
341
py
Python
tests/app_name/sub/test_module2.py
mozkzki/template-python
a7a08a8ddca99e7103e7adacea621be82342e595
[ "MIT" ]
null
null
null
tests/app_name/sub/test_module2.py
mozkzki/template-python
a7a08a8ddca99e7103e7adacea621be82342e595
[ "MIT" ]
25
2021-10-04T17:29:22.000Z
2022-03-29T17:25:13.000Z
tests/app_name/sub/test_module2.py
mozkzki/template-python
a7a08a8ddca99e7103e7adacea621be82342e595
[ "MIT" ]
null
null
null
import pytest from app_name.sub.module2 import Module2 class TestModule2: @pytest.fixture() def module2(request): return Module2() def test_method(self, module2: Module2, capfd): module2.method() out, err = capfd.readouterr() assert "module2's method called.\n" in out ...
22.733333
51
0.639296
import pytest from app_name.sub.module2 import Module2 class TestModule2: @pytest.fixture() def module2(request): return Module2() def test_method(self, module2: Module2, capfd): module2.method() out, err = capfd.readouterr() assert "module2's method called.\n" in out ...
true
true
1c0b6e859311e907e2d423089dee860636646e59
98,777
py
Python
enterprise_extensions/models.py
mattsamson0203/enterprise_extensions
cd2ebe0094f4b315da122e8acf790f056aa1628e
[ "MIT" ]
1
2018-10-10T18:05:35.000Z
2018-10-10T18:05:35.000Z
enterprise_extensions/models.py
mattsamson0203/enterprise_extensions
cd2ebe0094f4b315da122e8acf790f056aa1628e
[ "MIT" ]
12
2018-06-14T15:53:13.000Z
2019-09-20T20:05:29.000Z
enterprise_extensions/models.py
mattsamson0203/enterprise_extensions
cd2ebe0094f4b315da122e8acf790f056aa1628e
[ "MIT" ]
14
2018-04-11T20:59:49.000Z
2019-08-07T01:25:09.000Z
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np import functools from collections import OrderedDict from enterprise.signals import parameter from enterprise.signals import selections from enterprise.signals import ...
41.730883
103
0.61893
from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np import functools from collections import OrderedDict from enterprise.signals import parameter from enterprise.signals import selections from enterprise.signals import signal_base from enterpr...
true
true
1c0b6f17fe50e827069bddb56b29c3706d4fd9df
23,441
py
Python
server/apps/report/tests/test_generated_report_api.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
server/apps/report/tests/test_generated_report_api.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
server/apps/report/tests/test_generated_report_api.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
from unittest import mock from django.core.exceptions import PermissionDenied from rest_framework import status from rest_framework.reverse import reverse from rest_framework.test import APITestCase from iotile_cloud.utils.gid import * from apps.org.models import OrgMembership from apps.streamevent.models import St...
40.207547
108
0.64737
from unittest import mock from django.core.exceptions import PermissionDenied from rest_framework import status from rest_framework.reverse import reverse from rest_framework.test import APITestCase from iotile_cloud.utils.gid import * from apps.org.models import OrgMembership from apps.streamevent.models import St...
true
true
1c0b70a7dfe176ca2937bc6b06f5cd777b1942fb
38
py
Python
ip_restriction/__init__.py
caot/django-ip-block
8b0cf4846839d136d109333ea01eb379487ad6d3
[ "MIT" ]
4
2017-09-23T16:05:10.000Z
2018-10-27T19:49:22.000Z
ip_restriction/__init__.py
caot/django-ip-block
8b0cf4846839d136d109333ea01eb379487ad6d3
[ "MIT" ]
3
2018-02-15T15:49:00.000Z
2019-01-02T12:31:21.000Z
ip_restriction/__init__.py
caot/django-ip-block
8b0cf4846839d136d109333ea01eb379487ad6d3
[ "MIT" ]
7
2018-01-04T04:19:42.000Z
2021-11-22T17:52:13.000Z
from .middleware import IpWhitelister
19
37
0.868421
from .middleware import IpWhitelister
true
true
1c0b70c168828a2d38a5278b1cb74a7d0e346280
9,660
py
Python
obsTable.py
MrEnvision/learning_OTA_by_testing
4ba35af0a13c90aa395eff662470d21d3d5ad54b
[ "MIT" ]
1
2020-05-07T05:22:57.000Z
2020-05-07T05:22:57.000Z
obsTable.py
MrEnvision/learning_OTA_by_testing
4ba35af0a13c90aa395eff662470d21d3d5ad54b
[ "MIT" ]
null
null
null
obsTable.py
MrEnvision/learning_OTA_by_testing
4ba35af0a13c90aa395eff662470d21d3d5ad54b
[ "MIT" ]
null
null
null
import math from teacher import TQs from timedWord import TimedWord, DRTW_to_LRTW, LRTW_to_LTW, ResetTimedWord class ObsTable(object): def __init__(self, S, R, E): self.S = S self.R = R self.E = E def show(self): print("new_E:" + str(len(self.E))) for e in self.E: ...
32.969283
130
0.548033
import math from teacher import TQs from timedWord import TimedWord, DRTW_to_LRTW, LRTW_to_LTW, ResetTimedWord class ObsTable(object): def __init__(self, S, R, E): self.S = S self.R = R self.E = E def show(self): print("new_E:" + str(len(self.E))) for e in self.E: ...
true
true
1c0b710c9a0703a142e85f9a8e2b945aa8f3571f
1,532
py
Python
src/main/python/geeksforgeeks/graph/floyd-warshall-shortest-path.py
sonymoon/algorithm
cc2a9e0125fc64bdbf6549034bad6482d2027ea2
[ "Apache-2.0" ]
null
null
null
src/main/python/geeksforgeeks/graph/floyd-warshall-shortest-path.py
sonymoon/algorithm
cc2a9e0125fc64bdbf6549034bad6482d2027ea2
[ "Apache-2.0" ]
null
null
null
src/main/python/geeksforgeeks/graph/floyd-warshall-shortest-path.py
sonymoon/algorithm
cc2a9e0125fc64bdbf6549034bad6482d2027ea2
[ "Apache-2.0" ]
null
null
null
# Input: # graph[][] = { {0, 5, INF, 10}, # {INF, 0, 3, INF}, # {INF, INF, 0, 1}, # {INF, INF, INF, 0} } # which represents the following graph # 10 # (0)------->(3) # | /|\ # 5 | | # | ...
27.854545
75
0.402089
def printSolution(dist): print "Following matrix shows the shortest distances\ between every pair of vertices" for i in range(V): for j in range(V): if(dist[i][j] == INF): print "%7s" %("INF"), else: print "%7d\t" %(dist[i][j]), if j ...
false
true
1c0b724275b9f8273148b045306aab6837a60ae6
3,609
py
Python
proto-build/gui/horizon/Horizon_GUI/openstack_dashboard/dashboards/admin/instances/forms.py
Havate/havate-openstack
a0ca519af0da5df7981ccfb86cd9994f8c181644
[ "Apache-2.0" ]
1
2015-06-26T23:31:42.000Z
2015-06-26T23:31:42.000Z
proto-build/gui/horizon/Horizon_GUI/openstack_dashboard/dashboards/admin/instances/forms.py
Havate/havate-openstack
a0ca519af0da5df7981ccfb86cd9994f8c181644
[ "Apache-2.0" ]
1
2015-03-12T01:03:44.000Z
2015-03-12T01:03:44.000Z
proto-build/gui/horizon/Horizon_GUI/openstack_dashboard/dashboards/admin/instances/forms.py
Havate/havate-openstack
a0ca519af0da5df7981ccfb86cd9994f8c181644
[ "Apache-2.0" ]
null
null
null
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Kylin OS, 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 # #...
44.555556
78
0.572181
from django.core.urlresolvers import reverse from django.utils.translation import ugettext_lazy as _ from horizon import exceptions from horizon import forms from horizon import messages from openstack_dashboard import api class LiveMigrateForm(forms.SelfHandlingForm): current_host = forms.CharField(label=_(...
true
true
1c0b7383858b6a1cd06a475d4dd3ed7fbb8d10bc
1,041
py
Python
eventor/eventor/__init__.py
Acrisel/eventor
8e27e8c5b8e605b055e9e7ead5854850785f8597
[ "MIT" ]
4
2016-12-21T18:14:04.000Z
2019-02-24T14:06:09.000Z
eventor/eventor/__init__.py
Acrisel/eventor
8e27e8c5b8e605b055e9e7ead5854850785f8597
[ "MIT" ]
2
2017-02-14T18:13:10.000Z
2017-08-16T21:45:22.000Z
eventor/eventor/__init__.py
Acrisel/eventor
8e27e8c5b8e605b055e9e7ead5854850785f8597
[ "MIT" ]
null
null
null
__version__ = '5.1.9' __db_version__ = '1.0.0' from eventor.lib.engine import Eventor, get_unique_run_id from eventor.lib.eventor_types import AssocType, TaskStatus, DbMode, StepStatus, StepReplay from eventor.lib.eventor_types import RunMode, Invoke from eventor.lib.event import or_ from eventor.lib.utils import call...
38.555556
91
0.805956
__version__ = '5.1.9' __db_version__ = '1.0.0' from eventor.lib.engine import Eventor, get_unique_run_id from eventor.lib.eventor_types import AssocType, TaskStatus, DbMode, StepStatus, StepReplay from eventor.lib.eventor_types import RunMode, Invoke from eventor.lib.event import or_ from eventor.lib.utils import call...
true
true
1c0b73fe1b82563320e8acd1034a0f074d6b3993
654
py
Python
keystone/contrib/two_factor_auth/__init__.py
TampereTC/tre-smartcity-keystone
e2d0adc25165eef102c87d7991fb1a595680fda6
[ "Apache-2.0" ]
null
null
null
keystone/contrib/two_factor_auth/__init__.py
TampereTC/tre-smartcity-keystone
e2d0adc25165eef102c87d7991fb1a595680fda6
[ "Apache-2.0" ]
null
null
null
keystone/contrib/two_factor_auth/__init__.py
TampereTC/tre-smartcity-keystone
e2d0adc25165eef102c87d7991fb1a595680fda6
[ "Apache-2.0" ]
null
null
null
# Copyright (C) 2015 Universidad Politecnica de Madrid # # 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...
43.6
75
0.770642
from keystone.contrib.two_factor_auth.core import *
true
true
1c0b744cfcf96c0b5712e9349739002efae80d2e
627
py
Python
graphnas_variants/simple_graphnas/simple_search_space.py
RaphDal/GraphNAS
acb1fb978e10481b4417b7b4a22aec0482d8ff6b
[ "Apache-2.0" ]
94
2019-09-17T00:16:55.000Z
2022-03-16T06:07:49.000Z
graphnas_variants/simple_graphnas/simple_search_space.py
ranery/GraphNAS
b4f05bb10b8b96bb9e82344bfae36a23db2431a6
[ "Apache-2.0" ]
8
2019-09-15T13:08:18.000Z
2021-03-04T04:33:53.000Z
graphnas_variants/simple_graphnas/simple_search_space.py
ranery/GraphNAS
b4f05bb10b8b96bb9e82344bfae36a23db2431a6
[ "Apache-2.0" ]
29
2019-09-18T03:26:50.000Z
2022-03-07T22:23:23.000Z
from graphnas_variants.micro_graphnas.micro_search_space import gnn_list class SimpleSearchSpace(object): def __init__(self, search_space=None): if search_space: self.search_space = search_space else: self.search_space = { "conv_type": gnn_list, ...
29.857143
72
0.637959
from graphnas_variants.micro_graphnas.micro_search_space import gnn_list class SimpleSearchSpace(object): def __init__(self, search_space=None): if search_space: self.search_space = search_space else: self.search_space = { "conv_type": gnn_list, ...
true
true
1c0b7496048d9d85b1d0925fe132898994eaa517
8,138
py
Python
examples/Deeplab/experiments/resnet_model_edge_sobel.py
MarcWong/tensorpack
51ab279480dc1e3ffdc07884a9e8149dea9651e9
[ "Apache-2.0" ]
5
2018-05-04T02:04:15.000Z
2020-04-02T05:38:48.000Z
examples/Deeplab/experiments/resnet_model_edge_sobel.py
MarcWong/tensorpack
51ab279480dc1e3ffdc07884a9e8149dea9651e9
[ "Apache-2.0" ]
null
null
null
examples/Deeplab/experiments/resnet_model_edge_sobel.py
MarcWong/tensorpack
51ab279480dc1e3ffdc07884a9e8149dea9651e9
[ "Apache-2.0" ]
2
2018-04-23T13:43:10.000Z
2019-10-30T09:56:54.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # File: resnet_model.py import tensorflow as tf from tensorflow.contrib.layers import variance_scaling_initializer import numpy as np from tensorpack.tfutils.argscope import argscope, get_arg_scope from tensorpack.models import ( Conv2D, GlobalAvgPooling, BatchNorm, B...
46.502857
170
0.659376
import tensorflow as tf from tensorflow.contrib.layers import variance_scaling_initializer import numpy as np from tensorpack.tfutils.argscope import argscope, get_arg_scope from tensorpack.models import ( Conv2D, GlobalAvgPooling, BatchNorm, BNReLU, FullyConnected, LinearWrap, AtrousConv2D, MaxPooling, Conv2...
true
true
1c0b75bc7e3f90c02621aa7768db710994e2130f
754
py
Python
admin_nested/admin_nested/urls.py
aseem-hegshetye/Learning-Django
542b5462b20eddd0d6efaf757f3eaf37bc240535
[ "MIT" ]
null
null
null
admin_nested/admin_nested/urls.py
aseem-hegshetye/Learning-Django
542b5462b20eddd0d6efaf757f3eaf37bc240535
[ "MIT" ]
null
null
null
admin_nested/admin_nested/urls.py
aseem-hegshetye/Learning-Django
542b5462b20eddd0d6efaf757f3eaf37bc240535
[ "MIT" ]
null
null
null
"""admin_nested URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-...
34.272727
77
0.710875
from django.contrib import admin from django.urls import path urlpatterns = [ path('admin/', admin.site.urls), ]
true
true
1c0b75cf8b8cc9c2a0dc5647e029170f096da13e
3,918
py
Python
test_1b.py
RaulAstudillo/bocf
cd84eab2d1b4ea5a4bdeeb452df92296afbafb87
[ "BSD-3-Clause" ]
null
null
null
test_1b.py
RaulAstudillo/bocf
cd84eab2d1b4ea5a4bdeeb452df92296afbafb87
[ "BSD-3-Clause" ]
null
null
null
test_1b.py
RaulAstudillo/bocf
cd84eab2d1b4ea5a4bdeeb452df92296afbafb87
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import scipy import GPyOpt import GPy from multi_objective import MultiObjective from multi_outputGP import multi_outputGP from maEI import maEI from parameter_distribution import ParameterDistribution from utility import Utility import cbo # --- Function to optimize m = 5 # Number of attributes a...
30.372093
117
0.676621
import numpy as np import scipy import GPyOpt import GPy from multi_objective import MultiObjective from multi_outputGP import multi_outputGP from maEI import maEI from parameter_distribution import ParameterDistribution from utility import Utility import cbo m = 5 aux_model = [] I = np.linspace(0., 1., 6) aux_grid ...
true
true
1c0b75fe76bd091f9983717b650186685e10dbd0
4,549
py
Python
src/hpcg.py
vitduck/bmt
3afa969958bf07ab4fe86868b2feda0a6bc676d6
[ "BSD-3-Clause" ]
null
null
null
src/hpcg.py
vitduck/bmt
3afa969958bf07ab4fe86868b2feda0a6bc676d6
[ "BSD-3-Clause" ]
null
null
null
src/hpcg.py
vitduck/bmt
3afa969958bf07ab4fe86868b2feda0a6bc676d6
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python3 import os import re import argparse from math import sqrt from env import module_list from hpcnv import Hpcnv class Hpcg(Hpcnv): def __init__(self, grid=[256, 256, 256], time=180, **kwargs): super().__init__(**kwargs) self.name = 'HPCG' self.wrapper = 'hpc...
41.354545
142
0.511101
import os import re import argparse from math import sqrt from env import module_list from hpcnv import Hpcnv class Hpcg(Hpcnv): def __init__(self, grid=[256, 256, 256], time=180, **kwargs): super().__init__(**kwargs) self.name = 'HPCG' self.wrapper = 'hpcg.sh' self.input...
true
true
1c0b76d87a6f3526d12088cb8d10fe82817159c3
162
py
Python
section03/lecture013.py
JorijnInEemland/MyPythonProjects
9c440c2ddc133f9b5930291414ecd903bbc1be1c
[ "Unlicense" ]
null
null
null
section03/lecture013.py
JorijnInEemland/MyPythonProjects
9c440c2ddc133f9b5930291414ecd903bbc1be1c
[ "Unlicense" ]
null
null
null
section03/lecture013.py
JorijnInEemland/MyPythonProjects
9c440c2ddc133f9b5930291414ecd903bbc1be1c
[ "Unlicense" ]
1
2020-02-28T17:06:07.000Z
2020-02-28T17:06:07.000Z
# Python uses dynamic typing # type(object_here) = the type of the object my_dogs = 2 print(type(my_dogs)) my_dogs = ["Sammy", "Frankie"] print(type(my_dogs))
16.2
44
0.709877
my_dogs = 2 print(type(my_dogs)) my_dogs = ["Sammy", "Frankie"] print(type(my_dogs))
true
true
1c0b7805ae6cbcd75f6ac1b7fc90cc573b86ee33
139,877
py
Python
osxphotos/photosdb/photosdb.py
finestream/osxphotos
271761cf048f450677ac58212d55c4a0bfcc1185
[ "MIT" ]
null
null
null
osxphotos/photosdb/photosdb.py
finestream/osxphotos
271761cf048f450677ac58212d55c4a0bfcc1185
[ "MIT" ]
null
null
null
osxphotos/photosdb/photosdb.py
finestream/osxphotos
271761cf048f450677ac58212d55c4a0bfcc1185
[ "MIT" ]
null
null
null
""" PhotosDB class Processes a Photos.app library database to extract information about photos """ import logging import os import os.path import pathlib import platform import re import sys import tempfile from collections import OrderedDict from datetime import datetime, timedelta, timezone from pprint import pforma...
41.007622
147
0.567105
import logging import os import os.path import pathlib import platform import re import sys import tempfile from collections import OrderedDict from datetime import datetime, timedelta, timezone from pprint import pformat from typing import List import bitmath import photoscript from .._constants import ( _DB_TA...
true
true
1c0b785923c70b7718a6d71605c473142d3045ed
2,536
py
Python
applications/FluidDynamicsApplication/python_scripts/dynamic_smagorinsky_utilities.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
778
2017-01-27T16:29:17.000Z
2022-03-30T03:01:51.000Z
applications/FluidDynamicsApplication/python_scripts/dynamic_smagorinsky_utilities.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
6,634
2017-01-15T22:56:13.000Z
2022-03-31T15:03:36.000Z
applications/FluidDynamicsApplication/python_scripts/dynamic_smagorinsky_utilities.py
lkusch/Kratos
e8072d8e24ab6f312765185b19d439f01ab7b27b
[ "BSD-4-Clause" ]
224
2017-02-07T14:12:49.000Z
2022-03-06T23:09:34.000Z
from __future__ import print_function, absolute_import, division #makes KratosMultiphysics backward compatible with python 2.6 and 2.7 from KratosMultiphysics import * from KratosMultiphysics.FluidDynamicsApplication import * from KratosMultiphysics.MeshingApplication import * class DynamicSmagorinsky: def __init...
36.753623
134
0.664038
from __future__ import print_function, absolute_import, division from KratosMultiphysics import * from KratosMultiphysics.FluidDynamicsApplication import * from KratosMultiphysics.MeshingApplication import * class DynamicSmagorinsky: def __init__(self, model_part, domain_size): self.model_part = model_pa...
true
true
1c0b7944c6846232fc12da9d34b68e90aaec566c
1,653
py
Python
uncertainty_baselines/models/genomics_cnn_test.py
dvdzhang/uncertainty-baselines
8ce0d7494e5cae0719c1b750da4b61564e536636
[ "Apache-2.0" ]
null
null
null
uncertainty_baselines/models/genomics_cnn_test.py
dvdzhang/uncertainty-baselines
8ce0d7494e5cae0719c1b750da4b61564e536636
[ "Apache-2.0" ]
null
null
null
uncertainty_baselines/models/genomics_cnn_test.py
dvdzhang/uncertainty-baselines
8ce0d7494e5cae0719c1b750da4b61564e536636
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright 2022 The Uncertainty Baselines Authors. # # 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 ap...
31.788462
74
0.718088
from absl.testing import parameterized import tensorflow as tf import uncertainty_baselines as ub class GenomicsCNNTest(tf.test.TestCase, parameterized.TestCase): @parameterized.named_parameters(('one_hot', True), ('embedding', False)) def testCreateModel(self, one_hot): batch_size = 31 num_classes = 1...
true
true
1c0b79778d65cb38c71d91354a402c4341ba7643
1,831
py
Python
indico/core/db/sqlalchemy/review_ratings.py
bpedersen2/indico
8410ee5f8f8530a8692f3dd2d4015c3074b0aa30
[ "MIT" ]
1
2021-12-27T17:51:27.000Z
2021-12-27T17:51:27.000Z
indico/core/db/sqlalchemy/review_ratings.py
bpedersen2/indico
8410ee5f8f8530a8692f3dd2d4015c3074b0aa30
[ "MIT" ]
5
2021-04-08T19:26:47.000Z
2022-01-24T16:30:18.000Z
indico/core/db/sqlalchemy/review_ratings.py
bpedersen2/indico
8410ee5f8f8530a8692f3dd2d4015c3074b0aa30
[ "MIT" ]
2
2019-02-24T17:29:10.000Z
2021-04-08T19:23:27.000Z
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.ext.declarative import declared_attr fro...
23.779221
73
0.56035
from sqlalchemy.dialects.postgresql import JSONB from sqlalchemy.ext.declarative import declared_attr from indico.core.db import db from indico.util.string import format_repr class ReviewRatingMixin: question_class = None review_class = None @declared_attr def id(cls): return db.Column( ...
true
true
1c0b7a1177e5691cd05f224728f19ae38a65ee16
596
py
Python
itelegram/defaults.py
YazdanRa/django-itelegram
c28ff56f051a5878a66b0cefd6307f90f39aee09
[ "MIT" ]
3
2020-10-19T18:03:49.000Z
2022-03-27T12:43:54.000Z
itelegram/defaults.py
YazdanRa/django-itelegram
c28ff56f051a5878a66b0cefd6307f90f39aee09
[ "MIT" ]
null
null
null
itelegram/defaults.py
YazdanRa/django-itelegram
c28ff56f051a5878a66b0cefd6307f90f39aee09
[ "MIT" ]
null
null
null
telegram_not_logged_in_text = ( "*You're not logged in!*\n" "To access this section you should login first\n" "It's probably possible by \login command" ) telegram_permission_denied_text = ( "*Permission Denied!*\n" "You don't have access for this section yet\n" "make sure you have the correct...
28.380952
70
0.706376
telegram_not_logged_in_text = ( "*You're not logged in!*\n" "To access this section you should login first\n" "It's probably possible by \login command" ) telegram_permission_denied_text = ( "*Permission Denied!*\n" "You don't have access for this section yet\n" "make sure you have the correct...
true
true
1c0b7a3b108c30a0f1a83315ef80b8b94f04824b
7,393
py
Python
sped/campos.py
guilindner/python-sped
660c6e7a36bac6962402629e360dbf14d8a937af
[ "MIT" ]
null
null
null
sped/campos.py
guilindner/python-sped
660c6e7a36bac6962402629e360dbf14d8a937af
[ "MIT" ]
null
null
null
sped/campos.py
guilindner/python-sped
660c6e7a36bac6962402629e360dbf14d8a937af
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import re from datetime import date from datetime import datetime from decimal import Decimal from .erros import CampoFixoError from .erros import CampoObrigatorioError from .erros import FormatoInvalidoError class Campo(object): """ Classe base para definição de um campo de um reg...
26.786232
107
0.587989
import re from datetime import date from datetime import datetime from decimal import Decimal from .erros import CampoFixoError from .erros import CampoObrigatorioError from .erros import FormatoInvalidoError class Campo(object): def __init__(self, indice, nome, obrigatorio=False): self._indice = indi...
true
true
1c0b7a7a10efd25ecd4917374df2887a9f2b1f4f
28,142
py
Python
opts.py
yueyongjiao/openNMT_Model_Attention_data
7b170fc58f337a6ee51bd8a7a9fa2c60d0c62880
[ "MIT" ]
null
null
null
opts.py
yueyongjiao/openNMT_Model_Attention_data
7b170fc58f337a6ee51bd8a7a9fa2c60d0c62880
[ "MIT" ]
null
null
null
opts.py
yueyongjiao/openNMT_Model_Attention_data
7b170fc58f337a6ee51bd8a7a9fa2c60d0c62880
[ "MIT" ]
null
null
null
import argparse from onmt.modules.SRU import CheckSRU def model_opts(parser): """ These options are passed to the construction of the model. Be careful with these as they will be used during translation. """ # Embedding Options group = parser.add_argument_group('Model-Embeddings') group.a...
51.167273
88
0.577571
import argparse from onmt.modules.SRU import CheckSRU def model_opts(parser): group = parser.add_argument_group('Model-Embeddings') group.add_argument('-src_word_vec_size', type=int, default=500, help='Word embedding size for src.') group.add_argument('-tgt_word_vec_size', type...
true
true
1c0b7ad52a9f01f119ab10c31a2506d83c3b42f4
712
py
Python
Python/hamming-distance.py
k-ori/LeetCode-1
5e0d4d0c2eb00edfaf8ea4c902977ab0df7efc5b
[ "MIT" ]
1
2017-01-07T03:25:14.000Z
2017-01-07T03:25:14.000Z
Python/hamming-distance.py
UniqueAndys/LeetCode
5e0d4d0c2eb00edfaf8ea4c902977ab0df7efc5b
[ "MIT" ]
null
null
null
Python/hamming-distance.py
UniqueAndys/LeetCode
5e0d4d0c2eb00edfaf8ea4c902977ab0df7efc5b
[ "MIT" ]
2
2021-02-04T20:36:50.000Z
2021-03-10T06:47:45.000Z
# Time: O(1) # Space: O(1) # The Hamming distance between two integers is the number of positions # at which the corresponding bits are different. # # Given two integers x and y, calculate the Hamming distance. # # Note: # 0 ≤ x, y < 231. # # Example: # # Input: x = 1, y = 4 # # Output: 2 # # Explanation: # 1 (0 0 ...
18.736842
81
0.547753
class Solution(object): def hammingDistance(self, x, y): distance = 0 z = x^y while z: distance += 1 z &= z-1 return distance
true
true
1c0b7c51c55a6cc31d763aa55346bb8bcf3b9701
3,114
py
Python
django_app/backend/.ipynb_checkpoints/views-checkpoint.py
tmunzer/mist_psk
fde9834172072aba2e034afc0c822f11cc2c4bad
[ "MIT" ]
1
2020-11-04T18:14:21.000Z
2020-11-04T18:14:21.000Z
django_app/backend/.ipynb_checkpoints/views-checkpoint.py
tmunzer/mist_psk
fde9834172072aba2e034afc0c822f11cc2c4bad
[ "MIT" ]
null
null
null
django_app/backend/.ipynb_checkpoints/views-checkpoint.py
tmunzer/mist_psk
fde9834172072aba2e034afc0c822f11cc2c4bad
[ "MIT" ]
1
2021-01-25T14:48:50.000Z
2021-01-25T14:48:50.000Z
from django.shortcuts import render import requests import json from django.http import JsonResponse, HttpResponse import json from django.views.decorators.csrf import csrf_exempt from .lib.__req import Req import json import time with open('reports.json', 'r') as f: report_templates = json.load(f) @csrf_exe...
33.847826
112
0.587669
from django.shortcuts import render import requests import json from django.http import JsonResponse, HttpResponse import json from django.views.decorators.csrf import csrf_exempt from .lib.__req import Req import json import time with open('reports.json', 'r') as f: report_templates = json.load(f) @csrf_exe...
true
true
1c0b7c557baaa2456b33a8d296644de7ed6cc999
1,270
py
Python
test/test_alerts_messages.py
LayeredInsight/layint_api_python
a5c9a5b24098bd823c5102b7ab9e4745432f19b4
[ "Apache-2.0" ]
null
null
null
test/test_alerts_messages.py
LayeredInsight/layint_api_python
a5c9a5b24098bd823c5102b7ab9e4745432f19b4
[ "Apache-2.0" ]
null
null
null
test/test_alerts_messages.py
LayeredInsight/layint_api_python
a5c9a5b24098bd823c5102b7ab9e4745432f19b4
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 """ Layered Insight Assessment, Compliance, Witness & Control LI Assessment & Compliance performs static vulnerability analysis, license and package compliance. LI Witness provides deep insight and analytics into containerized applications. Control provides dynamic runtime security and analyti...
28.222222
383
0.738583
from __future__ import absolute_import import os import sys import unittest import layint_api from layint_api.rest import ApiException from layint_api.models.alerts_messages import AlertsMessages class TestAlertsMessages(unittest.TestCase): def setUp(self): pass def tearDown(self): pass...
true
true
1c0b7d2a80d2ef57bfbbc7cdfb20b6f57f4db2a2
182
py
Python
src/search/linear_search.py
ChrisKalahiki/python-algorithms
53f206ca18de63941ad22e6249ec651ecf598062
[ "MIT" ]
null
null
null
src/search/linear_search.py
ChrisKalahiki/python-algorithms
53f206ca18de63941ad22e6249ec651ecf598062
[ "MIT" ]
null
null
null
src/search/linear_search.py
ChrisKalahiki/python-algorithms
53f206ca18de63941ad22e6249ec651ecf598062
[ "MIT" ]
null
null
null
def linear_search(data, target): ''' Linear Search Algorithm ''' for index, item in enumerate(data): if item == target: return index return -1
22.75
39
0.571429
def linear_search(data, target): for index, item in enumerate(data): if item == target: return index return -1
true
true
1c0b7dd35643361ae2b0a44855d6fc41de6ff980
5,814
py
Python
trigger_webapp/trigger_webapp/settings.py
ADACS-Australia/mwa_trigger
335752efda6251d61f40179fed9a19cf4e58ba85
[ "MIT" ]
null
null
null
trigger_webapp/trigger_webapp/settings.py
ADACS-Australia/mwa_trigger
335752efda6251d61f40179fed9a19cf4e58ba85
[ "MIT" ]
9
2022-01-31T05:56:48.000Z
2022-03-16T08:03:59.000Z
trigger_webapp/trigger_webapp/settings.py
ADACS-Australia/mwa_trigger
335752efda6251d61f40179fed9a19cf4e58ba85
[ "MIT" ]
null
null
null
""" Django settings for trigger_webapp project. Generated by 'django-admin startproject' using Django 3.2.5. For more information on this file, see https://docs.djangoproject.com/en/3.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.2/ref/settings/ """ impor...
30.28125
117
0.70485
import os from pathlib import Path BASE_DIR = Path(__file__).resolve().parent.parent ALLOWED_HOSTS = ['127.0.0.1', 'localhost', 'www.mwa-trigger.duckdns.org', 'mwa-trigger.duckdns.org', '146.118.70.58'] VOEVENT_REMOTES = ["voevent.4pisky.org"] VOEVENT_TCP = ["196.44.140.214/32"] INSTALLED_APPS = [ 'django...
true
true
1c0b7ddbc339273d694e6ad0a6153050366bd10c
10,392
py
Python
grouptesting/simulator.py
SachitNayak/google-research
2893b06a7a60f243be22a06f975f1eb85702d0fa
[ "Apache-2.0" ]
1
2020-11-25T09:11:13.000Z
2020-11-25T09:11:13.000Z
grouptesting/simulator.py
SachitNayak/google-research
2893b06a7a60f243be22a06f975f1eb85702d0fa
[ "Apache-2.0" ]
15
2020-09-25T22:39:40.000Z
2022-02-10T02:11:48.000Z
grouptesting/simulator.py
SachitNayak/google-research
2893b06a7a60f243be22a06f975f1eb85702d0fa
[ "Apache-2.0" ]
2
2020-08-29T08:58:30.000Z
2021-08-29T09:59:34.000Z
# coding=utf-8 # Copyright 2020 The Google Research Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicab...
37.927007
80
0.664357
import time from typing import Iterable, Union from absl import logging import gin import jax import jax.numpy as np import numpy as onp import pandas as pd from grouptesting import metrics from grouptesting import policy as group_policy from grouptesting import state from grouptesting import wet_lab from grouptest...
true
true
1c0b7e96fb7a6cf346e7762efcdba0703ec7e826
883
py
Python
test/modules/http2/test_600_h2proxy.py
ICLXLxqj0g/chenrichard10y
df2619419646f6f8b2514680445955782a2a3c0a
[ "Apache-2.0" ]
2,529
2015-01-02T11:52:53.000Z
2022-03-30T19:54:27.000Z
test/modules/http2/test_600_h2proxy.py
ICLXLxqj0g/chenrichard10y
df2619419646f6f8b2514680445955782a2a3c0a
[ "Apache-2.0" ]
133
2015-04-21T05:50:45.000Z
2022-03-30T14:23:40.000Z
test/modules/http2/test_600_h2proxy.py
ICLXLxqj0g/chenrichard10y
df2619419646f6f8b2514680445955782a2a3c0a
[ "Apache-2.0" ]
1,113
2015-01-01T14:47:02.000Z
2022-03-29T16:47:18.000Z
import pytest from .env import H2Conf class TestH2Proxy: @pytest.fixture(autouse=True, scope='class') def _class_scope(self, env): conf = H2Conf(env) conf.add_vhost_cgi(h2proxy_self=True) if env.verbosity > 1: conf.add("LogLevel proxy:trace2 proxy_http2:trace2") c...
32.703704
66
0.586636
import pytest from .env import H2Conf class TestH2Proxy: @pytest.fixture(autouse=True, scope='class') def _class_scope(self, env): conf = H2Conf(env) conf.add_vhost_cgi(h2proxy_self=True) if env.verbosity > 1: conf.add("LogLevel proxy:trace2 proxy_http2:trace2") c...
true
true
1c0b7ea77d1d51434f0ecd61a4c2a2596936ad50
768
py
Python
robotframework-ls/tests/robotframework_ls_tests/test_folding_range.py
GLMeece/robotframework-lsp
dc9c807c4a192d252df1d05a1c5d16f8c1f24086
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
robotframework-ls/tests/robotframework_ls_tests/test_folding_range.py
GLMeece/robotframework-lsp
dc9c807c4a192d252df1d05a1c5d16f8c1f24086
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
robotframework-ls/tests/robotframework_ls_tests/test_folding_range.py
GLMeece/robotframework-lsp
dc9c807c4a192d252df1d05a1c5d16f8c1f24086
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
def test_folding_range_basic(workspace, libspec_manager, data_regression): from robotframework_ls.impl.completion_context import CompletionContext from robotframework_ls.impl.folding_range import folding_range workspace.set_root("case4", libspec_manager=libspec_manager) doc = workspace.get_doc("case4.r...
23.272727
75
0.652344
def test_folding_range_basic(workspace, libspec_manager, data_regression): from robotframework_ls.impl.completion_context import CompletionContext from robotframework_ls.impl.folding_range import folding_range workspace.set_root("case4", libspec_manager=libspec_manager) doc = workspace.get_doc("case4.r...
true
true
1c0b7fa51005e86ff7a9b386ed5212e881fd954b
16,313
py
Python
src/oci/data_integration/models/create_connection_details.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/data_integration/models/create_connection_details.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
src/oci/data_integration/models/create_connection_details.py
pabs3/oci-python-sdk
437ba18ce39af2d1090e277c4bb8750c89f83021
[ "Apache-2.0", "BSD-3-Clause" ]
null
null
null
# coding: utf-8 # Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
37.415138
266
0.682217
from oci.util import formatted_flat_dict, NONE_SENTINEL, value_allowed_none_or_none_sentinel from oci.decorators import init_model_state_from_kwargs @init_model_state_from_kwargs class CreateConnectionDetails(object): MODEL_TYPE_ORACLE_ADWC_CONNECTION = "ORACLE_ADWC_CONNECTION" MODEL_TYPE...
true
true
1c0b8113bc95ddc68e7f6ee48b8eec43dc6a89c2
6,790
py
Python
ex_4_full_ba.py
ttk21/lab_05
916bf12185af9668e7c4d71fa282e1bf95a685cc
[ "BSD-3-Clause" ]
null
null
null
ex_4_full_ba.py
ttk21/lab_05
916bf12185af9668e7c4d71fa282e1bf95a685cc
[ "BSD-3-Clause" ]
null
null
null
ex_4_full_ba.py
ttk21/lab_05
916bf12185af9668e7c4d71fa282e1bf95a685cc
[ "BSD-3-Clause" ]
1
2020-12-19T20:13:20.000Z
2020-12-19T20:13:20.000Z
import numpy as np import visgeom as vg from camera import PerspectiveCamera from measurements import PrecalibratedCameraMeasurements from optim import BundleAdjustmentState, levenberg_marquardt from visualise_ba import visualise_full """Example 4 - Full Bundle Adjustment""" class PrecalibratedFullBAObjective: ...
42.974684
117
0.654197
import numpy as np import visgeom as vg from camera import PerspectiveCamera from measurements import PrecalibratedCameraMeasurements from optim import BundleAdjustmentState, levenberg_marquardt from visualise_ba import visualise_full class PrecalibratedFullBAObjective: def __init__(self, measurements, pose1_p...
true
true
1c0b81bfefb9f18d7e07aec2cf1f875a119eb889
5,758
py
Python
data_generator.py
SLAMPAI/generalization-cellular-automata
8758551eee455656156c48ecf72346fd1d315d75
[ "MIT" ]
2
2021-07-20T21:13:53.000Z
2021-08-23T03:27:28.000Z
data_generator.py
SLAMPAI/generalization-cellular-automata
8758551eee455656156c48ecf72346fd1d315d75
[ "MIT" ]
null
null
null
data_generator.py
SLAMPAI/generalization-cellular-automata
8758551eee455656156c48ecf72346fd1d315d75
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # imports import numpy as np import random from scipy.signal import convolve2d import matplotlib.pyplot as plt # functions def make_environment(size, initial_alive): # create the grid the CA lives on as a matrix of 1 and 0 # size: size of the grid # initial_alive: probability of a ...
43.954198
140
0.695901
import numpy as np import random from scipy.signal import convolve2d import matplotlib.pyplot as plt def make_environment(size, initial_alive): return np.reshape(np.array([np.random.choice([0,1], size*size, p=[1-initial_alive, initial_alive])]), (size,size)) def update_environment(env, birth, stay, n...
true
true
1c0b826994bdc77bb7bd8be7f942a9f098e2f39e
2,196
py
Python
In Class Code/in_class_190307/prep/forms/function_table_entry.py
hamie96/CS-4720-Internet-Programming
ac998ffe6af5604fd985ebce0dfc226e58b074f5
[ "BSD-Source-Code" ]
null
null
null
In Class Code/in_class_190307/prep/forms/function_table_entry.py
hamie96/CS-4720-Internet-Programming
ac998ffe6af5604fd985ebce0dfc226e58b074f5
[ "BSD-Source-Code" ]
null
null
null
In Class Code/in_class_190307/prep/forms/function_table_entry.py
hamie96/CS-4720-Internet-Programming
ac998ffe6af5604fd985ebce0dfc226e58b074f5
[ "BSD-Source-Code" ]
null
null
null
from bottle import template from functions import functionMap page_template = """<!DOCTYPE html> <html> <head> <title>Function Table</title> <link rel="Stylesheet" type="text/css" href="/static/style1.css"/> </head> <body> <h1>Function Table Application</h1> ...
28.153846
92
0.380692
from bottle import template from functions import functionMap page_template = """<!DOCTYPE html> <html> <head> <title>Function Table</title> <link rel="Stylesheet" type="text/css" href="/static/style1.css"/> </head> <body> <h1>Function Table Application</h1> ...
true
true
1c0b82c209f5546b5c526c742240b7cbd2a5cdca
5,258
py
Python
src/my_messenger/client/core.py
thunderamur/my_messenger
53327fbef9c603b834695231406226cd487244d6
[ "MIT" ]
null
null
null
src/my_messenger/client/core.py
thunderamur/my_messenger
53327fbef9c603b834695231406226cd487244d6
[ "MIT" ]
null
null
null
src/my_messenger/client/core.py
thunderamur/my_messenger
53327fbef9c603b834695231406226cd487244d6
[ "MIT" ]
null
null
null
import sys import logging import time from socket import socket, AF_INET, SOCK_STREAM from queue import Queue from ..jim.core import * from ..jim.utils import send_message, get_message from ..utils import start_thread, get_hash from ..logger.config import logger_config from ..logger.decorators import Log from .errors ...
29.706215
91
0.608406
import sys import logging import time from socket import socket, AF_INET, SOCK_STREAM from queue import Queue from ..jim.core import * from ..jim.utils import send_message, get_message from ..utils import start_thread, get_hash from ..logger.config import logger_config from ..logger.decorators import Log from .errors ...
true
true
1c0b841239a602aa6a16ba4454abb17d226d9467
527
py
Python
tests/test_subscriber.py
RYAN2540/On-the-Blog
207d7ee132f4c52f86903a526b9eb4a3a0178e22
[ "MIT" ]
null
null
null
tests/test_subscriber.py
RYAN2540/On-the-Blog
207d7ee132f4c52f86903a526b9eb4a3a0178e22
[ "MIT" ]
null
null
null
tests/test_subscriber.py
RYAN2540/On-the-Blog
207d7ee132f4c52f86903a526b9eb4a3a0178e22
[ "MIT" ]
null
null
null
import unittest from app.models import Subscriber from app import db class SubscriberModelTest(unittest.TestCase): def setUp(self): self.new_subscriber = Subscriber(email='email@ms.com') def tearDown(self): Subscriber.query.delete() def test_check_instance_variables(self): ...
29.277778
75
0.702087
import unittest from app.models import Subscriber from app import db class SubscriberModelTest(unittest.TestCase): def setUp(self): self.new_subscriber = Subscriber(email='email@ms.com') def tearDown(self): Subscriber.query.delete() def test_check_instance_variables(self): ...
true
true
1c0b8448d268392f2b752a777094b87548e2d9b7
2,746
py
Python
datamgt/src/stage.py
timmo-d/MyTrader
a61cb6601d182b491d6b1e7715a05ccfc2fec451
[ "MIT" ]
null
null
null
datamgt/src/stage.py
timmo-d/MyTrader
a61cb6601d182b491d6b1e7715a05ccfc2fec451
[ "MIT" ]
null
null
null
datamgt/src/stage.py
timmo-d/MyTrader
a61cb6601d182b491d6b1e7715a05ccfc2fec451
[ "MIT" ]
null
null
null
""" Module to stage downloads into database """ import csv import mysql.connector from datamgt.src.globals import config from datamgt.src.common import * def stageSymbols(fileName): """This function does something. :param name: The name to use :type name: None :param state: None :type state: None :returns: No...
22.508197
93
0.663511
import csv import mysql.connector from datamgt.src.globals import config from datamgt.src.common import * def stageSymbols(fileName): delimiter = r',' encloseChar = '"' conn = mysql.connector.connect(**config) c = conn.cursor() c.execute("LOAD DATA LOCAL INFILE %s" " INTO TABLE companyStaging" " FIEL...
true
true
1c0b85943ee5dff5bf3cb5c0d9182ae41b9924b2
20,416
py
Python
tests/pytests/integration/modules/test_virt.py
mikewiebe/salt
01e8c0aaa9b5e05f30c28fec7bdbf0a24401b70d
[ "Apache-2.0" ]
1
2020-08-28T23:14:17.000Z
2020-08-28T23:14:17.000Z
tests/pytests/integration/modules/test_virt.py
mikewiebe/salt
01e8c0aaa9b5e05f30c28fec7bdbf0a24401b70d
[ "Apache-2.0" ]
3
2021-03-31T19:54:10.000Z
2021-12-13T20:47:12.000Z
tests/pytests/integration/modules/test_virt.py
mikewiebe/salt
01e8c0aaa9b5e05f30c28fec7bdbf0a24401b70d
[ "Apache-2.0" ]
2
2020-11-04T06:32:02.000Z
2020-11-06T11:01:18.000Z
""" Validate the virt module """ import logging import pathlib from numbers import Number from xml.etree import ElementTree import pytest from saltfactories.utils import cli_scripts from tests.support.helpers import skip_if_binaries_missing, slowTest from tests.support.saltfactories_compat import ( ContainerFactor...
34.37037
88
0.627106
import logging import pathlib from numbers import Number from xml.etree import ElementTree import pytest from saltfactories.utils import cli_scripts from tests.support.helpers import skip_if_binaries_missing, slowTest from tests.support.saltfactories_compat import ( ContainerFactory, SaltVirtMinionContainerFac...
true
true
1c0b861530cc2efb05eb68356b8d8b90e036ce36
6,009
py
Python
app/support.py
trapeze-project/vocabulary-ingestor
29a59f051de372682d2f297b5cf2cb00b5c31d1d
[ "Apache-2.0" ]
null
null
null
app/support.py
trapeze-project/vocabulary-ingestor
29a59f051de372682d2f297b5cf2cb00b5c31d1d
[ "Apache-2.0" ]
null
null
null
app/support.py
trapeze-project/vocabulary-ingestor
29a59f051de372682d2f297b5cf2cb00b5c31d1d
[ "Apache-2.0" ]
null
null
null
import os import importlib from PetanQ.petanq_resource import PetanqResource from PetanQ.petanq import Petanq from SPARQLWrapper import SPARQLWrapper, JSON, POST # set up the SPARQL client sparql = SPARQLWrapper(os.getenv("SPARQL_ENDPOINT"), defaultGraph=os.getenv('DEFAULT_GRAPH')) sparql.setReturnFormat(JSON) sparql....
33.016484
121
0.705275
import os import importlib from PetanQ.petanq_resource import PetanqResource from PetanQ.petanq import Petanq from SPARQLWrapper import SPARQLWrapper, JSON, POST sparql = SPARQLWrapper(os.getenv("SPARQL_ENDPOINT"), defaultGraph=os.getenv('DEFAULT_GRAPH')) sparql.setReturnFormat(JSON) sparql.setMethod(POST) def make_c...
true
true
1c0b86661b26686482a4f88e4f9e4b5f66b0fbc9
1,483
py
Python
load_genki.py
WeiNingChen/GAPP-image
77b54d2f68c97d5e92e63119a9b3700ffa0f5170
[ "MIT" ]
null
null
null
load_genki.py
WeiNingChen/GAPP-image
77b54d2f68c97d5e92e63119a9b3700ffa0f5170
[ "MIT" ]
null
null
null
load_genki.py
WeiNingChen/GAPP-image
77b54d2f68c97d5e92e63119a9b3700ffa0f5170
[ "MIT" ]
null
null
null
import os import pickle import cv2 import numpy as np from matplotlib import pyplot as plt SMILE_FOLDER = './genki4k/' F_SMILE_FOLDER = './data/smile_data/' NUM_SMILE_IMAGE = 4000 WID_MEAN = 198 LEN_MEAN = 184 #SMILE_SIZE = 48 data = [] labels = [] print("Loading data...") with open(SMILE_FOLDER + "labels.txt") as f...
25.568966
78
0.670937
import os import pickle import cv2 import numpy as np from matplotlib import pyplot as plt SMILE_FOLDER = './genki4k/' F_SMILE_FOLDER = './data/smile_data/' NUM_SMILE_IMAGE = 4000 WID_MEAN = 198 LEN_MEAN = 184 data = [] labels = [] print("Loading data...") with open(SMILE_FOLDER + "labels.txt") as f: for i in ra...
true
true
1c0b87f5af65e1b2ba6c150c6d591c9e1828dd87
990
py
Python
main.py
ctava/usa-gun-violence
9cb8127a07de103f2651c6e22109794ab516f328
[ "MIT" ]
1
2018-12-23T23:44:03.000Z
2018-12-23T23:44:03.000Z
main.py
ctava/usa-gun-violence
9cb8127a07de103f2651c6e22109794ab516f328
[ "MIT" ]
null
null
null
main.py
ctava/usa-gun-violence
9cb8127a07de103f2651c6e22109794ab516f328
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- #!/usr/bin/env python # # Copyright Christopher Tava # import webapp2 import imp #base = imp.load_source('base', './services/base.py') from base import BaseHandler home = imp.load_source('home', './services/home.py') from home import HomeHandler data = imp.load_source('data', './services/data...
23.571429
75
0.69697
import webapp2 import imp from base import BaseHandler home = imp.load_source('home', './services/home.py') from home import HomeHandler data = imp.load_source('data', './services/data.py') from data import DataHandler yearsummaryys = imp.load_source('yearsummary', './services/yearsummary.py') from yearsummary impo...
true
true
1c0b882072bdbe777c841d19d8577631bcd95793
552
py
Python
pyeccodes/defs/grib2/tables/local/edzw/1/4_2_215_5_table.py
ecmwf/pyeccodes
dce2c72d3adcc0cb801731366be53327ce13a00b
[ "Apache-2.0" ]
7
2020-04-14T09:41:17.000Z
2021-08-06T09:38:19.000Z
pyeccodes/defs/grib2/tables/local/edzw/1/4_2_215_5_table.py
ecmwf/pyeccodes
dce2c72d3adcc0cb801731366be53327ce13a00b
[ "Apache-2.0" ]
null
null
null
pyeccodes/defs/grib2/tables/local/edzw/1/4_2_215_5_table.py
ecmwf/pyeccodes
dce2c72d3adcc0cb801731366be53327ce13a00b
[ "Apache-2.0" ]
3
2020-04-30T12:44:48.000Z
2020-12-15T08:40:26.000Z
def load(h): return ({'abbr': 1, 'code': 1, 'title': 'Downward long-wave radiation flux at surface based on T_2M', 'units': 'time average)(W m-2 '}, {'abbr': 2, 'code': 2, 'title': 'Downward long-wave radiation flux at surface based on T_G...
39.428571
86
0.476449
def load(h): return ({'abbr': 1, 'code': 1, 'title': 'Downward long-wave radiation flux at surface based on T_2M', 'units': 'time average)(W m-2 '}, {'abbr': 2, 'code': 2, 'title': 'Downward long-wave radiation flux at surface based on T_G...
true
true
1c0b8a42c088e60a374628f9b06f712776562b83
1,346
py
Python
flowItems/forms.py
z-Wind/issueFlowWeb
4ec0f6bf35a8d3be87846e1bf58b797c9e9c774a
[ "MIT" ]
null
null
null
flowItems/forms.py
z-Wind/issueFlowWeb
4ec0f6bf35a8d3be87846e1bf58b797c9e9c774a
[ "MIT" ]
null
null
null
flowItems/forms.py
z-Wind/issueFlowWeb
4ec0f6bf35a8d3be87846e1bf58b797c9e9c774a
[ "MIT" ]
null
null
null
from django import forms # modules from django from django.forms.extras.widgets import SelectDateWidget from .models import * class SearchForm(forms.Form): searchStr = forms.CharField(required=False, widget=forms.TextInput( # 'autofocus': 'autof...
33.65
98
0.502972
from django import forms from django.forms.extras.widgets import SelectDateWidget from .models import * class SearchForm(forms.Form): searchStr = forms.CharField(required=False, widget=forms.TextInput( attrs={...
true
true
1c0b8a66fbf0960176e49b78977af3b4f51e516b
290
py
Python
pajbot/tmi.py
sgaweda/troybot
7153c0ad387e31de57c71172893fd92c85259d1b
[ "MIT" ]
null
null
null
pajbot/tmi.py
sgaweda/troybot
7153c0ad387e31de57c71172893fd92c85259d1b
[ "MIT" ]
2
2020-02-18T03:30:30.000Z
2020-02-18T03:31:44.000Z
pajbot/tmi.py
sgaweda/troybot
7153c0ad387e31de57c71172893fd92c85259d1b
[ "MIT" ]
null
null
null
class TMI: message_limit = 90 whispers_message_limit_second = 2 whispers_message_limit_minute = 90 @staticmethod def promote_to_verified(): TMI.message_limit = 7000 TMI.whispers_message_limit_second = 15 TMI.whispers_message_limit_minute = 1150
26.363636
48
0.717241
class TMI: message_limit = 90 whispers_message_limit_second = 2 whispers_message_limit_minute = 90 @staticmethod def promote_to_verified(): TMI.message_limit = 7000 TMI.whispers_message_limit_second = 15 TMI.whispers_message_limit_minute = 1150
true
true
1c0b8a8a2ced4222b8f695ab11dfe0ca08051344
33,372
py
Python
main.py
dendisuhubdy/grounded-video-description
2667e216223a63cdc91b616a34f4c046e507a1dc
[ "BSD-3-Clause" ]
291
2019-05-09T05:05:08.000Z
2022-03-29T19:53:17.000Z
main.py
dendisuhubdy/grounded-video-description
2667e216223a63cdc91b616a34f4c046e507a1dc
[ "BSD-3-Clause" ]
38
2019-05-25T20:18:51.000Z
2021-08-28T02:31:04.000Z
main.py
dendisuhubdy/grounded-video-description
2667e216223a63cdc91b616a34f4c046e507a1dc
[ "BSD-3-Clause" ]
81
2019-05-11T12:12:07.000Z
2022-01-08T09:35:24.000Z
# Copyright (c) Facebook, Inc. and its affiliates. # All rights reserved. # # This source code is licensed under the license found in the # LICENSE file in the root directory of this source tree. # from __future__ import absolute_import from __future__ import division from __future__ import print_function import torc...
44.854839
182
0.585551
from __future__ import absolute_import from __future__ import division from __future__ import print_function import torch import torch.nn as nn import torch.nn.functional as F from torch.autograd import Variable import torch.optim as optim import numpy as np import random import time import os import pickle import t...
true
true