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
dbc4c3310857e85d9121fdbadd2b16c4be0bc6f2
5,045
py
Python
django_op/oidc_op/users.py
peppelinux/oidc-op
c0385b5cbdb48fe2f74a556174d26444a48e6bed
[ "Apache-2.0" ]
1
2020-09-30T13:07:48.000Z
2020-09-30T13:07:48.000Z
django_op/oidc_op/users.py
peppelinux/oidc-op
c0385b5cbdb48fe2f74a556174d26444a48e6bed
[ "Apache-2.0" ]
null
null
null
django_op/oidc_op/users.py
peppelinux/oidc-op
c0385b5cbdb48fe2f74a556174d26444a48e6bed
[ "Apache-2.0" ]
null
null
null
from django.contrib.auth import get_user_model
34.319728
96
0.595639
import copy from django.contrib.auth import authenticate, get_user_model from django.contrib.auth import get_user_model from django.template.loader import render_to_string from oidcendpoint.util import instantiate from oidcendpoint.user_authn.user import (create_signed_jwt, v...
0
0
0
4,602
0
0
0
214
179
b88cd470cbd6ea92ae15dc576cddd38972675cdd
2,608
py
Python
foxylib/tools/native/typing/typing_tool.py
foxytrixy-com/foxylib
94b8c5b9f8b12423393c68f7d9f910258840ed18
[ "BSD-3-Clause" ]
null
null
null
foxylib/tools/native/typing/typing_tool.py
foxytrixy-com/foxylib
94b8c5b9f8b12423393c68f7d9f910258840ed18
[ "BSD-3-Clause" ]
3
2019-12-12T05:17:44.000Z
2022-03-11T23:40:50.000Z
foxylib/tools/native/typing/typing_tool.py
foxytrixy-com/foxylib
94b8c5b9f8b12423393c68f7d9f910258840ed18
[ "BSD-3-Clause" ]
2
2019-10-16T17:39:34.000Z
2020-02-10T06:32:08.000Z
from typing import TypeVar T = TypeVar("T")
24.603774
74
0.609663
from collections import Hashable from typing import Union, Any, TypeVar, Optional, Tuple, List from foxylib.tools.native.typing._typing_tool_helper import is_instance, \ is_subtype, is_generic T = TypeVar("T") class TypingTool: class NotAnnotationError(Exception): pass @classmethod def pair...
0
2,127
0
239
0
0
0
126
68
4e3ee5226a352745afd75a2808d1f691fc9cc9b1
2,512
py
Python
MoleculeMOTScripts/optimas/motmaster_wrapper.py
ColdMatter/EDMSuite
80a8bc0f3fd9d33a081f606707140de51512b28a
[ "MIT" ]
6
2017-02-02T17:54:23.000Z
2021-07-03T12:41:36.000Z
MoleculeMOTScripts/optimas/motmaster_wrapper.py
ColdMatter/EDMSuite
80a8bc0f3fd9d33a081f606707140de51512b28a
[ "MIT" ]
null
null
null
MoleculeMOTScripts/optimas/motmaster_wrapper.py
ColdMatter/EDMSuite
80a8bc0f3fd9d33a081f606707140de51512b28a
[ "MIT" ]
11
2015-03-19T18:23:38.000Z
2021-02-18T11:05:51.000Z
from __future__ import print_function import clr import sys from System.IO import Path import time sys.path.append(Path.GetFullPath("C:\\ControlPrograms\\EDMSuite\\MOTMaster\\bin\\CaF\\")) clr.AddReference("C:\\ControlPrograms\\EDMSuite\\MOTMaster\\bin\\CaF\\MOTMaster.exe") sys.path.append(Path.GetFullPath("C:\\Cont...
36.941176
130
0.789013
from __future__ import print_function import clr import sys from System.IO import Path import time sys.path.append(Path.GetFullPath("C:\\ControlPrograms\\EDMSuite\\MOTMaster\\bin\\CaF\\")) clr.AddReference("C:\\ControlPrograms\\EDMSuite\\MOTMaster\\bin\\CaF\\MOTMaster.exe") sys.path.append(Path.GetFullPath("C:\\Cont...
0
0
0
0
0
694
0
87
354
978386cf7120391264f4a613312715b934b28b6f
1,383
py
Python
pyverilog/utils/op2mark.py
stdavids/Pyverilog
a201b86e1d1b237d205dce897dc823725abcd79b
[ "Apache-2.0" ]
4
2019-09-26T18:59:43.000Z
2021-12-07T01:25:09.000Z
pyverilog/utils/op2mark.py
stdavids/Pyverilog
a201b86e1d1b237d205dce897dc823725abcd79b
[ "Apache-2.0" ]
1
2022-01-30T12:30:01.000Z
2022-01-30T12:30:01.000Z
pyverilog/utils/op2mark.py
stdavids/Pyverilog
a201b86e1d1b237d205dce897dc823725abcd79b
[ "Apache-2.0" ]
2
2020-06-18T02:23:14.000Z
2022-01-30T10:04:46.000Z
#------------------------------------------------------------------------------- # op2mark.py # # converting an operator to its mark # # Copyright (C) 2013, Shinya Takamaeda-Yamazaki # License: Apache 2.0 #------------------------------------------------------------------------------- operator_mark = { 'Uminus':'...
30.065217
80
0.415763
#------------------------------------------------------------------------------- # op2mark.py # # converting an operator to its mark # # Copyright (C) 2013, Shinya Takamaeda-Yamazaki # License: Apache 2.0 #------------------------------------------------------------------------------- operator_mark = { 'Uminus':'...
0
0
0
0
0
155
0
0
46
0e81cd9725bccb7cfae13d7c944aa28d1ae47af7
727
py
Python
script/dataset-txt-to-binary.py
rvs314/Montage
d4c49e66addefe947c03ff2bd0c463ebd2c34436
[ "MIT" ]
9
2020-10-04T22:03:31.000Z
2021-10-08T01:52:57.000Z
script/dataset-txt-to-binary.py
rvs314/Montage
d4c49e66addefe947c03ff2bd0c463ebd2c34436
[ "MIT" ]
18
2020-10-20T02:39:12.000Z
2021-08-30T00:23:32.000Z
script/dataset-txt-to-binary.py
rvs314/Montage
d4c49e66addefe947c03ff2bd0c463ebd2c34436
[ "MIT" ]
9
2020-10-04T22:06:11.000Z
2021-02-19T17:23:17.000Z
#!/bin/python import os import re import multiprocessing pool = multiprocessing.Pool(multiprocessing.cpu_count()) for f in os.listdir('graph_data/'): tmp = re.findall("orkut-edge-list_[0-9]+.txt", f) if len(tmp) != 0: pool.apply_async(work, (f,)) pool.close() pool.join()
26.925926
56
0.580468
#!/bin/python import sys import os import re import multiprocessing def work(f): output = 'graph_data/' + f[:-4] + '.bin' with open('graph_data/' + f) as i: inputLines = i.readlines() assert len(inputLines) > 0 with open(output, 'wb') as o: for line in inputLines: m = r...
0
0
0
0
0
403
0
-11
46
371254aa1ac49e4953c6a896823e19560b4024b9
3,900
py
Python
waste/cli.py
tim-littlefair/tl-waste
522110d049d77f0689feef66ad51894331521fce
[ "MIT" ]
null
null
null
waste/cli.py
tim-littlefair/tl-waste
522110d049d77f0689feef66ad51894331521fce
[ "MIT" ]
null
null
null
waste/cli.py
tim-littlefair/tl-waste
522110d049d77f0689feef66ad51894331521fce
[ "MIT" ]
null
null
null
# python3 # waste/cli.py # Copyright Tim Littlefair 2020- # This file is open source software under the MIT license. # For terms of this license, see the file LICENSE in the source # code distribution or visit # https://opensource.org/licenses/mit-license.php # This file defines the command line interface of the ...
33.333333
89
0.634103
# python3 # waste/cli.py # Copyright Tim Littlefair 2020- # This file is open source software under the MIT license. # For terms of this license, see the file LICENSE in the source # code distribution or visit # https://opensource.org/licenses/mit-license.php # This file defines the command line interface of the ...
0
0
0
1,790
0
0
0
-11
68
e7ef009d0fb5ad446ef872c0338222f7866a959e
758
py
Python
_gather_docs.py
gh640/shell-utils
2bb23a1a4238ca812b7080ded8f687beca3bff4e
[ "MIT" ]
null
null
null
_gather_docs.py
gh640/shell-utils
2bb23a1a4238ca812b7080ded8f687beca3bff4e
[ "MIT" ]
6
2018-07-02T13:40:46.000Z
2019-03-10T03:27:54.000Z
_gather_docs.py
gh640/shell-utils
2bb23a1a4238ca812b7080ded8f687beca3bff4e
[ "MIT" ]
null
null
null
'''Gathers the module docs in `.py`. ''' TARGET_SUFFIXES = ('.py',) EXCLUDED_PREFIX = '_' TEMPLATE_ITEM = '- `{}`: {}' if __name__ == '__main__': main()
20.486486
70
0.672823
'''Gathers the module docs in `.py`. ''' import importlib from pathlib import Path TARGET_SUFFIXES = ('.py',) EXCLUDED_PREFIX = '_' TEMPLATE_ITEM = '- `{}`: {}' def main(): print_module_doc(x for x in get_entries_in_script_dir(is_target)) def get_entries_in_script_dir(rule): path = Path(__file__).resolve(...
0
0
0
0
0
459
0
-2
137
33243a156837ff8e81b84b33b3fe60babe6f38c8
1,132
py
Python
seriouslylib/iterable.py
Mego/Seriously
07b256e4f35f5efec3b01434300f9ccc551b1c3e
[ "MIT" ]
104
2015-11-02T00:08:32.000Z
2022-02-17T23:17:14.000Z
seriouslylib/iterable.py
Mego/Seriously
07b256e4f35f5efec3b01434300f9ccc551b1c3e
[ "MIT" ]
68
2015-11-09T05:33:24.000Z
2020-04-10T06:46:54.000Z
seriouslylib/iterable.py
Mego/Seriously
07b256e4f35f5efec3b01434300f9ccc551b1c3e
[ "MIT" ]
25
2015-11-19T05:34:09.000Z
2021-07-20T13:54:03.000Z
#!/usr/bin/env python3
31.444444
78
0.603357
#!/usr/bin/env python3 from collections import deque as _deque from collections import Iterable from itertools import islice, zip_longest as izip def as_list(val, wrap=True): #strings are iterables all the way down, so an exception needs to be made # else we get infinite recursion, which is bad #...
0
0
0
445
94
360
0
57
153
54cdc86a431feab1e8839c566bd4ed3eb49fab86
513
py
Python
visualizeXY.py
Myunghee13/DSCI560_HW2
b951a10f3fa0ad5807e980c3f172f8f66d7d3796
[ "CC0-1.0" ]
null
null
null
visualizeXY.py
Myunghee13/DSCI560_HW2
b951a10f3fa0ad5807e980c3f172f8f66d7d3796
[ "CC0-1.0" ]
null
null
null
visualizeXY.py
Myunghee13/DSCI560_HW2
b951a10f3fa0ad5807e980c3f172f8f66d7d3796
[ "CC0-1.0" ]
null
null
null
# 1. c. Visualize the results from pathlib import Path import matplotlib.pyplot as plt output_folder = Path("output") # read intermediate results with open(output_folder / "xNumbers.txt",'r') as f: xNum = [int(ele.strip()) for ele in f.readlines()] with open(output_folder / "yNumbers.txt",'r') as f: yNum = ...
22.304348
54
0.695906
# 1. c. Visualize the results from pathlib import Path import matplotlib.pyplot as plt output_folder = Path("output") # read intermediate results with open(output_folder / "xNumbers.txt",'r') as f: xNum = [int(ele.strip()) for ele in f.readlines()] with open(output_folder / "yNumbers.txt",'r') as f: yNum = ...
0
0
0
0
0
0
0
0
0
8c47558185e3e4480a104cedaaf10616e8918a93
1,159
py
Python
env/Lib/site-packages/pylint/__init__.py
aammjian/cotton
f72b814f795f79a4054688e465c8b0ae5560f3b7
[ "Apache-2.0" ]
33
2020-10-05T01:04:55.000Z
2021-06-24T01:52:31.000Z
env/Lib/site-packages/pylint/__init__.py
aammjian/cotton
f72b814f795f79a4054688e465c8b0ae5560f3b7
[ "Apache-2.0" ]
14
2020-10-07T03:15:12.000Z
2021-01-15T11:53:29.000Z
env/Lib/site-packages/pylint/__init__.py
aammjian/cotton
f72b814f795f79a4054688e465c8b0ae5560f3b7
[ "Apache-2.0" ]
11
2020-07-31T08:20:43.000Z
2020-08-21T04:08:29.000Z
# Copyright (c) 2008, 2012 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2014, 2016-2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 Arun Persaud <arun@nubati.net> # Copyright (c) 2015 Ionel Cristian Maries <contact@ionelmc.ro> # Copyright (c) 2018 Nick Drozd <nicholasdrozd@gmail.com> ...
25.755556
80
0.719586
# Copyright (c) 2008, 2012 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2014, 2016-2020 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2014 Arun Persaud <arun@nubati.net> # Copyright (c) 2015 Ionel Cristian Maries <contact@ionelmc.ro> # Copyright (c) 2018 Nick Drozd <nicholasdrozd@gmail.com> ...
0
0
0
0
0
197
0
32
69
95a47d457bca06a93badfbde56f90233f91eb246
1,172
py
Python
scripts/tiffs_from_h5.py
glemaitre/hexrd
b68b1ba72e0f480d29bdaae2adbd6c6e2380cc7c
[ "BSD-3-Clause" ]
27
2020-02-18T12:15:08.000Z
2022-03-24T17:53:46.000Z
scripts/tiffs_from_h5.py
glemaitre/hexrd
b68b1ba72e0f480d29bdaae2adbd6c6e2380cc7c
[ "BSD-3-Clause" ]
259
2020-02-02T22:18:29.000Z
2022-03-30T19:59:58.000Z
scripts/tiffs_from_h5.py
glemaitre/hexrd
b68b1ba72e0f480d29bdaae2adbd6c6e2380cc7c
[ "BSD-3-Clause" ]
11
2020-02-18T12:14:44.000Z
2022-03-04T16:19:11.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jul 31 18:30:53 2019 @author: bernier2 """ import os import numpy as np from hexrd import imageseries from skimage import io # dirs working_dir = '/Users/Shared/APS/PUP_AFRL_Feb19' image_dir = os.path.join(working_dir, 'image_data') samp_name = '...
17.757576
66
0.66041
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Jul 31 18:30:53 2019 @author: bernier2 """ import os import numpy as np from hexrd import imageseries from skimage import io # dirs working_dir = '/Users/Shared/APS/PUP_AFRL_Feb19' image_dir = os.path.join(working_dir, 'image_data') samp_name = '...
0
0
0
0
0
0
0
0
0
785bac4558f57f6693632e4bc7ad5d2d9a110e05
45
py
Python
fHDHR/__init__.py
crackers8199/fHDHR_Locast
cad9cc0bf64f70bbcd2e702a938794d4eacad6cf
[ "WTFPL" ]
null
null
null
fHDHR/__init__.py
crackers8199/fHDHR_Locast
cad9cc0bf64f70bbcd2e702a938794d4eacad6cf
[ "WTFPL" ]
null
null
null
fHDHR/__init__.py
crackers8199/fHDHR_Locast
cad9cc0bf64f70bbcd2e702a938794d4eacad6cf
[ "WTFPL" ]
null
null
null
# coding=utf-8 fHDHR_VERSION = "v0.3.0-beta"
15
29
0.688889
# coding=utf-8 fHDHR_VERSION = "v0.3.0-beta"
0
0
0
0
0
0
0
0
0
5d52d54afc4948ea4b7febdfa8d2714599820780
2,781
py
Python
test/test_compare_license_template_script.py
anshuldutt21/spdx_python_licensematching
a409d7e1d024bc64d13c831989e61e0e3355eea1
[ "Apache-2.0" ]
1
2021-05-31T03:09:12.000Z
2021-05-31T03:09:12.000Z
test/test_compare_license_template_script.py
anshuldutt21/spdx_python_licensematching
a409d7e1d024bc64d13c831989e61e0e3355eea1
[ "Apache-2.0" ]
5
2020-09-17T14:41:48.000Z
2020-10-07T07:24:11.000Z
test/test_compare_license_template_script.py
anshuldutt21/spdx_python_licensematching
a409d7e1d024bc64d13c831989e61e0e3355eea1
[ "Apache-2.0" ]
null
null
null
import unittest import os from pathlib import Path from configuration.config import PACKAGE_PATH input_text = str(Path(PACKAGE_PATH + "\\test\\data\\OBSD.txt")) input_text = input_text.replace('\\',os.sep) input_text_mismatch = str(Path(PACKAGE_PATH + "\\test\\data\\OBSD3.txt")) input_text_mismatch = input_text_misma...
40.304348
106
0.701546
import unittest import os from pathlib import Path from normalize_license_text.normalize_class import NormalizeText from configuration.config import PACKAGE_PATH from compare_template_text.normalize_template_text import NormalizeTemplate from compare_template_text.compare_normalized_files import CompareNormalizedFiles...
0
0
0
2,001
0
0
0
157
90
379dd518a9f7ab68255775b31015a88d60d5cd9d
5,881
py
Python
voipms/entities/clientsget.py
4doom4/python-voipms
3159ccfaf1ed9f5fef431fa3d2fdd54b9d3b1b3c
[ "MIT" ]
14
2017-06-26T16:22:59.000Z
2022-03-10T13:22:49.000Z
voipms/entities/clientsget.py
judahpaul16/python-voipms
4e1eb51f927b9e0924091f7bbf25ccc2193c3bac
[ "MIT" ]
8
2018-02-15T18:25:48.000Z
2022-03-29T06:17:00.000Z
voipms/entities/clientsget.py
judahpaul16/python-voipms
4e1eb51f927b9e0924091f7bbf25ccc2193c3bac
[ "MIT" ]
8
2019-02-22T00:42:25.000Z
2022-02-14T19:50:41.000Z
# coding=utf-8 """ The Clients API endpoint get Documentation: https://voip.ms/m/apidocs.php """
33.99422
114
0.606019
# coding=utf-8 """ The Clients API endpoint get Documentation: https://voip.ms/m/apidocs.php """ from voipms.baseapi import BaseApi class ClientsGet(BaseApi): """ Get for the Clients endpoint. """ def __init__(self, *args, **kwargs): """ Initialize the endpoint """ sup...
0
0
0
5,724
0
0
0
13
45
13b429b81010ca853bf0a7c55e57c20f41b5c98f
1,540
py
Python
matrix_traversal/utils.py
SiberiaMan/Avitotech
0f17bedd157973ad3f5a3fa748a4892eb1a42204
[ "MIT" ]
null
null
null
matrix_traversal/utils.py
SiberiaMan/Avitotech
0f17bedd157973ad3f5a3fa748a4892eb1a42204
[ "MIT" ]
null
null
null
matrix_traversal/utils.py
SiberiaMan/Avitotech
0f17bedd157973ad3f5a3fa748a4892eb1a42204
[ "MIT" ]
null
null
null
import validators from typing import List from typing import Optional def check_url(url: str) -> Optional[bool]: """ This function checks is valid URL or not :param url: URL :return: True if is valid, else False """ if validators.url(url): return True return False def traverse_m...
29.056604
87
0.625974
import validators import aiohttp from typing import List from typing import Optional def check_url(url: str) -> Optional[bool]: """ This function checks is valid URL or not :param url: URL :return: True if is valid, else False """ if validators.url(url): return True return False ...
0
0
731
0
0
0
0
-7
45
342069d7d55981fcab3a1c5635c7a9b5c1fab879
5,886
py
Python
cats/v2/server/server.py
Cifrazia/cats-python
de75b8b5b6ab60d7e250cb4c041c1515aa749d79
[ "MIT" ]
2
2021-10-04T05:39:03.000Z
2021-10-07T06:44:19.000Z
cats/v2/server/server.py
Cifrazia/cats-python
de75b8b5b6ab60d7e250cb4c041c1515aa749d79
[ "MIT" ]
3
2021-10-07T07:07:48.000Z
2021-12-27T14:04:51.000Z
cats/v2/server/server.py
Cifrazia/cats-python
de75b8b5b6ab60d7e250cb4c041c1515aa749d79
[ "MIT" ]
2
2021-10-01T20:58:25.000Z
2021-10-04T05:40:35.000Z
from logging import getLogger __all__ = [ 'Server', ] logging = getLogger('CATS.Server')
31.142857
89
0.579001
import asyncio import socket import ssl from contextlib import asynccontextmanager from logging import getLogger from typing import Callable from tornado.iostream import IOStream from tornado.tcpserver import TCPServer from tornado.testing import bind_unused_port from cats.errors import CatsError from cats.utils impo...
0
3,175
225
1,833
0
0
0
223
334
66ee06f9edf175407996d4f1645346491097442e
3,900
py
Python
activity/prepare_data.py
gorgitko/MI-PDD_2016
6aabf0d588ee62814cd625526795cacd2810058a
[ "MIT" ]
null
null
null
activity/prepare_data.py
gorgitko/MI-PDD_2016
6aabf0d588ee62814cd625526795cacd2810058a
[ "MIT" ]
null
null
null
activity/prepare_data.py
gorgitko/MI-PDD_2016
6aabf0d588ee62814cd625526795cacd2810058a
[ "MIT" ]
null
null
null
import sys from pathlib import Path sys.path.append(str(Path('.').absolute().parent)) from helper_functions import encode_smiles, canonize_smiles import pandas as pd import numpy as np def save_active_compounds(input_file, output_file, encode=True, longest_smiles=0, smiles_charcodes_file="data/smiles_charcodes.npy",...
39.393939
159
0.698974
import sys from pathlib import Path sys.path.append(str(Path('.').absolute().parent)) from helper_functions import encode_smiles, save_smiles_charcodes, canonize_smiles import pandas as pd import numpy as np def save_active_compounds(input_file, output_file, encode=True, longest_smiles=0, smiles_charcodes_file="data...
0
0
0
0
0
0
0
23
0
154e90498cf56f92c3e1e5d17dc97bd08d50c31d
438
py
Python
src/apetest/version.py
boxingbeetle/apetest
c6dd7aaca014c64eec4bde7e755c4a3dec72404a
[ "BSD-3-Clause" ]
6
2019-04-01T09:42:31.000Z
2020-05-20T15:23:17.000Z
src/apetest/version.py
boxingbeetle/apetest
c6dd7aaca014c64eec4bde7e755c4a3dec72404a
[ "BSD-3-Clause" ]
31
2019-02-04T11:38:32.000Z
2022-03-03T02:51:15.000Z
src/apetest/version.py
boxingbeetle/apetest
c6dd7aaca014c64eec4bde7e755c4a3dec72404a
[ "BSD-3-Clause" ]
null
null
null
# SPDX-License-Identifier: BSD-3-Clause """Package version info.""" from typing import TYPE_CHECKING # On Python 3.8+, use importlib.metadata from the standard library. # On older versions, a compatibility package can be installed from PyPI. try: if not TYPE_CHECKING: import importlib.metadata as importl...
27.375
72
0.773973
# SPDX-License-Identifier: BSD-3-Clause """Package version info.""" from typing import TYPE_CHECKING # On Python 3.8+, use importlib.metadata from the standard library. # On older versions, a compatibility package can be installed from PyPI. try: if not TYPE_CHECKING: import importlib.metadata as importl...
0
0
0
0
0
0
0
0
0
c50e420a81401ab570df899e6cf676f21d07adb7
2,476
py
Python
data/dataset/wider_mafa_face.py
donnyyou/centerX
6e381cb669a6014d02e31a43915271237690531c
[ "Apache-2.0" ]
350
2020-12-01T09:55:16.000Z
2020-12-23T13:47:43.000Z
data/dataset/wider_mafa_face.py
powerlic/centerX
1073753533f26483c3ab053a7d8753708fcacde7
[ "Apache-2.0" ]
39
2020-12-24T13:42:29.000Z
2022-02-10T01:09:56.000Z
data/dataset/wider_mafa_face.py
powerlic/centerX
1073753533f26483c3ab053a7d8753708fcacde7
[ "Apache-2.0" ]
49
2020-12-01T11:39:14.000Z
2020-12-21T01:45:39.000Z
import os from detectron2.structures import BoxMode import xml.etree.ElementTree as ET from fvcore.common.file_io import PathManager __all__ = ["load_face_instances", "register_face"] # fmt: off CLASS_NAMES = ("face",) # fmt: on def load_face_instances(txt, annotation_dirname, image_root, class_names): """ ...
33.013333
112
0.620759
import os import json import cv2 from detectron2.data import DatasetCatalog, MetadataCatalog from detectron2.structures import BoxMode import pickle import xml.etree.ElementTree as ET from typing import List, Tuple, Union from fvcore.common.file_io import PathManager import logging __all__ = ["load_face_instances", "...
0
0
0
0
0
259
0
18
156
f52617a12608ce90e4e74a77b0a04560f750f451
1,365
py
Python
setup.py
kgaughan/uwhoisd
0b781e2eb6f6230ac5e64a79985b9d119e495164
[ "MIT" ]
32
2015-05-13T11:02:29.000Z
2021-12-24T08:17:16.000Z
setup.py
kgaughan/uwhoisd
0b781e2eb6f6230ac5e64a79985b9d119e495164
[ "MIT" ]
15
2015-11-25T18:58:08.000Z
2020-03-24T09:48:51.000Z
setup.py
kgaughan/uwhoisd
0b781e2eb6f6230ac5e64a79985b9d119e495164
[ "MIT" ]
3
2015-02-01T14:43:34.000Z
2018-08-27T10:10:23.000Z
#!/usr/bin/env python3 import os.path from setuptools import find_packages, setup def read(filename): """Read files relative to this file.""" full_path = os.path.join(os.path.dirname(__file__), filename) with open(full_path, "r") as fh: return fh.read() setup( name="uwhoisd", version="...
30.333333
65
0.625641
#!/usr/bin/env python3 import os.path from setuptools import find_packages, setup def read(filename): """Read files relative to this file.""" full_path = os.path.join(os.path.dirname(__file__), filename) with open(full_path, "r") as fh: return fh.read() setup( name="uwhoisd", version="...
0
0
0
0
0
0
0
0
0
202f6e0f854d82bdb8312b85ad45d6d42e389d12
1,115
py
Python
infra/controller.py
tukeJonny/NTPAmpMitigator
91abcfb107166b411596b26678a03a037165f188
[ "MIT" ]
1
2020-06-20T04:21:15.000Z
2020-06-20T04:21:15.000Z
infra/controller.py
tukeJonny/NTPAmpMitigator
91abcfb107166b411596b26678a03a037165f188
[ "MIT" ]
null
null
null
infra/controller.py
tukeJonny/NTPAmpMitigator
91abcfb107166b411596b26678a03a037165f188
[ "MIT" ]
null
null
null
#-*- coding: utf-8 -*- #from ryu.app import simple_switch_13 #import mitigate_switch_13#my custom simple_switch_13 MITIGATE_MODE_ON = False if MITIGATE_MODE_ON: import mitigate_switch_13 super_class = mitigate_switch_13.MitigateSwitch13 else: from ryu.app import simple_switch_13 super_class = simple_s...
30.972222
82
0.715695
#-*- coding: utf-8 -*- #from ryu.app import simple_switch_13 #import mitigate_switch_13#my custom simple_switch_13 from ryu.controller import ofp_event from ryu.controller.handler import ( MAIN_DISPATCHER, DEAD_DISPATCHER ) from ryu.controller.handler import set_ev_cls MITIGATE_MODE_ON = False if MITIGATE_MOD...
0
411
0
174
0
0
0
97
89
501edd92a20a95745c9193c57c47f62a89b7c69c
2,888
py
Python
module/pages/gas_info.py
medivhXu/AT-M
e1c215ae95085d1be24a7566fd365eb6bfae5e53
[ "Apache-2.0" ]
1
2019-06-05T08:53:47.000Z
2019-06-05T08:53:47.000Z
module/pages/gas_info.py
medivhXu/AT-M
e1c215ae95085d1be24a7566fd365eb6bfae5e53
[ "Apache-2.0" ]
null
null
null
module/pages/gas_info.py
medivhXu/AT-M
e1c215ae95085d1be24a7566fd365eb6bfae5e53
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # encoding: utf-8 """ @author: Medivh Xu @file: gas.py @time: 2020-03-30 15:29 """
29.469388
115
0.601108
#!/usr/bin/env python3 # encoding: utf-8 """ @author: Medivh Xu @file: gas.py @time: 2020-03-30 15:29 """ from base.element_manager import * class GasInfo(BasePage): """油站详情""" gun_name_btn = (By.ID, 'com.xxx.xxx:id/gunName') money_input_box = (By.ID, 'com.xxx.xxx:id/et_input_money') money_btn = (By....
267
1,800
0
833
0
0
0
13
46
bd3d12d49d8826b3181b830e13cb243a0218dffb
14,182
py
Python
main.py
ks-tec/Hydroponic
d9347f82698841d85c0a45908e8671b36c50ffce
[ "MIT" ]
1
2021-05-27T13:32:45.000Z
2021-05-27T13:32:45.000Z
main.py
ks-tec/Hydroponic
d9347f82698841d85c0a45908e8671b36c50ffce
[ "MIT" ]
null
null
null
main.py
ks-tec/Hydroponic
d9347f82698841d85c0a45908e8671b36c50ffce
[ "MIT" ]
null
null
null
# This is Hydroponic project in MicroPython with the ESP32 board. # Using devices are SSD1306 OLED, DS18B20, BME280, and Touch Pin. # # Copyright (c) 2020 ks-tec # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the "Software"), # to ...
34.506083
140
0.675152
# This is Hydroponic project in MicroPython with the ESP32 board. # Using devices are SSD1306 OLED, DS18B20, BME280, and Touch Pin. # # Copyright (c) 2020 ks-tec # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the "Software"), # to ...
0
0
0
0
0
0
0
0
0
f19d270dc48a4d8e462331fd511b2c2742b7e7b5
689
py
Python
stats_job/database_test.py
arxcruz/tripleo-stats-backend
c4cfb971bbc8e67825d357df2dc9214fda81f2fa
[ "Apache-2.0" ]
null
null
null
stats_job/database_test.py
arxcruz/tripleo-stats-backend
c4cfb971bbc8e67825d357df2dc9214fda81f2fa
[ "Apache-2.0" ]
null
null
null
stats_job/database_test.py
arxcruz/tripleo-stats-backend
c4cfb971bbc8e67825d357df2dc9214fda81f2fa
[ "Apache-2.0" ]
null
null
null
if __name__ == '__main__': show_data()
28.708333
107
0.692308
import datetime from sqlalchemy import Date, func, cast from sqlalchemy.orm import sessionmaker from database.model import engine from database.model import JobRun def show_data(): Session = sessionmaker(engine) session = Session() query = session.query(func.count().label('count'), JobRun.failure_type)....
0
0
0
0
0
456
0
54
134
30b3a8a367927c57abd32d63596d445e1516ee84
9,496
py
Python
qlknn/dataset/data_io.py
Karel-van-de-Plassche/QLKNN-develop
f2d29be625c2ddbddad6c1e98e5c03a43cf2797f
[ "MIT" ]
null
null
null
qlknn/dataset/data_io.py
Karel-van-de-Plassche/QLKNN-develop
f2d29be625c2ddbddad6c1e98e5c03a43cf2797f
[ "MIT" ]
null
null
null
qlknn/dataset/data_io.py
Karel-van-de-Plassche/QLKNN-develop
f2d29be625c2ddbddad6c1e98e5c03a43cf2797f
[ "MIT" ]
2
2018-02-28T14:18:43.000Z
2018-11-26T11:06:08.000Z
import warnings try: has_dask = True except ImportError: warnings.warn('Dask not found') has_dask = False try: profile except NameError: store_format = 'fixed' sep_prefix = '/output/'
40.931034
165
0.542544
import gc from collections import OrderedDict import warnings import re import pandas as pd import numpy as np from IPython import embed try: import dask.dataframe as dd has_dask = True except ImportError: warnings.warn('Dask not found') has_dask = False try: profile except NameError: from qlk...
0
7,190
0
0
0
1,635
0
123
345
d9329a55db13e5baab08945f156f37224d82a09e
9,688
py
Python
src/nn.py
mountain/planetarium
14c5a75f9ac0be36f28d059c7bf7a77635d617da
[ "MIT" ]
1
2018-03-03T18:58:01.000Z
2018-03-03T18:58:01.000Z
src/nn.py
mountain/planetarium
14c5a75f9ac0be36f28d059c7bf7a77635d617da
[ "MIT" ]
null
null
null
src/nn.py
mountain/planetarium
14c5a75f9ac0be36f28d059c7bf7a77635d617da
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import matplotlib matplotlib.use('Agg') import time import numpy as np import unit.au as au from os import environ xp = np if environ.get('CUDA_HOME') is not None: xp = np import torch as th import torch.nn as nn import torch.optim as optim from flare.learner import StandardLearner fro...
29.357576
130
0.54872
# -*- coding: utf-8 -*- import matplotlib matplotlib.use('Agg') import sys import time import numpy as np from physics import ode, hamilton, nbody import unit.au as au from os import environ xp = np if environ.get('CUDA_HOME') is not None: xp = np import torch as th import torch.nn as nn import torch.optim a...
0
334
0
1,870
1,815
3,001
0
241
343
49ad0529acc7b30e818083fbddf61cedb7ec9149
1,616
py
Python
test_question4.py
fmakawa/Practice
7f6eaa1dde4e46088ca5dcee76de1bb56a363238
[ "MIT" ]
null
null
null
test_question4.py
fmakawa/Practice
7f6eaa1dde4e46088ca5dcee76de1bb56a363238
[ "MIT" ]
null
null
null
test_question4.py
fmakawa/Practice
7f6eaa1dde4e46088ca5dcee76de1bb56a363238
[ "MIT" ]
null
null
null
""" Question 4 Level 1 Question: Write a program which accepts a sequence of comma-separated numbers from console and generate a list and a tuple which contains every number. Suppose the following input is supplied to the program: 34,67,55,33,12,98 Then, the output should be: ['34', '67', '55', '33', '12', '98'] ('34'...
36.727273
141
0.61448
""" Question 4 Level 1 Question: Write a program which accepts a sequence of comma-separated numbers from console and generate a list and a tuple which contains every number. Suppose the following input is supplied to the program: 34,67,55,33,12,98 Then, the output should be: ['34', '67', '55', '33', '12', '98'] ('34'...
0
779
0
13
0
0
0
40
151
938385e28f9b2ed19e39302cb8539a14a9ba38f9
225
py
Python
ex007.py
EduFelix/Exercicios-Python
4dc6a33653f8171684a8628f5629b137b4bfef94
[ "MIT" ]
null
null
null
ex007.py
EduFelix/Exercicios-Python
4dc6a33653f8171684a8628f5629b137b4bfef94
[ "MIT" ]
null
null
null
ex007.py
EduFelix/Exercicios-Python
4dc6a33653f8171684a8628f5629b137b4bfef94
[ "MIT" ]
null
null
null
n1 = float(input('Digite a primeira nota?')) n2 = float(input('Digite a segunda nota?')) media = (n1 + n2)/ 2 print("Primeira nota do aluno {}, \n Segunda nota do aluno {}\n Mdia das notas do aluno {}".format(n1, n2, media))
56.25
115
0.666667
n1 = float(input('Digite a primeira nota?')) n2 = float(input('Digite a segunda nota?')) media = (n1 + n2)/ 2 print("Primeira nota do aluno {}, \n Segunda nota do aluno {}\n Média das notas do aluno {}".format(n1, n2, media))
2
0
0
0
0
0
0
0
0
9d3e5450887e6602ff1d30172f1a8cc5caf85669
78
py
Python
main.py
BigSmokeCuba/BotTelegram
65636ff1ce1bee27575144b21ac9bdd3c69a2735
[ "MIT" ]
null
null
null
main.py
BigSmokeCuba/BotTelegram
65636ff1ce1bee27575144b21ac9bdd3c69a2735
[ "MIT" ]
null
null
null
main.py
BigSmokeCuba/BotTelegram
65636ff1ce1bee27575144b21ac9bdd3c69a2735
[ "MIT" ]
null
null
null
import bot.app from threading import Thread Thread(target=bot.app).start()
19.5
30
0.769231
import bot.app from threading import Thread Thread(target=bot.app).start()
0
0
0
0
0
0
0
0
0
5bb4f222e235e9d7070a669c4bfcfbbeadb8de75
1,406
py
Python
webapp/blaster/quickstart.py
128technology/blaster
ed4f94a8d068e7ee522e246f61ba3425a68041d2
[ "MIT" ]
null
null
null
webapp/blaster/quickstart.py
128technology/blaster
ed4f94a8d068e7ee522e246f61ba3425a68041d2
[ "MIT" ]
17
2020-09-16T09:32:32.000Z
2021-07-22T18:54:13.000Z
webapp/blaster/quickstart.py
128technology/blaster
ed4f94a8d068e7ee522e246f61ba3425a68041d2
[ "MIT" ]
null
null
null
from flask import (Blueprint) bp = Blueprint('quickstart', __name__, url_prefix='/quickstart')
33.47619
139
0.668563
import functools from flask import ( current_app, Blueprint, flash, Flask, g, redirect, render_template, request, session, url_for, jsonify ) import json from blaster.db import get_db from . import constants bp = Blueprint('quickstart', __name__, url_prefix='/quickstart') @bp.route('/<instance>') def instanti...
0
1,101
0
0
0
0
0
94
114
251449e248fb046c8e513ed9c8761edc71196595
306
py
Python
close-server.py
cyanobacterium/Minecraft-Automated-Forge-Server
587df4dc8100415a6b0d87d4f1c144c98a88098a
[ "MIT" ]
null
null
null
close-server.py
cyanobacterium/Minecraft-Automated-Forge-Server
587df4dc8100415a6b0d87d4f1c144c98a88098a
[ "MIT" ]
1
2016-09-17T13:04:55.000Z
2016-09-19T18:34:29.000Z
close-server.py
cyanobacterium/Minecraft-Automated-Forge-Server
587df4dc8100415a6b0d87d4f1c144c98a88098a
[ "MIT" ]
null
null
null
import os local_dir = os.path.dirname(os.path.realpath(__file__)) dir_name = get_filename(local_dir) command_file = local_dir+"/command-stack.txt" f_out = open(command_file, "w") f_out.write("stop\n") f_out.close()
19.125
56
0.673203
import os def get_filename(path): return path.replace("\\","/").split("/")[-1] local_dir = os.path.dirname(os.path.realpath(__file__)) dir_name = get_filename(local_dir) command_file = local_dir+"/command-stack.txt" f_out = open(command_file, "w") f_out.write("stop\n") f_out.close()
0
0
0
0
0
49
0
0
25
31e3fc4c3daa23bcf9ebfa1f70cac64480721f36
405
py
Python
app/django/photo/migrations/0004_rename_dimentions_descriptionimage_dimensions.py
Murabei-OpenSource-Codes/ai-photo-sampler--backend
c098a5cb544da89623a000d87daa18f22cfecfce
[ "BSD-3-Clause" ]
null
null
null
app/django/photo/migrations/0004_rename_dimentions_descriptionimage_dimensions.py
Murabei-OpenSource-Codes/ai-photo-sampler--backend
c098a5cb544da89623a000d87daa18f22cfecfce
[ "BSD-3-Clause" ]
null
null
null
app/django/photo/migrations/0004_rename_dimentions_descriptionimage_dimensions.py
Murabei-OpenSource-Codes/ai-photo-sampler--backend
c098a5cb544da89623a000d87daa18f22cfecfce
[ "BSD-3-Clause" ]
null
null
null
# Generated by Django 3.2.4 on 2022-04-12 02:21
21.315789
71
0.62716
# Generated by Django 3.2.4 on 2022-04-12 02:21 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('photo', '0003_rename_dimension_descriptionimage_dimentions'), ] operations = [ migrations.RenameField( model_name='descriptionimage', ...
0
0
0
299
0
0
0
11
46
50578585f1b1c3714387270db94790d2634d62a0
2,573
py
Python
db/createDB.py
DigasNikas/PyRecommender
fb056929bba45431a5fc98691332b9bf91e730bb
[ "MIT" ]
2
2017-05-27T15:06:04.000Z
2018-11-23T06:43:25.000Z
db/createDB.py
DigasNikas/PyRecommender
fb056929bba45431a5fc98691332b9bf91e730bb
[ "MIT" ]
null
null
null
db/createDB.py
DigasNikas/PyRecommender
fb056929bba45431a5fc98691332b9bf91e730bb
[ "MIT" ]
null
null
null
import psycopg2 import sys def create_tables(): """ create tables in the PostgreSQL database""" commands = ( """DROP TABLE main; """, """ CREATE TABLE main ( package VARCHAR NOT NULL, category VARCHAR NOT NULL, downloads BIGINT NOT NULL, ...
32.1625
107
0.551108
import psycopg2 import json import os import sys def read_jason(path): conn = None part_files = os.listdir(path) try: # read the connection parameters params = "dbname='app_data' user='postgres' host='localhost' password='postgres'" # connect to the PostgreSQL server conn = ...
0
0
0
0
0
1,385
0
-22
67
a380d47347ebec46f0b4459ad3d764d33d8e18ac
70,890
py
Python
gridsim/grid_sim_linear_program.py
mfastudillo/energysimulation
09c40bc52fd41e00be0fcafca40e2f5cb9e8ef8f
[ "Apache-2.0" ]
null
null
null
gridsim/grid_sim_linear_program.py
mfastudillo/energysimulation
09c40bc52fd41e00be0fcafca40e2f5cb9e8ef8f
[ "Apache-2.0" ]
null
null
null
gridsim/grid_sim_linear_program.py
mfastudillo/energysimulation
09c40bc52fd41e00be0fcafca40e2f5cb9e8ef8f
[ "Apache-2.0" ]
null
null
null
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
36.883455
88
0.645253
# Copyright 2017 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
0
0
0
66,986
0
0
0
11
459
d5ab3a7720db01daa3de43c7dfde773e221acba3
899
py
Python
tests/test_tfidf.py
eig-2017/dedupe
7f90bcbbf345534b8692df726e9ba2479856bba1
[ "MIT" ]
null
null
null
tests/test_tfidf.py
eig-2017/dedupe
7f90bcbbf345534b8692df726e9ba2479856bba1
[ "MIT" ]
null
null
null
tests/test_tfidf.py
eig-2017/dedupe
7f90bcbbf345534b8692df726e9ba2479856bba1
[ "MIT" ]
null
null
null
import unittest if __name__ == "__main__": unittest.main()
29
69
0.575083
import dedupe import unittest class ParsingTest(unittest.TestCase) : def setUp(self) : self.index = dedupe.tfidf.TfIdfIndex() def test_keywords(self) : self.index.index(('AND', 'OR', 'EOF', 'NOT')) self.index._index.initSearch() assert self.index.search(('AND', 'OR', 'E...
0
0
0
798
0
0
0
-8
45
c34d95a85f6568f6c9a18b0c92ccbd0ba5e083c9
2,788
py
Python
get_data.py
Jack07310/Project-2-Image-Classifier-Part-2
cafb78ca541faae45851281e87b99c2cdc493f04
[ "MIT" ]
null
null
null
get_data.py
Jack07310/Project-2-Image-Classifier-Part-2
cafb78ca541faae45851281e87b99c2cdc493f04
[ "MIT" ]
null
null
null
get_data.py
Jack07310/Project-2-Image-Classifier-Part-2
cafb78ca541faae45851281e87b99c2cdc493f04
[ "MIT" ]
null
null
null
#get_data.py #234567890123456789012345678901234567890123456789012345678901234567890123456789 # Imports here # The command line parser for train.py
40.405797
79
0.532999
#get_data.py #234567890123456789012345678901234567890123456789012345678901234567890123456789 # Imports here import torch from torchvision import datasets, transforms # The command line parser for train.py def get_dataloaders(data_dir): # Load the data train_dir = data_dir + '/train' valid_dir = data_dir + '/...
0
0
0
0
0
2,560
0
14
66
cceaa1dde18416d633f3357f1ad781584903faad
1,421
py
Python
Backend/migrations/alembic/versions/f8791d49d830_create_bed_capacity_table.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
15
2020-04-24T20:18:11.000Z
2022-01-31T21:05:05.000Z
Backend/migrations/alembic/versions/f8791d49d830_create_bed_capacity_table.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
2
2021-05-19T07:15:09.000Z
2022-03-07T08:29:34.000Z
Backend/migrations/alembic/versions/f8791d49d830_create_bed_capacity_table.py
dbvis-ukon/coronavis
f00374ac655c9d68541183d28ede6fe5536581dc
[ "Apache-2.0" ]
4
2020-04-27T16:20:13.000Z
2021-02-23T10:39:42.000Z
"""create bed_capacity table Revision ID: f8791d49d830 Revises: b84312f6532e Create Date: 2020-11-26 15:22:19.299937 """ # revision identifiers, used by Alembic. revision = 'f8791d49d830' down_revision = '4fcda072e8c6' branch_labels = None depends_on = None
28.42
82
0.635468
"""create bed_capacity table Revision ID: f8791d49d830 Revises: b84312f6532e Create Date: 2020-11-26 15:22:19.299937 """ from alembic import op # revision identifiers, used by Alembic. revision = 'f8791d49d830' down_revision = '4fcda072e8c6' branch_labels = None depends_on = None def upgrade(): op.get_bind().e...
0
0
0
0
0
1,089
0
1
68
cdb565b081ef8900b32c772239390e1a1c75c7d1
4,897
py
Python
openjij/sampler/response.py
Atsushi-Machida/OpenJij
e4bddebb13536eb26ff0b7b9fc6b1c75659fe934
[ "Apache-2.0" ]
null
null
null
openjij/sampler/response.py
Atsushi-Machida/OpenJij
e4bddebb13536eb26ff0b7b9fc6b1c75659fe934
[ "Apache-2.0" ]
null
null
null
openjij/sampler/response.py
Atsushi-Machida/OpenJij
e4bddebb13536eb26ff0b7b9fc6b1c75659fe934
[ "Apache-2.0" ]
null
null
null
# Copyright 2019 Jij Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, softwa...
32.430464
91
0.602001
# Copyright 2019 Jij Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in writing, softwa...
0
187
0
4,082
0
0
0
-10
68
559b08125c8dd5044f6a3227a31f3322c215c5f1
231
py
Python
Round #534 (Div 2)/B.py
julianferres/Codeforces
ac80292a4d53b8078fc1a85e91db353c489555d9
[ "MIT" ]
4
2020-01-31T15:49:25.000Z
2020-07-07T11:44:03.000Z
Round #534 (Div 2)/B.py
julianferres/CodeForces
14e8369e82a2403094183d6f7824201f681c9f65
[ "MIT" ]
null
null
null
Round #534 (Div 2)/B.py
julianferres/CodeForces
14e8369e82a2403094183d6f7824201f681c9f65
[ "MIT" ]
null
null
null
B()
12.833333
44
0.554113
def B(): s = input() stack = [] counter = 0 for x in s: if(not len(stack)): stack.append(x) elif(stack[-1]==x): stack.pop() counter+=1 else: stack.append(x) print("Yes") if(counter%2) else print("No") B()
0
0
0
0
0
205
0
0
22
6b14c5d2b9d6119d7b2f3a785b2ddfa6e6e4344f
1,799
py
Python
py_se_day03/py_fucntions.py
letscodedjango/py-se-bootcamp
302e2acb69f4aaefbb2fe6361083c9135b000394
[ "MIT" ]
null
null
null
py_se_day03/py_fucntions.py
letscodedjango/py-se-bootcamp
302e2acb69f4aaefbb2fe6361083c9135b000394
[ "MIT" ]
null
null
null
py_se_day03/py_fucntions.py
letscodedjango/py-se-bootcamp
302e2acb69f4aaefbb2fe6361083c9135b000394
[ "MIT" ]
1
2020-05-20T14:48:48.000Z
2020-05-20T14:48:48.000Z
# # add_numbers() # x = add_numbers_version_01(20,30) # print(x) # ? # not returning anything to you # add_numbers_version_01(50, 10) # add_numbers_version_01(300, 29) # add_numbers_version_01(20.78, 56.89) # # Average of two numbers # Add 2 nos and then divide the sum with nos. of value # no_one = 50 # n...
19.344086
96
0.712062
# def add_numbers(): no_one = 20 no_two = 30 result = no_one + no_two print(result) # add_numbers() def add_numbers_version_01(x, y): no_one = x no_two = y result = no_one + no_two #print("The value of result variable is " + str(result) ) ### ? return result # print(result) # x = add_numbers_version_01...
0
0
0
0
0
538
0
0
114
f4e25421a136d0f49225bf4f0ffc79ec0d8aff41
264
py
Python
GTFS2OMNS/test.py
luyuliu/playground
0e0382be27abf6714bda8ea1bc34249286ef53c1
[ "MIT" ]
null
null
null
GTFS2OMNS/test.py
luyuliu/playground
0e0382be27abf6714bda8ea1bc34249286ef53c1
[ "MIT" ]
null
null
null
GTFS2OMNS/test.py
luyuliu/playground
0e0382be27abf6714bda8ea1bc34249286ef53c1
[ "MIT" ]
null
null
null
# Note: # 1. Need dependency autoinstall # 2. GDAL import os os.environ['PATH'] import gtfs2gmns as gg gtfs_path = "H:\\ChromeDownload\\gtfscota" gmns_path = "H:\\ChromeDownload\\gtfscota\\output" node_transit,link_transit = gg.Convert_GTFS(gtfs_path,gmns_path)
22
64
0.761364
# Note: # 1. Need dependency autoinstall # 2. GDAL import os os.environ['PATH'] import gtfs2gmns as gg gtfs_path = "H:\\ChromeDownload\\gtfscota" gmns_path = "H:\\ChromeDownload\\gtfscota\\output" node_transit,link_transit = gg.Convert_GTFS(gtfs_path,gmns_path)
0
0
0
0
0
0
0
0
0
6399edf0c794754950ba2f79efc7d0c101bed496
9,518
py
Python
scipy/sparse/linalg/eigen/_svds.py
jcharlong/scipy
153467a9174b0c6f4b90ffeed5871e5018658108
[ "BSD-3-Clause" ]
1
2021-08-16T09:32:42.000Z
2021-08-16T09:32:42.000Z
scipy/sparse/linalg/eigen/_svds.py
jcharlong/scipy
153467a9174b0c6f4b90ffeed5871e5018658108
[ "BSD-3-Clause" ]
44
2019-06-27T15:56:14.000Z
2022-03-15T22:21:10.000Z
scipy/sparse/linalg/eigen/_svds.py
jcharlong/scipy
153467a9174b0c6f4b90ffeed5871e5018658108
[ "BSD-3-Clause" ]
4
2020-06-13T10:32:25.000Z
2021-12-03T15:48:16.000Z
import numpy as np from .arpack import _arpack # type: ignore[attr-defined] from . import eigsh from scipy.sparse.linalg.interface import LinearOperator from scipy.sparse import isspmatrix from scipy.sparse.sputils import is_pydata_spmatrix from scipy.sparse.linalg.eigen.lobpcg import lobpcg # type: ignore[no-redef...
34.737226
79
0.604854
import numpy as np from .arpack import _arpack # type: ignore[attr-defined] from . import eigsh from scipy.sparse.linalg.interface import LinearOperator from scipy.sparse import isspmatrix from scipy.sparse.sputils import is_pydata_spmatrix from scipy.sparse.linalg.eigen.lobpcg import lobpcg # type: ignore[no-redef...
0
0
0
0
0
924
0
0
123
99b6bd941f90c609486b360ca9e450f760cfa0d4
691
py
Python
monty/os/__init__.py
yanikou19/monty
822ae841f7d29bd7464287fd99b51da6e5960088
[ "MIT" ]
null
null
null
monty/os/__init__.py
yanikou19/monty
822ae841f7d29bd7464287fd99b51da6e5960088
[ "MIT" ]
null
null
null
monty/os/__init__.py
yanikou19/monty
822ae841f7d29bd7464287fd99b51da6e5960088
[ "MIT" ]
null
null
null
from __future__ import absolute_import __author__ = 'Shyue Ping Ong' __copyright__ = 'Copyright 2013, The Materials Project' __version__ = '0.1' __maintainer__ = 'Shyue Ping Ong' __email__ = 'ongsp@ucsd.edu' __date__ = '1/24/14'
20.939394
72
0.66136
from __future__ import absolute_import __author__ = 'Shyue Ping Ong' __copyright__ = 'Copyright 2013, The Materials Project' __version__ = '0.1' __maintainer__ = 'Shyue Ping Ong' __email__ = 'ongsp@ucsd.edu' __date__ = '1/24/14' import os from contextlib import contextmanager @contextmanager def cd(path): """ ...
0
388
0
0
0
0
0
4
69
0aa7b9480412288c537a477f9a614f1b0959bd31
5,683
py
Python
eval.py
khchow-gt/mnist_challenge
89e9e05b538e887de3e2e5ba45809b7b7505f5c1
[ "MIT" ]
null
null
null
eval.py
khchow-gt/mnist_challenge
89e9e05b538e887de3e2e5ba45809b7b7505f5c1
[ "MIT" ]
null
null
null
eval.py
khchow-gt/mnist_challenge
89e9e05b538e887de3e2e5ba45809b7b7505f5c1
[ "MIT" ]
null
null
null
""" Infinite evaluation loop going through the checkpoints in the model directory as they appear and evaluating them. Accuracy and average loss are printed and added as tensorboard summaries. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from ...
35.298137
79
0.600211
""" Infinite evaluation loop going through the checkpoints in the model directory as they appear and evaluating them. Accuracy and average loss are printed and added as tensorboard summaries. """ from __future__ import absolute_import from __future__ import division from __future__ import print_function from ...
0
0
0
0
0
2,393
0
-10
46
50f41c52255abfd0c6e8b9f4a85116ed07d020a3
887
py
Python
jp.atcoder/abc086/arc089_a/8309315.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-09T03:06:25.000Z
2022-02-09T03:06:25.000Z
jp.atcoder/abc086/arc089_a/8309315.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
1
2022-02-05T22:53:18.000Z
2022-02-09T01:29:30.000Z
jp.atcoder/abc086/arc089_a/8309315.py
kagemeka/atcoder-submissions
91d8ad37411ea2ec582b10ba41b1e3cae01d4d6e
[ "MIT" ]
null
null
null
# author: kagemeka # created: 2019-11-06 12:47:30(JST) # import collections # import math # import string # import bisect # import re # import itertools # import statistics if __name__ == "__main__": # execute only if run as a script main()
22.74359
74
0.445321
# author: kagemeka # created: 2019-11-06 12:47:30(JST) import sys # import collections # import math # import string # import bisect # import re # import itertools # import statistics def main(): n, *txy = (int(x) for x in sys.stdin.read().split()) ...
0
0
0
0
0
532
0
-11
48
9d8e89264f07302c0cb52316292081e4a527f1bb
7,218
py
Python
src/sima/workflow/plotnode.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/workflow/plotnode.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
src/sima/workflow/plotnode.py
SINTEF/simapy
650b8c2f15503dad98e2bfc0d0788509593822c7
[ "MIT" ]
null
null
null
# This an autogenerated file # # Generated with PlotNode from typing import Dict
25.595745
168
0.590053
# This an autogenerated file # # Generated with PlotNode from typing import Dict,Sequence,List from dmt.entity import Entity from dmt.blueprint import Blueprint from .blueprints.plotnode import PlotNodeBlueprint from typing import Dict from sima.post.controlsignalinputslot import ControlSignalInputSlot from sima.post....
0
3,729
0
2,865
0
0
0
277
265
6c83e241e2fd1082aae160c9ab4a297c935583b4
10,275
py
Python
src/photo/tests/test_utils.py
rjhelms/photo
fd9e3ff384554c5bc1e3b024d13ca40f50e049e5
[ "MIT" ]
null
null
null
src/photo/tests/test_utils.py
rjhelms/photo
fd9e3ff384554c5bc1e3b024d13ca40f50e049e5
[ "MIT" ]
null
null
null
src/photo/tests/test_utils.py
rjhelms/photo
fd9e3ff384554c5bc1e3b024d13ca40f50e049e5
[ "MIT" ]
null
null
null
# pylint: disable=invalid-name """ Tests for photo.utils """ # pylint: disable=too-few-public-methods
35.801394
78
0.631533
# pylint: disable=invalid-name """ Tests for photo.utils """ import uuid from django.test import TestCase from photo import utils # pylint: disable=too-few-public-methods class DummyInstance: """ Dummy instance object for passing into UploadToPathAndRename """ pk = None class UploadToPathAndRenameT...
0
0
0
10,032
0
0
0
3
136
e5b3c5630bb7e2c668fe7689326b01560779d8e5
2,970
py
Python
python_code/medium/430_Flatten_Multilevel_Doubly_Linked_List_medium/solution.py
timshenkao/interview_coding_exercises
c531fa5e0c09faef976539275589e957fcb88393
[ "Apache-2.0" ]
null
null
null
python_code/medium/430_Flatten_Multilevel_Doubly_Linked_List_medium/solution.py
timshenkao/interview_coding_exercises
c531fa5e0c09faef976539275589e957fcb88393
[ "Apache-2.0" ]
null
null
null
python_code/medium/430_Flatten_Multilevel_Doubly_Linked_List_medium/solution.py
timshenkao/interview_coding_exercises
c531fa5e0c09faef976539275589e957fcb88393
[ "Apache-2.0" ]
null
null
null
# Copyright (c) 2021 - present, Timur Shenkao # 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...
47.903226
120
0.678451
# Copyright (c) 2021 - present, Timur Shenkao # 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
0
0
1,221
0
0
0
48
69
53fa4a3dfcdf40efa45d965ce57530c2fb2653cb
5,266
py
Python
file_forensics.py
nshadov/file_forensics
ff87d84876daf12614185acc8b31ace2aa21fe0a
[ "MIT" ]
8
2017-06-09T21:18:52.000Z
2022-02-18T00:55:28.000Z
file_forensics.py
nshadov/file_forensics
ff87d84876daf12614185acc8b31ace2aa21fe0a
[ "MIT" ]
null
null
null
file_forensics.py
nshadov/file_forensics
ff87d84876daf12614185acc8b31ace2aa21fe0a
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Searches specified directory for miss named files.""" import os def main(): """Analyze directory from command line looking for suspicious files.""" ff = FileForensics() # ff.scan_dir("/Users/ns/notes") # FIXME ff.scan_dir("/Users/ns/work/termination_data") print "\n...
32.9125
79
0.507026
#!/usr/bin/env python """Searches specified directory for miss named files.""" import os class bcolors: """Color text in terminal.""" HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE =...
0
0
0
3,910
205
0
0
0
69
605b26d6d3532dde3890281f964748b6b7ca2774
4,620
py
Python
test_equipment/openSMILE_dir_to_csv.py
ChildMindInstitute/test_recording_equipment
ce062be5c278f4c32c72eadd90b68e4898e9f1fe
[ "Apache-2.0" ]
1
2018-07-20T23:45:22.000Z
2018-07-20T23:45:22.000Z
test_equipment/openSMILE_dir_to_csv.py
ChildMindInstitute/test-recording-equipment
ce062be5c278f4c32c72eadd90b68e4898e9f1fe
[ "Apache-2.0" ]
null
null
null
test_equipment/openSMILE_dir_to_csv.py
ChildMindInstitute/test-recording-equipment
ce062be5c278f4c32c72eadd90b68e4898e9f1fe
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ openSMILE_dir_to_csv.py Script to format openSMILE emobase *.csv output for a given set of files into a single csv. Also returns the data as a pandas dataframe. Created on Mon Jan 23 10:43:34 2017 Author: Jon Clucas, 2017 (jon.clucas@childmind.org) 2017, ...
34.222222
79
0.585714
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ openSMILE_dir_to_csv.py Script to format openSMILE emobase *.csv output for a given set of files into a single csv. Also returns the data as a pandas dataframe. Created on Mon Jan 23 10:43:34 2017 Author: – Jon Clucas, 2017 (jon.clucas@childmind.org) © 2017...
5
0
0
0
0
444
0
22
23
8973e35176c8a1a48a4120591aa32770860149cc
2,186
py
Python
examples/frameworks/catboost/catboost_example.py
thepycoder/clearml
717edba8c2b39fb7486bd2aba9ca0294f309b4c3
[ "Apache-2.0" ]
2,097
2019-06-11T14:36:25.000Z
2020-12-21T03:52:59.000Z
examples/frameworks/catboost/catboost_example.py
thepycoder/clearml
717edba8c2b39fb7486bd2aba9ca0294f309b4c3
[ "Apache-2.0" ]
247
2019-06-11T15:10:26.000Z
2020-12-21T17:34:32.000Z
examples/frameworks/catboost/catboost_example.py
thepycoder/clearml
717edba8c2b39fb7486bd2aba9ca0294f309b4c3
[ "Apache-2.0" ]
256
2019-06-11T14:36:28.000Z
2020-12-18T08:32:47.000Z
# ClearML - Example of CatBoost training, saving model and loading model # import argparse from clearml import Task if __name__ == "__main__": Task.init(project_name="examples", task_name="CatBoost simple example") parser = argparse.ArgumentParser() parser.add_argument("--iterations", default=200) a...
35.836066
100
0.741537
# ClearML - Example of CatBoost training, saving model and loading model # import argparse from catboost import CatBoostRegressor, Pool from catboost.datasets import msrank from clearml import Task import numpy as np from sklearn.model_selection import train_test_split def main(iterations): # Download train a...
0
0
0
0
0
1,634
0
66
114
1f3ee22025ccb85d0fe14837daa5f25f69472cd0
411
py
Python
src/product/signals.py
asanka94/OMS-backend
0b0637b40e71b9b71156d28fdc0ff1fb7a3d12ac
[ "MIT" ]
null
null
null
src/product/signals.py
asanka94/OMS-backend
0b0637b40e71b9b71156d28fdc0ff1fb7a3d12ac
[ "MIT" ]
9
2021-03-19T01:50:04.000Z
2022-03-12T00:23:18.000Z
src/product/signals.py
asanka94/OMS-backend
0b0637b40e71b9b71156d28fdc0ff1fb7a3d12ac
[ "MIT" ]
null
null
null
from django.template.defaultfilters import slugify def slug_generator(sender, instance, *args, **kwargs): ''' capitalize first letter of each word and generates slug ''' instance.name = instance.name.title() slug = slugify(instance.name) exists = sender.objects.filter(slug=slug).exists() if not exists...
27.4
66
0.688564
from django.template.defaultfilters import slugify def slug_generator(sender, instance, *args, **kwargs): ''' capitalize first letter of each word and generates slug ''' instance.name = instance.name.title() slug = slugify(instance.name) exists = sender.objects.filter(slug=slug).exists() if not exists...
0
0
0
0
0
0
0
0
0
5d777d6f520440d73be3b7e20022b539bde151fb
14,330
py
Python
tests/utils/html.py
boltnev/iktomi
bc92006c026f9b42e56f1af5ced2fe577673a486
[ "MIT" ]
14
2015-02-15T05:24:22.000Z
2020-03-19T10:07:28.000Z
tests/utils/html.py
boltnev/iktomi
bc92006c026f9b42e56f1af5ced2fe577673a486
[ "MIT" ]
10
2015-04-04T10:10:41.000Z
2016-06-01T13:17:58.000Z
tests/utils/html.py
boltnev/iktomi
bc92006c026f9b42e56f1af5ced2fe577673a486
[ "MIT" ]
5
2015-02-20T11:18:58.000Z
2016-10-18T15:30:13.000Z
# -*- coding: utf-8 -*-
42.776119
105
0.52589
# -*- coding: utf-8 -*- import unittest import os import re from iktomi.utils import html from lxml.html import Element from lxml import etree import lxml.html as h class TestSanitizer(unittest.TestCase): '''Tests for sanitizer based on lxml''' def setUp(self): self.attrs = { 'allow_tags':...
0
1,202
0
12,833
0
81
0
-13
200
38b2d2763ba8fad7eb60aaae1908527d08cc5568
1,216
py
Python
Algorithms/Strings/remove_vowels.py
Praggya17/HacktoberFestContribute
098cb1012f1f2ed6ca6b3544a7b962b6c49e2643
[ "MIT" ]
98
2018-10-09T15:42:41.000Z
2021-10-04T15:25:44.000Z
Algorithms/Strings/remove_vowels.py
Praggya17/HacktoberFestContribute
098cb1012f1f2ed6ca6b3544a7b962b6c49e2643
[ "MIT" ]
141
2018-10-06T16:55:20.000Z
2021-10-31T18:25:35.000Z
Algorithms/Strings/remove_vowels.py
Praggya17/HacktoberFestContribute
098cb1012f1f2ed6ca6b3544a7b962b6c49e2643
[ "MIT" ]
885
2018-10-06T17:14:44.000Z
2022-01-29T03:16:21.000Z
#!/usr/bin/env python # from any given string, remove all vowels # NON REGEX VERSION sample_string='Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Ne...
64
881
0.813322
#!/usr/bin/env python # from any given string, remove all vowels # NON REGEX VERSION sample_string='Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Ne...
0
0
0
0
0
0
0
0
0
16be4ccde99385c97c7b33aca56b05715bfed523
5,490
py
Python
src/sdgen/svg/cairosvg/parser.py
PP-TSD/sdgen
58a3a46f7f612c8d7774dd43a4ab55df4f33ab20
[ "MIT" ]
1
2015-02-18T17:59:05.000Z
2015-02-18T17:59:05.000Z
src/sdgen/svg/cairosvg/parser.py
PP-TSD/sdgen
58a3a46f7f612c8d7774dd43a4ab55df4f33ab20
[ "MIT" ]
null
null
null
src/sdgen/svg/cairosvg/parser.py
PP-TSD/sdgen
58a3a46f7f612c8d7774dd43a4ab55df4f33ab20
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # This file is part of CairoSVG # Copyright 2010-2012 Kozea # # This library is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option)...
32.485207
79
0.573953
# -*- coding: utf-8 -*- # This file is part of CairoSVG # Copyright © 2010-2012 Kozea # # This library is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option...
2
0
0
3,866
0
0
0
41
133
13406aa5f5d3a775426e7a74d7015441611738ac
8,888
py
Python
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/tests/npyufunc/test_caching.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
8
2019-10-07T16:33:47.000Z
2020-12-07T03:59:58.000Z
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/tests/npyufunc/test_caching.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
1
2018-04-03T22:37:40.000Z
2018-04-03T23:53:43.000Z
dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/numba/tests/npyufunc/test_caching.py
jeikabu/lumberyard
07228c605ce16cbf5aaa209a94a3cb9d6c1a4115
[ "AML" ]
5
2020-08-27T20:44:18.000Z
2021-08-21T22:54:11.000Z
from __future__ import print_function, absolute_import, division from numba import unittest_support as unittest if __name__ == '__main__': unittest.main()
37.344538
84
0.670117
from __future__ import print_function, absolute_import, division import sys import os.path import re from contextlib import contextmanager import subprocess import numpy as np from numba import unittest_support as unittest from numba import config from ..support import captured_stdout from ..test_dispatcher import ...
0
188
0
8,087
0
86
0
20
339
395d8eca7d1e0f912a781947a6d97be3bde8a106
35,045
py
Python
generator.py
s-fifteen-instruments/Digital_Pattern_Generator_DPG1
e8113154ba150a5d19e26171c9204cf22d55760d
[ "MIT" ]
null
null
null
generator.py
s-fifteen-instruments/Digital_Pattern_Generator_DPG1
e8113154ba150a5d19e26171c9204cf22d55760d
[ "MIT" ]
null
null
null
generator.py
s-fifteen-instruments/Digital_Pattern_Generator_DPG1
e8113154ba150a5d19e26171c9204cf22d55760d
[ "MIT" ]
null
null
null
""" this is an attempt to convert a readable patt format (similar to the ones compatible with arbitrarypatterngenerator) into the 4-word format that can be cat into pattern generator v2 it reads pattfile written in the following format and generate the corresponding dpatt: #triggered input_line use_table threshold_...
44.081761
349
0.706549
""" this is an attempt to convert a readable patt format (similar to the ones compatible with arbitrarypatterngenerator) into the 4-word format that can be cat into pattern generator v2 it reads pattfile written in the following format and generate the corresponding dpatt: #triggered input_line use_table threshold_...
0
0
0
0
0
30,471
0
0
310
8d68291ec8146ddef556012f26a8ece3f9f8aed0
237
py
Python
api/tasks.py
mkeller3/django_celery_redis
193e550644ef79b5f12d51aa8866c20f1a7a2a3a
[ "Apache-2.0" ]
null
null
null
api/tasks.py
mkeller3/django_celery_redis
193e550644ef79b5f12d51aa8866c20f1a7a2a3a
[ "Apache-2.0" ]
null
null
null
api/tasks.py
mkeller3/django_celery_redis
193e550644ef79b5f12d51aa8866c20f1a7a2a3a
[ "Apache-2.0" ]
null
null
null
# Create your tasks here from __future__ import absolute_import, unicode_literals
15.8
56
0.725738
# Create your tasks here from __future__ import absolute_import, unicode_literals from celery import shared_task import time @shared_task def add(x, y): time.sleep(30) return x + y @shared_task def mul(x, y): return x * y
0
65
0
0
0
0
0
-1
90
78d0c18558fc3459c334f45b248e8979c544b47b
6,927
py
Python
modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores.py
Aexyn/webrtc2
daea5bf2deb843567a792f22ea2047a037e09d78
[ "DOC", "BSD-3-Clause" ]
2
2018-01-16T13:29:45.000Z
2018-08-10T09:15:23.000Z
modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores.py
Aexyn/webrtc2
daea5bf2deb843567a792f22ea2047a037e09d78
[ "DOC", "BSD-3-Clause" ]
null
null
null
modules/audio_processing/test/py_quality_assessment/quality_assessment/eval_scores.py
Aexyn/webrtc2
daea5bf2deb843567a792f22ea2047a037e09d78
[ "DOC", "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project au...
28.273469
80
0.711708
# Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All contributing project au...
0
4,099
0
2,108
0
0
0
-18
247
fde991a1ade12f993fa6cd31e8d7a1c98760897e
407
py
Python
airloft/utils/icao.py
Allaye/airloft
deb6274b9eb1de2de79d0b152d67411d1f747afe
[ "FTL" ]
2
2022-03-06T10:34:12.000Z
2022-03-27T15:41:52.000Z
airloft/utils/icao.py
Allaye/airloft
deb6274b9eb1de2de79d0b152d67411d1f747afe
[ "FTL" ]
null
null
null
airloft/utils/icao.py
Allaye/airloft
deb6274b9eb1de2de79d0b152d67411d1f747afe
[ "FTL" ]
null
null
null
ICAO = { "Anaa": "NTGA", "Apalachicola Regional": "KAAF", "Malamala": "FAMD", "Al Ain International": "OMAL", "Atlantic City": "KACY", "Albany International": "KBAL", "Baise Youjiang": "ZGBS", "Albuquerque International Sunport": "KABQ", "RAF Abisko": "EAAK", "RAF Leuchars": "EGQ...
25.4375
48
0.592138
ICAO = { "Anaa": "NTGA", "Apalachicola Regional": "KAAF", "Malamala": "FAMD", "Al Ain International": "OMAL", "Atlantic City": "KACY", "Albany International": "KBAL", "Baise Youjiang": "ZGBS", "Albuquerque International Sunport": "KABQ", "RAF Abisko": "EAAK", "RAF Leuchars": "EGQ...
0
0
0
0
0
0
0
0
0
ac0348ba5b1b7a69a6c3f778f9a0b37ea7be7200
2,145
py
Python
rightarrow/lexer.py
wuzzeb/python-rightarrow
bc26059d272e4a903fa2a18db9ebb484e7f74aed
[ "Apache-2.0" ]
1
2020-04-30T22:24:41.000Z
2020-04-30T22:24:41.000Z
rightarrow/lexer.py
wuzzeb/python-rightarrow
bc26059d272e4a903fa2a18db9ebb484e7f74aed
[ "Apache-2.0" ]
null
null
null
rightarrow/lexer.py
wuzzeb/python-rightarrow
bc26059d272e4a903fa2a18db9ebb484e7f74aed
[ "Apache-2.0" ]
null
null
null
import sys import logging import ply.lex logger = logging.getLogger(__name__) if __name__ == '__main__': logging.basicConfig() lexer = Lexer(debug=True) for token in lexer.tokenize(sys.stdin.read()): print '%-20s%s' % (token.value, token.type)
28.223684
138
0.549184
import sys import logging import ply.lex logger = logging.getLogger(__name__) class Lexer(object): ''' A Lexical analyzer for Python Typelanguage. ''' def __init__(self, debug=False): self.debug = debug def tokenize(self, string): ''' Maps a string to an iterator ove...
0
0
0
1,855
0
0
0
0
23
f7ba2a9383bd30b230072da3c6b714a3283b8ada
287
py
Python
output/models/nist_data/list_pkg/normalized_string/schema_instance/nistschema_sv_iv_list_normalized_string_length_5_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
1
2021-08-14T17:59:21.000Z
2021-08-14T17:59:21.000Z
output/models/nist_data/list_pkg/normalized_string/schema_instance/nistschema_sv_iv_list_normalized_string_length_5_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
4
2020-02-12T21:30:44.000Z
2020-04-15T20:06:46.000Z
output/models/nist_data/list_pkg/normalized_string/schema_instance/nistschema_sv_iv_list_normalized_string_length_5_xsd/__init__.py
tefra/xsdata-w3c-tests
b6b6a4ac4e0ab610e4b50d868510a8b7105b1a5f
[ "MIT" ]
null
null
null
from output.models.nist_data.list_pkg.normalized_string.schema_instance.nistschema_sv_iv_list_normalized_string_length_5_xsd.nistschema_sv_iv_list_normalized_string_length_5 import NistschemaSvIvListNormalizedStringLength5 __all__ = [ "NistschemaSvIvListNormalizedStringLength5", ]
47.833333
222
0.905923
from output.models.nist_data.list_pkg.normalized_string.schema_instance.nistschema_sv_iv_list_normalized_string_length_5_xsd.nistschema_sv_iv_list_normalized_string_length_5 import NistschemaSvIvListNormalizedStringLength5 __all__ = [ "NistschemaSvIvListNormalizedStringLength5", ]
0
0
0
0
0
0
0
0
0
b4cb5cadefacca2ad51093281c7e045a146a2c6c
423
py
Python
paper/convert_matt.py
ACTCollaboration/tilec
11ed8d027ad6ffac09b3e291a047f33e97673f14
[ "BSD-3-Clause" ]
1
2021-01-04T14:51:44.000Z
2021-01-04T14:51:44.000Z
paper/convert_matt.py
ACTCollaboration/tilec
11ed8d027ad6ffac09b3e291a047f33e97673f14
[ "BSD-3-Clause" ]
4
2019-09-03T22:19:16.000Z
2020-07-13T12:38:08.000Z
paper/convert_matt.py
ACTCollaboration/tilec
11ed8d027ad6ffac09b3e291a047f33e97673f14
[ "BSD-3-Clause" ]
1
2020-08-10T14:51:11.000Z
2020-08-10T14:51:11.000Z
from __future__ import print_function from orphics import catalogs ifile = "paper/E-D56Clusters.fits" #catalogs.convert_hilton_catalog_to_enplot_annotate_file('public_clusters.csv',ifile,radius=15,width=3,color='red') catalogs.convert_hilton_catalog_to_enplot_annotate_file('paper/test_public_clusters.csv',ifile,radiu...
35.25
125
0.839243
from __future__ import print_function from orphics import maps,io,cosmology,catalogs from pixell import enmap import numpy as np import os,sys ifile = "paper/E-D56Clusters.fits" #catalogs.convert_hilton_catalog_to_enplot_annotate_file('public_clusters.csv',ifile,radius=15,width=3,color='red') catalogs.convert_hilton_...
0
0
0
0
0
0
0
10
66
3dbb54ea861a369163c812d4d62ac2373f9253b7
1,374
py
Python
oogli/utils.py
brianbruggeman/oogli
6a6f681468d609035924ede27d895afcc9d432b6
[ "Apache-2.0" ]
3
2016-01-18T22:10:51.000Z
2016-06-10T16:02:55.000Z
oogli/utils.py
brianbruggeman/oogli
6a6f681468d609035924ede27d895afcc9d432b6
[ "Apache-2.0" ]
null
null
null
oogli/utils.py
brianbruggeman/oogli
6a6f681468d609035924ede27d895afcc9d432b6
[ "Apache-2.0" ]
null
null
null
import glfw from glfw import gl def opengl_supported(major, minor): '''Determines if opengl is supported for the version provided''' assert glfw.core.init() != 0 version = (major, minor) glfw.core.window_hint(glfw.CONTEXT_VERSION_MAJOR, major) glfw.core.window_hint(glfw.CONTEXT_VERSION_MINOR, min...
35.230769
87
0.706696
import glfw from glfw import gl import numpy as np def screenshot(win, pixels=None): width, height = win.width, win.height if not isinstance(pixels, np.ndarray): shape = (width, height, 3) pixels = np.zeros(shape, dtype=np.uint8) return gl.read_pixels(0, 0, width, height, gl.RGB, gl.UNSIGN...
0
0
0
0
0
262
0
-3
45
e6add1302c8c0b6938d09deef9aee73e224f4832
2,362
py
Python
tools/vim/ninja_output.py
Wzzzx/chromium-crosswalk
768dde8efa71169f1c1113ca6ef322f1e8c9e7de
[ "BSD-3-Clause-No-Nuclear-License-2014", "BSD-3-Clause" ]
2
2019-01-28T08:09:58.000Z
2021-11-15T15:32:10.000Z
tools/vim/ninja_output.py
maidiHaitai/haitaibrowser
a232a56bcfb177913a14210e7733e0ea83a6b18d
[ "BSD-3-Clause" ]
null
null
null
tools/vim/ninja_output.py
maidiHaitai/haitaibrowser
a232a56bcfb177913a14210e7733e0ea83a6b18d
[ "BSD-3-Clause" ]
6
2020-09-23T08:56:12.000Z
2021-11-18T03:40:49.000Z
# Copyright 2014 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. import sys import os import exceptions import itertools import re if __name__ == '__main__': if len(sys.argv) != 2: raise exceptions.RuntimeError('E...
35.253731
80
0.701948
# Copyright 2014 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. import sys import os import exceptions import itertools import re def GetNinjaOutputDirectory(chrome_root): """Returns <chrome_root>/<output_dir>/(Relea...
0
0
0
0
1,940
0
0
0
23
1036b6605f5cc8baea52e6bdd3a4d604cd22c71e
4,604
py
Python
Kill Confirm Calculator.py
camando-73/Kill-Confirm-Calculator
d5c08f24092e99ceb3a66d8a5135c78c41879e7a
[ "MIT" ]
null
null
null
Kill Confirm Calculator.py
camando-73/Kill-Confirm-Calculator
d5c08f24092e99ceb3a66d8a5135c78c41879e7a
[ "MIT" ]
null
null
null
Kill Confirm Calculator.py
camando-73/Kill-Confirm-Calculator
d5c08f24092e99ceb3a66d8a5135c78c41879e7a
[ "MIT" ]
null
null
null
window = Tk() window.title("Kill Confirm Calculator") global oppKilPer promptLabel = Label(window, text="Select your Opponents Rival").grid(row=1, column=4) promptLabel1 = Label(window, text="by clicking a Button").grid(row=2, column=4) #Functions containing each characters different kill percent values #...
37.430894
91
0.68397
from tkinter import * import PySimpleGUI as sg window = Tk() window.title("Kill Confirm Calculator") global oppKilPer promptLabel = Label(window, text="Select your Opponents Rival").grid(row=1, column=4) promptLabel1 = Label(window, text="by clicking a Button").grid(row=2, column=4) #Functions containing e...
0
0
0
0
0
2,114
0
3
391
c81f3107437fcc895e116096a76e159155a09374
5,791
py
Python
FindAllRNA/Archieved/encoders.py
Koushul/FindAllRNA
a2c41831f67be2cd52629ebc2ef24cfca3e172f5
[ "MIT" ]
null
null
null
FindAllRNA/Archieved/encoders.py
Koushul/FindAllRNA
a2c41831f67be2cd52629ebc2ef24cfca3e172f5
[ "MIT" ]
null
null
null
FindAllRNA/Archieved/encoders.py
Koushul/FindAllRNA
a2c41831f67be2cd52629ebc2ef24cfca3e172f5
[ "MIT" ]
null
null
null
import warnings warnings.simplefilter(action='ignore', category=FutureWarning) if __name__ == '__main__': # s = Seq('TTATGACCC') # encoder = KMerEncoder(2, 50, 'constant') # e = encoder.encode(s) # print(s) # print(encoder.char_to_int) # print(e...
29.697436
120
0.572267
import warnings warnings.simplefilter(action='ignore', category=FutureWarning) from Bio import SeqIO from Bio.Seq import Seq import numpy as np import random import itertools from textwrap import wrap from collections import defaultdict class AbstractSequenceEncoder: ALLOWED_CHARACTERS = 'ATGC' def enco...
0
0
0
4,498
0
0
0
4
362
77b6756cbbe27bf7e8e52e03f492721847e9e2cc
2,531
py
Python
utils/reviews_utils.py
woctezuma/steam-reviews-to-sales
51ca279d07a2a1cf26d099a5cfe51566760298cd
[ "MIT" ]
3
2021-08-08T21:06:19.000Z
2021-12-27T05:29:50.000Z
utils/reviews_utils.py
woctezuma/steam-reviews-to-sales
51ca279d07a2a1cf26d099a5cfe51566760298cd
[ "MIT" ]
null
null
null
utils/reviews_utils.py
woctezuma/steam-reviews-to-sales
51ca279d07a2a1cf26d099a5cfe51566760298cd
[ "MIT" ]
null
null
null
if __name__ == "__main__": main()
28.122222
118
0.66772
import requests from utils.time_utils import get_target_date_as_timestamp def get_steam_api_url(app_id): return f"https://store.steampowered.com/appreviews/{app_id}" def get_request_params(target_timestamp=None, verbose=True): # References: # - https://partner.steamgames.com/doc/store/getreviews # ...
0
0
0
0
0
2,272
0
30
183
76675b41d2da4ee91a92fb16e3bd655bdb21e69c
17,737
py
Python
adapters/pox/ext/debugger/component_launcher/component_launcher.py
ARCCN/elt
3bf4e6cc0c7abbe442d6513ed294e956143c3bea
[ "BSD-3-Clause" ]
1
2016-07-14T14:45:56.000Z
2016-07-14T14:45:56.000Z
adapters/pox/ext/debugger/component_launcher/component_launcher.py
ARCCN/elt
3bf4e6cc0c7abbe442d6513ed294e956143c3bea
[ "BSD-3-Clause" ]
null
null
null
adapters/pox/ext/debugger/component_launcher/component_launcher.py
ARCCN/elt
3bf4e6cc0c7abbe442d6513ed294e956143c3bea
[ "BSD-3-Clause" ]
null
null
null
from __future__ import print_function from pox.core import core log = core.getLogger("ComponentLauncher") CONFIG = ["debugger/component_launcher/component_config/", "ext/debugger/component_launcher/component_config/", "pox/ext/debugger/component_launcher/component_config/", "adapters/pox...
37.106695
79
0.537408
from __future__ import print_function import sys import traceback import inspect import types from ConfigParser import ConfigParser import os from functools import partial from pox.boot import _do_imports from pox.core import core from pox.lib.revent.revent import EventHalt log = core.getLogger("ComponentLauncher")...
0
0
0
11,712
0
5,296
0
13
268
b9917b0364f6a2e7a4445c0bc9b7221c3b487eb7
2,771
py
Python
wagtailnest/views.py
ionata/wagtailnest
da903db0967e6f3b87db7213c9d94c0ec98048f5
[ "BSD-3-Clause" ]
1
2018-04-11T23:47:33.000Z
2018-04-11T23:47:33.000Z
wagtailnest/views.py
ionata/wagtailnest
da903db0967e6f3b87db7213c9d94c0ec98048f5
[ "BSD-3-Clause" ]
12
2017-07-18T01:52:06.000Z
2021-09-08T00:15:37.000Z
wagtailnest/views.py
ionata/wagtailnest
da903db0967e6f3b87db7213c9d94c0ec98048f5
[ "BSD-3-Clause" ]
1
2017-05-05T06:18:44.000Z
2017-05-05T06:18:44.000Z
from rest_framework.settings import api_settings from wagtailnest.utils import (import_setting) _permissions = { name: import_setting( '{}_PERMISSION_CLASSES'.format(name), api_settings.DEFAULT_PERMISSION_CLASSES) for name in ['PAGE', 'DOCUMENT', 'IMAGE'] }
36.460526
76
0.693973
from django.views.generic.base import RedirectView from rest_framework.generics import RetrieveAPIView from rest_framework.settings import api_settings from wagtail.core.models import Page from wagtail.core.views import serve as serve_page from wagtail.documents.views.serve import serve as serve_doc from wagtail.images...
0
0
0
1,969
0
0
0
266
247
ed915cdbf0499255e73830ce7fa7cc05fd04e05b
6,126
py
Python
cs15211/CheapestFlightsWithinKStops.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
1
2021-07-05T01:53:30.000Z
2021-07-05T01:53:30.000Z
cs15211/CheapestFlightsWithinKStops.py
JulyKikuAkita/PythonPrac
0ba027d9b8bc7c80bc89ce2da3543ce7a49a403c
[ "Apache-2.0" ]
null
null
null
cs15211/CheapestFlightsWithinKStops.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/cheapest-flights-within-k-stops/' # Time: O() # Space: O() # # Description: Leetcode # 787. Cheapest Flights Within K Stops # # There are n cities connected by m flights. # Each fight starts from city u and arrives at v with a price w. # # Now given all the cities and flight...
31.096447
104
0.550278
__source__ = 'https://leetcode.com/problems/cheapest-flights-within-k-stops/' # Time: O() # Space: O() # # Description: Leetcode # 787. Cheapest Flights Within K Stops # # There are n cities connected by m flights. # Each fight starts from city u and arrives at v with a price w. # # Now given all the cities and flight...
0
0
0
1,455
0
0
0
-5
111
c8bd77d23986fec7b1ef68b2bccc25888a90ed92
1,093
py
Python
examples/examples-by-ml-library/libraries/raw_file_example.py
cdknorow/modelstore
f08839478432b89e828a8dcb41adf27b0e3aa66b
[ "Apache-2.0" ]
151
2020-09-20T14:53:06.000Z
2022-03-22T20:49:06.000Z
examples/examples-by-ml-library/libraries/raw_file_example.py
cdknorow/modelstore
f08839478432b89e828a8dcb41adf27b0e3aa66b
[ "Apache-2.0" ]
29
2020-12-07T16:27:39.000Z
2022-03-30T22:11:17.000Z
examples/examples-by-ml-library/libraries/raw_file_example.py
cdknorow/modelstore
f08839478432b89e828a8dcb41adf27b0e3aa66b
[ "Apache-2.0" ]
4
2022-01-10T17:42:02.000Z
2022-03-07T14:14:43.000Z
_DOMAIN_NAME = "example-model-file"
32.147059
79
0.709973
import json import os import tempfile from modelstore.model_store import ModelStore _DOMAIN_NAME = "example-model-file" def _train_and_save_example_model(tmp_dir: str) -> str: # Create a file with a "model" -- in this case it is a json file, # but modelstore can handle any file type model_path = os.path...
6
0
0
0
0
897
0
-4
158
64a70685034132430735b61b79a01c637c745705
5,472
py
Python
client/read_data.py
aitmlouk/FEDn-client-FedQAS-tf
278a1c402b313d22a8a060a40e434a8c59dbe93b
[ "Apache-2.0" ]
1
2022-02-16T05:56:43.000Z
2022-02-16T05:56:43.000Z
client/read_data.py
aitmlouk/FEDn-client-FedQAS-tf
278a1c402b313d22a8a060a40e434a8c59dbe93b
[ "Apache-2.0" ]
null
null
null
client/read_data.py
aitmlouk/FEDn-client-FedQAS-tf
278a1c402b313d22a8a060a40e434a8c59dbe93b
[ "Apache-2.0" ]
null
null
null
import json import os from tokenizers import BertWordPieceTokenizer from transformers import BertTokenizer def read_data(filename, settings): """ Helper function to read and preprocess SQUAD data for training and validation with Keras. :return: test, training data or validation data and nbr of examples...
36.724832
119
0.623904
import json import os import numpy as np from tokenizers import BertWordPieceTokenizer from transformers import BertTokenizer class SquadExample: """ Process SQUAD dataset """ def __init__(self, question, context, start_char_idx, answer_text, all_answers): self.question = question sel...
0
0
0
2,913
0
1,521
0
-3
91
00a1b50f3dd846088071791349bcd247d295c762
9,000
py
Python
data/common.py
Khanhnn00/blind-image-sr
42bba4894ac9ee6595d2fff9b25a7678f323ad87
[ "Apache-2.0" ]
null
null
null
data/common.py
Khanhnn00/blind-image-sr
42bba4894ac9ee6595d2fff9b25a7678f323ad87
[ "Apache-2.0" ]
null
null
null
data/common.py
Khanhnn00/blind-image-sr
42bba4894ac9ee6595d2fff9b25a7678f323ad87
[ "Apache-2.0" ]
null
null
null
import scipy.misc as misc IMG_EXTENSIONS = ['.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP'] BINARY_EXTENSIONS = ['.npy'] BENCHMARK = ['Set5', 'Set14', 'B100', 'Urban100', 'Manga109', 'DIV2K', 'DF2K'] #################### # Files & IO #################### #################### #...
31.690141
113
0.585778
import os import random import numpy as np import scipy.misc as misc import imageio from tqdm import tqdm import cv2 from PIL import Image import torch import torch.nn.functional as F IMG_EXTENSIONS = ['.jpg', '.JPG', '.jpeg', '.JPEG', '.png', '.PNG', '.ppm', '.PPM', '.bmp', '.BMP'] BINARY_EXTENSIONS = ['.npy'] BENCH...
0
0
0
0
0
7,930
0
-40
680
a0355f919cc4728a58640cd8403ab48bfc29e577
460
py
Python
Exe15_triangulo_isoseles_equilatero_escaleno.py
lucaslk122/Exercicios_Python_estutura_decisao
51a9699c5d85aa6cfb163d891c56e804a7255634
[ "MIT" ]
null
null
null
Exe15_triangulo_isoseles_equilatero_escaleno.py
lucaslk122/Exercicios_Python_estutura_decisao
51a9699c5d85aa6cfb163d891c56e804a7255634
[ "MIT" ]
null
null
null
Exe15_triangulo_isoseles_equilatero_escaleno.py
lucaslk122/Exercicios_Python_estutura_decisao
51a9699c5d85aa6cfb163d891c56e804a7255634
[ "MIT" ]
null
null
null
print("Entre com os dados de um trangulo") lado1 = int(input("Lado 1: ")) lado2 = int(input("Lado 2: ")) lado3 = int(input("Lado 3: ")) if lado1 < lado2 + lado3 and lado2 < lado1 + lado3 and lado3 < lado1 + lado2: if lado1 == lado2 == lado3: print("Tringulo equilatero") elif lado1 != lado2 != lado3 != l...
35.384615
77
0.626087
print("Entre com os dados de um trangulo") lado1 = int(input("Lado 1: ")) lado2 = int(input("Lado 2: ")) lado3 = int(input("Lado 3: ")) if lado1 < lado2 + lado3 and lado2 < lado1 + lado3 and lado3 < lado1 + lado2: if lado1 == lado2 == lado3: print("Triângulo equilatero") elif lado1 != lado2 != lado3 != ...
10
0
0
0
0
0
0
0
0
67698325e8a8db41808cc663d5073ddee6cdf27f
6,346
py
Python
game.py
matthewspangler/quillengine
80bce8f4d17a15766c6e43b768d3bf028c74ba73
[ "MIT-0" ]
1
2020-10-27T12:26:25.000Z
2020-10-27T12:26:25.000Z
game.py
matthewspangler/quillengine
80bce8f4d17a15766c6e43b768d3bf028c74ba73
[ "MIT-0" ]
null
null
null
game.py
matthewspangler/quillengine
80bce8f4d17a15766c6e43b768d3bf028c74ba73
[ "MIT-0" ]
null
null
null
# -------------------------------------------------------------------- # # game.py # contains main game loop, # including events, drawing, and update # -------------------------------------------------------------------- # # General imports: # Game related imports: # Local imports:
39.17284
109
0.608887
# -------------------------------------------------------------------- # # game.py # contains main game loop, # including events, drawing, and update # -------------------------------------------------------------------- # # General imports: import sys # Game related imports: import pygame import pyscroll import py...
0
0
0
5,843
0
0
0
-6
221
d9f00e14ddde6217639bd67754bf5cb2607b36a4
7,592
py
Python
notebooks/SignDetectorAndClassifier/src/utils/autoanchor.py
lsd-maddrive/adas_system
0352d59a500aebbd68fbf45f416fb98d1b850e13
[ "MIT" ]
null
null
null
notebooks/SignDetectorAndClassifier/src/utils/autoanchor.py
lsd-maddrive/adas_system
0352d59a500aebbd68fbf45f416fb98d1b850e13
[ "MIT" ]
14
2021-10-02T10:10:45.000Z
2022-03-26T08:32:48.000Z
notebooks/SignDetectorAndClassifier/src/utils/autoanchor.py
lsd-maddrive/adas_system
0352d59a500aebbd68fbf45f416fb98d1b850e13
[ "MIT" ]
null
null
null
# YOLOv5 by Ultralytics, GPL-3.0 license """ Auto-anchor utils """ import random import numpy as np import torch import yaml from tqdm import tqdm from utils.general import LOGGER, colorstr PREFIX = colorstr("AutoAnchor: ") def kmean_anchors( dataset="./data/coco128.yaml", n=9, img_size=640, thr=4.0, gen=1...
36.854369
111
0.559405
# YOLOv5 🚀 by Ultralytics, GPL-3.0 license """ Auto-anchor utils """ import random import numpy as np import torch import yaml from tqdm import tqdm from utils.general import LOGGER, colorstr, emojis PREFIX = colorstr("AutoAnchor: ") def check_anchor_order(m): # Check anchor order against stride order for YO...
13
0
0
0
0
3,726
0
8
127
453c5d60dedd3235c1f46cd9497155d8b3a70989
12,610
py
Python
tests/test_sendmail.py
thijstriemstra/aiosmtplib
39bab303bf15cc8e14aa0b7cffe800f1e7f83e58
[ "MIT" ]
null
null
null
tests/test_sendmail.py
thijstriemstra/aiosmtplib
39bab303bf15cc8e14aa0b7cffe800f1e7f83e58
[ "MIT" ]
null
null
null
tests/test_sendmail.py
thijstriemstra/aiosmtplib
39bab303bf15cc8e14aa0b7cffe800f1e7f83e58
[ "MIT" ]
null
null
null
""" SMTP.sendmail and SMTP.send_message method testing. """ import email.generator import pytest pytestmark = pytest.mark.asyncio()
29.670588
87
0.691356
""" SMTP.sendmail and SMTP.send_message method testing. """ import copy import email.generator import email.header import pytest from aiosmtplib import ( SMTPNotSupported, SMTPRecipientsRefused, SMTPResponseException, SMTPStatus, ) pytestmark = pytest.mark.asyncio() async def test_sendmail_simple_...
50
0
11,746
0
0
0
0
85
596
b2ddef6aa2fb689d119c86fd4710810575904ef7
18,985
py
Python
Matrix_Portal_Moon_Clock/code.py
jposada202020/Adafruit_Learning_System_Guides
d9656b8ba59532926240ddee50b81160e2e3fd11
[ "MIT" ]
1
2021-01-05T02:08:27.000Z
2021-01-05T02:08:27.000Z
Matrix_Portal_Moon_Clock/code.py
jposada202020/Adafruit_Learning_System_Guides
d9656b8ba59532926240ddee50b81160e2e3fd11
[ "MIT" ]
null
null
null
Matrix_Portal_Moon_Clock/code.py
jposada202020/Adafruit_Learning_System_Guides
d9656b8ba59532926240ddee50b81160e2e3fd11
[ "MIT" ]
null
null
null
""" MOON PHASE CLOCK for Adafruit Matrix Portal: displays current time, lunar phase and time of next moonrise or moonset. Requires WiFi internet access. Written by Phil 'PaintYourDragon' Burgess for Adafruit Industries. MIT license, all text above must be included in any redistribution. BDF fonts from the X.Org proje...
43.946759
78
0.603318
""" MOON PHASE CLOCK for Adafruit Matrix Portal: displays current time, lunar phase and time of next moonrise or moonset. Requires WiFi internet access. Written by Phil 'PaintYourDragon' Burgess for Adafruit Industries. MIT license, all text above must be included in any redistribution. BDF fonts from the X.Org proje...
0
0
0
3,187
0
0
0
-10
44
074a4b4261490d73d5f971d4834dfbbf2f1de8c7
1,688
py
Python
loginBuptGw/loginBuptGw.py
JamesLinus/Scripts
28aa33b60154ad11dd60c5d74642343aa5059a7f
[ "MIT" ]
1
2019-04-22T09:10:46.000Z
2019-04-22T09:10:46.000Z
loginBuptGw/loginBuptGw.py
JamesLinus/Scripts
28aa33b60154ad11dd60c5d74642343aa5059a7f
[ "MIT" ]
null
null
null
loginBuptGw/loginBuptGw.py
JamesLinus/Scripts
28aa33b60154ad11dd60c5d74642343aa5059a7f
[ "MIT" ]
null
null
null
#!/usr/bin/python # -*- coding:utf-8 -*- """ python loginBuptGw.py i python loginBuptGw.py o """ import sys reload(sys) sys.setdefaultencoding('utf8') uname = XXXXXX # upass = 'XXXXXX' # if __name__ == '__main__': if len(sys.argv) < 2 or len(sys.argv) >= 3: usage() else: if sys.argv[1] == "i": u_pass ...
21.1
174
0.683649
#!/usr/bin/python # -*- coding:utf-8 -*- """ 北邮人网关登录脚本: 使用方法: 登录:python loginBuptGw.py i 退出:python loginBuptGw.py o """ import urllib2 import urllib import cookielib import hashlib import os import re import sys reload(sys) sys.setdefaultencoding('utf8') uname = XXXXXX #请正确填写学号 upass = 'XXXXXX' #请正确填写密码 def saf...
213
0
0
0
0
916
0
-51
248
8d9d97da1eeec5795d33bf640fc9d80248931137
1,639
py
Python
trendfilter/extrapolate.py
dave31415/trendfilter
793714359ec243857d0557ede9abcae61981f119
[ "MIT" ]
null
null
null
trendfilter/extrapolate.py
dave31415/trendfilter
793714359ec243857d0557ede9abcae61981f119
[ "MIT" ]
null
null
null
trendfilter/extrapolate.py
dave31415/trendfilter
793714359ec243857d0557ede9abcae61981f119
[ "MIT" ]
null
null
null
from scipy.interpolate import interp1d def vectorize(func_orig): """ A function that takes a function and returns another that can fun on lists and arrays :param func_orig: any functions :return: vectorized function """ return func def get_interp_extrapolate_functions(x, base_model, line...
30.924528
84
0.681513
from scipy.interpolate import interp1d import numpy as np def vectorize(func_orig): """ A function that takes a function and returns another that can fun on lists and arrays :param func_orig: any functions :return: vectorized function """ def func(x_new): if isinstance(x_new, list)...
0
0
0
0
0
583
0
-3
129
8a1e23316ee7f7cad0e7bf9eafe1c857d3b52749
328
py
Python
Scripts/simulation/objects/decorative/__init__.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/objects/decorative/__init__.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
Scripts/simulation/objects/decorative/__init__.py
velocist/TS4CheatsInfo
b59ea7e5f4bd01d3b3bd7603843d525a9c179867
[ "Apache-2.0" ]
null
null
null
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\objects\decorative\__init__.py # Compiled at: 2009-11-20 02:49:20 # Size of source mod 2**32: 106 by...
46.857143
107
0.728659
# uncompyle6 version 3.7.4 # Python bytecode 3.7 (3394) # Decompiled from: Python 3.7.9 (tags/v3.7.9:13c94747c7, Aug 17 2020, 18:58:18) [MSC v.1900 64 bit (AMD64)] # Embedded file name: T:\InGame\Gameplay\Scripts\Server\objects\decorative\__init__.py # Compiled at: 2009-11-20 02:49:20 # Size of source mod 2**32: 106 by...
0
0
0
0
0
0
0
0
0
15dd6aac8e204d47fef9c8e7da2d4dd65a45dcc0
1,555
py
Python
patients/migrations/0012_auto_20201104_1553.py
joshgoshbgosh/ccs-final-project
566bf8bfaa82986010a2dfbdc3b32592c796d4a9
[ "MIT" ]
1
2020-11-05T14:21:45.000Z
2020-11-05T14:21:45.000Z
patients/migrations/0012_auto_20201104_1553.py
joshgoshbgosh/ccs-final-project
566bf8bfaa82986010a2dfbdc3b32592c796d4a9
[ "MIT" ]
null
null
null
patients/migrations/0012_auto_20201104_1553.py
joshgoshbgosh/ccs-final-project
566bf8bfaa82986010a2dfbdc3b32592c796d4a9
[ "MIT" ]
null
null
null
# Generated by Django 3.1.2 on 2020-11-04 15:53
42.027027
170
0.583923
# Generated by Django 3.1.2 on 2020-11-04 15:53 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('patients', '0011_patient_image'), ] operations = [ migrations.CreateModel( name='Prescription', fields=[ ...
0
0
0
1,441
0
0
0
19
46
fe2ccb0b7614d1cc9f61af3c2a9134c91f178963
49,940
py
Python
bin/sofa_analyze.py
pingsutw/sofa
66b960859dde4be7143ed06ed98396c743a6478a
[ "Apache-2.0" ]
1
2020-04-21T09:05:29.000Z
2020-04-21T09:05:29.000Z
bin/sofa_analyze.py
y78078/sofa
2f8967df18abc03cedf7a97f8bbf77164ca69bf9
[ "Apache-2.0" ]
null
null
null
bin/sofa_analyze.py
y78078/sofa
2f8967df18abc03cedf7a97f8bbf77164ca69bf9
[ "Apache-2.0" ]
null
null
null
import matplotlib matplotlib.use('agg') import random # input: pfv(performance feature vector), Pandas.DataFrame # output: hint, docker_image
44.470169
259
0.569704
import argparse import matplotlib matplotlib.use('agg') import csv import json import multiprocessing as mp import os import random import re import sys from functools import partial from operator import attrgetter, itemgetter import networkx as nx import numpy as np import pandas as pd import time from sofa_aisi impor...
0
0
0
297
0
48,524
0
-40
1,011
75cc48f5e1deff324b747de89196a4848b8c3eec
1,439
py
Python
backend/database.py
metabsd/GLaDOS-Potato
40d42e3d1471cdf6f24ddd36a06c5efd5fb3726b
[ "Apache-2.0" ]
1
2016-09-22T00:05:38.000Z
2016-09-22T00:05:38.000Z
backend/database.py
metabsd/GLaDOS-Potato
40d42e3d1471cdf6f24ddd36a06c5efd5fb3726b
[ "Apache-2.0" ]
null
null
null
backend/database.py
metabsd/GLaDOS-Potato
40d42e3d1471cdf6f24ddd36a06c5efd5fb3726b
[ "Apache-2.0" ]
null
null
null
import MySQLdb db = MySQLdb.connect("db", "root", "my-secret-pw", "bd_notes") cursor = db.cursor() global resultsExportEtudiants resultsExportEtudiants = []
28.215686
146
0.512856
import MySQLdb db = MySQLdb.connect("db", "root", "my-secret-pw", "bd_notes") cursor = db.cursor() global resultsExportEtudiants resultsExportEtudiants = [] def getetudiants(): del resultsExportEtudiants[:] sql = "SELECT * FROM t_etudiant" try: cursor.execute(sql) results = cursor.fetchal...
0
0
0
0
0
1,233
0
0
46
409cef07b90435c6fa62817fde97b01e461264b5
3,210
py
Python
async_blp/base_request.py
rockscie/async_blp
acb8777ccf2499681bde87d76ca780b61219699c
[ "MIT" ]
12
2019-08-05T16:56:54.000Z
2021-02-02T11:09:37.000Z
async_blp/base_request.py
lightning-like/async_blp
acb8777ccf2499681bde87d76ca780b61219699c
[ "MIT" ]
null
null
null
async_blp/base_request.py
lightning-like/async_blp
acb8777ccf2499681bde87d76ca780b61219699c
[ "MIT" ]
5
2019-12-08T15:43:13.000Z
2021-11-14T08:38:07.000Z
from async_blp.utils import log # pylint: disable=ungrouped-imports try: import blpapi except ImportError: LOGGER = log.get_logger()
31.165049
80
0.62648
import abc import asyncio from typing import Any from typing import Dict from typing import Optional from async_blp.enums import ErrorBehaviour from async_blp.utils import log # pylint: disable=ungrouped-imports try: import blpapi except ImportError: from async_blp.utils import env_test as blpapi LOGGER = lo...
0
249
423
2,179
0
0
0
37
182
6059b582a58a0a62cbb1d858d37bdc9bba85ab35
3,108
py
Python
qcengine/programs/madness/keywords.py
ahurta92/QCEngine
7e7482886eb320696904a5ee35c0d37f98341728
[ "BSD-3-Clause" ]
null
null
null
qcengine/programs/madness/keywords.py
ahurta92/QCEngine
7e7482886eb320696904a5ee35c0d37f98341728
[ "BSD-3-Clause" ]
null
null
null
qcengine/programs/madness/keywords.py
ahurta92/QCEngine
7e7482886eb320696904a5ee35c0d37f98341728
[ "BSD-3-Clause" ]
null
null
null
from typing import Any, Dict, Tuple def format_keyword(keyword: str, val: Any, lop_off: bool = True) -> Tuple[str, str]: """Function to reformat value `val` for `keyword` from python into nwchem-speak.""" # Transform string booleans into " " if val is True: return keyword.lower(), "true" elif...
35.318182
107
0.536358
import collections from typing import Any, Dict, Tuple def format_keyword(keyword: str, val: Any, lop_off: bool = True) -> Tuple[str, str]: """Function to reformat value `val` for `keyword` from python into nwchem-speak.""" # Transform string booleans into " " if val is True: return keyword.lower...
0
0
0
0
0
39
0
-3
49
b2af71edc5b61342cca24d22cee1ab418ea58547
1,314
py
Python
Client/inputs.py
Cescollino/FederatedPi
e7261c04c40cc7721e77287348c557c932d58543
[ "MIT" ]
null
null
null
Client/inputs.py
Cescollino/FederatedPi
e7261c04c40cc7721e77287348c557c932d58543
[ "MIT" ]
null
null
null
Client/inputs.py
Cescollino/FederatedPi
e7261c04c40cc7721e77287348c557c932d58543
[ "MIT" ]
null
null
null
from smbus2 import SMBus import time # RPi Channel 1 channel = 1 bus = SMBus(channel) # ADS1115 address and registers address = 0x48 reg_config = 0x01 # Config value: # - Single conversion # - A0 input # - 4.096V reference config = [0xC2, 0xB3] while True: reg_conversion = 0x00 # Start conversion bus.write...
22.271186
62
0.671233
from smbus2 import SMBus import time # RPi Channel 1 channel = 1 bus = SMBus(channel) # ADS1115 address and registers address = 0x48 reg_config = 0x01 # Config value: # - Single conversion # - A0 input # - 4.096V reference config = [0xC2, 0xB3] while True: reg_conversion = 0x00 # Start conversion bus.write...
0
0
0
0
0
0
0
0
0
6e22ddda76a72a3664a045ce067b390f4547bec7
8,076
py
Python
utils/SamplingUtils.py
nanohedra/nanohedra
3921b7f5ce10e0e3393c3b675bb97ccbecb96663
[ "MIT" ]
2
2020-12-07T00:38:32.000Z
2021-05-13T19:36:17.000Z
utils/SamplingUtils.py
nanohedra/nanohedra
3921b7f5ce10e0e3393c3b675bb97ccbecb96663
[ "MIT" ]
null
null
null
utils/SamplingUtils.py
nanohedra/nanohedra
3921b7f5ce10e0e3393c3b675bb97ccbecb96663
[ "MIT" ]
1
2021-05-13T19:36:18.000Z
2021-05-13T19:36:18.000Z
# Copyright 2020 Joshua Laniado and Todd O. Yeates. __author__ = "Joshua Laniado and Todd O. Yeates" __copyright__ = "Copyright 2020, Nanohedra" __version__ = "1.0" # ROTATION RANGE DEG C2 = 180 C3 = 120 C4 = 90 C5 = 72 C6 = 60 RotRangeDict = {"C2": C2, "C3": C3, "C4": C4, "C5": C5, "C6": C6}
40.38
138
0.59943
import numpy as np import math # Copyright 2020 Joshua Laniado and Todd O. Yeates. __author__ = "Joshua Laniado and Todd O. Yeates" __copyright__ = "Copyright 2020, Nanohedra" __version__ = "1.0" # ROTATION RANGE DEG C2 = 180 C3 = 120 C4 = 90 C5 = 72 C6 = 60 RotRangeDict = {"C2": C2, "C3": C3, "C4": C4, "C5": C5, "...
0
0
0
0
0
7,579
0
-13
205
7ac0bfbd29d462f9bf8bf305205720af17e182d2
550
py
Python
tests/handlers/test_maven_releases.py
sawood14012/fabric8-analytics-jobs
a7d850dfef5785144676b9a3b4e29942161e5347
[ "Apache-2.0" ]
5
2017-05-04T11:22:31.000Z
2018-08-24T16:12:30.000Z
tests/handlers/test_maven_releases.py
sawood14012/fabric8-analytics-jobs
a7d850dfef5785144676b9a3b4e29942161e5347
[ "Apache-2.0" ]
325
2017-05-03T08:44:03.000Z
2021-12-13T21:03:49.000Z
tests/handlers/test_maven_releases.py
sawood14012/fabric8-analytics-jobs
a7d850dfef5785144676b9a3b4e29942161e5347
[ "Apache-2.0" ]
28
2017-05-02T05:09:32.000Z
2021-03-11T09:42:34.000Z
"""Tests for maven_releases.py.""" # import pytest # TODO enable when new test(s) will be added # from f8a_jobs.handlers.maven_releases import MavenReleasesAnalyses
28.947368
84
0.710909
"""Tests for maven_releases.py.""" # import pytest # TODO enable when new test(s) will be added # from f8a_jobs.handlers.maven_releases import MavenReleasesAnalyses class TestMavenReleasesAnalyses(object): """Tests for MavenReleasesAnalyses class.""" def setup_method(self, method): """Set up any st...
0
0
0
359
0
0
0
0
23
a9553230e74a1b791dc28477f6cff5a0798d610e
901
py
Python
python/design_patterns/template_method.py
pgularski/snippets
0b34ac837dd768f3dfa72dbf3e3d271c51e71da9
[ "MIT" ]
null
null
null
python/design_patterns/template_method.py
pgularski/snippets
0b34ac837dd768f3dfa72dbf3e3d271c51e71da9
[ "MIT" ]
null
null
null
python/design_patterns/template_method.py
pgularski/snippets
0b34ac837dd768f3dfa72dbf3e3d271c51e71da9
[ "MIT" ]
null
null
null
#!/usr/bin/env python # * coding: UTF8 * if __name__ == '__main__': test()
18.02
44
0.588235
#!/usr/bin/env python # −*− coding: UTF−8 −*− import abc class HotBeverage(object): __metaclass__ = abc.ABCMeta def prepare(self): self.boil_water() self.brew() self.pour_in_cup() if self.customer_wants_condiments(): self.add_condiments() @abc.abstractmethod ...
15
108
0
610
0
13
0
-11
92
45d6e9edd987d3f729c82e2725f851919559b12b
1,177
py
Python
pages/themes/ParallelProgramming-Lecture4/examples/download_images_demos/download_images_with_threas.py
WWWCourses/PythonCourseNetIT-Slides
78dbb5eb7695cc64042b71a1911d4ef3feddb074
[ "MIT" ]
null
null
null
pages/themes/ParallelProgramming-Lecture4/examples/download_images_demos/download_images_with_threas.py
WWWCourses/PythonCourseNetIT-Slides
78dbb5eb7695cc64042b71a1911d4ef3feddb074
[ "MIT" ]
null
null
null
pages/themes/ParallelProgramming-Lecture4/examples/download_images_demos/download_images_with_threas.py
WWWCourses/PythonCourseNetIT-Slides
78dbb5eb7695cc64042b71a1911d4ef3feddb074
[ "MIT" ]
null
null
null
import threading import os import time urls = [ "https://unsplash.com/photos/CTflmHHVrBM/download?force=true", "https://unsplash.com/photos/pWV8HjvHzk8/download?force=true", # "https://unsplash.com/photos/1jn_3WBp60I/download?force=true", # "https://unsplash.com/photos/8E5HawfqCMM/download?force=true", # "https:...
24.020408
65
0.723025
import threading import requests import os import time def download_file(url): file_name=url.split('/')[4]+'.jpg' full_file_name = os.path.join(download_path,file_name) # get image bytes print(f"Start downloading {url}") response = requests.get(url, allow_redirects=True) # write image to file with open(full...
0
0
0
0
0
338
0
-6
45
7e6fb24c9fdf24078eca20ccd5e9b951ede5ba72
350
py
Python
lhotse/recipes/__init__.py
freewym/lhotse
66e9bbaf25b75011388ab00189baa162c3c1d435
[ "Apache-2.0" ]
null
null
null
lhotse/recipes/__init__.py
freewym/lhotse
66e9bbaf25b75011388ab00189baa162c3c1d435
[ "Apache-2.0" ]
null
null
null
lhotse/recipes/__init__.py
freewym/lhotse
66e9bbaf25b75011388ab00189baa162c3c1d435
[ "Apache-2.0" ]
null
null
null
from .ami import prepare_ami from .broadcast_news import prepare_broadcast_news from .librimix import prepare_librimix from .librispeech import prepare_librispeech from .switchboard import prepare_switchboard __all__ = [ 'prepare_ami', 'prepare_broadcast_news', 'prepare_librimix', 'prepare_librispeech'...
25
50
0.794286
from .ami import prepare_ami from .broadcast_news import prepare_broadcast_news from .librimix import prepare_librimix from .librispeech import prepare_librispeech from .switchboard import prepare_switchboard __all__ = [ 'prepare_ami', 'prepare_broadcast_news', 'prepare_librimix', 'prepare_librispeech'...
0
0
0
0
0
0
0
0
0
34c4a49b1a56810d1ba1396800b3826151f2cfe8
1,109
py
Python
linux/local_article.py
shienka07/no_corona_zone
3b015d3bf7bff38eadfad722da4222bf5ed92c8e
[ "Apache-2.0" ]
null
null
null
linux/local_article.py
shienka07/no_corona_zone
3b015d3bf7bff38eadfad722da4222bf5ed92c8e
[ "Apache-2.0" ]
null
null
null
linux/local_article.py
shienka07/no_corona_zone
3b015d3bf7bff38eadfad722da4222bf5ed92c8e
[ "Apache-2.0" ]
4
2021-07-23T07:35:44.000Z
2021-09-10T11:51:32.000Z
import re from selenium import webdriver from selenium.webdriver.chrome.options import Options import argparse import ncz parser = argparse.ArgumentParser() parser.add_argument('keyword1', help="main_city_name") parser.add_argument('keyword2', help="sub_city_name") parser.add_argument('keyword3', help="file_path") m...
27.04878
99
0.762849
import re from selenium import webdriver from selenium.webdriver.chrome.options import Options import argparse import ncz import chromedriver_binary parser = argparse.ArgumentParser() parser.add_argument('keyword1', help="main_city_name") parser.add_argument('keyword2', help="sub_city_name") parser.add_argument('key...
57
0
0
0
0
0
0
5
23
4e0b4f1736db9347d30a2d18993a1c64f19dbfc6
504
py
Python
node2vec/src/testNetworkX.py
CEfanmin/DataMiningProjects
b6375f542c68c0001ae2971dd7e8046a0b4afc7a
[ "MIT" ]
3
2018-04-26T06:44:27.000Z
2018-09-01T13:58:21.000Z
node2vec/src/testNetworkX.py
CEfanmin/DataMiningProjects
b6375f542c68c0001ae2971dd7e8046a0b4afc7a
[ "MIT" ]
null
null
null
node2vec/src/testNetworkX.py
CEfanmin/DataMiningProjects
b6375f542c68c0001ae2971dd7e8046a0b4afc7a
[ "MIT" ]
1
2018-09-01T13:58:27.000Z
2018-09-01T13:58:27.000Z
import networkx as nx import matplotlib.pyplot as plt ## add a node G = nx.Graph() G.add_node(1) G.add_nodes_from([2, 3]) H = nx.path_graph(10) G.add_nodes_from(H) G.add_node(H) G.add_node('shopping') ## edges G.add_edge(1, 2, {'weight': 3.1415}) e = (2, 3) G.add_edge(*e) G.add_edges_from([(1,2), (1,3)]) # G.add_edg...
18
50
0.646825
import networkx as nx import matplotlib.pyplot as plt ## add a node G = nx.Graph() G.add_node(1) G.add_nodes_from([2, 3]) H = nx.path_graph(10) G.add_nodes_from(H) G.add_node(H) G.add_node('shopping') ## edges G.add_edge(1, 2, {'weight': 3.1415}) e = (2, 3) G.add_edge(*e) G.add_edges_from([(1,2), (1,3)]) # G.add_edg...
0
0
0
0
0
0
0
0
0
7a5a12a2b65d10df25cd9f836ac609b209cce23a
918
py
Python
adv/mona.py
dl-stuff/dl
185cc8a16339c47ed873768ff30804f8d06090a2
[ "Apache-2.0" ]
22
2020-04-04T17:34:16.000Z
2021-09-25T00:22:23.000Z
adv/mona.py
dl-stuff/dl
185cc8a16339c47ed873768ff30804f8d06090a2
[ "Apache-2.0" ]
92
2020-04-04T15:30:34.000Z
2022-03-24T01:43:11.000Z
adv/mona.py
dl-stuff/dl
185cc8a16339c47ed873768ff30804f8d06090a2
[ "Apache-2.0" ]
37
2020-04-16T02:47:07.000Z
2021-03-28T23:18:50.000Z
variants = {None: Mona, "RNG": Mona_RNG, "INFUTP": Mona_INFUTP}
26.228571
85
0.595861
from core.advbase import * from module.template import Adv_INFUTP class Mona(Adv): def prerun(self): self.beast_eye = Selfbuff("beast_eye", 0.2, 30, "utph", "buff").ex_bufftime() Event("dragon").listener(self.ddrive_buff_off) def fs_proc(self, e): if self.nihilism: return ...
0
0
0
714
0
0
0
22
113
8948fe9ebd947bd18a879bad266e94c8f09b14d4
89
py
Python
Code/facebook_credentials.py
PritomDas/Automated-Tinder-AI-Bot
085a41c586671767b976f18627d8f72ed3614dcd
[ "MIT" ]
1
2020-02-11T06:44:33.000Z
2020-02-11T06:44:33.000Z
Code/facebook_credentials.py
PritomDas/Automated-Tinder-AI-Bot
085a41c586671767b976f18627d8f72ed3614dcd
[ "MIT" ]
1
2020-02-11T06:56:48.000Z
2020-02-11T06:56:48.000Z
Code/facebook_credentials.py
PritomDas/Automated-Tinder-AI-Bot
085a41c586671767b976f18627d8f72ed3614dcd
[ "MIT" ]
null
null
null
username = '' #enter your facebook user name password = '' #enter your facebook password
29.666667
44
0.741573
username = '' #enter your facebook user name password = '' #enter your facebook password
0
0
0
0
0
0
0
0
0
de336d770cfcbea47a843316d1fc22134021b6c5
908
py
Python
main.py
arieroos/crypto-trader
c419f712fd7c501507c99a48a142e909f92a949c
[ "MIT" ]
2
2021-09-08T07:23:51.000Z
2021-11-08T14:59:32.000Z
main.py
arieroos/crypto-trader
c419f712fd7c501507c99a48a142e909f92a949c
[ "MIT" ]
null
null
null
main.py
arieroos/crypto-trader
c419f712fd7c501507c99a48a142e909f92a949c
[ "MIT" ]
null
null
null
import sys import error_handler import valr UNKNOWN_TREND = "unknown" DOWN_TREND = "down" UP_TREND = "up" if __name__ == "__main__": sys.excepthook = error_handler.excepthook orders = [x for x in valr.get_open_orders() if x["side"].upper() == "BUY"] if len(orders) > 0: log("open orders found: ...
24.540541
78
0.65859
import sys from datetime import datetime import error_handler import valr UNKNOWN_TREND = "unknown" DOWN_TREND = "down" UP_TREND = "up" def log(msg: str): print(f"[{datetime.now()}] {msg}", flush=True) if __name__ == "__main__": sys.excepthook = error_handler.excepthook orders = [x for x in valr.get_...
0
0
0
0
0
48
0
8
45
b7bab76e2c1606435bce4d050c6f35fd5a5ee94d
2,106
py
Python
bucket_manifest/utils.py
uc-cdis/cdis-dataflow-templates
6a3d28d27094db34e2df6ef10d61a700bfc6c94d
[ "Apache-2.0" ]
null
null
null
bucket_manifest/utils.py
uc-cdis/cdis-dataflow-templates
6a3d28d27094db34e2df6ef10d61a700bfc6c94d
[ "Apache-2.0" ]
1
2020-06-17T21:54:37.000Z
2020-06-17T21:54:37.000Z
bucket_manifest/utils.py
uc-cdis/cdis-dataflow-templates
6a3d28d27094db34e2df6ef10d61a700bfc6c94d
[ "Apache-2.0" ]
null
null
null
import csv from google.cloud import storage import logging def write_tsv(filename, files, fieldnames=None): """ write to tsv file Args: filename(str): file name files(list(dict)): list of file info [ { "GUID": "guid_example", "filename":...
26.325
97
0.565052
import csv from google.cloud import storage import logging def write_tsv(filename, files, fieldnames=None): """ write to tsv file Args: filename(str): file name files(list(dict)): list of file info [ { "GUID": "guid_example", "filename":...
0
0
0
0
0
0
0
0
0
72412d50c7dc555be4686d28e6d8ca8e63ec7561
539
py
Python
main/templatetags/custom_tags.py
CrazyOrr/gamemob
defdf748d8860ac9a1af317781c4b88421326762
[ "Apache-2.0" ]
null
null
null
main/templatetags/custom_tags.py
CrazyOrr/gamemob
defdf748d8860ac9a1af317781c4b88421326762
[ "Apache-2.0" ]
null
null
null
main/templatetags/custom_tags.py
CrazyOrr/gamemob
defdf748d8860ac9a1af317781c4b88421326762
[ "Apache-2.0" ]
null
null
null
__author__ = 'wanglei02' from django import template register = template.Library()
23.434783
57
0.658627
__author__ = 'wanglei02' from django import template from django.utils.html import conditional_escape from django.utils.safestring import mark_safe register = template.Library() @register.filter(name='join_link', needs_autoescape=True) def join_link(value, arg, autoescape=True): arr = [] if autoescape: ...
0
335
0
0
0
0
0
51
67