Elisp Snippets
Table of Contents
- 1. Elisp Snippets
- 1.1. Strings
- 1.2. S-expressions
- 1.3. Clipboard (Kill-ring)
- 1.4. Elisp
- 1.5. Common Lisp Emulation Library
- 1.6. Buffer and regions
- 1.7. Input - Read User Input
- 1.8. Output
- 1.9. Shell Commands / Interacting with external applications
- 1.10. File
- 1.11. Directory
- 1.12. Text Manipulation
- 1.13. Emacs Introspection
- 1.14. Web Browser
- 1.15. Packages
- 1.16. Dired mode snippets
- 1.17. Helm Snippets
- 1.18. Non categorized
- 2. Eshell
- 2.1. Overview
- 2.2. Start Eshell Directly from command line
- 2.3. Useful elisp commands inside eshell
- 2.4. Clear eshell
- 2.5. Set eshell prompt
- 2.6. Change Eshell current directory
- 2.7. Change Eshell current directory to current buffer
- 2.8. Open eshell in another window
- 2.9. Open eshell in another frame
- 2.10. Open eshell file names from ls output with Return key
- 2.11. Functions to copy eshell data to clipboard
- 2.12. Creating Eshell aliases programatically
- 3. Emacs On Microsoft Windows
- 4. Configuration Snippets
- 5. Emacs Server and Client
- 6. Org-mode
- 7. Useful Commands for Elisp Developers
- 8. Useful Elisp Info Pages
- 8.1. Elisp
- 8.2. Customization
- 8.3. Layout
- 8.4. Syntax Tables
- 8.5. Environment Variables and OS Detection
- 8.6. Subprocess Creation
- 8.7. Keybindings
- 8.8. Hooks (Events Callbacks)
- 8.9. Buffer
- 8.10. Window
- 8.11. Frame
- 8.12. Files
- 8.13. Text Enconding ISO UTF8 …
- 8.14. Loading, Libraries and Packages
- 8.15. Batch Mode
- 8.16. Syntax Highlight
- 9. Selected Gists
1 Elisp Snippets
1.1 Strings
1.1.1 Concatenate strings
> (concat "hello" " world") "hello world" > (concat "hello" " world" " elisp ") "hello world elisp " > (apply #'concat '("hello" " world " " elisp ")) "hello world elisp "
1.1.2 Join Strings by Separator
(defun join (sep lst) (mapconcat 'identity lst sep)) ELISP> (join "," '("1.232" "300" "500")) "1.232,300,500" ELISP> (join ", " '("1.232" "300" "500")) "1.232, 300, 500"
1.1.3 Split String
> (split-string "100,200,300,400" ",") ("100" "200" "300" "400") > (split-string (getenv "PATH") ":") ("/usr/local/sbin" "/usr/local/bin" "/usr/bin" ...)
1.1.4 Split String with quotes
> (split-string-and-unquote "/bin/app -x -y -z \"/home/user/some name with space/etc\" -k cmd ") ("/bin/app" "-x" "-y" "-z" "/home/user/some name with space/etc" "-k" "cmd")
1.1.5 Replace Strings
1.1.6 Regex
1.2 S-expressions
1.2.1 Parse s-expressions
;; Exaluate with M-x eval-print-last-sexp > (read "(mapc (lambda (p) (insert p) (insert \"\n\")) (buffer-list)) ") (mapc (lambda (p) (insert p) (insert " ")) (buffer-list)) > (read "(+ 1 2 3 4)") (+ 1 2 3 4)
1.2.2 Evaluate s-expressions
> (eval (read "(+ 1 2 3 4)" )) 10 > (eval '(+ 1 2 3 4)) 10
1.3 Clipboard (Kill-ring)
1.3.1 Copy string to clipboard
(defun clipboard/set (astring) "Copy a string to clipboard" (with-temp-buffer (insert astring) (clipboard-kill-region (point-min) (point-max))))
1.3.2 Paste string from clipboard
(defun clipboard/get () "Return the content of clipboard as string" (interactive) (with-temp-buffer (clipboard-yank) (buffer-substring-no-properties (point-min) (point-max))))
1.3.3 Copy buffer file name to clibpoard
(defun buffer/copy-file-name () (interactive) (clipboard/set (buffer-file-name))) ;; Eval using M-x eval-print-last-sexp ;; > (buffer/copy-file-name) nil > (insert (clipboard/get)) /home/arch/projects/emacs/Emacs_Snippets.org
1.3.4 Copy buffer directory to clibpoard
(defun buffer/copy-path () (interactive) (clipboard/set (file-name-directory (buffer-file-name))) (message "Copied file path to clipboard") ) ;; Eval using M-x eval-print-last-sexp ;; > (buffer/copy-path) "Copied file path to clipboard" > (clipboard/get) "/home/arch/projects/emacs/"
1.3.5 Copy buffer content to clipboard
(defun buffer/copy-content () " Copy buffer content to clibpoard Usage: M-x buffer/copy-content " (interactive) (clipboard/set (buffer-substring-no-properties (point-min) (point-max) )))
1.4 Elisp
1.4.1 Load an Elisp file
Load an elisp source file *.el.
(load-file "~/.emacs.d/tools.el")
Load an byte-compiled (*.elc) elisp file.
(load-file "~/.emacs.d/tools.elc")
1.4.2 Load all elisp files of a directory
(defun load-dir (path) " Load all elisp files (*.el) of a directory Usage: (load-dir <path>) Example: (load-dir \"~/.emacs.d/custom\") " (mapc #'load (directory-files path t "\\.el$")))
1.4.3 Add directory to load path
It adds a directory containing Emacs packages (<package name>.el) to
the load path. The user can load packages by adding the code (require '<package>)
to the file init.el.
(add-to-list 'load-path "~/.emacs.d/custom") ;; package -> ~/.emacs.d/custom/package.el ;; (require 'package)
1.4.4 Switch and Create the Scratch Buffer
This function switches and crates the scratch buffer if it doesn't exist or was deleted. Usage: M-x scratch.
(defun scratch () " Switches to scratch buffer and creates it if it doesn't exist. Usage: M-x scratch This function is useful to Elisp developers. Suggestion: Add (defalias 's #'scratch) to the init file. You can switch to the scratch buffer with > M-x s " (interactive) (let ((buf (get-buffer-create "*scratch*"))) (switch-to-buffer buf) (lisp-interaction-mode) )) (defalias 's #'scratch)
1.5 Common Lisp Emulation Library
1.5.1 Reduce (fold left) function
- Build a number from a list of digits
(require 'cl) ELISP> (cl-reduce (lambda (acc x) (+ (* 10 acc) x)) '(1 2 3 4 5 6) :initial-value 0) 123456 (#o361100, #x1e240)
- Test if all values of a list are true
(require 'cl) ELISP> (cl-reduce (lambda (acc x) (and acc x)) '(t nil t t t f) :initial-value t) nil ELISP> (cl-reduce (lambda (acc x) (and acc x)) '(t t t t t f) :initial-value t) f ELISP> (cl-reduce (lambda (acc x) (and acc x)) '(t t t t t t) :initial-value t) t (defun all-p (bool-list) "Tests if all values of bool-list are true (not nil)" (cl-reduce (lambda (acc x) (and acc x)) bool-list :initial-value t)) ELISP> (all-p '(t t t)) t ELISP> (all-p '(t nil t)) nil
- Test if at least one value of a list is true
ELISP> (cl-reduce (lambda (acc x) (and acc x)) '(t t t t t t) :initial-value t) t ELISP> (cl-reduce (lambda (acc x) (or acc x)) '(t t t t t t) :initial-value nil) t ELISP> (cl-reduce (lambda (acc x) (or acc x)) '(nil nil nil t t nil) :initial-value nil) t ELISP> (cl-reduce (lambda (acc x) (or acc x)) '(nil nil nil nil nil nil) :initial-value nil) nil ELISP> () (defun some-p (bool-list) "Tests if at least one value bool-list is true (not nil)" (cl-reduce (lambda (acc x) (or acc x)) bool-list :initial-value nil)) ELISP> (some-p '(t t t t)) t ELISP> (some-p '(nil t nil nil)) t ELISP> (some-p '(nil nil nil nil)) nil
1.6 Buffer and regions
1.6.1 Save buffer
(save-buffer)
1.6.2 Get buffer content as string
Returns the content of a buffer referencend by its name or the buffer object.
(defun buffer-content (&optional buffer-or-name) (with-current-buffer (if buffer-or-name buffer-or-name (current-buffer)) (buffer-substring-no-properties (point-min) (point-max) )))
1.6.3 Get selected text as string
Returns the selected text of the current buffer.
(defun get-selection () "Get the text selected in current buffer as string" (interactive) (buffer-substring-no-properties (region-beginning) (region-end)))
1.7 Input - Read User Input
1.7.1 Prompt functions
| Function | Description |
|---|---|
| read-string | Read input as string |
| read-file-name | Read input as file name |
| read-directory-name | Read input as path to directory |
| read-regexp | Read input as regular expression |
| read-passwd | Read password |
1.7.2 Read string
> (read-string "prompt > ") ;; M-x eval-print-last-sexp "user enter some string in minibuffer"
Ask the user for a string and insert in the buffer
> (insert (concat "\n" (read-string " prompt > " ))) ;; M-x eval-last-sexp user enter a message in the minibuffer
1.7.3 Read file name
Reads a file name from the user and gives auto completion. Enter tab to autocomplete the file name.
> (read-file-name "Enter a file name: ") ;; M-x eval-print-last-sexp "/etc/fstab"
1.7.4 Read file name and insert at point
Opens a prompt that asks for the path in the minibuffer with completion and inserts the path at the current point.
- Usage: M-x insert-path
(defun insert-path () " Opens a prompt that asks for the path in the minibuffer with completion and inserts the path at the current point. Usage: M-x insert-path " (interactive) (insert (read-file-name "file > ")))
1.7.5 Read a directory path
> (read-directory-name "Enter a directory: ") ;; M-x eval-print-last-sexp "/var/log"
1.8 Output
1.8.1 Message
Display a message at the bottom of the screen.
(message "A message to the user")
1.8.2 Print
1.8.3 Princ
1.8.4 Message box
Display a message, in a dialog box if possible. If a dialog box is not available, use the echo area.
(message-box "Emacs Alert. Time to drink a coffee!")
1.8.5 Tooltip
Show a tooltip
(tooltip-show "An Emacs tooltip")
1.9 Shell Commands / Interacting with external applications
1.9.1 Related Documentation
[C-h-f] <name of function>
- shell-command
- async-shell-command
- start-process
- call-process
- shell-command-to-string
- shell-command-on-region
- getenv
- setenv
1.9.2 Synchronous Shell Commands
- Display output of shell command
(shell-command "uname -a") ;; M-x eval-last-sexp
- Display output of shell command in another frame
Display PCI cards in another frame.
(with-selected-frame (make-frame) (shell-command "lspci"))
- Shell Command To String
> (shell-command-to-string "uname -a") ;; M-x eval-print-last-sexp "Linux localhost 4.7.0-1-ARCH #1 SMP PREEMPT Mon Aug 8 22:05:58 CEST 2016 x86_64 GNU/Linux " > (insert (format "\nKernel version %s " (shell-command-to-string "uname -r"))) ;; M-x eval-last-sexp Kernel version 4.7.0-1-ARCH nil (defun insert-debug-info () (interactive) (insert (concat "Kernel version : ") (shell-command-to-string "uname -r")) (insert (concat "Linux distribution : ") (shell-command-to-string "cat /etc/issue")) (insert (concat "Gcc version :") (shell-command-to-string "gcc --version | grep GCC")) ) ;; M-x insert-debug-info Kernel version : 4.7.0-1-ARCH Linux distribution : Arch Linux \r (\l) Gcc version :gcc (GCC) 6.1.1 20160802
- Shell Command Wrappers
The function shell-command-to-lines runs a shell command and returns the output lines. This function is useful to create shell command wrappers over Unix shell commands like find.
(defun shell-command-to-lines (command) (remove-if-not (lambda (s) (/= (length s) 0)) (split-string (shell-command-to-string command) "\n"))) ELISP> (mapc #'princ (shell-command-to-lines "ls /var/log")) btmpfailloghttpdjournallastlogoldpacman.logsambaspeech-dispatcherwtmpXorg.0.logXorg.0.log.old ("btmp" "faillog" "httpd" "journal" "lastlog" "old" "pacman.log" "samba" "speech-dispatcher" "wtmp" "Xorg.0.log" "Xorg.0.log.old") ELISP> (mapc (lambda (p) (princ p) (princ "\n")) (shell-command-to-lines "ls /var/log")) btmp faillog httpd journal lastlog old pacman.log samba speech-dispatcher wtmp Xorg.0.log Xorg.0.log.old
Example: Shell command wrapper find
ELISP> (mapc (lambda (p) (princ p) (princ "\n")) (shell-command-to-lines "find ~/.local/share/ -name \"*.desktop\"")) /home/arch/.local/share/xfce4/helpers/custom-WebBrowser.desktop /home/arch/.local/share/applications/userapp-mono-IAJQMY.desktop /home/arch/.local/share/applications/userapp-sh-9VFBMY.desktop /home/arch/.local/share/applications/userapp-em-FLD8LY.desktop /home/arch/.local/share/applications/userapp-mpv-FLQ9LY.desktop /home/arch/.local/share/applications/userapp-Firefox-SOBHMY.desktop (defun search-files (directory pattern) (shell-command-to-lines (format "find %s -name '%s'" directory pattern))) ELISP> (search-files "~/.local" "*.desktop") ;; Output changed to fit in the screen ("/home/arch/.local/share/xfce4/helpers/custom-WebBrowser.desktop" "/home/arch/.local/share/applications/userapp-mono-IAJQMY.desktop" "/home/arch/.local/share/applications/userapp-sh-9VFBMY.desktop" "/home/arch/.local/share/applications/userapp-em-FLD8LY.desktop" ... ) ELISP> (mapc (lambda (p) (princ p) (princ "\n")) (search-files "~/.local" "*.desktop")) /home/arch/.local/share/xfce4/helpers/custom-WebBrowser.desktop /home/arch/.local/share/applications/userapp-mono-IAJQMY.desktop /home/arch/.local/share/applications/userapp-sh-9VFBMY.desktop /home/arch/.local/share/applications/userapp-em-FLD8LY.desktop /home/arch/.local/share/applications/userapp-mpv-FLQ9LY.desktop /home/arch/.local/share/applications/userapp-Firefox-SOBHMY.desktop
1.9.3 Pipe a region to external command
- Pipe buffer or region to external command
Pipes the buffer content to external command and print the output in the buffer
*Shell Command Output*
. The command$ wc -l
counts the number of line of the current file.> (shell-command-on-region (point-min) (point-max) "wc -l") ;; M-x eval-last-sexp
Pipes the buffer content to external command
$wc -l
and get the output as a string.> (with-output-to-string ;; M-x eval-print-last-sexp (shell-command-on-region (point-min) (point-max) "wc -l")) "" (defun pipe-region-to-command (pmin pmax command) (interactive) (shell-command-on-region pmin pmax command "*shell-output*" ) (let ( (output (with-current-buffer "*shell-output*" (buffer-substring-no-properties (point-min) (point-max)))) ) (kill-buffer "*shell-output*") output ) ) > (pipe-region-to-command (point-min) (point-max) "wc -l") ;; M-x eval-print-last-sexp "1515 "
- Apply an external command to buffer
The command below will pipe the buffer
*scratch*
to the command =$ sed 's/foo.*/bar/g'= which replaces all values of foo for bar.(with-current-buffer "*scratch*" (shell-command-on-region (point-min) (point-max) "sed 's/foo.*/bar/g'" "*shell-output*" t ) ) ;; M-x eval-last-sexp
Before the form evaluation
After the form evaluation.
- Function to apply an external command to buffer
Usage: M-x shell-command-on-buffer Enter: sed 's/defun/defn/g' eplaces all defun words by defn.
(defun shell-command-on-buffer (&optional command) "Apply a shell command in the current buffer and replace it by the command output. Example: - Interactive usage: M-x shell-command-on-buffer Enter: sed 's/defun/defn/g'. replaces all defun words by defn. - (shell-command-on-buffer \"sed 's/defun/defn/g'\") " (interactive) (shell-command-on-region (point-min) (point-max) (if command command (read-string "Cmd on buffer: ")) "*shell-output*" t ) )
- Insert line number in all lines of a buffer using ruby
Enter M-x shell-command-on-buffer and then $ ruby -ne 'printf("-%6s%s", $., $_)'
ruby -ne 'printf("-%6s%s", $., $_)'
Before running the command:
After running the command:
- Ruby command on buffer
This function applies a ruby batch command on the buffer.
See also: Ruby One-Liners
(defun ruby-on-buffer (&optional command) " Applies a ruby command on buffer Example: The command will number each line of the current buffer. 1. M-x ruby-on-buffer 2. type: 'printf(\"%6s%s\", $., $_)' without quotes. " (interactive) (shell-command-on-buffer (format "ruby -ne '%s'" (if command command (read-string "ruby cmd >")))))
- Ruby regex on buffer
Emacs regexp islimited and doesn't have lookahead like perl or ruby regex. This command can extend the functionality of Emacs regex using ruby. This function applies a ruby regex on the buffer.
Usage: M-x ruby-gsub-on-buffer
See also: Ruby One-Liners
(defun ruby-gsub-on-buffer (&optional regexp) " Applies ruby regex, the command $ ruby -pe 'gsub(regexp)' on the current buffer. Usage M-x ruby-gsub-on-buffer (ruby-gsub-on-buffer <regexp>) Example: The Command replace all occurrences of 'defun' by 'defn'. 1. M-x ruby-gsub-on-buffer 2. Type /defun/,\"defn\" " (interactive) (shell-regexp-on-buffer (format "ruby -pe 'gsub(%s)'" (if regexp regexp (read-string "ruby regex: ")))))
1.9.4 Launch apps in Asynchronous mode
1.9.5 Run asynchronous commands piping the output to a buffer
- Ping a host
(start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS
Usage: M-x ping-host or (ping-host <hostname>)
(defun ping-host (&optional hostname) " Ping a hostname.  Usage: - Interactive: M-x traceroute-host [Enter the hostname] - Command: (traceroute-host <hostname>) Example: (traceroute-host \"www.yahoo.co.uk\") " (interactive) (let ( (hostname- (if hostname hostname (read-string "host to traceroute: "))) ) (start-process "traceroute" "*traceroute*" "traceroute" hostname-) (switch-to-buffer-other-frame "*traceroute*") ))
1.9.6 Run a ncurses / terminal app
Run linux htop (task manager) inside Emacs:
(term "htop") ;; C-x C-e or M-x eval-last-sexp
1.10 File
1.10.1 Test if file or directory exists
> (file-exists-p "/var/log/pacman.log") ;; M-x eval-print-last-sexp t > (file-exists-p "/var/log/pcaman.log.err") nil ;; > (file-exists-p "/var/log") t ;; > (file-exists-p "/var/log-dont-exists") nil
1.10.2 Expand file name
ELISP> (expand-file-name "~") "/home/arch" ELISP> (expand-file-name "~/.emacs.d/init.el") "/home/arch/.emacs.d/init.el" ELISP> (expand-file-name ".") "/home/arch/projects/emacs"
1.10.3 Read file to string
The Emacs API doesn't provide a straightforward way to read file directly to a string. The only way to perform this taks is using a temporary buffer.
(defun read-file (filename) (with-temp-buffer (insert-file-contents filename) (buffer-substring-no-properties (point-min) (point-max)))) ELISP> (read-file "/etc/host.conf") "#\n# /etc/host.conf\n#\n\norder hosts,bind\nmulti on\n\n# End of file\n" ELISP> (princ (read-file "/etc/host.conf")) # # /etc/host.conf # order hosts,bind multi on # End of file
1.10.4 Open file to edit
1.10.5 Open file to edit silently
Function: find-file-nonselect
Emacs Documentation: Read file FILENAME into a buffer and return the buffer.If a buffer exists visiting FILENAME, return that one, but verify that the file has not changed since visited or saved. The buffer is not selected, just returned to the caller.
Open a file and returns a buffer:
> (setq b1 (find-file-noselect "~/.bashrc")) #<buffer .bashrc> > b1 #<buffer .bashrc>
1.11 Directory
1.11.1 Open directory
1.11.2 Create directory
1.11.3 List directory
Get directory content
ELISP> (directory-files "/var/log") ("." ".." "Xorg.0.log" "Xorg.0.log.old" ... )
Print the directory content in elisp shell IEML.
ELISP> (mapc #'(lambda (p) (princ (concat "\n" p))) (directory-files "/var/log") ) . .. Xorg.0.log Xorg.0.log.old btmp faillog httpd journal lastlog old pacman.log samba speech-dispatcher wtmp
Get directory content with absolute file name.
ELISP> (directory-files "/var/log" t) ("/var/log/." "/var/log/.." "/var/log/Xorg.0.log" "/var/log/Xorg.0.log.old" ... ) ELISP> (mapc #'(lambda (p) (princ (concat "\n" p))) (directory-files "/var/log" t )) /var/log/. /var/log/.. /var/log/Xorg.0.log /var/log/Xorg.0.log.old /var/log/btmp ...
List files of a specific extension:
;; Files ending with *.conf ELISP> (directory-files "/etc/" nil "\\.conf") ("asound.conf" "dhcpcd.conf" "fuse.conf" "gai.conf" ...) ELISP> (directory-files "/etc/" t "\\.conf") ("/etc/asound.conf" "/etc/dhcpcd.conf" "/etc/fuse.conf" ...) ELISP> (directory-files "/etc/" t "\\.cfg") ("/etc/rc_maps.cfg" "/etc/vdpau_wrapper.cfg") ELISP> (directory-files "/etc/" nil "\\.cfg") ("rc_maps.cfg" "vdpau_wrapper.cfg")
1.12 Text Manipulation
1.12.1 Text alignment
Source: Init file - www.svjatoslav.eu
(defun align-to-colon (begin end) "Align region to colon (:) signs" (interactive "r") (align-regexp begin end (rx (group (zero-or-more (syntax whitespace))) ":") 1 1 )) (defun align-to-comma (begin end) "Align region to comma signs" (interactive "r") (align-regexp begin end (rx "," (group (zero-or-more (syntax whitespace))) ) 1 1 )) (defun align-to-equals (begin end) "Align region to equal signs" (interactive "r") (align-regexp begin end (rx (group (zero-or-more (syntax whitespace))) "=") 1 1 )) (defun align-to-hash (begin end) "Align region to hash ( => ) signs" (interactive "r") (align-regexp begin end (rx (group (zero-or-more (syntax whitespace))) "=>") 1 1 )) ;; work with this (defun align-to-comma-before (begin end) "Align region to equal signs" (interactive "r") (align-regexp begin end (rx (group (zero-or-more (syntax whitespace))) ",") 1 1 ))
1.12.2 Join Multiple Lines
From: jidaikobo-shibata/join-multi-lines-to-one.el
(defun join-multi-lines-to-one () "Join multi lines." (interactive) (let ((beg (region-beginning)) (end (region-end)) strings) (goto-char beg) (back-to-indentation) (setq beg (point)) (goto-char end) (goto-char (- (point) 1)) (end-of-line) (setq end (point)) (setq strings (buffer-substring-no-properties beg end)) (setq strings (replace-regexp-in-string "\n\\|^>+ *\\|^[\t ]+" " " strings)) (setq strings (replace-regexp-in-string " +" " " strings)) (delete-region beg end) (insert strings) (goto-char beg)))
1.13 Emacs Introspection
1.13.1 User init file
ELISP> user-init-file "/home/arch/.emacs.d/init.el" ELISP> (expand-file-name user-init-file) "/home/arch/.emacs.d/init.el"
1.13.2 User Emacs Directory
ELISP> user-emacs-directory "~/.emacs.d/" ELISP> (expand-file-name user-emacs-directory) "/home/arch/.emacs.d/"
1.13.3 Enviroment Variables
1.13.4 Get current Operating System
1.13.5 Test if Emacs is running in terminal or in window system
The variable window-system is the name of window system through which the selected frame is displayed.
Its value is a symbol:
- nil for a termcap frame (a character-only terminal)
- 'x' for an Emacs frame that is really an X window
- 'w32' for an Emacs frame that is a window on MS-Windows display
- 'ns' for an Emacs frame on a GNUstep or Macintosh Cocoa display
- 'pc' for a direct-write MS-DOS frame.
(defun test-window-system () (interactive) (if window-system (message "Running in Window System / GUI") (message "Running in terminal ") )) ;; In GUI ;;----------------------------- > (test-window-system) ;; M-x eval-print-last-sexp "Running in Window System / GUI" ;; In Terminal ;;------------------------------ > (test-window-system) ;; M-x eval-print-last-sexp "Running in terminal "
1.14 Web Browser
1.14.1 Browse Url
Open http://www.yandex.com in the web browser
> (browse-url "http://www.yandex.com")
Function to open Yandex.com. Usage M-x open-yandex
(defun open-yandex () "Open the web site http://www.yandex.com" (interactive) (browse-url "http://www.yandex.com") )
1.14.2 Browser Url setting the web browser
Open url with firefox
(let ((browse-url-browser-function 'browse-url-firefox)) (browse-url "http://www.yandex.com")) ;; Or ;; Set browser permanently (setq browse-url-browser-function 'browse-url-firefox)
Open url with chromium browser or chrome
(let ((browse-url-browser-function 'browse-url-chromium)) (browse-url "http://www.yandex.com")) ;;; Or ;; Set browser permanently (setq browse-url-browser-function 'browse-url-chromium)
Open url with Emacs eww browser
(let ((browse-url-browser-function 'eww-browse-url)) (browse-url "http://www.yandex.com") ;;; Or ;; Set browser permanently (setq browse-url-browser-function 'eww-browse-url)
1.14.3 Search Web sites with Emacs
- Search google
Usage: M-x search-google
(require 'url-util) (defun search-google () (interactive) "Search www.google.ca" (browse-url (format "http://www.google.ca?gws_rd=ssl#q=%s" (url-encode-url (read-string "Google: ")))))
- Search a specific url site with google
Usage:
- M-x search-hackernews-with-google
- M-x search-reddit-with-google
- M-x search-stackoverflow-with-gooogle
Usage: M-x search-google (require 'url-util) (defun search-google-url (url params) (let ((google-url (format "site:%s %s" url params))) (browse-url (format "http://www.google.ca?gws_rd=ssl#q=%s" (url-encode-url google-url))))) (search-google-url "https://news.ycombinator.com" "haskell production") (defun search-hackernews-with-google () (interactive) (search-google-url "https://news.ycombinator.com" (read-string "Hnews: "))) (defun search-reddit-with-google () (interactive) (search-google-url "https://www.reddit.com" (read-string "Reddit: "))) (defun search-stackoverflow-with-google () (interactive) (search-google-url "http://stackoverflow.com" (read-string "S.O Search: ")))
- Search github
(require 'url-util) (defun search-github () (interactive) "Search www.google.ca" (browse-url (format "https://github.com/search?q=%s" (url-encode-url (read-string "Github Search: ")))))
- Search gisthub
(require 'url-util) (defun search-gisthub () " Search gisthub : http://gist.github.com Usage: M-x search-gisthub " (interactive) (browse-url (format "https://gist.github.com/search?p=50&q=%s&ref=searchresults" (url-encode-url (read-string "Gisthub Search: ")))))
- Open Emacs Web Manual
(defun open-emacs-manual () " Open Emacs online Manual Usage: M-x open-emacs-manual It opens the web site: https://www.gnu.org/software/emacs/manual " (interactive) (browse-url "https://www.gnu.org/software/emacs/manual/"))
1.15 Packages
1.15.1 Test if package is installed
1.15.2 Install a package if it is not installed
1.16 Dired mode snippets
The dired mode is the mode used by Emacs to browser directories.
See also: How do you customize dired?
Source: hiroina/.emacs
- Copy path of file at point.
(defun dired-copy-path () "In dired, copy file path to kill-buffer. At 2nd time it copy current directory to kill-buffer." (interactive) (let (path) (setq path (dired-file-name-at-point)) (if (string= path (current-kill 0 1)) (setq path (dired-current-directory))) (message path) (kill-new path) ) )
- Open directory at point with Microsoft Explorer in Windows OS.
(defun dired-exec-explorer () "In dired, execute Explorer" (interactive) (let (path) (setq path (dired-file-name-at-point)) (setq path (replace-regexp-in-string "~" "c:/home" path)) (setq path (replace-regexp-in-string "/" "\\\\" path)) (message path) ;(kill-new path) (start-process "explorer" nil "explorer" (concat "/select," path)) ) )
- Open multiple marked files
(defun dired-open-files (files) " Open all marked files in dired mode with m. Usage: 1. Mark the files with m 2. M-x dired-open-files " (interactive (list (dired-get-marked-files)) ) (mapc #'find-file files) )
Close multiple marked files
(setq lexical-binding t) (defun compose (fn1 fn2) (let ((lexical-binding t)) (lambda (x) (funcall fn2 (funcall fn1 x)) ) )) (defun dired-close-files (files) (interactive (list (dired-get-marked-files)) ) (mapc (compose #'get-file-buffer #'kill-buffer) files) )
- Open a file with default system app in dired mode
Usage. Select a file in dired mode and enter M-x dired-xdg
(defun dired-xdg () " Open file at point in dired buffer with current Windows default app Usage: In the dired mode select a file and type M-x dired-xdg to execute the file with the system default app. " (interactive) (with-current-buffer (start-process "proc" nil ;; Command "cmd" "/c" "start" (dired-get-filename))))
1.17 Helm Snippets
1.17.1 Browser Recent files
Usage: M-x helm-recent-files
(require 'helm) (defun helm-recent-files () (interactive) (helm :prompt "File: " :sources `(( (name . "File: ") (candidates . ,recentf-list) (action . find-file) ))))
1.17.2 Browser Recent directories
Usage M-x helm-recent-dirs
(require 'helm) (defun unique (xs) "Remove repeated elements from list xs Example: > (unique '(x y a b 21 21 10 21 x y a )) (x y a b 21 10) " (let ((result nil)) (dolist (x xs) (if (not (member x result)) (push x result) )) (reverse result) )) (defun helm-recent-dirs () (interactive) (helm :prompt "Dir: " :sources `(( (name . "Dir: ") (candidates . (lambda () (unique (map #'file-name-directory recentf-list)))) (action . dired) ))))
1.17.3 Launch ansync shell command with helm
This piece of code gets all executables in the $PATH variable and searche for one that matches the user input and then launches it. It is useful to launch applications without block Emacs.
Usage: M-x helm-laucher
(defun get-executables () " Returns a list of all files available in the directories of the $PATH variable. " (apply #'append (mapcar (lambda (p) (directory-files p t)) (remove-if-not #'file-exists-p (split-string (getenv "PATH") ":"))))) (defun run-async (&optional command) "Run a shell command in asynchronous mode. It doesn't block Emacs while the command is running. Usage: (run-async \"python -m http.server\") M-x run-async -> User enters a command. " (interactive) (apply #'start-process `( "proc-any" ;; We don't care about the application name nil ;; Don't name the buffer ,@(split-string-and-unquote (if command command (read-string "Command: " ) )) ))) (defun run-async-lst (&rest commands) " Run a shell command in asynchronus mode, not blocking Emacs. Usage: > (run-async-lst <program> <argument 1> <agurment2> ...) Example: > (run-async \"thunar\" \"/usr/share/applications\") " (apply #'start-process `( "dontcare" ;; We don't care about the application name nil ;; Don't name the buffer ,@commands ))) (defun helm-launcher () " Launches applications available in $PATH directories in asynchronous mode without Emacs wait for it. Usage M-x heml-launcher " (interactive) (let ((data (mapcar (lambda (p) (cons (file-name-nondirectory p) p )) (get-executables) ) )) (helm :prompt "Shell: " :sources `(( (name . "Shell: ") (candidates . ,data) (action . run-async) )))))
1.17.4 Switch between buffers associated with files
Switch between buffers associated with files.
(defun switch-file () " Switch between buffers that are associated with files. Depends on helm. Usage: M-x switch file. " (interactive) (let ((data (mapcar (lambda (b) (cons (buffer-file-name b) b )) (remove-if-not #'buffer-file-name (buffer-list))))) (helm :prompt "Buffer: " :sources `(( (name . "File Buffers") (candidates . ,data) (action . switch-to-buffer) ))) ))
1.17.5 Switch between Emacs major modes
(defun helm-switch-mode () " Switch between all major programming modes available in Emacs. Usage: M-x helm-switch-mode " (interactive) (cl-flet ((unique (xs) (let ((result nil)) (dolist (x xs) (if (not (member x result)) (push x result) )) (reverse result) ) )) (helm :prompt "Mode: " :sources `(( (name . "Emacs Major Modes") (candidates . ,(unique (mapcar #'symbol-name (remove-if-not #'symbolp (mapcar #'cdr auto-mode-alist))))) (action . ,(lambda (m) (funcall (intern-soft m)))) ))) ) )
1.17.6 Open a list of web sites
(setq helm-url-default-url-list '( ("google" . "http://www.google.ca") ("yandex" . "http://www.yandex.com") ("reddit" . "http://www.reddit.com") ("/r/haskell". "http://www.reddit.com/r/haskell") ("/r/emacs" . "http://www.reddit.com/r/emacs") ("/r/csharp" . "http://www.reddit.com/r/csharp") ) ) (defun helm-web () (interactive) (helm :prompt "Web Site: " :sources `(( (name . "Bookmarks") (candidates . helm-url-default-url-list) (action . (lambda (c) (browse-url (cdr c))) ) ))) )
1.18 Non categorized
1.18.1 Save the scratch buffer and reload every Emacs startup
Saves the scratch buffer to a file every times Emacs is closed.
Source: scratch.el
(setq scratch-buffer-file "~/.emacs.d/scratch.el") (setq initial-scratch-message "") ;initial message (add-hook 'kill-emacs-hook 'scratch-save) ; (add-hook 'window-setup-hook 'scratch-resume); ;; window-setup-hook ;; @see info 38.1.1 Summary: Sequence of Actions at Startup (add-hook 'kill-buffer-hook; *scratch* (lambda () (if (equal (buffer-name) "*scratch*") (scratch-save)))) (add-hook 'after-save-hook (lambda () (unless (get-buffer "*scratch*") (scratch-resume)))) (defun scratch-save () (let ((buf (get-buffer "*scratch*"))) (when buf (set-buffer buf) (write-file scratch-buffer-file) (ignore-errors (kill-buffer "scratch.el"))))) (defun scratch-resume () "*scratch* " (interactive) (set-buffer (get-buffer-create "*scratch*")) (funcall initial-major-mode) (insert-file-contents scratch-buffer-file nil nil nil t) (ignore-errors (kill-buffer ".scratch")))
2 Eshell
2.1 Overview
Eshell is a shell implemented in Emacs with many commands implemented in Elisp which makes it cross platform, the commands ls, pwd, cd and etc. works in the same way for Linux, Windows or OSX. In Windows OS it is a good alternative to cmd.exe.
Command to clear Eshell. It can be invoked with $ clear in eshell.
See also:
- Mastering Eshell / Mastering Emacs
- Finally wrapping my head around eshell (the emacs shell)
2.2 Start Eshell Directly from command line
Start eshell directly in a new Emacs sessions in the terminal wihout load init.el.
$ emacs -Q -q -nw --eval '(eshell)'
Or
$ emacs -Q -q -nw -f eshell
Start eshell directly in a new Emacs Window
emacs -q -f eshell # Don't load init file.
Or
emacs -q -f eshell # Load init file
2.3 Useful elisp commands inside eshell
Eshell can run Elisp command - M-x <command> like ordinary Unix shell apps.
Open a file in the current window
$ find-file /etc/hosts.conf
Open a file in other window
$ find-file-other-window /etc/host.conf
Open a file in other frame
$ find-file-other-frame /etc/host.conf
Browser a directory in current window
$ dired /var/log
Browser a directory in another window
$ dired-other-window /var/log
Browser a directory in another frame
$ dired-other-frame /var/log
2.4 Clear eshell
(defun eshell/clear () "clear the eshell buffer." (interactive) (let ((inhibit-read-only t)) (erase-buffer)))
In eshell:
~ $ which eshell eshell is an interactive compiled Lisp function in `eshell.el' ~ $
Before the command clear:
After the command clear:
2.5 Set eshell prompt
2.5.1 Simple prompt
(setq eshell-prompt-function (lambda () "eshell > "))
Prompt with current directory
2.5.2 Colorized prompt
(setq eshell-prompt-function (lambda nil (concat (propertize (eshell/pwd) 'face '(:foreground "#8787af")) (propertize "❯" 'face '(:foreground "#f75f5f")) (propertize "❯" 'face '(:foreground "#ffaf5f")) (propertize "❯" 'face '(:foreground "#87af5f")) (propertize " " 'face nil))))
2.6 Change Eshell current directory
This command can be used in Menus or with helm.
(defun eshell-chdir (path) (with-current-buffer "*eshell*" (cd path) (eshell-emit-prompt))) (eshell-chdir "~/Downloads")
2.7 Change Eshell current directory to current buffer
Usage: M-x eshell-cwd
(defun eshell-cwd () " Sets the eshell directory to the current buffer Usage: M-x eshell-cwd " (interactive) (let ( (path (file-name-directory (or (buffer-file-name) default-directory))) ) (with-current-buffer "*eshell*" (cd path) (eshell-emit-prompt))))
2.8 Open eshell in another window
Source: mini-eshell.el
Usage: M-x open-mini-eshell
;; open up a mini-eshell (defun quarter-window-vertically () "create a new window a quarter size of the current window" (split-window-vertically) (other-window 1) (split-window-vertically) (other-window -1) (delete-window) ) (defun open-mini-eshell () "open a mini-eshell in a small window at the bottom of the current window" (interactive) (quarter-window-vertically) (other-window 1) (eshell) )
2.9 Open eshell in another frame
Usage: M-x eshell-other-frame
(defun eshell-other-frame () " Open eshell in another frame. Usage: M-x eshell-other-frame " (interactive) (with-selected-frame (make-frame) (eshell)))
2.10 Open eshell file names from ls output with Return key
Source: Emacs Wiki
This code allows to open files from $ ls
command output by selecting
the file name and hitting return or by clicking with the middle mouse
button.
(eval-after-load "em-ls" '(progn (defun ted-eshell-ls-find-file-at-point (point) "RET on Eshell's `ls' output to open files." (interactive "d") (find-file (buffer-substring-no-properties (previous-single-property-change point 'help-echo) (next-single-property-change point 'help-echo)))) (defun pat-eshell-ls-find-file-at-mouse-click (event) "Middle click on Eshell's `ls' output to open files. From Patrick Anderson via the wiki." (interactive "e") (ted-eshell-ls-find-file-at-point (posn-point (event-end event)))) (let ((map (make-sparse-keymap))) (define-key map (kbd "RET") 'ted-eshell-ls-find-file-at-point) (define-key map (kbd "<return>") 'ted-eshell-ls-find-file-at-point) (define-key map (kbd "<mouse-2>") 'pat-eshell-ls-find-file-at-mouse-click) (defvar ted-eshell-ls-keymap map)) (defadvice eshell-ls-decorated-name (after ted-electrify-ls activate) "Eshell's `ls' now lets you click or RET on file names to open them." (add-text-properties 0 (length ad-return-value) (list 'help-echo "RET, mouse-2: visit this file" 'mouse-face 'highlight 'keymap ted-eshell-ls-keymap) ad-return-value) ad-return-value)))
2.11 Functions to copy eshell data to clipboard
2.11.1 Copy current directory
(defun clipboard/set (astring) "Copy a string to clipboard" (with-temp-buffer (insert astring) (clipboard-kill-region (point-min) (point-max)))) ;; Copy current directory to clipboard ;; ;; Usage: Enter $ copy-pwd in eshell ;; (defun eshell/copy-pwd () (clipboard/set (eshell/pwd))) ;; Copy file name with full path to clipboard ;; ;; Usage: Enter $ copy-fpath <filename> in eshell. ;; (defun eshell/copy-fpath (fname) (let ((fpath (concat (eshell/pwd) "/" fname))) (clipboard/set fpath) (concat "Copied path: " fpath)))
2.12 Creating Eshell aliases programatically
(eshell/alias "ff" "find-file $1") (eshell/alias "fw" "find-file-other-window $1") (eshell/alias "fr" "find-file-other-frame $1")
Example of usage:
3 Emacs On Microsoft Windows
To get bash for Windows install with Chocolately package manager or download GIT version control app that comes bundled with bash and Unix utilities like grep, mv, ssh, df and dd.
Command to run Bash. Usage: M-x run-bash
(defun run-bash () (interactive) (let ((shell-file-name "C:\\Program Files\\Git\\bin\\bash.exe")) (shell "*bash*")))
Command to run cmd.exe. Usage: M-x run-cmdexe
(defun run-cmdexe () (interactive) (let ((shell-file-name "cmd.exe")) (shell "*cmd.exe*")))
To run Unix utilities and other command lines apps in Emacs add to the PATH variable the path to their directory:
(setenv "PATH" (concat ;; Path where is installed df.exe, curl.exe, dd.exe and other Unix tools. "C:\\Program Files\\Git\\usr\\bin" ";" ;; Path where is installed Fsi.exe (Fsharp Interpreter) ;; Fsc.exe (F# - Fsharp Compiler) "C:/Program Files (x86)/Microsoft SDKs/F#/4.0/Framework/v4.0/Fsi.exe" ";" (getenv "PATH") ))
4 Configuration Snippets
4.1 Separte Customization from init file
; For the built in customization UI in emacs that no one uses. If ;; some package tries to use it, at least have the decency to keep ;; this config file clean. (setq custom-file "~/.emacs.d/custom.el") (load custom-file 'noerror)
4.2 Backup Settings
;disable backup (setq backup-inhibited t) ;disable auto save (setq auto-save-default nil) ;; Get Rid of temporary files ending in ~ ;; The temporary files will be in the temporary directory ;; (setq backup-directory-alist `((".*" . ,temporary-file-directory))) ;; Move Deleted Files to Trash ;; (setq delete-by-moving-to-trash t)
4.3 Tab width and Spaces
;; force emacs to always use spaces instead of tab characters (setq-default indent-tabs-mode nil) ;; set default tab width to 4 spaces (setq default-tab-width 4) (setq tab-width 4)
4.4 Save Minibuffer History
Saves the minibuffer history on every Emacs session.
(savehist-mode 1) (setq savehist-additional-variables '(kill-ring search-ring regexp-search-ring)) ;; To set the file which the minibuffer is saved use: (setq savehist-file "~/.emacs.d/tmp/savehist")
4.5 Show Line number and column number in minibuffer
(setq line-number-mode t) (setq column-number-mode t)
4.6 Enable find file at point
When doing C-x C-f use information at point (your cursor) to open file or URL. I.e. if your cursor is on a file path, or URL, it defaults to that filled in the minibuffer.
;;find-file-at-point, smarter C-x C-f when point on path or URL (ffap-bindings)
4.7 Unique buffer names
;; Unique buffer name (require 'uniquify) (setq uniquify-buffer-name-style 'forward)
4.8 Mark Current Line
Enable Mark Current Line
;; mark current line: (global-hl-line-mode 1)
Disable Mark Current Line
;; mark current line: (global-hl-line-mode 0)
5 Emacs Server and Client
See also:
6 Org-mode
6.1 Code Block Templates
When the user writes '<p'in org-mode and hits tab key it expands to a python source code block like this:
#+BEGIN_SRC python :results value #+END_SRC
Elisp code:
(add-to-list 'org-structure-template-alist '("p" "#+BEGIN_SRC python :results ?value\n\n#+END_SRC"))
6.2 Custom Protocols
6.2.1 Open directory with dired mode
Org-mode already provides the protocol file:<filename>
to open a
directory or file. The motivation to implement this protocol is that it
is unambiguous like file protocol and easy to search.
Hyperlink syntax: dir:<file-path>
(add-hook 'org-mode-hook (lambda () (org-add-link-type "dir" #'dired nil) ))
Org-mode file example:
Log directory - dir:/var/log - [[dir:/var/log][Log directory]] System cofiguration - dir:/etc
6.2.2 Open directory with system file manager
Hyperlink format: dire:<directory-path>
(defvar default-file-manager-app "pcmanfm-qt") (defun org/protocol-dire (input) (start-process "proc" ;; Process name nil ;; Buffer name default-file-manager input )) (add-hook 'org-mode-hook (lambda () (org-add-link-type "dire" #'org/protocol-dire nil) ))
Example:
To open the directory file:/var/log in the system file manager click on the hyperlink bellow. - Hyperlink1: dire:/var/log - Hyperlink2: [[dire:/var/log][System Log directory]]
6.2.3 Man page
Provides a hyperlink that displays a man page when clicked.
(add-hook 'org-mode-hook (lambda () (org-add-link-type "man" #'woman nil)))
Example:
file test.org
Click on the hyperlinks bellow to open the man pages: Gcc Man Page: - man:gcc C-function cbrt Man Page - man:cbrt - [[man:cbrt][C-function cbrt Man Page]]
6.2.4 Elisp Documentation
Provides clickable link that shows the the Elisp documentation.
A link of format elisp-doc:add-hook
will show the add-hook
documentation when clicked.
Hyperlink format: elisp-doc:<function-name>
or [elisp-doc:<function-name>]
(defun org/protocol-elisp-doc (function-symbol) (princ function-symbol) (describe-function (intern-soft function-symbol)) ) (defun org/protocol-elisp-doc-html (path desc backend) (cl-case backend (html (format "<a href='' title='%s'>%s</a>" (documentation (intern-soft path)) (or desc path))))) (add-hook 'org-mode-hook (lambda () (org-add-link-type "elisp-doc" #'org/protocol-elisp-doc #'org/protocol-elisp-doc-html) ))
Example:
file: /tmp/test.org
Elisp documentation protocol: [[elisp-doc:add-hook][Function Add hook]] The function elisp-doc:start-process is used to start an asynchronous process.
This screenshot show what happens when the user clicks in the hyperlink.
Exported to html with: M-x org-html-export-to-html
6.3 Settings
6.3.1 General Settings
Syntax highlight for code blocks #+BEGIN_SRC .. #+END_SRC
;; Syntax highlight for code blocks #+BEGIN_SRC .. #+END_SRC ;; (setq org-src-fontify-natively t)
Syntax highlight for latex fragments
(setq org-highlight-latex-and-related '(latex script entities))
6.3.2 Code Block - Org-babel
Enable source code block in org files
(org-babel-do-load-languages 'org-babel-load-languages '((emacs-lisp . t) (sh . t) (python . t) (scheme . t) (lisp . t) (clojure . t) (R . t) (latex . t) (ruby . t) (C . t) ;;; (C++ . t) (ditaa . t) (haskell . t) ;; (fsharp . t) ;; (java . t) ;; (scala . t) ;; (javascript . t) (maxima . t) ))
Disable Security confirmation:
;; Disable security confirmations ;; (setq ;; Confirmation for running coide blocks org-confirm-babel-evaluate nil ;; Confirmation for elisp links org-confirm-elisp-link-function nil ;; Confirmation for shell links org-confirm-shell-link-function nil org-export-babel-evaluate nil )
7 Useful Commands for Elisp Developers
| Command: M-x [command] | Key Binding | Description |
|---|---|---|
| check-paren | Find unmatched parenthesis | |
| view-echo-area-messages | C-h e | Show the message buffer |
| find-variable | Open the file at the point the variable is defined. | |
| find-library | Open an Emacs library or package in the load-path. | |
| find-function | Opens an library.el file at the point the function is defined. | |
| locate-library | Show path of a library.el (Emacs Package) file. | |
| Documentation Commands | ||
| apropos | C-h | Search for all elisp symbols, variables and functions that match a regex pattern. |
| apropos-command | C-h a | Search for all commands (M-x cmd) that match a regexp pattern. |
| apropos-library | Show all symbols associated with an Elisp library (Emacs Package) | |
| info-apropos | Find all info pages that match a pattern. | |
| describe-function | C-h f | Show function documentation or docstring. |
| describe-mode | C-h m | Show current major mode documentation and all key bindings associated. |
| describe-bindings | C-h-b | Show all associated key bindings with the current buffer. |
| describe-variable | C-h v | Show variable documentation |
| describe-package | Describe an Emacs package installed from Melpa repository. | |
8 Useful Elisp Info Pages
8.1 Elisp
Elisp Top Page
(info "(elisp) Top")
Elisp Info Page
(info "(elisp)")
Introduction to programming Elisp
(info "(eintr)")
Tips about documenting Elisp
(info "(elisp)Documentation Tips")
Misc
(info "(elisp) Symbols")
(info "(elisp) Function Cells")
(info "(elisp) Defining Commands")
(info "(elisp) Functions")
8.2 Customization
Customization:
(info "(emacs) Customization")
Define Customizable Interface
(info "(elisp) Customization")
8.3 Layout
(info "(emacs) Fonts")
8.4 Syntax Tables
(info "(elisp) Syntax Tables")
8.5 Environment Variables and OS Detection
(info "(elisp) System Environment")
8.6 Subprocess Creation
- Creating Subprocesses
(info "(elisp) Subprocess Creation")
- Get process output
(info "(elisp) Accepting Output")
8.7 Keybindings
(info "(elisp) Function Keys")
(info "(elisp) Keys in Documentation")
(info "(emacs) Windows Keyboard")
8.8 Hooks (Events Callbacks)
(info "(elisp) Hooks")
(info "(elisp) Setting Hooks")
(info "(elisp) Advising Functions")
8.9 Buffer
Buffers
(info "(elisp) Buffers")
Buffer Content
(info "(elisp) Buffer Contents")
Cursor
(info "(elisp) Positions")
Hooks
(info "(elisp)Change Hooks")
Motion
(info "(elisp) Motion")
Text and Strings
(info "(elisp) Text")
(info "(elisp) Strings and Characters")
Buffer Local Variable
(info "(emacs) File Variables")
8.10 Window
Frame
(info "(elisp) Windows")
8.11 Frame
Frame
(info "(elisp) Frames")
Frame Parameters
(info "(elisp) Frame Parameters")
8.12 Files
Files
(info "(elisp) Files")
Change Files
(info "(elisp) Changing Files")
File Name Components
(info "(elisp) File Name Components")
Buffer Local Variable
(info "(emacs) File Variables")
8.13 Text Enconding ISO UTF8 …
(info "(emacs) International")
8.14 Loading, Libraries and Packages
Loading
(info "(elisp) How Programs Do Loading")
(info "(elisp) Loading")
Libraries
(info "(emacs) Lisp Libraries")
Packages
(info "(elisp) Packaging")
8.15 Batch Mode
Batch Mode
(info "(elisp) Batch Mode")
8.16 Syntax Highlight
(info "(elisp) Syntax Class Table")
9 Selected Gists
- garaud/pipe-to-emacs.py - Pipe to Emacs: Insert a result from an UNIX command into a new Emacs buffer
- dvnmk/process - Play youtube playlist using Emacs + mpv player.
- TikhonJelvis/epage - "A little pager script I wrote that calls out to emacsclient."


A R E A
Sign up
Sign in
{{ credentials.error }}
Did you forget your password ?
Sign in
Se connecter avec Facebook


|
Luwra
Minimal-overhead Lua wrapper for C++
|
Classes | |
| struct | luwra::internal::UserTypeWrapper< UserType >::ConstructorWrapper< Args > |
| struct | luwra::internal::UserTypeReg< UserType > |
| struct | luwra::internal::UserTypeWrapper< UserType > |
| struct | luwra::Value< UserType > |
| Enables reading/pushing for an arbitrary type. More... | |
| struct | luwra::Value< UserType * > |
Enables reading and pushing the arbitrary type UserType . More... | |
Namespaces | |
| namespace | luwra |
| namespace | luwra::internal |
Macros | |
| #define | LUWRA_DEF_REGISTRY_NAME(type, regname) |
| Define the registry name for a user type. This macro has to be used outside of any namespace. | |
| #define | LUWRA_MEMBER(type, name) {#name, LUWRA_WRAP_MEMBER(type, name)} |
Generate a user type member manifest. This is basically any type which can be constructed using a string and a lua_CFunction . For example std::pair<Pushable, Pushable> . | |
| #define | LUWRA_WRAP_CONSTRUCTOR(type, ...) (&luwra::internal::UserTypeWrapper<type>::ConstructorWrapper<__VA_ARGS__>::invoke) |
Generate a lua_CFunction wrapper for a constructor. | |
Typedefs | |
| template<typename UserType > | |
| using | luwra::internal::StripUserType = typename std::remove_cv< UserType >::type |
Functions | |
| template<typename UserType , typename... Args> | |
| UserType & | luwra::construct (State *state, Args &&... args) |
| Construct a user type value on the stack. | |
| template<typename Sig > | |
| void | luwra::registerUserType (State *state, const char *ctor_name, const MemberMap &props=MemberMap(), const MemberMap &meta=MemberMap()) |
| Same as the other registerUserType but registers a constructor in the global namespace. | |
| template<typename UserType > | |
| void | luwra::registerUserType (State *state, const MemberMap &props=MemberMap(), const MemberMap &meta=MemberMap()) |
| Register the metatable for a user type. This function allows you to register properties which are shared across all instances of the user type. | |
| #define LUWRA_DEF_REGISTRY_NAME | ( | type, | |
| regname | |||
| ) |
Define the registry name for a user type. This macro has to be used outside of any namespace.
| type | User type |
| regname | Registry name |
| #define LUWRA_MEMBER | ( | type, | |
| name | |||
| ) | {#name, LUWRA_WRAP_MEMBER(type, name)} |
Generate a user type member manifest. This is basically any type which can be constructed using a string and a lua_CFunction
. For example std::pair<Pushable, Pushable>
.
| type | User type |
| name | Member name |
Example:
| #define LUWRA_WRAP_CONSTRUCTOR | ( | type, | |
| ... | |||
| ) | (&luwra::internal::UserTypeWrapper<type>::ConstructorWrapper<__VA_ARGS__>::invoke) |
Generate a lua_CFunction
wrapper for a constructor.
| type | Type to instantiate |
| ... | Constructor parameter types |
Example:
in Lua


|
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
| def | __init__ |
| def | kind |
| def | CreateEntity |
| def | HandleEntity |
Static Public Member Functions | |
| def | RegisteredLoaders |
A base class for creating datastore entities from input data. To add a handler for bulk loading a new entity kind into your datastore, write a subclass of this class that calls Loader.__init__ from your class's __init__. If you need to run extra code to convert entities from the input data, create new properties, or otherwise modify the entities before they're inserted, override HandleEntity. See the CreateEntity method for the creation of entities from the (parsed) input data.
| def google.appengine.ext.bulkload.bulkload_deprecated.Loader.__init__ | ( | self, | |
| kind, | |||
| properties | |||
| ) |
Constructor. Populates this Loader's kind and properties map. Also registers it with the bulk loader, so that all you need to do is instantiate your Loader, and the bulkload handler will automatically use it. Args: kind: a string containing the entity kind that this loader handles properties: list of (name, converter) tuples. This is used to automatically convert the CSV columns into properties. The converter should be a function that takes one argument, a string value from the CSV file, and returns a correctly typed property value that should be inserted. The tuples in this list should match the columns in your CSV file, in order. For example: [('name', str), ('id_number', int), ('email', datastore_types.Email), ('user', users.User), ('birthdate', lambda x: datetime.datetime.fromtimestamp(float(x))), ('description', datastore_types.Text), ]
| def google.appengine.ext.bulkload.bulkload_deprecated.Loader.CreateEntity | ( | self, | |
| values, | |||
key_name = None |
|||
| ) |
Creates an entity from a list of property values. Args: values: list/tuple of str key_name: if provided, the name for the (single) resulting Entity Returns: list of datastore.Entity The returned entities are populated with the property values from the argument, converted to native types using the properties map given in the constructor, and passed through HandleEntity. They're ready to be inserted. Raises: AssertionError if the number of values doesn't match the number of properties in the properties map.
| def google.appengine.ext.bulkload.bulkload_deprecated.Loader.HandleEntity | ( | self, | |
| entity | |||
| ) |
Subclasses can override this to add custom entity conversion code. This is called for each entity, after its properties are populated from CSV but before it is stored. Subclasses can override this to add custom entity handling code. The entity to be inserted should be returned. If multiple entities should be inserted, return a list of entities. If no entities should be inserted, return None or []. Args: entity: datastore.Entity Returns: datastore.Entity or list of datastore.Entity
| def google.appengine.ext.bulkload.bulkload_deprecated.Loader.kind | ( | self | ) |
Return the entity kind that this Loader handes.
|
static |
Returns a list of the Loader instances that have been created.


Questions and considerations in case a COVID-19 vaccine is developed
What type of vaccine will it be (live/non-live, classic killed, DNA, or recombinant)?
Will it need special manufacture and transport conditions (such as cold chain)?
How robust will be vaccine-acquired immunity? After how many doses?
How protective will it be against infection?
For how long will vaccine-acquired immunity last? And hence: how often will the vaccine have to be administered? Only once? Or yearly?
Will there be any adverse effects?
To achieve herd immunity, how efficient will the vaccine need to be?
What proportion of the population (critical population) will need to be vaccinated?
How long will it take to effectively vaccinate the critical population?
Will vaccination be acceptable in the population? Or will vaccine hesitancy reduce uptake?
Which countries will get the vaccine first (implications for LICs/LMICs)?
How expensive will the vaccine be?
Will vaccination be made mandatory, especially for international travel?
LICs/LMICs, low and lower middle income countries.


Click on the button to toggle between showing and hiding content.
Simple collapsible
The .collapse
class indicates a collapsible element (a <div> in our example);
this is the content that will be shown or
hidden with a click of a button.
To control (show/hide) the collapsible content, add the data-toggle="collapse"
attribute to an <a> or a <button>
element. Then add the data-target="#id"
attribute to connect the button with the collapsible content
(<div id="demo">
)
Note: For <a> elements, you can use the href
attribute instead of the data-target
attribute:
By default, the collapse content is hidden. However, you can add the .in
class to show the content by default:


[next] [prev] [prev-tail] [tail] [up]
For a curve in the poloidal plane, the line element dl in terms of the cylindrical basis is written as dl = dRR(ϕ) + dZz. Using Cartesian coordinate basis vectors, dl is written as
Using Eq. (632) and (626), we obtain
[next] [prev] [prev-tail] [front] [up]


Email<EMAIL_ADDRESS>Dear sir,
I write to inform you of my desire to acquire estates or landed properties in your country on behalf of the Director of Contracts and Finance Allocation of the Federal Ministry of Works and Housing in Nigeria.
Considering his very strategic and influential position, he would want the transaction to be strictly as confidential as possible. He further wants his identity to remain undisclosed at least for now, until the completion of the transaction. Hence our desire to have an oversea agent.
I have therefore been directed to inquire if you would agree to act as our overseas agent in order to actualise this transaction.
The deal in brief, is that the funds with which to carry out our proposed investments in your country is presently in a coded account in the Nigerian apex bank and we need your assistance to transfer the funds to your country or any safe account outside your country in a convenient bank account that will be provided by you before we can put the funds into use.
For this you shall be considered to have executed a contract for the ministry. The contract sum of which shall run into US$15.5Million of which your share shall be 30% if you agree to be our overseas agent.
Your area of specialisation does not matter in this transaction,all that is required of you is a safe account and your willingness to assist us acquire estates in your country.
As soon as payment is effected and the amount mentioned above is successfully transferred into youraccount, we intend to use our own share in acquiring some estates abroad. For this too, you shall serve as our agent . I will be with you before the remmittance is made into your provided account to allow trust to play a very minimal role until performance is seen.
You are requested to communicate your acceptance or otherwise of this proposal to me,After which we shall discuss in details the modalities for seeing this transaction through.If however, you are not disposed to assist, kindlydelete/detroy this letter in view of the confidentiality of the proposed transaction and interest of personalities involved.
Thank you in anticipation of your co-operation.
Yours sincerely,
KAYODE PHILLIP.


ex_video_is_ready()
Returns true if video is ready for playback, false if not
Checks whether a video is ready for playback. Returns true if yes, false if the video is not ready (connection interrupted, buffering etc.).
//Check if video is still loading and draw a text for it if (not ex_video_is_ready() and ex_video_is_playing()) { draw_text(x, y, "Buffering..."); }


--- title: Creation and Detection of Clusters in Social Networks - Part 2 author: Urs Kalbitzer date: '2020-01-05' slug: social-clusters-II categories: [] tags: - R - Social Networks - ggraph - igraph subtitle: '' summary: '' authors: [] lastmod: '2020-01-05T20:00:00-00:00' featured: no image: placement: 1 caption: '' focal_point: 'Center' preview_only: no projects: [] commentable: true ---
In the previous post, I simulated clustered networks with varying strength of within-group, between-close-groups, and between-group social relationships. In part 2, I am using some of the methods provided by the igraph
package to test how well these simulated clusters can be (re)-detected.
rm(list = ls())
library(tidyverse)
library(tidygraph)
library(ggraph)
library(igraph)
In addition to these packages, this notebook requires the installation of the following packages: DT
, cowplot
, ggrepel
.
To avoid repetition, the code is not shown here, but can be copied from the previous post. The two objects that are required from there are individual_df
and network_df
.
The networks looked like that:
One important note: My motivation for this small project was my research on a group of ~50 adult red colobus monkeys. Therefore, I simulated networks where most individuals were somehow connected. The plot above, however, only shows association indices \(\ge\) 0.3 to make it easier to see the clusters. The complete network is much denser (see the final plot of this post). After finalizing the draft of this post, I realized that this may have affected how well (or not) the algorithms detected the (sub)-groups and therefore wanted to mention it here.
The igraph
-package provides several functions to detect communities within a network, which start with cluster_
(type ?communities
in R for a complete list). Most of these algorithms are explained here and here.
Before using the cluster_
functions, the networks have to be transformed into igraph
objects.
df_to_network <- function(network_df, weight_col){
network <- graph_from_data_frame(select(network_df,
from = Ind_A, to = Ind_B,
weight = matches(weight_col)),
directed = FALSE)
return(network)
}
network_1 <- df_to_network(network_df, weight_col = "S1")
network_2 <- df_to_network(network_df, weight_col = "S2")
network_3 <- df_to_network(network_df, weight_col = "S3")
network_4 <- df_to_network(network_df, weight_col = "S4")
Here’s the standard output for such an object:
network_1
## IGRAPH 1485755 UNW- 50 1225 --
## + attr: name (v/c), weight (e/n)
## + edges from 1485755 (vertex names):
## [1] ind_01--ind_02 ind_01--ind_03 ind_01--ind_04 ind_01--ind_05 ind_01--ind_06
## [6] ind_01--ind_07 ind_01--ind_08 ind_01--ind_09 ind_01--ind_10 ind_01--ind_11
## [11] ind_01--ind_12 ind_01--ind_13 ind_01--ind_14 ind_01--ind_15 ind_01--ind_16
## [16] ind_01--ind_17 ind_01--ind_18 ind_01--ind_19 ind_01--ind_20 ind_01--ind_21
## [21] ind_01--ind_22 ind_01--ind_23 ind_01--ind_24 ind_01--ind_25 ind_01--ind_26
## [26] ind_01--ind_27 ind_01--ind_28 ind_01--ind_29 ind_01--ind_30 ind_01--ind_31
## [31] ind_01--ind_32 ind_01--ind_33 ind_01--ind_34 ind_01--ind_35 ind_01--ind_36
## [36] ind_01--ind_37 ind_01--ind_38 ind_01--ind_39 ind_01--ind_40 ind_01--ind_41
## + ... omitted several edges
And here’s the output if one of the cluster_
functions is applied to a network, in this example the fast-greedy algorithm to the first network (S1):
cluster_fast_greedy(network_1)
## IGRAPH clustering fast greedy, groups: 3, mod: 0.32
## + groups:
## $`1`
## [1] "ind_05" "ind_09" "ind_12" "ind_17" "ind_20" "ind_23" "ind_26" "ind_29"
## [9] "ind_31" "ind_32" "ind_36" "ind_38" "ind_40" "ind_43" "ind_49" "ind_50"
##
## $`2`
## [1] "ind_03" "ind_15" "ind_19" "ind_21" "ind_22" "ind_27" "ind_28" "ind_37"
## [9] "ind_39" "ind_45" "ind_46" "ind_47" "ind_48"
##
## $`3`
## [1] "ind_01" "ind_02" "ind_04" "ind_06" "ind_07" "ind_08" "ind_10" "ind_11"
## + ... omitted several groups/vertices
Thus, the function tries to detect clusters (called groups
) and assigns each individual to such a group. Furthermore, it calculates modularity (mod
).
The aim of this post is to use several of these functions and then compare 1) the number of detected groups and 2) the detected group membership of all individuals to what was simulated (i.e., the ‘true’ values). Furthermore, I will extract the global modularity, which can be used to compare the quality of different cluster methods (many of the algorithms try to maximize modularity when searching for clusters).
Therefore, I first define a function to apply the specified algorithm to a network, extract these metrics from the resulting communities
-object, and return them in a dataframe.
get_communities <- function(igraph_network, cluster_method = NULL){
if(is.null(cluster_method)) { stop("no method specificied") }
community_object <- do.call(cluster_method, list(igraph_network))
return(tibble(Ind = community_object$names,
Ind_Cluster = community_object$membership,
global_modularity = modularity(igraph_network,
community_object$membership,
weights = E(igraph_network)$weight),
method = cluster_method) %>%
arrange(Ind))
}
Example:
get_communities(network_1, "cluster_fast_greedy")
## # A tibble: 50 x 4
## Ind Ind_Cluster global_modularity method
## <chr> <dbl> <dbl> <chr>
## 1 ind_01 3 0.318 cluster_fast_greedy
## 2 ind_02 3 0.318 cluster_fast_greedy
## 3 ind_03 2 0.318 cluster_fast_greedy
## 4 ind_04 3 0.318 cluster_fast_greedy
## 5 ind_05 1 0.318 cluster_fast_greedy
## 6 ind_06 3 0.318 cluster_fast_greedy
## 7 ind_07 3 0.318 cluster_fast_greedy
## 8 ind_08 3 0.318 cluster_fast_greedy
## 9 ind_09 1 0.318 cluster_fast_greedy
## 10 ind_10 3 0.318 cluster_fast_greedy
## # … with 40 more rows
Using this function, I apply several of the provided igraph
methods with the four networks.
networks <- grep("network_\\d", ls(), value = T)
cluster_methods <- c("cluster_fast_greedy", "cluster_infomap",
"cluster_label_prop", "cluster_optimal",
"cluster_louvain", "cluster_walktrap")
for(network_i in seq_along(networks)){
for(cluster_method_j in seq_along(cluster_methods)){
df_temp <- get_communities(igraph_network = get(networks[[network_i]]),
cluster_method = cluster_methods[[cluster_method_j]])
df_temp$network <- networks[[network_i]]
if(network_i == 1 & cluster_method_j == 1) community_df <- df_temp
else community_df <- bind_rows(community_df, df_temp)
}
}
# Show structure of created dataframe
str(community_df)
## Classes 'tbl_df', 'tbl' and 'data.frame': 1200 obs. of 5 variables:
## $ Ind : chr "ind_01" "ind_02" "ind_03" "ind_04" ...
## $ Ind_Cluster : num 3 3 2 3 1 3 3 3 1 3 ...
## $ global_modularity: num 0.318 0.318 0.318 0.318 0.318 ...
## $ method : chr "cluster_fast_greedy" "cluster_fast_greedy" "cluster_fast_greedy" "cluster_fast_greedy" ...
## $ network : chr "network_1" "network_1" "network_1" "network_1" ...
The resulting table includes the global modularity for each method and network, and the estimated group membership ($Ind_Cluster
) of all individuals within each networks using each of the methods.
Finally, I compare the results of the different algorithms with the simulated networks.
# Set up dataframe for loop
cluster_summary <- tibble(
Cluster_method = rep(cluster_methods, each = length(networks)),
Scenario = rep(networks, times = length(cluster_methods)),
Dyads_n = length(unique(network_df$dyad)),
Groups_n = length(unique(network_df$Ind_A_Group)),
Clusters_n = NA,
Dyads_correct_n = NA,
Dyads_correct_prop = NA,
Modularity = NA)
# Use a loop to summarize for all methods and networks the 1) number of clusters
# in comparison to simulated groups, and 2) the number of dyads correctly placed
# together in a cluster.
for(row_i in 1:nrow(cluster_summary)){
community_temp <- filter(community_df,
method == cluster_summary[row_i,]$Cluster_method &
network == cluster_summary[row_i,]$Scenario)
cluster_summary_temp <- network_df %>%
select(Ind_A, Ind_B, Ind_A_Group, Ind_B_Group) %>%
left_join(select(community_temp, Ind_A = Ind, Ind_A_Cluster = Ind_Cluster),
by = "Ind_A") %>%
left_join(select(community_temp, Ind_B = Ind, Ind_B_Cluster = Ind_Cluster),
by = "Ind_B") %>%
mutate(same_group = (Ind_A_Group == Ind_B_Group),
same_cluster = (Ind_A_Cluster == Ind_B_Cluster))
cluster_summary[row_i,]$Clusters_n = length(unique(community_temp$Ind_Cluster))
cluster_summary[row_i,]$Dyads_correct_n = sum(cluster_summary_temp$same_group == cluster_summary_temp$same_cluster)
cluster_summary[row_i,]$Modularity = unique(community_temp$global_modularity)
}
# Calculate variables comparing simulated with detected clusters and apply some
# other cosmetic changes
cluster_summary <- cluster_summary %>%
mutate(Dyads_correct_prop = Dyads_correct_n/Dyads_n,
Clusters_vs_Groups = Clusters_n/Groups_n,
Scenario = str_replace(Scenario, "network_", "S"),
Cluster_method = str_remove(Cluster_method, "cluster_")) %>%
mutate_if(is.numeric, ~round(., 2))
This is the resulting table:
knitr::kable(cluster_summary)
| Cluster_method | Scenario | Dyads_n | Groups_n | Clusters_n | Dyads_correct_n | Dyads_correct_prop | Modularity | Clusters_vs_Groups |
|---|---|---|---|---|---|---|---|---|
| fast_greedy | S1 | 1225 | 4 | 3 | 1121 | 0.92 | 0.32 | 0.75 |
| fast_greedy | S2 | 1225 | 4 | 3 | 1121 | 0.92 | 0.22 | 0.75 |
| fast_greedy | S3 | 1225 | 4 | 4 | 1225 | 1.00 | 0.31 | 1.00 |
| fast_greedy | S4 | 1225 | 4 | 3 | 1121 | 0.92 | 0.22 | 0.75 |
| infomap | S1 | 1225 | 4 | 3 | 1121 | 0.92 | 0.32 | 0.75 |
| infomap | S2 | 1225 | 4 | 1 | 304 | 0.25 | 0.00 | 0.25 |
| infomap | S3 | 1225 | 4 | 1 | 304 | 0.25 | 0.00 | 0.25 |
| infomap | S4 | 1225 | 4 | 1 | 304 | 0.25 | 0.00 | 0.25 |
| label_prop | S1 | 1225 | 4 | 2 | 848 | 0.69 | 0.23 | 0.50 |
| label_prop | S2 | 1225 | 4 | 1 | 304 | 0.25 | 0.00 | 0.25 |
| label_prop | S3 | 1225 | 4 | 3 | 1121 | 0.92 | 0.29 | 0.75 |
| label_prop | S4 | 1225 | 4 | 2 | 848 | 0.69 | 0.17 | 0.50 |
| optimal | S1 | 1225 | 4 | 3 | 1121 | 0.92 | 0.32 | 0.75 |
| optimal | S2 | 1225 | 4 | 3 | 1121 | 0.92 | 0.22 | 0.75 |
| optimal | S3 | 1225 | 4 | 4 | 1225 | 1.00 | 0.31 | 1.00 |
| optimal | S4 | 1225 | 4 | 4 | 1225 | 1.00 | 0.23 | 1.00 |
| louvain | S1 | 1225 | 4 | 3 | 1121 | 0.92 | 0.32 | 0.75 |
| louvain | S2 | 1225 | 4 | 3 | 1121 | 0.92 | 0.22 | 0.75 |
| louvain | S3 | 1225 | 4 | 4 | 1225 | 1.00 | 0.31 | 1.00 |
| louvain | S4 | 1225 | 4 | 4 | 1225 | 1.00 | 0.23 | 1.00 |
| walktrap | S1 | 1225 | 4 | 3 | 1121 | 0.92 | 0.32 | 0.75 |
| walktrap | S2 | 1225 | 4 | 3 | 1121 | 0.92 | 0.22 | 0.75 |
| walktrap | S3 | 1225 | 4 | 4 | 1225 | 1.00 | 0.31 | 1.00 |
| walktrap | S4 | 1225 | 4 | 4 | 1225 | 1.00 | 0.23 | 1.00 |
Perhaps, it’s a bit easier to interpret the results when graphically illustrated.
create_plot <- function(df, y_var, y_title){
y_var <- sym(y_var)
ggplot(data = df,
aes(x = Scenario, y = !!y_var, group = Cluster_method, color = Cluster_method)) +
geom_line(size = 1.25, alpha = .6) +
geom_point(color = "black", size = 2, alpha = .5) +
ggrepel::geom_label_repel(data = filter(df, Scenario == "S4"),
aes(x = Scenario, y = !!y_var, color = Cluster_method, label = Cluster_method),
size = 4,
hjust = 0, nudge_x = .5, direction = "y",
label.padding = .1, point.padding = .5, segment.size = .25,
show.legend = F) +
scale_x_discrete(limits = c("S1", "S2", "S3", "S4", rep("", 4))) +
scale_y_continuous(name = y_title, limits = c(0, NA)) +
theme_minimal() +
theme(legend.position = "none")
}
cluster_plot <- create_plot(df = cluster_summary,
y_var = "Clusters_vs_Groups",
y_title = "Detected # Clusters / True # Groups")
dyad_plot <- create_plot(df = cluster_summary,
y_var = "Dyads_correct_prop",
y_title = "Correct # Dyads / Total # Dyads")
modularity_plot <- create_plot(df = cluster_summary,
y_var = "Modularity",
y_title = "Modularity")
cowplot::plot_grid(cluster_plot, dyad_plot, modularity_plot, ncol = 3)
For the created networks, here are my conclusions:
ggraph
The ggraph
package also supports the use of the igraph::cluster_
functions, which can be nicely used for a quick look at clusters. Here, both the detected clusters (using different colors) and the simulated groups (using different shapes) are shown. In contrast to the plots above, all relationships (or edges) are shown, including those < 0.3, which makes the networks look much denser than in the other plots.
network_df %>%
select(from = Ind_A, to = Ind_B, weight = S1) %>%
as_tbl_graph(directed = FALSE) %>%
activate(nodes) %>%
left_join(distinct(individual_df, name = Ind, group = Group),
by = "name") %>%
mutate(detected_cluster = as.factor(group_louvain())) %>%
ggraph(., layout = "fr") +
geom_edge_arc(aes(width = weight),
alpha = 0.3, strength = 0.1) +
scale_edge_width(name = "Association Index", range = c(0, 1.5)) +
geom_node_point(aes(fill = detected_cluster, shape = group),
color = "black", size = 4) +
scale_fill_brewer(type = "qual", palette = 2) +
scale_shape_manual(values = c(21, 22, 23, 24)) +
theme_graph() +
guides(fill = guide_legend(override.aes = list(shape=21)))
It’s clear from this plot that group_a and group_b are put in the same cluster by the louvain method.


{% extends 'calaccess_campaign_browser/base.html' %} {% load humanize %} {% block title %}Expenditures - {{ committee.name }} - Committee - {{ block.super }}{% endblock %} {% block javascript %} {% endblock %} {% block content %} {% include "calaccess_campaign_browser/committee_nav.html" %}
Total expenditures: ${{committee.total_expenditures | intcomma}}
| cycle | filing | raw_org_name | amount |
|---|---|---|---|
| {{ expenditure.cycle }} | {{ expenditure.filing.pk }} | {{ expenditure.raw_org_name }} | ${{ expenditure.amount | intcomma }} |


Gregor von Laszewski
Home
Publications
Projects
Books
Proceedings
History
Free Shuttle
Contact
1
Human in the Loop Virtual Machine Management on Comet
Evaluating the Scientific Impact of XSEDE
Comet - Tales from the Long Tail. Two Years In, and 10,000 Users Later
Comet: Tales from the Long Tail: Two Years in and 10,000 users later
Teaching Big Data and Open Source Software on Chameleon Cloud
User Managed Virtual Clusters in Comet
Peer Comparison of XSEDE and NCAR Publication Data
Peer comparison of XSEDE and NCAR publication data
Peer comparison of XSEDE publication data
Peer Comparison of Cluster Resource Provider Publication Data
Peer Comparison of XSEDE Publication Data
TAS View of XSEDE Users and Usage
Towards a Scientific Impact Measuring Framework for Large Computing Facilities - a Case Study on XSEDE
Using XDMoD to Facilitate XSEDE Operations, Planning and Analysis
Abstract Image Management and Universal Image Registration for Cloud and HPC Infrastructures
Comparison of Multiple Cloud Frameworks
Design of an Accounting and Metric-based Cloud-shifting and Cloud-seeding Framework for Federated Clouds and Bare-metal Environments
FutureGrid Image Repository: A Generic Catalog and Storage System for Heterogeneous Virtual Machine Images
Analysis of Virtualization Technologies for High Performance Computing Environments
Grappling cloud infrastructure services with a generic image repository
Simulation of Threat Management of Urban Water Distribution Systems with Grid Workflow
Design of the FutureGrid Experiment Management Framework
Cyberaide onServe: Software as a Service on Production Grids
Towards Energy Aware Scheduling for Precedence Constrained Parallel Tasks in a Cluster with DVFS
Schedule Distributed Virtual Machines in a Service Oriented Environment
Efficient resource management for Cloud computing environments
Enabling Energy-Efficient Analysis of Massive Neural Signals Using GPGPU
Cyberaide Creative: On-Demand Cyberinfrastructure Provision in Clouds
Thermal Aware Workload Scheduling with Backfilling for Green Data Centers
Towards Thermal Aware Workload Scheduling in a Data Center
GreenIT Service Level Agreements
Accelerating Partitional Algorithms for Flow Cytometry on GPUs
Power-Aware Scheduling of Virtual Machines in DVFS-enabled Clusters
Open Grid Computing Environments
Experiment and Workflow Management Using Cyberaide Shell
Accelerating Time to Scientific Discovery with a Grid-Enhanced Microsoft Project
Cyberaide JavaScript: A JavaScript Commodity Grid Kit
e-Science Project and Experiment Management with Microsoft Project
JavaScript Grid Abstractions
GridTorrent Framework: A High-performance Data Transfer and Data Sharing Framework for Scientific Computing
GridTorrent Framework: A High-performance Data Transfer and Data Sharing Framework for Scientific Computing
Swift: Fast, Reliable, Loosely Coupled Parallel Computation
An Adaptive Cyberinfrastructure for Threat Management in Urban Water Distribution Systems
The Java CoG Kit Experiment Manager
Workflow Management Through Cobalt
A Repository Service for Grid Workflow Components
Quality Assured Ad Hoc Grids
A Grid Certificate Authority for Community and Ad-hoc Grids
An OGSA-based Quality of Service Framework
Toward an Architecture for Ad Hoc Grids
A Collaborative Informatics Infrastructure for Multi-scale Science
QoS Support for High-performance Scientific Grid Applications
Abstracting the Grid
GridAnt: A Client-Controllable Grid Workflow System
Grid Computing for the Masses: An Overview
Metadata in the Collaboratory for Multi-Scale Chemical Science
Reputation-based Grid Resource Selection
A File Transfer Component for Grids
Flow-based Multistage Co-allocation Service
Further Refinements of the Bond Dissociation Energy in Water and Hydroxyl Radical Using the Active Thermochemical Tables Approach
A QoS Guided Scheduling Algorithm for the Computational Grid
Open Collaborative Grid Services Architecture (OCGSA)
A Grid Service Based Active Thermochemical Table Framework
Key Concepts and Services of a Grid Information Service
InfoGram: A Peer-to-Peer Information and Job Submission Service
Grid Computing: Enabling a Vision for Collaborative Research
Software, Component, and Service Deployment in Computational Grids
Design and Implementation of a CORBA Commodity Grid Kit
The Astrophysics Simulation Collaboratory: A Science Portal Enabling Community Software Development
A Greedy Grid - The Grid Economic Engine Directive
Designing Grid-based Problem Solving Environments and Portals
Grid-based Asynchronous Migration of Execution Context in Java Virtual Machines
CoG Kits: A Bridge between Commodity Distributed Computing and High-Performance Grids
Grid Infrastructure to Support Science Portals for Large Scale Instruments
A Quasi-Realtime X-Ray Microtomography System at the Advanced Photon Source
Real-Time Analysis, Visualization, and Steering of Microtomography Experiments at Photon Sources
A Fault Detection Service for Wide Area Distributed Computations
Supercomputing Data Analysis with an Example on the APS CATs
A Directory Service for Configuring High-Performance Distributed Computations
An Interactive Parallel Programming Environment Applied in Atmospheric Science
Design Issues for the Parallelization of an Optimal Interpolation Algorithm
Partitioning a graph with a parallel genetic algorithm
Intelligent Structural Operators for the k-way Graph Partitioning Problem
A Parallel Genetic Algorithm for the Graph Partitioning Problem
Cite
×


scan QR-code
Scan Result
Today's Pick Up
Les Vêtement
" I don't do fashion. I am fashion. "
Scroll Down
scan QR code
Scan Result
First
Second
STYLE TEST
--which style becoming on you?--
QnA


+45 521 109 51
<EMAIL_ADDRESS>Frederiksberg C
Denmark
Drop me a line and I will get back to you.


Table rows can be reordered by using the reorderable-table
directive. The above example shows how to add
buttons to move rows up or down, add a handle to allow a row to be dragged into a new position and also a button to remove
individual rows.
The following attributes are available to configure the behavior:
The table
element should have both the reorderable-table
directive and an ng-model
.
The ng-model
should be set to the array in the controller containing the table data. This model will be
updated when any rows are reordered to reflect the changes.
The table rows should be rendered using the ng-repeat
directive as this will keep all changes in both the
UI and model in sync. Note that you cannot use track by
in the ng-repeat
as the reorderable-table
directive tracks each row internally. Using track by
will prevent the table from working as expected.
The example above uses the following to render table rows using ng-repeat
:
Any element in the table row can be used to move a row up or down or to drag it. These elements are designated by adding specific attributes to them. The following attributes can be added to elements to give them reorder actions:
In the example above we added the following as our reordering controls:
To remove rows from a reorderable table add a button to the row that calls a function in your controller which will remove the appropriate item from the model array, after which the table will re-render showing the correct items., e.g.:


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.catechis.Stats
public class Stats
| Field Summary | |
|---|---|
private int |
allowed_number_of_levels
This veriable should be comming from some kind of user preference. |
private double |
avg_reading_level
|
private double |
avg_writing_level
|
private java.lang.String |
last_date
The last date found in passed in word lists and test lists. |
private long |
last_time
This is the last date in milliseconds for comparrison to a new date. |
private java.util.Vector |
log
HOMEGROWN DEGUGGING KILLS! |
private int |
num_of_words
|
private java.util.Vector |
r_rof_milliseconds
|
private java.util.Vector |
r_rof_running_count
|
private java.util.Vector |
reading_counts
|
private java.util.HashMap |
reading_hash
|
private java.util.Hashtable |
reading_levels
|
private java.util.ArrayList |
reading_list
|
private java.util.Vector |
reading_rof
These vectors holds the Rate Of Forgetting information. |
private java.util.ArrayList |
reading_tests
|
private java.util.Vector |
reading_word_test_dates
|
private int |
retired_words
|
private double |
running_total_of_reading_word_averages
|
private double |
running_total_of_tests
|
private double |
running_total_of_writing_word_averages
|
private java.util.Vector |
total_reading_counts
|
private int |
total_test_count
|
private int |
total_word_count
These variables needs to come from exclusive categories only. |
private java.util.Vector |
total_writing_counts
|
private java.util.Vector |
w_rof_milliseconds
|
private java.util.Vector |
w_rof_running_count
|
private WordTestDates |
word_test_dates
This object holds lists of the last test date of each word. |
private java.lang.String |
words_last_test_date
There is a difference in processing words and tests, so this is a word specific last date |
private java.lang.String |
words_last_test_reading_date
|
private java.lang.String |
words_last_test_reading_level
There keep a separate tally for reading and writing tests so that the WordTestDates can be set. |
private long |
words_last_test_reading_time
|
private long |
words_last_test_time
The milliseconds associated with the words_last_time_date. |
private java.lang.String |
words_last_test_writing_date
|
private java.lang.String |
words_last_test_writing_level
|
private long |
words_last_test_writing_time
|
private java.util.Vector |
writing_counts
|
private java.util.HashMap |
writing_hash
|
private java.util.Hashtable |
writing_levels
|
private java.util.ArrayList |
writing_list
|
private java.util.Vector |
writing_rof
|
private java.util.ArrayList |
writing_tests
|
private java.util.Vector |
writing_word_test_dates
|
| Constructor Summary | |
|---|---|
Stats()
|
| Method Summary | |
|---|---|
private void |
addArrayListToLog(java.util.ArrayList list)
|
private void |
addErrorToLog(java.lang.NullPointerException npe)
|
private void |
collectTotalWordCounts(java.util.Vector writing_counts,
java.util.Vector reading_counts)
This method goes thru all the writing and reading levels and adds them to the totals for all word categores, which is used when we are trolling categories of words and want to know the totals of the entire group. |
private void |
compareDates(java.lang.String str_date)
We convert the string with DateFormat.parse and get the calendar object and use the after method to determine which is the most recent date, and either return the new date, or the previousely set date. |
private void |
compareReadingWordTestDates(java.lang.String str_date,
java.lang.String level,
Word word)
|
private void |
compareWordDates(java.lang.String str_date)
|
private void |
compareWritingWordTestDates(java.lang.String str_date,
java.lang.String level,
Word word)
|
void |
evaluateROF(java.util.ArrayList list,
java.util.HashMap hash)
This method should be private except for testing. |
void |
evaluateTests(java.util.ArrayList list)
This method should be private except for testing. |
void |
evaluateWordRateOfForgetting(Word word)
This method has to cycle through all the tests and evaluate them to determine when a word goes up a level, and how long it takes before it then fails a test and goes back down. |
void |
evaluateWordTests(java.util.Vector words)
|
double |
getAverage(java.util.Hashtable tests)
This method takes a Hashtable with the test_date-score format. |
double |
getAverageReadingLevel()
|
double |
getAverageWritingLevel()
|
private long |
getDateDelta(java.lang.String later_date,
java.lang.String early_date)
This method just gets the difference between the two dates in milliseconds. |
private void |
getLastTest(Word word)
This helper method goes thru all the Test objects in a Word object to find the most recent test. |
java.lang.String |
getLastTestDate()
|
java.lang.String |
getLastWordsTestDate()
|
void |
getLastWordTest(Word word)
|
java.util.Vector |
getLog()
For debuggin only? |
int |
getNumberOfWords()
|
long |
getParticularRateOfForgetting(java.lang.String type,
int index)
|
void |
getRateOfForgetting(Word word)
This method has to cycle through all the tests and evaluate them to determine when a word goes up a level, and how long it takes before it then fails a test and goes back down. |
java.util.Vector |
getReadingCounts()
|
java.util.HashMap |
getReadingHash()
|
java.util.ArrayList |
getReadingList()
|
java.util.Vector |
getReadingRateOfForgetting()
This method has to take the reading rates of forgetting which span the range of limited levels, right now 0-3, which is saved as milliseconds which have been added to each other by finding the delta between two dates and then divide by the reading running count which is just the number of deltas that have been added, to create the average rate of forgetting. |
int |
getRetiredWords()
|
double |
getRunningTotalOfTests()
|
private java.lang.String |
getTestLevel(java.lang.String test_file)
parse level from level 0 reading.test |
private java.lang.String |
getTestType(java.lang.String test_file)
Here we parse the test type. |
int |
getTotalOfAllWords()
|
double |
getTotalOfReadingWordAverages()
|
double |
getTotalOfWritingWordAverages()
|
java.util.Vector |
getTotalReadingCounts()
|
int |
getTotalTestCount()
|
java.util.Vector |
getTotalWritingCounts()
|
WordTestDates |
getWordTestDates()
|
java.util.Vector |
getWritingCounts()
|
java.util.HashMap |
getWritingHash()
|
java.util.ArrayList |
getWritingList()
|
java.util.Vector |
getWritingRateOfForgetting()
Same as getReadingRateOfForgetting(). |
private boolean |
isWordRetired(Word word)
Retired words are considered learned and therefore are not included in the word level stats, and are not usually tested. |
void |
parseTestName(Test test)
We have to get the milliseconds from the date so that another list can be created which can then be sorted so that the test objects, which are stored in hashes with the milliseconds as the index can be retrieved in historical order. |
long |
rateOfForgetting(int new_running_count,
long new_milliseconds)
Debugging method |
void |
resetLog()
|
void |
resetROF()
|
void |
setReadingROFMillisecondsAndRC(java.util.Vector r_rof_m,
java.util.Vector r_rof_rc)
THis method is for testing only |
private java.util.Vector |
setupLongVector()
|
private java.util.Vector |
setupVector()
This is a helper method for word stats. |
java.util.Vector |
unbindTest(int i,
Test[] tests,
java.util.ArrayList reading_tests,
java.util.ArrayList writing_tests)
Returns a Vector of two ArrayLists. |
void |
updateReadingROF(long date_delta,
int int_level)
This method should be private except for testing. |
void |
updateWritingROF(long date_delta,
int int_level)
This method should be private except for testing. |
void |
wordStats(java.util.Vector words)
This is the sample xml format: |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private int allowed_number_of_levels
private java.lang.String last_date
private java.lang.String words_last_test_date
private java.lang.String words_last_test_reading_level
private java.lang.String words_last_test_writing_level
private java.lang.String words_last_test_reading_date
private java.lang.String words_last_test_writing_date
private long words_last_test_reading_time
private long words_last_test_writing_time
private long last_time
private long words_last_test_time
private int num_of_words
private double avg_reading_level
private double avg_writing_level
private java.util.Vector reading_counts
private java.util.Vector writing_counts
private java.util.Hashtable writing_levels
private java.util.Hashtable reading_levels
private int total_word_count
private int total_test_count
private double running_total_of_reading_word_averages
private double running_total_of_writing_word_averages
private double running_total_of_tests
private java.util.Vector total_reading_counts
private java.util.Vector total_writing_counts
private java.util.Vector reading_rof
private java.util.Vector writing_rof
private java.util.Vector r_rof_milliseconds
private java.util.Vector r_rof_running_count
private java.util.Vector w_rof_milliseconds
private java.util.Vector w_rof_running_count
private java.util.ArrayList reading_tests
private java.util.ArrayList writing_tests
private java.util.HashMap reading_hash
private java.util.ArrayList reading_list
private java.util.HashMap writing_hash
private java.util.ArrayList writing_list
private java.util.Vector reading_word_test_dates
private java.util.Vector writing_word_test_dates
private WordTestDates word_test_dates
private int retired_words
private java.util.Vector log
| Constructor Detail |
|---|
public Stats()
| Method Detail |
|---|
public void wordStats(java.util.Vector words)
This is the sample xml format:
This method collects the reading and writing levels of words or phrases.
It can calculate the average reading and writing levels, as well as counting the number of words at each level, which are stored in a vector.
private boolean isWordRetired(Word word)
word
-
public int getRetiredWords()
public void getRateOfForgetting(Word word)
This method has to cycle through all the tests and evaluate them to determine when a word goes up a level, and how long it takes before it then fails a test and goes back down. For instance, if a user passes a word on a writing test, and then two weeks later fails on the word, and then another word is failed after four weeks, then the average Rate Of Forgetting would be two three weeks.
This means that the user should be tested on words that has gone up a level (or at least reviewing the word, for instance by getting an e-mail thats lists the words about to pass the date of the R.O.F.) before the R.O.F date has passed.
First I think we should create two lists for reading and writing that consist of the date and the score sorted by date. Then we cycle thru the lists and keep track of the level as it goes up and down, and then create two more lists that contain the average time elapsed before a failed test stored at the failed level. Does that make sense?
public java.util.Vector unbindTest(int i, Test[] tests, java.util.ArrayList reading_tests, java.util.ArrayList writing_tests)
Returns a Vector of two ArrayLists. The first is the reading tests, and the second is the writing tests. We chose this rout because Java can only return one object, and we thought it better than setting memeber variables. The test object properties are filled in with the type and level. This method should be private but was made public for testing purposi.
Since the early development team used xml files, the test file names comtained the type of test as well as the level tested. Of course this information was in the test file iteself as xml elements. But when test histories were created, only the file name of the test was recorded, making it necessary to parse the test name to get this information and then set it back as a Vector of test objects with the level and type set.
Silly early developers! Like to play with xml files! Thank god the wise current developers are going to use a database and a sensible object relation bridge and at such a time this method will not be necessary.
(Dont believe him, for he is the very same early developer who talks to himself and has yet to figure out hoe to use this promised ORB mentioned above)
public void evaluateWordTests(java.util.Vector words)
public void evaluateWordRateOfForgetting(Word word)
This method has to cycle through all the tests and evaluate them to determine when a word goes up a level, and how long it takes before it then fails a test and goes back down. For instance, if a user passes a word on a writing test, and then two weeks later fails on the word, and then another word is failed after four weeks, then the average Rate Of Forgetting would be two three weeks.
This means that the user should be tested on words that has gone up a level (or at least reviewing the word, for instance by getting an e-mail thats lists the words about to pass the date of the R.O.F.) before the R.O.F date has passed.
First I think we should create two lists for reading and writing that consist of the date and the score sorted by date. Then we cycle thru the lists and keep track of the level as it goes up and down, and then create two more lists that contain the average time elapsed before a failed test stored at the failed level. Does that make sense?
public void parseTestName(Test test)
We have to get the milliseconds from the date so that another list can be created which can then be sorted so that the test objects, which are stored in hashes with the milliseconds as the index can be retrieved in historical order.
Here are some silly old notes from the earlier implementations that failed because we tried to sort a list of beans based on the date property which was a string.
This method doesnt work. POssibly if they are stored as Date objects, but I couldnt get that method to work under tests in Domartin either, so we went with list/hashmap method.
Returns a Vector of two ArrayLists. The first is the reading tests, and the second is the writing tests. We chose this rout because Java can only return one object, and we thought it better than setting memeber variables. The test object properties are filled in with the type and level. This method should be private but was made public for testing purposi.
Since the early development team used xml files, the test file names comtained the type of test as well as the level tested. Of course this information was in the test file iteself as xml elements. But when test histories were created, only the file name of the test was recorded, making it necessary to parse the test name to get this information and then set it back as a Vector of test objects with the level and type set.
Silly early developers! Like to play with xml files! Thank god the wise current developers are going to use a database and a sensible object relation bridge and at such a time this method will not be necessary.
(Dont believe him, for he is the very same early developer who talks to himself and has yet to figure out hoe to use this promised ORB mentioned above)
public void evaluateROF(java.util.ArrayList list, java.util.HashMap hash)
public void evaluateTests(java.util.ArrayList list)
public void updateWritingROF(long date_delta, int int_level)
public void updateReadingROF(long date_delta, int int_level)
private java.lang.String getTestType(java.lang.String test_file)
private java.lang.String getTestLevel(java.lang.String test_file)
private long getDateDelta(java.lang.String later_date, java.lang.String early_date)
If we re-use the date format and parse position we get a null pointer exception.
public double getAverage(java.util.Hashtable tests)
public java.lang.String getLastTestDate()
public java.lang.String getLastWordsTestDate()
public double getAverageReadingLevel()
public double getAverageWritingLevel()
public java.util.Vector getReadingCounts()
public java.util.Vector getWritingCounts()
public int getNumberOfWords()
public int getTotalOfAllWords()
public double getTotalOfReadingWordAverages()
public double getTotalOfWritingWordAverages()
public java.util.Vector getTotalReadingCounts()
public java.util.Vector getTotalWritingCounts()
public int getTotalTestCount()
public double getRunningTotalOfTests()
public java.util.ArrayList getReadingList()
public java.util.ArrayList getWritingList()
public java.util.HashMap getReadingHash()
public java.util.HashMap getWritingHash()
public WordTestDates getWordTestDates()
public void setReadingROFMillisecondsAndRC(java.util.Vector r_rof_m, java.util.Vector r_rof_rc)
public java.util.Vector getReadingRateOfForgetting()
public long getParticularRateOfForgetting(java.lang.String type, int index)
public java.util.Vector getWritingRateOfForgetting()
public long rateOfForgetting(int new_running_count, long new_milliseconds)
private void compareDates(java.lang.String str_date)
Each date was created like this: Date date = new Date(); String str_date = date.toString();
Using date = df.parse(str_date) w/o the ParsePosition object needs to catch a java.text.ParseException.
SAMPLE DATE : Mon Aug 15 08:09:00 PST 2005
private void collectTotalWordCounts(java.util.Vector writing_counts, java.util.Vector reading_counts)
private void compareWordDates(java.lang.String str_date)
private java.util.Vector setupVector()
private java.util.Vector setupLongVector()
private void getLastTest(Word word)
public void getLastWordTest(Word word)
private void compareReadingWordTestDates(java.lang.String str_date, java.lang.String level, Word word)
private void compareWritingWordTestDates(java.lang.String str_date, java.lang.String level, Word word)
public java.util.Vector getLog()
public void resetLog()
public void resetROF()
private void addArrayListToLog(java.util.ArrayList list)
private void addErrorToLog(java.lang.NullPointerException npe)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


{#include index-entry} {#body}› It can be tested in the Dev UI (available in dev mode only). {/include}


This Privacy Policy was last modified on March 19, 2019.
brucemyers.com ("us", "we", or "our") operates https://bambots.brucemyers.com (the"Site"). This page informs you of our policies regarding the collection, use and disclosure of Personal Information we receive from users of the Site.
Like many site operators, we collect information that your browser sends whenever you visit our Site ("Log Data"). This Log Data may include information such as your browser type, browser version, the pages of our Site that you visit, the time and date of your visit, the time spent on those pages and other statistics.
This site does NOT collect your IP address.
This site does NOT collect your referrer information.


[1]
Blacks are BLACK~Color brillant; No sound control from TV when using an external sound system
[2]
PQ, Blacks, refresh rate; green a little bright


Third Eye
Create.
Share.
Experience.
kick
starter
visit the
GLAM
project page
Third Eye
About
kick
starter
visit the
GLAM
project page
Contact
About
Contact
About
Contact
Third Eye
Download as .zip
Download as .tar.gz
View on GitHub


About
TAMS Computer Science Organization is a club dedicated to improving ability in computer science. We focus on everything related to computer science, including algorithms, web design, game programming, and more.
General Assemblies (GAs)
Our club meets weekly on Tuesdays in the conference room. Tuesday's at 9pm is the GA and at 10pm it changes into algorithms lecture.


Akan names are derived from Ghanian culture.
Frequently in Ghana, children are given their first
name as a 'day name' which
corresponds to the day in the
week they were born.
Here are Ghanian day names.
Men
Women
Are you interested in knowing your Akan name?
enter your full
information on the form below to generate your Akan name.
Copyright © | Mercyline


Sweet Free Stuff
///////////////////////////////////////////
Free Cankermelts and XyliMelts for Dry Mouth Samples
Posted: 08 Dec 2014 11:40 AM PST
http://feedproxy.google.com/&edburner&utm_medium=email
FREE XyliMelts for Dry Mouth Sample FREE Cankermelts sample
The post Free Cankermelts and XyliMelts for Dry Mouth Samples appeared
first on SweetFreeStuff.com.
///////////////////////////////////////////
Free Smokin Barrel Peanuts or Trail Mix at Stripes Stores
Posted: 07 Dec 2014 11:23 PM PST
http://feedproxy.google.com/&edburner&utm_medium=email
Free Smokin Barrel Peanuts or Trail Mix at Stripes Stores. Expires 12/9.
They are located in Texas, Oklahoma and New Mexico.
The post Free Smokin Barrel Peanuts or Trail Mix at Stripes Stores appeared
first on SweetFreeStuff.com.
CommentsWould love to try them by AndreaHubby would love this surprise. by
Julie Bunn
///////////////////////////////////////////
Free Clothing Tape Measure
Posted: 07 Dec 2014 01:26 PM PST
http://feedproxy.google.com/&edburner&utm_medium=email
Free Clothing Tape Measure
The post Free Clothing Tape Measure appeared first on SweetFreeStuff.com.
CommentsThe second link (the stantt one) says that they are all out of …
by Sharon