Site Sponsors:
An SQLite Database For Wikiquotes 
Once we have any significant collection of data, the next natural thing to do is obvious ...

So here is a link to it!

Please note that:

(1) The database file is for sqlite3. It is ~50MB.
(2) Of the original 5,225, there are 4,544 populated topics ("pages").
(3) Of the original 153,621, there are 146,545 size-filtered citations ("quotes"). I estimate that as much as 80% of them are completely fatuous?
(4) Newlines embedded in quotes are encoded as "<br>".
(5) Single quotes are encoded as "&#39;".
(6) To eliminate duplications, the quotes.ID is a 'Pythonic:
zlib.crc32(bytes(quote, "utf8"), 0)
(6) The `pages` table obviously relates to the `quotes` table via the `quotes.ID`.

Also:
sqlite> .schema
CREATE TABLE pages (ID integer primary key not null, page text, quote_id integer);
CREATE TABLE quotes (ID integer primary key not null, quote text);
sqlite> select count(*) from pages;
153546
sqlite> select count(*) from quotes;
146545
sqlite> select count(*) from (select distinct page from pages);
4544
sqlite>

I share this database in the hopes that a genuine 'quotie will help the planet by selecting their favorite quotes from this locus ... and share them with others!

(... and you can bet your *blippy* that I will be doing the same!)


Sharing is caring,

--Randall




[ add comment ] ( 37 views )   |  permalink  |  related link
Collecting Wikiquote Data Using Python 
You've 'gotta love collecting quotes - not only might they teach us, but reviewing quotations revered by others helps us better understand what motivates today's majorities.

Like many others, I also love Python 3. Not only is Python 3 finally ready for prime-time, but - from gainful employment to games - Python's community is simply the most amazing set of programing enthusiasts in our modern world. -If you want to do something, chances are extremely good that someone has a package that can help you do things ALLOT quicker.

So it was with collecting Wikiquotes!

Quotes Matter


I have been collecting quotes since my college days. Indeed, from then to prior to to-date I have amassed a collection of around 100,000.

When it came time to snoop around Wikiquote therefore, how could any 'quotie worthy of the moniker NOT try to collect 'em all, as well?

So as I sat down to "learn something" on this traditional occidental day of rest, I decided to give the wikiquotes package a try.

After pip'ing it down, here is what I came up with:

import wikiquotes

alpha = "abcdefghijklmnopqrstuvwxyz1234567890"
major = 1
minor = 1
with open("./wikiquote_2017_10_22.txt", "w") as results:
for char in alpha:
try:
result = wikiquotes.search(char, "english")
zlist = list(result)
for author in zlist:
print(char, major, author)
quotes = wikiquotes.get_quotes(author, "english")
for quote in quotes:
if str(quote).find("proposed by") == 0:
continue
if str(quote).find("(UTC)") != -1:
continue
print("tbd", char, minor, major, author, quote, sep='|', file=results)
minor += 1
major += 1
except:
print("error", char, minor, major, "error", "no quotes", sep='|', file=results)

Using the above, we were able to download 17,068 things to review. The fact that we have an even set of 360 'authors' (10 per) clearly indicates that I did not get 'em all the first time 'round... but I eventually got the vast majority [5,225 topics? 153,621 quotes?] of them... (*)

Quality Comments


Overall, I should note that I was disappointed with the quality of the quotations. While there were some decent citations that I did not have, allot of the jibes seem to be far too fatuous; desperate attempts to garner cheap publicity for far too many unmemorable nouns. More than a few pages have absolutely no quotations on them at-all.

Yet - as mentioned previously - as we 'quoties seek to separate the gold from the gall, over time history has an annoying tendency to insure that only the strong, will survive.

Enjoy the journey!

--Randall

p.s. If you would like to get the results of today's diversion, we just uploaded them to the Mighty Maxims Project.

(*) In order to keep the server load reasonable for our Wikipedia friends, I will keep THAT bit of code on my own 'local ... still sorting thru them! :)

[ add comment ] ( 33 views )   |  permalink  |  related link
Linux: Fixing Cura Installation Mishaps 
If you are one of us who likes to install several things at a time using "sudo bash," then from time to time you might be tempted to run what you have installed as "root."



When upgrading to the most recent version of FreeCAD & Cura, I recently made such a mistake.

In as much as I was running as 'root' - and in as much as Cura decided on creating my ./usr/local files in my login-account's home folder, the problem was that I could not access the same when running under my default account.



When NOT running as 'root,' not only did I have to perpetually re-define my 3D printer defaults, but from time to time Cura itself would simply stop responding ("hang") whilst attempting to do so.

Ignoring the temptation to simply re-boot, I had no choice but to `ps -al`, then kill it.

ztwofixes...


Rather than removing & re-installing everything, the solution - obviously - was to simply change access to the Cura file set. For the uninitiated, we must note that changing permissions is merely a matter of using `chown` and `chgrp` on the above rooted-folder set.

Of course, one could also just blow it all away, then simply run Cura once again from your default account login:



--Sharing is caring!


-Randall

p.s: If you are looking for a PPA designed to allow us to use Cura under Ubuntu, then click here.



For a nice overview of how to install Cura on Ubuntu, you can click here.

Finally, in as much a links tend to come and go, here is my update to what the above link tells us to do:

sudo rm -rf ~/.config/cura/*
sudo rm -rf ~/.local/cura/*
rm -rf ~/.config/cura/*
rm -rf ~/.local/cura/*
sudo add-apt-repository ppa:thopiekar/cura
sudo apt-get update
sudo apt install cura cura-plugins-all cura-extra-plugins-all

Note: When using your own login, using the 'sudo' command (as shown above) will keep us from accidentally running Cura - or anything else - as 'root.'

[ add comment ] ( 46 views )   |  permalink  |  related link

<<First <Back | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | Next> Last>>