Skip to content

Instantly share code, notes, and snippets.

View deerme's full-sized avatar

Pedro V deerme

View GitHub Profile
  1. First get to the existing directory
    $ cd my/folder/

  2. Now start a new git repository
    $ git init

  3. Identify if the current elements on the directory are needed or not and add them to the .gitignore file. When ready...
    $ vim .gitignore

  4. When ready create the first commit on the server

@deerme
deerme / count_vectorizer_pandas.py
Created April 28, 2019 21:44 — forked from kovid-rathee/count_vectorizer_pandas.py
How to vectorize sentences using a Pandas and sklearn's CountVectorizer
import pandas as pd
from sklearn.feature_extraction.text import CountVectorizer
vectorizer = CountVectorizer()
corpus = [ 'This is a sentence',
'Another sentence is here',
'Wait for another sentence',
'The sentence is coming',
'The sentence has come'
]
@deerme
deerme / ConfigureSplunkForwarder.sh
Created October 25, 2018 03:20 — forked from iarrup/ConfigureSplunkForwarder.sh
Configure Splunk Universal Forwarder on Ubuntu
## Download the splunk universal forwarder
# Would probably need to login to splunk first.
wget -O splunkforwarder-6.3.3-f44afce176d0-linux-2.6-amd64.deb 'https://www.splunk.com/bin/splunk/DownloadActivityServlet?architecture=x86_64&platform=linux&version=6.3.3&product=universalforwarder&filename=splunkforwarder-6.3.3-f44afce176d0-linux-2.6-amd64.deb&wget=true'
## install
# It gets installed in /opt/splunkforwarder
sudo dpkg -i splunkforwarder-6.3.3-f44afce176d0-linux-2.6-amd64.deb
## add the entry to init.d