Skip to content

Instantly share code, notes, and snippets.

@omsai
omsai / Asna Coalition (Permadeath).rws
Last active September 28, 2021 13:09
Ludeon forums bug 55078
This file has been truncated, but you can view the full file.
<?xml version="1.0" encoding="utf-8"?>
<savegame>
<meta>
<gameVersion>1.3.3080 rev669</gameVersion>
<modIds>
<li>ludeon.rimworld</li>
<li>ludeon.rimworld.ideology</li>
</modIds>
<modSteamIds>
<li>0</li>
@omsai
omsai / Singularity
Created April 25, 2021 11:15
Attempt to create a container to run Steam with a newer GLIBC for Surviving Mars' March 2021 patch on Debian 10
Bootstrap: library
From: ubuntu:20.04
%environment
export STEAM_RUNTIME=1
export LD_LIBRARY_PATH=". ldd vgui2_s.so"
#export LC_ALL=C
%post
# Set noninteractive or the keyboard-configuration step will cause it to hang.
$ cat build.log
/opt/cmake-3.16.8-Linux-x86_64/bin/cmake
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Ign:3 https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 InRelease
Get:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [1160 kB]
Get:5 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [12.7 kB]
Get:6 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [635 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [6679 B]
Ign:8 https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 InRelease
@omsai
omsai / sense-pat.sh
Last active September 14, 2017 20:37
Install and run R package grantfigs201710 on SLURM cluster
#!/bin/bash
#SBATCH -o sense-pat.out
set -e
# Globals
repo="grantfigs201710"
main() {
test -n "$SLURM_JOB_ID" && echo "Job $SLURM_JOB_ID" >> sense-pat.out
@omsai
omsai / mappable.sh
Last active September 8, 2017 20:17
Install and run R package mappable on SLURM HPC cluster
#!/bin/bash
#SBATCH --nodes 1
#SBATCH --partition phi #general #general_requeue
#SBATCH --ntasks 1 #4 #24
#-SBATCH --cpus-per-task 64
#SBATCH --output mappable.out
#SBATCH --job-name kmap
genomes='genomes <- c(
"BSgenome.Dmelanogaster.UCSC.dm6",
@omsai
omsai / Makefile
Created August 2, 2017 11:56
Collect System76 nvidia logs
# Generate log files for System76 case 21094
#
# Usage:
#
# make
#
# # To add a suffix to the tarball name:
#
# make suffix=after-nvidia-purge
#
# Pariksheet Nanda <hpc@uconn.edu> 2017
#
# License: CC0 Public Domain
#
# To the extent possible under law, Pariksheet Nanda has waived all copyright
# and related or neighboring rights to host.py
from __future__ import print_function
from ansible.errors import AnsibleError
@omsai
omsai / mine.R
Last active March 8, 2017 00:03
Recent Data Carpentry Genomics workshops
suppressPackageStartupMessages({
library(tidyverse)
library(rvest) # Webscraping
library(stringr)
})
workshops_url <- read_html("http://www.datacarpentry.org/workshops-past/")
workshops <- tibble(
date = html_nodes(workshops_url, "td[class='date']") %>% html_text(),
name = html_nodes(workshops_url, "td[class='link']") %>% html_text(),
@omsai
omsai / centos7-cellprofiler-2.2.0.def
Last active December 29, 2016 09:44
Singularity bootstrap for CellProfiler 2.2.0 using CentOS 7.3 minimal host to run on RHEL 6.7 nodes of the UConn Storrs HPC cluster
# -*- mode: rpm-spec -*-
# Singularity bootstrap for CellProfiler
# Host OS used is CentOS Linux release 7.3.1611 (Core)
BootStrap: yum
OSVersion: 7
MirrorURL: http://mirror.centos.org/centos-%{OSVERSION}/%{OSVERSION}/os/$basearch/
Include: yum
## Plot heatmap in the style of Fig 1B-2:
## dx.doi.org/10.1371/journal.pgen.1006224.g001
library(ggplot2)
## Mock data of 50 rows, 10 columns and 2 strands.
value <- function(mean_ = 0, length_ = 10) {
dnorm(seq(-1, 3, length = length_), mean = mean_, sd = 0.2)
}
noise <- function(length_ = 10) {
rnorm(length_, mean = 0, sd = 0.1)