hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
6a306b67e04bd9ee4518bc5dd6e295cbacb63b7c
321
py
Python
aoclib/edge.py
BrendanLeber/aoclib
67c6939cf045f812855339f496db55eb441cfe7f
[ "MIT" ]
null
null
null
aoclib/edge.py
BrendanLeber/aoclib
67c6939cf045f812855339f496db55eb441cfe7f
[ "MIT" ]
null
null
null
aoclib/edge.py
BrendanLeber/aoclib
67c6939cf045f812855339f496db55eb441cfe7f
[ "MIT" ]
1
2019-03-21T16:21:03.000Z
2019-03-21T16:21:03.000Z
# -*- coding: utf-8 -*- from __future__ import annotations from dataclasses import dataclass @dataclass
17.833333
38
0.604361
# -*- coding: utf-8 -*- from __future__ import annotations from dataclasses import dataclass @dataclass class Edge: u: int # the "from" vertex v: int # the "to" vertex def __str__(self) -> str: return f"{self.u} -> {self.v}" def reversed(self) -> Edge: return Edge(self.v, self.u)...
85
106
22
cb875a5067dc949e30897b549f24e12ff78ddb3c
218
py
Python
src/fractal/world/_realizing/_op/flowing.py
jedhsu/fractal
97833ddc5063fae72352cf590738fef508c02f0c
[ "MIT" ]
null
null
null
src/fractal/world/_realizing/_op/flowing.py
jedhsu/fractal
97833ddc5063fae72352cf590738fef508c02f0c
[ "MIT" ]
null
null
null
src/fractal/world/_realizing/_op/flowing.py
jedhsu/fractal
97833ddc5063fae72352cf590738fef508c02f0c
[ "MIT" ]
null
null
null
""" Flow ==== Time-related operations for a realizing world. """ from ..realizing import Realizing
10.9
46
0.623853
""" Flow ==== Time-related operations for a realizing world. """ from ..realizing import Realizing class Flowing( Realizing, ): def at_dawn(self): pass def has_world_ended(self): pass
28
11
76
cdec793af3e3d4f747ac579ba41367a9a96a9dcd
3,312
py
Python
tests/test_option_binding.py
clidoc/clidoc.python
cbc2717aa3ba6cd279c8106784bc711febbef29c
[ "MIT" ]
null
null
null
tests/test_option_binding.py
clidoc/clidoc.python
cbc2717aa3ba6cd279c8106784bc711febbef29c
[ "MIT" ]
3
2015-05-10T06:45:37.000Z
2015-05-15T08:26:14.000Z
tests/test_option_binding.py
clidoc/clidoc.python
cbc2717aa3ba6cd279c8106784bc711febbef29c
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import (division, absolute_import, print_function, unicode_literals) from clidoc_option_binding import * from utils import generate_key_checker, CLIDOC_TEST_MODE key_checker = generate_key_checker( { "-c", "--long-4", "comman...
21.647059
66
0.513587
# -*- coding: utf-8 -*- from __future__ import (division, absolute_import, print_function, unicode_literals) from clidoc_option_binding import * from utils import generate_key_checker, CLIDOC_TEST_MODE key_checker = generate_key_checker( { "-c", "--long-4", "comman...
2,605
0
207
4034a523b36517e6a0bdf04a9888a83e2ea95364
252
py
Python
pyuri/__init__.py
nick-allen/python-uri
a526316270b83cd76651baec016d1509aab68981
[ "MIT" ]
1
2016-07-29T01:29:04.000Z
2016-07-29T01:29:04.000Z
pyuri/__init__.py
nick-allen/pyuri
a526316270b83cd76651baec016d1509aab68981
[ "MIT" ]
1
2016-10-24T15:03:30.000Z
2016-11-01T18:01:52.000Z
pyuri/__init__.py
nick-allen/pyuri
a526316270b83cd76651baec016d1509aab68981
[ "MIT" ]
null
null
null
"""Python URI Handling""" from pkg_resources import get_distribution, DistributionNotFound from .uri import URI __all__ = ['URI'] try: __version__ = get_distribution(__name__).version except DistributionNotFound: __version__ = '0.0.0-dev'
18
64
0.753968
"""Python URI Handling""" from pkg_resources import get_distribution, DistributionNotFound from .uri import URI __all__ = ['URI'] try: __version__ = get_distribution(__name__).version except DistributionNotFound: __version__ = '0.0.0-dev'
0
0
0
404465605a931d46f6e31c6a291d217087149125
1,731
py
Python
guts/migration/driver.py
smallwormer/stable-liberty-guts
e635b710cdd210f70e9d50c3b85fffdeb53e8f01
[ "Apache-2.0" ]
null
null
null
guts/migration/driver.py
smallwormer/stable-liberty-guts
e635b710cdd210f70e9d50c3b85fffdeb53e8f01
[ "Apache-2.0" ]
null
null
null
guts/migration/driver.py
smallwormer/stable-liberty-guts
e635b710cdd210f70e9d50c3b85fffdeb53e8f01
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2015 Aptira Pty Ltd. # 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 requi...
33.288462
78
0.657423
# Copyright (c) 2015 Aptira Pty Ltd. # 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 requi...
28
0
27
8ac95dbd0a9032681d9dfaccf24e28f0495f5ae1
4,019
py
Python
base_config.py
zclonely/ACNet
1fa157c5b38be2ecfc4a79f8ebe8e7cb30c71561
[ "MIT" ]
2
2019-12-23T03:03:24.000Z
2019-12-23T03:03:26.000Z
base_config.py
zclonely/ACNet
1fa157c5b38be2ecfc4a79f8ebe8e7cb30c71561
[ "MIT" ]
null
null
null
base_config.py
zclonely/ACNet
1fa157c5b38be2ecfc4a79f8ebe8e7cb30c71561
[ "MIT" ]
null
null
null
from collections import namedtuple from model_map import get_dataset_name_by_model_name BaseConfigByEpoch = namedtuple('BaseConfigByEpoch', ['network_type', 'dataset_name', 'dataset_subset', 'global_batch_size', 'num_node', 'device', 'weight_decay', 'weight_decay_bias', 'opti...
83.729167
181
0.622294
from collections import namedtuple from model_map import get_dataset_name_by_model_name BaseConfigByEpoch = namedtuple('BaseConfigByEpoch', ['network_type', 'dataset_name', 'dataset_subset', 'global_batch_size', 'num_node', 'device', 'weight_decay', 'weight_decay_bias', 'opti...
2,959
0
49
52edcb7aea820f4031994c44df4c877102b60d05
385
py
Python
Chapter 4 - Lists & Tuples/01_list.py
alex-dsouza777/Python-Basics
8f1c406f2319cd65b5d54dfea990d09fa69d9adf
[ "MIT" ]
null
null
null
Chapter 4 - Lists & Tuples/01_list.py
alex-dsouza777/Python-Basics
8f1c406f2319cd65b5d54dfea990d09fa69d9adf
[ "MIT" ]
null
null
null
Chapter 4 - Lists & Tuples/01_list.py
alex-dsouza777/Python-Basics
8f1c406f2319cd65b5d54dfea990d09fa69d9adf
[ "MIT" ]
1
2021-04-21T10:23:08.000Z
2021-04-21T10:23:08.000Z
#Create a list using [] a = [1,2,3,7,66] #print the list using print() function print(a) #Access using index using a[0], a[1], .... print(a[2]) #Changing the value of the list a[0] = 777 print(a) #We can create a list with items of different type b = [77,"Root",False,6.9] print(b) #List Slicing friends = ["Root","...
16.73913
50
0.649351
#Create a list using [] a = [1,2,3,7,66] #print the list using print() function print(a) #Access using index using a[0], a[1], .... print(a[2]) #Changing the value of the list a[0] = 777 print(a) #We can create a list with items of different type b = [77,"Root",False,6.9] print(b) #List Slicing friends = ["Root","...
0
0
0
cbb881db08ca129cbba2949277f9b0b3fed4d340
138
py
Python
Data Scientist Career Path/3. Python Fundamentals/11. Python Files/6. with.py
myarist/Codecademy
2ba0f104bc67ab6ef0f8fb869aa12aa02f5f1efb
[ "MIT" ]
23
2021-06-06T15:35:55.000Z
2022-03-21T06:53:42.000Z
Data Scientist Career Path/3. Python Fundamentals/11. Python Files/6. with.py
shivaniverma1/Data-Scientist
f82939a411484311171465591455880c8e354750
[ "MIT" ]
null
null
null
Data Scientist Career Path/3. Python Fundamentals/11. Python Files/6. with.py
shivaniverma1/Data-Scientist
f82939a411484311171465591455880c8e354750
[ "MIT" ]
9
2021-06-08T01:32:04.000Z
2022-03-18T15:38:09.000Z
with open('fun_file.txt') as close_this_file: setup = close_this_file.readline() punchline = close_this_file.readline() print(setup)
23
45
0.768116
with open('fun_file.txt') as close_this_file: setup = close_this_file.readline() punchline = close_this_file.readline() print(setup)
0
0
0
feda459c8123407cf53096f28c805421e375f313
3,141
py
Python
guides/python/pysample/crypto/aes/aes_enc.py
ToraNova/library
20b321302868e8c2ce8723c808aa9e7a313e2cb8
[ "MIT" ]
null
null
null
guides/python/pysample/crypto/aes/aes_enc.py
ToraNova/library
20b321302868e8c2ce8723c808aa9e7a313e2cb8
[ "MIT" ]
null
null
null
guides/python/pysample/crypto/aes/aes_enc.py
ToraNova/library
20b321302868e8c2ce8723c808aa9e7a313e2cb8
[ "MIT" ]
null
null
null
#!/usr/bin/python3 # used to encrypt a byte string # used as a tool for testing # AES encryption from Crypto.Cipher import AES import base64 import os import sys import binascii if __name__ == "__main__": e_key = None plain = None allz = False AES_mode = AES.MODE_CBC #input parsing if(len(sys.argv) < 3): ...
29.083333
95
0.687042
#!/usr/bin/python3 # used to encrypt a byte string # used as a tool for testing # AES encryption from Crypto.Cipher import AES import base64 import os import sys import binascii def rawpad(s,BLOCK_SIZE): #pad it with the characters representing original block size length return s + (BLOCK_SIZE - len(s) % BL...
484
0
92
6390b3c93147251c06317ddc9b994d40186364a9
424
py
Python
aoc2020/day9/day9_part2.py
GetPastTheMonkey/advent-of-code
db80be6d87baba4d5315cc69276905c55762da86
[ "MIT" ]
1
2019-09-15T16:37:24.000Z
2019-09-15T16:37:24.000Z
aoc2020/day9/day9_part2.py
GetPastTheMonkey/advent-of-code
db80be6d87baba4d5315cc69276905c55762da86
[ "MIT" ]
null
null
null
aoc2020/day9/day9_part2.py
GetPastTheMonkey/advent-of-code
db80be6d87baba4d5315cc69276905c55762da86
[ "MIT" ]
null
null
null
from utils import get_input_lines n = 20874512 sums = [] ints = [] solved = False for line in get_input_lines(__file__): i = int(line) sums.append(0) ints.append(i) for idx in range(len(sums)): sums[idx] = sums[idx] + i if sums[idx] == n: subset = ints[idx:] pri...
19.272727
44
0.540094
from utils import get_input_lines n = 20874512 sums = [] ints = [] solved = False for line in get_input_lines(__file__): i = int(line) sums.append(0) ints.append(i) for idx in range(len(sums)): sums[idx] = sums[idx] + i if sums[idx] == n: subset = ints[idx:] pri...
0
0
0
47f18ea67a40d6e9e4db44332a0499fd963249fe
579
py
Python
ch02/conditionals.py
skinisbizapps/learning-python
3c77fb94d978dd77057d1f0f4450d887dd389486
[ "Apache-2.0" ]
null
null
null
ch02/conditionals.py
skinisbizapps/learning-python
3c77fb94d978dd77057d1f0f4450d887dd389486
[ "Apache-2.0" ]
null
null
null
ch02/conditionals.py
skinisbizapps/learning-python
3c77fb94d978dd77057d1f0f4450d887dd389486
[ "Apache-2.0" ]
null
null
null
if __name__ == "__main__": main()
19.3
79
0.533679
def compare(x, y): st = "" if(x < y): st = "x is less than y" elif(x == y): st = "x is equal to y" else: st = "x is greater than y" return st def another_compare(x, y): st = "x is less than y" if(x < y) else "x is greater than or the same as y" return st def main...
470
0
69
4eaca5bc138f355d112c860003e0c72d36d9f501
2,412
py
Python
pyredditlive.py
nbr23/pyredditlive
c8ebccef8671201806682d2768a14e707e9814b5
[ "MIT" ]
null
null
null
pyredditlive.py
nbr23/pyredditlive
c8ebccef8671201806682d2768a14e707e9814b5
[ "MIT" ]
null
null
null
pyredditlive.py
nbr23/pyredditlive
c8ebccef8671201806682d2768a14e707e9814b5
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import asyncio import websockets import requests import json import sys import os import yaml import urllib import time if __name__ == "__main__": sys.exit(main())
30.15
180
0.609867
#!/usr/bin/env python3 import asyncio import websockets import requests import json import sys import os import yaml import urllib import time def load_config(config_path): config = {} if os.path.exists(config_path): with open(config_path) as configfile: config = yaml.load(configfile, Lo...
2,098
0
115
cf8a7bb7e19ae6d2eb73dfe3eefc77adf2a57cf3
1,069
py
Python
pychecker/checker.py
PyVCEchecker/PyVCEchecker
879756927c82a2612c817bdffbae25234ff62558
[ "MIT" ]
null
null
null
pychecker/checker.py
PyVCEchecker/PyVCEchecker
879756927c82a2612c817bdffbae25234ff62558
[ "MIT" ]
null
null
null
pychecker/checker.py
PyVCEchecker/PyVCEchecker
879756927c82a2612c817bdffbae25234ff62558
[ "MIT" ]
null
null
null
import argparse from pychecker.check import check_project, check_pkgver, print_results parser = argparse.ArgumentParser( description="PyChecker: check whether your project's Require-Python is correct" ) package_group = parser.add_argument_group("package") package_group.add_argument("-p", "--package", help="Packa...
34.483871
88
0.724041
import argparse from pychecker.check import check_project, check_pkgver, print_results parser = argparse.ArgumentParser( description="PyChecker: check whether your project's Require-Python is correct" ) package_group = parser.add_argument_group("package") package_group.add_argument("-p", "--package", help="Packa...
419
0
23
4de13b8171f09853c55e978ef311746acd908c93
597
py
Python
setup.py
rohit18115/OQMscores-python
96cddadbd8eb2b12df72a216e6093e2f7d642531
[ "MIT" ]
null
null
null
setup.py
rohit18115/OQMscores-python
96cddadbd8eb2b12df72a216e6093e2f7d642531
[ "MIT" ]
null
null
null
setup.py
rohit18115/OQMscores-python
96cddadbd8eb2b12df72a216e6093e2f7d642531
[ "MIT" ]
null
null
null
from setuptools import setup with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setup(name='oqmscore', version='0.1', description='Objective quality measure score for speech', long_description=long_description, long_description_content_type="text/markdown", ...
27.136364
63
0.639866
from setuptools import setup with open("README.md", "r", encoding="utf-8") as fh: long_description = fh.read() setup(name='oqmscore', version='0.1', description='Objective quality measure score for speech', long_description=long_description, long_description_content_type="text/markdown", ...
0
0
0
444a8d70b910bb9557b6b49213f60ccdb90ea5bf
2,039
py
Python
core/etl/models/service.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
84
2017-10-22T11:01:39.000Z
2022-02-27T03:43:48.000Z
core/etl/models/service.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
22
2017-12-11T07:21:56.000Z
2021-09-23T02:53:50.000Z
core/etl/models/service.py
prorevizor/noc
37e44b8afc64318b10699c06a1138eee9e7d6a4e
[ "BSD-3-Clause" ]
23
2017-12-06T06:59:52.000Z
2022-02-24T00:02:25.000Z
# ---------------------------------------------------------------------- # ServiceModel # ---------------------------------------------------------------------- # Copyright (C) 2007-2020 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------- # Python modules ...
26.828947
85
0.574301
# ---------------------------------------------------------------------- # ServiceModel # ---------------------------------------------------------------------- # Copyright (C) 2007-2020 The NOC Project # See LICENSE for details # ---------------------------------------------------------------------- # Python modules ...
0
1,439
23
b47ee23494a4382d2a0cc60f01cc0616a4774df2
1,955
py
Python
pubsub/animation/scanning-pixel.py
yanigisawa/coffee-scale
8131f5485646fa6b9803ca13b3e20d02d9debfce
[ "MIT" ]
13
2015-07-29T12:07:40.000Z
2018-06-29T13:21:41.000Z
pubsub/animation/scanning-pixel.py
yanigisawa/coffee-scale
8131f5485646fa6b9803ca13b3e20d02d9debfce
[ "MIT" ]
4
2015-05-29T11:44:43.000Z
2018-07-25T20:20:10.000Z
pubsub/animation/scanning-pixel.py
yanigisawa/coffee-scale
8131f5485646fa6b9803ca13b3e20d02d9debfce
[ "MIT" ]
7
2016-01-19T21:56:08.000Z
2018-04-25T04:34:32.000Z
#!/usr/bin/env python from samplebase import SampleBase # Main function if __name__ == "__main__": simple_square = SimpleSquare() if (not simple_square.process()): simple_square.print_help()
34.910714
92
0.526854
#!/usr/bin/env python from samplebase import SampleBase class SimpleSquare(SampleBase): def __init__(self, *args, **kwargs): super(SimpleSquare, self).__init__(*args, **kwargs) def run(self): offset_canvas = self.matrix.CreateFrameCanvas() x, y = 0, 0 min_x, max_x = 0, offset_...
1,659
10
76
8142df55e374bc2702c74ff5c5b846221102fd7e
66,710
py
Python
statspark/r_inspired.py
joon3216/statspark
5c0c5b31694ed76bf43251eab8806bbf9f79a50e
[ "MIT" ]
null
null
null
statspark/r_inspired.py
joon3216/statspark
5c0c5b31694ed76bf43251eab8806bbf9f79a50e
[ "MIT" ]
null
null
null
statspark/r_inspired.py
joon3216/statspark
5c0c5b31694ed76bf43251eab8806bbf9f79a50e
[ "MIT" ]
null
null
null
from functools import reduce from patsy import dmatrices from scipy.optimize import curve_fit, fmin from scipy.stats import chi2 from sklearn.metrics import roc_curve from statsmodels.stats.outliers_influence import variance_inflation_factor import matplotlib.pyplot as plt import numpy as np import pandas as pd import...
36.553425
117
0.566272
from functools import reduce from patsy import dmatrices from scipy.optimize import curve_fit, fmin from scipy.stats import chi2 from sklearn.metrics import roc_curve from statsmodels.stats.outliers_influence import variance_inflation_factor import matplotlib.pyplot as plt import numpy as np import pandas as pd import...
3,133
0
307
d464ec8b2a69b1c7cc0adb6879fa792dc9074552
7,044
py
Python
wsserver.py
stanleykao72/Deepfake-Detection
417de0a0c7756397cf3a611b26008b7ed64727e9
[ "Apache-2.0" ]
1
2020-09-30T09:33:28.000Z
2020-09-30T09:33:28.000Z
wsserver.py
stanleykao72/Deepfake-Detection
417de0a0c7756397cf3a611b26008b7ed64727e9
[ "Apache-2.0" ]
null
null
null
wsserver.py
stanleykao72/Deepfake-Detection
417de0a0c7756397cf3a611b26008b7ed64727e9
[ "Apache-2.0" ]
null
null
null
import asyncio import os import secrets import weakref import aiohttp.web from aiohttp import web import aioredis from aiohttp import WSCloseCode import json from detector_inference import detector_inference import logging LOGGING_FORMAT = '%(asctime)s %(levelname)s: %(message)s' DATE_FORMAT = '%Y%m%d %H:%M:%S' loggi...
35.575758
167
0.642675
import asyncio import os import secrets import weakref import aiohttp.web from aiohttp import web import aioredis from aiohttp import WSCloseCode import json from detector_inference import detector_inference import logging LOGGING_FORMAT = '%(asctime)s %(levelname)s: %(message)s' DATE_FORMAT = '%Y%m%d %H:%M:%S' loggi...
6,126
0
203
28fad9c62f12f1efa9baf4ec914dbb8dd458948e
3,337
py
Python
xai_court/interpret/saliency_interpreters/attention.py
michaeljneely/court-of-xai
37eded49f46b3a05ad56986c1a9bb22eee3ac4b1
[ "MIT" ]
4
2021-05-07T09:40:11.000Z
2022-03-27T18:19:07.000Z
xai_court/interpret/saliency_interpreters/attention.py
michaeljneely/court-of-xai
37eded49f46b3a05ad56986c1a9bb22eee3ac4b1
[ "MIT" ]
1
2021-05-10T09:31:05.000Z
2021-05-10T09:31:05.000Z
xai_court/interpret/saliency_interpreters/attention.py
michaeljneely/court-of-xai
37eded49f46b3a05ad56986c1a9bb22eee3ac4b1
[ "MIT" ]
1
2021-06-06T18:45:39.000Z
2021-06-06T18:45:39.000Z
from typing import List, Dict, Iterable, Optional, Type, Union import logging from allennlp.common.util import JsonDict, sanitize from allennlp.data import Instance from allennlp.interpret.saliency_interpreters.saliency_interpreter import SaliencyInterpreter from xai_court.config import Config from xai_court.models....
37.920455
120
0.697333
from typing import List, Dict, Iterable, Optional, Type, Union import logging from allennlp.common.util import JsonDict, sanitize from allennlp.data import Instance from allennlp.interpret.saliency_interpreters.saliency_interpreter import SaliencyInterpreter from xai_court.config import Config from xai_court.models....
837
1,138
22
ad543e43ec057bc0f0a91c2c2ade3000ce81112d
1,267
py
Python
main.py
Davnit/capidaptor
9e03c263fed9555d5863114fd84deb195795d0e4
[ "MIT" ]
5
2018-10-06T10:00:43.000Z
2020-02-02T03:49:53.000Z
main.py
Davnit/capidaptor
9e03c263fed9555d5863114fd84deb195795d0e4
[ "MIT" ]
3
2018-10-01T11:43:00.000Z
2019-10-30T00:31:06.000Z
main.py
Davnit/capidaptor
9e03c263fed9555d5863114fd84deb195795d0e4
[ "MIT" ]
3
2018-10-01T06:57:58.000Z
2018-10-04T03:19:38.000Z
#!/usr/bin/env python3 from server import Server import argparse parser = argparse.ArgumentParser(prog='capidaptor') parser.add_argument('--interface', help='Specifies the interface and port to listen on') parser.add_argument('--debug', help='Enables debugging mode', action='store_true') parser.add_argument('--igno...
29.465116
111
0.729282
#!/usr/bin/env python3 from server import Server import argparse parser = argparse.ArgumentParser(prog='capidaptor') parser.add_argument('--interface', help='Specifies the interface and port to listen on') parser.add_argument('--debug', help='Enables debugging mode', action='store_true') parser.add_argument('--igno...
0
0
0
4e91758f971a4d37da7cfb22510a76d626e4c3c8
8,883
py
Python
tests/test_client.py
pasystem/pyqiwi
138ae75350ef50ed7643e3ab9ae4b8e6e7c81663
[ "MIT" ]
17
2016-10-28T11:25:54.000Z
2021-03-07T20:23:59.000Z
tests/test_client.py
pasystem/pyqiwi
138ae75350ef50ed7643e3ab9ae4b8e6e7c81663
[ "MIT" ]
1
2016-10-28T11:36:08.000Z
2016-10-31T16:40:16.000Z
tests/test_client.py
pasystem/pyqiwi
138ae75350ef50ed7643e3ab9ae4b8e6e7c81663
[ "MIT" ]
3
2017-02-06T15:49:00.000Z
2017-04-15T21:52:39.000Z
# coding: utf-8 from datetime import datetime from decimal import Decimal from unittest import TestCase import httpretty from pyqiwi import QiwiError, Qiwi @httpretty.activate
32.184783
125
0.547675
# coding: utf-8 from datetime import datetime from decimal import Decimal from unittest import TestCase import httpretty from pyqiwi import QiwiError, Qiwi class QiwiErrorTestCase(TestCase): def test_error_code(self): error = QiwiError(143) self.assertEqual(error.code, 143) @httpretty.activate...
8,055
590
71
619fabdffb06414f6acd82749f20ecc78ce52e20
1,206
py
Python
frontmatter/__init__.py
kylekirkby/frontmatter
68bfd0f76bd4ddeb60fc7c28320db03490c9a516
[ "ISC" ]
null
null
null
frontmatter/__init__.py
kylekirkby/frontmatter
68bfd0f76bd4ddeb60fc7c28320db03490c9a516
[ "ISC" ]
null
null
null
frontmatter/__init__.py
kylekirkby/frontmatter
68bfd0f76bd4ddeb60fc7c28320db03490c9a516
[ "ISC" ]
null
null
null
import re import yaml
29.414634
74
0.566335
import re import yaml class Frontmatter: _yaml_delim = r'(?:---|\+\+\+)' _yaml = r'(.*?)' _content = r'\s*(.+)$' _re_pattern = r'^\s*' + _yaml_delim + _yaml + _yaml_delim + _content _regex = re.compile(_re_pattern, re.S | re.M) @classmethod def read_file(cls, path): """Reads file a...
0
1,161
23
c47be3b1dc8ec4a07a8b95d594288ba031947a6e
7,895
py
Python
src/fastnn/processors/cv/object_detection.py
aychang95/fastnn
93f02b860845959a8c625f6c99267f103756318b
[ "MIT" ]
7
2020-12-03T07:04:47.000Z
2022-03-25T11:51:15.000Z
src/fastnn/processors/cv/object_detection.py
aychang95/fastnn
93f02b860845959a8c625f6c99267f103756318b
[ "MIT" ]
null
null
null
src/fastnn/processors/cv/object_detection.py
aychang95/fastnn
93f02b860845959a8c625f6c99267f103756318b
[ "MIT" ]
null
null
null
import logging from typing import Optional, List, Union, Tuple, Callable import torch from torch.utils.data import DataLoader, Dataset from torchvision.transforms import ConvertImageDtype from PIL import Image, ImageDraw from PIL import ImageFont import numpy as np from fastnn.utils.cv import ImageDataset from f...
36.892523
129
0.610133
import logging from typing import Optional, List, Union, Tuple, Callable import torch from torch.utils.data import DataLoader, Dataset from torchvision.transforms import ConvertImageDtype from PIL import Image, ImageDraw from PIL import ImageFont import numpy as np from fastnn.utils.cv import ImageDataset from f...
99
0
54
e762b4876e49dc54cb1de3681ceb2f8ccaffd784
2,170
py
Python
src/structs/linked_list.py
zelaznymarek/data_structures
e85e9b48a6fe9adace914d887568e692c4e2344b
[ "MIT" ]
null
null
null
src/structs/linked_list.py
zelaznymarek/data_structures
e85e9b48a6fe9adace914d887568e692c4e2344b
[ "MIT" ]
null
null
null
src/structs/linked_list.py
zelaznymarek/data_structures
e85e9b48a6fe9adace914d887568e692c4e2344b
[ "MIT" ]
null
null
null
linked_list = LinkedList() print(linked_list.size_of() == 0) linked_list.insert_at_start(10) linked_list.insert_at_start(13) linked_list.insert_at_end(15) linked_list.insert_at_end(27) print(linked_list.head.data == 13) print(linked_list.size_of() == 4) linked_list.remove(100) print(linked_list.size_of() == 4) li...
23.333333
59
0.628571
class Node: def __init__(self, data): self.data = data self.next_node = None class LinkedList: def __init__(self): self.head = None self.size = 0 def insert_at_start(self, data): new_node = Node(data) self.size += 1 if not self.head: se...
1,266
-14
232
b37d8685d1dc9ffb644ec26eec8530c5ed0f4b5f
5,435
py
Python
dfa/dfa.py
ameesh-shah/dfa
00043c2c4e2762ef55f5c484e08eca7925cf0f65
[ "MIT" ]
null
null
null
dfa/dfa.py
ameesh-shah/dfa
00043c2c4e2762ef55f5c484e08eca7925cf0f65
[ "MIT" ]
null
null
null
dfa/dfa.py
ameesh-shah/dfa
00043c2c4e2762ef55f5c484e08eca7925cf0f65
[ "MIT" ]
null
null
null
from __future__ import annotations import operator from functools import wraps from typing import Hashable, FrozenSet, Callable, Optional, Sequence import attr import funcy as fn State = Hashable Letter = Hashable Alphabet = FrozenSet[Letter] @attr.frozen(auto_detect=True)
32.939394
79
0.598344
from __future__ import annotations import operator from functools import wraps from typing import Hashable, FrozenSet, Callable, Optional, Sequence import attr import funcy as fn State = Hashable Letter = Hashable Alphabet = FrozenSet[Letter] def boolean_only(method): @wraps(method) def wrapped(self, *arg...
3,412
1,697
45
30c2f87795348253a7bc93585e22ecd969330ca7
1,775
py
Python
bot/exts/fun/ciphers.py
gurkult/gurkbot
fe42628eb01ce42539ad3a6781eb8810950b1402
[ "MIT" ]
24
2020-12-18T07:26:14.000Z
2022-03-30T22:56:49.000Z
bot/exts/fun/ciphers.py
gurkult/gurkbot
fe42628eb01ce42539ad3a6781eb8810950b1402
[ "MIT" ]
143
2020-12-18T09:13:51.000Z
2022-03-02T19:27:44.000Z
bot/exts/fun/ciphers.py
gurkult/gurkbot
fe42628eb01ce42539ad3a6781eb8810950b1402
[ "MIT" ]
44
2020-12-18T09:05:29.000Z
2022-03-02T20:06:23.000Z
import hashlib import logging from bot.bot import Bot from bot.constants import Colours from discord import Embed from discord.ext.commands import BadArgument, Cog, Context, group logger = logging.getLogger(__name__) class Ciphers(Cog): """Commands for working with ciphers, hashes and encryptions.""" @grou...
29.098361
88
0.59493
import hashlib import logging from bot.bot import Bot from bot.constants import Colours from discord import Embed from discord.ext.commands import BadArgument, Cog, Context, group logger = logging.getLogger(__name__) class Ciphers(Cog): """Commands for working with ciphers, hashes and encryptions.""" def _...
39
0
27
2c8540dc90544d6a1d6cbfedfddc2ffd1d030ec1
234
py
Python
exercise4-3.py
raygomez/python-exercise-4
5f4fdb23767f1cc04dc133497b866dfa9feeb7f9
[ "MIT" ]
null
null
null
exercise4-3.py
raygomez/python-exercise-4
5f4fdb23767f1cc04dc133497b866dfa9feeb7f9
[ "MIT" ]
null
null
null
exercise4-3.py
raygomez/python-exercise-4
5f4fdb23767f1cc04dc133497b866dfa9feeb7f9
[ "MIT" ]
null
null
null
from __future__ import print_function __author__ = 'ragomez' number = int(raw_input('Enter a number:')) for num in f(number): print(num, end=',')
18
42
0.645299
from __future__ import print_function __author__ = 'ragomez' def f(data): mylist = xrange(0, data,2) for i in mylist: yield i number = int(raw_input('Enter a number:')) for num in f(number): print(num, end=',')
59
0
23
5d81ca03df78fb0cbc1864bcfafddccac859040d
8,661
py
Python
python/Power Bi.nuixscript/site-packages/adal/wstrust_request.py
Nuix/Power-BI-Integration
5204f51c497b4de4881a44ae9b1f421023d54842
[ "Apache-2.0" ]
1
2021-10-16T19:33:56.000Z
2021-10-16T19:33:56.000Z
python/Power Bi.nuixscript/site-packages/adal/wstrust_request.py
Nuix/Power-BI-Integration
5204f51c497b4de4881a44ae9b1f421023d54842
[ "Apache-2.0" ]
1
2021-04-30T20:41:19.000Z
2021-04-30T20:41:19.000Z
python/Power Bi.nuixscript/site-packages/adal/wstrust_request.py
Nuix/Power-BI-Integration
5204f51c497b4de4881a44ae9b1f421023d54842
[ "Apache-2.0" ]
1
2019-07-25T15:09:05.000Z
2019-07-25T15:09:05.000Z
#------------------------------------------------------------------------------ # # Copyright (c) Microsoft Corporation. # All rights reserved. # # This code is licensed under the MIT License. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated document...
50.947059
178
0.607436
#------------------------------------------------------------------------------ # # Copyright (c) Microsoft Corporation. # All rights reserved. # # This code is licensed under the MIT License. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated document...
6,729
259
23
5dc06c7ecbbda4feb8e2fc0d03a5fa9a5fd01f7f
845
py
Python
telepythy/lib/__init__.py
dhagrow/telepythy
ed06510eb5ae8190387ab82e4acbfda63e2abf7f
[ "MIT" ]
1
2022-01-07T16:06:31.000Z
2022-01-07T16:06:31.000Z
telepythy/lib/__init__.py
dhagrow/telepythy
ed06510eb5ae8190387ab82e4acbfda63e2abf7f
[ "MIT" ]
1
2021-08-23T21:08:14.000Z
2021-08-23T21:08:14.000Z
telepythy/lib/__init__.py
dhagrow/telepythy
ed06510eb5ae8190387ab82e4acbfda63e2abf7f
[ "MIT" ]
null
null
null
from .service import Service from . import utils
36.73913
61
0.75858
from .service import Service from . import utils def serve(locs=None, address=None, embed_mode=True): addr = utils.parse_address(address or utils.DEFAULT_ADDR) Service(locs, embed_mode=embed_mode).serve(addr) def connect(locs=None, address=None, embed_mode=True): addr = utils.parse_address(address or util...
704
0
92
2179c15243606c1502b113f52f9ca3779a8786e1
2,079
py
Python
lambda_functions/process/count_feature/utilities.py
pierrealixt/MapCampaigner
7845bda4b0f6ccb7d18905a8c77d91ba6a4f78ad
[ "BSD-3-Clause" ]
null
null
null
lambda_functions/process/count_feature/utilities.py
pierrealixt/MapCampaigner
7845bda4b0f6ccb7d18905a8c77d91ba6a4f78ad
[ "BSD-3-Clause" ]
1
2018-07-24T13:57:03.000Z
2018-07-24T13:57:03.000Z
lambda_functions/process/count_feature/utilities.py
pierrealixt/MapCampaigner
7845bda4b0f6ccb7d18905a8c77d91ba6a4f78ad
[ "BSD-3-Clause" ]
null
null
null
import os import json import boto3 from aws import S3Data
24.174419
68
0.608947
import os import json import boto3 from aws import S3Data def download_overpass_file(uuid, type_id): key = build_raw_data_overpass_path( campaign_path=campaign_path(uuid), type_id=type_id) S3Data().download_file( key=key, type_id=type_id, destination='/tmp') def buil...
1,805
0
207
d5fe1334d39320c9da1b9c09dd4224c055897193
8,511
py
Python
utils.py
zikang12138/Learning-Action-Completeness-from-Points
0dcb2b70a218e975a96e269646912649d30759ba
[ "MIT" ]
52
2021-08-06T07:48:52.000Z
2022-03-30T01:53:08.000Z
utils.py
zikang12138/Learning-Action-Completeness-from-Points
0dcb2b70a218e975a96e269646912649d30759ba
[ "MIT" ]
7
2021-09-12T03:48:04.000Z
2022-03-24T08:44:30.000Z
utils.py
zikang12138/Learning-Action-Completeness-from-Points
0dcb2b70a218e975a96e269646912649d30759ba
[ "MIT" ]
10
2021-08-14T06:29:16.000Z
2022-03-06T14:58:56.000Z
import torch import torch.nn as nn import numpy as np from scipy.interpolate import interp1d import os import sys import random import config
33.507874
146
0.561039
import torch import torch.nn as nn import numpy as np from scipy.interpolate import interp1d import os import sys import random import config def upgrade_resolution(arr, scale): x = np.arange(0, arr.shape[0]) f = interp1d(x, arr, kind='linear', axis=0, fill_value='extrapolate') scale_x = np.arange(0, arr....
8,082
0
276
2e8c1b0d110b26e611f1e48f251a997f89d7502b
11,020
py
Python
PYTHON/SelectSlice.py
Kate-Willett/Climate_Explorer
d49e65a6caa9beb1a859e16d3827022442bad324
[ "CC0-1.0" ]
null
null
null
PYTHON/SelectSlice.py
Kate-Willett/Climate_Explorer
d49e65a6caa9beb1a859e16d3827022442bad324
[ "CC0-1.0" ]
null
null
null
PYTHON/SelectSlice.py
Kate-Willett/Climate_Explorer
d49e65a6caa9beb1a859e16d3827022442bad324
[ "CC0-1.0" ]
1
2021-06-29T12:05:46.000Z
2021-06-29T12:05:46.000Z
#!/usr/local/sci/bin/python # PYTHON3 # # Author: Kate Willett # Created: 16 October 2015 # Last update: 20 July 2020 # Location: /data/local/hadkw/HADCRUH2/UPDATE2014/PROGS/PYTHON/ # GitHub: https://github.com/Kate-Willett/Climate_Explorer/tree/master/PYTHON/ # ----------------------- # CODE PURPOSE AND OUTPUT # ---...
47.705628
142
0.591379
#!/usr/local/sci/bin/python # PYTHON3 # # Author: Kate Willett # Created: 16 October 2015 # Last update: 20 July 2020 # Location: /data/local/hadkw/HADCRUH2/UPDATE2014/PROGS/PYTHON/ # GitHub: https://github.com/Kate-Willett/Climate_Explorer/tree/master/PYTHON/ # ----------------------- # CODE PURPOSE AND OUTPUT # ---...
0
0
0
8bed170dd471e305451ac6d6a926ef6b53e8a597
517
py
Python
src/ocr-test-plate.py
ferauche/snct2021
510502ae61f76183f532f189332c8a7889048988
[ "MIT" ]
null
null
null
src/ocr-test-plate.py
ferauche/snct2021
510502ae61f76183f532f189332c8a7889048988
[ "MIT" ]
null
null
null
src/ocr-test-plate.py
ferauche/snct2021
510502ae61f76183f532f189332c8a7889048988
[ "MIT" ]
null
null
null
import cv2 import pytesseract from picamera.array import PiRGBArray from picamera import PiCamera import time import re camera = PiCamera() rawCapture = PiRGBArray(camera) time.sleep(1.2) camera.capture(rawCapture, format="bgr") image = cv2.cvtColor(rawCapture.array, cv2.COLOR_BGR2GRAY) print("Lendo...") opt = "-c...
22.478261
71
0.758221
import cv2 import pytesseract from picamera.array import PiRGBArray from picamera import PiCamera import time import re camera = PiCamera() rawCapture = PiRGBArray(camera) time.sleep(1.2) camera.capture(rawCapture, format="bgr") image = cv2.cvtColor(rawCapture.array, cv2.COLOR_BGR2GRAY) print("Lendo...") opt = "-c...
0
0
0
5ffaa237fc75904bf7161655b597df86749a2756
1,070
py
Python
convert_PALS_to_subjects.py
MadsJensen/RP_scripts
b3f7afb27b6346ee209e4bfcd7d52049d69d2eaf
[ "BSD-3-Clause" ]
null
null
null
convert_PALS_to_subjects.py
MadsJensen/RP_scripts
b3f7afb27b6346ee209e4bfcd7d52049d69d2eaf
[ "BSD-3-Clause" ]
null
null
null
convert_PALS_to_subjects.py
MadsJensen/RP_scripts
b3f7afb27b6346ee209e4bfcd7d52049d69d2eaf
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function import subprocess # path to submit_to_isis cmd = "/usr/local/common/meeg-cfin/configurations/bin/submit_to_isis" subjects = ["0008", "0009", "0010", "0011", "0012", "0013", "0014", "0015", "0016", "0017", "0018", "0019", "0020", "0021", "0022"] for subj...
44.583333
97
0.6
from __future__ import print_function import subprocess # path to submit_to_isis cmd = "/usr/local/common/meeg-cfin/configurations/bin/submit_to_isis" subjects = ["0008", "0009", "0010", "0011", "0012", "0013", "0014", "0015", "0016", "0017", "0018", "0019", "0020", "0021", "0022"] for subj...
0
0
0
1d90aeb3f1fa4de97feff2b72f58ae3b8de84f44
1,255
py
Python
Serving/LinearRegression_streaming.py
IntelligentSensor/PHMRepository
8684c7851970293d607d18c580cec7edbf72ad17
[ "MIT" ]
6
2021-09-27T00:23:41.000Z
2022-03-16T00:21:27.000Z
Serving/LinearRegression_streaming.py
intelligentph/PhRepository
8684c7851970293d607d18c580cec7edbf72ad17
[ "MIT" ]
4
2020-08-21T03:56:16.000Z
2022-02-10T02:17:08.000Z
Serving/LinearRegression_streaming.py
IntelligentSensor/Sensor-PHM
8684c7851970293d607d18c580cec7edbf72ad17
[ "MIT" ]
5
2020-11-25T11:46:12.000Z
2022-02-14T02:37:06.000Z
""" Streaming Linear Regression Example. """ from __future__ import print_function import sys from pyspark import SparkContext from pyspark.streaming import StreamingContext from pyspark.mllib.linalg import Vectors from pyspark.mllib.regression import LabeledPoint from pyspark.mllib.regression import StreamingLinearR...
30.609756
86
0.697211
""" Streaming Linear Regression Example. """ from __future__ import print_function import sys from pyspark import SparkContext from pyspark.streaming import StreamingContext from pyspark.mllib.linalg import Vectors from pyspark.mllib.regression import LabeledPoint from pyspark.mllib.regression import StreamingLinearR...
166
0
27
f1035aa58b20da1ecffd7f32eaaa3447c0cff2c9
249
py
Python
models/test.py
Mingzheng01/pointnet
401692e08441ff459b63786b9c65c11f78ea599e
[ "MIT" ]
null
null
null
models/test.py
Mingzheng01/pointnet
401692e08441ff459b63786b9c65c11f78ea599e
[ "MIT" ]
null
null
null
models/test.py
Mingzheng01/pointnet
401692e08441ff459b63786b9c65c11f78ea599e
[ "MIT" ]
null
null
null
import tensorflow as tf import numpy as np n = [5, 6] print(id(n)) # 140312184155336 updateList(n) print(n) # [5, 6, 10] print(id(n)) # 140312184155336
22.636364
47
0.522088
import tensorflow as tf import numpy as np def updateList(list1): list1 += [10] n = [5, 6] print(id(n)) # 140312184155336 updateList(n) print(n) # [5, 6, 10] print(id(n)) # 140312184155336
19
0
23
a0bb841d8a48c14ffe59ef91f3c70edf038b0872
761
py
Python
problems/0001_two_sum.py
SouravDutta91/LeetCode
7756d320cc5477a23011cea03a350c022a699a2e
[ "MIT" ]
null
null
null
problems/0001_two_sum.py
SouravDutta91/LeetCode
7756d320cc5477a23011cea03a350c022a699a2e
[ "MIT" ]
null
null
null
problems/0001_two_sum.py
SouravDutta91/LeetCode
7756d320cc5477a23011cea03a350c022a699a2e
[ "MIT" ]
null
null
null
''' Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0...
27.178571
107
0.595269
''' Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have exactly one solution, and you may not use the same element twice. Example: Given nums = [2, 7, 11, 15], target = 9, Because nums[0] + nums[1] = 2 + 7 = 9, return [0...
295
-6
49
605dd4808c430ac6c7164fe621e70d43c923a1fb
1,813
py
Python
example-generator.py
sanus-solutions/druid-superset
9a972802b74112b627e9b12f55fabbfdce5f4d44
[ "Apache-2.0" ]
null
null
null
example-generator.py
sanus-solutions/druid-superset
9a972802b74112b627e9b12f55fabbfdce5f4d44
[ "Apache-2.0" ]
null
null
null
example-generator.py
sanus-solutions/druid-superset
9a972802b74112b627e9b12f55fabbfdce5f4d44
[ "Apache-2.0" ]
null
null
null
import random, requests from datetime import * from faker import Faker from random import randrange, randint units = [ "Neonatal intensive care", "Pediatric intensive care", "Coronary care and cardiothoracic", "Surgical intensive care", "Medical intensive care", "Long term intensive care" ] event_types = [ ["en...
25.535211
92
0.679537
import random, requests from datetime import * from faker import Faker from random import randrange, randint units = [ "Neonatal intensive care", "Pediatric intensive care", "Coronary care and cardiothoracic", "Surgical intensive care", "Medical intensive care", "Long term intensive care" ] event_types = [ ["en...
413
0
46
daa4d4d5d2ba2e43db27fe3cbc2fefa6e42806b3
6,690
py
Python
DeepNetwork.py
bathonSpidey/DeepNetwork
9913d102dbe617a79b0b9cf522086b7ff0cfd8b3
[ "MIT" ]
null
null
null
DeepNetwork.py
bathonSpidey/DeepNetwork
9913d102dbe617a79b0b9cf522086b7ff0cfd8b3
[ "MIT" ]
null
null
null
DeepNetwork.py
bathonSpidey/DeepNetwork
9913d102dbe617a79b0b9cf522086b7ff0cfd8b3
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Jan 5 23:01:33 2021 @author: batho """ import numpy as np
43.72549
107
0.631091
# -*- coding: utf-8 -*- """ Created on Tue Jan 5 23:01:33 2021 @author: batho """ import numpy as np class Network: def dataReshape(self,dataset): return dataset.reshape(dataset.shape[0],-1).T def sigmoid(self,linearResult): activatedResult= 1/(1+np.exp(-linearResult)) retu...
6,036
-7
492
e27ecf3ebcb33b74a44fed1170118875536cf623
976
py
Python
silex_client/utils/log.py
ArtFXDev/silex_client
657d594dcfec79e7c8f4053df9d4a5dbc0c9ac50
[ "MIT" ]
10
2021-09-21T03:26:45.000Z
2022-03-19T00:30:03.000Z
silex_client/utils/log.py
ArtFXDev/silex_dcc
657d594dcfec79e7c8f4053df9d4a5dbc0c9ac50
[ "MIT" ]
66
2021-09-17T09:54:23.000Z
2022-03-29T23:31:17.000Z
silex_client/utils/log.py
ArtFXDev/silex_dcc
657d594dcfec79e7c8f4053df9d4a5dbc0c9ac50
[ "MIT" ]
null
null
null
""" @author: michael.haussmann retake by le TD gang A simple logger shortcut / wrapper. Uses https://logzero.readthedocs.io/ """ import logging import os import sys import logzero from logzero import logger # Formatting of the output log to look like __LOG_FORMAT__ = "[SILEX]\ [%(asctime)s] %(color)s%(levelna...
25.684211
81
0.748975
""" @author: michael.haussmann retake by le TD gang A simple logger shortcut / wrapper. Uses https://logzero.readthedocs.io/ """ import logging import os import sys import logzero from logzero import logger # Formatting of the output log to look like __LOG_FORMAT__ = "[SILEX]\ [%(asctime)s] %(color)s%(levelna...
0
0
0
403ccb3bb0baedaed9f44b1c1334c3e916bd1402
1,891
py
Python
python/shopping/content/workflows.py
akgarchi/googleads-shopping-samples
053bc5500405b751c671b169748b963fc142e8cc
[ "Apache-2.0" ]
149
2015-01-11T12:23:41.000Z
2022-03-28T03:42:20.000Z
python/shopping/content/workflows.py
akgarchi/googleads-shopping-samples
053bc5500405b751c671b169748b963fc142e8cc
[ "Apache-2.0" ]
28
2015-07-14T20:42:10.000Z
2021-12-27T01:06:12.000Z
python/shopping/content/workflows.py
akgarchi/googleads-shopping-samples
053bc5500405b751c671b169748b963fc142e8cc
[ "Apache-2.0" ]
250
2015-01-20T14:30:17.000Z
2022-03-28T06:26:51.000Z
#!/usr/bin/python # # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
33.767857
74
0.662612
#!/usr/bin/python # # Copyright 2017 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
721
0
23
81917554f945b6226b57948fc8368df61c83d0db
7,065
py
Python
cscs-checks/microbenchmarks/mpi/halo_exchange/halo_cell_exchange.py
jacwah/reframe
d650bbbb2f87c6ae5f354e50b50bcfd98fafe77b
[ "BSD-3-Clause" ]
null
null
null
cscs-checks/microbenchmarks/mpi/halo_exchange/halo_cell_exchange.py
jacwah/reframe
d650bbbb2f87c6ae5f354e50b50bcfd98fafe77b
[ "BSD-3-Clause" ]
3
2022-03-11T09:51:33.000Z
2022-03-31T08:20:19.000Z
cscs-checks/microbenchmarks/mpi/halo_exchange/halo_cell_exchange.py
jacwah/reframe
d650bbbb2f87c6ae5f354e50b50bcfd98fafe77b
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2016-2022 Swiss National Supercomputing Centre (CSCS/ETH Zurich) # ReFrame Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause import reframe as rfm import reframe.utility.sanity as sn @rfm.simple_test
46.788079
78
0.479264
# Copyright 2016-2022 Swiss National Supercomputing Centre (CSCS/ETH Zurich) # ReFrame Project Developers. See the top-level LICENSE file for details. # # SPDX-License-Identifier: BSD-3-Clause import reframe as rfm import reframe.utility.sanity as sn @rfm.simple_test class HaloCellExchangeTest(rfm.RegressionTest): ...
6,666
106
22
9791879d1c1f35de52f9cb7e5249578c2580c89b
5,398
py
Python
ojm.py
evuez/ojm
382452836779211b574e7958258ca17105d5654e
[ "MIT" ]
null
null
null
ojm.py
evuez/ojm
382452836779211b574e7958258ca17105d5654e
[ "MIT" ]
null
null
null
ojm.py
evuez/ojm
382452836779211b574e7958258ca17105d5654e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import json from time import strftime from os import path, remove from glob import glob from uuid import uuid4 STORAGE = 'ojm.data' _models = {} def register(model): """ Register a class to allow object loading from JSON. """ _models[model.__name__] = model def storable(o...
27.968912
77
0.475732
# -*- coding: utf-8 -*- import json from time import strftime from os import path, remove from glob import glob from uuid import uuid4 STORAGE = 'ojm.data' class ModelNotFound(Exception): pass _models = {} def register(model): """ Register a class to allow object loading from JSON. """ _model...
224
4,509
72
1bf08b75140963ba2e0adf3ecf31287e7cfd92ef
5,308
py
Python
indico/modules/events/timetable/controllers/display.py
bkmgit/indico
d77ee121e35880a416b9b05e6098ea912d870b5c
[ "MIT" ]
1
2021-06-11T20:02:10.000Z
2021-06-11T20:02:10.000Z
indico/modules/events/timetable/controllers/display.py
bkmgit/indico
d77ee121e35880a416b9b05e6098ea912d870b5c
[ "MIT" ]
null
null
null
indico/modules/events/timetable/controllers/display.py
bkmgit/indico
d77ee121e35880a416b9b05e6098ea912d870b5c
[ "MIT" ]
null
null
null
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from io import BytesIO from flask import jsonify, request, session from werkzeug.exceptions import Forbid...
49.607477
120
0.696873
# This file is part of Indico. # Copyright (C) 2002 - 2022 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from io import BytesIO from flask import jsonify, request, session from werkzeug.exceptions import Forbid...
3,390
263
251
90a8ac88c134de85ef0fff569cb91c072a5406f2
9,413
py
Python
sphinx_autodoc_typehints.py
bpeake-illuscio/sphinx-autodoc-typehints
cd822aacb96bb250e8d533cd7131e986f1938f08
[ "MIT" ]
null
null
null
sphinx_autodoc_typehints.py
bpeake-illuscio/sphinx-autodoc-typehints
cd822aacb96bb250e8d533cd7131e986f1938f08
[ "MIT" ]
null
null
null
sphinx_autodoc_typehints.py
bpeake-illuscio/sphinx-autodoc-typehints
cd822aacb96bb250e8d533cd7131e986f1938f08
[ "MIT" ]
null
null
null
import inspect import typing from typing import get_type_hints, TypeVar, Any, AnyStr, Generic, Union from sphinx.util import logging from sphinx.util.inspect import Signature try: from inspect import unwrap except ImportError: def unwrap(func, *, stop=None): """This is the inspect.unwrap() method copi...
39.384937
97
0.576756
import inspect import typing from typing import get_type_hints, TypeVar, Any, AnyStr, Generic, Union from sphinx.util import logging from sphinx.util.inspect import Signature try: from inspect import unwrap except ImportError: def unwrap(func, *, stop=None): """This is the inspect.unwrap() method copi...
8,384
0
183
40d6394520b75b6986167f25296dfc637da5f4e2
4,492
py
Python
DungeonCrawl/Model/ActionResolvers/MoveActionResolver.py
BoogyWinterfell/friday-fun
686e8c53415e748db437e74c3e2b02afcd9695bf
[ "MIT" ]
null
null
null
DungeonCrawl/Model/ActionResolvers/MoveActionResolver.py
BoogyWinterfell/friday-fun
686e8c53415e748db437e74c3e2b02afcd9695bf
[ "MIT" ]
null
null
null
DungeonCrawl/Model/ActionResolvers/MoveActionResolver.py
BoogyWinterfell/friday-fun
686e8c53415e748db437e74c3e2b02afcd9695bf
[ "MIT" ]
null
null
null
from typing import List from Abstract.ActionResolver import ActionResolver from Abstract.GameAction import GameAction from Abstract.EngineGameInfo import EngineGameInfo from DungeonCrawl.DungeonCrawlEngineGameInfo import DungeonCrawlEngineGameInfo from DungeonCrawl.DungeonCrawlUtils import count_dungeoneer_weapons, ge...
52.232558
135
0.69301
from typing import List from Abstract.ActionResolver import ActionResolver from Abstract.GameAction import GameAction from Abstract.EngineGameInfo import EngineGameInfo from DungeonCrawl.DungeonCrawlEngineGameInfo import DungeonCrawlEngineGameInfo from DungeonCrawl.DungeonCrawlUtils import count_dungeoneer_weapons, ge...
3,431
20
237
f9a60e9bba65feb39ffcf676f32b2f49d5004405
1,512
py
Python
tests/test_loops.py
nathfroech/flake8_pylint_comparison
1f6d5063b3055687e880b5b436346ce4b5ae95da
[ "MIT" ]
null
null
null
tests/test_loops.py
nathfroech/flake8_pylint_comparison
1f6d5063b3055687e880b5b436346ce4b5ae95da
[ "MIT" ]
null
null
null
tests/test_loops.py
nathfroech/flake8_pylint_comparison
1f6d5063b3055687e880b5b436346ce4b5ae95da
[ "MIT" ]
null
null
null
import pytest from hamcrest import assert_that, contains_inanyorder from tests.testing_utils import param_wrapper, run_flake8, run_pylint params = [ # code, flake8 rules, pylint rules param_wrapper(( 'values = []', 'for i in range(10):', ' values.append(10)', ), {'B007'}, set(),...
33.6
92
0.571429
import pytest from hamcrest import assert_that, contains_inanyorder from tests.testing_utils import param_wrapper, run_flake8, run_pylint params = [ # code, flake8 rules, pylint rules param_wrapper(( 'values = []', 'for i in range(10):', ' values.append(10)', ), {'B007'}, set(),...
370
0
22
639501802fb9488bea5ca438c95f4015af14ca5b
1,444
py
Python
Scrapy/Scrapy/spiders/basco.py
silveriogabriel/Scraping-Scrapy
341554ffa7f055c91235816abcb799f9ac4b4428
[ "MIT" ]
null
null
null
Scrapy/Scrapy/spiders/basco.py
silveriogabriel/Scraping-Scrapy
341554ffa7f055c91235816abcb799f9ac4b4428
[ "MIT" ]
null
null
null
Scrapy/Scrapy/spiders/basco.py
silveriogabriel/Scraping-Scrapy
341554ffa7f055c91235816abcb799f9ac4b4428
[ "MIT" ]
null
null
null
import scrapy
36.1
94
0.548476
import scrapy class BascoSpider(scrapy.Spider): name = 'basco' start_urls = ['http://www.basco.com.br/produtos/'] def parse(self, response): self.produtos = [] self.titulos = [] self.imagems = [] self.descricoes = [] links = ['http://www.basco.com.br/produtos'] ...
1,267
140
23
e904ea4282882301d69b1dd575369bf096878386
6,379
py
Python
tests/test_plPlug.py
sdss/coordio
61f5c962b8e3f335259168c9f8e872b4d3fe25d8
[ "BSD-3-Clause" ]
null
null
null
tests/test_plPlug.py
sdss/coordio
61f5c962b8e3f335259168c9f8e872b4d3fe25d8
[ "BSD-3-Clause" ]
9
2021-02-04T00:01:30.000Z
2021-11-14T22:42:49.000Z
tests/test_plPlug.py
sdss/coordio
61f5c962b8e3f335259168c9f8e872b4d3fe25d8
[ "BSD-3-Clause" ]
null
null
null
from coordio.utils import radec2wokxy, wokxy2radec import time import matplotlib.pyplot as plt import numpy import coordio.fitData as fitData import os from astropy.coordinates import SkyCoord from astropy import units as u filedir = os.path.dirname(os.path.abspath(__file__)) # apo plate 15017 apo = {} apo["utcJD"]...
28.605381
79
0.557297
from coordio.utils import radec2wokxy, wokxy2radec import time import matplotlib.pyplot as plt import numpy import coordio.fitData as fitData import os from astropy.coordinates import SkyCoord from astropy import units as u filedir = os.path.dirname(os.path.abspath(__file__)) # apo plate 15017 apo = {} apo["utcJD"]...
5,481
0
69
961b1b6516caff18447da65c62981e65debf064f
16,322
py
Python
ver1_0/openassembly/pirate_reputation/templatetags/reputationtags.py
fragro/Open-Assembly
e9679ff5e7ae9881fa5781d763288ed2f40b014d
[ "BSD-3-Clause" ]
1
2015-11-05T08:22:19.000Z
2015-11-05T08:22:19.000Z
ver1_0/openassembly/pirate_reputation/templatetags/reputationtags.py
fragro/Open-Assembly
e9679ff5e7ae9881fa5781d763288ed2f40b014d
[ "BSD-3-Clause" ]
null
null
null
ver1_0/openassembly/pirate_reputation/templatetags/reputationtags.py
fragro/Open-Assembly
e9679ff5e7ae9881fa5781d763288ed2f40b014d
[ "BSD-3-Clause" ]
1
2018-02-03T18:25:41.000Z
2018-02-03T18:25:41.000Z
from django import template from django import forms import datetime import sys from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from pirate_reputation.models import Reputation, ReputationDimension, ReputationEvent, AbuseTicket, FeedbackTicket from pirate_consensus....
33.863071
158
0.612241
from django import template from django import forms import datetime import sys from django.contrib.auth.models import User from django.contrib.contenttypes.models import ContentType from pirate_reputation.models import Reputation, ReputationDimension, ReputationEvent, AbuseTicket, FeedbackTicket from pirate_consensus....
7,189
587
204
48845d95b4825fc29c5c786687f87174fa2bb38b
27
py
Python
urbanoctowaddle/__init__.py
TaiSakuma/urbanoctowaddle
0d297f0c47c97cc34d8816c78121b555efd79e7c
[ "BSD-3-Clause" ]
null
null
null
urbanoctowaddle/__init__.py
TaiSakuma/urbanoctowaddle
0d297f0c47c97cc34d8816c78121b555efd79e7c
[ "BSD-3-Clause" ]
null
null
null
urbanoctowaddle/__init__.py
TaiSakuma/urbanoctowaddle
0d297f0c47c97cc34d8816c78121b555efd79e7c
[ "BSD-3-Clause" ]
null
null
null
from .waddle import Waddle
13.5
26
0.814815
from .waddle import Waddle
0
0
0
cc16e90f54c4fe075e7a60b9f940edd68be3e727
52
py
Python
white_matter/utils/__init__.py
alex4200/Long-range-micro-connectome
833aad78bc71e49a5059b276e65d3fef21686f9d
[ "BSD-3-Clause" ]
9
2019-05-01T13:12:17.000Z
2021-11-23T10:34:56.000Z
white_matter/utils/__init__.py
alex4200/Long-range-micro-connectome
833aad78bc71e49a5059b276e65d3fef21686f9d
[ "BSD-3-Clause" ]
2
2022-02-03T13:56:22.000Z
2022-02-04T07:16:37.000Z
white_matter/utils/__init__.py
alex4200/Long-range-micro-connectome
833aad78bc71e49a5059b276e65d3fef21686f9d
[ "BSD-3-Clause" ]
1
2022-02-03T12:05:12.000Z
2022-02-03T12:05:12.000Z
from .query_streamlines import StreamlineDownloader
26
51
0.903846
from .query_streamlines import StreamlineDownloader
0
0
0
2c3dd1949bb2955c67ca4bee97e74cf524bc7b22
5,089
py
Python
gaea/gaea/log/main.py
Yo-main/akingbee.com
144940df99900226073eb4bf721a6ab407a3911d
[ "MIT" ]
null
null
null
gaea/gaea/log/main.py
Yo-main/akingbee.com
144940df99900226073eb4bf721a6ab407a3911d
[ "MIT" ]
20
2019-10-06T20:24:49.000Z
2022-02-28T01:55:49.000Z
gaea/gaea/log/main.py
yo-main/akingbee
a8b4b307e2262f98eb93459c6dd4207e707cee1e
[ "MIT" ]
null
null
null
import os import time import json import datetime import logging from logging.handlers import RotatingFileHandler import pprint from gaea.config import CONFIG # class ContextFilter(logging.Filter): # def filter(self, record): # if flask.has_request_context(): # # when logging out, the user_id...
26.925926
79
0.612694
import os import time import json import datetime import logging from logging.handlers import RotatingFileHandler import pprint from gaea.config import CONFIG # class ContextFilter(logging.Filter): # def filter(self, record): # if flask.has_request_context(): # # when logging out, the user_id...
2,093
134
283
70b89eb4aa7c16b4b0f366374cd0ae72f88c24de
524
py
Python
Tutorials/Graph/ChangeBackgroundColor/ChangeBackgroundColour.py
BlueTurtle01/PydotTutorials
d1d1cebd41069c9f93a8490dc5dff0ab06ea3101
[ "MIT" ]
null
null
null
Tutorials/Graph/ChangeBackgroundColor/ChangeBackgroundColour.py
BlueTurtle01/PydotTutorials
d1d1cebd41069c9f93a8490dc5dff0ab06ea3101
[ "MIT" ]
null
null
null
Tutorials/Graph/ChangeBackgroundColor/ChangeBackgroundColour.py
BlueTurtle01/PydotTutorials
d1d1cebd41069c9f93a8490dc5dff0ab06ea3101
[ "MIT" ]
null
null
null
import pydot # Create the graph # include the "bgcolor" argument with a string value. graph = pydot.Dot("my_graph", graph_type="graph", bgcolor="yellow") # I have added a node so we can better see that our graph creation has worked. This is naturally a trivial # graph as it has no edges, but as a minimum working exam...
34.933333
106
0.757634
import pydot # Create the graph # include the "bgcolor" argument with a string value. graph = pydot.Dot("my_graph", graph_type="graph", bgcolor="yellow") # I have added a node so we can better see that our graph creation has worked. This is naturally a trivial # graph as it has no edges, but as a minimum working exam...
0
0
0
cae2f1c9fb4552a8433e08a5926dbec94066575a
5,024
py
Python
src/restfx/middleware/middlewares/session.py
mgbin088/restfx
86a499a9a4396829e2c40428feb8b2ee13406d52
[ "MIT", "BSD-3-Clause" ]
1
2021-01-28T00:54:10.000Z
2021-01-28T00:54:10.000Z
src/restfx/middleware/middlewares/session.py
mgbin088/restfx
86a499a9a4396829e2c40428feb8b2ee13406d52
[ "MIT", "BSD-3-Clause" ]
null
null
null
src/restfx/middleware/middlewares/session.py
mgbin088/restfx
86a499a9a4396829e2c40428feb8b2ee13406d52
[ "MIT", "BSD-3-Clause" ]
null
null
null
import string import time from ...app_context import AppContext from ...middleware.interface import MiddlewareBase from ...session.interfaces import ISessionProvider from ...util import md5, b64 """ session id 算法: 其中包含 useragent 和 remote_addr 用于标识一个远程客户端 其值组合成 remote_addr#useragent,计算得到 md5 (length=3...
32.623377
89
0.591959
import string import time from ...app_context import AppContext from ...middleware.interface import MiddlewareBase from ...session.interfaces import ISessionProvider from ...util import md5, b64 """ session id 算法: 其中包含 useragent 和 remote_addr 用于标识一个远程客户端 其值组合成 remote_addr#useragent,计算得到 md5 (length=3...
4,234
19
272
b95f7a54169f5382aa3a3dee0c6801b497a47e32
479
py
Python
assignements/simple_queue_publish.py
Antoine01100/BachelorDIM-Lectures-Algorithms-2020
78b02c75127666618ae3724e231be2c0b936a1b7
[ "MIT" ]
null
null
null
assignements/simple_queue_publish.py
Antoine01100/BachelorDIM-Lectures-Algorithms-2020
78b02c75127666618ae3724e231be2c0b936a1b7
[ "MIT" ]
null
null
null
assignements/simple_queue_publish.py
Antoine01100/BachelorDIM-Lectures-Algorithms-2020
78b02c75127666618ae3724e231be2c0b936a1b7
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Tue Oct 13 13:55:28 2020 @author: bouvaran """ import mykeys import pika AMQP_URL = mykeys.cloudamplink connection = pika.BlockingConnection(pika.URLParameters(AMQP_URL)) channel = connection.channel() channel.queue_declare(queue='presentation’') channel.basic_publish(exchang...
19.16
66
0.680585
# -*- coding: utf-8 -*- """ Created on Tue Oct 13 13:55:28 2020 @author: bouvaran """ import mykeys import pika AMQP_URL = mykeys.cloudamplink connection = pika.BlockingConnection(pika.URLParameters(AMQP_URL)) channel = connection.channel() channel.queue_declare(queue='presentation’') channel.basic_publish(exchang...
0
0
0
b206e2339dcf609d1ed6ee6f2a50da09a2762c08
7,140
py
Python
csv2sql/core/type_inference.py
ymoch/csv2sql
22e20c1ccb7a5b21bacec6bd94b72d3c2e06bb4a
[ "MIT" ]
7
2017-03-07T03:05:12.000Z
2021-03-19T17:12:46.000Z
csv2sql/core/type_inference.py
ymoch/csv2sql
22e20c1ccb7a5b21bacec6bd94b72d3c2e06bb4a
[ "MIT" ]
15
2017-02-06T17:11:01.000Z
2018-08-18T02:55:17.000Z
csv2sql/core/type_inference.py
ymoch/csv2sql
22e20c1ccb7a5b21bacec6bd94b72d3c2e06bb4a
[ "MIT" ]
5
2017-02-05T18:20:00.000Z
2021-11-14T20:20:42.000Z
"""Type pattern.""" import re import decimal import operator import itertools import functools from csv2sql.core.error import InterpretationError, TypeInferenceError _COMPATIBLE_PREDICATES = { 'int': functools.partial(_compatible, int), 'float': functools.partial(_compatible, float), } _DEFAULT_NULL_VALUE ...
29.262295
78
0.658123
"""Type pattern.""" import re import decimal import operator import itertools import functools from csv2sql.core.error import InterpretationError, TypeInferenceError def _compatible(cast_type, value): try: cast_type(value) except ValueError: return False return True _COMPATIBLE_PREDICA...
2,467
557
276
6844e5481b83263b1031e6308182eb8b247ee480
712
py
Python
scout/server/blueprints/diagnoses/views.py
gmc-norr/scout
ea8eaaa079c63e4033af6216ec08da4a314f9b5c
[ "BSD-3-Clause" ]
null
null
null
scout/server/blueprints/diagnoses/views.py
gmc-norr/scout
ea8eaaa079c63e4033af6216ec08da4a314f9b5c
[ "BSD-3-Clause" ]
null
null
null
scout/server/blueprints/diagnoses/views.py
gmc-norr/scout
ea8eaaa079c63e4033af6216ec08da4a314f9b5c
[ "BSD-3-Clause" ]
null
null
null
from flask import Blueprint from scout.server.extensions import store from scout.server.utils import templated, public_endpoint from . import controllers omim_bp = Blueprint("diagnoses", __name__, template_folder="templates") @omim_bp.route("/diagnoses/<omim_nr>", methods=["GET"]) @templated("diagnoses/omim_term.ht...
27.384615
71
0.745787
from flask import Blueprint from scout.server.extensions import store from scout.server.utils import templated, public_endpoint from . import controllers omim_bp = Blueprint("diagnoses", __name__, template_folder="templates") @omim_bp.route("/diagnoses/<omim_nr>", methods=["GET"]) @templated("diagnoses/omim_term.ht...
0
0
0
9bfb08978f09c1ff3df136b1dd1eaf9e25cc2385
11,470
py
Python
sccc_contestbot/__init__.py
queragion2726/sccc_contestbot
91d59196aee11b5859bb8504288ba317523b47fd
[ "Apache-2.0" ]
2
2020-01-04T10:00:35.000Z
2020-02-25T05:08:24.000Z
sccc_contestbot/__init__.py
queragion2726/sccc_contestbot
91d59196aee11b5859bb8504288ba317523b47fd
[ "Apache-2.0" ]
1
2020-07-22T18:25:13.000Z
2020-07-22T18:25:38.000Z
sccc_contestbot/__init__.py
queragion2726/sccc_contestbot
91d59196aee11b5859bb8504288ba317523b47fd
[ "Apache-2.0" ]
1
2021-03-23T13:48:47.000Z
2021-03-23T13:48:47.000Z
import asyncio import logging import threading import time from datetime import datetime from concurrent.futures import ThreadPoolExecutor from typing import List import slack import sqlalchemy from sqlalchemy.orm import sessionmaker, scoped_session import settings from .models import Base, Contest, Subscriber, Conte...
32.128852
88
0.564778
import asyncio import logging import threading import time from datetime import datetime from concurrent.futures import ThreadPoolExecutor from typing import List import slack import sqlalchemy from sqlalchemy.orm import sessionmaker, scoped_session import settings from .models import Base, Contest, Subscriber, Conte...
2,123
9,889
23
985b5ef5d5021bc83c0b152f4da2f8ee2e62e77c
2,000
py
Python
src/stateful_examples/river_crossing.py
FRYoussef/property-based-testing-poker
b5890d8d6934b9f7b17b0173c492a8ae68410e51
[ "MIT" ]
null
null
null
src/stateful_examples/river_crossing.py
FRYoussef/property-based-testing-poker
b5890d8d6934b9f7b17b0173c492a8ae68410e51
[ "MIT" ]
null
null
null
src/stateful_examples/river_crossing.py
FRYoussef/property-based-testing-poker
b5890d8d6934b9f7b17b0173c492a8ae68410e51
[ "MIT" ]
null
null
null
import unittest from enum import Enum from hypothesis import settings, note from hypothesis.stateful import RuleBasedStateMachine, rule, invariant, precondition if __name__ == "__main__": RiverCrossing.TestCase.settings = settings(max_examples=100, stateful_step_count=50) RiverCrossingTest = RiverCrossing.Tes...
32.258065
105
0.654
import unittest from enum import Enum from hypothesis import settings, note from hypothesis.stateful import RuleBasedStateMachine, rule, invariant, precondition class Side(Enum): Left = 0 Right = 1 def __str__(self) -> str: return 'L' if self.value == Side.Left.value else 'R' def switch(self)...
1,048
561
46
0e32a0b20377d21cfdbd17fa5c41d4ac67f6c84c
634
py
Python
apps/users/urls.py
vuonghv/brs
9cdf9431ac69fd7a33d8bf4240a7d49a49ae4a80
[ "MIT" ]
1
2021-01-13T23:42:54.000Z
2021-01-13T23:42:54.000Z
apps/users/urls.py
vuonghv/brs
9cdf9431ac69fd7a33d8bf4240a7d49a49ae4a80
[ "MIT" ]
1
2015-10-09T06:19:29.000Z
2015-10-09T06:19:29.000Z
apps/users/urls.py
vuonghv/brs
9cdf9431ac69fd7a33d8bf4240a7d49a49ae4a80
[ "MIT" ]
8
2015-10-09T02:00:34.000Z
2016-07-08T15:00:37.000Z
from django.conf.urls import url from . import views urlpatterns = [ url(r'^signup/$', views.SignupUserView.as_view(), name='signup'), url(r'^login/$', views.LoginUserView.as_view(), name='login'), url(r'^logout/$', views.logout_user, name='logout'), url(r'^follow/(?P<pk>[0-9]+)/$', v...
42.266667
97
0.608833
from django.conf.urls import url from . import views urlpatterns = [ url(r'^signup/$', views.SignupUserView.as_view(), name='signup'), url(r'^login/$', views.LoginUserView.as_view(), name='login'), url(r'^logout/$', views.logout_user, name='logout'), url(r'^follow/(?P<pk>[0-9]+)/$', v...
0
0
0
e033764b8f85a9224d591af351a901f2c66c2958
5,244
py
Python
ccbb_pyutils/parallel_process_fastqs.py
ucsd-ccbb/ccbb-ucsd-pyutils
944ff2230c66ab70016bcac393e05a7e12f1cfd5
[ "MIT" ]
null
null
null
ccbb_pyutils/parallel_process_fastqs.py
ucsd-ccbb/ccbb-ucsd-pyutils
944ff2230c66ab70016bcac393e05a7e12f1cfd5
[ "MIT" ]
null
null
null
ccbb_pyutils/parallel_process_fastqs.py
ucsd-ccbb/ccbb-ucsd-pyutils
944ff2230c66ab70016bcac393e05a7e12f1cfd5
[ "MIT" ]
null
null
null
# standard libraries import datetime import logging import multiprocessing import timeit import traceback from ccbb_pyutils.bio_seq_utilities import pair_hiseq_read_files from ccbb_pyutils.files_and_paths import get_basename_fps_tuples, get_file_name_pieces, \ get_filepaths_from_wildcard __author__ = 'Amanda Bir...
38.558824
115
0.703852
# standard libraries import datetime import logging import multiprocessing import timeit import traceback from ccbb_pyutils.bio_seq_utilities import pair_hiseq_read_files from ccbb_pyutils.files_and_paths import get_basename_fps_tuples, get_file_name_pieces, \ get_filepaths_from_wildcard __author__ = 'Amanda Bir...
4,674
0
138
bf904e02c66e86111f4b19123d219550390b8449
9,963
py
Python
tests/test_student.py
chrispyles/pybryt
23f8bfce3179638ec5b4efe3555d3bb4e7321dc0
[ "MIT" ]
null
null
null
tests/test_student.py
chrispyles/pybryt
23f8bfce3179638ec5b4efe3555d3bb4e7321dc0
[ "MIT" ]
null
null
null
tests/test_student.py
chrispyles/pybryt
23f8bfce3179638ec5b4efe3555d3bb4e7321dc0
[ "MIT" ]
null
null
null
"""""" import os import nbformat import pkg_resources import pytest import tempfile from copy import deepcopy from functools import lru_cache from textwrap import dedent from unittest import mock from pybryt import ( check, generate_student_impls, ReferenceImplementation, ReferenceResult, StudentImplementation) ...
34.714286
129
0.643882
"""""" import os import nbformat import pkg_resources import pytest import tempfile from copy import deepcopy from functools import lru_cache from textwrap import dedent from unittest import mock from pybryt import ( check, generate_student_impls, ReferenceImplementation, ReferenceResult, StudentImplementation) ...
882
-3
203
b4e10b947ebfeca07132cef83cf18dbccada5bc5
3,122
py
Python
model.py
guocheng2018/ner_bilstm_crf
603f2995f6a73ebf63bc4416e98ea2656dbe9eaa
[ "MIT" ]
15
2019-08-06T06:35:11.000Z
2021-11-01T08:41:37.000Z
model.py
guocheng2018/ner_bilstm_crf
603f2995f6a73ebf63bc4416e98ea2656dbe9eaa
[ "MIT" ]
null
null
null
model.py
guocheng2018/ner_bilstm_crf
603f2995f6a73ebf63bc4416e98ea2656dbe9eaa
[ "MIT" ]
2
2020-12-22T08:08:29.000Z
2021-01-06T04:35:24.000Z
# Author: GC from typing import List import torch import torch.nn as nn from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from torchcrf import CRF class BiLSTM_CRF(nn.Module): """ Args: vocab_size: size of word vocabulary num_tags: total tags embed_dim: word em...
32.520833
88
0.6246
# Author: GC from typing import List import torch import torch.nn as nn from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence from torchcrf import CRF class BiLSTM_CRF(nn.Module): """ Args: vocab_size: size of word vocabulary num_tags: total tags embed_dim: word em...
540
0
27
334b5c96c0c80b3fbce0e0dc2a93bc9f82a0ef74
15,290
py
Python
backend/api/admin/user.py
deti/boss
bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869
[ "Apache-2.0" ]
7
2018-05-20T08:56:08.000Z
2022-03-11T15:50:54.000Z
backend/api/admin/user.py
deti/boss
bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869
[ "Apache-2.0" ]
2
2021-06-08T21:12:51.000Z
2022-01-13T01:25:27.000Z
backend/api/admin/user.py
deti/boss
bc0cfe3067bf1cbf26789f7443a36e7cdd2ac869
[ "Apache-2.0" ]
5
2016-10-09T14:52:09.000Z
2020-12-25T01:04:35.000Z
# -*- coding: utf-8 -*- import conf import errors import logbook import bottle import posixpath from urllib.parse import urljoin from memdb.token import UserToken from model import User, autocommit, MessageTemplate from model import display from memdb.token import PasswordResetToken from api import get, post, put, del...
35.311778
114
0.578875
# -*- coding: utf-8 -*- import conf import errors import logbook import bottle import posixpath from urllib.parse import urljoin from memdb.token import UserToken from model import User, autocommit, MessageTemplate from model import display from memdb.token import PasswordResetToken from api import get, post, put, del...
1,338
13,018
72
345c69b0cd3d3611e0cbaa6da0053f9746981d6b
317
py
Python
nlp100/chapter-02/11.py
nwiizo/joke
808c4c998cc7f5b7f6f3fb5a3ce421588a70c087
[ "MIT" ]
1
2017-01-11T06:12:24.000Z
2017-01-11T06:12:24.000Z
nlp100/chapter-02/11.py
ShuyaMotouchi/joke
808c4c998cc7f5b7f6f3fb5a3ce421588a70c087
[ "MIT" ]
null
null
null
nlp100/chapter-02/11.py
ShuyaMotouchi/joke
808c4c998cc7f5b7f6f3fb5a3ce421588a70c087
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #trコマンド """ python3 12.py 置換前 置換後 """ import sys if __name__=='__main__': print (tra(sys.argv[1],sys.argv[2],sys.argv[3]))
12.68
49
0.615142
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #trコマンド """ python3 12.py 置換前 置換後 """ import sys def tra(file1,val1,val2): try: with open(file1) as f: f = f.read() except: print("miss") finally: print(f.replace(val1,val2)) if __name__=='__main__': print (tra(sys.argv[1],sys.argv[2],sys.argv[3]))
116
0
23
a5b5842b55f82ce2bfb162bae3b7edfff3d1aba8
457
py
Python
script.deluge/resources/lib/basictypes/registry.py
ogero/Deluge-Manager-XBMC
10c4f2a93ac1fffba01209444ba5e597036b968b
[ "MIT" ]
null
null
null
script.deluge/resources/lib/basictypes/registry.py
ogero/Deluge-Manager-XBMC
10c4f2a93ac1fffba01209444ba5e597036b968b
[ "MIT" ]
null
null
null
script.deluge/resources/lib/basictypes/registry.py
ogero/Deluge-Manager-XBMC
10c4f2a93ac1fffba01209444ba5e597036b968b
[ "MIT" ]
null
null
null
"""Mapping from core types/classes to stand-in DataTypeDefinitions""" REGISTRY = { } def registerDT(base, DT): """Register a DataTypeDefinition for a given base-class""" REGISTRY[base] = DT def getDT(base): """Return the appropriate DT for the given base-class This looks up the base in the registry...
24.052632
69
0.700219
"""Mapping from core types/classes to stand-in DataTypeDefinitions""" REGISTRY = { } def registerDT(base, DT): """Register a DataTypeDefinition for a given base-class""" REGISTRY[base] = DT def getDT(base): """Return the appropriate DT for the given base-class This looks up the base in the registry...
0
0
0
e14ec41089318bb31e1accb2b3548a22ce24ef83
1,056
py
Python
layered_settings/loaders/config_parser_loader.py
mathandpencil/layered-settings
8c3a48cc5ac7436a4ac7c1a72e81dad0e58ac7d8
[ "MIT" ]
1
2021-03-21T01:43:22.000Z
2021-03-21T01:43:22.000Z
layered_settings/loaders/config_parser_loader.py
mathandpencil/layered-settings
8c3a48cc5ac7436a4ac7c1a72e81dad0e58ac7d8
[ "MIT" ]
null
null
null
layered_settings/loaders/config_parser_loader.py
mathandpencil/layered-settings
8c3a48cc5ac7436a4ac7c1a72e81dad0e58ac7d8
[ "MIT" ]
null
null
null
import functools import logging import configparser import os from .base_loader import BaseLoader logger = logging.getLogger(__name__)
29.333333
78
0.638258
import functools import logging import configparser import os from .base_loader import BaseLoader logger = logging.getLogger(__name__) class ConfigParserLoader(BaseLoader): def __init__(self, path, ignore_if_missing=False): self.path = path if os.path.exists(self.path): ...
756
16
135
db52d0e6993745640c28ee65e947b48ae54fd623
6,935
py
Python
music_player.py
PracticalMetal/Music-Player
26b3b664ea6d4e10b5890b3f3d2c226a653e92a3
[ "Apache-2.0" ]
null
null
null
music_player.py
PracticalMetal/Music-Player
26b3b664ea6d4e10b5890b3f3d2c226a653e92a3
[ "Apache-2.0" ]
null
null
null
music_player.py
PracticalMetal/Music-Player
26b3b664ea6d4e10b5890b3f3d2c226a653e92a3
[ "Apache-2.0" ]
null
null
null
import os import pickle import tkinter as tk from tkinter import * from tkinter import filedialog # to open songs file from pygame import mixer # to control music play,pause root = tk.Tk() root.config(bg='#C35817') root.geometry( '600x400' ) root.title( "MP3 MUSIC PLAYER 🔊 🎧" ) img = PhotoImage( file=r'images/m...
37.896175
178
0.589329
import os import pickle import tkinter as tk from tkinter import * from tkinter import filedialog # to open songs file from pygame import mixer # to control music play,pause class Player( tk.Frame ): def __init__(self, master): super().__init__( master ) self.master = master self.pack() ...
5,928
4
345
6facc95e1a9d0c12f1abf8dcd9030878ab28b5c8
3,827
py
Python
test/python/transpiler/test_pass_call.py
gadial/qiskit-terra
0fc83f44a6e80969875c738b2cee7bc33223e45f
[ "Apache-2.0" ]
null
null
null
test/python/transpiler/test_pass_call.py
gadial/qiskit-terra
0fc83f44a6e80969875c738b2cee7bc33223e45f
[ "Apache-2.0" ]
12
2018-09-21T12:02:18.000Z
2018-09-25T09:14:59.000Z
test/python/transpiler/test_pass_call.py
gadial/qiskit-terra
0fc83f44a6e80969875c738b2cee7bc33223e45f
[ "Apache-2.0" ]
null
null
null
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
43.988506
98
0.674419
# This code is part of Qiskit. # # (C) Copyright IBM 2017, 2021. # # This code is licensed under the Apache License, Version 2.0. You may # obtain a copy of this license in the LICENSE.txt file in the root directory # of this source tree or at http://www.apache.org/licenses/LICENSE-2.0. # # Any modifications or derivat...
0
0
0
4053350b2cc870776918c441df73f7d514e34d89
139
py
Python
test/conftest.py
jaimeHMol/airflow-kubernetes
f520216555c00dc87158bd7c169d3f36722acac3
[ "MIT" ]
6
2020-11-18T11:02:20.000Z
2021-11-16T13:00:20.000Z
test/conftest.py
jaimeHMol/airflow-kubernetes
f520216555c00dc87158bd7c169d3f36722acac3
[ "MIT" ]
null
null
null
test/conftest.py
jaimeHMol/airflow-kubernetes
f520216555c00dc87158bd7c169d3f36722acac3
[ "MIT" ]
2
2020-11-18T11:02:22.000Z
2020-11-19T04:18:22.000Z
import pytest from airflow.models import DagBag @pytest.fixture(scope="session")
17.375
41
0.776978
import pytest from airflow.models import DagBag @pytest.fixture(scope="session") def dagbag(): return DagBag(include_examples=False)
34
0
22
1153cb6e2f89ac2d6c2be8ad3391a606c16659e4
4,180
py
Python
gen_feas/gen_slide_feas.py
PingjunChen/ThyroidGeneralWSI
ee3adaa4c3aa7c56d3cc5bd7b44d99894578beee
[ "MIT" ]
2
2020-05-02T16:37:13.000Z
2020-05-04T20:44:17.000Z
gen_feas/gen_slide_feas.py
PingjunChen/frozen-thyroid-cls
ee3adaa4c3aa7c56d3cc5bd7b44d99894578beee
[ "MIT" ]
null
null
null
gen_feas/gen_slide_feas.py
PingjunChen/frozen-thyroid-cls
ee3adaa4c3aa7c56d3cc5bd7b44d99894578beee
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import os, sys import numpy as np import argparse, time import torch from pydaily import filesystem from pyimg import combine import openslide import matplotlib.pyplot as plt from skimage import io, transform import deepdish as dd import utils, patch_util if __name__ == '__main__': arg...
41.8
104
0.67799
# -*- coding: utf-8 -*- import os, sys import numpy as np import argparse, time import torch from pydaily import filesystem from pyimg import combine import openslide import matplotlib.pyplot as plt from skimage import io, transform import deepdish as dd import utils, patch_util def predict_slide_fea(slide_path, cls...
3,286
0
69
ab3ebaea3f1a6d00029f5ca6400c93a7db38b8d6
602
py
Python
tests/test_gdal.py
richardsheridan/imageio
f80f068329123fc3c164c522391969ac8eeb0dd4
[ "BSD-2-Clause" ]
null
null
null
tests/test_gdal.py
richardsheridan/imageio
f80f068329123fc3c164c522391969ac8eeb0dd4
[ "BSD-2-Clause" ]
null
null
null
tests/test_gdal.py
richardsheridan/imageio
f80f068329123fc3c164c522391969ac8eeb0dd4
[ "BSD-2-Clause" ]
1
2018-11-03T18:43:26.000Z
2018-11-03T18:43:26.000Z
""" Test gdal plugin functionality. """ import pytest import imageio pytest.importorskip("osgeo", reason="gdal is not installed") def test_gdal_reading(test_images): """Test reading gdal""" filename = test_images / "geotiff.tif" im = imageio.imread(filename, "gdal") assert im.shape == (929, 699) ...
22.296296
60
0.664452
""" Test gdal plugin functionality. """ import pytest import imageio pytest.importorskip("osgeo", reason="gdal is not installed") def test_gdal_reading(test_images): """Test reading gdal""" filename = test_images / "geotiff.tif" im = imageio.imread(filename, "gdal") assert im.shape == (929, 699) ...
0
0
0
d9ba8bca5b7327bbb7e6554d0a3849c186cc4ba9
1,623
py
Python
inspiration/simplegallery/test/upload/variants/test_aws_uploader.py
Zenahr/simple-music-gallery
2cf6e81208b721a91dcbf77e047c7f77182dd194
[ "MIT" ]
1
2020-07-03T17:21:01.000Z
2020-07-03T17:21:01.000Z
simplegallery/test/upload/variants/test_aws_uploader.py
theemack/simple-photo-gallery
f5db98bca7a7443ea7a9172317811f446eff760c
[ "MIT" ]
1
2020-06-20T12:13:00.000Z
2020-06-20T15:32:03.000Z
inspiration/simplegallery/test/upload/variants/test_aws_uploader.py
Zenahr/simple-music-gallery
2cf6e81208b721a91dcbf77e047c7f77182dd194
[ "MIT" ]
null
null
null
import unittest from unittest import mock import os import subprocess from testfixtures import TempDirectory from simplegallery.upload.uploader_factory import get_uploader if __name__ == '__main__': unittest.main()
37.744186
103
0.646334
import unittest from unittest import mock import os import subprocess from testfixtures import TempDirectory from simplegallery.upload.uploader_factory import get_uploader class AWSUploaderTestCase(unittest.TestCase): def test_no_location(self): uploader = get_uploader('aws') self.assertFalse(upl...
1,266
112
23
d3269fd3713d6d4b1c880425b840be5804eac931
154,090
py
Python
discussion/happiness_dictionary.py
mm5110/PIC16A
e2dab91439c2627f6a47f4bf6d16de8ba5977fe8
[ "MIT" ]
10
2020-11-07T04:07:34.000Z
2021-12-31T10:19:12.000Z
discussion/happiness_dictionary.py
mm5110/PIC16A
e2dab91439c2627f6a47f4bf6d16de8ba5977fe8
[ "MIT" ]
16
2021-02-03T22:35:01.000Z
2021-05-24T21:28:56.000Z
discussion/happiness_dictionary.py
mm5110/PIC16A
e2dab91439c2627f6a47f4bf6d16de8ba5977fe8
[ "MIT" ]
19
2020-11-11T05:44:53.000Z
2022-02-01T14:10:15.000Z
happiness_dictionary={'laughter':8.5, 'happiness':8.44, 'love':8.42, 'happy':8.3, 'laughed':8.26, 'laugh':8.22, 'laughing':8.2, 'excellent':8.18, 'laughs':8.18, 'joy':8.16, 'successful':8.16, 'win':8.12, 'rainbow':8.1, 'smile':8.1, 'won':8.1, 'pleasure':8.08, 'smiled':8.08, 'rainbows':8.06, 'winning':8.04, 'celebratio...
15.071401
37
0.600363
happiness_dictionary={'laughter':8.5, 'happiness':8.44, 'love':8.42, 'happy':8.3, 'laughed':8.26, 'laugh':8.22, 'laughing':8.2, 'excellent':8.18, 'laughs':8.18, 'joy':8.16, 'successful':8.16, 'win':8.12, 'rainbow':8.1, 'smile':8.1, 'won':8.1, 'pleasure':8.08, 'smiled':8.08, 'rainbows':8.06, 'winning':8.04, 'celebratio...
0
0
0
649d71de77a159fa7464be3ada8151dcf99987bf
1,012
py
Python
Encoder.py
Amirhossein-Zare/rsa-manager
6dfcbb5b948257ef448cbc932f5338bb3e53daba
[ "MIT" ]
1
2021-02-15T17:20:42.000Z
2021-02-15T17:20:42.000Z
Encoder.py
Amirhossein-Zare/rsa-manager
6dfcbb5b948257ef448cbc932f5338bb3e53daba
[ "MIT" ]
1
2021-02-15T17:19:28.000Z
2021-02-15T17:19:28.000Z
Encoder.py
Amirhossein-Zare/rsa-manager
6dfcbb5b948257ef448cbc932f5338bb3e53daba
[ "MIT" ]
null
null
null
# See transform.py for more info import transform import ascii # M(message in numbers) ** e(key[0]) mod n(key[1]) = C(output)
29.764706
68
0.594862
# See transform.py for more info import transform import ascii # M(message in numbers) ** e(key[0]) mod n(key[1]) = C(output) def encrypt(): message = input("What is your secret message?") key = [0, 0] key[0] = int(input("Now please type/paste e(public key) here:")) key[1] = int(input("Now please type/...
863
0
22
ed3ddab75fd8cd35f3e3498ca2b3368b5d9a384c
111
py
Python
setup.py
jskeys/words
00467466cb7f7157c47ea49b91d5a540765cc4aa
[ "MIT" ]
null
null
null
setup.py
jskeys/words
00467466cb7f7157c47ea49b91d5a540765cc4aa
[ "MIT" ]
null
null
null
setup.py
jskeys/words
00467466cb7f7157c47ea49b91d5a540765cc4aa
[ "MIT" ]
null
null
null
import site import sys from setuptools import setup site.ENABLE_USER_SITE = "--user" in sys.argv[1:] setup()
13.875
48
0.747748
import site import sys from setuptools import setup site.ENABLE_USER_SITE = "--user" in sys.argv[1:] setup()
0
0
0
510340caa64571a122561488ddd79b7b088711e0
2,232
py
Python
simple-proxy/tcp_proxy_encoded.py
liangsai12/Hassio-Addons
d320b4a8c7f54ac6fd7d6ce8aef0581c662a5017
[ "Apache-2.0" ]
null
null
null
simple-proxy/tcp_proxy_encoded.py
liangsai12/Hassio-Addons
d320b4a8c7f54ac6fd7d6ce8aef0581c662a5017
[ "Apache-2.0" ]
null
null
null
simple-proxy/tcp_proxy_encoded.py
liangsai12/Hassio-Addons
d320b4a8c7f54ac6fd7d6ce8aef0581c662a5017
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import os import json import socket import threading from selectors import DefaultSelector, EVENT_READ # Proxy开放的端口号 LOCAL_PORT = 7088 # 连接的远程服务器与端口,修改成你的远程服务器地址 REMOTE_ADDR = "hachinasp.duckdns.org" REMOTE_PORT = 7088 def xor_encode( bstring ): """一个简单编码:两次编码后与原值相同""" MASK = 0x55 ...
26.258824
100
0.59095
#!/usr/bin/env python3 import os import json import socket import threading from selectors import DefaultSelector, EVENT_READ # Proxy开放的端口号 LOCAL_PORT = 7088 # 连接的远程服务器与端口,修改成你的远程服务器地址 REMOTE_ADDR = "hachinasp.duckdns.org" REMOTE_PORT = 7088 def xor_encode( bstring ): """一个简单编码:两次编码后与原值相同""" MASK = 0x55 ...
0
0
0
ad92cc4df4b6ad37e22118abd074de52c4815494
667
py
Python
CS-483_Big-Data-Analytics-Capstone_2020-Spring/code/statistics/crime-over-time-by-type.py
CraftingGamerTom/wsu-computer-science
aa40fc95a84ac95535284048f6f572def1375f7d
[ "MIT" ]
null
null
null
CS-483_Big-Data-Analytics-Capstone_2020-Spring/code/statistics/crime-over-time-by-type.py
CraftingGamerTom/wsu-computer-science
aa40fc95a84ac95535284048f6f572def1375f7d
[ "MIT" ]
null
null
null
CS-483_Big-Data-Analytics-Capstone_2020-Spring/code/statistics/crime-over-time-by-type.py
CraftingGamerTom/wsu-computer-science
aa40fc95a84ac95535284048f6f572def1375f7d
[ "MIT" ]
null
null
null
# https://www.kaggle.com/skeftical/chicago-crimes-eda-spatio-temporal # Crime over time (by type) # This is very resource intensive to run crimes_count_date = crimes.pivot_table('P_INCID_NO', aggfunc=np.size, columns='IBR_TYPE', index=crimes.index, fill_value=0) crimes_count_date.index = pd.DatetimeIndex(crimes_count...
44.466667
124
0.757121
# https://www.kaggle.com/skeftical/chicago-crimes-eda-spatio-temporal # Crime over time (by type) # This is very resource intensive to run crimes_count_date = crimes.pivot_table('P_INCID_NO', aggfunc=np.size, columns='IBR_TYPE', index=crimes.index, fill_value=0) crimes_count_date.index = pd.DatetimeIndex(crimes_count...
0
0
0
29d2e41188a0da558bc18421bb19c9f3e24ccafc
199
py
Python
apps/categories/urls.py
ressapanda/fishka-backend
c1eb58566dce01c7a011f0093893cd16b6d50875
[ "MIT" ]
null
null
null
apps/categories/urls.py
ressapanda/fishka-backend
c1eb58566dce01c7a011f0093893cd16b6d50875
[ "MIT" ]
null
null
null
apps/categories/urls.py
ressapanda/fishka-backend
c1eb58566dce01c7a011f0093893cd16b6d50875
[ "MIT" ]
null
null
null
from rest_framework import routers from apps.categories.views import CategoryViewSet router = routers.SimpleRouter() router.register(r"", CategoryViewSet, "categories") urlpatterns = router.urls
19.9
51
0.809045
from rest_framework import routers from apps.categories.views import CategoryViewSet router = routers.SimpleRouter() router.register(r"", CategoryViewSet, "categories") urlpatterns = router.urls
0
0
0
006f3a7558111c7d27acad4e2d9118022e4d4e03
6,975
py
Python
tests/router_test.py
aio-libs-abandoned/aiorest
3caf0ad8018d96bd681843b54aa07c86803fbec8
[ "MIT" ]
3
2018-02-07T04:16:53.000Z
2018-04-26T21:56:59.000Z
tests/router_test.py
aio-libs-abandoned/aiorest
3caf0ad8018d96bd681843b54aa07c86803fbec8
[ "MIT" ]
null
null
null
tests/router_test.py
aio-libs-abandoned/aiorest
3caf0ad8018d96bd681843b54aa07c86803fbec8
[ "MIT" ]
null
null
null
import unittest from unittest import mock import asyncio import aiohttp from aiorest import RESTServer, Request import json
37.299465
78
0.586667
import unittest from unittest import mock import asyncio import aiohttp from aiorest import RESTServer, Request import json class RouterTests(unittest.TestCase): def setUp(self): self.loop = asyncio.new_event_loop() asyncio.set_event_loop(None) self.server = RESTServer(hostname='example....
6,351
16
482
67fd0980e8bfd9e6fdcb6df4ed1cfde8f1348929
2,515
py
Python
aliyun-python-sdk-dybaseapi/aliyunsdkdybaseapi/mns/mns_request.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
1,001
2015-07-24T01:32:41.000Z
2022-03-25T01:28:18.000Z
aliyun-python-sdk-dybaseapi/aliyunsdkdybaseapi/mns/mns_request.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
363
2015-10-20T03:15:00.000Z
2022-03-08T12:26:19.000Z
aliyun-python-sdk-dybaseapi/aliyunsdkdybaseapi/mns/mns_request.py
yndu13/aliyun-openapi-python-sdk
12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5
[ "Apache-2.0" ]
682
2015-09-22T07:19:02.000Z
2022-03-22T09:51:46.000Z
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
29.940476
87
0.686282
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
1,190
114
397
9a541e688037965d295b83fe7772fcef39af44d0
1,006
py
Python
src/server.py
CaC-Grupo-9/backend
107067d8bc13ee2ba28c9c1a8bd0b19a4cf55277
[ "MIT" ]
1
2021-12-03T16:10:27.000Z
2021-12-03T16:10:27.000Z
src/server.py
CaC-Grupo-9/backend
107067d8bc13ee2ba28c9c1a8bd0b19a4cf55277
[ "MIT" ]
null
null
null
src/server.py
CaC-Grupo-9/backend
107067d8bc13ee2ba28c9c1a8bd0b19a4cf55277
[ "MIT" ]
5
2021-11-15T23:30:05.000Z
2021-11-30T13:10:59.000Z
from http.server import BaseHTTPRequestHandler from http.server import HTTPServer import os with HTTPServer(('', 8000), handler) as server: server.serve_forever()
35.928571
94
0.643141
from http.server import BaseHTTPRequestHandler from http.server import HTTPServer import os class handler(BaseHTTPRequestHandler): def do_GET(self): self.send_response(200) self.send_header('Content-type','application/json') self.end_headers() script_dir = os.path.dirname(__file__) ...
742
17
80
ab789c35e7c93cf4d2515dde51e2bcb17301e2fa
2,187
py
Python
encryt_by_Caesar_cipher.py
Glenn-Po/LearningPython
96b12999d13b55216a3da6cf6b9248a8e86cbe0b
[ "Apache-2.0" ]
null
null
null
encryt_by_Caesar_cipher.py
Glenn-Po/LearningPython
96b12999d13b55216a3da6cf6b9248a8e86cbe0b
[ "Apache-2.0" ]
null
null
null
encryt_by_Caesar_cipher.py
Glenn-Po/LearningPython
96b12999d13b55216a3da6cf6b9248a8e86cbe0b
[ "Apache-2.0" ]
null
null
null
#implement caesar's cipher #it is well simple to implement and it uses the idea of ASCII character codes #Note that in Python,characters are encoded in UNICODE by default #The idea behind this encryption is to shift indvidual x-ters in a string(message) by a certain number(the key) #White spaces are not encrypted fr...
37.067797
111
0.589392
#implement caesar's cipher #it is well simple to implement and it uses the idea of ASCII character codes #Note that in Python,characters are encoded in UNICODE by default #The idea behind this encryption is to shift indvidual x-ters in a string(message) by a certain number(the key) #White spaces are not encrypted fr...
1,647
0
69
b52f9d37fe6b32f6785b7f5f9cf9060cea6cecf0
4,138
py
Python
site-generator/generate.py
kleutzinger/kleutzinger.github.io
ceb3d78d918e44a0636b11cfb923a116781f6363
[ "MIT" ]
1
2016-01-11T06:50:37.000Z
2016-01-11T06:50:37.000Z
site-generator/generate.py
kleutzinger/kleutzinger.github.io
ceb3d78d918e44a0636b11cfb923a116781f6363
[ "MIT" ]
1
2021-06-02T04:11:08.000Z
2021-06-02T04:11:08.000Z
site-generator/generate.py
kleutzinger/kleutzinger.github.io
ceb3d78d918e44a0636b11cfb923a116781f6363
[ "MIT" ]
null
null
null
import datetime import time import os from markdown import markdown import dominate import sass from dominate.tags import * from dominate.util import raw from prettify import html_prettify import ingest def gen_tags(project): "display tags over picture when card is hovered" tag_list = project.get("technologi...
27.959459
93
0.594732
import datetime import time import os from markdown import markdown import dominate import sass from dominate.tags import * from dominate.util import raw from prettify import html_prettify import ingest def generate_css(): with open("card.scss") as f: uncompiled = f.read() compiled = sass.compile(...
1,135
0
119
92e4a26b450f124c1a796965f61aeab928387856
7,427
py
Python
tests/core/data/test_transforms.py
Site-Command/lightning-flash
bfff08ded9cf193cce1cd16e7034d8005de172ae
[ "Apache-2.0" ]
1
2021-06-01T09:59:03.000Z
2021-06-01T09:59:03.000Z
tests/core/data/test_transforms.py
Site-Command/lightning-flash
bfff08ded9cf193cce1cd16e7034d8005de172ae
[ "Apache-2.0" ]
null
null
null
tests/core/data/test_transforms.py
Site-Command/lightning-flash
bfff08ded9cf193cce1cd16e7034d8005de172ae
[ "Apache-2.0" ]
null
null
null
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
34.705607
110
0.569678
# Copyright The PyTorch Lightning team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to i...
2,588
1,956
90
b46e8e2aacdd145262f76dc3ea2ddc2a0d8354ca
873
bzl
Python
rules.bzl
DataDog/bazel-mypy-integration
b35f54dcb68db4edc98826c2dc831665e566fc5c
[ "MIT" ]
59
2019-12-02T11:06:55.000Z
2022-01-23T00:39:20.000Z
rules.bzl
DataDog/bazel-mypy-integration
b35f54dcb68db4edc98826c2dc831665e566fc5c
[ "MIT" ]
38
2019-12-08T05:51:32.000Z
2022-03-28T21:24:19.000Z
rules.bzl
DataDog/bazel-mypy-integration
b35f54dcb68db4edc98826c2dc831665e566fc5c
[ "MIT" ]
28
2020-02-11T02:28:17.000Z
2022-03-31T02:34:21.000Z
MyPyStubsInfo = provider( fields = { "srcs": ".pyi stub files", }, ) mypy_stubs = rule( implementation = _mypy_stubs_impl, attrs = { "srcs": attr.label_list( allow_empty = False, mandatory = True, doc = "TODO(Jonathon)", allow_files = [".p...
23.594595
60
0.539519
MyPyStubsInfo = provider( fields = { "srcs": ".pyi stub files", }, ) def _mypy_stubs_impl(ctx): pyi_srcs = [] for target in ctx.attr.srcs: pyi_srcs.extend(target.files.to_list()) transitive_srcs = depset(direct = pyi_srcs) return [ MyPyStubsInfo( srcs = ctx....
504
0
23
9a554f3d5fecf47993aafe33bd1584e1008ea14f
4,491
py
Python
synch/convert.py
luolin0313/synch
1a4a1262c20a85fe06f2cb40291f0a066572518b
[ "Apache-2.0" ]
null
null
null
synch/convert.py
luolin0313/synch
1a4a1262c20a85fe06f2cb40291f0a066572518b
[ "Apache-2.0" ]
null
null
null
synch/convert.py
luolin0313/synch
1a4a1262c20a85fe06f2cb40291f0a066572518b
[ "Apache-2.0" ]
1
2020-09-28T01:37:00.000Z
2020-09-28T01:37:00.000Z
import sqlparse from sqlparse.sql import Function, Identifier from sqlparse.sql import Token as SQLToken from sqlparse.sql import TokenList from sqlparse.tokens import Keyword, Token, Whitespace
43.182692
100
0.515253
import sqlparse from sqlparse.sql import Function, Identifier from sqlparse.sql import Token as SQLToken from sqlparse.sql import TokenList from sqlparse.tokens import Keyword, Token, Whitespace class SqlConvert: _type_mapping = { "date": "Date", "datetime": "DateTime", "bool": "UInt8", ...
3,403
869
23
4c3c26fd6d7f8c7c96dd471cbbf5a45a7d7e4c61
60,553
py
Python
cogs/clan_battle.py
hibibol/clanbattle-management
89a8041ed26e5fc1ca117534737516e58fd77583
[ "MIT" ]
1
2021-06-07T21:11:05.000Z
2021-06-07T21:11:05.000Z
cogs/clan_battle.py
hibibol/clanbattle-management
89a8041ed26e5fc1ca117534737516e58fd77583
[ "MIT" ]
4
2021-07-05T12:58:30.000Z
2021-08-06T11:18:11.000Z
cogs/clan_battle.py
hibibol/clanbattle-management
89a8041ed26e5fc1ca117534737516e58fd77583
[ "MIT" ]
null
null
null
import asyncio from collections import defaultdict from datetime import datetime, timedelta from functools import reduce from logging import getLogger from typing import List, Optional, Tuple from operator import sub import discord from discord import colour from discord.channel import TextChannel from discord.errors ...
42.854211
156
0.623817
import asyncio from collections import defaultdict from datetime import datetime, timedelta from functools import reduce from logging import getLogger from typing import List, Optional, Tuple from operator import sub import discord from discord import colour from discord.channel import TextChannel from discord.errors ...
16,993
47,596
46
406ac3a0994759eb44a396f798b588513f0a2419
30,236
py
Python
pysnmp-with-texts/Juniper-IP-PROFILE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
8
2019-05-09T17:04:00.000Z
2021-06-09T06:50:51.000Z
pysnmp-with-texts/Juniper-IP-PROFILE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
4
2019-05-31T16:42:59.000Z
2020-01-31T21:57:17.000Z
pysnmp-with-texts/Juniper-IP-PROFILE-MIB.py
agustinhenze/mibs.snmplabs.com
1fc5c07860542b89212f4c8ab807057d9a9206c7
[ "Apache-2.0" ]
10
2019-04-30T05:51:36.000Z
2022-02-16T03:33:41.000Z
# # PySNMP MIB module Juniper-IP-PROFILE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-IP-PROFILE-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:03:04 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (d...
179.97619
2,142
0.789489
# # PySNMP MIB module Juniper-IP-PROFILE-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/Juniper-IP-PROFILE-MIB # Produced by pysmi-0.3.4 at Wed May 1 14:03:04 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (d...
0
0
0
11f91dae0c7b880aa4315bbca353b562a60d8179
11,279
py
Python
tfsnippet/utils/reuse.py
haowen-xu/tfsnippet-pre-alpha
31eb2cf692ac25b95cc815aaca53754d6db42d9f
[ "MIT" ]
null
null
null
tfsnippet/utils/reuse.py
haowen-xu/tfsnippet-pre-alpha
31eb2cf692ac25b95cc815aaca53754d6db42d9f
[ "MIT" ]
null
null
null
tfsnippet/utils/reuse.py
haowen-xu/tfsnippet-pre-alpha
31eb2cf692ac25b95cc815aaca53754d6db42d9f
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import inspect import functools import weakref from contextlib import contextmanager import six import tensorflow as tf from .scope import reopen_variable_scope, root_variable_scope __all__ = [ 'auto_reuse_variables', 'local_reuse', 'global_reuse', 'instance_reuse', ] @contextmanager de...
33.769461
79
0.620534
# -*- coding: utf-8 -*- import inspect import functools import weakref from contextlib import contextmanager import six import tensorflow as tf from .scope import reopen_variable_scope, root_variable_scope __all__ = [ 'auto_reuse_variables', 'local_reuse', 'global_reuse', 'instance_reuse', ] @contextmanager de...
1,387
0
139
2be175cce772400eb717edef1cda536954ea7271
13,316
py
Python
tools/train_net.py
donghongwen/SSM
d0ef9fca75240ec2c0e15b2e26f78e19f2f6afc7
[ "MIT" ]
3
2019-11-01T11:50:43.000Z
2021-05-07T07:26:51.000Z
tools/train_net.py
donghongwen/SSM
d0ef9fca75240ec2c0e15b2e26f78e19f2f6afc7
[ "MIT" ]
null
null
null
tools/train_net.py
donghongwen/SSM
d0ef9fca75240ec2c0e15b2e26f78e19f2f6afc7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Train a Fast R-CNN network on a region of int...
42.954839
194
0.591018
#!/usr/bin/env python # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Ross Girshick # -------------------------------------------------------- """Train a Fast R-CNN network on a region of int...
875
0
45
c595589da7b4d85ae7c0668163c3f9ca736b61d6
3,600
py
Python
storops/vnx/resource/cifs_server.py
tunaruraul/storops
7092c516c55b4c2f00c7c22383e1ad46ecfec091
[ "Apache-2.0" ]
60
2016-04-18T23:42:10.000Z
2022-03-23T02:26:03.000Z
storops/vnx/resource/cifs_server.py
tunaruraul/storops
7092c516c55b4c2f00c7c22383e1ad46ecfec091
[ "Apache-2.0" ]
317
2016-05-25T06:45:37.000Z
2022-03-25T13:22:38.000Z
storops/vnx/resource/cifs_server.py
tunaruraul/storops
7092c516c55b4c2f00c7c22383e1ad46ecfec091
[ "Apache-2.0" ]
34
2016-03-18T02:39:12.000Z
2022-01-07T12:54:14.000Z
# coding=utf-8 # Copyright (c) 2015 EMC Corporation. # 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 # #...
33.962264
79
0.655556
# coding=utf-8 # Copyright (c) 2015 EMC Corporation. # 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 # #...
2,284
333
95
f786169a8c203fe08bb2f78833d9abf361b486f1
1,023
py
Python
examples/dags/spark_example.py
FreeUniDataEngineering/airflow-spark2.4-hue-hive
031d7f9d90ace6f4f5cfe6ae2f2998ec8b53edbe
[ "Apache-2.0" ]
null
null
null
examples/dags/spark_example.py
FreeUniDataEngineering/airflow-spark2.4-hue-hive
031d7f9d90ace6f4f5cfe6ae2f2998ec8b53edbe
[ "Apache-2.0" ]
null
null
null
examples/dags/spark_example.py
FreeUniDataEngineering/airflow-spark2.4-hue-hive
031d7f9d90ace6f4f5cfe6ae2f2998ec8b53edbe
[ "Apache-2.0" ]
null
null
null
from datetime import datetime from airflow.models import DAG from airflow.providers.apache.spark.operators.spark_jdbc import SparkJDBCOperator from airflow.providers.apache.spark.operators.spark_sql import SparkSqlOperator from airflow.providers.apache.spark.operators.spark_submit import SparkSubmitOperator im...
33
104
0.72825
from datetime import datetime from airflow.models import DAG from airflow.providers.apache.spark.operators.spark_jdbc import SparkJDBCOperator from airflow.providers.apache.spark.operators.spark_sql import SparkSqlOperator from airflow.providers.apache.spark.operators.spark_submit import SparkSubmitOperator im...
0
0
0
fdd34b5cf650058e67e9c8f00cb7ffdbcaddec58
4,235
py
Python
tests/test_help_mixin.py
TheFriendlyCoder/FriendlyShell
8508c09e787cb8f0fc44c2a9e2587e8d4eec555c
[ "Apache-2.0" ]
null
null
null
tests/test_help_mixin.py
TheFriendlyCoder/FriendlyShell
8508c09e787cb8f0fc44c2a9e2587e8d4eec555c
[ "Apache-2.0" ]
93
2018-04-21T01:03:06.000Z
2019-06-23T14:22:37.000Z
tests/test_help_mixin.py
TheFriendlyCoder/FriendlyShell
8508c09e787cb8f0fc44c2a9e2587e8d4eec555c
[ "Apache-2.0" ]
null
null
null
import logging from friendlyshell.base_shell import BaseShell from friendlyshell.shell_help_mixin import ShellHelpMixin from friendlyshell.basic_logger_mixin import BasicLoggerMixin from mock import patch import pytest if __name__ == "__main__": pytest.main([__file__, "-v", "-s"])
29.006849
65
0.661865
import logging from friendlyshell.base_shell import BaseShell from friendlyshell.shell_help_mixin import ShellHelpMixin from friendlyshell.basic_logger_mixin import BasicLoggerMixin from mock import patch import pytest def test_list_commands(caplog): caplog.set_level(logging.INFO) class MyShell (BasicLoggerMi...
3,735
0
207
e692149ccb7316fa1ad458af36150929e61cfa52
4,990
py
Python
src/tess_bite/core.py
SSDataLab/tess-bite
bb2314472da1da8addc14b14407879cdc2fb78a1
[ "MIT" ]
null
null
null
src/tess_bite/core.py
SSDataLab/tess-bite
bb2314472da1da8addc14b14407879cdc2fb78a1
[ "MIT" ]
null
null
null
src/tess_bite/core.py
SSDataLab/tess-bite
bb2314472da1da8addc14b14407879cdc2fb78a1
[ "MIT" ]
null
null
null
import re import io import struct import numpy as np import httpx import logging from . import log # FITS standard specifies that header and data units # shall be a multiple of 2880 bytes long. FITS_BLOCK_SIZE = 2880 # bytes # TESS FFI dimensions FFI_COLUMNS = 2136 # i.e. NAXIS1 FFI_ROWS = 2078 # i.e. NAXIS2 BY...
33.046358
99
0.574749
import re import io import struct import numpy as np import httpx import logging from . import log # FITS standard specifies that header and data units # shall be a multiple of 2880 bytes long. FITS_BLOCK_SIZE = 2880 # bytes # TESS FFI dimensions FFI_COLUMNS = 2136 # i.e. NAXIS1 FFI_ROWS = 2078 # i.e. NAXIS2 BY...
903
2,885
72
a36d766253f894dd156d7b19146b347988d5b41c
1,823
py
Python
cngi/vis/ddiregrid.py
wxiongccnu1990/cngi_prototype
7a7230485acc9f8f2be534a832522339153d521e
[ "Apache-2.0" ]
null
null
null
cngi/vis/ddiregrid.py
wxiongccnu1990/cngi_prototype
7a7230485acc9f8f2be534a832522339153d521e
[ "Apache-2.0" ]
null
null
null
cngi/vis/ddiregrid.py
wxiongccnu1990/cngi_prototype
7a7230485acc9f8f2be534a832522339153d521e
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 AUI, Inc. Washington DC, USA # # 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 ...
33.759259
201
0.666484
# Copyright 2019 AUI, Inc. Washington DC, USA # # 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 ...
0
0
0
f726670921d44f21aa09f17d795a742ee0c1fa0c
8,397
py
Python
test/bitfinex_test.py
laisee/bitfinex
6a3e7cd412f186eca0039602d32c65938a392747
[ "MIT" ]
null
null
null
test/bitfinex_test.py
laisee/bitfinex
6a3e7cd412f186eca0039602d32c65938a392747
[ "MIT" ]
null
null
null
test/bitfinex_test.py
laisee/bitfinex
6a3e7cd412f186eca0039602d32c65938a392747
[ "MIT" ]
null
null
null
import unittest import mock import requests import httpretty import settings from bitfinex.client import Client, TradeClient API_KEY = settings.API_KEY API_SECRET = settings.API_SECRET
37.995475
400
0.609265
import unittest import mock import requests import httpretty import settings from bitfinex.client import Client, TradeClient API_KEY = settings.API_KEY API_SECRET = settings.API_SECRET class BitfinexTest(unittest.TestCase): def setUp(self): self.client = Client() def test_should_have_server(self):...
7,325
704
180
ffb0d45447adc197d2881748bf726e3906e01ee8
18,785
py
Python
building.py
Miracle2333/BSPPN
f29182972fd4a13c47d5fb08b7e4faea2aabd77d
[ "MIT" ]
null
null
null
building.py
Miracle2333/BSPPN
f29182972fd4a13c47d5fb08b7e4faea2aabd77d
[ "MIT" ]
null
null
null
building.py
Miracle2333/BSPPN
f29182972fd4a13c47d5fb08b7e4faea2aabd77d
[ "MIT" ]
null
null
null
""" Mask R-CNN Configurations and data loading code for MS COCO. Copyright (c) 2017 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by Waleed Abdulla ------------------------------------------------------------ Usage: import the module (see Jupyter notebooks for examples), or run fr...
37.796781
115
0.544903
""" Mask R-CNN Configurations and data loading code for MS COCO. Copyright (c) 2017 Matterport, Inc. Licensed under the MIT License (see LICENSE for details) Written by Waleed Abdulla ------------------------------------------------------------ Usage: import the module (see Jupyter notebooks for examples), or run fr...
0
8,389
53
f47ae364c1bf7232c3bfb14b310a63fe108d871a
5,911
py
Python
datasets/coco/coco_dataset.py
periakiva/finding_berries
1dfc7cf00c384321e39872921051dc9535355e53
[ "MIT" ]
11
2020-05-11T21:57:44.000Z
2022-01-05T14:44:28.000Z
datasets/coco/coco_dataset.py
periakiva/finding_berries
1dfc7cf00c384321e39872921051dc9535355e53
[ "MIT" ]
2
2020-07-29T10:08:36.000Z
2022-01-18T15:38:57.000Z
datasets/coco/coco_dataset.py
periakiva/finding_berries
1dfc7cf00c384321e39872921051dc9535355e53
[ "MIT" ]
2
2021-08-29T17:20:38.000Z
2021-09-21T21:07:30.000Z
# from .vision import VisionDataset from PIL import Image import os import os.path from torch.utils.data import Dataset from torchvision import transforms import utils.utils as utils import torch import numpy as np from pycocotools import mask import matplotlib.pyplot as plt import random class CocoDetection(Dataset)...
38.383117
168
0.607342
# from .vision import VisionDataset from PIL import Image import os import os.path from torch.utils.data import Dataset from torchvision import transforms import utils.utils as utils import torch import numpy as np from pycocotools import mask import matplotlib.pyplot as plt import random def build_train_validation_l...
3,515
0
104