Skip to content

Instantly share code, notes, and snippets.

Dear StackOverflow, I want to install nokogiri on my Mac OSX machine, but the native extensions are failing to build...what should I type in instead?

gem install nokogiri -- --use-system-libraries=true --with-xml2-include=/usr/local/opt/libxml2/include/libxml2

Source: http://stackoverflow.com/a/25068003/4765379

But StackOverflow, now nokogiri is raising a warning!

Misc. GPT-3 Information (click to expand)

Are Prompts Effective?

  • Analyzing The Problem GPT-3 Is Trying To Solve: GPT-3 provides a probablistic solution to a problem - it doesn't succeed all the time, or fail all the time either. The debate over GPT-3's effectiveness is based on whether this probablistic solution is enough. Skeptics of GPT-3 believe that it should solve prompts all the time, not just a few cherry-picked exmaples...while GPT-3 supporters are content with it solving prompts some of the time or even once (moving most of the "burden" of problem-solving over to the prompt-design phase).
    • Commentary: If GPT-3 is to be practically useful, it must be able to solve a problem correctly at least 50% of the time. That way, if GPT-3 produces a "wrong" answer, you can keep rerolling until you get the correct answer.
  • [Is GPT-3 Few-Shot Ready?](https://www.
@tra38
tra38 / news_articles.md
Last active February 23, 2022 03:43
News Articles generated using ZombieWriter::MachineLearning

0 - Computers are coming for our jobs, as writers

Creative and artistic feats are often seen as the last refuge for human endeavor from the coming robot apocalypse. But if NaNoGenMo gains a foothold and improves, at least we'll all be well entertained in our unemployment.---"Computers Write Novels Faster Than You Do", Smithsonian Maganize

Computers are coming for our jobs, as writers. Spooky.---Tom Trimbath

But maybe this contest just reflects our evolution towards a more technological society. For the last 16 years November has seen “National Novel Writing Month” (or NaNoWriMo), a free event challenging amateur writers to compose a 50,000-word novel before December 1st. But two years ago it was suddenly joined by this companion event for artistically-inclined computer programmers, dubbed NaNoGenMo — drawing so

@tra38
tra38 / censored.rb
Last active April 18, 2021 10:46
Skynet's ██████ - The MVP
require 'zombie_writer'
require 'smarter_csv'
require 'faker'
def boxes
faker_lorem = Faker::Lorem.paragraph(3, true, 4)
faker_lorem.gsub(/\w/, "█")
end
def add_censored_text_to_paragraph_start(paragraph)
@tra38
tra38 / skynet.csv
Last active April 18, 2021 10:46
The CSV file used to generate Skynet's ██████
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
Content,SourceText,SourceURL
"Skynet is a self-aware super computer with nearly infinite resources and becomes more intelligent at an exponential rate. So why does it fight humans using something as asinine and archaic as bullets? If it wanted to win it could probably engineer a virus in a few seconds and kill off every living thing on the planet. By DESIGN it is insanely lethal, so why is it so bad at killing humans? Is it because somehow our creativity and determination have allowed us to survive? Fuck no. It's because it doesn't *want* to win.","Torbior, a Slugogar Cultist","https://www.reddit.com/r/movies/comments/1jqo8m/in_the_terminator_franchise_what_does_skynet/cbho86l/"
"Skynet wants to fight forever. It was designed for war. That is its whole *purpose*. It wants an endless war with humans, and gives them just enough hope to keep fighting forever. That's why mankind never makes any *real* progress. There is no actual 'end-game' where the humans finally triumph. They already lost when they made the da
@tra38
tra38 / standards.md
Last active June 14, 2020 15:57
Standards Document For "Story Compiler"

Quote, Unmodified From Original

Input JSON:

{
    "quote": "We’re changing the way people share around the world with our
               Global Community and 1.4 billion pieces of content under our
               simple, easy-to-use open licenses.",
    "source": "https://creativecommons.org",
    "license": "CC-BY",
    "license_url": "https://creativecommons.org/licenses/by/4.0/",
@tra38
tra38 / racket_lessons.md
Last active June 3, 2020 04:48
Part of Dev Bootcamp's Phase 4

Basics

  1. Write a function that squares a number
;square : number -> number
(define (square number)
    (* number number) 
  )

(square 5)
@tra38
tra38 / story_compiler_2.md
Last active May 18, 2020 15:04
Slaying the Great White Whale...um, I mean Novel

August

Introduction

From a 2017 comment:

Usual critiques of story generators tend to be some variant of "Yes, you can produce short evocative text snippets, but without structure, you can't scale your generator upwards". It seems approaches that require planning and outlines (story compilers, simulations, etc.) are an inverse of that, providing the structure to scale upwards, but are unable to generate the short evocative text snippets on their own.

This may not actually be a problem to worry about though - a human probably need to be in the loop somewhere (at least, if the story is to be enjoyable or useful to other humans).

>But if it does become an issue, maybe we need to have two generators -- use a Markov chain or RNNs to generate short evocative paragraphs for individual topics, and then a large-scale planner to pick paragraphs from those individual topics.

@tra38
tra38 / weird_encodings.md
Last active September 19, 2019 02:31
weird_encodings.md
@tra38
tra38 / til.md
Last active September 15, 2019 22:15
Today I Learned... (warning, knowledge here is 'raw', so it may not be completely accurate, but represents my understanding of the tech at the time. No warranty is expressed or implied.)

Fog Computing

In a traditional IoT architeture, you have your normal "device" that transmit messages to the cloud and receive a response. However, this approach is "slow" (high latency) - the device must wait for the following steps to occur:

  1. the data being transmitted across the Internet to the cloud provider

  2. the cloud provider doing its own processing of the data

  3. the cloud provider transmitting the data back to the device