Skip to content

Instantly share code, notes, and snippets.

@octaflop
octaflop / index.html
Created December 12, 2023 22:11
saliance ux
<div class="sidebar">
<div class="sidebar-item" data-item-id="item1">Item 1</div>
<div class="sidebar-item" data-item-id="item2">Item 2</div>
<div class="sidebar-item" data-item-id="item3">Item 3</div>
<div class="sidebar-item" data-item-id="item4">Item 4</div>
<!-- Add more items as needed -->
</div>
<div class="content">
<!-- Sentences will be populated here -->
</div>

Machine Learning for the Masses: A Group Discussion and Demonstration of Python-Powered AI Challenging our Collective Understanding of Beauty and Art

Faris Chebib

v0.0.1

Presented at SLCPython Sept 2022 Meetup

  • Machine Learning
  • Art
  • Previous Examples

In Host by David Foster Wallace, a number of footnotes are used, with many having footnotes within footnotes.

In the online publication, these are coloured, and can be opened within the page. This gives context without having to scroll back and forth on both the desktop and mobile presentation medium.

Martha Spaulding wrote about how this was accomplished in a separate article.

Idea

Implement a css style (let's try to avoid JS) which would replicate this and ensure the abstraction of the author's side is a markdown-style footnote[^fnote]

Keybase proof

I hereby claim:

  • I am octaflop on github.
  • I am faris (https://keybase.io/faris) on keybase.
  • I have a public key ASBVi5q6uYbekpLa52cdvflWBLcp4gfSDN4gyXNpOTYb9Ao

To claim this, I am signing this object:

@octaflop
octaflop / learn.py
Created January 1, 2019 20:28
Scratchpad for SLCPython Jan 2019: Learn Python Meetup
import requests
import pprint
pp = pprint.PrettyPrinter(indent=2)
url = "https://pokeapi.co/api/v2/pokemon/ditto"
r = requests.get(url)
pp.pprint(r.json())
# Via https://docs.sqlalchemy.org/en/latest/orm/tutorial.html
class User(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
name = Column(String)
fullname = Column(String)
password = Column(String)
def __repr__(self):
return "<User(name='%s', fullname='%s', password='%s')>" % (
def active_user_required(view_func):
@wraps(view_func)
def inner(request, *args, **kwargs):
if request.user.is_active:
return view_func(request, *args, **kwargs)
raise Http404()
return inner
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import glob
import PIL
from PIL import Image, ImageFilter
@octaflop
octaflop / chroot-to-pi.sh
Created January 30, 2018 17:58 — forked from htruong/chroot-to-pi.sh
Chroot to pi sd card
#!/bin/bash
# This script allows you to chroot ("work on")
# the raspbian sd card as if it's the raspberry pi
# on your Ubuntu desktop/laptop
# just much faster and more convenient
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689
# make sure you have issued
@octaflop
octaflop / dict_to_obj.py
Created October 3, 2017 21:09
Convert a python dictionary to an object
class asobj(object):
"""
Convert a python dictionary to an object accessible as attributes.
Args:
d: a python dictionary
Returns:
object: a python object with keys as attributes
"""
def __init__(self, d):