BEGIN:VCALENDAR
PRODID:-//Mozilla.org/NONSGML Mozilla Calendar V1.1//EN
VERSION:2.0
BEGIN:VEVENT
CREATED:20170220T182458Z
LAST-MODIFIED:20170220T182458Z
DTSTAMP:20170220T182458Z
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
import pandas as pd | |
import numpy as np | |
from sklearn.preprocessing import OneHotEncoder | |
# https://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.OneHotEncoder.html#sklearn.preprocessing.OneHotEncoder | |
# https://datascienceparichay.com/article/numpy-hstack/ | |
if __name__ == '__main__': | |
array = [['Male', 1, 'Green', 12, 5], |
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
--- Cargo.toml --- | |
[package] | |
name = "actix-example" | |
version = "0.1.0" | |
edition = "2018" | |
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html | |
[dependencies] |
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
# https://www.kdnuggets.com/2017/03/simple-xgboost-tutorial-iris-dataset.html | |
# https://joblib.readthedocs.io/en/latest/ | |
import pandas as pd | |
import numpy as np | |
import xgboost as xgb | |
import numpy as np | |
from sklearn import datasets | |
from sklearn.model_selection import train_test_split | |
import joblib |
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
/* | |
This is an example of a golang gzip writer program, | |
which appends data to a file. | |
*/ | |
package main |
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
package main | |
import "fmt" | |
// https://www.coursera.org/learn/golang-functions-methods/peer/UxoIW/module-1-activity-bubble-sort-program/submit | |
// https://tutorialedge.net/golang/implementing-bubble-sort-with-golang/ | |
func BubbleSort(input []int) { | |
n := len(input) |
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
const jsonTimeLayout = "2006-01-02T15:04:05+07:00" | |
// JSONTime is the time.Time with JSON marshal and unmarshal capability | |
type JSONTime struct { | |
time.Time | |
} | |
// UnmarshalJSON will unmarshal using 2006-01-02T15:04:05+07:00 layout | |
func (t *JSONTime) UnmarshalJSON(b []byte) error { | |
parsed, err := time.Parse(jsonTimeLayout, string(b)) |
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
input { | |
gelf {} | |
} | |
filter { | |
if [message] { | |
grok { | |
match => { "message" => "%{IPORHOST:remote_ip} - %{DATA:user_name} \[%{HTTPDATE:access_time}\] \"%{WORD:http_method} %{DATA:url} HTTP/%{NUMBER:http_version}\" %{NUMBER:response_code} %{NUMBER:body_sent_bytes} \"%{DATA:referrer}\" \"%{DATA:agent}\"" } | |
} | |
if "_grokparsefailure" in [tags] { | |
} |
- Install pre-requisities
sudo apt-get install build-essential tcl
- Install Redis
cd /tmp
curl -O http://download.redis.io/redis-stable.tar.gz
tar xzvf redis-stable.tar.gz
NewerOlder