Skip to content

Instantly share code, notes, and snippets.

View imjacobclark's full-sized avatar
:shipit:
Shipping

Jacob Clark imjacobclark

:shipit:
Shipping
  • Manchester, United Kingdom
  • 03:16 (UTC)
View GitHub Profile
@imjacobclark
imjacobclark / are-langchain.ipynb
Created April 17, 2023 12:16
SR ELangChain Example
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
type Section = {
title: String;
totals: number[];
total: number;
};
export const BalanceSheetSummarySection = ({
sections,
}: {
sections: Section[];
@imjacobclark
imjacobclark / SwifUI.swift
Created August 20, 2020 20:39
SwiftUI Card Animations
import SwiftUI
struct ContentView: View {
@State var show = false
var body: some View {
ZStack {
TitleView()
.blur(radius: show ? 20 : 0)
.animation(.default)
@imjacobclark
imjacobclark / CardsWithAnimation.swift
Created February 23, 2020 18:16
iOS Card with Animation Playground
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()
@imjacobclark
imjacobclark / NeuralNetwork.js
Last active January 14, 2020 07:55
GradientDecentNeuralNetwork.js
class NeuralNetwork {
constructor(input, goal, iterations){
this.input = input;
this.goal = goal;
this.iterations = iterations;
this.weight = 0.5;
}
predict(){
let prediction;
<!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;
{-# LANGUAGE OverloadedStrings #-}
module Lib
( recify,
getAccessTokenFromPayload
) where
import Web.Scotty
import Network.HTTP.Types (status302)
import Control.Monad.IO.Class
@imjacobclark
imjacobclark / README.md
Last active March 25, 2019 16:23
Doing the OAuth Dance for Spotify in Haskell with Scotty, Wreq and Aeson

This is still a work in progress, currently successfully authorises a user and exchanges that authorisation token for an access token.

(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)
(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)