hexsha
stringlengths
40
40
size
int64
6
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
130
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
130
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
130
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.53
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
6
1.04M
filtered:remove_non_ascii
int64
0
538k
filtered:remove_decorators
int64
0
917k
filtered:remove_async
int64
0
722k
filtered:remove_classes
int64
-45
1M
filtered:remove_generators
int64
0
814k
filtered:remove_function_no_docstring
int64
-102
850k
filtered:remove_class_no_docstring
int64
-3
5.46k
filtered:remove_unused_imports
int64
-1,350
52.4k
filtered:remove_delete_markers
int64
0
59.6k
c3a2e2f54e8af90178fcb6c54fa3c64f500167cd
32,123
py
Python
vcf/test/test_vcf.py
jdiez/PyVCF
cd30d62e6fa3c9a44ed711adf0d22af3a4e4a5a1
[ "MIT" ]
1
2015-11-23T01:23:00.000Z
2015-11-23T01:23:00.000Z
vcf/test/test_vcf.py
jdiez/PyVCF
cd30d62e6fa3c9a44ed711adf0d22af3a4e4a5a1
[ "MIT" ]
null
null
null
vcf/test/test_vcf.py
jdiez/PyVCF
cd30d62e6fa3c9a44ed711adf0d22af3a4e4a5a1
[ "MIT" ]
null
null
null
from __future__ import print_function import unittest import doctest import vcf suite = doctest.DocTestSuite(vcf) suite.addTests(unittest.TestLoader().loadTestsFromTestCase(TestGatkOutput)) suite.addTests(unittest.TestLoader().loadTestsFromTestCase(TestFreebayesOutput)) suite.addTests(unitte...
34.429796
176
0.559225
from __future__ import print_function import unittest import doctest import os import commands import cPickle from StringIO import StringIO import vcf from vcf import utils suite = doctest.DocTestSuite(vcf) def fh(fname, mode='rt'): return open(os.path.join(os.path.dirname(__file__), fname), mode) class TestV...
0
0
0
29,854
0
74
0
-17
616
2b23c694cce3e26db30642f22c91aac8af8436c3
9,940
py
Python
collect.py
urish/multi_project_tools
b2b8a2988b9647626955bfbb78993b57fcff3f56
[ "Apache-2.0" ]
20
2021-03-03T11:04:43.000Z
2022-03-17T00:17:07.000Z
collect.py
urish/multi_project_tools
b2b8a2988b9647626955bfbb78993b57fcff3f56
[ "Apache-2.0" ]
32
2021-05-01T21:01:14.000Z
2022-03-17T18:13:10.000Z
collect.py
urish/multi_project_tools
b2b8a2988b9647626955bfbb78993b57fcff3f56
[ "Apache-2.0" ]
16
2021-03-07T15:39:40.000Z
2022-03-21T23:21:56.000Z
REQUIRED_KEYS_GROUP = ["projects", "caravel", "lvs"]
43.406114
123
0.582394
from utils import * import subprocess import copy from project import Project from codegen.caravel_codegen import generate_openlane_files from codegen.allocator import allocate_macros REQUIRED_KEYS_GROUP = ["projects", "caravel", "lvs"] class Collection(object): def __init__(self, args): self.args = arg...
0
0
0
9,678
0
0
0
52
155
3267ba79cb24231f425d7146d4e0f06bc22b758f
288
py
Python
wagtail/wagtaildocs/permissions.py
yohanlebret/wagtail
03c623b467ef8ed3849872273ebad13d48f755ac
[ "BSD-3-Clause" ]
null
null
null
wagtail/wagtaildocs/permissions.py
yohanlebret/wagtail
03c623b467ef8ed3849872273ebad13d48f755ac
[ "BSD-3-Clause" ]
null
null
null
wagtail/wagtaildocs/permissions.py
yohanlebret/wagtail
03c623b467ef8ed3849872273ebad13d48f755ac
[ "BSD-3-Clause" ]
1
2019-03-05T15:37:22.000Z
2019-03-05T15:37:22.000Z
from wagtail.wagtailcore.permission_policies import OwnershipPermissionPolicy from wagtail.wagtaildocs.models import Document, get_document_model permission_policy = OwnershipPermissionPolicy( get_document_model(), auth_model=Document, owner_field_name='uploaded_by_user' )
28.8
77
0.840278
from wagtail.wagtailcore.permission_policies import OwnershipPermissionPolicy from wagtail.wagtaildocs.models import Document, get_document_model permission_policy = OwnershipPermissionPolicy( get_document_model(), auth_model=Document, owner_field_name='uploaded_by_user' )
0
0
0
0
0
0
0
0
0
a93bb7d8be77c1f82c175aea7aaffbcef63d7b51
4,728
py
Python
zapr/utils/Utils.py
zapr-oss/zapr-athena-client
3fd953120b7eb64e4325f44a5be8a0b464741ab6
[ "Apache-2.0" ]
1
2020-11-05T09:25:51.000Z
2020-11-05T09:25:51.000Z
zapr/utils/Utils.py
zapr-oss/zapr-athena-client
3fd953120b7eb64e4325f44a5be8a0b464741ab6
[ "Apache-2.0" ]
1
2021-05-03T11:30:53.000Z
2021-05-03T11:30:53.000Z
zapr/utils/Utils.py
zapr-oss/zapr-athena-client
3fd953120b7eb64e4325f44a5be8a0b464741ab6
[ "Apache-2.0" ]
2
2020-11-05T09:25:54.000Z
2022-03-18T19:17:33.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...
40.067797
116
0.626904
# # 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...
0
0
0
3,753
0
0
0
-35
89
96b383db1e54c60b9a15e346577ac101d4194a10
278
py
Python
2. Programming Fundamentals With Python (May 2021)/16. Objects and Classes/02_party.py
kzborisov/SoftUni
ccb2b8850adc79bfb2652a45124c3ff11183412e
[ "MIT" ]
1
2021-02-07T07:51:12.000Z
2021-02-07T07:51:12.000Z
2. Programming Fundamentals With Python (May 2021)/16. Objects and Classes/02_party.py
kzborisov/softuni
9c5b45c74fa7d9748e9b3ea65a5ae4e15c142751
[ "MIT" ]
null
null
null
2. Programming Fundamentals With Python (May 2021)/16. Objects and Classes/02_party.py
kzborisov/softuni
9c5b45c74fa7d9748e9b3ea65a5ae4e15c142751
[ "MIT" ]
null
null
null
# Task 02. Party person = input() party = Party() while not person == "End": party.people.append(person) person = input() print(f"Going: {', '.join(party.people)}") print(f"Total: {len(party.people)}")
15.444444
42
0.607914
# Task 02. Party class Party: def __init__(self): self.people = [] person = input() party = Party() while not person == "End": party.people.append(person) person = input() print(f"Going: {', '.join(party.people)}") print(f"Total: {len(party.people)}")
0
0
0
40
0
0
0
0
23
2125751ead55c05b7652d6be63798d48bf0ad2aa
936
py
Python
day:40/twosumdesign.py
hawaijar/FireLeetcode
e981e96f6a38a3b08e9b7ef59aec65f6e0e5728a
[ "MIT" ]
1
2020-10-21T12:28:23.000Z
2020-10-21T12:28:23.000Z
day:40/twosumdesign.py
hawaijar/FireLeetcode
e981e96f6a38a3b08e9b7ef59aec65f6e0e5728a
[ "MIT" ]
null
null
null
day:40/twosumdesign.py
hawaijar/FireLeetcode
e981e96f6a38a3b08e9b7ef59aec65f6e0e5728a
[ "MIT" ]
1
2020-10-21T12:28:24.000Z
2020-10-21T12:28:24.000Z
# Your TwoSum object will be instantiated and called as such: # obj = TwoSum() # obj.add(number) # param_2 = obj.find(value)
24.631579
81
0.483974
class TwoSum: def __init__(self): """ Initialize your data structure here. """ self.hash = {} def add(self, number: int) -> None: """ Add the number to an internal data structure.. """ if(number in self.hash): self.hash[number] += 1; ...
0
0
0
778
0
0
0
0
22
b4c2d2c978dd4b72ebd7e4239b8f945f29a52b5e
2,356
py
Python
pcs/blender_addon/modules/blvcw/crystal_well_headless.py
bisdan/pcs
c77ed4165a2794f28ac72413f2ef0afeadb58297
[ "MIT" ]
null
null
null
pcs/blender_addon/modules/blvcw/crystal_well_headless.py
bisdan/pcs
c77ed4165a2794f28ac72413f2ef0afeadb58297
[ "MIT" ]
null
null
null
pcs/blender_addon/modules/blvcw/crystal_well_headless.py
bisdan/pcs
c77ed4165a2794f28ac72413f2ef0afeadb58297
[ "MIT" ]
null
null
null
""" Crystal Well Headless execution. Should not be called directly but via headless_execution.py. """ import os import sys argv = sys.argv if "--settings_file" not in argv: print("ERROR: NO SETTINGS FILE PROVIDED") exit(1) settings_file = argv[argv.index("--settings_file") + 1] if settings_file == "": ...
36.8125
101
0.735144
""" Crystal Well Headless execution. Should not be called directly but via headless_execution.py. """ import os import sys from blvcw.crystal_well_components import CrystalWellSettings, CrystalWellLoader from blvcw.crystal_well_simulation import CrystalWellSimulator class __CrystalWellHeadlessExecution: """ ...
0
0
0
1,550
0
0
0
100
67
1822dd6009208ea74242aeb5fc8ef76d2cb13eec
2,422
py
Python
tests/sparseml/onnx/test_base.py
clementpoiret/sparseml
8442a6ef8ba11fb02f5e51472dd68b72438539b9
[ "Apache-2.0" ]
922
2021-02-04T17:51:54.000Z
2022-03-31T20:49:26.000Z
tests/sparseml/onnx/test_base.py
clementpoiret/sparseml
8442a6ef8ba11fb02f5e51472dd68b72438539b9
[ "Apache-2.0" ]
197
2021-02-04T22:17:21.000Z
2022-03-31T13:58:55.000Z
tests/sparseml/onnx/test_base.py
clementpoiret/sparseml
8442a6ef8ba11fb02f5e51472dd68b72438539b9
[ "Apache-2.0" ]
80
2021-02-04T22:20:14.000Z
2022-03-30T19:36:15.000Z
# Copyright (c) 2021 - present / Neuralmagic, 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...
26.326087
84
0.709744
# Copyright (c) 2021 - present / Neuralmagic, 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...
0
292
0
0
0
1,182
0
165
161
508751d0f54b5cda30fec2563fbe16b5f633581e
621
py
Python
hume/device/procedures/request_library.py
megacorpincorporated/hume
40093cc7e5e79dbac8386e2e5f7f7a41c7e516e8
[ "MIT" ]
2
2019-08-18T10:21:43.000Z
2020-08-23T19:55:17.000Z
hume/device/procedures/request_library.py
megacorpincorporated/hume
40093cc7e5e79dbac8386e2e5f7f7a41c7e516e8
[ "MIT" ]
4
2019-08-03T08:58:15.000Z
2021-06-09T15:49:49.000Z
hume/device/procedures/request_library.py
megacorpincorporated/hume
40093cc7e5e79dbac8386e2e5f7f7a41c7e516e8
[ "MIT" ]
null
null
null
import logging from device.models import Device from device import connection from device.connection.gci import GCI from defs import DeviceRequest LOGGER = logging.getLogger(__name__) """ This module provides functions for sending requests to a device. """ def capability(device: Device): """ Sends a capab...
17.25
64
0.718196
import logging from device.models import Device from device import connection from device.connection.gci import GCI from defs import DeviceRequest LOGGER = logging.getLogger(__name__) """ This module provides functions for sending requests to a device. """ def capability(device: Device): """ Sends a capab...
0
0
0
0
0
12
0
0
69
b85de9906ccbe05b2899cfe7553dd8c6f67b3e8e
2,502
py
Python
plugins/cron/views.py
IronTooch/ajenti
17b62f6d73a913f97c1219843a2891da2606aea5
[ "MIT" ]
1
2022-03-02T19:44:31.000Z
2022-03-02T19:44:31.000Z
plugins/cron/views.py
IronTooch/ajenti
17b62f6d73a913f97c1219843a2891da2606aea5
[ "MIT" ]
1
2022-03-05T23:44:40.000Z
2022-03-05T23:44:40.000Z
plugins/cron/views.py
IronTooch/ajenti
17b62f6d73a913f97c1219843a2891da2606aea5
[ "MIT" ]
null
null
null
""" Module to handle an user crontab file. """
34.75
106
0.609113
""" Module to handle an user crontab file. """ import os import pwd from jadi import component from aj.api.http import url, HttpPlugin from aj.api.endpoint import endpoint, EndpointError from .manager import CronManager from reconfigure.items.crontab import CrontabNormalTaskData, CrontabSpecialTaskData, CrontabEnvSet...
0
2,151
0
0
0
0
0
126
179
7becea34e4b418fc2d1816e9fa35757371e71df8
2,793
py
Python
pentest-scripts/python-web-penetration-testing-cookbook/Chapter_06_Code/StegoFull.py
paulveillard/cybersecurity-penetration-testing
a5afff13ec25afd0cf16ef966d35bddb91518af4
[ "Apache-2.0" ]
6
2021-12-07T21:02:12.000Z
2022-03-03T12:08:14.000Z
pentest-scripts/python-web-penetration-testing-cookbook/Chapter_06_Code/StegoFull.py
paulveillard/cybersecurity-penetration-testing
a5afff13ec25afd0cf16ef966d35bddb91518af4
[ "Apache-2.0" ]
null
null
null
pentest-scripts/python-web-penetration-testing-cookbook/Chapter_06_Code/StegoFull.py
paulveillard/cybersecurity-penetration-testing
a5afff13ec25afd0cf16ef966d35bddb91518af4
[ "Apache-2.0" ]
1
2022-01-15T23:57:36.000Z
2022-01-15T23:57:36.000Z
#!/usr/bin/env python from optparse import OptionParser if __name__ == "__main__": usage = "usage: %prog [options] arg1 arg2" parser = OptionParser(usage=usage) parser.add_option("-c", "--carrier", dest="carrier", help="The filename of the image used as the carrier.", ...
34.481481
116
0.56749
#!/usr/bin/env python from optparse import OptionParser from PIL import Image def HideMessage(carrier, message, outfile): cImage = Image.open(carrier) hide = Image.open(message) hide = hide.resize(cImage.size) hide = hide.convert('1') out = Image.new(cImage.mode, cImage.size) width,...
0
0
0
0
0
1,208
0
0
77
0785aa7f6956416f134ea789ff4aa671f3f99fe2
22,017
py
Python
3_plotting.py
laworbit/Law_et_alDTS
3f11a53a1bb9147815cc39d4e8fb95bebd53aa6b
[ "MIT" ]
null
null
null
3_plotting.py
laworbit/Law_et_alDTS
3f11a53a1bb9147815cc39d4e8fb95bebd53aa6b
[ "MIT" ]
null
null
null
3_plotting.py
laworbit/Law_et_alDTS
3f11a53a1bb9147815cc39d4e8fb95bebd53aa6b
[ "MIT" ]
null
null
null
#script to plot results from 1_full_process.py #science advances figure guidelines. Preferably 2.5, 5.0, or 7.3 inches wide #and no more than 11.0 inches high. Miminum line width of 0.5 pt. 9 pt and #bold for e.g. A, B, C, etc. #Robert Law, Scott Polar Research Institute, University of Cambridge, 2020. rl491@cam.ac.uk...
39.386404
194
0.692692
#script to plot results from 1_full_process.py #science advances figure guidelines. Preferably 2.5, 5.0, or 7.3 inches wide #and no more than 11.0 inches high. Miminum line width of 0.5 pt. 9 pt and #bold for e.g. A, B, C, etc. #Robert Law, Scott Polar Research Institute, University of Cambridge, 2020. rl491@cam.ac.uk...
0
0
0
0
0
172
0
12
90
4d372a822f3fd4bf37c1514539f86c1b3f30550b
19,807
py
Python
pycid/core/macid_base.py
sbenthall/pycid
114e1fdcd4bf97c99ca5718fe5a66bcef41a6baf
[ "Apache-2.0" ]
1
2020-05-29T10:18:59.000Z
2020-05-29T10:18:59.000Z
pycid/core/macid_base.py
sbenthall/pycid
114e1fdcd4bf97c99ca5718fe5a66bcef41a6baf
[ "Apache-2.0" ]
2
2020-06-07T09:37:40.000Z
2020-08-06T23:15:54.000Z
pycid/core/macid_base.py
sbenthall/pycid
114e1fdcd4bf97c99ca5718fe5a66bcef41a6baf
[ "Apache-2.0" ]
2
2020-05-28T16:35:11.000Z
2020-05-28T16:39:05.000Z
from __future__ import annotations from typing import (Hashable) import matplotlib.cm as cm AgentLabel = Hashable # Could be a TypeVar instead but that might be overkill
41.437238
120
0.63003
from __future__ import annotations import itertools import math from functools import lru_cache from typing import ( Any, Callable, Collection, Dict, Hashable, Iterable, Iterator, KeysView, List, Mapping, Optional, Sequence, Set, Tuple, Union, ) from warnings...
83
843
0
18,091
0
0
0
384
290
803f5959d4df3a3d844d51a6d88f8fc784c9b598
3,738
py
Python
gym_brt/envs/qube_swingup_env.py
bjoseru/quanser-openai-driver
1fcac7289bbeb140ae034f661b86d405f027f262
[ "MIT" ]
10
2018-08-02T20:01:13.000Z
2021-09-07T18:09:20.000Z
gym_brt/envs/qube_swingup_env.py
bjoseru/quanser-openai-driver
1fcac7289bbeb140ae034f661b86d405f027f262
[ "MIT" ]
4
2019-05-20T18:38:34.000Z
2022-01-24T19:49:42.000Z
gym_brt/envs/qube_swingup_env.py
bjoseru/quanser-openai-driver
1fcac7289bbeb140ae034f661b86d405f027f262
[ "MIT" ]
12
2019-04-09T03:56:50.000Z
2022-02-02T19:01:31.000Z
from __future__ import absolute_import from __future__ import print_function from __future__ import division """ Description: A pendulum is attached to an un-actuated joint to a horizontal arm, which is actuated by a rotary motor. The pendulum begins downwards and the goal is flip the pendu...
33.375
98
0.599251
from __future__ import absolute_import from __future__ import print_function from __future__ import division import numpy as np from gym import spaces from gym_brt.envs.qube_base_env import QubeBaseEnv """ Description: A pendulum is attached to an un-actuated joint to a horizontal arm, which is ac...
4
0
0
2,012
0
0
0
27
159
be4b0872f71e5df9568ca4862fab6509d237b0e8
835
py
Python
CossioUtils/io.py
cossio/CossioUtils
0bf5dbfbcdd67fd1a6cbe99d5679e420055c590a
[ "MIT" ]
1
2019-04-07T23:36:44.000Z
2019-04-07T23:36:44.000Z
CossioUtils/io.py
cossio/CossioUtils
0bf5dbfbcdd67fd1a6cbe99d5679e420055c590a
[ "MIT" ]
null
null
null
CossioUtils/io.py
cossio/CossioUtils
0bf5dbfbcdd67fd1a6cbe99d5679e420055c590a
[ "MIT" ]
null
null
null
""" Input/output with the CHO_K1 model files. """ import os import subprocess def gunzip(path, keep=True): """ Check if file is gzipped, in which case extract it (replacing output). Returns original path. """ if os.path.exists(path + '.gz'): if keep: subprocess.call(['gunzip'...
24.558824
75
0.565269
""" Input/output with the CHO_K1 model files. """ import os import subprocess def gunzip(path, keep=True): """ Check if file is gzipped, in which case extract it (replacing output). Returns original path. """ if os.path.exists(path + '.gz'): if keep: subprocess.call(['gunzip'...
0
0
0
0
0
0
0
0
0
feb907e46ae267e25885459ab49489e5ba766bf5
2,834
py
Python
tests/integration/thread_support/test_run.py
pyqgis/plutil
79df2596e4e0340f3765ccb5bdfd4cc1d01fcb7d
[ "MIT" ]
null
null
null
tests/integration/thread_support/test_run.py
pyqgis/plutil
79df2596e4e0340f3765ccb5bdfd4cc1d01fcb7d
[ "MIT" ]
null
null
null
tests/integration/thread_support/test_run.py
pyqgis/plutil
79df2596e4e0340f3765ccb5bdfd4cc1d01fcb7d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ """ from __future__ import unicode_literals from __future__ import print_function import logging logger = logging.getLogger('tests.plutil.thread_support')
32.204545
80
0.680663
# -*- coding: utf-8 -*- """ """ from __future__ import unicode_literals from __future__ import print_function import logging import threading from time import sleep from unittest import TestCase, SkipTest from unittest.mock import MagicMock from PyQt5.QtCore import QCoreApplication, QEventLoop from qgis_plutil.threa...
0
0
0
2,224
0
0
0
175
247
122e24f97103d87047596f69b219cb89b9aa8ea0
3,296
py
Python
examples/recurrentwithtestbench.py
Bhaskers-Blu-Org1/complex-linear-network-analyzer
b336a4fca1222a4f284bb39c6c3e6bec402f5efa
[ "Apache-2.0" ]
6
2020-01-20T10:22:49.000Z
2020-04-24T06:53:51.000Z
examples/recurrentwithtestbench.py
Bhaskers-Blu-Org1/complex-linear-network-analyzer
b336a4fca1222a4f284bb39c6c3e6bec402f5efa
[ "Apache-2.0" ]
7
2020-01-28T18:59:00.000Z
2020-02-24T14:42:07.000Z
examples/recurrentwithtestbench.py
IBM/complex-linear-network-analyzer
b336a4fca1222a4f284bb39c6c3e6bec402f5efa
[ "Apache-2.0" ]
5
2020-01-29T04:05:49.000Z
2020-06-29T15:05:15.000Z
# +-----------------------------------------------------------------------------+ # | Copyright 2019-2020 IBM Corp. All Rights Reserved. | # | | # | Licensed under the Apache License, Version 2.0 (the "License"); ...
41.721519
83
0.567658
# +-----------------------------------------------------------------------------+ # | Copyright 2019-2020 IBM Corp. All Rights Reserved. | # | | # | Licensed under the Apache License, Version 2.0 (the "License"); ...
0
0
0
0
0
0
0
0
0
6b4d6d847ba58abac6e0ef39bfeb1d6a44cda852
1,002
py
Python
src/utils/fetch_timeline.py
CS-UIT-AI-CLUB/covid-stat
5e1ba8049cec2d0917e736cc1c52e082669407c7
[ "MIT" ]
null
null
null
src/utils/fetch_timeline.py
CS-UIT-AI-CLUB/covid-stat
5e1ba8049cec2d0917e736cc1c52e082669407c7
[ "MIT" ]
null
null
null
src/utils/fetch_timeline.py
CS-UIT-AI-CLUB/covid-stat
5e1ba8049cec2d0917e736cc1c52e082669407c7
[ "MIT" ]
null
null
null
from bs4 import BeautifulSoup import datetime import unicodedata def fetch_timeline(response): ''' Fetch latest COVID-19 news. Input: HTML content fetched from the web. Return ( unix_timestamp, list of paragraphs (unicode NFKC normalized) ) ''' soup = BeautifulS...
31.3125
73
0.628743
from bs4 import BeautifulSoup import datetime import unicodedata def fetch_timeline(response): ''' Fetch latest COVID-19 news. Input: HTML content fetched from the web. Return ( unix_timestamp, list of paragraphs (unicode NFKC normalized) ) ''' soup = BeautifulS...
0
0
0
0
0
0
0
0
0
b2ebe7a92be3a8e73bbfdd123e14e4e6615123d0
430
py
Python
setup.py
horns-g/DataPipelines
07f07af56c142b1ecb58da802aa70b12fd6faf2b
[ "MIT" ]
null
null
null
setup.py
horns-g/DataPipelines
07f07af56c142b1ecb58da802aa70b12fd6faf2b
[ "MIT" ]
2
2021-02-08T20:28:45.000Z
2021-06-01T23:29:35.000Z
setup.py
IprelProgetti/DataPipelines
07f07af56c142b1ecb58da802aa70b12fd6faf2b
[ "MIT" ]
null
null
null
import setuptools REQUIRED_PACKAGES = [] PACKAGE_NAME = 'my_alice_pipeline' PACKAGE_VERSION = '1.0.0' setuptools.setup( name=PACKAGE_NAME, version=PACKAGE_VERSION, description='Alice in Wonderland pipeline', url="https://github.com/horns-g/DataPipelines", author="Gabriele Corni", author_email=...
25.294118
51
0.746512
import setuptools REQUIRED_PACKAGES = [] PACKAGE_NAME = 'my_alice_pipeline' PACKAGE_VERSION = '1.0.0' setuptools.setup( name=PACKAGE_NAME, version=PACKAGE_VERSION, description='Alice in Wonderland pipeline', url="https://github.com/horns-g/DataPipelines", author="Gabriele Corni", author_email=...
0
0
0
0
0
0
0
0
0
b503bd8d3bcd6f89278b0832a76f1d728ce42751
936
py
Python
src/tree/1026.maximum-difference-between-node-and-ancestor/maximum-difference-between-node-and-ancestor.py
lyphui/Just-Code
e0c3c3ecb67cb805080ff686e88522b2bffe7741
[ "MIT" ]
782
2019-11-19T08:20:49.000Z
2022-03-25T06:59:09.000Z
src/1026.maximum-difference-between-node-and-ancestor/maximum-difference-between-node-and-ancestor.py
Heitao5200/Just-Code
5bb3ee485a103418e693b7ec8e26dc84f3691c79
[ "MIT" ]
1
2021-03-04T12:21:01.000Z
2021-03-05T01:23:54.000Z
src/1026.maximum-difference-between-node-and-ancestor/maximum-difference-between-node-and-ancestor.py
Heitao5200/Just-Code
5bb3ee485a103418e693b7ec8e26dc84f3691c79
[ "MIT" ]
155
2019-11-20T08:20:42.000Z
2022-03-19T07:28:09.000Z
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None
40.695652
113
0.619658
# Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: def maxAncestorDiff(self, root: TreeNode) -> int: maxLeft = self.maxHelper(root.left, root.val, root.val) maxRight = self...
0
0
0
752
0
0
0
0
23
5a278cb657287dde3cbd4d5c426a4c6088ce0595
6,152
py
Python
Balance/Main.py
HarveyC9846/MoleCheck
1f7f068e09577a368b4957b963c13a4e5b353975
[ "MIT" ]
null
null
null
Balance/Main.py
HarveyC9846/MoleCheck
1f7f068e09577a368b4957b963c13a4e5b353975
[ "MIT" ]
null
null
null
Balance/Main.py
HarveyC9846/MoleCheck
1f7f068e09577a368b4957b963c13a4e5b353975
[ "MIT" ]
null
null
null
import os import pandas import PIL.Image as pil import numpy import shutil from keras.preprocessing.image import ImageDataGenerator as idg strOutputPath = "Output/" try: os.makedirs(strOutputPath) except: shutil.rmtree(strOutputPath) os.makedirs(strOutputPath) ###############################################...
38.691824
99
0.6263
import os import pandas import PIL.Image as pil import numpy import shutil from sklearn.model_selection import train_test_split as holdout from sklearn.model_selection import StratifiedKFold as fold from keras.preprocessing.image import ImageDataGenerator as idg strOutputPath = "Output/" try: os.makedirs(strOutputP...
0
0
0
0
0
0
0
80
44
eaf969f36fe620fba4812b6fe3efcad27770645a
97
py
Python
mundo1-Fundamentos/025 - Procurando uma string dentro de outra.py
jonasht/CursoEmVideo-CursoDePython3
a1bbf1fe4226b1828213742ee5a440278d903fd1
[ "MIT" ]
null
null
null
mundo1-Fundamentos/025 - Procurando uma string dentro de outra.py
jonasht/CursoEmVideo-CursoDePython3
a1bbf1fe4226b1828213742ee5a440278d903fd1
[ "MIT" ]
null
null
null
mundo1-Fundamentos/025 - Procurando uma string dentro de outra.py
jonasht/CursoEmVideo-CursoDePython3
a1bbf1fe4226b1828213742ee5a440278d903fd1
[ "MIT" ]
null
null
null
nome = str(input("Nome: ")).strip() print('o nome tem silva {}'.format('silva' in nome.lower()))
32.333333
60
0.628866
nome = str(input("Nome: ")).strip() print('o nome tem silva {}'.format('silva' in nome.lower()))
0
0
0
0
0
0
0
0
0
00cfeed242a224515dc25bfcd65118925fba69a5
6,307
py
Python
backend_admin/models.py
sougannkyou/AppSimulator
0803d557b0451b049f11e90c258ec11f7074a2ac
[ "MIT" ]
6
2018-10-21T03:41:03.000Z
2021-12-17T11:09:50.000Z
backend_admin/models.py
sougannkyou/AppSimulator
0803d557b0451b049f11e90c258ec11f7074a2ac
[ "MIT" ]
null
null
null
backend_admin/models.py
sougannkyou/AppSimulator
0803d557b0451b049f11e90c258ec11f7074a2ac
[ "MIT" ]
4
2020-01-30T14:46:50.000Z
2021-12-04T01:07:46.000Z
# coding:utf-8 # # models # class PermissionRead(models.Model): # read_permission = models.OneToOneField(Permission, verbose_name='') # models #
38.932099
104
0.718091
# coding:utf-8 from django.contrib.auth.models import AbstractUser, Permission from django.db import models # 部门 class Departments(models.Model): name = models.CharField(verbose_name='部门名称', max_length=50) member_num = models.IntegerField(verbose_name='部门人数', default=0) parent = models.IntegerField(verbos...
900
0
0
5,496
0
0
0
49
293
05c6a9828f005d04f294431c158fe961d52847bf
2,196
py
Python
src/leetcodepython/math/plus_one_66.py
zhangyu345293721/leetcode
1aa5bcb984fd250b54dcfe6da4be3c1c67d14162
[ "MIT" ]
90
2018-12-25T06:01:30.000Z
2022-01-03T14:01:26.000Z
src/leetcodepython/math/plus_one_66.py
zhangyu345293721/leetcode
1aa5bcb984fd250b54dcfe6da4be3c1c67d14162
[ "MIT" ]
1
2020-08-27T09:53:49.000Z
2020-08-28T08:57:49.000Z
src/leetcodepython/math/plus_one_66.py
zhangyu345293721/leetcode
1aa5bcb984fd250b54dcfe6da4be3c1c67d14162
[ "MIT" ]
27
2019-01-02T01:41:32.000Z
2022-01-03T14:01:30.000Z
# encoding='utf-8' ''' /** * This is the solution of No. 66 problem in the LeetCode, * the website of the problem is as follow: * https://leetcode-cn.com/problems/plus-one * <p> * The description of problem is as follow: * ==========================================================================================...
23.869565
109
0.431694
# encoding='utf-8' ''' /** * This is the solution of No. 66 problem in the LeetCode, * the website of the problem is as follow: * https://leetcode-cn.com/problems/plus-one * <p> * The description of problem is as follow: * ==========================================================================================...
583
0
0
1,079
0
0
0
2
45
75076a96adeb4ff6cf378d14e9c94d30efc3d940
6,252
py
Python
LichtpaalReader.py
kaosbeat/datakamp
7ac90249b34aa4c3604fa4965ab124ab82d64ac3
[ "MIT" ]
null
null
null
LichtpaalReader.py
kaosbeat/datakamp
7ac90249b34aa4c3604fa4965ab124ab82d64ac3
[ "MIT" ]
null
null
null
LichtpaalReader.py
kaosbeat/datakamp
7ac90249b34aa4c3604fa4965ab124ab82d64ac3
[ "MIT" ]
null
null
null
#!/usr/local/bin/python # -*- coding: utf-8 -*- # # RFID Read # import os, sys import json import time import rfidiot import array from ola.ClientWrapper import ClientWrapper import config barSignal = 0 dmxwrapper = ClientWrapper() dmxuniverse = 1 readerid = config.settings['readerID'] print readerid #############...
26.604255
89
0.576456
#!/usr/local/bin/python # -*- coding: utf-8 -*- # # RFID Read # import os,sys import json import time import rfidiot from RFIDapi import * import array from ola.ClientWrapper import ClientWrapper import config barSignal = 0 dmxwrapper = ClientWrapper() dmxuniverse = 1 readerid = config.settings['readerID'] print re...
0
0
0
0
0
3,361
0
-1
354
301985af44c06bf96e405cb532bf976c7a4bcc1a
2,687
py
Python
fastestimator/op/numpyop/univariate/random_fog.py
DwijayDS/fastestimator
9b288cb2bd870f971ec4cee09d0b3205e1316a94
[ "Apache-2.0" ]
57
2019-05-21T21:29:26.000Z
2022-02-23T05:55:21.000Z
fastestimator/op/numpyop/univariate/random_fog.py
vbvg2008/fastestimator
6061a4fbbeb62a2194ef82ba8017f651710d0c65
[ "Apache-2.0" ]
93
2019-05-23T18:36:07.000Z
2022-03-23T17:15:55.000Z
fastestimator/op/numpyop/univariate/random_fog.py
vbvg2008/fastestimator
6061a4fbbeb62a2194ef82ba8017f651710d0c65
[ "Apache-2.0" ]
47
2019-05-09T15:41:37.000Z
2022-03-26T17:00:08.000Z
# Copyright 2019 The FastEstimator Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
45.542373
120
0.637514
# Copyright 2019 The FastEstimator Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appl...
0
1,715
0
0
0
0
0
166
113
8894490eaa5ba3d12669c67bf53ad57c286b015b
396
py
Python
Competitive_Programming/HackerRank/game_of_thrones_Hackerrank.py
amitagarwalaa57/OneDayOneAlgo
9336fc751ee9b0b84c3e4a1e8383cb14b178c936
[ "MIT" ]
32
2020-05-23T07:40:31.000Z
2021-02-02T18:14:30.000Z
Competitive_Programming/HackerRank/game_of_thrones_Hackerrank.py
amitagarwalaa57/OneDayOneAlgo
9336fc751ee9b0b84c3e4a1e8383cb14b178c936
[ "MIT" ]
45
2020-05-22T10:30:51.000Z
2020-12-28T08:17:13.000Z
Competitive_Programming/HackerRank/game_of_thrones_Hackerrank.py
amitagarwalaa57/OneDayOneAlgo
9336fc751ee9b0b84c3e4a1e8383cb14b178c936
[ "MIT" ]
31
2020-05-22T10:18:16.000Z
2020-10-23T07:52:35.000Z
#if length of string is even,all characters should occure even times. If its odd,only one should occur odd times to occupy space in middle bcz rest even characters will be in pairs ,making string as palindrome print(gameOfThrones(input()))
44
210
0.724747
#if length of string is even,all characters should occure even times. If its odd,only one should occur odd times to occupy space in middle bcz rest even characters will be in pairs ,making string as palindrome from collections import Counter def gameOfThrones(s): add = 0 for x in Counter(s).values(): a...
0
0
0
0
0
101
0
10
44
2d8622b5b5742eaffe685c5a53c9f895f601a053
2,768
py
Python
ichnaea/api/locate/blue.py
mikiec84/ichnaea
ec223cefb788bb921c0e7f5f51bd3b20eae29edd
[ "Apache-2.0" ]
348
2015-01-13T11:48:07.000Z
2022-03-31T08:33:07.000Z
ichnaea/api/locate/blue.py
mikiec84/ichnaea
ec223cefb788bb921c0e7f5f51bd3b20eae29edd
[ "Apache-2.0" ]
1,274
2015-01-02T18:15:56.000Z
2022-03-23T15:29:08.000Z
ichnaea/api/locate/blue.py
mikiec84/ichnaea
ec223cefb788bb921c0e7f5f51bd3b20eae29edd
[ "Apache-2.0" ]
149
2015-01-04T21:15:07.000Z
2021-12-10T06:05:09.000Z
"""Search implementation using a database of Bluetooth networks."""
27.68
75
0.629335
"""Search implementation using a database of Bluetooth networks.""" from collections import defaultdict from ichnaea.api.locate.constants import ( MAX_BLUE_CLUSTER_METERS, MAX_BLUES_IN_CLUSTER, BLUE_MAX_ACCURACY, BLUE_MIN_ACCURACY, ) from ichnaea.api.locate.mac import ( aggregate_cluster_position,...
0
0
0
2,042
0
0
0
410
246
3f5628a51b35e66f1edcdf38e4de6a7643888e33
2,794
py
Python
data/model/__init__.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
2,027
2019-11-12T18:05:48.000Z
2022-03-31T22:25:04.000Z
data/model/__init__.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
496
2019-11-12T18:13:37.000Z
2022-03-31T10:43:45.000Z
data/model/__init__.py
giuseppe/quay
a1b7e4b51974edfe86f66788621011eef2667e6a
[ "Apache-2.0" ]
249
2019-11-12T18:02:27.000Z
2022-03-22T12:19:19.000Z
config = Config() # There MUST NOT be any circular dependencies between these subsections. If there are fix it by # moving the minimal number of things to _basequery
18.381579
95
0.755548
from data.database import db, db_transaction class DataModelException(Exception): pass class InvalidLabelKeyException(DataModelException): pass class InvalidMediaTypeException(DataModelException): pass class BlobDoesNotExist(DataModelException): pass class InvalidBlobUpload(DataModelException)...
0
0
0
1,603
0
0
0
353
642
c16681299ca04540e40b740fabae95decce047bb
865
py
Python
omaha_server/omaha/migrations/0004_partialupdate.py
fiadm/omaha-server
72bf5eb33ffc267ebe45a9461acdc79e31ed894b
[ "Apache-2.0" ]
142
2015-02-10T05:46:28.000Z
2020-03-21T13:18:31.000Z
omaha_server/omaha/migrations/0004_partialupdate.py
tuladhar/omaha-server
6cfd86e4319e03af0eb319fae6c867691ffc2c36
[ "Apache-2.0" ]
272
2015-01-15T09:43:49.000Z
2020-03-30T08:29:30.000Z
omaha_server/omaha/migrations/0004_partialupdate.py
tuladhar/omaha-server
6cfd86e4319e03af0eb319fae6c867691ffc2c36
[ "Apache-2.0" ]
77
2015-01-29T19:13:39.000Z
2020-03-21T06:45:35.000Z
# -*- coding: utf-8 -*- from __future__ import unicode_literals
28.833333
114
0.554913
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import omaha.fields class Migration(migrations.Migration): dependencies = [ ('omaha', '0003_version_is_enabled'), ] operations = [ migrations.CreateModel( name='PartialUp...
0
0
0
715
0
0
0
17
68
2374cd0a11dba901068bc67e8f2980ac5a3956c5
5,439
py
Python
bin/search_irc.py
AlexFaraino/cve-search
4be22d43c4cd3ed7b6b2db2393b3d27575f23d35
[ "BSD-3-Clause" ]
377
2018-05-02T06:55:15.000Z
2022-03-29T06:13:10.000Z
bin/search_irc.py
AlexFaraino/cve-search
4be22d43c4cd3ed7b6b2db2393b3d27575f23d35
[ "BSD-3-Clause" ]
52
2015-01-05T15:13:06.000Z
2018-04-13T14:33:06.000Z
bin/search_irc.py
AlexFaraino/cve-search
4be22d43c4cd3ed7b6b2db2393b3d27575f23d35
[ "BSD-3-Clause" ]
91
2018-05-03T02:05:15.000Z
2022-03-29T15:45:58.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Simple IRC bot to query for the last entries in the CVE database # # current command supported is: # # last <max> # cvetweet <max> # browse # search <vendor>\<product> # get <cve> # # You need to connect the IRC bot to the IRC Server you want to access it from. # # Sof...
33.574074
104
0.646442
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Simple IRC bot to query for the last entries in the CVE database # # current command supported is: # # last <max> # cvetweet <max> # browse # search <vendor>\<product> # get <cve> # # You need to connect the IRC bot to the IRC Server you want to access it from. # # Sof...
0
0
0
2,977
0
621
0
-22
201
b6f0deef92403d4f622da80bbc5308c42215e2e3
1,878
py
Python
examples/basic_examples.py
yoramzarai/TpTnOsc
f1fdd1a0ebc7d64177f4281bf3be5f2665fdcf90
[ "MIT" ]
null
null
null
examples/basic_examples.py
yoramzarai/TpTnOsc
f1fdd1a0ebc7d64177f4281bf3be5f2665fdcf90
[ "MIT" ]
null
null
null
examples/basic_examples.py
yoramzarai/TpTnOsc
f1fdd1a0ebc7d64177f4281bf3be5f2665fdcf90
[ "MIT" ]
null
null
null
''' Few basic examples of the tools in TpTnOsc.utils. See also osc_exp_examples.ipynb notebook for examples of tools in TpTnOsc.osc_exp. Execute: python basic_examples.py ''' import numpy as np import TpTnOsc.utils as ut # computing the p'th order multiplicative compound matrix A = np.array([[1,6,0,0], [2,13,4,20], ...
28.892308
84
0.690096
''' Few basic examples of the tools in TpTnOsc.utils. See also osc_exp_examples.ipynb notebook for examples of tools in TpTnOsc.osc_exp. Execute: python basic_examples.py ''' import numpy as np import TpTnOsc.utils as ut # computing the p'th order multiplicative compound matrix A = np.array([[1,6,0,0], [2,13,4,20], ...
0
0
0
0
0
0
0
0
0
1168d40803149df71eeb31f4b14e3345e88d0278
1,652
py
Python
geo/data/f.py
liucsny/Processing-Data
41eb12ecb53869771d266e1d9afccd39d4ca8234
[ "MIT" ]
null
null
null
geo/data/f.py
liucsny/Processing-Data
41eb12ecb53869771d266e1d9afccd39d4ca8234
[ "MIT" ]
null
null
null
geo/data/f.py
liucsny/Processing-Data
41eb12ecb53869771d266e1d9afccd39d4ca8234
[ "MIT" ]
null
null
null
import pandas as pd import pprint as pp r=[1000,25000,100000,500000] df=pd.read_csv("f.csv"); # df=df.sort([""],ascending=False) print(df) # df.to_csv("f.csv",index=False,encoding="utf-8") df_sum={"0~1000":{},"1000~25000":{},"25000~50000":{},"50000~500000":{},">500000":{}} for index,rows in df.iterrows(): if ...
26.222222
84
0.654358
import pandas as pd import pprint as pp r=[1000,25000,100000,500000] df=pd.read_csv("f.csv"); # df=df.sort(["金额"],ascending=False) def constrain_age(age): if age==float('NaN'): return 17.0 elif age<17: return 17.0 else: return age print(df) # df.to_csv("f.csv",index=False,encoding="utf-8") df_sum={"0~1...
213
0
0
0
0
87
0
0
22
15b36164ed23efe8438cfbafbe8c7d696787e514
18,108
py
Python
chemevolve/ReactionFunctions.py
colemathis/chemevolvePrivate
53e09a3bccf6d0e46a93ed1c2378869706dac7a0
[ "MIT" ]
null
null
null
chemevolve/ReactionFunctions.py
colemathis/chemevolvePrivate
53e09a3bccf6d0e46a93ed1c2378869706dac7a0
[ "MIT" ]
null
null
null
chemevolve/ReactionFunctions.py
colemathis/chemevolvePrivate
53e09a3bccf6d0e46a93ed1c2378869706dac7a0
[ "MIT" ]
null
null
null
import numpy as np import PropensityFunctions as Propensity import CoreClasses as Core import random import math import OutputFunctions as Out import InitializeFunctions as Init #################################################### ### Load C library #################################################### from...
40.150776
278
0.684394
import numpy as np import PropensityFunctions as Propensity import CoreClasses as Core import random import math import OutputFunctions as Out import InitializeFunctions as Init #################################################### ### Load C library #################################################### from...
0
0
0
0
0
1,542
0
0
23
ea3e82a696109ee05f01667dac00553b894ab925
1,895
py
Python
siamreppoints/models/model_builder.py
zhangximing213/RPT_tracker
abbecf94974dbd320dff175838a923bd2113135a
[ "MIT" ]
80
2020-09-04T06:18:47.000Z
2022-03-14T11:23:53.000Z
siamreppoints/models/model_builder.py
songheony/RPT
ff4992e8e7d265d6df9db5a86e4e0868647dc34a
[ "MIT" ]
20
2020-11-05T11:05:21.000Z
2022-03-22T09:38:42.000Z
siamreppoints/models/model_builder.py
songheony/RPT
ff4992e8e7d265d6df9db5a86e4e0868647dc34a
[ "MIT" ]
17
2020-09-28T06:55:28.000Z
2022-03-24T02:59:55.000Z
# Copyright (c) SenseTime. All Rights Reserved. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import torch.nn as nn
29.609375
89
0.576253
# Copyright (c) SenseTime. All Rights Reserved. from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import torch import torch.nn as nn from siamreppoints.core.config import cfg from siamreppoints.models.backbone import g...
0
0
0
1,437
0
0
0
98
135
6465776eed91773a22f3fe8b2c38f5d43dc3a1c0
7,548
py
Python
strf_cmd.py
dkratzert/StructureFinder
e0be67cb47ad589b87c7175a02c908734e415ee8
[ "MIT" ]
12
2017-11-23T08:45:17.000Z
2022-02-16T18:02:35.000Z
strf_cmd.py
dkratzert/StructureFinder
e0be67cb47ad589b87c7175a02c908734e415ee8
[ "MIT" ]
4
2019-12-12T15:28:50.000Z
2022-02-22T06:28:48.000Z
strf_cmd.py
dkratzert/StructureFinder
e0be67cb47ad589b87c7175a02c908734e415ee8
[ "MIT" ]
null
null
null
import argparse import sys from pymatgen.core.lattice import Lattice from searcher.misc import vol_unitcell parser = argparse.ArgumentParser(description='Command line version of StructureFinder to collect .cif/.res files to a ' 'database.\n' ...
37.182266
127
0.536301
import argparse import sys import time from pathlib import Path from sqlite3 import DatabaseError from misc import update_check from misc.version import VERSION from pymatgen.core.lattice import Lattice from searcher.database_handler import DatabaseRequest, StructureTable from searcher.filecrawler import put_files_in_...
0
0
0
0
0
2,572
0
99
224
5d8971a22575495824e1bcbc6b9426c9dff1d963
2,318
py
Python
python/updateServer_lanyue.py
houko/FrequentlyShell
a12cb0a96def2662453f66e0224957da126bccac
[ "MIT" ]
5
2017-05-04T08:50:12.000Z
2019-04-23T06:51:08.000Z
python/updateServer_lanyue.py
houko/FrequentlyShell
a12cb0a96def2662453f66e0224957da126bccac
[ "MIT" ]
1
2017-05-04T09:07:28.000Z
2017-05-04T09:13:13.000Z
python/updateServer_lanyue.py
houko/FrequentlyShell
a12cb0a96def2662453f66e0224957da126bccac
[ "MIT" ]
1
2019-06-15T03:12:43.000Z
2019-06-15T03:12:43.000Z
#! /usr/bin/python3 # coding=utf-8 """ Today the best performance as tomorrow newest starter! author: xiaomo github: https://github.com/syoubaku email: xiaomo@xiamoo.info QQ_NO: 83387856 Date: 17/5/31 14:55 Description: Copyright() 2017 by xiaomo. """ import sys if len(sys.argv) < 2 or len(sys.argv)...
22.950495
85
0.560828
#! /usr/bin/python3 # coding=utf-8 """ 把今天最好的表现当作明天最新的起点..~ いま 最高の表現 として 明日最新の始発..~ Today the best performance as tomorrow newest starter! author: xiaomo github: https://github.com/syoubaku email: xiaomo@xiamoo.info QQ_NO: 83387856 Date: 17/5/31 14:55 Description: 更新服务器 Copyright(©) 2017 by xiaomo. """ imp...
353
0
0
0
0
1,354
0
-30
203
f7f92b3d5ade59f2c089c5df9977c0f9a575a74e
13,383
py
Python
athena/models/speech_transformer.py
hyx100e/athena-1
2668de7acdd51a6d12a2768a57351b666b4edbf3
[ "Apache-2.0" ]
1
2019-12-25T06:38:03.000Z
2019-12-25T06:38:03.000Z
athena/models/speech_transformer.py
cookingbear/athena
2ff02d5f54070563c6a600199ae9e8d3ca3c66dd
[ "Apache-2.0" ]
null
null
null
athena/models/speech_transformer.py
cookingbear/athena
2ff02d5f54070563c6a600199ae9e8d3ca3c66dd
[ "Apache-2.0" ]
null
null
null
# coding=utf-8 # Copyright (C) 2019 ATHENA AUTHORS; Xiangang Li; Dongwei Jiang; Xiaoning Lei # 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.o...
41.305556
104
0.62826
# coding=utf-8 # Copyright (C) 2019 ATHENA AUTHORS; Xiangang Li; Dongwei Jiang; Xiaoning Lei # 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.o...
0
932
0
10,900
0
0
0
275
289
77321d71dd125f8674c51d0e785252ce6c808d90
13,160
py
Python
tests/test_rest.py
KarrLab/bcforms
053765e83b89430f288539e0a211012d23bf2e6f
[ "MIT" ]
null
null
null
tests/test_rest.py
KarrLab/bcforms
053765e83b89430f288539e0a211012d23bf2e6f
[ "MIT" ]
null
null
null
tests/test_rest.py
KarrLab/bcforms
053765e83b89430f288539e0a211012d23bf2e6f
[ "MIT" ]
null
null
null
""" Test of bcforms.rest :Author: Mike Zheng <xzheng20@colby.edu> :Author: Jonathan Karr <karr@mssm.edu> :Date: 2019-7-4 :Copyright: 2019, Karr Lab :License: MIT """
28.301075
238
0.423252
""" Test of bcforms.rest :Author: Mike Zheng <xzheng20@colby.edu> :Author: Jonathan Karr <karr@mssm.edu> :Date: 2019-7-4 :Copyright: 2019, Karr Lab :License: MIT """ import bcforms from bcforms import core from bcforms import rest import unittest class RestTestCase(unittest.TestCase): def test_PrefixMiddleware(...
0
0
0
12,888
0
0
0
-7
112
d2a6c1f581ed633f9dad9ab649ec2b380b41883a
5,366
py
Python
gunnery/account/models.py
timgates42/gunnery
733a261cae6243a11883a40e18b14f57cf6e47b2
[ "Apache-2.0" ]
314
2015-01-01T06:17:34.000Z
2022-03-10T03:34:02.000Z
gunnery/account/models.py
timgates42/gunnery
733a261cae6243a11883a40e18b14f57cf6e47b2
[ "Apache-2.0" ]
20
2015-04-03T13:34:59.000Z
2021-06-10T20:37:25.000Z
gunnery/account/models.py
pkucmus/gunnery
30fce7f3fd74947621da6e91c1e872f383fc1e71
[ "Apache-2.0" ]
57
2015-01-07T05:41:34.000Z
2021-10-31T19:56:50.000Z
from django.db.models.signals import post_save from task.models import Task from core.models import Department, Application, Environment post_save.connect(DepartmentGroup.on_create_department, sender=Department) post_save.connect(DepartmentGroup.on_create_application, sender=Application) post_save.connect(Departm...
39.455882
115
0.681513
from django.conf import settings from django.db.models.signals import post_save from guardian.shortcuts import assign_perm from timezone_field import TimeZoneField from django.db import models from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from django.core.mail import send_mai...
0
1,503
0
2,948
0
0
0
213
268
3666d77a16a91dbdde97afeb1cd27f402d5134ed
1,701
py
Python
landshark/iteration.py
basaks/landshark
87ec1fada74addd58f37bdaf3b1adbc10b1544b2
[ "Apache-2.0" ]
null
null
null
landshark/iteration.py
basaks/landshark
87ec1fada74addd58f37bdaf3b1adbc10b1544b2
[ "Apache-2.0" ]
null
null
null
landshark/iteration.py
basaks/landshark
87ec1fada74addd58f37bdaf3b1adbc10b1544b2
[ "Apache-2.0" ]
null
null
null
"""Utilities to support iteration.""" # Copyright 2019 CSIRO (Data61) # # 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...
31.5
85
0.687243
"""Utilities to support iteration.""" # Copyright 2019 CSIRO (Data61) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by...
0
0
0
0
863
0
0
36
138
d9125919f74656e88ab4503f939ade9eda4adc73
1,149
py
Python
app/log_auth/geodata.py
carverdo/scrap
d431095cadc1bc3f60aa0a3f473e726ecace9078
[ "MIT" ]
null
null
null
app/log_auth/geodata.py
carverdo/scrap
d431095cadc1bc3f60aa0a3f473e726ecace9078
[ "MIT" ]
null
null
null
app/log_auth/geodata.py
carverdo/scrap
d431095cadc1bc3f60aa0a3f473e726ecace9078
[ "MIT" ]
null
null
null
""" HAVE NOT TESTED FOR SPEED (but second one seems better) Decent link here about ip spoofing - http://esd.io/blog/flask-apps-heroku-real-ip-spoofing.html I think it has already been incorporated and my code works on his committed change. """ __author__ = 'donal' __project__ = 'ribcage' # ======================== ...
31.916667
74
0.70235
""" HAVE NOT TESTED FOR SPEED (but second one seems better) Decent link here about ip spoofing - http://esd.io/blog/flask-apps-heroku-real-ip-spoofing.html I think it has already been incorporated and my code works on his committed change. """ __author__ = 'donal' __project__ = 'ribcage' from json import loads from u...
0
0
0
0
0
614
0
41
132
420619b55f9f04db78fb5c5dee172744ada95023
115
py
Python
IntroProPython/aula9-Arquivos/listagem09-18.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
IntroProPython/aula9-Arquivos/listagem09-18.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
IntroProPython/aula9-Arquivos/listagem09-18.py
SweydAbdul/estudos-python
b052708d0566a0afb9a1c04d035467d45f820879
[ "MIT" ]
null
null
null
import os print(os.listdir('.')) print(os.listdir('avo')) print(os.listdir('avo/pai')) print(os.listdir('avo/mae'))
23
28
0.686957
import os print(os.listdir('.')) print(os.listdir('avo')) print(os.listdir('avo/pai')) print(os.listdir('avo/mae'))
0
0
0
0
0
0
0
0
0
b404db9394afec7677247fb0e1b9290302380d38
379
py
Python
allure-pytest/test/clean/no_clean_test.py
vdsbenoit/allure-python
7b56b031c42369dd73844105382e9ceb9a88d6cd
[ "Apache-2.0" ]
1
2021-02-19T21:00:11.000Z
2021-02-19T21:00:11.000Z
allure-pytest/test/clean/no_clean_test.py
vdsbenoit/allure-python
7b56b031c42369dd73844105382e9ceb9a88d6cd
[ "Apache-2.0" ]
null
null
null
allure-pytest/test/clean/no_clean_test.py
vdsbenoit/allure-python
7b56b031c42369dd73844105382e9ceb9a88d6cd
[ "Apache-2.0" ]
1
2020-08-05T05:40:44.000Z
2020-08-05T05:40:44.000Z
def test_two_runs_no_clean(): """ >>> report_fixture = getfixture('allure_report_with_params') >>> allure_report_first_run = report_fixture(cache=False) >>> allure_report_second_run = report_fixture(cache=False) >>> assert_that(allure_report_second_run, ... has_only_n_test_cases('tes...
34.454545
70
0.680739
def test_two_runs_no_clean(): """ >>> report_fixture = getfixture('allure_report_with_params') >>> allure_report_first_run = report_fixture(cache=False) >>> allure_report_second_run = report_fixture(cache=False) >>> assert_that(allure_report_second_run, ... has_only_n_test_cases('tes...
0
0
0
0
0
0
0
0
0
2f5e8394385156696972b52a4a20a9f3de7e6a4c
2,524
py
Python
2019-presentations/11-november/regex.py
OuhscBbmc/StatisticalComputing
c2b4d5b12c906754abed0f5e3cfe4decbaa10948
[ "MIT" ]
7
2017-09-01T20:02:52.000Z
2021-07-15T16:28:27.000Z
2016-presentations/05-may/regex.py
OuhscBbmc/StatisticalComputing
c2b4d5b12c906754abed0f5e3cfe4decbaa10948
[ "MIT" ]
9
2015-02-02T21:33:21.000Z
2019-11-06T18:31:07.000Z
2016-presentations/05-may/regex.py
OuhscBbmc/StatisticalComputing
c2b4d5b12c906754abed0f5e3cfe4decbaa10948
[ "MIT" ]
3
2015-02-02T20:09:56.000Z
2016-03-21T21:57:58.000Z
import re m = re.search('(?<=abc)def', 'abcdef') print(m.group(0)) print("###### Example 1 ###########") example_1 = """ 1916-1918 subscales for a subject 1998-1914 subscales for a subject subscales for a subject 1998-1920 """ r = re.sub('(\d{2})(\d{2})', '20\\2', example_1) print(r) print("###### E...
28.681818
90
0.541601
import re import pandas as pd m = re.search('(?<=abc)def', 'abcdef') print(m.group(0)) print("###### Example 1 ###########") example_1 = """ 1916-1918 subscales for a subject 1998-1914 subscales for a subject subscales for a subject 1998-1920 """ r = re.sub('(\d{2})(\d{2})', '20\\2', example_1) print...
0
0
0
0
0
0
0
-2
22
f0b29ce98138387ee64d4ee75f69200e75c7f7a7
284
py
Python
ARClass1/ComputerVision/testFast.py
lucho1/AugmentedReality
62c35040ff3cfe3e1bff9d95659c55c1a7a2aa1f
[ "MIT" ]
null
null
null
ARClass1/ComputerVision/testFast.py
lucho1/AugmentedReality
62c35040ff3cfe3e1bff9d95659c55c1a7a2aa1f
[ "MIT" ]
null
null
null
ARClass1/ComputerVision/testFast.py
lucho1/AugmentedReality
62c35040ff3cfe3e1bff9d95659c55c1a7a2aa1f
[ "MIT" ]
null
null
null
import cv2 target_imgPath = input("Introduce Path for Target Image: ") #ex_img/img1.png input_img = cv2.imread(target_imgPath, cv2.IMREAD_COLOR) winName = 'Input Image' cv2.namedWindow(winName, cv2.WINDOW_NORMAL) cv2.imshow(winName, input_img) cv2.waitKey(0) cv2.destroyAllWindows()
28.4
76
0.792254
import cv2 target_imgPath = input("Introduce Path for Target Image: ") #ex_img/img1.png input_img = cv2.imread(target_imgPath, cv2.IMREAD_COLOR) winName = 'Input Image' cv2.namedWindow(winName, cv2.WINDOW_NORMAL) cv2.imshow(winName, input_img) cv2.waitKey(0) cv2.destroyAllWindows()
0
0
0
0
0
0
0
0
0
b76ccdca69d9db06b57637e63d45ce8ec654b786
1,077
py
Python
employee_integration/app/migrations/0002_auto_20210917_1204.py
misha143/employee_integration
0e4be49d3ba93700fd48547847664ffbe28318ea
[ "Apache-2.0" ]
null
null
null
employee_integration/app/migrations/0002_auto_20210917_1204.py
misha143/employee_integration
0e4be49d3ba93700fd48547847664ffbe28318ea
[ "Apache-2.0" ]
null
null
null
employee_integration/app/migrations/0002_auto_20210917_1204.py
misha143/employee_integration
0e4be49d3ba93700fd48547847664ffbe28318ea
[ "Apache-2.0" ]
null
null
null
# Generated by Django 3.2.2 on 2021-09-17 07:04
37.137931
243
0.64624
# Generated by Django 3.2.2 on 2021-09-17 07:04 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('app', '0001_initial'), ] operations = [ migrations.AlterField( model_name='question', name='image_url', ...
394
0
0
766
0
0
0
19
46
970fbf34da6224bb1ed9eda700a7e79159025150
4,155
py
Python
cogs/utility.py
exunious/Noella-Bot
ef119cf1ffc102188954962d54f07d895f4a7a94
[ "MIT" ]
null
null
null
cogs/utility.py
exunious/Noella-Bot
ef119cf1ffc102188954962d54f07d895f4a7a94
[ "MIT" ]
1
2019-01-08T21:53:38.000Z
2019-01-08T21:53:38.000Z
cogs/utility.py
exunious/Noella-Bot
ef119cf1ffc102188954962d54f07d895f4a7a94
[ "MIT" ]
3
2018-01-05T02:58:01.000Z
2018-06-14T20:56:51.000Z
########################################## ############ Utility Commands ############ ########################################## ### Ping/Latency Command ### ### Server Information Command ### ### List Servers Command ###
48.313953
365
0.683032
########################################## ############ Utility Commands ############ ########################################## import discord import random from discord.ext import commands from .musicutils.paginator import Pages from config import * class Utility(): def __init__(self, bot): self.bot = bot ### P...
0
3,629
0
38
0
24
0
13
226
72c27d084bf7d3b92c5b63ec0ad31223f7e1962e
6,041
py
Python
src/compress_dataset.py
yutake27/HMDM
a16c6e77cae9509ccf49140171797680068709aa
[ "MIT" ]
2
2021-12-09T00:12:35.000Z
2022-01-10T13:05:22.000Z
src/compress_dataset.py
yutake27/HMDM
a16c6e77cae9509ccf49140171797680068709aa
[ "MIT" ]
null
null
null
src/compress_dataset.py
yutake27/HMDM
a16c6e77cae9509ccf49140171797680068709aa
[ "MIT" ]
null
null
null
from pathlib import Path import pandas as pd route_path = Path('..') """ # Compress necessary files of the dataset Source * pdb / dataset_name / target / sampling * fasta / dataset_name * native_pdb / dataset_name * score Output * README.md write about dataset details * pdb * native_pdb * fasta * score """ ...
35.745562
108
0.65221
import argparse import tarfile from pathlib import Path import tqdm import pandas as pd route_path = Path('..') """ # Compress necessary files of the dataset Source * pdb / dataset_name / target / sampling * fasta / dataset_name * native_pdb / dataset_name * score Output * README.md write about dataset detai...
0
0
0
0
0
3,088
0
-23
182
fe281cc3b3ab67d09de7540069e231882145860e
9,038
py
Python
tests/conftest.py
beatMeDev/beatMeBackend
82270d16835c970e42530133668e2a8ab047af31
[ "MIT" ]
null
null
null
tests/conftest.py
beatMeDev/beatMeBackend
82270d16835c970e42530133668e2a8ab047af31
[ "MIT" ]
1
2020-08-02T05:17:28.000Z
2020-08-02T11:04:39.000Z
tests/conftest.py
beatMeDev/beatMeBackend
82270d16835c970e42530133668e2a8ab047af31
[ "MIT" ]
null
null
null
"""Test pre running stuff""" import warnings from typing import Any from typing import Dict from uuid import uuid4 from fastapi import FastAPI from app.models.db import Challenge from app.services.auth.base import bearer_auth with warnings.catch_warnings(): warnings.filterwarnings("ignore", category=DeprecationWa...
25.24581
85
0.694955
"""Test pre running stuff""" import warnings from datetime import datetime from datetime import timedelta from typing import Any from typing import AsyncGenerator from typing import Dict from typing import Optional from uuid import UUID from uuid import uuid4 import pytest from asyncpg import ObjectInUseError from f...
0
3,653
2,897
0
0
0
0
244
986
643121031961826d285600bddf8954ef245399d6
1,538
py
Python
QRFactorization/QRFactors.py
drreynolds/Math4315-codes
b8be1c1254417a96d3bc23e48444731a75ed0d3b
[ "CC0-1.0" ]
2
2021-01-26T19:13:57.000Z
2021-03-05T05:43:59.000Z
QRFactorization/QRFactors.py
drreynolds/Math4315-codes
b8be1c1254417a96d3bc23e48444731a75ed0d3b
[ "CC0-1.0" ]
null
null
null
QRFactorization/QRFactors.py
drreynolds/Math4315-codes
b8be1c1254417a96d3bc23e48444731a75ed0d3b
[ "CC0-1.0" ]
1
2021-02-26T22:12:24.000Z
2021-02-26T22:12:24.000Z
# QRFactors.py # # Daniel R. Reynolds # SMU Mathematics # Math 4315 # imports import numpy def QRFactors(A): """ usage: Q, R = QRFactors(A) Function to compute the QR factorization of a (possibly rank-deficient) 'thin' matrix A (m x n, with m >=n) using Householder reflection matrices. Input: ...
24.03125
78
0.513004
# QRFactors.py # # Daniel R. Reynolds # SMU Mathematics # Math 4315 # imports import numpy def QRFactors(A): """ usage: Q, R = QRFactors(A) Function to compute the QR factorization of a (possibly rank-deficient) 'thin' matrix A (m x n, with m >=n) using Householder reflection matrices. Input: ...
0
0
0
0
0
0
0
0
0
54787a4a9a904635a9d79399b77217323f7cf446
1,504
py
Python
src/nexusformat/__init__.py
tschoonj/nexusformat
a521170ec56c9631980b65e264bd9afcdbc164e8
[ "BSD-3-Clause-Clear" ]
null
null
null
src/nexusformat/__init__.py
tschoonj/nexusformat
a521170ec56c9631980b65e264bd9afcdbc164e8
[ "BSD-3-Clause-Clear" ]
null
null
null
src/nexusformat/__init__.py
tschoonj/nexusformat
a521170ec56c9631980b65e264bd9afcdbc164e8
[ "BSD-3-Clause-Clear" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2013-2014, NeXpy Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING, distributed with this software. #---...
36.682927
79
0.675532
#!/usr/bin/env python # -*- coding: utf-8 -*- #----------------------------------------------------------------------------- # Copyright (c) 2013-2014, NeXpy Development Team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING, distributed with this software. #---...
0
0
0
0
0
0
0
0
0
eb7334b45895e9273f1edaa206023449ca9e6da0
539
py
Python
app.py
eskape/calculator
f9b106c1cf7323a137936b31a32c0d5e5b47325f
[ "MIT" ]
null
null
null
app.py
eskape/calculator
f9b106c1cf7323a137936b31a32c0d5e5b47325f
[ "MIT" ]
null
null
null
app.py
eskape/calculator
f9b106c1cf7323a137936b31a32c0d5e5b47325f
[ "MIT" ]
null
null
null
from flask import Flask from flask_restful import Api app = Flask(__name__) api = Api(app) api.add_resource(Add, '/add') if __name__ == '__main__': app.run(port='5002')
21.56
53
0.662338
from flask import Flask from flask import request from flask_restful import Resource, Api, reqparse from Calculator import Calculator app = Flask(__name__) api = Api(app) class Add(Resource): def post(self): calculator = Calculator() json_data = request.get_json(force=True) val1 = json_...
0
0
0
259
0
0
0
36
67
04c03b7a6ff384fe54d34834cbf5910575157a29
1,027
py
Python
syphon/tests/test_context.py
ethall/syphon
dd75fd33f3f9164653f24b33c875615dc1d04182
[ "MIT" ]
null
null
null
syphon/tests/test_context.py
ethall/syphon
dd75fd33f3f9164653f24b33c875615dc1d04182
[ "MIT" ]
23
2018-01-06T17:59:58.000Z
2019-02-27T15:52:20.000Z
syphon/tests/test_context.py
ethall/syphon
dd75fd33f3f9164653f24b33c875615dc1d04182
[ "MIT" ]
1
2019-02-20T17:17:40.000Z
2019-02-20T17:17:40.000Z
"""syphon.tests.test_context.py Copyright (c) 2017-2018 Keithley Instruments, LLC. Licensed under MIT (https://github.com/ehall/syphon/blob/master/LICENSE) """
23.883721
75
0.771178
"""syphon.tests.test_context.py Copyright (c) 2017-2018 Keithley Instruments, LLC. Licensed under MIT (https://github.com/ehall/syphon/blob/master/LICENSE) """ from syphon import Context def test_context_archive_property_default(): assert Context().archive is None def test_context_cache_property_default...
0
0
0
0
0
640
0
5
206
9499c5ca6a6ec4df2cc72e31c2e030d298408c9b
11,416
py
Python
cs15211/RedundantConnectionII.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
1
2021-07-05T01:53:30.000Z
2021-07-05T01:53:30.000Z
cs15211/RedundantConnectionII.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
null
null
null
cs15211/RedundantConnectionII.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
1
2018-01-08T07:14:08.000Z
2018-01-08T07:14:08.000Z
__source__ = 'https://leetcode.com/problems/redundant-connection-ii/' # Time: O(V) numbert of vertices # Space: O(V) # # Description: Leetcode # 685. Redundant Connection II # # In this problem, a rooted tree is a directed graph such that, # there is exactly one node (the root) for which all other nodes are descendant...
34.077612
134
0.556938
__source__ = 'https://leetcode.com/problems/redundant-connection-ii/' # Time: O(V) numbert of vertices # Space: O(V) # # Description: Leetcode # 685. Redundant Connection II # # In this problem, a rooted tree is a directed graph such that, # there is exactly one node (the root) for which all other nodes are descendant...
0
0
0
1,193
0
0
0
-3
67
3690e31d3dc0579d742dbd37b89a379e1320107a
85,990
py
Python
src/harvesters/core.py
batrlatom/harvesters
2c3cb52538afb8999275a81fe72cb7ee51a0e7af
[ "Apache-2.0" ]
null
null
null
src/harvesters/core.py
batrlatom/harvesters
2c3cb52538afb8999275a81fe72cb7ee51a0e7af
[ "Apache-2.0" ]
null
null
null
src/harvesters/core.py
batrlatom/harvesters
2c3cb52538afb8999275a81fe72cb7ee51a0e7af
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # ---------------------------------------------------------------------------- # # Copyright 2018 EMVA # # 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://ww...
29.258251
166
0.552971
#!/usr/bin/env python3 # ---------------------------------------------------------------------------- # # Copyright 2018 EMVA # # 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://ww...
0
14,540
0
63,024
0
5,092
0
919
1,331
035f90e4f530b151f9199f302d9fcf5d01edb3c7
2,954
py
Python
experiments/do_process_generated.py
michael1788/TED
247c37f168e178cae1237207c07d4a34679ce126
[ "MIT" ]
8
2021-11-02T09:45:14.000Z
2022-03-11T23:15:05.000Z
experiments/do_process_generated.py
michael1788/TED
247c37f168e178cae1237207c07d4a34679ce126
[ "MIT" ]
null
null
null
experiments/do_process_generated.py
michael1788/TED
247c37f168e178cae1237207c07d4a34679ce126
[ "MIT" ]
null
null
null
import os, sys import time import configparser import argparse sys.path.append('../src/') from python import helper as hp from python import fixed_parameters as FP parser = argparse.ArgumentParser(description='Process generated data for proba extraction') parser.add_argument('-c','--configfile', type=str, help='path ...
33.191011
101
0.576506
import os, sys import time import configparser import argparse sys.path.append('../src/') from python import helper as hp from python import fixed_parameters as FP parser = argparse.ArgumentParser(description='Process generated data for proba extraction') parser.add_argument('-c','--configfile', type=str, help='path ...
0
0
0
0
0
0
0
0
0
4547f62f51cd39690acb4f9c75fb2d2ec0385cf4
791
py
Python
tab_transformer/config.py
hoopoes/tab-transformer
d5e590ccce0de4c70121e9ae4178fad1892bc46d
[ "MIT" ]
1
2022-03-31T14:42:18.000Z
2022-03-31T14:42:18.000Z
tab_transformer/config.py
hoopoes/tab-transformer
d5e590ccce0de4c70121e9ae4178fad1892bc46d
[ "MIT" ]
null
null
null
tab_transformer/config.py
hoopoes/tab-transformer
d5e590ccce0de4c70121e9ae4178fad1892bc46d
[ "MIT" ]
null
null
null
from yacs.config import CfgNode as CN _C = CN() # directories _C.ADDRESS = CN() _C.ADDRESS.DATA = 'data/' _C.ADDRESS.CHECK = 'checkpoints/' # data _C.DATA = CN() _C.DATA.NUM_CONT_FEATURES = 7 # model _C.MODEL = CN() _C.MODEL.NAME = 'base_tab' _C.MODEL.HIDDEN_SIZE = 32 _C.MODEL.NUM_LAYERS = 6 _C.MODEL.NUM_HEADS = 8...
17.195652
49
0.692794
from yacs.config import CfgNode as CN _C = CN() # directories _C.ADDRESS = CN() _C.ADDRESS.DATA = 'data/' _C.ADDRESS.CHECK = 'checkpoints/' # data _C.DATA = CN() _C.DATA.NUM_CONT_FEATURES = 7 # model _C.MODEL = CN() _C.MODEL.NAME = 'base_tab' _C.MODEL.HIDDEN_SIZE = 32 _C.MODEL.NUM_LAYERS = 6 _C.MODEL.NUM_HEADS = 8...
0
0
0
0
0
0
0
0
0
3562785ebbb97d0ea79a702811d2fb790644030e
939
py
Python
exception.py
mitodl/release-script
615fbabac46a7a3c6ffb62a1cefe20c6df6dbd7b
[ "BSD-3-Clause" ]
15
2017-02-20T22:07:23.000Z
2020-10-10T15:39:46.000Z
exception.py
mitodl/release-script
615fbabac46a7a3c6ffb62a1cefe20c6df6dbd7b
[ "BSD-3-Clause" ]
311
2016-02-11T17:09:33.000Z
2022-01-20T19:07:54.000Z
exception.py
mitodl/release-script
615fbabac46a7a3c6ffb62a1cefe20c6df6dbd7b
[ "BSD-3-Clause" ]
7
2017-03-20T03:52:46.000Z
2020-05-16T05:52:16.000Z
"""Exceptions for release script"""
26.828571
99
0.734824
"""Exceptions for release script""" from subprocess import CalledProcessError class InputException(Exception): """Exception raised for invalid input.""" class ReleaseException(Exception): """Exception raised for a command error due to some release status""" class DependencyException(Exception): """Err...
0
0
0
693
0
0
0
20
183
d631702dab2ab11cee442a3fe1efcd253ba50134
1,190
py
Python
app/error.py
chick0/upload
5f63590706d9a5083cbb2a42a1e5e386e9590424
[ "MIT" ]
1
2021-07-27T07:43:20.000Z
2021-07-27T07:43:20.000Z
app/error.py
chick0/upload
5f63590706d9a5083cbb2a42a1e5e386e9590424
[ "MIT" ]
null
null
null
app/error.py
chick0/upload
5f63590706d9a5083cbb2a42a1e5e386e9590424
[ "MIT" ]
null
null
null
# error map error_map = { 403: forbidden, 404: page_not_found, 413: file_is_too_big, # custom error FileIsEmpty: file_is_empty, FileIsTooBig: file_is_too_big }
19.508197
69
0.589916
from flask import current_app from flask import render_template from app.custom_error import * from app.template_filter import display_size from app.models import Error def forbidden(e): return render_template( "error.html", error=Error( title="403", subtitle="권한이 부족합니다."...
204
0
0
0
0
668
0
59
204
c61d8127d280cb39cda8d95a6861368a4aab867e
1,492
py
Python
tests/bool_support_test.py
gglin001/poptorch
61f38ed2d8c6b672e023862eb698865fa7f4724e
[ "MIT" ]
128
2020-12-08T22:22:46.000Z
2022-03-23T10:54:26.000Z
tests/bool_support_test.py
gglin001/poptorch
61f38ed2d8c6b672e023862eb698865fa7f4724e
[ "MIT" ]
4
2021-06-22T14:26:28.000Z
2022-02-15T11:25:05.000Z
tests/bool_support_test.py
gglin001/poptorch
61f38ed2d8c6b672e023862eb698865fa7f4724e
[ "MIT" ]
7
2020-12-09T20:32:56.000Z
2022-01-18T16:12:24.000Z
#!/usr/bin/env python3 # Copyright (c) 2021 Graphcore Ltd. All rights reserved. import torch # Not need for mean or logsumexp reduce_ops = [torch.sum, torch.prod] test_tensors = [ torch.tensor([1.0, 2.0, 3.1]), torch.tensor([1.1, 2.0, 3.0]), torch.tensor([0.0, 0.0, 0.0]) ]
27.62963
78
0.658847
#!/usr/bin/env python3 # Copyright (c) 2021 Graphcore Ltd. All rights reserved. import torch import pytest import poptorch import helpers # Not need for mean or logsumexp reduce_ops = [torch.sum, torch.prod] test_tensors = [ torch.tensor([1.0, 2.0, 3.1]), torch.tensor([1.1, 2.0, 3.0]), torch.tensor([0.0, ...
0
599
0
147
0
365
0
-21
112
6a9e0ef97e4be21bcbfc3271ae76cee4bda25e3d
1,575
py
Python
configs/foveabox/fovea_r50_fpn_4x4_100e_minicoco500_lrsched2.py
kemaloksuz/Mask-aware-IoU
4c07665d3fd1080066cb99897baeee159e9dce4e
[ "Apache-2.0" ]
24
2021-10-19T19:47:23.000Z
2022-03-29T08:06:27.000Z
configs/foveabox/fovea_r50_fpn_4x4_100e_minicoco500_lrsched2.py
kemaloksuz/Mask-aware-IoU
4c07665d3fd1080066cb99897baeee159e9dce4e
[ "Apache-2.0" ]
null
null
null
configs/foveabox/fovea_r50_fpn_4x4_100e_minicoco500_lrsched2.py
kemaloksuz/Mask-aware-IoU
4c07665d3fd1080066cb99897baeee159e9dce4e
[ "Apache-2.0" ]
5
2021-11-16T02:14:11.000Z
2022-03-28T08:55:40.000Z
_base_ = [ '../_base_/datasets/minicoco500_detection_augm.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] # model settings model = dict( type='FOVEA', pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, ...
27.631579
78
0.579683
_base_ = [ '../_base_/datasets/minicoco500_detection_augm.py', '../_base_/schedules/schedule_1x.py', '../_base_/default_runtime.py' ] # model settings model = dict( type='FOVEA', pretrained='torchvision://resnet50', backbone=dict( type='ResNet', depth=50, num_stages=4, ...
0
0
0
0
0
0
0
0
0
099dcfc5cb9b5d40663db12e855a208a72e8e311
10,820
py
Python
fgspectra/frequency.py
JackLonergan97/fgspectra
ae450914bb12cbaa8d4b626e1a0842a6d8fa916d
[ "BSD-3-Clause" ]
null
null
null
fgspectra/frequency.py
JackLonergan97/fgspectra
ae450914bb12cbaa8d4b626e1a0842a6d8fa916d
[ "BSD-3-Clause" ]
null
null
null
fgspectra/frequency.py
JackLonergan97/fgspectra
ae450914bb12cbaa8d4b626e1a0842a6d8fa916d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- r""" Frequency-dependent foreground components. This module implements the frequency-dependent component of common foreground contaminants. This package draws inspiration from FGBuster (Davide Poletti and Josquin Errard) and BeFoRe (David Alonso and Ben Thorne). """ import inspect import type...
32.011834
96
0.581238
# -*- coding: utf-8 -*- r""" Frequency-dependent foreground components. This module implements the frequency-dependent component of common foreground contaminants. This package draws inspiration from FGBuster (Davide Poletti and Josquin Errard) and BeFoRe (David Alonso and Ben Thorne). """ import inspect import type...
0
187
0
7,074
0
66
0
3
229
367806765cb3c2806102a720a2093e5e1fd95006
1,344
py
Python
setup.py
vogoltsov/robotframework-docker
3873c906e41065bb358c89a204ed454daae15a30
[ "Apache-2.0" ]
11
2019-07-09T02:08:06.000Z
2022-01-17T00:50:28.000Z
setup.py
vogoltsov/robotframework-docker
3873c906e41065bb358c89a204ed454daae15a30
[ "Apache-2.0" ]
11
2020-12-21T11:40:32.000Z
2021-03-25T09:41:23.000Z
setup.py
vogoltsov/robotframework-docker
3873c906e41065bb358c89a204ed454daae15a30
[ "Apache-2.0" ]
1
2021-07-22T11:41:46.000Z
2021-07-22T11:41:46.000Z
"""Setup module for Robot Framework Docker Library package.""" import os from setuptools import setup # get absolute source directory path here = os.path.abspath(os.path.dirname(__file__)) # Get the long description from the README file with open(os.path.join(here, 'README.rst'), encoding='utf-8') as readme_file: ...
33.6
84
0.674851
"""Setup module for Robot Framework Docker Library package.""" import os from setuptools import setup # get absolute source directory path here = os.path.abspath(os.path.dirname(__file__)) # Get the long description from the README file with open(os.path.join(here, 'README.rst'), encoding='utf-8') as readme_file: ...
0
0
0
0
0
0
0
0
0
5d3f5cd4808c240d0431fdf210524eb4129fbddd
1,246
py
Python
ocean_drilling_db/create_database.py
rickdberg/ocean_drilling_rt_modeling_db
e9951fa933f41ea4740d1e66a02a6d89df10a8f9
[ "MIT" ]
4
2019-12-17T11:54:32.000Z
2022-02-18T16:58:20.000Z
ocean_drilling_db/create_database.py
rickdberg/ocean_drilling_rt_modeling_db
e9951fa933f41ea4740d1e66a02a6d89df10a8f9
[ "MIT" ]
1
2020-11-28T12:38:34.000Z
2020-11-28T12:38:34.000Z
ocean_drilling_db/create_database.py
rickdberg/ocean_drilling_db
e9951fa933f41ea4740d1e66a02a6d89df10a8f9
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Oct 24 15:01:56 2018 @author: rick """ # eof
38.9375
110
0.716693
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Oct 24 15:01:56 2018 @author: rick """ from sqlalchemy import create_engine def create_db(username, password, host, db_name, hole_metadata, age_depth, interstitial_water_chem, mad, cns): host_engine = create_engine('mysql://{}:{}@{}'.format(usern...
0
0
0
0
0
1,072
0
15
46
72713e4770785e80a43bd2c691071d956264799a
239
py
Python
top_k_dissect.py
jinmingteo/pytorch-image-models
2aaa8b88ca2b4c8bc24dc0c80b06f03bb1f3d480
[ "Apache-2.0" ]
null
null
null
top_k_dissect.py
jinmingteo/pytorch-image-models
2aaa8b88ca2b4c8bc24dc0c80b06f03bb1f3d480
[ "Apache-2.0" ]
null
null
null
top_k_dissect.py
jinmingteo/pytorch-image-models
2aaa8b88ca2b4c8bc24dc0c80b06f03bb1f3d480
[ "Apache-2.0" ]
null
null
null
import pandas as pd classes = ['A', 'B', 'C', 'D', 'E'] sorted(classes) df = pd.read_csv('topk_ids.csv', header=None) top1_ans = dict(df[1].value_counts()) new_dict = {classes[key]:val for key,val in top1_ans.items()} print (new_dict)
19.916667
61
0.665272
import pandas as pd classes = ['A', 'B', 'C', 'D', 'E'] sorted(classes) df = pd.read_csv('topk_ids.csv', header=None) top1_ans = dict(df[1].value_counts()) new_dict = {classes[key]:val for key,val in top1_ans.items()} print (new_dict)
0
0
0
0
0
0
0
0
0
61d002f5030dd4f292dfc9b7878220462c8fb577
5,679
py
Python
jmapp/routes/job.py
genwch/jmapp
760fef05286a31b1f8216b4f5af9ed6941a35106
[ "MIT" ]
null
null
null
jmapp/routes/job.py
genwch/jmapp
760fef05286a31b1f8216b4f5af9ed6941a35106
[ "MIT" ]
null
null
null
jmapp/routes/job.py
genwch/jmapp
760fef05286a31b1f8216b4f5af9ed6941a35106
[ "MIT" ]
null
null
null
import os from flask import Blueprint from model import job_mod, apply_mod, offer_mod fname = os.path.basename(__file__).split(".")[0] job = Blueprint(fname, __name__) job_m = job_mod() apply_m = apply_mod() offer_m = offer_mod()
33.60355
103
0.558021
import os from flask import Blueprint from jmapp.lib.auth import jwt_required from model import job_mod, apply_mod, offer_mod fname = os.path.basename(__file__).split(".")[0] job = Blueprint(fname, __name__) job_m = job_mod() apply_m = apply_mod() offer_m = offer_mod() @job.route("/", methods=["GET"]) @jwt_require...
0
5,100
0
0
0
138
0
18
183
f621b801b0d5980457d7d945ef159d32f02dbdd4
1,801
py
Python
setup.py
neinseg/pcb-tools-extension
71c371ca680483aa9ef18d2998832460dd43abdf
[ "Apache-2.0" ]
20
2019-04-16T05:26:53.000Z
2022-02-27T17:21:21.000Z
setup.py
neinseg/pcb-tools-extension
71c371ca680483aa9ef18d2998832460dd43abdf
[ "Apache-2.0" ]
8
2019-07-27T12:51:05.000Z
2021-04-20T15:48:12.000Z
setup.py
neinseg/pcb-tools-extension
71c371ca680483aa9ef18d2998832460dd43abdf
[ "Apache-2.0" ]
10
2019-07-23T16:15:37.000Z
2022-02-27T17:21:27.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2019 Hiroshi Murayama <opiopan@gmail.com> METADATA = { 'name': 'pcb-tools-extension', 'version': "0.9.3", 'author': 'Hiroshi Murayama <opiopan@gmail.com>', 'author_email': "opiopan@gmail.com", 'description': ("Extension for pcb-tools packag...
31.051724
80
0.624653
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2019 Hiroshi Murayama <opiopan@gmail.com> import os def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() METADATA = { 'name': 'pcb-tools-extension', 'version': "0.9.3", 'author': 'Hiroshi Murayama <opiopan@gmail...
0
0
0
0
0
66
0
-12
46
ec8fb02287cad3ff9807d4f7b4a66b59e0088cb2
269
py
Python
pub_data_visualization/outages/plot/__init__.py
cre-os/pub-data-visualization
e5ec45e6397258646290836fc1a3b39ad69bf266
[ "MIT" ]
10
2020-10-08T11:35:49.000Z
2021-01-22T16:47:59.000Z
pub_data_visualization/outages/plot/__init__.py
l-leo/pub-data-visualization
68eea00491424581b057495a7f0f69cf74e16e7d
[ "MIT" ]
3
2021-03-15T14:26:43.000Z
2021-12-02T15:27:49.000Z
pub_data_visualization/outages/plot/__init__.py
cre-dev/pub-data-visualization
229bb7a543684be2cb06935299345ce3263da946
[ "MIT" ]
1
2021-01-22T16:47:10.000Z
2021-01-22T16:47:10.000Z
""" Module to plot outages data. """
22.416667
44
0.64684
""" Module to plot outages data. """ from .animated_availability import * from .evolution_mean_availability import * from .expected_program import * from .incremental_programs import * from .regression_delays import *
0
0
0
0
0
0
0
115
111
21d2d49a8c110f75cd1fd273a1509a324386447e
613
py
Python
IPAMpy/IPAM/RIPE.py
xk2600/ipampy
5f46c382abc5515d1d1d156716e7d17ff8c699dd
[ "BSD-2-Clause" ]
null
null
null
IPAMpy/IPAM/RIPE.py
xk2600/ipampy
5f46c382abc5515d1d1d156716e7d17ff8c699dd
[ "BSD-2-Clause" ]
null
null
null
IPAMpy/IPAM/RIPE.py
xk2600/ipampy
5f46c382abc5515d1d1d156716e7d17ff8c699dd
[ "BSD-2-Clause" ]
null
null
null
import IPAM.CLASS # NOTE: Blocks with a masklen set are supernets of various subnets # within the originating parent supernet. Most class B and C # addresing has been rulled up int supernets as /8s. This # means in most cases, you use/allocate a NET-BLOCK allocation # first with the correct sub...
47.153846
69
0.719413
import IPAM.CLASS # NOTE: Blocks with a masklen set are supernets of various subnets # within the originating parent supernet. Most class B and C # addresing has been rulled up int supernets as /8s. This # means in most cases, you use/allocate a NET-BLOCK allocation # first with the correct sub...
0
0
0
0
0
0
0
0
0
db4ddbe9efa1da57573aa38b0cb40048b1e674ea
2,134
py
Python
furnace/datasets/TestData.py
windyrobin/TorchSeg
304871d578c8f1bb3eb2c896c26528b437001268
[ "MIT" ]
3
2019-06-03T06:05:35.000Z
2019-08-06T01:26:24.000Z
furnace/datasets/TestData.py
windyrobin/TorchSeg
304871d578c8f1bb3eb2c896c26528b437001268
[ "MIT" ]
null
null
null
furnace/datasets/TestData.py
windyrobin/TorchSeg
304871d578c8f1bb3eb2c896c26528b437001268
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # encoding: utf-8 # @Time : 2017/12/16 8:41 # @Author : yuchangqian # @Contact : changqian_yu@163.com # @File : BaseDataset.py import torch.utils.data as data if __name__ == "__main__": data_setting = {'img_root': ''} bd = TestData(data_setting, 'test/', None) print(bd.get_...
25.105882
65
0.615745
#!/usr/bin/env python3 # encoding: utf-8 # @Time : 2017/12/16 下午8:41 # @Author : yuchangqian # @Contact : changqian_yu@163.com # @File : BaseDataset.py import os import time import cv2 import torch import numpy as np import torch.utils.data as data class TestData(data.Dataset): def __init__(self, img_pat...
6
369
0
1,339
0
0
0
-45
134
b7ab19aae83a46f97925498d52310bd9d844c53c
1,231
py
Python
config/urlshortener/models.py
PozziSan/Django-Url-Shortener
b27d5ad51af3177d7e98fbfb86ff7494a59e190f
[ "MIT" ]
1
2021-07-04T20:00:27.000Z
2021-07-04T20:00:27.000Z
config/urlshortener/models.py
PozziSan/Django-Url-Shortener
b27d5ad51af3177d7e98fbfb86ff7494a59e190f
[ "MIT" ]
null
null
null
config/urlshortener/models.py
PozziSan/Django-Url-Shortener
b27d5ad51af3177d7e98fbfb86ff7494a59e190f
[ "MIT" ]
null
null
null
''' Url shortener model ''' # Create your models here.
24.137255
87
0.669374
''' Url shortener model ''' from django.db import models from django.urls import reverse_lazy from .utils import create_shortened_url # Create your models here. class Shortener(models.Model): ''' Creates a short url based on the long one created -> Hour and date a shortener was created ti...
0
0
0
1,045
0
0
0
40
92
eb9566a3902e49eb4d59ee45924e4049ded4a56d
133
py
Python
Baekjoon/Greedy/temp.py
Gonnnnn/Algorithm
f9cbbbc64e5d62ed75a5e3d5edb7b8cdae6e18e2
[ "Apache-2.0" ]
null
null
null
Baekjoon/Greedy/temp.py
Gonnnnn/Algorithm
f9cbbbc64e5d62ed75a5e3d5edb7b8cdae6e18e2
[ "Apache-2.0" ]
null
null
null
Baekjoon/Greedy/temp.py
Gonnnnn/Algorithm
f9cbbbc64e5d62ed75a5e3d5edb7b8cdae6e18e2
[ "Apache-2.0" ]
null
null
null
# print(bin(10)) # print(bin(10)[::-1].index('1')) from collections import Counter a = [1, 1, 1, 2, 3, 4, 5] t = Counter(a) print(t)
19
33
0.586466
# print(bin(10)) # print(bin(10)[::-1].index('1')) from collections import Counter a = [1, 1, 1, 2, 3, 4, 5] t = Counter(a) print(t)
0
0
0
0
0
0
0
0
0
91d4b970c1f9f25020a877ef06fdb3284a863fd8
950
py
Python
cctbx_progs/get_cc_mtz_mtz.py
7l2icj/kamo_clone
5f4a5eed3cd9d91a021d805e46125c19cc2ed1b6
[ "BSD-3-Clause" ]
16
2016-05-20T11:19:40.000Z
2021-01-01T19:44:23.000Z
cctbx_progs/get_cc_mtz_mtz.py
7l2icj/kamo_clone
5f4a5eed3cd9d91a021d805e46125c19cc2ed1b6
[ "BSD-3-Clause" ]
4
2017-03-10T00:51:11.000Z
2021-02-07T17:18:46.000Z
cctbx_progs/get_cc_mtz_mtz.py
7l2icj/kamo_clone
5f4a5eed3cd9d91a021d805e46125c19cc2ed1b6
[ "BSD-3-Clause" ]
9
2016-12-15T16:00:06.000Z
2021-09-10T08:34:14.000Z
import iotbx.mtz from cctbx.array_family import flex if __name__ == "__main__": import sys data = {} for f in sys.argv[1:]: data[f] = get_I(f) for ix in xrange(len(data)-1): for iy in xrange(ix+1, len(data)): x, y = data.keys()[ix], data.keys()[iy] xd, yd = da...
31.666667
103
0.622105
import iotbx.mtz from cctbx.array_family import flex def get_I(mtzin): mtzobj = iotbx.mtz.object(file_name=mtzin) I_arrays = filter(lambda s: s.info().type_hints_from_file =="intensity", mtzobj.as_miller_arrays()) F_arrays = filter(lambda s: s.info().type_hints_from_file =="amplitude", mtzobj.as_miller_arr...
0
0
0
0
0
381
0
0
23
2bd291cd06e8febfb47b9ae9835889acf88da395
3,680
py
Python
experiment/quic/graph.py
taimooralam/master-thesis
dcb988a2866e65e2faef67627428d1ffd1c0182e
[ "MIT" ]
null
null
null
experiment/quic/graph.py
taimooralam/master-thesis
dcb988a2866e65e2faef67627428d1ffd1c0182e
[ "MIT" ]
null
null
null
experiment/quic/graph.py
taimooralam/master-thesis
dcb988a2866e65e2faef67627428d1ffd1c0182e
[ "MIT" ]
null
null
null
#visualize the data that go produced import os import sys import plotly import plotly.offline as offline import plotly.graph_objs as go import helper as help plotly.tools.set_credentials_file(username="<>", api_key="<>") gprotocol = sys.argv[2] if len(sys.argv) > 2 and sys.argv[1] == "quic" else "quic" latency = sys....
28.091603
121
0.727446
#visualize the data that go produced import os import sys import plotly import plotly.offline as offline import plotly.graph_objs as go import helper as help plotly.tools.set_credentials_file(username="<>", api_key="<>") gprotocol = sys.argv[2] if len(sys.argv) > 2 and sys.argv[1] == "quic" else "quic" latency = sys....
0
0
0
0
0
50
0
0
23
0f44aa3f0b484305b53fb972edf33e276c2a802a
3,440
py
Python
pydl/examples/spiral_fc_example.py
nash911/PyDL
b0b6f599184c0046f503b9ee1703dc3dfe9a89f2
[ "MIT" ]
null
null
null
pydl/examples/spiral_fc_example.py
nash911/PyDL
b0b6f599184c0046f503b9ee1703dc3dfe9a89f2
[ "MIT" ]
null
null
null
pydl/examples/spiral_fc_example.py
nash911/PyDL
b0b6f599184c0046f503b9ee1703dc3dfe9a89f2
[ "MIT" ]
null
null
null
# ------------------------------------------------------------------------ # MIT License # # Copyright (c) [2021] [Avinash Ranganath] # # This code is part of the library PyDL <https://github.com/nash911/PyDL> # This code is licensed under MIT license (see LICENSE.txt for details) # ------------------------------------...
36.210526
84
0.600581
# ------------------------------------------------------------------------ # MIT License # # Copyright (c) [2021] [Avinash Ranganath] # # This code is part of the library PyDL <https://github.com/nash911/PyDL> # This code is licensed under MIT license (see LICENSE.txt for details) # ------------------------------------...
0
0
0
0
0
2,754
0
87
201
5bfb9c4ee3e113fed6cbd6d8c510e14cc3e301df
6,612
py
Python
tests/test_dsp_interpolate_spectrum.py
pyfar/pyfar
984e61c9b90335f774f16699c9bcc18e422e7ecf
[ "MIT" ]
23
2020-11-05T10:10:33.000Z
2022-03-23T19:22:18.000Z
tests/test_dsp_interpolate_spectrum.py
pyfar/pyfar
984e61c9b90335f774f16699c9bcc18e422e7ecf
[ "MIT" ]
144
2020-11-05T16:39:27.000Z
2022-03-24T18:59:39.000Z
tests/test_dsp_interpolate_spectrum.py
pyfar/pyfar
984e61c9b90335f774f16699c9bcc18e422e7ecf
[ "MIT" ]
4
2020-11-11T20:06:52.000Z
2021-08-11T17:14:29.000Z
from pytest import raises import numpy as np import numpy.testing as npt import matplotlib.pyplot as plt import pyfar as pf from pyfar.dsp import InterpolateSpectrum # TODO: Finish `test_interpolation()` for 'magnitude_minimum' def test_init(): """Test return objects""" fd = pf.FrequencyData([1, .5], [100, 2...
36.530387
79
0.647005
import pytest from pytest import raises import numpy as np import numpy.testing as npt import matplotlib.pyplot as plt import pyfar as pf from pyfar.dsp import InterpolateSpectrum # TODO: Finish `test_interpolation()` for 'magnitude_minimum' def test_init(): """Test return objects""" fd = pf.FrequencyData([1...
0
1,446
0
0
0
0
0
-8
45
6481a21c660a997c6a55626782d2d8522c077632
3,810
py
Python
tests/test_command_execution.py
welchbj/almanac
91db5921a27f7d089b4ad8463ffb6e1453c5126a
[ "MIT" ]
4
2020-08-04T10:59:10.000Z
2021-08-23T13:42:03.000Z
tests/test_command_execution.py
welchbj/almanac
91db5921a27f7d089b4ad8463ffb6e1453c5126a
[ "MIT" ]
null
null
null
tests/test_command_execution.py
welchbj/almanac
91db5921a27f7d089b4ad8463ffb6e1453c5126a
[ "MIT" ]
2
2021-07-20T04:49:22.000Z
2021-08-23T13:42:23.000Z
"""Tests for execution of various command lines."""
29.765625
78
0.670866
"""Tests for execution of various command lines.""" import pytest from almanac import ( MissingArgumentsError, NoSuchArgumentError, TooManyPositionalArgumentsError ) from .utils import get_test_app @pytest.mark.asyncio async def test_simple_type_promotion(): app = get_test_app() app.add_promote...
0
3,453
0
0
0
0
0
92
207
27b8833491ef3ccaa44ea26899c4ac0ffeff5c0a
1,275
py
Python
medium/79.py
pisskidney/leetcode
08c19cbf3d7afc897908ea05db4ad11a5487f523
[ "MIT" ]
null
null
null
medium/79.py
pisskidney/leetcode
08c19cbf3d7afc897908ea05db4ad11a5487f523
[ "MIT" ]
null
null
null
medium/79.py
pisskidney/leetcode
08c19cbf3d7afc897908ea05db4ad11a5487f523
[ "MIT" ]
null
null
null
""" 79. Word Search https://leetcode.com/problems/word-search/ """ if __name__ == '__main__': raise(SystemExit(main()))
26.020408
96
0.418824
""" 79. Word Search https://leetcode.com/problems/word-search/ """ from typing import List class Solution: def exist(self, board: List[List[str]], word: str) -> bool: def go(visited, i, j, word): if not word: return True if i < 0 or i >= len(board): ...
0
0
0
970
0
106
0
2
68
5dcfe2f81de53539c653f934a73cb8fdbef0840d
2,640
py
Python
src/mem/ruby/system/RubySystem.py
jblab/gem5
2d23bb08697f8fa552c21d337090077137fa7fb3
[ "BSD-3-Clause" ]
10
2020-03-08T18:07:48.000Z
2021-12-07T07:08:24.000Z
src/mem/ruby/system/RubySystem.py
jblab/gem5
2d23bb08697f8fa552c21d337090077137fa7fb3
[ "BSD-3-Clause" ]
2
2019-03-22T14:23:38.000Z
2019-03-22T15:45:35.000Z
src/mem/ruby/system/RubySystem.py
jblab/gem5
2d23bb08697f8fa552c21d337090077137fa7fb3
[ "BSD-3-Clause" ]
6
2019-03-07T06:45:00.000Z
2022-03-12T11:04:05.000Z
# Copyright (c) 2009 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list of conditions...
47.142857
78
0.755682
# Copyright (c) 2009 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list of conditions...
0
0
0
937
0
0
0
25
90
eeb7a3190a987218fce09baf9f34549ea26a24f9
1,894
py
Python
day4/puzzle1.py
StvnWthrsp/advent-of-code-2021
940b018ea3e1bca090be7498e2f26203c1a45eac
[ "MIT" ]
null
null
null
day4/puzzle1.py
StvnWthrsp/advent-of-code-2021
940b018ea3e1bca090be7498e2f26203c1a45eac
[ "MIT" ]
null
null
null
day4/puzzle1.py
StvnWthrsp/advent-of-code-2021
940b018ea3e1bca090be7498e2f26203c1a45eac
[ "MIT" ]
null
null
null
with open('input') as input: lines = input.readlines() number_sequence = lines[0].split(',') board_numbers = [] called_indexes = [] # Flatten data structure for boards for i, line in enumerate(lines): if i == 0: continue if line == '\n': continue stripped_line = line.strip('\n') nu...
31.566667
84
0.56547
with open('input') as input: lines = input.readlines() number_sequence = lines[0].split(',') board_numbers = [] called_indexes = [] # Flatten data structure for boards for i, line in enumerate(lines): if i == 0: continue if line == '\n': continue stripped_line = line.strip('\n') nu...
0
0
0
0
0
1,002
0
0
23
d11bd872c3e7734f25fb0c80cda80c700c722180
2,943
py
Python
python_submitty_utils/tests/test_glob.py
muarachmann/Submitty
86cea3d3441419089b1a3058d01c663e6807294c
[ "BSD-3-Clause" ]
3
2020-07-27T16:23:09.000Z
2022-01-07T16:07:31.000Z
python_submitty_utils/tests/test_glob.py
muarachmann/Submitty
86cea3d3441419089b1a3058d01c663e6807294c
[ "BSD-3-Clause" ]
null
null
null
python_submitty_utils/tests/test_glob.py
muarachmann/Submitty
86cea3d3441419089b1a3058d01c663e6807294c
[ "BSD-3-Clause" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
37.730769
111
0.606184
from os import path, mkdir from pathlib import Path import shutil import tempfile import types import unittest from submitty_utils import glob class TestGlob(unittest.TestCase): def setUp(self): self.dir = tempfile.mkdtemp() Path(path.join(self.dir, 'a')).touch() Path(path.join(self.dir, ...
0
0
0
2,726
0
0
0
-5
156
8b730ac3e6e3192ba140431c976240bf6e0b617a
7,854
py
Python
training_ptr_gen/train.py
michaellin/cs224n-finalproj
a82e420f9ed3055ee0155133670ad82b4ca171d4
[ "Apache-2.0" ]
null
null
null
training_ptr_gen/train.py
michaellin/cs224n-finalproj
a82e420f9ed3055ee0155133670ad82b4ca171d4
[ "Apache-2.0" ]
null
null
null
training_ptr_gen/train.py
michaellin/cs224n-finalproj
a82e420f9ed3055ee0155133670ad82b4ca171d4
[ "Apache-2.0" ]
null
null
null
from __future__ import unicode_literals, print_function, division import argparse import torch from data_util import config use_cuda = config.use_gpu and torch.cuda.is_available() if __name__ == '__main__': parser = argparse.ArgumentParser(description="Train script") parser.add_argument("-m", ...
42.918033
114
0.615355
from __future__ import unicode_literals, print_function, division import math import os import time import argparse import tensorflow as tf import torch from model import Model from torch.nn.utils import clip_grad_norm_ from torch.optim import Adagrad from torch.autograd import Variable from data_util import config...
0
0
0
6,798
0
0
0
117
290
9f2c8f00943e0bcce75113f16bdcf14f865572af
2,398
py
Python
alembic/versions/49b367d3d25f_remove_siway_add_golab.py
morelab/labmanager
b44f97f26f224e4a94c7981e5cc84f3b5c8cc440
[ "BSD-2-Clause" ]
2
2015-11-05T01:43:19.000Z
2017-10-19T15:28:53.000Z
alembic/versions/49b367d3d25f_remove_siway_add_golab.py
morelab/labmanager
b44f97f26f224e4a94c7981e5cc84f3b5c8cc440
[ "BSD-2-Clause" ]
3
2021-03-22T17:12:12.000Z
2021-12-13T19:39:20.000Z
alembic/versions/49b367d3d25f_remove_siway_add_golab.py
morelab/labmanager
b44f97f26f224e4a94c7981e5cc84f3b5c8cc440
[ "BSD-2-Clause" ]
6
2016-03-08T09:32:16.000Z
2022-01-06T09:53:37.000Z
"""Remove SiWay, add GoLab Revision ID: 49b367d3d25f Revises: 13f9fd64f85b Create Date: 2017-04-07 01:07:29.653200 """ # revision identifiers, used by Alembic. revision = '49b367d3d25f' down_revision = '13f9fd64f85b'
42.070175
131
0.725188
"""Remove SiWay, add GoLab Revision ID: 49b367d3d25f Revises: 13f9fd64f85b Create Date: 2017-04-07 01:07:29.653200 """ # revision identifiers, used by Alembic. revision = '49b367d3d25f' down_revision = '13f9fd64f85b' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import mysql def upgrade()...
0
0
0
0
0
2,045
0
19
113
b4364657ba1f9bb78cceec1053292ab0219939f9
1,361
py
Python
sd2wiki/techs.py
ajul/stardrive2wikiscripts
df329b6e80a3c50a36fd4fdb48f286a24e4c802e
[ "MIT" ]
null
null
null
sd2wiki/techs.py
ajul/stardrive2wikiscripts
df329b6e80a3c50a36fd4fdb48f286a24e4c802e
[ "MIT" ]
null
null
null
sd2wiki/techs.py
ajul/stardrive2wikiscripts
df329b6e80a3c50a36fd4fdb48f286a24e4c802e
[ "MIT" ]
null
null
null
from sd2wiki.buildings import buildings import csv, os techs = {} techFile = open(os.path.join(basedir, 'Techs', 'TechTree.txt')) for building in buildings.values(): building.tech = None for line in csv.reader(techFile, csv.excel_tab): uid = line[0].strip() if uid == '': continue techs[uid] = Tech(*...
29.586957
92
0.619398
from sd2wiki.config import * from sd2wiki.core import * from sd2wiki.loc import getLoc from sd2wiki.buildings import buildings import csv, re, os techs = {} class TechOption(): def __init__(self, type, uid, tech): self.uid = uid self.tech = tech self.name = getLoc(type, uid, 'name') ...
0
0
0
875
0
0
0
25
112
7efc83e707e9042dd9fa839614829d16aaf3dec5
1,617
py
Python
dodger.py
Elephant34/dodger
a7dcf19a2a4e9eca6731e2d1a5e9a16d0047e851
[ "MIT" ]
null
null
null
dodger.py
Elephant34/dodger
a7dcf19a2a4e9eca6731e2d1a5e9a16d0047e851
[ "MIT" ]
null
null
null
dodger.py
Elephant34/dodger
a7dcf19a2a4e9eca6731e2d1a5e9a16d0047e851
[ "MIT" ]
null
null
null
''' A game- player dodge the falling blocks ''' import random import math import pyglet from pyglet.window import key from assets.entities import player, timer, block def update(dt): ''' Updates all the entities so they can move ''' # Based off decay function- probability increases over time # Star...
23.1
63
0.633271
''' A game- player dodge the falling blocks ''' import random import math import pyglet from pyglet.window import key from assets.entities import player, timer, block class Window(pyglet.window.Window): ''' The window class with custom draw function ''' def __init__(self, width, height, **kawgs): ...
0
0
0
416
0
0
0
0
23
78bb26e8d89a54b5c030d69bdf6a09b1037e4697
609
py
Python
python/advanced/modules-packages-methods/3.built-in-modules.py
arkhoss/scripting
6e780b93f94d7a39c44c88787e783e20ee89fab9
[ "MIT" ]
null
null
null
python/advanced/modules-packages-methods/3.built-in-modules.py
arkhoss/scripting
6e780b93f94d7a39c44c88787e783e20ee89fab9
[ "MIT" ]
null
null
null
python/advanced/modules-packages-methods/3.built-in-modules.py
arkhoss/scripting
6e780b93f94d7a39c44c88787e783e20ee89fab9
[ "MIT" ]
null
null
null
#!/usr/bin/python3 #Usage: lambda.py #Author: David Caballero <d@dcaballero.net> #Version: 1.0 import copy my_dictionary = {'Key':'Value', ('K','E','Y'):5} my_dictionary1 = copy.deepcopy(my_dictionary) my_dictionary[1] = 1 print(my_dictionary) print(my_dictionary1) import math as m print( m.cos(m.pi)) print( m....
12.957447
48
0.689655
#!/usr/bin/python3 #Usage: lambda.py #Author: David Caballero <d@dcaballero.net> #Version: 1.0 import copy my_dictionary = {'Key':'Value', ('K','E','Y'):5} my_dictionary1 = copy.deepcopy(my_dictionary) my_dictionary[1] = 1 print(my_dictionary) print(my_dictionary1) import math as m print( m.cos(m.pi)) print( m....
0
0
0
0
0
0
0
0
0
94d435d6b288d87939172e8a4c1ad435ee658241
1,628
py
Python
matplotlib/gallery_python/axes_grid1/demo_colorbar_with_inset_locator.py
gottaegbert/penter
8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d
[ "MIT" ]
13
2020-01-04T07:37:38.000Z
2021-08-31T05:19:58.000Z
matplotlib/gallery_python/axes_grid1/demo_colorbar_with_inset_locator.py
gottaegbert/penter
8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d
[ "MIT" ]
3
2020-06-05T22:42:53.000Z
2020-08-24T07:18:54.000Z
matplotlib/gallery_python/axes_grid1/demo_colorbar_with_inset_locator.py
gottaegbert/penter
8cbb6be3c4bf67c7c69fa70e597bfbc3be4f0a2d
[ "MIT" ]
9
2020-10-19T04:53:06.000Z
2021-08-31T05:20:01.000Z
""" ============================================================== Controlling the position and size of colorbars with Inset Axes ============================================================== This example shows how to control the position, height, and width of colorbars using `~mpl_toolkits.axes_grid1.inset_locator.i...
35.391304
78
0.578624
""" ============================================================== Controlling the position and size of colorbars with Inset Axes ============================================================== This example shows how to control the position, height, and width of colorbars using `~mpl_toolkits.axes_grid1.inset_locator.i...
0
0
0
0
0
0
0
0
0
f423b12cc917b18b18a2be2f75f0089c5bbf447d
2,122
py
Python
maillogger/parser.py
Natureshadow/maillogger
b147e81411befd42a94f2252aae42def6d891732
[ "MIT" ]
2
2020-08-17T05:08:47.000Z
2020-12-16T19:47:15.000Z
maillogger/parser.py
Natureshadow/maillogger
b147e81411befd42a94f2252aae42def6d891732
[ "MIT" ]
null
null
null
maillogger/parser.py
Natureshadow/maillogger
b147e81411befd42a94f2252aae42def6d891732
[ "MIT" ]
1
2022-03-31T10:10:28.000Z
2022-03-31T10:10:28.000Z
import re from typing import Dict, Optional REGEX = r'(?P<month>[A-Z][a-z]{2}) (?P<day>[0-9]{,2}) ' \ + r'(?P<time>[0-9]{2}:[0-9]{2}:[0-9]{2}) mail postfix/[a-z]+\[[0-9]+\]: ' \ + r'(?P<mail_id>[A-Z0-9]+): to=<(?P<to_address>.*@.*)>, ' \ + r'relay=(?P<relay>.*), delay=(?P<delay>[0-9.]+), ' \ + r'delay...
27.205128
79
0.557493
import re from dataclasses import InitVar, asdict, dataclass, field from datetime import datetime from typing import Dict, Optional REGEX = r'(?P<month>[A-Z][a-z]{2}) (?P<day>[0-9]{,2}) ' \ + r'(?P<time>[0-9]{2}:[0-9]{2}:[0-9]{2}) mail postfix/[a-z]+\[[0-9]+\]: ' \ + r'(?P<mail_id>[A-Z0-9]+): to=<(?P<to_addre...
0
688
0
0
0
0
0
44
67
7cf375472392576f6008428cec7b6cbba41b78fe
1,060
py
Python
frontend/auth_providers/jlu.py
MetLee/hackergame
571b5407e0644169a2f9b3907a0a1d93138ba436
[ "MIT" ]
48
2018-09-30T11:07:52.000Z
2021-12-07T03:32:59.000Z
frontend/auth_providers/jlu.py
MetLee/hackergame
571b5407e0644169a2f9b3907a0a1d93138ba436
[ "MIT" ]
100
2018-10-13T18:37:25.000Z
2021-11-11T12:14:45.000Z
frontend/auth_providers/jlu.py
MetLee/hackergame
571b5407e0644169a2f9b3907a0a1d93138ba436
[ "MIT" ]
11
2018-10-08T14:59:33.000Z
2022-03-02T03:21:09.000Z
from django.urls import path urlpatterns = [ path('jlu/login/', LoginView.as_view()), path('jlu/get_code/', GetCodeView.as_view()), ]
25.238095
70
0.669811
from datetime import timedelta from django.core.mail import EmailMessage from django.shortcuts import redirect from django.urls import path from .base import BaseLoginView, BaseGetCodeView, DomainEmailValidator class LoginView(BaseLoginView): template_name = 'login_email.html' template_context = {'provider_...
57
0
0
665
0
0
0
94
136
f8f72419bea8be608ca055380f01026d347bca8f
5,104
py
Python
chromeperf/src/chromeperf/pinpoint/models/exploration.py
xswz8015/infra
f956b78ce4c39cc76acdda47601b86794ae0c1ba
[ "BSD-3-Clause" ]
null
null
null
chromeperf/src/chromeperf/pinpoint/models/exploration.py
xswz8015/infra
f956b78ce4c39cc76acdda47601b86794ae0c1ba
[ "BSD-3-Clause" ]
7
2022-02-15T01:11:37.000Z
2022-03-02T12:46:13.000Z
chromeperf/src/chromeperf/pinpoint/models/exploration.py
NDevTK/chromium-infra
d38e088e158d81f7f2065a38aa1ea1894f735ec4
[ "BSD-3-Clause" ]
null
null
null
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Change Exploration Module In this module we expose the Speculate function which generates a list of potential Change instances for exploration in the effo...
38.089552
80
0.675353
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Change Exploration Module In this module we expose the Speculate function which generates a list of potential Change instances for exploration in the effo...
0
0
0
0
0
1,588
0
0
50
113cc65652e6b0675b74d28efec8e5632845e4d4
1,255
py
Python
Chatbot.py
nirajp786/chatbot
e26ab7fb53e675ae23d6636735c48be3fb8c5174
[ "MIT" ]
null
null
null
Chatbot.py
nirajp786/chatbot
e26ab7fb53e675ae23d6636735c48be3fb8c5174
[ "MIT" ]
null
null
null
Chatbot.py
nirajp786/chatbot
e26ab7fb53e675ae23d6636735c48be3fb8c5174
[ "MIT" ]
null
null
null
# This program is by: Nidhi Patel # It uses: Python & Tkinter # It answers user's question using an api system. # This program is for the main background of the function root = Tk() root.title("Chatbot") root.geometry('400x400') # tells the user to enter the question theLabel = Label(root, text=" Enter your ques...
26.145833
92
0.675697
# This program is by: Nidhi Patel # It uses: Python & Tkinter # It answers user's question using an api system. from tkinter import * import wolframalpha def answer(): output.config(state=NORMAL) question = entry.get() entry.delete(0, END) print (question) output.insert(END, ("User's Question:...
0
0
0
0
0
404
0
-2
69
c74db7e7cedba74d55da00210fe82022f537abcb
3,108
py
Python
lib/netty/protobuf/python/google/protobuf/internal/proto_builder_test.py
meghana0507/grpc-java-poll
b35805a7265e5d6d9468ab17bc33b92ed00ecd97
[ "BSD-3-Clause" ]
1
2017-08-16T15:00:29.000Z
2017-08-16T15:00:29.000Z
lib/netty/protobuf/python/google/protobuf/internal/proto_builder_test.py
meghana0507/grpc-java-poll
b35805a7265e5d6d9468ab17bc33b92ed00ecd97
[ "BSD-3-Clause" ]
null
null
null
lib/netty/protobuf/python/google/protobuf/internal/proto_builder_test.py
meghana0507/grpc-java-poll
b35805a7265e5d6d9468ab17bc33b92ed00ecd97
[ "BSD-3-Clause" ]
null
null
null
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
39.846154
72
0.754826
#! /usr/bin/python # # Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # https://developers.google.com/protocol-buffers/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
0
0
0
1,130
0
0
0
81
112
4c6d1afb698d25a1b01a3e5382c71317362b9025
2,563
py
Python
home/templatetags/gentlecoffee_tags.py
taedori81/gentlecoffee
62de8ff17c934afdfde188ecc6b9dbfb400d0682
[ "BSD-3-Clause" ]
null
null
null
home/templatetags/gentlecoffee_tags.py
taedori81/gentlecoffee
62de8ff17c934afdfde188ecc6b9dbfb400d0682
[ "BSD-3-Clause" ]
null
null
null
home/templatetags/gentlecoffee_tags.py
taedori81/gentlecoffee
62de8ff17c934afdfde188ecc6b9dbfb400d0682
[ "BSD-3-Clause" ]
null
null
null
from django import template register = template.Library()
26.978947
96
0.657433
from django import template from ..models import Area register = template.Library() @register.assignment_tag(takes_context=True) def get_site_root(context): return context['request'].site.root_page @register.inclusion_tag("home/navbar/navbar.html", takes_context=True) def display_navbar(context): parent = ...
0
2,310
0
0
0
0
0
4
183
6ba8bf8ca0064bf23aef3ec53101017ab6a070f1
4,198
py
Python
patent/patent_crawber.py
RogerJTX/kbpPipeline_ExpertSystem
53f998ccb04ec9e932363818e037c3c5b225f05b
[ "MIT" ]
3
2021-01-29T17:09:55.000Z
2021-07-12T11:37:29.000Z
patent/patent_crawber.py
RogerJTX/kbpPipeline_ExpertSystem
53f998ccb04ec9e932363818e037c3c5b225f05b
[ "MIT" ]
null
null
null
patent/patent_crawber.py
RogerJTX/kbpPipeline_ExpertSystem
53f998ccb04ec9e932363818e037c3c5b225f05b
[ "MIT" ]
1
2022-02-11T11:09:03.000Z
2022-02-11T11:09:03.000Z
#!/home/apollo/anaconda3/bin/python3 #-*- coding: utf-8 -*- #****************************************************************************** # Author : jtx # Last modified: 2020-04-13 15:34 # Filename : patent_crawber.py # Description : res_kb_patent #**********************************************************...
31.80303
126
0.610052
#!/home/apollo/anaconda3/bin/python3 #-*- coding: utf-8 -*- #****************************************************************************** # Author : jtx # Last modified: 2020-04-13 15:34 # Filename : patent_crawber.py # Description : res_kb_patent专利信息生成,目前是转移企业相关的专利信息,实际这一步是用爬虫替换 #*************************...
600
0
0
3,020
0
0
0
-6
244
2f547e94de102f660ba77d8f971a6178ac8f9a78
319
py
Python
1 - Beginner/1142.py
andrematte/uri-submissions
796e7fee56650d9e882880318d6e7734038be2dc
[ "MIT" ]
1
2020-09-09T12:48:09.000Z
2020-09-09T12:48:09.000Z
1 - Beginner/1142.py
andrematte/uri-submissions
796e7fee56650d9e882880318d6e7734038be2dc
[ "MIT" ]
null
null
null
1 - Beginner/1142.py
andrematte/uri-submissions
796e7fee56650d9e882880318d6e7734038be2dc
[ "MIT" ]
null
null
null
# URI Online Judge 1142 X = int(input()) count = 1 for x in range(1,X+1): String = '' for i in range(4): if i == 0: String += "{}".format(count) elif i == 3: String += " PUM" else: String += " {}".format(count) count += 1 print(String)
17.722222
41
0.435737
# URI Online Judge 1142 X = int(input()) count = 1 for x in range(1,X+1): String = '' for i in range(4): if i == 0: String += "{}".format(count) elif i == 3: String += " PUM" else: String += " {}".format(count) count += 1 print(String)
0
0
0
0
0
0
0
0
0
5fc8be04bd155c30474bbde4186211cf949d9697
1,533
py
Python
application/user.py
RB387/GorbInDocks
e7a76eeae5e2bb781f5465fcbb67ed99dba7bafe
[ "Unlicense" ]
null
null
null
application/user.py
RB387/GorbInDocks
e7a76eeae5e2bb781f5465fcbb67ed99dba7bafe
[ "Unlicense" ]
1
2019-10-29T17:24:53.000Z
2019-10-29T17:25:52.000Z
application/user.py
RB387/GorbInDocks
e7a76eeae5e2bb781f5465fcbb67ed99dba7bafe
[ "Unlicense" ]
1
2019-10-19T12:33:01.000Z
2019-10-19T12:33:01.000Z
from flask import Blueprint page = Blueprint('user', __name__, template_folder='templates')
36.5
90
0.714286
from application import app from application import decorators from flask import request, session, redirect, url_for, Blueprint, render_template from run import gt import gorbin_tools2 page = Blueprint('user', __name__, template_folder='templates') @page.route('/user', methods = ['GET', 'POST'...
0
1,236
0
0
0
0
0
69
112
8b080e47687254e9dc5696d54053f9d2b09bcdd2
3,708
py
Python
getconfig.py
sondercoder/hass-gelight
0002a582b9cf5d2d973f07cb46cefae392bafb54
[ "MIT" ]
25
2020-11-07T03:42:07.000Z
2022-03-04T19:52:00.000Z
getconfig.py
sondercoder/hass-gelight
0002a582b9cf5d2d973f07cb46cefae392bafb54
[ "MIT" ]
6
2020-11-25T18:49:03.000Z
2022-02-15T05:57:02.000Z
getconfig.py
sondercoder/hass-gelight
0002a582b9cf5d2d973f07cb46cefae392bafb54
[ "MIT" ]
16
2020-11-07T03:43:33.000Z
2022-03-04T20:13:26.000Z
#!/usr/bin/env python3 # Adoptd from https://github.com/google/python-laurel/blob/master/laurel/__init__.py # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
43.116279
143
0.670712
#!/usr/bin/env python3 # Adoptd from https://github.com/google/python-laurel/blob/master/laurel/__init__.py # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
0
0
0
0
0
83
0
-18
67
7fa35ddcfbead9c6b14953320793dda89e4a14cf
436
py
Python
my_back_solve.py
Michaellianeris/NSODE-Algorithms
40788cc7b4fc889a2b0dfe72e88b0e417cafa001
[ "MIT" ]
null
null
null
my_back_solve.py
Michaellianeris/NSODE-Algorithms
40788cc7b4fc889a2b0dfe72e88b0e417cafa001
[ "MIT" ]
null
null
null
my_back_solve.py
Michaellianeris/NSODE-Algorithms
40788cc7b4fc889a2b0dfe72e88b0e417cafa001
[ "MIT" ]
null
null
null
import numpy as np A=np.array([[10,2,1],[0,4,2],[1,2,2]]) b=np.array([3,2,1]) x=my_back_solve(A,b) print('x=',x) print('A x=', np.dot(A,x))
16.769231
42
0.431193
import numpy as np A=np.array([[10,2,1],[0,4,2],[1,2,2]]) b=np.array([3,2,1]) def my_back_solve(A,b) : n=len(A) x=np.zeros(n) x[n-1] = b[n-1] / A[n-1, n-1] for k in range(n-2, -1, -1): sums = b[k] for j in range(k+1, n): sums = sums - (A[k,j] * x[j]) ...
0
0
0
0
0
246
0
0
25
f17ea5bcdcc9ea331cdec247e73b977e21c475b6
10,180
py
Python
src/extract4tcn.py
knmac/LCDC_release
f977ca1cda972983cac7e33b324f07f2e1463a19
[ "MIT" ]
24
2019-09-18T09:22:08.000Z
2022-03-08T06:47:33.000Z
src/extract4tcn.py
knmac/LCDC_release
f977ca1cda972983cac7e33b324f07f2e1463a19
[ "MIT" ]
6
2019-09-18T09:21:02.000Z
2022-02-09T23:31:48.000Z
src/extract4tcn.py
knmac/LCDC_release
f977ca1cda972983cac7e33b324f07f2e1463a19
[ "MIT" ]
4
2020-08-06T02:05:36.000Z
2021-12-12T07:19:17.000Z
"""Extract features and save as .mat files for ED-TCN. Only used for spatial-temporal or appearance stream (in the case of 2 stream). Do NOT use for motion stream. """ from __future__ import absolute_import from __future__ import print_function from __future__ import division import os import sys sys.path.insert( ...
37.153285
92
0.596267
"""Extract features and save as .mat files for ED-TCN. Only used for spatial-temporal or appearance stream (in the case of 2 stream). Do NOT use for motion stream. """ from __future__ import absolute_import from __future__ import print_function from __future__ import division import os import sys sys.path.insert( ...
0
0
0
0
0
123
0
0
35