Skip to content

Instantly share code, notes, and snippets.

View afonsoguerra's full-sized avatar

José Afonso Guerra-Assunção afonsoguerra

View GitHub Profile
@afonsoguerra
afonsoguerra / Genome_Informatics_2017_software.csv
Created November 11, 2017 05:43 — forked from seandavi/Genome_Informatics_2017_software.csv
Software list mined from twitter feed for CSHL Genome Informatics meeting, 2017
url name user type
https://bioconductor.org/packages/regioneR regioneR NA Bioconductor
https://bioconductor.org/packages/karyoploteR karyoploteR NA Bioconductor
https://bioconductor.org/packages/metavizr metavizr NA Bioconductor
https://bioconductor.org/packages/IsoformSwitchAnalyzeR IsoformSwitchAnalyzeR NA Bioconductor
https://cran.rstudio.com/packages/UpSetR UpSetR NA CRAN
https://github.com/pachterlab/sleuth sleuth pachterlab github
https://github.com/nekrut/lab_site lab_site nekrut github
https://github.com/bernatgel/karyoploter_tutorial karyoploter_tutorial bernatgel github
https://bitbucket.org/biobakery/metaphlan2 metaphlan2 biobakery github
@afonsoguerra
afonsoguerra / UCL_Eduroam.md
Created March 19, 2018 12:10 — forked from Jimbles/UCL_Eduroam.md
UCL Eduroam on Raspberry Pi

UCL Eduroam on Raspberry Pi

add this to /etc/wpa_supplicant/wpa_supplicant.conf

network = {
ssid="eduroam"
key_mgmt=WPA-EAP IEEE8021X
eap=PEAP
identity="#####@ucl.ac.uk"
anonymous_identity="[email protected]"
@afonsoguerra
afonsoguerra / star.scad
Created August 4, 2021 14:56 — forked from anoved/star.scad
OpenSCAD pointed star module
// points = number of points (minimum 3)
// outer = radius to outer points
// inner = radius to inner points
module Star(points, outer, inner) {
// polar to cartesian: radius/angle to x/y
function x(r, a) = r * cos(a);
function y(r, a) = r * sin(a);
// angular width of each pie slice of the star
@afonsoguerra
afonsoguerra / igv_test_bat.md
Created April 28, 2022 06:50 — forked from stevekm/igv_test_bat.md
Sample Batch Script for IGV Snapshots
@afonsoguerra
afonsoguerra / read_vcf.py
Created April 27, 2023 08:07 — forked from dceoy/read_vcf.py
[Python] Read VCF (variant call format) as pandas.DataFrame
#!/usr/bin/env python
import io
import os
import pandas as pd
def read_vcf(path):
with open(path, 'r') as f:
lines = [l for l in f if not l.startswith('##')]
@afonsoguerra
afonsoguerra / HFS.md
Created September 1, 2023 07:22 — forked from r0mdau/HFS.md
How to recover pictures and files from failed MacOS / HFS+ hard drive with Linux

How to recover pictures and files from failed MacOS / HFS+ hard drive with Linux

A couple months ago, a friend ask me to repair a failing macintosh.

It appears the hard drive has multiple failures from SMART anlysis.

Next reboot... Oh crap, the operating system does not start anymore. The drive contains 10 years of pictures to recover. A heart pinch :'(

Important thing to know, if (certainely) the disk is crypted and you don't know the principal user login password,

@afonsoguerra
afonsoguerra / qnap-clientenc-decrypt.sh
Created September 25, 2023 09:01 — forked from dguerri/qnap-clientenc-decrypt.sh
Quick shell script to decrypt client-side encrypted file using QNAP HBS *Sync* jobs. Only work with version 2 files - Doesn't work with QNAP HBS Backup jobs!
#!/bin/sh
set -ue
[ "$#" -lt 2 ] && { echo "Syntax: $0 <filename> <key>"; exit 1; }
filename="$1"
key="$2"
# Compose the key by repeating the user input until we have 32 characters (64 hex digits)
@afonsoguerra
afonsoguerra / paper-qa-zotero.py
Created October 16, 2023 10:19 — forked from lifan0127/paper-qa-zotero.py
Streamlining Literature Reviews with Paper QA and Zotero
import os
os.environ['OPENAI_API_KEY'] = '<Your OpenAI API Key>'
# See here on how to find your Zotero info: https://github.com/urschrei/pyzotero#quickstart
ZOTERO_USER_ID = '<Your Zotero User ID>'
ZOTERO_API_KEY = '<Your Zotero API Key>'
ZOTERO_COLLECTION_ID = '<Your Zotero Collection ID>'
question = 'What predictive models are used in materials discovery?'
# The following prompt instruction is injected to limit the number of keywords per query
@afonsoguerra
afonsoguerra / setup-dashbutton.py
Created December 16, 2023 09:39 — forked from fffonion/setup-dashbutton.py
Setting up dash button without Amazon App
import requests
import re
import sys
# Initial work from: https://mpetroff.net/2016/07/new-amazon-dash-button-teardown-jk29lp/
h = requests.Session()
BASE_URL = "http://192.168.0.1"
# Why?
# To paste text into windows that normally don't allow it or have access to the clipboard.
# Examples: Virtual machines that do not yet have tools installed, websites that hijack paste
#
# Extended vs Simple?
# * Includes an initial delay to allow you to change active windows
# * Adds small delay between keypresses for slower responding windows like SSH sessions
# * Better handling of numbers
# * VMWare bug fix
#