As Good as MOM and DAD ?
Have you ever wondered if you can make as far as your mom and dad did ? If not, stop whatever you are doing, sit back, relax and try to contemplate your parent's journey for a moment. Remember how they nurture you up merely fulfilling or trying to fulfill all your puerile wishes and those of your siblings if you had any. Now, if you have already graduated or are about to graduate, this is the age your parents probably got married or some of ours' already had us. Isn't it really scary to put ourselves in their situation ? I mean, till date you still get perplexed if you should swear the same socks as yesterday because they don't seem to smell yet or go with another pair and your parents at this stage probably had your naming ceremony done.Strange and scary but true !!
I cannot vouch for everyone and i am not entitled to do so. But if there is something i can do, then it is to reflect on my own journey and relate that with that of my father and mother. My father is always calm and composed and loyal to his rituals. He is a man of honor ; a government servant constantly working for more than twenty years, first to feed his family and now it has also become part of his ritual.On other hand, my mother is a risk-taker and an independent woman .She is a complete contrast of calmness and composure that i mentioned regarding my father. Finally, my younger brother and me, we like the George R.R. Martin's book, are the song of ice and fire.
The next five years of your life will determine if you will ever reach to the benchmark set by them or not. So, ladies and gentlemen it's time to gear up.
TBC
Sunday, February 17, 2019
Monday, October 15, 2018
JenkinsCertification-Class 1(Jenkins Installation)
* https://console.cloud.google.com/networking/firewalls/details/default-allow-http?q=search&project=probable-cove-183916
* sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
*sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
* sudo yum install jenkins
*sudo yum install wget
*Sudo systemctl start jenkins
sudo visudo
sudo vi /etc/ssh/sshd_config
sudo service sshd start
sudo service sshd restart
1 systemctl enable jenkins 2 systemctl start jenkins 3 systemctl status jenkins 4 java -version 5 yum install java 6 java -version 7 systemctl start jenkins 8 ps -ef jenkins 9 ps -ef | grep jenkins 10 cd /usr/lib/jenkins/ 11 ls -ltr 12 cd .. 13 cd usr 14 cd /usr 15 ps -ef | grep jenkins 16 cd /etc/default 17 ls -ltr 18 less instance_configs.cfg 19 cd /etc 20 ls -ltr 21 cd sysconfig 22 ls -ltr 23 less jenkins 24 pwd 25 pwd 26 ls -ltr 27 tail -f jenkins.log
* sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
*sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
* sudo yum install jenkins
*sudo yum install wget
*Sudo systemctl start jenkins
sudo visudo
sudo vi /etc/ssh/sshd_config
sudo service sshd start
sudo service sshd restart
Friday, October 5, 2018
Introvert or Extrovert
When you laugh a little loud, you are ill-mannered and when you laugh a little less, you are shy. Our social structures have made it a little complex for our Generation-Y aka millennial to grasp and apply these norms.Especially in context of Nepal, it is even more difficult to grow as a child; Because not only your parents, but also your neighbors, relatives and even friend's parents are watchdogs of your mannerism.Besides, there is this whole decade long phenomenon and worshiper of discipline called school. The sad part, no child can escape it.I mean who as a scholar haven't heard this, " Does your parents teach this?" at school and "This is what you learn at school ?" at home .I believe every single of us.First of all please make sure who teaches what. This will make the life of a child more easier.Here, i am not trying to put blame on either of them. I couldn't have been grown up better and neither could have been educated better.So, both my parents and school have grabbed A+ on their transcripts.If allowed, i would give some partial credit to my neighbors and relatives as well.However, my problem is with the overall system and culture.
I cannot draw a conclusion representing my age group but i am trying to put my own perspective and experience.
I cannot draw a conclusion representing my age group but i am trying to put my own perspective and experience.
Tuesday, September 18, 2018
4. Median of Two Sorted Arrays(Leetcode) Accepted solution
class Solution:
def findMedianSortedArrays(self,l1,l2):
sorted_new_list = l1 + l2
sorted_new_list.sort()
val = len(sorted_new_list)
if (val % 2 != 0):
return float(sorted_new_list[val //2])
else:
num1 = sorted_new_list[val//2 -1]
num2 = sorted_new_list [val//2]
return (num1 +num2 )/2
a = Solution()
print(a.findMedianSortedArrays([1,2,3,4,5] ,[6,7,8,9]))
Monday, September 17, 2018
leetcode problem2 (brute force) not all test cases passed
class Solution:
def lengthOfLongestSubstring(self, s):
if len(s) == 0:
return 1
else:
self.l = ''
self.count = 0
self.mlist = []
length =0
for i in s:
if i not in self.l:
self.l += i
self.count +=1
elif i in self.l:
self.mlist.append(self.count)
self.count =0
self.l = ''
self.l +=i
self.count +=1
#return max(self.mlist)
for i in self.mlist:
if i > length:
length = i
return length
a = Solution()
print(a.lengthOfLongestSubstring(""))
def lengthOfLongestSubstring(self, s):
if len(s) == 0:
return 1
else:
self.l = ''
self.count = 0
self.mlist = []
length =0
for i in s:
if i not in self.l:
self.l += i
self.count +=1
elif i in self.l:
self.mlist.append(self.count)
self.count =0
self.l = ''
self.l +=i
self.count +=1
#return max(self.mlist)
for i in self.mlist:
if i > length:
length = i
return length
a = Solution()
print(a.lengthOfLongestSubstring(""))
Tuesday, September 11, 2018
Leetcode problem1 brute force
class Solution:
def twoSum(self,nums, target):
thisdict = {}
#new_list = []
for i in range(0,len(nums)):
thisdict[nums[i]] = i
for i in thisdict:
rem = target - i
if rem in thisdict and rem != i:
return[thisdict[i],thisdict[rem] ]
a = Solution()
print(a.twoSum([3,3],6)) # It doesn't satisfy this use case
Data science class statisctisc
''def mean(x):
sum = 0
avg = 0
try:
for i in x:
sum+= i
avg = sum /len(x)
print(avg)
except ZeroDivisionError:
print("Division by zero error")
mean([])'''
import math
def mean(x):
return sum(x)/len(x) if len(x) is not 0 else 0
print(mean([1,2,3,5]))
def de_mean(x_list):
return abs(x_list[i]-mean(x_list[i]) for i in range(len(x_list)
print(de_mean([1,2,3,4,5]))
Subscribe to:
Posts (Atom)