#################################################################
# How to install Arch in your Android (into the App TermuxArch)
# and be able to use your Android device like a personal computer
# even running a X server to have GUI
#################################################################
###############################
# Install Termux
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
# Remarks: | |
# | |
# The export is done using the automated testing framework [Selenium](https:// | |
# de.wikipedia.org/wiki/Selenium) which results in opening a browser window | |
# (Google Chrome) that might has to be closed by hand. Other than Plotly's | |
# own `export()` function this one also allows to set the `width` and `height` | |
# of the exported plot (in the former it's hardcoded to 800x600 pixels). If | |
# `incl_PDF_copy`/`incl_PNG_copy` is set to `TRUE`, the exported SVG additionally | |
# gets converted to a PDF/PNG using the R package [`rsvg`](https://github.com/ | |
# jeroen/rsvg/tree/40576ac326621b40224db344b09158f4ff717433) which relies on |
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
# TimSort by https://quinston.com/code-snippets/timsort-algorthm-search-code/ | |
import random | |
def InsertionSort(array): | |
for x in range (1, len(array)): | |
for i in range(x, 0, -1): | |
if array[i] < array[i - 1]: | |
t = array[i] |
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
This gist I write, because I couldn't find step by step instructions | |
how to install and start postgresql locally (using conda within a conda environment - with the result | |
that you can run it without sudo/admin rights on your machine!) | |
and not globally in the operating system (which requires sudo/admin rights on that machine). | |
I hope, this will help especially people new to postgresql (and those who don't have sudo/admin rights on a specific machine but want | |
to run postgresql there)! | |
#################################### | |
# create conda environment |
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
################################################# | |
# solution mainly using pandas functionalities | |
# reading-in returns an ordered dict (which contains sheet_names as key) -> close to R functionality | |
# appending to excel like this might be slower | |
################################################# | |
def xlsx2dfs(fpath, **kwargs): | |
return pd.from_excel(fpath, sheet_name=None, **kwargs) |
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
import pandas as pd | |
df = pd.read_csv("XXXXX_20180101_20171231_start.csv", sep=";", header=None) | |
df_target = pd.read_csv("XXXX_20180101_20171231_test2_target.csv", sep=";", header=None) | |
""" | |
inspect by: | |
df.head() |
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
""" | |
Lisp languages support an image-based development cycle at the REPL. | |
R - having its roots in Lisp - it was first implemented in Scheme - has overtaken this. | |
R's base command `save.image(filepath)` can save the state of an entire REPL session in a file, | |
and next time you start R, you can start where you stopped, by hitting `load(filepath)`. | |
I was asking myself, since Python's REPL is ipython, what supports | |
similar functionailities for pythonistas. |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; notes from the book "Vom Problem zum Programm" by Herbert Klaeren and Michael Sperber | |
;; on object oriented programming | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; object oriented programming = message passing style + state + self + inheritance | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; object = active container in message passing style |
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
# flagstat.fpath <- "~/testing/br-mgd-srt-srt.txt" | |
# content of the file (flagstat output): | |
51712430 + 0 in total (QC-passed reads + QC-failed reads) | |
0 + 0 secondary | |
0 + 0 supplementary | |
0 + 0 duplicates | |
46380832 + 0 mapped (89.69% : N/A) |
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
# install IGV viewer for visualization of alignments | |
wget http://data.broadinstitute.org/igv/projects/downloads/2.4/IGV_2.4.8.zip | |
unzip IGV_2.4.8.zip | |
cd IGV_2.4.8 | |
bash igv.sh |
OlderNewer