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
| // XPath CheatSheet | |
| // To test XPath in your Chrome Debugger: $x('/html/body') | |
| // http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/ | |
| // 0. XPath Examples. | |
| // More: http://xpath.alephzarro.com/content/cheatsheet.html | |
| '//hr[@class="edge" and position()=1]' // every first hr of 'edge' class |
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
| com.oracle.truffle.r.runtime.RInternalError: java.lang.RuntimeException: com.oracle.truffle.r.runtime.RInternalError: java.lang.NullPointerException | |
| at com.oracle.truffle.r.nodes.function.FunctionDefinitionNode.execute(FunctionDefinitionNode.java:333) | |
| at com.oracle.truffle.api.impl.DefaultCallTarget.callDirectOrIndirect(DefaultCallTarget.java:85) | |
| at com.oracle.truffle.api.impl.DefaultDirectCallNode.call(DefaultDirectCallNode.java:59) | |
| at com.oracle.truffle.r.nodes.function.call.CallRFunctionNode.execute(CallRFunctionNode.java:63) | |
| at com.oracle.truffle.r.nodes.function.RCallNode$DispatchedCallNode.execute(RCallNode.java:1213) | |
| at com.oracle.truffle.r.nodes.function.RCallNode$FunctionDispatch.dispatch(RCallNode.java:911) | |
| at com.oracle.truffle.r.nodes.function.RCallNodeGen$FunctionDispatchNodeGen.executeAndSpecialize(RCallNodeGen.java:905) | |
| at com.oracle.truffle.r.nodes.function.RCallNodeGen$FunctionDispatchNodeGen.execute(RCallNodeGen.java:869) | |
| at com.oracle.truffle.r.nodes.function.RCallNode.call(RCallNo |
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
| $ cabal install hoodle | |
| Resolving dependencies... | |
| [1 of 2] Compiling SetupWrapper ( /tmp/poppler-0.13-24093/poppler-0.13/SetupWrapper.hs, /tmp/poppler-0.13-24093/poppler-0.13/dist/setup/SetupWrapper.o ) | |
| /tmp/poppler-0.13-24093/poppler-0.13/SetupWrapper.hs:118:28: Warning: | |
| In the use of ‘configCompiler’ | |
| (imported from Distribution.Simple.Configure): | |
| Deprecated: "'configCompiler' is deprecated. Use 'configCompilerEx' instead." | |
| [2 of 2] Compiling Main ( /tmp/poppler-0.13-24093/poppler-0.13/dist/setup/setup.hs, /tmp/poppler-0.13-24093/poppler-0.13/dist/setup/Main.o ) | |
| Linking /tmp/poppler-0.13-24093/poppler-0.13/dist/setup/setup ... |
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 matExp(A): | |
| """ | |
| Return the matrix exponential of A using the algorithm in | |
| Leonard, I. E., SIAM Rev. (38), 507, 1996. | |
| """ | |
| n = A.rows | |
| M = [] | |
| for i in range(n): |
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
| function ebib_import_bibtex (url) { | |
| var cmd_str = 'emacsclient -ne \'(ebib-import-bibtex \"' + url + '\")\''; | |
| shell_command_blind(cmd_str); | |
| } | |
| interactive("bibtex2ebib", "Download PDF and add bibtex entry for current preprint to ebib", | |
| function (I) { | |
| ebib_import_bibtex(I.buffer.display_uri_string); | |
| }); |
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
| (require 'mm-url) | |
| (defun ebib-import-bibtex (url) | |
| (interactive) | |
| (let ((tempbuff (get-buffer-create "*bibtex*"))) | |
| (with-current-buffer tempbuff | |
| (mm-url-insert-file-contents url) | |
| (ebib-import) | |
| (kill-buffer (current-buffer)) |
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 ebib-attach-file () | |
| "Attach file to gnus/mu4e composition buffer" | |
| (interactive) | |
| (ebib-execute-when | |
| ((entries) | |
| (let ((filename (to-raw (car (ebib-get-field-value ebib-standard-file-field | |
| (edb-cur-entry ebib-cur-db)))))) | |
| (if filename | |
| (ebib-dired-attach filename) |
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 ebib-filter-n-days (n) | |
| "Filter entries added in the last n days" | |
| (let* ((field (intern-soft "timestamp")) | |
| (day-of-year (string-to-number (format-time-string "%j"))) | |
| (n-days-ago (- day-of-year (- n 1))) | |
| (days-between (number-sequence n-days-ago day-of-year)) | |
| (regexp-days-between (mapconcat #'(lambda (x) | |
| (concat "\\(" (number-to-string x) "d\\)")) | |
| days-between "\\|"))) |
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
| function ebib_import_arxiv (url) { | |
| var cmd_str = 'emacsclient -ne \'(ebib-import-arxiv \"' + url + '\")\''; | |
| shell_command_blind(cmd_str); | |
| } | |
| interactive("arxiv2ebib", "Download PDF and add bibtex entry for current preprint to ebib", | |
| function (I) { | |
| ebib_import_arxiv(I.buffer.display_uri_string); | |
| }); |
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
| (setq arxiv-dir "~/Papers/arxiv/") | |
| (defun ebib-import-arxiv (arxiv-url) | |
| (interactive) | |
| (let ((tempbuff (get-buffer-create "*arxiv*")) | |
| (arxiv-id (car (cdr (split-string arxiv-url "abs/")))) | |
| (arxiv-pdf-url (concat (replace-regexp-in-string "abs" "pdf" arxiv-url) ".pdf"))) | |
| (call-process-shell-command "arxiv2bib.py" nil tempbuff nil arxiv-id) |