This is still a work in progress, currently successfully authorises a user and exchanges that authorisation token for an access token.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module DFASpec (spec) where | |
import Test.Hspec | |
data State = S1 | S2 deriving (Eq, Show) | |
data Symbols = Zero | One deriving (Eq, Show) | |
data Alphabet = Alphabet [Symbols] deriving (Eq, Show) | |
data FiniteStates = FiniteStates [State] deriving (Eq, Show) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun pad(num) | |
(concatenate 'string "0" num)) | |
(defun should-pad(num) | |
(= (length num) 1)) | |
(defun apply-padding(num) | |
(cond | |
((should-pad num) (pad num)) | |
(t num))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun pad(thing) | |
(concatenate 'string "0" thing)) | |
(defun pad-if-length-not-same(thing length) | |
(cond | |
((not | |
(= (length thing) length)) | |
(pad thing)) | |
(t thing))) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'sb-bsd-sockets) | |
; Create an inet-socket instance | |
(defparameter *socket* (make-instance 'sb-bsd-sockets:inet-socket :type :stream :protocol :tcp)) | |
; Define our address to be 0.0.0.0 (public interface) | |
(defparameter *address* '(0 0 0 0)) | |
; Define our port to be 8080 | |
(defparameter *port* 8080) | |
; Connections to hold on the backlog | |
(defparameter *socket-backlog* 100) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require 'sb-bsd-sockets) | |
; Create an inet-socket instance | |
(defparameter *socket* (make-instance 'sb-bsd-sockets:inet-socket :type :stream :protocol :tcp)) | |
; Define our address to be 0.0.0.0 (public interface) | |
(defparameter *address* '(0 0 0 0)) | |
; Define our port to be 8080 | |
(defparameter *port* 8080) | |
; Connections to hold on the backlog | |
(defparameter *socket-backlog* 100) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Lib | |
( recify, | |
getAccessTokenFromPayload | |
) where | |
import Web.Scotty | |
import Network.HTTP.Types (status302) | |
import Control.Monad.IO.Class |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Coin Collector!</title> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/pixi.js/5.1.3/pixi.min.js"></script> | |
<style> | |
body { | |
margin: 0; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NeuralNetwork { | |
constructor(input, goal, iterations){ | |
this.input = input; | |
this.goal = goal; | |
this.iterations = iterations; | |
this.weight = 0.5; | |
} | |
predict(){ | |
let prediction; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import PlaygroundSupport | |
class MyViewController : UIViewController { | |
let titleLabel = UILabel(frame: CGRect(x: 16, y: 100, width: 150, height: 38)) | |
let captionLabel = UILabel(frame: CGRect(x: 16, y: 120, width: 272, height: 40)) | |
let coverImageView = UIImageView() | |
let blurEffect = UIBlurEffect(style: .light) | |
let cardView = UIButton() | |
let closeButton = UIButton() |