Tuesday, 17 December 2024

exiftool

Tool to insert meta data into various file types and using various meta data formats. 

using struct to write address info:

..\..\software\exiftool-13.08_64\exiftool.exe -GPSLatitude=19.12 -GPSLongitude=73 -GPSAltitude=0 -GPSAltitudeRef=1 -XMP:WorldRegion=Asia -XMP:CountryName=Bharat -XMP:LocationId="RCP, Ghansoli, Navi Mumbai"  rcp_from_tc23_5b.jpg


General tags can go in fine:

..\..\software\exiftool-13.08_64\exiftool.exe -GPSLatitude=19.12 -GPSLongitude=73 -GPSAltitude=0 -GPSAltitudeRef=1 -WorldRegion=Asia -CountryName=Bharat -CountryCode=IN -City=Mumbai -LocationId="RCP, Ghansoli, Navi Mumbai"  rcp_from_tc23_5b.jpg

Here worldregion, countryname and locationId tags get rejected and we so passed them as struct above.

https://exiftool.org/TagNames/XMP.html#LocationDetails

List info:

C:\work\learn\unix>..\..\software\exiftool-13.08_64\exiftool.exe rcp_from_tc23_5b.jpg

ExifTool Version Number         : 13.08
File Name                       : rcp_from_tc23_5b.jpg
Directory                       : .
File Size                       : 3.5 MB
File Modification Date/Time     : 2024:12:17 18:31:45+05:30
File Access Date/Time           : 2024:12:17 18:31:47+05:30
File Creation Date/Time         : 2024:12:17 17:27:59+05:30
File Permissions                : -rw-rw-rw-
File Type                       : JPEG
File Type Extension             : jpg
MIME Type                       : image/jpeg
Exif Byte Order                 : Little-endian (Intel, II)
Make                            : samsung
Camera Model Name               : Galaxy M14 5G
Orientation                     : Horizontal (normal)
X Resolution                    : 72
Y Resolution                    : 72
Resolution Unit                 : inches
Software                        : M146BXXS7CXJ1
Modify Date                     : 2024:12:17 17:25:51
Y Cb Cr Positioning             : Centered
Exposure Time                   : 1/60
F Number                        : 1.8
Exposure Program                : Program AE
ISO                             : 40
Exif Version                    : 0220
Date/Time Original              : 2024:12:17 17:25:51
Create Date                     : 2024:12:17 17:25:51
Offset Time                     : +05:30
Offset Time Original            : +05:30
Shutter Speed Value             : 1
Aperture Value                  : 1.8
Brightness Value                : 2.78
Exposure Compensation           : 0
Max Aperture Value              : 1.8
Metering Mode                   : Center-weighted average
Flash                           : No Flash
Focal Length                    : 4.0 mm
Sub Sec Time                    : 752
Sub Sec Time Original           : 752
Sub Sec Time Digitized          : 752
Flashpix Version                : 0100
Color Space                     : sRGB
Exif Image Width                : 4080
Exif Image Height               : 3060
Exposure Mode                   : Auto
White Balance                   : Auto
Digital Zoom Ratio              : 1
Focal Length In 35mm Format     : 26 mm
Scene Capture Type              : Standard
GPS Version ID                  : 2.3.0.0
GPS Latitude                    : 19 deg 7' 12.00"
GPS Longitude                   : 73 deg 0' 0.00"
GPS Altitude Ref                : Above Sea Level
Compression                     : JPEG (old-style)
Thumbnail Offset                : 976
Thumbnail Length                : 59642
Current IPTC Digest             : 5432042f58e8876693f95ffa0dd9ed01
City                            : Mumbai
Application Record Version      : 4
XMP Toolkit                     : Image::ExifTool 13.08
Country Code                    : IN
Location Created City           : Navi Mumbai
Location Created Country Name   : Bharat
Location Created Province State : Maharashtra
Image Width                     : 4080
Image Height                    : 3060
Encoding Process                : Baseline DCT, Huffman coding
Bits Per Sample                 : 8
Color Components                : 3
Y Cb Cr Sub Sampling            : YCbCr4:2:0 (2 2)
Time Stamp                      : 2024:12:17 17:25:51.752+05:30
MCC Data                        : India (405)
Aperture                        : 1.8
Image Size                      : 4080x3060
Megapixels                      : 12.5
Scale Factor To 35 mm Equivalent: 6.5
Shutter Speed                   : 1/60
Create Date                     : 2024:12:17 17:25:51.752
Date/Time Original              : 2024:12:17 17:25:51.752+05:30
Modify Date                     : 2024:12:17 17:25:51.752+05:30
Thumbnail Image                 : (Binary data 59642 bytes, use -b option to extract)
GPS Altitude                    : 0 m Above Sea Level
Circle Of Confusion             : 0.005 mm
Field Of View                   : 69.4 deg
Focal Length                    : 4.0 mm (35 mm equivalent: 26.0 mm)
GPS Position                    : 19 deg 7' 12.00", 73 deg 0' 0.00"
Hyperfocal Distance             : 1.91 m
Light Value                     : 8.9

Wednesday, 7 August 2024

rsyslog

covers

1. rsyslog conf rules, filters, properties

2. rsyslog conf file syntax check

3. logger as syslog client 

logger client can be used to set programname "property" of conf file. (ref. https://www.rsyslog.com/files/temp/doc-indent/configuration/properties.html)

miten@debmiten:~$ logger "miten test1" #use logged in user as programname
miten@debmiten:~$ logger -t "games" "games here from miten" #use games as programname


cat miten.conf 
:programname, contains, "miten"   /var/log/miten
:programname, isequal, "games" /var/log/games

we use filters to divert messages to files.
(ref. https://www.rsyslog.com/doc/configuration/filters.html)

syntax check for conf file.
root@debmiten:/etc/rsyslog.d# rsyslogd -f miten.conf -N1
rsyslogd: version 8.2302.0, config validation run (level 1), master config miten.conf
rsyslogd: End of config validation run. Bye.

restart to use edited conf file
root@debmiten:/etc/rsyslog.d# systemctl restart rsyslog

As per conf on running client logger we see files generated to /var/log (directory base is as per /etc/rsyslog.conf)

root@debmiten:/var/log# ls
apache2 boot.log.2 cron.log.1 games kibana README user.log
apt boot.log.3 cron.log.2.gz gdm3 lastlog runit user.log.1
auth.log boot.log.4 cron.log.3.gz installer logstash speech-dispatcher user.log.2.gz
auth.log.1 boot.log.5 cron.log.4.gz journal miten syslog user.log.3.gz
auth.log.2.gz boot.log.6 cups kern.log mosquitto syslog.1 user.log.4.gz
auth.log.3.gz boot.log.7 dpkg.log kern.log.1 mysql syslog.2.gz wtmp
auth.log.4.gz btmp dpkg.log.1 kern.log.2.gz nginx syslog.3.gz
boot.log btmp.1 elasticsearch kern.log.3.gz postgresql syslog.4.gz
boot.log.1 cron.log firebird kern.log.4.gz private unattended-upgrades

root@debmiten:/var/log# cat games
2024-08-07T16:23:52.156361+05:30 debmiten games: games here from miten

root@debmiten:/var/log# cat miten
2024-08-07T16:15:10.513358+05:30 debmiten miten: miten test1

Wednesday, 19 June 2024

stocks rsi

RSI is Relative Strength Index.

search on google search for RSI 70% and it will show a list of stocks which are about to or crossed 70% RSI level.  You can view graph with rsi and price data on chartink.com.

1. go to  chartink.com

2. choose selections as:

Period: All Data

Range: Monthly

Type: Candlestick


3. enter symbol and choose stock

It will show chart with price and rsi.  Look for RED areas in RSI (Relative Strength Index) graph.  During it you can buy.  So when RSI goes more than 70% we buy and when it goes lower than 70% we sell.  RSI is not price.  

Also use stop loss for buy price.  If say we buy for Rs 100 knowing RSI is 75% and price goes down to Rs 90 we use stop loss of 90 and sell it instead.


Tuesday, 30 November 2021

Jio Center, Jio Store, Jio Point


Jio Center (JC) is same as Jio Service Center.  It is Jio owned facility.  JC has various teams and offices for different verticals.  ex JC in sanpada railway station complex, panvel, thane.  JC are city and area wise and do both hardware and software servicing of phone and are supported by GetIT.  They are on jio network (intranet) and do not need evpn.  They do bulk sales and no retail sales.

Jio Store (JS) are mainly meant for Retail Sales and have 2 to 3 person in shop.  ex reliance digital express.  They connect via leased and broadband of jio and are on jio network so do not need evpn.  They are supported by RetailIT.  JS give level 1 support and does not open device.  JS is under Reliance Retail.

Jio Point (JP) is for rural connectivity.  JP is like showroom with 2 man power providing sales/sim.  They may be using hotspot, some USB modem & few ODCPE and come via evpn.  They are supported by RetailIT.  JP do only software update, replace device, battery charge replacement same level support like JS.  They are attached to JC for that area.


Thursday, 26 March 2020

why jains do not eat after sunset and before sunrise ?

during sun light the microbes in air are few and after dark they come to existence.  eating after sunset leads to also disturbing or consuming them so eating after sunset to sunrise is restricted.

why jains do not eat roots ?

Roots tend to be body with multiple lives.  Its like conjoined twins in single body.  human beings need food to survive so jainism suggests to avoid consuming too many lives and thus restricting the roots.  vegetables growing on trees are not packed with lives like roots and thus its preferred to eat vegetables growing above ground.

Groundnut is protected in its shell covering and does not accomodate multiple lives so it is exempted from this rule.