To transform the currently opened Graphviz source file (in DOT Language) into a PNG:
{
"cmd": [ "dot", "-Tpng", "-o", "$file_base_name.png", "$file"],
"selector": "source.dot"
}| # You need to install scikit-learn: | |
| # sudo pip install scikit-learn | |
| # | |
| # Dataset: Polarity dataset v2.0 | |
| # http://www.cs.cornell.edu/people/pabo/movie-review-data/ | |
| # | |
| # Full discussion: | |
| # https://marcobonzanini.wordpress.com/2015/01/19/sentiment-analysis-with-python-and-scikit-learn |
To transform the currently opened Graphviz source file (in DOT Language) into a PNG:
{
"cmd": [ "dot", "-Tpng", "-o", "$file_base_name.png", "$file"],
"selector": "source.dot"
}| #! /usr/bin/env python | |
| #-*- coding: utf-8 -*- | |
| import json | |
| import httplib2 | |
| from datetime import datetime | |
| from apiclient.discovery import build | |
| from oauth2client.client import OAuth2WebServerFlow |
| #!/usr/bin/python | |
| import rtmidi, time | |
| buttons = { | |
| 58: 'track_left', | |
| 59: 'track_right', | |
| 46: 'cycle', | |
| 60: 'marker_set', | |
| 61: 'marker_left', |
| #!/usr/bin/env python | |
| # | |
| # Very basic example of using Python and IMAP to iterate over emails in a | |
| # gmail folder/label. This code is released into the public domain. | |
| # | |
| # RKI July 2013 | |
| # http://www.voidynullness.net/blog/2013/07/25/gmail-email-with-python-via-imap/ | |
| # | |
| import sys | |
| import imaplib |
| This is free and unencumbered software released into the public domain. | |
| Anyone is free to copy, modify, publish, use, compile, sell, or | |
| distribute this software, either in source code form or as a compiled | |
| binary, for any purpose, commercial or non-commercial, and by any | |
| means. | |
| In jurisdictions that recognize copyright laws, the author or authors | |
| of this software dedicate any and all copyright interest in the | |
| software to the public domain. We make this dedication for the benefit |
| import os | |
| import matplotlib.pyplot as plt | |
| def save(path, ext='png', close=True, verbose=True): | |
| """Save a figure from pyplot. | |
| Parameters | |
| ---------- | |
| path : string | |
| The path (and filename, without the extension) to save the |
| . | |
| ├── deploy.py | |
| ├── project | |
| │ ├── application.py | |
| │ ├── apps | |
| │ │ ├── articles | |
| │ │ │ ├── forms.py | |
| │ │ │ ├── __init__.py | |
| │ │ │ ├── models.py | |
| │ │ │ └── views.py |