CLICK ME
yes, even hidden code blocks!
print("hello world!")
import hashlib as hash | |
# Specify how many bytes of the file you want to open at a time | |
BLOCKSIZE = 65536 | |
sha = hash.sha256() | |
with open('kali.iso', 'rb') as kali_file: | |
file_buffer = kali_file.read(BLOCKSIZE) | |
while len(file_buffer) > 0: | |
sha.update(file_buffer) |
""" | |
Compute score for decoded text in a CTC-trained neural network using TensorFlow: | |
1. decode text with best path decoding (or some other decoder) | |
2. feed decoded text into loss function | |
3. loss is negative logarithm of probability | |
Example data: two time-steps, 2 labels (0, 1) and the blank label (2). | |
Decoding results in [0] (i.e. string containing one entry for label 0). | |
The probability is the sum over all paths yielding [0], these are: [0, 0], [0, 2], [2, 0] | |
with probability |
""" | |
A simple proxy server, based on original by gear11: | |
https://gist.github.com/gear11/8006132 | |
Modified from original to support both GET and POST, status code passthrough, header and form data passthrough. | |
Usage: http://hostname:port/p/(URL to be proxied, minus protocol) | |
For example: http://localhost:5000/p/www.google.com | |
""" | |
import re |
#!/bin/bash | |
### This gist is a step by step instructions to build and install OpenCV on python3 on ubuntu 16.04 LTS | |
### note: The easy and quick way to install opencv is to run pip install opencv-contrib-python | |
### But this easy pypi installation can’t open video files on GNU/Linux distribution or on mac OS X system. | |
### Because opencv video I/O depends heavily on FFmpeg. And on some system opencv binaries provided packages are not compiled. | |
### Therefor we have no way rather than build it from source. | |
### first update and upgrade pre-install apt-get packages. | |
sudo apt-get update |
// XPath CheatSheet | |
// To test XPath in your Chrome Debugger: $x('/html/body') | |
// http://www.jittuu.com/2012/2/14/Testing-XPath-In-Chrome/ | |
// 0. XPath Examples. | |
// More: http://xpath.alephzarro.com/content/cheatsheet.html | |
'//hr[@class="edge" and position()=1]' // every first hr of 'edge' class |
These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
ABSOLUTELY NO WARRANTY. | |
If you are still reading let's carry on with the code. | |
sudo apt-get update && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
This is a step by step instruction on how to create a cluster that has three Solr nodes running in cloud mode. These instructions should work on both a local cluster (for testing) and a remote cluster where each server runs in its own physical machine.
This was tested on Solr version 5.4.1
and Zookeeper version 3.4.6
curl -O http://archive.apache.org/dist/lucene/solr/5.5.3/solr-5.5.3.tgz
mkdir /opt/solr