When playing the game Universal Paperclips copy and paste this code in your browser to automatically trigger the quantum computer button when it would yield a compute benefit.
This file contains 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
const classes : Array<[RegExp, number]>= [ | |
[ /^[0-9]+$/, 3.322], | |
[ /^[0-9A-F]+$/, 4.000], | |
[ /^([A-Z]+|[a-z]+)$/, 4.700], | |
[ /^([A-Z0-9]+|[a-z0-9]+)$/, 5.170], | |
[ /^[A-Za-z]+$/, 5.700], | |
[ /^[A-Za-z0-9]+$/, 5.954], | |
[ /^[a-z0-9!"#$%&'()*+,.\/:;<=>?@\[\] ^_`{|}~-]*$/i, 6.555], |
This file contains 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
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: podinfo | |
namespace: dev | |
labels: | |
app: podinfo | |
spec: | |
type: ClusterIP | |
ports: |
This file contains 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 pulumi | |
import pulumi_digitalocean as do | |
config = pulumi.Config() | |
# Define a digital ocean cluster | |
cluster = do.KubernetesCluster( | |
"brice-demo-cluster", | |
node_pool={ | |
"name": "worker-pool", |
This file contains 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
class TraceCalls(object): | |
""" Use as a decorator on functions that should be traced. Several | |
functions can be decorated - they will all be indented according | |
to their call depth. | |
source: https://eli.thegreenplace.net/2012/08/22/easy-tracing-of-nested-function-calls-in-python | |
""" | |
def __init__(self, stream=sys.stdout, indent_step=2, show_ret=False): | |
self.stream = stream | |
self.indent_step = indent_step | |
self.show_ret = show_ret |
This file contains 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
class ValueContext(object): | |
""" | |
A ValueContext is constructed from a value that can be writtent to a file | |
and then exposes the value as a temporary file in its context. | |
The temporary file path can be accessed using its `name` attribute. | |
For example: |
This file contains 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
# Recursive dictionary merge | |
# Copyright (C) 2019 Brice Fernandes <[email protected]> | |
# | |
# This program is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# This program is distributed in the hope that it will be useful, | |
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
This file contains 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
B_BLACK="\[\e[40m\]" | |
B_RED="\[\e[41m\]" | |
B_GREEN="\[\e[42m\]" | |
B_YELLOW="\[\e[43m\]" | |
B_BLUE="\[\e[44m\]" | |
B_MAGENTA="\[\e[45m\]" | |
B_CYAN="\[\e[46m\]" | |
B_WHITE="\[\e[47m\]" | |
F_BLACK="\[\e[30m\]" |
This file contains 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
1 - ??? | |
2 - The Matrix | |
3 - Speed | |
4 - Leaving Las Vegas | |
5 - Lalaland | |
6 - 12 monkeys | |
7 - π | |
8 - Dr No | |
9 - Seven | |
10 - Home Alone |
This file contains 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
➤ docker-compose -f services/dev.yml up --build | |
Starting services_api_1 ... done | |
Starting services_web_1 ... done | |
Attaching to services_api_1, services_web_1 | |
api_1 | | |
api_1 | > json-server@ prestart /home | |
api_1 | > npm install | |
api_1 | | |
web_1 | | |
web_1 | > [email protected] prestart /home |
NewerOlder