Skip to content

Instantly share code, notes, and snippets.

View igorkf's full-sized avatar

Igor Kuivjogi Fernandes igorkf

View GitHub Profile
@sxflynn
sxflynn / move-to-github.md
Last active May 25, 2025 21:14
How to port your GitLab repo to GitHub, step by step

Move your Gitlab repository to GitHub

Why move to GitHub?

If you are a coding bootcamp student that has been building projects and solving exercises in a private GitLab repository that is controlled by another organization, then you might want to move your work to GitHub to preserve what you have done and learned, and make your work more visible to other developers in the community, and employers.

The GitHub profile is a great way to market yourself as a developer. You can pin repos to the top that you want to highlight to the community. It also has data visualizations on your contribution history to repo projects. Fortunately, if you have been making contributions to private repos in GitLab, all of your commit history will transfer to this graph.

Directions

  1. cd into your existing Gitlab repository that you want to move to Github.
  • This is what mine looked like:
@reinvanoyen
reinvanoyen / terminal-prompt-git-branch-zsh.md
Last active May 21, 2025 20:11
Add Git Branch Name to Terminal Prompt (MacOS zsh)

Add Git Branch Name to Terminal Prompt (zsh)

Updated for MacOS with zsh

  • Catalina
  • Big Sur
  • Monterey
  • Ventura
  • Sonoma

screenshot

@arnaldog12
arnaldog12 / BalancedDataGenerator.py
Last active July 9, 2022 03:32
BalancedDataGenerator
from keras.utils.data_utils import Sequence
from imblearn.over_sampling import RandomOverSampler
from imblearn.keras import balanced_batch_generator
class BalancedDataGenerator(Sequence):
"""ImageDataGenerator + RandomOversampling"""
def __init__(self, x, y, datagen, batch_size=32):
self.datagen = datagen
self.batch_size = min(batch_size, x.shape[0])
datagen.fit(x)
@brfitzpatrick
brfitzpatrick / SLURM_foreach.md
Last active February 7, 2024 18:03
minimal example of using `foreach` parallelism on a clusters managed by SLURM

Job script:

#!/bin/bash

#SBATCH --job-name=rfee
#SBATCH --workdir=/home/user.name/rfee/
#SBATCH --output=r_foreach_example_console_output.txt
#SBATCH --mem-per-cpu=100 # specify RAM per CPU here in Mb
#SBATCH --time=0:02:00
@mwaskom
mwaskom / palettes.png
Last active July 9, 2024 20:35
Show all seaborn palettes and simulate what they look like with various color vision deficiencies. (The 10-element seaborn palettes will be part of the forthcoming 0.9 release).
palettes.png
@kvasilopoulos
kvasilopoulos / progressbar_doParallel_foreach.R
Last active April 10, 2024 08:27
How to include progressbar with doParallel (previously done only with the doSNOW-package) and foreach loop. Note, that you can easily wrap this into a function.
library(doParallel)
# Choose number of iterations
n <- 100
# Progress combine function
f <- function(iterator){
pb <- txtProgressBar(min = 1, max = iterator - 1, style = 3)
count <- 0
function(...) {
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@eladnava
eladnava / mongodb-s3-backup.sh
Last active September 13, 2024 11:42
Automatically backup a MongoDB database to S3 using mongodump, tar, and awscli (Ubuntu 14.04 LTS)
#!/bin/sh
# Make sure to:
# 1) Name this file `backup.sh` and place it in /home/ubuntu
# 2) Run sudo apt-get install awscli to install the AWSCLI
# 3) Run aws configure (enter s3-authorized IAM user and specify region)
# 4) Fill in DB host + name
# 5) Create S3 bucket for the backups and fill it in below (set a lifecycle rule to expire files older than X days in the bucket)
# 6) Run chmod +x backup.sh
# 7) Test it out via ./backup.sh
@tmalsburg
tmalsburg / predict_vs_simulate.org
Last active November 18, 2022 01:14
Predict vs simulate in lme4

Predict vs simulate in lme4

For this investigation we are going to use the sleepdata data set from the lme4 package. Here is the head of the data frame: