Skip to content

Instantly share code, notes, and snippets.

@vaibhavmule
vaibhavmule / FeedController.py
Created October 10, 2018 11:40
RSS Feed using Masonite Framework
"""A FeedController Module"""
from masonite.view import View
from masonite.request import Request
from app.Post import Post
class FeedController:
"""FeedController
"""
Develop an ETL system that will Extract data from a CSV file,
apply some transformation and output the transformed
data to another CSV.
ETL stands for Extract Transform and Load - this system should be divided into these modules:
Extract module - should be able to retrieve data from a CSV file
Transform module - should accept input stream from Extract module and
for each column adds an additional column
indicating the data type of the column
@vaibhavmule
vaibhavmule / alexa.js
Created October 16, 2017 12:47 — forked from chilts/alexa.js
Getting the Alexa top 1 million sites directly from the server, unzipping it, parsing the csv and getting each line as an array.
var request = require('request');
var unzip = require('unzip');
var csv2 = require('csv2');
request.get('http://s3.amazonaws.com/alexa-static/top-1m.csv.zip')
.pipe(unzip.Parse())
.on('entry', function (entry) {
entry.pipe(csv2()).on('data', console.log);
})
;
@vaibhavmule
vaibhavmule / find_angle_between_hours_and_minutes.py
Last active October 9, 2017 08:20
find_angle_between_hours_and_minutes - https://repl.it/MIr5/7 full_house_or_not - https://repl.it/MSxN/0
def calculate_angle(hour, minute):
"""
Assuming 12 hours is 360 degree which is
(720 minutes) or 0.5 degree per minute
and 60 minutes = 360* which 6 degree per minutes.
"""
if hour == 12 and minute == 60:
hour, minute = 0, 0
angle_of_hour_hand = (60 * hour + minute) / 2
angle_of_minute_hand = 6 * minute
<meta name="twitter:card" content="summary" />
<meta name="twitter:site" content="@nytimesbits" />
<meta name="twitter:creator" content="@nickbilton" />
<meta property="og:url" content="http://bits.blogs.nytimes.com/2011/12/08/a-twitter-for-my-sister/" />
<meta property="og:title" content="A Twitter for My Sister" />
<meta property="og:description" content="In the early days, Twitter grew so quickly that it was almost impossible to add new features because engineers spent their time trying to keep the rocket ship from stalling." />
<meta property="og:image" content="http://graphics8.nytimes.com/images/2011/12/08/technology/bits-newtwitter/bits-newtwitter-tmagArticle.jpg" />
@vaibhavmule
vaibhavmule / learning.md
Created February 16, 2017 20:01 — forked from sibelius/learning.md
Learning Path React Native

Basics

  • Learn how to start a new react native project
  • Run it on ios simulator, on android emulator, on a real iPhone device and on a real Android device, with and without debugging enabled.
  • Learn how to upgrade a react native project
  • Learn how to add a package to the project
  • Learn how to add a package that has a native dependency (https://github.com/airbnb/react-native-maps, https://github.com/evollu/react-native-fcm) - DO NOT USE COCOAPODS
  • Learn how to use fetch to get data from your backend

Learn Navigation

@vaibhavmule
vaibhavmule / drf.md
Last active October 6, 2016 08:46
Django Rest Framework Installation

Installation

pip install django
pip install djangorestframework
pip install django-filter
@vaibhavmule
vaibhavmule / init.coffee
Last active September 29, 2016 18:17
Atom Syncing Settings
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->

Keybase proof

I hereby claim:

  • I am vaibhavmule on github.
  • I am vaibhavmule (https://keybase.io/vaibhavmule) on keybase.
  • I have a public key ASAvEBTuIiSrgdmtgR0udGn4st5D8e3khRQXzqZeBqjh2go

To claim this, I am signing this object:

@vaibhavmule
vaibhavmule / nvm-install.sh
Last active April 22, 2016 13:39
NodeJs installations bash script
# Install command line developer tools
cd /Applications/Utilities/
xcode-select --install
# install nvm node and npm
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.30.2/install.sh | bash
echo ". ~/.nvm/nvm.sh" > ~/.bash_profile
nvm install stable
nvm use stable
nvm alias default stable