Skip to content

Instantly share code, notes, and snippets.

Avatar

Shadi Akiki shadiakiki1986

View GitHub Profile
View try-seqacademy.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shadiakiki1986
shadiakiki1986 / ssh-reverse-tunnel-into-colab-vm.ipynb
Created Jul 31, 2020
ssh reverse tunnel into colab VM.ipynb
View ssh-reverse-tunnel-into-colab-vm.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@shadiakiki1986
shadiakiki1986 / mpi3snp-error-on-plink-example.ipynb
Last active Jul 30, 2020
mpi3snp error on plink example.ipynb
View mpi3snp-error-on-plink-example.ipynb
@shadiakiki1986
shadiakiki1986 / test.cpp
Created Jul 28, 2020
show gpu devices with CUDA C++
View test.cpp
// from https://github.com/FBerendsen/niftireg/blob/fc526c152fd5eaced271d1d6de7c16661b2abd3e/reg-lib/cuda/checkCudaCard.cpp
//
// rm test
// g++ -I/usr/local/cuda/include -L/usr/local/cuda/lib64 -lcuda test.cpp # undefined reference to cudaGetDeviceCount
// PATH=$PATH:/usr/local/cuda/bin/
// nvcc -x cu test.cpp --std=c++11 -lineinfo -o test
#include <cuda_runtime.h>
//#include <cuda.h>
@shadiakiki1986
shadiakiki1986 / get_gdrive.R
Last active Jul 22, 2020
Download file from gdrive in R, python, bash
View get_gdrive.R
# Based on https://www.matthuisman.nz/2019/01/download-google-drive-files-wget-curl.html
# Example usage: get_gdrive(fileid="12345", destfile="file.txt")
get_gdrive <- function(fileid, destfile) {
handle = curl::new_handle()
myurl=sprintf("https://docs.google.com/uc?export=download&id=%s", fileid)
destconf="confirm.txt"
curl::curl_download(myurl, destconf, handle = handle)
@shadiakiki1986
shadiakiki1986 / t3-replicating-plink-epistasis-r.ipynb
Last active Mar 12, 2020
t3-replicating plink epistasis.r.ipynb
View t3-replicating-plink-epistasis-r.ipynb
@shadiakiki1986
shadiakiki1986 / summarize.rs
Last active Feb 14, 2020
orbtk example with trait
View summarize.rs
// Based on https://github.com/redox-os/orbtk/blob/a9653954fed7275328bc8e893c3465506154571e/examples/clear.rs
// Modified to add a trait member called "summary" which is either implemented as a Book or a NewsArticle
// The summarize button would call the trait function "summarize" (be it from Book or NewsArticle).
// I couldn't get this to work yet, with the troubling sections marked with FIXME
use orbtk::prelude::*;
//---------------------------------------
// https://doc.rust-lang.org/1.30.0/book/second-edition/ch10-02-traits.html
pub trait Summary {
View out.txt
+-------------------------+------------------------+---------------------+-----------------+-----------------+-------------+
| . | ImageMagick-6 | NetworkManager | ODBCDataSources | PackageKit | UPower |
+-------------------------+------------------------+---------------------+-----------------+-----------------+-------------+
| adduser.conf | coder.xml | NetworkManager.conf | | PackageKit.conf | UPower.conf |
| anacrontab | colors.xml | conf.d | | Vendor.conf | |
| apg.conf | delegates.xml | dispatcher.d | | | |
| appstream.conf | log.xml | dnsmasq* (2) | | | |
| bash* (2) | magic.xml | system-connections | | | |
| bindresvport.blacklist
View README.md

Instructions

  • cargo new test-rustgym-longestcommonprefix
  • cd test-rustgym-longestcommonprefix
  • copy src/main.rs from below file
  • cargo test
@shadiakiki1986
shadiakiki1986 / spinner.sh
Created Jan 3, 2020
Display spinner in bash
View spinner.sh
#!/bin/bash
# from https://raw.githubusercontent.com/golemfactory/golem/develop/Installer/Installer_Linux/install.sh
# Usage: bash spinner.sh
spin='⡄⡆⡇⠇⠃⠋⠉⠙⠘⠚⠒⠖⠆⠦⠤⢤⢠⣠⣀⣄'
printf "hey there .. working "
while true
do