Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math| """Convert jupyter notebook to sphinx gallery notebook styled examples. | |
| Usage: python ipynb_to_gallery.py <notebook.ipynb> | |
| Dependencies: | |
| pypandoc: install using `pip install pypandoc` | |
| """ | |
| import pypandoc as pdoc | |
| import json |
| import numpy as np | |
| import tensorflow as tf | |
| # Newton's optimization method for multivariate function in tensorflow | |
| def cons(x): | |
| return tf.constant(x, dtype=tf.float32) | |
| def compute_hessian(fn, vars): | |
| mat = [] |
Python syntax here : 2.7 - online REPL
Javascript ES6 via Babel transpilation - online REPL
import math1) Filter Table
Filter is default table for iptables. So, if you don’t define you own table, you’ll be using filter table. Iptables’s filter table has the following built-in chains.
| #### Contents of the preconfiguration file (for squeeze) | |
| ### Localization | |
| # Preseeding only locale sets language, country and locale. | |
| #d-i debian-installer/locale string en_US | |
| # The values can also be preseeded individually for greater flexibility. | |
| d-i debian-installer/language string en | |
| d-i debian-installer/country string CA | |
| d-i debian-installer/locale string en_US.UTF-8 | |
| # Optionally specify additional locales to be generated. |
| #!/usr/bin/env python | |
| __author__ = 'Kevin Warrick' | |
| __email__ = '[email protected]' | |
| import cPickle | |
| from functools import wraps | |
| def redis_lru(capacity=5000, slice=slice(None)): | |
| """ | |
| Simple Redis-based LRU cache decorator *. |
GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.
| import logging | |
| import socket | |
| log = logging.getLogger('udp_server') | |
| def udp_server(host='127.0.0.1', port=1234): | |
| s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
| s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) |