#Nile
Terminology
Cloudnile, the cloud:
The website where authors hang out.
NILEPATH:
The directory that stores files downloaded from the cloud for offline use.
Author:
Any developer from beginner to expert.
Authors have XP levels.
App:
A bundle with a i.txt, a version history, and corresponding modules and resources mentioned in them.
Bundle:
Folders that include some modules and resources like databases, documentation, screenshots, etc.
Module:
.nile files, comprised of Nile code.
Terminology
Cloudnile, the cloud:
The website where authors hang out.
NILEPATH:
The directory that stores files downloaded from the cloud for offline use.
Author:
Any developer from beginner to expert.
Authors have XP levels.
App:
A bundle with a i.txt, a version history, and corresponding modules and resources mentioned in them.
Bundle:
Folders that include some modules and resources like databases, documentation, screenshots, etc.
Module:
.nile files, comprised of Nile code.
#Python
How to install a module
Normally, if a suitable module is already installed, attempting to install it again will have no effect. Upgrading existing modules must be requested explicitly:
How to install a module
python -m pip install SomePackageNormally, if a suitable module is already installed, attempting to install it again will have no effect. Upgrading existing modules must be requested explicitly:
python -m pip install --upgrade SomePackage#toRead
📚 Controlling the Keyboard and Mouse with GUI Automation
#Python
https://automatetheboringstuff.com/chapter18/
📚 Controlling the Keyboard and Mouse with GUI Automation
#Python
https://automatetheboringstuff.com/chapter18/
#Python
The Zen of Python
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
The Zen of Python
Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than *right* now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!
#Python
Syntax
Definition:
Conditional
⚠️ Use
Iteration:
Inside a function definition, use the following syntax to include the global variables in its scope:
Syntax
Definition:
def f(args):Conditional
if expression:⚠️ Use
== to check for equality, not is.Iteration:
for i in iterable:Inside a function definition, use the following syntax to include the global variables in its scope:
def f(args):
global names
stuff
#Python
How to send GET or POST requests
How to send GET or POST requests
import requests
r = requests.get(url)
r = requests.post(url, data=data)
r = r.json()
Exceptions
Events that occur during the execution of a program and disrupt the normal flow. An exception is an object that represents an error.
When raised, exceptions must be handled immediately, otherwise they would terminate the execution. If you have some suspicious code that may raise an exception, you can defend your program by placing it in a try block, followed by a except block which handles the problem as elegantly as possible.
The list of all #Python exceptions:
https://docs.python.org/3/library/exceptions.html
Events that occur during the execution of a program and disrupt the normal flow. An exception is an object that represents an error.
When raised, exceptions must be handled immediately, otherwise they would terminate the execution. If you have some suspicious code that may raise an exception, you can defend your program by placing it in a try block, followed by a except block which handles the problem as elegantly as possible.
try:
You do your operations here;
......................
except ExceptionI:
If there is ExceptionI, then execute this block.
except ExceptionII:
If there is ExceptionII, then execute this block.
......................
else:
If there is no exception then execute this block.
The list of all #Python exceptions:
https://docs.python.org/3/library/exceptions.html
“Desktop environment is something you normally don't think much about, once it's setup anyway, but finding an old screenshot while trying to clean up the drive can be oddly nostalgic.”
— #Daniil_Baturin
— #Daniil_Baturin
“A language that makes it hard to write elegant code makes it hard to write good code.”
— #Eric_Raymond, Why Python?
— #Eric_Raymond, Why Python?
“All OO languages show some tendency to suck programmers into the trap of excessive layering. Object frameworks and object browsers are not a substitute for good design or documentation, but they often get treated as one. Too many layers destroy transparency: It becomes too difficult to see down through them and mentally model what the code is actually doing. The Rules of Simplicity, Clarity, and Transparency get violated wholesale, and the result is code full of obscure bugs and continuing maintenance problems.”
— #Eric_Raymond, The Art of Unix Programming: Unix and Object-Oriented Languages
— #Eric_Raymond, The Art of Unix Programming: Unix and Object-Oriented Languages
“Computer science is a restless infant and its progress depends as much on shifts in point of view as on the orderly development of our current concepts.”
— #Alan_Perlis
— #Alan_Perlis
#Nile
Vision
An app should be able to start executing as it is being downloaded similar to how audio or video files are able to start streaming while being downloaded.
This is achievable by storing outer layers of GUI in the beginning of the app file.
Vision
An app should be able to start executing as it is being downloaded similar to how audio or video files are able to start streaming while being downloaded.
This is achievable by storing outer layers of GUI in the beginning of the app file.
“Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary.”
— R5RS, #Scheme
— R5RS, #Scheme
Compare Windows to a station wagon and Linux to a free tank. People still buy the station wagon despite free tanks being given away, because people do not want to learn how to operate a tank. Also they know that the station wagon dealership has a machine shop that they can take their car to when it breaks down. Because of this attitude, Microsoft is not really a monopoly, as evidenced by the free availability of other choice OSes, but rather has simply accrued enough mindshare among the people to have them coming back. Microsoft not unlike Disney, sells a vision to their customers, who in turn "want to believe" in that vision.
~ Neal Stephenson, In the Beginning... Was the Command Line
~ Neal Stephenson, In the Beginning... Was the Command Line
