hexsha
stringlengths
40
40
size
int64
7
1.04M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
247
max_stars_repo_name
stringlengths
4
125
max_stars_repo_head_hexsha
stringlengths
40
78
max_stars_repo_licenses
listlengths
1
10
max_stars_count
int64
1
368k
max_stars_repo_stars_event_min_datetime
stringlengths
24
24
max_stars_repo_stars_event_max_datetime
stringlengths
24
24
max_issues_repo_path
stringlengths
4
247
max_issues_repo_name
stringlengths
4
125
max_issues_repo_head_hexsha
stringlengths
40
78
max_issues_repo_licenses
listlengths
1
10
max_issues_count
int64
1
116k
max_issues_repo_issues_event_min_datetime
stringlengths
24
24
max_issues_repo_issues_event_max_datetime
stringlengths
24
24
max_forks_repo_path
stringlengths
4
247
max_forks_repo_name
stringlengths
4
125
max_forks_repo_head_hexsha
stringlengths
40
78
max_forks_repo_licenses
listlengths
1
10
max_forks_count
int64
1
105k
max_forks_repo_forks_event_min_datetime
stringlengths
24
24
max_forks_repo_forks_event_max_datetime
stringlengths
24
24
content
stringlengths
1
1.04M
avg_line_length
float64
1.77
618k
max_line_length
int64
1
1.02M
alphanum_fraction
float64
0
1
original_content
stringlengths
7
1.04M
filtered:remove_function_no_docstring
int64
-102
942k
filtered:remove_class_no_docstring
int64
-354
977k
filtered:remove_delete_markers
int64
0
60.1k
eacd81437dbcbc037e8b4df23a508d3943eb12fe
1,565
py
Python
restructure_graphs.py
mheydasch/GC_analyzer_helpfiles
693bca6a451d80db27f434a1482ab1a692533cd3
[ "MIT" ]
null
null
null
restructure_graphs.py
mheydasch/GC_analyzer_helpfiles
693bca6a451d80db27f434a1482ab1a692533cd3
[ "MIT" ]
null
null
null
restructure_graphs.py
mheydasch/GC_analyzer_helpfiles
693bca6a451d80db27f434a1482ab1a692533cd3
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jan 14 15:52:16 2019 @author: max """ import os import re import argparse import shutil #%% if __name__ == '__main__': args=parseArguments() path=args.dir copy_file(path) print(args) ...
23.014706
103
0.577636
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ Created on Mon Jan 14 15:52:16 2019 @author: max """ import os import re import argparse import shutil #%% def parseArguments(): # Define the parser and read arguments parser = argparse.ArgumentParser(description='Get tags from all files in a directory.') par...
1,060
0
95
4102a635a2bfa689a3def92d450bca6b2ded2ded
3,833
py
Python
hardware_state.py
Lukas-Fuchs/alarm
33dff7e7b09ecd0b073997f43b544d3a8fb2c559
[ "MIT" ]
null
null
null
hardware_state.py
Lukas-Fuchs/alarm
33dff7e7b09ecd0b073997f43b544d3a8fb2c559
[ "MIT" ]
3
2020-12-22T15:53:44.000Z
2020-12-23T16:09:47.000Z
hardware_state.py
Lukas-Fuchs/alarm
33dff7e7b09ecd0b073997f43b544d3a8fb2c559
[ "MIT" ]
null
null
null
import datetime from datetime import datetime as dt import threading from threading import Lock import os # pretty simple data class to describe actions to be taken as rule consequences
31.162602
108
0.559092
import datetime from datetime import datetime as dt import threading from threading import Lock import os # pretty simple data class to describe actions to be taken as rule consequences class action: # unique identifier for this action; used to reference it further id = "" # fifo to write to target = "...
2,508
1,092
45
62851c76623c24d5ae5d1266b1718b9002223aae
7,088
py
Python
examples/ConfigActuation/tests/test_config_actuation.py
craig8/volttron
2a954311d323effa3b79c2a53f6e8c3bb9664e1c
[ "Apache-2.0", "BSD-2-Clause" ]
1
2020-06-08T16:54:28.000Z
2020-06-08T16:54:28.000Z
examples/ConfigActuation/tests/test_config_actuation.py
craig8/volttron
2a954311d323effa3b79c2a53f6e8c3bb9664e1c
[ "Apache-2.0", "BSD-2-Clause" ]
8
2016-10-07T22:49:28.000Z
2022-02-23T00:57:58.000Z
examples/ConfigActuation/tests/test_config_actuation.py
craig8/volttron
2a954311d323effa3b79c2a53f6e8c3bb9664e1c
[ "Apache-2.0", "BSD-2-Clause" ]
null
null
null
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright 2020, Battelle Memorial Institute. # # 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...
41.694118
92
0.705277
# -*- coding: utf-8 -*- {{{ # vim: set fenc=utf-8 ft=python sw=4 ts=4 sts=4 et: # # Copyright 2020, Battelle Memorial Institute. # # 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...
1,147
0
49
213dcc7326f3a5b529d6fbffd0b4ff9e0c5c13cf
746
py
Python
snakes.py
ZMBailey/resolving-merge-conflicts
b6425491ccd09810eace5218b805134236580f36
[ "MIT" ]
null
null
null
snakes.py
ZMBailey/resolving-merge-conflicts
b6425491ccd09810eace5218b805134236580f36
[ "MIT" ]
null
null
null
snakes.py
ZMBailey/resolving-merge-conflicts
b6425491ccd09810eace5218b805134236580f36
[ "MIT" ]
null
null
null
class Snake: """A dangerous and/or harmless serpent.""" pass class Cobra(Snake): """Definitely dangerous, yup.""" def bite(self, other): """Deliver a dose of venom.""" if other.immune == False: other.poisoned == True other.poison_timer = 10 * self.venom class BoaConstrictor(...
21.941176
46
0.600536
class Snake: """A dangerous and/or harmless serpent.""" pass class Cobra(Snake): """Definitely dangerous, yup.""" def __init__(self,venom): self.venom = venom def bite(self, other): """Deliver a dose of venom.""" if other.immune == False: other.poisoned == True other.pois...
24
0
30
7bb04b77685aaae83c05b0c21390584f7a553a1f
878
py
Python
src/piece/DPieceAI.py
fireclawthefox/AnkandoraLight
05b71e1a2919141cce02cb1aade95fbac682614b
[ "BSD-2-Clause" ]
3
2020-07-31T10:27:06.000Z
2022-01-11T20:28:55.000Z
src/piece/DPieceAI.py
fireclawthefox/AnkandoraLight
05b71e1a2919141cce02cb1aade95fbac682614b
[ "BSD-2-Clause" ]
null
null
null
src/piece/DPieceAI.py
fireclawthefox/AnkandoraLight
05b71e1a2919141cce02cb1aade95fbac682614b
[ "BSD-2-Clause" ]
1
2020-07-30T08:23:28.000Z
2020-07-30T08:23:28.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = "Fireclaw the Fox" __license__ = """ Simplified BSD (BSD 2-Clause) License. See License.txt or http://opensource.org/licenses/BSD-2-Clause for more info """ from direct.distributed.DistributedSmoothNodeAI import DistributedSmoothNodeAI
28.322581
83
0.705011
#!/usr/bin/python # -*- coding: utf-8 -*- __author__ = "Fireclaw the Fox" __license__ = """ Simplified BSD (BSD 2-Clause) License. See License.txt or http://opensource.org/licenses/BSD-2-Clause for more info """ from direct.distributed.DistributedSmoothNodeAI import DistributedSmoothNodeAI class DPieceAI(Distributed...
409
19
157
b43bf6c3c5e5492074ca4e552ad314193f8fcc46
3,941
py
Python
openslides_backend/action/actions/poll/update.py
FinnStutzenstein/openslides-backend
fffc152f79d3446591e07a6913d9fdf30b46f577
[ "MIT" ]
null
null
null
openslides_backend/action/actions/poll/update.py
FinnStutzenstein/openslides-backend
fffc152f79d3446591e07a6913d9fdf30b46f577
[ "MIT" ]
null
null
null
openslides_backend/action/actions/poll/update.py
FinnStutzenstein/openslides-backend
fffc152f79d3446591e07a6913d9fdf30b46f577
[ "MIT" ]
null
null
null
from typing import Any, Dict from ....models.models import Poll from ....shared.exceptions import ActionException from ....shared.patterns import FullQualifiedId from ...generics.update import UpdateAction from ...util.default_schema import DefaultSchema from ...util.register import register_action from .base import b...
32.04065
86
0.543263
from typing import Any, Dict from ....models.models import Poll from ....shared.exceptions import ActionException from ....shared.patterns import FullQualifiedId from ...generics.update import UpdateAction from ...util.default_schema import DefaultSchema from ...util.register import register_action from .base import b...
2,769
0
81
c203b50774eb0d12c796abfc68b15d2534607102
1,517
py
Python
DataBases/Userinfodata.py
PinkLittlePig/tabletop-bot
5c731d09fdd6f996fd6c48ccdf560a96457745b2
[ "MIT" ]
null
null
null
DataBases/Userinfodata.py
PinkLittlePig/tabletop-bot
5c731d09fdd6f996fd6c48ccdf560a96457745b2
[ "MIT" ]
null
null
null
DataBases/Userinfodata.py
PinkLittlePig/tabletop-bot
5c731d09fdd6f996fd6c48ccdf560a96457745b2
[ "MIT" ]
null
null
null
from DataBases.DataBaseClass import Database from datetime import datetime class UserInfoDatabase(Database): """Stores information on users including currency, user ids, and items"""
42.138889
168
0.63151
from DataBases.DataBaseClass import Database from datetime import datetime class UserInfoDatabase(Database): """Stores information on users including currency, user ids, and items""" def __init__(self, tablename='UserInformation'): super().__init__(filename='UserInfo.db') self.tablenam...
1,179
0
145
a591bc1cf059796b5c6b9b23aa7308bee5a85c7d
3,137
py
Python
ascii_chess/ascii_board.py
butwhywhy/ASCIIchess
133b54cacd8ba3b96a93d4cf4822e85fc7a4b4b1
[ "MIT" ]
null
null
null
ascii_chess/ascii_board.py
butwhywhy/ASCIIchess
133b54cacd8ba3b96a93d4cf4822e85fc7a4b4b1
[ "MIT" ]
3
2015-02-16T08:24:37.000Z
2015-02-16T08:29:52.000Z
ascii_chess/ascii_board.py
butwhywhy/ASCIIchess
133b54cacd8ba3b96a93d4cf4822e85fc7a4b4b1
[ "MIT" ]
null
null
null
from ascii_drawing import Canvas, Square, figure_from_string, GeneralColorConversor, ScaleConversor from .chess_rules import KING, QUEEN, ROOK, BISHOP, KNIGHT, PAWN PIECE_NAMES = {KING: 'king', QUEEN: 'queen', ROOK: 'rook', BISHOP: 'bishop', KNIGHT: 'knight', PAWN: 'pawn'} from os import path from pkg_reso...
35.247191
119
0.623207
from ascii_drawing import Canvas, Square, figure_from_string, GeneralColorConversor, ScaleConversor class ChessBoard(object): def __init__(self, side, white_darkness, black_darkness): self.extra = 4 self.side = side self.white_darkness = white_darkness self.black_darkness = black_d...
2,271
12
324
a9de616a234815a30eff3f4f68d051ee59ecfb45
1,802
py
Python
egyptianFractions.py
Existence-glitch/PythonCodes
a49121855364a5e0ac2ff227ef91f19086a52f09
[ "MIT" ]
1
2021-06-08T06:53:50.000Z
2021-06-08T06:53:50.000Z
egyptianFractions.py
Existence-glitch/PythonCodes
a49121855364a5e0ac2ff227ef91f19086a52f09
[ "MIT" ]
null
null
null
egyptianFractions.py
Existence-glitch/PythonCodes
a49121855364a5e0ac2ff227ef91f19086a52f09
[ "MIT" ]
null
null
null
from math import gcd, ceil main()
43.95122
142
0.615982
from math import gcd, ceil def fibonacci(a, b): #Se calcula el denominador de la más grande fracción unitaria ("Largest unit fraction") luf_den = ceil(b/a) #Resta entre la fracción a/b entregada y la más grande fracción unitaria que podemos extraer de ella. subtraction = a/b - 1/luf_den #Si ...
1,734
0
50
b7857ccc0fb4a35bd036b819cf6fde09b5d47feb
1,379
py
Python
pineapple-py-main/src/backend.py
yujiecong/yjcL
6d6dc4ad3611cb34c07192a1a3038a1ac3f67d6c
[ "MIT" ]
null
null
null
pineapple-py-main/src/backend.py
yujiecong/yjcL
6d6dc4ad3611cb34c07192a1a3038a1ac3f67d6c
[ "MIT" ]
null
null
null
pineapple-py-main/src/backend.py
yujiecong/yjcL
6d6dc4ad3611cb34c07192a1a3038a1ac3f67d6c
[ "MIT" ]
null
null
null
import sys from definition import Variable, Statement, Assignment, Print, SourceCode from lexer import Lexer from parser import parse if __name__ == '__main__': main()
28.729167
87
0.672951
import sys from definition import Variable, Statement, Assignment, Print, SourceCode from lexer import Lexer from parser import parse class Interpreter: def __init__(self, source_code: str): self.lexer = Lexer(source_code) self.ast = parse(self.lexer) self.variables = {} def resolve...
997
-3
208
8561179a7caf34130d4ba161d933cfb6e7685eb6
359
py
Python
core/migrations/0006_rename_choice_choices_name.py
morethanmin/fooorm
770894ce20ececcfc635b28948f69819b72834a0
[ "MIT" ]
1
2021-09-10T07:08:16.000Z
2021-09-10T07:08:16.000Z
core/migrations/0006_rename_choice_choices_name.py
morethanmin/fooorm
770894ce20ececcfc635b28948f69819b72834a0
[ "MIT" ]
null
null
null
core/migrations/0006_rename_choice_choices_name.py
morethanmin/fooorm
770894ce20ececcfc635b28948f69819b72834a0
[ "MIT" ]
null
null
null
# Generated by Django 3.2.5 on 2021-08-07 03:52 from django.db import migrations
18.894737
47
0.579387
# Generated by Django 3.2.5 on 2021-08-07 03:52 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('core', '0005_auto_20210806_2255'), ] operations = [ migrations.RenameField( model_name='choices', old_name='choice', ...
0
253
23
0abcc7d18ee60c3f88f686aca48f7459c7c0d8b6
997
py
Python
04-functions/lottery.py
sn-lvpthe/CirquePy
a22cd1c76e650ab1752cbd6a3edfcfd50d9d58dc
[ "Unlicense" ]
null
null
null
04-functions/lottery.py
sn-lvpthe/CirquePy
a22cd1c76e650ab1752cbd6a3edfcfd50d9d58dc
[ "Unlicense" ]
null
null
null
04-functions/lottery.py
sn-lvpthe/CirquePy
a22cd1c76e650ab1752cbd6a3edfcfd50d9d58dc
[ "Unlicense" ]
null
null
null
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import random if __name__ == "__main__": # this means that if somebody ran this Python file, execute only the code below main()
26.945946
129
0.656971
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import random def generate_lottery_numbers(quantity): num_list = [] while True: if len(num_list) == quantity: # when the length of the list reaches the desired quantity, stop choosing new numbers break lot_num = random.randint(1, 5...
767
0
46
adff595ea33874ae835033317deae43e33df658a
3,700
py
Python
graphSAGE/src/dataCenter.py
ShaoaAllen/CogQA
82b932f4fd9dad33efb7eaaffa7ee29594397932
[ "MIT" ]
null
null
null
graphSAGE/src/dataCenter.py
ShaoaAllen/CogQA
82b932f4fd9dad33efb7eaaffa7ee29594397932
[ "MIT" ]
null
null
null
graphSAGE/src/dataCenter.py
ShaoaAllen/CogQA
82b932f4fd9dad33efb7eaaffa7ee29594397932
[ "MIT" ]
null
null
null
import sys import os from collections import defaultdict import numpy as np class DataCenter(object): """docstring for DataCenter"""
32.45614
92
0.678919
import sys import os from collections import defaultdict import numpy as np class DataCenter(object): """docstring for DataCenter""" def __init__(self, config): super(DataCenter, self).__init__() self.config = config def load_dataSet(self, dataSet='cora'): if dataSet == 'cora': cora_content_file = self...
3,488
0
73
3f372f778c46e09e9295a501d1163b5145f2f35e
6,535
py
Python
update-version.py
JOCKCERJON/TEMP
3fa77e0cf5c8b9cdec36f916759ae8ea46076537
[ "BSD-3-Clause" ]
1,402
2015-01-23T02:50:26.000Z
2022-03-26T09:42:31.000Z
update-version.py
snobalfyte/HashCheck
3fa77e0cf5c8b9cdec36f916759ae8ea46076537
[ "BSD-3-Clause" ]
68
2015-08-29T17:10:23.000Z
2021-09-27T16:33:09.000Z
update-version.py
snobalfyte/HashCheck
3fa77e0cf5c8b9cdec36f916759ae8ea46076537
[ "BSD-3-Clause" ]
214
2015-02-04T04:17:50.000Z
2022-03-31T11:43:01.000Z
#!/usr/bin/python3 # # Version updater # Copyright (C) 2016 Christopher Gurnee. All rights reserved. # # Please refer to readme.md for information about this source code. # Please refer to license.txt for details about distribution and modification. # # Updates various version constants based on HASHCHECK_VERS...
44.455782
126
0.605662
#!/usr/bin/python3 # # Version updater # Copyright (C) 2016 Christopher Gurnee. All rights reserved. # # Please refer to readme.md for information about this source code. # Please refer to license.txt for details about distribution and modification. # # Updates various version constants based on HASHCHECK_VERS...
623
0
46
a3ebfa1c510844dfb90ae19113ead659e155cc9b
2,337
py
Python
youtube_dl_cli/download_youtube_video.py
CarsonSlovoka/youtube-dl-cli
80de0ef2500f58292723532d372b740a964635f5
[ "Apache-2.0" ]
1
2020-10-26T13:51:39.000Z
2020-10-26T13:51:39.000Z
youtube_dl_cli/download_youtube_video.py
CarsonSlovoka/youtube-dl-cli
80de0ef2500f58292723532d372b740a964635f5
[ "Apache-2.0" ]
null
null
null
youtube_dl_cli/download_youtube_video.py
CarsonSlovoka/youtube-dl-cli
80de0ef2500f58292723532d372b740a964635f5
[ "Apache-2.0" ]
1
2020-04-02T07:26:49.000Z
2020-04-02T07:26:49.000Z
__all__ = ('YoutubeKeeper', 'YLFormat') import youtube_dl import os from sys import stderr from pathlib import Path from .structured import YLFormat from typing import List, Tuple, Sequence, Iterable from tkinter.messagebox import askokcancel from tkinter import Tk if 'withdraw tk': try: Tk().withdraw(...
35.953846
129
0.521181
__all__ = ('YoutubeKeeper', 'YLFormat') import youtube_dl import os from sys import stderr from pathlib import Path from .structured import YLFormat from typing import List, Tuple, Sequence, Iterable from tkinter.messagebox import askokcancel from tkinter import Tk if 'withdraw tk': try: Tk().withdraw(...
1,859
108
23
1df9a7cb640b2a0805ab34095d6a3e9d2d288e1e
4,778
py
Python
data/convert_data_ukbb2964.py
vukadinovic936/ukbb_cardiac
ea2840fca2df2ba4ca6c6d386a2493c3d8c92bde
[ "Apache-2.0" ]
82
2018-04-07T19:29:25.000Z
2022-03-03T02:48:17.000Z
data/convert_data_ukbb2964.py
vukadinovic936/ukbb_cardiac
ea2840fca2df2ba4ca6c6d386a2493c3d8c92bde
[ "Apache-2.0" ]
12
2018-04-03T09:43:15.000Z
2021-11-17T20:04:29.000Z
data/convert_data_ukbb2964.py
vukadinovic936/ukbb_cardiac
ea2840fca2df2ba4ca6c6d386a2493c3d8c92bde
[ "Apache-2.0" ]
42
2018-01-07T18:55:30.000Z
2022-02-24T13:55:31.000Z
# Copyright 2017, Wenjia Bai. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
47.78
106
0.589787
# Copyright 2017, Wenjia Bai. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
0
0
0
38a6c61c2b962bdeef42096f6686ad596fe0b0bc
757
py
Python
a-practical-introduction-to-python-programming-brian-heinold/chapter-02/exercise-09.py
elarabyelaidy19/awesome-reading
5c01a4272ba58e4f7ea665aab14b4c0aa252ea89
[ "MIT" ]
31
2021-11-02T19:51:13.000Z
2022-02-17T10:55:26.000Z
a-practical-introduction-to-python-programming-brian-heinold/chapter-02/exercise-09.py
MosTafaHoSamm/awesome-reading
469408fefc049d78ed53a2b2331b5d5cecdc6c06
[ "MIT" ]
1
2022-01-18T12:27:54.000Z
2022-01-18T12:27:54.000Z
a-practical-introduction-to-python-programming-brian-heinold/chapter-02/exercise-09.py
MosTafaHoSamm/awesome-reading
469408fefc049d78ed53a2b2331b5d5cecdc6c06
[ "MIT" ]
3
2022-01-11T05:01:34.000Z
2022-02-05T14:36:29.000Z
# The Fibonacci numbers are the sequence below, where the first two numbers are 1, and each # number thereafter is the sum of the two preceding numbers. Write a program that asks the # user how many Fibonacci numbers to print and then prints that many. # 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 ... # How...
28.037037
91
0.632761
# The Fibonacci numbers are the sequence below, where the first two numbers are 1, and each # number thereafter is the sum of the two preceding numbers. Write a program that asks the # user how many Fibonacci numbers to print and then prints that many. # 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 ... # How...
0
0
0
dbfd2b863ebf8a65643357ce4ed11a1cf0283a7d
60,178
py
Python
src/qdyn/pulse.py
goerz/qdynpylib
89f76cdb07e149435fcdd7153afe3156b444b9a8
[ "BSD-3-Clause" ]
3
2016-05-09T03:21:32.000Z
2018-04-12T08:42:50.000Z
src/qdyn/pulse.py
qucontrol/qdynpylib
89f76cdb07e149435fcdd7153afe3156b444b9a8
[ "BSD-3-Clause" ]
10
2019-04-19T16:22:10.000Z
2021-01-19T04:37:03.000Z
src/qdyn/pulse.py
qucontrol/qdynpylib
89f76cdb07e149435fcdd7153afe3156b444b9a8
[ "BSD-3-Clause" ]
1
2019-06-28T18:47:32.000Z
2019-06-28T18:47:32.000Z
"""Module containing the :class:`Pulse` class and functions for initializing pulse shapes.""" import logging import re from collections.abc import MutableMapping import matplotlib.pyplot as plt import numpy as np import scipy.fftpack from matplotlib.gridspec import GridSpec from numpy.fft import fft, fftfreq from scip...
37.10111
79
0.548057
"""Module containing the :class:`Pulse` class and functions for initializing pulse shapes.""" import logging import re from collections.abc import MutableMapping import matplotlib.pyplot as plt import numpy as np import scipy.fftpack from matplotlib.gridspec import GridSpec from numpy.fft import fft, fftfreq from scip...
2,940
0
301
580fe2ae21bafab826eedcd80fc69eafda308613
1,950
py
Python
towhee/dag/utils/callstack.py
jeffoverflow/towhee
c576d22a4cdfc3909a3323b0d1decab87e83d26c
[ "Apache-2.0" ]
1
2021-08-31T12:32:26.000Z
2021-08-31T12:32:26.000Z
towhee/dag/utils/callstack.py
jeffoverflow/towhee
c576d22a4cdfc3909a3323b0d1decab87e83d26c
[ "Apache-2.0" ]
null
null
null
towhee/dag/utils/callstack.py
jeffoverflow/towhee
c576d22a4cdfc3909a3323b0d1decab87e83d26c
[ "Apache-2.0" ]
null
null
null
# Copyright 2021 Zilliz. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
29.545455
87
0.618974
# Copyright 2021 Zilliz. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
0
1,334
23
5ad644287dc5486c8f56f3950ef25fd87286b222
81
py
Python
juliaset/__init__.py
PageotD/juliaset
7c1f98020eeff291fcf040cfcdf25a89e72f46a9
[ "BSD-3-Clause" ]
null
null
null
juliaset/__init__.py
PageotD/juliaset
7c1f98020eeff291fcf040cfcdf25a89e72f46a9
[ "BSD-3-Clause" ]
null
null
null
juliaset/__init__.py
PageotD/juliaset
7c1f98020eeff291fcf040cfcdf25a89e72f46a9
[ "BSD-3-Clause" ]
1
2021-08-09T06:45:43.000Z
2021-08-09T06:45:43.000Z
from .juliaset import julia from .juliaset import JuliaSet __version__ = "0.3.0"
20.25
30
0.777778
from .juliaset import julia from .juliaset import JuliaSet __version__ = "0.3.0"
0
0
0
e8d570012d3d6f62ce2e2349d25b09b740429217
24,567
py
Python
src/oci/opsi/models/host_configuration_summary.py
ezequielramos/oci-python-sdk
cc4235cf217beaf9feed75760e9ce82610222762
[ "Apache-2.0", "BSD-3-Clause" ]
249
2017-09-11T22:06:05.000Z
2022-03-04T17:09:29.000Z
src/oci/opsi/models/host_configuration_summary.py
ezequielramos/oci-python-sdk
cc4235cf217beaf9feed75760e9ce82610222762
[ "Apache-2.0", "BSD-3-Clause" ]
228
2017-09-11T23:07:26.000Z
2022-03-23T10:58:50.000Z
src/oci/opsi/models/host_configuration_summary.py
ezequielramos/oci-python-sdk
cc4235cf217beaf9feed75760e9ce82610222762
[ "Apache-2.0", "BSD-3-Clause" ]
224
2017-09-27T07:32:43.000Z
2022-03-25T16:55:42.000Z
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
34.073509
245
0.666138
# coding: utf-8 # Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved. # This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c...
177
0
81
7bc96d131fe36d89c52069b4fce808a34c1e9e63
2,220
py
Python
tests/DealtHandTests.py
cjrgreen/Bridge
c87c5f3f853f0dfbea9b41e2f7847dd4ef4f5410
[ "MIT" ]
null
null
null
tests/DealtHandTests.py
cjrgreen/Bridge
c87c5f3f853f0dfbea9b41e2f7847dd4ef4f5410
[ "MIT" ]
null
null
null
tests/DealtHandTests.py
cjrgreen/Bridge
c87c5f3f853f0dfbea9b41e2f7847dd4ef4f5410
[ "MIT" ]
null
null
null
from context import Card import unittest from functools import reduce runner = unittest.TextTestRunner() suite = DealtHandsUnitTestSuite() runner.run(suite)
50.454545
153
0.588288
from context import Card import unittest from functools import reduce class DealtHandsUnitTests(unittest.TestCase): def setUp(self): self.deck = Card.ShuffledDeck() def allCardsInDeck(self): self.assert_(len(self.deck.cards) == 52, "not 52 cards in deck") def allCardsInHands(self)...
1,728
53
266
4bbb5e6467c534130112f7f6d603cc901dbf5787
3,661
py
Python
tests/test_models_functional.py
jic-dtool/dtool-gui-tk
05b73daad05ad20f2f18b692051b257384f61698
[ "MIT" ]
1
2020-08-28T00:30:23.000Z
2020-08-28T00:30:23.000Z
tests/test_models_functional.py
jic-dtool/dtool-gui
05b73daad05ad20f2f18b692051b257384f61698
[ "MIT" ]
27
2020-12-17T11:33:15.000Z
2021-02-24T14:37:34.000Z
tests/test_models_functional.py
jic-dtool/dtool-gui
05b73daad05ad20f2f18b692051b257384f61698
[ "MIT" ]
null
null
null
"Functional tests showing how models can be used to create/edit datasets." import os import dtoolcore.utils from . import tmp_dir_fixture # NOQA import pytest
34.214953
92
0.738596
"Functional tests showing how models can be used to create/edit datasets." import os import dtoolcore.utils from . import tmp_dir_fixture # NOQA import pytest def test_create_dataset(tmp_dir_fixture): # NOQA import dtool_gui_tk.models input_directory = os.path.join(tmp_dir_fixture, "input_directory") ...
3,473
0
23
4a57f1a0ebb098b2a3935364cf2712e889e042e0
3,912
py
Python
CLI_tool/cloudwatch.py
Juniper/vSRX-AWS
a9179d8b115229b1f26aec166a85261fd2352b14
[ "Apache-2.0" ]
18
2017-07-03T22:45:19.000Z
2021-04-04T16:51:28.000Z
CLI_tool/cloudwatch.py
Juniper/vSRX-AWS
a9179d8b115229b1f26aec166a85261fd2352b14
[ "Apache-2.0" ]
13
2017-10-25T18:22:22.000Z
2021-09-15T00:09:54.000Z
CLI_tool/cloudwatch.py
Juniper/vSRX-AWS
a9179d8b115229b1f26aec166a85261fd2352b14
[ "Apache-2.0" ]
23
2017-07-20T03:29:25.000Z
2021-02-24T20:27:05.000Z
import sys import os import boto3 from botocore.exceptions import ClientError import click import json import datetime import time import re from util import * line_widget_x = 0 line_widget_y = 0
39.918367
90
0.695297
import sys import os import boto3 from botocore.exceptions import ClientError import click import json import datetime import time import re from util import * line_widget_x = 0 line_widget_y = 0 def get_line_widget(stacked, metrics, region): global line_widget_x global line_widget_y widget = {} widg...
3,640
0
73
a516b4bd6ffcc75cae9128c7509055239e67111c
643
py
Python
pyfiles/11_5808.py
StevenPZChan/pythonchallenge
84c0e7458189f6d74e2cfbd169d854dae11d07a9
[ "MIT" ]
null
null
null
pyfiles/11_5808.py
StevenPZChan/pythonchallenge
84c0e7458189f6d74e2cfbd169d854dae11d07a9
[ "MIT" ]
null
null
null
pyfiles/11_5808.py
StevenPZChan/pythonchallenge
84c0e7458189f6d74e2cfbd169d854dae11d07a9
[ "MIT" ]
null
null
null
from io import BytesIO import requests from PIL import Image header = {'Authorization': 'Basic aHVnZTpmaWxl', } response = requests.get('http://www.pythonchallenge.com/pc/return/cave.jpg', headers=header) img = Image.open(BytesIO(response.content)) width, height = img.size img_new = Image.new('RGB', (width // 2, hei...
29.227273
92
0.62986
from io import BytesIO import requests from PIL import Image header = {'Authorization': 'Basic aHVnZTpmaWxl', } response = requests.get('http://www.pythonchallenge.com/pc/return/cave.jpg', headers=header) img = Image.open(BytesIO(response.content)) width, height = img.size img_new = Image.new('RGB', (width // 2, hei...
0
0
0
ce348970688385f43caa2da6afef7a2e7ea9bf77
31,556
py
Python
AmapFunctions/AdministrativeDistrictEnquiry.py
Gaoyifei1011/AmapProgram
d45a27abf9f508d922f37abc34f00da6d0aab4a0
[ "MIT" ]
1
2021-05-19T02:48:49.000Z
2021-05-19T02:48:49.000Z
AmapFunctions/AdministrativeDistrictEnquiry.py
Gaoyifei1011/AmapProgram
d45a27abf9f508d922f37abc34f00da6d0aab4a0
[ "MIT" ]
1
2021-05-18T16:01:56.000Z
2021-05-20T02:14:52.000Z
AmapFunctions/AdministrativeDistrictEnquiry.py
Gaoyifei1011/AmapProgram
d45a27abf9f508d922f37abc34f00da6d0aab4a0
[ "MIT" ]
1
2021-06-04T06:39:57.000Z
2021-06-04T06:39:57.000Z
# -*- coding:utf-8 -*- # 导入的库 import inspect import json import time from typing import Any import requests from SelfExpection.CustomExpection import CustomExpection from SelfExpection.OfficialException import OfficialException from logrecord.WriteLog import WriteLog class AdministrativeDistrictEnquir...
49.93038
141
0.414881
# -*- coding:utf-8 -*- # 导入的库 import inspect import json import time from typing import Any import requests from SelfExpection.CustomExpection import CustomExpection from SelfExpection.OfficialException import OfficialException from logrecord.WriteLog import WriteLog class AdministrativeDistrictEnquir...
739
0
29
a6172a279a003d0b8205d4cd3bbc4af0f3ab9a0e
1,089
py
Python
sysdescrparser/cisco_ios.py
datadope-io/sysdescrparser
c57d595707fec902f7a5bbf2a52089f6448610c4
[ "MIT" ]
12
2015-05-12T09:07:04.000Z
2021-11-19T13:22:54.000Z
sysdescrparser/cisco_ios.py
datadope-io/sysdescrparser
c57d595707fec902f7a5bbf2a52089f6448610c4
[ "MIT" ]
3
2020-05-10T09:59:08.000Z
2021-02-22T17:48:26.000Z
sysdescrparser/cisco_ios.py
datadope-io/sysdescrparser
c57d595707fec902f7a5bbf2a52089f6448610c4
[ "MIT" ]
6
2018-03-04T21:51:15.000Z
2022-02-21T16:26:54.000Z
# -*- coding: utf-8 -*- """sysdescrparser.cisco_ios.""" import re from cisco import Cisco # pylint: disable=no-member class CiscoIOS(Cisco): """Class CiscoIOS. SNMP sysDescr for CiscoIOS. """ def __init__(self, raw): """Constructor.""" super(CiscoIOS, self).__init__(raw) ...
23.170213
70
0.520661
# -*- coding: utf-8 -*- """sysdescrparser.cisco_ios.""" import re from cisco import Cisco # pylint: disable=no-member class CiscoIOS(Cisco): """Class CiscoIOS. SNMP sysDescr for CiscoIOS. """ def __init__(self, raw): """Constructor.""" super(CiscoIOS, self).__init__(raw) ...
0
0
0
542263394693276337544bc6c2cf5359c6011319
1,736
py
Python
auto_generated_scripts/discrete_prob_dist_plot.py
patel-zeel/pyprobml-fork
4b1757c41223c36a8e7bcef729a220a23b7c5217
[ "MIT" ]
null
null
null
auto_generated_scripts/discrete_prob_dist_plot.py
patel-zeel/pyprobml-fork
4b1757c41223c36a8e7bcef729a220a23b7c5217
[ "MIT" ]
5
2022-03-23T12:03:49.000Z
2022-03-24T12:18:17.000Z
auto_generated_scripts/discrete_prob_dist_plot.py
patel-zeel/pyprobml-fork
4b1757c41223c36a8e7bcef729a220a23b7c5217
[ "MIT" ]
1
2022-03-23T06:02:01.000Z
2022-03-23T06:02:01.000Z
#!/usr/bin/env python # coding: utf-8 # # Discrete Probability Distribution Plot # In[1]: import os try: import jax except: get_ipython().run_line_magic('pip', 'install jax jaxlib') import jax import jax.numpy as jnp try: import matplotlib.pyplot as plt except: get_ipython().run_line_magic('pi...
19.505618
102
0.678571
#!/usr/bin/env python # coding: utf-8 # # Discrete Probability Distribution Plot # In[1]: import os try: import jax except: get_ipython().run_line_magic('pip', 'install jax jaxlib') import jax import jax.numpy as jnp try: import matplotlib.pyplot as plt except: get_ipython().run_line_magic('pi...
464
0
45
ca647cb6e242d99f50c820962c61ad7177ab3ebb
3,241
py
Python
bin/pwd_.py
kis87988/pybashish
c75587dc16a412e0cfaf9586da20252225ff5a08
[ "CNRI-Python" ]
null
null
null
bin/pwd_.py
kis87988/pybashish
c75587dc16a412e0cfaf9586da20252225ff5a08
[ "CNRI-Python" ]
null
null
null
bin/pwd_.py
kis87988/pybashish
c75587dc16a412e0cfaf9586da20252225ff5a08
[ "CNRI-Python" ]
null
null
null
#!/usr/bin/env python3 """ usage: pwd_.py [-h] [-P] [--brief] [--home] show the os.environ["PWD"], by default just its "os.path.abspath" optional arguments: -h, --help show this help message and exit -P, --physical show the "realpath"s, not "abspath"s, of sym links --brief show the briefest abspa...
26.785124
99
0.653502
#!/usr/bin/env python3 """ usage: pwd_.py [-h] [-P] [--brief] [--home] show the os.environ["PWD"], by default just its "os.path.abspath" optional arguments: -h, --help show this help message and exit -P, --physical show the "realpath"s, not "abspath"s, of sym links --brief show the briefest abspa...
1,042
0
45
6c0bf1ebef607bf5bf28dbf570a0813f5cc4cdcb
279
py
Python
snippets/popular_libraries/click-lib/intermediate-features/app_dirs.py
melvio/python3-examples
5340fe17e0a5001a81cf195e63f825b77dc16fca
[ "Apache-2.0" ]
null
null
null
snippets/popular_libraries/click-lib/intermediate-features/app_dirs.py
melvio/python3-examples
5340fe17e0a5001a81cf195e63f825b77dc16fca
[ "Apache-2.0" ]
null
null
null
snippets/popular_libraries/click-lib/intermediate-features/app_dirs.py
melvio/python3-examples
5340fe17e0a5001a81cf195e63f825b77dc16fca
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python3 import click app_name = "myappname" config_file_name = "myconf.ini" app_dir_name = click.get_app_dir(app_name) click.echo(app_dir_name) # ./app_dirs.py # /home/melv/.config/myappname # XDG_CONFIG_HOME=/home/melv/ ./app_dirs.py # /home/melv/myappname
16.411765
43
0.749104
#!/usr/bin/env python3 import click app_name = "myappname" config_file_name = "myconf.ini" app_dir_name = click.get_app_dir(app_name) click.echo(app_dir_name) # ./app_dirs.py # /home/melv/.config/myappname # XDG_CONFIG_HOME=/home/melv/ ./app_dirs.py # /home/melv/myappname
0
0
0
9b7929b6eca5ceecd90a6ca47f628f3cb1a32ca7
249
py
Python
agpy/test_doc.py
keflavich/agpy
fb3a42d9909b7cd1ba74247530bcc8742f5aaeb1
[ "MIT" ]
16
2015-05-08T11:14:26.000Z
2021-11-19T19:05:16.000Z
agpy/test_doc.py
keflavich/agpy
fb3a42d9909b7cd1ba74247530bcc8742f5aaeb1
[ "MIT" ]
3
2016-05-12T16:27:14.000Z
2020-12-27T01:14:24.000Z
agpy/test_doc.py
keflavich/agpy
fb3a42d9909b7cd1ba74247530bcc8742f5aaeb1
[ "MIT" ]
19
2015-03-30T22:34:14.000Z
2020-11-25T23:29:53.000Z
from pylab import * import pylab import agpy.test_doc print "beta.__module__:",beta.__module__ for k,v in pylab.__dict__.iteritems(): if hasattr(v,'__module__'): if v.__module__ is None: locals()[k].__module__ = 'pylab'
20.75
44
0.670683
from pylab import * import pylab import agpy.test_doc print "beta.__module__:",beta.__module__ for k,v in pylab.__dict__.iteritems(): if hasattr(v,'__module__'): if v.__module__ is None: locals()[k].__module__ = 'pylab'
0
0
0
84f0b9b86abb65e10f3d5faa2d8140d0f4d0412a
2,321
py
Python
fix_voc_label.py
Dai-z/label-converters
0da9bfa620c6ab222ed97b82c256401fcb5804cf
[ "MIT" ]
1
2020-11-16T17:11:43.000Z
2020-11-16T17:11:43.000Z
fix_voc_label.py
Dai-z/label-converters
0da9bfa620c6ab222ed97b82c256401fcb5804cf
[ "MIT" ]
null
null
null
fix_voc_label.py
Dai-z/label-converters
0da9bfa620c6ab222ed97b82c256401fcb5804cf
[ "MIT" ]
null
null
null
import xml.etree.ElementTree as ET import os from os import listdir, getcwd from os.path import join import argparse # classes = [ # "aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", # "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", # "pottedplant", "sheep", "sof...
26.678161
76
0.557087
import xml.etree.ElementTree as ET import os from os import listdir, getcwd from os.path import join import argparse # classes = [ # "aeroplane", "bicycle", "bird", "boat", "bottle", "bus", "car", "cat", # "chair", "cow", "diningtable", "dog", "horse", "motorbike", "person", # "pottedplant", "sheep", "sof...
1,386
0
69
4871c7891c9c79ec3d3449ce676340ebbba4c089
2,716
py
Python
WearChristmasHat/wear_hat_cv.py
TitusWongCN/WeChatSubscriptionArticles
7076ec764269a6d5df2075e860940ac39128a052
[ "MIT" ]
9
2020-02-26T14:06:55.000Z
2022-01-13T13:59:58.000Z
WearChristmasHat/wear_hat_cv.py
Tomcqueen/WeChatSubscriptionArticles
b2b45f3d0a204209b30944cf28945b794515c434
[ "MIT" ]
null
null
null
WearChristmasHat/wear_hat_cv.py
Tomcqueen/WeChatSubscriptionArticles
b2b45f3d0a204209b30944cf28945b794515c434
[ "MIT" ]
6
2020-02-26T14:09:19.000Z
2022-01-13T14:00:00.000Z
# -*- coding=utf-8 -*- import cv2 from PIL import Image import math image_path = './face1.png' human_img = Image.open(image_path) human_img = human_img.convert('RGBA') # 圣诞帽相关参数 hat_img = Image.open("./hat.png") hat_brim_length = 175.0 hat_height_buffer = 25.0 hat_img = hat_img.convert('RGBA') # load image: image =...
30.863636
83
0.732327
# -*- coding=utf-8 -*- import cv2 from PIL import Image import math def get_distance(point1, point2): return int(math.sqrt((point1[0] - point2[0])**2 + (point1[1] - point2[1])**2)) image_path = './face1.png' human_img = Image.open(image_path) human_img = human_img.convert('RGBA') # 圣诞帽相关参数 hat_img = Image.open(...
95
0
23
3cb54cc59f97c8f3f99e4a6438331cafd5f35199
5,464
py
Python
python/itypes/struct/data_struct.py
eddy-ilg/itypes
eaf1c4a86576c77caa34148c0fdc6b2e012119ff
[ "MIT" ]
null
null
null
python/itypes/struct/data_struct.py
eddy-ilg/itypes
eaf1c4a86576c77caa34148c0fdc6b2e012119ff
[ "MIT" ]
null
null
null
python/itypes/struct/data_struct.py
eddy-ilg/itypes
eaf1c4a86576c77caa34148c0fdc6b2e012119ff
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 from ..type import is_list, is_dict from .struct import Struct from .helper import _common_keys
33.115152
119
0.517387
#!/usr/bin/env python3 from ..type import is_list, is_dict from .struct import Struct from .helper import _common_keys class DataStruct(Struct): def __init__(self, *args, dims=None, **kwargs): super().__init__(*args, **kwargs) if dims is not None: self.dims = dims def clone_type(...
4,889
4
450
48a0794b51a6c5c4453618ae132fe4019225282a
2,114
py
Python
Python/getdata.py
SanjaykrishnaanH/Beacon_RD
c2c6084499520b2d7b545562e87f05ab1ad8a426
[ "Apache-2.0" ]
null
null
null
Python/getdata.py
SanjaykrishnaanH/Beacon_RD
c2c6084499520b2d7b545562e87f05ab1ad8a426
[ "Apache-2.0" ]
null
null
null
Python/getdata.py
SanjaykrishnaanH/Beacon_RD
c2c6084499520b2d7b545562e87f05ab1ad8a426
[ "Apache-2.0" ]
null
null
null
import firebase_admin import csv import time from firebase_admin import credentials from firebase_admin import firestore cred = credentials.Certificate('beacon-dddae-firebase-adminsdk-2qj4p-4ab2ce47dd.json') firebase_admin.initialize_app(cred) flag=0 # print(u'{} => {}'.format(doc.id, doc.to_dict())) while(flag==0...
36.448276
98
0.502838
import firebase_admin import csv import time from firebase_admin import credentials from firebase_admin import firestore cred = credentials.Certificate('beacon-dddae-firebase-adminsdk-2qj4p-4ab2ce47dd.json') firebase_admin.initialize_app(cred) flag=0 # print(u'{} => {}'.format(doc.id, doc.to_dict())) while(flag==0...
0
0
0
00cbc558f577adcc477d1fa77c2ebd1010c4b13d
34,744
py
Python
JJ_measurements/GV_Vbias.py
QNLSydney/JJ_measurements
cad43a2dc1231ed856ede39bedb726232c772b0f
[ "MIT" ]
null
null
null
JJ_measurements/GV_Vbias.py
QNLSydney/JJ_measurements
cad43a2dc1231ed856ede39bedb726232c772b0f
[ "MIT" ]
null
null
null
JJ_measurements/GV_Vbias.py
QNLSydney/JJ_measurements
cad43a2dc1231ed856ede39bedb726232c772b0f
[ "MIT" ]
null
null
null
# GV Vbias # Alexis Jouan 13/10/2019 # Reading AC current and AC voltage with two lockins import numpy as np import time from qcodes.dataset.measurements import Measurement from qcodes.dataset.plotting import plot_by_id from datetime import datetime import qcodes_measurements as qcm from qcodes_measurements.tools.mea...
34.129666
113
0.622093
# GV Vbias # Alexis Jouan 13/10/2019 # Reading AC current and AC voltage with two lockins import numpy as np import time from qcodes.dataset.measurements import Measurement from qcodes.dataset.plotting import plot_by_id from datetime import datetime import qcodes_measurements as qcm from qcodes_measurements.tools.mea...
34,221
0
161
8734cc92e74b00a6655cd99c87ba153df9215772
937
py
Python
app_backend/algorithms.py
Unicorn-Dev/ProGraph
4ec7a2c09b243562d5eb5f7cfeace0887fd162af
[ "MIT" ]
null
null
null
app_backend/algorithms.py
Unicorn-Dev/ProGraph
4ec7a2c09b243562d5eb5f7cfeace0887fd162af
[ "MIT" ]
null
null
null
app_backend/algorithms.py
Unicorn-Dev/ProGraph
4ec7a2c09b243562d5eb5f7cfeace0887fd162af
[ "MIT" ]
null
null
null
from .pillowgraph import PillowGraph from graph.models import Graph from app_backend import proxy_convert_functions as pc_funcs from queue import Queue
29.28125
65
0.699039
from .pillowgraph import PillowGraph from graph.models import Graph from app_backend import proxy_convert_functions as pc_funcs from queue import Queue def dfs(graph, vertex): assert isinstance(vertex, str) gr = PillowGraph(pc_funcs.StringToAdjListDict(graph.AdjList)) graph.AlgoSequense = '' colors = ...
737
0
46
2d25dff6c968fa1e168d218e9f8863856d19bfa5
277
py
Python
spiral.py
itspuneet/itspuneet
d44f78afcff275aa56f03bba738ac3e4f2c30843
[ "bzip2-1.0.6" ]
null
null
null
spiral.py
itspuneet/itspuneet
d44f78afcff275aa56f03bba738ac3e4f2c30843
[ "bzip2-1.0.6" ]
null
null
null
spiral.py
itspuneet/itspuneet
d44f78afcff275aa56f03bba738ac3e4f2c30843
[ "bzip2-1.0.6" ]
null
null
null
for i in range (1,6): for j in range(1,6): print("(",i,",",j,")",end='') print() a=[[1,2,3,4,5],[6,7,8,9,10],[11,12,13,14,15],[16,17,18,19,20],[21,22,23,24,25]] print(a) n=1 for i in range (1,6): for j in range(1,6): print()
19.785714
80
0.440433
for i in range (1,6): for j in range(1,6): print("(",i,",",j,")",end='') print() a=[[1,2,3,4,5],[6,7,8,9,10],[11,12,13,14,15],[16,17,18,19,20],[21,22,23,24,25]] print(a) n=1 for i in range (1,6): for j in range(1,6): print()
0
0
0
c2b9fe0498043d576c71d4299795d9efbbc5aaa3
2,278
py
Python
SublimeBot.py
gearbolt/SublimeBot-ShopifyScraper
e88336b24cfec03818332da39b6803ac3536e80b
[ "MIT" ]
10
2017-07-18T23:36:20.000Z
2021-06-05T14:20:58.000Z
SublimeBot.py
gearbolt/SublimeBot-ShopifyScraper
e88336b24cfec03818332da39b6803ac3536e80b
[ "MIT" ]
null
null
null
SublimeBot.py
gearbolt/SublimeBot-ShopifyScraper
e88336b24cfec03818332da39b6803ac3536e80b
[ "MIT" ]
1
2017-08-21T05:43:00.000Z
2017-08-21T05:43:00.000Z
# Import dependencies import time import json import tweepy import urllib2 import feedparser from fake_useragent import UserAgent from datetime import datetime, timedelta from credentials import * print("Loading Configuration Files...") with open('config.json') as json_data_file: data = json.load(json_data_file)...
34
132
0.694469
# Import dependencies import time import json import tweepy import urllib2 import feedparser from fake_useragent import UserAgent from datetime import datetime, timedelta from credentials import * print("Loading Configuration Files...") with open('config.json') as json_data_file: data = json.load(json_data_file)...
208
0
22
21e05f8fbfff2249da74d6dc3be82334e7a0ea49
3,574
py
Python
fastscape/processes/marine.py
rlange2/fastscape
607747570ff6a1406ae1631217503ec6e6bec95d
[ "BSD-3-Clause" ]
36
2019-11-01T12:24:15.000Z
2022-03-15T06:11:25.000Z
fastscape/processes/marine.py
rlange2/fastscape
607747570ff6a1406ae1631217503ec6e6bec95d
[ "BSD-3-Clause" ]
12
2019-10-03T16:28:47.000Z
2022-01-14T11:11:46.000Z
fastscape/processes/marine.py
rlange2/fastscape
607747570ff6a1406ae1631217503ec6e6bec95d
[ "BSD-3-Clause" ]
9
2020-03-31T07:40:25.000Z
2022-03-09T14:14:41.000Z
import fastscapelib_fortran as fs import xsimlab as xs from .channel import ChannelErosion from .context import FastscapelibContext from .grid import UniformRectilinearGrid2D from .main import SurfaceToErode @xs.process class Sea: """Sea level.""" # TODO: add diagnostics like shoreline extraction or # ...
30.547009
78
0.681309
import fastscapelib_fortran as fs import xsimlab as xs from .channel import ChannelErosion from .context import FastscapelibContext from .grid import UniformRectilinearGrid2D from .main import SurfaceToErode @xs.process class Sea: """Sea level.""" # TODO: add diagnostics like shoreline extraction or # ...
1,017
0
54
439820f94d41a3f831e906b693f5e2ab2143b422
1,119
py
Python
UpdateFunction/Ggnn.py
nadeemkajla/siamese_ged
134808dea802b57ad41c5cfb38984e7bb22ddfb8
[ "MIT" ]
8
2018-07-06T17:00:01.000Z
2021-09-06T15:15:42.000Z
UpdateFunction/Ggnn.py
nadeemkajla/siamese_ged
134808dea802b57ad41c5cfb38984e7bb22ddfb8
[ "MIT" ]
3
2019-03-06T15:19:05.000Z
2021-04-12T10:33:12.000Z
UpdateFunction/Ggnn.py
nadeemkajla/siamese_ged
134808dea802b57ad41c5cfb38984e7bb22ddfb8
[ "MIT" ]
10
2018-07-06T17:00:03.000Z
2021-12-02T02:51:22.000Z
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ggnn.py: Update function following the Gated Graph Neural Network (GGNN) framework. * Bibliography: Li et al. (2016), Gated Graph Neural Networks (GG-NN) Usage: """ from __future__ import print_function import torch.nn as nn # Own modules __author__ = "Pa...
22.38
87
0.643432
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ggnn.py: Update function following the Gated Graph Neural Network (GGNN) framework. * Bibliography: Li et al. (2016), Gated Graph Neural Networks (GG-NN) Usage: """ from __future__ import print_function import torch.nn as nn # Own modules __author__ = "Pa...
447
1
153
800a7eec9b2d6782788277f524db64aa275a938d
633
py
Python
hoomd/test-py/test_run_walltime.py
PetersResearchGroup/PCND
584768cc683a6df0152ead69b567d05b781aab2b
[ "BSD-3-Clause" ]
2
2020-03-30T14:38:50.000Z
2020-06-02T05:53:41.000Z
hoomd/test-py/test_run_walltime.py
PetersResearchGroup/PCND
584768cc683a6df0152ead69b567d05b781aab2b
[ "BSD-3-Clause" ]
null
null
null
hoomd/test-py/test_run_walltime.py
PetersResearchGroup/PCND
584768cc683a6df0152ead69b567d05b781aab2b
[ "BSD-3-Clause" ]
1
2020-05-20T07:00:08.000Z
2020-05-20T07:00:08.000Z
# -*- coding: iso-8859-1 -*- # Maintainer: joaander import hoomd hoomd.context.initialize() import unittest import os if __name__ == '__main__': unittest.main(argv = ['test.py', '-v'])
25.32
76
0.620853
# -*- coding: iso-8859-1 -*- # Maintainer: joaander import hoomd hoomd.context.initialize() import unittest import os class analyze_callback_tests(unittest.TestCase): def setUp(self): sysdef = hoomd.init.create_lattice(unitcell=hoomd.lattice.sq(a=2.0), n=[1,2]);...
311
27
104
a41f600ea41bd2f2907b4c63ee97d0a4b016604c
282
py
Python
supervisr/provider/debug/__init__.py
BeryJu/supervisr
2305b1e27abb0bfe9fcee93b79e012c62cba712e
[ "MIT" ]
1
2020-01-12T21:33:03.000Z
2020-01-12T21:33:03.000Z
supervisr/provider/debug/__init__.py
BeryJu/supervisr
2305b1e27abb0bfe9fcee93b79e012c62cba712e
[ "MIT" ]
null
null
null
supervisr/provider/debug/__init__.py
BeryJu/supervisr
2305b1e27abb0bfe9fcee93b79e012c62cba712e
[ "MIT" ]
null
null
null
"""Supervisr Mod mod/provider/onlinenet Header""" __ui_name__ = 'Supervisr mod/mod/provider/onlinenet' __author__ = 'Supervisr Team' __email__ = 'supervisr@beryju.org' __version__ = '0.3.14-alpha' default_app_config = 'supervisr.provider.debug.apps.SupervisrModProviderDebugConfig'
40.285714
84
0.801418
"""Supervisr Mod mod/provider/onlinenet Header""" __ui_name__ = 'Supervisr mod/mod/provider/onlinenet' __author__ = 'Supervisr Team' __email__ = 'supervisr@beryju.org' __version__ = '0.3.14-alpha' default_app_config = 'supervisr.provider.debug.apps.SupervisrModProviderDebugConfig'
0
0
0
b67a3211141343017694589fa6422b8ca9cea73c
887
py
Python
infrastructure/framework/falcon/app.py
pachecobruno/python-ddd
81812848a567d4605df346ef3630718d320706cc
[ "MIT" ]
null
null
null
infrastructure/framework/falcon/app.py
pachecobruno/python-ddd
81812848a567d4605df346ef3630718d320706cc
[ "MIT" ]
null
null
null
infrastructure/framework/falcon/app.py
pachecobruno/python-ddd
81812848a567d4605df346ef3630718d320706cc
[ "MIT" ]
null
null
null
import falcon import yaml from composition_root import FalconContainer from infrastructure.framework.falcon.controllers import InfoController app = falcon.API() app.set_error_serializer(error_serializer) app.add_route('/', FalconContainer.info_controller_factory()) app.add_route('/items', FalconContainer.items_contr...
35.48
70
0.674183
import falcon import yaml from composition_root import FalconContainer from infrastructure.framework.falcon.controllers import InfoController def error_serializer(req, resp, exception): representation = None preferred = req.client_prefers(('application/x-yaml', 'application...
528
0
23
4485ab8fcc90cd7f77aa5f622c046a6da5ada355
2,147
py
Python
essaysense/__init__.py
zlliang/essaysense
c9bf72b2f143417e6d5be91fd000ee70e48c3923
[ "MIT" ]
24
2018-05-24T06:56:25.000Z
2022-03-05T13:09:51.000Z
essaysense/__init__.py
deltaquincy/essaysense
c9bf72b2f143417e6d5be91fd000ee70e48c3923
[ "MIT" ]
3
2019-12-22T04:26:44.000Z
2019-12-22T04:27:03.000Z
essaysense/__init__.py
deltaquincy/essaysense
c9bf72b2f143417e6d5be91fd000ee70e48c3923
[ "MIT" ]
12
2018-05-24T06:57:34.000Z
2020-05-01T11:40:32.000Z
"""An NLP project on Automated Essay Scoring. Project EssaySense ================== EssaySense is an NLP project on Automated Essay Scoring, based on neural network technologies. Several neural network models are included to modelling the scoring task, imple- mented using TensorFlow (see https://tensorflow.org). Pre-...
28.626667
80
0.706567
"""An NLP project on Automated Essay Scoring. Project EssaySense ================== EssaySense is an NLP project on Automated Essay Scoring, based on neural network technologies. Several neural network models are included to modelling the scoring task, imple- mented using TensorFlow (see https://tensorflow.org). Pre-...
0
0
0
be11e51b64c711f834138060343f0be3b5398a65
16,066
py
Python
telethon/tl/custom/conversation.py
megansquire/Telethon
e5f1b2afa3482fe77aaee514bc3ec1574ada9262
[ "MIT" ]
2
2021-04-29T14:19:25.000Z
2021-09-17T07:13:49.000Z
telethon/tl/custom/conversation.py
josh8tg/Arabic-Telethon
10467cff74e15aa7d664e976972e1f1c4af5ae57
[ "MIT" ]
null
null
null
telethon/tl/custom/conversation.py
josh8tg/Arabic-Telethon
10467cff74e15aa7d664e976972e1f1c4af5ae57
[ "MIT" ]
1
2020-04-16T22:02:26.000Z
2020-04-16T22:02:26.000Z
import asyncio import itertools import time from .chatgetter import ChatGetter from ... import helpers, utils, errors from ...events.common import EventCommon # Sometimes the edits arrive very fast (within the same second). # In that case we add a small delta so that the age is older, for # comparision purposes. This...
35.30989
87
0.608614
import asyncio import itertools import time from .chatgetter import ChatGetter from ... import helpers, utils, errors from ...events.common import EventCommon # Sometimes the edits arrive very fast (within the same second). # In that case we add a small delta so that the age is older, for # comparision purposes. This...
6,426
35
324
f1a6af247fbbfca805569215362ba5bc2e531f8a
1,142
py
Python
tests/test_dat.py
astrogewgaw/priwo
cc3ef488b6e9a36fb5d633d6c2c6135274b2c7b7
[ "MIT" ]
7
2021-04-24T12:16:11.000Z
2021-12-31T14:46:35.000Z
tests/test_dat.py
astrogewgaw/priwo
cc3ef488b6e9a36fb5d633d6c2c6135274b2c7b7
[ "MIT" ]
null
null
null
tests/test_dat.py
astrogewgaw/priwo
cc3ef488b6e9a36fb5d633d6c2c6135274b2c7b7
[ "MIT" ]
null
null
null
import numpy as np from pathlib import Path from deepdiff import DeepDiff from priwo import read_dat, write_dat from tempfile import NamedTemporaryFile fnames = [ "test_fake_presto_radio.dat", "test_fake_presto_radio_breaks.dat", "test_fake_presto_xray.dat", ] fdata = np.asarray( [ 0.0, ...
18.126984
56
0.525394
import numpy as np from pathlib import Path from deepdiff import DeepDiff from priwo import read_dat, write_dat from tempfile import NamedTemporaryFile fnames = [ "test_fake_presto_radio.dat", "test_fake_presto_radio_breaks.dat", "test_fake_presto_xray.dat", ] fdata = np.asarray( [ 0.0, ...
0
0
0
8e29b3597a7d87d4a47252a7d1068099575a2c48
144
py
Python
src/avame/errors.py
nickchen-mitac/fork
64dab56012da47465b4923f30f26925476c87afc
[ "Apache-2.0" ]
null
null
null
src/avame/errors.py
nickchen-mitac/fork
64dab56012da47465b4923f30f26925476c87afc
[ "Apache-2.0" ]
null
null
null
src/avame/errors.py
nickchen-mitac/fork
64dab56012da47465b4923f30f26925476c87afc
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals
20.571429
82
0.75
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals class Timeout(Exception): pass
0
13
23
6b6c4918437ff01fd308871c7f88d92fe127782e
7,590
py
Python
offrl/base.py
dlqudwns/RepB-SDE
d799c3bbfc9aeca9251dfa84255d1c1b90af42ce
[ "MIT" ]
null
null
null
offrl/base.py
dlqudwns/RepB-SDE
d799c3bbfc9aeca9251dfa84255d1c1b90af42ce
[ "MIT" ]
null
null
null
offrl/base.py
dlqudwns/RepB-SDE
d799c3bbfc9aeca9251dfa84255d1c1b90af42ce
[ "MIT" ]
null
null
null
import numpy as np import tensorflow as tf import tensorflow_probability as tfp SCALE_DIAG_MIN_MAX = (-20, 2) EPS = 1e-6 def apply_squashing_func(sample, logp): """ Squash the ouput of the gaussian distribution and account for that in the log probability. :param sample: (tf.Tensor) Action sampled from Ga...
40.15873
100
0.645059
import numpy as np import tensorflow as tf import tensorflow_probability as tfp SCALE_DIAG_MIN_MAX = (-20, 2) EPS = 1e-6 def apply_squashing_func(sample, logp): """ Squash the ouput of the gaussian distribution and account for that in the log probability. :param sample: (tf.Tensor) Action sampled from Ga...
5,796
542
573
9bc0c380b53f320d7ac6cd4ede7d18d860040a4b
3,826
py
Python
dominio/mixins.py
MinisterioPublicoRJ/api-cadg
a8998c4c234a65192f1dca8ea9a17a1d4a496556
[ "MIT" ]
6
2020-02-11T18:45:58.000Z
2020-05-26T12:37:28.000Z
dominio/mixins.py
MinisterioPublicoRJ/api-cadg
a8998c4c234a65192f1dca8ea9a17a1d4a496556
[ "MIT" ]
120
2019-07-01T14:45:32.000Z
2022-01-25T19:10:16.000Z
dominio/mixins.py
MinisterioPublicoRJ/apimpmapas
196ad25a4922448b8ae7a66012a2843c7b7194ad
[ "MIT" ]
null
null
null
import math import unicodedata from decouple import config from django.conf import settings from django.core.paginator import EmptyPage, Paginator from django.http import HttpResponseForbidden from django.views.decorators.cache import cache_page from jwt import InvalidSignatureError, DecodeError from login.jwtlogin im...
29.658915
79
0.602196
import math import unicodedata from decouple import config from django.conf import settings from django.core.paginator import EmptyPage, Paginator from django.http import HttpResponseForbidden from django.views.decorators.cache import cache_page from jwt import InvalidSignatureError, DecodeError from login.jwtlogin im...
3,008
389
92
088dfd54f1787f73dd612012fa9319fa21c0177a
4,746
py
Python
unittests/test_history.py
fraca7/pyqtcmd
7648ab030cbcb308b451f8b34b022b523a08229f
[ "MIT" ]
null
null
null
unittests/test_history.py
fraca7/pyqtcmd
7648ab030cbcb308b451f8b34b022b523a08229f
[ "MIT" ]
null
null
null
unittests/test_history.py
fraca7/pyqtcmd
7648ab030cbcb308b451f8b34b022b523a08229f
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import unittest from pyqtcmd import History, Command, ConsistencyError if __name__ == '__main__': unittest.main()
25.793478
54
0.665402
#!/usr/bin/env python3 import unittest from pyqtcmd import History, Command, ConsistencyError class DummyCommand(Command): def __init__(self): self.done = False def do(self): self.done = True def undo(self): self.done = False class HistoryBaseTestCase(unittest.TestCase): ...
3,080
203
1,310
54fc1cb85e499884e6925b7ab89f59efd44ce1c8
519
py
Python
semana_01/aulas/05-formata_strings.py
alexaldr/AceleraDev-Python
f655b31f5d672f617c43282dc91a19f761845f84
[ "MIT" ]
5
2020-05-19T17:12:02.000Z
2020-05-31T16:19:04.000Z
semana-1/arquivos-aulas/05-formata_strings.py
lucashenrs/acelerapython-codenation
6335d994aef6d878a89d5504c68e7eceea8984cb
[ "MIT" ]
23
2021-03-19T04:59:51.000Z
2022-02-10T15:15:12.000Z
semana_01/aulas/05-formata_strings.py
alexaldr/AceleraDev-Python
f655b31f5d672f617c43282dc91a19f761845f84
[ "MIT" ]
1
2020-07-29T17:56:12.000Z
2020-07-29T17:56:12.000Z
idade = 29 print('Minha idade é: ' + str(idade)) print('Minha idade é: {}'.format(idade)) print(f'Minha idade é: {idade}') nome = 'Élysson MR cdoiksabncdsaicbsdaoin dsaucubsdaocpiknbsdaoiyvcsdaopikbncsdaiyvbcds' print(f'Meu nome é {nome:.15} e eu tenho {idade:03} anos') dinheiro = 2.598 print(f'Eu tenho {dinheir...
22.565217
88
0.685934
idade = 29 print('Minha idade é: ' + str(idade)) print('Minha idade é: {}'.format(idade)) print(f'Minha idade é: {idade}') nome = 'Élysson MR cdoiksabncdsaicbsdaoin dsaucubsdaocpiknbsdaoiyvcsdaopikbncsdaiyvbcds' print(f'Meu nome é {nome:.15} e eu tenho {idade:03} anos') dinheiro = 2.598 print(f'Eu tenho {dinheir...
0
0
0
7d1cee70fe047374d76b7ebbe6bcabae1994465c
1,692
py
Python
qcs_api_client/models/edge.py
rigetti/qcs-api-client-python
569cb9fa972dec1a706757374acb3df3ce649ec4
[ "Apache-2.0" ]
2
2021-12-15T23:24:40.000Z
2022-01-03T01:14:17.000Z
qcs_api_client/models/edge.py
rigetti/qcs-api-client-python
569cb9fa972dec1a706757374acb3df3ce649ec4
[ "Apache-2.0" ]
3
2022-01-10T21:55:13.000Z
2022-02-22T19:41:01.000Z
qcs_api_client/models/edge.py
rigetti/qcs-api-client-python
569cb9fa972dec1a706757374acb3df3ce649ec4
[ "Apache-2.0" ]
3
2021-12-15T23:24:42.000Z
2022-01-09T11:16:17.000Z
from typing import Any, Callable, Dict, List, Optional, Type, TypeVar, cast import attr from ..types import UNSET from ..util.serialization import is_not_none T = TypeVar("T", bound="Edge") @attr.s(auto_attribs=True) class Edge: """A degree-two logical connection in the quantum processor's architecture. T...
30.763636
118
0.631797
from typing import Any, Callable, Dict, List, Optional, Type, TypeVar, cast import attr from ..types import UNSET from ..util.serialization import is_not_none T = TypeVar("T", bound="Edge") @attr.s(auto_attribs=True) class Edge: """A degree-two logical connection in the quantum processor's architecture. T...
691
0
53
fde4fd856e1de3d079eb519cfbb73d0ba8fb622e
838
py
Python
problems/problem_0268.py
delirious-lettuce/LeetCode
4fbf2627f86cbaf1054c3df59bb9ffe72096d405
[ "MIT" ]
3
2018-02-14T23:50:07.000Z
2022-01-20T11:34:42.000Z
problems/problem_0268.py
delirious-lettuce/LeetCode
4fbf2627f86cbaf1054c3df59bb9ffe72096d405
[ "MIT" ]
null
null
null
problems/problem_0268.py
delirious-lettuce/LeetCode
4fbf2627f86cbaf1054c3df59bb9ffe72096d405
[ "MIT" ]
null
null
null
class Solution: """ https://leetcode.com/problems/missing-number/ Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. Example 1 Input: [3,0,1] Output: 2 Example 2 Input: [9,6,4,2,3,5,7,0,1] Output: 8...
21.487179
69
0.538186
class Solution: """ https://leetcode.com/problems/missing-number/ Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. Example 1 Input: [3,0,1] Output: 2 Example 2 Input: [9,6,4,2,3,5,7,0,1] Output: 8...
0
0
0
542cdd5714446a55eb248c70b1478b75afd1c092
8,312
py
Python
ParsersClasses/SortParser.py
UFRGS-CAROL/radiation-benchmarks-parsers
a39844ed3ed511f4f2672bc2e0c7e6f920dc7f2b
[ "Apache-2.0" ]
null
null
null
ParsersClasses/SortParser.py
UFRGS-CAROL/radiation-benchmarks-parsers
a39844ed3ed511f4f2672bc2e0c7e6f920dc7f2b
[ "Apache-2.0" ]
null
null
null
ParsersClasses/SortParser.py
UFRGS-CAROL/radiation-benchmarks-parsers
a39844ed3ed511f4f2672bc2e0c7e6f920dc7f2b
[ "Apache-2.0" ]
null
null
null
import re from Parser import Parser import csv
37.273543
149
0.520693
import re from Parser import Parser import csv class SortParser(Parser): _extendHeader = False # must set this values in the _relativeErrorParser _errOutOfOrder = None _errCorrupted = None _errLink = None _errSync = None _errDetected = None _itOOO = None _itCorrupted = None _i...
6,548
1,693
23
eaba22f48d9843e48f5005a0b916bbec79ddb699
25
py
Python
packages/raspi_ip/raspi_ip/__init__.py
atoy322/PiDrive
8758f4b5dae4a0187ce0a769c4146628c88015de
[ "MIT" ]
null
null
null
packages/raspi_ip/raspi_ip/__init__.py
atoy322/PiDrive
8758f4b5dae4a0187ce0a769c4146628c88015de
[ "MIT" ]
2
2021-09-21T06:32:58.000Z
2021-09-22T23:15:18.000Z
packages/raspi_ip/raspi_ip/__init__.py
atoy322/PiDrive
8758f4b5dae4a0187ce0a769c4146628c88015de
[ "MIT" ]
null
null
null
from .raspi_ip import IP
12.5
24
0.8
from .raspi_ip import IP
0
0
0
ac4d125ce541406a626cb354c5f68c7526fe5daf
1,371
py
Python
rising/transforms/functional/channel.py
NKPmedia/rising
2a580e9c74c8fb690e27e8bacf09ab97184ab1ee
[ "MIT" ]
1
2020-11-10T11:03:33.000Z
2020-11-10T11:03:33.000Z
rising/transforms/functional/channel.py
NKPmedia/rising
2a580e9c74c8fb690e27e8bacf09ab97184ab1ee
[ "MIT" ]
null
null
null
rising/transforms/functional/channel.py
NKPmedia/rising
2a580e9c74c8fb690e27e8bacf09ab97184ab1ee
[ "MIT" ]
null
null
null
from typing import Optional import torch from rising.ops import torch_one_hot __all__ = ["one_hot_batch"] def one_hot_batch(target: torch.Tensor, num_classes: Optional[int] = None, dtype: Optional[torch.dtype] = None) -> torch.Tensor: """ Compute one hot for input tensor ...
34.275
82
0.624362
from typing import Optional import torch from rising.ops import torch_one_hot __all__ = ["one_hot_batch"] def one_hot_batch(target: torch.Tensor, num_classes: Optional[int] = None, dtype: Optional[torch.dtype] = None) -> torch.Tensor: """ Compute one hot for input tensor ...
0
0
0
36f0c59e08e6d5af57d119b9412a2304554292ca
307
py
Python
music/distance/aural/simple.py
jedhsu/music
dea68c4a82296cd4910e786f533b2cbf861377c3
[ "MIT" ]
null
null
null
music/distance/aural/simple.py
jedhsu/music
dea68c4a82296cd4910e786f533b2cbf861377c3
[ "MIT" ]
null
null
null
music/distance/aural/simple.py
jedhsu/music
dea68c4a82296cd4910e786f533b2cbf861377c3
[ "MIT" ]
null
null
null
""" *Simple Aural Interval* An interval that is less than equal to an octave. Simple / compound intervals partition by ordering. """ from abc import ABCMeta from ._interval import AuralInterval __all__ = ["SimpleInterval"]
13.954545
52
0.716612
""" *Simple Aural Interval* An interval that is less than equal to an octave. Simple / compound intervals partition by ordering. """ from abc import ABCMeta from ._interval import AuralInterval __all__ = ["SimpleInterval"] class SimpleInterval( Interval, ): __metaclass__ = ABCMeta
0
45
23
7977ac24bcafeb338b85e0748caeb55e887c5ea1
1,522
py
Python
test/test_add_contact.py
ivangrebeniuk/python_training
bcf459539556d7d7152f7891e0d65bb744b4b475
[ "Apache-2.0" ]
null
null
null
test/test_add_contact.py
ivangrebeniuk/python_training
bcf459539556d7d7152f7891e0d65bb744b4b475
[ "Apache-2.0" ]
null
null
null
test/test_add_contact.py
ivangrebeniuk/python_training
bcf459539556d7d7152f7891e0d65bb744b4b475
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- from model.contact import Contact import pytest import random import string testdata = [Contact(first_name=random_string("first name", 10), middle_name=random_string("Middle name", 10), last_name=random_string("Last name", 10), nickname=random_string("Nickname", 10), title=random_string("Titl...
58.538462
338
0.676084
# -*- coding: utf-8 -*- from model.contact import Contact import pytest import random import string def random_string(prefix, maxlen): symbols = string.ascii_letters + string.digits + string.punctuation + " " * 5 return prefix + "".join([random.choice(symbols) for i in range(random.randrange(maxlen))]) test...
402
0
45
28d567f2f90d422a7180e2b2898eb93681b8f4f1
1,049
py
Python
No choice line edit.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
117
2015-12-18T07:18:27.000Z
2022-03-28T00:25:54.000Z
No choice line edit.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
8
2018-10-03T09:38:46.000Z
2021-12-13T19:51:09.000Z
No choice line edit.py
DazEB2/SimplePyScripts
1dde0a42ba93fe89609855d6db8af1c63b1ab7cc
[ "CC-BY-4.0" ]
28
2016-08-02T17:43:47.000Z
2022-03-21T08:31:12.000Z
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' """ Скрипт показывает пример ограничение ввода только тем текстом, что был указан. """ from PyQt5.QtWidgets import * if __name__ == '__main__': app = QApplication([]) w = Widget() w.show() app.exec()
21.854167
82
0.673975
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'ipetrash' """ Скрипт показывает пример ограничение ввода только тем текстом, что был указан. """ from PyQt5.QtWidgets import * class Widget(QWidget): def __init__(self): super().__init__() self.setWindowTitle('No choice') ...
688
1
76
edf44f21f459c6ec4d199865de2cbb5e5d8dd291
2,091
py
Python
run_neutronics.py
RemDelaporteMathurin/T_transport_LIBRA
5002c3f670f85053751026cfa8079188cd4eb7ab
[ "MIT" ]
null
null
null
run_neutronics.py
RemDelaporteMathurin/T_transport_LIBRA
5002c3f670f85053751026cfa8079188cd4eb7ab
[ "MIT" ]
null
null
null
run_neutronics.py
RemDelaporteMathurin/T_transport_LIBRA
5002c3f670f85053751026cfa8079188cd4eb7ab
[ "MIT" ]
null
null
null
import openmc import openmc_dagmc_wrapper as odw import openmc_plasma_source as ops import neutronics_material_maker as nmm import math import numpy as np my_h5m_filename = "dagmc_not_merged.h5m" # materials material_tag_to_material_dict = { "lead": "Lead", "flibe": nmm.Material.from_library(name=...
31.208955
145
0.74462
import openmc import openmc_dagmc_wrapper as odw import openmc_plasma_source as ops import neutronics_material_maker as nmm import math import numpy as np my_h5m_filename = "dagmc_not_merged.h5m" # materials material_tag_to_material_dict = { "lead": "Lead", "flibe": nmm.Material.from_library(name=...
0
0
0
68a91ef9f02cff56942c124b854af3a22afde949
6,092
py
Python
empty_my_fridge/empty_my_fridge/model/recipes.py
edwarddubi/empty_my_fridge_django
213c8be8de525df1c952f200fd0be5a3e37fdfe5
[ "MIT" ]
null
null
null
empty_my_fridge/empty_my_fridge/model/recipes.py
edwarddubi/empty_my_fridge_django
213c8be8de525df1c952f200fd0be5a3e37fdfe5
[ "MIT" ]
1
2020-07-31T06:09:12.000Z
2020-07-31T06:09:12.000Z
empty_my_fridge/empty_my_fridge/model/recipes.py
edwarddubi/empty_my_fridge_django
213c8be8de525df1c952f200fd0be5a3e37fdfe5
[ "MIT" ]
null
null
null
# get all recipes # get individual recipe as Json
29.429952
99
0.574852
class Recipes: def __init__(self): self.recipe_list = None self.pos = 0 self.liked = False self.searched = False self.recipe_name_to_find = None self.recipes_current_page = "1" self.db = None self.m_user = None self.food_network = None ...
5,006
-7
1,020
66c9af06eca2765f9b6c080889efdb3d978ecc05
752
py
Python
axes/management/commands/axes_reset_logs.py
adamchainz/django-axes
bb33a0c5da91bd1424360ff0d391fbff7087f323
[ "MIT" ]
null
null
null
axes/management/commands/axes_reset_logs.py
adamchainz/django-axes
bb33a0c5da91bd1424360ff0d391fbff7087f323
[ "MIT" ]
null
null
null
axes/management/commands/axes_reset_logs.py
adamchainz/django-axes
bb33a0c5da91bd1424360ff0d391fbff7087f323
[ "MIT" ]
null
null
null
from django.core.management.base import BaseCommand from django.utils import timezone from axes.models import AccessLog
28.923077
79
0.62234
from django.core.management.base import BaseCommand from django.utils import timezone from axes.models import AccessLog class Command(BaseCommand): help = 'Reset access log records older than given days.' def add_arguments(self, parser): parser.add_argument( '--age', type=int...
486
121
23
2afd5a24146c0c51425b992586dbcad2ddda8c4d
1,538
py
Python
predict_pennfudan_with_loss.py
lilinxi/210429_YoloV3_Experiment
60b2c8f348f7e101353ae0440f6c948f6bd03c04
[ "MIT" ]
null
null
null
predict_pennfudan_with_loss.py
lilinxi/210429_YoloV3_Experiment
60b2c8f348f7e101353ae0440f6c948f6bd03c04
[ "MIT" ]
null
null
null
predict_pennfudan_with_loss.py
lilinxi/210429_YoloV3_Experiment
60b2c8f348f7e101353ae0440f6c948f6bd03c04
[ "MIT" ]
null
null
null
import conf.config import dataset.pennfudan_dataset import model.yolov3 """ (1)demo weights: 67.91% = person AP || score_threhold=0.5 : F1=0.80 ; Recall=99.09% ; Precision=66.87% mAP = 67.91% --------------------------------------- tensor(2.9181) tensor(2.8104) tensor(0.1682) tensor(0.1877) tensor(20.8298) tensor(...
26.067797
97
0.556567
import conf.config import dataset.pennfudan_dataset import model.yolov3 """ (1)demo weights: 67.91% = person AP || score_threhold=0.5 : F1=0.80 ; Recall=99.09% ; Precision=66.87% mAP = 67.91% --------------------------------------- tensor(2.9181) tensor(2.8104) tensor(0.1682) tensor(0.1877) tensor(20.8298) tensor(...
0
0
0
42eaf6217f866f78656c77414228daa7e8a7c960
11,297
py
Python
ephypype/nodes/import_data.py
EtienneCmb/ephypype
fdc13efb79545f072585d1e180d03702efd9e326
[ "BSD-3-Clause" ]
null
null
null
ephypype/nodes/import_data.py
EtienneCmb/ephypype
fdc13efb79545f072585d1e180d03702efd9e326
[ "BSD-3-Clause" ]
1
2018-09-03T20:08:46.000Z
2018-09-03T21:00:55.000Z
ephypype/nodes/import_data.py
EtienneCmb/ephypype
fdc13efb79545f072585d1e180d03702efd9e326
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """All nodes for import that are NOT specific to a ephy package.""" import os from nipype.interfaces.base import BaseInterface,\ BaseInterfaceInputSpec, traits, TraitedSpec, isdefined from nipype.interfaces.base import File # ----------------- ImportMat ----------------------------- # cl...
28.966667
79
0.619368
# -*- coding: utf-8 -*- """All nodes for import that are NOT specific to a ephy package.""" import os from nipype.interfaces.base import BaseInterface,\ BaseInterfaceInputSpec, traits, TraitedSpec, isdefined from nipype.interfaces.base import File # ----------------- ImportMat ----------------------------- # cl...
3,586
0
270
7ffd18602922ec689066ec7889bc59c75a5ca252
3,799
py
Python
experiments/torch_topics_deepfool.py
nibydlo/modAL
c0fe0200001c8c34e3fabb099fb70cf1e4bfb680
[ "MIT" ]
2
2020-01-22T14:34:01.000Z
2020-01-22T14:51:18.000Z
experiments/torch_topics_deepfool.py
nibydlo/modAL
c0fe0200001c8c34e3fabb099fb70cf1e4bfb680
[ "MIT" ]
null
null
null
experiments/torch_topics_deepfool.py
nibydlo/modAL
c0fe0200001c8c34e3fabb099fb70cf1e4bfb680
[ "MIT" ]
null
null
null
from copy import deepcopy from functools import partial, update_wrapper import torch import numpy as np import torch.optim as optim from sklearn.preprocessing import StandardScaler from sklearn.model_selection import train_test_split from experiments.models.topics_torch_models import NormModel, NormModelTrident from...
29.679688
123
0.726244
from copy import deepcopy from functools import partial, update_wrapper import torch import numpy as np import torch.optim as optim from sklearn.preprocessing import StandardScaler from sklearn.model_selection import train_test_split from experiments.models.topics_torch_models import NormModel, NormModelTrident from...
0
0
0
43befbf17ea0a9cbbc089006fafe91f4a9b1e2b7
8,873
py
Python
json_logging/json_logging/__init__.py
harrystech/arthur-tools
b4d1772d3d7bba423efa74b7e5d697c40a095cd2
[ "MIT" ]
2
2020-01-23T18:05:15.000Z
2020-05-26T14:53:08.000Z
json_logging/json_logging/__init__.py
harrystech/arthur-tools
b4d1772d3d7bba423efa74b7e5d697c40a095cd2
[ "MIT" ]
194
2020-01-13T22:26:34.000Z
2022-03-29T12:02:58.000Z
json_logging/json_logging/__init__.py
harrystech/arthur-tools
b4d1772d3d7bba423efa74b7e5d697c40a095cd2
[ "MIT" ]
null
null
null
""" Enable logging (from Lambda functions) in JSON format which makes post-processing much easier. Since we assume this will be used by Lambda functions, we also add the request id in log lines. """ import json import logging import logging.config import sys import traceback from contextlib import ContextDecorator fr...
35.778226
100
0.618618
""" Enable logging (from Lambda functions) in JSON format which makes post-processing much easier. Since we assume this will be used by Lambda functions, we also add the request id in log lines. """ import json import logging import logging.config import sys import traceback from contextlib import ContextDecorator fr...
1,282
0
205
5fa7626bffa829023dff17d79a49ca9e81fba492
2,149
py
Python
hacker_earth/python_problems/string_addition.py
Faraaz54/python_training_problems
24c7b42daaf54366759e1d7c4b42f9936316e94b
[ "MIT" ]
null
null
null
hacker_earth/python_problems/string_addition.py
Faraaz54/python_training_problems
24c7b42daaf54366759e1d7c4b42f9936316e94b
[ "MIT" ]
null
null
null
hacker_earth/python_problems/string_addition.py
Faraaz54/python_training_problems
24c7b42daaf54366759e1d7c4b42f9936316e94b
[ "MIT" ]
null
null
null
sol = [] for _ in xrange(0, int(raw_input())): s = raw_input() #w = [i for i in s] #print w #t = [s[len(s) - 1 - count] for count in xrange(len(s))] #print t T = [] st = 0 for i in xrange(0, len(s)): v = (ord(s[i]) + ord(s[len(s) - 1 - i])) - 96 if v ...
25.891566
61
0.33504
sol = [] for _ in xrange(0, int(raw_input())): s = raw_input() #w = [i for i in s] #print w #t = [s[len(s) - 1 - count] for count in xrange(len(s))] #print t T = [] st = 0 for i in xrange(0, len(s)): v = (ord(s[i]) + ord(s[len(s) - 1 - i])) - 96 if v ...
0
0
0
839d371d56939d9dda6a230c854a47fd94faa3e6
5,063
py
Python
esphomeyaml/components/logger.py
Bierchermuesli/esphomeyaml
f087e313d4ca5370b14f7e8173c8f1719e90dfa6
[ "MIT" ]
null
null
null
esphomeyaml/components/logger.py
Bierchermuesli/esphomeyaml
f087e313d4ca5370b14f7e8173c8f1719e90dfa6
[ "MIT" ]
null
null
null
esphomeyaml/components/logger.py
Bierchermuesli/esphomeyaml
f087e313d4ca5370b14f7e8173c8f1719e90dfa6
[ "MIT" ]
null
null
null
import re import voluptuous as vol from esphomeyaml.automation import ACTION_REGISTRY, LambdaAction import esphomeyaml.config_validation as cv from esphomeyaml.const import CONF_ARGS, CONF_BAUD_RATE, CONF_FORMAT, CONF_ID, CONF_LEVEL, \ CONF_LOGS, CONF_TAG, CONF_TX_BUFFER_SIZE from esphomeyaml.core import ESPHomeY...
38.946154
100
0.673119
import re import voluptuous as vol from esphomeyaml.automation import ACTION_REGISTRY, LambdaAction import esphomeyaml.config_validation as cv from esphomeyaml.const import CONF_ARGS, CONF_BAUD_RATE, CONF_FORMAT, CONF_ID, CONF_LEVEL, \ CONF_LOGS, CONF_TAG, CONF_TX_BUFFER_SIZE from esphomeyaml.core import ESPHomeY...
2,707
0
137
df28fa0ee16b08f7c8e724f545139a01db78d3c1
3,695
py
Python
celery_conf/tasks.py
kwrobert/qualipy
a514e8d2e7d3b24d111556a1af91689ace36af9a
[ "MIT" ]
null
null
null
celery_conf/tasks.py
kwrobert/qualipy
a514e8d2e7d3b24d111556a1af91689ace36af9a
[ "MIT" ]
null
null
null
celery_conf/tasks.py
kwrobert/qualipy
a514e8d2e7d3b24d111556a1af91689ace36af9a
[ "MIT" ]
null
null
null
import json import inspect import qualipy from celery import Celery from celery import group app = Celery() # celery config file here: app.config_from_object('sampleconfig') @app.task def process_image(image, filters, ROI=None, return_predictions=False, combine_results=False, sort_filters=True): ...
32.412281
81
0.665765
import json import inspect import qualipy from celery import Celery from celery import group app = Celery() # celery config file here: app.config_from_object('sampleconfig') @app.task def process_image(image, filters, ROI=None, return_predictions=False, combine_results=False, sort_filters=True): ...
1,022
0
92
a269b81a626604236eb11f9b26a66abc6af99700
3,545
py
Python
VISION/CalibrationStereo/StereoCalibration.py
Beam-create/S4_projet_QUADRUS_V2
304b434b552a4a5377dd2f49c4bb4c8e9fcb714b
[ "MIT" ]
null
null
null
VISION/CalibrationStereo/StereoCalibration.py
Beam-create/S4_projet_QUADRUS_V2
304b434b552a4a5377dd2f49c4bb4c8e9fcb714b
[ "MIT" ]
52
2022-02-12T17:12:17.000Z
2022-03-30T00:39:18.000Z
VISION/CalibrationStereo/StereoCalibration.py
Beam-create/S4_projet_QUADRUS_V2
304b434b552a4a5377dd2f49c4bb4c8e9fcb714b
[ "MIT" ]
2
2022-01-19T15:44:53.000Z
2022-01-20T21:44:41.000Z
import numpy as np import cv2 import glob ################ ÉCHÉQUIER ############################# chessboardSize = (8,6) frameSize = (720,540) criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001) objp = np.zeros((chessboardSize[0] * chessboardSize[1], 3), np.float32) objp[:,:2] = np.mg...
33.130841
257
0.691396
import numpy as np import cv2 import glob ################ ÉCHÉQUIER ############################# chessboardSize = (8,6) frameSize = (720,540) criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001) objp = np.zeros((chessboardSize[0] * chessboardSize[1], 3), np.float32) objp[:,:2] = np.mg...
0
0
0
af5d2d20165054a32572a1b993db106fb4ae9b6e
2,992
py
Python
experiment-Gaussians.py
rougier/VSOM
78e6eb924b5f89a0e6f42eb6bbe7971473a9abaa
[ "BSD-3-Clause" ]
17
2020-11-20T06:27:15.000Z
2022-01-11T22:20:28.000Z
experiment-Gaussians.py
rougier/VSOM
78e6eb924b5f89a0e6f42eb6bbe7971473a9abaa
[ "BSD-3-Clause" ]
null
null
null
experiment-Gaussians.py
rougier/VSOM
78e6eb924b5f89a0e6f42eb6bbe7971473a9abaa
[ "BSD-3-Clause" ]
1
2022-01-03T04:41:57.000Z
2022-01-03T04:41:57.000Z
# ----------------------------------------------------------------------------- # Copyright (c) 2019 Nicolas P. Rougier # Distributed under the terms of the BSD License. # ----------------------------------------------------------------------------- import sys import som, mnist, plot import numpy as np import matplotli...
34.790698
82
0.541778
# ----------------------------------------------------------------------------- # Copyright (c) 2019 Nicolas P. Rougier # Distributed under the terms of the BSD License. # ----------------------------------------------------------------------------- import sys import som, mnist, plot import numpy as np import matplotli...
466
0
23
23434da633307b6722c28b1fdadb1f0d38de4516
1,243
py
Python
tests/test_nfa.py
peppermintpatty5/regex-eq
e1665c0e3292547d0ce5727756bf9646f53d1247
[ "MIT" ]
null
null
null
tests/test_nfa.py
peppermintpatty5/regex-eq
e1665c0e3292547d0ce5727756bf9646f53d1247
[ "MIT" ]
null
null
null
tests/test_nfa.py
peppermintpatty5/regex-eq
e1665c0e3292547d0ce5727756bf9646f53d1247
[ "MIT" ]
null
null
null
""" Unit tests for module `regular.nfa` """ import unittest from regular.nfa import NFA class TestNFA(unittest.TestCase): """ Test cases for class `NFA` """ def test_overlapping_states(self): """ The operations for union and concatenation cannot be performed if the NFAs have ...
25.895833
87
0.529364
""" Unit tests for module `regular.nfa` """ import unittest from regular.nfa import NFA class TestNFA(unittest.TestCase): """ Test cases for class `NFA` """ def test_overlapping_states(self): """ The operations for union and concatenation cannot be performed if the NFAs have ...
0
0
0
7305eb789285f29b3032a57825aed59ae37428c1
6,407
py
Python
loldib/getratings/models/NA/na_xayah/na_xayah_jng.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_xayah/na_xayah_jng.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
loldib/getratings/models/NA/na_xayah/na_xayah_jng.py
koliupy/loldib
c9ab94deb07213cdc42b5a7c26467cdafaf81b7f
[ "Apache-2.0" ]
null
null
null
from getratings.models.ratings import Ratings
15.364508
46
0.761667
from getratings.models.ratings import Ratings class NA_Xayah_Jng_Aatrox(Ratings): pass class NA_Xayah_Jng_Ahri(Ratings): pass class NA_Xayah_Jng_Akali(Ratings): pass class NA_Xayah_Jng_Alistar(Ratings): pass class NA_Xayah_Jng_Amumu(Ratings): pass class NA_Xayah_Jng_Anivia(Ratings): pass ...
0
2,908
3,450
be5b801ffebc8f1fe9e4eeadfe3427720a90651a
8,234
py
Python
tarterus/door.py
redcartel/tarterus-webclient
79939a365a29ba85728066265dc665a9af04120a
[ "MIT" ]
1
2019-01-14T18:55:14.000Z
2019-01-14T18:55:14.000Z
tarterus/door.py
redcartel/tarterus-webclient
79939a365a29ba85728066265dc665a9af04120a
[ "MIT" ]
null
null
null
tarterus/door.py
redcartel/tarterus-webclient
79939a365a29ba85728066265dc665a9af04120a
[ "MIT" ]
1
2019-06-18T20:42:35.000Z
2019-06-18T20:42:35.000Z
from tarterus.graphpaper import right, left, back #turn_positive # from tarterus.graphpaper import is_positive, turn_across from tarterus.graphpaper import advance # , empty, middle_value from tarterus.passage import passage_width_table from tarterus.room import find_loc # TODO: stairs & trapped doors # TODO: "blocki...
34.165975
79
0.568496
from tarterus.graphpaper import right, left, back #turn_positive # from tarterus.graphpaper import is_positive, turn_across from tarterus.graphpaper import advance # , empty, middle_value from tarterus.passage import passage_width_table from tarterus.room import find_loc # TODO: stairs & trapped doors # TODO: "blocki...
5,897
0
203
7f340048ad5a0970872ba10e09820f668d89059f
750
py
Python
test.py
rilango/anndata
0621bb947ea2dde45827ad493e7947ad5f97eeba
[ "BSD-3-Clause" ]
null
null
null
test.py
rilango/anndata
0621bb947ea2dde45827ad493e7947ad5f97eeba
[ "BSD-3-Clause" ]
null
null
null
test.py
rilango/anndata
0621bb947ea2dde45827ad493e7947ad5f97eeba
[ "BSD-3-Clause" ]
null
null
null
import rapids_scanpy_funcs import anndata import cupy import scanpy as sc min_genes_per_cell = 200 max_genes_per_cell = 6000 adata = sc.read('/data/anndata/krasnow_hlca_10x_UMIs.sparse.h5ad') a = adata.T genes = a.var_names # print(type(genes)) # print(genes) #a = anndata.read_h5ad('/data/anndata/krasnow_hlca_10x_U...
19.230769
111
0.725333
import rapids_scanpy_funcs import anndata import cupy import scanpy as sc min_genes_per_cell = 200 max_genes_per_cell = 6000 adata = sc.read('/data/anndata/krasnow_hlca_10x_UMIs.sparse.h5ad') a = adata.T genes = a.var_names # print(type(genes)) # print(genes) #a = anndata.read_h5ad('/data/anndata/krasnow_hlca_10x_U...
0
0
0
a1b35406f7e59655f593a0a9f524cbff400ee90a
850
py
Python
directoalartista/apps/plancontrol/models.py
mpampols/directoalartista.com
833eea7f4db5a2343dba4314793d593cd66cf1fb
[ "MIT" ]
null
null
null
directoalartista/apps/plancontrol/models.py
mpampols/directoalartista.com
833eea7f4db5a2343dba4314793d593cd66cf1fb
[ "MIT" ]
null
null
null
directoalartista/apps/plancontrol/models.py
mpampols/directoalartista.com
833eea7f4db5a2343dba4314793d593cd66cf1fb
[ "MIT" ]
1
2018-03-29T02:16:18.000Z
2018-03-29T02:16:18.000Z
from django.db import models from django.contrib.auth.models import User from django.conf import settings User = settings.AUTH_USER_MODEL from datetime import datetime, timedelta from directoalartista.apps.genericuser.models import GenericUser from django.contrib.auth import get_user_model #User = get_user_model()...
26.5625
80
0.722353
from django.db import models from django.contrib.auth.models import User from django.conf import settings User = settings.AUTH_USER_MODEL from datetime import datetime, timedelta from directoalartista.apps.genericuser.models import GenericUser from django.contrib.auth import get_user_model #User = get_user_model()...
32
473
23
8f22a8ccbf3f5deb0ac40abecf7cf72f45a67953
808
py
Python
Python/CLRS/2-3_Horner.py
mixterjim/Learn
f1f2132f2d90d50d6963ba4563f037186c9dc955
[ "MIT" ]
3
2015-05-14T14:32:27.000Z
2019-05-01T08:24:17.000Z
Python/CLRS/2-3_Horner.py
mixterjim/Learn
f1f2132f2d90d50d6963ba4563f037186c9dc955
[ "MIT" ]
1
2015-05-14T10:54:20.000Z
2015-05-14T10:54:47.000Z
Python/CLRS/2-3_Horner.py
mixterjim/Learn
f1f2132f2d90d50d6963ba4563f037186c9dc955
[ "MIT" ]
null
null
null
import random import time x = 2 A = random_int_list(1, 100000, 1000) B = A start = time.clock() HORNER(B, x) end = time.clock() print("Horner: %f s" % (end - start)) B = A start = time.clock() NAIVE(B, x) end = time.clock() print("Navie: %f s" % (end - start))
19.238095
65
0.576733
import random import time def random_int_list(start, stop, length): start, stop = (int(start), int(stop)) if start <= stop else ( int(stop), int(start)) length = int(abs(length)) if length else 0 random_list = [] for i in range(length): random_list.append(random.randint(start, stop)) ...
472
0
69
d42adb0f53f3d2a64f24cc2b95a0007e8e05e75d
1,426
py
Python
app/weather/__init__.py
zhounanshu/semd
42a893ddf441bc770126bef1d62a5840ef1f8dc7
[ "MIT" ]
1
2016-05-31T05:56:12.000Z
2016-05-31T05:56:12.000Z
app/weather/__init__.py
zhounanshu/SEMD
42a893ddf441bc770126bef1d62a5840ef1f8dc7
[ "MIT" ]
null
null
null
app/weather/__init__.py
zhounanshu/SEMD
42a893ddf441bc770126bef1d62a5840ef1f8dc7
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import Blueprint from flask.ext.restful import Api Weather = Blueprint('Weather', __name__) weather_api = Api(Weather) from .views import * # weather_api.add_resource(viewRelti, '/v1/weather/realtime') # weather_api.add_resource(viewForecast, '/v1/wather/foreca...
43.212121
74
0.792426
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import Blueprint from flask.ext.restful import Api Weather = Blueprint('Weather', __name__) weather_api = Api(Weather) from .views import * # weather_api.add_resource(viewRelti, '/v1/weather/realtime') # weather_api.add_resource(viewForecast, '/v1/wather/foreca...
0
0
0
4d3a56a9d3b747e92621da1b436cf297bbe05c05
1,154
py
Python
tests/helpers.py
rekt-hard/invenio-userprofiles
69cbe381a35aca98d398a9673af351b672d41b70
[ "MIT" ]
null
null
null
tests/helpers.py
rekt-hard/invenio-userprofiles
69cbe381a35aca98d398a9673af351b672d41b70
[ "MIT" ]
null
null
null
tests/helpers.py
rekt-hard/invenio-userprofiles
69cbe381a35aca98d398a9673af351b672d41b70
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Helper functions for tests.""" from flask import url_for def sign_up(app, clien...
32.055556
72
0.681976
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2015-2018 CERN. # # Invenio is free software; you can redistribute it and/or modify it # under the terms of the MIT License; see LICENSE file for more details. """Helper functions for tests.""" from flask import url_for def sign_up(app, clien...
0
0
0
2ef8e91a362c0314b58c09f0e9bbfe4f66eed0a0
526
py
Python
hydra/plugins/__init__.py
blackc03r/hydra
3c30c201b8d0791752bdcf2c80414f83ffe1dc1a
[ "MIT" ]
null
null
null
hydra/plugins/__init__.py
blackc03r/hydra
3c30c201b8d0791752bdcf2c80414f83ffe1dc1a
[ "MIT" ]
null
null
null
hydra/plugins/__init__.py
blackc03r/hydra
3c30c201b8d0791752bdcf2c80414f83ffe1dc1a
[ "MIT" ]
null
null
null
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Plugins API package """ from hydra.plugins.completion_plugin import CompletionPlugin from hydra.plugins.launcher import Launcher from hydra.plugins.plugin import Plugin from hydra.plugins.search_path_plugin import SearchPathPlugin from hydra.plu...
26.3
70
0.771863
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved """ Plugins API package """ from hydra.plugins.completion_plugin import CompletionPlugin from hydra.plugins.launcher import Launcher from hydra.plugins.plugin import Plugin from hydra.plugins.search_path_plugin import SearchPathPlugin from hydra.plu...
0
0
0
07577bb0e7fed97b97efc99c236826232b74cb72
1,316
py
Python
config/dev.py
BruceWW/flask-basic
3252f47e6b3fca170b57819f8fdbdeb0f868654e
[ "MIT" ]
1
2019-09-28T17:03:39.000Z
2019-09-28T17:03:39.000Z
config/dev.py
BruceWW/flask-basic
3252f47e6b3fca170b57819f8fdbdeb0f868654e
[ "MIT" ]
null
null
null
config/dev.py
BruceWW/flask-basic
3252f47e6b3fca170b57819f8fdbdeb0f868654e
[ "MIT" ]
1
2019-11-19T02:39:40.000Z
2019-11-19T02:39:40.000Z
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/9/11 20:20 # @Author : Lin Luo # @Site : # @File : dev # @Software: PyCharm from . import BaseConfig from redis import Redis class Config(BaseConfig): """开发环境配置参数""" SQLALCHEMY_ECHO = True DEBUG = True EMV = 'dev' # DB DB...
26.32
97
0.636018
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2019/9/11 20:20 # @Author : Lin Luo # @Site : # @File : dev # @Software: PyCharm from . import BaseConfig from redis import Redis class Config(BaseConfig): """开发环境配置参数""" SQLALCHEMY_ECHO = True DEBUG = True EMV = 'dev' # DB DB...
0
0
0
623e7e5221c700158814fc6dc6ff3ae2884806bf
651
py
Python
images/tests.py
chelseaayoo/Personal-Gallery
1c1d8a8c494751b87428866c6a5d029d4b136ce1
[ "MIT" ]
null
null
null
images/tests.py
chelseaayoo/Personal-Gallery
1c1d8a8c494751b87428866c6a5d029d4b136ce1
[ "MIT" ]
null
null
null
images/tests.py
chelseaayoo/Personal-Gallery
1c1d8a8c494751b87428866c6a5d029d4b136ce1
[ "MIT" ]
null
null
null
from django.test import TestCase from .models import Image, Category, Location # Create your tests here. #Set up method
31
109
0.683564
from django.test import TestCase from .models import Image, Category, Location # Create your tests here. class ImageTestClass(TestCase): #Set up method def setUp(self): self.location = Location(name="Kisumu") self.location.save() self.category = Category(name="Vacation") self....
441
10
76
5abde49cc8d6f0837cc649c0b25fec4d80eb1bd3
4,850
py
Python
bin/prepare_diann_parameters.py
ypriverol/quantms
2626e228c1276a8fa5b41a2eda00a68253e657e6
[ "MIT" ]
1
2022-03-14T02:02:01.000Z
2022-03-14T02:02:01.000Z
bin/prepare_diann_parameters.py
ypriverol/quantms
2626e228c1276a8fa5b41a2eda00a68253e657e6
[ "MIT" ]
14
2022-03-15T21:46:45.000Z
2022-03-31T11:12:42.000Z
bin/prepare_diann_parameters.py
ypriverol/quantms
2626e228c1276a8fa5b41a2eda00a68253e657e6
[ "MIT" ]
null
null
null
#!/usr/bin/env python import re import click from sdrf_pipelines.openms.unimod import UnimodDatabase CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) @click.group(context_settings=CONTEXT_SETTINGS) @click.command('generate') @click.option("--enzyme", "-e", help="") @click.option("--fix_mod", "-f", help=""...
36.19403
140
0.569485
#!/usr/bin/env python import re import click from sdrf_pipelines.openms.unimod import UnimodDatabase CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) @click.group(context_settings=CONTEXT_SETTINGS) def cli(): pass @click.command('generate') @click.option("--enzyme", "-e", help="") @click.option("--fix...
4,057
0
113
13c14d38a65bb64feeef34679a6670837801479a
878
py
Python
var/spack/repos/builtin/packages/py-python-memcached/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2020-10-15T01:08:42.000Z
2021-10-18T01:28:18.000Z
var/spack/repos/builtin/packages/py-python-memcached/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
2
2019-07-30T10:12:28.000Z
2019-12-17T09:02:27.000Z
var/spack/repos/builtin/packages/py-python-memcached/package.py
adrianjhpc/spack
0a9e4fcee57911f2db586aa50c8873d9cca8de92
[ "ECL-2.0", "Apache-2.0", "MIT" ]
5
2019-07-30T09:42:14.000Z
2021-01-25T05:39:20.000Z
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyPythonMemcached(PythonPackage): """This software is a 100% Python interface to the memca...
39.909091
96
0.740319
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyPythonMemcached(PythonPackage): """This software is a 100% Python interface to the memca...
0
0
0
4770c53a3edd8e714e805978e1cd2db93ad17272
2,431
py
Python
Indicators/__init__.py
Desil-sketch/Indicators-for-Jesse
ffe33a217002ea3034696fe38acfa72611d52b4f
[ "MIT" ]
1
2021-12-08T06:34:48.000Z
2021-12-08T06:34:48.000Z
Indicators/__init__.py
Desil-sketch/Indicators-for-Jesse
ffe33a217002ea3034696fe38acfa72611d52b4f
[ "MIT" ]
null
null
null
Indicators/__init__.py
Desil-sketch/Indicators-for-Jesse
ffe33a217002ea3034696fe38acfa72611d52b4f
[ "MIT" ]
1
2021-11-04T17:40:19.000Z
2021-11-04T17:40:19.000Z
from .wto import wto from .weis_wave_volume import weis from .weighted_std import wstd from .vwmacd import vwmacd from .vv_ma_angles import vv_ma_angle from .voss import vpf from .volatility import volatility from .vix_fix import vixfix from .vidyatv import vidyatv from .vhf import vhf from .var_macd import varmacd ...
36.283582
62
0.852735
from .wto import wto from .weis_wave_volume import weis from .weighted_std import wstd from .vwmacd import vwmacd from .vv_ma_angles import vv_ma_angle from .voss import vpf from .volatility import volatility from .vix_fix import vixfix from .vidyatv import vidyatv from .vhf import vhf from .var_macd import varmacd ...
0
0
0
c7093f3820d04b8103121cee9f4cdaf96e748579
23,970
py
Python
python/uw/utilities/fitter.py
coclar/pointlike
7088724b5a40cf787371aff69e64c9bec701f578
[ "BSD-3-Clause" ]
null
null
null
python/uw/utilities/fitter.py
coclar/pointlike
7088724b5a40cf787371aff69e64c9bec701f578
[ "BSD-3-Clause" ]
null
null
null
python/uw/utilities/fitter.py
coclar/pointlike
7088724b5a40cf787371aff69e64c9bec701f578
[ "BSD-3-Clause" ]
null
null
null
""" Basic fitter utilities Authors: Matthew Kerr, Toby Burnett $Header: /nfs/slac/g/glast/ground/cvs/pointlike/python/uw/utilities/fitter.py,v 1.10 2013/07/28 15:27:44 burnett Exp $ """ import types import numpy as np from scipy import optimize #for fmin,fmin_powell,fmin_bfgs from numpy import linalg #for inv import...
40.218121
142
0.561786
""" Basic fitter utilities Authors: Matthew Kerr, Toby Burnett $Header: /nfs/slac/g/glast/ground/cvs/pointlike/python/uw/utilities/fitter.py,v 1.10 2013/07/28 15:27:44 burnett Exp $ """ import types import numpy as np from scipy import optimize #for fmin,fmin_powell,fmin_bfgs from numpy import linalg #for inv import...
5,797
164
589
be296d19d60e06bb3d6093baff8e0f188b1419b0
1,384
py
Python
L1Trigger/L1THGCal/python/hgcalTowerMapProducer_cfi.py
Michael-Krohn/cmssw
25064b40a13dc451b498e850214fcbe141f7cb75
[ "Apache-2.0" ]
2
2018-06-01T05:18:55.000Z
2021-04-08T21:44:06.000Z
L1Trigger/L1THGCal/python/hgcalTowerMapProducer_cfi.py
Michael-Krohn/cmssw
25064b40a13dc451b498e850214fcbe141f7cb75
[ "Apache-2.0" ]
26
2018-10-30T12:47:58.000Z
2022-03-29T08:39:00.000Z
L1Trigger/L1THGCal/python/hgcalTowerMapProducer_cfi.py
p2l1pfp/cmssw
9bda22bf33ecf18dd19a3af2b3a8cbdb1de556a9
[ "Apache-2.0" ]
2
2020-03-20T18:46:13.000Z
2021-03-12T09:23:07.000Z
import FWCore.ParameterSet.Config as cms import math L1TTriggerTowerConfig_etaphi = cms.PSet(readMappingFile=cms.bool(False), minEta=cms.double(1.479), maxEta=cms.double(3.0), minPhi=cms.double(-1*ma...
43.25
85
0.547688
import FWCore.ParameterSet.Config as cms import math L1TTriggerTowerConfig_etaphi = cms.PSet(readMappingFile=cms.bool(False), minEta=cms.double(1.479), maxEta=cms.double(3.0), minPhi=cms.double(-1*ma...
0
0
0
1d9d233c7e37bec6b3e1f0f38264ff51b1dac383
2,069
py
Python
testgrids/eosfit.py
ajulik1997/testgrids
0d52e9b4fccd755a9421934d40b8b312a198699f
[ "MIT" ]
null
null
null
testgrids/eosfit.py
ajulik1997/testgrids
0d52e9b4fccd755a9421934d40b8b312a198699f
[ "MIT" ]
null
null
null
testgrids/eosfit.py
ajulik1997/testgrids
0d52e9b4fccd755a9421934d40b8b312a198699f
[ "MIT" ]
null
null
null
# eosfit.py fits E(V) data to a Birch-Murnaghan equation of state. # Current version: 3.1 # # Copyright (C) 2012 Kurt Lejaeghere <Kurt.Lejaeghere@UGent.be>, Center for # Molecular Modeling (CMM), Ghent University, Ghent, Belgium # # eosfit.py is free software; you can redistribute it and/or modify it under # the terms...
36.298246
104
0.670372
# eosfit.py fits E(V) data to a Birch-Murnaghan equation of state. # Current version: 3.1 # # Copyright (C) 2012 Kurt Lejaeghere <Kurt.Lejaeghere@UGent.be>, Center for # Molecular Modeling (CMM), Ghent University, Ghent, Belgium # # eosfit.py is free software; you can redistribute it and/or modify it under # the terms...
864
0
23
16ef86cedd96dea29913b4087cc47bb49e7abf68
13,774
py
Python
synthesisdatabase/managers/download_manager.py
olivettigroup/synthesis-database-public
3a5b96558249c3079b7acaf9e96bd0282c0341ce
[ "MIT" ]
7
2017-02-28T01:01:02.000Z
2021-05-24T04:48:01.000Z
synthesisdatabase/managers/download_manager.py
olivettigroup/synthesis-database-public
3a5b96558249c3079b7acaf9e96bd0282c0341ce
[ "MIT" ]
1
2019-03-07T06:38:28.000Z
2019-04-04T18:14:38.000Z
synthesisdatabase/managers/download_manager.py
olivettigroup/synthesis-database-public
3a5b96558249c3079b7acaf9e96bd0282c0341ce
[ "MIT" ]
4
2017-05-01T18:57:39.000Z
2020-06-04T06:01:53.000Z
import sys sys.path.append("..") from models import (Paper, Paragraph) from time import sleep from pymongo import MongoClient from pymatgen.matproj.rest import (MPRester) from articledownloader.articledownloader import (ArticleDownloader) from os import (environ, path, remove, listdir, strerror) from autologging impor...
35.776623
142
0.610861
import sys sys.path.append("..") from models import (Paper, Paragraph) from time import sleep from pymongo import MongoClient from pymatgen.matproj.rest import (MPRester) from articledownloader.articledownloader import (ArticleDownloader) from os import (environ, path, remove, listdir, strerror) from autologging impor...
12,781
388
22
a26d42f799f99e7095be3f0c3901520eec0d8829
24,371
py
Python
11/solution.py
AlecRosenbaum/adventofcode2017
9214a64db77492790d30bbd22e835535d05abb25
[ "MIT" ]
null
null
null
11/solution.py
AlecRosenbaum/adventofcode2017
9214a64db77492790d30bbd22e835535d05abb25
[ "MIT" ]
null
null
null
11/solution.py
AlecRosenbaum/adventofcode2017
9214a64db77492790d30bbd22e835535d05abb25
[ "MIT" ]
null
null
null
""" Day 11 challenge """ import attr import math from functools import reduce @attr.s DIRECTIONS = { "nw": Offset(horizontal=-.5, vertical=.5), "n": Offset(vertical=1), "ne": Offset(horizontal=.5, vertical=.5), "se": Offset(horizontal=.5, vertical=-.5), "s": Offset(vertical=-1), "sw": Offset...
276.943182
22,006
0.620697
""" Day 11 challenge """ import attr import math from functools import reduce @attr.s class Offset(object): horizontal = attr.ib(default=0) vertical = attr.ib(default=0) def __add__(self, other): return Offset( horizontal=self.horizontal + other.horizontal, vertical=self.v...
1,697
124
68
0edbf4856f3f5fc8d8eca3650fd3de2cd8ef2372
3,729
py
Python
Metric/logger.py
ZM-Zhou/MDE_Platform_Pytorch
d86efe061bf14a6eed3352cc45e1437e46c138b1
[ "MIT" ]
null
null
null
Metric/logger.py
ZM-Zhou/MDE_Platform_Pytorch
d86efe061bf14a6eed3352cc45e1437e46c138b1
[ "MIT" ]
null
null
null
Metric/logger.py
ZM-Zhou/MDE_Platform_Pytorch
d86efe061bf14a6eed3352cc45e1437e46c138b1
[ "MIT" ]
null
null
null
import time import os import json import shutil import numpy as np import cv2 as cv import torch import torch.nn as nn import torch.nn.functional as F from Utils.import_choice import import_module from Utils.visualization import VisualImage, make_output_img def sec_to_hm(t): """Convert time in seconds to time in...
32.426087
84
0.540896
import time import os import json import shutil import numpy as np import cv2 as cv import torch import torch.nn as nn import torch.nn.functional as F from Utils.import_choice import import_module from Utils.visualization import VisualImage, make_output_img def sec_to_hm(t): """Convert time in seconds to time in...
2,104
937
23
573a6fce8cc0764713b54343ab5e8d135b196d42
2,471
py
Python
flask_app/models/recipe.py
Benton-Michael/recipes
86e4a32b620a43830b300576be64e57b0fb24ad4
[ "MIT" ]
null
null
null
flask_app/models/recipe.py
Benton-Michael/recipes
86e4a32b620a43830b300576be64e57b0fb24ad4
[ "MIT" ]
null
null
null
flask_app/models/recipe.py
Benton-Michael/recipes
86e4a32b620a43830b300576be64e57b0fb24ad4
[ "MIT" ]
null
null
null
from flask_app.config.mysqlconnection import connectToMySQL from flask import flash
37.439394
192
0.622015
from flask_app.config.mysqlconnection import connectToMySQL from flask import flash class Recipe: db_name = 'recipes' def __init__(self,db_data): self.id = db_data['id'] self.name = db_data['name'] self.description = db_data['description'] self.instructions = db_data['instructi...
2,047
316
23
680f8d81c64768930a68b46fa87c28d4ef3f1453
15,200
py
Python
Tests/Application.py
BigFriendly/tm1py
03210d672cc3797025b8de80c42037e1e11f369f
[ "MIT" ]
null
null
null
Tests/Application.py
BigFriendly/tm1py
03210d672cc3797025b8de80c42037e1e11f369f
[ "MIT" ]
null
null
null
Tests/Application.py
BigFriendly/tm1py
03210d672cc3797025b8de80c42037e1e11f369f
[ "MIT" ]
null
null
null
import configparser import os import random import unittest from _datetime import datetime from TM1py import TM1Service, Element, ElementAttribute, Hierarchy, Dimension, Cube, NativeView, AnonymousSubset, \ Subset, Process, Chore, ChoreStartTime, ChoreFrequency, ChoreTask from TM1py.Objects.Application import Cub...
44.705882
120
0.684013
import configparser import os import random import unittest from _datetime import datetime from TM1py import TM1Service, Element, ElementAttribute, Hierarchy, Dimension, Cube, NativeView, AnonymousSubset, \ Subset, Process, Chore, ChoreStartTime, ChoreFrequency, ChoreTask from TM1py.Objects.Application import Cub...
13,003
1,052
23
b233161373558bab9922ed14cc69db5f313c6bba
141
py
Python
odoo/custom/src/private/fieldservice_worker_geolocalize/models/__init__.py
mtelahun/odoo-geo
1473dabfa8bc082a552cbb88981635d9eb358dce
[ "BSL-1.0" ]
null
null
null
odoo/custom/src/private/fieldservice_worker_geolocalize/models/__init__.py
mtelahun/odoo-geo
1473dabfa8bc082a552cbb88981635d9eb358dce
[ "BSL-1.0" ]
null
null
null
odoo/custom/src/private/fieldservice_worker_geolocalize/models/__init__.py
mtelahun/odoo-geo
1473dabfa8bc082a552cbb88981635d9eb358dce
[ "BSL-1.0" ]
null
null
null
# Copyright (C) 2021 TREVI Software # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # flake8: noqa from . import fsm_person
23.5
63
0.723404
# Copyright (C) 2021 TREVI Software # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). # flake8: noqa from . import fsm_person
0
0
0
54d628d4d3ddf9311d90625573627f6cc737d717
363
py
Python
lecture/migrations/0009_auto_20191217_1120.py
JhoLee/django-lecture_manager
d74ab1d48c954583ffd509346d7cb30b9214f1dc
[ "MIT" ]
null
null
null
lecture/migrations/0009_auto_20191217_1120.py
JhoLee/django-lecture_manager
d74ab1d48c954583ffd509346d7cb30b9214f1dc
[ "MIT" ]
7
2020-06-05T20:02:50.000Z
2021-09-22T18:05:02.000Z
lecture/migrations/0009_auto_20191217_1120.py
JhoLee/django-lecture_manager
d74ab1d48c954583ffd509346d7cb30b9214f1dc
[ "MIT" ]
null
null
null
# Generated by Django 3.0 on 2019-12-17 02:20 from django.db import migrations
19.105263
47
0.586777
# Generated by Django 3.0 on 2019-12-17 02:20 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('lecture', '0008_auto_20191217_1115'), ] operations = [ migrations.RenameField( model_name='notice', old_name='attachment', ...
0
259
23
b4df9266c9f7897610aa8a7227dacf7d1148455c
5,990
py
Python
ownthinkdb/txtpro.py
sealhuang/KBQA-BERT
fa8c32da0625326a7209d053c3c6b1bd14a702fd
[ "MIT" ]
null
null
null
ownthinkdb/txtpro.py
sealhuang/KBQA-BERT
fa8c32da0625326a7209d053c3c6b1bd14a702fd
[ "MIT" ]
null
null
null
ownthinkdb/txtpro.py
sealhuang/KBQA-BERT
fa8c32da0625326a7209d053c3c6b1bd14a702fd
[ "MIT" ]
null
null
null
# vi: set ft=python sts=4 ts=4 sw=4 et: import os import csv def collect_relations(file_name='ownthink_v2.csv'): """Get all unique relations.""" rel_dict = {} # output relation file csvf_relation = open("relation_dict.csv", "w", newline='', encoding='utf-8') w_relation = csv.writer(csvf_relation...
32.378378
80
0.534391
# vi: set ft=python sts=4 ts=4 sw=4 et: import os import csv def collect_relations(file_name='ownthink_v2.csv'): """Get all unique relations.""" rel_dict = {} # output relation file csvf_relation = open("relation_dict.csv", "w", newline='', encoding='utf-8') w_relation = csv.writer(csvf_relation...
0
0
0
75caf6ad60c039475381420aed2f0d566e6b5908
4,522
py
Python
photos/tests.py
kasparov-creat/Picture-Perfection
d48e517800eff64e8efe61b7157def0a89ae3978
[ "MIT" ]
null
null
null
photos/tests.py
kasparov-creat/Picture-Perfection
d48e517800eff64e8efe61b7157def0a89ae3978
[ "MIT" ]
null
null
null
photos/tests.py
kasparov-creat/Picture-Perfection
d48e517800eff64e8efe61b7157def0a89ae3978
[ "MIT" ]
null
null
null
from django.test import TestCase from .models import Category, Image, Location # Set up method # Testing instance # Set up method # Testing instance # Set up method # Testing instance
35.328125
131
0.66077
from django.test import TestCase from .models import Category, Image, Location class CategoryTestClass(TestCase): # Set up method def setUp(self): self.category = Category(name = 'travel') # Testing instance def test_instance(self): self.assertTrue(isinstance(self.category,Category)) ...
3,500
36
742
86af3493021fc803c2875cc14631bdd8241d8319
1,535
py
Python
Introducing_CircuitPlaygroundExpress/CircuitPlaygroundExpress_AudioSine/code.py
claycooper/Adafruit_Learning_System_Guides
890431bd4b9df929bc601e5886c2a735d89814f9
[ "MIT" ]
null
null
null
Introducing_CircuitPlaygroundExpress/CircuitPlaygroundExpress_AudioSine/code.py
claycooper/Adafruit_Learning_System_Guides
890431bd4b9df929bc601e5886c2a735d89814f9
[ "MIT" ]
null
null
null
Introducing_CircuitPlaygroundExpress/CircuitPlaygroundExpress_AudioSine/code.py
claycooper/Adafruit_Learning_System_Guides
890431bd4b9df929bc601e5886c2a735d89814f9
[ "MIT" ]
null
null
null
# SPDX-FileCopyrightText: 2017 Limor Fried for Adafruit Industries # # SPDX-License-Identifier: MIT import time import array import math import board import digitalio try: from audiocore import RawSample except ImportError: from audioio import RawSample try: from audioio import AudioOut except ImportErro...
31.979167
95
0.744625
# SPDX-FileCopyrightText: 2017 Limor Fried for Adafruit Industries # # SPDX-License-Identifier: MIT import time import array import math import board import digitalio try: from audiocore import RawSample except ImportError: from audioio import RawSample try: from audioio import AudioOut except ImportErro...
0
0
0
c7247eec88133f20ed823babefa8db152456f367
17,666
py
Python
src/checkrs/sim_cdf.py
timothyb0912/checkrs
213ac39b5dccc0c38d984a66286174de070af00d
[ "BSD-3-Clause" ]
2
2021-08-31T17:07:12.000Z
2021-09-02T09:20:33.000Z
src/checkrs/sim_cdf.py
timothyb0912/checkrs
213ac39b5dccc0c38d984a66286174de070af00d
[ "BSD-3-Clause" ]
28
2020-09-26T01:38:14.000Z
2020-12-03T00:47:22.000Z
src/checkrs/sim_cdf.py
timothyb0912/checkrs
213ac39b5dccc0c38d984a66286174de070af00d
[ "BSD-3-Clause" ]
null
null
null
# -*- coding: utf-8 -*- """ Functions for plotting simulated vs observed cumulative distribution functions. """ from __future__ import absolute_import import os from typing import Dict from typing import Iterable from typing import List from typing import Optional import altair as alt import attr import checkrs.base ...
35.191235
87
0.614627
# -*- coding: utf-8 -*- """ Functions for plotting simulated vs observed cumulative distribution functions. """ from __future__ import absolute_import import os from typing import Dict from typing import Iterable from typing import List from typing import Optional import altair as alt import attr import checkrs.base ...
256
7,623
22