Sunday, February 28, 2021

Index of Journals


Toggle All Sections


A Narrative


Factual Details Below


Before 2008

2008

2009

2010

2011

January, 2011

  1. 2011-Jan-01
  2. 2011-Jan-02 (Gareema Sethi was not teaching algorithms)
  3. 2011-Jan-03 (ADGITM [previously NIEC] students cheat during the exam)
  4. 2011-Jan-04
  5. 2011-Jan-05
  6. 2011-Jan-06 (Why didn't Tanvi speak)
  7. 2011-Jan-07 (Gareema Sethi's threat abt internals, lunch table issue by aunt)
  8. 2011-Jan-08 (Chat with Vibha Bharadwaj)
  9. Journal (2011-Jan-09)
  10. Journal (2011-Jan-10)
  11. Journal (2011-Jan-11)
  12. Journal (2011-Jan-12)
  13. Journal (2011-Jan-13) Day of Lohri
  14. Journal (2011-Jan-14) Grandpa's health
  15. Journal (2011-Jan-15) Brilliant Tutorial Bills
  16. Journal (2011-Jan-16) Aunt's new phone and uncle left
  17. Journal (2011-Jan-17) Preparation for exams
  18. Journal (2011-Jan-18) Physics Exam
  19. Journal (2011-Jan-19) Kirti Mohan is a drop-out
  20. Journal (2011-Jan-20) Prashant's birthday
  21. Journal (2011-Jan-21) Money Issues
  22. Journal (2011-Jan-22) Hindi
  23. Journal (2011-Jan-23) Laptop Request
  24. 2011-Jan-24 (Introduction to Computers Exam)
  25. 2011-Jan-25 (Communication Skills Exam)
  26. 2011-Jan-26 (Republic Day Celebration in Society)
  27. 2011-Jan-27 (First day of 4th semester)
  28. 2011-Jan-28 (Algorithms Design professor sent me out)
  29. 2011-Jan-29 (Manju bua quenches my Tri Nagar plan)
  30. 2011-Jan-30 (Anushka's Birthday)
  31. 2011-Jan-31 (Anger)

February, 2011

  1. 2011-Feb-1
  2. 2011-Feb-2
  3. 2011-Feb-3
  4. 2011-Feb-4 (Disappointed in Religion)
  5. 2011-Feb-5 (God is not omniscient)
  6. 2011-Feb-6
  7. 2011-Feb-7 (Neeru Ma'am)
  8. 2011-Feb-8 (Anu and Ankur clear CA group exams)
  9. 2011-Feb-9 (Money lent to Hemanshu Verma)
  10. 2011-Feb-10
  11. 2011-Feb-11 (Death of Ms Bhati)
  12. 2011-Feb-12
  13. 2011-Feb-13 (Granny, grandpa visit Tri Nagar)
  14. 2011-Feb-14 (Clean-up of Facebook Profile)
  15. 2011-Feb-15 (Mass Bunk culture at ADGITM)
  16. 2011-Feb-16 (Night fall)
  17. 2011-Feb-17 (Scene in Algorithms and Design class)
  18. 2011-Feb-18
  19. 2011-Feb-19 (Public Humiliation of Rizwan by Anshul sir)
  20. 2011-Feb-20 (Requested grandpa for laptop again)
  21. 2011-Feb-21 (Anger Management)
  22. 2011-Feb-22 (Vibha and Vodafone)
  23. 2011-Feb-23 (Accidental Billionaires and Saurabh HOD)
  24. 2011-Feb-24 (Anshul sir and Analog Electronics mam Deepika)
  25. 2011-Feb-25 (Squinted Eye Librarian)
  26. 2011-Feb-26 (Disturbed in sleep by Prashant)
  27. 2011-Feb-27 (Preparation for exams)
  28. 2011-Feb-28 (Viral attack by grandpa about my character)

March, 2011

  1. March 1, 2011
  2. March 2, 2011
  3. March 3, 2011
  4. March 4, 2011
  5. March 5, 2011
  6. March 6, 2011
  7. March 7, 2011
  8. March 8, 2011
  9. March 9, 2011
  10. 2011-Mar-10
  11. March 11, 2011
  12. March 12, 2011
  13. 2011-Mar-13
  14. 2011-Mar-14
  15. 2011-Mar-15
  16. 2011-Mar-16
  17. 2011-Mar-17
  18. 2011-Mar-18
  19. 2011-Mar-19
  20. March 20, 2011 (Holi)
  21. 2011-Mar-21 (Rekha bua's birthday)
  22. 2011-Mar-22 (Kritika Puri Passes Away)
  23. 2011-Mar-23
  24. 2011-Mar-24
  25. 2011-Mar-25
  26. 2011-Mar-26
  27. 2011-Mar-27
  28. 2011-Mar-28 (Shruti has chosen to drop an year)
  29. 2011-Mar-29
  30. 2011-Mar-30
  31. 2011-Mar-31 (Students caught cheating in ADA practical)

April, 2011

  1. 2011-Apr-01 (Reservation status in college)
  2. 2011-Apr-02
  3. 2011-Apr-03
  4. 2011-Apr-04
  5. 2011-Apr-05
  6. Journal (2011-Apr-5, Unsent Letter to Rashmi and Smita)
  7. 2011-Apr-06 (Results of Third Semester)
  8. 2011-Apr-07
  9. April 8, 2011
  10. April 09, 2011
  11. 2011-Apr-10
  12. 2011-Apr-11
  13. 2011-Apr-12
  14. 2011-Apr-13 (AIEEE Result Scans)
  15. 2011-Apr-14
  16. April 15, 2011
  17. 2011-Apr-16
  18. 2011-Apr-17
  19. 2011-Apr-18
  20. 2011-Apr-19
  21. 2011-Apr-20
  22. 2011-Apr-21
  23. 2011-Apr-22
  24. 2011-Apr-23
  25. 2011-Apr-24
  26. 2011-Apr-25
  27. 2011-Apr-26
  28. 2011-Apr-27
  29. 2011-Apr-28
  30. 2011-Apr-29
  31. 2011-Apr-30

May, 2011

  1. 2011-May-1
  2. 2011-May-2 (Osama Bin Laden killed today in drone attack by American force in Pakistan)
  3. 2011-May-3
  4. 2011-May-4
  5. 2011-May-5
  6. 2011-May-6
  7. 2011-May-7
  8. 2011-May-8
  9. 2011-May-09
  10. 2011 May 10
  11. 2011-May-11
  12. 2011-May-12
  13. 2011-May-13
  14. 2011-May-14
  15. 2011-May-15
  16. 2011-May-16
  17. 2011-May-17
  18. 2011-May-18
  19. 2011-May-19
  20. 2011-May-20
  21. 2011-May-21 (Uncle's birthday)
  22. 2011-May-22
  23. 2011-May-23
  24. 2011-May-24
  25. 2011-May-25
  26. 2011-May-26
  27. 2011-May-27 (Algorithms Desing and Analysis Exam)
  28. 2011-May-28
  29. 2011-May-29
  30. 2011-May-30
  31. 2011-May-31

June, 2011

  1. 2011-Jun-1
  2. 2011-Jun-2
  3. 2011-Jun-3
  4. 2011-Jun-4
  5. 2011-Jun-5
  6. 2011-Jun-6
  7. 2011-Jun-7
  8. 2011-Jun-8
  9. 2011-Jun-9
  10. 2011-Jun-10
  11. 2011-Jun-11
  12. 2011-Jun-12
  13. 2011-Jun-13
  14. 2011-Jun-14
  15. 2011-Jun-15
  16. 2011-Jun-16
  17. 2011-Jun-17
  18. 2011-Jun-18
  19. 2011-Jun-19
  20. 2011-Jun-20
  21. 2011-Jun-21
  22. 2011-Jun-22
  23. 2011-Jun-23
  24. 2011-Jun-24
  25. 2011-Jun-25
  26. 2011-Jun-26
  27. 2011-Jun-27
  28. 2011-Jun-28
  29. 2011-Jun-29
  30. 2011-Jun-30

July, 2011

  1. 2011-Jul-1

September, 2011

  1. 2011-Sep-01
  2. 2011 Sep 02
  3. 2011 Sep 03
  4. 2011 Sep 04
  5. 2011 Sep 05
  6. 2011 Sep 06 (Anu's birthday)
  7. 2011 Sep 07
  8. 2011 Sep 8
  9. 2011 Sep 9
  10. 2011 Sep 10
  11. 2011 Sep 11
  12. 2011 Sep 12
  13. 2011 Sep 13
  14. 2011 Sep 14
  15. 2011 Sep 15
  16. 2011 Sep 16
  17. 2011 Sep 17
  18. 2011 Sep 18
  19. 2011 Sep 19 (Bought Scanner)
  20. 2011 Sep 20
  21. 2011 Sep 21
  22. 2011 Sep 22
  23. 2011 Sep 23
  24. 2011 Sep 24
  25. 2011 Sep 25
  26. 2011 Sep 26
  27. 2011 Sep 27
  28. 2011 Sep 28
  29. 2011 Sep 29
  30. 2011 Sep 30

October, 2011

  1. 2011 Oct 1
  2. 2011 Oct 2 (Gandhi Jayanti)
  3. 2011 Oct 3
  4. 2011 Oct 4
  5. 2011 Oct 5
  6. 2011 Oct 6
  7. 2011 Oct 7
  8. 2011 Oct 8
  9. 2011 Oct 9
  10. 2011 Oct 10
  11. 2011 Oct 11 (Comparing my notebook processor)
  12. 2011 Oct 12
  13. 2011 Oct 13
  14. 2011 Oct 14
  15. 2011 Oct 15
  16. 2011 Oct 16
  17. 2011 Oct 17
  18. 2011 Oct 18
  19. 2011 Oct 19 (Hoi and amma's birthday)
  20. 2011 Oct 20 (UIDAI enrollment)
  21. 2011 Oct 21
  22. 2011 Oct 22 (Mamaji pays a visit)
  23. 2011 Oct 23
  24. 2011 Oct 24
  25. 2011 Oct 25
  26. 2011 Oct 26 (Pitching Omicron to Anu)
  27. 2011 Oct 27
  28. 2011 Oct 28
  29. 2011 Oct 29
  30. 2011 Oct 30
  31. 2011 Oct 31

November, 2011

  1. 2011-Nov-1
  2. 2011-Nov-2
  3. 2011-Nov-03
  4. 2011-Nov-4
  5. 2011-Nov-5
  6. 2011-Nov-6
  7. 2011-Nov-7
  8. 2011-Nov-8
  9. 2011-Nov-09
  10. 2011-Nov-10
  11. 2011-Nov-11 (Not bathing for over a week)
  12. 2011-Nov-12 (At Ankur and Shruti's Place)
  13. 2011-Nov-13
  14. 2011-Nov-14
  15. 2011-Nov-15
  16. 2011-Nov-16
  17. 2011-Nov-17
  18. 2011-Nov-18
  19. 2011-Nov-19
  20. 2011-Nov-20
  21. 2011-Nov-21
  22. 2011-Nov-22
  23. 2011-Nov-23 (Misbehavior of aunt And Chat with Nishant Adhikari)
  24. 2011-Nov-24
  25. 2011-Nov-25
  26. 2011-Nov-26
  27. 2011-Nov-27
  28. 2011-Nov-28
  29. 2011-Nov-29
  30. 2011-Nov-30

December, 2011

  1. 2011-Dec-1 (Inception of Omicron)
  2. 2011-Dec-2 (Rekha bua will be here in Mayur Vihar)
  3. 2011-Dec-3
  4. 2011-Dec-4 (Light issue created by Prashant)
  5. 2011-Dec-5
  6. 2011-Dec-6 (Giving the IP Degree a second thought)
  7. 2011-Dec-7 (Aunt's wedding aniversary)
  8. 2011-Dec-8 (Omicron, an idea)
  9. 2011-Dec-9
  10. 2011-Dec-10
  11. 2011-Dec-11
  12. 2011-Dec-12
  13. 2011-Dec-13
  14. 2011-Dec-14
  15. 2011-Dec-15

2012

2013

January, 2013

  1. 2013-Jan-01 (A lot of appearances of people from Manu Apartments, stress from surveillance, poor thinking and poor communication)
  2. 2013 Jan 02 (Hardik talked of distances to me)
  3. 2013 January 3 (Anshu, the teacher, was on the Metro train)
  4. 2013 January 4 (Nishant Adhikari's Joke About Ancestral Property)
  5. 2013 January 9 (Rape and Tricolor painted on every bench)
  6. 2013 January 15 (Discipline Committee Team aka Surveillance Team also has Mahima Gupta in it)
  7. 2013 January 31 (Went to Rishabh’s house for PHP)

February, 2013

  1. 2013 Feb 02 (Kunal Jain's father passes away)
  2. 2013 Feb 27 (Complaint of Anshu and Tanuja to the NIEC aka ADGITM CEO)

March, 2013

  1. 2013 Mar 01 (Grandpa handing me Rs 1000 for the project)
  2. 2013 Mar 02 (Delusional Thinking (full of suspicions) and Spoke for first time with Prashant)
  3. 2013 Mar 10 (Brain Stoning)
  4. 2013 Mar 14 (Mahima called Verma's son thief)
  5. 2013 Mar 16 (Brain Stoning by Mudita Gupta continues)
  6. 2013 Mar 18 (good guy, bad guy tactic played by three buas, and the serious delusion of / suspicion on ads and infrared connection)
  7. 2013 Mar 28 (Veena Ralli saying 'No, I cannot', and Verma brother saying 'all is well')
  8. 2013 Mar 29 (Brain heat)
  9. 2013 Mar 30 (Smita gets into UC Berkeley)
  10. 2013 Mar 31 (Manju bua's house on infrared surveillance)

April, 2013

  1. 2013 Apr 24 (Dad's death anniversary, aunt calls me h-rami and event of Mahavir Jayanti)

July, 2013

  1. 5 July 2013 (News Headlines I captured when I was sick)
  2. 15 July 2013 (Sensitivity towards letters seen in objects laid out by Prashant)

September, 2013

  1. Life Notes (Sep 2013)

November, 2013

  1. 2013 Nov 19 (Comment about ethics and atheists)
  2. 2013 Nov 22 (Infrared surveillance, Woman's helpline number 1901 and Lawyer Anil Kher)
  3. 2013 Nov 23 (Complaint made to Anil Kher and my disorderly thinking)

2014

2015

2016 - 2017

2018

2019

2020

2021

  1. About English, Hindi and my mom
  2. Checking emotional temperature in Jan 2021
  3. Remembering my grandfather
  4. Vegetable Sellers of Panchkula (Part 3)
  5. Money Spent in Finding a Life Partner till May 2021 and Tips from Anil Dahiya
  6. Letter to my future wife
  7. About Surveillance
  8. Types of Massages at Tenzin Spa as of Apr-2021
  9. YouTube Channel Description
  10. The Survival8 Story
  11. Tete-a-tete with Airtel Store Executive (May 2021)
  12. Sounds am annoyed by these days (June 2021)
  13. Tenzin Tibet Kitchen (in MDC, Sector - 5, Panchkula, Haryana) [Dated: Saturday, June 26, 2021]
  14. 360 Degree Feedback For Me From Srishti [20210629]
  15. Types of Noodles as Packaged Food (Aug 2021)
  16. Journal (2021-Aug-14)
  17. 2021-Aug-15: Is my salary low, here's the answer, Yashvir
  18. Grandpa's will (Journal, 2021-Aug-27)
  19. Day out with uncle and aunt, 2021-Aug-29
  20. Anu's writing about mom (Aug-2021)
  21. 2021-Sep-5 (Happy Birthday, mom)
  22. Patience for marriage (Joke and Lesson)
  23. Day out with Sakshi Dahiya (2021-Nov-10)
  24. Journal (2021-Nov-23)
  25. Journal (2021-11-29)
  26. Tenzin Tibetan Spa (Dec 2021)
  27. Birthday Outings (2021-Dec-18)
  28. Tenzin Tibetan Spa (2021-Dec-19)
  29. Shimla Trip (2 Nights and 3 Days) - 24th to 26th Dec 2021
  30. Sakshi, Shivani and Shimla (The Beginning)
  31. Sakshi, Shivani and Shimla (The Ending)
  32. Exercise Spells in 2021
  33. Chandigarh Kare Aashiqui (In English: Flirting With Chandigarh)

2022

2022: Journal

  1. Meet Rohit Sud (Feb 2022)
  2. Month of Ad-Serving-Limits (21-Jan-2022 to 21-Feb-2022)
  3. If I'd Meet Andy Again, We'd Talk About Ankylosing Spondylitis
  4. My Years and Goals (from 2008 to 2022)
  5. If I were a pornstar... (April 2022)
  6. Rejection for Driving License (April 2022)
  7. Journal (2022-May-05)
  8. Hammer, Chisel and Grinder (Journal 2022-May-06)
  9. Malini Kochar (2022-May-15)
  10. Sample Lease Deed for Rental Accommodation Business in Delhi (May 2022)
  11. Expenses on Matrimonial sites till 2022-Jun-05
  12. Infosys and LinkedIn Certifications (2022-Jun-15)
  13. Accidents before second attempt at gearless bike license
  14. Biography Book Covers for Camera Postures (Steve Jobs and Elon Musk)
  15. 2022-Jul-02
  16. 2022-Jul-03
  17. Journal (2022-Jul-4)
  18. 2022-Jul-07
  19. Consumption of Electricity Units in a day for 75M Room (12 Jul 2022)
  20. 2022-Jul-19 (fight between husband and wife (tenants))
  21. Let's talk business (23 Jul 2022)
  22. Mom's Prescriptions for Fracture (2022 Jul 25)
  23. The Dirty Fish in The Pond (Story About Corruption, 2022-Jul-25)
  24. At the de-addiction center today, look what I found (2022-Jul-27)
  25. 20220728 - Monitoring Effects of 1 tablet of Trini Calm and 1 tablet of Petril Beta 10
  26. Let's talk about 'Whataboutery' (Aug 2022)
  27. The Mapsko Mountville Story (A beginning)
  28. Moti's (dog) prescription for allergy and vaccination (2022-Sep-04)
  29. Moti's (dog) prescription for itching, ticks, allergy and hairless patches (2022-Sep-08)
  30. Moti (pet) in pictures (10 Sep 2022)
  31. Moti, the pearl (Sep 2022)
  32. Moti, The Pearl (An Ending)
  33. Difficult Tenant Named Pankaj Shukla (Oct 2022)
  34. The Mapsko Mount Ville Story (An Ending)
  35. The Blogger Story (2022-Nov-24)

2022: Students' Update

  1. Student Update (2022 Jul 04)
  2. Student Update (2022 Jul 09)
  3. Student Update (2022-Jul-11)
  4. Student Update (2022-Jul-12)
  5. Student Update (2022-Jul-13)
  6. Student Update (2022-Jul-18)
  7. Student Update (2022-Jul-19)
  8. Student Update (2022-Jul-21)
  9. Student Update (2022-Jul-25)
  10. Student Update (2022-Jul-27)
  11. Student Update (2022-Jul-28)
  12. Writing exercise for Moni Singh (2022 Sep 22 (Day 1))
  13. Writing Exercise For Moni Singh (2022-Sep-24, Day 2)

2022: Tri Nagar Home Renovation Notes

  1. Tri Nagar, Home Renovation Expenses in Apr 2022
  2. Tri Nagar Home Renovation Notes (May 2022)
  3. Paint Work in Tri Nagar Home by Md Salim (2022-May-20)
  4. Tri Nagar Tiles Work on Mezzanine Floor for Tenants (2022-May-22)
  5. Tri Nagar Home Renovation Pen Notes (2022 May 24)
  6. Tri Nagar Home Renovation Notes (2022 May 28)
  7. Tri Nagar Home Renovation Expenses in May 2022
  8. Tri Nagar Home Renovation Notes (2022 Jun 05)
  9. Tri Nagar Renovation Bills (2022-Jun-12)
  10. Tri Nagar Renovation Notes (2022-Jun-12)
  11. Tri Nagar Renovation Material and Service Providers (2022-Jun-12)
  12. Tri Nagar Home Renovation Notes (2022 Jun 29)
  13. Renovation Notes (Plumbing) - Jul 2022

2023

Packaged Food

Treat to the canines

Monitoring Effects of Medications (2021)

Tags: Behavioral Science,Indian Politics,Psychology,Biography,Journal,Politics,Emotional Intelligence,Investment,Management,

Journal (First meeting with Tushar)



On an October night in 2019, some time after 10 PM, I got a WhatsApp video call. It was Anu and her future husband Tushar. I was pretty tired on that day as I am usually and I took the call and spoke in slightly formal touch. I was serious then and I am serious now about relationships. My every relationship has been complicate. Tushar is a pretty nice, cool and easy going person. It came off right away as he spoke. He and Anu asked me to open up and not be so formal. They were pretty comfortable with each other as there courtship period had been roughly 7 to 9 months and I learnt this not from Anu but as a floating piece of information.
In that very first call, he asked (to tease Anu) to tell all her bad qualities. I refused to do that because in my mind that was not a very good idea to start a conversation or relationship. As I tell them the same thing, he jokes that I will give you a separate call then to discuss particularly this.
On a weekend (Friday night) on the first of November, I had to travel to Delhi to meet the Tushar and his family for the first time. As I usually do, I took the Haryana roadways bus for this Delhi trip. The fare for this ride used to be ₹250 then and overall the ride is not bad if you are traveling once in 3 or 4 months. Only that the time you spend in the bus is about 6 hours and if we add the time spent in traveling from bus stop to home then it goes upto 7.5 hours.
On the Saturday afternoon, I think it was past 1 PM, I had tea before in the morning and now I needed it again. I was dressed up in red check shirt and black pants for the occasion. As I was approaching the society gate from the peripheral road, I saw this gentleman with his family of four having entered the society. It took only some seconds for us recognise each other on the first site. A hand shake with the three of them and a 'hello' to Priyanka.
As we walk to our door, I made the call on landline to tell amma about it. At first, it was only me and them for few minutes, then uncle joined, amma joined, Anu joined, Srishti joined and so on everyone else.
A pretty crazy thing happened right in the first minutes of that awkward silence when Anu, amma, uncle and Srishti were sitting quietly. It was my question to Tushar: Hey, you are sweating. Do you want me to turn on the fan or something?
There was a sweat bead coming down on the forehead of Tushar in the month of November in Delhi.
Priyanka and Neelima maasi promptly covered it up. Neelima maasi passed on a handkerchief and Priyanka clarified that it is nothing, Tushar is only nervous.
I think that there was a little something required as part of food servings at the beginning. The juice that was provided at the beginning was exotic, I didn't recognise it at all. Was it grape, or a mix of grape and some other fruit like guava? The juice wasn't exactly a thirst quencher like an apple juice. The next serving was of the dry fruits, that completely left my mouth dry, not sure about everyone else. I let Srishti know that it had left the mouth dry and that water should also be provided. I think that appeared to be negative to Neelima maasi. She might have thought I wasn't appreciative. Could be that I was thinking wrongly? In my head, I had thought of corporate setting where water is present already in the form of small bottles by default at meetings.
My mom was quiet as she was asked to do by grandma or aunt. Mom was given the instruction that she should not speak except when a question is posed explicitly to her. A very hurtful memory is when mom was asked to have that namkeen or might be it was something from outside, she said in a meekish tone and poorly worded way that "munn nahi hai", which means she wasn't feeling like eating it, or a word to word conversion might be "not in the mood".
Because of my outspoken behaviour in the first few interactions, Neelima maasi has called and specifically asked me in a friendly and motherly voice to sit next to her instead of in the front. So it was mom on my right and maasi on the left. Mom in that situation was not very participative, she sat on the edge of the sofa with wide gap between her and maasi that I had to fill because it clearly appeared to me that this distance was not a friendly distance.
After that there were usual discussions related to tying a knot, asking each side's demands and expectations, etc.
By 4:30 PM, I was very tired of this conversation and it was clear on my face as I was getting lost in my own thoughts. At one point, I was in some thought when maasi looked at my face and I had to force a smile on my lips.
There was some confusion regarding Manju bua's presence. She was upset about something Anu or amma had said or miscommunication. Manju bua told me that such meetings are supposed to be between influential people in the family and she was not one. I didn't say too much only in a formal and impersonal tone that "I think you should come." She came.
The two families decided that they would have roka tomorrow and then we kids went out to enjoy the rest of the day. We went to Delhi Haat and it was only me who was talking (or so I remember). I told stories about my work, and my boss and team and etc because of the lessons I had got at work that I should talk and socialize.
I didn't have any particular taste so I explored and experimented with what Priyanka suggested.
Near the end of the evening in that eatery, Priyanka suggested that we should try filter coffee and I drank two cups of it, the hangover of which I was going to feel till the next day.

Title: Journal (First meeting with Tushar)

Wednesday, February 24, 2021

Python 2, python 3, base64, string and bytes



CONVERTING BACK AND FORTH BETWEEN STRING AND BYTES: >>> s = 'hello' >>> s.encode() b'hello' >>> b = s.encode() >>> b.decode() 'hello' >>> --- --- --- $ conda create --name py2 python=2 (base) ~/Desktop$ conda activate py2 By default, 'python' command runs Python 3. (py2) ~/Desktop$ python Python 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> exit() (py2) ~/Desktop$ python2 Python 2.7.18 |Anaconda, Inc.| (default, Apr 23 2020, 22:42:48) [GCC 7.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import requests Traceback (most recent call last): File "[stdin]", line 1, in [module] ImportError: No module named requests >>> --- --- --- (py2) ~/Desktop$ pip install requests DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support Collecting requests Using cached https://files.pythonhosted.org/packages/29/c1/24814557f1d22c56d50280771a17307e6bf87b70727d975fd6b2ce6b014a/requests-2.25.1-py2.py3-none-any.whl Collecting chardet<5,>=3.0.2 Using cached https://files.pythonhosted.org/packages/19/c7/fa589626997dd07bd87d9269342ccb74b1720384a4d739a1872bd84fbe68/chardet-4.0.0-py2.py3-none-any.whl Collecting urllib3<1.27,>=1.21.1 Using cached https://files.pythonhosted.org/packages/23/fc/8a49991f7905261f9ca9df5aa9b58363c3c821ce3e7f671895442b7100f2/urllib3-1.26.3-py2.py3-none-any.whl Collecting idna<3,>=2.5 Using cached https://files.pythonhosted.org/packages/a2/38/928ddce2273eaa564f6f50de919327bf3a00f091b5baba8dfa9460f3a8a8/idna-2.10-py2.py3-none-any.whl Requirement already satisfied: certifi>=2017.4.17 in /home/administrator/anaconda3/envs/py2/lib/python2.7/site-packages (from requests) (2020.6.20) Installing collected packages: chardet, urllib3, idna, requests Successfully installed chardet-4.0.0 idna-2.10 requests-2.25.1 urllib3-1.26.3 --- --- --- With Python 2 (py2) ~/Desktop$ python2 Python 2.7.18 |Anaconda, Inc.| (default, Apr 23 2020, 22:42:48) [GCC 7.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import requests >>> from base64 import b64encode as b >>> b('hello') 'aGVsbG8=' >>> --- --- --- With Python 3 (py2) ~/Desktop$ python Python 3.8.5 (default, Jul 28 2020, 12:59:40) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> from base64 import b64encode as b >>> b('hello') Traceback (most recent call last): File "[stdin]", line 1, in [module] File "/usr/lib/python3.8/base64.py", line 58, in b64encode encoded = binascii.b2a_base64(s, newline=False) TypeError: a bytes-like object is required, not 'str' >>> b('hello'.encode()) b'aGVsbG8=' >>> b('hello'.encode()).decode() 'aGVsbG8=' >>> --- --- ---
Tags: Technology,Python,