Wednesday, May 26, 2021

Money Spent in Finding a Life Partner till May 2021 and Tips from Anil Dahiya



Index of Journals
Dating: 3000 INR (Angela Chandel, Nishtha Rajput, Mansi Jain)

Tinder: 4400 INR

Shaadi.com in 2019: 4000 INR

Shaadi.com in 2020: 13000 INR

Total: 3000 + 4400 + 4000 + 13000 = 24,400 INR

- - - - - 

What I Look For In a Girl

1. Whether she holds a job or not. Whether she is working or not.

2. She should be perfect in English.

3. She should agree to sign prenuptial agreement. 

- - - - - 

Anil Dahiya's Advice on Prenuptial Agreement

1. Prenuptial agreement is not feasible. (Anil was not aware the prenuptial agreement does not even exist in India with the exception of Goa.)

2. His advice to me: "If you will discuss it with her, she will start doubting you."

3. "It maybe right for you but it may not be right thing for her."

- - - - - 

What Anil Suggests I Should Find Out

1. How is the girl's family?

2. Thought process of the girl.

3. The basic background check. Past relationships, drinking or smoking habits, etc.

- - - - - 

His Advice About Going Abroad

India will need a lot of time to develop due to its lame policies such as the one about "Age Limit On Entering The PSUs". India has an age limit for who can apply for a job in a PSU (Public Sector Undertaking).
It is not like that in other countries.

Dated: 20210326
Tags: Journal,Indian Politics,Politics,Management

Sunday, May 23, 2021

Python (2) String and related packages [20210523]

We would begin with a line about Python String from the book "Pg 191, Learning Python (O'Reilly, 5e)":
  
Strictly speaking, Python strings are categorized as immutable sequences, meaning that the characters they contain have a left-to-right positional order and that they cannot be changed in place. In fact, strings are the first representative of the larger class of objects called sequences that we will study here. Pay special attention to the sequence operations introduced in this post, because they will work the same on other sequence types we’ll explore later, such as lists and tuples.
  
Table 7-1. Common string literals and operations

Operation Interpretation
S = '' Empty string
S = "spam's" Double quotes, same as single
S = 's\np\ta\x00m' Escape sequences
S = """...multiline...""" Triple-quoted block strings
S = r'\temp\spam' Raw strings (no escapes)
print(S) # \temp\spam
B = b'sp\xc4m' Byte strings in 2.6, 2.7, and 3.X
print(B) # b'sp\xc4m'
U = u'sp\u00c4m' Unicode strings in 2.X and 3.3+
print(U) # spÄm
S1 + S2 Concatenate
S * 3 repeat
S[i] Index
S[i:j] slice
len(S) length
"a %s parrot" % 'kind' String formatting expression
print("a %s parrot" % 'kind') # a kind parrot
"a {0} parrot".format('kind') String formatting method in 2.6, 2.7, and 3.X
S.find('pa') String methods (see ahead for all 43): search
print('a parrot'.find('pa')) # 2
S.rstrip() remove whitespace from end
print("!" + " okay ".rstrip() + "!") # ! okay!
S.strip() remove whitespace from beginning and end
print("!" + " okay ".strip() + "!") # !okay!
S.replace('pa', 'xx') replacement
print("parrot".replace('pa', 'xx')) # xxrrot
S.split(',') split on delimiter
S.isdigit() content test
S.lower()
S.upper()
case conversion
print("Parrot".lower()) # parrot
print("parrot".upper()) # PARROT
S.endswith('spam') end test
print("is this yours".endswith("yours")) # True
print("my parrot".startswith("my")) # True
'spam'.join(strlist) delimiter join
S.encode('latin-1') Unicode encoding
B.decode('utf8') Unicode decoding, etc.
for x in S: print(x) Iteration
'spam' in S membership
[c * 2 for c in S] list comprehension to create a new list
map(ord, S) map(ord, "hello") # [104, 101, 108, 108, 111]
map(lambda x: 10*x, [1,2,3,4]) # [10, 20, 30, 40]
re.match('sp(.*)am', line) Pattern matching: library module
To begin our work, we would first create a Conda environment for this using a YAML file as shown below: Filename: string_env.yml Note: "name: string_env" This line is where we are suggesting the name for our new environment below. name: string_env channels: - conda-forge dependencies: - python=3.9 - pip - nltk - spacy - scikit-learn - pandas - ipykernel - jupyter - jupyterlab #-#-#-#-#-#-#-#-#-# (base) CMD>conda env create -f string_env.yml Collecting package metadata (repodata.json): done Solving environment: / Warning: 2 possible package resolutions (only showing differing packages): - conda-forge/noarch::typer-0.3.1-py_0, conda-forge/win-64::click-8.0.0-py39hcbf5309_0 - conda-forge/noarch::click-7.1.2-pyh9f0ad1d_0, conda-forge/noarch::typer-0.3.2-pyhd8ed1abdone Downloading and Extracting Packages chardet-4.0.0 | 218 KB | # | 100% pyqtchart-5.12 | 207 KB | # | 100% parso-0.8.2 | 68 KB | # | 100% vc-14.2 | 13 KB | # | 100% jinja2-3.0.0 | 98 KB | # | 100% markupsafe-2.0.0 | 25 KB | # | 100% jupyter_server-1.7.0 | 441 KB | # | 100% threadpoolctl-2.1.0 | 15 KB | # | 100% pywinpty-1.1.0 | 179 KB | # | 100% urllib3-1.26.4 | 99 KB | # | 100% pywin32-300 | 6.9 MB | # | 100% zipp-3.4.1 | 11 KB | # | 100% pandas-1.2.4 | 10.2 MB | # | 100% attrs-21.2.0 | 44 KB | # | 100% tzdata-2021a | 121 KB | # | 100% grpcio-1.37.1 | 2.0 MB | # | 100% pygments-2.9.0 | 754 KB | # | 100% six-1.16.0 | 14 KB | # | 100% dataclasses-0.8 | 7 KB | # | 100% mkl-2021.2.0 | 183.8 MB | # | 100% googleapis-common-pr | 128 KB | # | 100% rsa-4.7.2 | 28 KB | # | 100% google-cloud-storage | 71 KB | # | 100% mistune-0.8.4 | 54 KB | # | 100% cryptography-3.4.7 | 706 KB | # | 100% typing-extensions-3. | 8 KB | # | 100% qtconsole-5.1.0 | 89 KB | # | 100% pyqt-5.12.3 | 22 KB | # | 100% boto3-1.17.74 | 70 KB | # | 100% libclang-11.1.0 | 20.8 MB | # | 100% qt-5.12.9 | 106.1 MB | # | 100% google-crc32c-1.1.2 | 26 KB | # | 100% cymem-2.0.5 | 40 KB | # | 100% aiohttp-3.7.4 | 600 KB | # | 100% preshed-3.0.5 | 96 KB | # | 100% wasabi-0.8.2 | 23 KB | # | 100% pyqtwebengine-5.12.1 | 143 KB | # | 100% pyzmq-22.0.3 | 703 KB | # | 100% pickleshare-0.7.5 | 9 KB | # | 100% pandoc-2.13 | 16.3 MB | # | 100% typing_extensions-3. | 25 KB | # | 100% spacy-3.0.6 | 9.1 MB | # | 100% spacy-legacy-3.0.5 | 14 KB | # | 100% terminado-0.9.4 | 26 KB | # | 100% protobuf-3.17.0 | 262 KB | # | 100% backports.functools_ | 9 KB | # | 100% google-auth-1.30.0 | 77 KB | # | 100% liblapack-3.9.0 | 4.0 MB | # | 100% zlib-1.2.11 | 126 KB | # | 100% joblib-1.0.1 | 206 KB | # | 100% decorator-5.0.9 | 11 KB | # | 100% zeromq-4.3.4 | 9.0 MB | # | 100% pysocks-1.7.1 | 28 KB | # | 100% ipywidgets-7.6.3 | 101 KB | # | 100% prompt-toolkit-3.0.1 | 244 KB | # | 100% cachetools-4.2.2 | 12 KB | # | 100% jupyterlab_widgets-1 | 130 KB | # | 100% pip-21.1.1 | 1.1 MB | # | 100% scikit-learn-0.24.2 | 6.6 MB | # | 100% defusedxml-0.7.1 | 23 KB | # | 100% sqlite-3.35.5 | 1.2 MB | # | 100% numpy-1.20.2 | 5.3 MB | # | 100% testpath-0.5.0 | 86 KB | # | 100% win_inet_pton-1.1.0 | 8 KB | # | 100% m2w64-gcc-libs-5.3.0 | 520 KB | # | 100% click-8.0.0 | 146 KB | # | 100% jsonschema-3.2.0 | 45 KB | # | 100% libprotobuf-3.17.0 | 2.3 MB | # | 100% vs2015_runtime-14.28 | 2.3 MB | # | 100% jpeg-9d | 366 KB | # | 100% babel-2.9.1 | 6.2 MB | # | 100% ipython-7.23.1 | 1.1 MB | # | 100% wcwidth-0.2.5 | 33 KB | # | 100% tornado-6.1 | 654 KB | # | 100% prompt_toolkit-3.0.1 | 4 KB | # | 100% pydantic-1.7.3 | 164 KB | # | 100% brotlipy-0.7.0 | 369 KB | # | 100% bz2file-0.98 | 9 KB | # | 100% jupyter-1.0.0 | 6 KB | # | 100% importlib-metadata-4 | 30 KB | # | 100% widgetsnbextension-3 | 1.8 MB | # | 100% argon2-cffi-20.1.0 | 51 KB | # | 100% bleach-3.3.0 | 111 KB | # | 100% jupyter_console-6.4. | 22 KB | # | 100% nbclient-0.5.3 | 67 KB | # | 100% srsly-2.4.1 | 501 KB | # | 100% async-timeout-3.0.1 | 11 KB | # | 100% pyopenssl-20.0.1 | 48 KB | # | 100% json5-0.9.5 | 20 KB | # | 100% google-resumable-med | 40 KB | # | 100% nbconvert-6.0.7 | 563 KB | # | 100% jupyter_client-6.1.1 | 79 KB | # | 100% matplotlib-inline-0. | 11 KB | # | 100% backports-1.0 | 4 KB | # | 100% pyqt5-sip-4.19.18 | 298 KB | # | 100% pathy-0.5.2 | 37 KB | # | 100% wheel-0.36.2 | 31 KB | # | 100% tbb-2021.2.0 | 138 KB | # | 100% m2w64-libwinpthread- | 31 KB | # | 100% qtpy-1.9.0 | 34 KB | # | 100% entrypoints-0.3 | 8 KB | # | 100% nbformat-5.1.3 | 47 KB | # | 100% boto-2.49.0 | 838 KB | # | 100% jupyter_core-4.7.1 | 96 KB | # | 100% pyqt-impl-5.12.3 | 4.3 MB | # | 100% nltk-3.6.2 | 1.1 MB | # | 100% libblas-3.9.0 | 4.0 MB | # | 100% anyio-3.0.1 | 133 KB | # | 100% cffi-1.14.5 | 228 KB | # | 100% typer-0.3.1 | 22 KB | # | 100% botocore-1.20.74 | 4.6 MB | # | 100% icu-68.1 | 16.3 MB | # | 100% regex-2021.4.4 | 334 KB | # | 100% python-3.9.4 | 19.9 MB | # | 100% libpng-1.6.37 | 724 KB | # | 100% websocket-client-0.5 | 62 KB | # | 100% yarl-1.5.1 | 136 KB | # | 100% requests-2.25.1 | 51 KB | # | 100% msys2-conda-epoch-20 | 3 KB | # | 100% colorama-0.4.4 | 18 KB | # | 100% jedi-0.18.0 | 931 KB | # | 100% setuptools-49.6.0 | 954 KB | # | 100% jupyterlab_server-2. | 40 KB | # | 100% libcblas-3.9.0 | 4.0 MB | # | 100% wincertstore-0.2 | 15 KB | # | 100% smart_open-2.2.1 | 78 KB | # | 100% python-dateutil-2.8. | 220 KB | # | 100% google-api-core-1.26 | 59 KB | # | 100% tqdm-4.60.0 | 79 KB | # | 100% nest-asyncio-1.5.1 | 9 KB | # | 100% thinc-8.0.3 | 926 KB | # | 100% prometheus_client-0. | 46 KB | # | 100% notebook-6.4.0 | 6.1 MB | # | 100% murmurhash-1.0.5 | 26 KB | # | 100% nbclassic-0.2.8 | 17 KB | # | 100% pyrsistent-0.17.3 | 92 KB | # | 100% libsodium-1.0.18 | 697 KB | # | 100% scipy-1.6.3 | 23.3 MB | # | 100% m2w64-gcc-libgfortra | 342 KB | # | 100% catalogue-2.0.4 | 31 KB | # | 100% sniffio-1.2.0 | 16 KB | # | 100% shellingham-1.4.0 | 11 KB | # | 100% cython-blis-0.7.4 | 5.6 MB | # | 100% s3transfer-0.4.2 | 55 KB | # | 100% certifi-2020.12.5 | 144 KB | # | 100% python_abi-3.9 | 4 KB | # | 100% m2w64-gcc-libs-core- | 214 KB | # | 100% ipykernel-5.5.5 | 168 KB | # | 100% traitlets-5.0.5 | 81 KB | # | 100% libcrc32c-1.1.1 | 25 KB | # | 100% packaging-20.9 | 35 KB | # | 100% multidict-5.1.0 | 63 KB | # | 100% jupyterlab-3.0.15 | 5.5 MB | # | 100% m2w64-gmp-6.1.0 | 726 KB | # | 100% google-cloud-core-1. | 26 KB | # | 100% Preparing transaction: done Verifying transaction: done Executing transaction: / Enabling notebook extension jupyter-js-widgets/extension... - Validating: ok done # # To activate this environment, use # $ conda activate string_env # To deactivate an active environment, use # $ conda deactivate #-#-#-#-#-#-#-#-#-# Suppose we are coming back after a week to work and we need to work in an environment again. What do we do now if don't remember the name? (base) CMD>conda env list # conda environments: # base * E:\programfiles\Anaconda3 pegasus E:\programfiles\Anaconda3\envs\pegasus py39 E:\programfiles\Anaconda3\envs\py39 selenium E:\programfiles\Anaconda3\envs\selenium string_env E:\programfiles\Anaconda3\envs\string_env tf E:\programfiles\Anaconda3\envs\tf #-#-#-#-#-#-#-#-#-# (base) ~\Desktop\ws>conda activate string_env (string_env) ~\Desktop\ws>jupyter lab [I 2021-05-19 02:43:28.973 ServerApp] jupyterlab | extension was successfully linked. [I 2021-05-19 02:43:29.051 ServerApp] Writing notebook server cookie secret to C:\Users\Ashish Jain\AppData\Roaming\jupyter\runtime\jupyter_cookie_secret [W 2021-05-19 02:43:29.145 ServerApp] The 'min_open_files_limit' trait of a ServerApp instance expected an int, not the NoneType None. [I 2021-05-19 02:43:29.191 LabApp] JupyterLab extension loaded from E:\programfiles\Anaconda3\envs\string_env\lib\site-packages\jupyterlab [I 2021-05-19 02:43:29.191 LabApp] JupyterLab application directory is E:\programfiles\Anaconda3\envs\string_env\share\jupyter\lab [I 2021-05-19 02:43:29.207 ServerApp] jupyterlab | extension was successfully loaded. [I 2021-05-19 02:43:29.801 ServerApp] nbclassic | extension was successfully loaded. [I 2021-05-19 02:43:30.176 ServerApp] Serving notebooks from local directory: ~\Desktop\ws [I 2021-05-19 02:43:30.176 ServerApp] Jupyter Server 1.7.0 is running at: [I 2021-05-19 02:43:30.176 ServerApp] http://localhost:8888/lab?token=57b5a01c1c12a9acab6499a55cbfcb61de9ab5e1598db126 [I 2021-05-19 02:43:30.176 ServerApp] http://127.0.0.1:8888/lab?token=57b5a01c1c12a9acab6499a55cbfcb61de9ab5e1598db126 [I 2021-05-19 02:43:30.176 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation). [C 2021-05-19 02:43:30.332 ServerApp] To access the server, open this file in a browser: file:///C:/Users/Ashish%20Jain/AppData/Roaming/jupyter/runtime/jpserver-1812-open.html Or copy and paste one of these URLs: http://localhost:8888/lab?token=57b5a01c1c12a9acab6499a55cbfcb61de9ab5e1598db126 http://127.0.0.1:8888/lab?token=57b5a01c1c12a9acab6499a55cbfcb61de9ab5e1598db126 #-#-#-#-#-#-#-#-#-# Ques: What is the difference between "Jupyter Notebook" and "Jupyter Lab"? Ans: Jupyter Notebook is a web-based interactive computational environment for creating Jupyter notebook documents. It supports several languages like Python (IPython), Julia, R etc. and is largely used for data analysis, data visualization and further interactive, exploratory computing. JupyterLab is the next-generation user interface including notebooks. It has a modular structure, where you can open several notebooks or files (e.g. HTML, Text, Markdowns etc) as tabs in the same window. It offers more of an IDE-like experience. For a beginner I would suggest starting with Jupyter Notebook as it just consists of a filebrowser and an (notebook) editor view. It might be easier to use. If you want more features, switch to JupyterLab. JupyterLab offers much more features and an enhanced interface, which can be extended through extensions: JupyterLab Extensions (GitHub) #-#-#-#-#-#-#-#-#-#

Now Some Hands-On

# Picking the fifth character from a string str_1 = "Hi, I am Ashish!" str_1[4] 'I' # Picking characters from fifth to tenth str_1[4:10] 'I am A' # Print the length of the string print(len(str_1)) print(len(str_1[4:10])) 16 6 # Print every second character in the string str_1[0::2] 'H,Ia sih' # When you give negative number for indexing, it starts traversing the string from the right: print(str_1[-1]) print(str_1[-2]) print(str_1[-5 : -1]) print(str_1[-5 :]) ! h hish hish! When you are giving a range for indexing to a string, the first number should be smaller than the second, or nothing comes out: print("str_1[-1 : -5]: ", str_1[-1 : -5], "<-") str_1[-1 : -5]: <- # Reverse a string print("-->", str_1[len(str_1) : 0]) print("-->", str_1[6 : 0]) print() """Here it skips the first character because that's how indexing works. It excludes the last indexing number specified.""" print("-->", str_1[len(str_1) : 0 : -1]) print("-->", str_1[len(str_1) : 0 : -1]) print() print("-->", str_1[len(str_1) : : -1]) print("-->", str_1[ : : -1]) print() print("-->", str_1[len(str_1)+1 : : -1]) print("-->", str_1[0 : len(str_1)+1]) --> --> --> !hsihsA ma I ,i --> !hsihsA ma I ,i --> !hsihsA ma I ,iH --> !hsihsA ma I ,iH --> !hsihsA ma I ,iH --> Hi, I am Ashish! When you are specifying number for an indexing range, the number can go beyond the actual string length but not when you are picking only a character: print("-->", str_1[len(str_1)+1]) IndexError Traceback (most recent call last) <ipython-input-32-ae4c8bcbdc17> in <module> ---> print("-->", str_1[len(str_1)+1]) IndexError: string index out of range # Check if a string is a palindrome str_2 = "mom" print(str_2 == str_2[::-1]) print(str_1 == str_1[::-1]) True False # Check if two string variables are actually same. Important Note: What we are going to see in this piece of code does not hold true for lists. v1 = str_2 v2 = str_2 v3 = 'mom' print("v1 == v2:", v1 == v2) print("v1 == v3:", v1 == v3) print("v1 is v2:", v1 is v2) print("v1 is v3:", v1 is v3) print("id(v1)", id(v1)) print("id(v3)", id(v3)) v1 == v2: True v1 == v3: True v1 is v2: True v1 is v3: True id(v1) 2053130113968 id(v3) 2053130113968 # Now trying the same thing with lists: animals = ['python','gopher'] more_animals = animals print("animals == more_animals:", animals == more_animals) #=> True print("animals is more_animals:", animals is more_animals) #=> True even_more_animals = ['python','gopher'] print("animals == even_more_animals:", animals == even_more_animals) #=> True print("animals is even_more_animals:", animals is even_more_animals) #=> False print("\nMemory addresses:") print("id(animals)", id(animals)) print("id(more_animals)", id(more_animals)) print("id(even_more_animals)", id(even_more_animals)) animals == more_animals: True animals is more_animals: True animals == even_more_animals: True animals is even_more_animals: False Memory addresses: id(animals) 2053130940992 id(more_animals) 2053130940992 id(even_more_animals) 2053130060928 Checking what happens to a string when replace a character in a string and to a list when we replace an element in it: owner = 'Ashish' pets = ['python', 'gopher'] print("owner:", owner) print("id(owner): ", id(owner)) print("id(pets): ", id(pets)) owner = owner.replace('A', 'X') # Note: we don't have a "replace()" method for Python lists. pets[0] = 'cat' print("owner:", owner) print("id(owner): ", id(owner)) print("id(pets): ", id(pets)) owner = owner.replace('X', 'A') pets[0] = 'python' print("owner:", owner) print("id(owner): ", id(owner)) print("id(pets): ", id(pets)) print("Trivial replacement:") owner = owner.replace('A', 'A') print("owner:", owner) print("id(owner): ", id(owner)) owner: Ashish id(owner): 2287299151536 id(pets): 2287299204096 owner: Xshish id(owner): 2287299080624 id(pets): 2287299204096 owner: Ashish id(owner): 2287298874672 id(pets): 2287299204096 Trivial replacement: owner: Ashish id(owner): 2287298874672 Now the question is: did it actually perform the trivial replace operation in this case or not?

Creating Replace For List

# a loop to do the replacement in-place words = ['I', 'like', 'chicken'] for i, word in enumerate(words): if word == 'chicken': words[i] = 'broccoli' print(words) ['I', 'like', 'broccoli'] # a shorter option if there’s always exactly one instance: words = ['I', 'like', 'chicken'] words[words.index('chicken')] = 'broccoli' print(words) ['I', 'like', 'broccoli'] # a list comprehension to create a new list: words = ['I', 'like', 'chicken'] new_words = ['broccoli' if word == 'chicken' else word for word in words] print(new_words) ['I', 'like', 'broccoli'] # any of which can be wrapped up in a function: words = ['I', 'like', 'chicken'] def replaced(sequence, old, new): return (new if x == old else x for x in sequence) new_words = list(replaced(words, 'chicken', 'broccoli')) print(new_words) ['I', 'like', 'broccoli'] #-#-#-#-#-#-#-#-#-#

Python's in-built support for String and List

1. reversed() >>> s1 = "Hi, I am Ashish!" >>> ''.join(reversed(s1)) '!hsihsA ma I ,iH' >>> reversed(s1) <reversed object at 0x000001D587048518> >>> list(reversed(s1)) ['!', 'h', 's', 'i', 'h', 's', 'A', ' ', 'm', 'a', ' ', 'I', ' ', ',', 'i', 'H'] >>> str(reversed(s1)) '<reversed object at 0x000001D587048B70>' >>> >>> l1 = ['Ashish', 'Rashmi', 'Smita'] >>> reversed(l1) <list_reverseiterator object at 0x000001D5870702B0> >>> list(reversed(l1)) ['Smita', 'Rashmi', 'Ashish'] >>> 2. sorted() >>> sorted(s1) [' ', ' ', ' ', '!', ',', 'A', 'H', 'I', 'a', 'h', 'h', 'i', 'i', 'm', 's', 's'] >>> >>> sorted(l1) ['Ashish', 'Rashmi', 'Smita'] >>> >>> l2 = ['Rashmi', 'Ashish', 'Smita'] >>> sorted(l2) ['Ashish', 'Rashmi', 'Smita'] >>> 3. len() >>> len(s1) 16 >>> len(l1) 3 >>> Tags: Technology,Python,Anaconda,Natural Language Processing,

'Visual Studio Code' Shortcuts



A Tip About Visual Studio Code:
Tip 1:
If press this sequence:
1: "i"
2: "Enter"
This will put <i> in your HTML file.

#-#-#-#-#-#-#-#-#-#

Tip 2:
If you press this sequence:

1: "i."
2: "Enter"
This will put <i class=""> in your HTML file.

#-#-#-#-#-#-#-#-#-#

Tip 3:

If you press this sequence:

1: "i/"
2: "Enter"
This will put only the opening tag in your HTML template, for "i/" it will be: <i>.

#-#-#-#-#-#-#-#-#-#

Tip 4:

If you press this sequence:

1: "i.customClass"
2: "Enter"

This will put <i class="customClass"></i> in HTML template.

#-#-#-#-#-#-#-#-#-#

Tip 5:

If you press this sequence:

1: "i#customID"
2: "Enter"

This will put <i id="customID"></i> in HTML template.

Tags: Technology,Web Development,

Anu's Roka Ceremony (Nov, 2019)



Index of Journals
When I heard of the roka ceremony for Anu, I was like "do we also do that?"My mom called it "rokna" while talking to me and in Western countries, it is called engagement.
Yesterday it was decided that Anu and Tushar would exchange rings in the presence of the elders such as Tushar's tauji and cousins from Aligarh (I could be wrong about the place). 
Anu wore a lemon colored saree and Tushar wore a dark green kurta and white pyjamas. 
I was resting in my room in my bed due to the high caffeine intake yesterday. All of the required people had assembled in the living room and there were conversations about marriage, mother-in-law daughter-in-law relationship, and all. 

A joke I remember from these conversations is from Anil Kumar fufaji. It goes like this:

Secret of mother-in-law and daughter-in-law relationship is that daughter-in-law should daily touch mother-in-law's feet and mother should bless daughter by putting her hand on her head. If either one disobeys this secret, there would be fights.

Before the ceremony actually began or any roka related activity began, there was this period of silence which was not making me feel very comfortable. The way I sat on that chair without hand-rests was by bending forward with shoulders out and looking at my hands. I was restless and I knew that the posture would indicate the same thing to the people.
While writing about that moment I just happen to remember few more such moments of silence with other people at other times that I am going to share here:

1. We were in Amitabh's car. Asmita and myself. Amitabh was driving and we were returning from Elante mall (Sector 17, CHD) I think. It could be that it was some other eating place as we had come out for team outing that day. It was a party that Amitabh gave to the team for no reason as such, just an outing. Now we were going to drop Asmita at her place and there was this silent ride at night in Chandigarh. Then Amitabh broke the silence by saying: "Itna sannaataa kyon hai bhai?"That translates to "why it is so quiet, brother?". This is a famous dialogue from the 1975 Hindi movie Sholay.To respond to Amitabh, I said "people just say things that they want to say without meaning it, or without anyone listening to them and it all goes into air as if it never happened, as if saying it was no different from not saying it." To this Amitabh said, "you are right, we see people these days who are wasting away their lives in partying and drinking and in that alcohol influence they talk endlessly to ruin things not only for themselves but everyone."

2. There was this time when I again with my team but Amitabh was not there and I don't think even entire team was there. We were again at an eating place and it could be the Food Court. I was having this restlessness and temptation to speak and maybe it was also coming out in my body language that Kajal picked up. Seeing this she tells me that it is not mandatory that someone has to speak at all times when people come together. You can be quiet, at rest, at peace too.

3. It was on a call with a friend of mine Jayeta and after talking for 10-15 minutes there came a time when I was silent with her on the phone and then I spoke to ask "does my silence make you uncomfortable because that's how I am at a lot of times with a lot of people on a lot of calls". To this Jayeta replied something like "when two people become comfortable with the silence of each other that phase in the relationship is called "Thairaav". Thairaav is Hindi word for a very abstract and deep concept that I can try to put into English words. You may call it "stability" or "time when even the presence of other person comforts you", or more generally "when things have become slow and stable". Well, those were my three attempts to put the word across you.

~ ~ ~

The silence was also feeling awkward to me because Neelima maasi is a Kindergarten teacher and Priyanka is an HR.

While I write about the day of Roka after almost a year and a half, I would make little sense about the ceremony of roka itself. So what am saying here is absolutely like how I describe it to people. It is a vantage point, a view from my position.

In roka ceremony, the boy and his family are present at the girl's house. The girl's family does a tika to the boy. Tika means putting a mark on the forehead of the person with the crimson. Shape of tika varies if it is on boy or girl. For girl, it is like a circular spot and for boy, after you put a circular spot, you smudge it in the upward direction.
At the time of tika (crimson), there would be people clicking pictures so you would have to pose for them also.
After the tika (crimson), mom and I were to have a picture with the couple. Anu was on Tushar's left and I was on Anu's left. I asked her if I can bring my right arm around her from behind and hold her from the shoulder. She said 'no'.
All now I had to do was sit on the arm-rest, put my hands together with myself, smile and tilt my head in her direction to show some closeness between us.

Due to shortage of time at this moment on 23rd May 2021, I would try to wrap it up in few lines but I might write more if needed.

After the ceremony, we went to Haldiram's place in the Akshardham Temple's Parasvnath mall. There the catering service was not there. Accomodation for all the members of two families was not there. If accomodation could somehow be arraged, it was on separate tables and the manager said that we were not allowed to move the tables.

As for me, I did the catering work of bringing the food from the counter to the people sitting at their tables.

No shame in that. I had been part of Voice of Youth with Employee Relations team at my office and as being part of VoY, we were often required by the HR to help them organize events.

Tags: Journal,Behavioral Science,Emotional Intelligence,

Friday, May 21, 2021

Activating MFA on GitHub and also PAT [May 2021]



Log into GitHub account and follow the screenshots:

I1 - Go to Account Security: github.com/settings/security
I2 - GitHub MFA using Authenticator App
I3 - GitHub asks you to scan a barcode and provide 6-digit code from the Authenticator app
I4 - Microsoft Authenticator App (Download Screenshot)
I5 - Manage MFA - Recovery Options [URL: github.com/settings/two_factor_authentication/configure ]
I6 - Also make sure to set up: Personal Access Tokens [URL: github.com/settings/tokens]
Tags: Cloud, Cyber Security, Technology,GitHub,

What is GitHub



GitHub, Inc. is a provider of Internet hosting {1} for software development {2} and version control {3} using Git {4}. It offers the distributed version control {5} and source code management (SCM) {3} functionality of Git, plus its own features. It provides access control {6} and several collaboration features such as bug tracking {7}, feature requests {8}, task management {9}, continuous integration {10} and wikis {11} for every project. 

Headquartered in California, it has been a subsidiary of Microsoft since 2018.

GitHub offers its basic services free of charge. Its more advanced professional and enterprise services are commercial. Free GitHub accounts are commonly used to host open-source {12} projects. 

2019: As of January 2019, GitHub offers unlimited private repositories {13} to all plans, including free accounts, but allowed only up to three collaborators per repository for free.

2020: Starting from April 15, 2020, the free plan allows unlimited collaborators, but restricts private repositories to 2,000 minutes of GitHub Actions {14} per month.

As of January 2020, GitHub reports having over 40 million users and more than 190 million repositories (including at least 28 million public repositories), making it the largest host of source code {15} in the world.

Wikipedia Card

Type of business: Subsidiary Type of site: Collaborative version control Available in: English Founded: February 8, 2008; 13 years ago (as Logical Awesome LLC) Headquarters: San Francisco, California, United States Area served: Worldwide Founder(s): #1 Tom Preston-Werner #2 Chris Wanstrath #3 P. J. Hyett #4 Scott Chacon Key people: CEO: Nat Friedman CFO: Mike Taylor Industry: #1 Collaborative version control (GitHub) #2 Blog host (GitHub Pages) #3 Package repository (NPM) Revenue: Increase $300 million (2018) Employees: 1677 Parent: Microsoft URL: github.com Registration: Optional (required for creating and joining repositories) Users: 56 million (as of September 2020) Launched: April 10, 2008; 13 years ago Current status: Active Written in: #1 Ruby #2 ECMAScript #3 Go #4 C

Git-SCM

Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git is easy to learn and has a tiny footprint with lightning fast performance. It outclasses SCM tools like Subversion, CVS, Perforce, and ClearCase with features like cheap local branching, convenient staging areas, and multiple workflows. Ref: git-scm

Keywords

1. Internet hosting An Internet hosting service is a service that runs servers connected to the Internet, allowing organizations and individuals to serve content or host services connected to the Internet. A common kind of hosting is web hosting. Most hosting providers offer a combination of services - e-mail hosting, website hosting, and database hosting, for example. DNS hosting service, another type of service usually provided by hosting providers, is often bundled with domain name registration. Dedicated server hosts, provide a server, usually housed in a datacenter and connected to the Internet where clients can run anything they want (including web servers and other servers). The hosting provider ensures that the servers have Internet connections with good upstream bandwidth and reliable power sources. Another popular kind of hosting service is shared hosting. This is a type of web hosting service, where the hosting provider provisions hosting services for multiple clients on one physical server and shares the resources between the clients. Virtualization is key to making this work effectively. Internet hosting 2. Software Development Software development is the process of conceiving, specifying, designing, programming, documenting, testing, and bug fixing involved in creating and maintaining applications, frameworks, or other software components. Software development is a process of writing and maintaining the source code, but in a broader sense, it includes all that is involved between the conception of the desired software through to the final manifestation of the software, sometimes in a planned and structured process. Therefore, software development may include research, new development, prototyping, modification, reuse, re-engineering, maintenance, or any other activities that result in software products. The software can be developed for a variety of purposes, the three most common being to meet specific needs of a specific client/business (the case with custom software), to meet a perceived need of some set of potential users (the case with commercial and open source software), or for personal use (e.g. a scientist may write software to automate a mundane task). Embedded software development, that is, the development of embedded software, such as used for controlling consumer products, requires the development process to be integrated with the development of the controlled physical product. System software underlies applications and the programming process itself, and is often developed separately. The need for better quality control of the software development process has given rise to the discipline of software engineering, which aims to apply the systematic approach exemplified in the engineering paradigm to the process of software development. There are many approaches to software project management, known as software development life cycle models, methodologies, processes, or models. The waterfall model is a traditional version, contrasted with the more recent innovation of agile software development. Software development 3. Version control In software engineering, version control (also known as revision control, source control, or source code management) is a class of systems responsible for managing changes to computer programs, documents, large web sites, or other collections of information. Version control is a component of software configuration management. Changes are usually identified by a number or letter code, termed the "revision number", "revision level", or simply "revision". For example, an initial set of files is "revision 1". When the first change is made, the resulting set is "revision 2", and so on. Each revision is associated with a timestamp and the person making the change. Revisions can be compared, restored, and with some types of files, merged. The need for a logical way to organize and control revisions has existed for almost as long as writing has existed, but revision control became much more important, and complicated, when the era of computing began. The numbering of book editions and of specification revisions are examples that date back to the print-only era. Today, the most capable (as well as complex) revision control systems are those used in software development, where a team of people may concurrently make changes to the same files. Version control systems (VCS) are most commonly run as stand-alone applications, but revision control is also embedded in various types of software such as word processors and spreadsheets, collaborative web docs[2] and in various content management systems, e.g., Wikipedia's page history. Revision control allows for the ability to revert a document to a previous revision, which is critical for allowing editors to track each other's edits, correct mistakes, and defend against vandalism and spamming in wikis. Version control 4. Git Git (/ɡɪt/) is software for tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data integrity, and support for distributed, non-linear workflows (thousands of parallel branches running on different systems). Git was created by Linus Torvalds in 2005 for development of the Linux kernel, with other kernel developers contributing to its initial development. Since 2005, Junio Hamano has been the core maintainer. As with most other distributed version control systems, and unlike most client–server systems, every Git directory on every computer is a full-fledged repository with complete history and full version-tracking abilities, independent of network access or a central server. Git is free and open-source software distributed under GNU General Public License Version 2. Git 5. Distributed version control In software development, distributed version control (also known as distributed revision control) is a form of version control in which the complete codebase, including its full history, is mirrored on every developer's computer. Compared to centralized version control, this enables automatic management branching and merging, speeds up most operations (except pushing and pulling), improves the ability to work offline, and does not rely on a single location for backups. Git, the world's most popular version control system, is a distributed version control system. In 2010, software development author Joel Spolsky described distributed version control systems as "possibly the biggest advance in software development technology in the past ten years". Distributed version control 6. Access control In the fields of physical security and information security, access control (AC) is the selective restriction of access to a place or other resource while access management describes the process. The act of accessing may mean consuming, entering, or using. Permission to access a resource is called authorization. Locks and login credentials are two analogous mechanisms of access control. Access control 7. Bug tracking system A bug tracking system or defect tracking system is a software application that keeps track of reported software bugs in software development projects. It may be regarded as a type of issue tracking system. Many bug tracking systems, such as those used by most open-source software projects, allow end-users to enter bug reports directly. Other systems are used only internally in a company or organization doing software development. Typically bug tracking systems are integrated with other project management software. A bug tracking system is usually a necessary component of a professional software development infrastructure, and consistent use of a bug or issue tracking system is considered one of the "hallmarks of a good software team". Bug tracking system 8. Software feature In software, a feature has several definitions. The Institute of Electrical and Electronics Engineers defines the term feature in IEEE 829 as "A distinguishing characteristic of a software item (e.g., performance, portability, or functionality)." Software feature 9. Task management Task management is the process of managing a task through its life cycle. It involves planning, testing, tracking, and reporting. Task management can help either individual achieve goals, or groups of individuals collaborate and share knowledge for the accomplishment of collective goals. Tasks are also differentiated by complexity, from low to high. Effective task management requires managing all aspects of a task, including its status, priority, time, human and financial resources assignments, recurrence, dependency, notifications and so on. These can be lumped together broadly into the basic activities of task management. Managing multiple individuals or team tasks may be assisted by specialized software, for example workflow or project management software. Task management may form part of project management and process management and can serve as the foundation for efficient workflow in an organization. Project managers adhering to task-oriented management have a detailed and up-to-date project schedule, and are usually good at directing team members and moving the project forward. Task management 10. Continuous integration In software engineering, continuous integration (CI) is the practice of merging all developers' working copies to a shared mainline several times a day. Grady Booch first proposed the term CI in his 1991 method, although he did not advocate integrating several times a day. Extreme programming (XP) adopted the concept of CI and did advocate integrating more than once per day – perhaps as many as tens of times per day. Continuous integration 11. Wiki A wiki (/ˈwɪki/ WIK-ee) is a hypertext publication collaboratively edited and managed by its own audience directly using a web browser. A typical wiki contains multiple pages for the subjects or scope of the project and could be either open to the public or limited to use within an organization for maintaining its internal knowledge base. Wikis are enabled by wiki software, otherwise known as wiki engines. A wiki engine, being a form of a content management system, differs from other web-based systems such as blog software, in that the content is created without any defined owner or leader, and wikis have little inherent structure, allowing structure to emerge according to the needs of the users. Wiki engines usually allow content to be written using a simplified markup language and sometimes edited with the help of a rich-text editor. There are dozens of different wiki engines in use, both standalone and part of other software, such as bug tracking systems. Some wiki engines are open source, whereas others are proprietary. Some permit control over different functions (levels of access); for example, editing rights may permit changing, adding, or removing material. Others may permit access without enforcing access control. Other rules may be imposed to organize content. The online encyclopedia project, Wikipedia, is the most popular wiki-based website, and is one of the most widely viewed sites in the world, having been ranked in the top twenty since 2007. Wikipedia is not a single wiki but rather a collection of hundreds of wikis, with each one pertaining to a specific language. In addition to Wikipedia, there are hundreds of thousands of other wikis in use, both public and private, including wikis functioning as knowledge management resources, notetaking tools, community websites, and intranets. The English-language Wikipedia has the largest collection of articles: as of February 2020, it has over 6 million articles. Ward Cunningham, the developer of the first wiki software, WikiWikiWeb, originally described wiki as "the simplest online database that could possibly work." "Wiki" is a Hawaiian word meaning "quick." Wiki 12. Open source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use the source code, design documents, or content of the product. It most commonly refers to the open-source model, in which open-source software or other products are released under an open-source license as part of the open-source-software movement. Use of the term originated with software, but has expanded beyond the software sector to cover other open content and forms of open collaboration. Open source 13. Repository (version control) In revision control systems, a repository is a data structure that stores metadata for a set of files or directory structure. Depending on whether the version control system in use is distributed like (Git or Mercurial) or centralized like (Subversion, CVS, or Perforce), the whole set of information in the repository may be duplicated on every user's system or may be maintained on a single server. Some of the metadata that a repository contains includes, among other things: 13.1. A historical record of changes in the repository. 13.2. A set of commit objects. 13.3. A set of references to commit objects, called heads. Repository (version control) 14. GitHub Actions Automate your workflow from idea to production. GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub. Make code reviews, branch management, and issue triaging work the way you want. Ref 15.1: GitHub Actions Automate, customize, and execute your software development workflows right in your repository with GitHub Actions. You can discover, create, and share actions to perform any job you'd like, including CI/CD, and combine actions in a completely customized workflow. Ref 15.2: GitHub Actions - Docs Ref 15.3: YouTube 15. Source code In computing, source code is any collection of code, with or without comments, written using a human-readable programming language, usually as plain text. The source code of a program is specially designed to facilitate the work of computer programmers, who specify the actions to be performed by a computer mostly by writing source code. The source code is often transformed by an assembler or compiler into binary machine code that can be executed by the computer. The machine code might then be stored for execution at a later time. Alternatively, source code may be interpreted and thus immediately executed. Most application software is distributed in a form that includes only executable files. If the source code were included it would be useful to a user, programmer or a system administrator, any of whom might wish to study or modify the program. Source code Tags: Technology,Cloud,GitHub,

Activating MFA on Heroku (May 2021)



1 - MFA on Heroku (a Salesforce company)
2 - Connect an Authenticator app
3 - Microsoft Authenticator App (Download Screenshot)
4 - Heroku screen after multifactor authentication is done
Tags: Cyber Security,Cloud,Technology,

Thursday, May 20, 2021

Censorship in India, Torrenting and Tor Browser



We were looking for a 1997 movie "Good Will Hunting" in ".mp4" format because my Sony Bravia Smart TV does not accept some other video file formats such ".webm" (See more about "webm" in End Note) and see how we solved this problem:

Note: Third link in top 10 results in Google search solved our requirement.

I1 - Good Will Hunting - Google Search
I2 - Magnet Link Site (The Second Link in Google Search Results) but it did not work. Downloaded some garbage video file that did not run in VLC media player.
I3 - The garbage files being downloaded with 'second search result' in qBitTorrent
I4 - The video file fails to open in VLC media player Important Note: Along with video file, a Windows Batch program (.bat file) was also downloaded. This is a very good indication that something is fishy about this magnet link and these files.
I5 - first search result and censorship in India - ytstvmovies.xyz - failed to open in Firefox with Airtel connection
I6 - first search result and censorship in India - ytstvmovies.xyz - failed to open in Chrome with Airtel connection
I7 - first search result and censorship in India - ytstvmovies.xyz - failed to open in Tor with Airtel connection
I8 - third search result and censorship in India - yifytorrentme - failed to open in Firefox with Airtel connection
I9 - third search result and censorship in India - yifytorrentme.com - failed to open in Chrome with Airtel connection
I10 - third search result and censorship overridden with Tor Browser - yifytorrentme.com - opened in Tor with Airtel connection
I11 - yifytorrentme.com - Found the movie using Tor and do check the ads on the site (Do not click any)
I12 - yifytorrentme.com - Download begins by copy-pasting the Magnet link in qBit

End Note

WebM is an audiovisual media file format. It is primarily intended to offer a royalty-free alternative to use in the HTML5 video and the HTML5 audio elements. It has a sister project WebP for images. The development of the format is sponsored by Google, and the corresponding software is distributed under a BSD license. The WebM container is based on a profile of Matroska. WebM initially supported VP8 video and Vorbis audio streams. In 2013, it was updated to accommodate VP9 video and Opus audio. [ Ref 1 ] About WebM WebM is an open, royalty-free, media file format designed for the web. WebM defines the file container structure, video and audio formats. WebM files consist of video streams compressed with the VP8 or VP9 video codecs and audio streams compressed with the Vorbis or Opus audio codecs. The WebM file structure is based on the Matroska container. [ Ref 2 ] [ Ref 3 - YouTube ] Tags: Technology,Cyber Security,Indian Politics,Politics,Web Development,Web Scraping,