Skip to content

Instantly share code, notes, and snippets.

@Agnishom
Agnishom / backup.py
Created May 22, 2018 03:07
Confessions Backup
import requests
import json
# replace the access_token with your own. You can get one at https://developers.facebook.com/tools/explorer/?method=GET&path=cmiconfessionz%2Ffeed&version=v3.0
starturl = "https://graph.facebook.com/v3.0/cmiconfessionz/feed?access_token="
cururl = starturl
confessionData = []
@Agnishom
Agnishom / books.md
Created June 3, 2018 11:26
Book Recommendations

Analysis Books (top most is most recommended)

  1. Understanding Analysis - Stephen Abott

Download Link

  1. BV Rao's notes on Analysis I

Download Link

@Agnishom
Agnishom / Vass.hs
Last active June 20, 2018 09:53
Vector Addition State Systems
module Lib where
import Data.Graph
import Data.Vector
import Data.Map
newtype State = State Int
data Transition = Transition { addV :: [Int],
toState :: State
@Agnishom
Agnishom / diagram.hs
Created June 22, 2018 09:04
Code for creating an circle with spokes
{-# LANGUAGE NoMonomorphismRestriction #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE TypeFamilies #-}
import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine
rules :: Diagram B
rules = foldr1 (<>) hands
where
@Agnishom
Agnishom / powerset.hs
Last active June 30, 2018 15:01
List Monad as Non-deterministic computation
import Control.Monad.Random
arbitrarySet :: Monad m => m Bool -> [a] -> m [a]
arbitrarySet getBool = flip foldr (return []) $ \x ls -> do
t <- getBool
l <- ls
if t
then return (x:l)
else return l
@Agnishom
Agnishom / app.elm
Last active July 4, 2018 11:33
Elm Plan
import AutoGen exposing (..)
import Html exposing (..)
import Html.Attributes exposing (..)
import Html.Events exposing (..)
import Http
import Json.Decode as Decode
import Platform.Cmd
main =
module AnalyticPage exposing (..)
import AutoGen exposing (..)
import Navigation
import Http
import Array
import Html exposing (..)
import Html.Attributes exposing (..)
import FileReader
import Json.Decode
@Agnishom
Agnishom / update.elm
Created July 18, 2018 06:46
Elm Arch
update : Msg -> Model -> (Model, Cmd Msg, Maybe LoadingCounter)
update =
case msg of
Produce cmd -> (model, cmd, Just Increment)
Consume -> (model, Cmd.none, Just Decrement)
msg ->
let
(newModel, newCmd) = realUpdate msg model
in
(newModel, newCmd, Nothing)
@Agnishom
Agnishom / Main.elm
Created July 19, 2018 05:30
Translator Pattern
import Page exposing (..)
import Http
import Json.Decode as Decode
import Task
import Html
main =
Html.program
{ init = init
, view = view
@Agnishom
Agnishom / smt.txt
Created August 4, 2018 17:35
SMT Course
Symbolic Analysis Using SMT Solvers (SASS)
Instructor: M.K. SrivasFirst
Meeting: Aug 8 (Wed) 3:30PM, Lec Hall 801
Satisfiability-Modulo Theory (SMT) solver is a sound algorithmic framework for combining automatic decision procedures for first-order (i.e., quantifier-free) theories of data types, such as propositional logic, un-interpreted functions, bit-vectors, arithmetic, arrays, pointers, etc., that commonly occur in modern programming languages. Advances in SMT solving technology in the recent past have enabled development of tools - interactive theorem provers, model checkers, guided-synthesizers - for practical formal verification and synthesis of sequential and concurrent SW systems. This course covers the theory and practice of SMT solvers providing hands-on exposure to the use of SMT solvers. The topics of the course will be distributed over two not necessarily contiguous parts. The first part will cover the basic principles and theory behind construction of SMT solvers, describing in detail dec