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
| import os | |
| import pickle | |
| import warnings | |
| import numpy as np | |
| import pandas as pd | |
| from sklearn.model_selection import train_test_split | |
| from tensorflow.keras.callbacks import EarlyStopping | |
| from tensorflow.keras.layers import Dense | |
| from tensorflow.keras.layers import Dropout |
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
| # pgTAP extension | |
| comment = 'Unit testing for PostgreSQL' | |
| default_version = '1.1.0' | |
| module_pathname = '$libdir/pgtap' | |
| requires = 'plpgsql' | |
| relocatable = true | |
| superuser = false |
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
| [root@ip-172-31-19-212 certbot]# cat certbot-auto | |
| #!/bin/sh | |
| # | |
| # Download and run the latest release version of the Certbot client. | |
| # | |
| # NOTE: THIS SCRIPT IS AUTO-GENERATED AND SELF-UPDATING | |
| # | |
| # IF YOU WANT TO EDIT IT LOCALLY, *ALWAYS* RUN YOUR COPY WITH THE | |
| # "--no-self-upgrade" FLAG | |
| # |
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
| # Turn on the simulator screen capture | |
| xcrun simctl io booted recordVideo ~/simulator.mov | |
| # Convert the iPhone 6s screen shot into a gif: | |
| ffmpeg -i ~/simulator.mov -vf scale=320:-1 -r 6 -f gif -y simulator.gif |
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
| (defn pgobj->clj [^org.postgresql.util.PGobject pgobj] | |
| (let [type (.getType pgobj) | |
| value (.getValue pgobj)] | |
| (case type | |
| "json" (cheshire.core/parse-string value true) | |
| "jsonb" (cheshire.core/parse-string value true) | |
| "citext" (str value) | |
| value))) | |
| (extend-protocol next.jdbc.result-set/ReadableColumn |
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
| ;; File: src/some_app/middleware.clj | |
| (defn open-gates [request] | |
| true) | |
| (def rules [{:pattern #"^/admin.*" | |
| :handler admin-access | |
| :redirect "/notauthorized"}, | |
| {:pattern #"^\/vclass.*" | |
| :handler user-access | |
| :redirect "/notauthorized"}, | |
| {:pattern #"^\/api.*" |
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
| (defn ->Function | |
| [f] | |
| (reify java.util.function.Function | |
| (apply [_ obj] (f obj)))) | |
| (defn future-map | |
| [cf f] | |
| (.thenApply cf (->Function f))) | |
| (defn future->ch | |
| ([cf] | |
| (future->ch cf (async/chan 1) true)) |
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
| (ns plokal.cheshire | |
| (:require [cheshire.generate :refer [add-encoder]] | |
| [cheshire.core :as json]) | |
| (:import [com.fasterxml.jackson.core JsonGenerator] | |
| (org.postgresql.geometric PGpoint))) | |
| (add-encoder | |
| PGpoint | |
| (fn [^PGpoint data ^JsonGenerator jsonGenerator] | |
| (.writeString jsonGenerator (json/generate-string {:type :Point |
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
| go env | |
| GOARCH="amd64" | |
| GOBIN="/usr/local/go/bin" | |
| GOCACHE="/Users/dv/Library/Caches/go-build" | |
| GOEXE="" | |
| GOFLAGS="" | |
| GOHOSTARCH="amd64" | |
| GOHOSTOS="darwin" | |
| GOOS="darwin" | |
| GOPATH="/Users/dv/go" |
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
| interview-mind-map |