Skip to content

Instantly share code, notes, and snippets.

View Varnan's full-sized avatar

Varnan K Varnan

View GitHub Profile
@Varnan
Varnan / test.py
Last active September 3, 2015 12:53
Python Test
############# PYTHON TEST #####################
# 1. Create a list of integers from 2 to 30, and another list from 3-50
def list_creation():
first_list = range(2,31)
second_list = range(3,51)
print "First List (2-30) : ",first_list
print "Second List (3-50) : ",second_list
@Varnan
Varnan / Ubuntu_Python_for_starters.txt
Last active July 21, 2020 06:14
Tutorial for python starters for setting their ubuntu work environment .
=========================== SETTING WORKING ENVIORNMENT =========================
sudo apt-get install python-setuptools python-pip postgresql libjpeg62 libjpeg62-dev libpq-dev python-dev python-virtualenv zlib1g-dev libfreetype6 libfreetype6-dev python-psycopg2 libmysqlclient-dev
1. Create virtual env through terminal
$ virtualenv ENV_Name
@Varnan
Varnan / Git_basic.txt
Last active November 17, 2015 11:50
Git Basic Opertaions
=========================== GIT REPOSITORY ====================================
https://www.atlassian.com/git/tutorials/setting-up-a-repository/git-init
Start from the beginning, because we need to initialize the git empty repository for our project.
$ git init - if encountered any error for git , just install,
@Varnan
Varnan / Model_Translation.txt
Created September 3, 2015 12:44
Model Translation - Multi language support for your Django project
======================= Model Translation ===============================================
Its also very simpleModel Translation, if you want to translate data inside the db, then it will add new field for the languages that you have set in settings.py,
#### Just follow this:
http://django-modeltranslation.readthedocs.org/en/latest/
@Varnan
Varnan / Class_based_views.txt
Created September 3, 2015 12:47
Class based view in django
=================== Class based view in django =====================================
For class based view, check this link, otherwise download django pdf doc, and just search for that,
Dont worry its very simple, if you know oops and python mixins.
https://docs.djangoproject.com/en/1.8/topics/class-based-views/
https://docs.djangoproject.com/en/1.8/topics/class-based-views/intro/
https://docs.djangoproject.com/en/1.8/topics/class-based-views/generic-display/
https://docs.djangoproject.com/en/1.8/topics/class-based-views/generic-editing/
@Varnan
Varnan / python_interview_basics.txt
Last active November 2, 2017 09:19
Python Interview Basics
REST :
Representational State Transfer
Garbage Collector:
It works by reference counting and by cycle detection.
Multi Threading:
Global Interpreter Lock (GIL)
@Varnan
Varnan / Tutorials.txt
Created January 17, 2018 06:56
Tutorials LInks
GIT Tutorials
===============
http://pcottle.github.io/learnGitBranching/?demo
https://try.github.io/levels/1/challenges/1
Create a new local branch from develop:
git fetch origin develop
git checkout develop
MAC OS - DJANGO, MYSQL , POSTGRESQL Basic Setup
=================================================
1. Install and configure Sublime Text 3 for Django
http://www.marinamele.com/2014/03/install-and-configure-sublime-text-3.html
2. Install and Configure MySQL for Django :
http://www.marinamele.com/taskbuster-django-tutorial/install-and-configure-mysql-for-django
Tutorials
https://www.youtube.com/watch?v=aooPutfcQjg&feature=youtu.be
https://www.youtube.com/watch?v=ADqBx5Ja9Ek&feature=youtu.be
https://www.youtube.com/watch?v=frGy-nGoGUY&feature=youtu.be
Basic Tutorial : http://www.steves-internet-guide.com/into-mqtt-python-client/
@Varnan
Varnan / open_cv
Last active May 7, 2018 09:49
OpenCV , Python 2.7 VirtualENV mapping on MAC OSX
> brew update
> brew install -v cmake
> brew install opencv
> https://www.pyimagesearch.com/2016/10/24/ubuntu-16-04-how-to-install-opencv/
> ln -s /usr/local/lib/python2.7/site-packages/cv2.so /usr/local/lib/python2.7/site-packages/cv.py /Users/Varnan/ENVS/raybaby/lib/python2.7/site-packages