The script is for IT employees who work in Shanghai office.
Feel free to contact me if you have any questions.
#if defined(ESP32) | |
#include <WiFiMulti.h> | |
WiFiMulti wifiMulti; | |
#define DEVICE "ESP32" | |
#elif defined(ESP8266) | |
#include <ESP8266WiFiMulti.h> | |
ESP8266WiFiMulti wifiMulti; | |
#define DEVICE "ESP8266" | |
#endif |
""" | |
you may run this example with uvicorn, by using this command: | |
uvicorn opalogger:app --reload | |
""" | |
import gzip | |
from typing import Callable, List | |
from fastapi import Body, FastAPI, Request, Response |
version: "3.8" | |
services: | |
# When scaling the opal-server to multiple nodes and/or multiple workers, we use | |
# a *broadcast* channel to sync between all the instances of opal-server. | |
# Under the hood, this channel is implemented by encode/broadcaster (see link below). | |
# At the moment, the broadcast channel can be either: postgresdb, redis or kafka. | |
# The format of the broadcaster URI string (the one we pass to opal server as `OPAL_BROADCAST_URI`) is specified here: | |
# https://github.com/encode/broadcaster#available-backends | |
broadcast_channel: | |
image: postgres:alpine |
git config filter.strip-notebook-output.clean 'jupyter nbconvert --ClearOutputPreprocessor.enabled=True --to=notebook --stdin --stdout --log-level=ERROR'
Create a .gitattributes
file inside the directory with the notebooks
Add the following to that file:
<link rel="shortcut icon" width=32px> | |
<canvas style="display: none" id="loader" width="16" height="16"></canvas> | |
<script> | |
class Loader { | |
constructor(link, canvas) { | |
this.link = link; | |
this.canvas = canvas; | |
this.context = canvas.getContext('2d'); | |
this.context.lineWidth = 2; |
/* Front End */ | |
import { CollectorTraceExporter } from '@opentelemetry/exporter-collector'; | |
import { DocumentLoad } from '@opentelemetry/plugin-document-load'; | |
import { XMLHttpRequestPlugin } from '@opentelemetry/plugin-xml-http-request'; | |
import { BatchSpanProcessor, ConsoleSpanExporter } from '@opentelemetry/tracing'; | |
import { WebTracerProvider } from '@opentelemetry/web'; | |
const tracerProvider = new WebTracerProvider({ | |
plugins: [new DocumentLoad(), new XMLHttpRequestPlugin()], | |
}); |
Create React App 4.0 is currently in alpha and supports using React 17 and the new JSX transform. To use it, follow these instructions.
Create a new app with npx create-react-app@next --scripts-version=@next --template=cra-template@next my-js-app
# .github/workflows/app.yaml | |
name: My Python Project | |
on: push | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
services: |
from math import sqrt | |
import torch | |
from tqdm import tqdm | |
import matplotlib.pyplot as plt | |
import networkx as nx | |
from torch_geometric.nn import MessagePassing | |
from torch_geometric.data import Data | |
from torch_geometric.utils import k_hop_subgraph, to_networkx | |
import numpy as np |