Skip to content

Instantly share code, notes, and snippets.

Avatar

Lior Galanti moonwatcher

View GitHub Profile
View longestPalindrome.py
class Solution(object):
def longestPalindrome(self, s):
"""
:type s: str
:rtype: str
"""
def check_palindrom(start, end):
while start > 0 and end < n-1 and s[start-1] == s[end+1]:
start-=1
end+=1
View wordBreak.py
# https://leetcode.com/problems/word-break-ii/submissions/
class Solution(object):
def wordBreak(self, s, wordDict):
"""
:type s: str
:type wordDict: List[str]
:rtype: List[str]
"""
n = len(s)
View palindromIndex.py
#!/usr/bin/env python3
import math
import os
import random
import re
import sys
#
# abcMdefggfedcba
@moonwatcher
moonwatcher / iptable.rules
Created Aug 13, 2020
Pyxis IP table rules
View iptable.rules
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:delegate_input - [0:0]
:nyu - [0:0]
:reject - [0:0]
:syn_flood - [0:0]
-A INPUT --jump delegate_input
View install_pheniqs.sh
#!/bin/bash
set -u
PHENIQS_RELEASE_VERSION="head_static"
PHENIQS_INSTALLER="pheniqs-build-api.py"
PHENIQS_INSTALLER_URL="https://raw.githubusercontent.com/biosails/pheniqs-build-api/master/$PHENIQS_INSTALLER"
PHENIQS_TEMP_DIRECTORY="/tmp/pheniqs_$PHENIQS_RELEASE_VERSION"
shell_join() {
local arg
View .profile
export PATH=/root/.bin:/usr/local/bin:/usr/local/sbin:$PATH
export PS1="\e[1m\h\e[m:\w \u% "
alias ls="ls --color=none"
export HTOPRC=/tmp/.htoprc
View backup.sh
#!/usr/bin/env bash
# Author: Lior Galanti <lior.galanti@nyu.edu>
# NYU Center for Genetics and System Biology
SOURCE="$1"
TARGET="$2"
NAME="$3"
# cron does not load the user shell variables
# The user name of the executing user is available in LOGNAME
@moonwatcher
moonwatcher / keywords.txt
Created Nov 20, 2019
Possible keywords for Pheniqs paper
View keywords.txt
demultiplex
barcode
barcode tag
barcode identification
sample barcode
cellular barcode
combinatorial indexing
barcode confidence
barcode decoding confidence
barcode noise filtering
View ben_split.json
{
"PL": "ILLUMINA",
"PM": "M00518",
"flowcell id": "HM3KGDMXX",
"input": [
"r1.fastq",
"r2.fastq"
],
"lane number": 1,
"multiplex": {
View ben.json
{
"PL": "ILLUMINA",
"PM": "M00518",
"flowcell id": "HM3KGDMXX",
"input": [
"r1.fastq",
"r2.fastq"
],
"lane number": 1,
"multiplex": {