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
8b817c7274b519507018823ba394a46943d4b748
9,779
py
Python
tests/test_flask_echelon.py
jesseops/Flask-Echelon
226c69700ee5e4ee1e028df8277579c50dc2f660
[ "MIT" ]
1
2019-03-11T12:15:13.000Z
2019-03-11T12:15:13.000Z
tests/test_flask_echelon.py
jesseops/Flask-Echelon
226c69700ee5e4ee1e028df8277579c50dc2f660
[ "MIT" ]
null
null
null
tests/test_flask_echelon.py
jesseops/Flask-Echelon
226c69700ee5e4ee1e028df8277579c50dc2f660
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_flask_echelon ---------------------------------- Tests for `flask_echelon` module. """ import pytest from flask import Flask from pymongo import MongoClient from flask_echelon import EchelonManager # only use one MongoClient instance DB = MongoClient().test_fl...
28.344928
82
0.705082
#!/usr/bin/env python # -*- coding: utf-8 -*- """ test_flask_echelon ---------------------------------- Tests for `flask_echelon` module. """ import pytest from flask import Flask, _request_ctx_stack from flask_login import AnonymousUserMixin, LoginManager, UserMixin from pymongo import MongoClient from flask_echel...
0
323
0
261
0
7,211
0
138
619
8a99531e45a460c85d6598077472678b16cb2b71
7,248
py
Python
openstack/workflow/v2/_proxy.py
teresa-ho/stx-openstacksdk
7d723da3ffe9861e6e9abcaeadc1991689f782c5
[ "Apache-2.0" ]
null
null
null
openstack/workflow/v2/_proxy.py
teresa-ho/stx-openstacksdk
7d723da3ffe9861e6e9abcaeadc1991689f782c5
[ "Apache-2.0" ]
null
null
null
openstack/workflow/v2/_proxy.py
teresa-ho/stx-openstacksdk
7d723da3ffe9861e6e9abcaeadc1991689f782c5
[ "Apache-2.0" ]
null
null
null
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
42.887574
79
0.639625
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
0
0
0
6,535
0
0
0
77
90
df7135f508cbe25a7ee1418716eaf3d763a7904f
1,002
py
Python
parse_fastqc.py
wckdouglas/ngs_qc_plot
b279905f9e30d1cf547cda5f51cc77e8a134ce99
[ "MIT" ]
null
null
null
parse_fastqc.py
wckdouglas/ngs_qc_plot
b279905f9e30d1cf547cda5f51cc77e8a134ce99
[ "MIT" ]
null
null
null
parse_fastqc.py
wckdouglas/ngs_qc_plot
b279905f9e30d1cf547cda5f51cc77e8a134ce99
[ "MIT" ]
null
null
null
#!/usr/bin/env python import sys if len(sys.argv) < 2: sys.exit('[usage] python %s <fastqc_path1> [fastqc_path2] [fastqc_path3] ... ') if __name__ == '__main__': main()
23.302326
83
0.58982
#!/usr/bin/env python import sys if len(sys.argv) < 2: sys.exit('[usage] python %s <fastqc_path1> [fastqc_path2] [fastqc_path3] ... ') from bs4 import BeautifulSoup import pandas as pd import os import glob def read_fastqc(html_file): samplename = os.path.basename(html_file) with open(html_file) as f: ...
0
0
0
0
0
701
0
-16
135
76ee452dcd9760b0419f66b47d73c8a8f7318e1a
22,684
py
Python
Pyscripts/BookChapter/TrendData/S01_Global_Climate_trends.py
ArdenB/fireflies
cff2d6292c30fc49f0d1564b135c5c4abd75fdc8
[ "MIT" ]
null
null
null
Pyscripts/BookChapter/TrendData/S01_Global_Climate_trends.py
ArdenB/fireflies
cff2d6292c30fc49f0d1564b135c5c4abd75fdc8
[ "MIT" ]
null
null
null
Pyscripts/BookChapter/TrendData/S01_Global_Climate_trends.py
ArdenB/fireflies
cff2d6292c30fc49f0d1564b135c5c4abd75fdc8
[ "MIT" ]
null
null
null
""" Prelim script for looking at netcdf files and producing some trends These estimates can also be used for P03 climate estimation """ #============================================================================== __title__ = "Global Climate Trends" __author__ = "Arden Burrell" __version__ = "v1.0(13.02.2019)" __e...
30.946794
107
0.615015
""" Prelim script for looking at netcdf files and producing some trends These estimates can also be used for P03 climate estimation """ #============================================================================== __title__ = "Global Climate Trends" __author__ = "Arden Burrell" __version__ = "v1.0(13.02.2019)" __e...
0
0
0
0
0
6,545
0
88
287
fa5c418ceccff6392529b3cf74acacf58d6ef4d9
248
py
Python
20200914/05.str.py
ObukhovVladislav/python-basics
268af015fdd3392fd77783b38ef74be2ca6db7da
[ "Apache-2.0" ]
null
null
null
20200914/05.str.py
ObukhovVladislav/python-basics
268af015fdd3392fd77783b38ef74be2ca6db7da
[ "Apache-2.0" ]
null
null
null
20200914/05.str.py
ObukhovVladislav/python-basics
268af015fdd3392fd77783b38ef74be2ca6db7da
[ "Apache-2.0" ]
null
null
null
say = ' !' print(say) #print(dir(say)) print(say.islower()) print(say.isupper()) say_2 = say.upper() print(say_2) # say_3 = say_2.capitalize() say_3 = say.capitalize() print(say_3) if say.endswith('!') print(' ')
16.533333
33
0.685484
say = 'всем привет!' print(say) #print(dir(say)) print(say.islower()) print(say.isupper()) say_2 = say.upper() print(say_2) # say_3 = say_2.capitalize() say_3 = say.capitalize() print(say_3) if say.endswith('!') print('Эмоционально сказано')
58
0
0
0
0
0
0
0
0
2fb77a7f393484defe237090107124ac52bd338c
15,292
py
Python
test_baa/baa/lib/python3.7/site-packages/accelerometer/accUtils.py
samanthahuff/biobankAccelerometerAnalysis
c107d09e91c54dd5fa62ed950f3041353a2cc3a7
[ "BSD-2-Clause" ]
null
null
null
test_baa/baa/lib/python3.7/site-packages/accelerometer/accUtils.py
samanthahuff/biobankAccelerometerAnalysis
c107d09e91c54dd5fa62ed950f3041353a2cc3a7
[ "BSD-2-Clause" ]
null
null
null
test_baa/baa/lib/python3.7/site-packages/accelerometer/accUtils.py
samanthahuff/biobankAccelerometerAnalysis
c107d09e91c54dd5fa62ed950f3041353a2cc3a7
[ "BSD-2-Clause" ]
null
null
null
"""Module to provide generic utilities for other accelerometer modules.""" from collections import OrderedDict import datetime import json import math import os import pandas as pd import re DAYS = ['mon', 'tue', 'wed', 'thur', 'fri', 'sat', 'sun'] TIME_SERIES_COL = 'time' def formatNum(num, decimalPlaces): """...
38.134663
112
0.638373
"""Module to provide generic utilities for other accelerometer modules.""" from collections import OrderedDict import datetime import json import math import os import pandas as pd import re DAYS = ['mon', 'tue', 'wed', 'thur', 'fri', 'sat', 'sun'] TIME_SERIES_COL = 'time' def formatNum(num, decimalPlaces): """...
0
0
0
0
0
0
0
0
0
2fd8abf7e18930723cd6055abec7ee1768640412
4,394
py
Python
devilry/utils/datetimeutils.py
devilry/devilry-django
9ae28e462dfa4cfee966ebacbca04ade9627e715
[ "BSD-3-Clause" ]
29
2015-01-18T22:56:23.000Z
2020-11-10T21:28:27.000Z
devilry/utils/datetimeutils.py
devilry/devilry-django
9ae28e462dfa4cfee966ebacbca04ade9627e715
[ "BSD-3-Clause" ]
786
2015-01-06T16:10:18.000Z
2022-03-16T11:10:50.000Z
devilry/utils/datetimeutils.py
devilry/devilry-django
9ae28e462dfa4cfee966ebacbca04ade9627e715
[ "BSD-3-Clause" ]
15
2015-04-06T06:18:43.000Z
2021-02-24T12:28:30.000Z
import datetime import arrow from django.utils import timezone #: Django datetime formatting string for ``YYYY-MM-DD hh:mm``. ISODATETIME_DJANGOFORMAT = 'Y-m-d H:i' ARROW_ISOFORMAT_NOSECONDS = 'YYYY-MM-DD HH:mm' ARROW_ISOFORMAT_WITHSECONDS = 'YYYY-MM-DD HH:mm:ss' def get_current_datetime(): """ Get the cu...
34.062016
106
0.703004
import datetime import arrow from django.conf import settings from django.utils import timezone #: Django datetime formatting string for ``YYYY-MM-DD hh:mm``. ISODATETIME_DJANGOFORMAT = 'Y-m-d H:i' ARROW_ISOFORMAT_NOSECONDS = 'YYYY-MM-DD HH:mm' ARROW_ISOFORMAT_WITHSECONDS = 'YYYY-MM-DD HH:mm:ss' def get_current_d...
0
0
0
0
0
716
0
11
91
4482efc260049cfcc623cd989253e5a07fb5067b
6,559
py
Python
packages/arb-compiler-evm/arbitrum/evm/log.py
pangxieshousi/arbitrum
5a5d2c26970cb0495cd6772a7a895b6a0a90c413
[ "Apache-2.0" ]
1
2019-09-07T00:12:06.000Z
2019-09-07T00:12:06.000Z
packages/arb-compiler-evm/arbitrum/evm/log.py
pangxieshousi/arbitrum
5a5d2c26970cb0495cd6772a7a895b6a0a90c413
[ "Apache-2.0" ]
null
null
null
packages/arb-compiler-evm/arbitrum/evm/log.py
pangxieshousi/arbitrum
5a5d2c26970cb0495cd6772a7a895b6a0a90c413
[ "Apache-2.0" ]
null
null
null
# Copyright 2019, Offchain Labs, 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 ...
29.678733
84
0.603446
# Copyright 2019, Offchain Labs, 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 ...
0
0
0
5,326
0
64
0
7
298
5297f23d99e418f59dd464c51b941e52effe2d91
10,566
py
Python
tests/test_agreement_cfaua.py
ProzorroUKR/openprocurement-docs
267be10af4ee07917832abe6a1ac2f45c06f51fc
[ "Apache-2.0" ]
2
2019-12-10T12:35:11.000Z
2020-05-19T04:21:42.000Z
tests/test_agreement_cfaua.py
ProzorroUKR/openprocurement-docs
267be10af4ee07917832abe6a1ac2f45c06f51fc
[ "Apache-2.0" ]
2
2019-10-24T19:56:27.000Z
2020-02-13T23:28:07.000Z
tests/test_agreement_cfaua.py
ProzorroUKR/openprocurement-docs
267be10af4ee07917832abe6a1ac2f45c06f51fc
[ "Apache-2.0" ]
5
2018-09-20T05:31:58.000Z
2020-12-04T15:24:36.000Z
# -*- coding: utf-8 -*- TARGET_DIR = 'docs/source/agreementcfaua/tutorial/'
46.342105
112
0.601552
# -*- coding: utf-8 -*- import os from copy import deepcopy from uuid import uuid4 from openprocurement.api.utils import get_now from openprocurement.tender.cfaua.tests.base import ( BaseTenderWebTest, test_tender_data, test_lots ) from tests.base.test import DumpsWebTestApp, MockWebTestMixin from tests.base.cons...
122
0
0
10,086
0
0
0
162
179
68fa5e261a5c1295ddb2c3e386f36085b1880802
4,616
py
Python
gopatch/packages/views.py
porala/python
41213189a9b35b5b8c40c048f4d6cd3f8e5f25f4
[ "DOC" ]
1
2020-01-15T11:04:16.000Z
2020-01-15T11:04:16.000Z
gopatch/packages/views.py
porala/python
41213189a9b35b5b8c40c048f4d6cd3f8e5f25f4
[ "DOC" ]
2
2021-03-31T19:36:19.000Z
2021-06-10T22:29:26.000Z
gopatch/packages/views.py
porala/python
41213189a9b35b5b8c40c048f4d6cd3f8e5f25f4
[ "DOC" ]
null
null
null
# Copyright 2012 VPAC, http://www.vpac.org # Copyright 2013-2016 Marcus Furlong <furlongm@gmail.com> # # This file is part of Patchman. # # Patchman is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 on...
32.737589
79
0.707972
# Copyright 2012 VPAC, http://www.vpac.org # Copyright 2013-2016 Marcus Furlong <furlongm@gmail.com> # # This file is part of Patchman. # # Patchman is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, version 3 on...
0
1,789
0
1,303
0
0
0
414
362
5f83cfc90714f7265b94d96e27b64bd88129f579
272
py
Python
Core Python Programming/Chapter05/0508.py
zhaokai0402/PyQt5-Study
e6280fdc615e47c947c0902836350db49441e6de
[ "MIT" ]
null
null
null
Core Python Programming/Chapter05/0508.py
zhaokai0402/PyQt5-Study
e6280fdc615e47c947c0902836350db49441e6de
[ "MIT" ]
null
null
null
Core Python Programming/Chapter05/0508.py
zhaokai0402/PyQt5-Study
e6280fdc615e47c947c0902836350db49441e6de
[ "MIT" ]
null
null
null
import math # -*- coding:utf-8 -*- if __name__ == '__main__': length = float(input("length: ")) print("squares:", length ** 2) print("cubes:", length ** 3) print("circles:", math.pi * length ** 2) print("squares:", 4.0 / 3.0 * length ** 3 * math.pi)
24.727273
56
0.551471
import math # -*- coding:utf-8 -*- if __name__ == '__main__': length = float(input("length: ")) print("squares:", length ** 2) print("cubes:", length ** 3) print("circles:", math.pi * length ** 2) print("squares:", 4.0 / 3.0 * length ** 3 * math.pi)
0
0
0
0
0
0
0
0
0
328e318b33b14c079822fb39df28ceee33bb0ba9
2,226
py
Python
tests/rest/test_place_evidence.py
UniStuttgart-VISUS/damast
05ceb150e86227d81f0f4bb441af6d4f8bce65ee
[ "MIT" ]
2
2021-12-22T17:01:02.000Z
2022-01-18T17:05:48.000Z
tests/rest/test_place_evidence.py
UniStuttgart-VISUS/damast
05ceb150e86227d81f0f4bb441af6d4f8bce65ee
[ "MIT" ]
94
2021-12-22T11:21:57.000Z
2022-03-31T22:40:56.000Z
tests/rest/test_place_evidence.py
UniStuttgart-VISUS/damast
05ceb150e86227d81f0f4bb441af6d4f8bce65ee
[ "MIT" ]
1
2022-01-04T09:04:47.000Z
2022-01-04T09:04:47.000Z
from database.testdata import place_table _places = [ (p.id, True) for p in place_table ] _places += [ (i, False) for i in (0, 224, 6214, 36) ] _nouser_routes = [ '/rest/place/{}/evidence', '/rest/place/{}/evidence-ids', ] _nouser_methods = [ 'GET' ]
31.352113
69
0.566936
import pytest import damast import flask import json from database.testdata import place_table from conftest import get_headers _places = [ (p.id, True) for p in place_table ] _places += [ (i, False) for i in (0, 224, 6214, 36) ] @pytest.fixture(params=_places) def place(request): return request.param @pytest.m...
0
1,793
0
0
0
0
0
-24
179
8ae7f59ec247f629e8eecf25d8124175ecdf8739
527
py
Python
nwcc_pyramid/models/mymodel.py
ChristopherSClosser/nwcc-pyramid
952d96dae56a07d4038dfcc818020c1b5e301ce1
[ "Apache-2.0" ]
1
2018-07-31T20:48:24.000Z
2018-07-31T20:48:24.000Z
nwcc_pyramid/models/mymodel.py
ChristopherSClosser/nwcc-pyramid
952d96dae56a07d4038dfcc818020c1b5e301ce1
[ "Apache-2.0" ]
45
2018-06-22T22:46:06.000Z
2019-12-31T16:59:27.000Z
nwcc_pyramid/models/mymodel.py
ChristopherSClosser/nwcc_pyramid
952d96dae56a07d4038dfcc818020c1b5e301ce1
[ "Apache-2.0" ]
null
null
null
"""NWCC info model.""" # Index('my_index', MyModel.name, unique=True, mysql_length=255)
18.172414
64
0.626186
"""NWCC info model.""" from sqlalchemy import ( Column, Integer, Text, Date ) from .meta import Base class MyModel(Base): """.""" __tablename__ = 'models' id = Column(Integer, primary_key=True) page = Column(Text) category = Column(Text) subcategory = Column(Text) title =...
0
0
0
318
0
0
0
50
68
b7f94a1b6b97b4f10dab08bfa241038e30047a8f
1,325
py
Python
graphingResults/grapher.py
CoolaCansat/primary2022
9f11f87390c2afaf5f20c3f0328bbdb3f5bff6c3
[ "MIT" ]
null
null
null
graphingResults/grapher.py
CoolaCansat/primary2022
9f11f87390c2afaf5f20c3f0328bbdb3f5bff6c3
[ "MIT" ]
null
null
null
graphingResults/grapher.py
CoolaCansat/primary2022
9f11f87390c2afaf5f20c3f0328bbdb3f5bff6c3
[ "MIT" ]
null
null
null
#import you graphing library import matplotlib.pyplot as plt #open you log file (saved as .txt) log = open("canlog.txt", "r") #read the contents of you log file log = log.read() #removes everything before the first T in tempurate (removes T aswell) log = log.split("T", 2) log[1].replace("-----------------------...
28.804348
71
0.581132
#import you graphing library import matplotlib.pyplot as plt #open you log file (saved as .txt) log = open("canlog.txt", "r") #read the contents of you log file log = log.read() #removes everything before the first T in tempurate (removes T aswell) log = log.split("T", 2) log[1].replace("-----------------------...
0
0
0
0
0
0
0
0
0
dc5eb2b80f86a9521d26ee3f67d7a4f539ca0e64
45
py
Python
file_catalog/schema/__init__.py
WIPACrepo/file_catalog
01c0947d32d621d28516ecce3604a0124c673925
[ "MIT" ]
null
null
null
file_catalog/schema/__init__.py
WIPACrepo/file_catalog
01c0947d32d621d28516ecce3604a0124c673925
[ "MIT" ]
61
2017-02-23T17:58:43.000Z
2022-03-24T22:13:24.000Z
file_catalog/schema/__init__.py
WIPACrepo/file_catalog
01c0947d32d621d28516ecce3604a0124c673925
[ "MIT" ]
2
2017-12-20T18:30:35.000Z
2018-01-08T15:15:03.000Z
"""Init."""
11.25
31
0.644444
"""Init.""" from . import types, validation
0
0
0
0
0
0
0
10
23
8f1af127eee9945408bec2f0d74ce707a7e334c5
3,326
py
Python
src/duplicate_key_check/duplicate_main.py
GreyElaina/TransQualityControl
12395cd7e932acefb12099b46827762770b97485
[ "MIT" ]
null
null
null
src/duplicate_key_check/duplicate_main.py
GreyElaina/TransQualityControl
12395cd7e932acefb12099b46827762770b97485
[ "MIT" ]
null
null
null
src/duplicate_key_check/duplicate_main.py
GreyElaina/TransQualityControl
12395cd7e932acefb12099b46827762770b97485
[ "MIT" ]
null
null
null
# # from collections import Counter import json # dict if __name__ == '__main__': key_total = [] # key en_dict_total = {} # zh_dict_total = {} # key_duplicate = [] # key dict_total = {} # for modid in file_finder('../project/assets'): en_dict = lang_to_dict('../proje...
31.67619
97
0.592303
# 这次不折腾啥面向对象了 # 简单好用直接上函数式 import os from collections import Counter import json # 获取语言文件,处理得到一个 dict def lang_to_dict(file_path): lang_dict = {} with open(file_path, 'r', encoding='utf-8', errors='ignore') as f: for line in f.readlines(): if line is not None and line[0] != '#' and line[0]...
414
0
0
0
0
1,807
0
-12
90
b0a8d02d42746073dc0b4e3db3324005d19c629c
1,299
py
Python
PythonTricks/ch02_05.py
eroicaleo/LearningPython
297d46eddce6e43ce0c160d2660dff5f5d616800
[ "MIT" ]
1
2020-10-12T13:33:29.000Z
2020-10-12T13:33:29.000Z
PythonTricks/ch02_05.py
eroicaleo/LearningPython
297d46eddce6e43ce0c160d2660dff5f5d616800
[ "MIT" ]
null
null
null
PythonTricks/ch02_05.py
eroicaleo/LearningPython
297d46eddce6e43ce0c160d2660dff5f5d616800
[ "MIT" ]
1
2016-11-09T07:28:45.000Z
2016-11-09T07:28:45.000Z
#!/usr/bin/env python errno = 50159747054 name = 'Bob' print('Hello, %s there is a 0x%x error' % (name, errno)) str_ = 'Hello, %(name)s there is a 0x%(errno)x error' % {'name': name, 'errno': errno} print('Dictionary in old style') print(str_) print('New style') str_ = 'Hey {name}, there is a 0x{errno:x} error'.form...
22.789474
86
0.675135
#!/usr/bin/env python errno = 50159747054 name = 'Bob' print('Hello, %s there is a 0x%x error' % (name, errno)) str_ = 'Hello, %(name)s there is a 0x%(errno)x error' % {'name': name, 'errno': errno} print('Dictionary in old style') print(str_) print('New style') str_ = 'Hey {name}, there is a 0x{errno:x} error'.form...
0
0
0
55
0
56
0
0
45
4fbdd5c5f08245df3d8a02e02c4e4bff4288a8f2
7,642
py
Python
ka_sushi_chef.py
learningequality/sushi-chef-khan-academy-legacy
18895b3306b04b4c9ef702537886c362f13a15f8
[ "BSD-2-Clause" ]
1
2017-03-06T20:01:16.000Z
2017-03-06T20:01:16.000Z
ka_sushi_chef.py
learningequality/sushi-chef-khan-academy-legacy
18895b3306b04b4c9ef702537886c362f13a15f8
[ "BSD-2-Clause" ]
2
2017-07-11T14:37:12.000Z
2017-08-31T00:31:16.000Z
ka_sushi_chef.py
learningequality/sushi-chef-khan-academy-legacy
18895b3306b04b4c9ef702537886c362f13a15f8
[ "BSD-2-Clause" ]
2
2017-05-23T18:37:01.000Z
2017-07-11T14:00:04.000Z
#!/usr/bin/env python3 import re import os FILE_URL_REGEX = re.compile('[\\\]*/content[\\\]*/assessment[\\\]*/khan[\\\]*/(?P<build_path>\w+)[\\\]*/(?P<filename>\w+)\.?(?P<ext>\w+)?', flags=re.IGNORECASE) REPLACE_STRING = "/content/assessment/khan" cwd = os.getcwd() IMAGE_DL_LOCATION = 'file://' + cwd + '/build' # re...
37.831683
160
0.630463
#!/usr/bin/env python3 from le_utils.constants.languages import getlang from html2text import html2text from le_utils.constants import licenses from ricecooker.chefs import SushiChef from ricecooker.classes.nodes import (ChannelNode, ExerciseNode, VideoNode, TopicNode) from ricecooker.classes.questions import PerseusQu...
0
0
0
794
0
5,693
0
190
355
9662ebee899c985c2117e02e170dc3bc7a4e45d3
6,528
py
Python
train_shape.py
hyunynim/im2avatar
db7f01b79f7edf200815351b6d5821044605c0fd
[ "MIT" ]
null
null
null
train_shape.py
hyunynim/im2avatar
db7f01b79f7edf200815351b6d5821044605c0fd
[ "MIT" ]
null
null
null
train_shape.py
hyunynim/im2avatar
db7f01b79f7edf200815351b6d5821044605c0fd
[ "MIT" ]
null
null
null
import tensorflow as tf import os import sys sys.path.append('./utils') sys.path.append('./models') import dataset as dataset FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_string('train_dir', './train_shape', """Directory where to write summaries and checkpoint.""") tf.app.flags.DEFINE_str...
35.286486
115
0.641544
import tensorflow as tf import numpy as np import os import sys sys.path.append('./utils') sys.path.append('./models') import dataset as dataset import model_shape as model FLAGS = tf.app.flags.FLAGS tf.app.flags.DEFINE_string('train_dir', './train_shape', """Directory where to write summar...
0
0
0
0
0
4,498
0
3
161
1d95f5acc35411469a522acb65a89b4ab28ba474
196
py
Python
Phase-2/File I/O/Day-81.py
CodedLadiesInnovateTech/python-challenges
22ce26c68fea6c7c243ada831e47c52e27a62127
[ "MIT" ]
11
2020-05-11T08:41:21.000Z
2022-02-27T08:21:37.000Z
Phase-2/File I/O/Day-81.py
CodedLadiesInnovateTech/python-challenges
22ce26c68fea6c7c243ada831e47c52e27a62127
[ "MIT" ]
9
2020-05-12T10:46:06.000Z
2020-05-28T17:37:19.000Z
Phase-2/File I/O/Day-81.py
CodedLadiesInnovateTech/python-challenges
22ce26c68fea6c7c243ada831e47c52e27a62127
[ "MIT" ]
44
2020-05-10T20:53:32.000Z
2021-04-25T18:47:08.000Z
''' 1. Write a Python program to count the frequency of words in a file. 2. Write a Python program to get the file size of a plain file. 3. Write a Python program to write a list to a file. '''
24.5
68
0.714286
''' 1. Write a Python program to count the frequency of words in a file. 2. Write a Python program to get the file size of a plain file. 3. Write a Python program to write a list to a file. '''
0
0
0
0
0
0
0
0
0
71a89d1996d2aa8ee13172800d5e89440805c0fe
497
py
Python
cooltools/lib/schemas.py
gfudenberg/cooltools
2c5efcfa2810414f5e1cfeba8806b23d626abaa2
[ "MIT" ]
39
2017-10-15T02:59:32.000Z
2020-09-15T21:53:56.000Z
cooltools/lib/schemas.py
gfudenberg/cooltools
2c5efcfa2810414f5e1cfeba8806b23d626abaa2
[ "MIT" ]
131
2017-09-05T15:56:24.000Z
2020-09-22T13:23:54.000Z
cooltools/lib/schemas.py
gfudenberg/cooltools
2c5efcfa2810414f5e1cfeba8806b23d626abaa2
[ "MIT" ]
29
2017-04-29T23:06:28.000Z
2020-08-28T19:14:23.000Z
# schemas of datastructures commonly used in cooltools # including description DataFrame dtypes/columns definitions diag_expected_dtypes = { "region1": "string", "region2": "string", "dist": "Int64", "n_valid": "Int64", } block_expected_dtypes = { "region1": "string", "region2": "string", "...
26.157895
60
0.696177
# schemas of datastructures commonly used in cooltools # including description DataFrame dtypes/columns definitions diag_expected_dtypes = { "region1": "string", "region2": "string", "dist": "Int64", "n_valid": "Int64", } block_expected_dtypes = { "region1": "string", "region2": "string", "...
0
0
0
0
0
0
0
0
0
5b1f944c259348909d9715384fcdb670f50fd714
4,087
py
Python
cfod/routines/waterfaller.py
chime-frb-open-data/chime-frb-data
3695e4d151bbf3816c78edacba05bf78e4df9b66
[ "MIT" ]
null
null
null
cfod/routines/waterfaller.py
chime-frb-open-data/chime-frb-data
3695e4d151bbf3816c78edacba05bf78e4df9b66
[ "MIT" ]
null
null
null
cfod/routines/waterfaller.py
chime-frb-open-data/chime-frb-data
3695e4d151bbf3816c78edacba05bf78e4df9b66
[ "MIT" ]
null
null
null
import logging logging.basicConfig(format="%(levelname)s:%(message)s") log = logging.getLogger(__name__)
30.5
88
0.57059
import logging from typing import Optional import numpy as np from cfod.analysis import waterfall logging.basicConfig(format="%(levelname)s:%(message)s") log = logging.getLogger(__name__) class Waterfaller: def __init__(self, filename: str) -> None: """ Initialize the Waterfaller. Para...
0
584
0
3,288
0
0
0
17
91
f2a4fc57cbb0e9ef5c1f8c0631673d77e74ff400
1,223
py
Python
examples/random_env_test.py
JimmyMVP/plain_rl
4780f05fffb62533a339197b49de487cdc9d9954
[ "MIT" ]
10
2018-03-18T21:27:59.000Z
2020-08-13T20:15:05.000Z
examples/random_env_test.py
JimmyMVP/plain_rl
4780f05fffb62533a339197b49de487cdc9d9954
[ "MIT" ]
1
2018-03-19T09:51:04.000Z
2018-03-19T10:11:02.000Z
examples/random_env_test.py
JimmyMVP/plain_rl
4780f05fffb62533a339197b49de487cdc9d9954
[ "MIT" ]
3
2018-03-10T09:17:10.000Z
2019-12-17T20:19:56.000Z
from torch_rl.envs import GoalEnv, GoalEnvLogger, EnvLogger import gym from torch_rl import config from torch_rl.utils import logger from tqdm import tqdm import numpy as np addarg('--env', type=bool, default='OsimArm2D-v1') p = parser.parse_args() env_name = p.env if 'Osim' in env_name: env = make_osim(env_na...
25.479167
205
0.753884
from torch_rl.envs import GoalEnv, GoalEnvLogger, EnvLogger, RunningMeanStdNormalize import gym import roboschool import torch_rl.envs from torch_rl import config from torch_rl.utils import logger from tqdm import tqdm import numpy as np import argparse from torch_rl.utils import * addarg('--env', type=bool, default...
0
0
0
0
0
0
0
21
88
7c61763138bf1c61698b6baa9426e28900cd8be4
39,117
py
Python
openid/test/test_message.py
ticosax/python3-openid
9ffbcaade433f143ea1dfbf16fed78af8bdffdc0
[ "Apache-2.0" ]
null
null
null
openid/test/test_message.py
ticosax/python3-openid
9ffbcaade433f143ea1dfbf16fed78af8bdffdc0
[ "Apache-2.0" ]
null
null
null
openid/test/test_message.py
ticosax/python3-openid
9ffbcaade433f143ea1dfbf16fed78af8bdffdc0
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- import urllib.request import urllib.parse import unittest if __name__ == '__main__': unittest.main()
36.421788
163
0.59455
# -*- coding: utf-8 -*- from openid import message from openid import oidutil from openid.extensions import sreg import urllib.request import urllib.parse import urllib.error import unittest def mkGetArgTest(ns, key, expected=None): def test(self): a_default = object() self.assertEqual(self.msg.g...
48
0
0
38,102
0
582
0
21
249
e4768bda96c6a203979b2dbd61a8aa55e656e4b8
411
py
Python
api/migrations/0040_auto_20181104_1927.py
minneapolis-edu/web-autograder
96e8e976166576a396ac7b6f6fb978d62c20d665
[ "Unlicense" ]
1
2019-02-27T00:38:08.000Z
2019-02-27T00:38:08.000Z
api/migrations/0040_auto_20181104_1927.py
minneapolis-edu/web-autograder
96e8e976166576a396ac7b6f6fb978d62c20d665
[ "Unlicense" ]
5
2020-02-11T23:32:47.000Z
2022-03-02T02:54:52.000Z
api/migrations/0040_auto_20181104_1927.py
minneapolis-edu/web-autograder
96e8e976166576a396ac7b6f6fb978d62c20d665
[ "Unlicense" ]
null
null
null
# Generated by Django 2.1.1 on 2018-11-05 01:27
21.631579
81
0.608273
# Generated by Django 2.1.1 on 2018-11-05 01:27 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('api', '0039_auto_20181104_1029'), ] operations = [ migrations.AlterField( model_name='grade', name='score', ...
0
0
0
297
0
0
0
19
46
d9d00bbb6bd9cf62001dd764d1228de753ffd5a8
3,063
py
Python
samples/samplenetconf/cmds/show_lbifcfg.py
gaberger/pybvc
bf546c4595a1a6282fca084865c5a0e69194030f
[ "BSD-3-Clause" ]
null
null
null
samples/samplenetconf/cmds/show_lbifcfg.py
gaberger/pybvc
bf546c4595a1a6282fca084865c5a0e69194030f
[ "BSD-3-Clause" ]
1
2021-03-26T00:46:31.000Z
2021-03-26T00:46:31.000Z
samples/samplenetconf/cmds/show_lbifcfg.py
gaberger/pybvc
bf546c4595a1a6282fca084865c5a0e69194030f
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/python """ Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, INC All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice,...
34.41573
87
0.719882
#!/usr/bin/python """ Copyright (c) 2015, BROCADE COMMUNICATIONS SYSTEMS, INC All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice,...
0
0
0
0
0
0
0
1
0
1d79c73bfb4bc5e943dd3bb78e1376edc851f272
709
py
Python
exemplo_39_sistema_operacional.py
alef123vinicius/Estudo_python
30b121d611f94eb5df9fbb41ef7279546143221b
[ "Apache-2.0" ]
null
null
null
exemplo_39_sistema_operacional.py
alef123vinicius/Estudo_python
30b121d611f94eb5df9fbb41ef7279546143221b
[ "Apache-2.0" ]
null
null
null
exemplo_39_sistema_operacional.py
alef123vinicius/Estudo_python
30b121d611f94eb5df9fbb41ef7279546143221b
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Feb 16 11:11:39 2021 @author: alef """ import os import sys import platform def uid(): """ uid() -> retorna a identificao do usurio corrente ou None se no for possvel identificar """ # Variveis de ambiente para cada # Sist...
22.15625
57
0.640339
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Tue Feb 16 11:11:39 2021 @author: alef """ import os import sys import platform def uid(): """ uid() -> retorna a identificação do usuário corrente ou None se não for possível identificar """ # Variáveis de ambiente para cada ...
22
0
0
0
0
0
0
0
0
86e7f2a00b6864bbd8663f7ec9dc121293495f86
847
py
Python
monolith/main.py
michaelsusanto81/tweetream
bd8baa8b858dacade0f0160693b0d43580fe2100
[ "MIT" ]
null
null
null
monolith/main.py
michaelsusanto81/tweetream
bd8baa8b858dacade0f0160693b0d43580fe2100
[ "MIT" ]
null
null
null
monolith/main.py
michaelsusanto81/tweetream
bd8baa8b858dacade0f0160693b0d43580fe2100
[ "MIT" ]
null
null
null
from flask import Flask from flask_socketio import SocketIO from streamer import Stream, auth, preprocessor, clf_path app = Flask(__name__) socketio = SocketIO(app) if __name__ == '__main__': # Create stream object with given credentials global stream stream = Stream(auth, preprocessor, clf_path, socketio...
25.666667
59
0.695396
from flask import Flask, render_template, request from flask_socketio import SocketIO, emit, disconnect from streamer import Stream, auth, preprocessor, clf_path app = Flask(__name__) socketio = SocketIO(app) @app.route('/', methods=['GET']) def index(): return render_template('index.html') @socketio.on('connect...
0
249
0
0
0
0
0
44
69
a4d2b8d17c9b33a3ea06f84d2c584156b9296537
84
py
Python
CodeUp/6043.py
chae-heechan/Algorithm_Study
183a77e2cfe352cd82fb5e988b493082529a73dd
[ "MIT" ]
null
null
null
CodeUp/6043.py
chae-heechan/Algorithm_Study
183a77e2cfe352cd82fb5e988b493082529a73dd
[ "MIT" ]
null
null
null
CodeUp/6043.py
chae-heechan/Algorithm_Study
183a77e2cfe352cd82fb5e988b493082529a73dd
[ "MIT" ]
null
null
null
# 2 a, b = map(float, input().split()) print(format(a/b, ".3f"))
28
34
0.607143
# 실수 2개 입력받아 나눈 결과 계산하기 a, b = map(float, input().split()) print(format(a/b, ".3f"))
45
0
0
0
0
0
0
0
0
f55113437a30659fd6d03e228d6ae98f6706f32d
480
py
Python
10 Days of Statistics/Spearman's Rank Correlation Coefficient.py
adi-797/10-Days-of-Statistics-Hackerrank
f603db45ad1485fdcac5488557f51a793d950b54
[ "MIT" ]
2
2018-08-29T13:51:11.000Z
2018-08-31T17:06:38.000Z
10 Days of Statistics/Spearman's Rank Correlation Coefficient.py
adi-797/10-Days-of-Statistics-Hackerrank
f603db45ad1485fdcac5488557f51a793d950b54
[ "MIT" ]
null
null
null
10 Days of Statistics/Spearman's Rank Correlation Coefficient.py
adi-797/10-Days-of-Statistics-Hackerrank
f603db45ad1485fdcac5488557f51a793d950b54
[ "MIT" ]
null
null
null
from __future__ import division # Enter your code here. Read input from STDIN. Print output to STDOUT N = int(raw_input()) X = map(float, raw_input().strip().split(' ')) Y = map(float, raw_input().strip().split(' ')) rankX = rank(X) rankY = rank(Y) di = [(rX - rY) ** 2 for rX, rY in zip(rankX, rankY)] ans = 1 - (6 * ...
26.666667
69
0.61875
from __future__ import division # Enter your code here. Read input from STDIN. Print output to STDOUT N = int(raw_input()) X = map(float, raw_input().strip().split(' ')) Y = map(float, raw_input().strip().split(' ')) def rank(Arr): sortedArr = sorted(Arr) ranks = [sortedArr.index(x)+1 for x in Arr] return ...
0
0
0
0
0
86
0
0
23
cb05c23869d377ea6206630260a85ed751ceacdd
29,844
py
Python
Taiyou/Library/CoreContentManager/__init__.py
aragubas/taiyou-framework
9ed441a90976795e684939e6c0af56610829ae7f
[ "Apache-2.0" ]
4
2020-11-04T15:33:06.000Z
2021-11-08T11:45:13.000Z
Taiyou/Library/CoreContentManager/__init__.py
aragubas/taiyou-framework
9ed441a90976795e684939e6c0af56610829ae7f
[ "Apache-2.0" ]
null
null
null
Taiyou/Library/CoreContentManager/__init__.py
aragubas/taiyou-framework
9ed441a90976795e684939e6c0af56610829ae7f
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python3.8 # Copyright 2020 Aragubas # # 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...
34.905263
232
0.595564
#!/usr/bin/python3.8 # Copyright 2020 Aragubas # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
0
0
0
28,597
0
123
0
43
178
1ac3521e3726bef7bfdcd523f0bb6716b8925ef6
197
py
Python
rating/config.py
akudja238/Student_Rating_Flask
7affb3fc1c408593bacef09b55fa46dccbc6d27b
[ "MIT" ]
null
null
null
rating/config.py
akudja238/Student_Rating_Flask
7affb3fc1c408593bacef09b55fa46dccbc6d27b
[ "MIT" ]
null
null
null
rating/config.py
akudja238/Student_Rating_Flask
7affb3fc1c408593bacef09b55fa46dccbc6d27b
[ "MIT" ]
null
null
null
import os basedir = os.path.abspath(os.path.dirname(__file__)) SECRET_KEY = 's5df46sf46s46dfgvfbfbfhGFGFGFB56BF' SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, '..', 'rating.db')
28.142857
81
0.746193
import os basedir = os.path.abspath(os.path.dirname(__file__)) SECRET_KEY = 's5df46sf46s46dfgvfbfbfhGFGFGFB56BF' SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, '..', 'rating.db')
0
0
0
0
0
0
0
0
0
0d6ecca665e807e04a51b3326990e22d220f99ee
5,265
py
Python
main.py
ZZENTX/FortniteAPI-Auth
53318cf222bf19a85584fd7631c4c73bce957d84
[ "MIT" ]
1
2022-03-31T22:44:07.000Z
2022-03-31T22:44:07.000Z
main.py
ZZENTX/FortniteAPI-Auth
53318cf222bf19a85584fd7631c4c73bce957d84
[ "MIT" ]
null
null
null
main.py
ZZENTX/FortniteAPI-Auth
53318cf222bf19a85584fd7631c4c73bce957d84
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- import time import webbrowser # Device creation and authorization # Extracting code from a string if __name__ == '__main__': print("Now the site will open in your browser, after authorization, paste the entire line.") time.sleep(3) webbrowser.open(endpoints.redirect, new=2) line = input(...
27
256
0.709212
# -*- coding: utf-8 -*- import os import time import requests import datetime import webbrowser class endpoints: token = "https://account-public-service-prod.ol.epicgames.com/account/api/oauth/token" redirect = "https://www.epicgames.com/id/logout?redirectUrl=https%3A//www.epicgames.com/id/login%3FredirectUrl%3Dhtt...
0
0
0
643
0
3,622
0
-24
249
ca054730d2ac34bae848e4b0b5be37c6313bf02f
465
py
Python
11.Learning Python - JM/01.Basic/classes.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
3
2020-06-01T04:17:18.000Z
2020-12-18T03:05:55.000Z
11.Learning Python - JM/01.Basic/classes.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
1
2020-04-25T08:01:59.000Z
2020-04-25T08:01:59.000Z
11.Learning Python - JM/01.Basic/classes.py
ptyadana/python-dojo
98c7234b84f0afea99a091c7198342d66bbdff5b
[ "MIT" ]
7
2020-04-26T10:02:36.000Z
2021-06-08T05:12:46.000Z
# # Example file for working with classes # if __name__ == "__main__": main()
16.607143
46
0.63871
# # Example file for working with classes # class Person(): def greet(self): print("Hello...") def walk(self, direction): print(f"I am walking towards {direction}") class Programmer(Person): def code(self, language): print(f"I am coding in {language}") def main(): person = Person() person.gree...
0
0
0
184
0
129
0
0
69
d27ac970bedcbe00e7ad48fbe2115a7b5d9f4304
1,250
py
Python
src/libs/device/ui/wizard.py
VirtualVFix/AndroidTestFramework
1feb769c6aca39a78e6daefd6face0a1e4d62cd4
[ "MIT" ]
null
null
null
src/libs/device/ui/wizard.py
VirtualVFix/AndroidTestFramework
1feb769c6aca39a78e6daefd6face0a1e4d62cd4
[ "MIT" ]
null
null
null
src/libs/device/ui/wizard.py
VirtualVFix/AndroidTestFramework
1feb769c6aca39a78e6daefd6face0a1e4d62cd4
[ "MIT" ]
null
null
null
# All rights reserved by forest fairy. # You cannot modify or share anything without sacrifice. # If you don't agree, keep calm and don't look at code bellow! __author__ = "VirtualV <https://github.com/virtualvfix>" __date__ = "Sep 18, 2017 2:32:42 PM"
36.764706
88
0.68
# All rights reserved by forest fairy. # You cannot modify or share anything without sacrifice. # If you don't agree, keep calm and don't look at code bellow! __author__ = "VirtualV <https://github.com/virtualvfix>" __date__ = "Sep 18, 2017 2:32:42 PM" from config import CONFIG from libs.core.logger import getLogger ...
0
0
0
762
0
0
0
99
134
d4ba8c74d7353e112c8f275fb6d3989d21755175
969
py
Python
scripts/extract-sentences.py
vishalbelsare/graphbrain
efad1f96dcb616595b13bd4e3ada806862fe7de7
[ "MIT" ]
412
2016-02-20T12:04:34.000Z
2022-03-30T21:07:39.000Z
scripts/extract-sentences.py
vishalbelsare/graphbrain
efad1f96dcb616595b13bd4e3ada806862fe7de7
[ "MIT" ]
20
2018-09-21T13:47:59.000Z
2021-04-10T04:21:30.000Z
scripts/extract-sentences.py
vishalbelsare/graphbrain
efad1f96dcb616595b13bd4e3ada806862fe7de7
[ "MIT" ]
51
2017-01-25T17:19:30.000Z
2022-03-29T07:32:53.000Z
from graphbrain.cli import wrapper if __name__ == '__main__': wrapper(extract_sentences, text='extract sentences')
30.28125
78
0.596491
import random from graphbrain.cli import wrapper from graphbrain.parsers import create_parser def extract_sentences(args): parser = create_parser(lang=args.lang, parser_class=args.parser) sentences = [] count = 0 with open(args.infile, 'r') as infile, open(args.outfile, 'w') as outfile: for ...
0
0
0
0
0
764
0
15
67
a5a33dea8bd9422b68bbad8193bf16db9d34c338
1,690
py
Python
departure/provider/nexus/server.py
Woll78/departure-python
86eccd40291ad560d5859a120dd6c99aa5c4bd12
[ "MIT" ]
null
null
null
departure/provider/nexus/server.py
Woll78/departure-python
86eccd40291ad560d5859a120dd6c99aa5c4bd12
[ "MIT" ]
null
null
null
departure/provider/nexus/server.py
Woll78/departure-python
86eccd40291ad560d5859a120dd6c99aa5c4bd12
[ "MIT" ]
null
null
null
import logging from fastapi import APIRouter logger = logging.getLogger(__name__) router = APIRouter() # debugging only # curl -X POST http://localhost:8000/nexus/start-client -d {\"code\":\"vic\"}
24.142857
77
0.669822
import threading import time import logging from fastapi import APIRouter from pydantic import BaseModel from starlette.requests import Request from . import nexus, commons, view_model, data_updater logger = logging.getLogger(__name__) router = APIRouter() class Stop(BaseModel): code: str @router.get("/sear...
0
1,223
0
15
0
0
0
44
201
40f82ac020b4b9baf22e5bd230ec2bf575198283
482
py
Python
examples/example.py
sako0938/imp-grpc-client
3ca0380ef7481f261684d0f22e1985189a9ec7c9
[ "MIT" ]
null
null
null
examples/example.py
sako0938/imp-grpc-client
3ca0380ef7481f261684d0f22e1985189a9ec7c9
[ "MIT" ]
null
null
null
examples/example.py
sako0938/imp-grpc-client
3ca0380ef7481f261684d0f22e1985189a9ec7c9
[ "MIT" ]
null
null
null
from pprint import pprint # Pip installed Modules from impgrpc import IMPClient from protobuf_to_dict import protobuf_to_dict node_ip = "127.0.0.1" imp = IMPClient( f"{node_ip}:8881" ) node_ip = "127.0.0.1" imp = IMPClient( f"{node_ip}:9991" ) for i in imp.subscribe(): print(f"Amount Spent: {i.amount} \n\n"...
15.0625
45
0.744813
from pathlib import Path import json from pprint import pprint import os import base64 from time import sleep from datetime import datetime, timedelta # Pip installed Modules from impgrpc import IMPClient from protobuf_to_dict import protobuf_to_dict node_ip = "127.0.0.1" imp = IMPClient( f"{node_ip}:8881" ) nod...
0
0
0
0
0
0
0
-7
132
4a9aa90a8634dca8fc77573ea98be46bc37041f3
36,754
py
Python
greengo/greengo.py
syed/greengo
f759a2d03147f384f299b699abd19f46c44243ad
[ "MIT" ]
null
null
null
greengo/greengo.py
syed/greengo
f759a2d03147f384f299b699abd19f46c44243ad
[ "MIT" ]
null
null
null
greengo/greengo.py
syed/greengo
f759a2d03147f384f299b699abd19f46c44243ad
[ "MIT" ]
null
null
null
import os import yaml import logging logging.basicConfig( format='%(asctime)s|%(name).10s|%(levelname).5s: %(message)s', level=logging.WARNING) log = logging.getLogger('greengo') log.setLevel(logging.DEBUG) DEFINITION_FILE = 'greengo.yaml' MAGIC_DIR = '.gg' STATE_FILE = os.path.join(MAGIC_DIR, 'gg_state.json...
37.929825
145
0.574305
import os import errno import fire import json import yaml import shutil import urllib from time import sleep import logging from boto3 import session from botocore.exceptions import ClientError logging.basicConfig( format='%(asctime)s|%(name).10s|%(levelname).5s: %(message)s', level=logging.WARNING) log = log...
0
0
0
33,524
0
2,101
0
-18
383
e6f0e1ef9d158dd2a4c7a3087599962003a0e4de
3,879
py
Python
python/pygimli/physics/traveltime/FMM2layer.py
mjziebarth/gimli
196ac4d6dd67e0326cccc44a87b367f64051e490
[ "Apache-2.0" ]
3
2021-07-10T00:56:59.000Z
2022-02-17T12:43:38.000Z
python/pygimli/physics/traveltime/FMM2layer.py
ivek1312/gimli
5fafebb7c96dd0e04e2616df402fa27a01609d63
[ "Apache-2.0" ]
null
null
null
python/pygimli/physics/traveltime/FMM2layer.py
ivek1312/gimli
5fafebb7c96dd0e04e2616df402fa27a01609d63
[ "Apache-2.0" ]
1
2022-03-29T04:28:40.000Z
2022-03-29T04:28:40.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- """Fast Marching test using a two-layer model.""" import time from math import asin, tan import numpy as np import matplotlib.pyplot as plt import pygimli as pg from pygimli.mplviewer import drawMesh, drawField, drawStreamLines from pygimli.physics.traveltime import fastM...
32.057851
78
0.60067
#!/usr/bin/env python # -*- coding: utf-8 -*- """Fast Marching test using a two-layer model.""" import time from math import asin, tan import numpy as np import matplotlib.pyplot as plt import pygimli as pg from pygimli.mplviewer import drawMesh, drawField, drawStreamLines from pygimli.physics.traveltime import fastM...
0
0
0
0
0
0
0
0
0
14b97377bed66ea633851daaf58b134e192dde93
908
py
Python
code/OH.py
alexmill/covid19demographics-fall
b53708883a0c091f7e4eaef3d270153d88fe11f9
[ "MIT" ]
null
null
null
code/OH.py
alexmill/covid19demographics-fall
b53708883a0c091f7e4eaef3d270153d88fe11f9
[ "MIT" ]
null
null
null
code/OH.py
alexmill/covid19demographics-fall
b53708883a0c091f7e4eaef3d270153d88fe11f9
[ "MIT" ]
2
2020-09-24T01:01:11.000Z
2020-10-06T19:17:43.000Z
import datetime # To download the docx file, run a command along the following lines: # # curl https://www.mass.gov/doc/covid-19-cases-in-massachusetts-as-of-march-27-2020-accessible/download > 3-27-20.docx # # For some reason, docx files were not available for some dates. Then, run the following command to get the PD...
39.478261
123
0.692731
import os import datetime # To download the docx file, run a command along the following lines: # # curl https://www.mass.gov/doc/covid-19-cases-in-massachusetts-as-of-march-27-2020-accessible/download > 3-27-20.docx # # For some reason, docx files were not available for some dates. Then, run the following command to ...
0
0
0
0
0
203
0
-12
45
31e50e926eee0f504cfb6e664762d7178abb9f0a
452
py
Python
rich/themes.py
AbhishekSinhaCoder/rich
242770ed7dc95acac309bffaeb07e585ebd2c135
[ "MIT" ]
null
null
null
rich/themes.py
AbhishekSinhaCoder/rich
242770ed7dc95acac309bffaeb07e585ebd2c135
[ "MIT" ]
null
null
null
rich/themes.py
AbhishekSinhaCoder/rich
242770ed7dc95acac309bffaeb07e585ebd2c135
[ "MIT" ]
null
null
null
from .theme import Theme DEFAULT = Theme( (255, 255, 255), (0, 0, 0), [ (0, 0, 0), (128, 0, 0), (0, 128, 0), (128, 128, 0), (0, 0, 128), (128, 0, 128), (0, 128, 128), (192, 192, 192), (128, 128, 128), (255, 0, 0), (0, 2...
18.08
24
0.323009
from .theme import Theme DEFAULT = Theme( (255, 255, 255), (0, 0, 0), [ (0, 0, 0), (128, 0, 0), (0, 128, 0), (128, 128, 0), (0, 0, 128), (128, 0, 128), (0, 128, 128), (192, 192, 192), (128, 128, 128), (255, 0, 0), (0, 2...
0
0
0
0
0
0
0
0
0
02a31ff1038e36e1ecceeba0613572e9294d89d4
1,342
py
Python
yozuch/project_init.py
akrylysov/yozuch
0eb6206c8c2fff806a8901456cfc4cc338052a95
[ "BSD-3-Clause" ]
32
2015-02-01T16:35:21.000Z
2022-03-14T00:50:32.000Z
yozuch/project_init.py
akrylysov/yozuch
0eb6206c8c2fff806a8901456cfc4cc338052a95
[ "BSD-3-Clause" ]
6
2015-06-19T10:58:35.000Z
2019-04-07T16:38:01.000Z
yozuch/project_init.py
akrylysov/yozuch
0eb6206c8c2fff806a8901456cfc4cc338052a95
[ "BSD-3-Clause" ]
1
2017-01-21T18:51:11.000Z
2017-01-21T18:51:11.000Z
""" Project creator. """
29.822222
119
0.649031
""" Project creator. """ import os import shutil import datetime from yozuch import config, logger from yozuch.utils import makedirs def init(project_dir): makedirs(project_dir) # Create dirs dirs = [ 'assets', 'documents', 'posts', 'templates', ] for dir_name in...
0
0
0
0
0
1,184
0
-2
134
2b20cb14bcb71340705cf1b5770949aa141f9fae
9,028
py
Python
self_deblur_net/model_self_deblur_net.py
adityakrishnavamsy/SelfDeblur
29d02605d64faf8428f4c862d8e004a85c2cd719
[ "MIT" ]
104
2020-02-09T00:58:00.000Z
2022-03-23T07:59:56.000Z
self_deblur_net/model_self_deblur_net.py
adityakrishnavamsy/SelfDeblur
29d02605d64faf8428f4c862d8e004a85c2cd719
[ "MIT" ]
5
2020-03-06T04:21:41.000Z
2022-03-21T01:04:05.000Z
self_deblur_net/model_self_deblur_net.py
adityakrishnavamsy/SelfDeblur
29d02605d64faf8428f4c862d8e004a85c2cd719
[ "MIT" ]
18
2020-02-10T13:02:46.000Z
2021-09-05T14:45:54.000Z
import torch.nn as nn
48.021277
135
0.558817
import torch import numpy as np import torch.nn as nn from model_base import * from net_deblur import * from net_pwc import* from reblur_package import * from flow_utils import * from image_proc import * from losses import * class ModelSelfDeblurNet(ModelBase): def __init__(self, opts): super(ModelSelfDeb...
0
0
0
8,779
0
0
0
5
222
ffad2f1f175c4899e3cd5c8d844f863a90ad9379
719
py
Python
build/vrpn_client_ros/catkin_generated/pkg.develspace.context.pc.py
thori1222/an_hori_project
9fca623f76cc2a65611ec57a07de221b29969e58
[ "MIT" ]
null
null
null
build/vrpn_client_ros/catkin_generated/pkg.develspace.context.pc.py
thori1222/an_hori_project
9fca623f76cc2a65611ec57a07de221b29969e58
[ "MIT" ]
null
null
null
build/vrpn_client_ros/catkin_generated/pkg.develspace.context.pc.py
thori1222/an_hori_project
9fca623f76cc2a65611ec57a07de221b29969e58
[ "MIT" ]
null
null
null
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/thori/ccccc/src/vrpn_client_ros/include;/opt/ros/melodic/include".split(';') if "/home/thori/ccccc/src/vrpn_client_ros/include;/opt/ros/melodic/include" != "" else [] PROJECT_CATKIN_DEPENDS = "ge...
79.888889
254
0.76217
# generated from catkin/cmake/template/pkg.context.pc.in CATKIN_PACKAGE_PREFIX = "" PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/thori/ccccc/src/vrpn_client_ros/include;/opt/ros/melodic/include".split(';') if "/home/thori/ccccc/src/vrpn_client_ros/include;/opt/ros/melodic/include" != "" else [] PROJECT_CATKIN_DEPENDS = "ge...
0
0
0
0
0
0
0
0
0
e757fc67fe7b45c9c0cfb97b90a67ee170b5380a
3,543
py
Python
torchwi/propagator/td2d_base.py
pkgpl/TorchWI
772f2f26b2faf7487a1eec6b1c4821ebaf6dd44f
[ "MIT" ]
5
2020-11-04T07:24:01.000Z
2022-01-07T05:55:18.000Z
torchwi/propagator/td2d_base.py
pkgpl/TorchWI
772f2f26b2faf7487a1eec6b1c4821ebaf6dd44f
[ "MIT" ]
5
2021-04-28T05:34:28.000Z
2022-03-10T04:47:24.000Z
torchwi/propagator/td2d_base.py
pkgpl/TorchWI
772f2f26b2faf7487a1eec6b1c4821ebaf6dd44f
[ "MIT" ]
null
null
null
import numpy as np # 2nd order Keys boundary condition CT1 = np.cos(np.pi / 6.) CT2 = np.cos(np.pi / 12.) CM12 = CT1 * CT2 CP12 = CT1 + CT2
37.294737
134
0.393734
import numpy as np from numba import jit @jit def fdm_o2(up, uo, um, vel2, dtoh2, dimx, dimy): ne = 1 for i in range(ne, dimx - ne): for j in range(ne, dimy - ne): up[i, j] = vel2[i, j] * dtoh2 * (-4. * uo[i, j] + uo[i - 1, j] + uo[i + 1, j] + u...
0
3,211
0
0
0
0
0
0
183
e90a500108f17da8880d8256528e6b7dbc497fb2
3,577
py
Python
spacedrive/renderpipeline/toolkit/rp_distributor/main.py
croxis/SpaceDrive
3f610cf72002beb11e73a47c2f118e35ff2d9575
[ "MIT" ]
5
2016-01-02T05:23:37.000Z
2017-07-01T13:53:36.000Z
spacedrive/renderpipeline/toolkit/rp_distributor/main.py
croxis/SpaceDrive
3f610cf72002beb11e73a47c2f118e35ff2d9575
[ "MIT" ]
1
2016-06-28T08:43:59.000Z
2016-07-07T20:28:43.000Z
spacedrive/renderpipeline/toolkit/rp_distributor/main.py
croxis/SpaceDrive
3f610cf72002beb11e73a47c2f118e35ff2d9575
[ "MIT" ]
null
null
null
""" RP Distributor """ from __future__ import print_function import os import sys from os.path import join, dirname, realpath base_dir = realpath(dirname(__file__)) rp_dir = realpath(join(base_dir, "../../")) os.chdir(base_dir) sys.path.insert(0, rp_dir) ignores = [ # data "skybox-b...
26.301471
86
0.588762
""" RP Distributor """ from __future__ import print_function import re import os import sys import shutil from os.path import isfile, isdir, join, dirname, realpath, relpath base_dir = realpath(dirname(__file__)) rp_dir = realpath(join(base_dir, "../../")) os.chdir(base_dir) sys.path.insert(0,...
0
0
0
0
0
1,672
0
17
96
f3f3539a20a847797b3c06791176b66e9013a288
224
py
Python
tests/_common.py
cedadev/compliance-check-lib
7adb5eddb55cc3b9ade5d2c5a8b5dd898b147184
[ "BSD-3-Clause" ]
1
2020-04-16T18:40:29.000Z
2020-04-16T18:40:29.000Z
tests/_common.py
cedadev/compliance-check-lib
7adb5eddb55cc3b9ade5d2c5a8b5dd898b147184
[ "BSD-3-Clause" ]
5
2018-03-20T20:24:09.000Z
2022-02-09T09:12:13.000Z
tests/_common.py
cedadev/compliance-check-lib
7adb5eddb55cc3b9ade5d2c5a8b5dd898b147184
[ "BSD-3-Clause" ]
2
2018-01-09T09:40:54.000Z
2020-06-25T10:49:39.000Z
from pathlib import Path COMP_CHECK_CV_REPO_DIR = Path.home() / ".comp-check-cvs-cache" COMP_CHECK_CV_CACHE_DIR = (COMP_CHECK_CV_REPO_DIR / "master" / "pyessv-archive-eg-cvs").as_posix() EG_DATA_DIR = "tests/example_data"
32
98
0.772321
from pathlib import Path COMP_CHECK_CV_REPO_DIR = Path.home() / ".comp-check-cvs-cache" COMP_CHECK_CV_CACHE_DIR = (COMP_CHECK_CV_REPO_DIR / "master" / "pyessv-archive-eg-cvs").as_posix() EG_DATA_DIR = "tests/example_data"
0
0
0
0
0
0
0
0
0
d0bc798b3f7e8aeda2d2236d3b7b6d9d1f6ee818
3,713
py
Python
app/gate/core/User.py
xiaomi2019/lolita_son
8205dff0d423aaedfa7fca8790d1d6fe50213e6e
[ "MIT" ]
null
null
null
app/gate/core/User.py
xiaomi2019/lolita_son
8205dff0d423aaedfa7fca8790d1d6fe50213e6e
[ "MIT" ]
null
null
null
app/gate/core/User.py
xiaomi2019/lolita_son
8205dff0d423aaedfa7fca8790d1d6fe50213e6e
[ "MIT" ]
2
2019-02-18T03:49:52.000Z
2020-03-03T16:42:02.000Z
#coding:utf8 ''' Created on 2011-3-23 @author: sean_lan ''' INITTOWN = 1700
28.782946
98
0.580932
#coding:utf8 ''' Created on 2011-3-23 @author: sean_lan ''' from app.share.dbopear import dbuser INITTOWN = 1700 from twisted.python import log class User: '''用户类''' def __init__(self, account,password,dynamicId = -1): ''' @param id: int 用户的id @param name: str用户的名称 @param...
354
0
0
3,409
0
0
0
24
67
0ba81039acb26d9558d10fffbd2cbecb7569a1a6
1,018
py
Python
examples/onedrive/export_files.py
AndersFreund/Office365-REST-Python-Client
98448bbe0d34dfe3d1a7a2005e0e730b92faae75
[ "MIT" ]
null
null
null
examples/onedrive/export_files.py
AndersFreund/Office365-REST-Python-Client
98448bbe0d34dfe3d1a7a2005e0e730b92faae75
[ "MIT" ]
null
null
null
examples/onedrive/export_files.py
AndersFreund/Office365-REST-Python-Client
98448bbe0d34dfe3d1a7a2005e0e730b92faae75
[ "MIT" ]
null
null
null
# -------------------------------------------------------------------------- # Example demonstrates how to export OneDrive files into local file system # -------------------------------------------------------------------------- import os import tempfile from examples import acquire_token_client_credentials from offi...
44.26087
102
0.6611
# -------------------------------------------------------------------------- # Example demonstrates how to export OneDrive files into local file system # -------------------------------------------------------------------------- import os import tempfile from examples import acquire_token_client_credentials from offi...
0
0
0
0
0
0
0
0
0
8c5234b972cdc82bef887cede65ae3390148821a
2,896
py
Python
wynn/recipe.py
Zakru/wynn.py
eb7b7872d8720e56f01c0baba0c1b8a243c62ec4
[ "MIT" ]
1
2019-11-18T14:36:14.000Z
2019-11-18T14:36:14.000Z
wynn/recipe.py
Zakru/wynn.py
eb7b7872d8720e56f01c0baba0c1b8a243c62ec4
[ "MIT" ]
1
2020-03-09T08:25:58.000Z
2020-03-09T08:38:42.000Z
wynn/recipe.py
Zakru/wynn.py
eb7b7872d8720e56f01c0baba0c1b8a243c62ec4
[ "MIT" ]
1
2021-07-31T19:11:19.000Z
2021-07-31T19:11:19.000Z
""" Copyright 2020 Zakru Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, ...
32.177778
72
0.684392
""" Copyright 2020 Zakru Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, ...
0
0
0
0
0
0
0
16
0
547fe4a11b26916be0435b8a6a1a0adb0c70910a
1,980
py
Python
tools/JsonSubSchema/test/i_jss_test.py
sdbs-uni-p/josch
1bca6b1b6c4a5b06ababa8e86625b5a337e6f5ea
[ "MIT" ]
1
2021-02-28T16:05:09.000Z
2021-02-28T16:05:09.000Z
tools/JsonSubSchema/test/i_jss_test.py
sdbs-uni-p/josch
1bca6b1b6c4a5b06ababa8e86625b5a337e6f5ea
[ "MIT" ]
null
null
null
tools/JsonSubSchema/test/i_jss_test.py
sdbs-uni-p/josch
1bca6b1b6c4a5b06ababa8e86625b5a337e6f5ea
[ "MIT" ]
null
null
null
import unittest import os import sys root = os.path.abspath(os.path.dirname(os.path.dirname(os.path.abspath( __file__)))) sys.path.append(root) if __name__ == '__main__': unittest.main()
37.358491
85
0.659091
import unittest import os import sys root = os.path.abspath(os.path.dirname(os.path.dirname(os.path.abspath( __file__)))) sys.path.append(root) from i_jss import _load_json_schema from i_jss import compare class IJssTest(unittest.TestCase): """ Tests the compare() function from i_jss with fixed schemas ...
0
0
0
1,695
0
0
0
18
68
f0286fb9c8154b59375275668fbe27379d43a878
16,087
py
Python
generate_model/covid19_configurable_temporal.py
aitoralmeida/lus_stratification
8153a2dd4ddd49bac8c7d36269762ddd9207d72f
[ "Apache-2.0" ]
1
2020-12-26T23:27:32.000Z
2020-12-26T23:27:32.000Z
generate_model/covid19_configurable_temporal.py
aitoralmeida/lus_stratification
8153a2dd4ddd49bac8c7d36269762ddd9207d72f
[ "Apache-2.0" ]
null
null
null
generate_model/covid19_configurable_temporal.py
aitoralmeida/lus_stratification
8153a2dd4ddd49bac8c7d36269762ddd9207d72f
[ "Apache-2.0" ]
null
null
null
import os import numpy as np import argparse from random import seed from tensorflow.random import set_seed from tensorflow.keras.layers import Dense, GlobalAveragePooling2D, TimeDistributed, LSTM, Input from tensorflow.keras.models import Model from tensorflow.keras.applications.mobilenet import MobileNet from tensorf...
38.577938
161
0.643128
import os import numpy as np import argparse from sklearn import metrics from random import shuffle, sample, seed import tensorflow as tf from tensorflow import keras from tensorflow.random import set_seed from tensorflow.keras.preprocessing import image from tensorflow.keras.layers import Dense, GlobalAveragePooling...
0
0
0
0
0
8,115
0
246
179
c5bef87f797892c505b596e494e765207c89d93c
252
py
Python
src/python/process_pool.py
nhatvu148/helpers
1a6875017cf39790dfe40ecec9dcee4410b1d89e
[ "MIT" ]
null
null
null
src/python/process_pool.py
nhatvu148/helpers
1a6875017cf39790dfe40ecec9dcee4410b1d89e
[ "MIT" ]
null
null
null
src/python/process_pool.py
nhatvu148/helpers
1a6875017cf39790dfe40ecec9dcee4410b1d89e
[ "MIT" ]
null
null
null
from multiprocessing import Pool if __name__ == '__main__': numbers = range(10) pool = Pool() result = pool.map(cube, numbers) pool.close() pool.join() print(result)
16.8
36
0.626984
from multiprocessing import Pool def cube(number): return number * number * number if __name__ == '__main__': numbers = range(10) pool = Pool() result = pool.map(cube, numbers) pool.close() pool.join() print(result)
0
0
0
0
0
32
0
0
23
f2a552cf78bf202f5b2ebf2748f188cf8f35d63f
57,017
py
Python
zabbixdocker/services/containers.py
bhuisgen/zabbix-docker
ab6d7c2a0d969ca86c59c2dfd670c4aae6bc6368
[ "MIT" ]
7
2017-03-13T09:46:53.000Z
2021-01-15T08:59:58.000Z
zabbixdocker/services/containers.py
bhuisgen/zabbix-docker
ab6d7c2a0d969ca86c59c2dfd670c4aae6bc6368
[ "MIT" ]
1
2019-11-22T14:11:35.000Z
2020-07-01T13:26:38.000Z
zabbixdocker/services/containers.py
bhuisgen/zabbix-docker
ab6d7c2a0d969ca86c59c2dfd670c4aae6bc6368
[ "MIT" ]
2
2021-08-09T16:12:17.000Z
2022-01-06T17:30:46.000Z
from __future__ import division
46.927572
120
0.459319
from __future__ import division import configparser import logging import os import queue import re import threading import time import docker from zabbixdocker.lib.zabbix import ZabbixMetric, ZabbixSender class DockerContainersService(threading.Thread): """ This class implements the service which sends contai...
0
0
0
56,616
0
0
0
-24
385
d0302d5fed2b756ebc6d4184bf360ffde3c7d71f
36,199
py
Python
osrefl/viewers/plot_2d.py
reflectometry/osrefl
ddf55d542f2eab2a29fd6ffc862379820a06d5c7
[ "BSD-3-Clause" ]
2
2015-05-21T15:16:46.000Z
2015-10-23T17:47:36.000Z
osrefl/viewers/plot_2d.py
reflectometry/osrefl
ddf55d542f2eab2a29fd6ffc862379820a06d5c7
[ "BSD-3-Clause" ]
null
null
null
osrefl/viewers/plot_2d.py
reflectometry/osrefl
ddf55d542f2eab2a29fd6ffc862379820a06d5c7
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- from pylab import figure import matplotlib.colors as colors import matplotlib.cbook as cbook #from binned_data_class3 import plottable_2d_data #from wxrebin3 import rebinned_data #import __main__
40.221111
182
0.574077
# -*- coding: utf-8 -*- from pylab import imshow,cm,colorbar,hot,show,xlabel,ylabel,connect, plot, figure, draw, axis, gcf,legend from numpy import ones, sum, arange, transpose, log import matplotlib.colors as colors from matplotlib.widgets import RectangleSelector from colormap import change_colormap from matplotlib....
0
0
0
35,152
0
0
0
425
399
b6993c772ff89c4e23ebd3bba5c1191957fdb922
519
py
Python
Cap_4/ex4.8.py
gguilherme42/Livro-de-Python
465a509d50476fd1a87239c71ed741639d58418b
[ "MIT" ]
4
2020-04-07T00:38:46.000Z
2022-03-10T03:34:42.000Z
Cap_4/ex4.8.py
gguilherme42/Livro-de-Python
465a509d50476fd1a87239c71ed741639d58418b
[ "MIT" ]
null
null
null
Cap_4/ex4.8.py
gguilherme42/Livro-de-Python
465a509d50476fd1a87239c71ed741639d58418b
[ "MIT" ]
1
2021-04-22T02:45:38.000Z
2021-04-22T02:45:38.000Z
soma = lambda x, y: x + y div = lambda x, y: x / y sub = lambda x, y: x - y mult = lambda x, y: x * y a, b = int(input('Nmero: ')), int(input('Nmero: ')) print(''' 1 - Soma 2 - Subtrao 3 - Diviso 4 - Multiplicao ''') resp = int(input('Digite um operao: ')) if resp == 1: print(f'Soma: {soma(a, b)}') elif resp == 2: ...
21.625
53
0.566474
soma = lambda x, y: x + y div = lambda x, y: x / y sub = lambda x, y: x - y mult = lambda x, y: x * y a, b = int(input('Número: ')), int(input('Número: ')) print(''' 1 - Soma 2 - Subtração 3 - Divisão 4 - Multiplicação ''') resp = int(input('Digite um operação: ')) if resp == 1: print(f'Soma: {soma(a, b)}') elif re...
34
0
0
0
0
0
0
0
0
67161f43a73a2eec998eceec417a4ac701a2b4a5
41
py
Python
main.py
florimondmanca/cython-hello
c3a8d335be932f2d5f46ad0a12b3881989f200fa
[ "MIT" ]
1
2020-02-20T15:16:37.000Z
2020-02-20T15:16:37.000Z
main.py
florimondmanca/cython-hello
c3a8d335be932f2d5f46ad0a12b3881989f200fa
[ "MIT" ]
null
null
null
main.py
florimondmanca/cython-hello
c3a8d335be932f2d5f46ad0a12b3881989f200fa
[ "MIT" ]
null
null
null
from hello import hello hello("Cython")
10.25
23
0.756098
from hello import hello hello("Cython")
0
0
0
0
0
0
0
0
0
4a73d890c5f3cd0dcfb5d3fd373f12fd08baa163
1,442
py
Python
webdev/fornecedores/migrations/0002_auto_20210430_2354.py
h-zanetti/jewelry-manager
74166b89f492303b8ebf5ff8af058f394eb2a28b
[ "MIT" ]
null
null
null
webdev/fornecedores/migrations/0002_auto_20210430_2354.py
h-zanetti/jewelry-manager
74166b89f492303b8ebf5ff8af058f394eb2a28b
[ "MIT" ]
103
2021-04-25T21:28:11.000Z
2022-03-15T01:36:31.000Z
webdev/fornecedores/migrations/0002_auto_20210430_2354.py
h-zanetti/jewelry-manager
74166b89f492303b8ebf5ff8af058f394eb2a28b
[ "MIT" ]
null
null
null
# Generated by Django 3.1.5 on 2021-05-01 02:54
31.347826
115
0.588072
# Generated by Django 3.1.5 on 2021-05-01 02:54 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('fornecedores', '0001_initial'), ] operations = [ migrations.AlterField( model_name='fornecedor', name='emails', ...
6
0
0
1,325
0
0
0
19
46
4f7f71fa9f4e88dc2518c03f9eafd20de0f8ea1e
30,139
py
Python
pcapkit/protocols/application/httpv2.py
JarryShaw/jspcap
9d4c980598e3c5e0af864044976f91b9b96e2e3e
[ "BSD-3-Clause" ]
3
2018-01-21T15:22:21.000Z
2018-06-22T01:27:59.000Z
pcapkit/protocols/application/httpv2.py
JarryShaw/jspcap
9d4c980598e3c5e0af864044976f91b9b96e2e3e
[ "BSD-3-Clause" ]
null
null
null
pcapkit/protocols/application/httpv2.py
JarryShaw/jspcap
9d4c980598e3c5e0af864044976f91b9b96e2e3e
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """hypertext transfer protocol (HTTP/2) :mod:`pcapkit.protocols.application.httpv2` contains :class:`~pcapkit.protocols.application.httpv2.HTTPv2` only, which implements extractor for Hypertext Transfer Protocol (HTTP/2) [*]_, whose structure is described as below: ======= ========= ==========...
36.71011
136
0.414081
# -*- coding: utf-8 -*- """hypertext transfer protocol (HTTP/2) :mod:`pcapkit.protocols.application.httpv2` contains :class:`~pcapkit.protocols.application.httpv2.HTTPv2` only, which implements extractor for Hypertext Transfer Protocol (HTTP/2) [*]_, whose structure is described as below: ======= ========= ==========...
0
703
0
26,049
0
0
0
1,564
557
efaac00ac5a650136f6ee54e7ed8215103034212
32,444
py
Python
sami/network.py
sami-dca/sami_dca
7cdc5151b04f01b2b3a291f896e446b8a4d3c1c2
[ "MIT" ]
2
2022-03-17T11:32:47.000Z
2022-03-18T09:56:26.000Z
sami/network.py
sami-dca/sami_dca
7cdc5151b04f01b2b3a291f896e446b8a4d3c1c2
[ "MIT" ]
5
2020-11-18T13:41:26.000Z
2021-12-20T10:39:45.000Z
sami/network.py
sami-dca/sami_dca
7cdc5151b04f01b2b3a291f896e446b8a4d3c1c2
[ "MIT" ]
1
2020-11-18T11:54:46.000Z
2020-11-18T11:54:46.000Z
# -*- coding: UTF8 -*- """ TODO: - Fix arguments of find_contact() - Implement PING protocol """
40.656642
120
0.586272
# -*- coding: UTF8 -*- """ TODO: - Fix arguments of find_contact() - Implement PING protocol """ import socket import random import logging from unittest import mock from typing import Tuple, Optional from json.decoder import JSONDecodeError from .node import Node from .config import Config fr...
0
0
0
31,720
0
0
0
237
376
fa896815a4a20dfbb71bab64ad52bcfde288176e
6,181
py
Python
huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/model/watermark_request.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
64
2020-06-12T07:05:07.000Z
2022-03-30T03:32:50.000Z
huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/model/watermark_request.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
11
2020-07-06T07:56:54.000Z
2022-01-11T11:14:40.000Z
huaweicloud-sdk-mpc/huaweicloudsdkmpc/v1/model/watermark_request.py
huaweicloud/huaweicloud-sdk-python-v3
7a6270390fcbf192b3882bf763e7016e6026ef78
[ "Apache-2.0" ]
24
2020-06-08T11:42:13.000Z
2022-03-04T06:44:08.000Z
# coding: utf-8
28.483871
120
0.602815
# coding: utf-8 import re import six from huaweicloudsdkcore.utils.http_utils import sanitize_for_serialization class WatermarkRequest: """ Attributes: openapi_types (dict): The key is attribute name and the value is attribute type. attribute_map (dict): The key i...
504
2,408
0
3,465
0
0
0
30
91
b94e62b7eedc9a86a2f74ea0389b028bb9c8b9f9
3,560
py
Python
Python/Arrays/ArrayMath/Max Sum Contiguous Subarray.py
rsamit26/Euler_Project
84b7045cc676f2c46fac01bbb155904b3d87e20f
[ "MIT" ]
20
2018-09-16T19:50:54.000Z
2022-02-13T17:04:16.000Z
Python/Arrays/ArrayMath/Max Sum Contiguous Subarray.py
rsamit26/Euler_Project
84b7045cc676f2c46fac01bbb155904b3d87e20f
[ "MIT" ]
1
2019-07-18T16:05:52.000Z
2019-08-13T04:11:59.000Z
Python/Arrays/ArrayMath/Max Sum Contiguous Subarray.py
rsamit26/Euler_Project
84b7045cc676f2c46fac01bbb155904b3d87e20f
[ "MIT" ]
16
2019-01-22T23:39:21.000Z
2022-02-21T17:59:46.000Z
""" Max Sum Contiguous Subarray Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example: Given the array [-2,1,-3,4,-1,2,1,-5,4], the contiguous subarray [4,-1,2,1] has the largest sum = 6. For this problem, return the maximum sum. """ """ Testing Cod...
53.939394
120
0.483146
""" Max Sum Contiguous Subarray Find the contiguous subarray within an array (containing at least one number) which has the largest sum. For example: Given the array [-2,1,-3,4,-1,2,1,-5,4], the contiguous subarray [4,-1,2,1] has the largest sum = 6. For this problem, return the maximum sum. """ class Solution: ...
0
0
0
267
0
0
0
0
23
173e6ba01b215aa3cea3740113e304ac4456e494
3,867
py
Python
src/direpack/preprocessing/_gsspp_utils.py
emmanueljordy/direpack
7daf047869234e2648d093d02c54532ea914e796
[ "MIT" ]
23
2020-04-04T20:48:25.000Z
2022-01-07T19:42:22.000Z
src/direpack/preprocessing/_gsspp_utils.py
emmanueljordy/direpack
7daf047869234e2648d093d02c54532ea914e796
[ "MIT" ]
8
2020-04-26T19:24:01.000Z
2021-05-20T13:29:31.000Z
src/direpack/preprocessing/_gsspp_utils.py
emmanueljordy/direpack
7daf047869234e2648d093d02c54532ea914e796
[ "MIT" ]
9
2020-04-11T11:25:16.000Z
2021-04-27T09:38:50.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 25 09:02:05 2020 @author: Sven Serneels, Ponalytics. Code for radial transform functions largely adapted from R code by Jakob Raymaekers """ import numpy as np def quad(dd, p, n): """ Computes the quadratic radial function args: ...
25.11039
90
0.573313
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Wed Mar 25 09:02:05 2020 @author: Sven Serneels, Ponalytics. Code for radial transform functions largely adapted from R code by Jakob Raymaekers """ import numpy as np def quad(dd, p, n): """ Computes the quadratic radial function args: ...
0
0
0
0
0
0
0
0
0
40cd998602a99e30923c7765047bd08472cfa975
369
py
Python
tests/bench/megatime.py
msaladna/mitogen
c6824b68181729cb16c090e72f4d35d6c4d95523
[ "BSD-3-Clause" ]
1,526
2017-09-15T18:49:40.000Z
2021-01-17T16:04:12.000Z
tests/bench/megatime.py
msaladna/mitogen
c6824b68181729cb16c090e72f4d35d6c4d95523
[ "BSD-3-Clause" ]
682
2017-09-11T17:43:12.000Z
2021-01-17T05:26:26.000Z
tests/bench/megatime.py
msaladna/mitogen
c6824b68181729cb16c090e72f4d35d6c4d95523
[ "BSD-3-Clause" ]
111
2017-09-15T23:21:37.000Z
2021-01-01T14:45:35.000Z
#!/usr/bin/env python import sys import os import mitogen.core times = [] for x in range(5): t0 = mitogen.core.now() os.spawnvp(os.P_WAIT, sys.argv[1], sys.argv[1:]) t = mitogen.core.now() - t0 times.append(t) print('+++', t) print('all:', times) print('min %s max %s diff %s' % (min(times), max...
18.45
84
0.604336
#!/usr/bin/env python import sys import os import time import mitogen.core times = [] for x in range(5): t0 = mitogen.core.now() os.spawnvp(os.P_WAIT, sys.argv[1], sys.argv[1:]) t = mitogen.core.now() - t0 times.append(t) print('+++', t) print('all:', times) print('min %s max %s diff %s' % (min...
0
0
0
0
0
0
0
-10
22
d74800f0c4de3bf51425b60eb54aa3369b6228f2
3,096
py
Python
network/static_char_rnn_gen.py
uwsampl/relay-network
86ec2988d55bebd85821e55da37030955c945c22
[ "Apache-2.0" ]
null
null
null
network/static_char_rnn_gen.py
uwsampl/relay-network
86ec2988d55bebd85821e55da37030955c945c22
[ "Apache-2.0" ]
null
null
null
network/static_char_rnn_gen.py
uwsampl/relay-network
86ec2988d55bebd85821e55da37030955c945c22
[ "Apache-2.0" ]
null
null
null
x = CharRNNGen20(input_size=22, hidden_size=23, output_size=34) from tvm.relay.transform import ToANormalForm, PartialEvaluate, ToGraphNormalForm, Sequential p = Sequential([ToANormalForm(), PartialEvaluate(), ToGraphNormalForm()]) x.mod = p(x.mod) x.mod["main"] = x.mod["f_0"] #rnn = quantize(x.mod["main"], x.mod) p...
57.333333
161
0.704134
from tvm.relay import op, var, Var, Function, Clause, PatternConstructor, PatternVar, Match, const from tvm.relay import TupleGetItem, Tuple, TensorType, TupleType, If from network import Network from common import Linear import numpy as np from tvm.relay.quantize import quantize class CharRNNCell(Network): def bu...
0
0
0
2,406
0
0
0
149
201
7c88ec310a341569c0af4d3ae43a56c3daa78416
23,968
py
Python
conference.py
brycegit/ConferenceProject
4fbc9c9d8e18068c9324bd6a4f9d308aea8c9a0d
[ "Apache-2.0" ]
null
null
null
conference.py
brycegit/ConferenceProject
4fbc9c9d8e18068c9324bd6a4f9d308aea8c9a0d
[ "Apache-2.0" ]
null
null
null
conference.py
brycegit/ConferenceProject
4fbc9c9d8e18068c9324bd6a4f9d308aea8c9a0d
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __author__ = 'wesc+api@google.com (Wesley Chun)' import endpoints from protorpc import ...
34.736232
120
0.614611
#!/usr/bin/env python """ conference.py -- Udacity conference server-side Python App Engine API; uses Google Cloud Endpoints $Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $ created by wesc on 2014 apr 21 """ __author__ = 'wesc+api@google.com (Wesley Chun)' from datetime import datetime import ...
0
21,071
0
0
0
0
0
237
512
7c341e1463a6753626ff6ffd44f19b7f557d1e5b
635
py
Python
10 Days of Statistics/Day 0 - Weighted Mean.py
sohammanjrekar/HackerRank
1f5010133a1ac1e765e855a086053c97d9e958be
[ "MIT" ]
null
null
null
10 Days of Statistics/Day 0 - Weighted Mean.py
sohammanjrekar/HackerRank
1f5010133a1ac1e765e855a086053c97d9e958be
[ "MIT" ]
null
null
null
10 Days of Statistics/Day 0 - Weighted Mean.py
sohammanjrekar/HackerRank
1f5010133a1ac1e765e855a086053c97d9e958be
[ "MIT" ]
null
null
null
#!/bin/python3 # # Complete the 'weightedMean' function below. # # The function accepts following parameters: # 1. INTEGER_ARRAY X # 2. INTEGER_ARRAY W # if __name__ == '__main__': n = int(input().strip()) vals = list(map(int, input().rstrip().split())) weights = list(map(int, input().rst...
20.483871
55
0.604724
#!/bin/python3 import math import os import random import re import sys # # Complete the 'weightedMean' function below. # # The function accepts following parameters: # 1. INTEGER_ARRAY X # 2. INTEGER_ARRAY W # def weightedMean(n, X, W): # Write your code here sum_items = 0 for i in ...
0
0
0
0
0
173
0
-53
142
1dcc4c9ea3f48ca62df1b67abb0e143e73ead0fc
1,853
py
Python
mscl_arfa/ena.py
neilswainston/mscl-arfa
f13f3bfe77285284fdd0fbe71513854e04d804dc
[ "MIT" ]
null
null
null
mscl_arfa/ena.py
neilswainston/mscl-arfa
f13f3bfe77285284fdd0fbe71513854e04d804dc
[ "MIT" ]
null
null
null
mscl_arfa/ena.py
neilswainston/mscl-arfa
f13f3bfe77285284fdd0fbe71513854e04d804dc
[ "MIT" ]
null
null
null
''' SYNBIOCHEM (c) University of Manchester 2018 SYNBIOCHEM is licensed under the MIT License. To view a copy of this license, visit <http://opensource.org/licenses/MIT/>. @author: neilswainston ''' import sys from urllib.request import urlopen import xml.sax _RE = r'(\d+)\.\.(\d+)' def get_start_end_comp(ena_i...
23.455696
77
0.614679
''' SYNBIOCHEM (c) University of Manchester 2018 SYNBIOCHEM is licensed under the MIT License. To view a copy of this license, visit <http://opensource.org/licenses/MIT/>. @author: neilswainston ''' import re import sys from urllib.request import urlopen import xml.sax _RE = r'(\d+)\.\.(\d+)' class EnaHandler(xm...
0
0
0
852
0
0
0
-12
45
6f9ac45263f156c72864204c8ff94c441754b7d9
3,672
py
Python
tests/classes.py
juliapochynok/LearnKorean_project
60c53c1422379bbfc0fbba4c32f74105430326e8
[ "Apache-2.0" ]
1
2020-07-19T11:35:14.000Z
2020-07-19T11:35:14.000Z
experiment/tests/classes.py
juliapochynok/LearnKorean_project
60c53c1422379bbfc0fbba4c32f74105430326e8
[ "Apache-2.0" ]
1
2019-03-04T14:18:03.000Z
2019-03-04T14:18:03.000Z
tests/classes.py
juliapochynok/LearnKorean_project
60c53c1422379bbfc0fbba4c32f74105430326e8
[ "Apache-2.0" ]
null
null
null
def check_answer(answer, true_trans): ''' ''' if answer == true_trans: return True else: return False if __name__ == "__main__": a = WordController("julia_poch.txt") print(a.write_to_file())
28.030534
81
0.512527
from arrays import DynamicArray import fileinput import random class WordController: ''' ''' def __init__(self, fl): self._file = fl def read_from_file(self): ''' ''' fl = open(self._file, "r") learned_words_full = DynamicArray() learned_words = DynamicA...
0
0
0
3,326
0
0
0
-3
112
9c213b5338d2a4d8ee0e5feaca5b9fe3d5562505
619
py
Python
user.py
danielmcauley/wordle-chat-bot
51ce76c1fddace79cee54d9a5335a2c71dcbffa0
[ "MIT" ]
null
null
null
user.py
danielmcauley/wordle-chat-bot
51ce76c1fddace79cee54d9a5335a2c71dcbffa0
[ "MIT" ]
null
null
null
user.py
danielmcauley/wordle-chat-bot
51ce76c1fddace79cee54d9a5335a2c71dcbffa0
[ "MIT" ]
null
null
null
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy()
24.76
66
0.644588
from flask_sqlalchemy import SQLAlchemy db = SQLAlchemy() class User(db.Model): __tablename__ = 'users' id=db.Column(db.Integer, primary_key=True, autoincrement=True) from_str=db.Column(db.String(32), unique=True) answer=db.Column(db.String(32)) tries=db.Column(db.Integer) def __repr__(self...
0
0
0
537
0
0
0
0
23
6fe0915b7d68642ab32fccfaf4107b5da0477578
175
py
Python
Ladders/L1/110A.py
Thulio-Carvalho/CP-Training
41153222f6cc6315e35f809a38b831a37359e2c6
[ "MIT" ]
null
null
null
Ladders/L1/110A.py
Thulio-Carvalho/CP-Training
41153222f6cc6315e35f809a38b831a37359e2c6
[ "MIT" ]
null
null
null
Ladders/L1/110A.py
Thulio-Carvalho/CP-Training
41153222f6cc6315e35f809a38b831a37359e2c6
[ "MIT" ]
null
null
null
num = raw_input() cnt = 0 for c in num: if c != '4' and c != '7': continue cnt += 1 ans = 'YES' for c in str(cnt): if c != '4' and c != '7': ans = 'NO' print ans
15.909091
40
0.491429
num = raw_input() cnt = 0 for c in num: if c != '4' and c != '7': continue cnt += 1 ans = 'YES' for c in str(cnt): if c != '4' and c != '7': ans = 'NO' print ans
0
0
0
0
0
0
0
0
0
6a2233aa354b610c677b4f8c6fd5725c70435971
8,281
py
Python
gdb8_parallel.py
schrodinger/khan
5b611cc378ab279079e191e3d6bba2ec39fed5db
[ "MIT" ]
10
2019-12-13T01:32:42.000Z
2022-03-16T18:29:54.000Z
gdb8_parallel.py
schrodinger/khan
5b611cc378ab279079e191e3d6bba2ec39fed5db
[ "MIT" ]
null
null
null
gdb8_parallel.py
schrodinger/khan
5b611cc378ab279079e191e3d6bba2ec39fed5db
[ "MIT" ]
2
2018-07-09T21:38:08.000Z
2020-04-10T16:02:32.000Z
if __name__ == "__main__": main()
35.238298
206
0.627702
import os import numpy as np import time import tensorflow as tf import sklearn.model_selection from khan.data.dataset import RawDataset from khan.training.trainer_multi_tower import TrainerMultiTower, flatten_results, initialize_module from data_utils import HARTREE_TO_KCAL_PER_MOL from data_loaders import DataLoader...
0
0
0
0
0
7,717
0
176
336
54173c67f74aa38a6f34b64143a9d3c73b32d49e
5,895
py
Python
benchmark/citation/trainable/cold_start_recall100/train_eval_cs.py
snubeaver/pytorch_geo
6c533ebac29c08eafe9171eba470a6aaa09d1b45
[ "MIT" ]
2
2020-09-08T15:22:08.000Z
2020-09-08T15:22:09.000Z
benchmark/citation/trainable/cold_start_recall100/train_eval_cs.py
snubeaver/pytorch_geo
6c533ebac29c08eafe9171eba470a6aaa09d1b45
[ "MIT" ]
null
null
null
benchmark/citation/trainable/cold_start_recall100/train_eval_cs.py
snubeaver/pytorch_geo
6c533ebac29c08eafe9171eba470a6aaa09d1b45
[ "MIT" ]
null
null
null
from __future__ import division import torch device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
37.310127
284
0.622731
from __future__ import division import random import time import pdb import torch import torch.nn.functional as F from torch_geometric.utils import to_dense_adj from torch import tensor from torch.optim import Adam from train_edges import train_edges from test_edges import test_edges from negative_sampling import negat...
2
0
0
0
0
5,173
0
201
402
b981a8d49dbc516334e7f952c1358b1f1f1b3580
10,310
py
Python
Codegen/main.py
zhurongjun/FukoMath
841db6f297c17c23e662925b422d0e2595691147
[ "MIT" ]
1
2022-03-10T16:02:09.000Z
2022-03-10T16:02:09.000Z
Codegen/main.py
zhurongjun/FukoMath
841db6f297c17c23e662925b422d0e2595691147
[ "MIT" ]
null
null
null
Codegen/main.py
zhurongjun/FukoMath
841db6f297c17c23e662925b422d0e2595691147
[ "MIT" ]
null
null
null
import gen_test import gen_swizzle import gen_type import gen_math import gen_dependency import config import shutil import sys from pathlib import Path # paths codgen_root_dir = Path(__file__).parent project_root_dir = codgen_root_dir.parent cpp_root_dir = project_root_dir / "FukoMath" test_root_dir = project_root_d...
34.949153
140
0.625606
import gen_test from types import FunctionType from typing import List import gen_swizzle import gen_type import gen_math import gen_dependency import config import shutil import sys import codegen_util as util from pathlib import Path # paths codgen_root_dir = Path(__file__).parent project_root_dir = codgen_root_dir...
0
0
0
0
0
127
0
17
112
d4eace8e97fd747a31b9d3d37aa1a565033e36c5
2,302
py
Python
2021/day15/day15.py
mdelmage/advent2019
eae18fd8010c9816b22578d6eb8988139aef131d
[ "MIT" ]
2
2020-12-02T20:44:33.000Z
2020-12-09T23:35:35.000Z
2021/day15/day15.py
mdelmage/advent2019
eae18fd8010c9816b22578d6eb8988139aef131d
[ "MIT" ]
null
null
null
2021/day15/day15.py
mdelmage/advent2019
eae18fd8010c9816b22578d6eb8988139aef131d
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- NEIGHBORS = [(1, 0), (-1, 0), (0, 1), (0, -1)] BIG_RISK = 12345678 LOL_ITERATIONS = 10 # Parse the risk level map file with open('day15_input.txt') as f: lines = [line.rstrip('\n') for line in f] # Generate the risk lookup table (dict). risk = {} for y in range(len(line...
39.016949
103
0.657689
#!/usr/bin/env python # -*- coding: utf-8 -*- NEIGHBORS = [(1, 0), (-1, 0), (0, 1), (0, -1)] BIG_RISK = 12345678 LOL_ITERATIONS = 10 def navigate(grid): # You start in the top left position, your destination is the bottom right position, # and you cannot move diagonally. The number at each position is its risk leve...
0
0
0
0
0
1,016
0
0
23
1cd0df9f574b8be0571f6810b0b77b90b4d6dd59
111
py
Python
main.py
renowned-virat/testrepo
ffbe479cc68cac89f52c9a82562e7f9edf8e1581
[ "MIT" ]
null
null
null
main.py
renowned-virat/testrepo
ffbe479cc68cac89f52c9a82562e7f9edf8e1581
[ "MIT" ]
null
null
null
main.py
renowned-virat/testrepo
ffbe479cc68cac89f52c9a82562e7f9edf8e1581
[ "MIT" ]
null
null
null
num=int(input("enter the number:-")) if(num%2==0): print("Number is even") else: print("Number is odd")
22.2
36
0.621622
num=int(input("enter the number:-")) if(num%2==0): print("Number is even") else: print("Number is odd")
0
0
0
0
0
0
0
0
0
d4dc1e4db3c0c023f493957e2b0555872719ed70
7,639
py
Python
PlotMonteCalorsConvergence.py
ggzhang0071/pytorch_geometric-1
80717cec2abfa6ff0951834cf4d7b1641b7952b1
[ "MIT" ]
null
null
null
PlotMonteCalorsConvergence.py
ggzhang0071/pytorch_geometric-1
80717cec2abfa6ff0951834cf4d7b1641b7952b1
[ "MIT" ]
null
null
null
PlotMonteCalorsConvergence.py
ggzhang0071/pytorch_geometric-1
80717cec2abfa6ff0951834cf4d7b1641b7952b1
[ "MIT" ]
null
null
null
from matplotlib.colors import ListedColormap import matplotlib as mpl """ print(mpl.rcParmas) mpl.rcParmas['font.family']="Times New Roman" mpl.rcParmas['lines.width']=2 mpl.rcParmas['figure.figsize']=8,6""" colors=[(248/255,25/255,25/255),(40/255,172/255,82/255),(161/255,80/255,159/255),(0/255,127/255,182/255)] #col...
49.283871
187
0.604006
import numpy as np import matplotlib.pyplot as plt import os,glob from matplotlib.colors import ListedColormap import matplotlib as mpl import pdb """ print(mpl.rcParmas) mpl.rcParmas['font.family']="Times New Roman" mpl.rcParmas['lines.width']=2 mpl.rcParmas['figure.figsize']=8,6""" colors=[(248/255,25/255,25/255),(...
0
0
0
0
0
6,957
0
-11
111
d9319847024460224159a568699a4cf7af17a520
1,649
py
Python
Text_Classification/src/predict_text.py
AlexCubo/Spiced_Projects
9fb9a744f397a9e5142646cf3619c1c969ee428d
[ "MIT" ]
null
null
null
Text_Classification/src/predict_text.py
AlexCubo/Spiced_Projects
9fb9a744f397a9e5142646cf3619c1c969ee428d
[ "MIT" ]
null
null
null
Text_Classification/src/predict_text.py
AlexCubo/Spiced_Projects
9fb9a744f397a9e5142646cf3619c1c969ee428d
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Feb 6 19:18:30 2021 @author: cubo """ import argparse import pandas as pd import pickle import sys parser = argparse.ArgumentParser(description='options: cl, tl, cr, tr') parser.add_argument("vec_mod_switcher", help= 'cl: countVec...
29.981818
97
0.622195
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Sat Feb 6 19:18:30 2021 @author: cubo """ import argparse import pandas as pd import pickle import sys parser = argparse.ArgumentParser(description='options: cl, tl, cr, tr') parser.add_argument("vec_mod_switcher", help= 'cl: countVec...
0
0
0
0
0
0
0
0
0
bcb9885159f88e97cdfb384cd4fbcf706a726296
2,927
py
Python
shebang.py
Saevon/config-Sublime
91417d02554b89cd322d16940f59d0dd781c8001
[ "MIT" ]
null
null
null
shebang.py
Saevon/config-Sublime
91417d02554b89cd322d16940f59d0dd781c8001
[ "MIT" ]
null
null
null
shebang.py
Saevon/config-Sublime
91417d02554b89cd322d16940f59d0dd781c8001
[ "MIT" ]
null
null
null
# !/usr/bin/env python3 # -*- coding: UTF-8 -*- # # Shows all the vi marks that exist # SYNTAX_FILE_EXTENSIONS = [ '.tmLanguage', '.sublime-syntax', ]
29.27
109
0.583874
# !/usr/bin/env python3 # -*- coding: UTF-8 -*- # # Shows all the vi marks that exist # import os import re import sublime import sublime_plugin class ShebangSyntaxListener(sublime_plugin.EventListener): def on_load(self, view): view.run_command('shebang_syntax') def on_post_save(self, view): ...
0
0
0
2,483
153
0
0
-31
158
f029d8b61cbf9a40a4408076b58ec2f21a94cc4a
763
py
Python
leetcode/1143_LongestCommonSubsequence.py
CoodingPenguin/algorithm-c-sharp
d30985f79b450e876eba6eae732a629cbe55accf
[ "MIT" ]
1
2021-08-05T11:02:59.000Z
2021-08-05T11:02:59.000Z
leetcode/1143_LongestCommonSubsequence.py
CoodingPenguin/problem-solving
d30985f79b450e876eba6eae732a629cbe55accf
[ "MIT" ]
null
null
null
leetcode/1143_LongestCommonSubsequence.py
CoodingPenguin/problem-solving
d30985f79b450e876eba6eae732a629cbe55accf
[ "MIT" ]
null
null
null
# : 1143. Longest Common Subsequence # : https://leetcode.com/problems/longest-common-subsequence/ # /: 392ms / 21.9MB
40.157895
81
0.49017
# 문제: 1143. Longest Common Subsequence # 링크: https://leetcode.com/problems/longest-common-subsequence/ # 시간/공간: 392ms / 21.9MB class Solution: def longestCommonSubsequence(self, text1: str, text2: str) -> int: table = [[0] * (len(text2) + 1) for _ in range(len(text1) + 1)] # DP 테이블 for i in range...
159
0
0
567
0
0
0
0
22
72ba6fcac9507c759a00504aa0171118137433da
201
py
Python
ExPython/CursoemVideo/ex007.py
MatheusEwen/Exercicios_Do_CursoDePython
7c21f95f0d31ec1e6c17e1b957c1442843118c48
[ "MIT" ]
1
2020-10-06T00:27:05.000Z
2020-10-06T00:27:05.000Z
ExPython/CursoemVideo/ex007.py
MatheusEwen/Exercicios_Do_CursoDePython
7c21f95f0d31ec1e6c17e1b957c1442843118c48
[ "MIT" ]
null
null
null
ExPython/CursoemVideo/ex007.py
MatheusEwen/Exercicios_Do_CursoDePython
7c21f95f0d31ec1e6c17e1b957c1442843118c48
[ "MIT" ]
null
null
null
nota1 = float(input('digite as notas no aluno para tirar a media, nota 1:')) nota2 = float(input('nota 2:')) media = ((nota1+nota2)/2) print('A media do aluno nesse bimestre foi {:.1f}'.format(media))
40.2
76
0.686567
nota1 = float(input('digite as notas no aluno para tirar a media, nota 1:')) nota2 = float(input('nota 2:')) media = ((nota1+nota2)/2) print('A media do aluno nesse bimestre foi {:.1f}'.format(media))
0
0
0
0
0
0
0
0
0
9be9ebe0fb50699bddd9ee687c556c965ce40370
1,315
py
Python
ietf/group/migrations/0032_add_meeting_seen_as_area.py
hassanakbar4/ietfdb
cabee059092ae776015410640226064331c293b7
[ "BSD-3-Clause" ]
25
2022-03-05T08:26:52.000Z
2022-03-30T15:45:42.000Z
ietf/group/migrations/0032_add_meeting_seen_as_area.py
hassanakbar4/ietfdb
cabee059092ae776015410640226064331c293b7
[ "BSD-3-Clause" ]
219
2022-03-04T17:29:12.000Z
2022-03-31T21:16:14.000Z
ietf/group/migrations/0032_add_meeting_seen_as_area.py
hassanakbar4/ietfdb
cabee059092ae776015410640226064331c293b7
[ "BSD-3-Clause" ]
22
2022-03-04T15:34:34.000Z
2022-03-28T13:30:59.000Z
# Copyright The IETF Trust 2020', 'All Rights Reserved # -*- coding: utf-8 -*- # Generated by Django 1.11.27 on 2020-02-12 07:11 from __future__ import unicode_literals
34.605263
151
0.674525
# Copyright The IETF Trust 2020', 'All Rights Reserved # -*- coding: utf-8 -*- # Generated by Django 1.11.27 on 2020-02-12 07:11 from __future__ import unicode_literals from django.db import migrations, models def forward(apps, schema_editor): Group = apps.get_model('group', 'Group') initial_area_groups = ['...
0
0
0
706
0
322
0
19
92
2b21df34e27b6cae40de1bd0e53d650cf9269120
1,588
py
Python
util/create_averageSubmission.py
hong2223/traffic4cast2020
767af3714dcfef529f514bf253ef7aa8b3a00203
[ "Apache-2.0" ]
null
null
null
util/create_averageSubmission.py
hong2223/traffic4cast2020
767af3714dcfef529f514bf253ef7aa8b3a00203
[ "Apache-2.0" ]
null
null
null
util/create_averageSubmission.py
hong2223/traffic4cast2020
767af3714dcfef529f514bf253ef7aa8b3a00203
[ "Apache-2.0" ]
1
2021-11-01T12:08:48.000Z
2021-11-01T12:08:48.000Z
import numpy as np import torch import h5py import sys, os, glob from tqdm import tqdm sys.path.append(os.getcwd()) def load_h5_file(file_path): """ Given a file path to an h5 file assumed to house a tensor, load that tensor into memory and return a pointer. """ # load fr = h5py.File(file_pat...
29.962264
110
0.634131
import numpy as np import torch import h5py from pathlib import Path import pickle import sys, os, glob import datetime as dt from tqdm import tqdm sys.path.append(os.getcwd()) def load_h5_file(file_path): """ Given a file path to an h5 file assumed to house a tensor, load that tensor into memory and ret...
0
0
0
0
0
0
0
-5
66
ed4286154da441d2d03ec134cc65f2d91a18db26
115
py
Python
abc/180/a.py
smallkirby/procon
83cc56bf078c99a14a05b1254ea37da1cdf20de7
[ "Unlicense" ]
null
null
null
abc/180/a.py
smallkirby/procon
83cc56bf078c99a14a05b1254ea37da1cdf20de7
[ "Unlicense" ]
null
null
null
abc/180/a.py
smallkirby/procon
83cc56bf078c99a14a05b1254ea37da1cdf20de7
[ "Unlicense" ]
null
null
null
from sys import stdin N,A,B = [int(x) for x in stdin.readline().rstrip().split(" ")] print(N-A+B)
23
62
0.678261
import itertools from sys import stdin N,A,B = [int(x) for x in stdin.readline().rstrip().split(" ")] print(N-A+B)
0
0
0
0
0
0
0
-5
22
236b35d6d32ee414e57443cf2cfc4813a2fae10f
8,093
py
Python
field_properties/field_properties.py
wyfo/field-properties
5f956fa42e31f5f58aacf3f2e72005dcecf76dde
[ "MIT" ]
1
2021-04-26T10:22:28.000Z
2021-04-26T10:22:28.000Z
field_properties/field_properties.py
wyfo/field-properties
5f956fa42e31f5f58aacf3f2e72005dcecf76dde
[ "MIT" ]
null
null
null
field_properties/field_properties.py
wyfo/field-properties
5f956fa42e31f5f58aacf3f2e72005dcecf76dde
[ "MIT" ]
null
null
null
import dataclasses from typing import Any, Callable, TypeVar FGetType = Callable[[Any], Any] FSetType = Callable[[Any, Any], None] FDelType = Callable[[Any], None] FGet = TypeVar("FGet", bound=FGetType) FSet = TypeVar("FSet", bound=FSetType) FDel = TypeVar("FDel", bound=FDelType) FSET_ATTRIBUTE = "_field_properties_...
33.861925
88
0.616953
import dataclasses from collections.abc import Mapping from functools import wraps from typing import Any, Callable, Optional, TypeVar, overload FGetType = Callable[[Any], Any] FSetType = Callable[[Any, Any], None] FDelType = Callable[[Any], None] FGet = TypeVar("FGet", bound=FGetType) FSet = TypeVar("FSet", bound=FS...
0
1,736
0
4,558
0
331
0
40
205
391e48ae7b56c612b78b706e1269861459d79058
22
py
Python
numl/plot/__init__.py
alexandraday-nu/pynuml
3a71855015099289f0f4a7d24df6f8517bd9102b
[ "Apache-2.0" ]
1
2021-10-16T04:28:46.000Z
2021-10-16T04:28:46.000Z
numl/plot/__init__.py
alexandraday-nu/pynuml
3a71855015099289f0f4a7d24df6f8517bd9102b
[ "Apache-2.0" ]
1
2021-08-30T12:21:39.000Z
2021-08-31T16:31:44.000Z
numl/plot/__init__.py
alexandraday-nu/pynuml
3a71855015099289f0f4a7d24df6f8517bd9102b
[ "Apache-2.0" ]
2
2021-08-29T00:06:12.000Z
2021-08-30T15:02:47.000Z
__all__ = [ "graph" ]
11
21
0.545455
__all__ = [ "graph" ]
0
0
0
0
0
0
0
0
0
7ff426eef296ed6365e5bd8d3121bd7cd4877274
3,824
py
Python
blebox/cover.py
gralin/home-assistant-blebox
91e6528fd6b9528bc90492f59ed3651e2526a381
[ "Apache-2.0" ]
2
2020-04-06T16:21:15.000Z
2020-05-03T14:15:37.000Z
blebox/cover.py
gralin/home-assistant-blebox
91e6528fd6b9528bc90492f59ed3651e2526a381
[ "Apache-2.0" ]
2
2020-05-09T13:45:02.000Z
2021-02-22T11:47:25.000Z
blebox/cover.py
gralin/home-assistant-blebox
91e6528fd6b9528bc90492f59ed3651e2526a381
[ "Apache-2.0" ]
1
2020-05-02T22:51:44.000Z
2020-05-02T22:51:44.000Z
"""BleBox cover entity.""" import logging _LOGGER = logging.getLogger(__name__)
28.537313
79
0.627092
"""BleBox cover entity.""" import logging from homeassistant.components.cover import ( ATTR_POSITION, DEVICE_CLASS_DOOR, DEVICE_CLASS_SHUTTER, STATE_CLOSED, STATE_CLOSING, STATE_OPEN, STATE_OPENING, SUPPORT_CLOSE, SUPPORT_OPEN, SUPPORT_SET_POSITION, SUPPORT_STOP, CoverD...
0
1,819
959
506
0
0
0
318
137
2b756c4c8de4e4794ce9137bcba1b7e431700d56
1,841
py
Python
kora/install/es7.py
nguyenthanhasia/kora
555ee4d2559ae5b08eaee3e55cc6706a7166de0d
[ "MIT" ]
91
2020-05-26T05:54:51.000Z
2022-03-09T07:33:44.000Z
kora/install/es7.py
noirquant/kora
1ac2f0a1a6e503743eaadffd3fb2d3fd1c4f49ef
[ "MIT" ]
12
2020-10-03T10:09:11.000Z
2021-03-06T23:12:21.000Z
kora/install/es7.py
noirquant/kora
1ac2f0a1a6e503743eaadffd3fb2d3fd1c4f49ef
[ "MIT" ]
16
2020-07-07T18:39:29.000Z
2021-03-06T03:46:49.000Z
import os import requests from subprocess import Popen, PIPE, STDOUT # download server ver = '7.9.2' url = f'https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{ver}-linux-x86_64.tar.gz' os.system(f"curl {url} | tar xz") os.system(f"chown -R daemon:daemon elasticsearch-{ver}") # start server es_serv...
31.20339
101
0.636611
import os import re import requests from subprocess import Popen, PIPE, STDOUT from IPython.core.magic import register_cell_magic from urllib.parse import urljoin # download server ver = '7.9.2' url = f'https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-{ver}-linux-x86_64.tar.gz' os.system(f"curl {ur...
0
528
0
0
0
472
0
28
110
9f9953c289828b146a55d2ba8348eda1cdda5af6
4,922
py
Python
mlrepricer/oldsql/database.py
elcolumbio/mlrepricer
a3bec00179b7028731793c9b3fae0eb9b9c68ad2
[ "Apache-2.0" ]
9
2018-05-17T16:42:34.000Z
2021-03-08T06:59:09.000Z
mlrepricer/oldsql/database.py
elcolumbio/mlrepricer
a3bec00179b7028731793c9b3fae0eb9b9c68ad2
[ "Apache-2.0" ]
6
2018-05-18T11:04:24.000Z
2018-06-22T04:56:56.000Z
mlrepricer/oldsql/database.py
elcolumbio/mlrepricer
a3bec00179b7028731793c9b3fae0eb9b9c68ad2
[ "Apache-2.0" ]
3
2018-05-17T16:42:36.000Z
2020-03-23T06:53:30.000Z
# -*- coding: utf-8 - *- """ Abstracts your target from your table definitions target and you can use it. Example how you inherit from it. def saletaxdoo(target): class SaleTaxdoo(target): "A table definition." def __init__(self): super().__init__() self.table = 'taxdoo_sale...
34.907801
79
0.61987
# -*- coding: utf-8 - *- """ Abstracts your target from your table definitions target and you can use it. Example how you inherit from it. def saletaxdoo(target): class SaleTaxdoo(target): "A table definition." def __init__(self): super().__init__() self.table = 'taxdoo_sale...
0
2,379
0
1,826
0
0
0
63
136
d3aedf3194f7e0151c4a79c585ace821acb051ce
5,883
py
Python
device_e2e/aio/retry_async.py
dt-boringtao/azure-iot-sdk-python
35a09679bdf4d7a727391b265a8f1fbb99a30c45
[ "MIT" ]
null
null
null
device_e2e/aio/retry_async.py
dt-boringtao/azure-iot-sdk-python
35a09679bdf4d7a727391b265a8f1fbb99a30c45
[ "MIT" ]
null
null
null
device_e2e/aio/retry_async.py
dt-boringtao/azure-iot-sdk-python
35a09679bdf4d7a727391b265a8f1fbb99a30c45
[ "MIT" ]
null
null
null
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. import logging import random import threading logger = logging.getLogger(__name__) logger.setLevel(level=logging.INFO) # -------------------------------------- #...
32.683333
99
0.63182
# Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. import asyncio import logging import random import threading import time from azure.iot.device.exceptions import ( ConnectionFailedError, ConnectionDropped...
0
0
3,102
0
0
0
0
107
89
04319722250081f529fc399f5f895e547b094b38
3,316
py
Python
docs/conf.py
lilab-bcb/pegasus-tutorials
569da059fba0ab4e8337ded0518ad289f46499dc
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
lilab-bcb/pegasus-tutorials
569da059fba0ab4e8337ded0518ad289f46499dc
[ "BSD-3-Clause" ]
null
null
null
docs/conf.py
lilab-bcb/pegasus-tutorials
569da059fba0ab4e8337ded0518ad289f46499dc
[ "BSD-3-Clause" ]
null
null
null
# -- Project information ----------------------------------------------------- project = "Pegasus Tutorials" copyright = "2020 - 2022 The Broad Institute, Inc. and Genentech, Inc. All rights reserved." author = ( "Yiming Yang, Joshua Gould and Bo Li" ) # The short X.Y version version = "" # The full version, incl...
32.194175
92
0.688782
# -- Project information ----------------------------------------------------- project = "Pegasus Tutorials" copyright = "2020 - 2022 The Broad Institute, Inc. and Genentech, Inc. All rights reserved." author = ( "Yiming Yang, Joshua Gould and Bo Li" ) # The short X.Y version version = "" # The full version, incl...
0
0
0
0
0
0
0
0
0
d579bc3b9c17de518359ec15a1ff3c827d8ee7d3
9,592
py
Python
rmonitor/common/messages.py
krisneuharth/race_monitor
c3381bd7da4ac2c8637957f7fc354653437aa469
[ "MIT" ]
null
null
null
rmonitor/common/messages.py
krisneuharth/race_monitor
c3381bd7da4ac2c8637957f7fc354653437aa469
[ "MIT" ]
8
2017-11-14T20:40:02.000Z
2017-11-26T05:56:32.000Z
rmonitor/common/messages.py
krisneuharth/race_monitor
c3381bd7da4ac2c8637957f7fc354653437aa469
[ "MIT" ]
null
null
null
############# # Helpers ############# MESSAGE_TYPES = { # Documented... "$A": CompetitorInformationMessage, "$B": RunInformationMessage, "$C": ClassInformationMessage, "$COMP": CompInformationMessage, "$E": SettingInformationMessage, "$F": HeartbeatMessage, ...
24.222222
78
0.544516
from rmonitor.common.helpers import Duration class HeartbeatMessage(object): def __init__(self, fields): self.type = '$F' # Number of laps to go # (0 - 99999) self.laps_to_go = fields[0] # Time until the session ends # ("HH:MM:SS") self.time_to_go = Durat...
0
0
0
8,629
0
0
0
23
275
b2cb70bd08148209b4bf2ad543406aaaf13c4e92
5,757
py
Python
mcthings/scene.py
acs/mcthings
2b7f6a1ffbbb749496063444e9802df18e0f2047
[ "Apache-2.0" ]
41
2020-06-29T08:45:34.000Z
2022-02-24T10:49:41.000Z
mcthings/scene.py
acs/mcthings
2b7f6a1ffbbb749496063444e9802df18e0f2047
[ "Apache-2.0" ]
98
2020-04-12T08:03:23.000Z
2020-06-29T05:54:29.000Z
mcthings/scene.py
acs/mcthings
2b7f6a1ffbbb749496063444e9802df18e0f2047
[ "Apache-2.0" ]
8
2020-11-06T09:52:39.000Z
2022-01-30T11:48:48.000Z
# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 # Author (): Alvaro del Castillo # TODO: at some point this must be a real Singleton
31.983333
83
0.61612
# Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 # Author (©): Alvaro del Castillo # TODO: at some point this must be a real Singleton import pickle from mcpi.vec3 import Vec3 from mcthings.blocks_memory import BlocksMemory from mcthings.utils import build_schematic_nbt from mcthings.world im...
2
180
0
5,222
0
0
0
59
135
f0680b7d9c9a21d9104edc805d1ac3caf152d7b2
9,389
py
Python
argdoc.py
chriskiehl/ArgDoc
fcea15a919c45cfc77a4326ea78bcea0ae91a019
[ "MIT" ]
12
2015-03-07T22:21:12.000Z
2021-11-08T11:42:51.000Z
argdoc.py
chriskiehl/ArgDoc
fcea15a919c45cfc77a4326ea78bcea0ae91a019
[ "MIT" ]
1
2018-02-06T22:59:18.000Z
2018-02-06T22:59:18.000Z
argdoc.py
chriskiehl/ArgDoc
fcea15a919c45cfc77a4326ea78bcea0ae91a019
[ "MIT" ]
3
2015-12-13T18:34:30.000Z
2021-12-30T20:27:56.000Z
''' Note: below code is 100 percent trial and error. I have no idea how ast is actually supposed to be used. I brute forced this one with the dir() function and a lot of patience. Proceed with caution. The basic idea is to a. find the index of the Argparse.ArgumentParser assignment in the code b. f...
28.365559
101
0.681968
''' Note: below code is 100 percent trial and error. I have no idea how ast is actually supposed to be used. I brute forced this one with the dir() function and a lot of patience. Proceed with caution. The basic idea is to a. find the index of the Argparse.ArgumentParser assignment in the code b. f...
0
0
0
92
0
4,887
0
-16
531
7652c938c11499df7eff3dd6f2928981b7de68eb
2,392
py
Python
python_javascript/python/run_sqlalchemy.py
SnowMasaya/python-viasualize
8259f227462687dc87d3cdeece45848c677a57d4
[ "Unlicense", "MIT" ]
null
null
null
python_javascript/python/run_sqlalchemy.py
SnowMasaya/python-viasualize
8259f227462687dc87d3cdeece45848c677a57d4
[ "Unlicense", "MIT" ]
null
null
null
python_javascript/python/run_sqlalchemy.py
SnowMasaya/python-viasualize
8259f227462687dc87d3cdeece45848c677a57d4
[ "Unlicense", "MIT" ]
null
null
null
from sqlalchemy.orm import sessionmaker # from winner import Winner from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() nobel_winners = [ {'category': 'Physics', 'name': 'Albert Einstein', 'nationality': 'Swiss', 'sex': 'male', 'ye...
25.72043
71
0.670569
from sqlalchemy.orm import sessionmaker # from winner import Winner from sqlalchemy import Column, Integer, String, Enum from sqlalchemy import create_engine from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() nobel_winners = [ {'category': 'Physics', 'name': 'Albert Einstein', ...
0
0
0
373
0
182
0
31
68
c788d7cdbcc77b949c6898a12a89b86e1218178e
9,670
py
Python
pymatgen/io/abinitio/netcdf.py
NadezhdaBzhilyanskaya/pymatgen
fae11a8142d457a649fa84ff9781eb2b39334bdc
[ "MIT" ]
null
null
null
pymatgen/io/abinitio/netcdf.py
NadezhdaBzhilyanskaya/pymatgen
fae11a8142d457a649fa84ff9781eb2b39334bdc
[ "MIT" ]
null
null
null
pymatgen/io/abinitio/netcdf.py
NadezhdaBzhilyanskaya/pymatgen
fae11a8142d457a649fa84ff9781eb2b39334bdc
[ "MIT" ]
null
null
null
"""Wrapper for netCDF readers.""" from __future__ import division, print_function from pymatgen.core.units import ArrayWithUnit from pymatgen.core.structure import Structure __author__ = "Matteo Giantomassi" __copyright__ = "Copyright 2013, The Materials Project" __version__ = "0.1" __maintainer__ = "Matteo Giantoma...
30.21875
96
0.595553
"""Wrapper for netCDF readers.""" from __future__ import division, print_function import os.path from pymatgen.core.units import ArrayWithUnit from pymatgen.core.structure import Structure from monty.dev import requires __author__ = "Matteo Giantomassi" __copyright__ = "Copyright 2013, The Materials Project" __vers...
0
1,031
0
5,793
0
166
0
2
160
dbf198b7aa8c20abfadb40fb4b4f9803ea87f610
1,033
py
Python
fastmsa/test/e2e.py
abhan00/fastana
46f90832d8e24185619292f76cbd1b3ce73f2dae
[ "Apache-2.0" ]
1
2021-05-01T13:44:44.000Z
2021-05-01T13:44:44.000Z
fastmsa/test/e2e.py
abhan00/fastana
46f90832d8e24185619292f76cbd1b3ce73f2dae
[ "Apache-2.0" ]
9
2021-04-17T03:22:56.000Z
2021-05-12T16:40:53.000Z
fastmsa/test/e2e.py
abhan00/fastana
46f90832d8e24185619292f76cbd1b3ce73f2dae
[ "Apache-2.0" ]
null
null
null
"""E2E .""" def check_port_opened(port: int): """e2e .""" import socket a_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: location = ("127.0.0.1", port) result_of_check = a_socket.connect_ex(location) if result_of_check == 0: return True ...
24.595238
64
0.658277
"""E2E 테스트 모듈입니다.""" from collections import defaultdict from fastmsa.core import AbstractPubsubClient def check_port_opened(port: int): """e2e 테스트를 위해 포트 오픈 여부를 체크합니다.""" import socket a_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) try: location = ("127.0.0.1", port) r...
78
0
167
339
0
0
0
38
68
728d8a694d4b21c4c1082be2cfaa19ea53ea9f5d
14,435
py
Python
scripts/pyBlast.py
Redmar-van-den-Berg/HiFi-assembly
d07c5f7610b5a7202d662659d43dc4650e283a6c
[ "MIT" ]
2
2021-11-24T15:13:56.000Z
2021-12-08T16:13:47.000Z
scripts/pyBlast.py
Redmar-van-den-Berg/HiFi-assembly
d07c5f7610b5a7202d662659d43dc4650e283a6c
[ "MIT" ]
null
null
null
scripts/pyBlast.py
Redmar-van-den-Berg/HiFi-assembly
d07c5f7610b5a7202d662659d43dc4650e283a6c
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # Author: Redmar van den Berg # Copyright: 2017-2018 NVWA # # NVWA: Nederlandse Voedsel- en Warenautoriteit # Netherlands Food and Consumer Product Safety Authority # https://english.nvwa.nl/ # # Licence: GPLv3 import sys from Bio.Blast.Applications import NcbiblastnCommandline def _minmax(...
36.918159
86
0.592657
#!/usr/bin/env python3 # Author: Redmar van den Berg # Copyright: 2017-2018 NVWA # # NVWA: Nederlandse Voedsel- en Warenautoriteit # Netherlands Food and Consumer Product Safety Authority # https://english.nvwa.nl/ # # Licence: GPLv3 import os import sys import subprocess import shutil import tempfile import unittest...
0
4,690
0
7,968
0
0
0
-8
357
13e2a31f98421eef7ffaa8ed81e070394373c409
865
py
Python
CISSL_cls/lib/algs/pseudo_label.py
MinsungHyun/Class-Imbalanced-Semi-Supervsied-Learning
fed14a47fa4dda8a72e8f606ad9a21922b4f7ba4
[ "MIT" ]
4
2021-09-28T09:23:10.000Z
2022-03-14T11:51:23.000Z
CISSL_cls/lib/algs/pseudo_label.py
MinsungHyun/Class-Imbalanced-Semi-Supervsied-Learning
fed14a47fa4dda8a72e8f606ad9a21922b4f7ba4
[ "MIT" ]
null
null
null
CISSL_cls/lib/algs/pseudo_label.py
MinsungHyun/Class-Imbalanced-Semi-Supervsied-Learning
fed14a47fa4dda8a72e8f606ad9a21922b4f7ba4
[ "MIT" ]
null
null
null
import torch.nn as nn
34.6
83
0.620809
import torch import torch.nn as nn import torch.nn.functional as F class PL(nn.Module): def __init__(self, threshold): super().__init__() self.th = threshold def forward(self, x, y, model, mask): y_probs = y.softmax(1) onehot_label = self.__make_one_hot(y_probs.max(1)[1], y.siz...
0
0
0
775
0
0
0
1
67