Skip to content

Instantly share code, notes, and snippets.

View mullikine's full-sized avatar
🍓

Shane Mulligan mullikine

🍓
  • Dunedin, NZ
View GitHub Profile
@mullikine
mullikine / all-prs.txt
Created October 17, 2019 03:07
All PRs
https://github.com/0xAX/go-algorithms/pull/18
https://github.com/360EntSecGroup-Skylar/excelize/pull/303
https://github.com/360EntSecGroup-Skylar/excelize/pull/315
https://github.com/3d0c/gmf/pull/98
https://github.com/AdguardTeam/AdGuardHome/pull/638
https://github.com/AlecAivazis/survey/pull/181
https://github.com/AlessandroMinoccheri/codeigniter-currency-converter/pull/16
https://github.com/AntoineAugusti/feature-flags/pull/10
https://github.com/AntoineAugusti/feature-flags/pull/11
https://github.com/AntoineAugusti/moduluschecking/pull/15
@mullikine
mullikine / bonus 1 solution
Created December 3, 2019 02:29 — forked from erantapaa/bonus 1 solution
Daily Programmer 2017-09-22 Solution
iniital board:
1 3 2 5 4 2 2 3
1 12345678 .....6.. 12345678 12345678 ....5... 12345678 1....... 12345678 3
4 12345678 .2...... 1....... 12345678 12345678 12345678 12345678 12345678 2
3 .2...... 12345678 12345678 12345678 .....6.. 12345678 ..3..... 12345678 5
3 12345678 12345678 12345678 12345678 12345678 .......8 12345678 12345678 2
2 12345678 12345678 .....6.. 12345678 12345678 ..3..... ......7. 12345678 3
2 12345678 12345678 ....5... 12345678 12345678 12345678 12345678 12345678 1
4 12345678 12345678 12345678 12345678 12345678 12345678 12345678 ..3..... 3
3 12345678 12345678 12345678 12345678 ..3..... 12345678 12345678 12345678 3
@mullikine
mullikine / spacy-extraction-medley.py
Created December 4, 2019 08:06
Example code for extracting things with spacy and writing them out to text files and then reading them in again. https://gist.github.com/aparrish/18b9290fefdb4511f6909c2fd9dee12f
# coding: utf-8
# # Extracting and writing to files
import spacy
def flatten_subtree(st):
return ''.join([w.text_with_ws for w in list(st)]).strip()
@mullikine
mullikine / from-plain-text.ipynb
Created December 4, 2019 08:12 — forked from aparrish/from-plain-text.ipynb
Semantic similarity chatbots from plain-text files ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env python3.6
# -*- coding: utf-8 -*-
# coding: utf-8
# # Semantic similarity chatbots from plain-text files
#
# By [Allison Parrish](http://www.decontextualize.com/)
#
# This needs copy, sorry :( :( :( But it works!
# coding: utf-8
# # Predictive text with concatenated word vectors
#
# By [Allison Parrish](http://www.decontextualize.com/)
#
# This notebook demonstrates one way to implement predictive text like [iOS QuickType](https://www.apple.com/sg/ios/whats-new/quicktype/). It works sort of like a [Markov chain text generator](https://github.com/aparrish/rwet/blob/master/ngrams-and-markov-chains.ipynb), but uses nearest-neighbor lookups on a database of concatenated [word vectors](https://github.com/aparrish/rwet/blob/master/understanding-word-vectors.ipynb) instead of n-grams of tokens. You can build this database with any text you want!
#
# To get this code to work, you'll need to [install spaCy](https://spacy.io/usage/#section-quickstart), download a [spaCy model with word vectors](https://spacy.io/usage/models#available) (like `en_core_web_lg`). You'll also need [Simple Neighbors](https://github.com/aparrish/simpleneighbors), a Python library I made for easy nearest neighbor lookups:
@mullikine
mullikine / predictive-models.ipynb
Created December 4, 2019 08:56 — forked from aparrish/predictive-models.ipynb
Predictive text and text generation notebook. Written for Code Societies at SFPC, summer 2018. Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mullikine
mullikine / latency.txt
Created December 14, 2019 01:43 — forked from bafna/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@mullikine
mullikine / docker-help.md
Created January 26, 2020 01:52 — forked from bradtraversy/docker-help.md
Docker Commands, Help & Tips

Docker Commands, Help & Tips

Show commands & management commands

$ docker

Docker version info

@mullikine
mullikine / txt
Created February 14, 2020 02:56 — forked from wattry/txt
Docker Cheatsheet
# Images
docker build -t friendlyname . # Create image using this directory's Dockerfile
docker image ls -a # List all images on this machine
docker image rm <image id> # Remove specified image from this machine
docker image rm $(docker image ls -a -q) # Remove all images from this machine
docker image prune # remove dangling images
docker tag <image> username/repository:tag # Tag <image> for upload to registry
docker push username/repository:tag # Upload tagged image to registry
docker run username/repository:tag # Run image from a registry