The accompanying video for this tutorial is published on https://learn.alexchiri.com
Contents:
#!/bin/bash | |
# Launching RStuido server on a docker with different settings | |
# Basic run command to launce rocker container with RStudio Server | |
docker run -d -p 8787:8787 \ | |
-e USER=rstudio -e PASSWORD=rstudio \ | |
rocker/rstudio:4.2 | |
# Disabling the authentication |
$ oc get pods --all-namespaces | |
NAMESPACE NAME READY STATUS RESTARTS AGE | |
openshift-apiserver-operator openshift-apiserver-operator-6db995744c-nc5pj 1/1 Running 2 6d9h | |
openshift-apiserver apiserver-d6dm8 1/1 Running 5 6d8h | |
openshift-authentication-operator authentication-operator-668f5dd5cb-px72d 1/1 Running 2 6d9h | |
openshift-authentication oauth-openshift-7949ccf5d-2j4dc 1/1 Running 0 36m | |
openshift-authentication oauth-openshift-7949ccf5d-dnzpb 1/1 Running 0 36m | |
openshift-cloud-credential-operator |
The accompanying video for this tutorial is published on https://learn.alexchiri.com
Contents:
import gym | |
from IPython import display | |
import matplotlib | |
import matplotlib.pyplot as plt | |
%matplotlib inline | |
env = gym.make('Breakout-v0') | |
env.reset() | |
img = plt.imshow(env.render(mode='rgb_array')) # only call this once | |
for _ in range(100): |
import tensorflow as tf | |
import numpy as np | |
class FloydHubMetricHook(tf.train.SessionRunHook): | |
"""An easy way to output your metric_ops to FloydHub's training metric graphs | |
This is designed to fit into TensorFlow's EstimatorSpec. Assuming you've | |
already defined some metric_ops for monitoring your training/evaluation, | |
this helper class will compute those operations then print them out in |
package main | |
import ( | |
"io" | |
"mime/multipart" | |
"net/http" | |
"net/url" | |
"os" | |
"fmt" | |
) |
int[][] result; | |
float t, c; | |
float ease(float p) { | |
return 3*p*p - 2*p*p*p; | |
} | |
float ease(float p, float g) { | |
if (p < 0.5) | |
return 0.5 * pow(2*p, g); |
# This is a GCR vanity domain. It aliases our domain to a specific | |
# bucket in GCR. | |
# e.g.`docker pull gcr.example.com/foobar` -> gcr.io/my_bucket/foobar | |
server { | |
server_name gcr.example.com; | |
listen 80; | |
listen 443 ssl; | |
location = /v2/ { | |
# If we redirect this, it can detect as unauthorized, but the token |
# coding: utf-8 | |
import json | |
import re | |
import requests | |
# 替换成你自己的经纬度数据 | |
# 查询方式 打开饿了么官网 -> 开发者模式 -> 输入送餐地址 -> 观察请求 -> 找到经纬度数据 | |
latitude = 31.23978 | |
longitude = 121.49968 |