import pandas as pd
import numpy as np
from tabulate import tabulate
df = pd.DataFrame(np.random.random((4,3)), columns=['A','B','C'])
print("foo")
return(tabulate(df, headers="keys", tablefmt="orgtbl"))
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;; https://vxlabs.com/2014/05/25/emacs-24-with-prelude-org2blog-and-wordpress/ | |
(setq blog-directory "~/github/kozikow-blog") | |
(setq org-list-allow-alphabetical t) | |
(require 'org2blog) | |
(require 'netrc) | |
(require 'org2blog-autoloads) | |
d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"""How to gzip a string. | |
This works for Python 3.2. For 3.1-, look at the original gist (under "Revisions") | |
""" | |
import gzip | |
def gzip_str(string_: str) -> bytes: | |
return gzip.compress(string_.encode()) | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(with-eval-after-load "company-autoloads" | |
(global-company-mode 1) | |
(setq company-tooltip-limit 20 | |
company-minimum-prefix-length 1 | |
company-echo-delay 0 | |
company-begin-commands '(self-insert-command | |
c-electric-lt-gt c-electric-colon | |
completion-separator-self-insert-command) | |
company-idle-delay 0.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
GCC_VERSION="5.2.0" | |
WORKDIR="$HOME/src/" | |
INSTALLDIR="/platform" | |
## NOTE: XCode must be installed (through App Store) and the following run to install command-line tools. | |
## THIS IS IMPORTANT! Among other things, it creates '/usr/include' and installs the system header files. | |
# xcode-select --install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun toggle-maximize-buffer () "Maximize buffer" | |
(interactive) | |
(if (= 1 (length (window-list))) | |
(jump-to-register '_) | |
(progn | |
(set-register '_ (list (current-window-configuration))) | |
(delete-other-windows)))) | |
;; Bind it to a key. |