Set the base image to Ubuntu must be first instruction - use docker search to find images
FROM ubuntu # <image>
FROM ubuntu:latest # - <image>:<tag>
FROM ubuntu:precise (LTS)Set the maintainer info
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta http-equiv="X-UA-Compatible" content="ie=edge"> | |
| <title>Putting User Input into JS Objects</title> | |
| <style> | |
| .formBox{ | |
| padding: 0.5rem 2rem; |
| // don't forget google maps import: | |
| // <script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyC44mPpaMNvENXryYjHBHzjST1UMnYlARk"></script> | |
| import React, { Component } from 'react' | |
| import { withGoogleMap, GoogleMap, Marker } from 'react-google-maps' | |
| class Map extends Component { | |
| constructor(){ | |
| super() |
| import React from "react"; | |
| import { Router, Route } from "react-router-dom"; | |
| import { createBrowserHistory } from "history"; | |
| import GreetingCat from "./GreetingCat"; | |
| import RandomCat from "./RandomCat"; | |
| import "./App.css"; | |
| const defaultHistory = createBrowserHistory(); | |
| function App({ history = defaultHistory }) { |
| Start Training!...Here's the data, we'll do 2 iterations: | |
| [ { input: [ 0, 1 ], output: [ 1, 0 ] }, | |
| { input: [ 1, 1 ], output: [ 1, 1 ] } ] | |
| ======== TRAINING ITERATION 1 ========= | |
| --------- Run input set 0: 0,1 ---------- | |
| -> Layer 2 has 3 nodes | |
| START NODE: 0 | |
| -> bias for node 0: 0.13861538469791412 | |
| -> weights for node 0: | |
| -> input value: 0, weight: -0.03485306352376938 |
Set the base image to Ubuntu must be first instruction - use docker search to find images
FROM ubuntu # <image>
FROM ubuntu:latest # - <image>:<tag>
FROM ubuntu:precise (LTS)Set the maintainer info
| # coding:utf-8 | |
| from elasticsearch import Elasticsearch | |
| import json | |
| # Define config | |
| host = "127.0.0.1" | |
| port = 9200 | |
| timeout = 1000 | |
| index = "index" |
The program below can take one or more plain text files as input. It works with python2 and python3.
Let's say we have two files that may contain email addresses.
file_a.txt
foo bar
ok ideler.dennis@gmail.com sup
hey...user+123@example.com,wyd
hello world!
| import pytesseract | |
| import os | |
| import sys | |
| def read_image(img_path, lang='eng'): | |
| """ | |
| Performs OCR on a single image | |
| :img_path: str, path to the image file |
| # -*- coding: utf-8 -*- | |
| """Page Rank Algorithm.ipynb | |
| Automatically generated by Colaboratory. | |
| Original file is located at | |
| https://colab.research.google.com/drive/1oUC_418I6e2nv_2xBQ0sgXZtDfA98zuH | |
| """ | |
| cd /content/drive/My Drive/medium blogs/Page Rank Algorithm |
| import numpy as np | |
| import re | |
| import itertools | |
| from collections import Counter | |
| def clean_str(string): | |
| """ | |
| Tokenization/string cleaning for all datasets except for SST. | |
| Original taken from https://github.com/yoonkim/CNN_sentence/blob/master/process_data.py |