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
1bace628d6608ff56df99ab98a1151306441f707
1,196
py
Python
site-blocker/index.py
jocode/curso-python
17acb889c835b6c0d42533a73d5b7463ce3a4027
[ "MIT" ]
null
null
null
site-blocker/index.py
jocode/curso-python
17acb889c835b6c0d42533a73d5b7463ce3a4027
[ "MIT" ]
null
null
null
site-blocker/index.py
jocode/curso-python
17acb889c835b6c0d42533a73d5b7463ce3a4027
[ "MIT" ]
null
null
null
import time from datetime import datetime as dt # hosts Files # Windows c:\\windows\sistem32\drivers\etc # Mac & Linux /etc/hosts HOSTS_PATH_WINDOWS = r'C:\Windows\System32\drivers\etc\ hosts' HOSTS_UNIX_WINDOWS = '/etc/hosts' HOST_DIR = "hosts" REDIRECT = "127.0.0.1" websites_list = [ "www.facebook.com", "...
26.577778
136
0.551839
import time from datetime import datetime as dt # hosts Files # Windows c:\\windows\sistem32\drivers\etc # Mac & Linux /etc/hosts HOSTS_PATH_WINDOWS = r'C:\Windows\System32\drivers\etc\ hosts' HOSTS_UNIX_WINDOWS = '/etc/hosts' HOST_DIR = "hosts" REDIRECT = "127.0.0.1" websites_list = [ "www.facebook.com", "...
0
0
0
0
0
0
0
0
0
03ea128c780855eb2ae5b6b3bffa591b6c0f57bb
979
py
Python
src/api/stats.py
TorrentofShame/hackathon-2021-backend
a85989421df8ad900b01ad026dbe713312b0a54e
[ "MIT" ]
4
2021-08-19T17:32:08.000Z
2021-09-18T23:23:42.000Z
src/api/stats.py
TorrentofShame/hackathon-2021-backend
a85989421df8ad900b01ad026dbe713312b0a54e
[ "MIT" ]
63
2021-05-16T16:02:00.000Z
2021-11-03T04:43:03.000Z
src/api/stats.py
TorrentofShame/hackathon-2021-backend
a85989421df8ad900b01ad026dbe713312b0a54e
[ "MIT" ]
2
2021-09-07T04:05:46.000Z
2021-09-13T21:26:42.000Z
# -*- coding: utf-8 -*- """ src.api.stats ~~~~~~~~~~~~~ Functions: count_users() """ from src.api import Blueprint stats_blueprint = Blueprint("stats", __name__) # @stats_blueprint.route("/stats/user_count/", methods=["GET"])
21.282609
63
0.444331
# -*- coding: utf-8 -*- """ src.api.stats ~~~~~~~~~~~~~ Functions: count_users() """ from src.api import Blueprint from src.models.hacker import Hacker stats_blueprint = Blueprint("stats", __name__) # @stats_blueprint.route("/stats/user_count/", methods=["GET"]) @stats_blueprint.get("/stats/u...
0
667
0
0
0
0
0
15
44
c29baa706cbd00e2977d8ba737160b67aa8ea885
1,213
py
Python
d11b.py
jogloran/advent-of-code-2020
9804f1eb8d94c991d9aa3348f01f4bf65c195849
[ "MIT" ]
null
null
null
d11b.py
jogloran/advent-of-code-2020
9804f1eb8d94c991d9aa3348f01f4bf65c195849
[ "MIT" ]
null
null
null
d11b.py
jogloran/advent-of-code-2020
9804f1eb8d94c991d9aa3348f01f4bf65c195849
[ "MIT" ]
null
null
null
import numpy as np d = np.loadtxt(munge(line) for line in open('d11.txt')).astype(np.int) floor = d == 0.0 n = np.zeros_like(d) while True: neighbours = calculate_neighbours() d_ = np.copy(d) d_[neighbours >= 5] = 0 d_[neighbours == 0] = 1 d_[floor] = 0 if np.all(d == d_): print('stabl...
26.955556
85
0.471558
import numpy as np def munge(line): return ' '.join('1.0' if c == 'L' else '0.0' for c in line.rstrip()) d = np.loadtxt(munge(line) for line in open('d11.txt')).astype(np.int) floor = d == 0.0 n = np.zeros_like(d) def calculate_neighbours(): n.fill(0) r, c = d.shape for j in range(r): for i in ran...
0
0
0
0
0
780
0
0
68
5d34acef6e08e3399ebe1575c7253c95edf9c487
21,048
py
Python
pyscf/cc/ccsd_rdm.py
r-peng/pyscf
9a14f9bcc63bc75f5939cb4d00eb47861d8d8989
[ "Apache-2.0" ]
2
2021-06-30T22:33:35.000Z
2021-11-22T18:02:36.000Z
pyscf/cc/ccsd_rdm.py
r-peng/pyscf
9a14f9bcc63bc75f5939cb4d00eb47861d8d8989
[ "Apache-2.0" ]
null
null
null
pyscf/cc/ccsd_rdm.py
r-peng/pyscf
9a14f9bcc63bc75f5939cb4d00eb47861d8d8989
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2014-2020 The PySCF Developers. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
41.433071
95
0.590602
#!/usr/bin/env python # Copyright 2014-2020 The PySCF Developers. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # U...
0
0
0
0
0
8,502
0
-3
136
91947df8b6d65c317725816436c2bc945cc9a642
2,022
py
Python
pyhole/core/process.py
roaet/pyhole
472ab6e51e475188eecdb0221a10e3ccc2332e09
[ "Apache-2.0" ]
null
null
null
pyhole/core/process.py
roaet/pyhole
472ab6e51e475188eecdb0221a10e3ccc2332e09
[ "Apache-2.0" ]
null
null
null
pyhole/core/process.py
roaet/pyhole
472ab6e51e475188eecdb0221a10e3ccc2332e09
[ "Apache-2.0" ]
1
2020-04-13T17:24:53.000Z
2020-04-13T17:24:53.000Z
# Copyright 2010-2015 Josh Kearney # # 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 agre...
30.636364
76
0.619189
# Copyright 2010-2015 Josh Kearney # # 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 agre...
0
0
0
1,209
0
0
0
-20
90
331ebc0d5a162d548680fb71598726bc4c395ff5
1,775
py
Python
alg_prim_minimum_spanning_tree.py
bowen0701/python-algorithms-data-structures
e625f59a9fc59e4728825078d4434a7968a724e5
[ "BSD-2-Clause" ]
8
2019-03-18T06:37:24.000Z
2022-01-30T07:50:58.000Z
alg_prim_minimum_spanning_tree.py
bowen0701/python-algorithms-data-structures
e625f59a9fc59e4728825078d4434a7968a724e5
[ "BSD-2-Clause" ]
null
null
null
alg_prim_minimum_spanning_tree.py
bowen0701/python-algorithms-data-structures
e625f59a9fc59e4728825078d4434a7968a724e5
[ "BSD-2-Clause" ]
null
null
null
from __future__ import absolute_import from __future__ import division from __future__ import print_function from ds_min_binary_heap_attribute import MinBinaryHeapAttribute def prim(w_graph_d): """Prim's algorithm for minimum spanning tree in "undirected weighted" graph, G(V, E). Time complexity for : ...
29.098361
63
0.574085
from __future__ import absolute_import from __future__ import division from __future__ import print_function from ds_min_binary_heap_attribute import MinBinaryHeapAttribute def prim(w_graph_d): """Prim's algorithm for minimum spanning tree in "undirected weighted" graph, G(V, E). Time complexity for : ...
0
0
0
0
0
518
0
0
23
d62777d5cc7b02f3c4b77d248c7adcea51ed9c35
15,748
py
Python
snake.py
crescat/snake
fbbd7fb31391f94a6c3c8a5c8daca9af23f7b155
[ "MIT" ]
null
null
null
snake.py
crescat/snake
fbbd7fb31391f94a6c3c8a5c8daca9af23f7b155
[ "MIT" ]
null
null
null
snake.py
crescat/snake
fbbd7fb31391f94a6c3c8a5c8daca9af23f7b155
[ "MIT" ]
null
null
null
import pygame SNAKE_WIDTH = 10 BORDER = 3 PADDING = 0 HEADER = 30 BOARD_ROW = 20 BOARD_COL = 30 WINDOW_PADDING = 20 BIG_FONT = 25 SMALL_FONT = 15 SCORE_FONT = 20 FONT_TYPE = 'Ubuntu Mono' SNAKE_SPEED = 4 # cell per second FOOD_NUMBER = 1 # number of food generated at once POISON_PROBABILITY = 15 # % chance of poison t...
34.08658
101
0.557277
import pygame import random import time SNAKE_WIDTH = 10 BORDER = 3 PADDING = 0 HEADER = 30 BOARD_ROW = 20 BOARD_COL = 30 WINDOW_PADDING = 20 BIG_FONT = 25 SMALL_FONT = 15 SCORE_FONT = 20 FONT_TYPE = 'Ubuntu Mono' SNAKE_SPEED = 4 # cell per second FOOD_NUMBER = 1 # number of food generated at once POISON_PROBABILITY =...
0
0
0
14,519
0
0
0
-18
90
aac17784f3a7d505052b6b43aa2dfdedcda17819
3,214
py
Python
lib/silfont/scripts/psfsetunicodes.py
silnrsi/pysilfont
3c7855d21426590a3c0e235c965e8f90b76eccbb
[ "MIT" ]
41
2015-05-21T21:12:26.000Z
2022-02-17T17:23:14.000Z
lib/silfont/scripts/psfsetunicodes.py
silnrsi/pysilfont
3c7855d21426590a3c0e235c965e8f90b76eccbb
[ "MIT" ]
63
2015-05-15T10:25:55.000Z
2021-02-23T04:51:17.000Z
lib/silfont/scripts/psfsetunicodes.py
silnrsi/pysilfont
3c7855d21426590a3c0e235c965e8f90b76eccbb
[ "MIT" ]
12
2015-06-12T11:52:08.000Z
2020-09-23T10:40:59.000Z
#!/usr/bin/env python __doc__ = '''Set the unicodes of glyphs in a font based on an external csv file. - csv format glyphname,unicode, [unicode2, [,unicode3]]''' __url__ = 'http://github.com/silnrsi/pysilfont' __copyright__ = 'Copyright (c) 2016 SIL International (http://www.sil.org)' __license__ = 'Released under the ...
40.175
116
0.576229
#!/usr/bin/env python __doc__ = '''Set the unicodes of glyphs in a font based on an external csv file. - csv format glyphname,unicode, [unicode2, [,unicode3]]''' __url__ = 'http://github.com/silnrsi/pysilfont' __copyright__ = 'Copyright (c) 2016 SIL International (http://www.sil.org)' __license__ = 'Released under the ...
0
0
0
0
0
2,319
0
11
70
1d8b2ecd42fdefc52885fd2f1884bd0d7fc224eb
559
py
Python
fiqs/testing/gen_traffic_data.py
quividi/fiqs
fc04697fb6e345de640441a06c15c0c56e9bc2b0
[ "MIT" ]
3
2018-01-25T15:41:40.000Z
2020-01-10T10:52:25.000Z
fiqs/testing/gen_traffic_data.py
quividi/fiqs
fc04697fb6e345de640441a06c15c0c56e9bc2b0
[ "MIT" ]
4
2020-01-09T13:48:57.000Z
2020-02-17T10:50:02.000Z
fiqs/testing/gen_traffic_data.py
quividi/fiqs
fc04697fb6e345de640441a06c15c0c56e9bc2b0
[ "MIT" ]
2
2019-03-15T08:42:13.000Z
2021-02-18T09:46:53.000Z
# -*- coding: utf-8 -*- if __name__ == '__main__': size = 500 gen_traffic_data(size)
23.291667
66
0.59034
# -*- coding: utf-8 -*- import json import random from fiqs.testing.gen_data import random_shop_id, random_timestamp def gen_traffic_data(size): for i in range(size): print(json.dumps({ 'id': i + 1, 'shop_id': random_shop_id(), 'timestamp': random_timestamp(), ...
0
0
0
0
0
345
0
27
91
76223d3239868477962b179ed64a85b93c3168c9
102
py
Python
ed/l/python/examples/http/client.get.py
cn007b/stash
bae604d3056f09b9b6c6b3e0282f02c829801f5c
[ "MIT" ]
null
null
null
ed/l/python/examples/http/client.get.py
cn007b/stash
bae604d3056f09b9b6c6b3e0282f02c829801f5c
[ "MIT" ]
null
null
null
ed/l/python/examples/http/client.get.py
cn007b/stash
bae604d3056f09b9b6c6b3e0282f02c829801f5c
[ "MIT" ]
1
2021-11-26T05:40:08.000Z
2021-11-26T05:40:08.000Z
import requests res = requests.get('https://api.github.com/users/cn007b') print(res) print(res.text)
17
57
0.745098
import requests res = requests.get('https://api.github.com/users/cn007b') print(res) print(res.text)
0
0
0
0
0
0
0
0
0
0ee256b22f9ed7c41463cc56399eaa84c3d99b41
362
py
Python
www/orm_test.py
tsaizhihuai/Weppy
e0edfc86e1c588073f081eaaef37a7e2af2feaaf
[ "MIT" ]
2
2017-04-15T08:43:21.000Z
2017-07-15T13:43:46.000Z
www/orm_test.py
tsaizhihuai/Weppy
e0edfc86e1c588073f081eaaef37a7e2af2feaaf
[ "MIT" ]
null
null
null
www/orm_test.py
tsaizhihuai/Weppy
e0edfc86e1c588073f081eaaef37a7e2af2feaaf
[ "MIT" ]
2
2017-08-25T14:00:54.000Z
2018-11-28T12:59:38.000Z
import asyncio loop = asyncio.get_event_loop() loop.run_until_complete(test()) loop.close()
21.294118
77
0.71547
import orm from models import User import asyncio @asyncio.coroutine def test(): yield from orm.create_pool(loop, user='root', password='czh', db='weppy') user = User(name="admin", password='123', is_admin=True) yield from user.save() yield from orm.destory_pool() loop = asyncio.get_event_loop() loo...
0
209
0
0
0
0
0
-9
67
40af6a93010dcde4b65b5357c78b30f56c0a01ff
7,375
py
Python
distributions/util.py
forcedotcom/distributions
5f2d7fdfa2f4d34e5b01ac395d03fc61df4652d4
[ "BSD-3-Clause" ]
22
2015-01-05T16:52:32.000Z
2020-09-03T17:53:22.000Z
distributions/util.py
afcarl/distributions
8d4d8eebbcec14fa9f4c314425f127e1316d9951
[ "BSD-3-Clause" ]
2
2015-02-10T03:55:34.000Z
2016-05-04T05:48:16.000Z
distributions/util.py
afcarl/distributions
8d4d8eebbcec14fa9f4c314425f127e1316d9951
[ "BSD-3-Clause" ]
8
2015-01-13T21:42:04.000Z
2019-12-12T08:39:11.000Z
# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # - Redistributions of source code must retain the above copyright # notice, this list of conditions...
34.624413
78
0.658983
# Copyright (c) 2014, Salesforce.com, Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # - Redistributions of source code must retain the above copyright # notice, this list of conditions...
0
0
0
0
0
641
0
0
69
508b31ca2298d4acb1eb0fa768526c6e4b4d0c35
5,807
py
Python
dockeroo/setup/cmmi.py
dockeroo/dockeroo
6395b4008d0d3d6cabdfec9d52ce448b095fdae1
[ "Apache-2.0" ]
4
2016-07-25T09:21:32.000Z
2022-02-11T19:11:23.000Z
dockeroo/setup/cmmi.py
dockeroo/dockeroo
6395b4008d0d3d6cabdfec9d52ce448b095fdae1
[ "Apache-2.0" ]
null
null
null
dockeroo/setup/cmmi.py
dockeroo/dockeroo
6395b4008d0d3d6cabdfec9d52ce448b095fdae1
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # # Copyright (c) 2016, Giacomo Cariello. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
37.707792
87
0.613053
# -*- coding: utf-8 -*- # # Copyright (c) 2016, Giacomo Cariello. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
0
244
0
4,671
0
0
0
70
114
aa645cc83e687e7e3d1d8785463e5c6b03976375
1,240
py
Python
test_1_agent.py
djgroen/flee-release
d9c7048ac8400cfa6e08d00a5c2f0dc9461506c1
[ "BSD-3-Clause" ]
18
2017-10-24T12:49:42.000Z
2022-03-02T15:43:15.000Z
test_1_agent.py
djgroen/flee-release
d9c7048ac8400cfa6e08d00a5c2f0dc9461506c1
[ "BSD-3-Clause" ]
null
null
null
test_1_agent.py
djgroen/flee-release
d9c7048ac8400cfa6e08d00a5c2f0dc9461506c1
[ "BSD-3-Clause" ]
11
2018-02-15T13:27:03.000Z
2021-05-24T19:24:59.000Z
import flee.flee as flee import datamanager.handle_refugee_data as handle_refugee_data """ Generation 1 code. Incorporates only distance, travel always takes one day. """ if __name__ == "__main__": print("Testing basic data handling and simulation kernel.") flee.SimulationSettings.MinMoveSpeed=5000.0 flee.Simu...
24.313725
121
0.706452
import flee.flee as flee import datamanager.handle_refugee_data as handle_refugee_data import numpy as np import outputanalysis.analysis as a """ Generation 1 code. Incorporates only distance, travel always takes one day. """ if __name__ == "__main__": print("Testing basic data handling and simulation kernel.") ...
0
0
0
0
0
0
0
11
44
5d56d364bad70d322527557aca2892de2bf7e1f8
541
py
Python
PyMOTW/source/re/re_email_compact.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
1
2019-01-04T05:47:50.000Z
2019-01-04T05:47:50.000Z
PyMOTW/source/re/re_email_compact.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
1
2020-07-18T03:52:03.000Z
2020-07-18T04:18:01.000Z
PyMOTW/source/re/re_email_compact.py
axetang/AxePython
3b517fa3123ce2e939680ad1ae14f7e602d446a6
[ "Apache-2.0" ]
2
2021-03-06T04:28:32.000Z
2021-03-06T04:59:17.000Z
#!/usr/bin/env python3 # encoding: utf-8 # # Copyright (c) 2010 Doug Hellmann. All rights reserved. # """Match email addresses """ #end_pymotw_header import re address = re.compile('[\w\d.+-]+@([\w\d.]+\.)+(com|org|edu)') candidates = [ u'first.last@example.com', u'first.last+category@gmail.com', u'vali...
20.807692
61
0.63586
#!/usr/bin/env python3 # encoding: utf-8 # # Copyright (c) 2010 Doug Hellmann. All rights reserved. # """Match email addresses """ #end_pymotw_header import re address = re.compile('[\w\d.+-]+@([\w\d.]+\.)+(com|org|edu)') candidates = [ u'first.last@example.com', u'first.last+category@gmail.com', u'vali...
0
0
0
0
0
0
0
0
0
3603bb7310b727c694eed89ef0262c830dbabad8
1,937
py
Python
day25/part1.py
bugra-yilmaz/adventofcode2021
136cb1d4fba42af4eea934a73714c93710c8741e
[ "MIT" ]
null
null
null
day25/part1.py
bugra-yilmaz/adventofcode2021
136cb1d4fba42af4eea934a73714c93710c8741e
[ "MIT" ]
null
null
null
day25/part1.py
bugra-yilmaz/adventofcode2021
136cb1d4fba42af4eea934a73714c93710c8741e
[ "MIT" ]
null
null
null
import os.path INPUT_TXT = os.path.join(os.path.dirname(__file__), 'input.txt') INPUT_S = '''\ v...>>.vv> .vv>>.vv.. >>.>v>...v >>v>>.>.v. v>v.vv.v.. >.>>..v... .vv..>.>v. v.v..>>v.v ....v..v.> ''' EXPECTED = 58 if __name__ == '__main__': raise SystemExit(main())
20.389474
78
0.486319
import os.path import pytest INPUT_TXT = os.path.join(os.path.dirname(__file__), 'input.txt') def compute(s: str) -> int: lines = s.splitlines() row_count = len(lines) col_count = len(lines[0]) south_herd = set() east_herd = set() for i, row in enumerate(lines): for j, point in enum...
0
164
0
0
0
1,413
0
-8
92
856504d2b10a123e141ca506b461f62b5cbdf3f3
6,121
py
Python
aae/auto_pose/ae/encoder.py
shbe-aau/multi-pose-estimation
0425ed9dcc7969f0281cb435615abc33c640e157
[ "MIT" ]
4
2021-12-28T09:25:06.000Z
2022-01-13T12:55:44.000Z
aae/auto_pose/ae/encoder.py
shbe-aau/multi-view-pose-estimation
22cea6cd09684fe655fb2214bc14856f589048e1
[ "MIT" ]
null
null
null
aae/auto_pose/ae/encoder.py
shbe-aau/multi-view-pose-estimation
22cea6cd09684fe655fb2214bc14856f589048e1
[ "MIT" ]
1
2022-01-13T13:00:15.000Z
2022-01-13T13:00:15.000Z
# -*- coding: utf-8 -*-
33.086486
144
0.595491
# -*- coding: utf-8 -*- import tensorflow as tf import numpy as np import os from .utils import lazy_property class Encoder(object): def __init__(self, input, latent_space_size, num_filters, kernel_size, strides, batch_norm, resnet50, resnet101, aspp, pre_trained_model, emb_inv...
0
3,659
0
2,322
0
0
0
-2
113
12b6cd14c62b112923af638254979346cd67328b
6,557
py
Python
find_my_lunch.py
frostvik/playground
17430ee6ec163291211219ebafba19bb3c4065d7
[ "Apache-2.0" ]
null
null
null
find_my_lunch.py
frostvik/playground
17430ee6ec163291211219ebafba19bb3c4065d7
[ "Apache-2.0" ]
null
null
null
find_my_lunch.py
frostvik/playground
17430ee6ec163291211219ebafba19bb3c4065d7
[ "Apache-2.0" ]
1
2020-03-09T12:03:06.000Z
2020-03-09T12:03:06.000Z
from datetime import datetime import argparse rest = [] find_lunch = argparse.ArgumentParser(description='Generate a list of open restaurants') group = find_lunch.add_mutually_exclusive_group(required=True) group.add_argument('-d', '--day', help='day restaurants are open') find_lunch.add_argument('-t', '--time', help...
43.138158
173
0.574196
from datetime import datetime, timedelta, time import calendar import csv import re import argparse rest = [] find_lunch = argparse.ArgumentParser(description='Generate a list of open restaurants') group = find_lunch.add_mutually_exclusive_group(required=True) group.add_argument('-d', '--day', help='day restaurants ar...
0
0
0
0
0
5,654
0
-12
296
008bdd9ef6f550221ac1ad41aa48ca2f51321bb4
288
py
Python
codeforces/unberable-489d.py
jan25/code_sorted
f405fd0898f72eb3d5428f9e10aefb4a009d5089
[ "Unlicense" ]
2
2018-01-18T11:01:36.000Z
2021-12-20T18:14:48.000Z
codeforces/unberable-489d.py
jan25/code_sorted
f405fd0898f72eb3d5428f9e10aefb4a009d5089
[ "Unlicense" ]
null
null
null
codeforces/unberable-489d.py
jan25/code_sorted
f405fd0898f72eb3d5428f9e10aefb4a009d5089
[ "Unlicense" ]
null
null
null
n, m = map(int, input().split()) rev_d = [{} for i in range(n + 1)] g = [[] for i in range(n + 1)] for e in range(m): u, v = map(int, input().split()) if u not in rev_d[v]: rev_d[u] = 0 rev_d[u] += 1 g[v].append(v) pairs = {} for i in range(1, n + 1): for j in g[i]:
15.157895
36
0.5
n, m = map(int, input().split()) rev_d = [{} for i in range(n + 1)] g = [[] for i in range(n + 1)] for e in range(m): u, v = map(int, input().split()) if u not in rev_d[v]: rev_d[u] = 0 rev_d[u] += 1 g[v].append(v) pairs = {} for i in range(1, n + 1): for j in g[i]:
0
0
0
0
0
0
0
0
0
d38d84ba4726f304f7a281c9aaab8c4c6c39428b
1,716
py
Python
train.py
rainorangelemon/TextCNN-with-Attention
1e01c85f87e441236ddea09fbbecd00c1ecb6804
[ "Apache-2.0" ]
1
2022-03-31T13:02:44.000Z
2022-03-31T13:02:44.000Z
train.py
rainorangelemon/TextCNN-with-Attention
1e01c85f87e441236ddea09fbbecd00c1ecb6804
[ "Apache-2.0" ]
null
null
null
train.py
rainorangelemon/TextCNN-with-Attention
1e01c85f87e441236ddea09fbbecd00c1ecb6804
[ "Apache-2.0" ]
1
2021-04-20T11:21:06.000Z
2021-04-20T11:21:06.000Z
#! /usr/bin/env python # coding=utf-8 # /************************************************************************************ # *** # *** File Author: Dell, 2018 09 21 10:25:44 CST # *** # ************************************************************************************/ import os import argparse import torc...
26.8125
87
0.587995
#! /usr/bin/env python # coding=utf-8 # /************************************************************************************ # *** # *** File Author: Dell, 2018年 09月 21日 星期五 10:25:44 CST # *** # ************************************************************************************/ import os import argparse impor...
18
0
0
0
0
0
0
0
0
9bc8308aa7f5c672baa8f5e02bc18ad7aea4c964
2,902
py
Python
index.py
SarakoYT/python-copy-paster
bd7ed7f30c56f58f3ba0fec96d4951d7e2199712
[ "MIT" ]
null
null
null
index.py
SarakoYT/python-copy-paster
bd7ed7f30c56f58f3ba0fec96d4951d7e2199712
[ "MIT" ]
null
null
null
index.py
SarakoYT/python-copy-paster
bd7ed7f30c56f58f3ba0fec96d4951d7e2199712
[ "MIT" ]
1
2022-03-07T19:43:11.000Z
2022-03-07T19:43:11.000Z
import time filename = False lineRn = 0 # For ordered mode randomVal = 0 copyTime = False # Gets lines, picks 10 random lines from the script getFile() randomOrOrdered() # Open the file and read lines with open(filename, 'r') as infile: # Read all lines into memory lines = infile.readli...
25.681416
116
0.547209
import urllib import random import time import pyperclip filename = False lineRn = 0 # For ordered mode randomVal = 0 copyTime = False def getFile(): print("What is your file called?") x = input() if ".txt" in x: global filename; filename = x; try: f = op...
0
0
0
0
0
2,194
0
-21
192
908381b2cd613d1193d5e73679504be23dd6522c
8,968
py
Python
reana/reana_dev/release.py
VMois/reana
7cccfaa324e473c9a9db83df5e6f3b5779cd890b
[ "MIT" ]
89
2017-05-31T21:37:48.000Z
2022-03-01T12:32:45.000Z
reana/reana_dev/release.py
VMois/reana
7cccfaa324e473c9a9db83df5e6f3b5779cd890b
[ "MIT" ]
383
2017-01-16T17:13:08.000Z
2022-03-31T16:11:11.000Z
reana/reana_dev/release.py
VMois/reana
7cccfaa324e473c9a9db83df5e6f3b5779cd890b
[ "MIT" ]
43
2017-01-16T13:23:09.000Z
2022-02-04T10:30:50.000Z
# -*- coding: utf-8 -*- # # This file is part of REANA. # Copyright (C) 2020 CERN. # # REANA is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """`reana-dev`'s release commands.""" import sys from reana.reana_dev.git import (git_is_curre...
36.90535
116
0.616414
# -*- coding: utf-8 -*- # # This file is part of REANA. # Copyright (C) 2020 CERN. # # REANA is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """`reana-dev`'s release commands.""" import os import sys import tempfile from shutil import...
0
6,767
0
0
0
0
0
224
227
dac5d39f9cd3646ef3766c8d8eb0900a3be74f2c
1,204
py
Python
setup.py
albandum/django-health-check-1.6
c2a9e424ac6e4b9a5ba2cd5bf2dc9a2c558deb36
[ "MIT" ]
null
null
null
setup.py
albandum/django-health-check-1.6
c2a9e424ac6e4b9a5ba2cd5bf2dc9a2c558deb36
[ "MIT" ]
null
null
null
setup.py
albandum/django-health-check-1.6
c2a9e424ac6e4b9a5ba2cd5bf2dc9a2c558deb36
[ "MIT" ]
1
2021-03-08T17:17:59.000Z
2021-03-08T17:17:59.000Z
from setuptools import setup from health_check import __version__ # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... setup( name = "django-he...
35.411765
143
0.696013
import os from setuptools import setup from health_check import __version__ # Utility function to read the README file. # Used for the long_description. It's nice, because now 1) we have a top level # README file and 2) it's easier to type in the README file than to put a raw # string in below ... def read(fname): ...
0
0
0
0
0
66
0
-12
45
37397c2d5b783d0173b390358611888c7268c79c
13,285
py
Python
migrations/versions/2018_11_19_clean_page_sources_remove_old_data_source_attributes_from_.py
AlexKouzy/ethnicity-facts-and-figures-publisher
18ab2495a8633f585e18e607c7f75daa564a053d
[ "MIT" ]
1
2021-10-06T13:48:36.000Z
2021-10-06T13:48:36.000Z
migrations/versions/2018_11_19_clean_page_sources_remove_old_data_source_attributes_from_.py
AlexKouzy/ethnicity-facts-and-figures-publisher
18ab2495a8633f585e18e607c7f75daa564a053d
[ "MIT" ]
116
2018-11-02T17:20:47.000Z
2022-02-09T11:06:22.000Z
migrations/versions/2018_11_19_clean_page_sources_remove_old_data_source_attributes_from_.py
racedisparityaudit/rd_cms
a12f0e3f5461cc41eed0077ed02e11efafc5dd76
[ "MIT" ]
2
2018-11-09T16:47:35.000Z
2020-04-09T13:06:48.000Z
"""Remove old `data source` attributes from the monolith page table Revision ID: 2018_11_19_clean_page_sources Revises: ban_dimension_timestamp_nulls Create Date: 2018-11-20 12:08:43.201032 """ # revision identifiers, used by Alembic. revision = "2018_11_19_clean_page_sources" down_revision = "ban_dimension_timestam...
45.187075
161
0.67309
"""Remove old `data source` attributes from the monolith page table Revision ID: 2018_11_19_clean_page_sources Revises: ban_dimension_timestamp_nulls Create Date: 2018-11-20 12:08:43.201032 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql # revision identifiers, used by A...
0
0
0
0
0
5,687
0
24
112
03b1ba7fbd590e7e594bff13ee63104eb7ad95d6
308
py
Python
Aula07/Ex013.py
FlaYukari/Exerc-cios-Python-3--Mundo-01
4b7e3149806d851209edc9bf643b5abd072e9bc8
[ "MIT" ]
null
null
null
Aula07/Ex013.py
FlaYukari/Exerc-cios-Python-3--Mundo-01
4b7e3149806d851209edc9bf643b5abd072e9bc8
[ "MIT" ]
null
null
null
Aula07/Ex013.py
FlaYukari/Exerc-cios-Python-3--Mundo-01
4b7e3149806d851209edc9bf643b5abd072e9bc8
[ "MIT" ]
null
null
null
print('='*20, 'DESAFIO 013', '='*20) #ok print('Vamos calcular qual serio o valor do seu salrio se o atual sofresse um aumento de 15%?') sa = int(input('Digite valor do seu salrio atual: ')) sal_acresc = sa * 1.15 print(f'O valor do seu salrio com o acrscimo de 15% de R$ {sal_acresc:.2f}')
34.222222
97
0.665584
print('='*20, 'DESAFIO 013', '='*20) #ok print('Vamos calcular qual serio o valor do seu salário se o atual sofresse um aumento de 15%?') sa = int(input('Digite valor do seu salário atual: ')) sal_acresc = sa * 1.15 print(f'O valor do seu salário com o acréscimo de 15% é de R$ {sal_acresc:.2f}')
10
0
0
0
0
0
0
0
0
5206031f1e671faa8906797477b20a0769c9d27a
1,156
py
Python
src/app/core/models/entity.py
eugene-p/bcrm
bba6628df6a12ecac8aa6bb50ee86f0c14414939
[ "Apache-2.0" ]
null
null
null
src/app/core/models/entity.py
eugene-p/bcrm
bba6628df6a12ecac8aa6bb50ee86f0c14414939
[ "Apache-2.0" ]
32
2019-01-29T18:59:58.000Z
2019-02-10T23:11:35.000Z
src/app/core/models/entity.py
eugene-p/bcrm
bba6628df6a12ecac8aa6bb50ee86f0c14414939
[ "Apache-2.0" ]
4
2019-01-29T20:13:11.000Z
2020-07-11T22:57:08.000Z
# coding: utf-8 # -*- coding: utf-8 -*- # vim: set fileencoding=utf-8 : entity_schema = { "type": "object", "properties": { "entity_type_id": {"type": "string"}, "content": {"type": "object"}, }, "required": [ "entity_type_id", "content" ], }
21.811321
56
0.564014
# coding: utf-8 # -*- coding: utf-8 -*- # vim: set fileencoding=utf-8 : import datetime import uuid import json from app.core.db import db entity_schema = { "type": "object", "properties": { "entity_type_id": {"type": "string"}, "content": {"type": "object"}, }, "required": [ "entity_t...
0
0
0
789
0
0
0
-21
112
2ee6080d53933013cfdc1822c825118f763f7da3
1,707
py
Python
info/__init__.py
gottuantuan/info_got
80ee1e7005a7ee9d9fea20f84b5636cc3cc7c527
[ "MIT" ]
null
null
null
info/__init__.py
gottuantuan/info_got
80ee1e7005a7ee9d9fea20f84b5636cc3cc7c527
[ "MIT" ]
null
null
null
info/__init__.py
gottuantuan/info_got
80ee1e7005a7ee9d9fea20f84b5636cc3cc7c527
[ "MIT" ]
null
null
null
from flask_sqlalchemy import SQLAlchemy import logging from logging.handlers import RotatingFileHandler from config import Config from redis import StrictRedis db = SQLAlchemy() redis_store = StrictRedis(host=Config.REDIS_HOST, port=Config.REDIS_PORT, decode_responses=True) # # logging.basicConfig(level=logging.DEB...
28.45
96
0.777387
from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_session import Session import logging from logging.handlers import RotatingFileHandler from config import config,Config from redis import StrictRedis from flask_wtf import CSRFProtect,csrf db = SQLAlchemy() redis_store = StrictRedis(host=Confi...
405
150
0
0
0
658
0
39
89
38e7736e056832e0553d4a81e88976f85b980a07
838
py
Python
boundlexx/api/urls.py
AngellusMortis/boundlexx
407f5e38e8e0f067cbcb358787fc9af6a9be9b2a
[ "MIT" ]
1
2021-04-23T11:49:50.000Z
2021-04-23T11:49:50.000Z
boundlexx/api/urls.py
AngellusMortis/boundlexx
407f5e38e8e0f067cbcb358787fc9af6a9be9b2a
[ "MIT" ]
1
2021-04-17T18:17:12.000Z
2021-04-17T18:17:12.000Z
boundlexx/api/urls.py
AngellusMortis/boundlexx
407f5e38e8e0f067cbcb358787fc9af6a9be9b2a
[ "MIT" ]
null
null
null
from django.urls import include, path from django.views.generic import RedirectView from boundlexx.api.common import views from boundlexx.api.v1.router import router as apiv1 from boundlexx.api.v2.router import router as apiv2 # Wire up our API using automatic URL routing. # Additionally, we include login URLs for th...
39.904762
82
0.693317
from django.urls import include, path from django.views.generic import RedirectView from boundlexx.api.common import views from boundlexx.api.v1.router import router as apiv1 from boundlexx.api.v2.router import router as apiv2 # Wire up our API using automatic URL routing. # Additionally, we include login URLs for th...
0
0
0
0
0
0
0
0
0
580f7f4ab056d521b1a4fee160633d59a5eae2f8
459
py
Python
_old/main.py
DanielRabl/libtw2
ebcc833aa418e0ee25ff1da2881f7102dc7efa5d
[ "Apache-2.0", "MIT" ]
30
2017-07-21T19:05:07.000Z
2022-01-14T16:24:53.000Z
_old/main.py
DanielRabl/libtw2
ebcc833aa418e0ee25ff1da2881f7102dc7efa5d
[ "Apache-2.0", "MIT" ]
50
2017-11-20T16:43:05.000Z
2022-03-02T21:37:45.000Z
_old/main.py
DanielRabl/libtw2
ebcc833aa418e0ee25ff1da2881f7102dc7efa5d
[ "Apache-2.0", "MIT" ]
12
2017-07-21T19:05:10.000Z
2021-04-09T20:22:58.000Z
#!/usr/bin/env python import argparse if __name__ == '__main__': p = argparse.ArgumentParser() p.add_argument('filenames', metavar='datafile', type=str, nargs='+', help='the datafiles to be processed') args = p.parse_args() for filename in args.filenames: do(filename)
22.95
107
0.714597
#!/usr/bin/env python from datafile import Datafile, DatafileError import argparse def do(filename): try: with Datafile(filename) as df: pass except DatafileError as dfe: print("{}: {}".format(filename, dfe)) if __name__ == '__main__': p = argparse.ArgumentParser() p.add_argument('filenames', metavar='da...
0
0
0
0
0
113
0
23
45
e821dbf429881c4e04a7bb47a635b8470d01a945
853
py
Python
setup.py
boris-kr/flickr-download
91e62c64a2f7f5504f3356ee39a2fe6b6e7902e1
[ "Apache-2.0" ]
192
2015-01-12T08:48:11.000Z
2022-02-15T11:21:00.000Z
setup.py
boris-kr/flickr-download
91e62c64a2f7f5504f3356ee39a2fe6b6e7902e1
[ "Apache-2.0" ]
48
2015-02-19T13:32:49.000Z
2020-10-02T14:29:10.000Z
setup.py
boris-kr/flickr-download
91e62c64a2f7f5504f3356ee39a2fe6b6e7902e1
[ "Apache-2.0" ]
72
2015-02-09T11:07:45.000Z
2022-01-28T06:26:02.000Z
from setuptools import setup setup(name='flickr_download', version='0.2.21', description='Download photos from Flickr', long_description=readme(), url='https://github.com/beaufour/flickr-download.git', author='Allan Beaufour, Marian Such', author_email='allan@beaufour.dk, toxygen1...
26.65625
85
0.5932
from setuptools import setup def readme(): with open('README.md') as f: return f.read() setup(name='flickr_download', version='0.2.21', description='Download photos from Flickr', long_description=readme(), url='https://github.com/beaufour/flickr-download.git', author='Allan...
0
0
0
0
0
49
0
0
23
f12518de5030ac8dd84fd44ad4428bab8a4eef87
1,040
py
Python
logging/main_module.py
hustbill/Python-auto
9f43bc2613a64a373927047ac52d8e90ffe644f8
[ "Apache-2.0" ]
null
null
null
logging/main_module.py
hustbill/Python-auto
9f43bc2613a64a373927047ac52d8e90ffe644f8
[ "Apache-2.0" ]
null
null
null
logging/main_module.py
hustbill/Python-auto
9f43bc2613a64a373927047ac52d8e90ffe644f8
[ "Apache-2.0" ]
null
null
null
import logging import auxiliary_module # create logger with 'spam_application' logger = logging.getLogger('spam_application') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages fh = logging.FileHandler('spam.log') fh.setLevel(logging.DEBUG) # create console handler with a higher log le...
37.142857
85
0.804808
import logging import auxiliary_module # create logger with 'spam_application' logger = logging.getLogger('spam_application') logger.setLevel(logging.DEBUG) # create file handler which logs even debug messages fh = logging.FileHandler('spam.log') fh.setLevel(logging.DEBUG) # create console handler with a higher log le...
0
0
0
0
0
0
0
0
0
377e2e8d14acd4db732a940ab0d84698a75450c1
2,698
py
Python
samples/python.py
christopherafbjur/vscode-theme-onedarker
3cefe4445037f09336145168de414200b2c4f8ee
[ "MIT" ]
1
2021-11-02T02:31:34.000Z
2021-11-02T02:31:34.000Z
samples/python.py
christopherafbjur/vscode-theme-onedarker
3cefe4445037f09336145168de414200b2c4f8ee
[ "MIT" ]
4
2020-04-11T14:04:15.000Z
2022-02-10T17:05:25.000Z
samples/python.py
christopherafbjur/vscode-theme-onedarker
3cefe4445037f09336145168de414200b2c4f8ee
[ "MIT" ]
null
null
null
from threading import Thread, Timer, jsonify import ecommerce.shipping from ecommerce.shipping import calc_test import json TEST = 15 var_a = 1000 var_b = 'single' var_c = "double" var_d = True var_e = None var_f = """ Hello I am a multiline string """ var_g = f'I am a {var_b.c} quoted template string' var_h = f"I am ...
15.964497
61
0.621201
from threading import Thread, Timer, jsonify import ecommerce.shipping from ecommerce.shipping import calc_test import json TEST = 15 var_a = 1000 var_b = 'single' var_c = "double" var_d = True var_e = None var_f = """ Hello I am a multiline string """ var_g = f'I am a {var_b.c} quoted template string' var_h = f"I am ...
0
177
0
318
0
174
0
0
137
67eb03ce87cc59f20b11baefc063a71d2333767f
1,622
py
Python
scripts/parsing/common/exponential_scheduler.py
faramarzmunshi/gluon-nlp
218661c71b62b025d636975d2e71a0a4c2ea9f76
[ "Apache-2.0" ]
1
2020-06-09T01:50:53.000Z
2020-06-09T01:50:53.000Z
scripts/parsing/common/exponential_scheduler.py
faramarzmunshi/gluon-nlp
218661c71b62b025d636975d2e71a0a4c2ea9f76
[ "Apache-2.0" ]
null
null
null
scripts/parsing/common/exponential_scheduler.py
faramarzmunshi/gluon-nlp
218661c71b62b025d636975d2e71a0a4c2ea9f76
[ "Apache-2.0" ]
3
2021-07-20T07:40:15.000Z
2021-08-03T08:39:17.000Z
# coding: utf-8 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License...
36.863636
95
0.724414
# coding: utf-8 # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License...
0
0
0
702
0
0
0
21
46
8e4996eaca7cd3d0ac8e5b228f858d06ad74c82f
1,108
py
Python
main.py
Shaking-Hands-Overseas/Basic_API
62eaf55ddddcc7c6ca5b78862123eb73163e7b48
[ "MIT" ]
null
null
null
main.py
Shaking-Hands-Overseas/Basic_API
62eaf55ddddcc7c6ca5b78862123eb73163e7b48
[ "MIT" ]
null
null
null
main.py
Shaking-Hands-Overseas/Basic_API
62eaf55ddddcc7c6ca5b78862123eb73163e7b48
[ "MIT" ]
null
null
null
from fastapi import FastAPI from fastapi.middleware.cors import CORSMiddleware app = FastAPI() status = {} F = {} app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], )
20.90566
50
0.490072
from fastapi import FastAPI, Request from fastapi.middleware.cors import CORSMiddleware app = FastAPI() status = {} F = {} app.add_middleware( CORSMiddleware, allow_origins=["*"], allow_credentials=True, allow_methods=["*"], allow_headers=["*"], ) @app.get("/") def home(): return {"Shaking...
0
744
0
0
0
0
0
9
92
57dbf60c046b4e230e65e64bcd15b445b74bb0e1
3,979
py
Python
python/aswfdocker/tests/test_utils.py
mukul-mehta/aswf-docker
2c4c75057797d84ba9e04c8e7e28e08f088b69dc
[ "Apache-2.0" ]
null
null
null
python/aswfdocker/tests/test_utils.py
mukul-mehta/aswf-docker
2c4c75057797d84ba9e04c8e7e28e08f088b69dc
[ "Apache-2.0" ]
null
null
null
python/aswfdocker/tests/test_utils.py
mukul-mehta/aswf-docker
2c4c75057797d84ba9e04c8e7e28e08f088b69dc
[ "Apache-2.0" ]
null
null
null
# SPDX-License-Identifier: Apache-2.0 """ Tests for the utility commands """
31.832
86
0.565971
# SPDX-License-Identifier: Apache-2.0 """ Tests for the utility commands """ import unittest import logging import tempfile import os from click.testing import CliRunner from aswfdocker import utils, constants from aswfdocker.cli import aswfdocker class TestUtils(unittest.TestCase): def test_get_docker_org(sel...
0
0
0
3,680
0
0
0
17
203
e3bf6f02b4e9057ab8dfe0e66ae3be2795bd3353
3,002
py
Python
tests/test_folder_functions.py
devsetgo/dsg_lib
520b1eb2ca5228b970b51ee1089208ab03d0cee5
[ "MIT" ]
null
null
null
tests/test_folder_functions.py
devsetgo/dsg_lib
520b1eb2ca5228b970b51ee1089208ab03d0cee5
[ "MIT" ]
9
2020-01-20T23:41:51.000Z
2020-01-26T03:44:05.000Z
tests/test_folder_functions.py
devsetgo/dsg_lib
520b1eb2ca5228b970b51ee1089208ab03d0cee5
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from datetime import datetime time_str = datetime.now() # TODO: Improve Exception handling to check logging
32.27957
71
0.695869
# -*- coding: utf-8 -*- import os import time import unittest from datetime import date from datetime import datetime from pathlib import Path import pytest from dsg_lib.folder_functions import get_directory_list from dsg_lib.folder_functions import last_data_files_changed from dsg_lib.folder_functions import make_fo...
0
0
0
2,522
0
0
0
100
245
18a76dddcc08218917d388c56872766fcdfcf2c6
998
py
Python
.buildkite/defines.py
JPeer264/dagster-fork
32cc87a36134be7c442fa85d6867eb1d3301aea0
[ "Apache-2.0" ]
1
2020-09-19T16:35:59.000Z
2020-09-19T16:35:59.000Z
.buildkite/defines.py
JPeer264/dagster-fork
32cc87a36134be7c442fa85d6867eb1d3301aea0
[ "Apache-2.0" ]
null
null
null
.buildkite/defines.py
JPeer264/dagster-fork
32cc87a36134be7c442fa85d6867eb1d3301aea0
[ "Apache-2.0" ]
null
null
null
# This should be an enum once we make our own buildkite AMI with py3 SupportedPythons = [ SupportedPython.V2_7, SupportedPython.V3_5, SupportedPython.V3_6, SupportedPython.V3_7, SupportedPython.V3_8, ] # See: https://github.com/dagster-io/dagster/issues/1960 SupportedPythonsNo38 = [ Supported...
22.177778
90
0.697395
# This should be an enum once we make our own buildkite AMI with py3 class SupportedPython: V3_8 = "3.8.1" V3_7 = "3.7.6" V3_6 = "3.6.10" V3_5 = "3.5.8" V2_7 = "2.7.17" SupportedPythons = [ SupportedPython.V2_7, SupportedPython.V3_5, SupportedPython.V3_6, SupportedPython.V3_7, ...
0
0
0
98
0
0
0
0
22
f38d8a7d5cc60011c117f78ea2e28238a7968057
1,872
py
Python
test-mock/example4.py
Cheukting/pytest-examples
2b30bd375e02b115fb85463584590816e4b9a932
[ "MIT" ]
null
null
null
test-mock/example4.py
Cheukting/pytest-examples
2b30bd375e02b115fb85463584590816e4b9a932
[ "MIT" ]
null
null
null
test-mock/example4.py
Cheukting/pytest-examples
2b30bd375e02b115fb85463584590816e4b9a932
[ "MIT" ]
null
null
null
import requests def google_query(query): """ trivial function that does a GET request against google, checks the status of the result and returns the raw content """ url = "https://www.google.com" params = {'q': query} resp = requests.get(url, params=params) resp.raise_for_status() ...
31.728814
69
0.640491
from unittest import mock import unittest import requests from requests.exceptions import HTTPError def google_query(query): """ trivial function that does a GET request against google, checks the status of the result and returns the raw content """ url = "https://www.google.com" params = {...
0
340
0
1,081
0
0
0
18
89
dbd9bc3f5971d90f2405a4743b6f2a08e51e5866
443
py
Python
module2-sql-for-analysis/create_titanic.py
bbrauser/DS-Unit-3-Sprint-2-SQL-and-Databases
a0fb261e31891184c2d57d9fb7d018d5896e672b
[ "MIT" ]
null
null
null
module2-sql-for-analysis/create_titanic.py
bbrauser/DS-Unit-3-Sprint-2-SQL-and-Databases
a0fb261e31891184c2d57d9fb7d018d5896e672b
[ "MIT" ]
null
null
null
module2-sql-for-analysis/create_titanic.py
bbrauser/DS-Unit-3-Sprint-2-SQL-and-Databases
a0fb261e31891184c2d57d9fb7d018d5896e672b
[ "MIT" ]
null
null
null
import sqlite3 import pandas as pd conn = sqlite3.connect('titanic.sqlite3') curs = conn.cursor() curs.execute('CREATE TABLE titanic (Survived, Pclass, Name, Sex, Age, Siblings_Spouses_Aboard, Parents_Children_Aboard, Fare)') conn.commit() df = pd.read_csv('/Users/bradbrauser/unit3/DS-Unit-3-Sprint-2-SQL-and-Data...
29.533333
127
0.767494
import psycopg2 import sqlite3 import pandas as pd conn = sqlite3.connect('titanic.sqlite3') curs = conn.cursor() curs.execute('CREATE TABLE titanic (Survived, Pclass, Name, Sex, Age, Siblings_Spouses_Aboard, Parents_Children_Aboard, Fare)') conn.commit() df = pd.read_csv('/Users/bradbrauser/unit3/DS-Unit-3-Sprin...
0
0
0
0
0
0
0
-6
22
83cc68005115b0f244648889e0cf3689f17d3ba0
9,094
py
Python
tests/test_caller.py
MarcoMernberger/mvariants
d09ec36cbfbad5cc642e65ce4abdcc3eeb6713b9
[ "MIT" ]
null
null
null
tests/test_caller.py
MarcoMernberger/mvariants
d09ec36cbfbad5cc642e65ce4abdcc3eeb6713b9
[ "MIT" ]
null
null
null
tests/test_caller.py
MarcoMernberger/mvariants
d09ec36cbfbad5cc642e65ce4abdcc3eeb6713b9
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = "MarcoMernberger" __copyright__ = "MarcoMernberger" __license__ = "mit"
33.311355
161
0.723994
#!/usr/bin/env python # -*- coding: utf-8 -*- import pytest import sys import warnings import pandas as pd import mbf_genomes from pypipegraph import FileGeneratingJob, MultiFileGeneratingJob from mvariants import VarScan, OptionHandler, Mutect2 from pathlib import Path __author__ = "MarcoMernberger" __copyright__ = ...
0
822
0
0
0
7,145
0
49
913
255da06b69f00c1f1722850fbb5e2982bb37bc90
16,814
py
Python
watchout/can_work/watchout_4.0.py
GuoPingPan/Watchout
f1abf050408f429d3e3ae46c41f79714248b4010
[ "Apache-2.0" ]
null
null
null
watchout/can_work/watchout_4.0.py
GuoPingPan/Watchout
f1abf050408f429d3e3ae46c41f79714248b4010
[ "Apache-2.0" ]
null
null
null
watchout/can_work/watchout_4.0.py
GuoPingPan/Watchout
f1abf050408f429d3e3ae46c41f79714248b4010
[ "Apache-2.0" ]
null
null
null
import sys sys.path.insert(0, './yolov5') from yolov5.utils.general import check_img_size import argparse import torch import torch.backends.cudnn as cudnn ''' track.pywatchoutv3.0 - kafilter bug version:4.0 ''' import rospy # from tf import TransformListener palette = (2 ** 11 - 1, 2 ** 15 -...
33.967677
145
0.527893
import sys sys.path.insert(0, './yolov5') from yolov5.utils.datasets import LoadImages, LoadStreams,LoadWebcam,LoadRealsense from yolov5.utils.general import check_img_size, non_max_suppression, scale_coords from yolov5.utils.torch_utils import select_device, time_synchronized from deep_sort_pytorch.utils.parser impor...
420
0
0
9,954
0
2,990
0
244
446
879b943531179d2fa20686d96bbd0685ffaebae2
1,912
py
Python
tests/test_marginals.py
OscarDeGar/py_grama
0a02c291326b394a8d0c127dad4c58121e568777
[ "MIT" ]
13
2020-02-24T16:51:51.000Z
2022-03-30T18:56:55.000Z
tests/test_marginals.py
OscarDeGar/py_grama
0a02c291326b394a8d0c127dad4c58121e568777
[ "MIT" ]
78
2019-12-30T19:13:21.000Z
2022-02-23T18:17:54.000Z
tests/test_marginals.py
OscarDeGar/py_grama
0a02c291326b394a8d0c127dad4c58121e568777
[ "MIT" ]
7
2020-10-19T17:49:25.000Z
2021-08-15T20:46:52.000Z
## Marginals function tests ################################################## # --------------------------------------------------
34.142857
73
0.603556
import numpy as np import pandas as pd from scipy.stats import norm import unittest from context import grama as gr from context import models, data ## Marginals function tests ################################################## class TestMarginalTools(unittest.TestCase): def setUp(self): self.mg_gkde = gr...
0
0
0
1,583
0
0
0
17
178
a58ca67c1209a117e13d178461eb1b449eb2e4b3
1,351
py
Python
worker/sandbox.py
ivmfnal/striped
eef1a4d544fa1b97fde39d7ee5ef779071218891
[ "BSD-3-Clause" ]
1
2019-07-01T15:19:43.000Z
2019-07-01T15:19:43.000Z
worker/sandbox.py
ivmfnal/striped
eef1a4d544fa1b97fde39d7ee5ef779071218891
[ "BSD-3-Clause" ]
null
null
null
worker/sandbox.py
ivmfnal/striped
eef1a4d544fa1b97fde39d7ee5ef779071218891
[ "BSD-3-Clause" ]
1
2020-04-21T21:18:01.000Z
2020-04-21T21:18:01.000Z
import builtins, importlib safe_modules = ["numpy","math","random","scipy","cmath","decimal","fractions","time", "numbers", "itertools", "operator", "numba","zlib","pickle","awkward","uproot_methods", "cloudpickle", "uproot", "fnal_column_analysis_tools" ] safe_modules = {m:importlib.import_module(m) for m in sa...
28.744681
106
0.65359
import sys, builtins, importlib safe_modules = ["numpy","math","random","scipy","cmath","decimal","fractions","time", "numbers", "itertools", "operator", "numba","zlib","pickle","awkward","uproot_methods", "cloudpickle", "uproot", "fnal_column_analysis_tools" ] safe_modules = {m:importlib.import_module(m) for m ...
0
0
0
0
0
791
0
5
73
1c654fcca7fd32027670db5e8ad460d6748a6c6d
7,656
py
Python
image-generation/slegan/generator.py
AaratiAkkapeddi/nnabla-examples
db9e5ad850303c158773aeb275e5c3821b4a3935
[ "Apache-2.0" ]
null
null
null
image-generation/slegan/generator.py
AaratiAkkapeddi/nnabla-examples
db9e5ad850303c158773aeb275e5c3821b4a3935
[ "Apache-2.0" ]
null
null
null
image-generation/slegan/generator.py
AaratiAkkapeddi/nnabla-examples
db9e5ad850303c158773aeb275e5c3821b4a3935
[ "Apache-2.0" ]
null
null
null
# Copyright 2020,2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # 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 ...
38.089552
112
0.558386
# Copyright 2020,2021 Sony Corporation. # Copyright 2021 Sony Group Corporation. # # 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 ...
0
0
0
0
0
6,752
0
19
250
91cf8f2f6ff758d5453c855dc81bdad322af3e46
243
py
Python
util/captcha.py
ADGuy233/Latte
2e5ee6a57b97c286dd671e2d311f3e824cb812f4
[ "MIT" ]
5
2021-08-18T08:29:24.000Z
2021-12-23T07:24:05.000Z
util/captcha.py
ADGuy233/Latte
2e5ee6a57b97c286dd671e2d311f3e824cb812f4
[ "MIT" ]
2
2021-09-11T09:09:01.000Z
2022-01-27T06:49:08.000Z
util/captcha.py
wanglinteng/Latte
2e5ee6a57b97c286dd671e2d311f3e824cb812f4
[ "MIT" ]
3
2021-09-26T03:08:05.000Z
2021-12-11T22:47:30.000Z
import requests def captcha_check(captcha_url='http://localhost:8080/verify_captcha'): """""" return requests.get(url=captcha_url).json() if __name__ == '__main__': res = captcha_check() print(res)
20.25
70
0.711934
import requests def captcha_check(captcha_url='http://localhost:8080/verify_captcha'): """爬取过程中可能会触发知乎反爬验证码,请求验证码服务""" return requests.get(url=captcha_url).json() if __name__ == '__main__': res = captcha_check() print(res)
75
0
0
0
0
0
0
0
0
0b4829e88358a912cff31bc92d1136b33ae26e8d
679
py
Python
ttps/ttp_handler.py
justinforbes/community
a0dc30103ef5b9bf391ca103b8a04bc50e234fda
[ "Apache-2.0" ]
null
null
null
ttps/ttp_handler.py
justinforbes/community
a0dc30103ef5b9bf391ca103b8a04bc50e234fda
[ "Apache-2.0" ]
null
null
null
ttps/ttp_handler.py
justinforbes/community
a0dc30103ef5b9bf391ca103b8a04bc50e234fda
[ "Apache-2.0" ]
null
null
null
import subprocess import os if __name__ == '__main__': results = subprocess.run(['git', 'diff-tree', '--no-commit-id', '--name-only', '-r', 'HEAD'], cwd='./', capture_output=True) modified_files = results.stdout.decode('utf-8').rstrip().split('\n') for file in modified_files: print(file) ...
32.333333
128
0.646539
import subprocess import os from ruamel.yaml import YAML from datetime import datetime def update_ttp(filename): yaml = YAML() ttp = yaml.load(open(filename)) ttp['metadata']['release_date'] = datetime.utcnow().date() yaml.dump(ttp, open(filename, 'w')) if __name__ == '__main__': results = subpr...
0
0
0
0
0
161
0
15
67
614988bf7f01d50e727b7efec40a9aa4f3bfbbd0
13,632
py
Python
recbole/model/sequential_recommender/cl4srec.py
RuihongQiu/DuoRec
4ebc30d8b7d9465f854867887b127a0bbc38bc31
[ "MIT" ]
16
2021-11-03T02:12:49.000Z
2022-03-27T05:48:19.000Z
recbole/model/sequential_recommender/cl4srec.py
RuihongQiu/DuoRec
4ebc30d8b7d9465f854867887b127a0bbc38bc31
[ "MIT" ]
2
2021-11-21T14:12:25.000Z
2022-03-11T03:00:04.000Z
recbole/model/sequential_recommender/cl4srec.py
RuihongQiu/DuoRec
4ebc30d8b7d9465f854867887b127a0bbc38bc31
[ "MIT" ]
4
2021-11-25T09:23:41.000Z
2022-03-26T11:23:26.000Z
# -*- coding: utf-8 -*- # @Time : 2020/9/18 11:33 # @Author : Hui Wang # @Email : hui.wang@ruc.edu.cn """ SASRec ################################################ Reference: Wang-Cheng Kang et al. "Self-Attentive Sequential Recommendation." in ICDM 2018. Reference: https://github.com/kang205/SASRec """...
43.414013
159
0.641725
# -*- coding: utf-8 -*- # @Time : 2020/9/18 11:33 # @Author : Hui Wang # @Email : hui.wang@ruc.edu.cn """ SASRec ################################################ Reference: Wang-Cheng Kang et al. "Self-Attentive Sequential Recommendation." in ICDM 2018. Reference: https://github.com/kang205/SASRec """...
6
0
0
13,043
0
0
0
63
202
5abe1080a603478a17092ebe5ea7513bda8d6262
334
py
Python
twitter_config.py
JP040/tweetrace
f29edd67c177d9166f8013ba9ddd7125b58a1172
[ "MIT" ]
2
2021-04-26T18:57:55.000Z
2021-09-06T14:56:46.000Z
twitter_config.py
JP040/tweetrace
f29edd67c177d9166f8013ba9ddd7125b58a1172
[ "MIT" ]
null
null
null
twitter_config.py
JP040/tweetrace
f29edd67c177d9166f8013ba9ddd7125b58a1172
[ "MIT" ]
null
null
null
"""This file is used to store the access details for the Twitter API access. You will need to fill in your own access details that you receive after successfully applying for Twitter API access. """ Twitter = { "consumer_key":"xyz", "consumer_secret":"xyz", "access_token":"xyz", "access_token_sec...
25.692308
76
0.697605
"""This file is used to store the access details for the Twitter API access. You will need to fill in your own access details that you receive after successfully applying for Twitter API access. """ Twitter = { "consumer_key":"xyz", "consumer_secret":"xyz", "access_token":"xyz", "access_token_sec...
0
0
0
0
0
0
0
0
0
b2cf312798ecc626d43a2a2095ed64bb0e4a17eb
3,050
py
Python
codes/HierarchicalDQN/task0.py
johnjim0816/rl-tutorials
5d271a43e7b24e9b0d982636d44159e25d4ae30e
[ "MIT" ]
33
2021-11-09T03:14:49.000Z
2022-03-29T03:31:04.000Z
codes/HierarchicalDQN/task0.py
johnjim0816/rl-tutorials
5d271a43e7b24e9b0d982636d44159e25d4ae30e
[ "MIT" ]
3
2021-11-16T08:52:00.000Z
2022-02-25T09:09:37.000Z
codes/HierarchicalDQN/task0.py
johnjim0816/rl-tutorials
5d271a43e7b24e9b0d982636d44159e25d4ae30e
[ "MIT" ]
11
2021-11-01T15:36:25.000Z
2022-03-29T03:06:45.000Z
#!/usr/bin/env python # coding=utf-8 ''' Author: John Email: johnjim0816@gmail.com Date: 2021-03-29 10:37:32 LastEditor: John LastEditTime: 2021-05-04 22:35:56 Discription: Environment: ''' import sys import os curr_path = os.path.dirname(os.path.abspath(__file__)) # parent_path = os.path.dirname(curr_path) # sys...
34.269663
84
0.667213
#!/usr/bin/env python # coding=utf-8 ''' Author: John Email: johnjim0816@gmail.com Date: 2021-03-29 10:37:32 LastEditor: John LastEditTime: 2021-05-04 22:35:56 Discription: Environment: ''' import sys import os curr_path = os.path.dirname(os.path.abspath(__file__)) # 当前文件所在绝对路径 parent_path = os.path.dirname(curr_pat...
453
0
0
1,135
0
220
0
3
155
5d0839fc04bc755534fdce1ab854c609df0d3c53
50,703
py
Python
Packs/SentinelOne/Integrations/SentinelOne-V2/SentinelOne-V2.py
cbrake1/content
5b031129f98935c492056675eeee0fefcacbd87b
[ "MIT" ]
1
2020-11-25T00:42:27.000Z
2020-11-25T00:42:27.000Z
Packs/SentinelOne/Integrations/SentinelOne-V2/SentinelOne-V2.py
cbrake1/content
5b031129f98935c492056675eeee0fefcacbd87b
[ "MIT" ]
22
2022-03-23T10:39:16.000Z
2022-03-31T11:31:37.000Z
Packs/SentinelOne/Integrations/SentinelOne-V2/SentinelOne-V2.py
cbrake1/content
5b031129f98935c492056675eeee0fefcacbd87b
[ "MIT" ]
null
null
null
from typing import Callable import demistomock as demisto ''' IMPORTS ''' import requests import traceback # Disable insecure warnings requests.packages.urllib3.disable_warnings() ''' GLOBALS ''' IS_VERSION_2_1: bool ''' HELPER FUNCTIONS ''' ''' COMMANDS + REQUESTS FUNCTIONS ''' def test_module(client: Cli...
37.474501
120
0.625762
from typing import Callable import demistomock as demisto from CommonServerPython import * ''' IMPORTS ''' import json import requests import traceback from dateutil.parser import parse # Disable insecure warnings requests.packages.urllib3.disable_warnings() ''' GLOBALS ''' IS_VERSION_2_1: bool ''' HELPER FUNCT...
0
0
0
11,020
3,051
2,213
0
13
206
3abaafe90cc3c1e9baa55aceefd74eae4ebb79e5
198
py
Python
km3db/__init__.py
tamasgal/km3db
9faa2fc2cfd32a228f3700b9fec35206527aef42
[ "MIT" ]
null
null
null
km3db/__init__.py
tamasgal/km3db
9faa2fc2cfd32a228f3700b9fec35206527aef42
[ "MIT" ]
null
null
null
km3db/__init__.py
tamasgal/km3db
9faa2fc2cfd32a228f3700b9fec35206527aef42
[ "MIT" ]
null
null
null
from pkg_resources import get_distribution version = get_distribution(__name__).version
24.75
64
0.848485
from pkg_resources import get_distribution, DistributionNotFound version = get_distribution(__name__).version from .core import DBManager, AuthenticationError from .tools import StreamDS, CLBMap
0
0
0
0
0
0
0
63
45
074230f60ddfbd2f5a6868e79380f4ad5ac1917f
18,296
py
Python
compss/programming_model/bindings/python/src/pycompss/api/task.py
eflows4hpc/compss
c497f6d34722103c6c8f83ebc314b495573ce054
[ "Apache-2.0" ]
null
null
null
compss/programming_model/bindings/python/src/pycompss/api/task.py
eflows4hpc/compss
c497f6d34722103c6c8f83ebc314b495573ce054
[ "Apache-2.0" ]
null
null
null
compss/programming_model/bindings/python/src/pycompss/api/task.py
eflows4hpc/compss
c497f6d34722103c6c8f83ebc314b495573ce054
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/python # # Copyright 2002-2021 Barcelona Supercomputing Center (www.bsc.es) # # 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 ...
40.74833
86
0.572693
#!/usr/bin/python # # Copyright 2002-2021 Barcelona Supercomputing Center (www.bsc.es) # # 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 ...
0
1,070
0
14,898
0
0
0
646
507
871084f511de8af4b1878cce5aa7fea59b4d2526
9,546
py
Python
test/hpe_docker_unit_test.py
renovate-bot/python-hpedockerplugin
b7fa6b3193fa6dd42574585b4c621ff6a16babc9
[ "Apache-2.0" ]
49
2016-06-14T22:25:40.000Z
2021-04-05T05:00:59.000Z
test/hpe_docker_unit_test.py
renovate-bot/python-hpedockerplugin
b7fa6b3193fa6dd42574585b4c621ff6a16babc9
[ "Apache-2.0" ]
550
2016-07-25T12:01:12.000Z
2021-11-15T17:52:40.000Z
test/hpe_docker_unit_test.py
renovate-bot/python-hpedockerplugin
b7fa6b3193fa6dd42574585b4c621ff6a16babc9
[ "Apache-2.0" ]
96
2016-06-01T22:07:03.000Z
2021-06-22T09:05:05.000Z
import test.setup_mock as setup_mock
36.435115
78
0.645192
import abc import json import six import time from io import StringIO from twisted.internet import reactor from config import setupcfg from hpedockerplugin import exception from hpedockerplugin import hpe_storage_api as api import test.setup_mock as setup_mock class RequestBody: def __init__(self, req_body_str...
0
3,499
0
5,735
0
0
0
26
246
b5662a362df33914206b78a7e5ac9f6c4215016b
203
py
Python
src/statjson/__init__.py
jwodder/statjson
6f81283a53faa6362404ebaf80512c00e4b77b6a
[ "MIT" ]
1
2017-05-30T21:05:02.000Z
2017-05-30T21:05:02.000Z
src/statjson/__init__.py
jwodder/statjson
6f81283a53faa6362404ebaf80512c00e4b77b6a
[ "MIT" ]
null
null
null
src/statjson/__init__.py
jwodder/statjson
6f81283a53faa6362404ebaf80512c00e4b77b6a
[ "MIT" ]
1
2017-06-11T16:55:37.000Z
2017-06-11T16:55:37.000Z
__version__ = '0.1.0.dev1' __author__ = 'John Thorvald Wodder II' __author_email__ = 'statjson@varonathe.org' __license__ = 'MIT' __url__ = 'https://github.com/jwodder/statjson'
33.833333
56
0.660099
__version__ = '0.1.0.dev1' __author__ = 'John Thorvald Wodder II' __author_email__ = 'statjson@varonathe.org' __license__ = 'MIT' __url__ = 'https://github.com/jwodder/statjson'
0
0
0
0
0
0
0
0
0
2bd5a2a54320f230d206abcddfc480ae367ae2d3
6,197
py
Python
t0_continual_learning/utils_print_figures.py
tuhinjubcse/T0_continual_learning
fc6788f8d43f1c8aeaf7ac10c802fbc2099a95da
[ "MIT" ]
null
null
null
t0_continual_learning/utils_print_figures.py
tuhinjubcse/T0_continual_learning
fc6788f8d43f1c8aeaf7ac10c802fbc2099a95da
[ "MIT" ]
null
null
null
t0_continual_learning/utils_print_figures.py
tuhinjubcse/T0_continual_learning
fc6788f8d43f1c8aeaf7ac10c802fbc2099a95da
[ "MIT" ]
null
null
null
list_zero_shot = [ ('rte', "can we infer", 'validation'), ('copa', "choose", 'validation'), ('wic', "same_sense", 'validation'), ('winogrande', "fill in the blank", 'validation'), ('hellaswag', "__RANDOM__", 'validation'), ('anli', "__RANDOM__", 'test_r1'), ('cb', "__RANDOM__", 'validati...
32.962766
139
0.645796
import matplotlib.pyplot as plt import os list_zero_shot = [ ('rte', "can we infer", 'validation'), ('copa', "choose", 'validation'), ('wic', "same_sense", 'validation'), ('winogrande', "fill in the blank", 'validation'), ('hellaswag', "__RANDOM__", 'validation'), ('anli', "__RANDOM__", 'tes...
0
0
0
0
0
5,607
0
-2
161
38fc9525db5640af7d4bc21706d6a885c25abf88
3,570
py
Python
alpacka/utils/mrunner_client.py
shoot-tree-search/sts
2d9f19a40c7fb1c637dd3bd230942c01f14927e1
[ "MIT" ]
2
2021-01-03T04:21:56.000Z
2021-02-12T12:54:58.000Z
alpacka/utils/mrunner_client.py
shoot-tree-search/sts
2d9f19a40c7fb1c637dd3bd230942c01f14927e1
[ "MIT" ]
null
null
null
alpacka/utils/mrunner_client.py
shoot-tree-search/sts
2d9f19a40c7fb1c637dd3bd230942c01f14927e1
[ "MIT" ]
null
null
null
"""Parse and return mrunner gin-config and set-up Neptune.""" import atexit import datetime import functools import os import pickle import cloudpickle import neptune from alpacka.batch_steppers import worker_utils def get_configuration(spec_path): """Get mrunner experiment specification and gin-config override...
33.055556
80
0.644538
"""Parse and return mrunner gin-config and set-up Neptune.""" import atexit import datetime import functools import os import pickle import cloudpickle import neptune from alpacka import metric_logging from alpacka.batch_steppers import worker_utils def get_configuration(spec_path): """Get mrunner experiment s...
0
0
0
706
0
232
0
13
95
023e0e2dc070ee85dc029ecd2073747810724211
2,057
py
Python
tests/components/webostv/test_media_player.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
1
2020-01-03T03:35:49.000Z
2020-01-03T03:35:49.000Z
tests/components/webostv/test_media_player.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
5
2021-02-08T20:54:44.000Z
2022-03-12T00:48:52.000Z
tests/components/webostv/test_media_player.py
itewk/home-assistant
769cf19052f8c9ef374d8ba8ae7705ccc7bf4cf4
[ "Apache-2.0" ]
null
null
null
"""The tests for the LG webOS media player platform.""" import sys from homeassistant.components import media_player if sys.version_info >= (3, 8, 0): from unittest.mock import patch else: NAME = "fake" ENTITY_ID = f"{media_player.DOMAIN}.{NAME}"
26.371795
84
0.730676
"""The tests for the LG webOS media player platform.""" import sys import pytest from homeassistant.components import media_player from homeassistant.components.media_player.const import ( ATTR_INPUT_SOURCE, ATTR_MEDIA_VOLUME_MUTED, SERVICE_SELECT_SOURCE, ) from homeassistant.components.webostv import DOM...
0
235
1,068
0
0
0
0
266
229
ad80db241d98997fa0f3671cbc091ba25d131a9a
708
py
Python
hello_world.py
kadnan/PythonApacheBeam
c5c3e0b9fd1ef91aa34b54d53b8e2ed32a62ab29
[ "MIT" ]
null
null
null
hello_world.py
kadnan/PythonApacheBeam
c5c3e0b9fd1ef91aa34b54d53b8e2ed32a62ab29
[ "MIT" ]
null
null
null
hello_world.py
kadnan/PythonApacheBeam
c5c3e0b9fd1ef91aa34b54d53b8e2ed32a62ab29
[ "MIT" ]
2
2020-09-25T15:09:39.000Z
2021-08-11T11:12:48.000Z
import apache_beam as beam from apache_beam.options.pipeline_options import PipelineOptions if __name__ == '__main__': in_file = 'news.txt' out_file = 'processed' options = PipelineOptions() with beam.Pipeline(options=PipelineOptions()) as p: r = ( p | beam.io.ReadFromText(in_fi...
23.6
68
0.600282
import apache_beam as beam from apache_beam.options.pipeline_options import PipelineOptions class ToLower(beam.DoFn): def process(self, element): return[{'Data': element.lower()}] class ToReverse(beam.DoFn): def process(self, el): d = el['Data'] return [d[::-1]] if __name__ == '__m...
0
0
0
159
0
0
0
0
46
774335c3f975153772e437a47a5bc5e0f8b149f1
4,093
py
Python
test/rdf-star/test_rdfstar1.py
gjhiggins/rdflib-rdfstar
0f323a9ab6fdd0f923b5c25874599a94999d88a7
[ "BSD-3-Clause" ]
null
null
null
test/rdf-star/test_rdfstar1.py
gjhiggins/rdflib-rdfstar
0f323a9ab6fdd0f923b5c25874599a94999d88a7
[ "BSD-3-Clause" ]
null
null
null
test/rdf-star/test_rdfstar1.py
gjhiggins/rdflib-rdfstar
0f323a9ab6fdd0f923b5c25874599a94999d88a7
[ "BSD-3-Clause" ]
null
null
null
""" For graphs with multiple rdf reification statements i.e. multiple Embedded triples """ rdf_graph = """ PREFIX ex:<http://example.org/> PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf:<http://xmlns.com/foaf/0.1/> PREFIX dct:<http://purl.org/dc/terms/> ex:bob foaf:name "Bo...
28.423611
94
0.57977
import pytest from rdflib import Graph, Literal, URIRef """ For graphs with multiple rdf reification statements i.e. multiple Embedded triples """ rdf_graph = """ PREFIX ex:<http://example.org/> PREFIX rdf:<http://www.w3.org/1999/02/22-rdf-syntax-ns#> PREFIX foaf:<http://xmlns.com/foaf/0.1/> PREFIX d...
0
0
0
0
0
1,428
0
12
90
12cf57e2a13cb0543cc8301087d25e09fa9f3d0c
324
py
Python
mysite/blog/templatetags/myTag.py
DreamLose/python-
865249d7dba1fb1452189bde59c378aab8c99c9b
[ "MIT" ]
1
2020-11-12T01:37:20.000Z
2020-11-12T01:37:20.000Z
mysite/blog/templatetags/myTag.py
DreamLose/python-
865249d7dba1fb1452189bde59c378aab8c99c9b
[ "MIT" ]
null
null
null
mysite/blog/templatetags/myTag.py
DreamLose/python-
865249d7dba1fb1452189bde59c378aab8c99c9b
[ "MIT" ]
null
null
null
from django import template register = template.Library() # register , # filter # ,
18
53
0.728395
from django import template from django.utils.safestring import mark_safe register = template.Library() # register 名字是固定的,不可改变 # 自定义filter @register.filter def filter_multi(x,y): """最多传一个参数,x是默认的 想传多个值,传一个列表就可以 """ return x*y # 自定义标签,可以传多个值 @register.simple_tag def simple_tag_multi(x,y): return ...
144
98
0
0
0
0
0
24
66
d2d1da0dce412ba0d07fb93257ed4860414da5f3
1,447
py
Python
utils.py
y60yu1ii/rywb116_config_generator
746bf7364b76e7eb79592b0da5404f65696adba9
[ "MIT" ]
null
null
null
utils.py
y60yu1ii/rywb116_config_generator
746bf7364b76e7eb79592b0da5404f65696adba9
[ "MIT" ]
null
null
null
utils.py
y60yu1ii/rywb116_config_generator
746bf7364b76e7eb79592b0da5404f65696adba9
[ "MIT" ]
null
null
null
import serial # conver input data # Function code area
24.116667
74
0.554941
import sys import glob import serial import serial.tools.list_ports def ports(): ports = serial.tools.list_ports.comports() result = [] for port, desc, hwid in sorted(ports): # print("{}: {} [{}]".format(port, desc, hwid)) print("{}".format(port)) result.append(port) ret...
0
0
0
0
56
1,090
0
-12
248
b79cceabff6227ca909c1fb8f72e3124a27460ab
4,061
py
Python
agent/agent/controllers/cleanup.py
isabella232/cronus-agent
f973ef9fd49d0d454a2b4d5e9f17d88943fda8fc
[ "Apache-2.0" ]
7
2015-04-17T22:07:41.000Z
2020-07-31T04:58:00.000Z
agent/agent/controllers/cleanup.py
eBay/cronus-agent
f973ef9fd49d0d454a2b4d5e9f17d88943fda8fc
[ "Apache-2.0" ]
1
2021-02-24T03:56:57.000Z
2021-02-24T03:56:57.000Z
agent/agent/controllers/cleanup.py
isabella232/cronus-agent
f973ef9fd49d0d454a2b4d5e9f17d88943fda8fc
[ "Apache-2.0" ]
8
2015-06-26T01:54:40.000Z
2021-01-15T10:30:23.000Z
#pylint: disable=W0703, E1101,W0105 ''' Copyright 2014 eBay Software Foundation 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 ap...
41.865979
103
0.654272
#pylint: disable=W0703, E1101,W0105 ''' Copyright 2014 eBay Software Foundation 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 ap...
0
2,590
0
290
0
0
0
218
266
fac7be4b8478ef59a1927a19422f5086e9a746a0
324
py
Python
Poisson_Circle/Setup/Generate_Meshes.py
nw2190/ConvPDE
86f3fa67d64a6c56f3dff4d32999fe70db30795e
[ "MIT" ]
22
2019-05-21T16:35:49.000Z
2022-03-28T06:27:48.000Z
Poisson_Circle/Setup/Generate_Meshes.py
nw2190/ConvPDE
86f3fa67d64a6c56f3dff4d32999fe70db30795e
[ "MIT" ]
null
null
null
Poisson_Circle/Setup/Generate_Meshes.py
nw2190/ConvPDE
86f3fa67d64a6c56f3dff4d32999fe70db30795e
[ "MIT" ]
5
2019-05-22T05:19:21.000Z
2022-03-08T07:20:21.000Z
# Import flags specifying dataset parameters from setup_flags import getFlags # Import mesh generation function from mesh import gen_mesh if __name__ == '__main__': FLAGS = getFlags() gen_mesh(FLAGS.resolution, FLAGS.mesh_resolution, FLAGS.mesh_dir, 0)
21.6
72
0.771605
import numpy as np from mshr import * from dolfin import * # Import flags specifying dataset parameters from setup_flags import getFlags # Import mesh generation function from mesh import gen_mesh if __name__ == '__main__': FLAGS = getFlags() gen_mesh(FLAGS.resolution, FLAGS.mesh_resolution, FLAGS.mesh_dir,...
0
0
0
0
0
0
0
-7
66
4ddd9a5f428fd10a5d74195558db441123e91225
6,125
py
Python
trac/Lib/site-packages/tracadvparseargsplugin-0.4-py2.7.egg/tracadvparseargs/parseargs.py
thinkbase/PortableTrac
9ea0210f6b88f135ef73f370b48127af0495b2d7
[ "BSD-3-Clause" ]
2
2015-08-06T04:19:21.000Z
2020-04-29T23:52:10.000Z
trac/Lib/site-packages/tracadvparseargsplugin-0.4-py2.7.egg/tracadvparseargs/parseargs.py
thinkbase/PortableTrac
9ea0210f6b88f135ef73f370b48127af0495b2d7
[ "BSD-3-Clause" ]
null
null
null
trac/Lib/site-packages/tracadvparseargsplugin-0.4-py2.7.egg/tracadvparseargs/parseargs.py
thinkbase/PortableTrac
9ea0210f6b88f135ef73f370b48127af0495b2d7
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- # Copyright (c) 2008 Martin Scharrer <martin@scharrer-online.de> # This is Free Software under the GPLv3 or BSD license. # # $Id: parseargs.py 8541 2010-08-30 21:57:20Z martin_s $ # __url__ = ur"$URL: http://trac-hacks.org/svn/advparseargsplugin/0.11/tracadvparseargs/parseargs.py $"[6...
34.027778
113
0.552163
# -*- coding: utf-8 -*- # Copyright (c) 2008 Martin Scharrer <martin@scharrer-online.de> # This is Free Software under the GPLv3 or BSD license. # # $Id: parseargs.py 8541 2010-08-30 21:57:20Z martin_s $ # __url__ = ur"$URL: http://trac-hacks.org/svn/advparseargsplugin/0.11/tracadvparseargs/parseargs.py $"[6...
6
0
0
325
0
1,072
0
21
79
51c840073588c8e7a02585bffb4f0e197ec47433
2,760
py
Python
tracker/utils/python.py
dti-research/tracker
f2384c0c7b631aa9efd39bf606cda8b85187fcc6
[ "BSD-3-Clause" ]
1
2019-07-25T18:02:37.000Z
2019-07-25T18:02:37.000Z
tracker/utils/python.py
dti-research/tracker
f2384c0c7b631aa9efd39bf606cda8b85187fcc6
[ "BSD-3-Clause" ]
10
2019-08-29T12:27:35.000Z
2020-01-04T18:40:48.000Z
tracker/utils/python.py
dti-research/tracker
f2384c0c7b631aa9efd39bf606cda8b85187fcc6
[ "BSD-3-Clause" ]
null
null
null
# Copyright (c) 2019, Danish Technological Institute. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. # -*- coding: utf-8 -*- """ Helper functions for parsing python scripts through AST and executing them as...
24.864865
79
0.663406
# Copyright (c) 2019, Danish Technological Institute. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. # -*- coding: utf-8 -*- """ Helper functions for parsing python scripts through AST and executing them as...
0
0
0
0
0
1,545
0
-35
296
5446198ef3f24e3e500fbb164892297164850355
9,147
py
Python
airbyte-integrations/bases/base-normalization/unit_tests/test_table_name_registry.py
ashis-Nayak-13/airbyte
e699f397401c509286fd29f2678e9ee860f001a5
[ "MIT" ]
2
2021-03-02T09:17:41.000Z
2021-03-02T11:02:23.000Z
airbyte-integrations/bases/base-normalization/unit_tests/test_table_name_registry.py
ashis-Nayak-13/airbyte
e699f397401c509286fd29f2678e9ee860f001a5
[ "MIT" ]
4
2021-09-01T00:33:50.000Z
2022-02-27T16:13:46.000Z
airbyte-integrations/bases/base-normalization/unit_tests/test_table_name_registry.py
keu/airbyte
0bfd83052887e1ca72ddfdb339c62d2e39b050bc
[ "MIT" ]
1
2021-07-02T15:08:53.000Z
2021-07-02T15:08:53.000Z
# # MIT License # # Copyright (c) 2020 Airbyte # # 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, pu...
45.507463
131
0.742976
# # MIT License # # Copyright (c) 2020 Airbyte # # 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, pu...
0
7,266
0
0
0
218
0
234
316
36faa4c798f355a6ff1c974bd62f1daf4c50de83
956
py
Python
Utilities.py
vikramadhav/GoogleDriveCURD
44b8b9321a3b74fa36c5bc1e97fa39035d843c3e
[ "MIT" ]
null
null
null
Utilities.py
vikramadhav/GoogleDriveCURD
44b8b9321a3b74fa36c5bc1e97fa39035d843c3e
[ "MIT" ]
null
null
null
Utilities.py
vikramadhav/GoogleDriveCURD
44b8b9321a3b74fa36c5bc1e97fa39035d843c3e
[ "MIT" ]
null
null
null
#import pybreaker # Provide the File Size configdata = None #db_breaker = pybreaker.CircuitBreaker(fail_max=5, reset_timeout=60) # Open the JSOn configuration file and Fetch Data # Get Command line arguments if not configdata: configdata = readJsonData()
28.117647
103
0.688285
import os import json import argparse #import pybreaker # Provide the File Size def file_size(fname): statinfo = os.stat(fname) return statinfo.st_size configdata = None #db_breaker = pybreaker.CircuitBreaker(fail_max=5, reset_timeout=60) # Open the JSOn configuration file and Fetch Data def readJsonData(): ...
0
0
0
0
0
564
0
-28
155
29e0a5050f04d62c7297ed7f799f0fcc9af4fe58
463
py
Python
Backend/movies/admin.py
faisalnazik/Django-REST-framework-React.JS-Typescript
d9082e86af8df72b9993a1c694fe9cba8efd7e5b
[ "MIT" ]
5
2021-04-19T12:03:11.000Z
2022-02-23T08:42:38.000Z
BackEnd/movies/admin.py
faisalnazik/Special-Roots
be324d359b36961646e4aaac396acedbd981bd58
[ "MIT" ]
5
2021-04-21T09:23:56.000Z
2022-02-19T07:26:50.000Z
BackEnd/movies/admin.py
faisalnazik/Special-Roots
be324d359b36961646e4aaac396acedbd981bd58
[ "MIT" ]
null
null
null
# Register your models here.
33.071429
86
0.695464
from django.contrib import admin # Register your models here. from .models import Movie @admin.register(Movie) class MovieAdmin(admin.ModelAdmin): list_display = ('title', 'slug', 'link', 'author','imdb_rating', 'publish', 'status') list_filter = ('status', 'created', 'publish', 'author') search_fields = ('title',...
0
352
0
0
0
0
0
15
67
72089f4ca51067c480fe2b1244670abba25929a2
1,796
py
Python
backend/daemon.py
nbrooks211/OpenPeripherals
f4924cbcbf25f8e5b6ac6284e8000868618119c9
[ "MIT" ]
1
2020-08-29T05:10:36.000Z
2020-08-29T05:10:36.000Z
backend/daemon.py
nbrooks211/OpenPeripherals
f4924cbcbf25f8e5b6ac6284e8000868618119c9
[ "MIT" ]
2
2020-01-22T05:55:41.000Z
2020-01-25T02:25:01.000Z
backend/daemon.py
nbrooks211/OpenPeripherals
f4924cbcbf25f8e5b6ac6284e8000868618119c9
[ "MIT" ]
1
2020-04-30T17:49:44.000Z
2020-04-30T17:49:44.000Z
VID = 0x0c45 PID = 0x5004 if __name__ == '__main__': daemon = KbDaemon() daemon.start()
26.80597
126
0.624722
import logging from pydbus import SessionBus from gi.repository import GLib from hid import enumerate, Device from drivers.reddragon import RedDragon from drivers.fakekeyboard import FakeKeyboard from interfaces import * VID = 0x0c45 PID = 0x5004 class KbDaemon: def __init__(self): # Logging se...
0
0
0
1,450
0
0
0
67
179
275d594ba1d705e42f04b5341a61378b83866ec1
2,500
py
Python
modules/steps/verify_frontend_rule.py
KTH/aspen
3be9b55d21dfd950d1a82b2cf4f464cd1f1e9757
[ "MIT" ]
null
null
null
modules/steps/verify_frontend_rule.py
KTH/aspen
3be9b55d21dfd950d1a82b2cf4f464cd1f1e9757
[ "MIT" ]
8
2019-10-10T08:03:02.000Z
2022-01-11T11:28:58.000Z
modules/steps/verify_frontend_rule.py
KTH/aspen
3be9b55d21dfd950d1a82b2cf4f464cd1f1e9757
[ "MIT" ]
null
null
null
"""VerifyFrontendRule To make sure that no one maliciously or by accident tries to publish their app on certain urls, this step checks the published url against a blacklist and stops the pipeline if the url is considered invalid.""" __author__ = 'tinglev@kth.se'
39.0625
104
0.6748
"""VerifyFrontendRule To make sure that no one maliciously or by accident tries to publish their app on certain urls, this step checks the published url against a blacklist and stops the pipeline if the url is considered invalid.""" __author__ = 'tinglev@kth.se' import re from modules.steps.base_pipeline_step import...
0
0
0
1,983
0
0
0
118
134
3fa4b05c8ae5f56623a2035cdf88e8faab182030
904
py
Python
tests/correct_programs/ethz_eprog_2019/exercise_08/test_problem_03.py
pschanely/python-by-contract-corpus
b68ea59b962f105182d3bf57fcd6e23f9b815ddc
[ "MIT" ]
null
null
null
tests/correct_programs/ethz_eprog_2019/exercise_08/test_problem_03.py
pschanely/python-by-contract-corpus
b68ea59b962f105182d3bf57fcd6e23f9b815ddc
[ "MIT" ]
null
null
null
tests/correct_programs/ethz_eprog_2019/exercise_08/test_problem_03.py
pschanely/python-by-contract-corpus
b68ea59b962f105182d3bf57fcd6e23f9b815ddc
[ "MIT" ]
null
null
null
import unittest if __name__ == "__main__": unittest.main()
30.133333
85
0.650442
import unittest from typing import Set import icontract_hypothesis from icontract import require from correct_programs.ethz_eprog_2019.exercise_08 import problem_03 class TestWithIcontractHypothesis(unittest.TestCase): def test_functions(self) -> None: @require(lambda steps: 0 <= steps < 100) de...
0
184
0
480
0
0
0
61
113
33e7c46ee2f6f5a4e640e5199f601bb36bd9656f
729
py
Python
Contents/Libraries/Shared/guessit/monkeypatch.py
slvxstar/Kinopoisk.bundle
dcb96c870c3a96fcf33b8d13d79d47f0a7cbf5fb
[ "MIT" ]
7
2021-02-11T08:03:00.000Z
2022-01-23T22:33:32.000Z
Contents/Libraries/Shared/guessit/monkeypatch.py
slvxstar/Kinopoisk.bundle
dcb96c870c3a96fcf33b8d13d79d47f0a7cbf5fb
[ "MIT" ]
null
null
null
Contents/Libraries/Shared/guessit/monkeypatch.py
slvxstar/Kinopoisk.bundle
dcb96c870c3a96fcf33b8d13d79d47f0a7cbf5fb
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Monkeypatch initialisation functions """ try: from collections import OrderedDict except ImportError: # pragma: no-cover from rebulk.match import Match def monkeypatch_rebulk(): """Monkeypatch rebulk classes""" Match.advanced = match_advanced
20.828571
70
0.603567
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Monkeypatch initialisation functions """ try: from collections import OrderedDict except ImportError: # pragma: no-cover from ordereddict import OrderedDict # pylint:disable=import-error from rebulk.match import Match def monkeypatch_rebulk(): """Monke...
0
320
0
0
0
0
0
14
84
4063978fceceea4fe396c8b836f3652e1c2a65ee
11,000
py
Python
tools/failures/detect_new_failures.py
samotarnik/grpc
3278bdceda8030d5aa130f12765e5f07263c860d
[ "Apache-2.0" ]
2,151
2020-04-18T07:31:17.000Z
2022-03-31T08:39:18.000Z
tools/failures/detect_new_failures.py
samotarnik/grpc
3278bdceda8030d5aa130f12765e5f07263c860d
[ "Apache-2.0" ]
395
2020-04-18T08:22:18.000Z
2021-12-08T13:04:49.000Z
tools/failures/detect_new_failures.py
samotarnik/grpc
3278bdceda8030d5aa130f12765e5f07263c860d
[ "Apache-2.0" ]
338
2020-04-18T08:03:10.000Z
2022-03-29T12:33:22.000Z
#!/usr/bin/env python # Copyright 2015 gRPC authors. # # 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 o...
35.483871
84
0.616455
#!/usr/bin/env python # Copyright 2015 gRPC authors. # # 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 o...
0
0
0
0
0
8,727
0
-38
387
7b8650118448496b64db2cf778183a22c7dbf4a6
1,760
py
Python
src/events/migrations/0012_add_location_r4.py
kaka-lin/pycon.tw
67809a5e43b03273ac8d8f5a1b6b3d3f73474be7
[ "MIT" ]
47
2015-12-19T10:23:11.000Z
2018-06-13T08:07:33.000Z
src/events/migrations/0012_add_location_r4.py
kaka-lin/pycon.tw
67809a5e43b03273ac8d8f5a1b6b3d3f73474be7
[ "MIT" ]
473
2018-12-01T13:01:48.000Z
2022-03-30T07:10:42.000Z
src/events/migrations/0012_add_location_r4.py
kaka-lin/pycon.tw
67809a5e43b03273ac8d8f5a1b6b3d3f73474be7
[ "MIT" ]
91
2018-07-26T02:38:59.000Z
2022-01-16T02:38:31.000Z
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-05-08 13:04 from __future__ import unicode_literals
48.888889
252
0.548864
# -*- coding: utf-8 -*- # Generated by Django 1.10.4 on 2017-05-08 13:04 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0011_customevent_break_event'), ] operations = [ migrations.Alter...
0
0
0
1,581
0
0
0
19
46
eaa10a1b8e6b9e22ab75e8ab5ac1dde800965431
7,932
py
Python
read_waveplus.py
kogant/waveplus-reader
2b323b2777ea07b8dd2109bac13f8058590d7da3
[ "MIT" ]
3
2021-01-19T21:20:44.000Z
2021-06-26T10:41:56.000Z
read_waveplus.py
kogant/waveplus-reader
2b323b2777ea07b8dd2109bac13f8058590d7da3
[ "MIT" ]
null
null
null
read_waveplus.py
kogant/waveplus-reader
2b323b2777ea07b8dd2109bac13f8058590d7da3
[ "MIT" ]
1
2022-02-16T16:45:00.000Z
2022-02-16T16:45:00.000Z
# MIT License # # Copyright (c) 2018 Airthings AS # # 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,...
38.134615
119
0.58056
# MIT License # # Copyright (c) 2018 Airthings AS # # 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,...
0
0
0
4,272
0
397
0
20
158
81f5293a5734114f02e1306ca0590587dd9fccb7
2,296
py
Python
PE03.py
cixmo/CSIS1340
4c5953e3d43bfab3c17cc951e9bbcca6850b9a03
[ "MIT" ]
null
null
null
PE03.py
cixmo/CSIS1340
4c5953e3d43bfab3c17cc951e9bbcca6850b9a03
[ "MIT" ]
null
null
null
PE03.py
cixmo/CSIS1340
4c5953e3d43bfab3c17cc951e9bbcca6850b9a03
[ "MIT" ]
null
null
null
def print_rectangles(rectangles): ''' For loop to print all objects from Rectangle(). :param rectangles :return: ''' counter = 0 for rectangle in rectangles: counter = counter + 1 print("*" * 30) print("Rectangle", counter) rectangle.print() print("*" * ...
29.063291
100
0.567509
class Rectangle(object): def __init__(self, length=int(), width=int()): self.length = self.validate('length', length) self.width = self.validate('width', width) self.area = self.area(self.length, self.width) self.perimeter = self.perimeter(self.length, self.width) def validate(s...
0
0
0
1,806
0
82
0
0
45
a769ca3105cdbe59d24e081f3e4da2e8721ffb8f
7,071
py
Python
des.py
geetesh-gupta/cryptography_demystified
cd0c4c929c8d8213cb8deb7304555e24aca58216
[ "MIT" ]
null
null
null
des.py
geetesh-gupta/cryptography_demystified
cd0c4c929c8d8213cb8deb7304555e24aca58216
[ "MIT" ]
null
null
null
des.py
geetesh-gupta/cryptography_demystified
cd0c4c929c8d8213cb8deb7304555e24aca58216
[ "MIT" ]
null
null
null
PC1 = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4] PC2 = [14, 17, 11, 24, 1, 5, 3, 28, 15,...
32.140909
92
0.496394
from utils.conversion import * from utils.pprint import * PC1 = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, ...
0
0
0
0
0
3,153
0
14
182
447e5736f048773db27c7c409a1df42b65b34384
5,626
py
Python
whitepeaks/states/.ipynb_checkpoints/photons-checkpoint.py
SachaSchwarz/whitepeaks
fd6d14b47f6fb80516d9a06941d79b23d8314e50
[ "MIT" ]
null
null
null
whitepeaks/states/.ipynb_checkpoints/photons-checkpoint.py
SachaSchwarz/whitepeaks
fd6d14b47f6fb80516d9a06941d79b23d8314e50
[ "MIT" ]
null
null
null
whitepeaks/states/.ipynb_checkpoints/photons-checkpoint.py
SachaSchwarz/whitepeaks
fd6d14b47f6fb80516d9a06941d79b23d8314e50
[ "MIT" ]
null
null
null
''' ############################################################################### Two-Photon States ############################################################################### Quantum Optics and Quantum Information Group Written by Jean-Philippe MacLean: jpmaclean@uwaterloo.ca Functions...
30.743169
100
0.596161
''' ############################################################################### Two-Photon States ############################################################################### Quantum Optics and Quantum Information Group Written by Jean-Philippe MacLean: jpmaclean@uwaterloo.ca Functions...
0
0
0
0
0
1,954
0
-1
67
c78d0fef35e068cebbe5d86cc42b3ee699567662
1,022
py
Python
mid2abc.py
apratsunrthd/Music-Synth
00d0906ce828552260e594b179f0420175750c10
[ "CC0-1.0" ]
37
2021-11-10T12:41:07.000Z
2022-02-17T18:40:48.000Z
mid2abc.py
apratsunrthd/Music-Synth
00d0906ce828552260e594b179f0420175750c10
[ "CC0-1.0" ]
2
2021-11-10T15:14:52.000Z
2021-12-09T11:10:13.000Z
mid2abc.py
apratsunrthd/Music-Synth
00d0906ce828552260e594b179f0420175750c10
[ "CC0-1.0" ]
7
2021-11-10T13:29:11.000Z
2021-11-16T07:22:04.000Z
import glob if __name__ == '__main__': midis = glob.glob('rawmidis/*') for song in midis: convert2abc(song)
27.621622
88
0.574364
import subprocess import os import glob def convert2abc(song): title = song[9:-4] a = subprocess.check_output(['java', '-jar', 'MidiZyx2abc_6.04.jar',song,'-stdout']) f = open('input/song.txt', 'w') f.write(a.decode('ascii')) f.close() x = open('input/'+title+'.txt', 'w') with open('input...
0
0
0
0
0
844
0
-16
67
e2540991bafd21088dc5b3fc6bdb37cec734a291
1,354
py
Python
recipes/Python/580715_Batch_conversitext_files_PDF_fileinput/recipe-580715.py
tdiprima/code
61a74f5f93da087d27c70b2efe779ac6bd2a3b4f
[ "MIT" ]
2,023
2017-07-29T09:34:46.000Z
2022-03-24T08:00:45.000Z
recipes/Python/580715_Batch_conversitext_files_PDF_fileinput/recipe-580715.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
32
2017-09-02T17:20:08.000Z
2022-02-11T17:49:37.000Z
recipes/Python/580715_Batch_conversitext_files_PDF_fileinput/recipe-580715.py
unhacker/code
73b09edc1b9850c557a79296655f140ce5e853db
[ "MIT" ]
780
2017-07-28T19:23:28.000Z
2022-03-25T20:39:41.000Z
from __future__ import print_function # BatchTextToPDF.py # Convert a batch of text files to a single PDF. # Each text file's content starts on a new page in the PDF file. # Requires: # - xtopdf: https://bitbucket.org/vasudevram/xtopdf # - ReportLab: https://www.reportlab.com/ftp/reportlab-1.21.1.tar.gz # Author: Vasu...
28.208333
79
0.626292
from __future__ import print_function # BatchTextToPDF.py # Convert a batch of text files to a single PDF. # Each text file's content starts on a new page in the PDF file. # Requires: # - xtopdf: https://bitbucket.org/vasudevram/xtopdf # - ReportLab: https://www.reportlab.com/ftp/reportlab-1.21.1.tar.gz # Author: Vasu...
0
0
0
0
0
727
0
-6
113
d6b42a1a4bf0e165e1543ef0459e18279c68915f
1,249
py
Python
labs/tests/unit/lab01/test_example.py
pasuder/labs
14b72bb0e7391d40cfb9e61910ee52f51ba31217
[ "BSD-3-Clause" ]
null
null
null
labs/tests/unit/lab01/test_example.py
pasuder/labs
14b72bb0e7391d40cfb9e61910ee52f51ba31217
[ "BSD-3-Clause" ]
null
null
null
labs/tests/unit/lab01/test_example.py
pasuder/labs
14b72bb0e7391d40cfb9e61910ee52f51ba31217
[ "BSD-3-Clause" ]
null
null
null
import unittest if __name__ == '__main__': unittest.main()
27.152174
65
0.632506
import mock import unittest from labs.lab01 import example as l1_example class TestObject(unittest.TestCase): def setUp(self): self.mocked_param = mock.Mock() self.tested_object = l1_example.Object(self.mocked_param) def test_str(self): self.assertEqual(str(self.tested_object), ...
0
0
0
1,078
0
0
0
13
91
11261191f5e8407763ade175e2660c443fec937d
6,665
py
Python
pyctrl/packet.py
mcdeoliveira/ctrl
6c6062c6d1e9902178500abcd10be6ac0bcf043d
[ "Apache-2.0" ]
12
2017-06-20T13:20:40.000Z
2021-01-18T00:12:10.000Z
pyctrl/packet.py
mcdeoliveira/beaglebone
6c6062c6d1e9902178500abcd10be6ac0bcf043d
[ "Apache-2.0" ]
2
2017-06-12T15:17:24.000Z
2018-01-30T18:22:19.000Z
pyctrl/packet.py
mcdeoliveira/beaglebone
6c6062c6d1e9902178500abcd10be6ac0bcf043d
[ "Apache-2.0" ]
4
2017-09-25T12:19:19.000Z
2019-01-31T21:46:24.000Z
debug_level = 0
29.754464
74
0.495424
import struct import numpy import pickle debug_level = 0 def unpack_stream(stream): if debug_level > 0: print('> packet: waiting for next character') buffer = stream.read(1) if not buffer: raise NameError('read failed') (btype,) = struct.unpack('c', buffer) if debug_level > 0: ...
0
0
0
0
0
6,538
0
-25
135
1c6baef8995f6170f785f72bd2d3be94ba88bdb3
469
py
Python
meliora/enums/__init__.py
dukhniav/Meliora
ce60acd503ecdf169eaefc3558eff2b173f53903
[ "Apache-2.0" ]
null
null
null
meliora/enums/__init__.py
dukhniav/Meliora
ce60acd503ecdf169eaefc3558eff2b173f53903
[ "Apache-2.0" ]
16
2021-11-30T06:03:50.000Z
2021-11-30T13:59:58.000Z
meliora/enums/__init__.py
dukhniav/meliora
ce60acd503ecdf169eaefc3558eff2b173f53903
[ "Apache-2.0" ]
null
null
null
# flake8: noqa: F401 """Init file for enums"""
36.076923
54
0.842217
# flake8: noqa: F401 """Init file for enums""" from meliora.enums.mode import REAL_MODES, RunMode from meliora.enums.state import State from meliora.enums.msg_type import MsgType from meliora.enums.exchanges import Exchange from meliora.enums.fiat import Fiat from meliora.enums.cli_options import CLIOptions from melio...
0
0
0
0
0
0
0
223
199
056f3b2d9f548f8689246341b41582675121d77d
550
py
Python
andela_labs/FizzBuzz (Programming Logic)/fizz_buzz.py
brotich/andela_bootcamp_X
19fc5bb66d3c930d4e6b9afeb45abc00bbc4c2ea
[ "MIT" ]
null
null
null
andela_labs/FizzBuzz (Programming Logic)/fizz_buzz.py
brotich/andela_bootcamp_X
19fc5bb66d3c930d4e6b9afeb45abc00bbc4c2ea
[ "MIT" ]
null
null
null
andela_labs/FizzBuzz (Programming Logic)/fizz_buzz.py
brotich/andela_bootcamp_X
19fc5bb66d3c930d4e6b9afeb45abc00bbc4c2ea
[ "MIT" ]
null
null
null
def fizz_buzz(num): """ return 'Fizz', 'Buzz', 'FizzBuzz', or the argument it receives, all depending on the argument of the function, a number that is divisible by, 3, 5, or both 3 and 5, respectively. """ if not isinstance(num, int): raise TypeError("Expected integer ...
22.916667
76
0.574545
def fizz_buzz(num): """ return 'Fizz', 'Buzz', 'FizzBuzz', or the argument it receives, all depending on the argument of the function, a number that is divisible by, 3, 5, or both 3 and 5, respectively. """ if not isinstance(num, int): raise TypeError("Expected integer ...
0
0
0
0
0
0
0
0
0
db4e7ab5e47ed5c418992bda30b9ec0a353aaade
973
py
Python
pypy/jit/tl/spli/targetspli.py
benoitc/pypy
a3e1b12d1d01dc29056b7badc051ffc034297658
[ "MIT" ]
1
2020-01-21T11:10:51.000Z
2020-01-21T11:10:51.000Z
pypy/jit/tl/spli/targetspli.py
benoitc/pypy
a3e1b12d1d01dc29056b7badc051ffc034297658
[ "MIT" ]
null
null
null
pypy/jit/tl/spli/targetspli.py
benoitc/pypy
a3e1b12d1d01dc29056b7badc051ffc034297658
[ "MIT" ]
null
null
null
""" usage: spli-c code_obj_file [i:int_arg s:s_arg ...] """ import sys def jitpolicy(driver): """Returns the JIT policy to use when translating.""" from pypy.jit.codewriter.policy import JitPolicy return JitPolicy() if __name__ == '__main__': entry_point(sys.argv)
24.948718
60
0.667009
""" usage: spli-c code_obj_file [i:int_arg s:s_arg ...] """ import sys, autopath, os from pypy.jit.tl.spli import execution, serializer, objects from pypy.rlib.streamio import open_file_as_stream def unwrap_arg(arg): if arg.startswith('s:'): return objects.Str(arg[2:]) elif arg.startswith('i:'): ...
0
0
0
0
0
493
0
81
113
92779e0bef921305b889f3b3eb0c8f84415ef52b
8,294
py
Python
datacore/core.py
GiullianoRossi1987/FastInstallerWindows
00bedb3f036e965ae099f7df0934b4d473ca6ece
[ "Apache-2.0" ]
null
null
null
datacore/core.py
GiullianoRossi1987/FastInstallerWindows
00bedb3f036e965ae099f7df0934b4d473ca6ece
[ "Apache-2.0" ]
null
null
null
datacore/core.py
GiullianoRossi1987/FastInstallerWindows
00bedb3f036e965ae099f7df0934b4d473ca6ece
[ "Apache-2.0" ]
null
null
null
# coding = utf-8 # using namespace std """ """
28.307167
146
0.568483
# coding = utf-8 # using namespace std import sqlite3 from os import system from os import getcwd from os import chdir """ """ class DatabaseConnection(object): """""" connection_db = sqlite3.connect("./datacore/main-db.db") cursor = connection_db.cursor() got_data = False def __init__(self, fi...
0
813
0
7,252
0
0
0
-8
157
7ba004a6ed3546c4fa24478bab3f5570e404b177
1,325
py
Python
src/s_analyzer/apps/market_data/models.py
iaga84/securities-analyzer
69458845e70aecfbe7360b780f3eb5c145d11f5e
[ "MIT" ]
1
2020-08-31T08:41:17.000Z
2020-08-31T08:41:17.000Z
src/s_analyzer/apps/market_data/models.py
iaga84/securities-analyzer
69458845e70aecfbe7360b780f3eb5c145d11f5e
[ "MIT" ]
1
2017-12-21T09:49:46.000Z
2017-12-21T09:52:52.000Z
src/s_analyzer/apps/market_data/models.py
iaga84/securities-analyzer
69458845e70aecfbe7360b780f3eb5c145d11f5e
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals
33.974359
81
0.728302
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Security(models.Model): symbol = models.CharField(max_length=32, unique=True) currency...
0
1,088
0
0
0
0
0
47
91
df25944e2ec89efaa65ae099c165d5129849b578
3,039
py
Python
regreg/atoms/tests/test_slope_compareR.py
vishalbelsare/regreg
d1b62cc43cdd83331f2b0817b0ae099d5ef97966
[ "BSD-2-Clause" ]
11
2016-02-25T01:53:03.000Z
2020-11-30T00:59:46.000Z
regreg/atoms/tests/test_slope_compareR.py
vishalbelsare/regreg
d1b62cc43cdd83331f2b0817b0ae099d5ef97966
[ "BSD-2-Clause" ]
21
2015-09-17T19:18:09.000Z
2021-04-28T06:15:02.000Z
regreg/atoms/tests/test_slope_compareR.py
vishalbelsare/regreg
d1b62cc43cdd83331f2b0817b0ae099d5ef97966
[ "BSD-2-Clause" ]
8
2016-03-24T00:03:03.000Z
2019-08-25T23:40:42.000Z
""" Solve a problem with SLOPE and compare to R """ from __future__ import print_function try: rpy2_available = True from rpy2.robjects.packages import importr except ImportError: rpy2_available = False Rslope = True try: SLOPE = importr('SLOPE') except: Rslope = False
26.426087
117
0.643304
""" Solve a problem with SLOPE and compare to R """ from __future__ import print_function import numpy as np import nose.tools as nt try: import rpy2.robjects as rpy rpy2_available = True import rpy2.robjects.numpy2ri from rpy2.robjects.packages import importr from rpy2 import robjects except Imp...
0
1,585
0
0
0
828
0
66
259
e001c958c02a12c567374f0835ed6785ade631f7
227
py
Python
gdsfactory/tests/test_path_zero_length.py
tvt173/gdsfactory
69dcfccff1525722e7029eb8bb8c4c9ddebbac47
[ "MIT" ]
42
2020-05-25T09:33:45.000Z
2022-03-29T03:41:19.000Z
gdsfactory/tests/test_path_zero_length.py
tvt173/gdsfactory
69dcfccff1525722e7029eb8bb8c4c9ddebbac47
[ "MIT" ]
133
2020-05-28T18:29:04.000Z
2022-03-31T22:21:42.000Z
gdsfactory/tests/test_path_zero_length.py
tvt173/gdsfactory
69dcfccff1525722e7029eb8bb8c4c9ddebbac47
[ "MIT" ]
17
2020-06-30T07:07:50.000Z
2022-03-17T15:45:27.000Z
import gdsfactory as gf if __name__ == "__main__": c = gf.c.straight(length=0.5e-3) c.show()
17.461538
36
0.665198
import gdsfactory as gf def test_path_less_than_1nm(): c = gf.c.straight(length=0.5e-3) assert not c.references assert not c.polygons if __name__ == "__main__": c = gf.c.straight(length=0.5e-3) c.show()
0
0
0
0
0
100
0
0
23
06fd5186522c94ef1a7e6c60b8d7cf2b464d169b
490
py
Python
DataHouse/test/pymongo_test.py
lucasxlu/DataHouse
6dedd1921a077ad4fcbee6ff40a763a48b688832
[ "MIT" ]
3
2018-06-26T07:12:49.000Z
2019-04-18T15:10:41.000Z
DataHouse/test/pymongo_test.py
EclipseXuLu/DataHouse
6dedd1921a077ad4fcbee6ff40a763a48b688832
[ "MIT" ]
1
2018-10-27T09:14:58.000Z
2018-10-27T12:13:42.000Z
DataHouse/test/pymongo_test.py
lucasxlu/DataHouse
6dedd1921a077ad4fcbee6ff40a763a48b688832
[ "MIT" ]
3
2018-10-27T09:29:49.000Z
2019-04-10T03:50:24.000Z
if __name__ == '__main__': query_document() delete_item() query_document()
17.5
32
0.655102
from pymongo import MongoClient def insert_item(item): client = MongoClient() db = client.douban.movie result = db.insert_one(item) def query_document(): client = MongoClient() db = client.douban.movie cursor = db.find() for document in cursor: print(document) def delete_item()...
0
0
0
0
0
297
0
10
91
86b39dbbb4e3e06c0af733958e7da264a025a15a
3,053
py
Python
datamine.py
jokem59/Overwatch-Sentiment
6e1dfb22f2572fc7141674513166ae743ea4e3d8
[ "MIT" ]
null
null
null
datamine.py
jokem59/Overwatch-Sentiment
6e1dfb22f2572fc7141674513166ae743ea4e3d8
[ "MIT" ]
null
null
null
datamine.py
jokem59/Overwatch-Sentiment
6e1dfb22f2572fc7141674513166ae743ea4e3d8
[ "MIT" ]
null
null
null
#!usr/bin/python from tweepy import OAuthHandler from tweepy import Stream import ConfigParser import processText as pt import plotlySetup import connectSQL config = ConfigParser.ConfigParser() config.read('/Users/JoeK/config_files/owconfig') stopwords = pt.getStopWordList(config.get('stopwords', 'stopword_file')) a...
32.136842
112
0.673108
#!usr/bin/python from tweepy.streaming import StreamListener from tweepy import OAuthHandler from tweepy import Stream from textblob import TextBlob import json import ConfigParser import datetime import re import time import processText as pt import plotlySetup import connectSQL config = ConfigParser.ConfigParser() ...
0
0
0
1,744
0
0
0
-8
154
7965cc8dcb8fc6a1cd538c7294743c3d48692598
2,510
py
Python
vendor/munin/cassandra.py
starsep/NewsBlur
6c59416ca82377ca1bbc7d044890bdead3eba904
[ "MIT" ]
1
2019-07-15T09:12:35.000Z
2019-07-15T09:12:35.000Z
vendor/munin/cassandra.py
starsep/NewsBlur
6c59416ca82377ca1bbc7d044890bdead3eba904
[ "MIT" ]
7
2021-02-08T20:32:31.000Z
2022-03-11T23:50:47.000Z
vendor/munin/cassandra.py
starsep/NewsBlur
6c59416ca82377ca1bbc7d044890bdead3eba904
[ "MIT" ]
1
2020-11-21T08:43:15.000Z
2020-11-21T08:43:15.000Z
from __future__ import division import re space_re = re.compile(r"\s+")
30.609756
100
0.53506
from __future__ import division import os import re import socket import time from subprocess import Popen, PIPE from vendor.munin import MuninPlugin space_re = re.compile(r"\s+") class MuninCassandraPlugin(MuninPlugin): category = "Cassandra" def __init__(self, *args, **kwargs): super(MuninCassand...
0
0
0
2,304
0
0
0
-2
135
8990ab2b96d03de672b84f40cb7be20dd5153da0
11,943
py
Python
benchmarks/image_net/graph_utils.py
Qualcomm-AI-research/BayesianBits
fb04b6fd9680b4269b7b5d6da150d73f4b1973ca
[ "BSD-3-Clause-Clear" ]
4
2022-02-11T14:41:00.000Z
2022-03-29T08:19:09.000Z
benchmarks/image_net/graph_utils.py
Qualcomm-AI-research/BayesianBits
fb04b6fd9680b4269b7b5d6da150d73f4b1973ca
[ "BSD-3-Clause-Clear" ]
null
null
null
benchmarks/image_net/graph_utils.py
Qualcomm-AI-research/BayesianBits
fb04b6fd9680b4269b7b5d6da150d73f4b1973ca
[ "BSD-3-Clause-Clear" ]
null
null
null
# Copyright (c) 2021 Qualcomm Technologies, Inc. # All Rights Reserved. import torch DEFAULT_BATCH_SIZE = 1 DEFAULT_INPUT_CHANNELS = 3 DEFAULT_RESOLUTION = [224, 224] DEFAULT_INPUT_SHAPE = [DEFAULT_BATCH_SIZE, DEFAULT_INPUT_CHANNELS] + DEFAULT_RESOLUTION def inspect_graph(module: torch.nn.Module, model_name="", ...
36.747692
88
0.60345
# Copyright (c) 2021 Qualcomm Technologies, Inc. # All Rights Reserved. from collections import OrderedDict import torch DEFAULT_BATCH_SIZE = 1 DEFAULT_INPUT_CHANNELS = 3 DEFAULT_RESOLUTION = [224, 224] DEFAULT_INPUT_SHAPE = [DEFAULT_BATCH_SIZE, DEFAULT_INPUT_CHANNELS] + DEFAULT_RESOLUTION class GraphMeta(object)...
0
335
0
11,053
0
0
0
14
69
b783101a5e20a5067cbf97b8ac6205de10361796
116
py
Python
liquepy/__about__.py
eng-tools/liquepy
b1e42e27733044cb2ca18fba97aa7c819645fa31
[ "MIT" ]
2
2019-09-13T08:01:20.000Z
2020-07-31T03:33:13.000Z
liquepy/__about__.py
eng-tools/liquepy
b1e42e27733044cb2ca18fba97aa7c819645fa31
[ "MIT" ]
null
null
null
liquepy/__about__.py
eng-tools/liquepy
b1e42e27733044cb2ca18fba97aa7c819645fa31
[ "MIT" ]
4
2019-11-02T02:11:34.000Z
2021-04-30T06:06:41.000Z
__version__ = "0.6.24" __project__ = "liquepy" __author__ = "Maxim Millen and Julieth Quintero" __license__ = "MIT"
23.2
48
0.741379
__version__ = "0.6.24" __project__ = "liquepy" __author__ = "Maxim Millen and Julieth Quintero" __license__ = "MIT"
0
0
0
0
0
0
0
0
0
03b037dc5b5ed626cf1f066cae4d427432da7a4e
1,625
py
Python
p4/crear_ficheros.py
borjasoutoprego/FP2
47f95de7646dd77bbe003abbcc4f422e698c910d
[ "MIT" ]
null
null
null
p4/crear_ficheros.py
borjasoutoprego/FP2
47f95de7646dd77bbe003abbcc4f422e698c910d
[ "MIT" ]
null
null
null
p4/crear_ficheros.py
borjasoutoprego/FP2
47f95de7646dd77bbe003abbcc4f422e698c910d
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Created on Thu May 13 10:02:29 2021 @author: Borja Souto Prego (borja.souto), Nina Lpez Laudenbach (nina.laudenbach) """ import random import string import datetime def createDNI(): """ Creates a random DNI""" dni = '' for i in range(8): n = str(random.r...
26.209677
82
0.619077
# -*- coding: utf-8 -*- """ Created on Thu May 13 10:02:29 2021 @author: Borja Souto Prego (borja.souto), Nina López Laudenbach (nina.laudenbach) """ import random import string import datetime from datetime import date def createDNI(): """ Creates a random DNI""" dni = '' for i in range(8...
2
0
0
0
0
0
0
4
23
21f1b914ac9ed467e8a5a75dc611e90b77b2abb4
3,570
py
Python
py2/testdir_rapids/test_rapids_funs_basic.py
ahmedengu/h2o-3
ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11
[ "Apache-2.0" ]
2
2019-09-02T15:49:45.000Z
2019-09-02T16:01:58.000Z
py2/testdir_rapids/test_rapids_funs_basic.py
ahmedengu/h2o-3
ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11
[ "Apache-2.0" ]
2
2021-06-02T02:24:03.000Z
2021-11-15T17:51:49.000Z
py2/testdir_rapids/test_rapids_funs_basic.py
ahmedengu/h2o-3
ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11
[ "Apache-2.0" ]
1
2020-12-18T19:20:02.000Z
2020-12-18T19:20:02.000Z
import sys sys.path.extend(['.','..','../..','py']) import h2o2 as h2o funsList = [ '(def anon {x} (, ((- x x ) )))', '(def anon {x} (, ((- (abs (- (* %x %x) (* (* %x #5) %x))) )) ))', '(def anon {x} (, ((- (abs (- (* %x %x) (* (* %x #5) %x))) (/ #55 %x))) ) ((abs (- (* (* %x %x) %x) (* (/ #999 (var...
43.536585
179
0.485434
import unittest, random, sys, time sys.path.extend(['.','..','../..','py']) import h2o2 as h2o import h2o_browse as h2b, h2o_exec as h2e, h2o_import as h2i funsList = [ '(def anon {x} (, ((- x x ) )))', '(def anon {x} (, ((- (abs (- (* %x %x) (* (* %x #5) %x))) )) ))', '(def anon {x} (, ((- (abs (- ...
0
161
0
1,182
0
0
0
63
45
6140d9132d31036c3611ba67b2934910629adb8d
4,695
py
Python
venv/Lib/site-packages/bootstrap_py/tests/test_commands.py
prats1997/Euphorum
16bfee9c71ea5b1332c6263233c79a633ddfdd83
[ "MIT" ]
1
2020-03-01T17:39:04.000Z
2020-03-01T17:39:04.000Z
venv/Lib/site-packages/bootstrap_py/tests/test_commands.py
prats1997/Euphorum
16bfee9c71ea5b1332c6263233c79a633ddfdd83
[ "MIT" ]
null
null
null
venv/Lib/site-packages/bootstrap_py/tests/test_commands.py
prats1997/Euphorum
16bfee9c71ea5b1332c6263233c79a633ddfdd83
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """bootstrap_py.tests.test_commands."""
41.184211
76
0.614058
# -*- coding: utf-8 -*- """bootstrap_py.tests.test_commands.""" import unittest import argparse import os import shlex import shutil import sys import tempfile import six from bootstrap_py import commands, __version__ from bootstrap_py.tests.stub import stub_request_metadata class CommandsTests(unittest.TestCase): ...
0
0
0
4,395
0
0
0
-8
243
d4768b34659615c1d8ae780b8fc7ab570b5b1231
928
gyp
Python
binding.gyp
taepatipol/nogdb.js
04278b2cd7538479e5273eb1f844c370c5d3af83
[ "MIT" ]
1
2018-07-27T14:54:01.000Z
2018-07-27T14:54:01.000Z
binding.gyp
taepatipol/nogdb.js
04278b2cd7538479e5273eb1f844c370c5d3af83
[ "MIT" ]
null
null
null
binding.gyp
taepatipol/nogdb.js
04278b2cd7538479e5273eb1f844c370c5d3af83
[ "MIT" ]
1
2019-06-21T08:24:53.000Z
2019-06-21T08:24:53.000Z
{ "targets": [ { "target_name": "nogdb_js", "cflags_cc": [ "-std=c++11", "-Wall", "-fexceptions" ], "sources": [ "src/init_module.cc", "src/classFilter.cc", "src/co...
24.421053
48
0.303879
{ "targets": [ { "target_name": "nogdb_js", "cflags_cc": [ "-std=c++11", "-Wall", "-fexceptions" ], "sources": [ "src/init_module.cc", "src/classFilter.cc", "src/co...
0
0
0
0
0
0
0
0
0
9b43eeb75595cea00b5bfc356b58c8039f4ceb66
2,406
py
Python
src/toil/test/sort/lib.py
adamnovak/toil
3a81f1114ec7f347e6e7bfd861073d897a9188ec
[ "Apache-2.0" ]
null
null
null
src/toil/test/sort/lib.py
adamnovak/toil
3a81f1114ec7f347e6e7bfd861073d897a9188ec
[ "Apache-2.0" ]
null
null
null
src/toil/test/sort/lib.py
adamnovak/toil
3a81f1114ec7f347e6e7bfd861073d897a9188ec
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright (C) 2015 UCSC Computational Genomics Lab # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
33.887324
77
0.678304
#!/usr/bin/env python # Copyright (C) 2015 UCSC Computational Genomics Lab # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
0
0
0
0
0
0
0
0
0
7667fbb21da200f0b2b23c63037c8d05f0c728c4
2,379
py
Python
SS.py
THammami01/setup_shift
495b1b4fd2b7b88898006bf4f286f7019d6e7430
[ "MIT" ]
1
2021-09-09T09:34:57.000Z
2021-09-09T09:34:57.000Z
SS.py
THammami01/setup_shift
495b1b4fd2b7b88898006bf4f286f7019d6e7430
[ "MIT" ]
null
null
null
SS.py
THammami01/setup_shift
495b1b4fd2b7b88898006bf4f286f7019d6e7430
[ "MIT" ]
null
null
null
#! /usr/bin/python3 art = """ .__ _____ .__ .__ .___ ____ | | _/ ____\_____ | | ____ | |__ __| _/ ____ ___ __ _/ __ \ | | \ __\ \__ \ | | _/ __ \ | | \ / __ | _/ __ \ \ \/ / \ ___/ | |__ | | / __ \_| |__\ ___/ | Y \/ ...
31.302632
123
0.523329
#! /usr/bin/python3 import colorama from colorama import Fore import os art = """ .__ _____ .__ .__ .___ ____ | | _/ ____\_____ | | ____ | |__ __| _/ ____ ___ __ _/ __ \ | | \ __\ \__ \ | | _/ __ \ | | \ / __ | _/ __ \ \ \/ / \ ...
8
0
0
0
0
1,643
0
-14
208