Skip to content

Instantly share code, notes, and snippets.

View roboslone's full-sized avatar
🐘
Sloning...

roboslone roboslone

🐘
Sloning...
View GitHub Profile
@roboslone
roboslone / style.css
Last active June 9, 2017 01:55
Jupyter Notebook styles
body {
background-color: #F3F2EE;
font-family: "Yandex Sans Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
.notebook_app {
background-color: #F3F2EE;
}
body > #header #header-container {
@roboslone
roboslone / cache.py
Created August 18, 2016 10:24
Redis Cluster cache backend for Django
import pickle
from logging import getLogger
from rediscluster import StrictRedisCluster
class RedisClusterCache(StrictRedisCluster):
def __init__(self, _, options=None, **kwargs):
options = options or {}
echo "${White}${Bold}┏━━━━━━━━━━━━━━━━━━━━━━━┓"
echo "${White}${Bold}┃ ${BGreen}Everything Installed!${Reset}${White}${Bold} ┃"
echo "${White}${Bold}┗━━━━━━━━━━━━━━━━━━━━━━━┛"
2014-10-26 10:58:56,560: DEBUG : bind: address=('localhost', 54066)
2014-10-26 10:58:56,560: DEBUG : listen: backlog=5
2014-10-26 10:58:56,560: INFO : Anaconda Server started in port 54066 for PID 71924 with cache dir /Users/roboslone/Library/Caches/Jedi/Experiments and extra paths /Users/roboslone/Documents/Experiments,/Users/roboslone/Documents/Flags,/Users/roboslone/Documents/DnD,/Users/roboslone/Documents/Configurations,/Users/roboslone/Documents/Scripts,/Users/roboslone/Documents/Utils
2014-10-26 10:58:56,561: INFO : Incomming connection from ('127.0.0.1', 54112)
2014-10-26 10:58:56,561: INFO : Incomming connection from ('127.0.0.1', 54113)
2014-10-26 10:58:58,566: INFO : process 71924 does not exists stopping server...
2014-10-26 10:58:59,567: INFO : Closing the socket, server will be shutdown now...
2014-10-27 15:20:34,117: DEBUG : bind: address=('localhost', 60680)
2014-10-27 15:20:34,117: DEBUG : listen: backlog=5
2014-10-27 15:20:34,117: INFO : Anaconda Server started in po
2014-10-28 22:34:58,692: DEBUG : bind: address=('localhost', 59388)
2014-10-28 22:34:58,692: DEBUG : listen: backlog=5
2014-10-28 22:34:58,693: INFO : Anaconda Server started in port 59388 for PID 62419 with cache dir /Users/roboslone/Library/Caches/Jedi/anaconda-3
2014-10-28 22:34:58,701: INFO : Incomming connection from ('127.0.0.1', 59434)
2014-10-28 22:34:58,702: INFO : Incomming connection from ('127.0.0.1', 59435)
2014-10-28 22:34:59,026: INFO : client requests: autocomplete
2014-10-28 22:34:59,030: INFO : About push back to ST3: b'{"completions": [["callable\\tfunction", "callable"], ["ChildProcessError\\tclass", "ChildProcessError"], ["chr\\tfunction", "chr"], ["class\\tkeyword", "class"], ["classmethod\\tclass", "classmethod"], ["compile\\tfunction", "compile"], ["complex\\tclass", "complex"], ["ConnectionAbortedError\\tclass", "ConnectionAbortedError"], ["ConnectionError\\tclass", "ConnectionError"], ["ConnectionRefusedError\\tclass", "ConnectionRefusedError"], ["ConnectionResetEr
startup, version: 3065 osx x64 channel: stable
executable: /Applications/Sublime Text.app/Contents/MacOS/Sublime Text
working dir: /
packages path: /Users/roboslone/Library/Application Support/Sublime Text 3/Packages
state path: /Users/roboslone/Library/Application Support/Sublime Text 3/Local
hardware concurrency: 4
zip path: /Applications/Sublime Text.app/Contents/MacOS/Packages
zip path: /Users/roboslone/Library/Application Support/Sublime Text 3/Installed Packages
found 12 files for base name Default.sublime-keymap
found 1 files for base name Default.sublime-mousemap
/*
Anaconda default settings
*/
{
/*
Auto project switching
If you set this to true, anaconda will detect project switches and
will reconnect a new JsonServer with the switched project
configuration
@roboslone
roboslone / settings.py
Created March 13, 2014 15:58
How to add modules to python path in Django.
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import sys
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
sys.path.append('/Users/RoboSloNE/Documents/Development/Python/Django/yandex/apps')
@roboslone
roboslone / Nginx and multiple slashes
Created January 30, 2014 11:52
Nginx to respond with 404 on URL with multiple slashes
if ($request_uri ~* "^(.*)//+(.*)") {
rewrite . /404.php;
}