Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
# make a multi-resolution favicon from a png image
convert favicon.png -define icon:auto-resize=64,48,32,16 favicon.ico
@hmartiniano
hmartiniano / assotest.py
Created January 12, 2017 12:16 — forked from brentp/assotest.py
c-alpha test in python. copied from AssotesteR. and rpy2 wrapper for all functions in AssotesteR
"""
C-alpha test for rare variants. Copied from AssotesteR
Only reports the permutation p-value, not the asymptotic
This also wraps all of the functions in R's AssotesteR using
rpy2. Any function available in AssotesteR, e.g. CALPHA is
availailable here has r_calpha().
The args are always
casecon: a list of 0's, 1's indicating case/control status
#!/bin/bash
pip install --upgrade torch-scatter
pip install --upgrade torch-sparse
pip install --upgrade torch-cluster
pip install --upgrade torch-spline-conv
pip install torch-geometric

Keybase proof

I hereby claim:

  • I am hmartiniano on github.
  • I am hugomartiniano (https://keybase.io/hugomartiniano) on keybase.
  • I have a public key ASDl3qfq8S0Gu2yHRgdLTR0N1oTCVc341NGPZXhs3oDh-go

To claim this, I am signing this object:

@hmartiniano
hmartiniano / xtrct.py
Last active October 9, 2019 15:28
Python command line script to run xpath queries on web pages.
#!/user/bin/env python
import sys
import argparse
from lxml import html
from urllib.request import urlopen
def parse(base_href, xpath):
with urlopen(base_href) as f:
tree = html.fromstring(f.read())
#!/bin/bash
#
# Instal docker in ubuntu
#
sudo apt-get update
sudo apt-get install \
apt-transport-https \
ca-certificates \
#!/bin/bash
curl -LOs https://downloads.globus.org/toolkit/globus-connect-server/globus-connect-server-repo_latest_all.deb
dpkg -i globus-connect-server-repo_latest_all.deb
apt-get update
# Install Globus Connect Server:
apt-get install globus-connect-server
(echo << EOF
#!/bin/bash
# script to transfer the contents of a remote directory to a local machine
# the script use a brute force approach where the transfer is repeated if
# the return code of the rsync command is anything other than 0 (e.g. if an error occurs)
USERNAME=root
REMOTE_HOST=192.168.1.1
REMOTE_DIR=/home/example
LOCAL_DIR=.
' Adapted from https://stackoverflow.com/questions/34280088/ms-word-macro-for-converting-track-changes-markup-into-text
Sub TrackChangesToMarkup()
Dim chgAdd As Word.Revision
If ActiveDocument.Revisions.Count = 0 Then
MsgBox "There are no revisions in this document", vbOKOnly
Else
ActiveDocument.TrackRevisions = False
For Each chgAdd In ActiveDocument.Revisions
---
- hosts: compute
vars:
singularity_version: 3.5.2
become: yes
tasks:
- name: install prerequisites
apt:
update_cache: yes
autoclean: yes