Skip to content

Instantly share code, notes, and snippets.

View smitthakkar96's full-sized avatar
🎯
Focusing

smit thakkar smitthakkar96

🎯
Focusing
  • Delivery Hero
  • Berlin
View GitHub Profile
# coding=utf-8
"""Lazy helpers"""
from importlib import import_module
import re
from django.utils.functional import SimpleLazyObject
class LazyModule(object):
"""Lazily reference a module, to prevent circular imports"""

Models

from models.connection import db

import models.pre_save_hooks as hooks

class DocumentWithPreSaveSupport(db.Document):

    _pre_save_hooks = []
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
shared_preferences: ^0.4.0
Pandas:
- Intro to pandas
- Installing pandas
- Little info about the data set
- Load the data into data frame
- Displaying and querying data
- Clean the data
- Find Number of coffees made on which day of week
- Find Number of coffees by members
- Show monthly trend of coffees
"annReturn" : pow((r["aggCumulativeReceivedAmt"]-r["aggCumulativeCoAmt"]+r["aggCumulativePbalEndPeriod"])/r["aggCumulativePbalBegPeriod"] , 12)-1,
"annLoss" : ((r["aggCumulativeCoAmt"])/r["aggCumulativePbalBegPeriod"]) * 12,
#
# Usage:
# gdeploy -c 2+1-volume-create.conf
#
# This does backend setup first and then create the volume using the
# setup bricks.
[hosts]
165.227.80.95
web_1 | [2017-08-04 06:47:58,877] ERROR in app: Exception on /upload/ [POST]
web_1 | Traceback (most recent call last):
web_1 | File "/usr/lib/python3.5/site-packages/flask/app.py", line 1982, in wsgi_app
web_1 | response = self.full_dispatch_request()
web_1 | File "/usr/lib/python3.5/site-packages/flask/app.py", line 1614, in full_dispatch_request
web_1 | rv = self.handle_user_exception(e)
web_1 | File "/usr/lib/python3.5/site-packages/flask/app.py", line 1517, in handle_user_exception
web_1 | reraise(exc_type, exc_value, tb)
web_1 | File "/usr/lib/python3.5/site-packages/flask/_compat.py", line 33, in reraise
web_1 | raise value
def get_portfolio_notes_by_month(portfolioId):
"""
Group Portfolio notes by month of purchase
Input: Trade History by month
"""
pipeline = [
{
'$match': {
'portfolioId': portfolioId,
'issueDate': {'$exists': True, '$ne': None}
Todays step would be to setup the auth for amoux
Before you get your hands dirty I would suggest you to clone and install all the dependencies.
Once done install flask-jwt, to read about jwt http://blog.jaysinh.com/slides-jwt/#1
Once that's done you will need to create two functions like the below examples:
@staticmethod
def authenticate(email, password):
user = User.objects(email = email).first()
if user:
user.id = str(user.id)
@smitthakkar96
smitthakkar96 / .vimrc
Created May 8, 2017 06:13
My Vimrc file
" If you want to make a PR, put your changes in here. If you want your changes to
" stay local, put them in ~/.vimrc.local.
" don't bother with vi compatibility
set nocompatible
" enable syntax highlighting
syntax enable
" Vundle