Skip to content

Instantly share code, notes, and snippets.

View QuentinN42's full-sized avatar
💠

QuentinN42 QuentinN42

💠
  • DevSecOps @ escape.tech
  • Paris
  • 02:29 (UTC +02:00)
View GitHub Profile
@QuentinN42
QuentinN42 / script.sh
Created August 15, 2023 22:56
Sync your gitlab commits history with gihub.
#!/bin/sh
# Create a git repo on github
# Put this script inside
# Update USERNAME
# Run this script
# Push
PRE_COMMIT_MSG='auto: '
USERNAME='QuentinN42'
2023-06-21T13:54:45.218+0200 [DEBUG] ReferenceTransformer: "kubernetes_role_v1.test" references: []
Terraform used the selected providers to generate the following execution plan. Resource actions are
indicated with the following symbols:
+ create
Terraform will perform the following actions:
# kubernetes_role_v1.test will be created
+ resource "kubernetes_role_v1" "test" {
@QuentinN42
QuentinN42 / ocr
Created September 19, 2021 08:12
Automatic ocr with tesseract & flameshot
#!/usr/bin/env bash
TMPDIR=$(mktemp -d -t ocr-XXXXXXXXXX)
trap "rm -rf $TMPDIR" EXIT
cd "$TMPDIR"
flameshot gui -r > img.png
tesseract img.png text
cat text.txt | xsel --clipboard --input
@QuentinN42
QuentinN42 / is_float added to IntBlock._can_hold_element
Created September 17, 2020 20:12
Added return is_integer(element) or is_float(element) to the IntBlock._can_hold_element method because an Block of ints can be replaced from int read https://github.com/pandas-dev/pandas/issues/35376 for more infos
Index: pandas/core/internals/blocks.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- pandas/core/internals/blocks.py (revision 1b2f1f47b90fe585b8a01705482b1193aa281393)
+++ pandas/core/internals/blocks.py (date 1600372421300)
@@ -38,6 +38,7 @@
is_extension_array_dtype,
is_float_dtype,
@QuentinN42
QuentinN42 / component.py
Last active July 6, 2020 18:16
Resistor / Impedence / Capacitor
from functools import reduce
from operator import add, truediv
from typing import Union
def component_connect(val1: float, val2: float, chx: bool) -> float:
r""" Parallel / Series calculus
Parameters
#!/bin/bash
for pa in $(find -name "\.git" | sed -e "s/\.git//g");
do
(
cd $pa;
echo "";
echo "=> In $(pwd) :";
git $*;
.header-bar.default-decoration {
padding-top: 1px;
padding-bottom: 1px;
font-size: 0.5em;
}
.header-bar.default-decoration .button.titlebutton {
padding: 0px;
}
@QuentinN42
QuentinN42 / ablack
Created May 2, 2020 13:05
auto black over python file or jupyter notebook
#!/bin/bash
if [[ "$1" == *\.py ]]
then
$(black $1);
else
if [[ "$1" == *\.ipynb ]]
then
$(jblack $1);
else
@QuentinN42
QuentinN42 / include.tex
Last active March 8, 2020 09:40
All of my includes for a LaTeX file
%libraries
\usepackage[T1]{fontenc}
% é & à ...
\usepackage[utf8]{inputenc}
\usepackage[francais]{babel}
%cosmetique :D
\usepackage{color}
\usepackage{url}
\usepackage{caption}
*~
.fuse_hidden*
.directory
.Trash-*
.nfs*
.DS_Store
.AppleDouble
.LSOverride
Icon
._*