On Mac, Homebrew is the de-facto package manager, and Homebrew Cask is the app manager. I’m going to use Cask to install Java 7 and 8.
Install Homebrew Cask first if you haven’t:
""" | |
Thiss script would convert a pre-trained TF model to a servable version for TF Serving. | |
A pre-trained model can be downloaded here | |
https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/detection_model_zoo | |
Requirements: | |
* A directory contains pretrained model (can be download above). | |
* Edit three arguments `frozen_graph`, `model_name`, `base_dir` accordingly |
Host NAT | |
HostName 52.15.213.177 | |
ForwardAgent yes | |
StrictHostKeyChecking ask | |
IdentityFile "C:\Users\Zach Tankersley\.ssh\id_rsa.pem" | |
User ec2-user | |
Host 10.0.1.12 | |
ProxyCommand C:\Windows\System32\OpenSSH\ssh.exe -q -W %h:%p NAT | |
ForwardAgent yes |
#!/usr/bin/env python | |
# see http://socialdatablog.com/extract-pdf-annotations.html | |
myxkfolder="/home/steve/xk/" #you need to set this to where you want your to-dos to appear | |
import poppler, os.path, os, time, datetime | |
for root, dirs, files in os.walk('./'): | |
for lpath in files: |
#!/bin/bash | |
set -u | |
DOC_DIR=godoc | |
PKG=github.com/matrix-org/go-neb | |
# Run a godoc server which we will scrape. Clobber the GOPATH to include | |
# only our dependencies. | |
GOPATH=$(pwd):$(pwd)/vendor godoc -http=localhost:6060 & | |
DOC_PID=$! |
# -*- coding: utf-8 -*- | |
"""From a Query.all(), turn this result to a pandas DataFrame | |
Table creation and example data come from the official SQLAlchemy ORM | |
tutorial at http://docs.sqlalchemy.org/en/latest/orm/tutorial.html | |
Just take a look at the 'query_to_dict' function and the last part of the __main__. | |
""" |
Choose archetype: | |
1: remote -> br.gov.frameworkdemoiselle.archetypes:demoiselle-jsf-jpa (Archetype for web applications (JSF + JPA) using Demoiselle Framework) | |
2: remote -> br.gov.frameworkdemoiselle.archetypes:demoiselle-minimal (Basic archetype for generic applications using Demoiselle Framework) | |
3: remote -> co.ntier:spring-mvc-archetype (An extremely simple Spring MVC archetype, configured with NO XML.) | |
4: remote -> com.agilejava.docbkx:docbkx-quickstart-archetype (-) | |
5: remote -> com.alibaba.citrus.sample:archetype-webx-quickstart (-) | |
6: remote -> com.bsb.common.vaadin:com.bsb.common.vaadin.embed-simple-archetype (-) | |
7: remote -> com.bsb.common.vaadin:com.bsb.common.vaadin7.embed-simple-archetype (-) | |
8: remote -> com.cedarsoft.open.archetype:multi (-) | |
9: remote -> com.cedarsoft.open.archetype:simple (-) |
On Mac, Homebrew is the de-facto package manager, and Homebrew Cask is the app manager. I’m going to use Cask to install Java 7 and 8.
Install Homebrew Cask first if you haven’t:
# Author: Peter Prettenhofer <peter.prettenhofer@gmail.com> | |
# Lars Buitinck <L.J.Buitinck@uva.nl> | |
# License: Simplified BSD | |
from sklearn.datasets import fetch_20newsgroups | |
from sklearn.feature_extraction.text import TfidfVectorizer | |
from sklearn.feature_extraction.text import HashingVectorizer | |
from sklearn.feature_extraction.text import TfidfTransformer | |
from sklearn.feature_extraction.text import FeatureHasher | |
from sklearn.pipeline import Pipeline |
const base64 = 'data:image/png;base65,....' // Place your base64 url here. | |
fetch(base64) | |
.then(res => res.blob()) | |
.then(blob => { | |
const fd = new FormData(); | |
const file = new File([blob], "filename.jpeg"); | |
fd.append('image', file) | |
// Let's upload the file | |
// Don't set contentType manually → https://github.com/github/fetch/issues/505#issuecomment-293064470 |
Python: create jupyter notebook