Skip to content

Instantly share code, notes, and snippets.

@CodyKochmann
CodyKochmann / deb-install-podman.sh
Created February 18, 2020 14:29
install podman on debian 10 and kali linux
echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_10/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list
wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_10/Release.key -O- | apt-key add -
apt update
apt install podman
@sudu
sudu / dplyr-group-select.r
Created December 13, 2016 03:38
dplyr - select first and last row from grouped data
# from http://stackoverflow.com/questions/31528981/dplyr-select-first-and-last-row-from-grouped-data
#
# select first and last row from grouped data
# df adjusted for demonstration
df <- data.frame(id=c(1,1,1,2,2,2,3),
stopId=c("a","b","c","a","b","c","a"),
stopSequence=c(1,2,3,3,1,4,3))
# way1
################################################################################
#
# Sex ratios 12-10-2016
# Replicate the analysis for the post https://habrahabr.ru/post/311970/ (RUS)
# Ilya Kashnitsky, ilya.kashnitsky@gmail.com
#
################################################################################
# load required packages
# The code is written and tested on a PC-win7-x64
@nachocab
nachocab / immgen.tsv
Last active October 15, 2024 14:51
Human-readable version of IMMGEN annotation codes
activated_T_cells T.8Nve.Sp.OT1 spleen OT1 tg Naïve CD8 OT-I tg 6W spleen transfer of 5x10^3 OTI cells Listeria.OVA 5x10^3 cfu
activated_T_cells T.8Eff.Sp.OT1.d6.LisOva spleen OT1 tg effectors CD8 day 6 Listeria.OVA 4- 8+ 45.1+ OT-I tg > B6.CD45.2 6W spleen transfer of 5x10^3 OTI cells Listeria.OVA 5x10^3 cfu
activated_T_cells T.8Eff.Sp.OT1.d8.LisOva spleen OT1 tg effectors CD8 day 8 Listeria.OVA 4- 8+ 45.1+ OT-I tg > B6.CD45.2 6W spleen transfer of 5x10^3 OTI cells Listeria.OVA 5x10^3 cfu
activated_T_cells T.8Eff.Sp.OT1.d10.LisOva spleen OT1 tg effectors CD8 day 10 Listeria.OVA 4- 8+ 45.1+ OT-I tg > B6.CD45.2 6W spleen transfer of 5x10^3 OTI cells Listeria.OVA 5x10^3 cfu
activated_T_cells T.8Eff.Sp.OT1.d15.LisOva spleen OT1 tg effectors CD8 day 15 Listeria.OVA 4- 8+ 45.1+ OT-I tg > B6.CD45.2 6W spleen transfer of 5x10^3 OTI cells Listeria.OVA 5x10^3 cfu
activated_T_cells T.8Mem.Sp.OT1.d45.LisOva spleen OT1 tg Memory CD8 day 45 Listeria.OVA 4- 8+ 45.1+ OT-I tg
@roachhd
roachhd / README.md
Last active April 7, 2025 01:28
EMOJI cheatsheet 😛😳😗😓🙉😸🙈🙊😽💀💢💥✨💏👫👄👃👀👛👛🗼🔮🔮🎄🎅👻

EMOJI CHEAT SHEET

Emoji emoticons listed on this page are supported on Campfire, GitHub, Basecamp, Redbooth, Trac, Flowdock, Sprint.ly, Kandan, Textbox.io, Kippt, Redmine, JabbR, Trello, Hall, plug.dj, Qiita, Zendesk, Ruby China, Grove, Idobata, NodeBB Forums, Slack, Streamup, OrganisedMinds, Hackpad, Cryptbin, Kato, Reportedly, Cheerful Ghost, IRCCloud, Dashcube, MyVideoGameList, Subrosa, Sococo, Quip, And Bang, Bonusly, Discourse, Ello, and Twemoji Awesome. However some of the emoji codes are not super easy to remember, so here is a little cheat sheet. ✈ Got flash enabled? Click the emoji code and it will be copied to your clipboard.

People

:bowtie: 😄

@mislavs
mislavs / BooksAdapter
Created October 29, 2014 19:58
RecyclerView.Adapter implementation for displaying a list of Book objects.
package com.msvs.bookshelf.adapters;
import android.os.Handler;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;
@stuartbain
stuartbain / subdomain_validator.rb
Last active October 25, 2021 22:33
Custom validator for Subdomains
class SubdomainValidator < ActiveModel::EachValidator
# http://matthewhutchinson.net/2010/10/27/rails-3-subdomain-validation-activemodeleachvalidator
def validate_each(object, attribute, value)
return unless value.present?
reserved_names = %w(www ftp mail pop smtp admin ssl sftp)
reserved_names = options[:reserved] if options[:reserved]
if reserved_names.include?(value)
object.errors[attribute] << 'cannot be a reserved name'
end
@ZenCocoon
ZenCocoon / default.rb
Last active January 11, 2017 14:20
Whenever Chef Recipe on EY AppCloud
#
# Cookbook Name:: whenever
# Recipe:: default
#
ey_cloud_report "whenever" do
message "starting whenever recipe"
end
if node[:instance_role] == 'solo' ||
(node[:utility_instances].length > 0 && node[:utility_instances][0][:name] == node[:name]) ||
@zacstewart
zacstewart / classifier.py
Last active September 19, 2024 23:56
Document Classification with scikit-learn
import os
import numpy
from pandas import DataFrame
from sklearn.feature_extraction.text import CountVectorizer
from sklearn.naive_bayes import MultinomialNB
from sklearn.pipeline import Pipeline
from sklearn.cross_validation import KFold
from sklearn.metrics import confusion_matrix, f1_score
NEWLINE = '\n'
@dsparks
dsparks / Heatmap.R
Last active August 19, 2022 06:54
ggplot2 heatmap with "spectral" palette
doInstall <- TRUE # Change to FALSE if you don't want packages installed.
toInstall <- c("ggplot2", "reshape2", "RColorBrewer")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
# Generate a random matrix
# This can be any type of numeric matrix,
# though we often see heatmaps of square correlation matrices.
nRow <- 9
nCol <- 16