Skip to content

Instantly share code, notes, and snippets.

require 'yaml'
characters_data = YAML.load_file("yml/characters.yml")
@words_data = YAML.load_file("yml/words.yml")
@selfverbs = @words_data["SelfVerbs"]
CHARACTERS = characters_data["Characters"]
#Method to sample from a Hash
@tra38
tra38 / test.sky
Last active October 4, 2015 18:32
This file is an example of how Skynet can be used to generate a GG file with simulated recursive grammar
ARRAY = []
10.times do |number|
ARRAY << "$line#{number}"
end
puts %{line:= #{ARRAY.join(" ")} }
10.times do |number|
puts %{
@tra38
tra38 / Story
Last active October 15, 2015 16:52
The Unblinking Eye never cared too much about Hat Plaza. It was too far away, too remote for
him to worry about. Instead, he would busy himself with his career as a Central Web Manager,
where he would sell hats. While he would work, The Unblinking Eye wished for some adventure
in his life. But not too much.
The Unblinking Eye's boss was Gregory, a Future Directives Liaison. Gregory was not a nice
man, but he gets the job done, and that's all that mattered. Nothing else did.
The Unblinking Eye loved his job.
---
@tra38
tra38 / city_non_simulator.rb
Last active November 7, 2015 00:12
This does not actually simulate the conflicted commerce and trading patterns of a city, but would you be able to tell the difference?
#This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit

One day, Willard Ullrich decided to send his/her best friend, Ms. Carolyn Halvorson, a gift. Ms. Carolyn Halvorson received a Golden Falcon. Ms. Carolyn Halvorson desired to learn Haskell. Ms. Carolyn Halvorson knew of a person (Darlene Ruecker) who would teach him Haskell. Ms. Carolyn Halvorson decided to trade the Golden Falcon for this valuable service. Darlene Ruecker desired to understand the meaning of the Golden Falcon. Darlene Ruecker knew of a person (Henry Morar III) who would produce a peer-reviewed paper showing the history of the Golden Falcon. Darlene Ruecker decided to trade the Golden Falcon for this valuable service. Henry Morar III wanted to murder Darlene Ruecker because Darlene Ruecker 'gave me a counterfeit, worthless Falcon'. Henry Morar III knew of a person (Virgil Langworth III) who would kill the victim and make it look like an accident. Henry Morar III decided to trade the Golden Falcon for this valuable service.

@tra38
tra38 / text_rearragement.md
Created November 30, 2015 03:23
Rearranging the paragraphs of "NaNoGenMo: Dada 2.0"

Story 0

NLG algorithms are generally considered to be a form of “artificial” or “machine intelligence” because they do things—like write news articles about sports or the weather, or write real estate ads, as the prototype my Fast Forward Labs colleagues built—we believe humans alone can do. (I hope to explore the implications of the historical, relativist concept of artificial intelligence, espoused by people like Nancy Fulda, in a separate post.) As illustrated in the WSJ article, most people then evaluate NLG performance like André Bazin evaluates style in realism: as the art of realism lies in the seeming absence of artifice, so too does the art of algorithms lie in the seeming absence of automation. Commercialization only enhances this push towards verisimilitude, as investment banks and news agencies like Forbes won’t pay top dollar for software that generates strange prose. In turn, we come to judge machine intelligence by its humanness, orienting development offers towards writing prose

#This is free and unencumbered software released into the public domain.
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compiled
# binary, for any purpose, commercial or non-commercial, and by any
# means.
# In jurisdictions that recognize copyright laws, the author or authors
# of this software dedicate any and all copyright interest in the
# software to the public domain. We make this dedication for the benefit
require 'open-uri'
@book_array = ['A Year of Walking', 'Candy For Two', 'Walking and Running', 'The Frog Catchers Field Manual', 'Tomato in the Window', 'A Dozen Heros', 'Finding a New Sun', 'Stop Asking, Just Do', 'What Lives on Pluto', 'Fishing With Chips', 'No Lonely Stars', 'Free Parking', 'Next Day Previous Night', 'Burning Water', 'Slicker Than Rain', 'Future Discretions', 'Covered and Warm', 'The Odd Sister', 'Falling Flags', 'Keyboard For Hire', 'Ready, Set, Die', 'Same Way Through', 'The Zookeeper and Her Tiger']
def placeholder(slug)
slug = slug.gsub(/\s/,"+")
open "https://placeholdit.imgix.net/~text?txtsize=25&txt=#{slug}&w=700&h=400&txttrack=0"
end
18.times do
39 @import asset-url("plugins/jquery.fs.scroller/jquery.fs.scroller.css"); /* jquery.fs.scroller */
40 @import asset-url("plugins/jquery.fs.selecter/jquery.fs.selecter.css"); /* jquery.fs.scroller */
Error message:
Invalid CSS after "@import ": expected file to import (string or url()), was "asset-url("plug..."
At line 40
Matcher: #<Mutant::Matcher::Config match_expressions: [Game]>
Integration: Mutant::Integration::Rspec
Expect Coverage: 100.00%
Jobs: 4
Includes: ["lib"]
Requires: ["game"]
Subjects: 10
Mutations: 422
Results: 422
Kills: 319