$ oc kustomize --output rstudio-rhoai28.yaml
Review rstudio-rhoai28.yaml
and apply it to the cluster
$ oc apply -f rstudio-rhoai28.yaml
#!/usr/bin/env python3 | |
import json | |
import os | |
from jsonpath_ng import JSONPath | |
from jsonpath_ng.ext import parse | |
CO_CMD = "oc get co -o json" | |
QUERY = "items[?(@.status.conditions[?(@.type=='Degraded' & @.status=='True')])]" |
I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.
But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.
Svelte is a language.
Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?
A few projects that have answered this question:
Markdown Preview Enhanced supports rendering flow charts
, sequence diagrams
, mermaid
, PlantUML
, WaveDrom
, GraphViz
, Vega & Vega-lite
, Ditaa
diagrams.
You can also render TikZ
, Python Matplotlib
, Plotly
and all sorts of other graphs and diagrams by using Code Chunk.
Please note that some diagrams don't work well with file exports such as PDF, pandoc, etc.
This feature is powered by flowchart.js.
#!/bin/bash | |
# useful articles: | |
# https://vstinner.github.io/journey-to-stable-benchmark-system.html | |
# http://perf.readthedocs.io/en/latest/system.html | |
# https://baiweiblog.wordpress.com/2017/11/02/how-to-set-processor-affinity-in-linux-using-taskset/ | |
# https://wiki.archlinux.org/index.php/CPU_frequency_scaling#CPU_frequency_driver | |
if [[ $EUID > 0 ]]; then | |
echo "Please run as root" | |
exit 1 |
In your Python package, you have:
__init__.py
that designates this as a Python packagemodule_a.py
, containing a function action_a()
that references an attribute (like a function or variable) in module_b.py
, andmodule_b.py
, containing a function action_b()
that references an attribute (like a function or variable) in module_a.py
.This situation can introduce a circular import error: module_a
attempts to import module_b
, but can't, because module_b
needs to import module_a
, which is in the process of being interpreted.
But, sometimes Python is magic, and code that looks like it should cause this circular import error works just fine!
For a brief user-level introduction to CMake, watch C++ Weekly, Episode 78, Intro to CMake by Jason Turner. LLVM’s CMake Primer provides a good high-level introduction to the CMake syntax. Go read it now.
After that, watch Mathieu Ropert’s CppCon 2017 talk Using Modern CMake Patterns to Enforce a Good Modular Design (slides). It provides a thorough explanation of what modern CMake is and why it is so much better than “old school” CMake. The modular design ideas in this talk are based on the book [Large-Scale C++ Software Design](https://www.amazon.de/Large-Scale-Soft
# Linux | |
# add the following to "~/.gitconfig" file | |
[merge] | |
tool = intellij | |
[mergetool "intellij"] | |
cmd = /usr/local/bin/idea merge $(cd $(dirname "$LOCAL") && pwd)/$(basename "$LOCAL") $(cd $(dirname "$REMOTE") && pwd)/$(basename "$REMOTE") $(cd $(dirname "$BASE") && pwd)/$(basename "$BASE") $(cd $(dirname "$MERGED") && pwd)/$(basename "$MERGED") | |
trustExitCode = true | |
[diff] |
Using py.test is great and the support for test fixtures is pretty awesome. However, in order to share your fixtures across your entire module, py.test suggests you define all your fixtures within one single conftest.py
file. This is impractical if you have a large quantity of fixtures -- for better organization and readibility, you would much rather define your fixtures across multiple, well-named files. But how do you do that? ...No one on the internet seemed to know.
Turns out, however, you can define fixtures in individual files like this:
tests/fixtures/add.py
import pytest
@pytest.fixture