diff --git a/_posts/2019-10-05-BillWurtz.md b/_posts/2019-10-05-BillWurtz.md new file mode 100644 index 0000000..b8875e7 --- /dev/null +++ b/_posts/2019-10-05-BillWurtz.md @@ -0,0 +1,91 @@ +--- +layout: post +title: "Using an RNN to generate Bill Wurtz notes" +description: "Textgenrnn is fun" +date: 2019-10-05 18:54:00 +categories: project +redirect_from: + - /post/99g9j2r90/ + - /99g9j2r90/ +--- + +[Bill Wurtz](https://billwurtz.com/) is an American musician who became [reasonably famous](https://socialblade.com/youtube/user/billwurtz/realtime) through short musical videos posted to Vine and YouTube. I was searching through his website the other day, and stumbled upon a page labeled [*notebook*](https://billwurtz.com/notebook.html), and thought I should check it out. + +Bill's notebook is a large (about 580 posts) collection of random thoughts, ideas, and sometimes just collections of words. A prime source of entertainment, and neural network inputs.. + +> *"If you are looking to burn something, fire may be just the ticket"* - Bill Wurtz + +## Choosing the right tool for the job +If you haven't noticed yet, Im building a neural net to generate notes based on his writing style and content. Anyone who has read [my first post](/blog/2018/06/27/becomeranter) will know that I have already done a similar project in the past. This means *time to reuse come code*! + +For this project, I decided to use an amazing library by @minimaxir called [textgenrnn](https://github.com/minimaxir/textgenrnn). This Python library will handle all of the heavy (and light) work of training an RNN on a text dataset, then generating new text. + +## Building a dataset +This project was a joke, so I didn't bother with properly grabbing each post, categorizing them, and parsing them. Instead, I build a little script to pull every HTML file from Bill's website, and regex out the body. This ended up leaving some artifacts in the output, but I don't really mind. + +```python +import re +import requests + + +def loadAllUrls(): + page = requests.get("https://billwurtz.com/notebook.html").text + + links = re.findall(r"HREF=\"(.*)\"style", page) + + return links + + +def dumpEach(urls): + for url in urls: + page = requests.get(f"https://billwurtz.com/{url}").text.strip().replace( + "
", "").replace("
", "").replace("\n", " ") + + data = re.findall(r"(.*)", page, re.MULTILINE) + + # ensure data + if len(data) == 0: + continue + + print(data[0]) + + +urls = loadAllUrls() +print(f"Loaded {len(urls)} pages") +dumpEach(urls) + +``` + +This script will print each of Bill's notes to the console (on it's own line). I used a simple redirect to write this to a file. + +```sh +python3 scrape.py > posts.txt +``` + +## Training +To train the RNN, I just used some of textgenrnn's example code to read the posts file, and build an [HDF5](https://en.wikipedia.org/wiki/Hierarchical_Data_Format) file to store the RNN's neurons. + +```python +from textgenrnn import textgenrnn + +generator = textgenrnn() +generator.train_from_file("/path/to/posts.txt", num_epochs=100) +``` + +This takes quite a while to run, so I offloaded it to a [Droplet](https://www.digitalocean.com/products/droplets/), and left it running overnight. + +## The results +Here are some of my favorite generated notes: + +> *"note: do not feel better"* + +> *"hi I am a car."* + +> *"i am stuff and think about this before . this is it, the pond. how do they make me feel better?"* + +> *"i am still about the floor"* + +Not perfect, but it is readable english, so i call it a win! + +## Play with the code +I have uploaded the basic code, the scraped posts, and a partial hdf5 file [to GitHub](https://github.com/Ewpratten/be-bill) for anyone to play with. Maybe make a twitter bot out of this? \ No newline at end of file diff --git a/_site/about/index.html b/_site/about/index.html index 36d175d..9ca2be4 100644 --- a/_site/about/index.html +++ b/_site/about/index.html @@ -204,7 +204,7 @@ sub rsa4096/0xA61A2F1676E35144 2019-08-11 [] [expires: 2025-08-09] Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/assets/css/main.css b/_site/assets/css/main.css index 2bb38f2..c5b8279 100644 --- a/_site/assets/css/main.css +++ b/_site/assets/css/main.css @@ -183,4 +183,23 @@ a h5 { z-index: -10; top: 0; left: 0 +} + +blockquote { + background: #f9f9f9; + border-left: 10px solid #ccc; + margin: 1.5em 10px; + padding: 0.5em 10px; + /* quotes: "\201C""\201D""\2018""\2019"; */ +} +blockquote:before { + color: #ccc; + /* content: open-quote; */ + font-size: 4em; + line-height: 0.1em; + margin-right: 0.25em; + vertical-align: -0.4em; +} +blockquote p { + display: inline; } \ No newline at end of file diff --git a/_site/blog/2018/06/27/becomeranter.html b/_site/blog/2018/06/27/becomeranter.html index c46ac69..17116ea 100644 --- a/_site/blog/2018/06/27/becomeranter.html +++ b/_site/blog/2018/06/27/becomeranter.html @@ -123,7 +123,7 @@ pip3 install tensorflow-gpu #for gpu processing Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/04/30/frc-languages.html b/_site/blog/2019/04/30/frc-languages.html index 3452927..2c0a839 100644 --- a/_site/blog/2019/04/30/frc-languages.html +++ b/_site/blog/2019/04/30/frc-languages.html @@ -87,7 +87,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/05/27/building-safe-vision-comms.html b/_site/blog/2019/05/27/building-safe-vision-comms.html index 5cdca75..7256736 100644 --- a/_site/blog/2019/05/27/building-safe-vision-comms.html +++ b/_site/blog/2019/05/27/building-safe-vision-comms.html @@ -100,7 +100,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/06/12/styiling-github.html b/_site/blog/2019/06/12/styiling-github.html index 455b3bd..fe250c2 100644 --- a/_site/blog/2019/06/12/styiling-github.html +++ b/_site/blog/2019/06/12/styiling-github.html @@ -111,7 +111,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/06/16/graphing-w2a.html b/_site/blog/2019/06/16/graphing-w2a.html index a653cd6..e044713 100644 --- a/_site/blog/2019/06/16/graphing-w2a.html +++ b/_site/blog/2019/06/16/graphing-w2a.html @@ -125,7 +125,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/06/17/amm2m1-release.html b/_site/blog/2019/06/17/amm2m1-release.html index 59e1e37..5579dc6 100644 --- a/_site/blog/2019/06/17/amm2m1-release.html +++ b/_site/blog/2019/06/17/amm2m1-release.html @@ -84,7 +84,7 @@ Your browser does not support audio players Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/06/21/robot-experiences.html b/_site/blog/2019/06/21/robot-experiences.html index 8c12c31..81b62d1 100644 --- a/_site/blog/2019/06/21/robot-experiences.html +++ b/_site/blog/2019/06/21/robot-experiences.html @@ -124,7 +124,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/06/23/googlectf.html b/_site/blog/2019/06/23/googlectf.html index 6c08101..9b75b51 100644 --- a/_site/blog/2019/06/23/googlectf.html +++ b/_site/blog/2019/06/23/googlectf.html @@ -82,7 +82,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/06/24/languagehunt2.html b/_site/blog/2019/06/24/languagehunt2.html index eab8653..2c52628 100644 --- a/_site/blog/2019/06/24/languagehunt2.html +++ b/_site/blog/2019/06/24/languagehunt2.html @@ -82,7 +82,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/06/26/bashsmash.html b/_site/blog/2019/06/26/bashsmash.html index 1668fbd..7b913b5 100644 --- a/_site/blog/2019/06/26/bashsmash.html +++ b/_site/blog/2019/06/26/bashsmash.html @@ -191,7 +191,7 @@ __() {/???/???/???n?f Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/06/27/pwnlink.html b/_site/blog/2019/06/27/pwnlink.html index 166a702..2f26552 100644 --- a/_site/blog/2019/06/27/pwnlink.html +++ b/_site/blog/2019/06/27/pwnlink.html @@ -112,7 +112,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/06/27/python.html b/_site/blog/2019/06/27/python.html index bcad2c9..ea85b32 100644 --- a/_site/blog/2019/06/27/python.html +++ b/_site/blog/2019/06/27/python.html @@ -177,7 +177,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/07/01/devdns.html b/_site/blog/2019/07/01/devdns.html index 1cab2d8..8ded8af 100644 --- a/_site/blog/2019/07/01/devdns.html +++ b/_site/blog/2019/07/01/devdns.html @@ -101,7 +101,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/07/06/scrapingfrcgithub.html b/_site/blog/2019/07/06/scrapingfrcgithub.html index c4d95bb..8ab6040 100644 --- a/_site/blog/2019/07/06/scrapingfrcgithub.html +++ b/_site/blog/2019/07/06/scrapingfrcgithub.html @@ -174,7 +174,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/07/13/lookback-gmad.html b/_site/blog/2019/07/13/lookback-gmad.html index a6d6152..41345e7 100644 --- a/_site/blog/2019/07/13/lookback-gmad.html +++ b/_site/blog/2019/07/13/lookback-gmad.html @@ -95,7 +95,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/07/15/mindmap.html b/_site/blog/2019/07/15/mindmap.html index 744ca0f..8e15468 100644 --- a/_site/blog/2019/07/15/mindmap.html +++ b/_site/blog/2019/07/15/mindmap.html @@ -189,7 +189,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/08/10/why-i-carry-nfc.html b/_site/blog/2019/08/10/why-i-carry-nfc.html index 003ccb8..13a3183 100644 --- a/_site/blog/2019/08/10/why-i-carry-nfc.html +++ b/_site/blog/2019/08/10/why-i-carry-nfc.html @@ -107,7 +107,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/08/12/setting-up-ja.html b/_site/blog/2019/08/12/setting-up-ja.html index 6b4eef3..d980a8b 100644 --- a/_site/blog/2019/08/12/setting-up-ja.html +++ b/_site/blog/2019/08/12/setting-up-ja.html @@ -152,7 +152,7 @@ ibus-daemon -drx Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/08/24/shift2.html b/_site/blog/2019/08/24/shift2.html index 74756e3..e25ae37 100644 --- a/_site/blog/2019/08/24/shift2.html +++ b/_site/blog/2019/08/24/shift2.html @@ -137,7 +137,7 @@ shift2 -h Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/08/27/github-cleanup.html b/_site/blog/2019/08/27/github-cleanup.html index bbdb9b9..ad6e8b6 100644 --- a/_site/blog/2019/08/27/github-cleanup.html +++ b/_site/blog/2019/08/27/github-cleanup.html @@ -108,7 +108,7 @@ Starting from the top, scroll through, and middle click on anything you want to Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/2019/09/07/wrong-python.html b/_site/blog/2019/09/07/wrong-python.html index d00baaf..c153b80 100644 --- a/_site/blog/2019/09/07/wrong-python.html +++ b/_site/blog/2019/09/07/wrong-python.html @@ -157,7 +157,7 @@ fn printMyNumber(MyClass* self){ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/blog/index.html b/_site/blog/index.html index e2a627b..f69b80c 100644 --- a/_site/blog/index.html +++ b/_site/blog/index.html @@ -64,22 +64,22 @@ Featured Post
-
5024's first offseason event of 2019 +
Using an RNN to generate Bill Wurtz notes
-

A 120lb headless chicken thad doesn't understand the word "stop"

- View +

Textgenrnn is fun

+ View
--> - +
-
5024's first offseason event of 2019 +
Using an RNN to generate Bill Wurtz notes
-

A 120lb headless chicken thad doesn't understand the word "stop"

+

Textgenrnn is fun

@@ -92,6 +92,21 @@ + +
+
5024's first offseason event of 2019
+ +
+

A 120lb headless chicken thad doesn't understand the word "stop"

+
+ + + + + + + +
I want to build a satellite
@@ -535,7 +550,7 @@ Site design by:
Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400
diff --git a/_site/documentation.html b/_site/documentation.html index 759a2a4..cf70c54 100644 --- a/_site/documentation.html +++ b/_site/documentation.html @@ -52,7 +52,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/feed.xml b/_site/feed.xml index d0faceb..241fbec 100644 --- a/_site/feed.xml +++ b/_site/feed.xml @@ -1,4 +1,90 @@ -Jekyll2019-09-30T09:35:47-04:00http://0.0.0.0:4000/feed.xmlEvan PrattenComputer wizard, student, <a href="https://frc5024.github.io">@frc5024</a> programming team lead, and radio enthusiast.Building images from binary data2019-09-11T08:41:00-04:002019-09-11T08:41:00-04:00http://0.0.0.0:4000/blog/2019/09/11/Buildingimgfrombin<p>During a computer science class today, we were talking about embedding code and metadata in <em>jpg</em> and <em>bmp</em> files. @exvacuum was showing off a program he wrote that watched a directory for new image files, and would display them on a canvas. He then showed us a special image. In this image, he had injected some metadata into the last few pixels, which were not rendered, but told his program where to position the image on the canvas, and it’s size.</p> +Jekyll2019-10-09T08:34:03-04:00http://0.0.0.0:4000/feed.xmlEvan PrattenComputer wizard, student, <a href="https://frc5024.github.io">@frc5024</a> programming team lead, and radio enthusiast.Using an RNN to generate Bill Wurtz notes2019-10-05T14:54:00-04:002019-10-05T14:54:00-04:00http://0.0.0.0:4000/blog/2019/10/05/BillWurtz<p><a href="https://billwurtz.com/">Bill Wurtz</a> is an American musician who became <a href="https://socialblade.com/youtube/user/billwurtz/realtime">reasonably famous</a> through short musical videos posted to Vine and YouTube. I was searching through his website the other day, and stumbled upon a page labeled <a href="https://billwurtz.com/notebook.html"><em>notebook</em></a>, and thought I should check it out.</p> + +<p>Bill’s notebook is a large (about 580 posts) collection of random thoughts, ideas, and sometimes just collections of words. A prime source of entertainment, and neural network inputs..</p> + +<blockquote> + <p><em>“If you are looking to burn something, fire may be just the ticket”</em> - Bill Wurtz</p> +</blockquote> + +<h2 id="choosing-the-right-tool-for-the-job">Choosing the right tool for the job</h2> +<p>If you haven’t noticed yet, Im building a neural net to generate notes based on his writing style and content. Anyone who has read <a href="/blog/2018/06/27/becomeranter">my first post</a> will know that I have already done a similar project in the past. This means <em>time to reuse come code</em>!</p> + +<p>For this project, I decided to use an amazing library by @minimaxir called <a href="https://github.com/minimaxir/textgenrnn">textgenrnn</a>. This Python library will handle all of the heavy (and light) work of training an RNN on a text dataset, then generating new text.</p> + +<h2 id="building-a-dataset">Building a dataset</h2> +<p>This project was a joke, so I didn’t bother with properly grabbing each post, categorizing them, and parsing them. Instead, I build a little script to pull every HTML file from Bill’s website, and regex out the body. This ended up leaving some artifacts in the output, but I don’t really mind.</p> + +<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kn">import</span> <span class="nn">re</span> +<span class="kn">import</span> <span class="nn">requests</span> + + +<span class="k">def</span> <span class="nf">loadAllUrls</span><span class="p">():</span> + <span class="n">page</span> <span class="o">=</span> <span class="n">requests</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s">"https://billwurtz.com/notebook.html"</span><span class="p">)</span><span class="o">.</span><span class="n">text</span> + + <span class="n">links</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">findall</span><span class="p">(</span><span class="s">r"HREF=\"(.*)\"style"</span><span class="p">,</span> <span class="n">page</span><span class="p">)</span> + + <span class="k">return</span> <span class="n">links</span> + + +<span class="k">def</span> <span class="nf">dumpEach</span><span class="p">(</span><span class="n">urls</span><span class="p">):</span> + <span class="k">for</span> <span class="n">url</span> <span class="ow">in</span> <span class="n">urls</span><span class="p">:</span> + <span class="n">page</span> <span class="o">=</span> <span class="n">requests</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="n">f</span><span class="s">"https://billwurtz.com/{url}"</span><span class="p">)</span><span class="o">.</span><span class="n">text</span><span class="o">.</span><span class="n">strip</span><span class="p">()</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span> + <span class="s">"&lt;/br&gt;"</span><span class="p">,</span> <span class="s">""</span><span class="p">)</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s">"&lt;br&gt;"</span><span class="p">,</span> <span class="s">""</span><span class="p">)</span><span class="o">.</span><span class="n">replace</span><span class="p">(</span><span class="s">"</span><span class="se">\n</span><span class="s">"</span><span class="p">,</span> <span class="s">" "</span><span class="p">)</span> + + <span class="n">data</span> <span class="o">=</span> <span class="n">re</span><span class="o">.</span><span class="n">findall</span><span class="p">(</span><span class="s">r"&lt;/head&gt;(.*)"</span><span class="p">,</span> <span class="n">page</span><span class="p">,</span> <span class="n">re</span><span class="o">.</span><span class="n">MULTILINE</span><span class="p">)</span> + + <span class="c1"># ensure data +</span> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">data</span><span class="p">)</span> <span class="o">==</span> <span class="mi">0</span><span class="p">:</span> + <span class="k">continue</span> + + <span class="k">print</span><span class="p">(</span><span class="n">data</span><span class="p">[</span><span class="mi">0</span><span class="p">])</span> + + +<span class="n">urls</span> <span class="o">=</span> <span class="n">loadAllUrls</span><span class="p">()</span> +<span class="k">print</span><span class="p">(</span><span class="n">f</span><span class="s">"Loaded {len(urls)} pages"</span><span class="p">)</span> +<span class="n">dumpEach</span><span class="p">(</span><span class="n">urls</span><span class="p">)</span> + +</code></pre></div></div> + +<p>This script will print each of Bill’s notes to the console (on it’s own line). I used a simple redirect to write this to a file.</p> + +<div class="language-sh highlighter-rouge"><div class="highlight"><pre class="highlight"><code>python3 scrape.py <span class="o">&gt;</span> posts.txt +</code></pre></div></div> + +<h2 id="training">Training</h2> +<p>To train the RNN, I just used some of textgenrnn’s example code to read the posts file, and build an <a href="https://en.wikipedia.org/wiki/Hierarchical_Data_Format">HDF5</a> file to store the RNN’s neurons.</p> + +<div class="language-python highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="kn">from</span> <span class="nn">textgenrnn</span> <span class="kn">import</span> <span class="n">textgenrnn</span> + +<span class="n">generator</span> <span class="o">=</span> <span class="n">textgenrnn</span><span class="p">()</span> +<span class="n">generator</span><span class="o">.</span><span class="n">train_from_file</span><span class="p">(</span><span class="s">"/path/to/posts.txt"</span><span class="p">,</span> <span class="n">num_epochs</span><span class="o">=</span><span class="mi">100</span><span class="p">)</span> +</code></pre></div></div> + +<p>This takes quite a while to run, so I offloaded it to a <a href="https://www.digitalocean.com/products/droplets/">Droplet</a>, and left it running overnight.</p> + +<h2 id="the-results">The results</h2> +<p>Here are some of my favorite generated notes:</p> + +<blockquote> + <p><em>“note: do not feel better”</em></p> +</blockquote> + +<blockquote> + <p><em>“hi I am a car.”</em></p> +</blockquote> + +<blockquote> + <p><em>“i am stuff and think about this before . this is it, the pond. how do they make me feel better?”</em></p> +</blockquote> + +<blockquote> + <p><em>“i am still about the floor”</em></p> +</blockquote> + +<p>Not perfect, but it is readable english, so i call it a win!</p> + +<h2 id="play-with-the-code">Play with the code</h2> +<p>I have uploaded the basic code, the scraped posts, and a partial hdf5 file <a href="https://github.com/Ewpratten/be-bill">to GitHub</a> for anyone to play with. Maybe make a twitter bot out of this?</p>Bill Wurtz is an American musician who became reasonably famous through short musical videos posted to Vine and YouTube. I was searching through his website the other day, and stumbled upon a page labeled notebook, and thought I should check it out.Building images from binary data2019-09-11T08:41:00-04:002019-09-11T08:41:00-04:00http://0.0.0.0:4000/blog/2019/09/11/Buildingimgfrombin<p>During a computer science class today, we were talking about embedding code and metadata in <em>jpg</em> and <em>bmp</em> files. @exvacuum was showing off a program he wrote that watched a directory for new image files, and would display them on a canvas. He then showed us a special image. In this image, he had injected some metadata into the last few pixels, which were not rendered, but told his program where to position the image on the canvas, and it’s size.</p> <p>This demo got @hyperliskdev and I thinking about what else we can do with image data. After some talk, the idea of converting application binaries to images came up. I had seen a blog post about visually decoding <a href="https://en.wikipedia.org/wiki/On%E2%80%93off_keying">OOK data</a> by converting an <a href="http://www.ni.com/tutorial/4805/en/">IQ capture</a> to an image. With a little adaptation, I did the same for a few binaries on my laptop.</p> @@ -583,33 +669,4 @@ ibus-daemon <span class="nt">-drx</span> <h2 id="using-the-script">Using the script</h2> <p>This script is not on PYPI this time. You can obtain a copy from my GitHub repo: <a href="https://github.com/Ewpratten/frc-code-stats">https://github.com/Ewpratten/frc-code-stats</a></p> -<p>First, make sure both <code class="highlighter-rouge">python3.7</code> and <code class="highlighter-rouge">python3-pip</code> are installed on your computer. Next, delete the <code class="highlighter-rouge">data.json</code> file. Then, install the requirements with <code class="highlighter-rouge">pip3 install -r requirements.txt</code>. Finally, run with <code class="highlighter-rouge">python3 main.py</code> to start the script. Now, go outside and enjoy nature for about an hour, and your data should be loaded!.</p>I was curious about the most used languages for FRC, so I build a Python script to find out what they where.devDNS2019-07-01T18:13:00-04:002019-07-01T18:13:00-04:00http://0.0.0.0:4000/blog/2019/07/01/devDNS<p>Over the past year and a half, I have been hacking my way around the undocumented <a href="https://devrant.com">devRant</a> auth/write API. At the request of devRant’s creators, this API must not be documented due to the way logins work on the platform. That is besides the point. I have been working on a little project called <a href="https://devrant.com/collabs/2163502">devDNS</a> over the past few days that uses this undocumented API. Why must I be so bad at writing intros?</p> - -<h2 id="what-is-devdns">What is devDNS</h2> -<p>devDNS is a devRant bot written in python. It will serve any valid DNS query from any user on the platform. A query is just a comment in one of the following forms:</p> -<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>@devDNS example.com -</code></pre></div></div> -<p>or</p> -<div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>@devDNS MX example.com -</code></pre></div></div> -<p>Of course, <code class="highlighter-rouge">MX</code> and <code class="highlighter-rouge">example.com</code> are to be replaced with the domain and entry of your choosing.</p> - -<p>devDNS was inspired by <a href="https://twitter.com/1111resolver">@1111Resolver</a>, and the source is available on <a href="https://github.com/Ewpratten/devDNS">GitHub</a>.</p> - -<h2 id="how-it-works">How it works</h2> -<p>The Python script behind devDNS is very simple. devDNS does the following every 10 seconds:</p> -<ul> - <li>Fetch all new notifs</li> - <li>Find only mentions</li> - <li>Spin off a thread for each mention that passes a basic parser (Is the message 2 or 3 words long)</li> - <li>In the thread, check if the message is a control message (allows me to view the status of the bot via devRant)</li> - <li>Check if the request matches a required pattern</li> - <li>Call <code class="highlighter-rouge">dnspython</code> with requested record and domain</li> - <li>Receive answer from a custom <a href="https://pi-hole.net/">PIHole</a> server with caching and super low latency</li> - <li>Send a comment with the results to the requester</li> -</ul> - -<p>Thats it! Super simple, and only two days from concept to reality.</p> - -<h2 id="where-is-this-hosted">Where is this hosted?</h2> -<p>This program is hosted on a raspberry pi laying in my room running docker. I also have <a href="https://www.portainer.io/">Portainer</a> set up so I can easily monitor the bot from my phone over my VPN.</p>Over the past year and a half, I have been hacking my way around the undocumented devRant auth/write API. At the request of devRant’s creators, this API must not be documented due to the way logins work on the platform. That is besides the point. I have been working on a little project called devDNS over the past few days that uses this undocumented API. Why must I be so bad at writing intros? \ No newline at end of file +<p>First, make sure both <code class="highlighter-rouge">python3.7</code> and <code class="highlighter-rouge">python3-pip</code> are installed on your computer. Next, delete the <code class="highlighter-rouge">data.json</code> file. Then, install the requirements with <code class="highlighter-rouge">pip3 install -r requirements.txt</code>. Finally, run with <code class="highlighter-rouge">python3 main.py</code> to start the script. Now, go outside and enjoy nature for about an hour, and your data should be loaded!.</p>I was curious about the most used languages for FRC, so I build a Python script to find out what they where. \ No newline at end of file diff --git a/_site/fossl-feeds.html b/_site/fossl-feeds.html index 874f715..6aa2fc0 100644 --- a/_site/fossl-feeds.html +++ b/_site/fossl-feeds.html @@ -88,7 +88,7 @@ https://blog.mrtnrdl.de/feed.xml Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/index.html b/_site/index.html index b7941c2..7e2eebd 100644 --- a/_site/index.html +++ b/_site/index.html @@ -101,7 +101,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/projects.html b/_site/projects.html index 1c07e29..b825333 100644 --- a/_site/projects.html +++ b/_site/projects.html @@ -256,7 +256,7 @@ Site design by: Evan Pratten | - This site was last updated at: 2019-09-30 09:35:47 -0400 + This site was last updated at: 2019-10-09 08:34:03 -0400 diff --git a/_site/redirects.json b/_site/redirects.json index 55c9a8a..dbacda5 100644 --- a/_site/redirects.json +++ b/_site/redirects.json @@ -1 +1 @@ -{"/post/ef7b3166/":"http://0.0.0.0:4000/blog/2019/09/11/buildingimgfrombin","/ef7b3166/":"http://0.0.0.0:4000/blog/2019/09/11/buildingimgfrombin","/post/3a588993/":"http://0.0.0.0:4000/blog/2019/09/12/dronelicense","/3a588993/":"http://0.0.0.0:4000/blog/2019/09/12/dronelicense","/post/e9gb3490/":"http://0.0.0.0:4000/blog/2019/09/19/i-want-to-build-a-sat","/e9gb3490/":"http://0.0.0.0:4000/blog/2019/09/19/i-want-to-build-a-sat","/post/e9g9d6s90/":"http://0.0.0.0:4000/blog/2019/09/28/offseason1","/e9g9d6s90/":"http://0.0.0.0:4000/blog/2019/09/28/offseason1","/r/5kcomm":"https://imgur.com/a/77bnlZN"} \ No newline at end of file +{"/post/ef7b3166/":"http://0.0.0.0:4000/blog/2019/09/11/buildingimgfrombin","/ef7b3166/":"http://0.0.0.0:4000/blog/2019/09/11/buildingimgfrombin","/post/3a588993/":"http://0.0.0.0:4000/blog/2019/09/12/dronelicense","/3a588993/":"http://0.0.0.0:4000/blog/2019/09/12/dronelicense","/post/e9gb3490/":"http://0.0.0.0:4000/blog/2019/09/19/i-want-to-build-a-sat","/e9gb3490/":"http://0.0.0.0:4000/blog/2019/09/19/i-want-to-build-a-sat","/post/e9g9d6s90/":"http://0.0.0.0:4000/blog/2019/09/28/offseason1","/e9g9d6s90/":"http://0.0.0.0:4000/blog/2019/09/28/offseason1","/post/99g9j2r90/":"http://0.0.0.0:4000/blog/2019/10/05/billwurtz","/99g9j2r90/":"http://0.0.0.0:4000/blog/2019/10/05/billwurtz","/r/5kcomm":"https://imgur.com/a/77bnlZN"} \ No newline at end of file diff --git a/assets/css/main.css b/assets/css/main.css index 2bb38f2..c5b8279 100644 --- a/assets/css/main.css +++ b/assets/css/main.css @@ -183,4 +183,23 @@ a h5 { z-index: -10; top: 0; left: 0 +} + +blockquote { + background: #f9f9f9; + border-left: 10px solid #ccc; + margin: 1.5em 10px; + padding: 0.5em 10px; + /* quotes: "\201C""\201D""\2018""\2019"; */ +} +blockquote:before { + color: #ccc; + /* content: open-quote; */ + font-size: 4em; + line-height: 0.1em; + margin-right: 0.25em; + vertical-align: -0.4em; +} +blockquote p { + display: inline; } \ No newline at end of file diff --git a/b.sh b/b.sh new file mode 100644 index 0000000..ef68280 --- /dev/null +++ b/b.sh @@ -0,0 +1 @@ +say $(curl https://gist.githubusercontent.com/The5heepDev/a15539b297a7862af4f12ce07fee6bb7/raw/7164813a9b8d0a3b2dcffd5b80005f1967887475/entire_bee_movie_script) \ No newline at end of file