Python tutorials

What’s That Beer Style? Ask a Neighbor, or Two

Beer is delicious but it is not one thing. If you disagree with the former part of the previous sentence please keep the latter in mind[1]. Think of sports, for instance. Many would agree with the blanket statement “sports are fun” but depending on what you have in mind two people can easily have opposite reactions to being presented the opportunity to play ping-pong. Sports are not one thing, music is not one thing, and neither is beer. Presented with […]

Read more

R, Python or SAS: Which one should you learn first?

Python, R and SAS are the three most popular languages in data science. If you are new to the world of data science and aren’t experienced in either of these languages, it makes sense to be unsure of whether to learn R, SAS or Python. Don’t fret, by the time you’re done reading this article, you will know without a doubt which language is the right one for you. Overview R – R is the lingua franca of statistics. It is a […]

Read more

What are the Big Guys Using?

Summary:  The largest companies utilizing the most data science resources are moving rapidly toward more integrated advanced analytic platforms.  The features they are demanding are evolving to promote speed, simplicity, quality, and manageability.  This has some interesting implications for open source R and Python widely taught in schools but significantly less necessary with these more sophisticated platforms.   We continue to be dazzled, and perhaps rightly so, by the advances in deep learning and question answering machines like Watson.  And […]

Read more

Why R is Bad for You

Summary:  Someone had to say it.  In my opinion R is not the best way to learn data science and not the best way to practice it either.  More and more large employers agree.   Someone had to say it.  I know this will be controversial and I welcome your comments but in my opinion R is not the best way to learn data science and not the best way to practice it either.   Why Should We Care What […]

Read more

Will Python Replace Java?

  According to the IT programming trend, Java is currently more popular than other programming languages in terms of number of jobs, number of existing Java developers and overall usage statics in IT compared to Python. According to the latest usage statistics posted on a popular Technology Survey site, Java is being used by 3.0% websites as a server-side programming language, whereas only 0.2% of websites use Python. However, all the recent reports have highlighted that the usage and popularity of Python […]

Read more

A Detailed Study of Self Supervised Contrastive Loss and Supervised Contrastive Loss

Introduction Supervised Contrastive Learning paper claims a big deal about supervised learning and cross-entropy loss vs supervised contrastive loss for better image representation and classification tasks. Let’s go in-depth in this paper what is about. Claim actually close to 1% improvement on image net data set¹. Architecture wise, its a very simple network resnet 50 having a 128-dimensional head. If you want you can add a few more layers as well. Architecture and training process from the paper Codeself.encoder = […]

Read more

Python Virtual Environments Explained

What is VirtualEnv? The virtualenv tool creates an isolated Python environment (in the form of a directory) that is completely separate from the system-wide Python environment. What this really means is that any settings, 3rd-party packages, etc. from the system-wide environment do not appear in the virtual environment, so it’s almost like you have a clean Python install. This is useful for when you want to have a clean-slate for your projects. Let’s say you have boto version 2.7.0 installed […]

Read more

Pyramid Explained

What is Pyramid Pyramid is a Python web framework created from the combination of Pylons and repoze.bfg, resulting in a flexible, easy to use framework. Pyramid puts much of its focus in being flexible, so no application will be constrained by decisions made by the Pyramid creators. For example, you can use Mako or Chameleon for templating, just about any type of database for persistence, and a number of different methods for view routing (the list goes on). Many features […]

Read more

How to Exploit the Heartbleed Bug

First we explained how it worked, and now, thanks to Jared Stafford (and stbnps on Github for explanations) we can show you how to exploit it. Heartbleed is a simple bug, and therefore a simple bug to exploit. As you’ll see below, it only takes about a single page of Python to exploit this bug. Before we get to the code, here are a few reference links to help you understand the SSL protocol: The Code #!/usr/bin/python # Quick and […]

Read more

Example: Upload a File to AWS S3 with Boto

Example Code Amazon Web Services (AWS) is a collection of extremely popular set of services for websites and apps, so knowing how to interact with the various services is important. Here, we focus on the Simple Storage Service (S3), which is essentially a file store service. All files must be assigned to a bucket, which is assigned a name and can be addressed by http://s3.amazonaws.com/{bucket}/{key}. Each file is assigned a unique key, which can be used later on to retrieve […]

Read more
1 171 172 173 174 175 185