This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.open <dbname>.db | |
sqlite3 <dbname>.db < <file>.sql |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install python-pip | |
pip install virtualenv | |
cd projects | |
virtualenv venv | |
source venv/bin/activate | |
pip install Flask | |
pip install virtualenvwrapper | |
vim .bashrc | |
Add below two lines to .bashrc: | |
export WORKON_HOME=~/Envs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -m SimpleHTTPServer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Packages needed: | |
1. mezzanine (CMS) | |
2. south (for DB migrations) | |
3. django-compressor (for dealing static files) | |
4. cartridge (for shopping cart) | |
Creating a new project: | |
- delete manage.py and folders (everything except readme.md) from the django project | |
- $ mezzanine-project -a cartridge <project_name> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE KEYSPACE "test" WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 3};EXIT | |
use test; | |
describe tables; | |
To exit cqlsh: EXIT | |
CASSANDRA QUERY PARSER: | |
------------------------- | |
1. Download https://github.com/Stratio/cassandra-lucene-index | |
Ensure lucene-index version and Cassandra versions are the same. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm install -g vue-cli --first time installation of npm vue-cli | |
Create new project: | |
vue init webpack-simple <vueprojname> --creates a new vue project with the template as webpack-simple | |
? (vueprojname) --confirm project name and other details. | |
npm install | |
npm run dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ export FLASK_APP=hello.py --linux | |
$ set FLASK_APP=hello.py --windows CMD | |
$ python -m flask run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var h = 500; | |
var w = 800; | |
var svg = d3.select("body").append("svg") | |
.attr("id","chart") | |
.attr("width",w) | |
.attr("height",h); | |
var num = 51; | |
var types = 4; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SSH: | |
ssh-keygen -t rsa | |
enter passphrase. | |
copy content of .ssh/id_rsa.pub: | |
clip < ~/.ssh/id_rsa.pub | |
creating user: | |
adduser shilpa | |
gpasswd -a shilpa root | |
gpasswd -a shilpa sudo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
to install: | |
Frozen-Flask | |
to run: | |
python <pyfilename> build | |
import sys | |
from flask import Flask | |
from flask import render_template | |
import pandas as pd |
OlderNewer