Kaggle changed Kernels to Notebooks

I’m new to Kaggle.com , If you don’t know Kaggle it’s a home for data scientists and engineers to to learn, compete and win huge amount of money making sense / predictions of data. People code with python and R. So when you enter into a competition you can see other people’s code in kernels. So I was looking for it but couldn’t find it, I thought they probably disabled it. No more looking into other people’s code ūüôĀ . Later I realized it was renamed to Notebooks. Which is probably a better name for it. But kernel sounds better to me.

Before

After

wordpress “This site is experiencing technical Difficulties”

The Problem

I shifted to new host recently and I didn’t realize a lot of my pages were down and showing this error message. Then gradually I found out that the problem is with my bank category and pages that are under bank category. This are “custom post” considering wordpress term. They were called item in my wordpress theme that I’m using. It’s directory theme from Ait-Themes.

The Fix

The fix was simple, after several correspondence with my new host they said the fixed the problem by increasing MEMORY_LIMIT to 256MB for the websites to work. Just in case you don’t know where MEMORY_LIMIT is it’s in php.ini . But that is not the only place where you can change and they didn’t change from there. Rather they changed it in wp-includes/default-constants.php . I still don’t know why! and how is it different.

Excel Formula for CGPA Letter grade to points

I wrote this formula for excel to figure out the grade points when I insert certain letter grade .

Since I study in North South University, I’m following their grading policy.

Numerical ScoresLetter GradeGrade Points (Per Credit)
93 and aboveA Excellent4.0
90 – 92A-3.7
87 – 89B+3.3
83 – 86B Good3.0
80 – 82B-2.7
77 – 79C+2.3
73 – 76C Average2.0
70 – 72C-1.7
67 – 69D+1.3
60 – 66D Poor1.0
Below 60F* Failure0.0
 I** Incomplete0.0
 W** Withdrawal0.0
 R** Retaken0.0

Assuming the following is 3 credit course. I have to put formula in the green bordered cell D7 below.¬† When I put the letter ‘B’ for example it will multiply 3 (grade point) with 3(credit hours) which resulted in 9.¬† If it was A, the result would have been 3*4=12.¬†

=IF(C7=”A”,4B7,IF(C7=”A-“,3.7B7,IF(C7=”B+”,3.3B7, IF(C7=”B”,3B7, IF(C7=”B-“,2.7B7, IF(C7=”C+”,2.3B7, IF(C7=”C”,2B7, IF(C7=”C-“,1.7B7, IF(C7=”D+”,1.3B7, IF(C7=”D”,1B7,0))))))))))

These are just nested if statements. You just need to be careful of those parentheses. 

Adding item to a list with slice in python

If you have been coding for a while in python you already know you can add an item in a list using

where list here is a variable that contains list of variables, append is a function and as parameter you will input the value you want to add at the end of the list.

However, you can’t add a value by stating an index number that has not been defined already.

But you can use slice to add that with trick. Look at the screen shot, it’s pretty self explanatory!

append, slice technique, python

 

Learning Python (Automate the boring Stuff) Chapter 3 problem’s alternative solution

Number Guessing Game in python!

I was learning python from this wonderful video tutorial and I usually try the problem before the tutor gives the solution. I found out that my solution is better and more full proof than theirs. It’s probably because they are still teaching the concepts and not worried about the details. I thought I could share what I wrote. Let me know if you have better solution and if you find any bug in mine.

You can also learn this from the website

http://automatetheboringstuff.com/chapter3/

 

My Samsung phone doesn’t charge. What to do?

As my Samsung Galaxy Grand Prime getting older new problems are popping up. Recently I was struggling to charge my phone. When I plug it in, It was charging and stop charging frequently almost¬†like the twinkling lights. Then I removed my battery and found out that one of the teeth that connects the battery was a bit bent. I fixed that but still the problem didn’t go away. As days pass by I saw my phone was only charging when it’s off. After that I found out if I turn it off it charges and continues to charge even if I turn it on. So after that I continued to simply plug in the charger and hit restart in my phone.

Summary

  1. Connect your phone to your charger
  2. Restart your phone

This fix working for me, I can’t guarantee that it will work with you as well. Let me know if it did or didn’t In the pool below.

Did my charging method worked for you?
Yes
3 Vote
No
1 Vote

How to download big files like full site backup from Cpanel and avoid download interruption

How to download big files like full site backup from Cpanel and avoid download interruption? specially in slow connection.

I have been having this problem for a while now until I finally figured out what was cooking. When you generate full site backup in cpanel it keeps the file in home directory of the site.

Since full backups are usually huge for most sites (in my case it was about 1.3 GB) and I right now have only 1.5 Mbps speed I needed a download manager to make sure it utilizes all my allowed download speed. Browser downloads are usually slow. So downloading the file directly from file manager was not a good option. It was slow and if session ended it breaks everything and doesn’t resume from where it left off.

I downloaded internet file manager and it added an extension in firefox so I could download the file using it. But even now I noticed that it didn’t have resume capabilities and still slow!?

Then it got me thinking, how do we download files from the internet from website using these download managers. These files are in public_html (means under certain domain and with a static link).

I moved the file to public_html and wanted to download using the static link example.com/backup.tar.gz guess what it was not working still!?

Then suddenly I thought there must be some kind of file permission problem. I changed file permission to 0644 (possibly could have worked for 0755 as well) and voila! I was able to download it with a static link like example.com/backup.tar.gz  and with full speed. Download manager software was able to make multiple connections and it had resume capabilities 

 

back_upDownload-forbidden and failed

home-directory in linux server

Internet_download_manager_downloading file

 

 

Sublime Text doesn’t support Bangla or Unicode! (Fix/Work around)

So I was excited about this text editor that every one loves. Sublime Text. I downloaded Sublime Text 2 (For some reason I was reading it wrong, I thought it was Subline and only now I found out it was Sublime :/ ). So I started coding some basic stuff. And immediately notice that it doesn’t support Bangla. I basically used google translator to translate my Bangla (Me Lazy! :p , I don’t keep avro and all those stuff installed .. I either translate or type online from various online Bangla typing sites). I found out it was all broken. When I saved and saw it on browser. It was even worse.

Broken Bangla in Sublime Text 2 can't write bangla in subline text 2 browser example

 

 

Then next I thought You can’t write Bangla on HTML (since this was probably the first time I tried it in code), So I opened in Notepad and saved it. It was alright.

Then I tried again in sublime text, It started working in it for some reason.. No Idea way :/ .. I mean the on the editor it’s broken but everything is okay on the browser.

can't write bangla in subline text 2 editor

can't write bangla fixed in notepad save it once here

 

can't write bangla in subline text 2 browser output problem fixed

Weird kind of fix , I know.. I think it will work with all other Unicode Characters.

 

Summary of the fix

  1. Create your html file in sublime text
  2. If you want to use unicode characters (here Bangla Specifically in this tutorial) save the file in note pad once
  3. Get back to sublime text and from now on everything should work normally

How to fix camera problem (Media Server failed. Camera needs restart) on the Samsung Galaxy Grand Prime?

Suddenly I was having this problem. My Samsung Galaxy Grand prime’s phone was not working. I thought maybe the app is not working so lets download another camera app. But that didn’t work too. So I though I’m going to give it a factory reset. But that will make my phone like brand new and I’ll probably need to re-install all my apps and my files might be gone as well. So I thought I’ll do it some other time. Today suddenly I thought to my self why don’t ¬†search the internet.. Silly my I should have done that the first day.. ¬†I got the solution and it was just too easy..

  1. Shut down the phone,
  2. Remove the Battery and re-add it.
  3. Start your phone

boom! It’s all good!

 

Someone was saying that it was because we charge the phone using our laptop via data cable. ¬†Yes! I do that but not sure if that’s true..

 

Update: 23rd Nov 2015

My mom uses Walton phone and her phone had the same problem and I solved the problem with the same solution. And she doesn’t charges her phone with laptops.

Update on 11th July 2016 (adding a poll)

Was this fix helpful?
Yes
90 Vote
No
195 Vote

Host Gator Customer Support Service; Not playing nice

I believed they had the best of the services, quicker response rate and reliability. But I’m frustrated with my recent experience with them. Their live chat typically takes about 30 + minutes to reach; That’s one long lasting problem, but recently an open ticket been kept for 5 days without single response. It was urgent, I needed my client’s hacked site to get up back as soon as possible. But I got no response from ticket yet. Today I contacted the live chat again and this time the agent gave me this link¬†https://www.hostgator.com/restore/ , Okay I have to pay $15 to get the site restored from their backup but they should have told me about this before. An important business site is still down for several days without attention.¬†I don’t know how can I rely on them in future.

Update 1 (10th December 2014):

So This paid service was a lot quicker (not paid yet). Got response from them very quick. Now I have another problem. They don’t have my back up file!!!!! . Their weekly backup overwritten the files with current corrupted files. Fantastic! They only keep 1 back up copy.. Man this is soo good!.. Specially when I asked them about 6 days ago to resolve the problem. This has to change.. I have been loyal customer to them for long time now. I’m not switching yet.. Because it’s too much work for me to switch and not sure where can I find the best alternative.