Skip to content

Instantly share code, notes, and snippets.

View alperyilmaz's full-sized avatar

Alper Yilmaz alperyilmaz

View GitHub Profile
❯ G_MESSAGES_DEBUG=Timings rofi -show drun
(process:95196): Timings-DEBUG: 03:04:49.471: 0.000001 (0.000000): Started
(process:95196): Timings-DEBUG: 03:04:49.471: 0.000135 (0.000135): ../source/rofi.c:main:902
(process:95196): Timings-DEBUG: 03:04:49.472: 0.000756 (0.000621): ../source/rofi.c:main:953
(process:95196): Timings-DEBUG: 03:04:49.472: 0.000874 (0.000118): ../source/rofi.c:main:960 Setup Locale
(process:95196): Timings-DEBUG: 03:04:49.473: 0.001704 (0.000830): ../source/rofi.c:main:962 Collect MODES
(process:95196): Timings-DEBUG: 03:04:49.473: 0.001736 (0.000032): ../source/rofi.c:main:964 Setup MODES
(process:95196): Timings-DEBUG: 03:04:49.473: 0.001763 (0.000027): ../source/rofi.c:main:968 Setup mainloop
(process:95196): Timings-DEBUG: 03:04:49.473: 0.001920 (0.000157): ../source/rofi.c:main:971 NK Bindings
(process:95196): Timings-DEBUG: 03:04:49.473: 0.002187 (0.000267): ../source/xcb.c:display_setup:1663 Open Display
/**
* rofi -dump-theme output.
* Rofi version: 1.7.5-dev
**/
* {
red: rgba ( 220, 50, 47, 100 % );
selected-active-foreground: var(background);
lightfg: rgba ( 88, 104, 117, 100 % );
separatorcolor: var(foreground);
urgent-foreground: var(red);
configuration {
/* modes: "drun,run,filebrowser,window,combi";*/
font: "Mono 12";
/* location: 0;*/
/* yoffset: 0;*/
/* xoffset: 0;*/
/* fixed-num-lines: true;*/
show-icons: true;
terminal: "rofi-sensible-terminal";
ssh-client: "ssh";
sudo mount /dev/sda3 /mnt
sudo mount /dev/sda1 /mnt/boot/efi
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo cp /etc/resolv.conf /mnt/etc/
sudo chroot /mnt
apt install --reinstall linux-generic linux-headers-generic
update-initramfs -c -k all
exit
sudo bootctl --path=/mnt/boot/efi install
@alperyilmaz
alperyilmaz / network-effects.R
Created October 31, 2018 13:31
Calculate negative effect or competing behaviors in bipartite networks
library(tidygraph)
library(purrr)
library(dplyr)
library(ggraph)
# Generate sample data: FRAME1
sample_data <- data.frame(genes = c("G1", "G2", "G3", "G4", "G4", "G5", "G6"),
mirna = c("M1", "M1","M1", "M1", "M2", "M2", "M2"),
Geneexpression = c(10000, 10000, 5000, 10000, 10000, 5000, 10000),
mirnaexpression = c(1000, 1000, 1000, 1000, 2000, 2000, 2000), stringsAsFactors = FALSE)
$ journalctl -u reflowlet.service
-- Logs begin at Fri 2018-08-17 16:35:59 UTC, end at Fri 2018-08-17 16:41:38 UTC. --
Aug 17 16:36:38 ip-172-31-22-92.us-west-2.compute.internal systemd[1]: Starting reflowlet...
Aug 17 16:36:39 ip-172-31-22-92.us-west-2.compute.internal docker[894]: Error response from daemon: No such container: reflowlet.service
Aug 17 16:36:39 ip-172-31-22-92.us-west-2.compute.internal docker[1033]: Error: No such container: reflowlet.service
Aug 17 16:36:39 ip-172-31-22-92.us-west-2.compute.internal bash[1039]: WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Aug 17 16:36:39 ip-172-31-22-92.us-west-2.compute.internal bash[1039]: Login Succeeded
Aug 17 16:36:41 ip-172-31-22-92.us-west-2.compute.internal docker[1051]: 1534363366: Pulling from grailbio/reflowlet
Aug 17 16:36:41 ip-172-31-22-92.us-west-2.compute.internal docker[1051]: d1426d011624: Pulling fs layer
Aug 17 16:36:41 ip-172-31-22-92.us-west-2.compute.internal docker[1051]: ee3565897cb9: Pulling fs layer
2018/08/17 19:35:27 reflow version 0.6.8 (go1.10)
2018/08/17 19:35:27 reflowlet image grailbio/reflowlet:1534363366
2018/08/17 19:35:27 run ID: 1187b865
2018/08/17 19:35:30 evaluating program /home/user/tmp/workflow-pipelines/reflow/hello.rf
(no params)
(no arguments)
2018/08/17 19:35:31 ec2cluster: pending{}
2018/08/17 19:35:31 ec2cluster: allocate {mem:1.0GiB cpu:1 disk:1.0GiB}
2018/08/17 19:35:31 ec2cluster: pending{} waiter0{mem:1.0GiB cpu:1 disk:1.0GiB}
2018/08/17 19:35:31 ec2cluster: launch t2.small{mem:1.9GiB cpu:1 disk:250.0GiB} pending{mem:1.9GiB cpu:1 disk:250.0GiB}
@alperyilmaz
alperyilmaz / comic-test
Created April 27, 2018 08:40
bowtie test
$ docker run --rm -v $(pwd)/data2:/data comics/bowtie2 wgsim -e 0 -N 10000 -1 300 -2 300 -r 0 -R 0 /data/s_cerevisiae.fa /data/sample_seq_1.fastq /data/sample_seq_2.fastq
[wgsim] seed = 1524818001
[wgsim_core] calculating the total length of the reference sequence...
[wgsim_core] 18 sequences, total length: 12162995
$ ls -alh data2
total 25M
drwxr-xr-x 2 alper alper 4.0K Apr 27 11:32 .
drwxr-xr-x 4 alper alper 4.0K Apr 27 11:31 ..
-rw-r--r-- 1 root root 6.2M Apr 27 11:33 sample_seq_1.fastq
Verifying that "alperyilmaz.id" is my Blockstack ID. https://onename.com/alperyilmaz
@alperyilmaz
alperyilmaz / uniq-solutions8.sh
Created November 17, 2016 13:45
second most frequent start codon in E.coli coding sequences
$ cut -f2 Ecoli-cds-protein | cut -c1-3 | sort | uniq -c | sort -nr
3715 ATG
307 GTG
71 TTG
2 CTG
2 ATT