Suramya's Blog : Welcome to my crazy life…

January 29, 2022

Getting random values from the quantum fluctuations of vacuum using an API

Filed under: Computer Security,Interesting Sites,Tech Related — Suramya @ 10:35 PM

Generating truly random numbers programmatically is something that sounds like it should be simple to do but is in fact quite hard. Most algorithms that generate numbers are in fact pseudo-random numbers, which means that they look random but can be predicted at times. So the ability to generate/get truly random numbers is a big deal. Cloudflare uses a wall to wall setup of Lava Lamps to generate random numbers that are used to encrypt the traffic on their servers. Other organizations have other methods where they measure the atmospheric radiation, sound etc etc.

The ANU QRNG website managed by Australian National University offers true random numbers to anyone on the internet. The random numbers are generated in real-time in the lab by measuring the quantum fluctuations of the vacuum.

They have API access enabled for accessing the numbers and users can download blocks of random numbers as well as a .zip file which is updated periodically.

The vacuum is described very differently in the quantum physics and classical physics. In classical physics, a vacuum is considered as a space that is empty of matter or photons. Quantum physics however says that that same space resembles a sea of virtual particles appearing and disappearing all the time. This is because the vacuum still possesses a zero-point energy. Consequently, the electromagnetic field of the vacuum exhibits random fluctuations in phase and amplitude at all frequencies. By carefully measuring these fluctuations, we are able to generate ultra-high bandwidth random numbers.

This website allows everybody to see, listen or download our quantum random numbers, assess in real time the quality of the numbers generated and learn more about the physics behind it. The technical details on how the random numbers are generated can be found in Appl. Phys. Lett. 98, 231103 (2011) and Phys. Rev. Applied 3, 054004 (2015).

I think this is a cool application and a lot of reputable sites/users are using this for their setup so it seems like a reputable source of random numbers. I would still take these numbers and then use that as the seed in a pseudo-random generator and use that result in your application instead of using the number directly.

– Suramya

June 12, 2021

Linus educates anti-vaxxer on Linux Kernel Mailing list

Filed under: Interesting Sites,My Thoughts,Tech Related — Suramya @ 4:36 AM

There have been times in the past when Linus’s posts on the Linux Kernel mailing list have been less than polite and he was in fact asked to stop abusing colleagues on mailing lists. He then took a break from maintaining the kernel and took empathy training. Since then his responses have been pretty restrained and polite (for the most part). However, a few days ago someone named “Enrico Weigelt” posted a typical anti-vaxxer message on the Linux Kernel Mailing list:

> And I know *a lot* of people who will never take part in this generic
> human experiment that basically creates a new humanoid race (people
> who generate and exhaust the toxic spike proteine, whose gene sequence
> doesn’t look quote natural). I’m one of them, as my whole family.

This was in response to folks asking if the rising number of vaccinated people meant that the “Maintainers / Kernel Summit 2021″ would be an in-person event or if it would remain a virtual one for now. Linus responded to his message with his customary wit and technical response (though not as ‘colorful’ as his past responses).

I love that he started off his response with a blunt statement:

Please keep your insane and technically incorrect anti-vax comments to yourself.

You don’t know what you are talking about, you don’t know what mRNA
is, and you’re spreading idiotic lies. Maybe you do so unwittingly,
because of bad education. Maybe you do so because you’ve talked to
“experts” or watched youtube videos by charlatans that don’t know what
they are talking about.

Then he went on to explain what mRNA does and how it doesn’t stay in your body for more than a couple of days. You can read the full response below. I am posting a copy here so that I can refer people who send me anti-vaxx nonsense to it. Vaccines save lives. That is a fact. The study that links vaccines to autism has been debunked so many times that it is not even funny. But still there are people who fall for the trap. The problem is that the science is complicated enough that people don’t understand it and the denialist’s use simple language that is easy to understand (even though it is wrong). This makes it easy for people to think they understand the science behind it and become rabid anti-vaxxers.

Dealing with conspiracy theorists is difficult and I usually end up ignoring them or yelling at them. The lovely @OkieSpaceQueen has a great thread on talking to conspiracy theorists that I found very useful, along with their earlier thread focusing on how to talk to Flat Earther’s. They are a lot more patient than what I usually am and I am going to try to use the techniques in the thread going forward.

All that being said, I just want to close with a request to get vaccinated as quickly as possible. It can and does save lives.

On Thu, Jun 10, 2021 at 11:08 AM Enrico Weigelt, metux IT consult
wrote:
>
> And I know *a lot* of people who will never take part in this generic
> human experiment that basically creates a new humanoid race (people
> who generate and exhaust the toxic spike proteine, whose gene sequence
> doesn’t look quote natural). I’m one of them, as my whole family.

Please keep your insane and technically incorrect anti-vax comments to yourself.

You don’t know what you are talking about, you don’t know what mRNA
is, and you’re spreading idiotic lies. Maybe you do so unwittingly,
because of bad education. Maybe you do so because you’ve talked to
“experts” or watched youtube videos by charlatans that don’t know what
they are talking about.

But dammit, regardless of where you have gotten your mis-information
from, any Linux kernel discussion list isn’t going to have your
idiotic drivel pass uncontested from me.

Vaccines have saved the lives of literally tens of millions of people.

Just for your edification in case you are actually willing to be
educated: mRNA doesn’t change your genetic sequence in any way. It is
the exact same intermediate – and temporary – kind of material that
your cells generate internally all the time as part of your normal
cell processes, and all that the mRNA vaccines do is to add a dose
their own specialized sequence that then makes your normal cell
machinery generate that spike protein so that your body learns how to
recognize it.

The half-life of mRNA is a few hours. Any injected mRNA will be all
gone from your body in a day or two. It doesn’t change anything
long-term, except for that natural “your body now knows how to
recognize and fight off a new foreign protein” (which then tends to
fade over time too, but lasts a lot longer than a few days). And yes,
while your body learns to fight off that foreign material, you may
feel like shit for a while. That’s normal, and it’s your natural
response to your cells spending resources on learning how to deal with
the new threat.

And of the vaccines, the mRNA ones are the most modern, and the most
targeted – exactly because they do *not* need to have any of the other
genetic material that you traditionally have in a vaccine (ie no need
for basically the whole – if weakened – bacterial or virus genetic
material). So the mRNA vaccines actually have *less* of that foreign
material in them than traditional vaccines do. And a *lot* less than
the very real and actual COVID-19 virus that is spreading in your
neighborhood.

Honestly, anybody who has told you differently, and who has told you
that it changes your genetic material, is simply uneducated. You need
to stop believing the anti-vax lies, and you need to start protecting
your family and the people around you. Get vaccinated.

I think you are in Germany, and COVID-19 numbers are going down. It’s
spreading a lot less these days, largely because people around you
have started getting the vaccine – about half having gotten their
first dose around you, and about a quarter being fully vaccinated. If
you and your family are more protected these days, it’s because of all
those other people who made the right choice, but it’s worth noting
that as you see the disease numbers go down in your neighborhood,
those diminishing numbers are going to predominantly be about people
like you and your family.

So don’t feel all warm and fuzzy about the fact that covid cases have
dropped a lot around you. Yes, all those vaccinated people around you
will protect you too, but if there is another wave, possibly due to a
more transmissible version – you and your family will be at _much_
higher risk than those vaccinated people because of your ignorance and
mis-information.

Get vaccinated. Stop believing the anti-vax lies.

And if you insist on believing in the crazy conspiracy theories, at
least SHUT THE HELL UP about it on Linux kernel discussion lists.

Linus

Original thread Linus’s response on Linux Kernel mailing list to Anti-vaxxer message

– Suramya

May 2, 2021

Infinite Nature: Creating Perpetual Views of Natural Scenes from a Single Image

Filed under: Emerging Tech,Interesting Sites,My Thoughts — Suramya @ 11:28 PM

Found this over at Hacker News , where researchers have created technologies that use existing video’s and images and extrapolate them into an infinite scrolling natural view that is very relaxing to watch and at times looks very tripy. The changes are slow so you don’t see how the image is changing but if you wait for a 20 seconds and compare that image with the first one you will see how it differs.

We introduce the problem of perpetual view generation—long-range generation of novel views corresponding to an arbitrarily long camera trajectory given a single image. This is a challenging problem that goes far beyond the capabilities of current view synthesis methods, which work for a limited range of viewpoints and quickly degenerate when presented with a large camera motion. Methods designed for video generation also have limited ability to produce long video sequences and are often agnostic to scene geometry. We take a hybrid approach that integrates both geometry and image synthesis in an iterative render, refine, and repeat framework, allowing for long-range generation that cover large distances after hundreds of frames. Our approach can be trained from a set of monocular video sequences without any manual annotation. We propose a dataset of aerial footage of natural coastal scenes, and compare our method with recent view synthesis and conditional video generation baselines, showing that it can generate plausible scenes for much longer time horizons over large camera trajectories compared to existing methods.

The full paper is available here Infinite Nature: Perpetual View Generation of Natural Scenes from a Single Image with a few sample generated videos. One of the examples is below:

This is a very impressive technology. I can see a lot of uses for it in video games to generate real estate for flight simulators to fly over or fight over. It can be used for VR world developments or just to relax people. It might also be possible to take footage from TV shows and extrapolate them to allow folks to explore it in VR. (After a lot more research is done on this as the tech is still experimental). We could also simulate alien worlds using pics taken by our probes to train astronauts and settlers realistically instead of relying on fake windows and isolated area’s.

Check the site out for more such videos. Looking forward to future technologies built up over this.

– Suramya

April 29, 2021

Using Photo Ninja to shield users’ photos from reverse image searches and facial recognition AI

Filed under: Interesting Sites,My Thoughts — Suramya @ 1:15 AM

Last year I had posted about the Fawkes project that allowed users to modify their photos to avoid them from being used to power facial recognition and image recognition technologies. But the problem with these technologies is that it requires you to setup a server/run it on your machine which is hard for regular folks to do and that reduces the usage of the tool, even though it is very useful.

Now, a company called DoNotPay is launching a new service called Photo Ninja that allows you to upload a photo you want to shield and the software adds a layer of pixel-level changes that are barely noticeable to humans, but dramatically alter the image in the eyes of roving machines making it harder for someone to perform a reverse search on and to use for training AI models.

This is a great start and makes it really easy for people to use the service which costs $36 a year.

“Photo Ninja uses a novel series of steganography, detection perturbation, visible overlay, and several other AI-based enhancement processes to shield your images from reverse image searches without compromising the look of your photo,” says the company.

AI systems are trained to analyze pictures by looking at the pixel-level data, and adversarial examples can trick them by changing the pixel colors in a subtle enough way that the human eye doesn’t notice anything different but a computer fails to categorize the image as it usually would or interprets it as a wholly different image.

Anti-creep software — There are various reasons why you might want to use Photo Ninja. Before joining a dating service like Bumble, you could run your pictures through Photo Ninja so that weirdos can’t upload them to Google’s reverse image search and find your social media profiles without getting your consent, for instance.

I wonder if there is a demand for a similar service that could be powered with Fawkes and be provided for free to all users. I am thinking about setting something up like a Bot or a site that does this for free. I think there is a market for it and it would be a great side project for me to work on during this lockdown.

What do you think?

– Suramya

March 28, 2021

Louvre’s entire collection is now available online

Filed under: Interesting Sites — Suramya @ 12:24 AM

This is very cool, Louvre has made it’s entire collection of over 480,000 works available online for free. You can check it out here. It still doesn’t beat going there physically because that is a whole other experience, but it gives folks who can’t visit in person a chance to view the collection in hi-res images.

It is great that more and more museums and collectors are making their archives available online for free.

– Suramya

March 27, 2021

Outrun: Run a local command on a remote server

A lot of times we have to run a command that requires a lot of processing power and is extremely slow on your local computer. I have faced this issue in the past and at times wished there was a way to push these commands to a remote machine with a more powerful CPU to run the command. Now, thanks to the efforts of Alexander Overvoorde (Overv), Jakub Wilk and Xiretza this is now possible. They have created a tool called Outrun which lets you execute a local command using the processing power of another Linux machine without having to install the command on the remote machine.


Sample Execution of ffmpeg on a remote server

The software does have a few limitations, but on the whole it is very cool:

  • We need to have root access on the remote server (or sudo access) as the system needs to run chroot on the remote server
  • Both client and remote server need to be on the same architecture, so you can’t set up a session from an x86 machine to an ARM machine. Which is unfortunate because the first usecase I had for this tool was to run software from the RaspberryPI on my server as and when it needed more processing power.
  • File system performance remains a bottleneck

Check it out if you need to run commands with more CPU cycles than what is available on the local machine.

Thanks to Hacker News for the initial link.

– Suramya

October 13, 2020

It is now possible to generate clean hydrogen by Microwaving plastic waste

Filed under: Emerging Tech,Interesting Sites,My Thoughts — Suramya @ 2:33 PM

Plastic is a modern hazard and Plastic Pollution has a massive environmental impact. As of 2018, 380 million tonnes of plastic is being produced worldwide each year (source: Wikipedia). Since we all knew that plastic was bad a lot of effort was put in to get people to recycle plastics and single use plastics have been banned in a lot of places (In India they are banned as of 2019). However as per the recent report by NPR, recycling doesn’t keep plastic out of landfills as it is not economically viable at a large scale. It is simply cheaper to just bury the plastic than to clean it and recycle. Apparently this has been known for years now but the Big Oil companies kept it quite to protect their cash cow. So the hunt of what to do with the plastic continues and thanks to recent breakthroughs there just might be light at the end of this tunnel.

Apparently plastic has a high density of Hydrogen in it (something that I wasn’t aware of) and it is possible to extract this hydrogen to use as fuel for a greener future. The existing methods involve heating the plastic to ~750°C to decompose it into syngas (mixture of hydrogen and carbon monoxide) which are then separated in a second step. Unfortunately this process is energy intensive and difficult to make commercially viable.

Peter Edwards and his team at the University of Oxford decided to tackle this problem and found that if you broke the plastic into small pieces with a kitchen blender and mixed it with a catalyst of iron oxide and aluminium oxide, then microwaved it at 1000 watts then almost 97 percent of the gas in the plastic was released within seconds. To cherry on top is that the material left over after the process completed was almost exclusively carbon nanotubes which can be used in other projects and have vast applications.

The ubiquitous challenge of plastic waste has led to the modern descriptor plastisphere to represent the human-made plastic environment and ecosystem. Here we report a straightforward rapid method for the catalytic deconstruction of various plastic feedstocks into hydrogen and high-value carbons. We use microwaves together with abundant and inexpensive iron-based catalysts as microwave susceptors to initiate the catalytic deconstruction process. The one-step process typically takes 30–90 s to transform a sample of mechanically pulverized commercial plastic into hydrogen and (predominantly) multiwalled carbon nanotubes. A high hydrogen yield of 55.6 mmol g−1plastic is achieved, with over 97% of the theoretical mass of hydrogen being extracted from the deconstructed plastic. The approach is demonstrated on widely used, real-world plastic waste. This proof-of-concept advance highlights the potential of plastic waste itself as a valuable energy feedstock for the production of hydrogen and high-value carbon materials.

Their research was published in Nature Catalysis, DOI: 10.1038/s41929-020-00518-5 yesterday and is still in the early stages. But if this holds up at larger scale testing then it will allow us to significantly reduce the plastic waste that ends up in landfills and at the bottom of the ocean.

Source: New Scientist: Microwaving plastic waste can generate clean hydrogen

– Suramya

September 24, 2020

Can you spot a troll/bot account?

Filed under: Interesting Sites — Suramya @ 10:29 AM

Nowadays we have programmatic bots being used to spread misinformation & distrust on Social Media, in addition to the Troll’s who are just doing it for the lulz. A troll is a person who starts flame wars or intentionally upsets people on the Internet by posting inflammatory messages in an online community with the intent of provoking readers into displaying emotional responses for the troll’s amusement or a specific gain.

Can you identify these inauthentic accounts? Most people will say yes to the question but in reality it is hard to identify these accounts especially if they are run my competent people. spotthetroll.org is an online game that tests your ability to identify such accounts along with advice on what to look for when consuming Social Media. Its a great quiz and I found it to be quite fun, especially the section on what to look for when viewing social media to spot trolls/bots was very useful.

Each of the following 8 profiles include a brief selection of posts from a single social media account. You decide if each is an authentic account or a professional troll. After each profile, you’ll review the signs that can help you determine if it’s a troll or not.

I got a 5 out of 8. What’s your score?

– Suramya

September 21, 2020

Diffblue’s Cover is an AI powered software that can write full Unit Tests for you

Writing Unit Test cases for your software is one of the most boring parts of Software Development even though having accurate tests allows us to develop code faster & with more confidence. Having a full test suite allows a developer to ensure that the changes they have made didn’t break other parts of the project that were working fine earlier. This make Unit tests an essential part of CI/CD (Continuous Integration and Continuous Delivery) pipelines. It is therefore hard to do frequent releases without rigorous unit testing. For example SQLite database engine has 640 times as much testing code as code in the engine itself:

As of version 3.33.0 (2020-08-14), the SQLite library consists of approximately 143.4 KSLOC of C code. (KSLOC means thousands of “Source Lines Of Code” or, in other words, lines of code excluding blank lines and comments.) By comparison, the project has 640 times as much test code and test scripts – 91911.0 KSLOC.

Unfortunately, since the tests are boring and don’t give immediate tangible results they are the first casualties when a team is under a time crunch for delivery. This is where Diffblue’s Cover comes into play. Diffblue was spun out of the University of Oxford following their research into how to use AI to write tests automatically. Cover uses AI to write a complete Unit Test including logic that reflects the behavior of the program as compared to the other existing tools that generate Unit Tests based on Templates and depend on the user to provide the logic for the test.

Cover has now been released as a free Community Edition for people to see what the tool can do and try it out themselves. You can download the software from here, and the full datasheet on the software is available here.


Using Cover IntelliJ plug-in to write tests

The software is not foolproof as in it doesn’t identify bugs in the source code. It assumes that the code is working correctly when the tests are added in, so if there is incorrect logic in the code it won’t be able to help you. On the other hand if the original logic was correct then it will let you know if the changes made break any of the existing functionality.

Lodge acknowledged the problem, telling us: “The code might have bugs in it to begin with, and we can’t tell if the current logic that you have in the code is correct or not, because we don’t know what the intent is of the programmer, and there’s no good way today of being able to express intent in a way that a machine could understand.

“That is generally not the problem that most of our customers have. Most of our customers have very few unit tests, and what they typically do is have a set of tests that run functional end-to-end tests that run at the end of the process.”

Lodge’s argument is that if you start with a working application, then let Cover write tests, you have a code base that becomes amenable to high velocity delivery. “Our customers don’t have any unit tests at all, or they have maybe 5 to 10 per cent coverage. Their issue is not that they can’t test their software: they can. They can run end-to-end tests that run right before they cut a release. What they don’t have are unit tests that enable them to run a CI/CD pipeline and be able to ship software every day, so typically our customers are people who can ship software twice a year.”

The software is currently only compatible with Java & IntelliJ but work is ongoing to incorporate other coding languages & IDEs.

Thanks to Theregister.com for the link to the initial story.

– Suramya

September 19, 2020

How to Toonify yourself

Filed under: Interesting Sites,My Thoughts — Suramya @ 10:57 AM

While surfing the web I came across ‘Toonify Yourself!‘ that allows you to upload a photo and see what you’d look like in an animated movie. It uses deep learning and is based on distillation of a blended StyleGAN models into a pix2pixHD image to image translation network.

It sounded interesting, so I tried it out with one of my pictures and got the following results:


Original image

Toonified Image

I quite like the result and am thinking of using it as my avatar going forward. What do you think?
Thanks to Hacker News for the link

– Suramya

« Newer PostsOlder Posts »

Powered by WordPress