Skip to content

Instantly share code, notes, and snippets.

# EC, Field are in http://afiodorov.github.io/2019/06/18/elliptic/
from dataclasses import dataclass
from random import randint
@dataclass
class Signature:
sig: int
pp: EC.Point
randomx: int
@afiodorov
afiodorov / tictactoe.py
Created June 24, 2019 09:00
Basic tic tac toe
import numpy as np
class Board:
def __init__(self):
self.turn = 0
self.state = np.full((3, 3), "_")
def __str__(self):
r = f"{self.player()}'s turn\n{self.state}'"
if self.winner() is not None:
r += f"\nWinner: {self.winner()}"
#!/bin/bash
awk -F'\t' 'BEGIN {print "<head><meta charset="UTF-8"></head><body><table>"} {print "<tr><td>"$1"</td><td>"$2"</td></tr>"} END {print "</table></body>"}' MySpanish.txt > MySpanish.txt.html
@afiodorov
afiodorov / gist:6815066846bc303ec4f8
Last active December 4, 2015 14:26
Reading group on "The Elements of Statistical Learning" for aspiring Data Scientists
Dear all,
We are organising, starting Wednesday on the 2nd of December, a reading group on an introductory book for machine learning.
The book is called "The Elements of Statistical Learning" and is freely available online: http://statweb.stanford.edu/~tibs/ElemStatLearn/.
The book requires some basic background in Linear Algebra and Probability Theory usually covered in maths undergraduate courses.
The reading group will take place every Wednesday between 17:30 - 19:30 in X-Men Origins Seminar Room, Kathleen Lonsdale Building, 5 Gower Place.