hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
abf17cd4c4bea113a92e5f082165a9ff3892c00f
1,580
py
Python
py_tools/decorators.py
HAL-42/AlchemyCat
ca924755ff48e2ff74543bb0e446376eb2b1f150
[ "Apache-2.0" ]
8
2020-01-08T19:42:01.000Z
2021-12-28T08:30:56.000Z
py_tools/decorators.py
HAL-42/AlchemyCat
ca924755ff48e2ff74543bb0e446376eb2b1f150
[ "Apache-2.0" ]
2
2020-09-10T12:22:57.000Z
2022-02-17T05:21:22.000Z
py_tools/decorators.py
HAL-42/AlchemyCat
ca924755ff48e2ff74543bb0e446376eb2b1f150
[ "Apache-2.0" ]
1
2021-05-12T01:50:27.000Z
2021-05-12T01:50:27.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @Author : Xiaobo Yang @Contact : hal_42@zju.edu.cn @Time : 2021/11/8 21:16 @File : decorators.py @Software: PyCharm @Desc : """ __all__ = ['deprecated', 'func_runtime_timer'] def deprecated(func): """Show deprecation warning of a function.""" retu...
30.384615
92
0.501899
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @Author : Xiaobo Yang @Contact : hal_42@zju.edu.cn @Time : 2021/11/8 21:16 @File : decorators.py @Software: PyCharm @Desc : """ from warnings import warn from .timer import Timer from .color_print import * __all__ = ['deprecated', 'func_runtime_timer'] de...
69
0
0
0
0
1,096
0
12
117
265806e2d143392ab143781cc6ee9477e654eb6d
1,328
py
Python
utility_sqs_reader/receiver.py
Antrikshy/Assisted-Living
6f0c757de022c469ee9ab4a8cc8ea7fd7d2ed6b1
[ "MIT" ]
3
2018-03-15T08:09:15.000Z
2021-08-10T17:21:28.000Z
utility_sqs_reader/receiver.py
Antrikshy/Assisted-Living
6f0c757de022c469ee9ab4a8cc8ea7fd7d2ed6b1
[ "MIT" ]
null
null
null
utility_sqs_reader/receiver.py
Antrikshy/Assisted-Living
6f0c757de022c469ee9ab4a8cc8ea7fd7d2ed6b1
[ "MIT" ]
null
null
null
import json, os import boto3 from awake import wol battlestation_mac_address = os.environ['DESKTOP_MAC_ADDR'] sqs = boto3.client('sqs') utility_q_url = os.environ['UTILITY_Q_URL'] while True: response = sqs.receive_message( QueueUrl=utility_q_url, MaxNumberOfMessages=10, MessageAttribute...
34.051282
120
0.605422
import json, os import boto3 from awake import wol battlestation_mac_address = os.environ['DESKTOP_MAC_ADDR'] sqs = boto3.client('sqs') utility_q_url = os.environ['UTILITY_Q_URL'] while True: response = sqs.receive_message( QueueUrl=utility_q_url, MaxNumberOfMessages=10, MessageAttribute...
0
0
0
0
0
0
0
0
0
2da11889607a5d0774a1c832f1737a12b9752905
20,075
py
Python
src/ezdxf/proxygraphic.py
luoyu-123/ezdxf
40963a2010028f87846241e08434f43ab421f3fb
[ "MIT" ]
1
2021-06-05T09:15:15.000Z
2021-06-05T09:15:15.000Z
src/ezdxf/proxygraphic.py
luoyu-123/ezdxf
40963a2010028f87846241e08434f43ab421f3fb
[ "MIT" ]
null
null
null
src/ezdxf/proxygraphic.py
luoyu-123/ezdxf
40963a2010028f87846241e08434f43ab421f3fb
[ "MIT" ]
null
null
null
# Copyright (c) 2020, Manfred Moitzi # License: MIT License from typing import TYPE_CHECKING import logging if TYPE_CHECKING: logger = logging.getLogger('ezdxf') CHUNK_SIZE = 127
37.038745
94
0.601146
# Copyright (c) 2020, Manfred Moitzi # License: MIT License from typing import TYPE_CHECKING, Optional, Iterable, Tuple, List, Dict, cast import struct import math from enum import IntEnum from itertools import repeat from ezdxf.lldxf import const from ezdxf.tools.binarydata import bytes_to_hexstr, ByteStream, BitStrea...
0
0
0
18,500
0
824
0
249
316
ff90b178feae769cf57bc105900d9930b14a200a
5,062
py
Python
xView/Train.py
zippo92/yoloesa
9faccd1171667a3e7e458260aa6ac1cff86a23ff
[ "Apache-2.0" ]
null
null
null
xView/Train.py
zippo92/yoloesa
9faccd1171667a3e7e458260aa6ac1cff86a23ff
[ "Apache-2.0" ]
null
null
null
xView/Train.py
zippo92/yoloesa
9faccd1171667a3e7e458260aa6ac1cff86a23ff
[ "Apache-2.0" ]
null
null
null
from __future__ import absolute_import import tensorflow as tf if __name__ == '__main__': tf.app.run()
42.898305
147
0.638878
from __future__ import absolute_import import tensorflow as tf import matplotlib.pyplot as plt import os from dataset import Dataset from Yolo import Yolo import ConfigParser class Train(): def __init__(self): train_path = "./data/xview_train_t1.record" # val_path = "./data/eurosatTest.tfrecord"...
0
0
0
4,710
0
83
0
2
156
1c4c77be1fcbdb2dfb985b57137edbad1931a01b
6,693
py
Python
tensorflow/lite/micro/tools/project_generation/create_tflm_tree.py
AdaAlarm/tensorflow
e0db063159751276a92d88a4ad6d481b1199318c
[ "Apache-2.0" ]
10
2021-05-25T17:43:04.000Z
2022-03-08T10:46:09.000Z
tensorflow/lite/micro/tools/project_generation/create_tflm_tree.py
AdaAlarm/tensorflow
e0db063159751276a92d88a4ad6d481b1199318c
[ "Apache-2.0" ]
1,056
2019-12-15T01:20:31.000Z
2022-02-10T02:06:28.000Z
tensorflow/lite/micro/tools/project_generation/create_tflm_tree.py
AdaAlarm/tensorflow
e0db063159751276a92d88a4ad6d481b1199318c
[ "Apache-2.0" ]
6
2016-09-07T04:00:15.000Z
2022-01-12T01:47:38.000Z
# Copyright 2021 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...
39.839286
84
0.733453
# Copyright 2021 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...
0
0
0
0
0
3,589
0
-29
225
a520210f9814cf9399ab3eebd37a9b44c72db535
3,760
py
Python
sippyart/utilz.py
anandijain/audio
1990de57ebc760cf6c5cc7132119b389cfd2dbfb
[ "MIT" ]
1
2020-03-24T06:20:19.000Z
2020-03-24T06:20:19.000Z
sippyart/utilz.py
anandijain/audio
1990de57ebc760cf6c5cc7132119b389cfd2dbfb
[ "MIT" ]
null
null
null
sippyart/utilz.py
anandijain/audio
1990de57ebc760cf6c5cc7132119b389cfd2dbfb
[ "MIT" ]
1
2021-01-09T00:19:13.000Z
2021-01-09T00:19:13.000Z
import sippyart PROJ_DIR = sippyart.__path__[0] + "/" PARENT_DIR = PROJ_DIR + "../" # TODO sync_n sample rates
24.258065
80
0.58484
import os import glob import torch import numpy as np import torchaudio from torch.nn import functional as F import sippyart PROJ_DIR = sippyart.__path__[0] + "/" PARENT_DIR = PROJ_DIR + "../" # TODO sync_n sample rates def pct_crop(w: torch.tensor, start_pct: float, end_pct: float) -> torch.tensor: wave_len...
0
0
0
0
0
3,199
0
-23
455
17c4ce473b54a1ca1bc78a91f53b132f7ba9b69a
4,761
py
Python
gentea/python/config_files/fap_config.py
BrettPWRE/HDB
be7cd4f20064f3f0599810ebf4c6fe85e67ccfac
[ "Apache-2.0" ]
null
null
null
gentea/python/config_files/fap_config.py
BrettPWRE/HDB
be7cd4f20064f3f0599810ebf4c6fe85e67ccfac
[ "Apache-2.0" ]
null
null
null
gentea/python/config_files/fap_config.py
BrettPWRE/HDB
be7cd4f20064f3f0599810ebf4c6fe85e67ccfac
[ "Apache-2.0" ]
null
null
null
'''Configuration file for gentea.py with basemap FAP_teacup_base''' database = { 'user' : 'app_user', 'passwd' : 'ecohdb', 'host' : 'XXX.XXX.XX.200', 'port' : '1521', 'sid' : 'ecohdb' } input_image = (r'../work/FAP_teacup_base.png') # Both of these are optional. They default to size 11 'Arial.t...
26.597765
79
0.490863
'''Configuration file for gentea.py with basemap FAP_teacup_base''' database = { 'user' : 'app_user', 'passwd' : 'ecohdb', 'host' : 'XXX.XXX.XX.200', 'port' : '1521', 'sid' : 'ecohdb' } input_image = (r'../work/FAP_teacup_base.png') # Both of these are optional. They default to size 11 'Arial.t...
0
0
0
0
0
0
0
0
0
93ca9ac23865d92f4b6c981e13635088c1df2c9e
462
py
Python
Chapter_01/1_14_SortingWithoutNativeCompare.py
winterpadding/python_cookbook
b60fd50f02895ac8dd292581c4713d596ea06277
[ "Apache-2.0" ]
null
null
null
Chapter_01/1_14_SortingWithoutNativeCompare.py
winterpadding/python_cookbook
b60fd50f02895ac8dd292581c4713d596ea06277
[ "Apache-2.0" ]
null
null
null
Chapter_01/1_14_SortingWithoutNativeCompare.py
winterpadding/python_cookbook
b60fd50f02895ac8dd292581c4713d596ea06277
[ "Apache-2.0" ]
null
null
null
from operator import attrgetter if __name__ == '__main__': users = [User(23), User(3), User(99)] print(users) sorted_users_lambda = sorted(users, key=lambda u: u.user_id) print(sorted_users_lambda) sorted_users_attr = sorted(users, key=attrgetter('user_id')) print(sorted_users_attr)
22
64
0.67316
from operator import attrgetter class User: def __init__(self, user_id): self.user_id = user_id def __repr__(self): return 'User({})'.format(self.user_id) if __name__ == '__main__': users = [User(23), User(3), User(99)] print(users) sorted_users_lambda = sorted(users, key=lamb...
0
0
0
126
0
0
0
0
23
a3a7da4e7d8895083a6a7186378bcf984a75f4cb
985
py
Python
gridGenerator.py
traubad/RNNDBSCAN
055f8f92ab61ea17df4ae56bcd1cc51c8c7b82ad
[ "MIT" ]
1
2019-12-07T07:21:49.000Z
2019-12-07T07:21:49.000Z
gridGenerator.py
traubad/RNNDBSCAN
055f8f92ab61ea17df4ae56bcd1cc51c8c7b82ad
[ "MIT" ]
null
null
null
gridGenerator.py
traubad/RNNDBSCAN
055f8f92ab61ea17df4ae56bcd1cc51c8c7b82ad
[ "MIT" ]
null
null
null
#Used for generating grid dataset if __name__ == "__main__": main()
31.774194
266
0.663959
from random import randint import csv #Used for generating grid dataset def makeGrid(classifier, num_dimensions,num_observations,d,startX=0,startY=0): toAdd = [startX, startY, classifier] output = [tuple(toAdd)] for i in range((num_observations//2)-1): toAdd[randint(0,1)] += d + randint(0...
0
0
0
0
0
785
0
-6
121
68e0122f50834132af7d602cb7a809c49acd7ff2
1,166
py
Python
src/originexample/pipelines/import_technologies.py
project-origin/example-backend
13d9b528533dcaada8b0f0b93bbe2ef6a25c38ae
[ "MIT" ]
null
null
null
src/originexample/pipelines/import_technologies.py
project-origin/example-backend
13d9b528533dcaada8b0f0b93bbe2ef6a25c38ae
[ "MIT" ]
1
2021-02-10T02:22:51.000Z
2021-02-10T02:22:51.000Z
src/originexample/pipelines/import_technologies.py
project-origin/example-backend
13d9b528533dcaada8b0f0b93bbe2ef6a25c38ae
[ "MIT" ]
null
null
null
""" TODO write this """ from originexample.services.datahub import DataHubService service = DataHubService()
24.291667
68
0.729846
""" TODO write this """ from originexample import logger from originexample.db import atomic from originexample.tasks import celery_app from originexample.technology import Technology from originexample.services.datahub import DataHubService service = DataHubService() def start_import_technologies(): import_tec...
0
755
0
0
0
92
0
72
134
54a63c5bd57473c9654dfbc7f166b3764fe49015
725
py
Python
tests/scripts/select.py
ChrisAHolland/constexpr-sql
3ea390a3f8a5d0e1dcb9b5f187121d4649e5f9c3
[ "MIT" ]
121
2020-04-21T13:21:55.000Z
2021-11-15T09:48:47.000Z
tests/scripts/select.py
ChrisAHolland/constexpr-sql
3ea390a3f8a5d0e1dcb9b5f187121d4649e5f9c3
[ "MIT" ]
3
2020-04-23T05:29:54.000Z
2021-07-18T18:37:57.000Z
tests/scripts/select.py
ChrisAHolland/constexpr-sql
3ea390a3f8a5d0e1dcb9b5f187121d4649e5f9c3
[ "MIT" ]
5
2020-04-23T05:01:02.000Z
2022-02-21T21:00:30.000Z
# Randomly selects ~500 queries to test from the 1.4mil query set if __name__ == "__main__": main()
24.166667
65
0.662069
# Randomly selects ~500 queries to test from the 1.4mil query set import random def main(): outfile = open("queries/test-queries.txt", "w") #h = 100 / 23000 #h = 0 h = 1.0 outfile.write("JOINLESS\n") with open("queries/joinless-queries.txt", "r") as infile: for line in infile: if random.random() < h: o...
0
0
0
0
0
585
0
-8
46
1e9192d3f98e0f11bacec71e8c0c0fbbd40587c6
8,350
py
Python
small-strain/laminate/visco-plasticity.py
tdegeus/GooseFFT
1e460e6fed750cbaf33139e13cfc27dee5ab291e
[ "MIT" ]
21
2017-02-22T10:26:46.000Z
2022-03-13T20:54:26.000Z
small-strain/laminate/visco-plasticity.py
AbduKT/GooseFFT
9c10ea3559680834fb99a4491eee9a17a7228792
[ "MIT" ]
6
2018-04-26T05:33:02.000Z
2021-11-15T07:37:09.000Z
small-strain/laminate/visco-plasticity.py
AbduKT/GooseFFT
9c10ea3559680834fb99a4491eee9a17a7228792
[ "MIT" ]
13
2017-02-03T15:13:20.000Z
2021-11-25T14:56:28.000Z
import numpy as np import scipy.sparse.linalg as sp import itertools # turn of warning for zero division (occurs due to vectorization) np.seterr(divide='ignore', invalid='ignore') # ----------------------------------- GRID ------------------------------------ Nx = 31 # number of voxels in x-direction...
36.147186
88
0.561317
import numpy as np import scipy.sparse.linalg as sp import itertools # turn of warning for zero division (occurs due to vectorization) np.seterr(divide='ignore', invalid='ignore') # ----------------------------------- GRID ------------------------------------ Nx = 31 # number of voxels in x-direction...
0
0
0
0
0
2,244
0
0
69
cd82d51334bf475ed31086e785ad896c08f0b0ce
2,128
py
Python
helpers.py
ryanorsinger/helpers
e4b323c9fb97f569357ede72794fa8a504c499cd
[ "MIT" ]
null
null
null
helpers.py
ryanorsinger/helpers
e4b323c9fb97f569357ede72794fa8a504c499cd
[ "MIT" ]
null
null
null
helpers.py
ryanorsinger/helpers
e4b323c9fb97f569357ede72794fa8a504c499cd
[ "MIT" ]
null
null
null
def remove_digits(s): """ Returns a string with all digits removed. """ return ''.join(filter(lambda x: not x.isdigit(), s)) def remove_parentheticals(s): """ Removes any parenthetical expression from a string Returns "Bolivia" from "Bolivia (Plurinational State of)" """ ...
30.4
101
0.654605
def remove_digits(s): """ Returns a string with all digits removed. """ return ''.join(filter(lambda x: not x.isdigit(), s)) def remove_parentheticals(s): """ Removes any parenthetical expression from a string Returns "Bolivia" from "Bolivia (Plurinational State of)" """ ...
0
0
0
0
0
127
0
0
22
93144c90e848fe4fa54700fe844b2ed596eb4b24
5,353
py
Python
dpkt/aim.py
Vito-Swift/dpkt
9242f8d116b6e26d8f1d78a1b5f62f14b4dc8a37
[ "BSD-3-Clause" ]
924
2015-01-04T01:22:15.000Z
2022-03-28T02:22:46.000Z
dpkt/aim.py
Vito-Swift/dpkt
9242f8d116b6e26d8f1d78a1b5f62f14b4dc8a37
[ "BSD-3-Clause" ]
599
2015-01-02T18:06:52.000Z
2022-03-29T16:00:17.000Z
dpkt/aim.py
Vito-Swift/dpkt
9242f8d116b6e26d8f1d78a1b5f62f14b4dc8a37
[ "BSD-3-Clause" ]
299
2015-02-12T19:50:34.000Z
2022-03-15T00:35:29.000Z
# $Id: aim.py 23 2006-11-08 15:45:33Z dugsong $ # -*- coding: utf-8 -*- """AOL Instant Messenger.""" from __future__ import absolute_import # OSCAR: http://iserverd1.khstu.ru/oscar/ # TOC 1.0: http://jamwt.com/Py-TOC/PROTOCOL # TOC 2.0: http://www.firestuff.org/projects/firetalk/doc/toc2.txt
33.45625
99
0.595367
# $Id: aim.py 23 2006-11-08 15:45:33Z dugsong $ # -*- coding: utf-8 -*- """AOL Instant Messenger.""" from __future__ import absolute_import import struct from . import dpkt # OSCAR: http://iserverd1.khstu.ru/oscar/ class FLAP(dpkt.Packet): """Frame Layer Protocol. See more about the FLAP on https://e...
0
0
0
961
0
3,940
0
-11
161
6cc4a44401acf8759fefb258de8c185f169f4e2c
3,520
py
Python
src/ppopt/utils/chebyshev_ball.py
TAMUparametric/PPOPT
2d20f60e7e7c312f761d5563ba808bd0bb9361e5
[ "MIT" ]
9
2021-09-24T20:17:46.000Z
2022-03-25T23:12:49.000Z
src/ppopt/utils/chebyshev_ball.py
TAMUparametric/PPOPT
2d20f60e7e7c312f761d5563ba808bd0bb9361e5
[ "MIT" ]
null
null
null
src/ppopt/utils/chebyshev_ball.py
TAMUparametric/PPOPT
2d20f60e7e7c312f761d5563ba808bd0bb9361e5
[ "MIT" ]
2
2021-09-28T23:23:32.000Z
2022-03-11T20:59:51.000Z
from typing import Iterable import numpy from ..solver_interface.solver_interface import solve_milp, solve_lp from ..utils.constraint_utilities import constraint_norm from ..utils.general_utils import make_column def chebyshev_ball(A: numpy.ndarray, b: numpy.ndarray, equality_constraints: Iterable[int] = None, ...
33.207547
119
0.613068
from typing import Iterable import numpy from ..solver_interface.solver_interface import solve_milp, solve_lp from ..utils.constraint_utilities import constraint_norm from ..utils.general_utils import make_column def chebyshev_ball(A: numpy.ndarray, b: numpy.ndarray, equality_constraints: Iterable[int] = None, ...
0
0
0
0
0
0
0
0
0
6001b1e117cfc669e6ac3ee08b66d6720ecbb2a3
960
py
Python
contact/models.py
IATI/new-website
b90783e32d19ac4c821c5ea018a52997a11b5286
[ "MIT" ]
4
2019-03-28T06:42:17.000Z
2021-06-06T13:10:51.000Z
contact/models.py
IATI/new-website
b90783e32d19ac4c821c5ea018a52997a11b5286
[ "MIT" ]
177
2018-09-28T14:21:56.000Z
2022-03-30T21:45:26.000Z
contact/models.py
IATI/new-website
b90783e32d19ac4c821c5ea018a52997a11b5286
[ "MIT" ]
8
2018-10-25T20:43:10.000Z
2022-03-17T14:19:27.000Z
"""Model definitions for the contact app."""
34.285714
82
0.74375
"""Model definitions for the contact app.""" from wagtail.core.blocks import RichTextBlock, StreamBlock, StructBlock, TextBlock from wagtail.core.fields import StreamField from home.models import AbstractContentPage, DefaultPageHeaderImageMixin class ContactTypeStreamBlock(StreamBlock): """Model allowing the CMS...
0
0
0
666
0
0
0
134
113
a940241721a927fba8f0f74545c31941cb57ccb9
37
py
Python
week1/14.py
kamorozov/coursera_python
706bc1bc46839f8b3debdf293240ad5ce20c9775
[ "Unlicense" ]
2
2019-05-17T13:42:02.000Z
2019-05-18T04:00:35.000Z
week1/14.py
kamorozov/coursera_python
706bc1bc46839f8b3debdf293240ad5ce20c9775
[ "Unlicense" ]
null
null
null
week1/14.py
kamorozov/coursera_python
706bc1bc46839f8b3debdf293240ad5ce20c9775
[ "Unlicense" ]
2
2019-10-03T09:07:44.000Z
2019-12-28T19:17:20.000Z
A = int(input()) print((A - 1)**A)
12.333333
18
0.459459
A = int(input()) print((A - 1)**A)
0
0
0
0
0
0
0
0
0
51b9aba6709bebeb7887ebcdf5073c5b0a930ed0
129
py
Python
nada/__init__.py
ahonn/Luoo-vol
320f4569daaaa150ef972493801ab7926ecdd594
[ "MIT" ]
null
null
null
nada/__init__.py
ahonn/Luoo-vol
320f4569daaaa150ef972493801ab7926ecdd594
[ "MIT" ]
null
null
null
nada/__init__.py
ahonn/Luoo-vol
320f4569daaaa150ef972493801ab7926ecdd594
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Nada """
9.923077
24
0.496124
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Nada """ from menu import Menu def start(): Menu().start()
0
0
0
0
0
11
0
0
50
adc58009d1366b74fd9bf2c0881c20a95192c79f
3,097
py
Python
atomtools/filetype.py
atomse/atomtools
6771dca631dc9330822bb50826e2700ba6973b32
[ "MIT" ]
null
null
null
atomtools/filetype.py
atomse/atomtools
6771dca631dc9330822bb50826e2700ba6973b32
[ "MIT" ]
null
null
null
atomtools/filetype.py
atomse/atomtools
6771dca631dc9330822bb50826e2700ba6973b32
[ "MIT" ]
null
null
null
""" analyze chemical input/output filetype """ import os import re import argparse import modlog from . import fileutil BASE_DIR = os.path.dirname(os.path.abspath(__file__)) DEFAULT_FILETYPE_REGEXP_CONF = 'default_filetype.conf' DEFAULT_FILETYPE_REGEXP_CONF = os.path.join( BASE_DIR, DEFAULT_FILETYPE_REGEXP_CONF...
30.663366
96
0.674847
""" analyze chemical input/output filetype """ import os import re import argparse import configparser import modlog from . import fileutil BASE_DIR = os.path.dirname(os.path.abspath(__file__)) DEFAULT_FILETYPE_REGEXP_CONF = 'default_filetype.conf' DEFAULT_FILETYPE_REGEXP_CONF = os.path.join( BASE_DIR, DEFAULT_...
0
0
0
0
0
508
0
-2
91
a7de339f5ac35603d4d1abec51dab361191355e6
5,732
py
Python
RecongnizeCorridor/ogrTest.py
joyerf/LearnPythonGDAL
5ffea10a179a3239bc435473e4a08c0cb58fbfae
[ "Apache-2.0" ]
null
null
null
RecongnizeCorridor/ogrTest.py
joyerf/LearnPythonGDAL
5ffea10a179a3239bc435473e4a08c0cb58fbfae
[ "Apache-2.0" ]
null
null
null
RecongnizeCorridor/ogrTest.py
joyerf/LearnPythonGDAL
5ffea10a179a3239bc435473e4a08c0cb58fbfae
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # coding: utf-8 import log from osgeo import ogr SHAPE_DRIVER = ogr.GetDriverByName('ESRI Shapefile') def read(path=''): """ SHP :param path: :return: """ # datasource = SHAPE_DRIVER.Open(path, 0) # 0 means read-only. 1 means writeable. layer = datasource.GetLaye...
35.825
111
0.698011
#!/usr/bin/python # coding: utf-8 import log from osgeo import ogr import os import feature SHAPE_DRIVER = ogr.GetDriverByName('ESRI Shapefile') def test_capability(path): ds = ogr.Open(path, 0) if ds is None: log.debug('Shape file could not open from', path) return layer = ds.GetLayer() ...
132
0
0
0
0
4,216
0
-19
159
62f6bb39bce0d98f5904b8caf6dfcc72eff8bd3b
2,593
py
Python
2018/day6/day6.py
ChuckWoodraska/AdventOfCode2018
e690b195a948824aa4cb128377791b9d86a818fa
[ "MIT" ]
null
null
null
2018/day6/day6.py
ChuckWoodraska/AdventOfCode2018
e690b195a948824aa4cb128377791b9d86a818fa
[ "MIT" ]
null
null
null
2018/day6/day6.py
ChuckWoodraska/AdventOfCode2018
e690b195a948824aa4cb128377791b9d86a818fa
[ "MIT" ]
null
null
null
from collections import namedtuple with open('input.txt', 'r') as f: data = f.read().splitlines() # Figure out array size x_size = max([int(line.split(', ')[0]) for line in data]) + 1 y_size = max([int(line.split(', ')[1]) for line in data]) + 1 grid_list = [[0 for y in range(y_size)] for x in ...
30.151163
79
0.568454
from collections import namedtuple def manhattan_distance(point_a, centers): min_dist = [None, None, False] for point_b in centers: dist = abs(point_a[0] - point_b.x) + abs(point_a[1] - point_b.y) if dist == 0: return point_b.id if min_dist[0] is None: min_dist[...
0
0
0
0
0
896
0
0
46
a728db8eaa007ff626a15b4563f677a899a7920c
1,452
py
Python
dartsapp/player.py
SchluppiBobbz/DartsApp
3538b90db30b4c59a03d49867df58b62d2e0a84a
[ "MIT" ]
null
null
null
dartsapp/player.py
SchluppiBobbz/DartsApp
3538b90db30b4c59a03d49867df58b62d2e0a84a
[ "MIT" ]
null
null
null
dartsapp/player.py
SchluppiBobbz/DartsApp
3538b90db30b4c59a03d49867df58b62d2e0a84a
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """Player module."""
24.610169
88
0.545455
# -*- coding: utf-8 -*- """Player module.""" import datetime class Player(object): ARROWS_LEFT = 0 GAMES_PLAYED = 0 GAMES_WON = 0 GAME_HISTORY = {} RECENT_FIELDS = [] ACTUAL_HAND = [] def __init__(self, name="player", gender="m"): if name: self.name = name...
0
0
0
1,368
0
0
0
-6
45
f8e441b2b7bbb539f52d5aeea7edfa097a0617da
1,794
py
Python
starry/_core/ops/spot.py
fbartolic/starry
d50576caf964ad925c490c9f3ffe1273ab155397
[ "MIT" ]
null
null
null
starry/_core/ops/spot.py
fbartolic/starry
d50576caf964ad925c490c9f3ffe1273ab155397
[ "MIT" ]
null
null
null
starry/_core/ops/spot.py
fbartolic/starry
d50576caf964ad925c490c9f3ffe1273ab155397
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- __all__ = ["spotYlmOp"]
30.931034
72
0.590858
# -*- coding: utf-8 -*- import numpy as np import theano from theano import gof import theano.tensor as tt __all__ = ["spotYlmOp"] class spotYlmOp(tt.Op): def __init__(self, func, ydeg, nw): self.func = func self._grad_op = spotYlmGradientOp(self) self.Ny = (ydeg + 1) ** 2 self.nw...
0
0
0
1,614
0
0
0
-5
134
cabeedc1d15e9310c1089341891ca5341a8f26ac
20,701
py
Python
enaml/core/declarative.py
mmckerns/enaml
ebf417b4dce9132bffa038a588ad90436a59d37e
[ "BSD-3-Clause" ]
11
2015-01-04T14:29:23.000Z
2019-12-25T05:38:37.000Z
enaml/core/declarative.py
mmckerns/enaml
ebf417b4dce9132bffa038a588ad90436a59d37e
[ "BSD-3-Clause" ]
36
2015-02-20T00:56:53.000Z
2020-12-04T10:02:14.000Z
enaml/core/declarative.py
mmckerns/enaml
ebf417b4dce9132bffa038a588ad90436a59d37e
[ "BSD-3-Clause" ]
3
2015-11-19T15:11:37.000Z
2019-03-11T23:45:02.000Z
#------------------------------------------------------------------------------ # Copyright (c) 2013, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ from types import FunctionType from traits.api import (Any, CTrait) from .dynamic_scope import ...
35.939236
79
0.607217
#------------------------------------------------------------------------------ # Copyright (c) 2013, Enthought, Inc. # All rights reserved. #------------------------------------------------------------------------------ from types import FunctionType from traits.api import ( Any, Property, Disallow, ReadOnly, C...
0
2,648
0
11,163
0
0
0
120
156
c4d6eba8f83a0d5ffc74046bfcea33567f116c00
109
py
Python
Python/calculate_sum.py
PushpneetSingh/Hello-world
def0f44737e02fb40063cd347e93e456658e2532
[ "MIT" ]
1,428
2018-10-03T15:15:17.000Z
2019-03-31T18:38:36.000Z
Python/calculate_sum.py
PushpneetSingh/Hello-world
def0f44737e02fb40063cd347e93e456658e2532
[ "MIT" ]
1,162
2018-10-03T15:05:49.000Z
2018-10-18T14:17:52.000Z
Python/calculate_sum.py
PushpneetSingh/Hello-world
def0f44737e02fb40063cd347e93e456658e2532
[ "MIT" ]
3,909
2018-10-03T15:07:19.000Z
2019-03-31T18:39:08.000Z
n1 = int(input("Input first number: ") n2 = int(input("Input second number: ") sum = n1+n2 print("Sum:",sum)
21.8
39
0.651376
n1 = int(input("Input first number: ") n2 = int(input("Input second number: ") sum = n1+n2 print("Sum:",sum)
0
0
0
0
0
0
0
0
0
3b3682ba89f623fb0035dc99b91c3ba3ca5a8b7d
3,109
py
Python
manager/app/cluster.py
mrandrey228/Naumachia
93cacfd44eea0f004c630fb37de2f4529f9699ad
[ "MIT" ]
79
2017-07-10T16:19:53.000Z
2022-03-19T17:57:40.000Z
manager/app/cluster.py
mrandrey228/Naumachia
93cacfd44eea0f004c630fb37de2f4529f9699ad
[ "MIT" ]
33
2018-01-11T06:18:02.000Z
2022-02-26T05:22:48.000Z
manager/app/cluster.py
mrandrey228/Naumachia
93cacfd44eea0f004c630fb37de2f4529f9699ad
[ "MIT" ]
11
2018-02-10T12:20:55.000Z
2021-12-04T23:46:41.000Z
"""Actions to manage challenge clusters""" from .db import DB import docker import logging logger = logging.getLogger(__name__) dockerc = docker.from_env() def cluster_check(user, vpn, cluster): """Check that the cluster is up when Redis says it is up""" if cluster.status in (DB.Cluster.UP, DB.Cluster.EXPIRI...
38.8625
119
0.651656
"""Actions to manage challenge clusters""" from .commands import vlan_ifname, BrctlCmd, ComposeCmd from .db import DB import docker import logging import subprocess logger = logging.getLogger(__name__) dockerc = docker.from_env() def cluster_bridge_exists(cluster): return bool(dockerc.networks.list(names=[clust...
0
0
0
0
0
2,200
0
30
137
eea510976ff8419cf356c7b1deddf1b31f7d8949
1,325
py
Python
examples/weighting2.py
bobscotia/pyetf
d1a2f18e01a2cca1bc4d1ca2baf6fd827e5a9bdf
[ "MIT" ]
null
null
null
examples/weighting2.py
bobscotia/pyetf
d1a2f18e01a2cca1bc4d1ca2baf6fd827e5a9bdf
[ "MIT" ]
null
null
null
examples/weighting2.py
bobscotia/pyetf
d1a2f18e01a2cca1bc4d1ca2baf6fd827e5a9bdf
[ "MIT" ]
3
2019-07-16T07:35:21.000Z
2020-11-28T02:31:52.000Z
# -*- coding: utf-8 -*- """ Created on Sat Jul 13 15:08:56 2019 @author: w """ import ffn from pyetf.data import eod from pyetf.alloc import rpw_future from pyetf.figure import plot_chart etf_tickers=['SHY','SPY','XLB','XLE','XLF','XLI','XLK','XLP','XLU','XLV','XLY'] basic_tickers = ['SHY','SPY'] #etf_tickers = basic...
28.804348
99
0.714717
# -*- coding: utf-8 -*- """ Created on Sat Jul 13 15:08:56 2019 @author: w """ import __init__ import ffn from pyetf.data import eod from pyetf.alloc import rpw_standard, rpw_ledoit_wolf from pyetf.alloc import rpw_garch from pyetf.alloc import rpw_future from pyetf.alloc import to_weights from pyetf.figure import plo...
0
0
0
0
0
0
0
51
88
e816da9f3b8062c1f7fa7d599f89f266fc51ee74
2,505
py
Python
locations/spiders/averitt.py
cmecklenborg/alltheplaces
e62b59fb0071b6e289c4622d368fdb203a28347e
[ "MIT" ]
null
null
null
locations/spiders/averitt.py
cmecklenborg/alltheplaces
e62b59fb0071b6e289c4622d368fdb203a28347e
[ "MIT" ]
null
null
null
locations/spiders/averitt.py
cmecklenborg/alltheplaces
e62b59fb0071b6e289c4622d368fdb203a28347e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*-
34.791667
86
0.527745
# -*- coding: utf-8 -*- import re import scrapy from locations.items import GeojsonPointItem from locations.hours import OpeningHours class AverittSpider(scrapy.Spider): name = "averitt" item_attributes = {"brand": "Averitt Express"} allowed_domains = ["averittexpress.com"] start_urls = [ "h...
0
0
0
2,345
0
0
0
22
113
ceeed0c0a6d05fcb7d00977125ff359d081fc895
11,375
py
Python
src/superannotate/lib/app/interface/cli_interface.py
xalgorithm/superannotate-python-sdk
8f28ff3fdfc7bbae41946c79847ad1f6cf8a9300
[ "MIT" ]
26
2020-09-25T06:25:06.000Z
2022-01-30T16:44:07.000Z
src/superannotate/lib/app/interface/cli_interface.py
xalgorithm/superannotate-python-sdk
8f28ff3fdfc7bbae41946c79847ad1f6cf8a9300
[ "MIT" ]
12
2020-12-21T19:59:48.000Z
2022-01-21T10:32:07.000Z
src/superannotate/lib/app/interface/cli_interface.py
xalgorithm/superannotate-python-sdk
8f28ff3fdfc7bbae41946c79847ad1f6cf8a9300
[ "MIT" ]
11
2020-09-17T13:39:19.000Z
2022-03-02T18:12:29.000Z
from lib.infrastructure.controller import Controller controller = Controller.get_instance()
37.665563
131
0.644747
import json import os import sys import tempfile from typing import Any from typing import Optional import lib.core as constances from lib import __file__ as lib_path from lib.app.helpers import split_project_path from lib.app.input_converters.conversion import import_annotation from lib.app.interface.base_interface i...
0
1,395
0
8,736
0
0
0
641
508
bf28921ca074429192c96837a6192f012913e624
1,234
py
Python
tests/test_pandits.py
sotte/pandits
a121bee35c997af49b66739623d1a00754dbb809
[ "Apache-2.0" ]
null
null
null
tests/test_pandits.py
sotte/pandits
a121bee35c997af49b66739623d1a00754dbb809
[ "Apache-2.0" ]
null
null
null
tests/test_pandits.py
sotte/pandits
a121bee35c997af49b66739623d1a00754dbb809
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_pandits ---------------------------------- Tests for `pandits` module. """ ############################################################################## ##############################################################################
26.826087
78
0.541329
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_pandits ---------------------------------- Tests for `pandits` module. """ ############################################################################## from scipy import stats from pandits import strategies from pandits.bandit import Bandit import pytest ##...
0
815
0
0
0
0
0
15
112
223c01260126021736f30f857798c368c3e7d9df
1,224
py
Python
test/fixtures/python/post_with_urlencoded_data_and_headers.py
csperando/curlconverter
733f110e5621375701f4424299ccd72e669876f6
[ "MIT" ]
536
2021-10-06T17:21:25.000Z
2022-03-31T13:05:48.000Z
test/fixtures/python/post_with_urlencoded_data_and_headers.py
csperando/curlconverter
733f110e5621375701f4424299ccd72e669876f6
[ "MIT" ]
74
2021-10-08T13:57:14.000Z
2022-03-31T06:55:39.000Z
test/fixtures/python/post_with_urlencoded_data_and_headers.py
csperando/curlconverter
733f110e5621375701f4424299ccd72e669876f6
[ "MIT" ]
104
2021-10-06T19:36:15.000Z
2022-03-31T07:34:04.000Z
import requests headers = { 'Origin': 'http://www.realtor.ca', # 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'en-US,en;q=0.8', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36', 'Content-Type': 'appli...
31.384615
142
0.617647
import requests headers = { 'Origin': 'http://www.realtor.ca', # 'Accept-Encoding': 'gzip, deflate', 'Accept-Language': 'en-US,en;q=0.8', 'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36', 'Content-Type': 'appli...
0
0
0
0
0
0
0
0
0
63ce13e1ab5d4daae1952d8406103a447ac25b0b
1,911
py
Python
Scripts/correlation_heatmap.py
nutellaweera/DS_Hackathon_2021
2254d9613880329526926d0c6541a2505729a1e4
[ "MIT" ]
1
2021-11-19T15:20:51.000Z
2021-11-19T15:20:51.000Z
Scripts/correlation_heatmap.py
nutellaweera/DS_Hackathon_2021
2254d9613880329526926d0c6541a2505729a1e4
[ "MIT" ]
null
null
null
Scripts/correlation_heatmap.py
nutellaweera/DS_Hackathon_2021
2254d9613880329526926d0c6541a2505729a1e4
[ "MIT" ]
null
null
null
gen_correlation()
46.609756
196
0.641026
import pandas as pd import seaborn as sns import matplotlib.pyplot as plt def gen_correlation(): df = pd.read_csv("Datasets/CO2.csv") filtered = df[(df["country"].isin(["India", "China", "Ethiopia", "United States"])) & (df["year"]>1950) & (df["year"]<2001)].filter(items=["year", "country", "share_global_co2",...
0
0
0
0
0
1,796
0
8
89
98feb70dd7ca983bc63d2ab09f7122a4bcd37f71
332
py
Python
source/soca/cluster_web_ui/scheduled_tasks/clean_tmp_folders.py
xinlaoda/scale-out-computing-on-aws
77d03d624adf6823b90746c448259ce9d5098f6e
[ "Apache-2.0" ]
12
2021-03-07T01:38:23.000Z
2021-12-06T08:01:15.000Z
source/soca/cluster_web_ui/scheduled_tasks/clean_tmp_folders.py
cmaldon/scale-out-computing-on-aws
69041c8341aa4438ac0c11e550916c0b0585913d
[ "Apache-2.0" ]
14
2021-01-04T09:40:16.000Z
2021-02-08T06:28:31.000Z
source/soca/cluster_web_ui/scheduled_tasks/clean_tmp_folders.py
cmaldon/scale-out-computing-on-aws
69041c8341aa4438ac0c11e550916c0b0585913d
[ "Apache-2.0" ]
3
2021-03-07T01:38:24.000Z
2021-12-06T07:51:47.000Z
import logging logger = logging.getLogger("api_log")
25.538462
55
0.650602
import os import glob import logging logger = logging.getLogger("api_log") def clean_tmp_folders(): directories = ["tmp/zip_downloads/*", "tmp/ssh/*"] for directory in directories: logger.info("Remove files inside " + directory) files = glob.glob(directory) for f in files: o...
0
0
0
0
0
234
0
-22
67
02a9685bfd6b249992ae57c097c8f9acd3210e32
15,389
py
Python
manifest_module.py
skgrush/blackbird
662c249070338ec665e35efc45f76bc166f4f18a
[ "MIT" ]
null
null
null
manifest_module.py
skgrush/blackbird
662c249070338ec665e35efc45f76bc166f4f18a
[ "MIT" ]
null
null
null
manifest_module.py
skgrush/blackbird
662c249070338ec665e35efc45f76bc166f4f18a
[ "MIT" ]
null
null
null
#!/usr/bin/env python try: import warnings except ImportError: warnings = None try: import json except ImportError: json = None #######CONSTANTS####### _PRINTABLE = ''.join(map(chr,range(0x09,0x0E))+map(chr,range(0x20,0x7F))) _IDENT_CHARS = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567...
39.358056
142
0.504581
#!/usr/bin/env python import hashlib,string from numbers import Number from base64 import standard_b64encode,standard_b64decode import filehash try: import warnings except ImportError: warnings = None try: import json except ImportError: json = None #######CONSTANTS####### _PRINTABLE = ''.join(map(ch...
4
0
0
11,895
0
115
0
34
158
920059de115c4794577ee2aba6d9e107578efa08
2,371
py
Python
src/fetch.py
christosgalano/COVID_19-Reporter
d019aac9b2894a6b53c4781087a54c761e8e1a74
[ "BSD-2-Clause" ]
null
null
null
src/fetch.py
christosgalano/COVID_19-Reporter
d019aac9b2894a6b53c4781087a54c761e8e1a74
[ "BSD-2-Clause" ]
null
null
null
src/fetch.py
christosgalano/COVID_19-Reporter
d019aac9b2894a6b53c4781087a54c761e8e1a74
[ "BSD-2-Clause" ]
null
null
null
import pandas as pd def update_data(): """ Downloads the data and writes them to a new csv file. :return: None """ confirmed_url = "https://data.humdata.org/hxlproxy/api/data-preview.csv?" \ "url=https%3A%2F%2Fraw.githubusercontent.com%2FCSSEGISandData%2FCOVID-19%" \ ...
43.109091
114
0.680725
import pandas as pd import requests def update_data(): """ Downloads the data and writes them to a new csv file. :return: None """ def download_data(url, filename): req = requests.get(url) with open(filename, 'wb') as f: f.write(req.content) confirmed_url = "https:...
0
0
0
0
0
340
0
-6
74
90b1f571fb170aa577aceaae898b69c1b6f5c9c8
394
py
Python
userv/test_flask.py
mobarski/sandbox
64ac79143750d5dcbd4d0f3abdab6efeb9bdf50c
[ "MIT" ]
null
null
null
userv/test_flask.py
mobarski/sandbox
64ac79143750d5dcbd4d0f3abdab6efeb9bdf50c
[ "MIT" ]
null
null
null
userv/test_flask.py
mobarski/sandbox
64ac79143750d5dcbd4d0f3abdab6efeb9bdf50c
[ "MIT" ]
null
null
null
from flask import Flask kv = {} app = Flask(__name__) if __name__=="__main__": app.run(port=8080)
16.416667
34
0.593909
from flask import Flask, request import ujson as json kv = {} app = Flask(__name__) @app.route('/kv') def kv_op(): req = request op = req.args.get('op') if op=='get': k = req.args.get('k') v = json.dumps(kv.get(k)) return v elif op=='set': k = req.args.get('k') v = req.args.get('v') kv[k] = v retur...
0
239
0
0
0
0
0
8
45
def107bfa8142532d7551f0fa0482a750848d383
227
py
Python
src/movement/no.py
Quanta-Robotics/Robot-Blueberry
7b7e77e09ac5e9ec5afd947e0db1ecc8773e56da
[ "MIT" ]
25
2021-06-08T07:09:30.000Z
2021-12-30T06:28:35.000Z
src/movement/no.py
ICT-CoU/Robot-Blueberry
d19fd1be037df9d67de64df57a87006d74cd6c43
[ "MIT" ]
2
2021-05-23T12:54:51.000Z
2021-06-07T17:47:56.000Z
src/movement/no.py
ICT-CoU/Robot-Blueberry
d19fd1be037df9d67de64df57a87006d74cd6c43
[ "MIT" ]
14
2021-06-08T13:02:28.000Z
2021-12-30T20:07:18.000Z
changeDegreeGpio([0],[0],5,0.03) time.sleep(0.5) changeDegreeGpio([0],[90],5,0.03) time.sleep(0.5) changeDegreeGpio([0],[180],5,0.03) time.sleep(0.5) changeDegreeGpio([0],[90],5,0.03) time.sleep(0.5)
18.916667
34
0.687225
from expression import * changeDegreeGpio([0],[0],5,0.03) time.sleep(0.5) changeDegreeGpio([0],[90],5,0.03) time.sleep(0.5) changeDegreeGpio([0],[180],5,0.03) time.sleep(0.5) changeDegreeGpio([0],[90],5,0.03) time.sleep(0.5)
0
0
0
0
0
0
0
3
22
84df10814ec919bf9d579e991527c4008c8095f9
2,739
py
Python
pydigilent/lowlevel/depp.py
greedysquid/pydigilent
8ec18dcf97602038ee57b35365dfd9df86e5f72e
[ "MIT" ]
7
2015-01-09T21:39:14.000Z
2020-04-06T07:32:01.000Z
pydigilent/lowlevel/depp.py
greedysquid/pydigilent
8ec18dcf97602038ee57b35365dfd9df86e5f72e
[ "MIT" ]
2
2018-05-06T09:35:43.000Z
2018-10-23T14:15:56.000Z
pydigilent/lowlevel/depp.py
greedysquid/pydigilent
8ec18dcf97602038ee57b35365dfd9df86e5f72e
[ "MIT" ]
5
2015-01-13T21:15:15.000Z
2019-07-03T13:08:03.000Z
import ctypes import sys from pydigilent.lowlevel.common import HIF if sys.platform.startswith("win"): _depp = ctypes.cdll.depp else: _depp = ctypes.cdll.LoadLibrary("libdepp.so") _DeppGetVersion = _depp.DeppGetVersion _DeppGetVersion.argtypes = [ctypes.POINTER(ctypes.c_char * 32)] _DeppGetVersion.restype = ...
33.814815
127
0.786418
import ctypes import sys from pydigilent.lowlevel.common import HIF if sys.platform.startswith("win"): _depp = ctypes.cdll.depp else: _depp = ctypes.cdll.LoadLibrary("libdepp.so") _DeppGetVersion = _depp.DeppGetVersion _DeppGetVersion.argtypes = [ctypes.POINTER(ctypes.c_char * 32)] _DeppGetVersion.restype = ...
0
0
0
0
0
459
0
0
92
5c4f4a19b68190fdb7ca217b996c687fff804d14
529
py
Python
RKS.py
akashsuper2000/codechef-archive
e0e4a7daf66812ab7aa3fe42132c3d067a72457b
[ "bzip2-1.0.6" ]
null
null
null
RKS.py
akashsuper2000/codechef-archive
e0e4a7daf66812ab7aa3fe42132c3d067a72457b
[ "bzip2-1.0.6" ]
null
null
null
RKS.py
akashsuper2000/codechef-archive
e0e4a7daf66812ab7aa3fe42132c3d067a72457b
[ "bzip2-1.0.6" ]
null
null
null
for i in range(int(input())): n,k = [int(j) for j in input().split()] m,s = set(),set() for j in range(k): a,b = [int(p) for p in input().split()] m.add(a-1) s.add(b-1) c = 0 l = [] for j in range(n): if(j not in m): for k in range(n): ...
25.190476
47
0.344045
for i in range(int(input())): n,k = [int(j) for j in input().split()] m,s = set(),set() for j in range(k): a,b = [int(p) for p in input().split()] m.add(a-1) s.add(b-1) c = 0 l = [] for j in range(n): if(j not in m): for k in range(n): ...
0
0
0
0
0
0
0
0
0
87bae4c19ab09a79defaf921e7fb725094fb372f
4,621
py
Python
mipqctool/model/qctypes/integer.py
aueb-wim/HBPMedical-QCtool
f2cb7a23a9a1980b2797e37407e2dc5d4c236c5d
[ "Apache-2.0" ]
8
2019-09-24T17:00:54.000Z
2021-11-13T22:13:30.000Z
mipqctool/model/qctypes/integer.py
aueb-wim/HBPMedical-QCtool
f2cb7a23a9a1980b2797e37407e2dc5d4c236c5d
[ "Apache-2.0" ]
5
2020-12-02T13:51:47.000Z
2022-01-09T17:30:57.000Z
mipqctool/model/qctypes/integer.py
aueb-wim/DataQualityControlTool
54d29aee2b54e61e94c5f2483961bf95e6977d90
[ "Apache-2.0" ]
2
2021-09-08T12:13:01.000Z
2021-10-06T12:12:37.000Z
# -*- coding: utf-8 -*- # numerical.py from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import re import numpy as np from collections import Counter, OrderedDict from mipqctool.config import ERROR, DEFAULT_MISSING_VALU...
29.812903
75
0.513958
# -*- coding: utf-8 -*- # numerical.py from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import re import numpy as np from collections import Counter, OrderedDict from mipqctool.config import ERROR, LOGGER, DEFAULT_MISS...
0
0
0
0
0
185
0
8
23
c5778092e9bf4d92621c8047205eb07168812962
634
py
Python
nmtpytorch/layers/transformers/positionwise_ff.py
tejas1995/nmtpytorch
0b8a8cda896eae6bb6f07c3cd81e870331a2d20c
[ "MIT" ]
420
2017-12-18T11:48:44.000Z
2022-01-06T09:04:53.000Z
nmtpytorch/layers/transformers/positionwise_ff.py
tejas1995/nmtpytorch
0b8a8cda896eae6bb6f07c3cd81e870331a2d20c
[ "MIT" ]
22
2017-12-18T14:31:29.000Z
2021-07-13T11:37:44.000Z
nmtpytorch/layers/transformers/positionwise_ff.py
tejas1995/nmtpytorch
0b8a8cda896eae6bb6f07c3cd81e870331a2d20c
[ "MIT" ]
66
2017-12-18T15:31:38.000Z
2021-08-05T11:15:17.000Z
from .. import FF
20.451613
62
0.585174
import torch from .. import FF class PositionwiseFF(torch.nn.Module): """Positionwise Feed-forward layer. Arguments: Input: Output: """ def __init__(self, model_dim, ff_dim, activ='relu'): super().__init__() self.model_dim = model_dim self.ff_dim = ff_dim s...
0
0
0
578
0
0
0
-9
45
db78c3a98201fa6509e9f6e92802db78e27db31d
15,490
py
Python
experiments/volume_potential_3d_derivatives.py
xywei/volumential
07c6ca8c623acf24fb8deddf93baa1035234db58
[ "MIT" ]
6
2021-05-21T23:57:15.000Z
2022-03-07T22:02:50.000Z
experiments/volume_potential_3d_derivatives.py
inducer/volumential
290a5943d3f47958dcab6736bc2b758525471570
[ "MIT" ]
2
2021-03-26T15:41:27.000Z
2021-03-26T15:42:21.000Z
experiments/volume_potential_3d_derivatives.py
inducer/volumential
290a5943d3f47958dcab6736bc2b758525471570
[ "MIT" ]
1
2021-05-21T21:23:39.000Z
2021-05-21T21:23:39.000Z
""" This example evaluates the volume potential and its derivatives over [-1,1]^3 with the Laplace kernel. """ from __future__ import absolute_import, division, print_function __copyright__ = "Copyright (C) 2019 Xiaoyu Wei" __license__ = """ Permission is hereby granted, free of charge, to any person obtaining a ...
28.579336
88
0.667205
""" This example evaluates the volume potential and its derivatives over [-1,1]^3 with the Laplace kernel. """ from __future__ import absolute_import, division, print_function __copyright__ = "Copyright (C) 2019 Xiaoyu Wei" __license__ = """ Permission is hereby granted, free of charge, to any person obtaining a ...
0
0
0
0
0
109
0
31
92
587bce4d29aa9c8d3e101620df83c3aa7251462b
14,920
py
Python
pyvttbl/tests/test_stats_anova_mixed.py
yk/pyvttbl
af66c1aba410ba5386249cd5b95f2ae0ed01d870
[ "BSD-3-Clause" ]
null
null
null
pyvttbl/tests/test_stats_anova_mixed.py
yk/pyvttbl
af66c1aba410ba5386249cd5b95f2ae0ed01d870
[ "BSD-3-Clause" ]
null
null
null
pyvttbl/tests/test_stats_anova_mixed.py
yk/pyvttbl
af66c1aba410ba5386249cd5b95f2ae0ed01d870
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2011, Roger Lew [see LICENSE.txt] # This software is funded in part by NIH Grant P20 RR016454. import unittest if __name__ == "__main__": # run tests runner = unittest.TextTestRunner() runner.run(suite())
73.861386
151
0.309853
# Copyright (c) 2011, Roger Lew [see LICENSE.txt] # This software is funded in part by NIH Grant P20 RR016454. import unittest import warnings import os import math from random import shuffle, random from collections import Counter,OrderedDict from dictset import DictSet,_rep_generator from math import isnan, isinf,...
0
0
0
14,112
0
105
0
92
367
a0ba1136846cbfa160247a71a1f7a7a248ba62d2
364
py
Python
CangJie/Features/glyph.py
bigdata-ustc/CangJie
a3264082fa0432d257b5c4722b14c55f9092a411
[ "MIT" ]
2
2020-03-04T02:27:29.000Z
2020-05-22T04:07:24.000Z
CangJie/Features/glyph.py
tswsxk/CangJie
50c5183eae1d4f10c4cf364262437afcf54427fa
[ "MIT" ]
null
null
null
CangJie/Features/glyph.py
tswsxk/CangJie
50c5183eae1d4f10c4cf364262437afcf54427fa
[ "MIT" ]
1
2020-01-07T08:34:59.000Z
2020-01-07T08:34:59.000Z
# coding: utf-8 # 2019/12/30 @ tongshiwei __all__ = ["character_glyph"]
20.222222
50
0.651099
# coding: utf-8 # 2019/12/30 @ tongshiwei from PIL import Image, ImageDraw, ImageFont __all__ = ["character_glyph"] def character_glyph(character, size=28): im = Image.new("1", (size, size), 0) text = character dr = ImageDraw.Draw(im) font = ImageFont.truetype("simsun", size) dr.text((0, 0), te...
0
0
0
0
0
222
0
22
46
4c2d24daadad6f5d7d50964cd8f0ed45232e1fec
976
py
Python
setup.py
datalad/datalad-fuse
35df143cde90a7dd1b877fc1f7d1f397ef09b0f4
[ "MIT" ]
null
null
null
setup.py
datalad/datalad-fuse
35df143cde90a7dd1b877fc1f7d1f397ef09b0f4
[ "MIT" ]
65
2021-09-03T14:56:28.000Z
2022-03-23T18:54:39.000Z
setup.py
datalad/datalad-fuse
35df143cde90a7dd1b877fc1f7d1f397ef09b0f4
[ "MIT" ]
2
2021-09-15T16:10:03.000Z
2021-10-01T18:38:11.000Z
#!/usr/bin/env python import os.path import sys from setuptools import setup # This is needed for versioneer to be importable when building with PEP 517. # See <https://github.com/warner/python-versioneer/issues/193> and links # therein for more information. sys.path.append(os.path.dirname(__file__)) from _datalad_b...
30.5
76
0.740779
#!/usr/bin/env python import os.path import sys from setuptools import setup # This is needed for versioneer to be importable when building with PEP 517. # See <https://github.com/warner/python-versioneer/issues/193> and links # therein for more information. sys.path.append(os.path.dirname(__file__)) from _datalad_b...
0
0
0
0
0
0
0
0
0
db27c9cad391dc1c10451843b95b6888b1d3a56b
640
py
Python
10-use-cases/50-json.py
svalgaard/python-workshop
e69998fdf43c4575612a79d86c1afc7ad63fd185
[ "MIT" ]
null
null
null
10-use-cases/50-json.py
svalgaard/python-workshop
e69998fdf43c4575612a79d86c1afc7ad63fd185
[ "MIT" ]
null
null
null
10-use-cases/50-json.py
svalgaard/python-workshop
e69998fdf43c4575612a79d86c1afc7ad63fd185
[ "MIT" ]
null
null
null
#! /usr/bin/env python3 # # Requires requests # WEATHER_URL = "https://example.net/api.php?degree=C&location=" if __name__ == '__main__': main()
18.285714
62
0.654688
#! /usr/bin/env python3 # # Requires requests # import json import requests import sys WEATHER_URL = "https://example.net/api.php?degree=C&location=" def getWeather(city): url = WEATHER_URL + city response = requests.get(url) return response.text def main(): # This fails as the site does actually ...
0
0
0
0
0
400
0
-27
113
0ceac60e6afd05655db6ae07d5ad0ef28821a98e
2,717
py
Python
comz/flucyboxy.py
ZeroHexa/comz
96ffcb82d6a4690dfd49eaa45dd0ccc4f679f3bb
[ "MIT" ]
10
2019-09-27T13:50:39.000Z
2022-02-02T05:28:40.000Z
comz/flucyboxy.py
ZeroHexa/comz
96ffcb82d6a4690dfd49eaa45dd0ccc4f679f3bb
[ "MIT" ]
1
2020-05-06T10:54:12.000Z
2020-05-10T00:57:21.000Z
comz/flucyboxy.py
Sazxt/comz
96ffcb82d6a4690dfd49eaa45dd0ccc4f679f3bb
[ "MIT" ]
11
2019-09-05T14:18:53.000Z
2022-02-02T05:28:41.000Z
# -*- coding: UTF-8 -*-. # Author Sazxt # My Team : Black Coder crush INC = { "onc":["cek","syntax"], "nca":["ok","not"] } daftar_nick = (lambda : """ { Black Coder Crush } ~ since 2020/2021 ~ [+] - 4K17 [+] - Dfv47 [+] - Mr.Tr3v!0n [+] - Holilul Anwar [+] - R.I.P XerXez7 [+] - Mr.`HACK [+] - kii...
22.641667
72
0.587781
# -*- coding: UTF-8 -*-. # Author Sazxt # My Team : Black Coder crush import os as _osx from py_compile import compile as comp INC = { "onc":["cek","syntax"], "nca":["ok","not"] } class flocbox(object): def __init__(self,file=None,systax=''): self.file = file if systax == INC['onc'][0]: self.ceks() if ...
308
0
0
1,582
0
0
0
13
135
7aaa187b60b264e21a3d7c5b85dfae9c10d83358
2,391
py
Python
financepy/finutils/FinStatistics.py
suhasghorp/FinancePy
567486785b33768f229a404e860f92fd042034a2
[ "BSD-3-Clause" ]
null
null
null
financepy/finutils/FinStatistics.py
suhasghorp/FinancePy
567486785b33768f229a404e860f92fd042034a2
[ "BSD-3-Clause" ]
1
2020-05-07T14:38:23.000Z
2020-05-07T14:38:23.000Z
financepy/finutils/FinStatistics.py
suhasghorp/FinancePy
567486785b33768f229a404e860f92fd042034a2
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*- """ Created on Sun Feb 07 14:31:53 2019 @author: Dominic O'Kane """ ########################################################################## ########################################################################## ###############################################...
23.441176
75
0.434128
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*- """ Created on Sun Feb 07 14:31:53 2019 @author: Dominic O'Kane """ from math import sqrt from numba import njit, float64, int32 ########################################################################## @njit(float64(float64[:]), fastmath=True, cache=True) def mean...
0
1,536
0
0
0
0
0
17
183
56e76180e5ae47f2b90f458d32e2d184d576d301
18,742
py
Python
tests/test_instances.py
pombredanne/pip-shims
07b6d7dd3fb3b0845893febe1d67125aa35170a7
[ "0BSD" ]
12
2018-08-09T08:03:09.000Z
2021-12-24T14:37:17.000Z
tests/test_instances.py
pombredanne/pip-shims
07b6d7dd3fb3b0845893febe1d67125aa35170a7
[ "0BSD" ]
51
2018-08-15T02:05:25.000Z
2022-03-28T07:13:18.000Z
tests/test_instances.py
pombredanne/pip-shims
07b6d7dd3fb3b0845893febe1d67125aa35170a7
[ "0BSD" ]
4
2018-10-25T05:43:58.000Z
2021-10-05T10:05:59.000Z
# -*- coding=utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import sys STRING_TYPES = (str,) if sys.version_info < (3, 0): STRING_TYPES = (str, basestring)
33.230496
152
0.645769
# -*- coding=utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals import os import sys import textwrap from functools import partial import pytest from pip_shims import ( FAVORITE_HASH, USER_CACHE_DIR, BadCommand, BestVersionAlreadyInstalled, CandidatePreferences, ...
0
772
0
0
0
15,708
0
1,188
847
98e28786a009a3355c6931eda855247aa58f227e
10,730
py
Python
evennia/comms/channelhandler.py
mistermikky/evennia
a9ea08fb4c6fb40a77a35351d7176e43d5c1c9ed
[ "BSD-3-Clause" ]
null
null
null
evennia/comms/channelhandler.py
mistermikky/evennia
a9ea08fb4c6fb40a77a35351d7176e43d5c1c9ed
[ "BSD-3-Clause" ]
null
null
null
evennia/comms/channelhandler.py
mistermikky/evennia
a9ea08fb4c6fb40a77a35351d7176e43d5c1c9ed
[ "BSD-3-Clause" ]
null
null
null
""" The channel handler, accessed from this module as CHANNEL_HANDLER is a singleton that handles the stored set of channels and how they are represented against the cmdhandler. If there is a channel named 'newbie', we want to be able to just write newbie Hello! For this to work, 'newbie', the name of the channe...
33.117284
116
0.611184
""" The channel handler, accessed from this module as CHANNEL_HANDLER is a singleton that handles the stored set of channels and how they are represented against the cmdhandler. If there is a channel named 'newbie', we want to be able to just write newbie Hello! For this to work, 'newbie', the name of the channe...
0
0
0
9,209
0
0
0
76
112
528ced61f8be0ccfa1c3dc40b83385ef2f4ce559
18,101
py
Python
satt.py
ZLLentz/solid-attenuator
766ac1df169b3b9459222d979c9ef77a9be2b509
[ "BSD-3-Clause-LBNL" ]
1
2021-04-21T02:55:11.000Z
2021-04-21T02:55:11.000Z
satt.py
ZLLentz/solid-attenuator
766ac1df169b3b9459222d979c9ef77a9be2b509
[ "BSD-3-Clause-LBNL" ]
27
2020-12-07T23:11:42.000Z
2022-02-02T23:59:03.000Z
satt.py
ZLLentz/solid-attenuator
766ac1df169b3b9459222d979c9ef77a9be2b509
[ "BSD-3-Clause-LBNL" ]
2
2020-04-01T05:52:03.000Z
2020-07-24T16:56:36.000Z
# ==================================================================== # This is old code intended for testing the attenuation algorithm. # Not for use in beamline operations. # ==================================================================== import logging logger = logging.getLogger(__name__) # return...
36.86558
107
0.5624
# ==================================================================== # This is old code intended for testing the attenuation algorithm. # Not for use in beamline operations. # ==================================================================== import logging import h5py import numpy as np from ophyd import Epics...
0
0
0
17,390
0
0
0
124
246
b28f8d52e4e5e428ced72dc1b3b0eaef5796d0a3
1,298
py
Python
sample-config.py
justJay-dev/hire-me
a1c4d16cb8f533ec3f7094860530184cd8f307e1
[ "MIT" ]
null
null
null
sample-config.py
justJay-dev/hire-me
a1c4d16cb8f533ec3f7094860530184cd8f307e1
[ "MIT" ]
null
null
null
sample-config.py
justJay-dev/hire-me
a1c4d16cb8f533ec3f7094860530184cd8f307e1
[ "MIT" ]
null
null
null
# setup articles, this is where you can do code highlight templates and stuff. BLOG_NAME = "blog name" APP_URL = get_url() SECRET_KEY = "GOOD_SECRET_KEY" TARGET_MAILBOX = "where_you_want@emails_to_go" GEOIPIFY_API_KEY = "GEOIPKEY" FLATPAGES_EXTENSION = ".md" FLATPAGES_HTML_RENDERER = the_markdown FLATPAGES_MARK...
22.37931
78
0.751926
import os import platform import pygments, markdown from flask import render_template_string from flask_flatpages import FlatPages, pygmented_markdown, pygments_style_defs from app import debug # setup articles, this is where you can do code highlight templates and stuff. def the_markdown(text): markdown_text = r...
0
0
0
0
0
285
0
62
177
852d871fe9895be93ccd71f503a79628a67ad0d3
235
py
Python
mylib/sites/youtube.py
fakegit/mo-han-toolbox
9d5bbc1fe7f12040715d3a0d3f320a1ad617aed8
[ "MIT" ]
24
2019-12-08T03:56:32.000Z
2021-10-02T13:26:37.000Z
mylib/sites/youtube.py
fakegit/mo-han-toolbox
9d5bbc1fe7f12040715d3a0d3f320a1ad617aed8
[ "MIT" ]
2
2020-04-27T14:20:01.000Z
2020-07-17T06:05:33.000Z
mylib/sites/youtube.py
fakegit/mo-han-toolbox
9d5bbc1fe7f12040715d3a0d3f320a1ad617aed8
[ "MIT" ]
10
2019-08-06T01:11:28.000Z
2021-07-19T08:45:11.000Z
#!/usr/bin/env python3 # encoding=utf8
21.363636
83
0.659574
#!/usr/bin/env python3 # encoding=utf8 from mylib.easy.text import regex_find def find_url_in_text(text: str) -> list: p = r'/watch\?v=[-\w]+' return ['https://www.youtube.com' + e for e in regex_find(p, text, dedup=True)]
0
0
0
0
0
131
0
17
46
81cbbb1ebb631548915de847fca57cbbf747198f
772
py
Python
iati/iati/settings/test.py
andylolz/IATI-Standard-Website
b781b9fe6b6430f93826e530e9560183bf8fd310
[ "MIT" ]
null
null
null
iati/iati/settings/test.py
andylolz/IATI-Standard-Website
b781b9fe6b6430f93826e530e9560183bf8fd310
[ "MIT" ]
null
null
null
iati/iati/settings/test.py
andylolz/IATI-Standard-Website
b781b9fe6b6430f93826e530e9560183bf8fd310
[ "MIT" ]
null
null
null
"""Settings for dev environments (overrides base settings).""" import os ALLOWED_HOSTS = ['*'] SECRET_KEY = '-sg0o=f6(j3!4u6^86!j@0&l^3clslh-#f@02d2^p_4vy0ma0y' if 'TRAVIS' in os.environ: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.postgresql_psycopg2', 'NAME': 'travi...
26.62069
105
0.601036
"""Settings for dev environments (overrides base settings).""" import os from .base import * # noqa: F401, F403 # pylint: disable=unused-wildcard-import, wildcard-import ALLOWED_HOSTS = ['*'] SECRET_KEY = '-sg0o=f6(j3!4u6^86!j@0&l^3clslh-#f@02d2^p_4vy0ma0y' if 'TRAVIS' in os.environ: DATABASES = { 'defa...
0
0
0
0
0
0
0
-3
207
6272271d63fc40761867eb40d1c284d96dbdc9ca
8,484
py
Python
docs/conf.py
GoCarrot/teak-air
be45fd0a09b56b74e6bd8fc8b63e87452ca1521e
[ "Apache-2.0" ]
null
null
null
docs/conf.py
GoCarrot/teak-air
be45fd0a09b56b74e6bd8fc8b63e87452ca1521e
[ "Apache-2.0" ]
3
2019-02-25T23:25:18.000Z
2020-08-25T18:34:26.000Z
docs/conf.py
GoCarrot/teak-air
be45fd0a09b56b74e6bd8fc8b63e87452ca1521e
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Teak for Adobe AIR documentation build configuration file, created by # sphinx-quickstart on Thu Aug 31 12:44:59 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated ...
30.517986
96
0.640736
# -*- coding: utf-8 -*- # # Teak for Adobe AIR documentation build configuration file, created by # sphinx-quickstart on Thu Aug 31 12:44:59 2017. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated ...
0
0
0
0
0
2,425
0
22
136
93c03272908b12049a8e8cf2ab595d084323d312
4,810
py
Python
packages/w3af/w3af/plugins/tests/grep/test_credit_cards.py
ZooAtmosphereGroup/HelloPackages
0ccffd33bf927b13d28c8f715ed35004c33465d9
[ "Apache-2.0" ]
3
2019-04-09T22:59:33.000Z
2019-06-14T09:23:24.000Z
tools/w3af/w3af/plugins/tests/grep/test_credit_cards.py
sravani-m/Web-Application-Security-Framework
d9f71538f5cba6fe1d8eabcb26c557565472f6a6
[ "MIT" ]
null
null
null
tools/w3af/w3af/plugins/tests/grep/test_credit_cards.py
sravani-m/Web-Application-Security-Framework
d9f71538f5cba6fe1d8eabcb26c557565472f6a6
[ "MIT" ]
null
null
null
""" test_credit_cards.py Copyright 2011 Andres Riancho This file is part of w3af, http://w3af.org/ . w3af is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License. w3af is distributed in the hop...
41.111111
104
0.639085
""" test_credit_cards.py Copyright 2011 Andres Riancho This file is part of w3af, http://w3af.org/ . w3af is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation version 2 of the License. w3af is distributed in the hop...
0
0
0
3,696
0
0
0
175
223
35793cc1b237017364d81de691cd33858220d716
8,723
py
Python
jonescalculus/jonescalculus.py
Kricki/jones-calculus
9d65348696482318fdb8d6ecbe13b274b2e844c8
[ "MIT" ]
null
null
null
jonescalculus/jonescalculus.py
Kricki/jones-calculus
9d65348696482318fdb8d6ecbe13b274b2e844c8
[ "MIT" ]
2
2017-04-02T16:10:44.000Z
2017-04-05T21:18:30.000Z
jonescalculus/jonescalculus.py
Kricki/jones-calculus
9d65348696482318fdb8d6ecbe13b274b2e844c8
[ "MIT" ]
2
2019-07-22T22:35:30.000Z
2020-04-14T08:09:39.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- """ https://en.wikipedia.org/wiki/Jones_calculus """ import math __author__ = 'Christian Noelleke (https://github.com/Kricki)' if __name__ == '__main__': jv1 = JonesVector(preset='H') hwp = HalfWavePlate(math.radians(22.5)) qwp = QuarterWavePlate(math.radia...
34.615079
114
0.547977
#!/usr/bin/python # -*- coding: utf-8 -*- """ https://en.wikipedia.org/wiki/Jones_calculus """ import numpy as np import math import cmath import matplotlib.pyplot as plt from matplotlib.patches import Ellipse __author__ = 'Christian Noelleke (https://github.com/Kricki)' class JonesMatrix(np.matrix): """ ...
0
2,463
0
5,678
0
0
0
15
205
0b668626d05c2d41a5168aeadb87f52001fed3ac
1,338
py
Python
setup.py
hubpav/enmon
b0921876ec9945e9b4ecc4f802445d93457efdad
[ "MIT" ]
null
null
null
setup.py
hubpav/enmon
b0921876ec9945e9b4ecc4f802445d93457efdad
[ "MIT" ]
null
null
null
setup.py
hubpav/enmon
b0921876ec9945e9b4ecc4f802445d93457efdad
[ "MIT" ]
null
null
null
import os import setuptools here = os.path.abspath(os.path.dirname(__file__)) info = {} with open(os.path.join(here, 'enmon', '__info__.py'), 'r') as f: exec(f.read(), info) with open('requirements.txt', 'r') as f: requirements = f.read() with open('README.md', 'r') as f: readme = f.read() setuptools.s...
28.468085
103
0.620329
import os import setuptools here = os.path.abspath(os.path.dirname(__file__)) info = {} with open(os.path.join(here, 'enmon', '__info__.py'), 'r') as f: exec(f.read(), info) with open('requirements.txt', 'r') as f: requirements = f.read() with open('README.md', 'r') as f: readme = f.read() setuptools.s...
0
0
0
0
0
0
0
0
0
78f06ae26d94d23ab2312af6324972b28f7d4ea5
2,459
py
Python
docs/conf.py
billshi-NOAA/kluster
d01da2427b28717a197091bb4dd7aee87b5bd49d
[ "CC0-1.0" ]
null
null
null
docs/conf.py
billshi-NOAA/kluster
d01da2427b28717a197091bb4dd7aee87b5bd49d
[ "CC0-1.0" ]
null
null
null
docs/conf.py
billshi-NOAA/kluster
d01da2427b28717a197091bb4dd7aee87b5bd49d
[ "CC0-1.0" ]
null
null
null
import os p, f = os.path.split(__file__) root_p = os.path.normpath(p) from HSTB.kluster import __version__ as kluster_version # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc...
34.633803
122
0.670191
import os p, f = os.path.split(__file__) root_p = os.path.normpath(p) from HSTB.kluster import __version__ as kluster_version # Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc...
0
0
0
0
0
0
0
0
0
9e5e2e28c90b3bb420e68ef7f6c1a8989c8a9bba
968
py
Python
setup.py
phausman/fce-ipmi
140c3d1484b0d427aaaaf4a6915260401bd29b2d
[ "MIT" ]
null
null
null
setup.py
phausman/fce-ipmi
140c3d1484b0d427aaaaf4a6915260401bd29b2d
[ "MIT" ]
null
null
null
setup.py
phausman/fce-ipmi
140c3d1484b0d427aaaaf4a6915260401bd29b2d
[ "MIT" ]
null
null
null
import setuptools from src.version import VERSION with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="fce-ipmi", version=VERSION, author="Przemyslaw Hausman", description="Wrapper for various IPMI-related utilities", license="MIT", long_description=long...
28.470588
74
0.623967
import setuptools from src.version import VERSION with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="fce-ipmi", version=VERSION, author="Przemyslaw Hausman", description="Wrapper for various IPMI-related utilities", license="MIT", long_description=long...
0
0
0
0
0
0
0
0
0
2ab8c6b9642e2dbe9fad76211bfcc7b095d4acd9
675
pyw
Python
HelloWorld/Python01/Core Python Applications Programming 3rd/ch05/animalPmw.pyw
grtlinux/KieaPython
5539a9e3625864aa20624b8d684dbe5828dac3d1
[ "Apache-2.0" ]
1
2022-01-29T08:32:11.000Z
2022-01-29T08:32:11.000Z
HelloWorld/Python01/Core Python Applications Programming 3rd/ch05/animalPmw.pyw
grtlinux/KieaPython
5539a9e3625864aa20624b8d684dbe5828dac3d1
[ "Apache-2.0" ]
null
null
null
HelloWorld/Python01/Core Python Applications Programming 3rd/ch05/animalPmw.pyw
grtlinux/KieaPython
5539a9e3625864aa20624b8d684dbe5828dac3d1
[ "Apache-2.0" ]
1
2022-01-29T08:32:12.000Z
2022-01-29T08:32:12.000Z
#!/usr/bin/env python from Tkinter import Button, END, Label, W from Pmw import initialise, ComboBox, Counter top = initialise() lb = Label(top, text='Animals (in pairs; min: pair, max: dozen)') lb.pack() ct = Counter(top, labelpos=W, label_text='Number:', datatype='integer', entryfield_value=2,...
24.107143
54
0.632593
#!/usr/bin/env python from Tkinter import Button, END, Label, W from Pmw import initialise, ComboBox, Counter top = initialise() lb = Label(top, text='Animals (in pairs; min: pair, max: dozen)') lb.pack() ct = Counter(top, labelpos=W, label_text='Number:', datatype='integer', entryfield_value=2,...
0
0
0
0
0
0
0
0
0
c9c7690a14417fde2470523dfd891e4547ffb7e5
1,634
py
Python
bike/admin.py
kinsney/sport
190482ef46eea1f7b1604b1b95fd2f0ee6b3880a
[ "MIT" ]
null
null
null
bike/admin.py
kinsney/sport
190482ef46eea1f7b1604b1b95fd2f0ee6b3880a
[ "MIT" ]
null
null
null
bike/admin.py
kinsney/sport
190482ef46eea1f7b1604b1b95fd2f0ee6b3880a
[ "MIT" ]
null
null
null
# Register your models here. # bike_verify.short_description = "" # bike_fail.short_description = ""
26.786885
59
0.654835
from django.contrib import admin from bike.models import Version,Brand,Category,Bike,Address from message.models import Message # Register your models here. #单车通过验证代码 def bike_verify(modeladmin, request, queryset): queryset.update(status='renting') for bike in queryset: try: content = "{"+"}...
84
364
0
172
0
661
0
62
246
647821d1f90e3b87afca688723b5d22c88caf22d
32,103
py
Python
plugin.video.kminus/urlfetch.py
jijarf/ahihi
ae7cd247126e1f014bc17a8abb0a16bc82ad6b4e
[ "Apache-2.0" ]
null
null
null
plugin.video.kminus/urlfetch.py
jijarf/ahihi
ae7cd247126e1f014bc17a8abb0a16bc82ad6b4e
[ "Apache-2.0" ]
null
null
null
plugin.video.kminus/urlfetch.py
jijarf/ahihi
ae7cd247126e1f014bc17a8abb0a16bc82ad6b4e
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' urlfetch ~~~~~~~~~~ An easy to use HTTP client based on httplib. :copyright: (c) 2011-2013 by Yue Du. :license: BSD 2-clause License, see LICENSE for more details. ''' __version__ = '0.5.3.1' __author__ = 'Yue Du <ifduyue@gmail.com>' __url__ = 'https://github.com/ifd...
32.825153
123
0.55487
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' urlfetch ~~~~~~~~~~ An easy to use HTTP client based on httplib. :copyright: (c) 2011-2013 by Yue Du. :license: BSD 2-clause License, see LICENSE for more details. ''' __version__ = '0.5.3.1' __author__ = 'Yue Du <ifduyue@gmail.com>' __url__ = 'https://github.com/ifd...
0
3,023
0
10,535
0
162
0
5
163
35a04d7ef6ea15c18e44fa8cccd5440f8adbc91b
553
py
Python
keyboards/inline/lists_markups.py
Ilya-koala/VSL_Bot
03399a49a2bc8baa97cc5d6f84a7406dbaafd262
[ "MIT" ]
null
null
null
keyboards/inline/lists_markups.py
Ilya-koala/VSL_Bot
03399a49a2bc8baa97cc5d6f84a7406dbaafd262
[ "MIT" ]
1
2021-06-25T18:53:54.000Z
2021-06-30T16:15:54.000Z
keyboards/inline/lists_markups.py
Ilya-koala/VSL_Bot
03399a49a2bc8baa97cc5d6f84a7406dbaafd262
[ "MIT" ]
3
2021-04-18T09:39:59.000Z
2021-05-18T16:47:19.000Z
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton start_page_keyboard = InlineKeyboardMarkup(row_width=2) new_list_but = InlineKeyboardButton( text=' ', callback_data='new_list') user_lists_but = InlineKeyboardButton( text=' ', callback_data='user_lists') start_page_keyboard.insert(new_lis...
32.529412
68
0.826401
from aiogram.types import InlineKeyboardMarkup, InlineKeyboardButton start_page_keyboard = InlineKeyboardMarkup(row_width=2) new_list_but = InlineKeyboardButton( text='Новый список', callback_data='new_list') user_lists_but = InlineKeyboardButton( text='Мои списки', callback_data='user_lists') start_page_key...
62
0
0
0
0
0
0
0
0
157d984157fc546d6714399c4867ca03729b0eee
4,400
py
Python
functions/rplot.py
adisen99/srfp
836059c942b396a5e70d36a0d544d0fa4a36272d
[ "MIT" ]
null
null
null
functions/rplot.py
adisen99/srfp
836059c942b396a5e70d36a0d544d0fa4a36272d
[ "MIT" ]
null
null
null
functions/rplot.py
adisen99/srfp
836059c942b396a5e70d36a0d544d0fa4a36272d
[ "MIT" ]
null
null
null
import numpy as np import matplotlib.pyplot as plt import seaborn as sns from scipy import stats def plot(data, x, y, type=None, **kwargs): """ Function to plot the corr coeff plot -------------------------- input 3 values data, x and y in this order and use this example - data = dataframe_na...
36.666667
133
0.5525
import numpy as np import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import xarray as xr from scipy import stats def plot(data, x, y, type=None, **kwargs): """ Function to plot the corr coeff plot -------------------------- input 3 values data, x and y in this order and use...
0
0
0
0
0
0
0
-4
44
dce3caac814b94fb6850fecf646ad36aed24fbb0
5,460
py
Python
train_batch_deform.py
ziashen/deblocking_pytorch
b156c5cbd26f0833089e5f1aee6e6d046579b56d
[ "MIT" ]
10
2018-01-19T08:56:02.000Z
2021-05-13T08:57:49.000Z
train_batch_deform.py
ziashen/deblocking_pytorch
b156c5cbd26f0833089e5f1aee6e6d046579b56d
[ "MIT" ]
1
2019-10-10T11:38:59.000Z
2019-10-10T11:38:59.000Z
train_batch_deform.py
ziashen/deblocking_pytorch
b156c5cbd26f0833089e5f1aee6e6d046579b56d
[ "MIT" ]
1
2018-04-03T00:44:23.000Z
2018-04-03T00:44:23.000Z
from __future__ import print_function import h5py import torch import torch.nn as nn import torch.optim as optim from model import NetARCNN_deform import argparse from datetime import datetime logfile = "log/log_deform_" + str(datetime.now()) + ".txt" train_data_path = "dataset/train_data.h5" test_data_path = "data...
36.4
196
0.678205
from __future__ import print_function from math import log10 import numpy import h5py import torch import torch.nn as nn import torch.optim as optim from torch.autograd import Variable from torch.utils.data import DataLoader from model import NetARCNN_deform import argparse from datetime import datetime logfile =...
0
0
0
0
0
2,842
0
24
159
c41a9eee3d7b9959b9844dde9bd583712843448f
1,925
py
Python
ab_tokenizers.py
supremestdoggo/AnswerBot
ec1d959479fd8727187a52dc5eedc2fce1fbcd9c
[ "MIT" ]
null
null
null
ab_tokenizers.py
supremestdoggo/AnswerBot
ec1d959479fd8727187a52dc5eedc2fce1fbcd9c
[ "MIT" ]
null
null
null
ab_tokenizers.py
supremestdoggo/AnswerBot
ec1d959479fd8727187a52dc5eedc2fce1fbcd9c
[ "MIT" ]
null
null
null
# Required functions def dict_sort(dictionary: dict) -> list: """Takes in a dictionary with integer values and outputs a list of the keys sorted by their associated values in descending order.""" return list(reversed(sorted(dictionary, key=dictionary.__getitem__)))
43.75
137
0.69974
from tokenizers import Tokenizer from tokenizers.models import BPE from tokenizers.pre_tokenizers import * from tokenizers.trainers import BpeTrainer import tokenizers # Required functions def convert_to_base(number: int, base: int, tokens: list) -> list: if number == 0: return [] return [tokens[numbe...
0
0
0
1,077
0
335
0
58
178
99975c770f2111135fd764df85659ccc0169ee32
226
py
Python
tools/bin/pythonSrc/pychecker-0.8.18/test_input/import98.py
YangHao666666/hawq
10cff8350f1ba806c6fec64eb67e0e6f6f24786c
[ "Artistic-1.0-Perl", "ISC", "bzip2-1.0.5", "TCL", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "PostgreSQL", "BSD-3-Clause" ]
450
2015-09-05T09:12:51.000Z
2018-08-30T01:45:36.000Z
tools/bin/pythonSrc/pychecker-0.8.18/test_input/import98.py
YangHao666666/hawq
10cff8350f1ba806c6fec64eb67e0e6f6f24786c
[ "Artistic-1.0-Perl", "ISC", "bzip2-1.0.5", "TCL", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "PostgreSQL", "BSD-3-Clause" ]
1,274
2015-09-22T20:06:16.000Z
2018-08-31T22:14:00.000Z
tools/bin/pythonSrc/pychecker-0.8.18/test_input/import98.py
YangHao666666/hawq
10cff8350f1ba806c6fec64eb67e0e6f6f24786c
[ "Artistic-1.0-Perl", "ISC", "bzip2-1.0.5", "TCL", "Apache-2.0", "BSD-3-Clause-No-Nuclear-License-2014", "MIT", "PostgreSQL", "BSD-3-Clause" ]
278
2015-09-21T19:15:06.000Z
2018-08-31T00:36:51.000Z
__doc__ = 'Auxiliary file for test98.py'
18.833333
49
0.654867
__doc__ = 'Auxiliary file for test98.py' class BaseGood: 'Nice base init' def __init__(self): return class BaseBad: 'Error should print as coming from this file' def __init__(self): return 42
0
0
0
139
0
0
0
0
46
e445bbd091149b9c272d954ed01204e9c61f2341
9,838
py
Python
api/test.py
stephensanwo/Filed-Audio-Server
eaa0e46eaef79f9c7c385a092b633f5f26c30cf1
[ "MIT" ]
null
null
null
api/test.py
stephensanwo/Filed-Audio-Server
eaa0e46eaef79f9c7c385a092b633f5f26c30cf1
[ "MIT" ]
null
null
null
api/test.py
stephensanwo/Filed-Audio-Server
eaa0e46eaef79f9c7c385a092b633f5f26c30cf1
[ "MIT" ]
null
null
null
import unittest # Define test data headers = dict(api_key="2c5a16d9-a951-4f62-ac68-e4df97e7b15d", api_client="jane.doe@email.com" ) # Change ID on run podcastTestID = "6046fcc995184fd26e82cac1" songTestID = "60471b3a669529b65c5ffb72" audiobookTestID = "60470a51b95704ef06d9925c" test_so...
33.576792
171
0.629091
import json import unittest from flask import Flask from api import api from database.AudioSchema import Song, Podcast, Audiobook # Define test data headers = dict(api_key="2c5a16d9-a951-4f62-ac68-e4df97e7b15d", api_client="jane.doe@email.com" ) # Change ID on run podcastTestID = "6046f...
0
0
0
8,686
0
0
0
26
111
11b5a355475739bdb7922d9a8a9f15e86ff5628c
7,309
py
Python
CheckOpenSslVulnerable.py
galletitaoreo/PythonPentest
abd46cc251abfc3fba02d7f03ddd049803dc6047
[ "MIT" ]
5
2019-08-07T08:59:53.000Z
2021-05-14T19:35:57.000Z
CheckOpenSslVulnerable.py
Harusenpai/PythonPentest
abd46cc251abfc3fba02d7f03ddd049803dc6047
[ "MIT" ]
null
null
null
CheckOpenSslVulnerable.py
Harusenpai/PythonPentest
abd46cc251abfc3fba02d7f03ddd049803dc6047
[ "MIT" ]
2
2021-03-31T21:20:19.000Z
2021-08-28T04:21:12.000Z
#!/usr/bin/env python # -*- encoding: utf-8 -*- #class for check open ssl Heartbleed vulnerability server_vulnerable =[] hello = h2bin(''' 16 03 02 00 dc 01 00 00 d8 03 02 53 43 5b 90 9d 9b 72 0b bc 0c bc 2b 92 a8 48 97 cf bd 39 04 cc 16 0a 85 03 90 9f 77 04 33 d4 de 00 00 66 c0 14 c0 0a c0 22 c0 21 00 39 00 38 ...
34.154206
124
0.499795
#!/usr/bin/env python # -*- encoding: utf-8 -*- #class for check open ssl Heartbleed vulnerability import socket import urllib2 import httplib import HTMLParser import base64 import sys import time import select import struct import shodan server_vulnerable =[] def h2bin(x): return x.replace(' ', '').replace('\...
0
0
0
4,136
0
1,960
0
-79
367
34665aadcd798a3633786f4d55dceecabc874540
8,757
py
Python
src/button.py
ReedyHarbour/15112-Term-Project
2e358d498db299e8d6f88c0438fbfe18836f0d7f
[ "Apache-2.0" ]
null
null
null
src/button.py
ReedyHarbour/15112-Term-Project
2e358d498db299e8d6f88c0438fbfe18836f0d7f
[ "Apache-2.0" ]
null
null
null
src/button.py
ReedyHarbour/15112-Term-Project
2e358d498db299e8d6f88c0438fbfe18836f0d7f
[ "Apache-2.0" ]
null
null
null
from direct.actor.Actor import Actor # Initialize buttons on init screen # Initialize buttons on play screen # Initialize buttons on tutorial screen
70.620968
117
0.523239
from direct.showbase.ShowBase import ShowBase from panda3d.core import CollisionTraverser, CollisionNode from panda3d.core import CollisionHandlerQueue, CollisionRay from panda3d.core import TextNode from panda3d.core import LPoint3, LVector3, BitMask32 from direct.actor.Actor import Actor from direct.gui.Onscree...
0
0
0
7,827
0
0
0
313
459
bb9cac3bb7a680903034962261a51b2bdcf59edb
1,216
py
Python
tests/test_compose.py
edwardcjohnson/litmus
c8163076610d9150bce44c37ee69f1b533f77e69
[ "MIT" ]
1
2021-07-19T20:06:42.000Z
2021-07-19T20:06:42.000Z
tests/test_compose.py
edwardcjohnson/litmus
c8163076610d9150bce44c37ee69f1b533f77e69
[ "MIT" ]
1
2021-07-11T02:19:28.000Z
2021-07-11T02:19:28.000Z
tests/test_compose.py
edwardcjohnson/litmus
c8163076610d9150bce44c37ee69f1b533f77e69
[ "MIT" ]
null
null
null
import pathlib this_path = pathlib.Path(__file__).parent.resolve()
32
74
0.615132
import pytest import filecmp import litmus.compose import os import pathlib this_path = pathlib.Path(__file__).parent.resolve() class TestClassComposeTestModuleSkeleton(): @pytest.mark.parametrize( "params,expected", [ [ { 'module_file': "example_mod...
0
1,017
0
22
0
0
0
-27
138
467edac35ee660415b5a35d3569aec6a4bb9d1d1
1,600
py
Python
qiskit/backends/basejob.py
Hosseinyeganeh/qiskit-core
c07c7435ce60c180b0826b70b55d454eaaa7bc35
[ "Apache-2.0" ]
null
null
null
qiskit/backends/basejob.py
Hosseinyeganeh/qiskit-core
c07c7435ce60c180b0826b70b55d454eaaa7bc35
[ "Apache-2.0" ]
null
null
null
qiskit/backends/basejob.py
Hosseinyeganeh/qiskit-core
c07c7435ce60c180b0826b70b55d454eaaa7bc35
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright 2017, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """This module implements the abstract base class for backend jobs When creating a new backend module it is also necessary t...
22.535211
77
0.63125
# -*- coding: utf-8 -*- # Copyright 2017, IBM. # # This source code is licensed under the Apache License, Version 2.0 found in # the LICENSE.txt file in the root directory of this source tree. """This module implements the abstract base class for backend jobs When creating a new backend module it is also necessary t...
0
583
0
564
0
0
0
4
91
0c63b0edbf8ccad4d19fcaf2f4c35b7f96d7a639
1,789
py
Python
src/nodes/corenodes/input/string_node.py
yonMaor/GimelStudio
7ed7db429e61e0413791ad261583c7018f888953
[ "Apache-2.0" ]
null
null
null
src/nodes/corenodes/input/string_node.py
yonMaor/GimelStudio
7ed7db429e61e0413791ad261583c7018f888953
[ "Apache-2.0" ]
null
null
null
src/nodes/corenodes/input/string_node.py
yonMaor/GimelStudio
7ed7db429e61e0413791ad261583c7018f888953
[ "Apache-2.0" ]
null
null
null
# ---------------------------------------------------------------------------- # Gimel Studio Copyright 2019-2022 by the Gimel Studio project contributors # # 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...
30.844828
85
0.577418
# ---------------------------------------------------------------------------- # Gimel Studio Copyright 2019-2022 by the Gimel Studio project contributors # # 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...
0
251
0
659
0
0
0
0
23
2e29bf7042a771e8fd7cd807ba0da606f1083e06
215
py
Python
crosspredict/nodes/__init__.py
ya-ds/crosspredict
d0902e7e5776db2e29c6f92aac0c61927502887d
[ "MIT" ]
19
2020-04-05T18:23:44.000Z
2022-03-21T09:13:47.000Z
crosspredict/nodes/__init__.py
crosspredict/crosspredict
b64d6fe5d985b90c6845508b912482011b9b37cf
[ "MIT" ]
null
null
null
crosspredict/nodes/__init__.py
crosspredict/crosspredict
b64d6fe5d985b90c6845508b912482011b9b37cf
[ "MIT" ]
1
2021-08-03T06:36:02.000Z
2021-08-03T06:36:02.000Z
from ._nodes import model_fit, forward_selection, make_report, hyperopt_fit, model_single_fit, onefactor __all__ = ['model_fit', 'forward_selection', 'make_report', 'hyperopt_fit', 'model_single_fit', 'onefactor']
53.75
108
0.795349
from ._nodes import model_fit, forward_selection, make_report, hyperopt_fit, model_single_fit, onefactor __all__ = ['model_fit', 'forward_selection', 'make_report', 'hyperopt_fit', 'model_single_fit', 'onefactor']
0
0
0
0
0
0
0
0
0
13690d01007c12e76226d64c732b810f7d4e1aa0
13,094
py
Python
imagen/boundingregion.py
aopy/imagen
8e69d02bf43a8980f1c1fc19f6aa0fbf23db49fe
[ "BSD-3-Clause" ]
null
null
null
imagen/boundingregion.py
aopy/imagen
8e69d02bf43a8980f1c1fc19f6aa0fbf23db49fe
[ "BSD-3-Clause" ]
null
null
null
imagen/boundingregion.py
aopy/imagen
8e69d02bf43a8980f1c1fc19f6aa0fbf23db49fe
[ "BSD-3-Clause" ]
2
2021-02-16T09:39:04.000Z
2021-04-15T12:24:14.000Z
""" Bounding regions and bounding boxes. """ __version__='$Revision$' ### JABALERT: The aarect information should probably be rewritten in ### matrix notation, not list notation, so that it can be scaled, ### translated, etc. easily. ### # CEBALERT: various subclasses of BoundingRegion, such as # BoundingCircle, ...
31.250597
186
0.614404
""" Bounding regions and bounding boxes. """ __version__='$Revision$' from numpy import inf ### JABALERT: The aarect information should probably be rewritten in ### matrix notation, not list notation, so that it can be scaled, ### translated, etc. easily. ### import param from param.parameterized import get_occupied...
0
0
0
11,085
0
17
0
20
294
177eb35e07274d88b2f806f2b433da19de4b9c4c
139
py
Python
src/stdio/hello.py
mincong-h/Python-Exercises
ef210371b6c6e28eec922a800e2164cdf30b496b
[ "Apache-2.0" ]
1
2018-02-25T21:37:39.000Z
2018-02-25T21:37:39.000Z
src/stdio/hello.py
mincong-h/Python-Exercises
ef210371b6c6e28eec922a800e2164cdf30b496b
[ "Apache-2.0" ]
3
2017-05-02T16:10:50.000Z
2021-05-17T19:37:53.000Z
src/stdio/hello.py
mincong-h/Python-Exercises
ef210371b6c6e28eec922a800e2164cdf30b496b
[ "Apache-2.0" ]
1
2015-12-03T17:51:19.000Z
2015-12-03T17:51:19.000Z
#!/usr/bin/env python3 if __name__ == "__main__": main()
11.583333
27
0.582734
#!/usr/bin/env python3 import sys def main(): name = sys.argv[1] print(f"Hello, {name}") if __name__ == "__main__": main()
0
0
0
0
0
41
0
-11
45
37e3c453b123de4943ad40d0ef44a83386f3f8bf
23,356
py
Python
pybind/slxos/v16r_1_00b/openflow_state/resources/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v16r_1_00b/openflow_state/resources/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
null
null
null
pybind/slxos/v16r_1_00b/openflow_state/resources/__init__.py
shivharis/pybind
4e1c6d54b9fd722ccec25546ba2413d79ce337e6
[ "Apache-2.0" ]
1
2021-11-05T22:15:42.000Z
2021-11-05T22:15:42.000Z
import pyangbind.lib.xpathhelper as xpathhelper
71.644172
838
0.749829
from operator import attrgetter import pyangbind.lib.xpathhelper as xpathhelper from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType, RestrictedClassType, TypedListType from pyangbind.lib.yangtypes import YANGBool, YANGListType, YANGDynClass, ReferenceType from pyangbind.lib.base import PybindBase from d...
0
0
0
22,888
0
0
0
197
221
e316e03ba5f9f8206bebd166a6ed9a4d32c8d22d
955
py
Python
kuber/tests/kube_api/test_execute.py
datalayer-externals/kuber
4d577950ce7d1be2b882fbe66827dc3d7e67b350
[ "MIT" ]
1
2019-06-11T04:57:34.000Z
2019-06-11T04:57:34.000Z
kuber/tests/kube_api/test_execute.py
datalayer-externals/kuber
4d577950ce7d1be2b882fbe66827dc3d7e67b350
[ "MIT" ]
1
2019-05-05T22:08:13.000Z
2019-05-06T11:43:32.000Z
kuber/tests/kube_api/test_execute.py
datalayer-externals/kuber
4d577950ce7d1be2b882fbe66827dc3d7e67b350
[ "MIT" ]
2
2021-05-08T14:47:56.000Z
2021-10-15T21:47:04.000Z
from unittest.mock import MagicMock from unittest.mock import patch import pytest from kuber import kube_api from kuber.latest import core_v1 def test_execute(): """Should execute the specified action on the service without error.""" service = core_v1.Service() service.metadata.name = "foo" api = M...
28.939394
80
0.717277
from unittest.mock import MagicMock from unittest.mock import patch import pytest from kuber import kube_api from kuber.latest import core_v1 def test_execute(): """Should execute the specified action on the service without error.""" service = core_v1.Service() service.metadata.name = "foo" api = M...
0
0
0
0
0
0
0
0
0
4dc7dd8ba9e4e924695a0e6631b365c9dd4b423b
2,430
py
Python
CV/localizeCorrectAnswer.py
danielrojasperez/smartlaser
c9b51ec96e699412bb4924c5031efe3cdb5c1b14
[ "MIT" ]
null
null
null
CV/localizeCorrectAnswer.py
danielrojasperez/smartlaser
c9b51ec96e699412bb4924c5031efe3cdb5c1b14
[ "MIT" ]
2
2020-05-26T22:53:21.000Z
2020-06-14T04:24:54.000Z
CV/localizeCorrectAnswer.py
danielrojasperez/smartlaser
c9b51ec96e699412bb4924c5031efe3cdb5c1b14
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created on Tue May 12 21:03:53 2020 @author: xange """ import sys if __name__ == '__main__': localizeCorrectAnswer(str(sys.argv[1]))
24.3
103
0.569547
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created on Tue May 12 21:03:53 2020 @author: xange """ import pytesseract import os from matplotlib import pyplot as plt import numpy as np import cv2 from PIL import Image from difflib import SequenceMatcher import sys def similar(a, b): return SequenceMatcher(None,...
0
0
0
0
0
2,039
0
0
201
659f0b858d65e086bd782bc85435b9d4d384bb61
5,619
py
Python
adafruit_epd/ssd1608.py
makermelissa/Adafruit_CircuitPython_EPD
d738c779a65ea91a7f3d897214b0dba035a65212
[ "Unlicense", "MIT-0", "MIT" ]
26
2018-09-12T21:08:38.000Z
2022-03-18T03:21:06.000Z
adafruit_epd/ssd1608.py
makermelissa/Adafruit_CircuitPython_EPD
d738c779a65ea91a7f3d897214b0dba035a65212
[ "Unlicense", "MIT-0", "MIT" ]
35
2018-07-18T17:52:03.000Z
2021-07-05T21:55:17.000Z
adafruit_epd/ssd1608.py
makermelissa/Adafruit_CircuitPython_EPD
d738c779a65ea91a7f3d897214b0dba035a65212
[ "Unlicense", "MIT-0", "MIT" ]
17
2018-08-04T15:51:21.000Z
2022-03-18T15:04:51.000Z
# SPDX-FileCopyrightText: 2018 Dean Miller for Adafruit Industries # # SPDX-License-Identifier: MIT """ `adafruit_epd.ssd1608` - Adafruit SSD1608 - ePaper display driver ==================================================================================== CircuitPython driver for Adafruit SSD1608 display breakouts * Au...
36.019231
135
0.663107
# SPDX-FileCopyrightText: 2018 Dean Miller for Adafruit Industries # # SPDX-License-Identifier: MIT """ `adafruit_epd.ssd1608` - Adafruit SSD1608 - ePaper display driver ==================================================================================== CircuitPython driver for Adafruit SSD1608 display breakouts * Au...
0
0
0
3,768
0
0
0
13
90
acdfde94a8197159c7eaef4c002ca194ef474b55
20
py
Python
imaginarium/storage/user/__init__.py
LordFeratum/Imaginarium
ce52f5cad7727aab2e81fcf36f662f55dea9330a
[ "MIT" ]
null
null
null
imaginarium/storage/user/__init__.py
LordFeratum/Imaginarium
ce52f5cad7727aab2e81fcf36f662f55dea9330a
[ "MIT" ]
null
null
null
imaginarium/storage/user/__init__.py
LordFeratum/Imaginarium
ce52f5cad7727aab2e81fcf36f662f55dea9330a
[ "MIT" ]
null
null
null
tablename = 'users'
10
19
0.7
tablename = 'users'
0
0
0
0
0
0
0
0
0
5ae6537f3a5cc22ceb07e2ea867b5baa41f82904
1,674
py
Python
src/MULSolver.py
Adhesh148/Tomasulo-Sim
bbc7aa14804d44dda9871433a9b1e654630cb18a
[ "MIT" ]
2
2022-01-05T01:45:24.000Z
2022-01-08T09:00:37.000Z
src/MULSolver.py
Adhesh148/Tomasulo-Sim
bbc7aa14804d44dda9871433a9b1e654630cb18a
[ "MIT" ]
null
null
null
src/MULSolver.py
Adhesh148/Tomasulo-Sim
bbc7aa14804d44dda9871433a9b1e654630cb18a
[ "MIT" ]
null
null
null
#obj = MULSolve(-3, 7) #r = obj.solve() #print(r)
18.808989
59
0.606332
import subprocess import re import helper class MULSolve: def __init__(self,opnd1,opnd2,filename="mul_tb.v"): self.opnd1 = opnd1 self.opnd2 = opnd2 self.filename = filename def solve(self): flag = 0 if self.opnd1 < 0 and self.opnd2 < 0: self.opnd1 = self.opnd1 * -1 self.opnd2 = self.opnd2 * -1 f...
0
0
0
1,559
0
0
0
-24
89
8042b72545729eb6a31f37e993e1896918d532bb
284
py
Python
Lecture 03/forloop.py
TyeolRik/UOS_Algorithm_Codebook
b786ee23fc114d219d7dd25fb6438ad9f835ba1e
[ "MIT" ]
null
null
null
Lecture 03/forloop.py
TyeolRik/UOS_Algorithm_Codebook
b786ee23fc114d219d7dd25fb6438ad9f835ba1e
[ "MIT" ]
null
null
null
Lecture 03/forloop.py
TyeolRik/UOS_Algorithm_Codebook
b786ee23fc114d219d7dd25fb6438ad9f835ba1e
[ "MIT" ]
null
null
null
n = 10 a = [[0 for x in range(n)] for x in range(n)] b = [[0 for x in range(n)] for x in range(n)] c = [[0 for x in range(n)] for x in range(n)] for i in range(n): for j in range(n): c[i][j] = 0 for k in range(n): c[i][j] = c[i][j] + a[i][k] * b[k][j]
28.4
49
0.46831
n = 10 a = [[0 for x in range(n)] for x in range(n)] b = [[0 for x in range(n)] for x in range(n)] c = [[0 for x in range(n)] for x in range(n)] for i in range(n): for j in range(n): c[i][j] = 0 for k in range(n): c[i][j] = c[i][j] + a[i][k] * b[k][j]
0
0
0
0
0
0
0
0
0
6b1985695f3bfe45e77f89ccc5b9d12385c09fa8
27,654
py
Python
manila/tests/network/linux/test_ip_lib.py
redhat-openstack/manila
bef43561b303a36d99849952ba8c408b19bafd02
[ "Apache-2.0" ]
null
null
null
manila/tests/network/linux/test_ip_lib.py
redhat-openstack/manila
bef43561b303a36d99849952ba8c408b19bafd02
[ "Apache-2.0" ]
null
null
null
manila/tests/network/linux/test_ip_lib.py
redhat-openstack/manila
bef43561b303a36d99849952ba8c408b19bafd02
[ "Apache-2.0" ]
null
null
null
# Copyright 2014 Mirantis 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
40.370803
79
0.587401
# Copyright 2014 Mirantis 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
0
0
0
23,278
0
0
0
10
321
4804b5c1a9808e565ed5783c6b82e5bb1b8d0d31
16,955
py
Python
call_openalex_api.py
ourresearch/openalex-api
b689f5c3a2946d8dc9a0ef5107d721c0ac3a4bed
[ "MIT" ]
6
2021-06-15T09:24:09.000Z
2022-03-10T18:39:43.000Z
call_openalex_api.py
ourresearch/openalex-api
b689f5c3a2946d8dc9a0ef5107d721c0ac3a4bed
[ "MIT" ]
2
2021-07-19T12:09:15.000Z
2022-02-15T01:26:06.000Z
call_openalex_api.py
ourresearch/openalex-api
b689f5c3a2946d8dc9a0ef5107d721c0ac3a4bed
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding: utf-8 -*- import argparse import random from time import time from itertools import combinations from util import elapsed # # pick a random number from 1 to 8 # pick that many attributes from list # for each of them, pick a random setting # pick an aggregation level (top dois, top journ...
38.015695
177
0.646476
#!/usr/bin/python # -*- coding: utf-8 -*- import os import json import re import argparse import random from time import time from itertools import combinations from app import db from util import run_sql from util import safe_commit from util import Timer from util import elapsed from app import get_db_cursor # # p...
0
0
0
0
0
7,612
0
-18
316
ad7f1c5c26125e38aced5b7192a5d2c53a228966
45,474
py
Python
xpath/compilerv1/XPathParser.py
cs4221/xpath
55cbfe7e7e0d4ec0edd85cf0cb5fa9c0320356e6
[ "Unlicense" ]
null
null
null
xpath/compilerv1/XPathParser.py
cs4221/xpath
55cbfe7e7e0d4ec0edd85cf0cb5fa9c0320356e6
[ "Unlicense" ]
null
null
null
xpath/compilerv1/XPathParser.py
cs4221/xpath
55cbfe7e7e0d4ec0edd85cf0cb5fa9c0320356e6
[ "Unlicense" ]
null
null
null
# Generated from .\xpath\xpathgrammer\XPath.g4 by ANTLR 4.9.3 # encoding: utf-8 import sys if sys.version_info[1] > 5: from typing import TextIO else:
33.192701
191
0.587611
# Generated from .\xpath\xpathgrammer\XPath.g4 by ANTLR 4.9.3 # encoding: utf-8 from antlr4 import * from io import StringIO import sys if sys.version_info[1] > 5: from typing import TextIO else: from typing.io import TextIO def serializedATN(): with StringIO() as buf: buf.write("\3\u608b\ua72a\u8133\ub...
0
0
0
41,567
0
3,627
0
8
113
14612923448cbe6faf2090c1e83774b2bb10eabc
9,899
py
Python
placement_alg/widest_path.py
nigsics/dcpmtool
2fa9f2424c6b4b1f4d279f4bb644b14cfde7fa39
[ "Apache-2.0" ]
3
2018-04-25T08:56:58.000Z
2020-10-10T01:45:38.000Z
placement_alg/widest_path.py
nigsics/dcpmtool
2fa9f2424c6b4b1f4d279f4bb644b14cfde7fa39
[ "Apache-2.0" ]
null
null
null
placement_alg/widest_path.py
nigsics/dcpmtool
2fa9f2424c6b4b1f4d279f4bb644b14cfde7fa39
[ "Apache-2.0" ]
null
null
null
__author__ = 'lsteng' # Copyright 2018 Shaoteng Liu # 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 ag...
31.626198
111
0.457521
__author__ = 'lsteng' # Copyright 2018 Shaoteng Liu # 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 ag...
0
0
0
0
0
5,186
0
0
91
d8ed6e1a4c2d4bb9cd6d5f71dc3e9a86081a3142
10,146
py
Python
python/modules/connection.py
DuckLov3r/sovrin-whs
3f2c9e6749834e1abde26d3acc8ce9312564534a
[ "Apache-2.0" ]
null
null
null
python/modules/connection.py
DuckLov3r/sovrin-whs
3f2c9e6749834e1abde26d3acc8ce9312564534a
[ "Apache-2.0" ]
null
null
null
python/modules/connection.py
DuckLov3r/sovrin-whs
3f2c9e6749834e1abde26d3acc8ce9312564534a
[ "Apache-2.0" ]
null
null
null
""" Module to handle the connection process. """ # pylint: disable=import-error
32.941558
119
0.599645
""" Module to handle the connection process. """ # pylint: disable=import-error import json import base64 import uuid import aiohttp from indy import crypto, did, pairwise, non_secrets import serializer.json_serializer as Serializer from router.simple_router import SimpleRouter from . import Module from message imp...
0
0
7,871
1,828
0
0
0
97
269
0aa4a14db216c3368a4fe2d774090f7652b2ff51
352
py
Python
test-simple/tests.py
Tobils/recipe-app-api
3b0948dfd7dbefc57ae85ba8b51fcf77c5c04344
[ "MIT" ]
1
2021-02-09T04:14:18.000Z
2021-02-09T04:14:18.000Z
test-simple/tests.py
Tobils/recipe-app-api
3b0948dfd7dbefc57ae85ba8b51fcf77c5c04344
[ "MIT" ]
null
null
null
test-simple/tests.py
Tobils/recipe-app-api
3b0948dfd7dbefc57ae85ba8b51fcf77c5c04344
[ "MIT" ]
null
null
null
""" run unit testing """
22
44
0.667614
from django.test import TestCase from app.calc import add, substract """ run unit testing """ class CalcTest(TestCase): """ test add 2 those number """ def test_add_numbers(self): self.assertEqual(add(3,8), 11) """ test subtract 2 those number """ def test_subtract_number(self): self...
0
0
0
235
0
0
0
25
66
48afb7387053f88932b37b3050e723a814bf71b5
60,513
py
Python
app.py
BastelPichi/duco-rest-api
2d39a3462bc49186deaca48184a67e452c6acb44
[ "MIT" ]
9
2021-06-25T19:53:35.000Z
2022-03-20T21:40:08.000Z
app.py
BastelPichi/duco-rest-api
2d39a3462bc49186deaca48184a67e452c6acb44
[ "MIT" ]
3
2021-07-19T13:01:53.000Z
2022-03-12T14:38:00.000Z
app.py
BastelPichi/duco-rest-api
2d39a3462bc49186deaca48184a67e452c6acb44
[ "MIT" ]
17
2021-05-18T07:58:45.000Z
2022-02-08T17:10:55.000Z
#!/usr/bin/env python3 """ Duino-Coin REST API MIT licensed https://duinocoin.com https://github.com/revoxhere/duco-rest-api Duino-Coin Team & Community 2019-2021 """ import gevent.monkey gevent.monkey.patch_all() from Server import (SAVE_TIME, CONFIG_WHITELIST_USR, jail, DUCO_EMAIL, DUCO_PASS, CONFIG_BANS, CONFIG_JA...
33.562396
164
0.555368
#!/usr/bin/env python3 """ Duino-Coin REST API © MIT licensed https://duinocoin.com https://github.com/revoxhere/duco-rest-api Duino-Coin Team & Community 2019-2021 """ import gevent.monkey gevent.monkey.patch_all() from wrapped_duco_functions import * from Server import ( now, SAVE_TIME, POOL_DATABASE, CONFIG_WHI...
22
44,466
0
0
0
9,449
0
542
1,681
5a926a66a5d43086942d947198f1101fa00dd692
1,108
py
Python
exponent/ds_2.py
vinaykumar2491/ProgrammingContests
ae250797121761cf7a4aca0e38410b3ced5107f3
[ "MIT" ]
null
null
null
exponent/ds_2.py
vinaykumar2491/ProgrammingContests
ae250797121761cf7a4aca0e38410b3ced5107f3
[ "MIT" ]
null
null
null
exponent/ds_2.py
vinaykumar2491/ProgrammingContests
ae250797121761cf7a4aca0e38410b3ced5107f3
[ "MIT" ]
null
null
null
## @imflash217 ## ## creating a new file with open("numbers.txt", "w") as file: for i in range(1000): print(str(i), file=file) ################################################################## ################################################################# #########################################...
25.181818
77
0.444946
## @imflash217 ## ## creating a new file with open("numbers.txt", "w") as file: for i in range(1000): print(str(i), file=file) ################################################################## def find_max(input): max_num = float("-inf") for x in input: if x > max_num: max_n...
0
0
0
0
0
504
0
-9
69
72c083cc21d6203af2fadb7ffc19c38bb11cbbb0
12,612
py
Python
agents/DQNAgent.py
bshahrok/Deep-Reinforcement-Learning-in-Video-Games
4f72dca6061e34b002f99a03d9b287e6012e8095
[ "MIT" ]
2
2019-03-26T10:05:18.000Z
2021-02-15T13:12:17.000Z
agents/DQNAgent.py
vigneshwerv/Deep-Reinforcement-Learning-in-Video-Games
4f72dca6061e34b002f99a03d9b287e6012e8095
[ "MIT" ]
null
null
null
agents/DQNAgent.py
vigneshwerv/Deep-Reinforcement-Learning-in-Video-Games
4f72dca6061e34b002f99a03d9b287e6012e8095
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger(__name__) logger.setLevel(logging.INFO)
45.042857
103
0.545512
from BaseAgent import BaseAgent import logging import math import numpy as np import os import tensorflow as tf logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) class DQNAgent(BaseAgent): def __init__(self, num_actions, discount_factor, args): self.learning_rate = 0.00025 self...
0
0
0
12,408
0
0
0
-13
133
eac43592668ca085fcebcd39100216c26abd2264
11,222
py
Python
python3/prac/pracutils/evalSim.py
danielnyga/prac-dev
107855cb9ddc294467098334725065b3937af150
[ "BSD-2-Clause" ]
3
2018-10-04T05:13:02.000Z
2022-01-18T15:06:05.000Z
python3/prac/pracutils/evalSim.py
danielnyga/prac-dev
107855cb9ddc294467098334725065b3937af150
[ "BSD-2-Clause" ]
2
2017-03-01T07:17:14.000Z
2019-06-26T14:28:57.000Z
python3/prac/pracutils/evalSim.py
danielnyga/prac-dev
107855cb9ddc294467098334725065b3937af150
[ "BSD-2-Clause" ]
2
2018-12-18T23:01:11.000Z
2020-12-15T08:57:19.000Z
# Classifier Evaluation incorporating similarity # # (C) 2015 by Mareike Picklum (mareikep@cs.uni-bremen.de) # # 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 #...
38.563574
208
0.553466
# Classifier Evaluation incorporating similarity # # (C) 2015 by Mareike Picklum (mareikep@cs.uni-bremen.de) # # 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 #...
0
0
0
9,185
0
0
0
45
90
cea4763f283e9922cebaf401d808749b89edeaaf
4,390
py
Python
test/sample_workspaces.py
EiffL/NaMaster
41cc7839083511fe6be2eb20e93b8916c5c1f1f3
[ "BSD-3-Clause" ]
null
null
null
test/sample_workspaces.py
EiffL/NaMaster
41cc7839083511fe6be2eb20e93b8916c5c1f1f3
[ "BSD-3-Clause" ]
null
null
null
test/sample_workspaces.py
EiffL/NaMaster
41cc7839083511fe6be2eb20e93b8916c5c1f1f3
[ "BSD-3-Clause" ]
null
null
null
import numpy as np import healpy as hp import matplotlib.pyplot as plt import pymaster as nmt #This script showcases the use of NmtWorkspace objects to speed up the #computation of power spectra for many pairs of fields with the same masks. #HEALPix map resolution nside=256 #We start by creating some synthetic masks...
43.9
85
0.76287
import numpy as np import healpy as hp import matplotlib.pyplot as plt import pymaster as nmt #This script showcases the use of NmtWorkspace objects to speed up the #computation of power spectra for many pairs of fields with the same masks. #HEALPix map resolution nside=256 #We start by creating some synthetic masks...
0
0
0
0
0
430
0
0
22
23243da7052f006bbe70b2a349f2bab91fd279fd
1,027
py
Python
tests/settings.py
emanuelschuetze/openslides-csv-export
b1d1761fb6575522c9c7ed1b7e392892cf412dbe
[ "MIT" ]
null
null
null
tests/settings.py
emanuelschuetze/openslides-csv-export
b1d1761fb6575522c9c7ed1b7e392892cf412dbe
[ "MIT" ]
null
null
null
tests/settings.py
emanuelschuetze/openslides-csv-export
b1d1761fb6575522c9c7ed1b7e392892cf412dbe
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # Settings file for OpenSlides # # Use 'DEBUG = True' to get more details for server errors. Default for releases: False DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': '', 'USER': '', 'PASSWOR...
21.395833
87
0.665044
# -*- coding: utf-8 -*- # # Settings file for OpenSlides # from openslides.global_settings import * # noqa # Use 'DEBUG = True' to get more details for server errors. Default for releases: False DEBUG = True TEMPLATE_DEBUG = DEBUG DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', ...
0
0
0
0
0
0
0
19
31
a8020b9a1ff94de8ba3e1410065695320cdc91e5
23,837
py
Python
jabs/utils.py
hertogp/jabs
ed419caa448075dcf327d2af561952a385115228
[ "MIT" ]
1
2021-05-14T03:17:48.000Z
2021-05-14T03:17:48.000Z
jabs/utils.py
hertogp/jabs
ed419caa448075dcf327d2af561952a385115228
[ "MIT" ]
null
null
null
jabs/utils.py
hertogp/jabs
ed419caa448075dcf327d2af561952a385115228
[ "MIT" ]
1
2017-10-31T02:04:52.000Z
2017-10-31T02:04:52.000Z
''' Utility functions for other modules. ''' import os import sys import re import math import pandas as pd import pytricia as pt def normalize(astr): 'no whitespace or dots in string' return re.sub(r'(\s|\.)+', '_', astr) def load_csv(filename): 'csv file to dataframe w/ normalized column names' tr...
33.907539
85
0.55095
''' Utility functions for other modules. ''' import os import sys import re import math import pandas as pd import pytricia as pt def normalize(astr): 'no whitespace or dots in string' return re.sub(r'(\s|\.)+', '_', astr) def load_csv(filename): 'csv file to dataframe w/ normalized column names' tr...
0
0
0
0
226
2,433
0
0
206
10648d12482ca5c474323092621d63ac5f0c8b80
1,069
py
Python
server/apps/streamfilter/actions/rpt_action/action.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
server/apps/streamfilter/actions/rpt_action/action.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
server/apps/streamfilter/actions/rpt_action/action.py
iotile/iotile_cloud
9dc65ac86d3a730bba42108ed7d9bbb963d22ba6
[ "MIT" ]
null
null
null
import logging logger = logging.getLogger(__name__)
27.410256
94
0.616464
import json import logging from apps.report.worker.report_generator import ReportGeneratorAction from apps.utils.timezone_utils import str_utc from ..action import BaseAction logger = logging.getLogger(__name__) class RptAction(BaseAction): REQUIRED_EXTRA_KEYS = ['rpt', ] def __str__(self): return...
0
0
0
830
0
0
0
72
113
0f21790d7e2ded34aa59a847b16f7fce04b80afe
8,939
py
Python
bert_ptrnet_coqa_util.py
yumere/for-QuAC
af1594a0856e20a526e3c3f383b1f8fbfdf7ddd3
[ "MIT" ]
2
2019-07-30T15:38:24.000Z
2019-08-08T15:49:13.000Z
bert_ptrnet_coqa_util.py
yumere/for-QuAC
af1594a0856e20a526e3c3f383b1f8fbfdf7ddd3
[ "MIT" ]
null
null
null
bert_ptrnet_coqa_util.py
yumere/for-QuAC
af1594a0856e20a526e3c3f383b1f8fbfdf7ddd3
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, print_function import logging from tqdm import tqdm logger = logging.getLogger(__name__) logging.basicConfig(format='%(asctime)s - %(levelname)s - %(name)s - %(message)s', datefmt='%m/%d/%Y %H:%M:%S', level=logging.INFO) i...
39.90625
131
0.617183
from __future__ import absolute_import, division, print_function import json import logging import os import pickle import random from typing import List import numpy as np import torch from dataclasses import dataclass from pytorch_transformers import BertTokenizer from torch.utils.data import Dataset from tqdm impo...
0
1,402
0
668
0
5,432
0
4
291
b95d861a508f3a035c2743a1a92120b16b459ab5
7,228
py
Python
calicoctl/calico_ctl/diags.py
wrouesnel/calico-containers
120e41f1e11fdb6640a10d063bdea5775dd03a47
[ "Apache-2.0" ]
null
null
null
calicoctl/calico_ctl/diags.py
wrouesnel/calico-containers
120e41f1e11fdb6640a10d063bdea5775dd03a47
[ "Apache-2.0" ]
null
null
null
calicoctl/calico_ctl/diags.py
wrouesnel/calico-containers
120e41f1e11fdb6640a10d063bdea5775dd03a47
[ "Apache-2.0" ]
1
2020-08-02T16:41:33.000Z
2020-08-02T16:41:33.000Z
# Copyright 2015 Metaswitch Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
37.450777
106
0.641118
# Copyright 2015 Metaswitch Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in w...
0
0
0
1,667
0
3,963
0
36
290