Search is not available for this dataset
id
int64
0
10.8M
vector
listlengths
1.54k
1.54k
ast_depth
int64
3
164
ast_data
stringlengths
297
510k
full_path
stringlengths
0
319
code
stringlengths
60
56.5k
20,101
[ 0.03919872269034386, 0.0301379282027483, -0.04021266847848892, -0.02038678713142872, -0.01562987081706524, 0.026643050834536552, 0.020127907395362854, -0.023450199514627457, 0.03231683373451233, -0.036868803203105927, 0.029577022418379784, -0.015252337791025639, 0.03889669477939606, -0.036...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}], "kwarg": null...
def save_json(self, path): def json_encoder(obj): self.app.processEvents() dic = obj.__dict__.copy() del dic['parentItem'] return dic try: json.dump((self.item_model.rootItem, self.bookmark_model.rootItem), open(path, 'w'), default=json_encode...
20,102
[ 0.030481068417429924, 0.014253152534365654, -0.023836567997932434, -0.03995993733406067, -0.03684677928686142, 0.017133984714746475, 0.019352691248059273, 0.007678348571062088, -0.034755852073431015, -0.02361585944890976, 0.029923489317297935, 0.0035023028030991554, 0.03166592866182327, -0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def save_file(self): # self.item_model.selected_item = self.focused_column().filter_proxy.getItem(self.current_index()) pickle.dump((self.item_model.selected_item, self.item_model.rootItem, self.bookmark_model.rootItem), open(self.save_path, 'wb'), protocol=pickle...
20,103
[ 0.008324934169650078, 0.06358720362186432, -0.009748703800141811, -0.05073797330260277, -0.010266438126564026, 0.010089937597513199, 0.018614906817674637, 0.001134750316850841, -0.0063657802529633045, 0.0005552407819777727, 0.019650375470519066, -0.006506980396807194, 0.03857121616601944, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "open_path", "annotation": null, "type_comment": null}}, {"_type":...
def import_backup(self, open_path, save_path): self.item_model = model.TreeModel(self, header_list=self.tree_header) self.bookmark_model = model.TreeModel(self, header_list=BOOKMARKS_HEADER) if 'json' in open_path: if 'json' in open_path: def json_decoder(obj): ...
20,104
[ 0.029081718996167183, 0.011747129261493683, 0.0021892632357776165, -0.01761508360505104, -0.04016688093543053, 0.003099469467997551, -0.010243676602840424, 0.01944391243159771, -0.0920921117067337, -0.022596675902605057, -0.02562602050602436, -0.013430099003016949, -0.0025468943640589714, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def print(self): dialog = QPrintPreviewDialog() view = PrintTreeView(self, dialog.findChildren(QPrintPreviewWidget)[0]) if self.current_view() is self.planned_view: view.setModel(self.planned_view.model()) else: view.setModel(self.item_model) view.mode...
20,105
[ -0.028929399326443672, -0.004201009403914213, 0.010471903719007969, -0.033412110060453415, -0.02821902371942997, 0.006993516813963652, 0.005869777407497168, 0.02227882109582424, 0.0012163636274635792, 0.00025375993573106825, -0.0019642473198473454, -0.01682853326201439, 0.014844382181763649,...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "time_unit", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "value", "annotation": null, "type_comment": null}}, {"_type"...
def add_shortcuts(time_unit, value, max): for i in range(1, max): keys = i if i < 10 else ','.join(list(str(i))) self.remindInMenu.addAction( add_action('', QAction(self.tr('Remind in {} {}').format(i, time_unit), self, ...
20,106
[ -0.012191702611744404, 0.045536916702985764, -0.04137445241212845, 0.022370409220457077, 0.02859136089682579, 0.051678258925676346, 0.034664466977119446, 0.01247602328658104, 0.005385047756135464, -0.0017485767602920532, -0.005609661340713501, 0.004122660495340824, 0.039873234927654266, -0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "name", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "icon_name", "annotation": null, "type_comment": null}}, {"_type":...
def act(name, icon_name=None, trig=None, trigbool=None, shct=None): if not isinstance(shct, QKeySequence): shct = QKeySequence(shct) if icon_name: action = QAction(QIcon.fromTheme(icon_name), name, self) else: action = QAction(name, sel...
20,107
[ -0.010792163200676441, 0.0010311437072232366, -0.026647595688700676, -0.04626350477337837, -0.05370480567216873, -0.03761611878871918, -0.0130052100867033, -0.06185155361890793, -0.029514886438846588, 0.016384517773985863, -0.008448266424238682, -0.035112928599119186, 0.03675138205289841, ...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "index", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "rows_string", "annotation": null, "type_comment": null}}], "kwar...
def tree_as_string(index, rows_string=''): indention_string = (model.indention_level(index) - 1) * '\t' if index.data() is not None and index in selected_source_indexes: date = self.current_view().model().getItem(self.map_to_view(index)).date if da...
20,108
[ 0.013452304527163506, 0.020630454644560814, 0.009260565973818302, 0.010756462812423706, -0.03652569651603699, -0.02823907695710659, 0.00843728519976139, 0.005886728409677744, -0.022147873416543007, 0.02733508311212063, -0.009766372852027416, 0.03755883499979973, 0.019758744165301323, -0.03...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "current_index", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonly...
def add_parents(current_index): item = self.focused_column().filter_proxy.getItem(current_index) text = item.text.replace('\n', '') button = QPushButton(text) button.setStyleSheet('Text-align: left; padding-left: 2px; padding-right: 2px;' ...
20,109
[ -0.00184103031642735, -0.0031768998596817255, 0.04700721427798271, -0.03533238545060158, -0.020180771127343178, -0.00002330354618607089, -0.0328691266477108, -0.006110039539635181, -0.08842077106237411, 0.01792278327047825, 0.002120071556419134, -0.0061806016601622105, -0.04038720205426216, ...
14
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "printer", "annotation": null, "type_comment": null}}], "kwarg": n...
def print(self, printer): printer.setResolution(300) old_fontsize = self.main_window.fontsize self.main_window.fontsize = int(30 * self.main_window.print_size) painter = QPainter() painter.begin(printer) painter.setFont(QFont(model.FONT, 9)) painter.setRenderHints...
20,110
[ -0.008151961490511894, -0.0071020061150193214, 0.028171110898256302, -0.034287773072719574, -0.04018906131386757, -0.0015076282434165478, -0.0003789262264035642, -0.004046366550028324, -0.08317800611257553, 0.019706854596734047, -0.011781037785112858, 0.0058797504752874374, -0.00421059038490...
15
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotat...
class PrintTreeView(QTreeView): def __init__(self, main_window, print_preview_widget): super(PrintTreeView, self).__init__() self.main_window = main_window self.print_preview_widget = print_preview_widget def change_print_size(self, change): self.main_window.print_size += change...
20,111
[ 0.030745571479201317, 0.044018711894750595, -0.0021378935780376196, -0.013114875182509422, -0.007422618567943573, 0.005755562800914049, 0.017345819622278214, -0.0036295391619205475, 0.0007108726422302425, 0.05389443412423134, -0.011310656554996967, 0.024815918877720833, 0.056764304637908936,...
14
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotat...
class FileLineEdit(QPlainTextEdit): def __init__(self, main_window, popup): super(FileLineEdit, self).__init__(popup) self.popup = popup self.main_window = main_window self.setMinimumWidth(400) self.setPlaceholderText(self.tr('File to:')) self._separator = ' ' ...
20,112
[ 0.02364477328956127, 0.029895691201090813, 0.0023754530120640993, -0.01457153633236885, -0.014048883691430092, -0.0014098535757511854, 0.020529767498373985, 0.0047117071226239204, 0.003423370188102126, 0.06372172385454178, -0.012376397848129272, 0.0227667186409235, 0.04578430950641632, 0.0...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotation": null, "type_comment": null}}, {"_type...
def __init__(self, main_window, popup): super(FileLineEdit, self).__init__(popup) self.popup = popup self.main_window = main_window self.setMinimumWidth(400) self.setPlaceholderText(self.tr('File to:')) self._separator = ' ' # moving an item to its own child is n...
20,113
[ 0.024167167022824287, 0.050533477216959, 0.02016660012304783, -0.030904965475201607, -0.03874233365058899, -0.0218744445592165, 0.04002906382083893, 0.0104634715244174, 0.016715819016098976, 0.020306970924139023, 0.01029970496892929, 0.0191723071038723, 0.05502534285187721, 0.0040590548887...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "completion", "annotation": null, "type_comment": null}}], "kwarg"...
def _insertCompletion(self, completion): self.popup.hide() for index in self.main_window.item_model.indexes(): if self.main_window.item_model.getItem(index).text == completion: lowest_index = self.main_window.focused_column().filter_proxy.mapToSource( self...
20,114
[ 0.03362572565674782, -0.004878477193415165, 0.02453831024467945, 0.02323356829583645, -0.030169304460287094, -0.010088861919939518, 0.01936512254178524, 0.014970201067626476, 0.020383736118674278, 0.023668482899665833, -0.03461000695824623, 0.040218107402324677, -0.024652762338519096, 0.00...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def textUnderCursor(self): text = self.toPlainText() textUnderCursor = '' i = self.textCursor().position() - 1 while i >= 0 and text[i] != self._separator: textUnderCursor = text[i] + textUnderCursor i -= 1 return textUnderCursor
20,115
[ 0.04768342524766922, 0.0332176648080349, 0.0002466339501552284, -0.0022667141165584326, -0.02814846858382225, 0.00983444880694151, 0.013445736840367317, -0.00030684354715049267, -0.031218836084008217, 0.04516943171620369, -0.015382746234536171, 0.014300906099379063, 0.03686501458287239, 0....
14
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotat...
class SelectRowLineEdit(QPlainTextEdit): def __init__(self, main_window): super(SelectRowLineEdit, self).__init__() self.main_window = main_window self.setMinimumWidth(400) self.setMaximumHeight(36) index = self.main_window.get_index_by_creation_date(self.main_window.new_row...
20,116
[ 0.033271655440330505, 0.03524314612150192, -0.031056499108672142, -0.0006382420542649925, -0.008085322566330433, 0.009940516203641891, 0.0045355334877967834, 0.052676428109407425, -0.01294759102165699, 0.019116804003715515, -0.0051391636952757835, 0.032562803477048874, 0.04997393861413002, ...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "event", "annotation": null, "type_comment": null}}], "kwarg": nul...
def keyPressEvent(self, event): if event.key() == Qt.Key_Escape: self.popup.hide() if event.key() in self._keysToIgnore and self.completer.popup().isVisible(): event.ignore() return super(FileLineEdit, self).keyPressEvent(event) completionPrefix = sel...
20,117
[ 0.03362572565674782, -0.004878477193415165, 0.02453831024467945, 0.02323356829583645, -0.030169304460287094, -0.010088861919939518, 0.01936512254178524, 0.014970201067626476, 0.020383736118674278, 0.023668482899665833, -0.03461000695824623, 0.040218107402324677, -0.024652762338519096, 0.00...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def textUnderCursor(self): text = self.toPlainText() textUnderCursor = '' i = self.textCursor().position() - 1 while i >= 0 and text[i] != self._separator: textUnderCursor = text[i] + textUnderCursor i -= 1 return textUnderCursor
20,118
[ 0.029354751110076904, 0.016216812655329704, 0.022922854870557785, -0.007839532569050789, -0.03717846795916557, -0.009099551476538181, 0.019453849643468857, -0.01851542480289936, -0.04006754979491234, 0.051455166190862656, -0.01604810729622841, 0.006874747574329376, 0.02754116803407669, 0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotation": null, "type_comment": null}}], "kwarg...
def __init__(self, main_window): super(SelectRowLineEdit, self).__init__() self.main_window = main_window self.setMinimumWidth(400) self.setMaximumHeight(36) index = self.main_window.get_index_by_creation_date(self.main_window.new_rows_plan_item_creation_date) if index: ...
20,119
[ 0.00842332188040018, 0.04983007162809372, 0.012567495927214622, 0.028694283217191696, -0.023775262758135796, -0.008623282425105572, 0.008513304404914379, 0.020755864679813385, -0.02565488964319229, 0.060907866805791855, 0.00019746065663639456, -0.011337741278111935, 0.00538892624899745, 0....
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotat...
class FocusTreeAfterCloseDialog(QDialog): def __init__(self, main_window): super(FocusTreeAfterCloseDialog, self).__init__(main_window) self.main_window = main_window def accept(self): super(FocusTreeAfterCloseDialog, self).accept() self.main_window.focused_column().view.setFocu...
20,120
[ 0.03984977677464485, 0.025570273399353027, -0.015486066229641438, 0.025393163785338402, -0.026057327166199684, 0.008241155184805393, 0.001765566528774798, 0.05277881771326065, -0.030640050768852234, 0.006254201289266348, -0.01669262908399105, 0.0236220620572567, 0.01425736490637064, 0.0664...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "event", "annotation": null, "type_comment": null}}], "kwarg": nul...
def keyPressEvent(self, event): if event.key() == Qt.Key_Escape: pass if event.key() in self._keysToIgnore and self.completer.popup().isVisible(): event.ignore() return super(SelectRowLineEdit, self).keyPressEvent(event) completionPrefix = self.textUn...
20,121
[ 0.0013176494976505637, 0.022508202120661736, -0.017196789383888245, -0.028516193851828575, 0.012592838145792484, -0.01277786772698164, 0.01512882113456726, 0.01533561758697033, -0.06473828852176666, 0.044711653143167496, 0.01853552646934986, 0.018198121339082718, 0.0276019349694252, 0.0188...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotation": null, "type_comment": null}}, {"_type...
def __init__(self, main_window, open_filter, title, hint): super(ImportDialog, self).__init__(main_window) self.setWindowTitle(title) self.setMinimumWidth(1200) self.import_file_edit = QLineEdit() self.import_file_edit.setReadOnly(True) self.select_import_file_button = QP...
20,122
[ 0.003913313150405884, 0.02648179791867733, -0.011109806597232819, -0.03645574301481247, 0.017924975603818893, -0.009449285455048084, 0.009925265796482563, 0.032215192914009094, -0.04569408297538757, 0.04430941492319107, 0.014246948063373566, 0.02617890201508999, 0.02507549338042736, 0.0096...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotat...
class ImportDialog(FocusTreeAfterCloseDialog): def __init__(self, main_window, open_filter, title, hint): super(ImportDialog, self).__init__(main_window) self.setWindowTitle(title) self.setMinimumWidth(1200) self.import_file_edit = QLineEdit() self.import_file_edit.setReadOnl...
20,123
[ -0.018406568095088005, 0.003668952966108918, 0.012990227900445461, 0.007652548141777515, 0.0024623561184853315, -0.013001465238630772, 0.016237786039710045, -0.0020788859110325575, -0.024137552827596664, 0.042386800050735474, 0.00929318182170391, -0.005093270912766457, 0.017125526443123817, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotat...
class AboutBox(FocusTreeAfterCloseDialog): def __init__(self, main_window): super(AboutBox, self).__init__(main_window) headline = QLabel('TreeNote') headline.setFont(QFont(model.FONT, 25)) label = QLabel( self.tr( 'Version ' + __version__ + ...
20,124
[ 0.028102170675992966, 0.02951190061867237, 0.017933622002601624, -0.03605212643742561, 0.008498826064169407, -0.009983665309846401, 0.023826757445931435, 0.05098140239715576, -0.04654422029852867, 0.041275061666965485, 0.0023543655406683683, 0.015795916318893433, 0.024127192795276642, -0.0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def accept(self): if self.treenote_file_edit.text() == '': QMessageBox.information(self, '', self.tr('You need to select where the tree shall be created.'), QMessageBox.Ok) return try: self.main_window.import_backup(self.import_file...
20,125
[ 0.033289797604084015, 0.013666338287293911, -0.020860234275460243, -0.0061323316767811775, -0.03495944291353226, 0.011316470801830292, -0.02626080811023712, 0.026178356260061264, -0.04128759726881981, 0.016026513651013374, -0.007652531377971172, 0.014367176219820976, 0.012852129526436329, ...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main", "annotation": n...
class SearchBarQLineEdit(QLineEdit): def __init__(self, main): super(QLineEdit, self).__init__() self.main = main self.setClearButtonEnabled(True) def keyPressEvent(self, event): if event.key() == Qt.Key_Down or event.key() == Qt.Key_Up: self.main.focused_column().vi...
20,126
[ -0.01482117734849453, -0.019811982288956642, 0.025710204616189003, 0.01373925432562828, -0.0013356800191104412, -0.01221525575965643, 0.0106098223477602, -0.030712643638253212, -0.027431974187493324, 0.05844708904623985, -0.009074189700186253, 0.00039699580520391464, 0.010220097377896309, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotation": null, "type_comment": null}}], "kwarg...
def __init__(self, main_window): super(AboutBox, self).__init__(main_window) headline = QLabel('TreeNote') headline.setFont(QFont(model.FONT, 25)) label = QLabel( self.tr( 'Version ' + __version__ + '<br><br>' 'TreeNote is an ea...
20,127
[ -0.007775200996547937, 0.005873353220522404, -0.025238636881113052, -0.014867974445223808, -0.02356053702533245, 0.01742987520992756, 0.010924437083303928, 0.03244328498840332, -0.0384620726108551, 0.012004015035927296, 0.03246565908193588, -0.021021010354161263, 0.04761331528425217, -0.01...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotat...
class BookmarkDialog(FocusTreeAfterCloseDialog): # init it with either search_bar_text or index set # search_bar_text is set: create new bookmark # index is set: edit existing bookmark def __init__(self, main_window, search_bar_text=None, index=None): super(BookmarkDialog, self).__init__(main_w...
20,128
[ 0.037290170788764954, 0.024162836372852325, 0.0014274644199758768, 0.010635276325047016, -0.009930882602930069, 0.007017254829406738, -0.0198404211550951, 0.04277590289711952, -0.04121769964694977, 0.0026801645290106535, 0.00633954256772995, 0.023180954158306122, 0.04006505757570267, 0.050...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "event", "annotation": null, "type_comment": null}}], "kwarg": nul...
def keyPressEvent(self, event): if event.key() == Qt.Key_Down or event.key() == Qt.Key_Up: self.main.focused_column().view.setFocus() if self.main.selected_indexes(): # if the selection remains valid after the search QApplication.sendEvent(self.main.focused_column().view...
20,129
[ 0.03652328997850418, 0.0020905090495944023, 0.009379199706017971, 0.01187480054795742, -0.02831501141190529, 0.015198325738310814, 0.007315302733331919, 0.033637382090091705, -0.02741612307727337, 0.011815663427114487, 0.03692542389035225, -0.007563680410385132, 0.04681320860981941, -0.025...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def accept(self): if self.index is None: new_item_position = len(self.main_window.bookmark_model.rootItem.childItems) self.main_window.bookmark_model.insert_remove_rows(new_item_position, QModelIndex()) self.index = self.main_window.bookmark_model.index(new_item_position, 0, ...
20,130
[ 0.012460015714168549, -0.0031308967154473066, -0.022589076310396194, 0.011919657699763775, -0.038715045899152756, 0.0049850656650960445, 0.014568470418453217, 0.014579065144062042, -0.06797913461923599, 0.026043128222227097, 0.023902887478470802, -0.018011927604675293, 0.04594101011753082, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotation": null, "type_comment": null}}, {"_type...
def __init__(self, main_window, search_bar_text=None, index=None): super(BookmarkDialog, self).__init__(main_window) self.setMinimumWidth(600) self.search_bar_text = search_bar_text self.index = index rootIndex = self.main_window.focused_column().view.rootIndex() self.roo...
20,131
[ 0.002955665113404393, -0.0006478310097008944, -0.013329148292541504, -0.022902991622686386, -0.034889400005340576, 0.02010834775865078, -0.0014914782950654626, 0.04427766427397728, -0.04528198763728142, 0.04087169095873833, 0.002453502267599106, -0.028710614889860153, 0.04510732367634773, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotat...
class ShortcutDialog(FocusTreeAfterCloseDialog): def __init__(self, main_window, index): super(ShortcutDialog, self).__init__(main_window) self.setMinimumWidth(340) self.index = index item = main_window.item_model.getItem(index) self.shortcut_edit = QKeySequenceEdit() ...
20,132
[ -0.002107625361531973, -0.0007462062640115619, -0.026005778461694717, -0.006225119810551405, -0.032804399728775024, 0.02633945271372795, 0.0011743787908926606, 0.015328184701502323, -0.04863309860229492, 0.04162592813372612, -0.00392067851498723, -0.02633945271372795, 0.04118797928094864, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotation": null, "type_comment": null}}, {"_type...
def __init__(self, main_window, index): super(ShortcutDialog, self).__init__(main_window) self.setMinimumWidth(340) self.index = index item = main_window.item_model.getItem(index) self.shortcut_edit = QKeySequenceEdit() self.shortcut_edit.setKeySequence(QKeySequence(item....
20,133
[ 0.009056109935045242, 0.015973545610904694, -0.038537073880434036, 0.01285251323133707, -0.03951943293213844, 0.013599514029920101, 0.027444617822766304, -0.007649087347090244, -0.0003719016967806965, 0.03211081773042679, -0.00818631425499916, 0.02308540605008602, 0.02945026569068432, 0.03...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotat...
class RenameTagDialog(FocusTreeAfterCloseDialog): def __init__(self, main_window, tag): super(RenameTagDialog, self).__init__(main_window) self.tag = tag self.line_edit = QLineEdit(tag) buttonBox = QDialogButtonBox(QDialogButtonBox.Apply | QDialogButtonBox.Cancel) grid = QGr...
20,134
[ 0.02213977836072445, 0.011218411847949028, -0.05453752353787422, 0.027328170835971832, -0.03295222669839859, 0.007312265690416098, 0.02653604932129383, -0.019000999629497528, -0.0019307946786284447, 0.03610090911388397, -0.007812292315065861, 0.016258280724287033, 0.033605728298425674, 0.0...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotation": null, "type_comment": null}}, {"_type...
def __init__(self, main_window, tag): super(RenameTagDialog, self).__init__(main_window) self.tag = tag self.line_edit = QLineEdit(tag) buttonBox = QDialogButtonBox(QDialogButtonBox.Apply | QDialogButtonBox.Cancel) grid = QGridLayout() grid.addWidget(QLabel('Enter new ta...
20,135
[ 0.003782428801059723, 0.0021348237060010433, 0.00857388973236084, -0.005483368877321482, -0.01962711662054062, 0.015095120295882225, 0.02571590431034565, -0.0013600310776382685, -0.021206971257925034, 0.04949446767568588, -0.009790494106709957, 0.0018422043649479747, 0.025369949638843536, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotation": null, "type_comment": null}}], "kwarg...
def __init__(self, main_window): super(SettingsDialog, self).__init__(main_window) theme_dropdown = QComboBox() theme_dropdown.addItems(['Light', 'Dark']) current_palette_index = 0 if QApplication.palette() == self.main_window.light_palette else 1 theme_dropdown.setCurrentIndex(c...
20,136
[ -0.006429689936339855, 0.00045074400259181857, 0.0022800711449235678, -0.020071282982826233, -0.012348998337984085, 0.014445998705923557, 0.038211993873119354, 0.0016143569955602288, -0.025208378210663795, 0.047176945954561234, -0.022878378629684448, -0.00982483197003603, 0.02120299823582172...
15
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotat...
class SettingsDialog(FocusTreeAfterCloseDialog): def __init__(self, main_window): super(SettingsDialog, self).__init__(main_window) theme_dropdown = QComboBox() theme_dropdown.addItems(['Light', 'Dark']) current_palette_index = 0 if QApplication.palette() == self.main_window.light_pa...
20,137
[ 0.0022126692347228527, 0.015146954916417599, -0.043657004833221436, -0.03352385386824608, -0.021480176597833633, 0.022799598053097725, 0.026515087112784386, 0.023327365517616272, -0.04080705717206001, 0.030990563333034515, -0.026282869279384613, 0.014534743502736092, 0.013848644681274891, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"args": [{"_type": "Name", "_fields": {"id": "str", "ctx": {"_type": "Load", "_fields": {}}}}], "func": {"_type": "Name", "_fields": {"id": "pyqtSignal", "ctx": {"_t...
class DelayedExecutionTimer(QObject): # source: https://wiki.qt.io/Delay_action_to_wait_for_user_interaction triggered = pyqtSignal(str) def __init__(self, parent): super(DelayedExecutionTimer, self).__init__(parent) # The minimum delay is the time the class will wait after being triggered bef...
20,138
[ 0.03428146243095398, 0.0157400481402874, 0.039420660585165024, 0.0061065745539963245, -0.03990434855222702, -0.0011764728697016835, 0.00042637696606107056, -0.020697861909866333, -0.05751869082450867, 0.015185821801424026, 0.007613064255565405, 0.01916617900133133, 0.006605378817766905, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "text", "annotation": n...
class CustomHeaderView(QHeaderView): def __init__(self, text): super(CustomHeaderView, self).__init__(Qt.Horizontal) self.setSectionResizeMode(QHeaderView.Stretch) self.text = text def paintSection(self, painter, rect, logical_index): opt = QStyleOptionHeader() opt.rect ...
20,139
[ -0.020533550530672073, 0.02379187010228634, 0.002372014569118619, -0.024816498160362244, -0.0744289979338646, 0.04963299632072449, -0.04369015246629715, -0.004736344330012798, -0.009872294031083584, 0.05123141407966614, -0.0010957118356600404, 0.0375833660364151, 0.0366407074034214, 0.0123...
11
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "model", "annotation": ...
class SaveExpandTreeView(QTreeView): def __init__(self, model): super(SaveExpandTreeView, self).__init__() self.setModel(model) self.expanded.connect(self.expand) self.collapsed.connect(self.collapse) def expand(self, index): self.model().getItem(index).quicklink_expande...
20,140
[ -0.011934468522667885, 0.026774369180202484, 0.009881498292088509, 0.002675923751667142, -0.047899287194013596, 0.034219540655612946, -0.01101643219590187, -0.026592779904603958, -0.06698636710643768, 0.051046840846538544, -0.02122580073773861, 0.04414643719792366, 0.006708724889904261, 0....
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotat...
class ResizeTreeView(QTreeView): def __init__(self, main_window, model): super(ResizeTreeView, self).__init__() self.main_window = main_window self.setModel(model) self.setVerticalScrollMode(QAbstractItemView.ScrollPerPixel) self.setAnimated(True) self.setVerticalScro...
20,141
[ -0.009003431536257267, 0.00447757076472044, 0.018961936235427856, 0.0025687681045383215, -0.05065101012587547, 0.024853335693478584, 0.023973381146788597, -0.023951919749379158, -0.06494490057229996, 0.0551580935716629, -0.012737871147692204, 0.035069387406110764, 0.011514520272612572, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "main_window", "annotation": null, "type_comment": null}}, {"_type...
def __init__(self, main_window, model): super(ResizeTreeView, self).__init__() self.main_window = main_window self.setModel(model) self.setVerticalScrollMode(QAbstractItemView.ScrollPerPixel) self.setAnimated(True) self.setVerticalScrollBarPolicy(Qt.ScrollBarAlwaysOn) ...
20,142
[ -0.023973790928721428, 0.023667532950639725, 0.025823581963777542, -0.004318222403526306, -0.021964745596051216, -0.04248395934700966, 0.03853936865925789, 0.010210605338215828, -0.07222762703895569, 0.0217564906924963, -0.026313593611121178, -0.007001033052802086, -0.013463053852319717, -...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Assign", "_fields": {"value": {"_type": "Call", "_fields": {"a...
def start(): app = QApplication(sys.argv) app.setApplicationName('TreeNote') app.setOrganizationName('Jan Korte') app.setWindowIcon(QIcon(':/logo')) QFontDatabase.addApplicationFont(os.path.join(RESOURCE_FOLDER, 'SourceSansPro-Regular.otf')) locale = QLocale.system().name() qt_translator = ...
20,143
[ -0.02016783319413662, 0.00632926682010293, 0.06238267570734024, -0.0605182982981205, -0.0007574034971185029, -0.023023586720228195, -0.011001309379935265, -0.042643945664167404, -0.017652403563261032, -0.01797792874276638, 0.012769508175551891, -0.06895238906145096, -0.014641284942626953, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "orm", "annotation": nu...
class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Source.url' db.alter_column('hansard_source', 'url', self.gf('django.db.models.fields.URLField')(max_length=1000)) def backwards(self, orm): # Changing field 'Source.url' ...
20,144
[ -0.0014632642269134521, 0.016230639070272446, 0.017534103244543076, -0.000809182005468756, -0.006793055217713118, 0.0082281194627285, 0.005414390936493874, 0.0006196156609803438, -0.004204926546663046, 0.025718357414007187, -0.008127853274345398, -0.04735085368156433, 0.00361899402923882, ...
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "message", "annotation": null, "type_comment": null}}, {"_type": "...
def onMessage(self, message, metadata): if 'details' in message.keys(): if 'program' in message['details'].keys(): if 'Observium' == message['details']['program']: msg_unparsed = message['summary'] search = re.search(self.regex, msg_unparsed) ...
20,145
[ -0.013140037655830383, 0.01563849486410618, 0.004158312920480967, -0.08439235389232635, -0.00506631750613451, -0.006784007418900728, 0.013648983091115952, -0.03729179874062538, 0.0164828822016716, 0.01853022910654545, 0.05279149115085602, -0.027760643512010574, -0.008756169117987156, 0.029...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "fheader", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "filename", "annotation": null, "type_comment": null}}], "kwarg...
def process_file(fheader, filename): # This parser assumes the coding style rules are being followed with open(filename, "r") as cfile: found_start = False library, _ = os.path.splitext(os.path.basename(filename)) for line in cfile: if found_start: line = line...
20,146
[ -0.025151297450065613, -0.01777900569140911, 0.0593954361975193, -0.08058425784111023, -0.00691347848623991, -0.005855080205947161, -0.022565260529518127, -0.06231515482068062, 0.0129823237657547, 0.025693530216813087, 0.051679033786058426, -0.020584022626280785, -0.03499492257833481, 0.00...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "fheader", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "library", "annotation": null, "type_comment": null}}, {"_type"...
def add_module(fheader, library, format_name, protocol_name): lines = [] lines.append('.library_name = "' + library + '",') if format_name != "": lines.append('.format_name = "' + format_name + '",') if protocol_name != "": lines.append('.protocol_name = "' + protocol_name + '",') t...
20,147
[ -0.011148016899824142, 0.018689708784222603, 0.0697573646903038, -0.03790589049458504, -0.014201546087861061, 0.012089082971215248, 0.0018393569625914097, -0.008930258452892303, -0.042854711413383484, 0.024362429976463318, -0.012648457661271095, -0.031035445630550385, 0.03127235919237137, ...
14
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Constant", "_fields": {...
class Migration(migrations.Migration): dependencies = [ ('postgres_tests', '0001_setup_extensions'), ] operations = [ migrations.CreateModel( name='CharArrayModel', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=Tru...
20,148
[ 0.13876375555992126, 0.04963568598031998, -0.009472974576056004, -0.05387591943144798, 0.005534129682928324, 0.029037291184067726, -0.03186411410570145, -0.02693795971572399, 0.018260030075907707, 0.017137615010142326, 0.014581002295017242, -0.015911271795630455, -0.008527236059308052, -0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "obj", "annotation": null, "type_comment": null}}, {"_type": "arg"...
def _write_with_length(self, obj, stream): serialized = self.dumps(obj) if serialized is None: raise ValueError("serialized value should not be None") if len(serialized) > (1 << 31): raise ValueError("can not serialize object larger than 2G") write_int(len(seriali...
20,149
[ 0.029262356460094452, -0.03697441145777702, -0.01809617131948471, -0.02637305110692978, -0.019475651904940605, -0.016608070582151413, -0.020290305837988853, 0.0486619733273983, -0.04622887447476387, 0.01656462252140045, 0.015250314958393574, 0.004931369796395302, -0.004382836166769266, -0....
13
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "iterator", "annotation": null, "type_comment": null}}], "kwarg": ...
def _batched(self, iterator): if self.batchSize == self.UNLIMITED_BATCH_SIZE: yield list(iterator) elif hasattr(iterator, "__len__") and hasattr(iterator, "__getslice__"): n = len(iterator) for i in xrange(0, n, self.batchSize): yield iterator[i: i + s...
20,150
[ 0.13350053131580353, 0.041693367063999176, 0.01518537849187851, -0.02879703789949417, 0.0016439756145700812, 0.05771670117974281, -0.03145396709442139, -0.011905091814696789, -0.010249619372189045, 0.03595031052827835, 0.023932810872793198, -0.023564929142594337, -0.0030248130206018686, 0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "stream", "annotation": null, "type_comment": null}}], "kwarg": nu...
def _read_with_length(self, stream): length = read_int(stream) if length == SpecialLengths.END_OF_DATA_SECTION: raise EOFError elif length == SpecialLengths.NULL: return None obj = stream.read(length) if len(obj) < length: raise EOFError ...
20,151
[ 0.04903492331504822, -0.04455392435193062, -0.05539367347955704, -0.04120384529232979, 0.017187828198075294, -0.00848188903182745, 0.012685492634773254, -0.0029339869506657124, 0.02603246457874775, -0.03631742298603058, -0.000011815131983894389, -0.02257569506764412, 0.06179509684443474, 0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "stream", "annotation": null, "type_comment": null}}], "kwarg": nu...
def _load_stream_without_unbatching(self, stream): key_batch_stream = self.key_ser._load_stream_without_unbatching(stream) val_batch_stream = self.val_ser._load_stream_without_unbatching(stream) for (key_batch, val_batch) in zip(key_batch_stream, val_batch_stream): # For double-zippe...
20,152
[ 0.07681194692850113, -0.02058926597237587, 0.00023073269403539598, -0.06504665315151215, 0.004113634116947651, 0.01697288453578949, 0.0010058061452582479, 0.019697226583957672, -0.0007270434289239347, -0.011246947571635246, 0.03797200694680214, -0.007672756444662809, -0.04496368020772934, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "iterator", "annotation": null, "type_comment": null}}, {"_type": ...
def dump_stream(self, iterator, stream): batch, best = 1, self.bestSize iterator = iter(iterator) while True: vs = list(itertools.islice(iterator, batch)) if not vs: break bytes = self.serializer.dumps(vs) write_int(len(bytes), str...
20,153
[ 0.05627012252807617, -0.010288693010807037, -0.03201422095298767, -0.025192249566316605, 0.022294025868177414, 0.027332475408911705, -0.03743166849017143, -0.005328272003680468, 0.004617650061845779, -0.018537482246756554, 0.02150258794426918, -0.03045363910496235, -0.0003995507431682199, ...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "obj", "annotation": null, "type_comment": null}}], "kwarg": null,...
def dumps(self, obj): try: return cloudpickle.dumps(obj, pickle_protocol) except pickle.PickleError: raise except Exception as e: emsg = _exception_message(e) if "'i' format requires" in emsg: msg = "Object too large to serialize: %...
20,154
[ 0.0717727467417717, -0.022048918530344963, -0.04455288127064705, -0.0271164458245039, 0.017963869497179985, 0.049351517111063004, -0.04298091307282448, -0.02891593612730503, -0.010316039435565472, -0.036796458065509796, -0.010952065698802471, -0.05088211968541145, 0.009943731129169464, -0....
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "obj", "annotation": nu...
class CloudPickleSerializer(PickleSerializer): def dumps(self, obj): try: return cloudpickle.dumps(obj, pickle_protocol) except pickle.PickleError: raise except Exception as e: emsg = _exception_message(e) if "'i' format requires" in emsg: ...
20,155
[ 0.13147136569023132, 0.03150271996855736, 0.016402417793869972, -0.04005046188831329, -0.004890797659754753, 0.03383392468094826, -0.02242993749678135, -0.01129897590726614, 0.010647919960319996, 0.03446397930383682, 0.03870634362101555, -0.008521486073732376, -0.012853110209107399, 0.0180...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "stream", "annotation": null, "type_comment": null}}], "kwarg": nu...
def loads(self, stream): length = read_int(stream) if length == SpecialLengths.END_OF_DATA_SECTION: raise EOFError elif length == SpecialLengths.NULL: return None s = stream.read(length) return s.decode("utf-8") if self.use_unicode else s
20,156
[ 0.0693858191370964, -0.014449655078351498, 0.003371967701241374, -0.01873188279569149, 0.008587353862822056, 0.015663335099816322, 0.008249584585428238, 0.031028972938656807, -0.02164013311266899, 0.03533409908413887, 0.052531708031892776, 0.007614120841026306, -0.015468687750399113, 0.007...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "bytes", "annotation": null, "type_comment": null}}], "kwarg": nul...
def write(self, bytes): byte_pos = 0 byte_remaining = len(bytes) while byte_remaining > 0: new_pos = byte_remaining + self.current_pos if new_pos < self.buffer_size: # just put it in our buffer self.buffer[self.current_pos:new_pos] = bytes[...
20,157
[ 0.01917359046638012, -0.00032923195976763964, 0.03065764158964157, -0.007708386518061161, -0.01922384835779667, -0.0016412518452852964, 0.009555383585393429, -0.017452239990234375, 0.004890773445367813, 0.04352379962801933, 0.048047058284282684, -0.025166908279061317, 0.000429945153882727, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def process_config(self): super(IPVSCollector, self).process_config() # Verify the --exact flag works self.statcommand = [self.config['bin'], '--list', '--stats', '--numeric', '--exact'] self.concommand = [self.config['bin'], '--list', '--numeric'] if...
20,158
[ 0.08620800822973251, -0.008275968953967094, 0.021305693313479424, -0.02916293777525425, -0.008737796917557716, 0.011065413244068623, 0.010498903691768646, 0.027857502922415733, 0.02374414913356304, 0.03472951054573059, 0.06192198023200035, 0.02085002325475216, -0.036502934992313385, 0.0203...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def close(self): # if there is anything left in the buffer, write it out first if self.current_pos > 0: write_int(self.current_pos, self.wrapped) self.wrapped.write(self.buffer[:self.current_pos]) # -1 length indicates to the receiving end that we're done. write_i...
20,159
[ 0.013426149263978004, -0.03018248826265335, 0.05193411558866501, -0.04960157722234726, 0.016960086300969124, 0.020304327830672264, -0.011255201883614063, 0.0008053230121731758, 0.01466970145702362, 0.018070148304104805, 0.02759702317416668, -0.0353253148496151, 0.014964781701564789, 0.0012...
18
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def collect(self): if not os.access(self.config['bin'], os.X_OK): self.log.error("%s does not exist, or is not executable", self.config['bin']) return False if (str_to_bool(self.config['use_sudo']) and not os.access(self.config['sudo_cm...
20,160
[ 0.001737118000164628, -0.01057694386690855, 0.059059396386146545, 0.012788534164428711, -0.00638381065800786, -0.019857257604599, -0.006300156936049461, -0.015517731197178364, -0.0024651652202010155, 0.020829729735851288, -0.028755903244018555, -0.010221416130661964, 0.017807746306061745, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def get_default_config_help(self): config_help = super(IPVSCollector, self).get_default_config_help() config_help.update({ 'bin': 'Path to ipvsadm binary', 'use_sudo': 'Use sudo?', 'sudo_cmd': 'Path to sudo', }) return config_help
20,161
[ 0.01220628246665001, 0.00020608131308108568, -0.015686627477407455, 0.022847913205623627, -0.0116345826536417, 0.012035774998366833, 0.02784276008605957, -0.046337734907865524, -0.014693675562739372, 0.007672806736081839, 0.0024334832560271025, -0.032556772232055664, 0.05688909813761711, -...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "spreadsheet", "annotation": null, "type_comment": null}}, {"_type...
def __init__(self, spreadsheet, element): self.spreadsheet = spreadsheet self.client = spreadsheet.client self._id = element.find(_ns('id')).text.split('/')[-1] self._title = element.find(_ns('title')).text self._element = element self.version = self._get_link( ...
20,162
[ 0.009686711244285107, 0.029527336359024048, -0.008093023672699928, -0.019591450691223145, -0.010963737033307552, 0.008508317172527313, 0.029672689735889435, 0.0003291522152721882, 0.022841118276119232, 0.01444181613624096, -0.000452280102763325, -0.003888181410729885, 0.028053047135472298, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "text", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "encoding", "annotation": null, "type_comment": null}}, {"_type": ...
def _escape_attrib(text, encoding=None, replace=None): try: text = _elementtree_escape_attrib(text) except TypeError as e: if str(e) == '_escape_attrib() takes exactly 2 arguments (1 given)': text = _elementtree_escape_attrib(text, encoding) entities = {'\n': '&#10;', '\r': '&#13...
20,163
[ 0.00503760389983654, -0.0017371956491842866, 0.051752086728811264, -0.03789669647812843, -0.009569074027240276, -0.02783730812370777, -0.04858875647187233, -0.02095179259777069, 0.02410457842051983, 0.023556267842650414, 0.032308146357536316, 0.008477725088596344, 0.004136054310947657, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "index", "annotation": null, "type_comment": null}}, {"_type": "ar...
def _list_values(self, index, cell_tuple, position): cells_list = self._fetch_cells() cells = dict(map(cell_tuple, filter(position, cells_list))) try: last_index = max(cells.keys()) except ValueError: return [] vals = [] for i in range(1, last_in...
20,164
[ 0.00015535857528448105, 0.018106751143932343, -0.0026926472783088684, -0.006046844180673361, -0.001969165401533246, 0.001363918068818748, 0.046032585203647614, -0.04398319125175476, -0.0038229115307331085, 0.02670970931649208, 0.012600407004356384, -0.0363936685025692, 0.008495984598994255, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "cell_list", "annotation": null, "type_comment": null}}], "kwarg":...
def _create_update_feed(self, cell_list): feed = Element('feed', {'xmlns': ATOM_NS, 'xmlns:batch': BATCH_NS, 'xmlns:gs': SPREADSHEET_NS}) id_elem = SubElement(feed, 'id') id_elem.text = construct_url('cells', self) for ce...
20,165
[ 0.009047284722328186, 0.04681955650448799, 0.04018983244895935, -0.016185667365789413, 0.01689436100423336, -0.029010750353336334, -0.015785597264766693, -0.01903187483549118, 0.019717708230018616, 0.027021832764148712, 0.009864569641649723, -0.037972304970026016, 0.03205127641558647, -0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "func", "annotation": null, "type_comment": null}}, {"_type": "arg...
def _finder(self, func, query): cells = self._fetch_cells() if isinstance(query, basestring): match = lambda x: x.value == query else: match = lambda x: query.search(x.value) return func(match, cells)
20,166
[ 0.020305970683693886, 0.00626721465960145, 0.001379375229589641, 0.033693015575408936, 0.021697595715522766, -0.016189895570278168, 0.042297571897506714, -0.041435156017541885, -0.0233636274933815, 0.01915935054421425, 0.029263334348797798, -0.008673158474266529, -0.012436427175998688, -0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "worksheet", "annotation": null, "type_comment": null}}, {"_type":...
def __init__(self, worksheet, element): self.element = element cell_elem = element.find(_ns1('cell')) self._row = int(cell_elem.get('row')) self._col = int(cell_elem.get('col')) self.input_value = cell_elem.get('inputValue') #: Value of the cell. self.value = cel...
20,167
[ -0.04505670443177223, 0.03490090370178223, 0.01650962233543396, 0.0015505963237956166, -0.020182723179459572, 0.0351586639881134, 0.018172184005379677, -0.04541756957769394, 0.003305790713056922, -0.01607142761349678, 0.03711765259504318, -0.04820139333605766, 0.0022215815261006355, 0.0299...
9
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Tuple", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "List", "_fields": {"ctx": {"_type": "Load", "_fields": {}}, "elts": [{"_type": "Name", "_fields": {"id"...
class LibYkPiv(CLibrary): ykpiv_strerror = [ykpiv_rc], c_char_p ykpiv_strerror_name = [ykpiv_rc], c_char_p ykpiv_init = [POINTER(POINTER(ykpiv_state)), c_int], ykpiv_rc ykpiv_done = [POINTER(ykpiv_state)], ykpiv_rc ykpiv_connect = [POINTER(ykpiv_state), c_char_p], ykpiv_rc ykpiv_disconnect = [...
20,168
[ -0.007267733104526997, -0.008090788498520851, 0.06779076159000397, -0.032942917197942734, -0.014048879966139793, 0.002927281428128481, 0.015591462142765522, 0.013841822743415833, 0.0488656722009182, 0.04642238840460777, -0.018241804093122482, -0.027828585356473923, 0.04269534349441528, -0....
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "return_tuples", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [{"_type": "Constant", "_fields": {"kind": null, ...
def _get_backends(return_tuples=False): backends = [] for backend_path in settings.AUTHENTICATION_BACKENDS: backend = load_backend(backend_path) backends.append((backend, backend_path) if return_tuples else backend) if not backends: raise ImproperlyConfigured( 'No authent...
20,169
[ 0.023439588025212288, 0.017019178718328476, 0.018932845443487167, 0.01366743165999651, 0.021944889798760414, 0.01729094237089157, -0.020302986726164818, 0.00826613511890173, -0.01080259308218956, 0.03485364839434624, 0.01905740424990654, -0.009675906971096992, -0.003272483590990305, 0.0128...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "parse_rule", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyarg...
def test_rule_valid(parse_rule): cases = [( 'client_ip4 in 1.2.3.4/32 => prod', Rule( Request.client_ip4.in_(types.IPNetwork('1.2.3.4/32')), Upstream(Selection(Server('http', 'prod'), 1)) ), )] for raw, expected in cases: parsed = parse_rule(raw) ...
20,170
[ 0.010905233211815357, 0.02599174715578556, 0.03962046280503273, 0.005136195570230484, 0.013187986798584461, 0.011142549104988575, -0.018725359812378883, -0.0016442605992779136, -0.0141598517075181, 0.037902750074863434, 0.022929241880774498, -0.0343543104827404, 0.021324533969163895, 0.017...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "parse_rule", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyarg...
def test_rule_invalid(parse_rule): cases = [ ('client_ip4 in 1.2.3.4/32 => prod,wat', exc.ParseException), ('client !in 1.2.3.4/32 => prod', exc.ParseException), ] for raw, ex in cases: with pytest.raises(ex): parse_rule(raw)
20,171
[ -0.015895547345280647, -0.018266849219799042, 0.07504782825708389, -0.03645552694797516, -0.021367784589529037, 0.01151775661855936, -0.022019241005182266, -0.0032703133765608072, -0.034266628324985504, 0.04875503107905388, -0.00820184126496315, -0.04283980280160904, -0.005644873715937138, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []}}, "body": [{"_type": "Return", "_fields": {"value": {"_type": "List", "_fields": {"c...
def rules(): return [ Rule( Request.client_ip4.in_(types.IPNetwork('1.2.3.4/32')), Upstream(Selection(Server('http', 'me'), 1)) ), Rule( Request.method.in_(['GET', 'POST']), Upstream( Selection(Server('https', 'prod1'), 1), ...
20,172
[ 0.031823888421058655, 0.004262750502675772, -0.015586499124765396, -0.026175089180469513, 0.022943884134292603, 0.018666604533791542, 0.0004118915239814669, -0.017690269276499748, 0.03094053640961647, 0.02115393616259098, 0.017934352159500122, -0.02354828268289566, 0.030080432072281837, 0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "parse_rule", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyarg...
def test_rule_match(parse_rule): content = json.dumps({'hi': 'there'}) req = Request(environ={ 'METHOD': 'PATCH', 'REMOTE_ADDR': '1.2.3.4', 'PATH_INFO': '/a/b/c/123', 'HTTP_X_1': '5', 'CONTENT_TYPE': 'application/json', 'CONTENT_LENGTH': str(len(content)), ...
20,173
[ 0.02886616438627243, 0.02622087299823761, 0.0665963739156723, -0.02045460231602192, 0.006723449565470219, 0.012425909750163555, -0.005815580952912569, -0.008939461782574654, -0.013249662704765797, 0.0596814900636673, 0.03733573853969574, -0.033576641231775284, 0.03585066273808479, 0.050214...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "rules", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def test_rules_match_miss(rules): req = Request(environ={ 'REQUEST_METHOD': 'PATCH', 'REMOTE_ADDR': '11.22.33.44', }) rules = Rules(rules) assert rules.match(req) is None rules.compile = True assert rules.match(req) is None rules.compile = False assert rules.match(req) is...
20,174
[ 0.05251249670982361, 0.06103065237402916, 0.019843433052301407, -0.03579077497124672, 0.0074533866718411446, 0.03729113191366196, -0.025385074317455292, -0.04193739965558052, -0.012668337672948837, 0.05812673643231392, 0.02720002271234989, -0.02127119153738022, 0.006322069093585014, 0.0481...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "rules", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def test_rules_load_parse_error(rules): raw = '\n'.join([str(rule) for rule in rules] + ['junk']) assert Rules(strict=False).loads(raw) == rules with pytest.raises(exc.ParseException): Rules().loads(raw) assert Rules().loads(raw, strict=False) == rules with pytest.raises(exc.ParseException):...
20,175
[ 0.04655139893293381, 0.021630950272083282, 0.0695778951048851, -0.017743360251188278, -0.03578576445579529, 0.058114487677812576, -0.007837480865418911, -0.006653760094195604, -0.014566002413630486, 0.014104974456131458, 0.01493980921804905, -0.010715792886912823, 0.018715256825089455, 0.0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "rules", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def test_rules_enable_disable(rules): rules = Rules(rules) assert rules.disabled == set() with pytest.raises(IndexError): rules.disable(100) rules.disable(1) assert rules.disabled == set([rules[1]]) assert rules[1] in rules.disabled rules.enable(1) assert rules.disabled == set() ...
20,176
[ 0.023594027385115623, -0.003373746294528246, 0.05362480878829956, -0.019765270873904228, 0.011497371830046177, 0.019731976091861725, -0.015514793805778027, -0.009072491899132729, -0.031140565872192383, 0.05824151635169983, 0.026568252593278885, -0.016635676845908165, 0.03191741555929184, 0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "rules", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def test_rules_match_hit(rules): req = Request(environ={ 'REQUEST_METHOD': 'PATCH', 'REMOTE_ADDR': '1.2.3.4', }) rules = Rules(rules) assert str(rules.match(req)) == 'http://me,1' rules.compile = True assert str(rules.match(req)) == 'http://me,1' rules.compile = False ass...
20,177
[ 0.03690848499536514, 0.0317961610853672, 0.06159726902842522, 0.0035661577712744474, -0.01198278833180666, 0.03952699154615402, 0.014900553971529007, -0.04426524415612221, -0.02230718918144703, 0.044240307062864304, 0.01665869541466236, -0.027057910338044167, 0.025935692712664604, 0.049452...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "rules", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def test_rules_match_error_propagate(rules): req = Request(environ={ 'REQUEST_METHOD': 'PATCH', 'REMOTE_ADDR': '1.2.3.4', }) rs = Rules(rules, compile=False) with mock.patch('rump.Rule.match') as patch: patch.side_effect = Exception('boom') with pytest.raises(Exception):...
20,178
[ 0.04938415065407753, 0.0407320074737072, 0.057019852101802826, -0.013449247926473618, -0.00596229312941432, 0.034732528030872345, 0.006315568462014198, -0.020514750853180885, -0.021605566143989563, 0.035203561186790466, 0.009395879693329334, -0.021320465952157974, 0.03515397757291794, 0.05...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "rules", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": [...
def test_rules_match_error_disable(rules): req = Request(environ={ 'REQUEST_METHOD': 'PATCH', 'REMOTE_ADDR': '1.2.3.4', }) rs = Rules(rules, compile=False) with mock.patch('rump.Rule.match') as patch: patch.side_effect = Exception('boom') rs.match(req, error='disable') ...
20,179
[ 0.009333900175988674, -0.006336428225040436, 0.020532412454485893, -0.05507109314203262, -0.009545295499265194, 0.021117813885211945, -0.04913035407662392, -0.06868709623813629, -0.02092267945408821, 0.056588802486658096, -0.03837631270289421, -0.015274640172719955, 0.01798483170568943, -0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": "Finds the absolute paths for the given static file(s)."}}, "targets": [{"_type": "Name", "_fields": {"id": "help", "ctx": {"_type": "Stor...
class Command(LabelCommand): help = "Finds the absolute paths for the given static file(s)." args = "[file ...]" label = 'static file' option_list = LabelCommand.option_list + ( make_option('--first', action='store_false', dest='all', default=True, help="Only return the first...
20,180
[ 0.0046663181856274605, 0.040433645248413086, 0.02718130312860012, -0.04556659609079361, -0.02552475966513157, 0.012424072250723839, -0.02893117256462574, -0.01443058904260397, -0.006492014974355698, 0.07293455302715302, 0.006678667850792408, 0.010131743736565113, 0.015095539391040802, -0.0...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "path", "annotation": null, "type_comment": null}}], "kwarg": {"_t...
def handle_label(self, path, **options): verbosity = int(options.get('verbosity', 1)) result = finders.find(path, all=options['all']) if result: if not isinstance(result, (list, tuple)): result = [result] output = '\n '.join((os.path.realpath(path) for pa...
20,181
[ 0.035817280411720276, 0.01569288782775402, 0.01378149539232254, -0.04808914288878441, 0.040833160281181335, -0.0059502702206373215, 0.00963000301271677, -0.034965068101882935, 0.017506882548332214, 0.0060354918241500854, 0.057268690317869186, -0.017616452649235725, -0.0036219037137925625, ...
10
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "filename", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs"...
def load_data(filename): with open(filename, 'r') as f: results = {} totals = {} counts = {} records = json.load(f) for record in records: key = record.get('testcase') value = record.get('domComplete') - record.get('domLoading') totals[key]...
20,182
[ -0.01656976528465748, -0.014199165627360344, 0.0413755364716053, -0.008901972323656082, -0.022190777584910393, -0.019954591989517212, -0.03739194944500923, 0.008229894563555717, 0.02335163950920105, -0.017950579524040222, 0.037098679691553116, 0.0112298047170043, -0.013087182305753231, -0....
10
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "Assign", "_fields": {"value": {"_type": "Constant", "_fields": {"kind": null, "value": 0}}, "targets": [{"_type": "Name", "_fields": {"id": "firstAddrnServices", "ctx": {"_type": "Store", "_fields": {}}}}], "type_comment": nu...
class P2PIgnoreInv(P2PInterface): firstAddrnServices = 0 def on_inv(self, message): # The node will send us invs for other blocks. Ignore them. pass def on_addr(self, message): self.firstAddrnServices = message.addrs[0].nServices def wait_for_addr(self, timeout=5): test_f...
20,183
[ -0.011938848532736301, -0.02789825201034546, 0.040489956736564636, -0.053779762238264084, -0.012953683733940125, 0.007174944505095482, -0.004935198463499546, 0.032242003828287125, -0.02153776027262211, 0.040102120488882065, 0.02709672786295414, 0.03630134090781212, -0.021460194140672684, 0...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class NodeNetworkLimitedTest(BitcoinTestFramework): def set_test_params(self): self.setup_clean_chain = True self.num_nodes = 3 self.extra_args = [['-prune=550', '-addrmantest'], [], []] def disconnect_all(self): disconnect_nodes(self.nodes[0], 1) disconnect_nodes(self.n...
20,184
[ 0.012972097843885422, -0.023966504260897636, 0.059330761432647705, -0.034739721566438675, -0.023901449516415596, 0.006765788421034813, -0.007026011124253273, 0.009003703482449055, 0.006456774193793535, 0.009777865372598171, 0.039579860866069794, 0.04559100419282913, -0.0344274528324604, -0...
12
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def run_test(self): node = self.nodes[0].add_p2p_connection(P2PIgnoreInv()) expected_services = NODE_WITNESS | NODE_NETWORK_LIMITED | NODE_ACP self.log.info("Check that node has signalled expected services.") assert_equal(node.nServices, expected_services) self.log.info("Check...
20,185
[ -0.00045818949001841247, 0.04262940213084221, 0.0035314783453941345, -0.07134078443050385, -0.02794545516371727, 0.012025080621242523, -0.011587406508624554, -0.02998063713312149, -0.009114551357924938, -0.009667114354670048, 0.028842685744166374, 0.002238973742350936, 0.007041072938591242, ...
11
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "module", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "pkgng_path", "annotation": null, "type_comment": null}}, {"_typ...
def annotate_packages(module, pkgng_path, packages, annotation): annotate_c = 0 annotations = map(lambda _annotation: re.match(r'(?P<operation>[\+-:])(?P<tag>\w+)(=(?P<value>\w+))?', _annotation).groupdict(), re.split(r',', annotation)) operation = { '+': annotation_add,...
20,186
[ -0.007101722061634064, -0.027376824989914894, 0.021345224231481552, -0.01193730253726244, -0.019868798553943634, -0.007050218991935253, 0.0030301064252853394, -0.05429584160447121, -0.02620941773056984, 0.0493057519197464, -0.00535347405821085, -0.0036939256824553013, 0.043674733489751816, ...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}, {"_type": "arg", "_fields": {"arg": "context_model", "annotation": null, "type_comment": null}}, {"_ty...
def __init__(self, context_model=None, versions_tab=False, parent=None): super(PackageTabWidget, self).__init__(parent) ContextViewMixin.__init__(self, context_model) self.variant = None self.tabs = {} self.summary_widget = VariantSummaryWidget() self.tools_widget = Vari...
20,187
[ 0.00209116586484015, -0.022756630554795265, 0.026387251913547516, -0.013181760907173157, 0.05528983473777771, 0.04805232211947441, 0.016990352421998978, -0.002430794993415475, 0.011787650175392628, 0.026933031156659126, 0.03495361655950546, 0.017263242974877357, 0.013181760907173157, 0.040...
13
{"_type": "Module", "_fields": {"body": [{"_type": "ClassDef", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs...
class SparseReshapeTest(tf.test.TestCase): def _SparseTensorPlaceholder(self): return tf.SparseTensor( tf.placeholder(tf.int64), tf.placeholder(tf.float64), tf.placeholder(tf.int64)) def _SparseTensorValue_5x6(self): ind = np.array([ [0, 0], [1, 0], [1, 3], [1, 4], [3, 2], [3, 3] ...
20,188
[ 0.03460980951786041, -0.01470604632049799, 0.010195525363087654, -0.011926015838980675, -0.017317399382591248, -0.0025238923262804747, 0.005463227164000273, -0.02020363323390484, -0.013019286096096039, 0.0004291085642762482, -0.025913627818226814, -0.05202716588973999, -0.023327263072133064,...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def __init__(self): super(BypassStorySet, self).__init__() urls_list = [ 'http://check.googlezip.net/block/', ] for url in urls_list: self.AddStory(BypassPage(url, self))
20,189
[ -0.006731324829161167, -0.0032260180450975895, 0.026111101731657982, -0.03315484896302223, 0.02281644567847252, -0.05017724260687828, -0.005126599688082933, -0.00012181886995676905, 0.00191359908785671, 0.014778618700802326, 0.004224829375743866, 0.03298443555831909, 0.016653165221214294, ...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def _SparseTensorValue_5x6(self): ind = np.array([ [0, 0], [1, 0], [1, 3], [1, 4], [3, 2], [3, 3] ]).astype(np.int64) val = np.array([0, 10, 13, 14, 32, 33]).astype(np.float64) shape = np.array([5, 6]).astype(np.int64) return tf.SparseTensorValue(ind, val, shape)
20,190
[ -0.015720488503575325, -0.0216399896889925, 0.026105089113116264, -0.03066282719373703, 0.033164024353027344, -0.06399359554052353, -0.006271521095186472, 0.0034785170573741198, -0.0072766318917274475, 0.03179299831390381, 0.015451841987669468, 0.03964861109852791, 0.029421491548419, 0.001...
7
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def _SparseTensorValue_2x3x4(self): ind = np.array([ [0, 0, 1], [0, 1, 0], [0, 1, 2], [1, 0, 3], [1, 1, 1], [1, 1, 3], [1, 2, 2] ]) val = np.array([1, 10, 12, 103, 111, 113, 122]) shape = np.array([2, 3, 4]) return tf.SparseTensorValue(ind, val, shape)
20,191
[ -0.011966229416429996, -0.06053772568702698, 0.03678761050105095, -0.011305238120257854, 0.05214996635913849, 0.02990417741239071, 0.02473020739853382, 0.022940970957279205, 0.01857614703476429, -0.009874988347291946, 0.0011895002098754048, 0.0024573507253080606, 0.009629965759813786, 0.03...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testFeedSameShape(self): with self.test_session(use_gpu=False) as sess: sp_input = self._SparseTensorPlaceholder() input_val = self._SparseTensorValue_5x6() sp_output = tf.sparse_reshape(sp_input, [5, 6]) output_val = sess.run(sp_output, {sp_input: input_val}) self.assertAllEqual(...
20,192
[ -0.025777539238333702, -0.05401213467121124, 0.03422636538743973, -0.0026820171624422073, 0.04681339114904404, 0.02769576758146286, 0.02058323659002781, 0.012468484230339527, 0.019925866276025772, -0.008874500170350075, -0.00798543356359005, 0.020626341924071312, 0.013492257334291935, 0.02...
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testSameShape(self): with self.test_session(use_gpu=False) as sess: input_val = self._SparseTensorValue_5x6() sp_output = tf.sparse_reshape(input_val, [5, 6]) output_val = sess.run(sp_output) self.assertAllEqual(output_val.indices, input_val.indices) self.assertAllEqual(output_val...
20,193
[ -0.011236879974603653, -0.0401792973279953, 0.04768223688006401, -0.020767483860254288, 0.03167128935456276, 0.02058049477636814, 0.016536854207515717, 0.039922188967466354, 0.023350272327661514, 0.009139095433056355, -0.0017515625804662704, 0.007286734413355589, 0.009267650544643402, 0.03...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testFeedNewShapeSameRank(self): with self.test_session(use_gpu=False) as sess: sp_input = self._SparseTensorPlaceholder() input_val = self._SparseTensorValue_5x6() sp_output = tf.sparse_reshape(sp_input, [3, 10]) output_val = sess.run(sp_output, {sp_input: input_val}) self.assertA...
20,194
[ -0.01726006530225277, -0.047998107969760895, 0.030852653086185455, -0.003890964202582836, 0.06289723515510559, 0.029408583417534828, 0.04288656264543533, 0.007552710827440023, 0.008819136768579483, -0.010022527538239956, 0.024663785472512245, -0.0029081949032843113, 0.02363230660557747, 0....
8
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testFeedSameShapeWithInferredDim(self): with self.test_session(use_gpu=False) as sess: sp_input = self._SparseTensorPlaceholder() input_val = self._SparseTensorValue_5x6() sp_output = tf.sparse_reshape(sp_input, [-1, 6]) output_val = sess.run(sp_output, {sp_input: input_val}) self...
20,195
[ -0.01690944842994213, -0.03654545545578003, 0.03752605989575386, -0.010870358906686306, 0.03733472153544426, 0.0220635998994112, 0.03379497677087784, 0.024897785857319832, 0.017052950337529182, 0.005632496438920498, 0.018368396908044815, 0.0039373659528791904, 0.017435625195503235, 0.03566...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testFeedNewShapeSameRankWithInferredDim(self): with self.test_session(use_gpu=False) as sess: sp_input = self._SparseTensorPlaceholder() input_val = self._SparseTensorValue_5x6() sp_output = tf.sparse_reshape(sp_input, [3, -1]) output_val = sess.run(sp_output, {sp_input: input_val}) ...
20,196
[ -0.0027057286351919174, -0.03551540896296501, 0.026857076212763786, -0.04510224610567093, 0.010718457400798798, 0.014577565714716911, 0.00424211798235774, 0.018697816878557205, 0.0233983863145113, 0.007973557338118553, -0.000027429050533100963, 0.04171319305896759, -0.016759557649493217, 0...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testUpRank(self): with self.test_session(use_gpu=False) as sess: input_val = self._SparseTensorValue_5x6() sp_output = tf.sparse_reshape(input_val, [2, 3, 5]) output_val = sess.run(sp_output) self.assertAllEqual(output_val.indices, np.array([ [0, 0, 0], [0, 1, 1], [0, 1, 4], [...
20,197
[ -0.01165011990815401, -0.033140748739242554, 0.013412422500550747, -0.029308626428246498, 0.03832120820879936, 0.015162897296249866, 0.03382674604654312, 0.02526361122727394, 0.016582202166318893, 0.009923300705850124, 0.036239560693502426, 0.02358410134911537, -0.00867549516260624, -0.000...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testFeedUpRankWithInferredDim(self): with self.test_session(use_gpu=False) as sess: sp_input = self._SparseTensorPlaceholder() input_val = self._SparseTensorValue_5x6() sp_output = tf.sparse_reshape(sp_input, [2, -1, 5]) output_val = sess.run(sp_output, {sp_input: input_val}) self...
20,198
[ -0.0031564966775476933, -0.03648282587528229, 0.021124694496393204, -0.04576048254966736, 0.01996207982301712, 0.017299694940447807, 0.018160028383135796, 0.03794771805405617, 0.029367627575993538, 0.013649087399244308, 0.01716018095612526, 0.02787948213517666, -0.022531457245349884, -0.00...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testFeedUpRank(self): with self.test_session(use_gpu=False) as sess: sp_input = self._SparseTensorPlaceholder() input_val = self._SparseTensorValue_5x6() sp_output = tf.sparse_reshape(sp_input, [2, 3, 5]) output_val = sess.run(sp_output, {sp_input: input_val}) self.assertAllEqual(...
20,199
[ -0.003709835698828101, -0.043473001569509506, 0.03803887963294983, -0.05629196763038635, 0.024012332782149315, 0.01121659204363823, 0.028494324535131454, 0.03906067833304405, 0.044216129928827286, 0.008127965033054352, 0.020552141591906548, 0.028889110311865807, -0.014049768447875977, 0.00...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testFeedDownRank(self): with self.test_session(use_gpu=False) as sess: sp_input = self._SparseTensorPlaceholder() input_val = self._SparseTensorValue_2x3x4() sp_output = tf.sparse_reshape(sp_input, [6, 4]) output_val = sess.run(sp_output, {sp_input: input_val}) self.assertAllEqual...
20,200
[ -0.00826775562018156, -0.039036963135004044, 0.030299445614218712, -0.0385906919836998, 0.04284200817346573, 0.008508507162332535, 0.03741629421710968, 0.02750438079237938, 0.031051060184836388, 0.006124481093138456, 0.035090986639261246, 0.022231338545680046, -0.000604447559453547, 0.0048...
9
{"_type": "Module", "_fields": {"body": [{"_type": "FunctionDef", "_fields": {"args": {"_type": "arguments", "_fields": {"args": [{"_type": "arg", "_fields": {"arg": "self", "annotation": null, "type_comment": null}}], "kwarg": null, "vararg": null, "defaults": [], "kwonlyargs": [], "kw_defaults": [], "posonlyargs": []...
def testFeedDownRankWithInferredDim(self): with self.test_session(use_gpu=False) as sess: sp_input = self._SparseTensorPlaceholder() input_val = self._SparseTensorValue_2x3x4() sp_output = tf.sparse_reshape(sp_input, [6, -1]) output_val = sess.run(sp_output, {sp_input: input_val}) sel...