Skip to content

Instantly share code, notes, and snippets.

@dela3499
dela3499 / eigenvalue_cloud.py
Created September 29, 2023 02:02
Beautiful Eigenvalue Cloud
import numpy as np
import matplotlib.pyplot as plt
import itertools
%matplotlib inline
lim = 20
n_points = 100000
t1 = np.linspace(-lim, lim, int(np.sqrt(n_points)))
t2 = np.linspace(-lim, lim, int(np.sqrt(n_points)))
[[January 1st, 2019]]
[[January 2nd, 2019]]
[[January 3rd, 2019]]
[[January 4th, 2019]]
[[January 5th, 2019]]
[[January 6th, 2019]]
[[January 7th, 2019]]
[[January 8th, 2019]]
[[January 9th, 2019]]
[[January 10th, 2019]]
@dela3499
dela3499 / app.html
Created March 1, 2020 03:00
A quick prototype interface for a writing app
<table style="width: 80%; margin:auto">
<tr>
<td contenteditable style="width: 50%; border: 1px solid lightgrey; padding: 20px; vertical-align: top;"></td>
<td contenteditable style="width: 50%; border: 1px solid lightgrey; padding: 20px; vertical-align: top;"></td>
</tr>
<tr>
<td contenteditable style="width: 50%; border: 1px solid lightgrey; padding: 20px; vertical-align: top;"></td>
<td contenteditable style="width: 50%; border: 1px solid lightgrey; padding: 20px; vertical-align: top;"></td>
expertly-sophisticated digital collectives
translucent calculus
alternative-influence freedom cages
diversified narration
hypothetically-indicative digital collectives
optimised freedom cages
institutional gimmickry
k-selected freedom cages
utopian late capitalism
k-selected observance
@dela3499
dela3499 / interesting_podcast_words_100.txt
Last active August 20, 2018 06:04
Interesting words from podcast conversation between David Deutsch and Sam Harris. Transcript from Brett Hall: http://www.bretthall.org/david-deutsch--sam-harris.html
fungibility
tegmark
smuggles
cosmically
bioethicist
shackling
inconceivably
uncontroversial
untestable
paperclip
@dela3499
dela3499 / keras_improvements.py
Last active November 25, 2017 21:22
Ideas to improve Keras
"""
1. For the fit and evaluate methods, make verbose=2 the default (rather than verbose=1).
I ignore the checkmarks produced by verbose=1, and they seem to freeze the Jupyter notebook. Frustrating.
2. Save IMDB as pickle upon download, rather than npz. Loading it into memory then takes around 6 seconds rather than 60 seconds.
"""
### Usual imports
import pandas as pd
@dela3499
dela3499 / comparison.py
Last active November 23, 2017 18:02
Keras example with helper functions
# Original
model.add(layers.Conv2D(32, (3, 3), activation='relu', input_shape=(150, 150, 3)))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(64, (3, 3), activation='relu'))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(128, (3, 3), activation='relu'))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Conv2D(128, (3, 3), activation='relu'))
model.add(layers.MaxPooling2D((2, 2)))
model.add(layers.Flatten())
@dela3499
dela3499 / novel-stakes.md
Created November 11, 2017 17:51
November novel

Goal

Write a 50k-word novel in November.

Why?

  • I'll learn a lot - about writing, imagination, and successfully completing challenging projects.
  • I'll get to be really creative. To create people, events, places.
  • I want to do one thing this month that I can be really proud of.
  • Writing fiction is totally new to me. I like doing new things.
  • I like the idea of becoming a writer.
@dela3499
dela3499 / generate.py
Created October 26, 2017 03:14
Generate sentences from a context-free grammar.
# -*- coding: utf-8 -*-
# Natural Language Toolkit: Generating from a CFG
#
# Copyright (C) 2001-2017 NLTK Project
# Author: Steven Bird <stevenbird1@gmail.com>
# Peter Ljunglöf <peter.ljunglof@heatherleaf.se>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
#
from __future__ import print_function
@dela3499
dela3499 / grammar.txt
Created October 26, 2017 03:11
business idea generator using context-free grammar
S -> Company 'for' Market | Modifier 'version of' Company | 'Improve' Company 'with' Concept | 'Use' Concept 'to help' Market | 'Create a' Resource 'for' Noun | 'Improve the' Quality 'of' Company | 'Improve' Need 'with' Tool | 'Improve' Need 'for' Market | 'Help' Market Improve
Tool -> Company | Resource | Concept
Noun -> Company | Market |
Company -> 'Uber' | 'Google' | 'Facebook' | 'Youtube'
Market -> 'golfers' | 'programmers' | 'home cooks' | 'nomads' | 'writers' | 'researchers' | 'engineers' | 'minimalists'
Modifier -> 'absurd' | 'kind' | 'space-age' | 'simpler'
Concept -> 'context-free grammar' | 'deep learning' | 'physics simulation'
Resource -> 'community' | 'book' | 'market' | 'toolkit' | 'training tool' | 'search engine' | 'knowledge base' | 'up-to-date list' | 'messaging system' | 'notification system' | 'newsletter' | 'club'
Quality -> 'speed' | 'cost' | 'quality'