The accompanying video for this tutorial is published on https://learn.alexchiri.com
Contents:
use std::ops::Deref; | |
use sqlx::encode::IsNull; | |
use sqlx::error::BoxDynError; | |
use sqlx::postgres::{PgArgumentBuffer, PgTypeInfo, PgValueRef}; | |
use sqlx::{Decode, Encode, Postgres, Type}; | |
/// A vector. | |
#[derive(Clone, PartialEq, Default)] | |
pub struct Vector(Vec<f32>); |
#!/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 |