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
| let | |
| pkgs = import <nixpkgs> { }; | |
| in | |
| with pkgs; | |
| mkShell { | |
| name = "profile-shmem"; | |
| buildInputs = [ clang_11 boost ]; | |
| } |
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
| FROM alpine:latest | |
| RUN apk add build-base | |
| RUN apk add clang | |
| RUN apk add boost-dev | |
| COPY ./base.hpp . | |
| COPY ./shmem_profile_consumer.cpp . | |
| RUN clang++ -O3 -std=c++17 -o /usr/bin/consumer shmem_profile_consumer.cpp -lrt -I. -pthread |
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
| # NB: `dev` is the stack name. You can call your stack whatever you want. | |
| # The pulumi config should then be called `Pulumi.${my_stack_name}.yaml`. | |
| config: | |
| dev:nix_build_expr: "config.nodes.%s.configuration.system.build.googleComputeImage" | |
| dev:image_bucket: "nixos-images" | |
| dev:instances: | |
| - name: $HOSTNAME_OF_YOUR_CHOOSING | |
| disk: | |
| size_gb: 500 | |
| type: "pd-ssd" |
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
| pub fn munge<D, I>(&'a mut self, data: D) -> impl Iterator<Item = u8> + 'a | |
| where | |
| D: IntoIterator<Item = I> + 'a, | |
| I: Borrow<u8> + 'a, | |
| { | |
| data.into_iter() | |
| .zip(&mut self.key) | |
| .map(|(byte, k)| byte.borrow() ^ k) | |
| } |
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
| { pkgs, ... }: | |
| let | |
| hardwareUrl = "https://github.com/NixOS/nixos-hardware/archive/684ae160a6e76590eafa3fca8061b6ad57bcc9ad.tar.gz"; | |
| in | |
| { | |
| imports = [ | |
| "${fetchTarball hardwareUrl}/raspberry-pi/4" | |
| ]; | |
| boot = { |
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 sqlalchemy as sa | |
| import sqlparse | |
| def issue_sql(con): | |
| part = con.table("part") | |
| supplier = con.table("supplier") | |
| partsupp = con.table("partsupp") | |
| q = part.join(partsupp, part.P_PARTKEY == partsupp.PS_PARTKEY) |
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
| library(ggplot2) | |
| library(stringr) | |
| library(tidyr) | |
| library(ggh4x) | |
| library(bigrquery) | |
| library(DBI) | |
| library(dplyr, warn.conflicts = FALSE) | |
| library(lubridate, warn.conflicts = 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
| { | |
| "nodes": { | |
| "flake-utils": { | |
| "locked": { | |
| "lastModified": 1644229661, | |
| "narHash": "sha256-1YdnJAsNy69bpcjuoKdOYQX0YxZBiCYZo4Twxerqv7k=", | |
| "owner": "numtide", | |
| "repo": "flake-utils", | |
| "rev": "3cecb5b042f7f209c56ffd8371b2711a290ec797", | |
| "type": "github" |
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
| from pprint import pprint as print | |
| import duckdb | |
| import ibis | |
| garbage = """ | |
| DROP TABLE IF EXISTS demo_data; | |
| CREATE TABLE demo_data ( | |
| event_id INT |
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 contextlib | |
| import time | |
| from datetime import timedelta | |
| import ibis | |
| import pandas as pd | |
| from ibis import _ | |
| def pandas(): |