Skip to content

Instantly share code, notes, and snippets.

View darked89's full-sized avatar

Darek Kedra darked89

  • Barcelona, Spain
View GitHub Profile
@vals
vals / Exploratory analysis with scVI.ipynb
Last active April 13, 2024 18:23
Exploratory analysis with scVI
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tdhopper
tdhopper / .editorconfig
Last active July 21, 2022 12:52
Configuration files to enable validating python code with flake8, mypy, isort, and black using pre-commit hooks (via https://pre-commit.com/). Also an .editorconfig file for standardization across editors.
# http://editorconfig.org/#file-format-details
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 4
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true
@m-radzikowski
m-radzikowski / script-template.sh
Last active May 4, 2024 04:13
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wbazant
wbazant / R-package-with-singularity.md
Last active April 3, 2024 14:00
Singularity container for an R module on a research cluster

Singularity container for an R module on a research cluster for VEuPathDB

Introduction

To use this technology, we need Singularity installed in the target environment by root, which is possibly the largest obstacle for us.

Writing a development container

Here is a container for analysing 16s rRNA data in MicrobiomeDB, requiring an R package DADA2. DADA2 releases to BioConductor, but we want the ability to load an arbitrary commit for development.

We can build on somebody's container with r-devtools, and add our libraries:

@tylermorganwall
tylermorganwall / ripple.R
Created November 22, 2019 12:35
Pathtraced ripple effect in R with rayshader/rayrender
library(rayshader)
wave = matrix(0,200,200)
for(t in seq(1,360,1)) {
for(i in 1:200) {
for(j in 1:200) {
wave[i,j] = 50*sinpi(sqrt((i-100)^2 + (j-100)^2)/30-t/180) * exp(-(sqrt((i-100)^2 + (j-100)^2))/100)
}
}
wave %>% height_shade() %>% plot_3d(wave, soliddepth = -50, shadowdepth = -70, theta=315,zoom=1.1)
@sinkingsugar
sinkingsugar / halide.nim
Created July 2, 2019 05:52
Nim and Haldie
import nimline
import os
static:
let
halideDist = getenv("HALIDE_DIST")
assert halideDist != "" , "HALIDE_DIST environment variables not set!"
when defined windows:
@andy-thomason
andy-thomason / Genomics_A_Programmers_Guide.md
Created May 14, 2019 13:32
Genomics a programmers introduction

Genomics - A programmer's guide.

Andy Thomason is a Senior Programmer at Genomics PLC. He has been witing graphics systems, games and compilers since the '70s and specialises in code performance.

https://www.genomicsplc.com

@danielecook
danielecook / callNimFromR.org
Created March 11, 2019 11:39 — forked from Vindaar/callNimFromR.org
How to call Nim code from R using `.C` interface

Calling Nim from R

A super short introduction how to call Nim code from R using the .C interface. I’m not an R user normally, so I googled and used this post as a reference: https://www.r-bloggers.com/three-ways-to-call-cc-from-r/

Writing our Nim procedure

Let’s define a simple procedure, which we want Nim to do:

@sinkingsugar
sinkingsugar / Dockerfile
Created February 20, 2019 08:51
Pytorch build
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu18.04
RUN apt-get update && apt-get install -y build-essential git cmake python3-pip libmpfr-dev libgmp-dev wget curl
RUN pip3 install pyyaml
RUN pip3 install typing
RUN cd && \
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh