This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
| #!/bin/bash | |
| ## Read and edit this file. | |
| ## Run it once as a root. | |
| FILE="/Library/Scripts/ramdisk.sh" | |
| if [[ $EUID -ne 0 ]]; then | |
| echo "You must be a root user" 2>&1 | |
| exit 1 |
| select | |
| concat( | |
| 'create table ', | |
| table_name, | |
| '(', | |
| string_agg( | |
| concat( | |
| column_name, | |
| ' ', | |
| CASE when is_nullable = 'YES' THEN 'Nullable(' END, |
| import click | |
| import requests | |
| template = u"""/* | |
| Name: {name} | |
| Description: {description} | |
| Data source: {data_source} | |
| Created By: {created_by} | |
| Last Update At: {last_updated_at} | |
| */ |
This is a short post that explains how to write a high-performance matrix multiplication program on modern processors. In this tutorial I will use a single core of the Skylake-client CPU with AVX2, but the principles in this post also apply to other processors with different instruction sets (such as AVX512).
Matrix multiplication is a mathematical operation that defines the product of
| // --------------------------------------------------------------- // | |
| // Need To Know | |
| // _MSC_VER: Microsoft C/C++ Compiler | |
| // __AVX2__: AVX2 Instruction Set Flag | |
| // __FMA__: Fused Multiply Add Flag | |
| // --------------------------------------------------------------- // | |
| // On Windows, __AVX2__ is defined but __FMA__ so define it | |
| #if defined(_MSC_VER) && defined(__AVX2__) && !defined(__FMA__) | |
| #define __FMA__ |
| <script> | |
| import { debounce, cloneDeep, defaultsDeep } from 'lodash' | |
| import c3 from 'c3' | |
| require('c3/c3.css') | |
| export default { | |
| name: 'c3-chart', | |
| props: { | |
| config: { |
| /** | |
| * Creates a RegExp from the given string, converting asterisks to .* expressions, | |
| * and escaping all other characters. | |
| */ | |
| function wildcardToRegExp (s) { | |
| return new RegExp('^' + s.split(/\*+/).map(regExpEscape).join('.*') + '$'); | |
| } | |
| /** | |
| * RegExp-escapes all characters in the given string. |
| :) CREATE TABLE test.nested (EventDate Date, UserID UInt64, Attrs Nested(Key String, Value String)) ENGINE = MergeTree(EventDate, UserID, 8192) | |
| CREATE TABLE test.nested | |
| ( | |
| EventDate Date, | |
| UserID UInt64, | |
| Attrs Nested( | |
| Key String, | |
| Value String) | |
| ) ENGINE = MergeTree(EventDate, UserID, 8192) |