Skip to content

Instantly share code, notes, and snippets.

View metdinov's full-sized avatar

Juan Pablo Amoroso metdinov

  • Northern Labs
  • Toronto ON, Canada
  • X @metdinov
View GitHub Profile
@metdinov
metdinov / schema.ex
Created April 14, 2024 23:31
custom Ecto.Schema
defmodule MyApp.Schema do
defmacro __using__(_) do
quote do
use Ecto.Schema
import Ecto.Changeset
@primary_key {:id, :binary_id, autogenerate: true}
@foreign_key_type :binary_id
@timestamps_opts [type: :utc_datetime]
@metdinov
metdinov / coin-tosses.R
Created September 11, 2019 02:53
coin tosses
# Problem:
# I toss a coin 10 times. Determine the probability at least two `heads` appear if at least one `heads` appears.
# Answer:
# Let's define:
# P(A) := the probability that at least two `heads` appear
# P(B) := the probability that at least one `heads` appears
# And we want to find P(A|B)
@metdinov
metdinov / intro-finance.py
Created August 9, 2019 21:12
Handout demo
"""
# Intro Finance
## 1. Stocks
From [Investopedia][1]
- A stock is a form of security that indicates the holder has proportionate ownership in the issuing corporation.
- Corporations issue (sell) stock to raise funds to operate their businesses. There are two main types of stock: common and preferred.
- Stocks are bought and sold predominantly on stock exchanges, though there can be private sales as well, and they are the foundation of nearly every portfolio.
- Historically, they have outperformed most other investments over the long run.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@metdinov
metdinov / stuns
Created February 13, 2019 19:26 — forked from yetithefoot/stuns
STUN+TURN servers list
{url:'stun:stun01.sipphone.com'},
{url:'stun:stun.ekiga.net'},
{url:'stun:stun.fwdnet.net'},
{url:'stun:stun.ideasip.com'},
{url:'stun:stun.iptel.org'},
{url:'stun:stun.rixtelecom.se'},
{url:'stun:stun.schlund.de'},
{url:'stun:stun.l.google.com:19302'},
{url:'stun:stun1.l.google.com:19302'},
{url:'stun:stun2.l.google.com:19302'},
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Elo Rating System"
]
},
{
@metdinov
metdinov / github.css
Created October 8, 2018 21:05 — forked from theconektd/github.css
Github Markdown CSS - for Markdown Editor Preview
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@metdinov
metdinov / sha-padding.py
Created April 28, 2017 13:49 — forked from philfreo/sha-padding.py
SHA1 Padding Attack
#!/usr/bin/env python
# http://www.vnsecurity.net/t/length-extension-attack/
# sha1 padding/length extension attack
# by [email protected]
#
import sys
import base64
from shaext import shaext
@metdinov
metdinov / resources.md
Created April 18, 2017 13:15 — forked from iam1980/resources.md
Shadow Brokers EQGRP Lost in Translation resources