Saturday 19 December 2020

PC hacks

For people who find the sound only in left earphone irritating, you can try the following- On Android, go to setting, accessibility, mono audio. Exact path may vary depending on Android version, but it is there in recent ones. On ipados 13, go to setting, accessibility, audio/visual, mono audio


Ubuntu on windows

sudo apt-get install gcc //To update ubuntu

GNU plot on windows

p 'plot.txt' using 1:2 //to get a 2d plot from text file in which first column is used as 1st axis and 2nd column 2nd.
splot 'plot.txt' using 1:2:3 //surface plot with x, y , z data. gnuplot> set hidden3d //To get nice surface plot without points but actual surface. gnuplot> set dgrid3d 50,50 qnorm 2 gnuplot> splot 'data_file' with lines

Generate pdf thumbnail

Install genuine adobe acrobat reader. Go to edit, preferences, general, thumbnail. Also, go to control panel, set 'view by' on upper right side to large icons, find file explorer options, go to view, then set show thumbnail, and not icon. apply. If the files don't load, open acrobat, open file, go to pdf files and do large icon view. Thumbnails will generate. IF THE THUMBNAILS ARE WRONG, CLEAR CACHE. Search for disk cleanup, choose c drive, and clean only the thumbnail caches.

Download youtube videos

(but only when your life depends upon it. Downloading youtube videos is unethical, and this blog does not endorse it)

Use: youtube-dl

Download youtube-dl from github.
in cmd line, go to the youtube-dl directory. ALWAYS go to this folder to execute programs. type youtube-dl then give a space, and paste the link. youtube-dl -U for update To use options for download, just leave a space after youtube-dl and type the code for the option, then leave a space, and then paste the link. press shift enter.

Speed up a youtube video by an amount larger than 2x.

press ctrl + shift +j paste following command, with x replaced with teh speed you want. press enter document.getElementsByTagName("video")[0].playbackRate = x press ctrl + shift +j

Most economical export method from goodnotes

is flatened, with background. Handwriting recognision makes no difference.
If you make it editable, for pure notes, the file size becomes 10 times! Using blank background actually increases the file size.


gmail mail bulk delete code.

Your Gmail occupies space. If you want to free up space in bulk, search the following on gmail.

has:attachment larger:10mb

OR

Size:5m

Saturday 15 August 2020

Summary: 'What is Life' by Schrodinger

Ch1: The classical Physicist's Approach to the subject

Why are organisms so large as compared to atoms?

Because of emergence of laws from the background heat as a result of large number of atoms. For example, motion of  each molecule in a gas is random, but diffusion emerges as an approximate law due to the principle of large numbers. Author points out that even if we know the number density of a gas, given a volume that should have N molecules, the actual number fluctuates by an amount $\sqrt{N}$.

Author suggests that all that we know about physics is approximate in this sense, as the pattern emerges out of large number of atoms that we have access to.

Author notes how because of the background heat, if life was susceptible to influence from individual atomic interactions, we would not be capable of organised thought.

Thursday 21 May 2020

Solution to the game 'Among us'

Solution to the game 'Among us'


Today I played a very interesting murder mystery game on android called Among us.

Suppose you are stuck in a house, probably due to storm, with some people you know. Suddenly, all of you realize that there is a murderer among you, bent on killing everyone. You discover one murder, and then two... Everyone starts suspecting everyone else. Nobody can be trusted. What will you do?

There have been many movies and novels on this plot. 'Murder on the Orient Express' and 'And then there were none' are some works that I can recall of Agatha Christie on these lines. 'Johnny Gaddaar is a Bollywood movie on similar plot.

Among us lets you live through such a situation.

There are more than 4 players (typically 10) on a spaceship. They realize that there is an impostor among them, bent on killing everyone. The crew needs to successfully perform some tasks on the ship in order to win the game. On discovery of a dead colleague or gaining new clues, the crew can also call for an emergency meeting and vote to determine an impostor and kick him out of the ship, hence killing him. It is after the suspect is killed that it is disclosed whether he was actually the impostor or not. If they successfully kill the impostor, they win. If not, the game continues and their numbers dwindle. If the impostor manages to kill the second last of the crew, he wins.

If the impostor and the crew play a perfect game, can one force its victory on the other? Yes. Spoilers alert. You are about to learn the solution.

The crew can always defeat the impostor. All they need to do is split in groups of two and keep an eye on their partner while performing the tasks. If the impostor kills his partner, the rest of the crew will kick him out of the ship.

The developers of the game need to change the rules of the game to prevent this loophole.