Skip to content

Instantly share code, notes, and snippets.

View friveroll's full-sized avatar

Felipe Riveroll Aguirre friveroll

View GitHub Profile
@friveroll
friveroll / settings.json
Created November 20, 2022 02:47
Settings VSCode python environments
{
"python.defaultInterpreterPath": "${workspaceFolder}\\.venv\\Scripts\\python.exe",
"python.venvPath": "${workspaceFolder}\\.venv",
"python.terminal.defaultProfile.windows": "pwsh",
"python.terminal.activateEnvironment": true,
"python.linting.pylintEnabled": true,
"python.testing.pytestEnabled": true,
"python.testing.unittestEnabled": false,
"python.testing.nosetestsEnabled": false,
"python.testing.pytestArgs": ["--collect-only"],
@friveroll
friveroll / settings.json
Created November 20, 2022 02:46
Global settings VSCode
{
"trunk.trunkGrayOutNonBlockingIssues": false,
"editor.inlineSuggest.enabled": true,
"git.confirmSync": false,
"git.autofetch": true,
"workbench.colorTheme": "Monokai Pro (Filter Spectrum)",
"terminal.integrated.fontFamily": "Hack NF",
"terminal.explorerKind": "external",
"editor.tabSize": 2,
"git.enableSmartCommit": true,
@friveroll
friveroll / group_files_by_extension.py
Last active November 20, 2022 01:02
Agrupa en una lista de listas los archivos que tienen el mismo nombre pero distinta extensión con ayuda de una expresión regular para archivos que tengan hasta 5 palabras en el nombre separadas por espacios
""" Group files by extension
https://es.stackoverflow.com/questions/569309/c%c3%b3mo-hacer-una-lista-de-listas-apartir-de-una-lista-segun-una-condici%c3%b3n-dada-po/569354
"""
import re
lst = [
"Iris.pdf",
"Orchids.csv",
"Rose.csv",
@friveroll
friveroll / Gene_finding_game.py
Last active October 9, 2017 00:24
Problema 1 del folleto "A The first look at the Code of Life" de Cleopatra Kozlowski http://emblog.embl.de/ells/teachingbase/code-of-life-2/. Se trata de encontrar secuencias de péptidos en una secuencia de ADN dada, para ello este pequeño programa genera una expresión regular basada en la secuencia de aminoácidos para encontrar la posición en l…
# coding: utf-8
import re
def secuencia_degenerada(sequencia):
seq = []
aa_degenerados = {
'A': ['GC.'],
'C': ['TG[CT]'],
'D': ['GA[CT]'],
'E': ['GA[AG]'],
@friveroll
friveroll / Gene_finding_game.py
Created October 8, 2017 22:00
Problema 1 del folleto "A The first look at the Code of Life" de Cleopatra Kozlowski http://emblog.embl.de/ells/teachingbase/code-of-life-2/
# coding: utf-8
import re
def secuencia_degenerada(sequencia):
seq = []
aa_degenerados = {
'A': ['GC.'],
'C': ['TG[CT]'],
'D': ['GA[CT]'],
'E': ['GA[AG]'],
@friveroll
friveroll / .zshrc
Created January 20, 2014 16:08
my .zshrc configuration
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
ZSH_THEME="bira"
# Example aliases
#!/bin/sh
git clone https://github.com/laravel/laravel.git $1
cd $1
# Required for getting L4 dev
git reset --hard HEAD
git checkout develop
git remote rename origin upstream
@friveroll
friveroll / install_pytho27.sh
Created July 19, 2012 18:15 — forked from ftao/install_pytho27.sh
install python 2.7 on debian 6
#!/bin/sh
mkdir ~/down/
cd ~/down/
sudo apt-get install build-essential
wget http://www.python.org/ftp/python/2.7.2/Python-2.7.2.tgz
tar -xzf Python-2.7.2.tgz
cd Python-2.7.2
sudo apt-get install libsqlite3-dev zlib1g-dev libncurses5-dev
sudo apt-get install libgdbm-dev libbz2-dev libreadline5-dev
sudo apt-get install libssl-dev libdb-dev
@friveroll
friveroll / enzyme.R
Last active October 3, 2021 19:03
Simple enzyme kinetics
#Data from Problem 1 Chapter 4 from
#Biochemical Calculations by Irwin H Segel
#Set the initial values and get a data.frame
S <- c(2.5e-06, 3.33e-06, 4.0e-06, 5.0e-06, 1.0e-05, 2.0e-05, 4.0e-05, 1.0e-04, 2.0e-03, 1.0e-02)
v <- c(24, 30, 34, 40, 60, 80, 96, 109, 119, 120)
data.frame(S, v) -> datos.cinetica
#Plot the raw data
plot(datos.cinetica, type="l", main="V Vs. S", xmain="S", ymain="v")
@friveroll
friveroll / SPIA_KEGG.color.input.R
Created May 14, 2012 07:32
Get an input file for color-KEGG-pathways
##This script get an input file for color-KEGG-pathways
##https://github.com/ajmazurie/color-KEGG-pathways/
##Based from SPIA results at this tutorial
##http://gettinggeneticsdone.blogspot.mx/2012/03/pathway-analysis-for-high-throughput.html
##With this code
##https://gist.github.com/1945349
##https://gist.github.com/1950232
#Load a library needed for text manipulation
#for install run