Skip to content

Instantly share code, notes, and snippets.

View benjaminrancourt's full-sized avatar
🌎

Benjamin Rancourt benjaminrancourt

🌎
View GitHub Profile
@benjaminrancourt
benjaminrancourt / split.py
Last active May 31, 2021 14:45 — forked from kelvintaywl/split.py
Python Script to split CSV files into smaller files based on number of lines
import csv
import sys
import os
# example usage: python split.py example.csv 200
# above command would split the `example.csv` into smaller CSV files of 200 rows each (with header included)
# if example.csv has 401 rows for instance, this creates 3 files in same directory:
# - `example_1.csv` (row 1 - 200)
# - `example_2.csv` (row 201 - 400)
# - `example_3.csv` (row 401)
@benjaminrancourt
benjaminrancourt / gitlab-ci-push-step-extended.yml
Created May 30, 2021 22:56
gitlab-ci-push-step-extended.yml
deploy:
extends: .git:push
script:
# Move some generated files
- mv built/*.jpg "${CI_COMMIT_SHA}"
@benjaminrancourt
benjaminrancourt / gitlab-ci-push-in-pipeline.yml
Last active May 30, 2021 22:56
GitLab CI job to push files to a repository
variables:
# https://hub.docker.com/r/alpine/git/tags
GIT_VERSION: v2.30.1
# Description
# This script allows to store the artefacts of a step into the current
# repository, to improve the efficiency of the next build process.
# Set up this script
# 1. Create a new personal access token (https://gitlab.com/-/profile/personal_access_tokens)