Vertically center items in Vuetify v-app-bar

I was writing a navigation bar and wanted to center some buttons in the navbar. Here is how I did it. Note that there are many items in nav-bar which is not very good in terms of material design principles (for smaller screens). If there are that many items, it is advisable to put a […]

Add Axios to your Vue app

Install axios npm install –save axios Then goto src/ folder and add a file called RestAPIService.js. In this file we will reside all our AXIOS interfacing code and Rest API calls. The RestAPIService.js looks like this:

The Service has two methods getCodes and getRate. They hit the respective endpoints to get currency codes and […]

Writing Custom Django Management Commands

Any command given with is called management command. Django comes with many built-in management commands like runserver, startapp etc. To see a full list of built-in management commands, type: python help The benefit of management command script is that this script executes within Django environment. You can run all of Django ORM queries […]

Logging in Django and Django Rest Framework projects

Logging is extremely necessary, during development and production. There are two ways to implement logging. In apps with high scale, we log to console and then have some in-the-cloud solution like Sentry to log the messages from the console. This is great because large scale apps often run on multiple servers and we can converge […]

Building Front-End App in Vue with Vuetify – Part 2

We have been building Currency Converter using Vue.js. In the part-1 we built the basic layout of the app with navbar. In this tutorial we will setup a form with validation. The code for this is here. Please note that the code has been committed under commits matching with Parts. So for complete code for […]

Reading RSA key pair from PEM files in .NET with C# using Bouncy Castle and Digitally Sign and Verify payload

.NET does not have an easy way to directly deal with .pem format files generated using OpenSSL. I had to look into Bouncy Castle library to do it. Lets see how. We will also generate a dummy payload and then sign it using the generated pem keys and then verify it. First let us generate […]

Building Front-End App in Vue with Vuetify – Part 1

In this series, we will be building front-end app Currency Converter using Vue and Vuetify. The code for this is here. Please note that the code has been committed under commits matching with Parts. So for complete code for this tutorial, please refer to commit branch “part-1”. Pre-requisites: Please ensure that npm-cli is installed. You […]

Django Rest Framework project setup template

Ian Schneider This is a list of what I do when I setup a new DRF project. I am assuming that pipenv is already installed. Also, assuming that Python 3.5+ already installed in the base environment. For those in Python<3.5, please refer here for options. create new environment: pipenv shell pipenv install django djangorestframework markdown […]

Python Default Parameter Gotcha

  • September 8, 2019
  • Python

Take a look at this code. All it does is return a list with appended parameter. In case no list is supplied, it defaults to an empty list and appends to it. Or is it???

Look at the second result. We expected [“silver”] expecting the item to be appended to an empty list as […]

Analyzing IRIS Dataset With Keras and Tensorflow – Machine Learning and Data Analysis

We will analyze the famous IRIS dataset. Before we start, here are the basic steps that any typical Machine Learning based Data Analysis workflow consists of. (Note: if text inside figure appears small, please increase the font size temporarily by Ctrl+roll-mouse-scroller) Most of our time will be spent in Phases 1 and 2. Source code […]