Skip to content

Instantly share code, notes, and snippets.

View pratos's full-sized avatar
🎯
Focusing

prthamesh pratos

🎯
Focusing
View GitHub Profile
@pratos
pratos / gist:b32f6a780b462c68c18b6ed2b0a5f891
Created July 13, 2016 04:20 — forked from debasishg/gist:8172796
A collection of links for streaming algorithms and data structures
  1. General Background and Overview
@pratos
pratos / condaenv.txt
Created November 30, 2016 07:01
To package a conda environment (Requirement.txt and virtual environment)
# For Windows users# Note: <> denotes changes to be made
#Create a conda environment
conda create --name <environment-name> python=<version:2.7/3.5>
#To create a requirements.txt file:
conda list #Gives you list of packages used for the environment
conda list -e > requirements.txt #Save all the info about packages to your folder
@pratos
pratos / git.md
Last active September 19, 2017 11:56
Git Common - AthenaSight

General git commands_

git clone <git-clone repository link>
------------or----------------------
git remote add origin https://github.com/user/repo.git

git add <folder/filename>
git commit -m "Comment"
git status
@pratos
pratos / keeprunning.md
Last active March 15, 2021 07:47
Avoid disconnection to Digital Ocean Server and keeping a python script running
cd
cd /etc/ssh
sudo nano sshd_config

Search for keepalive (Use Ctrl+W to search) Add the below

ClientAliveInterval 30
@pratos
pratos / gist:09312bd52b4660fb6a7441cd4f5059a7
Last active April 11, 2017 09:05
Regular functions in Ubuntu

Get list of the packages installed in the system

$ dpkg --list

Remove the packages from Ubuntu

sudo apt-get --purge remove <package-name>

@pratos
pratos / zeppelin_ubuntu.md
Last active February 13, 2022 01:53
To Install Zeppelin [Scala and Spark] in Ubuntu 16.04LTS

Install Zeppelin in Ubuntu systems

  • First install Java, Scala and Spark in Ubuntu

    • Install Java
      sudo apt-add-repository ppa:webupd8team/java
      sudo apt-get update
      sudo apt-get install oracle-java8-installer
      
@pratos
pratos / zeppelin_windows.md
Last active July 1, 2019 00:34
To install Zeppelin in Windows 10

Installing Zeppelin in Windows

We would need cygwin for this. Install the basic Cygwin and specifically install wget,tar,qawk,bzip2,subversion,vim

Run the installer After Cygwin gets installed, get the setup file and install the below:

> C:/Users/user/Downloads/setup-x86_64.exe -q -P  wget,tar,qawk,bzip2,subversion,vim
@pratos
pratos / time_manipulation_R.md
Last active April 4, 2017 05:24
To convert mixed date strings to standard date format
library(lubridate)
parse_date_time(x = paste("01-", "13-Jan", sep = ""),
+                 orders = c("d m y", "d-y-m", "m-d-y"),
+                 locale = "eng", tz="GMT")
[1] "2013-01-01 GMT"

parse_date_time(x = paste("01-", "Jan-13", sep = ""),
+                 orders = c("d m y", "d-y-m", "m-d-y"),
+                 locale = "eng", tz="GMT")
@pratos
pratos / mysql_install.md
Last active November 7, 2020 07:49
Uninstall MySQL already present in Digital Ocean(Ubuntu 16.04 LTS) and install-setup again

Installing MySQL 5.7 in Ubuntu 16.04LTS (Note: Things still break in Ubuntu, advisable to move to docker and setup volumes_)

sudo apt-get purge mysql-server mysql-client mysql-common mysql-server-core-5.7 mysql-client-core-5.7
sudo rm -rf /etc/mysql /var/lib/mysql

Clean-up

sudo apt-get autoremove
@pratos
pratos / xgboost_python_install.md
Last active November 29, 2018 07:23
Install xgboost for Python in Ubuntu

Clone the recursive repo for xgboost

git clone --recursive https://github.com/dmlc/xgboost
cd xgboost
make -j4

cd in the folder: xgboost/python-package