Skip to content

Instantly share code, notes, and snippets.

@cn007b
cn007b / OpenCVBlur.md
Last active Nov 13, 2020
OpenCV Blur - Fast/Faster/Fastest | Blur image using OpenCV
View OpenCVBlur.md

OpenCV Blur - Fast/Faster/Fastest

Python

import cv2


def b(f):
  img = cv2.imread(f)
@cn007b
cn007b / kubeflow_simple_example.md
Last active Aug 28, 2020
Kubeflow simple example.
View kubeflow_simple_example.md

Kubeflow simple example

Simple regression example:

import numpy as np
import tensorflow as tf
@cn007b
cn007b / MutualRecursion.md
Last active May 26, 2020
Mutual Recursion
View MutualRecursion.md

Mutual Recursion

Recursion - when function A calls function A (itself).
Mutual recursion - when function A calls function B, and function B calls function A.

Examples

js (node v13.0.1)

@cn007b
cn007b / SuperSimpleRedisCircularBufferWrittenOnGO.md
Last active Apr 30, 2020
Super simple Redis circular-buffer written on GO
View SuperSimpleRedisCircularBufferWrittenOnGO.md

Super simple Redis circular-buffer on GO

Here you can find super simple redis based circular-buffer implementation written on golang:

package main

import (
	"fmt"
View response.json
{
"executions": [
{
"id": 132,
"status": "succeeded",
"project": "TEST-Sylvain",
"executionType": "user",
"user": "sthirard",
"date-started": {
"unixtime": 1560946609000,
@cn007b
cn007b / fractal.md
Last active Apr 17, 2020
Simple fractal implementation on bash.
View fractal.md

Simple bash fractal

Here you can find source code for simple fractal implementation
written in bash for hackerrank, which looks like this:

demo

Source code:

@cn007b
cn007b / no_uflfetch.go
Created May 3, 2019
Fetch (scrape) product's data by net/http not uflfetch
View no_uflfetch.go
package main
import (
"fmt"
"io/ioutil"
"net/http"
"os"
)
func main() {
@cn007b
cn007b / Makefile
Last active Apr 10, 2019
Deploy AWS Fargate Service - deploy
View Makefile
delete_old_versions:
aws ecs list-task-definitions --sort=DESC \
| grep -Eo $(YourSrvc)':[0-9]+' \
| tail -n +2 \
| while read v; do aws ecs deregister-task-definition --task-definition=$$v; done