Skip to content

Instantly share code, notes, and snippets.

View hakansel's full-sized avatar
🚕

H. Hakan Akansel hakansel

🚕
View GitHub Profile
@hakansel
hakansel / run.tpl
Created March 31, 2024 20:30 — forked from efrecon/run.tpl
`docker inspect` template to regenerate the `docker run` command that created a container
docker run \
--name {{printf "%q" .Name}} \
{{- with .HostConfig}}
{{- if .Privileged}}
--privileged \
{{- end}}
{{- if .AutoRemove}}
--rm \
{{- end}}
{{- if .Runtime}}
@hakansel
hakansel / web.xml
Created March 16, 2018 07:27 — forked from jtgasper3/web.xml
Force Tomcat to redirect all HTTP traffic to HTTPS.
<!--
To force Tomcat to redirect and revert all requested HTTP traffic over to HTTPS, configure the `conf/web.xml` file with the below block.
This should be placed at the very end of the file near and above the ending `</webapp>` tag:
-->
<security-constraint>
<web-resource-collection>
<web-resource-name>Automatic Forward to HTTPS/SSL
</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
import sklearn
import numpy as np
import math
import pickle
import collections
class DGA:
def __init__(self):
self.model = { 'clf': pickle.loads(open('./dga_model_random_forest.model','rb').read())
, 'alexa_vc': pickle.loads(open('./dga_model_alexa_vectorizor.model','rb').read())
, 'alexa_counts': pickle.loads(open('./dga_model_alexa_counts.model','rb').read())