Skip to content

Instantly share code, notes, and snippets.

View icaoberg's full-sized avatar

icaoberg icaoberg

View GitHub Profile
@icaoberg
icaoberg / script.py
Created July 4, 2019 05:27
HackerRank - Interview -Arrays - Left Rotation
#!/bin/python3
import math
import os
import random
import re
import sys
# Complete the rotLeft function below.
def rotLeft(a, d):
@icaoberg
icaoberg / script.sh
Created July 20, 2018 01:39
Rename all files in the current directory
#!/bin/bash
#
#$ -j y
#$ -S /bin/bash
#$ -cwd
## the next line selects the partition/queue
#SBATCH -p short1
## the next line selects the number of nodes
@icaoberg
icaoberg / script.sh
Last active July 20, 2018 01:23
Compress all folders in the current directory
#!/bin/bash
#
#$ -j y
#$ -S /bin/bash
#$ -cwd
## the next line selects the partition/queue
#SBATCH -p short1
## the next line selects the number of nodes
@icaoberg
icaoberg / script.sh
Created July 20, 2018 01:01
Remove all empty files in the current path
#!/bin/bash
#
#$ -j y
#$ -S /bin/bash
#$ -cwd
## the next line selects the partition/queue
#SBATCH -p short1
## the next line selects the number of nodes
@icaoberg
icaoberg / script.sh
Created July 20, 2018 00:52
Remove duplicate files in the current path
#!/bin/bash
#
#$ -j y
#$ -S /bin/bash
#$ -cwd
## the next line selects the partition/queue
#SBATCH -p short1
## the next line selects the number of nodes
@icaoberg
icaoberg / script.sh
Created July 20, 2018 00:50
Remove all empty folder in the current path
#!/bin/bash
#
#$ -j y
#$ -S /bin/bash
#$ -cwd
## the next line selects the partition/queue
#SBATCH -p short1
## the next line selects the number of nodes
@icaoberg
icaoberg / newpost.sh
Created July 3, 2018 14:35
Script that creates a basic post for Pelican Python
#!/bin/bash
# Copyright (C) 2018 Ivan Cao-Berg
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2 of the License,
# or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@icaoberg
icaoberg / decrypt.sh
Last active June 30, 2019 01:57
Simple decryption script
#!/bin/bash
# Copyright (C) 2018-2019 Ivan Cao-Berg
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2 of the License,
# or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@icaoberg
icaoberg / encrypt.sh
Last active July 3, 2018 14:30
Simple encryption script
#!/bin/bash
# Copyright (C) 2018 Ivan Cao-Berg
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published
# by the Free Software Foundation; either version 2 of the License,
# or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
@icaoberg
icaoberg / script.sh
Created January 8, 2018 21:38
My personal Tensorflow template
#!/bin/bash
#SBATCH -p gpu
#SBATCH -e tensorflow.%j.err
#SBATCH -o tensorflow.%j.out
#SBATCH -t 48:00:00
#SBATCH -n 1
#SBATCH --mem=32G
#SBATCH --gres=gpu:1
#so we can use modules