Monday, May 31, 2021

pip's dependency resolver and dependency conflicts, also logs from pipdeptree



We have two YAML files:

1. rasa_env.yml

name: rasa_env
channels:
- conda-forge
dependencies:
- spacy
- python=3.8
- pip
- pipdeptree

2. snorkel_env.yml

name: snorkel_env
channels:
- conda-forge
dependencies:
- python=3.8
- pip
- pipdeptree
- snorkel

(base) CMD>conda env list

# conda environments:
#
base                  *  e:\Anaconda3
env_py_36                e:\Anaconda3\envs\env_py_36
pegasus                  e:\Anaconda3\envs\pegasus
py39                     e:\Anaconda3\envs\py39
selenium                 e:\Anaconda3\envs\selenium
string_env               e:\Anaconda3\envs\string_env
tf                       e:\Anaconda3\envs\tf 

(base) ~>DOSKEY ls=dir /b
(base) ~>ls

rasa_env.yml
snorkel_env.yml

(base) ~>conda env create -f rasa_env.yml

Collecting package metadata (repodata.json): done
Solving environment: done

Downloading and Extracting Packages
numpy-1.20.3         | 5.3 MB    | # | 100%
cython-blis-0.7.4    | 5.6 MB    | # | 100%
protobuf-3.17.1      | 260 KB    | # | 100%
cryptography-3.4.7   | 706 KB    | # | 100%
multidict-5.1.0      | 63 KB     | # | 100%
grpcio-1.38.0        | 2.0 MB    | # | 100%
botocore-1.20.84     | 4.7 MB    | # | 100%
python-3.8.10        | 19.3 MB   | # | 100%
pydantic-1.7.3       | 164 KB    | # | 100%
preshed-3.0.5        | 97 KB     | # | 100%
setuptools-49.6.0    | 962 KB    | # | 100%
murmurhash-1.0.5     | 26 KB     | # | 100%
wincertstore-0.2     | 15 KB     | # | 100%
aiohttp-3.7.4        | 596 KB    | # | 100%
spacy-3.0.6          | 9.2 MB    | # | 100%
googleapis-common-pr | 125 KB    | # | 100%
markupsafe-2.0.1     | 25 KB     | # | 100%
pysocks-1.7.1        | 28 KB     | # | 100%
yarl-1.5.1           | 136 KB    | # | 100%
click-8.0.1          | 146 KB    | # | 100%
catalogue-2.0.4      | 31 KB     | # | 100%
thinc-8.0.3          | 936 KB    | # | 100%
srsly-2.4.1          | 517 KB    | # | 100%
libprotobuf-3.17.1   | 2.3 MB    | # | 100%
urllib3-1.26.5       | 99 KB     | # | 100%
brotlipy-0.7.0       | 368 KB    | # | 100%
tqdm-4.61.0          | 80 KB     | # | 100%
cffi-1.14.5          | 228 KB    | # | 100%
boto3-1.17.84        | 70 KB     | # | 100%
cymem-2.0.5          | 40 KB     | # | 100%
chardet-4.0.0        | 224 KB    | # | 100%
jinja2-3.0.1         | 99 KB     | # | 100%
pip-21.1.2           | 1.1 MB    | # | 100%
google-crc32c-1.1.2  | 27 KB     | # | 100%
win_inet_pton-1.1.0  | 8 KB      | # | 100%
Preparing transaction: done
... 
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#     $ conda activate rasa_env
# To deactivate an active environment, use
#     $ conda deactivate

=== === === === === === === === === ===

(base) ~>conda env create -f snorkel_env.yml
Collecting package metadata (repodata.json): done
Solving environment: done

Downloading and Extracting Packages
munkres-1.1.4        | 12 KB     | # | 100%
scikit-learn-0.24.2  | 6.6 MB    | # | 100%
mkl-service-2.3.0    | 51 KB     | # | 100%
networkx-2.3         | 1.1 MB    | # | 100%
importlib-metadata-4 | 31 KB     | # | 100%
absl-py-0.12.0       | 96 KB     | # | 100%
markdown-3.3.4       | 67 KB     | # | 100%
pytorch-1.4.0        | 81.0 MB   | # | 100%
scipy-1.6.3          | 23.3 MB   | # | 100%
tensorboard-1.15.0   | 3.8 MB    | # | 100%
ninja-1.10.2         | 273 KB    | # | 100%
numpy-1.19.5         | 4.9 MB    | # | 100%
werkzeug-2.0.1       | 219 KB    | # | 100%
snorkel-0.9.7        | 93 KB     | # | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#     $ conda activate snorkel_env
# To deactivate an active environment, use
#     $ conda deactivate

(base) ~>

=== === === === === === === === === ===

(base) ~>conda env list
# conda environments:
#
base                  *  e:\Anaconda3
env_py_36                e:\Anaconda3\envs\env_py_36
py39                     e:\Anaconda3\envs\py39
rasa_env                 e:\Anaconda3\envs\rasa_env 
selenium                 e:\Anaconda3\envs\selenium
snorkel_env              e:\Anaconda3\envs\snorkel_env 
string_env               e:\Anaconda3\envs\string_env
tf                       e:\Anaconda3\envs\tf

=== === === === === === === === === ===

'pipdeptree' Logs Before Installing Rasa

(base) C:\Users\Ashish Jain>conda activate snorkel_env (snorkel_env) C:\Users\Ashish Jain>pipdeptree -r -p rasa (snorkel_env) C:\Users\Ashish Jain>pipdeptree -r -p snorkel snorkel==0.9.7 (snorkel_env) C:\Users\Ashish Jain> === === === === === === === === === ===

OSError: [WinError 5] Access is denied: When Trying to Install Rasa Without "--user" Argument

(rasa_env) ~>pip install rasa Collecting rasa ... ERROR: Could not install packages due to an OSError: [WinError 5] Access is denied: 'e:\\programfiles\\anaconda3\\envs\\rasa_env\\scripts\\tqdm.exe' Consider using the `--user` option or check the permissions. (rasa_env) ~> === === === === === === === === === ===

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour can be source of dependency conflicts.

(base) C:\Users\Ashish Jain>conda activate snorkel_env (snorkel_env) C:\Users\Ashish Jain>pip install rasa --user Requirement already satisfied: rasa in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (2.6.3) Requirement already satisfied: SQLAlchemy<1.4.0,>=1.3.3 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (1.3.24) Requirement already satisfied: fbmessenger<6.1.0,>=6.0.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (6.0.0) Collecting sanic<21.0.0,>=19.12.2 Using cached sanic-20.12.3-py3-none-any.whl (80 kB) Requirement already satisfied: matplotlib<3.4,>=3.1 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (3.3.4) Requirement already satisfied: absl-py<0.13,>=0.9 in e:\anaconda3\envs\snorkel_env\lib\site-packages (from rasa) (0.12.0) Collecting colorama<0.5.0,>=0.4.4 Using cached colorama-0.4.4-py2.py3-none-any.whl (16 kB) Requirement already satisfied: scikit-learn<0.25,>=0.22 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (0.24.2) Requirement already satisfied: rasa-sdk<3.0.0,>=2.6.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (2.6.0) Collecting aiohttp!=3.7.4.post0,<3.8,>=3.6 Downloading aiohttp-3.7.4-cp38-cp38-win_amd64.whl (635 kB) |█| 635 kB 437 kB/s Requirement already satisfied: pykwalify<1.9,>=1.7 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (1.8.0) Requirement already satisfied: python-engineio!=5.0.0,<6,>=4 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (4.2.0) Requirement already satisfied: oauth2client==4.1.3 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (4.1.3) Collecting packaging<21.0,>=20.0 Downloading packaging-20.9-py2.py3-none-any.whl (40 kB) |█| 40 kB 657 kB/s Requirement already satisfied: aio-pika<7.0.0,>=6.7.1 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (6.8.0) Requirement already satisfied: tensorflow-estimator<2.4,>=2.3 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (2.3.0) Requirement already satisfied: tensorflow_hub<0.11,>=0.10 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (0.10.0) Requirement already satisfied: jsonschema<3.3,>=3.2 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (3.2.0) Requirement already satisfied: questionary<1.10.0,>=1.5.1 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (1.9.0) Requirement already satisfied: python-socketio<6,>=4.4 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (5.3.0) Requirement already satisfied: tensorflow-addons<=0.12,>=0.10 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (0.12.0) Requirement already satisfied: colorclass<2.3,>=2.2 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (2.2.0) Requirement already satisfied: colorhash<1.1.0,>=1.0.2 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (1.0.3) Requirement already satisfied: sanic-cors<0.11.0,>=0.10.0b1 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (0.10.0.post3) Requirement already satisfied: tqdm<4.60,>=4.31 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (4.59.0) Requirement already satisfied: pymongo[srv,tls]<3.11,>=3.8 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (3.10.1) Requirement already satisfied: rocketchat_API<1.16.0,>=0.6.31 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (1.15.0) Requirement already satisfied: sanic-jwt<2.0,>=1.3.2 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (1.5.0) Collecting numpy<1.19,>=1.16 Using cached numpy-1.18.5-cp38-cp38-win_amd64.whl (12.8 MB) Requirement already satisfied: async_generator<1.11,>=1.10 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (1.10) Requirement already satisfied: joblib<0.16.0,>=0.15.1 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (0.15.1) Requirement already satisfied: mattermostwrapper<2.3,>=2.2 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (2.2) Requirement already satisfied: regex<2020.10,>=2020.6 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (2020.9.27) Collecting requests<3.0,>=2.23 Downloading requests-2.25.1-py2.py3-none-any.whl (61 kB) |█| 61 kB 773 kB/s Requirement already satisfied: networkx<2.6,>=2.4 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (2.5.1) Requirement already satisfied: coloredlogs<16,>=10 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (15.0) Requirement already satisfied: psycopg2-binary<2.9.0,>=2.8.2 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (2.8.6) Requirement already satisfied: PyJWT[crypto]<3.0.0,>=2.0.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (2.1.0) Requirement already satisfied: ruamel.yaml<0.17.0,>=0.16.5 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (0.16.13) Requirement already satisfied: sklearn-crfsuite<0.4,>=0.3 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (0.3.6) Requirement already satisfied: tensorflow<2.4,>=2.3 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (2.3.2) Requirement already satisfied: jsonpickle<2.1,>=1.3 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (2.0.0) Requirement already satisfied: prompt-toolkit<3.0,>=2.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (2.0.10) Requirement already satisfied: scipy<2.0.0,>=1.4.1 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (1.6.3) Requirement already satisfied: sentry-sdk<0.20.0,>=0.17.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (0.19.5) Requirement already satisfied: terminaltables<3.2.0,>=3.1.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (3.1.0) Requirement already satisfied: apscheduler<3.8,>=3.6 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (3.7.0) Requirement already satisfied: redis<4.0,>=3.4 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (3.5.3) Requirement already satisfied: setuptools>=41.0.0 in e:\anaconda3\envs\snorkel_env\lib\site-packages (from rasa) (49.6.0.post20210108) Requirement already satisfied: slackclient<3.0.0,>=2.0.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (2.9.3) Requirement already satisfied: webexteamssdk<1.7.0,>=1.1.1 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (1.6) Requirement already satisfied: pydot<1.5,>=1.4 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (1.4.2) Requirement already satisfied: cloudpickle<1.7,>=1.2 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (1.6.0) Requirement already satisfied: kafka-python<3.0,>=1.4 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (2.0.2) Collecting attrs<20.4,>=19.3 Using cached attrs-20.3.0-py2.py3-none-any.whl (49 kB) Requirement already satisfied: python-dateutil<2.9,>=2.8 in e:\anaconda3\envs\snorkel_env\lib\site-packages (from rasa) (2.8.1) Requirement already satisfied: tensorflow-probability<0.12,>=0.11 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (0.11.1) Requirement already satisfied: twilio<6.51,>=6.26 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (6.50.1) Requirement already satisfied: ujson<5.0,>=1.35 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (4.0.2) Collecting boto3<2.0,>=1.12 Downloading boto3-1.17.84-py2.py3-none-any.whl (131 kB) |█| 131 kB 1.3 MB/s Requirement already satisfied: pyTelegramBotAPI<4.0.0,>=3.7.3 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from rasa) (3.7.9) Requirement already satisfied: pytz<2022.0,>=2019.1 in e:\anaconda3\envs\snorkel_env\lib\site-packages (from rasa) (2021.1) Collecting rsa>=3.1.4 Downloading rsa-4.7.2-py3-none-any.whl (34 kB) Collecting pyasn1>=0.1.7 Using cached pyasn1-0.4.8-py2.py3-none-any.whl (77 kB) Requirement already satisfied: six>=1.6.1 in e:\anaconda3\envs\snorkel_env\lib\site-packages (from oauth2client==4.1.3->rasa) (1.16.0) Requirement already satisfied: httplib2>=0.9.1 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from oauth2client==4.1.3->rasa) (0.19.1) Collecting pyasn1-modules>=0.0.5 Using cached pyasn1_modules-0.2.8-py2.py3-none-any.whl (155 kB) Collecting yarl Downloading yarl-1.6.3-cp38-cp38-win_amd64.whl (125 kB) |█| 125 kB 1.3 MB/s Requirement already satisfied: aiormq<4,>=3.2.3 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from aio-pika<7.0.0,>=6.7.1->rasa) (3.3.1) Collecting typing-extensions>=3.6.5 Downloading typing_extensions-3.10.0.0-py3-none-any.whl (26 kB) Collecting chardet<4.0,>=2.0 Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB) Collecting async-timeout<4.0,>=3.0 Downloading async_timeout-3.0.1-py3-none-any.whl (8.2 kB) Collecting multidict<7.0,>=4.5 Downloading multidict-5.1.0-cp38-cp38-win_amd64.whl (48 kB) |█| 48 kB 564 kB/s Collecting pamqp==2.3.0 Using cached pamqp-2.3.0-py2.py3-none-any.whl (28 kB) Collecting tzlocal~=2.0 Using cached tzlocal-2.1-py2.py3-none-any.whl (16 kB) Collecting jmespath<1.0.0,>=0.7.1 Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB) Collecting botocore<1.21.0,>=1.20.84 Downloading botocore-1.20.84-py2.py3-none-any.whl (7.6 MB) |█| 7.6 MB 3.3 MB/s Collecting s3transfer<0.5.0,>=0.4.0 Downloading s3transfer-0.4.2-py2.py3-none-any.whl (79 kB) |█| 79 kB 517 kB/s Collecting urllib3<1.27,>=1.25.4 Downloading urllib3-1.26.5-py2.py3-none-any.whl (138 kB) |█| 138 kB 6.4 MB/s Collecting humanfriendly>=9.1 Using cached humanfriendly-9.1-py2.py3-none-any.whl (86 kB) Collecting pyparsing<3,>=2.4.2 Using cached pyparsing-2.4.7-py2.py3-none-any.whl (67 kB) Collecting pyreadline Using cached pyreadline-2.1-py3-none-any.whl Requirement already satisfied: pyrsistent>=0.14.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from jsonschema<3.3,>=3.2->rasa) (0.17.3) Requirement already satisfied: cycler>=0.10 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from matplotlib<3.4,>=3.1->rasa) (0.10.0) Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from matplotlib<3.4,>=3.1->rasa) (1.3.1) Requirement already satisfied: pillow>=6.2.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from matplotlib<3.4,>=3.1->rasa) (8.2.0) Requirement already satisfied: decorator<5,>=4.3 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from networkx<2.6,>=2.4->rasa) (4.4.2) Collecting wcwidth Using cached wcwidth-0.2.5-py2.py3-none-any.whl (30 kB) Collecting cryptography<4.0.0,>=3.3.1 Downloading cryptography-3.4.7-cp36-abi3-win_amd64.whl (1.6 MB) |█| 1.6 MB 1.7 MB/s Requirement already satisfied: cffi>=1.12 in e:\anaconda3\envs\snorkel_env\lib\site-packages (from cryptography<4.0.0,>=3.3.1->PyJWT[crypto]<3.0.0,>=2.0.0->rasa) (1.14.5) Requirement already satisfied: pycparser in e:\anaconda3\envs\snorkel_env\lib\site-packages (from cffi>=1.12->cryptography<4.0.0,>=3.3.1->PyJWT[crypto]<3.0.0,>=2.0.0->rasa) (2.20) Requirement already satisfied: docopt>=0.6.2 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from pykwalify<1.9,>=1.7->rasa) (0.6.2) Requirement already satisfied: dnspython<2.0.0,>=1.16.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from pymongo[srv,tls]<3.11,>=3.8->rasa) (1.16.0) Requirement already satisfied: bidict>=0.21.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from python-socketio<6,>=4.4->rasa) (0.21.2) Requirement already satisfied: certifi>=2017.4.17 in e:\anaconda3\envs\snorkel_env\lib\site-packages (from requests<3.0,>=2.23->rasa) (2020.12.5) Collecting idna<3,>=2.5 Using cached idna-2.10-py2.py3-none-any.whl (58 kB) Collecting ruamel.yaml.clib>=0.1.2 Using cached ruamel.yaml.clib-0.2.2-cp38-cp38-win_amd64.whl (120 kB) Collecting httptools>=0.0.10 Using cached httptools-0.2.0-cp38-cp38-win_amd64.whl (141 kB) Collecting httpx==0.15.4 Using cached httpx-0.15.4-py3-none-any.whl (65 kB) Collecting aiofiles>=0.6.0 Using cached aiofiles-0.7.0-py3-none-any.whl (13 kB) Collecting websockets<9.0,>=8.1 Using cached websockets-8.1-cp38-cp38-win_amd64.whl (66 kB) Collecting httpcore==0.11.* Using cached httpcore-0.11.1-py3-none-any.whl (52 kB) Collecting rfc3986[idna2008]<2,>=1.3 Using cached rfc3986-1.5.0-py2.py3-none-any.whl (31 kB) Collecting sniffio Using cached sniffio-1.2.0-py3-none-any.whl (10 kB) Collecting h11<0.10,>=0.8 Using cached h11-0.9.0-py2.py3-none-any.whl (53 kB) Collecting sanic-plugins-framework>=0.9.0 Using cached Sanic_Plugins_Framework-0.9.5-py2.py3-none-any.whl (23 kB) Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from scikit-learn<0.25,>=0.22->rasa) (2.1.0) Requirement already satisfied: python-crfsuite>=0.8.3 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from sklearn-crfsuite<0.4,>=0.3->rasa) (0.9.7) Requirement already satisfied: tabulate in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from sklearn-crfsuite<0.4,>=0.3->rasa) (0.8.9) Requirement already satisfied: astunparse==1.6.3 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from tensorflow<2.4,>=2.3->rasa) (1.6.3) Requirement already satisfied: opt-einsum>=2.3.2 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from tensorflow<2.4,>=2.3->rasa) (3.3.0) Requirement already satisfied: google-pasta>=0.1.8 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from tensorflow<2.4,>=2.3->rasa) (0.2.0) Requirement already satisfied: gast==0.3.3 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from tensorflow<2.4,>=2.3->rasa) (0.3.3) Requirement already satisfied: wheel>=0.26 in e:\anaconda3\envs\snorkel_env\lib\site-packages (from tensorflow<2.4,>=2.3->rasa) (0.36.2) Requirement already satisfied: grpcio>=1.8.6 in e:\anaconda3\envs\snorkel_env\lib\site-packages (from tensorflow<2.4,>=2.3->rasa) (1.38.0) Requirement already satisfied: h5py<2.11.0,>=2.10.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from tensorflow<2.4,>=2.3->rasa) (2.10.0) Requirement already satisfied: protobuf>=3.9.2 in e:\anaconda3\envs\snorkel_env\lib\site-packages (from tensorflow<2.4,>=2.3->rasa) (3.17.1) Requirement already satisfied: termcolor>=1.1.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from tensorflow<2.4,>=2.3->rasa) (1.1.0) Collecting wrapt>=1.11.1 Using cached wrapt-1.12.1-cp38-cp38-win_amd64.whl Requirement already satisfied: tensorboard<3,>=2.3.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from tensorflow<2.4,>=2.3->rasa) (2.5.0) Requirement already satisfied: keras-preprocessing<1.2,>=1.1.1 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from tensorflow<2.4,>=2.3->rasa) (1.1.2) Requirement already satisfied: markdown>=2.6.8 in e:\anaconda3\envs\snorkel_env\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow<2.4,>=2.3->rasa) (3.3.4) Collecting tensorboard-data-server<0.7.0,>=0.6.0 Using cached tensorboard_data_server-0.6.1-py3-none-any.whl (2.4 kB) Requirement already satisfied: werkzeug>=0.11.15 in e:\anaconda3\envs\snorkel_env\lib\site-packages (from tensorboard<3,>=2.3.0->tensorflow<2.4,>=2.3->rasa) (2.0.1) Collecting google-auth<2,>=1.6.3 Downloading google_auth-1.30.1-py2.py3-none-any.whl (146 kB) |█| 146 kB 3.3 MB/s Collecting tensorboard-plugin-wit>=1.6.0 Using cached tensorboard_plugin_wit-1.8.0-py3-none-any.whl (781 kB) Collecting google-auth-oauthlib<0.5,>=0.4.1 Using cached google_auth_oauthlib-0.4.4-py2.py3-none-any.whl (18 kB) Collecting cachetools<5.0,>=2.0.0 Downloading cachetools-4.2.2-py3-none-any.whl (11 kB) Collecting requests-oauthlib>=0.7.0 Using cached requests_oauthlib-1.3.0-py2.py3-none-any.whl (23 kB) Collecting oauthlib>=3.0.0 Using cached oauthlib-3.1.0-py2.py3-none-any.whl (147 kB) Collecting typeguard>=2.7 Using cached typeguard-2.12.0-py3-none-any.whl (16 kB) Requirement already satisfied: dm-tree in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from tensorflow-probability<0.12,>=0.11->rasa) (0.1.6) Requirement already satisfied: requests-toolbelt in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from webexteamssdk<1.7.0,>=1.1.1->rasa) (0.9.1) Requirement already satisfied: future in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from webexteamssdk<1.7.0,>=1.1.1->rasa) (0.18.2) Installing collected packages: sniffio, rfc3986, idna, h11, urllib3, pyasn1, httpcore, chardet, websockets, rsa, requests, pyasn1-modules, oauthlib, multidict, httpx, httptools, cachetools, aiofiles, sanic, requests-oauthlib, pyreadline, jmespath, google-auth, yarl, wcwidth, typing-extensions, tensorboard-plugin-wit, tensorboard-data-server, sanic-plugins-framework, ruamel.yaml.clib, pyparsing, pamqp, numpy, humanfriendly, google-auth-oauthlib, botocore, attrs, async-timeout, wrapt, tzlocal, typeguard, s3transfer, cryptography, aiohttp, packaging, colorama, boto3

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. snorkel 0.9.7 requires networkx<2.4,>=2.2, but you have networkx 2.5.1 which is incompatible. snorkel 0.9.7 requires tensorboard<2.0.0,>=1.14.0, but you have tensorboard 2.5.0 which is incompatible.

Successfully installed aiofiles-0.7.0 aiohttp-3.7.4 async-timeout-3.0.1 attrs-20.3.0 boto3-1.17.84 botocore-1.20.84 cachetools-4.2.2 chardet-3.0.4 colorama-0.4.4 cryptography-3.4.7 google-auth-1.30.1 google-auth-oauthlib-0.4.4 h11-0.9.0 httpcore-0.11.1 httptools-0.2.0 httpx-0.15.4 humanfriendly-9.1 idna-2.10 jmespath-0.10.0 multidict-5.1.0 numpy-1.18.5 oauthlib-3.1.0 packaging-20.9 pamqp-2.3.0 pyasn1-0.4.8 pyasn1-modules-0.2.8 pyparsing-2.4.7 pyreadline-2.1 requests-2.25.1 requests-oauthlib-1.3.0 rfc3986-1.5.0 rsa-4.7.2 ruamel.yaml.clib-0.2.2 s3transfer-0.4.2 sanic-20.12.3 sanic-plugins-framework-0.9.5 sniffio-1.2.0 tensorboard-data-server-0.6.1 tensorboard-plugin-wit-1.8.0 typeguard-2.12.0 typing-extensions-3.10.0.0 tzlocal-2.1 urllib3-1.26.5 wcwidth-0.2.5 websockets-8.1 wrapt-1.12.1 yarl-1.6.3 (snorkel_env) C:\Users\Ashish Jain>pip show rasa Name: rasa Version: 2.6.3 Summary: Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants Home-page: https://rasa.com Author: Rasa Technologies GmbH Author-email: hi@rasa.com License: Apache-2.0 Location: c:\users\ashish jain\appdata\roaming\python\python38\site-packages Requires: python-socketio, async-generator, tqdm, requests, matplotlib, sentry-sdk, sklearn-crfsuite, scikit-learn, twilio, pytz, ruamel.yaml, jsonpickle, mattermostwrapper, prompt-toolkit, cloudpickle, networkx, packaging, rocketchat-API, colorhash, tensorflow, fbmessenger, psycopg2-binary, pymongo, PyJWT, rasa-sdk, tensorflow-addons, regex, python-engineio, webexteamssdk, oauth2client, pydot, python-dateutil, sanic-jwt, tensorflow-hub, joblib, pyTelegramBotAPI, boto3, pykwalify, tensorflow-estimator, apscheduler, attrs, kafka-python, redis, sanic, tensorflow-probability, SQLAlchemy, questionary, ujson, aio-pika, terminaltables, scipy, colorama, colorclass, sanic-cors, absl-py, coloredlogs, jsonschema, numpy, setuptools, slackclient, aiohttp Required-by: (snorkel_env) C:\Users\Ashish Jain>pip show snorkel Name: snorkel Version: 0.9.7 Summary: A system for quickly generating training data with weak supervision Home-page: https://github.com/snorkel-team/snorkel Author: None Author-email: None License: Apache License 2.0 Location: e:\anaconda3\envs\snorkel_env\lib\site-packages Requires: numpy, networkx, scikit-learn, tqdm, torch, munkres, scipy, tensorboard, pandas Required-by: (snorkel_env) C:\Users\Ashish Jain>rasa usage: rasa [-h] [--version] {init,run,shell,train,interactive,telemetry,test,visualize,data,export,x} ... Rasa command line interface. Rasa allows you to build your own conversational assistants 🤖. The 'rasa' command allows you to easily run most common commands like creating a new bot, training or evaluating models. positional arguments: {init,run,shell,train,interactive,telemetry,test,visualize,data,export,x} Rasa commands init Creates a new project, with example training data, actions, and config files. run Starts a Rasa server with your trained model. shell Loads your trained model and lets you talk to your assistant on the command line. train Trains a Rasa model using your NLU data and stories. interactive Starts an interactive learning session to create new training data for a Rasa model by chatting. telemetry Configuration of Rasa Open Source telemetry reporting. test Tests Rasa models using your test NLU data and stories. visualize Visualize stories. data Utils for the Rasa training files. export Export conversations using an event broker. optional arguments: -h, --help show this help message and exit --version Print installed Rasa version

Trying 'rasa init' in 'snorkel_env'.

(snorkel_env) ~\test>rasa init Welcome to Rasa! 🤖 To get started quickly, an initial project will be created. If you need some help, check out the documentation at https://rasa.com/docs/rasa. Now let's start! 👇🏽 ? Please enter a path where the project will be created [default: current directory] Created project directory at '~\test'. Finished creating project structure. ? Do you want to train an initial model? 💪🏽 No No problem 👍🏼. You can also train a model later by going to the project directory and running 'rasa train'. (snorkel_env) ~\test>dir /b actions config.yml credentials.yml data domain.yml endpoints.yml tests (snorkel_env) ~\test> === === === === === === === === === === (rasa_env) ~>pip install snorkel WARNING: Ignoring invalid distribution -qdm (e:\anaconda3\envs\rasa_env\lib\site-packages) WARNING: Ignoring invalid distribution -qdm (e:\anaconda3\envs\rasa_env\lib\site-packages) Collecting snorkel Downloading snorkel-0.9.7-py3-none-any.whl (145 kB) |█| 145 kB 819 kB/s Collecting torch<2.0.0,>=1.2.0 Downloading torch-1.8.1-cp38-cp38-win_amd64.whl (190.5 MB) |█| 190.5 MB 27 kB/s Requirement already satisfied: numpy<1.20.0,>=1.16.5 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from snorkel) (1.18.5) Collecting tensorboard<2.0.0,>=1.14.0 Downloading tensorboard-1.15.0-py3-none-any.whl (3.8 MB) |█| 3.8 MB 3.3 MB/s Collecting munkres>=1.0.6 Downloading munkres-1.1.4-py2.py3-none-any.whl (7.0 kB) Collecting pandas<2.0.0,>=1.0.0 Downloading pandas-1.2.4-cp38-cp38-win_amd64.whl (9.3 MB) |█| 9.3 MB 1.3 MB/s Requirement already satisfied: scipy<2.0.0,>=1.2.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from snorkel) (1.6.3) Requirement already satisfied: scikit-learn<0.25.0,>=0.20.2 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from snorkel) (0.24.2) Collecting networkx<2.4,>=2.2 Downloading networkx-2.3.zip (1.7 MB) |█| 1.7 MB 6.4 MB/s Requirement already satisfied: tqdm<5.0.0,>=4.33.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from snorkel) (4.59.0) Requirement already satisfied: decorator>=4.3.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from networkx<2.4,>=2.2->snorkel) (4.4.2) Requirement already satisfied: python-dateutil>=2.7.3 in e:\anaconda3\envs\rasa_env\lib\site-packages (from pandas<2.0.0,>=1.0.0->snorkel) (2.8.1) Requirement already satisfied: pytz>=2017.3 in e:\anaconda3\envs\rasa_env\lib\site-packages (from pandas<2.0.0,>=1.0.0->snorkel) (2021.1) Requirement already satisfied: six>=1.5 in e:\anaconda3\envs\rasa_env\lib\site-packages (from python-dateutil>=2.7.3->pandas<2.0.0,>=1.0.0->snorkel) (1.16.0) Requirement already satisfied: joblib>=0.11 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from scikit-learn<0.25.0,>=0.20.2->snorkel) (0.15.1) Requirement already satisfied: threadpoolctl>=2.0.0 in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from scikit-learn<0.25.0,>=0.20.2->snorkel) (2.1.0) Requirement already satisfied: absl-py>=0.4 in e:\anaconda3\envs\rasa_env\lib\site-packages (from tensorboard<2.0.0,>=1.14.0->snorkel) (0.12.0) Requirement already satisfied: werkzeug>=0.11.15 in e:\anaconda3\envs\rasa_env\lib\site-packages (from tensorboard<2.0.0,>=1.14.0->snorkel) (2.0.1) Requirement already satisfied: grpcio>=1.6.3 in e:\anaconda3\envs\rasa_env\lib\site-packages (from tensorboard<2.0.0,>=1.14.0->snorkel) (1.38.0) Requirement already satisfied: markdown>=2.6.8 in e:\anaconda3\envs\rasa_env\lib\site-packages (from tensorboard<2.0.0,>=1.14.0->snorkel) (3.3.4) Requirement already satisfied: wheel>=0.26 in e:\anaconda3\envs\rasa_env\lib\site-packages (from tensorboard<2.0.0,>=1.14.0->snorkel) (0.36.2) Requirement already satisfied: setuptools>=41.0.0 in e:\anaconda3\envs\rasa_env\lib\site-packages (from tensorboard<2.0.0,>=1.14.0->snorkel) (49.6.0.post20210108) Requirement already satisfied: protobuf>=3.6.0 in e:\anaconda3\envs\rasa_env\lib\site-packages (from tensorboard<2.0.0,>=1.14.0->snorkel) (3.17.1) Requirement already satisfied: typing-extensions in c:\users\ashish jain\appdata\roaming\python\python38\site-packages (from torch<2.0.0,>=1.2.0->snorkel) (3.10.0.0) Building wheels for collected packages: networkx Building wheel for networkx (setup.py) ... done Created wheel for networkx: filename=networkx-2.3-py2.py3-none-any.whl size=1555990 sha256=9c94f5d6e380e2cb594911807f48a2c5c51c956adf73361417786843daed01ba Stored in directory: c:\users\ashish jain\appdata\local\pip\cache\wheels\ff\62\9e\0ed2d25fd4f5761e2d19568cda0c32716556dfa682e65ecf64 Successfully built networkx WARNING: Ignoring invalid distribution -qdm (e:\anaconda3\envs\rasa_env\lib\site-packages) Installing collected packages: torch, tensorboard, pandas, networkx, munkres, snorkel Attempting uninstall: tensorboard Found existing installation: tensorboard 2.5.0 Uninstalling tensorboard-2.5.0: Successfully uninstalled tensorboard-2.5.0 Attempting uninstall: networkx Found existing installation: networkx 2.5.1 Uninstalling networkx-2.5.1: Successfully uninstalled networkx-2.5.1 WARNING: Ignoring invalid distribution -qdm (e:\anaconda3\envs\rasa_env\lib\site-packages) WARNING: Ignoring invalid distribution -qdm (e:\anaconda3\envs\rasa_env\lib\site-packages) WARNING: Ignoring invalid distribution -qdm (e:\anaconda3\envs\rasa_env\lib\site-packages) WARNING: Ignoring invalid distribution -qdm (e:\anaconda3\envs\rasa_env\lib\site-packages) WARNING: Ignoring invalid distribution -qdm (e:\anaconda3\envs\rasa_env\lib\site-packages) WARNING: Ignoring invalid distribution -qdm (e:\anaconda3\envs\rasa_env\lib\site-packages)

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts. tensorflow 2.3.2 requires tensorboard<3,>=2.3.0, but you have tensorboard 1.15.0 which is incompatible. rasa 2.6.3 requires networkx<2.6,>=2.4, but you have networkx 2.3 which is incompatible.

Successfully installed munkres-1.1.4 networkx-2.3 pandas-1.2.4 snorkel-0.9.7 tensorboard-1.15.0 torch-1.8.1 WARNING: Ignoring invalid distribution -qdm (e:\anaconda3\envs\rasa_env\lib\site-packages) WARNING: Ignoring invalid distribution -qdm (e:\anaconda3\envs\rasa_env\lib\site-packages) (rasa_env) ~> (rasa_env) ~>pip show rasa Name: rasa Version: 2.6.3 Summary: Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants Home-page: https://rasa.com Author: Rasa Technologies GmbH Author-email: hi@rasa.com License: Apache-2.0 Location: c:\users\ashish jain\appdata\roaming\python\python38\site-packages Requires: python-engineio, pymongo, colorama, webexteamssdk, attrs, matplotlib, aio-pika, oauth2client, setuptools, tensorflow-probability, terminaltables, sentry-sdk, ruamel.yaml, pykwalify, pydot, sklearn-crfsuite, tensorflow-hub, cloudpickle, sanic-jwt, questionary, sanic, python-dateutil, colorhash, networkx, jsonschema, boto3, redis, sanic-cors, aiohttp, coloredlogs, prompt-toolkit, twilio, kafka-python, rasa-sdk, jsonpickle, async-generator, psycopg2-binary, packaging, mattermostwrapper, colorclass, regex, slackclient, scipy, SQLAlchemy, scikit-learn, apscheduler, joblib, requests, pytz, absl-py, fbmessenger, tqdm, PyJWT, tensorflow-addons, ujson, python-socketio, rocketchat-API, numpy, tensorflow, pyTelegramBotAPI, tensorflow-estimator Required-by: (rasa_env) ~>pip show snorkel Name: snorkel Version: 0.9.7 Summary: A system for quickly generating training data with weak supervision Home-page: https://github.com/snorkel-team/snorkel Author: None Author-email: None License: Apache License 2.0 Location: e:\anaconda3\envs\rasa_env\lib\site-packages Requires: scikit-learn, tqdm, pandas, torch, scipy, tensorboard, networkx, munkres, numpy Required-by: (rasa_env) ~>rasa 'rasa' is not recognized as an internal or external command, operable program or batch file. (rasa_env) ~>rasa init 'rasa' is not recognized as an internal or external command, operable program or batch file. === === === === === === === === === === (snorkel_env) ~\ws>rasa init ┌────────────────────────────────────────────────────────────────────────────────┐ │ Rasa Open Source reports anonymous usage telemetry to help improve the product │ │ for all its users. │ │ │ │ If you'd like to opt-out, you can use `rasa telemetry disable`. │ │ To learn more, check out https://rasa.com/docs/rasa/telemetry/telemetry. │ └────────────────────────────────────────────────────────────────────────────────┘ Welcome to Rasa! 🤖 To get started quickly, an initial project will be created. If you need some help, check out the documentation at https://rasa.com/docs/rasa. Now let's start! 👇🏽 ? Please enter a path where the project will be created [default: current directory] Created project directory at '~\ws'. Finished creating project structure. ? Do you want to train an initial model? 💪🏽 No No problem 👍🏼. You can also train a model later by going to the project directory and running 'rasa train'. (snorkel_env) ~\ws>dir /b actions config.yml credentials.yml data domain.yml endpoints.yml tests === === === === === === === === === ===

Checking 'snorkel' installation in both the environments (snorkel_env and rasa_env)

(snorkel_env) ~\test>python Python 3.8.10 | packaged by conda-forge | (default, May 11 2021, 06:25:23) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import snorkel >>> exit() (snorkel_env) ~\test>conda deactivate (base) ~\test>conda activate rasa_env (rasa_env) ~\test>python Python 3.8.10 | packaged by conda-forge | (default, May 11 2021, 06:25:23) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import snorkel >>> exit()

Checking the output of "pipdeptree -r -p"

(base) C:\Users\Ashish Jain>conda activate rasa_env (rasa_env) C:\Users\Ashish Jain>pipdeptree -r -p rasa Ignoring invalid distribution -qdm (e:\programfiles\anaconda3\envs\rasa_env\lib\site-packages) Warning!!! Possibly conflicting dependencies found: * tensorflow==2.3.2 - tensorboard [required: >=2.3.0,<3, installed: 1.15.0] * rasa==2.6.3 - networkx [required: >=2.4,<2.6, installed: 2.3] * typer==0.3.1 - click [required: >=7.1.1,<7.2.0, installed: 8.0.1] ------------------------------------------------------------------------ rasa==2.6.3 (rasa_env) C:\Users\Ashish Jain>pipdeptree -r -p snorkel Ignoring invalid distribution -qdm (e:\programfiles\anaconda3\envs\rasa_env\lib\site-packages) Warning!!! Possibly conflicting dependencies found: * tensorflow==2.3.2 - tensorboard [required: >=2.3.0,<3, installed: 1.15.0] * rasa==2.6.3 - networkx [required: >=2.4,<2.6, installed: 2.3] * typer==0.3.1 - click [required: >=7.1.1,<7.2.0, installed: 8.0.1] ------------------------------------------------------------------------ snorkel==0.9.7 (rasa_env) C:\Users\Ashish Jain>conda deactivate (base) C:\Users\Ashish Jain>conda activate snorkel_env (snorkel_env) C:\Users\Ashish Jain>pipdeptree -r -p rasa Warning!!! Possibly conflicting dependencies found: * tensorflow==2.3.2 - tensorboard [required: >=2.3.0,<3, installed: 1.15.0] * rasa==2.6.3 - networkx [required: >=2.4,<2.6, installed: 2.3] ------------------------------------------------------------------------ rasa==2.6.3 (snorkel_env) C:\Users\Ashish Jain>pipdeptree -r -p snorkel Warning!!! Possibly conflicting dependencies found: * tensorflow==2.3.2 - tensorboard [required: >=2.3.0,<3, installed: 1.15.0] * rasa==2.6.3 - networkx [required: >=2.4,<2.6, installed: 2.3] ------------------------------------------------------------------------ snorkel==0.9.7 Tags: Anaconda,Python,Natural Language Processing,

Sunday, May 30, 2021

The Use of Spies (by Sun Tzu)


Sun Tzu said: Raising a host of a hundred thousand men and engaging them in war entails heavy loss on the people and a drain on the resources. The daily expenditure will amount to a thousand ounces of silver. There will be commotion at home and abroad, and men will drop out exhausted. Opposing forces may face each other for years, striving for the victory which may be decided in a single day. This being so, to remain in ignorance of the enemy’s condition simply because one grudges the outlay of a hundred ounces of silver is the height of stupidity. One who acts thus is no leader of men, no present help to his cause, no master of victory. Thus, what enables the wise commander to strike and conquer, and achieve things beyond the reach of ordinary men, is foreknowledge. Now this foreknowledge cannot be elicited from spirits; it cannot be obtained inductively from experience, nor by any deductive calculation. Knowledge of the enemy’s dispositions can only be obtained from other men. Hence the use of spies, of whom there are five classes: (1) Local spies — Having local spies means employing the services of the inhabitants of an enemy territory; (2) Moles — Having moles means making use of officials of the enemy; (3) Double agents — Having double agents means getting hold of the enemy’s spies and using them for our own purposes; (4) Doomed spies — Having doomed spies means doing certain things openly for purposes of deception, and allowing our spies to know of them and report them to the enemy; (5) Surviving spies — Surviving spies means are those who bring back news from the enemy’s camp. When these five kinds of spy are all at work, none can discover the secret system. This is called “divine manipulation of the threads”. It is the commander’s most precious faculty. Hence it is that which none in the whole army are more intimate relations to be maintained than with spies. None should be more liberally rewarded. In no other fields should greater secrecy be preserved. (1) Spies cannot be usefully employed without a certain intuitive sagacity; (2) They cannot be properly managed without benevolence and straight forwardness; (3) Without subtle ingenuity of mind, one cannot make certain of the truth of their reports; (4) Be subtle! be subtle! and use your spies for every kind of warfare; (5) If a secret piece of news is divulged by a spy before the time is ripe, he must be put to death together with the man to whom the secret was told. Whether the object be to crush an enemy, to storm a territory, or to kill an enemy general, it is always necessary to begin by finding out the names of the attendants, the aides-de-camp, and door-keepers and sentries of the general in command. Our spies must be commissioned to ascertain these. The enemy’s spies who have come to spy on us must be sought out, tempted with bribes, led away and comfortably housed. Thus they will become double agents and available for our service. It is through the information brought by the double agent that we are able to acquire and employ local and inward spies. It is owing to his information, again, that we can cause the doomed spy to carry false tidings to the enemy. Lastly, it is by his information that the surviving spy can be used on appointed occasions. The end and aim of spying in all its five varieties is knowledge of the enemy; and this knowledge can only be derived, in the first instance, from the double agent . Hence it is essential that the double agent be treated with the utmost liberality. Hence it is only the enlightened and wise general who will use the highest intelligence of the army for purposes of spying and thereby they achieve great results. Spies are the most important asset, because on them depends an army’s ability to march. Link to PDF: GitHub Tags: Indian Politics,Politics,Journal,Cyber Security,Management,

Friday, May 28, 2021

Meet Joseph Owaga



JOSEPH’S STORY (Dated: 22nd May, 2021)

1. TIMELINE

My name is Joseph Owaga, born on 8th Nov, 2002 to the couple Mr and Mrs Owaga, both Kenyan citizens by birth. I was brought up in a family of three boys and a girl who go by the names: George, Paul, Brian and Silvia. • EDUCATION BACKGROUND Being brought up in Kenya I went through the 8-4-4 education system where: 1.1. I began my schooling in the year 2008 and sat for my final primary paper in 2016 after the eight years of studies and scored a grade of B. 1.2. I then attended high school for 4 years then in early months of 2021 I sat for KCSE and also scored a grade of B. 1.3. The examination was to be done on November of 2020 but due to the Covid-19 pandemic it never happened as scheduled. 1.4. Currently, I am indoors doing little of computer work as I wait to proceed to the University for the next level of my career studies. 2. HOBBIES AND INTERESTS 2.1. I majorly read novels and short stories during my free time to come up with my summary of understanding about the book.
2.2. For body fitness I love football (soccer). 2.3. I also like coming up with new ideas.
2.4. Finally, I like having fun and hanging out with friends. Original: Finally I like having fun hunging up with friends
Tags: Kenya,Politics,Biography,Communication Skills,Success Story,

Thursday, May 27, 2021

Introduction to GitHub branching in 10 commands



Introduction to GitHub branching in 10 commands: 

1. git clone [repo_url]
2. git branch [-r] [-a]
3. git branch --set-upstream-to
4. git pull
5. git checkout [-b] [branch_name]
6. git push origin HEAD:[branch_name]
7. git switch -c [branch_name]
8. git log
9. git clone --branch [branch_name] [repo_url]
10. git push --set-upstream origin [branch_name]

Why concept of branching using an image:
Now the commands:

1. INITIAL SETUP USING "git clone"

CMD>git clone https://github.com/ashishjain1547/repo_for_testing.git Cloning into 'repo_for_testing'... Logon failed, use ctrl+c to cancel basic credential prompt. Username for 'https://github.com': aj@gmail.com Password for 'https://aj@gmail.com@github.com': remote: Enumerating objects: 8, done. remote: Counting objects: 100% (8/8), done. remote: Compressing objects: 100% (5/5), done. remote: Total 8 (delta 1), reused 4 (delta 1), pack-reused 0 Unpacking objects: 100% (8/8), 4.98 KiB | 10.00 KiB/s, done. CMD>dir /b repo_for_testing CMD>cd repo_for_testing CMD\repo_for_testing>dir /b .gitignore LICENSE newFile.txt README.md CMD\repo_for_testing> type newFile.txt NEWFILE

2. LIST ALL THE BRANCHES

git branch: shows the local branches git branch -r: shows the remote branches git branch -a: shows all the branches (both local and remote) ~\aj> git clone https://github.com/ashishjain1547/repo_for_testing.git Cloning into 'repo_for_testing'... remote: Enumerating objects: 14, done. remote: Counting objects: 100% (14/14), done. remote: Compressing objects: 100% (8/8), done. remote: Total 14 (delta 4), reused 8 (delta 2), pack-reused 0 Unpacking objects: 100% (14/14), 5.41 KiB | 5.00 KiB/s, done. ~\aj> cd repo_for_testing ~\aj\repo_for_testing> git branch * main ~\aj\repo_for_testing> git branch -r origin/HEAD -> origin/main origin/main origin/test_branch ~\aj\repo_for_testing> git branch -a * main remotes/origin/HEAD -> origin/main remotes/origin/main remotes/origin/test_branch ~\aj\repo_for_testing> git checkout -b test_branch Switched to a new branch 'test_branch' Note: If you already have a branch named "test_branch" in your local, then you would not pass the argument "-b". ~\aj\repo_for_testing> git branch main * test_branch ~\aj\repo_for_testing> git branch -r origin/HEAD -> origin/main origin/main origin/test_branch Note: we would not see any changes in the remote branches from "git checkout" command. ~\aj\repo_for_testing> git branch -a main * test_branch remotes/origin/HEAD -> origin/main remotes/origin/main remotes/origin/test_branch

3. SUPPOSE YOUR NEW REMOTE BRANCH IS NOT VISIBLE IN CMD USING "git branch -r", THEN TO LOAD NEW REMOTE BRANCH TO SHOW UP IN AN EXISTING LOCAL REPO, DO A 'GIT PULL'

CMD\repo_for_testing> git branch -r origin/HEAD -> origin/main origin/main CMD\repo_for_testing> git pull From https://github.com/ashishjain1547/repo_for_testing * [new branch] test_branch -> origin/test_branch Already up to date. CMD\repo_for_testing> git branch -r origin/HEAD -> origin/main origin/main origin/test_branch

4. CREATING A NEW LOCAL BRANCH 'test_branch', SETTING UPSTREAM BRANCH FOR IT AND ADDING A NEW FILE IN IT

~\aj> git clone https://github.com/ashishjain1547/repo_for_testing.git Cloning into 'repo_for_testing'... remote: Enumerating objects: 19, done. remote: Counting objects: 100% (19/19), done. remote: Compressing objects: 100% (11/11), done. remote: Total 19 (delta 6), reused 12 (delta 3), pack-reused 0 Unpacking objects: 100% (19/19), 5.92 KiB | 6.00 KiB/s, done. ~\aj> cd repo_for_testing ~\aj\repo_for_testing>git branch * main ~\aj\repo_for_testing> git branch -r origin/HEAD -> origin/main origin/main origin/test_branch ~\aj\repo_for_testing> git branch -a * main remotes/origin/HEAD -> origin/main remotes/origin/main remotes/origin/test_branch 'git checkout -b test_branch' CREATES A NEW LOCAL BRANCH NAMED 'test_branch' BECAUSE OF THE ARGUMENT '-b' ~\aj\repo_for_testing> git checkout -b test_branch Switched to a new branch 'test_branch' ~\aj\repo_for_testing>git branch main * test_branch ~\aj\repo_for_testing>git branch -r origin/HEAD -> origin/main origin/main origin/test_branch ~\aj\repo_for_testing> git branch -a main * test_branch remotes/origin/HEAD -> origin/main remotes/origin/main remotes/origin/test_branch ~\aj\repo_for_testing> dir Volume in drive C is Windows Volume Serial Number is 8139-90C0 Directory of ~\aj\repo_for_testing 07/14/2021 04:06 PM DIR> . 07/14/2021 04:06 PM DIR> .. 07/14/2021 04:06 PM 368 .gitignore 07/14/2021 04:06 PM 11,558 LICENSE 07/14/2021 04:06 PM 11 newFile.txt 07/14/2021 04:06 PM 38 README.md 07/14/2021 04:06 PM 23 test_file_20210528.txt 5 File(s) 11,998 bytes 2 Dir(s) 62,644,645,888 bytes free ~\aj\repo_for_testing> git branch --set-upstream-to=origin/test_branch test_branch Branch 'test_branch' set up to track remote branch 'test_branch' from 'origin'. ~\aj\repo_for_testing> git pull Updating daa4600..82c204f Fast-forward 20210528_test_branch.txt | 1 + 202107141543.txt | 1 + 2 files changed, 2 insertions(+) create mode 100644 20210528_test_branch.txt create mode 100644 202107141543.txt ~\aj\repo_for_testing> echo "202107141608" > 202107141608.txt ~\aj\repo_for_testing> dir Volume in drive C is Windows Volume Serial Number is 8139-90C0 Directory of ~\aj\repo_for_testing 07/14/2021 04:08 PM DIR> . 07/14/2021 04:08 PM DIR> .. 07/14/2021 04:06 PM 368 .gitignore 07/14/2021 04:08 PM 30 20210528_test_branch.txt 07/14/2021 04:08 PM 17 202107141543.txt 07/14/2021 04:08 PM 17 202107141608.txt 07/14/2021 04:06 PM 11,558 LICENSE 07/14/2021 04:06 PM 11 newFile.txt 07/14/2021 04:06 PM 38 README.md 07/14/2021 04:06 PM 23 test_file_20210528.txt 8 File(s) 12,062 bytes 2 Dir(s) 62,644,277,248 bytes free ~\aj\repo_for_testing>git status On branch test_branch Your branch is up to date with 'origin/test_branch'. Untracked files: (use "git add <file>..." to include in what will be committed) 202107141608.txt nothing added to commit but untracked files present (use "git add" to track) ~\aj\repo_for_testing> git add -A ~\aj\repo_for_testing> git commit -m "#" [test_branch 9017804] # 1 file changed, 1 insertion(+) create mode 100644 202107141608.txt ~\aj\repo_for_testing> git push Enumerating objects: 4, done. Counting objects: 100% (4/4), done. Delta compression using up to 4 threads Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 284 bytes | 142.00 KiB/s, done. Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (1/1), completed with 1 local object. To https://github.com/ashishjain1547/repo_for_testing.git 82c204f..9017804 test_branch -> test_branch ~\aj\repo_for_testing> Note: Now, you can go to GitHub.com and create a pull request, then merge "test_branch" with "main" branch.

5. SWITCHING TO THE NEW BRANCH

CMD\repo_for_testing> git checkout origin/test_branch Note: switching to 'origin/test_branch'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c [new-branch-name] Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false HEAD is now at 5b934da cmt 1909 CMD\repo_for_testing>git branch * (HEAD detached at origin/test_branch) main ~ ~ ~ Use the '-b' argument to also attach the HEAD to new branch. CMD\repo_for_testing> git checkout -b origin/test_branch Switched to a new branch 'origin/test_branch' CMD\repo_for_testing> git branch main * origin/test_branch 6. ADDING A FILE TO THE NEW BRANCH CMD\repo_for_testing> echo "20210528 into test_branch" > "20210528_test_branch.txt" CMD\repo_for_testing> dir /b .gitignore 20210528_test_branch.txt LICENSE newFile.txt README.md CMD\repo_for_testing> git status HEAD detached at origin/test_branch Untracked files: (use "git add [file]..." to include in what will be committed) 20210528_test_branch.txt nothing added to commit but untracked files present (use "git add" to track) CMD\repo_for_testing> git add -A CMD\repo_for_testing> git commit -m "0303" [detached HEAD 03e190f] 0303 1 file changed, 1 insertion(+) create mode 100644 20210528_test_branch.txt CMD\repo_for_testing>git push fatal: You are not currently on a branch. To push the history leading to the current (detached HEAD) state now, use git push origin HEAD:[name-of-remote-branch] CMD\repo_for_testing> git push origin HEAD:test_branch Enumerating objects: 4, done. Counting objects: 100% (4/4), done. Delta compression using up to 4 threads Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 306 bytes | 306.00 KiB/s, done. Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (1/1), completed with 1 local object. To https://github.com/aj/repo_for_testing.git 5b934da..03e190f HEAD -> test_branch

7. CHECKING REPOSITORY STATUS USING 'GIT LOG'

CMD\repo_for_testing> git log In the logs below, "HEAD" is detached. commit 03e190f8810c9335613cc2c534914e666c04eeeb (HEAD, origin/test_branch) Author: unknown [abc@xyz.com] Date: Fri May 28 03:03:23 2021 +0530 0303 commit 5b934dac6c399f06275feab5b4a91fa8063e092b (origin/main, origin/HEAD, main) Author: Admin on Ubuntu [admin@master.com] Date: Wed Mar 17 19:09:57 2021 +0530 cmt 1909 commit 974a71b3df68140ebbc3b4775201b39c500aa589 Author: aj [abc@xyz.com] Date: Wed Mar 17 01:32:16 2021 +0530 Initial commit Fixing the detached HEAD: CMD\repo_for_testing>git switch -c origin/test_branch Switched to a new branch 'origin/test_branch' CMD\repo_for_testing>git branch main * origin/test_branch Now the HEAD is pointing to the current branch: CMD\repo_for_testing> git log commit 03e190f8810c9335613cc2c534914e666c04eeeb (HEAD -> origin/test_branch, origin/test_branch) Author: unknown [abc@xyz.com] Date: Fri May 28 03:03:23 2021 +0530 0303 commit 5b934dac6c399f06275feab5b4a91fa8063e092b (origin/main, origin/HEAD, main) Author: Admin on Ubuntu [admin@master.com] Date: Wed Mar 17 19:09:57 2021 +0530 cmt 1909 commit 974a71b3df68140ebbc3b4775201b39c500aa589 Author: aj [abc@xyz.com] Date: Wed Mar 17 01:32:16 2021 +0530 Initial commit

8. USING 'GIT CLONE' TO CLONE A BRANCH

CMD\ws_branches\(2)> git clone --branch test_branch https://github.com/aj/repo_for_testing.git Cloning into 'repo_for_testing'... remote: Enumerating objects: 11, done. remote: Counting objects: 100% (11/11), done. remote: Compressing objects: 100% (6/6), done. remote: Total 11 (delta 2), reused 7 (delta 2), pack-reused 0 Unpacking objects: 100% (11/11), 5.23 KiB | 3.00 KiB/s, done. CMD\ws_branches\(2)>cd repo_for_testing CMD\ws_branches\(2)\repo_for_testing>git branch * test_branch CMD\ws_branches\(2)\repo_for_testing>dir /b .gitignore 20210528_test_branch.txt LICENSE newFile.txt README.md

9. NOW WE ADD A NEW FILE TO THE 'main' BRANCH

~\ws_branches\(3) main branch> git clone https://github.com/aj/repo_for_testing.git Cloning into 'repo_for_testing'... remote: Enumerating objects: 11, done. remote: Counting objects: 100% (11/11), done. remote: Compressing objects: 100% (6/6), done. remote: Total 11 (delta 2), reused 7 (delta 2), pack-reused 0 Unpacking objects: 100% (11/11), 5.23 KiB | 3.00 KiB/s, done. ~\ws_branches\(3) main branch>cd repo_for_testing ~\ws_branches\(3) main branch\repo_for_testing>dir /b .gitignore LICENSE newFile.txt README.md ~\ws_branches\(3) main branch\repo_for_testing>echo "test_file_20210528" > "test_file_20210528.txt" ~\ws_branches\(3) main branch\repo_for_testing>dir /b .gitignore LICENSE newFile.txt README.md test_file_20210528.txt ~\ws_branches\(3) main branch\repo_for_testing>git add -A ~\ws_branches\(3) main branch\repo_for_testing>git commit -m "0357" [main daa4600] 0357 1 file changed, 1 insertion(+) create mode 100644 test_file_20210528.txt ~\ws_branches\(3) main branch\repo_for_testing>git push Enumerating objects: 4, done. Counting objects: 100% (4/4), done. Delta compression using up to 4 threads Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 298 bytes | 298.00 KiB/s, done. Total 3 (delta 1), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (1/1), completed with 1 local object. To https://github.com/aj/repo_for_testing.git 5b934da..daa4600 main -> main ~\ws_branches\(3) main branch\repo_for_testing>

10. NEXT, WE GET THAT NEW FILE INTO OUR 'test_branch'

~\ws_branches\(2) test_branch\repo_for_testing>git branch * test_branch ~\ws_branches\(2) test_branch\repo_for_testing>git fetch remote: Enumerating objects: 4, done. remote: Counting objects: 100% (4/4), done. remote: Compressing objects: 100% (1/1), done. remote: Total 3 (delta 1), reused 3 (delta 1), pack-reused 0 Unpacking objects: 100% (3/3), 278 bytes | 2.00 KiB/s, done. From https://github.com/aj/repo_for_testing 5b934da..daa4600 main -> origin/main ~\ws_branches\(2) test_branch\repo_for_testing>dir /b .gitignore 20210528_test_branch.txt LICENSE newFile.txt README.md ~\ws_branches\(2) test_branch\repo_for_testing>git branch -r origin/HEAD -> origin/main origin/main origin/test_branch ~\ws_branches\(2) test_branch\repo_for_testing> git checkout origin/main Note: switching to 'origin/main'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c <new-branch-name> Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false HEAD is now at daa4600 0357 ~\ws_branches\(2) test_branch\repo_for_testing>git switch -c origin/main Switched to a new branch 'origin/main' ~\ws_branches\(2) test_branch\repo_for_testing>git branch * origin/main test_branch ~\ws_branches\(2) test_branch\repo_for_testing>dir /b .gitignore LICENSE newFile.txt README.md test_file_20210528.txt ~\ws_branches\(2) test_branch\repo_for_testing> git pull There is no tracking information for the current branch. Please specify which branch you want to merge with. See git-pull(1) for details. git pull <remote> <branch> If you wish to set tracking information for this branch you can do so with: git branch --set-upstream-to=origin/<branch> origin/main ~\ws_branches\(2) test_branch\repo_for_testing>git pull https://github.com/aj/repo_for_testing.git origin/main fatal: couldn't find remote ref origin/main ~\ws_branches\(2) test_branch\repo_for_testing>git branch --set-upstream-to=origin/test_branch origin/main Branch 'origin/main' set up to track remote branch 'test_branch' from 'origin'. ~\ws_branches\(2) test_branch\repo_for_testing>git pull Merge made by the 'recursive' strategy. 20210528_test_branch.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 20210528_test_branch.txt ~\ws_branches\(2) test_branch\repo_for_testing>dir /b .gitignore 20210528_test_branch.txt LICENSE newFile.txt README.md test_file_20210528.txt ~\ws_branches\(2) test_branch\repo_for_testing>git checkout origin/test_branch Note: switching to 'origin/test_branch'. You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by switching back to a branch. If you want to create a new branch to retain commits you create, you may do so (now or later) by using -c with the switch command. Example: git switch -c <new-branch-name> Or undo this operation with: git switch - Turn off this advice by setting config variable advice.detachedHead to false HEAD is now at 03e190f 0303 ~\ws_branches\(2) test_branch\repo_for_testing>git switch -c origin/test_branch Switched to a new branch 'origin/test_branch' ~\ws_branches\(2) test_branch\repo_for_testing>dir /b .gitignore 20210528_test_branch.txt LICENSE newFile.txt README.md ~\ws_branches\(2) test_branch\repo_for_testing>git switch -c origin/main fatal: A branch named 'origin/main' already exists. ~\ws_branches\(2) test_branch\repo_for_testing>git merge origin/main warning: refname 'origin/main' is ambiguous. warning: refname 'origin/main' is ambiguous. Updating 03e190f..fca45d6 Fast-forward test_file_20210528.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 test_file_20210528.txt ~\ws_branches\(2) test_branch\repo_for_testing>git push fatal: The current branch origin/test_branch has no upstream branch. To push the current branch and set the remote as upstream, use git push --set-upstream origin origin/test_branch CMD\ws_branches\(2) test_branch\repo_for_testing>git push --set-upstream origin origin/test_branch This step might have been wrong w.r.t. the input argument above. The command should have been: git push --set-upstream origin test_branch Enumerating objects: 4, done. Counting objects: 100% (4/4), done. Delta compression using up to 4 threads Compressing objects: 100% (2/2), done. Writing objects: 100% (2/2), 354 bytes | 354.00 KiB/s, done. Total 2 (delta 1), reused 0 (delta 0), pack-reused 0 remote: Resolving deltas: 100% (1/1), completed with 1 local object. remote: remote: Create a pull request for 'origin/test_branch' on GitHub by visiting: remote: https://github.com/aj/repo_for_testing/pull/new/origin/test_branch remote: To https://github.com/aj/repo_for_testing.git * [new branch] origin/test_branch -> origin/test_branch Branch 'origin/test_branch' set up to track remote branch 'origin/test_branch' from 'origin'. ~\ws_branches\(2) test_branch\repo_for_testing>dir /b .gitignore 20210528_test_branch.txt LICENSE newFile.txt README.md test_file_20210528.txt ~\ws_branches\(2) test_branch\repo_for_testing>git branch origin/main * origin/test_branch test_branch ~\ws_branches\(2) test_branch\repo_for_testing>git branch -r origin/HEAD -> remotes/origin/main origin/main origin/origin/test_branch origin/test_branch ~\ws_branches\(2) test_branch\repo_for_testing>git log commit fca45d643326fb5d88d70c0cf699f7032118df4b (HEAD -> origin/test_branch, origin/origin/test_branch, origin/main) Merge: daa4600 03e190f Author: unknown <aj@gmail.com> Date: Fri May 28 04:02:07 2021 +0530 Merge branch 'test_branch' of https://github.com/aj/repo_for_testing into origin/main commit daa46003a895e4b33577e3c248977334620e3558 (origin/main, origin/HEAD) Author: unknown <aj@gmail.com> Date: Fri May 28 03:57:24 2021 +0530 0357 commit 03e190f8810c9335613cc2c534914e666c04eeeb (origin/test_branch, test_branch) Author: unknown <aj@gmail.com> Date: Fri May 28 03:03:23 2021 +0530 0303 commit 5b934dac6c399f06275feab5b4a91fa8063e092b Author: Admin on Ubuntu <administrator@master.com> Date: Wed Mar 17 19:09:57 2021 +0530 cmt 1909 commit 974a71b3df68140ebbc3b4775201b39c500aa589 Author: aj <aj@gmail.com> Date: Wed Mar 17 01:32:16 2021 +0530 Initial commit ~\ws_branches\(2) test_branch\repo_for_testing> Tags: Technology,GitHub,Cloud,

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,

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,