Skip to content

Instantly share code, notes, and snippets.

View mthipparthi's full-sized avatar

Mahesh Thipparthi mthipparthi

View GitHub Profile
@mthipparthi
mthipparthi / uniq_column.py
Last active November 9, 2015 00:46
Python : Finding Unique Eements in a column
# Best way to find uniqness in python is to apply set to any python datastructure
asin_list=[]
with open('3984875016745.txt') as input_file:
for line in input_file.readlines():
asin_list.append(list(line.split('\t'))[16])
asin_list.remove('asin1')
with open('asin_output.txt','w') as out_file:
for asin in list(set(asin_list)):
out_file.write(asin+'\n')
@mthipparthi
mthipparthi / gist:7dab48b4ac71610cce86
Created December 4, 2015 06:30
Pycthon challenges
chal 1 :
chal 2 :
s='g fmnc wms bgblr rpylqjyrc gr zw fylb. rfyrq ufyr amknsrcpq ypc dmp. bmgle gr gl zw fylb gq glcddgagclr ylb rfyr'q ufw rfgq rcvr gq qm jmle. sqgle qrpgle.kyicrpylq() gq pcamkkclbcb. lmu ynnjw ml rfc spj.'
a=[ord(x)+2 if x.isalpha() else ord(x) for x in s]
s="".join([chr(x) for x in a])
@mthipparthi
mthipparthi / git_commands.txt
Last active May 2, 2017 06:51
git commands
# Intitial Setup
git config --global user.name "Mahesh Thipparthi"
git config --global user.email "[email protected]"
## remote adding origin
git remote add origin https://github.com/mthipparthi/syd_pds_ato_data.git
## Initialize a repository in an existing directory
git init
## Get a copy of an existing repository
git clone URL
from flask import Flask
from flask_apispec import use_kwargs, marshal_with
from marshmallow import fields, Schema
from flask import make_response
from flask_apispec.views import MethodResource
from apispec import APISpec
from apispec.ext.marshmallow import MarshmallowPlugin
brew install python3.6
brew install [email protected]
brew install python@3
brew install [email protected]
brew update python@2
brew upgrade python@2
brew install md5sum
brew install md5sha1sum
brew install docker
brew install docker-compose
brew install python3.6
brew install [email protected]
brew install python@3
brew install [email protected]
brew update python@2
brew upgrade python@2
brew install md5sum
brew install md5sha1sum
brew install docker
brew install docker-compose
brew install pyenv
pyenv install 3.8
pyenv install 3.8.0
pyenv install 3.7
pyenv install 3.7.5
pyenv install 3..6
pyenv install 3.6
pyenv install 3.6.9
pyenv install 2.7
pyenv install 2.7.17
brew install pyenv
pyenv install 3.8
pyenv install 3.8.0
pyenv install 3.7
pyenv install 3.7.5
pyenv install 3..6
pyenv install 3.6
pyenv install 3.6.9
pyenv install 2.7
pyenv install 2.7.17
python -m pip install pipx
pipx inject visidata pandas
pipx
pipx install visidata
pipx install poetry
pipx install awscli
pipx ensurepath
pipx completions
pipx install aws-google-auth
pipx list
{
// Controls the font size in pixels.
"editor.fontSize": 18,
"editor.wordWrap": "on",
"editor.wordWrapColumn": 130,
"editor.formatOnSave": true,
"editor.renderIndentGuides": false,
"files.autoSave": "afterDelay",
"java.home": "/Library/Java/JavaVirtualMachines/jdk1.8.0_141.jdk/Contents/Home",
"gradle.useCommand": "gradle",