This is to emulat touch file.extention on Mac
copy NUL filename.txt
conda config --set auto_activate_base false
python3 -m venv env
| { | |
| "name": "nodelist", | |
| "version": "1.0.0", | |
| "description": "Mailing lists for DevPy.me", | |
| "main": "main.js", | |
| "scripts": { | |
| "test": "echo \"Error: no test specified\" && exit 1" | |
| }, | |
| "author": "Robert Washbourne", | |
| "license": "ISC", |
| from django.contrib.auth import get_user_model | |
| from firebase_admin import credentials, auth | |
| from firebase_admin.auth import UserRecord, AuthError | |
| import firebase_admin | |
| from django.conf import settings | |
| import logging | |
| logger = logging.getLogger(__name__) | |
| User = get_user_model() |
| """ | |
| Example of a Streamlit app for an interactive Prodigy dataset viewer that also lets you | |
| run simple training experiments for NER and text classification. | |
| Requires the Prodigy annotation tool to be installed: https://prodi.gy | |
| See here for details on Streamlit: https://streamlit.io. | |
| """ | |
| import streamlit as st | |
| from prodigy.components.db import connect | |
| from prodigy.models.ner import EntityRecognizer, merge_spans, guess_batch_size |
| import streamlit.ReportThread as ReportThread | |
| from streamlit.server.Server import Server | |
| def get_session_id(): | |
| # Hack to get the session object from Streamlit. | |
| ctx = ReportThread.get_report_ctx() | |
| this_session = None |
| version: '3' | |
| services: | |
| traefik: | |
| image: traefik:v2.0 | |
| container_name: traefik | |
| restart: unless-stopped | |
| security_opt: | |
| - no-new-privileges:true | |
| networks: |
| # MIT LICENSE | |
| import datetime | |
| import plotly.graph_objs as go | |
| from plotly.subplots import make_subplots | |
| import numpy as np | |
| import dash_core_components as dcc | |
| import dash_html_components as html | |
| import dash |
| import os | |
| import arel | |
| from fastapi import FastAPI, Request | |
| from fastapi.templating import Jinja2Templates | |
| app = FastAPI() | |
| templates = Jinja2Templates("templates") | |
| if _debug := os.getenv("DEBUG"): |
| -- first query all the users | |
| WITH offsets AS (SELECT a.*, | |
| EXTRACT(hour FROM ptn.utc_offset) AS utc_offset | |
| FROM bootcamp.attendees a | |
| JOIN pg_timezone_names ptn ON a.timezone = ptn.name | |
| WHERE a.bootcamp_version = 3 | |
| AND a.timezone IS NOT NULL | |
| AND a.content_delivery = 'Live'::text | |
| ), | |
| -- then aggregate the users by track and offset, we want matching timezones to fill up first |