Given
- I use a VPN to connect to my work network
- I'm on a Linux computer that uses systemd-resolved
- I have a work domain called
example.com
example.com
is hosted by both public and private DNS nameservers
/* | |
the twitter api is stupid. it is stupid and bad and expensive. hence, this. | |
Literally just paste this in the JS console on the bookmarks tab and the script will automatically scroll to the bottom of your bookmarks and keep a track of them as it goes. | |
When finished, it downloads a JSON file containing the raw text content of every bookmark. | |
for now it stores just the text inside the tweet itself, but if you're reading this why don't you go ahead and try to also store other information (author, tweetLink, pictures, everything). come on. do it. please? | |
*/ |
import json | |
import os | |
import string | |
import zipfile | |
from lxml import etree | |
from nltk.tokenize import RegexpTokenizer | |
from tqdm import tqdm | |
import docx |
-- 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 |
import os | |
import arel | |
from fastapi import FastAPI, Request | |
from fastapi.templating import Jinja2Templates | |
app = FastAPI() | |
templates = Jinja2Templates("templates") | |
if _debug := os.getenv("DEBUG"): |
# 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 |
version: '3' | |
services: | |
traefik: | |
image: traefik:v2.0 | |
container_name: traefik | |
restart: unless-stopped | |
security_opt: | |
- no-new-privileges:true | |
networks: |
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 |
""" | |
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 |