This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| import asyncio | |
| import psycopg2 | |
| # dbname should be the same for the notifying process | |
| conn = psycopg2.connect(host="localhost", dbname="example", user="example", password="example") | |
| conn.set_isolation_level(psycopg2.extensions.ISOLATION_LEVEL_AUTOCOMMIT) | |
| cursor = conn.cursor() | |
| cursor.execute(f"LISTEN match_updates;") |
| -- monadstate-example.hs | |
| -- | |
| -- Load this program in GHCi: | |
| -- | |
| -- stack repl \ | |
| -- --resolver nightly \ | |
| -- --package transformers \ | |
| -- --package mtl \ | |
| -- monadstate-example.hs | |
| -- |
| Source Data Set: https://console.cloud.google.com/bigquery?p=data-to-insights&d=ecommerce&t=web_analytics&page=table | |
| ## TRAIN | |
| CREATE OR REPLACE MODEL `ecommerce.classification_model_2` | |
| OPTIONS | |
| (model_type='logistic_reg', labels = ['will_buy_on_return_visit']) AS | |
| WITH all_visitor_stats AS ( |
| from chalice import Chalice | |
| import boto3 | |
| from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer | |
| import pandas as pd | |
| from datetime import datetime | |
| app = Chalice(app_name='Lambda2') | |
| """On SNS message from Lambda1, tranform data by dropping duplicates | |
| and get sentiment""" |
| {-# LANGUAGE NoImplicitPrelude #-} | |
| {-# LANGUAGE OverloadedStrings #-} | |
| module Main where | |
| import Protolude hiding (to, (&)) | |
| import qualified System.IO as IO | |
| import Control.Lens ((<&>), (^.), (.~), (&), set, view) | |
| import qualified Data.Text as Txt | |
| import qualified Data.Conduit as C |
This is some red text.
| # LVDB - LLOOGG Memory DB | |
| # Copyriht (C) 2009 Salvatore Sanfilippo <[email protected]> | |
| # All Rights Reserved | |
| # TODO | |
| # - cron with cleanup of timedout clients, automatic dump | |
| # - the dump should use array startsearch to write it line by line | |
| # and may just use gets to read element by element and load the whole state. | |
| # - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands. | |
| # - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump! |