Skip to content

Instantly share code, notes, and snippets.

View whyboris's full-sized avatar
😀
Working on Video Hub App!

Boris whyboris

😀
Working on Video Hub App!
View GitHub Profile
@nat-418
nat-418 / why-tcl.md
Last active April 1, 2024 03:23
Why Tcl?

Why Tcl?

Introduction

I use [Tcl] as my scripting language of choice, and recently someone asked me why. This article is an attempt to answer that question.

Ousterhout's dichotomy claims that there are two general categories of programming languages:

@tarleb
tarleb / noexport-subtrees.lua
Last active January 19, 2024 17:52
Emulating org-mode's :noexport: behavior for Markdown.
--[[
Remove all subtrees whose headlines contain class `noexport`.
License: MIT
Copyright: © Albert Krewinkel
]]
-- pandoc.utils.make_sections exists since pandoc 2.8
PANDOC_VERSION:must_be_at_least {2,8}
@vegard
vegard / primes.py
Created September 21, 2018 07:51
Prime factorisation diagram
# -*- coding: utf-8 -*-
#
# Author: Vegard Nossum <vegard.nossum@gmail.com>
import math
import os
import sys
import cairo
@roosto
roosto / ascii-art-lightning-talk-notes.md
Created July 26, 2018 13:39
Notes from my Creative Coding NYC ASCII Art ⚡ Talk on July 25, 2018

Creative Coding NYC ASCII Art ⚡ Talk

Here are links and follow-up notes from the ASCII Art Tips & Trick talk by Dustin Goldman, originally presented at the [Creative Coding X meetup][1].

Dustin hopes you enjoyed the talk. If you have any questions, feel free to contact him on twitter, where he is [@roosto][2]

FIGlet

per the [FIGlet website][3]:

@whyboris
whyboris / matplotlib.py
Last active May 12, 2021 02:47
Keras Loss & Accuracy Plot Helper Function
import matplotlib.pyplot as plt
# Plot model history more easily
# when plotting, smooth out the points by some factor (0.5 = rough, 0.99 = smooth)
# method taken from `Deep Learning with Python` by François Chollet
def smooth_curve(points, factor=0.75):
smoothed_points = []
for point in points:
@ctmakro
ctmakro / ipython_display.py
Last active April 15, 2024 03:22
Display numpy ndarray as Image in Jupyter/IPython notebook
# if input image is in range 0..1, please first multiply img by 255
# assume image is ndarray of shape [height, width, channels] where channels can be 1, 3 or 4
def imshow(img):
import cv2
import IPython
_,ret = cv2.imencode('.jpg', img)
i = IPython.display.Image(data=ret)
IPython.display.display(i)
@OliverJAsh
OliverJAsh / foo.ts
Last active July 29, 2023 18:16
Records and dictionaries in TypeScript
/*
In JavaScript, objects can be used to serve various purposes.
To maximise our usage of the type system, we should assign different types to our objects depending
on the desired purpose.
In this blog post I will clarify two common purposes for objects known as records and dictionaries
(aka maps), and how they can both be used with regards to the type system.
@jganzabal
jganzabal / Nvidia Titan XP + MacBook Pro + Akitio Node + Tensorflow + Keras.md
Last active November 2, 2022 11:43
How to setup Nvidia Titan XP for deep learning on a MacBook Pro with Akitio Node + Tensorflow + Keras
@ro31337
ro31337 / docker_completion_for_zsh.md
Created August 13, 2017 02:12
Zsh docker completion

Docker Completion for Zsh (Official)

  • mkdir -p ~/.oh-my-zsh/plugins/docker/
  • curl -fLo ~/.oh-my-zsh/plugins/docker/_docker https://raw.githubusercontent.com/docker/cli/master/contrib/completion/zsh/_docker
  • Add docker to plugins section in ~/.zshrc
  • exec zsh
@joyrexus
joyrexus / README.md
Last active February 24, 2024 15:16
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")