This file contains hidden or 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
| upstream app_server { | |
| server unix:/home/superset/gunicorn.sock fail_timeout=0; | |
| } | |
| server { | |
| listen 80; | |
| client_max_body_size 4G; | |
| server_name superset.example.com; |
This file contains hidden or 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
| [Unit] | |
| Description="Apache Superset" | |
| After=network.target | |
| [Service] | |
| User=superset | |
| Group=superset | |
| Environment=PYTHONPATH=$PYTHONPATH:/home/superset | |
| ExecStart=/home/superset/superset-venv/bin/gunicorn -w 4 -k gevent --timeout 120 -b unix:/home/superset/gunicorn.sock --limit-request-line 0 --limit-request-field_size 0 superset:app | |
| Restart=on-failure |
This file contains hidden or 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
| deactivate () { | |
| ... | |
| export PYTHONPATH="$_OLD_PYTHONPATH" | |
| } | |
| export _OLD_PYTHONPATH="$PYTHONPATH"; | |
| export PYTHONPATH="/home/superset:$PYTHONPATH"; |
This file contains hidden or 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
| from sklearn.neighbors import kneighbors_graph | |
| from sklearn.manifold import TSNE | |
| import numpy as np | |
| X = np.random.rand(100,10) | |
| distances = kneighbors_graph(X, n_neighbors=40, mode="distance", metric="cosine") | |
| X_embedded = TSNE(n_components=2, metric="precomputed").fit_transform(distances) | |
This file contains hidden or 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
| test |
This file contains hidden or 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
| history -w /dev/stdout | grep -o "^git [a-Z]*\( -\{1,2\}\([a-Z]\)*\)*" | sort | uniq -c | sort -rg |
This file contains hidden or 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
| /* false, 0, undefined, null, NaN, "" are false */ | |
| > Boolean(false) | |
| false | |
| > Boolean(0) | |
| false | |
| > Boolean("") | |
| false | |
| > Boolean(undefined) | |
| false |