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: crate-discovery | |
labels: | |
app: crate | |
spec: | |
ports: | |
- port: 4200 | |
name: crate-web |
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
select avg(tip_amount) from "nyc-yellowcab" where tip_amount > 0; | |
select count(*), vendorid from "nyc-yellowcab" group by vendorid; | |
select avg(tip_amount), vendorid from "nyc-yellowcab" where tip_amount > 0 group by 2; | |
select avg(cast(passenger_count as integer)) from "nyc-yellowcab"; | |
select passenger_count, avg(tip_amount) from "nyc-yellowcab" where tip_amount > 0 group by passenger_count order by 1; | |
select passenger_count, count(*) from "nyc-yellowcab" group by passenger_count order by 1; |
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
version: '2' | |
services: | |
crate: | |
image: crate/crate:testing | |
cpu_shares: 100 | |
mem_limit: 512000000 | |
command: "/docker-entrypoint.sh crate -Des.gateway.expected_nodes=3 -Des.discovery.zen.minimum_master_nodes=2 -Des.gateway.recover_after_nodes=2" | |
ports: | |
- "4200:4200" | |
- "4300:4300" |
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
version: '3' | |
services: | |
cratedb: | |
image: "crate/crate:testing" # :1.0.5 | |
environment: | |
- CRATE_HEAP_SIZE=3g | |
command: ["crate", "-Cgateway.expected_nodes=3", "-Cgateway.recover_after_nodes=2", "-Cdiscovery.zen.minimum_master_nodes=2", "-Cdiscovery.zen.ping.multicast.enabled=false", "-Cdiscovery.zen.ping.unicast.hosts=cratedb", "-Cnetwork.bind=_eth0_", "-Ccluster.name=NYC"] | |
networks: | |
- cratedb_network | |
- client_network |
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 run -i --rm \ | |
-v $(pwd):/source \ | |
-v /tmp/cargo/git:/root/.cargo/git \ | |
-v /tmp/cargo/registry:/root/.cargo/registry \ | |
-e CXX=arm-linux-gnueabihf-gcc-with-link-search \ | |
dlecan/rust-crosscompiler-arm |
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
function x(s, t) { | |
let _map1 = {}; | |
let _map2 = {}; | |
const x1 = Math.floor(Math.random() * (s.length - 1)); | |
const x2 = x1 + Math.floor(Math.random() * (s.length - x1)); | |
let offspring = [Array.from(s), Array.from(t)]; |
OlderNewer