Posts

Showing posts from November, 2023

When universities are theme parks

If you live within 15 minutes of a coffee shop, but the barista can’t afford to live within half an hour, then you don’t live in a city—you live in a theme park. - https://www.science.org/content/article/when-universities-are-theme-parks-postdocs-and-grad-students-suffer

svglue: Templating using inkscape and python

svglue is a small library that takes a template in form of a specially prepared SVG document and fills in text and images to create an output SVG file. The pip version did not work of the box and I ran into the same issue as pointed out here . Link to working tutorial  

Zotero to Tiddlywiki5

  Zotero is a great tool but it has been challenging to look up bib and notes taken in Zotero on Tiddlywiki. It is really inconvinient to have to always have to switch between these two apps. Therefore, I wrote this python script which takes the csv that you get from running Zotero's default csv translators and converts it into something that you can import to Tiddlywiki directly. Note that Tiddlywiki does not allow you to import arbitrary JSON files such as   {     'x': 10,     'y': 20 } as new tiddlers. Instead any JSON file that you import must have the following keys to be loaded as a new tiddler {     'text'        : '' ,     'tags'        : '' ,     'modified'    : '' ,     'created'     : '' ,     'title'       : '' } ...

Text Fragments

  This cool feature lets you link to specific sentences on any webpage. Read more here including multiple sentences. See also: Discussion on promnesia

Choose Your Weapon: Survival Strategies for Depressed AI Academics

  https://arxiv.org/abs/2304.06035 There are a lot of suggestions in this paper that I think are helpful In particular, “In-the-wild domains such as games, IoT , and autonomous vehicles could allow AI to be deployed next to their end user and the data the user generates, i.e. at the edge of the network. This is often called edge AI [8], the operation of AI applications in devices of the physical world is possible when memory requirements are low and inference occurs rapidly.” (Togelius and Yannakakis, 2023, p. 4) “Solve Problems Few Care About (For Now!)” (Togelius and Yannakakis, 2023, p. 5) “In academia, failure can be as instructive and valuable as success and the stakes are overall lower. Many important inventions and ideas in AI come from trying the “wrong” thing. In particular, all of deep learning stems from researchers stubbornly working on neural networks even though there were good theoretical reasons why they shouldn’t work.” (Togelius and Yannakakis, 2023, p. ...

Richard Feynman’s Letter on What Problems to Solve

  No problem is too small or too trivial if we can really do something about it. -- https://fs.blog/richard-feynman-what-problems-to-solve/

globals() and creating 100 global variables at once

Ran into this scenario where I had to make 100 global variables programmatically. For example, x0 = 0, x1 =1, x2= 2 and so on till x100 = 100. One way to do this in python using `globals()`   Example : >>> globals()['x0'] = 0 >>> x0 0 And then loop through a list to make the rest of the variables.

gnuplot: Tips and tricks

  Presented in UCDavis Physics and Astronomy code review on March 17, 2023. check out the post here

Python decorator: Example 1

 def add_header_footer(func):     def foo1():                  print("header")         func()         print("footer")     return(foo1) @add_header_footer def foo():     print("plotting code")      >>> foo() header plotting code footer

Socioeconomic roots of academic faculty

  Combining national-level data on education, income and university rankings with a 2017–2020 survey of 7,204 US-based tenure-track faculty across eight disciplines in STEM, social science and the humanities, we show that faculty are up to 25 times more likely to have a parent with a Ph.D. this rate nearly doubles at prestigious universities and is stable across the past 50 years – https://www.nature.com/articles/s41562-022-01425-4

Data visualization using grammar of graphics and plotnine

 (Presented in code review on November 12,2021) Link to notebook

Setting default applications in Ubuntu

  This post covers how to set default applications in Ubuntu from the command line using the mimeopen script. Example : Open .fits files always on ds9 ds9 is a program (stored in /home/bin/ds9) that allows astronomers to explore data (.fits files) taken at the telescope. Here's what I did to set that as the default application for opening any .fits file: ubuntu@ubuntu:~/$ mimeopen -d 22_23.fits Please choose a default application for files of type image/fits     1) home  (home-usercreated-1)     2) Siril  (org.free-astro.siril)     3) Munipack  (xmunipack)     4) Atom  (atom)     5) Other... use application #5 use command: /home/bin/ds9 Opening "22_23.fits"   (image/fits) References https://unix.stackexchange.com/questions/293433/where-mimeopen-saves-default-app-config https://askubuntu.com/questions/90214/how-do-i-set-the-default-program https://linux.die.net/man/1/mimeope...

Dotted lines on blackboard with chalk | 1000 fps

Image
Discussion on reddit

Communicating and downloading data from the James Webb Space Telescope

We use the DSN ([Deep Space Network](https://www.jpl.nasa.gov/missions/dsn)) to communicate with the observatory. We receive data when we have a contact with Webb using a DSN antenna The DSN has three sites around the world, each positioned 120 degrees apart. There are antennas in Goldstone, California; Canberra, Australia; and Madrid, Spain. This allows us to communicate with Webb at any time of day Each of the [DSN complexes](https://www.nasa.gov/directorates/heo/scan/services/networks/deep_space_network/complexes) has different types of antennas, including 70-meter (230-foot in diameter), 34-meter (111-foot in diameter), and 26-meter (85-foot in diameter) antennas. The DSN complexes use the 34-meter antennas to talk with Webb with the 70-meter antennas as a backup. The DSN supports different radio frequency allocations, such as the S-band and Ka-band frequencies that Webb uses. -band has a lower bandwidth, and we use that to send commands to the spacecraft (e.g., start recorder play...

matplotlib's add_axes and windows lagscreen

Image
 Here's how to make a windows lagscreen like effect using matplotlib on python. We are beyond asking why would anyone need this at this point. plt.figure() ax1 = plt.gcf().add_axes([0,0,0.5,0.5]) ax1.scatter([1,2,3],[3,4,5]) ax2 = plt.gcf().add_axes([0.6,0,0.5,0.5]) ax2.scatter([1,2,3],[3,4,5]) ax3 = plt.gcf().add_axes([0.35,-0.4,0.5,0.5]) ax3.scatter([1,2,3],[3,4,5]) plt.figure() x = np.arange(0,1,0.05) y = -x-1 for i in range(len(x)):     ax1 = plt.gcf().add_axes([x[i],y[i],0.5,0.5])     ax1.scatter(0,0) plt.figure() x = np.arange(0,1,0.05)*np.pi*2 y = np.sin(x) for i in range(len(x)):     ax1 = plt.gcf().add_axes([x[i],y[i],0.5,0.5])     ax1.scatter(0,0)

chatGPT and research

The following blog post is inspired by this article : How ChatGPT is transforming the postdoc experience    Grumpy old man yelling at the clouds here: do not forget that, although boring and unrewarding, tasks such as writing an abstract, writing a review, studying a methods section, or summarizing the main ideas in a scientific text, are important competences in their own rights. Be sure to master them before trying to delegate them to ChatGPT. - https://academia.stackexchange.com/questions/203016/is-it-unethical-to-use-chatgpt-to-create-abstracts   Technology is usually supposed to make things easy. But the research shows that real learning requires things to be a little bit hard. - Vox ( AI can do your homework. Now what? )    

Devaluation of information in a consumer lifestyle society

Equipped with the wealth of information that is made available with every stride in technology, it becomes easier to play the role of a consumer rather than a producer. Particularly, one of the consequences of consuming excessive knowledge in a limited time is a //Devaluation of information. YouTube-shorts or TikTok for example, give you an infinite set of videos to consume. And regardless of how informative they are, it is increasingly easy to ingest more information than you can appreciate. This is concerning.  Blindly consuming content on the internet without proactively engaging with it might turn us into humans desensitized to new information. Make us value knowledge less than we should. And I think, this is a step in the wrong direction.

S curve growth of technology

Jason in this blog post , talks about a "natural S curve" for analyzing progress and quotes: Every technology, defined narrowly enough, goes through an S-curve: it starts out small, picks up steam, hits a hockey-stick inflection point, grows exponentially—and then starts to near saturation, slows down, levels off, plateaus. And regarding how breakthroughs open the flood gates to new invention, he says : ... But when some breakthrough insight creates an entirely new field, it opens an entire new orchard of low-hanging fruit to pick. I think this is an interesting way to think about progress and would be great to quantify this more rigorously.