Skip to content

Instantly share code, notes, and snippets.

View damondouglas's full-sized avatar
💭
😼

Damon damondouglas

💭
😼
  • Google, Inc.
View GitHub Profile
@damondouglas
damondouglas / FileIOExample.java
Created September 25, 2023 17:25
Example Skipping Lines using Apache Beam FileIO ReadableFile
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@damondouglas
damondouglas / .gitignore
Created August 23, 2023 23:26
Can Beam slow down a PCollection<String>?
.gradle
build
.idea
.vscode
*.iml
.DS_Store
gradlew*
gradle*
.gitattributes
@damondouglas
damondouglas / CustomMultiChildLayout.dart
Created December 4, 2022 08:04
CustomMultiChildLayout example
import 'package:flutter/material.dart';
void main() => runApp(const ExampleApp());
class ExampleApp extends StatelessWidget {
const ExampleApp({super.key});
@override
Widget build(BuildContext context) {
return const MaterialApp(
@damondouglas
damondouglas / products.json
Last active July 12, 2020 22:04
shrine data
[
{
"id": "32f54d0b-5ffb-4c69-af03-e87e88f5b8f5",
"name": "Vintage Bluetooth Radio",
"description": "Isn’t it cool when things look old, but their not. Looks Old But Not makes awesome vintage goods that are super smart. This ol’ radio just got an upgrade. Connect to it with an app and jam out to some top forty.",
"price": 299,
"image": "https://www.gstatic.com/angular/material-adaptive/shrine/radio.png",
"store": "d9680ef5-4e1e-41b1-bd43-cbf248fe145d"
},
{
> fsevents@1.2.7 install /Users/dd/projects/material-components-web-codelabs/mdc-101/starter/node_modules/fsevents
> node install

node-pre-gyp WARN Using needle for node-pre-gyp https download 
node-pre-gyp WARN Tried to download(404): https://fsevents-binaries.s3-us-west-2.amazonaws.com/v1.2.7/fse-v1.2.7-node-v72-darwin-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for fsevents@1.2.7 and node@12.16.2 (node-v72 ABI, unknown) (falling back to source compile with node-gyp) 
  SOLINK_MODULE(target) Release/.node
  CXX(target) Release/obj.target/fse/fsevents.o
In file included from ../fsevents.cc:6:
@damondouglas
damondouglas / readme.md
Created February 6, 2020 20:45 — forked from maxivak/readme.md
Restore repo from Gitlab bundle file

Gitlab exports repositories to tar archive which contains .bundle files.

We have repo.bundle file and we want to restore files from it.

  • create bare repo from bundle file
git clone --mirror myrepo.bundle my.git
@damondouglas
damondouglas / gophernotes.md
Created December 22, 2019 00:43 — forked from korakot/gophernotes.md
Using Golang kernel in Colab

Run this from a normal Python notebook to install Golang kernel

!apt install golang-go libzmq3-dev
%env GOPATH=/root/go
!go get -u github.com/gopherdata/gophernotes
!cp ~/go/bin/gophernotes /usr/bin/
!mkdir /usr/local/share/jupyter/kernels/gophernotes
!cp ~/go/src/github.com/gopherdata/gophernotes/kernel/* \
       /usr/local/share/jupyter/kernels/gophernotes
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common -y
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add -
sudo apt-key fingerprint 0EBFCD88
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io -y
from graphviz import Digraph
from typing import List
def tree(arr: List[str]) -> Digraph:
g = Digraph()
n = len(arr)
for i in range(1, int(n/2) + 1):
me = arr[i]
g.node(me)
left_index = i*2
@damondouglas
damondouglas / hmm_tutorial.ipynb
Created December 12, 2018 00:59
Hidden markov model tutorial
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.