hexsha
stringlengths
40
40
size
int64
2
1.05M
ext
stringclasses
9 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
193
max_stars_repo_name
stringlengths
6
109
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
36.6k
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
193
max_issues_repo_name
stringlengths
6
109
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
29.8k
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
193
max_forks_repo_name
stringlengths
6
109
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
11.2k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
2
1.05M
avg_line_length
float64
1
404k
max_line_length
int64
1
1.03M
alphanum_fraction
float64
0
1
2150cf5b89b6ae92afb513989fa7801ec3a7d40d
23,579
py
Python
parsl/monitoring/monitoring.py
aquanauts/parsl
978bb483a4a41b3cef083aa242b2a78614a02dd0
[ "Apache-2.0" ]
null
null
null
parsl/monitoring/monitoring.py
aquanauts/parsl
978bb483a4a41b3cef083aa242b2a78614a02dd0
[ "Apache-2.0" ]
null
null
null
parsl/monitoring/monitoring.py
aquanauts/parsl
978bb483a4a41b3cef083aa242b2a78614a02dd0
[ "Apache-2.0" ]
null
null
null
import os import socket import pickle import logging import time import typeguard import datetime import zmq import queue from multiprocessing import Process, Queue from parsl.utils import RepresentationMixin from parsl.monitoring.message_type import MessageType from typing import Optional, Tuple try: from pars...
41.366667
154
0.574706
215104a98087bb91abc3964684edf1a0a5d0d458
25,067
py
Python
bilby/core/sampler/base_sampler.py
deepchatterjeeligo/bilby
6532c63d0d970ad33478ae0b1c28d4c570b74047
[ "MIT" ]
null
null
null
bilby/core/sampler/base_sampler.py
deepchatterjeeligo/bilby
6532c63d0d970ad33478ae0b1c28d4c570b74047
[ "MIT" ]
null
null
null
bilby/core/sampler/base_sampler.py
deepchatterjeeligo/bilby
6532c63d0d970ad33478ae0b1c28d4c570b74047
[ "MIT" ]
null
null
null
import datetime import distutils.dir_util import numpy as np import os import tempfile from pandas import DataFrame from ..utils import logger, check_directory_exists_and_if_not_mkdir, command_line_args, Counter from ..prior import Prior, PriorDict, DeltaFunction, Constraint from ..result import Result, read_in_resul...
36.223988
108
0.620058
21511f9cac76f79928718ccbe8f8a6d06a4b3fbb
6,374
py
Python
selsum/tasks/doc_tagging_task.py
abrazinskas/SelSum
6ed0e282cf854db7095196732e62ef8662c0daa6
[ "MIT" ]
34
2021-09-10T17:10:10.000Z
2022-03-28T05:12:07.000Z
selsum/tasks/doc_tagging_task.py
abrazinskas/SelSum
6ed0e282cf854db7095196732e62ef8662c0daa6
[ "MIT" ]
null
null
null
selsum/tasks/doc_tagging_task.py
abrazinskas/SelSum
6ed0e282cf854db7095196732e62ef8662c0daa6
[ "MIT" ]
3
2021-11-20T08:21:19.000Z
2022-03-28T05:12:14.000Z
import logging from fairseq.tasks import FairseqTask, register_task from selsum.data.doc_tagging_dataset import DocTaggingDataset from selsum.data.seq_splitter import SeqSplitter from selsum.data.seq_dataset import SeqDataset from selsum.data.src_wrapper import SrcWrapper from selsum.data.sep_replacer import SepReplace...
43.657534
98
0.626765
215140e9879d8ea1b5cabc24d04c91a68c9abc2a
62,403
py
Python
tensorflow/python/ops/rnn.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
71
2017-05-25T16:02:15.000Z
2021-06-09T16:08:08.000Z
tensorflow/python/ops/rnn.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
133
2017-04-26T16:49:49.000Z
2019-10-15T11:39:26.000Z
tensorflow/python/ops/rnn.py
tianyapiaozi/tensorflow
fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a
[ "Apache-2.0" ]
26
2017-04-12T16:25:44.000Z
2018-10-30T10:10:15.000Z
# Copyright 2015 The TensorFlow Authors. 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 required by applica...
41.408759
80
0.69298
215146c59fe20239af0dffcf9e9c569848e857ec
3,232
py
Python
src/callbacks/criterion.py
abbyy/barcode_detection_benchmark
bcd49723a3c726390a71c0d61037a2b32bff277b
[ "Apache-2.0" ]
54
2020-06-01T16:28:38.000Z
2022-03-31T10:15:55.000Z
src/callbacks/criterion.py
abbyy/barcode_detection_benchmark
bcd49723a3c726390a71c0d61037a2b32bff277b
[ "Apache-2.0" ]
5
2020-09-15T16:38:04.000Z
2021-07-01T05:50:53.000Z
src/callbacks/criterion.py
abbyy/barcode_detection_benchmark
bcd49723a3c726390a71c0d61037a2b32bff277b
[ "Apache-2.0" ]
17
2020-01-17T16:04:35.000Z
2022-01-25T13:31:30.000Z
# Copyright (С) ABBYY Production LLC, 2019. All rights reserved. """ Custom criterion callbacks """ from typing import Union, List, Any import torch from catalyst.dl import RunnerState from catalyst.dl.callbacks import CriterionCallback, CriterionAggregatorCallback class PretransformCriterionCallback(CriterionCallba...
38.47619
114
0.680074
21515da700a43fe81fb4b111953f84055cd55bf4
162
py
Python
tests/zed/out.py
splhack/loam
10b08bd622b7cfd63eabaec4729f6238e4521b30
[ "MIT" ]
14
2017-10-08T09:16:10.000Z
2021-11-27T19:12:24.000Z
tests/zed/out.py
splhack/loam
10b08bd622b7cfd63eabaec4729f6238e4521b30
[ "MIT" ]
7
2018-04-12T21:33:49.000Z
2018-08-21T22:14:20.000Z
tests/zed/out.py
splhack/loam
10b08bd622b7cfd63eabaec4729f6238e4521b30
[ "MIT" ]
3
2018-07-24T04:55:02.000Z
2019-12-30T08:12:39.000Z
import magma as m import mantle from loam.boards.zed import Zed zed = Zed() zed.LED.on(2) main = zed.main() m.wire( 1, main.LED[0] ) m.wire( 1, main.LED[1] )
12.461538
31
0.654321
2151653c634e296ccd43ac99f577d098b00a9ae6
8,105
py
Python
.eggs/boto-2.48.0-py2.7.egg/boto/cloudfront/invalidation.py
MQQ/git-bigstore
95f1e37fcda7fdce80502593cec31a44c604cf8a
[ "Apache-2.0" ]
null
null
null
.eggs/boto-2.48.0-py2.7.egg/boto/cloudfront/invalidation.py
MQQ/git-bigstore
95f1e37fcda7fdce80502593cec31a44c604cf8a
[ "Apache-2.0" ]
null
null
null
.eggs/boto-2.48.0-py2.7.egg/boto/cloudfront/invalidation.py
MQQ/git-bigstore
95f1e37fcda7fdce80502593cec31a44c604cf8a
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2006-2010 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, mod...
37.35023
133
0.637508
21517369fdbdfb1b6375fa116034ae2c9535a033
632
py
Python
tests/test_storage.py
lucmos/spectral-unions
39991fcbfef36b8e6a2b3578a3be36e9e7c3bbc5
[ "MIT" ]
67
2022-02-06T14:45:44.000Z
2022-03-28T22:09:49.000Z
tests/test_storage.py
lucmos/spectral-unions
39991fcbfef36b8e6a2b3578a3be36e9e7c3bbc5
[ "MIT" ]
1
2022-03-17T03:09:20.000Z
2022-03-21T23:12:18.000Z
tests/test_storage.py
lucmos/spectral-unions
39991fcbfef36b8e6a2b3578a3be36e9e7c3bbc5
[ "MIT" ]
2
2022-03-01T13:12:16.000Z
2022-03-13T14:18:11.000Z
from pathlib import Path import yaml from omegaconf import DictConfig def test_storage_config(run_trainings_not_dry: str, cfg_all_not_dry: DictConfig) -> None: cfg_path = Path(run_trainings_not_dry) / "config.yaml" assert cfg_path.exists() with cfg_path.open() as f: loaded_cfg = yaml.safe_load(...
26.333333
93
0.742089
215197d99a9ba7512279b341f4e9645d62e55d29
12,256
py
Python
tests/TestUserGroups.py
Esri/portalpy
e4b241fd090b0884d4d4e9d3ecf473d7bf0b1a45
[ "Apache-2.0" ]
35
2015-01-29T21:37:33.000Z
2022-02-21T18:29:11.000Z
tests/TestUserGroups.py
Esri/portalpy
e4b241fd090b0884d4d4e9d3ecf473d7bf0b1a45
[ "Apache-2.0" ]
11
2015-05-19T14:15:48.000Z
2020-09-23T16:58:28.000Z
tests/TestUserGroups.py
Esri/portalpy
e4b241fd090b0884d4d4e9d3ecf473d7bf0b1a45
[ "Apache-2.0" ]
29
2015-03-14T01:45:36.000Z
2020-02-15T23:55:11.000Z
import portalpy import unittest import random portalUrl = "https://portalpy.esri.com/arcgis" agolUrl = "https://arcgis.com" group_id = "67e1761068b7453693a0c68c92a62e2e" # group id of existing group "GIS Department" portalAdminName = "portaladmin" portalAdminPassword = "portala...
48.634921
148
0.655924
2151a074bad72f72b0947aca405605a2d2992052
6,193
py
Python
zproc/server.py
gitter-badger/zproc
b26d39d9c564886c48c84a1e93e616f21f3bece4
[ "MIT" ]
null
null
null
zproc/server.py
gitter-badger/zproc
b26d39d9c564886c48c84a1e93e616f21f3bece4
[ "MIT" ]
null
null
null
zproc/server.py
gitter-badger/zproc
b26d39d9c564886c48c84a1e93e616f21f3bece4
[ "MIT" ]
null
null
null
import os import signal from collections import defaultdict from copy import deepcopy from typing import Any, Dict import itsdangerous import zmq from tblib import pickling_support from zproc import util, exceptions from zproc.constants import Msgs, Commands pickling_support.install() class Server(util.SecretKeyHo...
32.424084
85
0.612143
2151ae376bbf62fd35193fa6e60a22f2de36b3e2
6,323
py
Python
examples/gestures/my_gestures.py
hakanardo/kivy
707b4aa35bfb79577bd87dfc23aa527f0eb03640
[ "MIT" ]
null
null
null
examples/gestures/my_gestures.py
hakanardo/kivy
707b4aa35bfb79577bd87dfc23aa527f0eb03640
[ "MIT" ]
null
null
null
examples/gestures/my_gestures.py
hakanardo/kivy
707b4aa35bfb79577bd87dfc23aa527f0eb03640
[ "MIT" ]
null
null
null
#!/usr/bin/env python from kivy.gesture import GestureDatabase gdb = GestureDatabase() cross = gdb.str_to_gesture( 'eNq1l9tu3DYQhu/1It6bLjicE+cFtrcF/ACBYwv2Iqkt7G7a5u1DDqlT0lZ7I2Mxsj5JP2f4k' 'xR1OH85//X9+Npfb98uffd7Ow6hO7wM0D0+vD/92T90Q8z/5gN218eH6+3y8aW/5lPqDl8H7g' '7/KvLot3WDFCnNzw8f5/dbeSyVx+w/Hvuj3NUN...
68.728261
79
0.871896
2151c42704152e1a2aaade6321a2ac60f23c2f15
2,235
py
Python
cases/tests/test_utils.py
johngriebel/APDIncidentReports
491b91bcc7eef9a32bda05ad3236b14748ba3b50
[ "MIT" ]
null
null
null
cases/tests/test_utils.py
johngriebel/APDIncidentReports
491b91bcc7eef9a32bda05ad3236b14748ba3b50
[ "MIT" ]
16
2019-05-23T03:25:01.000Z
2022-02-10T08:54:24.000Z
cases/tests/test_utils.py
johngriebel/APDIncidentReports
491b91bcc7eef9a32bda05ad3236b14748ba3b50
[ "MIT" ]
null
null
null
import random import logging import pytz from datetime import datetime from django.conf import settings from django.test import TestCase from cases.utils import convert_date_string_to_object logger = logging.getLogger('cases') class UtilsTestCase(TestCase): maxDiff = None def test_dashed_date_no_time(self):...
37.881356
74
0.600447
2151d5ec102f326319ad04dfbefc170be111a785
4,266
py
Python
vplexapi-7.0.0/vplexapi/models/vias_job_storage_pools.py
dell/python-vplex
02c5df5e7f9ed61a13a2838f21ca6467a25dd392
[ "Apache-2.0" ]
3
2020-12-01T11:22:13.000Z
2021-02-16T17:38:42.000Z
vplexapi-7.0.0/vplexapi/models/vias_job_storage_pools.py
dell/python-vplex
02c5df5e7f9ed61a13a2838f21ca6467a25dd392
[ "Apache-2.0" ]
null
null
null
vplexapi-7.0.0/vplexapi/models/vias_job_storage_pools.py
dell/python-vplex
02c5df5e7f9ed61a13a2838f21ca6467a25dd392
[ "Apache-2.0" ]
3
2021-01-01T21:07:55.000Z
2021-02-20T07:07:40.000Z
# coding: utf-8 """ VPlex REST API A definition for the next-gen VPlex API # noqa: E501 OpenAPI spec version: 0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class ViasJobStoragePools(object): """NOTE: This class...
25.392857
80
0.548758
2151f1df108ebd2051ac800a76d0af556676272a
1,514
py
Python
invenio_explicit_acls/alembic/21ab0d49a6ca_propertyvalueacl.py
oarepo/invenio-acls
a649b2e71e729e3bcfa44110afeb73358aa6034a
[ "MIT" ]
null
null
null
invenio_explicit_acls/alembic/21ab0d49a6ca_propertyvalueacl.py
oarepo/invenio-acls
a649b2e71e729e3bcfa44110afeb73358aa6034a
[ "MIT" ]
7
2019-05-08T08:35:01.000Z
2021-06-25T15:21:34.000Z
invenio_explicit_acls/alembic/21ab0d49a6ca_propertyvalueacl.py
oarepo/invenio-explicit-acls
a649b2e71e729e3bcfa44110afeb73358aa6034a
[ "MIT" ]
2
2019-03-31T19:07:30.000Z
2019-05-06T08:11:45.000Z
# # This file is part of Invenio. # Copyright (C) 2016-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """PropertyValueACL.""" import sqlalchemy as sa import sqlalchemy_utils from alembic import op from sqlalchem...
36.047619
133
0.735799
2151ffef302382c4eb6464ae811d0b1be92a7903
4,982
py
Python
process_task/app.py
philpot/swwiper
b28950b0af4cbe80764bdacbef0d27aacd5f18d1
[ "Apache-2.0" ]
null
null
null
process_task/app.py
philpot/swwiper
b28950b0af4cbe80764bdacbef0d27aacd5f18d1
[ "Apache-2.0" ]
null
null
null
process_task/app.py
philpot/swwiper
b28950b0af4cbe80764bdacbef0d27aacd5f18d1
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function import logging import datetime import boto3 import json import decimal BUCKET = "vdf-informatics" PROJ = "swwiper" SCOPES = ['https://www.googleapis.com/auth/drive.metadata.readonly'] FORMAT = "[%(levelname)s]\t[%(name)s]\t%(asctime)s.%(msecs)dZ\t%(message)s\n" logging.basicConf...
33.436242
458
0.641911
215222023b99ad7a62f9dd54269a5c966c7c17bc
321
py
Python
master/python_games_sweigart/python_games_sweigart/jokes.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
4
2018-09-07T15:35:24.000Z
2019-03-27T09:48:12.000Z
master/python_games_sweigart/python_games_sweigart/jokes.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
371
2020-03-04T21:51:56.000Z
2022-03-31T20:59:11.000Z
master/python_games_sweigart/python_games_sweigart/jokes.py
AlexRogalskiy/DevArtifacts
931aabb8cbf27656151c54856eb2ea7d1153203a
[ "MIT" ]
3
2019-06-18T19:57:17.000Z
2020-11-06T03:55:08.000Z
print('Что получится, если скрестить снеговика с вампиром?') input() print('Обморожение!') print() print('Что дантисты называют \'черной дырой\'?') input() print('Кариес!') print() print('Тук-тук.') input() print("Кто там?") input() print('Невежливая корова.') input() print('Невежливая корова?', end='') print('-МУУУ!')...
18.882353
60
0.688474
21525c14d5900b985cbc723812ca22ad0dc7c98a
4,820
py
Python
models/attention.py
Khoale1096/stupidNMT
894536c16dc7ff958aa5571828a89ecabfcb72d7
[ "BSD-3-Clause" ]
31
2020-05-05T21:56:45.000Z
2022-02-24T19:08:19.000Z
models/attention.py
Khoale1096/stupidNMT
894536c16dc7ff958aa5571828a89ecabfcb72d7
[ "BSD-3-Clause" ]
2
2019-10-02T15:23:55.000Z
2019-10-16T02:38:25.000Z
models/attention.py
Khoale1096/stupidNMT
894536c16dc7ff958aa5571828a89ecabfcb72d7
[ "BSD-3-Clause" ]
5
2020-05-06T06:04:40.000Z
2020-12-29T14:09:31.000Z
''' A module which implements various attention mechanisms ''' import torch import time from torch import nn from torch.nn import functional as F from utils import same_tensor class MultiHeadedAttention(nn.Module): ''' Implement a multi-headed attention module ''' def __init__(self, embed_dim, num_heads=1): ...
37.364341
94
0.6
21526662397a10958d0fce44ec5992286b52ef4b
10,147
py
Python
rally/plugins/openstack/context/api_versions.py
DeanHwd/rally
d284aa0746c54f1c375470e76dd206d19877a7fd
[ "Apache-2.0" ]
null
null
null
rally/plugins/openstack/context/api_versions.py
DeanHwd/rally
d284aa0746c54f1c375470e76dd206d19877a7fd
[ "Apache-2.0" ]
null
null
null
rally/plugins/openstack/context/api_versions.py
DeanHwd/rally
d284aa0746c54f1c375470e76dd206d19877a7fd
[ "Apache-2.0" ]
null
null
null
# 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 # d...
37.72119
79
0.455208
215288d6588d0fa2890a0c2a5e54ab35c8de601e
1,048
py
Python
synapse/resources/groups-plugin/unix-groups.py
mrmuxl/synapse-agent
615ccc8faefa0f7d66d070a7444fe57e67e3bae1
[ "MIT" ]
1
2016-06-23T05:56:53.000Z
2016-06-23T05:56:53.000Z
synapse/resources/groups-plugin/unix-groups.py
mrmuxl/synapse-agent
615ccc8faefa0f7d66d070a7444fe57e67e3bae1
[ "MIT" ]
null
null
null
synapse/resources/groups-plugin/unix-groups.py
mrmuxl/synapse-agent
615ccc8faefa0f7d66d070a7444fe57e67e3bae1
[ "MIT" ]
null
null
null
import grp from synapse.synapse_exceptions import ResourceException from synapse.syncmd import exec_cmd def get_group_infos(name=None): if not name: return [format_group_info(x.gr_name) for x in grp.getgrall()] else: return format_group_info(name) def format_group_info(name): try: ...
24.952381
74
0.63645
2152aae75917a4e771d437984c3e46fb2f32aa4f
4,332
py
Python
examples/obsolete_legacy/simpleMalwareSerPer.py
dasec/ForTrace
b8187522a2c83fb661e5a1a5f403da8f40a31ead
[ "MIT" ]
1
2022-03-31T14:01:51.000Z
2022-03-31T14:01:51.000Z
examples/obsolete_legacy/simpleMalwareSerPer.py
dasec/ForTrace
b8187522a2c83fb661e5a1a5f403da8f40a31ead
[ "MIT" ]
null
null
null
examples/obsolete_legacy/simpleMalwareSerPer.py
dasec/ForTrace
b8187522a2c83fb661e5a1a5f403da8f40a31ead
[ "MIT" ]
1
2022-03-31T14:02:30.000Z
2022-03-31T14:02:30.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- #Tests persistence mechanism of malware component by creating an autostart service import sys import time import logging import subprocess import threading import paramiko try: from fortrace.core.vmm import Vmm from fortrace.utility.logger_helper import create_log...
33.323077
149
0.632733
2152e06f0ccc533d1cbd22047307755633944599
16,387
py
Python
__init__.py
AIIX/skill-npr-news
ebbabbfe355070c7713c4975f4274ba256f8f67e
[ "Apache-2.0" ]
null
null
null
__init__.py
AIIX/skill-npr-news
ebbabbfe355070c7713c4975f4274ba256f8f67e
[ "Apache-2.0" ]
null
null
null
__init__.py
AIIX/skill-npr-news
ebbabbfe355070c7713c4975f4274ba256f8f67e
[ "Apache-2.0" ]
null
null
null
# Copyright 2018 Mycroft AI Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
38.467136
112
0.606884
2152ec13566b01c1b03fed6167ba7ac24f016e48
1,083
py
Python
menus/migrations/0001_initial.py
moonbirddk/networked-toolbox
b059b77bfda173794b3cad55874cb06edc70d0e1
[ "BSD-2-Clause-FreeBSD" ]
2
2016-09-02T12:45:31.000Z
2018-02-10T10:18:11.000Z
menus/migrations/0001_initial.py
Socialsquare/networked-toolbox
b059b77bfda173794b3cad55874cb06edc70d0e1
[ "BSD-2-Clause-FreeBSD" ]
17
2020-03-24T15:58:05.000Z
2022-02-10T08:08:57.000Z
notifications/menus/migrations/0001_initial.py
moonbirddk/networked-toolbox
b059b77bfda173794b3cad55874cb06edc70d0e1
[ "BSD-2-Clause-FreeBSD" ]
1
2018-01-05T08:02:18.000Z
2018-01-05T08:02:18.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.11.8 on 2017-12-11 19:42 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('pages', '0001_initial'), ] ope...
36.1
181
0.606648
2152efe6499e0049892235253a4a0fe10e5a6a45
9,009
py
Python
datasets/cityscapes_scripts/ins_city2coco.py
sahan-liyanaarachchi/bcrf-detectron
7cbdd8a77e54f09cca1addd66c7359e17501b9e4
[ "Apache-2.0" ]
4
2020-09-11T05:39:22.000Z
2022-02-03T20:50:51.000Z
datasets/cityscapes_scripts/ins_city2coco.py
sahan-liyanaarachchi/bcrf-detectron
7cbdd8a77e54f09cca1addd66c7359e17501b9e4
[ "Apache-2.0" ]
4
2021-06-08T22:17:39.000Z
2022-03-12T00:46:18.000Z
datasets/cityscapes_scripts/ins_city2coco.py
sahan-liyanaarachchi/bcrf-detectron
7cbdd8a77e54f09cca1addd66c7359e17501b9e4
[ "Apache-2.0" ]
3
2020-09-05T11:31:59.000Z
2020-10-03T00:11:48.000Z
#!/usr/bin/env python # Copyright (c) 2017-present, Facebook, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
36.326613
93
0.530692
215345e627432f8b909b547007d21b7895d69363
1,355
py
Python
pkg/pydantic_mongo/mongo_model.py
2read-online/pydantic-mongodb
38edfeb8e87a7417a23593cc59d64c57ca3f87d7
[ "MIT" ]
null
null
null
pkg/pydantic_mongo/mongo_model.py
2read-online/pydantic-mongodb
38edfeb8e87a7417a23593cc59d64c57ca3f87d7
[ "MIT" ]
null
null
null
pkg/pydantic_mongo/mongo_model.py
2read-online/pydantic-mongodb
38edfeb8e87a7417a23593cc59d64c57ca3f87d7
[ "MIT" ]
null
null
null
"""Mongo model""" from datetime import datetime from typing import Optional from bson import ObjectId from bson.errors import InvalidId from pydantic import BaseModel, BaseConfig class OID(str): """Wrapper around ObjectId""" @classmethod def __get_validators__(cls): yield cls.validate @clas...
24.196429
86
0.594096
21534a71b09e4386685889cdd2a06be684f51035
5,521
py
Python
codes/models/Generation_condition_model.py
chxy95/HDRTVNet
90784eedd8c08d19b0b5db99e59e10695542ee24
[ "MIT" ]
60
2021-07-26T01:26:28.000Z
2022-03-31T01:52:53.000Z
codes/models/Generation_condition_model.py
chxy95/HDRTVNet
90784eedd8c08d19b0b5db99e59e10695542ee24
[ "MIT" ]
9
2021-08-31T10:06:51.000Z
2022-03-11T02:52:58.000Z
codes/models/Generation_condition_model.py
chxy95/HDRTVNet
90784eedd8c08d19b0b5db99e59e10695542ee24
[ "MIT" ]
10
2021-07-28T08:43:41.000Z
2022-03-16T07:10:17.000Z
import logging from collections import OrderedDict import torch import torch.nn as nn from torch.nn.parallel import DataParallel, DistributedDataParallel import models.networks as networks import models.lr_scheduler as lr_scheduler from .base_model import BaseModel logger = logging.getLogger('base') class Generation...
40.896296
100
0.558051
21538f8139b1f1059ac4a322d9ee5285ade99c33
3,082
py
Python
simple_Cimpl_filters.py
pathumd/imagefiltering
b16612e5da4b5e98d6f17e9d5689be4de15a1ba7
[ "Unlicense" ]
null
null
null
simple_Cimpl_filters.py
pathumd/imagefiltering
b16612e5da4b5e98d6f17e9d5689be4de15a1ba7
[ "Unlicense" ]
null
null
null
simple_Cimpl_filters.py
pathumd/imagefiltering
b16612e5da4b5e98d6f17e9d5689be4de15a1ba7
[ "Unlicense" ]
null
null
null
""" ECOR 1051 Fall 2019 Some simple Cimpl image processing filters. Last edited: Nov. 12, 2019 """ from Cimpl import choose_file, load_image, copy, create_color, set_color,\ show, Image, get_color def invert(image: Image) -> Image: """Return an inverted copy of image; that is, an image that is ...
33.868132
79
0.624919
2153958fc3a14e2c34f836811588648ab7f474c4
2,282
py
Python
src/command_modules/azure-cli-servicefabric/setup.py
v-Ajnava/azure-cli
febec631d79bfca151e84267b5b409594bad598e
[ "MIT" ]
null
null
null
src/command_modules/azure-cli-servicefabric/setup.py
v-Ajnava/azure-cli
febec631d79bfca151e84267b5b409594bad598e
[ "MIT" ]
3
2021-03-26T00:48:20.000Z
2022-03-29T22:05:39.000Z
src/command_modules/azure-cli-servicefabric/setup.py
v-Ajnava/azure-cli
febec631d79bfca151e84267b5b409594bad598e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # ---------------------------------------------...
33.072464
197
0.624452
2153a10a58d0771c007b695e0279b7cf1de3b354
4,226
py
Python
ocd_backend/utils/ibabs.py
fletcher91/open-raadsinformatie
a1626453e43ffb6c2aef17587f611ad622a8d9a9
[ "CC-BY-4.0" ]
1
2021-03-16T19:17:30.000Z
2021-03-16T19:17:30.000Z
ocd_backend/utils/ibabs.py
fletcher91/open-raadsinformatie
a1626453e43ffb6c2aef17587f611ad622a8d9a9
[ "CC-BY-4.0" ]
null
null
null
ocd_backend/utils/ibabs.py
fletcher91/open-raadsinformatie
a1626453e43ffb6c2aef17587f611ad622a8d9a9
[ "CC-BY-4.0" ]
null
null
null
import re import datetime from pprint import pprint def _ibabs_to_dict(o, fields, excludes=[]): """ Converts an iBabs SOAP response to a JSON serializable dict """ output = {} for f in fields.keys(): if f in excludes: continue v = getattr(o, f) if fields[f] is ...
25.768293
92
0.573829
2153a966d63d411158c41f313e97724cb000501d
5,614
py
Python
river/drift/ddm.py
online-ml/creme
60872844e6052b5ef20e4075aea30f9031377136
[ "BSD-3-Clause" ]
1,105
2019-01-24T15:15:30.000Z
2020-11-10T18:27:00.000Z
river/drift/ddm.py
online-ml/creme
60872844e6052b5ef20e4075aea30f9031377136
[ "BSD-3-Clause" ]
328
2019-01-25T13:48:43.000Z
2020-11-11T11:41:44.000Z
river/drift/ddm.py
online-ml/creme
60872844e6052b5ef20e4075aea30f9031377136
[ "BSD-3-Clause" ]
150
2019-01-29T19:05:21.000Z
2020-11-11T11:50:14.000Z
import math import numbers from river.base import DriftDetector class DDM(DriftDetector): r"""Drift Detection Method. DDM (Drift Detection Method) is a concept change detection method based on the PAC learning model premise, that the learner's error rate will decrease as the number of analysed sampl...
33.616766
125
0.640898
2153acc6e6b17f8c5cfd688db51baf159bf0d2ba
2,304
py
Python
sources/openjpeg/setup.py
ds2268/large_image
edab179aabdca31e0852866e66b34adbab410f5b
[ "Apache-2.0" ]
null
null
null
sources/openjpeg/setup.py
ds2268/large_image
edab179aabdca31e0852866e66b34adbab410f5b
[ "Apache-2.0" ]
null
null
null
sources/openjpeg/setup.py
ds2268/large_image
edab179aabdca31e0852866e66b34adbab410f5b
[ "Apache-2.0" ]
null
null
null
import os from setuptools import find_packages, setup description = 'An Openjpeg tilesource for large_image.' long_description = description + '\n\nSee the large-image package for more details.' def prerelease_local_scheme(version): """ Return local scheme version unless building on master in CircleCI. ...
34.38806
91
0.650174
2153ba02423cb0766ed1eafb1c2d7b7f45c7866a
868
py
Python
apps/logs/migrations/0021_virtual_report_type_to_report_data_view.py
remocrevo/celus
682b13168eb475d7f970502113e756e40a899877
[ "MIT" ]
null
null
null
apps/logs/migrations/0021_virtual_report_type_to_report_data_view.py
remocrevo/celus
682b13168eb475d7f970502113e756e40a899877
[ "MIT" ]
null
null
null
apps/logs/migrations/0021_virtual_report_type_to_report_data_view.py
remocrevo/celus
682b13168eb475d7f970502113e756e40a899877
[ "MIT" ]
null
null
null
# Generated by Django 2.2.4 on 2019-09-09 08:03 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0007_timestamps'), ('logs', '0020_materialized_interest_support'), ] operations = [ migrations.RenameModel( old_name='Vi...
24.8
55
0.56682
2153e41df95519a307aab2f4705927e55b525382
2,677
py
Python
ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
wbear2/ambari
a1891193984da47015cd5483b5b95e040677d7df
[ "Apache-2.0" ]
5
2018-06-03T05:19:40.000Z
2021-04-16T17:10:49.000Z
ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
wbear2/ambari
a1891193984da47015cd5483b5b95e040677d7df
[ "Apache-2.0" ]
null
null
null
ambari-server/src/test/python/stacks/2.1/FALCON/test_falcon_client.py
wbear2/ambari
a1891193984da47015cd5483b5b95e040677d7df
[ "Apache-2.0" ]
6
2019-05-07T13:24:39.000Z
2021-02-15T14:12:37.000Z
#!/usr/bin/env python ''' Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License")...
45.372881
107
0.575644
2153e4fa55810dbc341c3c6517ed1dffe3298642
140
py
Python
app.py
xasync/pillbox
49f3ed08aff63ea458a9d80a19846339e02447f8
[ "Apache-2.0" ]
null
null
null
app.py
xasync/pillbox
49f3ed08aff63ea458a9d80a19846339e02447f8
[ "Apache-2.0" ]
null
null
null
app.py
xasync/pillbox
49f3ed08aff63ea458a9d80a19846339e02447f8
[ "Apache-2.0" ]
null
null
null
from gevent import monkey monkey.patch_all() from pillbox import create_app app = create_app() if __name__ == '__main__': app.run()
12.727273
30
0.721429
21540a3d3ab3a666d41fbb9521f4e6e61ecc6e4d
2,543
wsgi
Python
scripts/python/backend_server/wsgi/latest_vehicles.wsgi
OSADP/Pikalert-Vehicle-Data-Translator-
295da604408f6f13af0301b55476a81311459386
[ "Apache-2.0" ]
2
2020-06-03T15:59:50.000Z
2020-12-21T11:11:57.000Z
scripts/python/backend_server/wsgi/latest_vehicles.wsgi
OSADP/Pikalert-Vehicle-Data-Translator-
295da604408f6f13af0301b55476a81311459386
[ "Apache-2.0" ]
null
null
null
scripts/python/backend_server/wsgi/latest_vehicles.wsgi
OSADP/Pikalert-Vehicle-Data-Translator-
295da604408f6f13af0301b55476a81311459386
[ "Apache-2.0" ]
2
2019-10-02T06:47:23.000Z
2020-02-02T18:32:23.000Z
# *=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=* # ** Copyright UCAR (c) 1992 - 2015 # ** University Corporation for Atmospheric Research(UCAR) # ** National Center for Atmospheric Research(NCAR) # ** Research Applications Laboratory(RAL) # ** P.O.Box 3000, Boulder, Colorado, 80307-3000,...
39.123077
148
0.681085
21543d08347234cacd0431c2f6e7fc6beb546e87
976
py
Python
scripts/digest-files.py
yoshinari-nomura/pinot
7a3aa5054e31fd7321f6691d04f42b8b8834b516
[ "MIT" ]
null
null
null
scripts/digest-files.py
yoshinari-nomura/pinot
7a3aa5054e31fd7321f6691d04f42b8b8834b516
[ "MIT" ]
null
null
null
scripts/digest-files.py
yoshinari-nomura/pinot
7a3aa5054e31fd7321f6691d04f42b8b8834b516
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import binascii import hashlib import re import os import sys class DigestDirtree: def isdir(self, path): return os.stat(path)[0] & 0x4000 != 0 def digest(self, path, echo = True): hash = hashlib.sha1() if self.isdir(path): path = re.sub('/$', '', p...
26.378378
61
0.496926
21547dd558f6f9e2873e93d5ea76f91f9221ecf2
27,622
py
Python
media_player/dlna.py
killadm/HomeAssistant_Components
cb00d7b24da3efbc5fd5fa119b640045478f3134
[ "Apache-2.0" ]
108
2017-03-26T14:58:46.000Z
2022-01-09T02:32:09.000Z
media_player/dlna.py
killadm/HomeAssistant_Components
cb00d7b24da3efbc5fd5fa119b640045478f3134
[ "Apache-2.0" ]
10
2017-08-04T01:08:12.000Z
2018-11-19T06:57:31.000Z
media_player/dlna.py
killadm/HomeAssistant_Components
cb00d7b24da3efbc5fd5fa119b640045478f3134
[ "Apache-2.0" ]
31
2017-04-21T00:23:39.000Z
2021-12-15T07:21:42.000Z
""" Support for Dlna Media Player. Developed by Charley """ import requests import xml.etree.ElementTree as etree import re import homeassistant.util.dt as dt_util from homeassistant.components.media_player import ( SUPPORT_NEXT_TRACK, SUPPORT_PAUSE, SUPPORT_PREVIOUS_TRACK, SUPPORT_SEEK, SUPPORT_PLAY_MEDIA, ...
32.268692
171
0.585982
21547e15891ebe9781222f91e89f961b71eb5d10
281
py
Python
functest/cli/setup.py
mytianfu/functest
1001f3f7adff734ae80d17ce65914f60c6cce18d
[ "Apache-2.0" ]
null
null
null
functest/cli/setup.py
mytianfu/functest
1001f3f7adff734ae80d17ce65914f60c6cce18d
[ "Apache-2.0" ]
null
null
null
functest/cli/setup.py
mytianfu/functest
1001f3f7adff734ae80d17ce65914f60c6cce18d
[ "Apache-2.0" ]
null
null
null
from setuptools import setup setup( name='functest', version='colorado.0.1', py_modules=['cli_base'], include_package_data=True, install_requires=[ 'click', ], entry_points=''' [console_scripts] functest=cli_base:cli ''', )
17.5625
30
0.597865
21548d521a806c3c2cb6193ef7afcdac80567878
883
py
Python
strings/hashing.py
hariharanragothaman/pymaster
b3d033b4d5c75c69f587c94d9d12cd4a349a6a69
[ "Apache-2.0" ]
10
2020-09-21T22:23:09.000Z
2022-01-25T16:58:44.000Z
strings/hashing.py
hariharanragothaman/pymaster
b3d033b4d5c75c69f587c94d9d12cd4a349a6a69
[ "Apache-2.0" ]
null
null
null
strings/hashing.py
hariharanragothaman/pymaster
b3d033b4d5c75c69f587c94d9d12cd4a349a6a69
[ "Apache-2.0" ]
null
null
null
def compute_hash(s): p = 53 m = 10 ** 9 + 9 hash_value = 0 pow = 1 for c in s: hash_value = (hash_value + (ord(c) - ord("a") + 1) * pow) % m pow = (pow * p) % m return hash_value def compute_hash_faster(s): n = len(s) p = 53 m = 10 ** 9 + 9 # Pre-computing the...
21.536585
70
0.539071
215494ff1daef28dd48db2eaed3b4b8994285e34
4,249
py
Python
google_workspace/gmail/label.py
dermasmid/google-workspace
b413df08bea7f453a2430ef65ece49499cbda736
[ "MIT" ]
61
2021-09-22T10:59:14.000Z
2022-02-17T15:54:16.000Z
google_workspace/gmail/label.py
dermasmid/pytogle
b413df08bea7f453a2430ef65ece49499cbda736
[ "MIT" ]
2
2021-11-23T18:20:20.000Z
2022-01-03T10:25:58.000Z
google_workspace/gmail/label.py
dermasmid/google-workspace
b413df08bea7f453a2430ef65ece49499cbda736
[ "MIT" ]
2
2021-11-09T10:58:14.000Z
2022-01-11T23:28:42.000Z
from typing import Generator, Type from typing_extensions import Literal from . import gmail, message from .utils import make_label_dict class Label: """A gmail label. Parameters: gmail_client (:obj:`~google_workspace.gmail.GmailClient`): The gmail_client. thread_data (``dict``...
40.466667
185
0.624853
2154c6ee1b32026ae0f6660db012078415c14e4f
14,285
py
Python
ForgeSVN/forgesvn/tests/functional/test_controllers.py
shalithasuranga/allura
4f7fba13415954d07f602a051ec697329dd3706b
[ "Apache-2.0" ]
1
2019-03-17T04:16:15.000Z
2019-03-17T04:16:15.000Z
ForgeSVN/forgesvn/tests/functional/test_controllers.py
DalavanCloud/allura
a25329caed9e6d136a1004c33372e0632a16e352
[ "Apache-2.0" ]
null
null
null
ForgeSVN/forgesvn/tests/functional/test_controllers.py
DalavanCloud/allura
a25329caed9e6d136a1004c33372e0632a16e352
[ "Apache-2.0" ]
null
null
null
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (t...
41.891496
115
0.611761
2154cc3bd49731be80961867adbd39c0ca78ccbe
2,032
py
Python
tests/components/sensor/test_api_streams.py
mbs-technologie/home-assistant
71fc446425cbb1c0d4670c261ce8ea3bfd83a73d
[ "MIT" ]
13
2017-02-01T13:25:34.000Z
2022-01-26T01:30:39.000Z
tests/components/sensor/test_api_streams.py
1Forward1Back/home-assistant
ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6
[ "MIT" ]
9
2017-07-26T18:05:32.000Z
2021-12-05T14:16:34.000Z
tests/components/sensor/test_api_streams.py
1Forward1Back/home-assistant
ce24ef0c20dea0fd671d6f2c2a8b1456b4b66ba6
[ "MIT" ]
21
2017-07-26T17:09:40.000Z
2022-03-27T22:37:22.000Z
import asyncio import logging from homeassistant.bootstrap import async_setup_component from tests.common import assert_setup_component @asyncio.coroutine def test_api_streams(hass): """Test API streams.""" log = logging.getLogger('homeassistant.components.api') with assert_setup_component(1): y...
27.459459
69
0.660433
2154fa8e523bc69f5c7b88834f774ecd5c7bf8d3
1,120
py
Python
SRMspinanalysis/tests/test_solver.py
matthewdmorse/SRMspinanalysis
4f1161a2fd418347caf9e61ae83b40869f8157b0
[ "MIT" ]
null
null
null
SRMspinanalysis/tests/test_solver.py
matthewdmorse/SRMspinanalysis
4f1161a2fd418347caf9e61ae83b40869f8157b0
[ "MIT" ]
1
2018-04-24T02:54:19.000Z
2018-04-24T02:54:19.000Z
SRMspinanalysis/tests/test_solver.py
matthewdmorse/SRMspinanalysis
4f1161a2fd418347caf9e61ae83b40869f8157b0
[ "MIT" ]
2
2018-04-18T23:35:52.000Z
2018-04-23T23:25:37.000Z
from .. import solver import numpy as np def test_compute_moments_1(): params = np.array([1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0]) thrust_motor_1 = 25.0 thrust_motor_2 = 6.0 # Computed by hand exp = np.array([0.0, 51.0, 37.0]) obs = solver.compute_moments(params, thrust_motor_1, thrust_motor_2) ...
32
75
0.667857
2154fadf6256464df21d91051e3fbe4673532367
5,150
py
Python
cuchem/cuchem/wf/cluster/cpukmeansumap.py
dorukozturk/cheminformatics
c0fa66dd4f4e6650d7286ae2be533c66b7a2b270
[ "Apache-2.0" ]
null
null
null
cuchem/cuchem/wf/cluster/cpukmeansumap.py
dorukozturk/cheminformatics
c0fa66dd4f4e6650d7286ae2be533c66b7a2b270
[ "Apache-2.0" ]
null
null
null
cuchem/cuchem/wf/cluster/cpukmeansumap.py
dorukozturk/cheminformatics
c0fa66dd4f4e6650d7286ae2be533c66b7a2b270
[ "Apache-2.0" ]
null
null
null
#!/opt/conda/envs/rapids/bin/python3 # # Copyright (c) 2020, NVIDIA CORPORATION. # # 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 ...
39.015152
115
0.68233
215505924295d16accd371e083ad39b06435503a
320
py
Python
tests/pyscript/recursive.py
scartill/cmd2
1b4e1e25f84bcc800a5f369783c3c3448a42361e
[ "MIT" ]
1
2021-07-06T23:59:46.000Z
2021-07-06T23:59:46.000Z
tests/pyscript/recursive.py
scartill/cmd2
1b4e1e25f84bcc800a5f369783c3c3448a42361e
[ "MIT" ]
null
null
null
tests/pyscript/recursive.py
scartill/cmd2
1b4e1e25f84bcc800a5f369783c3c3448a42361e
[ "MIT" ]
null
null
null
#!/usr/bin/env python # coding=utf-8 # flake8: noqa F821 """ Example demonstrating that calling run_pyscript recursively inside another Python script isn't allowed """ import os app.cmd_echo = True my_dir = (os.path.dirname(os.path.realpath(sys.argv[0]))) app('run_pyscript {}'.format(os.path.join(my_dir, 'stop.py')))
26.666667
102
0.7375
2155504a353da4ce73dcfcef071d5afe5b8acc74
566
py
Python
client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetJobResponse.py
CaptEmulation/modeldb
78b10aca553e386554f9740db63466b1cf013a1a
[ "Apache-2.0" ]
835
2017-02-08T20:14:24.000Z
2020-03-12T17:37:49.000Z
client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetJobResponse.py
CaptEmulation/modeldb
78b10aca553e386554f9740db63466b1cf013a1a
[ "Apache-2.0" ]
651
2019-04-18T12:55:07.000Z
2022-03-31T23:45:09.000Z
client/verta/verta/_swagger/_public/modeldb/model/ModeldbGetJobResponse.py
CaptEmulation/modeldb
78b10aca553e386554f9740db63466b1cf013a1a
[ "Apache-2.0" ]
170
2017-02-13T14:49:22.000Z
2020-02-19T17:59:12.000Z
# THIS FILE IS AUTO-GENERATED. DO NOT EDIT from verta._swagger.base_type import BaseType class ModeldbGetJobResponse(BaseType): def __init__(self, job=None): required = { "job": False, } self.job = job for k, v in required.items(): if self[k] is None and v: raise ValueError('attr...
22.64
62
0.651943
2155517a5c3a0dd1421627b26564a381ceabd967
80
py
Python
backend/smiegel/models/__init__.py
erik/smiegel
34e9d132e241f2db4e96e84295588cd11d7c0164
[ "MIT" ]
null
null
null
backend/smiegel/models/__init__.py
erik/smiegel
34e9d132e241f2db4e96e84295588cd11d7c0164
[ "MIT" ]
null
null
null
backend/smiegel/models/__init__.py
erik/smiegel
34e9d132e241f2db4e96e84295588cd11d7c0164
[ "MIT" ]
null
null
null
from smiegel.models.user import User from smiegel.models.message import Message
26.666667
42
0.85
21556f28ae46bc6ed4acb9a7a51de80fa0ee531c
747
py
Python
robinmax_utils.py
sartorg/robinmax
0745a09bcfa6f527817602433755afe6dea33f02
[ "BSD-3-Clause" ]
1
2021-04-30T19:31:52.000Z
2021-04-30T19:31:52.000Z
robinmax_utils.py
sartorg/robinmax
0745a09bcfa6f527817602433755afe6dea33f02
[ "BSD-3-Clause" ]
null
null
null
robinmax_utils.py
sartorg/robinmax
0745a09bcfa6f527817602433755afe6dea33f02
[ "BSD-3-Clause" ]
null
null
null
""" Utility function This module contains some helpful functions. """ def least_significant_digit(number): """Find out how many digits of precision a number has. Parameters ---------- number: float The number. """ number_string = str(number) if ('.' in number_string): pri...
26.678571
59
0.605087
21559642ef8e72d191a089c46f5cdd607474d117
399
py
Python
hooks/charmhelpers/core/kernel_factory/ubuntu.py
projectcalico/charm-neutron-api
ddaf4f2f2f0484d929a5e3a2615ac823249dcf93
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
hooks/charmhelpers/core/kernel_factory/ubuntu.py
projectcalico/charm-neutron-api
ddaf4f2f2f0484d929a5e3a2615ac823249dcf93
[ "ECL-2.0", "Apache-2.0" ]
1
2022-03-16T16:44:58.000Z
2022-03-16T16:44:58.000Z
hooks/charmhelpers/core/kernel_factory/ubuntu.py
isabella232/charm-neutron-api
ddaf4f2f2f0484d929a5e3a2615ac823249dcf93
[ "ECL-2.0", "Apache-2.0" ]
2
2017-11-02T13:20:15.000Z
2022-03-16T16:08:38.000Z
import subprocess def persistent_modprobe(module): """Load a kernel module and configure for auto-load on reboot.""" with open('/etc/modules', 'r+') as modules: if module not in modules.read(): modules.write(module) def update_initramfs(version='all'): """Updates an initramfs image."...
28.5
75
0.661654
2155bada7eea2a092269d59a6b588245a74b4ffb
263
py
Python
services/user_app/cli_controller.py
Forcepoint/fp-bd-okta-fba
7c9ee682cdc9d227296df0dee54846e533aa2600
[ "Apache-2.0" ]
null
null
null
services/user_app/cli_controller.py
Forcepoint/fp-bd-okta-fba
7c9ee682cdc9d227296df0dee54846e533aa2600
[ "Apache-2.0" ]
null
null
null
services/user_app/cli_controller.py
Forcepoint/fp-bd-okta-fba
7c9ee682cdc9d227296df0dee54846e533aa2600
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3 # # Author: Dlo Bagari # created Date: 12-10-2019 from cli_user.cliargs import CliArgs if __name__ == "__main__": cli_args = CliArgs("userapp.sh") parser = cli_args.get_parser() args = parser.parse_args() args.function(args)
20.230769
36
0.688213
2155df3320126f61c2f3e27778e67e3f514d2ed9
872
py
Python
07-Extreme-Technique/State.py
NguyenQuangBinh803/Python-Heritage
7da72b2926cefc4903086a1cab7de3a64764d648
[ "MIT" ]
1
2021-01-10T12:06:26.000Z
2021-01-10T12:06:26.000Z
07-Extreme-Technique/State.py
NguyenQuangBinh803/Python-Heritage
7da72b2926cefc4903086a1cab7de3a64764d648
[ "MIT" ]
null
null
null
07-Extreme-Technique/State.py
NguyenQuangBinh803/Python-Heritage
7da72b2926cefc4903086a1cab7de3a64764d648
[ "MIT" ]
null
null
null
from BindingObject import BindingObject class State: def __init__(self, state_name, state_condition): self.state_condition = state_condition self.state_name = state_name def print(self): if self.state_condition.get(): print("The condition is passed") if __name__ == "__mai...
28.129032
94
0.728211
2155e35e40f04fc402ad12142d148b1d72e1f954
11,772
py
Python
Tools/Scripts/webkitpy/tool/servers/rebaselineserver.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
6
2021-07-05T16:09:39.000Z
2022-03-06T22:44:42.000Z
Tools/Scripts/webkitpy/tool/servers/rebaselineserver.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
7
2022-03-15T13:25:39.000Z
2022-03-15T13:25:44.000Z
Tools/Scripts/webkitpy/tool/servers/rebaselineserver.py
jacadcaps/webkitty
9aebd2081349f9a7b5d168673c6f676a1450a66d
[ "BSD-2-Clause" ]
null
null
null
# Copyright (c) 2010 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
40.040816
116
0.683996
2155f4999182b34c79e699fdcb4fc24126c65aa5
1,739
py
Python
estimationpy/modelica/FmuExamples/Resources/Python-Scripts/getCSVdata.py
alexlib/EstimationPy
de0db040661ae6a8ae68c9571a71bbb16127fe60
[ "BSD-3-Clause-LBNL" ]
27
2016-01-25T17:11:15.000Z
2021-05-14T21:05:18.000Z
estimationpy/modelica/FmuExamples/Resources/Python-Scripts/getCSVdata.py
alexlib/EstimationPy
de0db040661ae6a8ae68c9571a71bbb16127fe60
[ "BSD-3-Clause-LBNL" ]
10
2018-08-28T05:40:05.000Z
2020-06-01T19:04:05.000Z
estimationpy/modelica/FmuExamples/Resources/Python-Scripts/getCSVdata.py
alexlib/EstimationPy
de0db040661ae6a8ae68c9571a71bbb16127fe60
[ "BSD-3-Clause-LBNL" ]
12
2016-05-25T09:50:57.000Z
2021-11-09T16:38:00.000Z
import csv import numpy as np def getCSVdata(inputFileName, outputFileName, samplingTime = 0.0): # open the csv file and instantiate the csv reader file_in = open(inputFileName) csv_reader = csv.reader(file_in) print "Open file: "+str(inputFileName) # open the csv output file and delete it if already existin...
26.348485
72
0.67165
215615a55a46e53c880939d9e05faa78a8938ef1
7,164
py
Python
mi/dataset/parser/test/test_sio_eng_sio.py
rmanoni/mi-dataset
c1012a0cd8f2ea075e008cdd1ab291ed54f44d43
[ "BSD-2-Clause" ]
1
2015-05-10T01:08:44.000Z
2015-05-10T01:08:44.000Z
mi/dataset/parser/test/test_sio_eng_sio.py
rmanoni/mi-dataset
c1012a0cd8f2ea075e008cdd1ab291ed54f44d43
[ "BSD-2-Clause" ]
null
null
null
mi/dataset/parser/test/test_sio_eng_sio.py
rmanoni/mi-dataset
c1012a0cd8f2ea075e008cdd1ab291ed54f44d43
[ "BSD-2-Clause" ]
9
2015-04-15T21:09:08.000Z
2019-11-15T03:18:53.000Z
#!/usr/bin/env python """ @package mi.dataset.parser.test.test_sio_eng_sio_mule @file marine-integrations/mi/dataset/parser/test/test_sio_eng_sio_mule.py @author Mike Nicoletti @brief Test code for a sio_eng_sio_mule data parser """ from nose.plugins.attrib import attr import os from mi.core.exceptions import Sample...
39.8
112
0.679648
215627ee9c2c3282ab05b4c468b75ba07ee1fecd
438
py
Python
scripts/__main__.py
RenoirTan/liver
18da7b00ef3e6a92eff9df9d1a71ab456b4292d3
[ "MIT" ]
2
2021-07-22T15:37:07.000Z
2022-03-09T13:37:31.000Z
scripts/__main__.py
RenoirTan/liver
18da7b00ef3e6a92eff9df9d1a71ab456b4292d3
[ "MIT" ]
1
2021-06-20T08:04:45.000Z
2021-06-20T08:04:45.000Z
scripts/__main__.py
RenoirTan/liver
18da7b00ef3e6a92eff9df9d1a71ab456b4292d3
[ "MIT" ]
null
null
null
import sys from typing import * from . import script COMMANDS: Dict[str, Callable] = { "resolve": script.show_resolved_colors, "generate": script.generate, "register": script.register, "remove": script.remove } def main(args: List[str]) -> int: if len(args) < 2: print("No arguments") ...
18.25
43
0.625571
215638c7b010507d1989de380972c03b9dae4273
7,036
py
Python
src/btk_pipeline/lib/functions.py
blobtoolkit/blobtools-add
88717a92b81170b6244b5693eca03689464d2cea
[ "MIT" ]
4
2021-06-30T08:25:17.000Z
2022-03-11T22:56:49.000Z
src/btk_pipeline/lib/functions.py
blobtoolkit/blobtools-add
88717a92b81170b6244b5693eca03689464d2cea
[ "MIT" ]
13
2021-05-20T13:31:56.000Z
2022-01-26T09:20:29.000Z
src/btk_pipeline/lib/functions.py
blobtoolkit/blobtools-add
88717a92b81170b6244b5693eca03689464d2cea
[ "MIT" ]
null
null
null
import pathlib def reads_by_prefix(config): """Return read meta by prefix""" reads = {} if "reads" not in config: return {} for strategy in ("paired", "single"): if not strategy in config["reads"] or not config["reads"][strategy]: continue for entry in config["read...
29.687764
78
0.567936
215647d3b89d9806fe23e8d34758726ebce68f4a
6,879
py
Python
SCRAPE/Lib/site-packages/twisted/words/protocols/jabber/jid.py
Chinmoy-Prasad-Dutta/scrapy_scraper
09f6abfc3bcf10ee28f486d83b450c89a07e066e
[ "MIT" ]
4,612
2015-01-01T12:57:23.000Z
2022-03-30T01:08:23.000Z
SCRAPE/Lib/site-packages/twisted/words/protocols/jabber/jid.py
Chinmoy-Prasad-Dutta/scrapy_scraper
09f6abfc3bcf10ee28f486d83b450c89a07e066e
[ "MIT" ]
1,243
2015-01-23T17:23:59.000Z
2022-03-28T13:46:17.000Z
SCRAPE/Lib/site-packages/twisted/words/protocols/jabber/jid.py
Chinmoy-Prasad-Dutta/scrapy_scraper
09f6abfc3bcf10ee28f486d83b450c89a07e066e
[ "MIT" ]
1,236
2015-01-13T14:41:26.000Z
2022-03-17T07:12:36.000Z
# -*- test-case-name: twisted.words.test.test_jabberjid -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Jabber Identifier support. This module provides an object to represent Jabber Identifiers (JIDs) and parse string representations into them with proper checking for illegal charact...
26.976471
84
0.576973
215673499ee788a313cd201243fd8a3a636eb195
5,911
py
Python
openstack/tests/functional/base.py
infonova/openstacksdk
3cf6730a71d8fb448f24af8a5b4e82f2af749cea
[ "Apache-2.0" ]
null
null
null
openstack/tests/functional/base.py
infonova/openstacksdk
3cf6730a71d8fb448f24af8a5b4e82f2af749cea
[ "Apache-2.0" ]
null
null
null
openstack/tests/functional/base.py
infonova/openstacksdk
3cf6730a71d8fb448f24af8a5b4e82f2af749cea
[ "Apache-2.0" ]
null
null
null
# 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 # distributed under t...
37.176101
79
0.650651
2156912225a4aaa2f39dfc4d7d305805dbefbdfa
1,074
py
Python
server/app/controllers/station.py
gut-space/satnogs
a8bf92c2d0700a951aa959045c30692bd9f431af
[ "MIT" ]
5
2020-01-24T18:18:28.000Z
2021-09-05T04:16:20.000Z
server/app/controllers/station.py
gut-space/satnogs
a8bf92c2d0700a951aa959045c30692bd9f431af
[ "MIT" ]
64
2020-01-24T19:39:25.000Z
2021-07-16T11:01:13.000Z
server/app/controllers/station.py
gut-space/satnogs
a8bf92c2d0700a951aa959045c30692bd9f431af
[ "MIT" ]
2
2020-04-15T19:33:52.000Z
2021-01-30T15:27:28.000Z
from app.repository import Repository from flask import render_template, abort from app import app, utils @app.route('/station/<station_id>') def station(station_id = None): repository = Repository() station = repository.read_station(station_id) if station is None: abort(404, "Station not found") ...
30.685714
74
0.635009
21569e388c7dcf43c2d64762a51c4a82165bcea4
990
py
Python
cms_articles/migrations/0011_attribute_site.py
misli/django-cms-articles
4241be63053bc52e9a578725b2258c46a579fb26
[ "BSD-3-Clause" ]
9
2016-04-18T15:59:50.000Z
2019-09-12T07:11:15.000Z
cms_articles/migrations/0011_attribute_site.py
misli/django-cms-articles
4241be63053bc52e9a578725b2258c46a579fb26
[ "BSD-3-Clause" ]
6
2019-01-22T17:53:48.000Z
2020-07-19T17:35:31.000Z
cms_articles/migrations/0011_attribute_site.py
misli/django-cms-articles
4241be63053bc52e9a578725b2258c46a579fb26
[ "BSD-3-Clause" ]
4
2017-02-10T17:19:30.000Z
2020-02-02T16:58:20.000Z
# Generated by Django 2.2.11 on 2020-04-16 20:39 from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('sites', '0002_alter_domain_unique'), ('cms_articles', '0010_remove_article_revisio...
31.935484
182
0.635354
2156a46abb00ae071d32962ecc8069123005c1b9
7,015
py
Python
pybaselines/utils.py
abdelq/pybaselines
043aa7875efe1ca01c3e8e9ae7c57a67274aff06
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
null
null
null
pybaselines/utils.py
abdelq/pybaselines
043aa7875efe1ca01c3e8e9ae7c57a67274aff06
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
null
null
null
pybaselines/utils.py
abdelq/pybaselines
043aa7875efe1ca01c3e8e9ae7c57a67274aff06
[ "BSD-3-Clause-Clear", "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """Helper functions for pybaselines. Created on March 5, 2021 @author: Donald Erb """ import numpy as np # the minimum positive float values such that a + _MIN_FLOAT != a _MIN_FLOAT = np.finfo(float).eps def relative_difference(old, new, norm_order=None): """ Calculates the relati...
30.237069
92
0.64077
2156a4d757992a68ae0e4de69be11fa24593edf7
1,219
py
Python
src/confp/backends/etcd.py
fipwmaqzufheoxq92ebc/confp
e5f56a4d432e3cdf15c21a572014c40dba09b8fe
[ "MIT" ]
12
2018-02-01T08:45:40.000Z
2022-03-14T15:41:13.000Z
src/confp/backends/etcd.py
fipwmaqzufheoxq92ebc/confp
e5f56a4d432e3cdf15c21a572014c40dba09b8fe
[ "MIT" ]
5
2018-03-28T10:33:03.000Z
2021-04-08T20:14:41.000Z
src/confp/backends/etcd.py
fipwmaqzufheoxq92ebc/confp
e5f56a4d432e3cdf15c21a572014c40dba09b8fe
[ "MIT" ]
4
2018-10-16T07:58:37.000Z
2022-03-14T15:41:16.000Z
from __future__ import absolute_import import logging from . import BackendBase from ..config import BASE_MODULE_SCHEMA from ..exceptions import KeyNotFoundException LOG = logging.getLogger(__name__) REQUIREMENTS = ("python-etcd",) CONFIG_SCHEMA = BASE_MODULE_SCHEMA.copy() CONFIG_SCHEMA.update( { "hos...
25.93617
96
0.621001
2156b37bbd3d4a82c0193c3294811a73cd60e807
1,225
py
Python
arthash/arthashd/request_handler.py
arthash/arthash
8d59700308cedf3b62118ed021064b677408edeb
[ "Artistic-2.0" ]
2
2016-05-26T19:57:40.000Z
2018-09-18T04:10:08.000Z
arthash/arthashd/request_handler.py
arthash/arthash
8d59700308cedf3b62118ed021064b677408edeb
[ "Artistic-2.0" ]
12
2018-06-23T12:07:42.000Z
2018-07-21T14:44:42.000Z
arthash/arthashd/request_handler.py
arthash/arthash
8d59700308cedf3b62118ed021064b677408edeb
[ "Artistic-2.0" ]
1
2016-05-26T21:08:08.000Z
2016-05-26T21:08:08.000Z
import collections, datetime, os from . import server from .. journals import keeper from .. util import check, hasher class RequestHandler: def __init__(self, url_prefixes, root, organization=None): self.keeper = keeper.Keeper(root, organization) self.url_prefixes = url_prefixes def receive(...
28.488372
65
0.611429
2156e67c7314478cfd0c2b6f189ecb0a41deed66
675
py
Python
syntax/map.py
shawlu95/Algorithm-Toolbox
b6c7b2228d8e70e0842e0bad607533a2c8322cf0
[ "MIT" ]
null
null
null
syntax/map.py
shawlu95/Algorithm-Toolbox
b6c7b2228d8e70e0842e0bad607533a2c8322cf0
[ "MIT" ]
null
null
null
syntax/map.py
shawlu95/Algorithm-Toolbox
b6c7b2228d8e70e0842e0bad607533a2c8322cf0
[ "MIT" ]
2
2020-02-07T20:49:02.000Z
2020-02-11T06:01:55.000Z
def calculateSquare(n): return n * n numbers = (1, 2, 3, 4) result = map(calculateSquare, numbers) print(result) # converting map object to set numbersSquare = set(result) print(numbersSquare) numbers = (1, 2, 3, 4) result = map(lambda x: x * x, numbers) print(result) # converting map object to set numbersSqu...
17.307692
46
0.662222
21570c64b64bc9a7a403e8f442f9d015769fbe4f
63
py
Python
run.py
surbina/devocion-ar-server
50ea6aeb1636f4ccf068b9dbf0a3a6a4bf8b5719
[ "MIT" ]
null
null
null
run.py
surbina/devocion-ar-server
50ea6aeb1636f4ccf068b9dbf0a3a6a4bf8b5719
[ "MIT" ]
null
null
null
run.py
surbina/devocion-ar-server
50ea6aeb1636f4ccf068b9dbf0a3a6a4bf8b5719
[ "MIT" ]
null
null
null
from server.app.App import APP APP.run(port=5000, debug=True)
15.75
30
0.761905
215711e982628e3030a2aa256f9a817abd0a3ddd
294
py
Python
desafios/Mundo 1/Ex003.py
duartecgustavo/Python---Estudos-
13a47f115dd24ef475addaed7b0c860a7b3817ca
[ "MIT" ]
6
2021-01-20T20:43:39.000Z
2021-08-13T15:44:10.000Z
desafios/Mundo 1/Ex003.py
duartecgustavo/PythonProgress
13a47f115dd24ef475addaed7b0c860a7b3817ca
[ "MIT" ]
null
null
null
desafios/Mundo 1/Ex003.py
duartecgustavo/PythonProgress
13a47f115dd24ef475addaed7b0c860a7b3817ca
[ "MIT" ]
1
2020-09-06T03:34:19.000Z
2020-09-06T03:34:19.000Z
# Desafio 3 - Aula 6 : Soma de dois numeros. numero1 = int(input('Diga um numero: ')) numero2 = int(input('Agora diga outro numero: ')) soma = (numero1+numero2) print('Os valores \033[33m{}\033[m e \033[33m{}\033[m \033[31msomados\033[m são iguais á: \033[34m{}'.format(numero1,numero2,soma))
42
131
0.687075
215715c9b16a1d7fe9f2ff6e9ed9e33a743dca40
718
py
Python
tests/sample_django_app/models.py
PyUnchained/kdr_server
7485d6a549b0458438c5c9aa882de87084c43c76
[ "MIT" ]
null
null
null
tests/sample_django_app/models.py
PyUnchained/kdr_server
7485d6a549b0458438c5c9aa882de87084c43c76
[ "MIT" ]
null
null
null
tests/sample_django_app/models.py
PyUnchained/kdr_server
7485d6a549b0458438c5c9aa882de87084c43c76
[ "MIT" ]
null
null
null
from django.db import models class TestModel(models.Model): char_field = models.CharField(max_length=120) integer_field = models.InterField() float_field = models.FloatField() boolean_field = models.BooleanField(default=False) date_time_field = models.DateTimeField(auto_now_add=True) date_field...
39.888889
82
0.766017
21573bf4bb5fd03dfd93d2db3190f28300923d7c
5,222
py
Python
lyaf_optdepth/make_cat.py
VikrantKamble/lyaf_optdepth
899048ab73e546513b3713b3818abfab3ce3ab05
[ "MIT" ]
null
null
null
lyaf_optdepth/make_cat.py
VikrantKamble/lyaf_optdepth
899048ab73e546513b3713b3818abfab3ce3ab05
[ "MIT" ]
null
null
null
lyaf_optdepth/make_cat.py
VikrantKamble/lyaf_optdepth
899048ab73e546513b3713b3818abfab3ce3ab05
[ "MIT" ]
null
null
null
""" PYTHON SCRIPT TO CREATE A CUSTOM QUASAR CATALOG FROM DR12Q """ from collections import OrderedDict from PyAstronomy import pyasl import numpy as np import fitsio import timeit import os from lyaf_optdepth import config def main(): # 1. Reading the Paris DR12Q catalog data = fitsio.read(config.drqcat, e...
36.774648
92
0.574301
215742bfd2e270dc848ac66555f45339be89c8a9
25
py
Python
btd6_memory_info/generated/System/Diagnostics/Tracing/EventProvider/event_provider.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
btd6_memory_info/generated/System/Diagnostics/Tracing/EventProvider/event_provider.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
btd6_memory_info/generated/System/Diagnostics/Tracing/EventProvider/event_provider.py
56kyle/bloons_auto
419d55b51d1cddc49099593970adf1c67985b389
[ "MIT" ]
null
null
null
class EventProvider: pass
25
25
0.88
2157664c87824f474b9146223d6b63c2ab890ee2
10,981
py
Python
IIIT_H/models/research/deeplab/datasets/cityscapes_india/cityscapesscripts/helpers/labels_diff_class.py
pradeeprathore04/Niti_Ayog_movehack_2018
36c56f06b03a0488c1dbf62fdf3f1b335d81997b
[ "MIT" ]
null
null
null
IIIT_H/models/research/deeplab/datasets/cityscapes_india/cityscapesscripts/helpers/labels_diff_class.py
pradeeprathore04/Niti_Ayog_movehack_2018
36c56f06b03a0488c1dbf62fdf3f1b335d81997b
[ "MIT" ]
null
null
null
IIIT_H/models/research/deeplab/datasets/cityscapes_india/cityscapesscripts/helpers/labels_diff_class.py
pradeeprathore04/Niti_Ayog_movehack_2018
36c56f06b03a0488c1dbf62fdf3f1b335d81997b
[ "MIT" ]
1
2018-10-11T05:58:15.000Z
2018-10-11T05:58:15.000Z
#!/usr/bin/python # # Cityscapes labels # from collections import namedtuple #-------------------------------------------------------------------------------- # Definitions #-------------------------------------------------------------------------------- # a label and all meta information Label = namedtuple( 'Label...
59.037634
199
0.426282
21577364a5cc5bbb68e47302920884e19234a889
11,341
py
Python
ros_workspace/src/testBot/scripts/testBot_generate_global_stats.py
pepojs/Swarm_robots
c651c32b3aae5b3774c9fc21db3c8982afcff213
[ "MIT" ]
null
null
null
ros_workspace/src/testBot/scripts/testBot_generate_global_stats.py
pepojs/Swarm_robots
c651c32b3aae5b3774c9fc21db3c8982afcff213
[ "MIT" ]
null
null
null
ros_workspace/src/testBot/scripts/testBot_generate_global_stats.py
pepojs/Swarm_robots
c651c32b3aae5b3774c9fc21db3c8982afcff213
[ "MIT" ]
null
null
null
#!/usr/bin/python3 import sys import enum import math import time import json import csv import os import matplotlib.pyplot as plt import numpy as np import pickle class Display: def __init__(self, mode, file_dict): self.data = dict() self.mode = mode self.data_file_name = file_dict ...
36.821429
169
0.510713
2157993b9f674b1eab1dbb8fe0e691e05d77f9dd
5,238
py
Python
api_schema/test_api_schema.py
mmxmb/course-sched
2de97797456f040280a9060fb71215e4f5cba1b0
[ "MIT" ]
null
null
null
api_schema/test_api_schema.py
mmxmb/course-sched
2de97797456f040280a9060fb71215e4f5cba1b0
[ "MIT" ]
null
null
null
api_schema/test_api_schema.py
mmxmb/course-sched
2de97797456f040280a9060fb71215e4f5cba1b0
[ "MIT" ]
null
null
null
import unittest import os import json from schema import SchemaError from api_schema import request_schema, response_schema class TestApiRequestSchema(unittest.TestCase): def setUp(self): with open(os.path.join(os.getcwd(), 'examples', 'example_sched_request.json')) as f: self.payload = json...
40.604651
96
0.697022
2157a51d8ff9abf9a0021589873c7243d2d4059a
5,518
py
Python
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/accounts/migrations/0001_initial.py
camlog/django-naqsh
1e55fae417b877b9017acf54d534c8c8e9c3d9cb
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/accounts/migrations/0001_initial.py
camlog/django-naqsh
1e55fae417b877b9017acf54d534c8c8e9c3d9cb
[ "BSD-3-Clause" ]
null
null
null
{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/accounts/migrations/0001_initial.py
camlog/django-naqsh
1e55fae417b877b9017acf54d534c8c8e9c3d9cb
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 2.2.4 on 2019-08-24 10:29 from django.conf import settings import django.contrib.postgres.fields.jsonb from django.db import migrations, models import django.db.models.deletion import django.utils.timezone import {{cookiecutter.project_slug}}.accounts.models import uuid class Migration(migratio...
65.690476
266
0.643349
2157d2927190beb7161689a2131990edbcfa3a83
1,096
py
Python
2018/03/advent.py
jscpeterson/advent-of-code-2020
69dce1b8ac752a63c4b064e46f0f7218a96bceb8
[ "Apache-2.0" ]
null
null
null
2018/03/advent.py
jscpeterson/advent-of-code-2020
69dce1b8ac752a63c4b064e46f0f7218a96bceb8
[ "Apache-2.0" ]
null
null
null
2018/03/advent.py
jscpeterson/advent-of-code-2020
69dce1b8ac752a63c4b064e46f0f7218a96bceb8
[ "Apache-2.0" ]
null
null
null
import re class Claim: """A single elf claim""" claimId = 0 claimLeft = 0 claimTop = 0 claimWidth = 0 claimHeight = 0 adjustedWidth = 0 adjustedHeight = 0 def __init__(self, claim): self.claimId = int(re.findall(r'(?<=#)\d+', claim)[0]) self.claimLeft = int(re....
26.095238
118
0.555657
2157d296f3927000fba39f1728b5493bea86574e
5,026
py
Python
pytorch/train.py
muween/BraTs
ca06d02810f01d35db518b5a6c73fc0beaf434b7
[ "MIT" ]
124
2020-05-05T22:54:15.000Z
2022-03-27T22:25:42.000Z
pytorch/train.py
slowy07/brain-tumor-detection
2fa429ef73dbf45af41fde8125add715d5c8a9e3
[ "MIT" ]
4
2020-05-09T19:13:17.000Z
2021-07-29T03:23:56.000Z
pytorch/train.py
cv-lee/BraTs
f68fadc8657552f26e2dc8cdb7f7f8a18a4aad09
[ "MIT" ]
35
2020-05-03T16:57:13.000Z
2022-03-24T06:43:04.000Z
import argparse import logging import pdb import torch import torch.backends.cudnn as cudnn from config import * from dataset import * from models import * from utils import * def train(args): # Variables and logger Init device = config.device cudnn.benchmark = True get_logger() # Data Load ...
40.861789
87
0.571628
21582bede611288ca949c705a95dd33fccf22551
309
py
Python
bridger/tags/viewsets.py
intellineers/django-bridger
ed097984a99df7da40a4d01bd00c56e3c6083056
[ "BSD-3-Clause" ]
2
2020-03-17T00:53:23.000Z
2020-07-16T07:00:33.000Z
bridger/tags/viewsets.py
intellineers/django-bridger
ed097984a99df7da40a4d01bd00c56e3c6083056
[ "BSD-3-Clause" ]
76
2019-12-05T01:15:57.000Z
2021-09-07T16:47:27.000Z
bridger/tags/viewsets.py
intellineers/django-bridger
ed097984a99df7da40a4d01bd00c56e3c6083056
[ "BSD-3-Clause" ]
1
2020-02-05T15:09:47.000Z
2020-02-05T15:09:47.000Z
from bridger.viewsets import RepresentationViewSet from .models import Tag from .serializers import TagRepresentationSerializer class TagRepresentationViewSet(RepresentationViewSet): queryset = Tag.objects.all() serializer_class = TagRepresentationSerializer search_fields = ["title", "slug"]
25.75
54
0.805825
21586df317639c27945f4db4e3eb0b17a8a555d3
5,278
py
Python
pyjstack/dispatcher.py
sarathkumarsivan/pyjstack
3074287ac42ed38b8f62493cfceaf292d010100a
[ "MIT" ]
null
null
null
pyjstack/dispatcher.py
sarathkumarsivan/pyjstack
3074287ac42ed38b8f62493cfceaf292d010100a
[ "MIT" ]
null
null
null
pyjstack/dispatcher.py
sarathkumarsivan/pyjstack
3074287ac42ed38b8f62493cfceaf292d010100a
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright (c) 2019 Sarath Kumar Sivan, https://github.com/sarathkumarsivan 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, in...
38.246377
95
0.732853
21586fb7705d706c86761f55869eaa306af9c85e
1,773
py
Python
nlptools/utils/config.py
zhupengjia/nlptools
a0afc4873ee1b3adb383d38075ad5ae5e0293055
[ "MIT" ]
1
2020-10-26T02:32:25.000Z
2020-10-26T02:32:25.000Z
nlptools/utils/config.py
zhupengjia/nlptools
a0afc4873ee1b3adb383d38075ad5ae5e0293055
[ "MIT" ]
null
null
null
nlptools/utils/config.py
zhupengjia/nlptools
a0afc4873ee1b3adb383d38075ad5ae5e0293055
[ "MIT" ]
1
2020-10-26T02:34:05.000Z
2020-10-26T02:34:05.000Z
#!/usr/bin/env python import os,argparse,yaml ''' Author: Pengjia Zhu (zhupengjia@gmail.com) ''' #input can be dictionary or yaml filename class Config(dict): ''' Configuration file read from yaml, inherit from python dictionary Input: - cfginput: yaml filepath, python dictionary,...
23.959459
76
0.55612
215871964a3e461d3f8e3d6afcebd0e222ea14a1
3,144
py
Python
trading_calendars/exchange_calendar_cme.py
Xansfer/trading_calendars
b02997aeee09d6de925702cc54a101a6bd373d74
[ "Apache-2.0" ]
null
null
null
trading_calendars/exchange_calendar_cme.py
Xansfer/trading_calendars
b02997aeee09d6de925702cc54a101a6bd373d74
[ "Apache-2.0" ]
null
null
null
trading_calendars/exchange_calendar_cme.py
Xansfer/trading_calendars
b02997aeee09d6de925702cc54a101a6bd373d74
[ "Apache-2.0" ]
null
null
null
# # Copyright 2018 Quantopian, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wr...
27.823009
144
0.658715
2158902ceac67a7c22979adb2616b658135e6a41
5,106
py
Python
qnarre/prep/config/bert.py
quantapix/qnarre.com
f51d5945c20ef8182c4aa11f1b407d064c190c70
[ "MIT" ]
null
null
null
qnarre/prep/config/bert.py
quantapix/qnarre.com
f51d5945c20ef8182c4aa11f1b407d064c190c70
[ "MIT" ]
null
null
null
qnarre/prep/config/bert.py
quantapix/qnarre.com
f51d5945c20ef8182c4aa11f1b407d064c190c70
[ "MIT" ]
null
null
null
# Copyright 2022 Quantapix Authors. 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 required by applicable l...
28.366667
79
0.573051
2158a4a1eb33058b7380c680f9e3d506bf4e0f59
5,131
py
Python
migrations/versions/0265_add_confirm_edit_templates.py
cds-snc/notifier-api
90b385ec49efbaee7e607516fc7d9f08991af813
[ "MIT" ]
41
2019-11-28T16:58:41.000Z
2022-01-28T21:11:16.000Z
migrations/versions/0265_add_confirm_edit_templates.py
cds-snc/notification-api
b1c1064f291eb860b494c3fa65ac256ad70bf47c
[ "MIT" ]
1,083
2019-07-08T12:57:24.000Z
2022-03-08T18:53:40.000Z
migrations/versions/0265_add_confirm_edit_templates.py
cds-snc/notifier-api
90b385ec49efbaee7e607516fc7d9f08991af813
[ "MIT" ]
9
2020-01-24T19:56:43.000Z
2022-01-27T21:36:53.000Z
""" Revision ID: 0265_add_confirm_edit_templates Revises: 0264_add_folder_permissions_perm Create Date: 2019-02-26 15:16:53.268135 """ from datetime import datetime from alembic import op from flask import current_app revision = "0265_add_confirm_edit_templates" down_revision = "0264_add_folder_permissions_perm" e...
35.631944
176
0.620542
2158be68f7b27c2f4f7d77210b1301430ee9a847
11,928
py
Python
taf/testlib/Ixia/IxLoad.py
stepanandr/taf
75cb85861f8e9703bab7dc6195f3926b8394e3d0
[ "Apache-2.0" ]
10
2016-12-16T00:05:58.000Z
2018-10-30T17:48:25.000Z
taf/testlib/Ixia/IxLoad.py
stepanandr/taf
75cb85861f8e9703bab7dc6195f3926b8394e3d0
[ "Apache-2.0" ]
40
2017-01-04T23:07:05.000Z
2018-04-16T19:52:02.000Z
taf/testlib/Ixia/IxLoad.py
stepanandr/taf
75cb85861f8e9703bab7dc6195f3926b8394e3d0
[ "Apache-2.0" ]
23
2016-12-30T05:03:53.000Z
2020-04-01T08:40:24.000Z
# Copyright (c) 2011 - 2017, Intel Corporation. # # 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...
29.021898
123
0.570674
2158d0b95ddb4186f3acb64c5a6be7df4a8eb196
112
py
Python
src/djangoSrc/audio_transcription/apps.py
dighr/nethope_audio
8571bd6f621920f3fea085be3879cab15ccfc1e6
[ "MIT" ]
null
null
null
src/djangoSrc/audio_transcription/apps.py
dighr/nethope_audio
8571bd6f621920f3fea085be3879cab15ccfc1e6
[ "MIT" ]
9
2021-03-09T21:01:14.000Z
2022-03-02T06:01:00.000Z
src/djangoSrc/audio_transcription/apps.py
nethopeorg/nethope_audio
8571bd6f621920f3fea085be3879cab15ccfc1e6
[ "MIT" ]
null
null
null
from django.apps import AppConfig class AudioTranscriptionConfig(AppConfig): name = 'audio_transcription'
18.666667
42
0.803571
2158dea5a7e62c44104628ee11a08e7504487ee6
1,693
py
Python
pointcloud_utils/farthest_point_sampling.py
mintpancake/2d-collision-net
0ca4d36b2623c703d87d58ce2031a226a0b64df8
[ "MIT" ]
9
2020-09-15T06:36:50.000Z
2021-09-08T11:13:06.000Z
pointcloud_utils/farthest_point_sampling.py
mintpancake/2d-collision-net
0ca4d36b2623c703d87d58ce2031a226a0b64df8
[ "MIT" ]
null
null
null
pointcloud_utils/farthest_point_sampling.py
mintpancake/2d-collision-net
0ca4d36b2623c703d87d58ce2031a226a0b64df8
[ "MIT" ]
1
2021-09-02T22:46:46.000Z
2021-09-02T22:46:46.000Z
import torch import numpy as np def farthest_point_sample(xyz, npoint): """ Input: xyz: pointcloud data, [B, N, C] npoint: number of samples Return: centroids: sampled pointcloud data, [B, npoint, C] """ # print("xyz.shape: ", xyz.shape) squeezed = False if len(xyz.s...
30.232143
69
0.541051
21594aa9bc03ef39f47592ea4254c694573e9e30
714
py
Python
redhawk/scripts/init.py
spranesh/Redhawk
e2be5a6553df8449acecee2239b60c7bca0f22bc
[ "BSD-2-Clause-FreeBSD" ]
2
2016-10-04T11:46:32.000Z
2017-07-09T15:23:55.000Z
redhawk/scripts/init.py
spranesh/Redhawk
e2be5a6553df8449acecee2239b60c7bca0f22bc
[ "BSD-2-Clause-FreeBSD" ]
4
2016-03-07T13:16:48.000Z
2018-03-21T00:25:04.000Z
redhawk/scripts/init.py
spranesh/Redhawk
e2be5a6553df8449acecee2239b60c7bca0f22bc
[ "BSD-2-Clause-FreeBSD" ]
3
2016-04-06T08:04:34.000Z
2020-03-17T20:59:47.000Z
#!/usr/bin/env python from __future__ import absolute_import from . import script_util as S import redhawk.utils.key_value_store as KVStore import redhawk import os import optparse usage = "%prog init" description = S.MakeStringFromTemplate( """Create an empty LAST index in the CURRENT directory. The LAST index is s...
26.444444
74
0.757703
21596e6b732e8634975c4d0871f590c49a03bd5f
14,289
py
Python
tests/test_hist_tools.py
bfis/coffea
e5e67d410e86faee1172fcc864774d7024d97653
[ "BSD-3-Clause" ]
77
2019-06-09T14:23:33.000Z
2022-03-22T21:34:01.000Z
tests/test_hist_tools.py
bfis/coffea
e5e67d410e86faee1172fcc864774d7024d97653
[ "BSD-3-Clause" ]
353
2019-06-05T23:54:39.000Z
2022-03-31T21:21:47.000Z
tests/test_hist_tools.py
bfis/coffea
e5e67d410e86faee1172fcc864774d7024d97653
[ "BSD-3-Clause" ]
71
2019-06-07T02:04:11.000Z
2022-03-05T21:03:45.000Z
from __future__ import print_function, division from coffea import hist import numpy as np import awkward as ak from dummy_distributions import dummy_jagged_eta_pt import pytest import sys def test_hist(): counts, test_eta, test_pt = dummy_jagged_eta_pt() h_nothing = hist.Hist("empty inside") assert h_...
31.130719
88
0.556162
21596f1e57caf740c58a381794f47f5a25e8982a
1,408
py
Python
superset/migrations/versions/732f1c06bcbf_add_fetch_values_predicate.py
franksam007/incubator-superset
a0f572eb3ea4b89cb435a8af20436f8e1d34814e
[ "Apache-2.0" ]
108
2018-01-22T11:09:59.000Z
2021-01-15T10:53:04.000Z
superset/migrations/versions/732f1c06bcbf_add_fetch_values_predicate.py
franksam007/incubator-superset
a0f572eb3ea4b89cb435a8af20436f8e1d34814e
[ "Apache-2.0" ]
112
2018-01-25T22:57:21.000Z
2019-08-22T20:08:48.000Z
superset/migrations/versions/732f1c06bcbf_add_fetch_values_predicate.py
zhwXF/Superset
14c3488c79f8f3cdbd1123e8f7a92f8746c2db09
[ "Apache-2.0", "CC-BY-4.0", "MIT" ]
24
2018-01-19T22:54:39.000Z
2020-11-12T13:04:25.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
35.2
103
0.764205
2159ad17a8f4900c65b7c79923b77168a4178f15
2,509
py
Python
exchangelib/services/__init__.py
dmcgee/exchangelib
b2f7006835393132bdf2cfb416ba44f847c8bbf2
[ "BSD-2-Clause" ]
null
null
null
exchangelib/services/__init__.py
dmcgee/exchangelib
b2f7006835393132bdf2cfb416ba44f847c8bbf2
[ "BSD-2-Clause" ]
null
null
null
exchangelib/services/__init__.py
dmcgee/exchangelib
b2f7006835393132bdf2cfb416ba44f847c8bbf2
[ "BSD-2-Clause" ]
null
null
null
# coding=utf-8 """ Implement a selection of EWS services (operations). Exchange is very picky about things like the order of XML elements in SOAP requests, so we need to generate XML automatically instead of taking advantage of Python SOAP libraries and the WSDL file. Exchange EWS operations overview: https://doc...
29.517647
111
0.779992
2159c8b6e944c79f0b35525bcb143ad49a6c6ba4
5,393
py
Python
projects/DensePose/densepose/data/samplers/densepose_cse_base.py
TalhaUsuf/RetinaNet_W9_form
2a66bba1de96bebd679775b841d95ac7dcfcbbbe
[ "Apache-2.0" ]
null
null
null
projects/DensePose/densepose/data/samplers/densepose_cse_base.py
TalhaUsuf/RetinaNet_W9_form
2a66bba1de96bebd679775b841d95ac7dcfcbbbe
[ "Apache-2.0" ]
null
null
null
projects/DensePose/densepose/data/samplers/densepose_cse_base.py
TalhaUsuf/RetinaNet_W9_form
2a66bba1de96bebd679775b841d95ac7dcfcbbbe
[ "Apache-2.0" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. from typing import Any, Dict, List, Tuple import torch from torch.nn import functional as F from detectron.config import CfgNode from detectron.structures import Instances from densepose.converters.base import IntTupleBox from densepose.data.utils import get_class_t...
38.521429
96
0.648989
2159f2f7469e50eb9288aa44183cbbbc8cf2ab2d
7,944
py
Python
src/encoded/tests/test_upgrade_target.py
aperritano/encoded
c03f6799a2155377321877bf12c079c50b0e08ce
[ "MIT" ]
null
null
null
src/encoded/tests/test_upgrade_target.py
aperritano/encoded
c03f6799a2155377321877bf12c079c50b0e08ce
[ "MIT" ]
null
null
null
src/encoded/tests/test_upgrade_target.py
aperritano/encoded
c03f6799a2155377321877bf12c079c50b0e08ce
[ "MIT" ]
null
null
null
import pytest @pytest.fixture def target(organism): return{ 'organism': organism['uuid'], 'label': 'TEST' } @pytest.fixture def target_1(target): item = target.copy() item.update({ 'schema_version': '1', 'status': 'CURRENT', }) return item @pytest.fixture de...
27.487889
94
0.619084
2159f837b9760b3f438fffae131557dd4e1724b2
13,989
py
Python
lib/spack/spack/cmd/__init__.py
lguyot/spack
e910c227a7bac3adf2c18fc86cf994811b7d14f7
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2020-10-15T01:08:42.000Z
2021-10-18T01:28:18.000Z
lib/spack/spack/cmd/__init__.py
lguyot/spack
e910c227a7bac3adf2c18fc86cf994811b7d14f7
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
lib/spack/spack/cmd/__init__.py
lguyot/spack
e910c227a7bac3adf2c18fc86cf994811b7d14f7
[ "ECL-2.0", "Apache-2.0", "MIT" ]
null
null
null
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from __future__ import print_function import os import re import sys import argparse import six import llnl.util.tty as...
33.627404
84
0.614983
2159f91c5a75c9db3053d7293eb212c243e95646
21,241
py
Python
test/dom/test_range.py
jkloth/pyxml
de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d
[ "MIT" ]
2
2018-05-28T23:01:20.000Z
2018-05-29T03:59:38.000Z
test/dom/test_range.py
jkloth/pyxml
de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d
[ "MIT" ]
null
null
null
test/dom/test_range.py
jkloth/pyxml
de15b3ad0fe095f6ce36b1c5ad7438046aae8d3d
[ "MIT" ]
null
null
null
TEST_FILE = '../../demo/dom/addr_book1.xml' from xml.dom.ext.reader import PyExpat from xml.dom import Node from xml.dom import Range def ReadDoc(): #Read in a doc r = PyExpat.Reader() global doc global ADDRBOOK global ENTRIES global PA global PA_NAME global PA_ADDR global PA_WORK...
36.12415
130
0.729533
215a284bae6baf1a2e6862271cca0c4f4046c2f9
368
py
Python
evaluate.py
allenai/interactron
2be41b34adf6917348cb2440cded9975ec4f5d0d
[ "Apache-2.0" ]
4
2022-03-30T06:07:32.000Z
2022-03-31T02:05:18.000Z
evaluate.py
allenai/interactron
2be41b34adf6917348cb2440cded9975ec4f5d0d
[ "Apache-2.0" ]
null
null
null
evaluate.py
allenai/interactron
2be41b34adf6917348cb2440cded9975ec4f5d0d
[ "Apache-2.0" ]
2
2022-03-30T10:05:42.000Z
2022-03-31T02:05:23.000Z
from utils.config_utils import ( get_config, get_args, build_model, build_evaluator ) def evaluate(): args = get_args() cfg = get_config(args.config_file) model = build_model(cfg.MODEL) evaluator = build_evaluator(model, cfg, load_checkpoint=True) evaluator.evaluate(save_results=Tr...
19.368421
65
0.695652
215a3917fe3e71d68bc961271f550d6427542694
1,035
py
Python
python-src/graphoire/linalg/adjacency.py
ccorbell/graphoire
566b0a27a9d6b87c5952bcc6e257a6d90621ca06
[ "Apache-2.0" ]
null
null
null
python-src/graphoire/linalg/adjacency.py
ccorbell/graphoire
566b0a27a9d6b87c5952bcc6e257a6d90621ca06
[ "Apache-2.0" ]
null
null
null
python-src/graphoire/linalg/adjacency.py
ccorbell/graphoire
566b0a27a9d6b87c5952bcc6e257a6d90621ca06
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Fri May 28 09:27:11 2021 @author: mathaes """ import copy #import numpy as np from scipy.sparse import coo_matrix from scipy.sparse.linalg import eigsh from scipy.sparse import identity from graphoire.linalg.graph2matrix import graphToAdjacencyMatrix fr...
22.021277
64
0.590338
215a69aa4871511f412aa379e08fff358ff64c48
903
py
Python
event_handler.py
nickjhughes/polyominohs
836d0a5dd063cf7267775bfb82938ca8861fb369
[ "MIT" ]
null
null
null
event_handler.py
nickjhughes/polyominohs
836d0a5dd063cf7267775bfb82938ca8861fb369
[ "MIT" ]
null
null
null
event_handler.py
nickjhughes/polyominohs
836d0a5dd063cf7267775bfb82938ca8861fb369
[ "MIT" ]
null
null
null
""" event_handler.py: Contains the Event_Handler class. """ from pygame.constants import * import config class Event_Handler: """ A class for handling events, including keyboard input. """ def __init__(self, pygame): """ Initialise. __init__(pygame) -> void """ ...
24.405405
78
0.586932
215a6f42100cf106c6980c359613deaa77d0363b
3,487
py
Python
uf/application/__init__.py
geyingli/unif
a6c9c94f60a7b906d9bd410bb446c4e3f2540ffc
[ "Apache-2.0" ]
93
2020-10-08T10:20:22.000Z
2022-03-09T02:37:17.000Z
uf/application/__init__.py
geyingli/unif
a6c9c94f60a7b906d9bd410bb446c4e3f2540ffc
[ "Apache-2.0" ]
9
2020-10-20T03:16:10.000Z
2022-02-21T02:33:28.000Z
uf/application/__init__.py
geyingli/unif
a6c9c94f60a7b906d9bd410bb446c4e3f2540ffc
[ "Apache-2.0" ]
23
2020-10-13T01:10:16.000Z
2022-03-01T01:45:45.000Z
# coding:=utf-8 # Copyright 2021 Tencent. 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 required by applic...
28.120968
74
0.765128
215a7de46bfe469d8019933e4ee2d27c3a54fa80
595
py
Python
github/types/github_error.py
appheap/PyGithub
2442a2512a708c6463f81d8398fd91090e134df1
[ "MIT" ]
1
2022-03-16T21:33:37.000Z
2022-03-16T21:33:37.000Z
github/types/github_error.py
appheap/PyGithub
2442a2512a708c6463f81d8398fd91090e134df1
[ "MIT" ]
null
null
null
github/types/github_error.py
appheap/PyGithub
2442a2512a708c6463f81d8398fd91090e134df1
[ "MIT" ]
1
2022-03-16T21:28:06.000Z
2022-03-16T21:28:06.000Z
from dataclasses import dataclass from typing import Optional from .object import Object @dataclass class GithubError(Object): resource: str code: str field: str message: str @staticmethod def _parse(error_dict: dict) -> Optional['GithubError']: if error_dict is None or not len(error...
23.8
60
0.631933
215a89712af9a80ccf1d2bebd495a3685b2633bf
2,317
py
Python
nicos_mlz/kws1/setups/chopper.py
mlz-ictrl/nicos
a6de0bc194ba42e3dc04a033713b41b5499ba8e1
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
12
2019-11-06T15:40:36.000Z
2022-01-01T16:23:00.000Z
nicos_mlz/kws1/setups/chopper.py
ess-dmsc/nicos
755d61d403ff7123f804c45fc80c7ff4d762993b
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
91
2020-08-18T09:20:26.000Z
2022-02-01T11:07:14.000Z
nicos_mlz/kws1/setups/chopper.py
mlz-ictrl/nicos
a6de0bc194ba42e3dc04a033713b41b5499ba8e1
[ "CC-BY-3.0", "Apache-2.0", "CC-BY-4.0" ]
6
2020-01-11T10:52:30.000Z
2022-02-25T12:35:23.000Z
# -*- coding: utf-8 -*- description = 'setup for the choppers' group = 'lowlevel' display_order = 65 excludes = ['virtual_chopper'] tango_base = 'tango://phys.kws1.frm2:10000/kws1/' devices = dict( chopper = device('nicos_mlz.kws1.devices.chopper.Chopper', description = 'high-level chopper/TOF presets'...
29.705128
77
0.572292
215aaa8a293738eae362c6f11df035ae65086f42
6,674
py
Python
stellarlab/utils/asciitable.py
wangleon/stella
3942f8e687065bb96760140596747cbbe6dad04b
[ "Apache-2.0" ]
null
null
null
stellarlab/utils/asciitable.py
wangleon/stella
3942f8e687065bb96760140596747cbbe6dad04b
[ "Apache-2.0" ]
null
null
null
stellarlab/utils/asciitable.py
wangleon/stella
3942f8e687065bb96760140596747cbbe6dad04b
[ "Apache-2.0" ]
1
2021-10-02T02:18:28.000Z
2021-10-02T02:18:28.000Z
#!/usr/bin/env python import os import numpy as np def structitem_to_dict(item): result = {} for key in item.dtype.names: value = item[key].item() if isinstance(value, bytes): value = value.decode('ascii') result[key] = value return result def load_txt(filename): ''...
33.37
80
0.433323
215ac5a2ffb3f1127dfc0a03ee7aed89ea3199f6
4,160
py
Python
POSserver/server/models/user.py
wajnurfes/CS10-labor-pos
c473716a8574eefc577897ed58477d609d72522e
[ "MIT" ]
7
2018-09-13T17:03:21.000Z
2021-03-09T20:27:23.000Z
POSserver/server/models/user.py
wajnurfes/CS10-labor-pos
c473716a8574eefc577897ed58477d609d72522e
[ "MIT" ]
13
2018-09-20T00:41:25.000Z
2021-10-05T20:25:10.000Z
POSserver/server/models/user.py
BloomTech-Labs/CS10-labor-pos
f7365a08c13101d58839eea45cd54da06edc0908
[ "MIT" ]
9
2018-09-10T15:34:44.000Z
2020-11-03T04:33:13.000Z
from django.db import models from django.contrib.auth.models import AbstractUser from django.db.models.signals import post_save from django.conf import settings # from django.contrib.auth import get_user_model from django.dispatch import receiver from decouple import config import sendgrid from sendgrid.helpers.mail i...
36.814159
132
0.576683
215afaf1b7d71f5871889414bbbcf54da11a9ef5
13,748
py
Python
cloudmesh/provisioner/baremetal_db.py
JulienPalard/cloudmesh
1759b88daef3a13917492d028fdabe08f03ca996
[ "Apache-2.0" ]
null
null
null
cloudmesh/provisioner/baremetal_db.py
JulienPalard/cloudmesh
1759b88daef3a13917492d028fdabe08f03ca996
[ "Apache-2.0" ]
4
2021-06-08T20:20:08.000Z
2022-03-11T23:30:22.000Z
cloudmesh/provisioner/baremetal_db.py
JulienPalard/cloudmesh
1759b88daef3a13917492d028fdabe08f03ca996
[ "Apache-2.0" ]
null
null
null
from __future__ import print_function from cloudmesh_base.logger import LOGGER from cloudmesh.config.cm_config import get_mongo_db from datetime import datetime # # SETTING UP A LOGGER # log = LOGGER(__file__) class BaremetalDB: """ Manage the baremetal data in database. The data structure of top co...
35.524548
103
0.509019