- foreign keys are capitalized:
- you must give
foreignKey
when using aliases, otherwise it fails subtely. That would be derived automatically. - stackoverflow.com/questions/41502699/return-flat-object-from-sequelize-with-association can't auto-flatten to reuse the database's
ORDER
limit
andoffset
don't work withoutsubQuery: false
when doing includes! It is just too buggy. Examples of this can be found e.g. under nodejs/sequelize/many_to_many_same_model.js.- stackoverflow.com/questions/34059081/how-do-i-reference-an-association-when-creating-a-row-in-sequelize-without-assum hard to not duplicate foreign keys values everywhere
- stack traces permanently broken or requiring non-obvious configs:
- does not automatically update fields on hooks: github.com/sequelize/sequelize/issues/8586#issuecomment-422877555
- cannot change columns when other columns have constraints due to the backup table?
- you have to use
.get()
forattribute
aliased fields, why? stackoverflow.com/questions/32649218/how-do-i-select-a-column-using-an-alias/69890944#69890944 .id
gets added toSELECT
no matter what, breakingGROUP BY
unless you do horrible workarounds:- no simple built-in mechanism for transaction retries: Sequelize transaction retries
- impossible to do subqueries in general. Docs just tell you to use literals. This in particular prevents single query deletes with join as done at nodejs/sequelize/raw/many_to_many.js:Also, you can't get query strings either: github.com/sequelize/sequelize/issues/2325
- sequelize.org/master/manual/sub-queries.html: the docs actually just tell you to use literals, lol
- stackoverflow.com/questions/45354001/nodejs-sequelize-delete-with-nested-select-query
- migrations. Generally speaking, anything but the simplest migrations are exceedingly hard to get right, as you have to go very low level when doing migrations. Syntax can be very different from regular DB operations.
- no way to do (non-raw) queries during migrations, e.g. to update fields based on other fields in a complex way?
- github.com/sequelize/cli/issues/862
- stackoverflow.com/questions/18742962/add-data-in-sequelize-migration-script
- stackoverflow.com/questions/38671483/sequelize-migration-update-model-after-updating-column-attributes
- stackoverflow.com/questions/38998397/can-i-use-sequelize-models-in-migration-scripts
- stackoverflow.com/questions/45286429/custom-query-on-sequelize-seeder
queryInterface.sequelize.models
contains onlySequelizeMeta
. Not sure why they have this limitation. - stackoverflow.com/questions/56043246/node-js-sequelize-no-primary-keys-when-migrating/56046101#56046101
- SQLite
changeColumn
migrations do on delete cascades of other tables. SQLite does not have change column statements, so they have to drop and recreate tables, but they don't temporarily remove cascades, so you lose data: stackoverflow.com/questions/62667269/sequelize-js-how-do-we-change-column-type-in-migration/70486686#70486686 - associations require full explicit index construction: stackoverflow.com/questions/39651853/how-to-create-join-table-with-foreign-keys-with-sequelize-or-sequelize-cli
- ability to iterate over a large result without blowing up memory and without using limit + offset (which is inneficient e.g. when looping over recursive queries). This is also known as cursor or streaming interfaces:E.g. the Python SQLite interface supports this just fine: stackoverflow.com/questions/29582736/python3-is-there-a-way-to-iterate-row-by-row-over-a-very-large-sqlite-table-wi
- stack overflow
- stackoverflow.com/questions/28787889/how-can-i-set-up-sequelize-js-to-stream-data-instead-of-a-promise-callback
- stackoverflow.com/questions/43964067/how-to-implement-cursor-pagination-using-sequelize
- stackoverflow.com/questions/57164242/perform-sequelize-findall-in-a-huge-array
- stackoverflow.com/questions/55191891/how-to-loop-through-result-in-sequelize generic loop
- issue tracker
- stack overflow
- empty
attributes: []
breaks some nested queries: github.com/sequelize/sequelize/issues/16436 - does not expose a iteration API that supports large arrays?E.g. Python SQLite does: stackoverflow.com/questions/29582736/python3-is-there-a-way-to-iterate-row-by-row-over-a-very-large-sqlite-table-wi
Our WIP script: wikipedia/import-categories.sh.
Related:
- opendata.stackexchange.com/questions/1533/download-wikipedia-articles-from-a-specific-category
- webapps.stackexchange.com/questions/16359/is-there-a-way-to-download-a-list-of-all-wikipedia-categories/172480#172480
- stackoverflow.com/questions/40119322/how-to-download-all-pages-inside-a-category-in-wikipedia
- category tree on Stack Overflow
- stackoverflow.com/questions/17432254/wikipedia-category-hierarchy-from-dumps/77313490#77313490 Canon but no good answers.
- stackoverflow.com/questions/12227134/how-to-fetch-category-tree-of-wiki
- stackoverflow.com/questions/21782410/finding-subcategories-of-a-wikipedia-category-using-category-and-categorylinks-t. Actually explains it: stackoverflow.com/questions/21782410/finding-subcategories-of-a-wikipedia-category-using-category-and-categorylinks-t/21798259#21798259
- stackoverflow.com/questions/27279649/how-to-build-wikipedia-category-hierarchy
- mdkzaman.com/knowledge-graph-from-wikipedia-category-hierarchy/
Consider:
Let's observe them in MySQL:outputs:
mysql enwiki -e "select page_id, page_namespace, page_title, page_is_redirect from page where page_namespace in (0, 14) and page_title in ('Computer_storage_devices', 'Computer_data_storage')"
+----------+----------------+--------------------------+------------------+
| page_id | page_namespace | page_title | page_is_redirect |
+----------+----------------+--------------------------+------------------+
| 5300 | 0 | Computer_data_storage | 0 |
| 42371130 | 0 | Computer_storage_devices | 1 |
| 711721 | 14 | Computer_data_storage | 0 |
| 895945 | 14 | Computer_storage_devices | 0 |
+----------+----------------+--------------------------+------------------+
mysql enwiki -e "select cl_from, cl_to from categorylinks where cl_from in (5300, 711721, 895945, 42371130)"
+----------+-----------------------------------------------------------------------+
| cl_from | cl_to |
+----------+-----------------------------------------------------------------------+
| 5300 | All_articles_containing_potentially_dated_statements |
| 5300 | Articles_containing_potentially_dated_statements_from_2009 |
| 5300 | Articles_containing_potentially_dated_statements_from_2011 |
| 5300 | Articles_with_GND_identifiers |
| 5300 | Articles_with_NKC_identifiers |
| 5300 | Articles_with_short_description |
| 5300 | Computer_architecture |
| 5300 | Computer_data_storage |
| 5300 | Short_description_matches_Wikidata |
| 5300 | Use_dmy_dates_from_June_2020 |
| 5300 | Wikipedia_articles_incorporating_text_from_the_Federal_Standard_1037C |
| 711721 | Computer_architecture |
| 711721 | Computer_data |
| 711721 | Computer_hardware_by_type |
| 711721 | Data_storage |
| 895945 | Computer_data_storage |
| 895945 | Computer_peripherals |
| 895945 | Recording_devices |
| 42371130 | Redirects_from_alternative_names |
+----------+-----------------------------------------------------------------------+
So we see that
cl_from
encodes the parent categories:- parent categories of categories:
- en.wikipedia.org/wiki/Category:Computer_data_storage, which has ID
711721
, has parent categories: "Computer hardware by type", "Computer data", "Data storage", "Computer architecture". This matches exactly on the database. These are all encoded on the source code of the page:{{DEFAULTSORT:Storage}} [[Category:Computer hardware by type]] [[Category:Computer data|Storage]] [[Category:Data storage|Computer]] [[Category:Computer architecture]]
- en.wikipedia.org/wiki/Category:Computer_storage_devices has parent categories: "Computer data storage", "Recording devices", "Computer peripherals". This matches exactly on the database.
- en.wikipedia.org/wiki/Category:Computer_data_storage, which has ID
- parent categories of pages:
- en.wikipedia.org/wiki/Computer_storage_devices whish is a redirect gets the magic category "Redirects_from_alternative_names", a humongous placeholder with many thousands of pages: en.wikipedia.org/wiki/Category:Redirects_from_alternative_names
- en.wikipedia.org/wiki/Computer_data_storage shows only two categories onthe web UI: "Computer data storage" and "Computer architecture". Both of these are present on the database and at the end of the source code:The others appear to be more magic. Two of them we can guess from the templates:
{{DEFAULTSORT:Computer Data Storage}} [[Category:Computer data storage| ]] [[Category:Computer architecture]]
are likely{{short description|Storage of digital data readable by computers}} {{Use dmy dates|date=June 2020}}
Use_dmy_dates_from_June_2020
andArticles_with_short_description
but the rest is more magic and not necessarily present in-source.
So to find all articls and categories under a given category title, say en.wikipedia.org/wiki/Category:Mathematics we can run:
mariadb enwiki -e "select cl_from, cl_to, page_namespace, page_title from categorylinks inner join page on page_namespace in (0, 14) and cl_from = page_id and cl_to = 'Mathematics'"
TODO: it would be cool to have something like bitcoinstrings.com but including the actual transactions:
Local methods:
- Bitcoin Inscription Indexer
- bitcoin.stackexchange.com/questions/30295/how-can-i-search-for-transaction-text-on-the-blockchain
- bitcoin.stackexchange.com/questions/22500/is-there-a-lightweight-blockchain-parser-library-server/101472#101472
- github.com/alecalve/python-bitcoin-blockchain-parser
- bitcoin.stackexchange.com/questions/84266/wondering-how-to-use-bitcoin-parser
- github.com/bitcoinprivacy/Bitcoin-Graph-Explorer stores the blockchain in a database, and should allow more intelligent querying.
Further bibliography:
- bitcoin.stackexchange.com/questions/799/can-i-download-the-whole-block-chain-from-somewhere
- bitcoin.stackexchange.com/questions/68925/how-can-data-be-accessed-searched-for-in-a-blockchain
- bitcoin.stackexchange.com/questions/55188/download-single-and-specific-block-for-study-purposes
- www.fiverr.com/usefulshine/embed-your-logo-or-brand-art-on-blockchain user usefulshine from India embeds ASCII art for you into the blockchain starting at 260 dollars! XD
Ciro Santilli had to see this in a few separate places, until he underestood: that little pictur emust be a thing! Examples:
- mojim watermarks: mojim.com/twy105509x7x2.htm
- some Japanese website: kotobank.jp/word/%E5%A4%A7%E7%96%91-556655
This is Ciro Santilli's ideal university system. It is a system that actually lives up to the name "Open University":
- no enrolment, no prerequisites. Exam as a service examination style, likely free to anyone who wants to take them, only to determine:
- who gets to use physical facilities, notably laboratories
- which students do you want to pick as apprentices/workers/PhDs
- no tuition fees: free gifted education
- school must offer free accommodation for students
- force teachers to publish their teaching material with an open license
- how to teach
Related:
- reallyopenuniversity.wordpress.com/what-is-the-rou/
Apparently Leeds based. Focused only on student fees seemingly, not how to solve it with tech/efficiency:
So far as of the early 2020's, the university that comes closest to some but not all of these principles is the University of the People. It's sad that it's such a crappy unknown thing, but it is what it is.
Once you have crated something awesome, you have to advertise it, otherwise no one will ever find it.
This means:
- Then ask them if they want to talk about anything.
- whenever someone asks as question on an online forum, answer it, and link to the section of your material that also answers that question.The material will answer many of their future questions.
Eventually, people will find you on the front page of Google searches, and then you will know that you've truly made something useful.
Text materials are generally superior to video because they:
Only produce video material if:
- it shows an experiment, physical technique, natural phenomena or location that is of interest. See also: Section "Videos of all key physics experiments"
- it gives fundamental geometric insight on the subject
- you are filming a human transmitting their passion about the subject, and the speaker is amazing, and does not speak for too long
Messaging software that force you to have a mobile phone Updated 2025-05-21 +Created 1970-01-01
Chat programs that don't have a proper web-only operation and force you to have a mobile phone, e.g. WhatsApp.
Heck, even Signal, which is supposed to be super secure and good for your privacy, forces you to disclose your freaking cell phone to all contacts! lifehacker.com/how-to-use-signal-without-revealing-your-private-phone-1818996580
They are evil because they produce closed source offline software used by millions: Microsoft Windows.
And also their monopolistic practices: United States v. Microsoft Corp.
So, as put in Video "Bill Gates vs Steve Jobs by Epic Rap Battles of History (2012)" by fake Steve Jobs to fake Bill Gates:
However, like all big tech companies with infinite money, they do end up doing some cool things in their research department, Microsoft Research, notably for Ciro Santilli being:
- Lean
- their quantum computing work. C is of course a bad idea, we don't need yet another domain-specific language, Python library based solutions like Qiskit are obviously the way to go
Conveyor belt 2D top down mining like Factorio, but with more emphasis on tower defense/real-time strategy, PvP looks a lot like StarCraft or Age of Empires.
As of pre alpha 135, the most annoying thing is that you can't easily start a campaign scenario from fresh, if you lose you have to start from wave 1 but with everything already half built as you left it. This gives you a huge advantage...
It is also annoying that you have to manually rebuild everything that was destroyed afer each attack, unless you have some unit that you can only unlock later on...
mindustry-unofficial.fandom.com/wiki/Future_Content#New_Google_Play_Listing suggests freemium features being considered, but they are mostly minor or plaform specific. There seems to be no server list by default however, making the Steam multiplayer freemium valuable.
www.youtube.com/watch?v=o5ThSECaAwA suggests code drop is used.
It is a bit annoying that you have to unlock the tech tree little by little in campaign, but it does serve as a reasonable introduction to the general order of development. Games with progression state are boring, except when there is permadeath. But custom play scenarios have everything unlocked immediately, much better.
It is very cool that you can copy chunks of buildings as macros, and save them for later.
The game runs very well it feels like.
Ciro can relate strongly to the level of passion depicted in this film: Section "Don't be a pussy". It almost feels like a business film in that a sense, where the startup is the authors career and passions.
How to use a single source multiple times in a Wikipedia article? Updated 2025-05-21 +Created 1970-01-01
en.wikipedia.org/wiki/Help:Footnotes#Footnotes:_using_a_source_more_than_once gives the following method:
Definition, anywhere on article, likely ideally as the first usage:
<ref name="myname">{{cite web ...}}</ref>
And then you can use it later on as:which automatically expands the exact same thing, or using the shortcut:
<ref name="myname" />
{{r|myname}}
To cite multiple pages of a book: en.wikipedia.org/wiki/Wikipedia:Citing_sources#Citing_multiple_pages_of_the_same_source, the best method is to define and use the reference without adding the Do not set the page in or for multiple pages:
p
or location
in cite
as:<ref name="googleStory">{{cite book |title=The Google Story}}</ref>{{rp|p=123}}
cite
, otherwise it shows up on the references. Instead we use the {{rp}}
template. And then use the reference with the {{r}}
template as:{{r|googleStory|p=456}}
{{r|googleStory|pp=123, 156-158}}
Ciro Santilli feels it is not for his generation though, and that is one of the philosophical things that saddens him the most in this world.
On the other hand, Ciro's playing with the Linux kernel and other complex software which no single human can every fully understand cheer him up a bit. But still, the high level view, that we can have...
For now, Ciro's 2D reinforcement learning games.
In the case of machine learning in particular, it is not part of the training data set.
Hyperparameters can also be considered in domains outside of machine learning however, e.g. the step size in partial differential equation solver is entirely independent from the problem itself and could be considered a hyperparamter. One difference from machine learning however is that step size hyperparameters in numerical analysis are clearly better if smaller at a higher computational cost. In machine learning however, there is often an optimum somewhere, beyond which overfitting becomes excessive.
Mitochondria have DNA because they need to be controlled individually Updated 2025-05-21 +Created 1970-01-01
Argued at Power, Sex, Suicide by Nick Lane (2006) page 212.
Basically, energy supply has to be modulated rather quickly, because we spend a lot sometimes, and very little other times.
Even not turning it off quickly enough is a problem, as it starts to generate free radicals which fuck you up.
If control came from the nucleus, it has no way to address different mitochondria. But it might be that only one of the mitochondria needs the change. If the nucleus tells all mitochondria to stop producing when only one is full, the others are going to say: "nope, I'm not full, continue producing!" and the one that need to stop will have its signal overridden by the others.
Wikipedia mentions "Since animal mtDNA evolves faster than nuclear genetic markers" with a few sources.
Some sources:
- Power, Sex, Suicide by Nick Lane (2006) page 361 mentions:so this property is also important for the human mitochondrial molecular clock.
While nuclear DNA can barely distinguish between chimps and humans, the mitochondrial clock ticks fast enough to reveal differences accumulating over tens of thousands of years
- www.ncbi.nlm.nih.gov/pmc/articles/PMC3350313 says it for metazoans
- www.quora.com/Why-does-mitochondrial-DNA-mutate-faster
There are unlisted articles, also show them or only show them.