$ docker
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
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 |
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
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 |
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
# 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() |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
#!/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! |
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
# 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: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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 |
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
# 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 |