Skip to content

Instantly share code, notes, and snippets.

View vinitkumar's full-sized avatar
Focusing

Vinit Kumar vinitkumar

Focusing
View GitHub Profile
import redis
import random
import time
r = redis.StrictRedis(host='localhost', port=6379, db=0)
def write_to_redis_million_times():
for i in range(1000000):
Traceback:
File "/Users/vinitkumar/.virtualenvs/socialschools/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)
File "/Users/vinitkumar/.virtualenvs/socialschools/lib/python2.7/site-packages/django/core/handlers/base.py" in _legacy_get_response
244. response = middleware_method(request)
File "/Users/vinitkumar/projects/python/cp/socialschools/apps/multitenant/middleware.py" in process_request
43. request.site = get_site_from_host(request)
print("Hello Dom")
print("Hello world")

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

import React, { Component } from 'react';
import logo from './logo.svg';
import {BrowserRouter as Router, Link} from 'react-router-dom';
import { Route } from 'react-router-dom';
import './App.css';
import 'bootstrap/dist/css/bootstrap.min.css';
// class Gist extends Component {
// constructor(props) {
const Box = x =>
({
map: f => Box(f(x)),
fold: f => f(x),
inspect: () => `Box(${x})`
})
const moneyToFloat = str =>
Box(str)
.map(s => s.replace(/\$/g, ''))
# coding: utf-8
# In[4]:
# Standard import for pandas, numpy and matplot
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# format for commit message headline
# <type>(<scope>): <subject>
# <BLANK LINE>
# <body>
# <BLANK LINE>
# <footer>
# feature|fix|docs|style|refactor|perf|test|chore(app_name): subject
# Body

Saturday

####React learning goals:

  • Read docs - 2 hours.

  • Write the code for a sample App from the website: - 1 hours

  • Write the feature for Blushandbow - 3 hours.

  • Read docs for React again. Make notes - 1.5 hours

  • Read about flux, react routers, css-in-js - 2 hours