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
| [unix_http_server] | |
| file=/tmp/supervisor.sock ; path to your socket file | |
| [supervisord] | |
| logfile=/var/log/supervisord/supervisord.log ; supervisord log file | |
| logfile_maxbytes=50MB ; maximum size of logfile before rotation | |
| logfile_backups=10 ; number of backed up logfiles | |
| loglevel=error ; info, debug, warn, trace | |
| pidfile=/var/run/supervisord.pid ; pidfile location | |
| nodaemon=false ; run supervisord as a daemon |
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
| import time | |
| import psutil | |
| import os | |
| class Timer: | |
| def __init__(self, logger=None, msg='', log_start=True): | |
| self.logger = logger | |
| self.msg = msg | |
| self.enter_memory_usage_mb = 0 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| /* | |
| Name: Base16 Monokai Dark | |
| Author: Wimer Hazenberg (http://www.monokai.nl) | |
| CodeMirror template adapted for IPython Notebook by Nikhil Sonnad (https://github.com/nsonnad/base16-ipython-notebook) | |
| CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools) | |
| Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) | |
| Fixed by DKhodakov | |
| vim ~/.jupyter/custom/custom.css |
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
| /* | |
| Name: Base16 Monokai Dark | |
| Author: Wimer Hazenberg (http://www.monokai.nl) | |
| CodeMirror template adapted for IPython Notebook by Nikhil Sonnad (https://github.com/nsonnad/base16-ipython-notebook) | |
| CodeMirror template by Jan T. Sott (https://github.com/idleberg/base16-chrome-devtools) | |
| Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) | |
| Fixed by DKhodakov | |
| vim ~/.jupyter/custom/custom.css |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| import pandas as pd | |
| df = pd.DataFrame({ | |
| 'a': ['a', 'a', 'b', 'b', 'cc'], | |
| 'b': ['d', 'e', 'f', 'g', 'h'], | |
| }) | |
| df.a.astype('category').cat.codes # + df.b.astype('category') |
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
| class Timer: | |
| def __init__(self, precision=1): | |
| self.precision = precision | |
| self.creation_time = time.time() | |
| self.start() | |
| def start(self): | |
| self.btime = time.time() | |
| @property |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.