Step # | Illustration | State of Queue | Pool of workers | Description |
---|---|---|---|---|
1 | 1, | r,y,g,b | Initial state, node 1 is scheduled for processing | |
2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; -*- lexical-binding: t -*- | |
(defun dowrap (list beg_i l lambd) | |
(let (i) | |
(dotimes (j l) | |
(setq i (+ beg_i j)) | |
(setq i (% i (length list))) | |
(apply lambd (list i j)) | |
) | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun read-file-as-string (file-path) | |
(with-temp-buffer | |
(insert-file-contents file-path) | |
(mapcar 'string-trim (split-string (buffer-string) "," t)) | |
) | |
) | |
(defun calculate-dist (x y z) | |
(/ | |
(+ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _is_node_rdy(task, graph): | |
tasks = session.query(Task).filter(Task.id.in_(list(graph.predecessors(task.id)))).all() | |
for dep_task in tasks: | |
if not dep_task.celery_task_uid or \ | |
not AsyncResult(dep_task.celery_task_uid).state == SUCCESS: | |
return False | |
return True | |
@app.task(bind=True) | |
def run(self, workflow_id, cur_task_id=None): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def _is_node_rdy(task, graph): | |
tasks = session.query(Task).filter(Task.id.in_(list(graph.predecessors(task.id)))).all() | |
for dep_task in tasks: | |
if not dep_task.celery_task_uid or \ | |
not AsyncResult(dep_task.celery_task_uid).state == SUCCESS: | |
return False | |
return True | |
@app.task(bind=True) | |
def run(self, workflow_id, cur_task_id=None): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun copy-current-line-position-to-clipboard (p) | |
"Copy current line in file to clipboard as '</path/to/file>:<line-number>'" | |
(interactive "sAbsolute path y/n?: ") | |
(let ((path-with-line-number) (file-name (buffer-file-name))) | |
(when (and (not (string= p "y")) (projectile-project-root)) | |
(setq file-name (file-relative-name buffer-file-name (projectile-project-root))) | |
) | |
(setq path-with-line-number (concat file-name ":" (number-to-string (line-number-at-pos)))) | |
(x-select-text path-with-line-number) | |
(message (concat path-with-line-number " copied to clipboard")))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "BetterTouchTool" | |
activate | |
update_trigger "EAE52DEC-26DA-40DC-8BB1-62A102FE676C" json "{\"BTTEnabled\" : %d}" | |
update_trigger "7C3BC3BC-2B93-4674-8A5F-6697FDC6E723" json "{\"BTTEnabled\" : %d}" | |
end tell |
OlderNewer