Skip to content

Instantly share code, notes, and snippets.

View alexisduque's full-sized avatar
🏠
Working from home

Alexis DUQUE alexisduque

🏠
Working from home
View GitHub Profile
@alexisduque
alexisduque / movesense_validation_stats.ipynb
Created April 8, 2025 14:57
movesense_validation_stats.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alexisduque
alexisduque / sed-tips
Created March 15, 2017 11:43
Usefull sed commands and patterns
-------------------------------------------------------------------------
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
Latest version of this file (in English) is usually at:
http://sed.sourceforge.net/sed1line.txt
http://www.pement.org/sed/sed1line.txt
This file will also available in other languages:
Chinese - http://sed.sourceforge.net/sed1line_zh-CN.html
@alexisduque
alexisduque / vscode-update
Created March 14, 2017 08:25
Update VSCode on Ubuntu
#!/bin/bash
function code-up() {
wget https://vscode-update.azurewebsites.net/latest/linux-deb-x64/stable -O /tmp/code_latest_amd64.deb
sudo dpkg -i /tmp/code_latest_amd64.deb
}
export -f code-up
@alexisduque
alexisduque / .gitconfig
Last active February 15, 2017 18:14
My ehanced .gitconfig
[user]
name = Alexis Duque
email = alexisd61@gmail.com
[core]
editor = vim
pager = less
excludesfile = ~/.gitignore_global
autocrlf = input

Keybase proof

I hereby claim:

  • I am alexisduque on github.
  • I am alexisduque (https://keybase.io/alexisduque) on keybase.
  • I have a public key whose fingerprint is A400 7D60 5BC9 F1B4 8F63 2FC4 3832 8388 B5B9 6439

To claim this, I am signing this object:

@alexisduque
alexisduque / gpg-import-and-export-instructions.md
Last active February 5, 2017 09:06 — forked from chrisroos/gpg-import-and-export-instructions.md
Instructions for exporting/importing (backup/restore) GPG keys

Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.

Method 1

Backup the public and secret keyrings and trust database

cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/

or, instead of backing up trustdb...

@alexisduque
alexisduque / md2asciidoc.sh
Last active February 7, 2017 09:38
markdown to asciidoc
find . -name "*.md*" | while read i; do pandoc -f markdown -t asciidoc "$i" -o "${i%.*}.adoc"; done
for file in *.png; do convert $file -resize 500x500 -quality 90 "${file%.*}.jpg" ; done
/* Overwrite vscode dark markdown theme */
body {
background-color: white !important;
padding: .5em 5em;
}
.vscode-dark {
color: rgb(30, 30, 30);
}
@alexisduque
alexisduque / Subfolder to git repo.md
Created May 15, 2016 09:34 — forked from korya/Subfolder to git repo.md
Convert subfolder into Git submodule
#List unique values in a DataFrame column
pd.unique(df.column_name.ravel())
#Convert Series datatype to numeric, getting rid of any non-numeric values
df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True)
#Grab DataFrame rows where column has certain values
valuelist = ['value1', 'value2', 'value3']
df = df[df.column.isin(value_list)]