Search This Blog

Monday, March 28, 2022

How Badly Will the World's Energy Supplies Be Affected by the Ukraine War?

It has been told many times by some that the World will be in trouble if they continued to oppose Russia in trying to take over Ukraine.   The Russian leaders have been quoted to say that Russia was only trying to solve a "domestic problem" in Ukraine.  Putin even called this  Ukraine military action a "special military exercise."  

Voices are heard everywhere, threatening those "unfriendly nations" who recently sanctioned Russia that they will get the worse when Putin asked them to pay their natural gas bill in "Roubles" instead of the Euros or US dollars.  

It is not the intention of this article to find out if such voices are correct or the unfriendly nations will get into real trouble.  It intends to present a correct picture to the reader for them to judge for themselves if such threats are real.

The Supplies from Russia

Russia is a country blessed with a lot of minerals and supplies that the World needs.   Natural Gas is one of them. Countries near Russia,  such as Poland,  Germany,  China are not only getting natural gas in LNG tanks but also piped gas through long pipelines all the way from remote Russian areas such as Sibireas.  Over 70% of the country's reserves are currently held by Gazprom, a Russian state-owned company.



How much Natural Gas is from Russia?

One can find this information from a lot of sources.  The ones shown here are from Worldometer.  The following picture shows the yearly natural gas production (in MMCF) of the 10 largest gas producers of the World.

a)  In numbers

<Doubleclick picture to go to the original webpage>


b)  in Pie Chart 


How the Russian Gas would affect the World Supply?

As can be seen from the above chart and table, Russia supplied about 14% of the World's natural gas.  The US and the rest of the World supply the remaining 86%.  With this kind of supply distribution,  it is hardly a conclusion that one can make to say the World's natural gas supply would be in trouble if Russia were to take drastic actions about supplying its natural gas.

Moreover,  the recent natural gas price hikes have already broken down the cost barrier and quenched the fear for many countries to consider bringing in LNG supplies from other countries instead of getting supply through the usual gas pipelines.

However, in whatever form the gas sanction or supply restrictions can be, they will not only bring temporary suffering & hardship to those countries who get direct supplies from Russia,  it will also hurt Russia's economy badly as well. Therefore,  it is never a wise decision to be made.

Update:  28 March 2022

China's Sinopec Bows Out Of Russian Petchem, Gas Projects

China has been taking natural gas supply from Russia, which is China's third-largest supplier of natural gas, after Australia and Turkmenistan, delivering 16.6 billion cubic meters (bcm) (pipeline plus liquefied natural gas [LNG]).  It accounts for 10 % of China's total imports. 

In Feb 2022, Russia, China agree 30-year gas deal via a new pipeline, to settle in euros.  Russia and China have been talking about this contract for the last 8 years,  Understand China signed the Contracts to reduce the dependency of supply from the "Quad".

Recent Russia's actions in Ukraine must have changed China's perspective.  China's Sinopec has just signed a 20-year contract to get about 4 mt of natural gas per year from a US company in November 2021.

<Doubleclick picture to go to the original webpage>



Sinopec was reported to have bowed out of $500 million Russian Petchem Gas projects just because one of the partners,  Gennady Timchenko,  has been sanctioned by the EU and Britain.  

<Doubleclick picture to go to the original webpage>


Update:  28 March 2022

Oil Production in Barrels per years by various countries

Similarly,   for oil production,  Russia supplied only about 11% of the oil requirement with the rest of 89% from other parts of the World as shown in this Pie Chart

a)  In numbers


<Doubleclick picture to go to the original webpage>


b)  In Pie Chart


Saturday, March 5, 2022

Runtime Error 429 in Using Selenium Basic


5 March 2022 

Selenium Basic can be a very useful tool when one is writing an Excel VBA Macro to "scrape" data from a webpage.  

In the past,  one will have to use "imacros" which is a special paid software for scrapping data in Excel because one cannot often use Excel's built-in "data queries" to extract data from a webpage.  These webpages are usually written using VBScript,  Javascript or other forms of HTML tools.  

Please click the picture for more information


The VBA that is used to extract data from a webpage using the normal tools can run into a lot of problems and often took several processes just to complete a simple task. Selenium Basic, on the other hand,  can cut the Excel macros down to just a few lines for the same kind of work.  For example,  it allows users to copy the whole table & then paste it onto Excel as an Excel table instead of a jpg picture.   It is much more efficient;  also, the VBA macros will run much faster,  limited only by the network.

Error Messages

The only snag about using Selenium Basic is the lack of support documents, especially about how to handle script errors.  This is because Selenium Basic is still in the early stage of development.  One of the errors that come up recently is the Run time error 429 as described by a forumer in the "Stackoverlow" forum:

Click the picture to visit the article

What is Error 429?

Error 429 is a common error occurring when one tries to automate office or other similar works. According to Microsoft,  this error when occurring in Microsoft Office VBA work could be due to the following reasons:

  • There is a mistake in the application;
  • There is a mistake in the system configuration;
  • There is a missing component;
  • There is a damaged component.

Microsoft suggested a few solutions as shown on this page.  The solutions can be summarized in simple terms as follows

1.  Check & verify the office application is working;

2.  Re-register the applications;

3.  Check & add the "CLSID key" to the Registry if there are missing in the Registry;

There are other methods suggested which the readers should read in detail. 

How the Error 429 happened?

It happened when one is trying to use special automation software called "Auto Power-On and Shut Down" to turn on and shut down the PC at a specific time automatically. This software has been used before for Excel macro many times without any hitch.  The Excel VBA macros were also tested to run well on another computer.  on this PC in question,  Windows Excel will startup but it would stall whenever it reached the following VBA script.  

  • driver.Start "Chrome"

The solution

The re-registration of the software "Auto Power-On and Shut down" as advised by Microsoft solved the problem.  One will need to run the following script in DOS-Prompt as an administrator:

  • C:\Program Files (x86)\Auto Power-On and Shut Down\Auto Power-On and Shut Down.EXE /regserver

In the above example,  the software,  "Auto Power-On and Shut Down",  was defaulted to be installed in C:\Program Files (x86)


 


Reviving ASUS eee901 NetBook PC for Data Scrappings

5 March 2022

# eee901, Network, SSD upgrade,  mSATA,  mini-PCIe,  Windows

This ASUS eee901 was a very popular netbook PC about 10 to 15 years ago.  It was one of the cheap netbook PC that uses SSDs for memory storage.   It was very hackable and many hobbyists like to do all sorts of modification work using this PC.  

Because the netbook uses only 5 Watts.  I bought a couple of these for stock data mining which required the PC to be operating 24/7.  When the SDD finally failed to work and plenty of free stock screening websites are available free for downloading,  I decided to retire them some 5 years.

Lately,  I took up the interest to do stock data mining again. This time is for data that are not available anywhere on the Internet.   The choice then was between buying a new netbook or upgrading the eee901 with a faster and bigger SSD.

What SSD Were Used?

These ASUS netbooks use a special SSD called mini-PCIe SSD.  These SSD has a similar form factor as the mini-SATA (mSATA) SSD.  Mini-PCI SSD is not easily available and mSATA SSD cannot be used to replace Mini-SSD directly in the ASUS netbook.

The Final Choice

.I decided to revive the eee901 for the following reasons

1)  Netbook has now been replaced by the tablets which run on either Android or iOS.  They are not good for running the Excel macros which were written earlier for data mining;

2)  There are adaptors available to convert mSATA SSD to mini-PCI SDD for use in eee901.  The adaptors are fairly cheap.   The SSD replacement and upgrading work is estimated to cost less than SGD$30/=. It is much cheaper than a new netbook;  moreover,  I have a few spare mSATA SSD lying around and I can use them for the upgrading work.

The only Snag

The eee901 PC has two SSD;  one 8GB master SSD that is accessible after removing the cover;  the other is the 4GB slave SSD that is hidden inside the PC.   When the new adaptor SSD is used to replace the 8GB Master SSD,  the PC will recognise only the new adaptor SSD as a slave.  The BIOS will always give this warning error about "master SSD not found" whenever the PC is booted up.  The warning error cannot be defeated because it is an error message.   It will stop loading up the Windows.  This is not good when one is trying to automate the PC to start up windows and run the excel macros automatically.   

Installing the adaptor SSD to replace the hidden 4GB will solve this startup error but the adaptor SSD must be shortened because the hidden 4GB is half-height.  It is around 50 mm long whereas the new adaptor SSD is around 70 mm long. 

Can the Adaptor SSD Be Shortened?

Yes,  it can.  One must use 1/2 height mSATA with a short piece of PVC plastic added as shown in this automated picture.  There is just enough room in eee 901 for the installation of this new and shortened adaptor SSD




How to Install the Inside the eee901?

Here is one of the video


Enhanced Performance

Users will find the replacement Adaptor SSD running much faster than the original SSD.  This is because the mSATA is of the more advanced Technolgy.  The mSATA's speed can be several times that of the original SSD.  

With the larger capacity SSD,  one can use the original Windows 7 with the response and speed,  at times,  even better than the Intel E8400 PC with the hard drive.  Some has tested eee901 using Windows 10 but the response was a bit sluggish as reported because Windows 10 will require 3 GB RAM to run efficiently.  The eee901 only has a maximum RAM of 2 GB.

Simple and Easy Way To Backup Photos, Movies and Documents from handphones

 2 December 2023 In the past,  we used iTunes when we wanted to transfer or backup our photos,  movies, and documents from iPhones or Androi...