This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# from langchain.callbacks.stdout import StdOutCallbackHandler | |
from langchain.callbacks.base import BaseCallbackHandler | |
from typing import Any, Dict, List, Optional, Union | |
class VerboseCallbackHandler(BaseCallbackHandler): | |
"""Callback Handler that prints to std out.""" | |
def __init__(self, color: Optional[str] = None): | |
print(color) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -o ./install.sh https://gist.githubusercontent.com/mikeg0/57101772b45517b8af159531231f602d/raw/61f050ae8cb121710e274e8d6b3abf6522f53a72/install.sh | |
chmod +x ./install.sh | |
./install.sh |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var config = require('./config.json') | |
var http = require(config.schema); | |
var fs = require('fs'); | |
console.log("========= startup =========") | |
var trafficCamHistory = [] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# install docker | |
curl -fsSL https://get.docker.com/ | sh | |
# run docker without sudo | |
usermod -aG docker ubuntu | |
# install docker-compose | |
curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/systemd/system/docker-compose-app.service | |
[Unit] | |
Description=Docker Compose Application Service | |
Requires=docker.service | |
After=docker.service | |
[Service] | |
Type=oneshot | |
RemainAfterExit=yes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: "2.3" | |
services: | |
# pulls all traffic cam images | |
cam-miner: | |
image: node:10.6 | |
container_name: cam-miner | |
working_dir: /srv/docker/ | |
environment: | |
- NODE_ENV=production | |
# volumes: |