Skip to content

Instantly share code, notes, and snippets.

View ibrahimsha23's full-sized avatar
🙃

Ibrahim ibrahimsha23

🙃
  • bangalore
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ibrahimsha23
ibrahimsha23 / binary_search_algo.py
Created September 12, 2018 19:56
Binary Search Algorithm
import random
def generate_random_list():
# Generate Random List
random_list = random.sample(range(45), 34)
print("Random List is - {0}".format(random_list))
return random_list
def sort_list(rlist):
# Sorting - Insert Sort
[uwsgi]
project = edgar13
base = /home/ubuntu
chdir = %(base)/%(project)
home = %(base)/.virtualenvs/edgar13f
module = edgar13f.wsgi:application
master = true
processes = 5
#Steps to install python2 & python3 # Python is not installed defaultin Ubuntu 16.04.1 LTS
1. sudo add-apt-repository ppa:fkrull/deadsnakes
2. sudo apt-get update
3. sudo apt-get install python2.7
4. sudo apt-get install python3.5
5. sudo apt-get install python-pip
#Add Deploymentkey in code repo
1. If ssh keys is not available, generate ssh key in your machine by using cmd (ssh-keygen -t rsa -C "mail_id@domain.xyz")
2. To view and copy the generated ssh key in your deployment key section of code repo. [cat ~/.ssh/id_rsa.pub]
@ibrahimsha23
ibrahimsha23 / qandF.md
Last active May 19, 2016 03:41
Short Description - Q & F

Django Default Filter:

programming_languages = ProgrammingLanguages.objects.filter(rank_lt=250, contributors_gt=600)

Django default filter works on AND operation

DJANGO Q:

Q-queue the filter