Skip to content

Instantly share code, notes, and snippets.

View epogrebnyak's full-sized avatar

Evgeny Pogrebnyak epogrebnyak

View GitHub Profile
@myshov
myshov / parsing.lhs
Created January 31, 2016 17:29
Functional parsing library from chapter 8 of Programming in Haskell for new versions of GHCI
Functional parsing library from chapter 8 of Programming in Haskell,
Graham Hutton, Cambridge University Press, 2007.
> module Parsing where
>
>
> import Data.Char
> import Control.Monad
> import qualified Control.Applicative as CA
@floer32
floer32 / matrix_multiplication_refresher.md
Last active April 13, 2022 11:59
Matrix multiplication refresher: develop your intuition for matrix multiplication! (Or, "matrix multiplication for dummies")

A refresher on matrix multiplication. Because your math classes were years ago. Here's the order I recommend:

  1. TED-Ed video — How to organize, add and multiply matrices - Bill Shillito (only 5 minutes)
  2. betterexplained.com"An Intuitive Guide to Linear Algebra" by Kalid Azad
  3. mathinsight.org: "Matrices and linear transformations"
  4. Read some of the answers on math.stackexchange.com. You've been studying the general definition of matrix multiplication. You may wonder: "Are there other ways to define the product of two matrices?" These resources will answer, yes, there are other ways, but also explain why this general definition is the standard way.
  5. [What is the intuitive way of thinking about multiplication of m
@abhin4v
abhin4v / Calc.hs
Last active November 29, 2022 08:02
Simple Applicative Parser and Expression Calculator in Haskell
module Calc
( Expr(..)
, parse
, calculate
) where
import Control.Applicative
import Parser
data Expr = Add Expr Expr
@nickautomatic
nickautomatic / cmder.md
Last active December 16, 2024 05:11
Setting up Cmder to use bash by default

Set up cmder to use msysgit / bash by default

  • Install cmder_mini (msysgit is already installed, so no need for full version)
  • In Cmder, open settings: Win + Alt + P
  • Under Startup > Tasks, add a task called {bash} with the following settings:
    • Task parameters (set icon):
      • For Cmder icon: /icon "%CMDER_ROOT%\cmder.exe"
      • For Git icon: /icon "C:\Program Files (x86)\Git\etc\git.ico"
    • Commands (open Git's bash shell):
  • "C:\Program Files (x86)\Git\bin\sh.exe" -l -new_console:d:%USERPROFILE%
@milibopp
milibopp / mpl_multipage_pdf.py
Last active December 17, 2019 21:29
Matplotlib multiple pages in PDF
import matplotlib.pyplot as plt
import numpy as np
from matplotlib.backends.backend_pdf import PdfPages
with PdfPages('multipage.pdf') as pp:
for i in range(0, 10):
fig = plt.figure()
ax1 = fig.add_subplot(211)
ax2 = fig.add_subplot(212)
x = np.linspace(0, 10)
@LeCoupa
LeCoupa / bash-cheatsheet.sh
Last active March 27, 2025 18:22
Bash CheatSheet for UNIX Systems --> UPDATED VERSION --> https://github.com/LeCoupa/awesome-cheatsheets
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@will-henney
will-henney / internal-links-test.org
Last active August 23, 2022 20:59
Tests of internal link syntax in emacs org-mode and in org-ruby
@avitale
avitale / totalsize.jl
Last active February 16, 2020 12:51
Total size of Julia objects
module Totalsizeof
importall Base
export totalsizeof
# Helper: Pointer cache is used to break circular references in objects and avoid double countings
is_seen!(x, ptr_cache) = in(pointer_from_objref(x), ptr_cache) || (push!(ptr_cache, pointer_from_objref(x)); false)
# Helper: Catch types without size method
sizeof_catch(x) = try sizeof(x) catch 0 end