This file contains 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
{ | |
"//ABOUT THIS FILE": "This is a configuration file for a repeating Twitter farewell message that uses cheapbotsdonequick.com. To set it up, I logged into CheapBotsDoneQuick with my Twitter account, pasted this configuration file into the box, and set the announcement for twice daily. The site will now auto-post in perpituity until one of the systems goes down or my account is banned from Twitter.", | |
"origin": [ | |
" I have left Twitter, due to the the dismantling of the platform's safety & security capacity.\n\n Find me on Mastodon, LinkedIn, or sign up for email updates: https://natematias.com/updates/ \n\n Thanks for #noun#, #people#. \n\nThis message repeats." | |
], | |
"noun": [ | |
"all the support and love", | |
"great conversations", | |
"all the inspiration", | |
"so many great discussions", |
This file contains 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
import sys,os,io | |
import simplejson as json | |
import zstandard as zstd | |
subreddit = "futurology" | |
infile = sys.argv[1] | |
outfile = sys.argv[2] | |
print("infile: {0}".format(infile)) |
This file contains 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
from PIL import Image | |
import sys | |
## Example via: https://stackoverflow.com/questions/28057722/algorithm-to-turn-a-large-blob-of-text-into-an-image-as-defined-by-the-image-e | |
def to_ascii(img,maxLen=250.0): | |
#resize to maximum line length | |
width, height = img.size | |
rate = maxLen / max(width, height) |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
all_users_info = [x._json for x in users_info] | |
f = codecs.open(FILENAME, mode="w", encoding="utf-8") | |
f.write(json.dumps(all_users_info, ensure_ascii=False)) | |
f.close() |
This file contains 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
SELECT wp_users.user_login, wp_users.user_nicename, wp_users.user_email | |
GROUP_CONCAT(CONCAT(meta_key, ": ", meta_value)), | |
FROM wp_users JOIN wp_usermeta ON wp_users.id = wp_usermeta.user_id | |
GROUP BY wp_users.user_login; |
This file contains 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
MSM: ("bbc.com", "reuters.com", "nytimes.com", "washingtonpost.com", "cnn.com", | |
"telegraph.co.uk", "latimes.com", "huffingtonpost.com", "theguardian.com", "forbes.com", | |
"examiner.com", "usatoday.com", "wsj.com", "cbsnews.com", "cbc.ca", "time.com", | |
"sfgate.com", "newsweek.com", "bostonglobe.com", "nydailynews.com", "msnbc.com", | |
"foxnews.com", "aljazeera.com", "nbcnews.com", "npr.org", "bloomberg.com", "abcnews.com", | |
"aljazeera.com", "bigstory.ap.com", "cbc.ca", "time.com") | |
TABLOIDS: ['dailymail.co.uk', 'express.co.uk','mirror.co.uk', | |
'news.com.au', 'nypost.com', 'thesun.co.uk','dailystar.co.uk','metro.co.uk'] |
This file contains 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
import nltk | |
import sys | |
sent_detector = nltk.data.load('tokenizers/punkt/english.pickle') | |
fulltext = open(sys.argv[1], "r").read() | |
for sentence in sent_detector.tokenize(fulltext.strip()): | |
if(len(sentence) <= 140): | |
print(sentence) |
This file contains 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
Faust, by now aged and blind all over again, gives orders for thousands of workers to be summoned to dig canals and drain the marshes. His brain, senile for the second time and-- or so the cynic Mephistopheles thinks -- crazed and clouded, is aglow with a grand idea: to make mankind happy. At a signal from Mephistopheles, hell's servants appear and start digging Faust's grave. Mephistopheles has lost all hope of winning his soul and simply wants to bury him, to be rid of him. Faust hears the sound of many shovels. "What is that?" he asks. The spirit of mockery has not deserted Mephistopheles. He paints Faust a false picture of the draining of the marshes. Soviet critics like to interpret this passage in the spirit of socialist optimism: As they would have it, Faust, feeling that he has benefited mankind, and finding in this his supreme joy, exclaims: "Stay, fleeting moment, thou art beautiful!" But we have to ask ourselves whether Goethe was not ridiculing the idea of human happiness. Because in reality nothi |
This file contains 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
Install | |
============= | |
Here's what you need to know to get a laptop to run HedyNet locally. The following notes were assembled on a Mac running OSX 10.7.5, Macports, and Python 2.7.1. It assumes you have figured out how to download a copy of HedyNet from github. | |
Requirements | |
----------------- | |
(see the requirements files in the requirements/ folder) | |
- Pip |
NewerOlder