Skip to content

Instantly share code, notes, and snippets.

View krypty's full-sized avatar

Gary MARIGLIANO krypty

View GitHub Profile
@krypty
krypty / gnu_getopt_example.sh
Created February 15, 2024 09:52 — forked from bobpaul/gnu_getopt_example.sh
An example showing how to use getopt
#!/usr/bin/env bash
# Time-stamp: <2017-04-27 09:57:21 kmodi>
# Time-stamp: <2018-03-20 12:58:02 bobpaul>
# derived from kmodi's gist: https://gist.github.com/kaushalmodi/74e9875d5ab0a2bc1010447f1bee5d0a
#
# Example of using getopt to parse command line options
# http://stackoverflow.com/a/29754866/1219634 Limitation: All the options
# starting with - have to be listed in --options/--longoptions, else getopt will
# error out.
# The downside is that if you intend to use this as a wrapper to some other program,
@krypty
krypty / GolubAARFConverter.py
Created October 10, 2016 09:47
Convert Golub AARF dataset into CSV files using Python
import arff
import os
import pandas as pd
def main(input_file, output_folder):
"""
Original data have been downloaded here ("Leukemia" section): http://eps.upo.es/bigs/datasets.html
Convert Golub arff dataset into N (where N is the numbers of samples) csv files.
@krypty
krypty / update_gdm_background.sh
Created January 8, 2016 19:22
Update GDM background and darken background
#!/usr/bin/sh
# original script by: WebReflection (https://bbs.archlinux.org/viewtopic.php?pid=1526537#p1526537)
if [ "$IMAGE" = "" ]; then
IMAGE=$(
dbus-launch gsettings get org.gnome.desktop.screensaver picture-uri |
sed -e "s/'//g" |
sed -e "s/^file:\/\///g"
)
@krypty
krypty / gitconfig
Last active April 20, 2016 16:15
gitconfig
# meld a mettre dans le path
[diff]
tool = meld
keepBackup = false
prompt = false
[merge]
tool = meld
keepBackup = false
prompt = false