Skip to content

Instantly share code, notes, and snippets.

View mgmarino's full-sized avatar

Michael Marino mgmarino

View GitHub Profile
@mgmarino
mgmarino / HadoopUtils.java
Last active October 30, 2023 13:26
Example to use Iceberg on AWS KDA (Managed Flink)
package org.apache.flink.runtime.util;
import org.apache.hadoop.conf.Configuration;
public class HadoopUtils {
public static Configuration getHadoopConfiguration(
org.apache.flink.configuration.Configuration flinkConfiguration) {
return new Configuration(false);
}
}
AWSTemplateFormatVersion: '2010-09-09'
Description: Voila Microservice Stack
Parameters:
Environment:
Type: String
AllowedValues:
- staging
- production
ECRRegistry:
import configparser
import os
import boto3
import sys
import random
import string
def fail(msg):
sys.stderr.write("{}\n".format(msg))
sys.exit(1)
import configparser
import os
import boto3
import sys
def fail(msg):
print(msg)
sys.exit(1)
aws_profile = os.getenv("AWS_DEFAULT_PROFILE")
var jwkToPem = require("jwk-to-pem");
var jwk = JSON.parse(process.env.OAUTH_TOKEN_KEY)
var output = {
signingKey: jwkToPem(jwk, {
private: true
}),
verifierKey: jwkToPem(jwk, {
private: false
})
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
# coding: utf-8
# In[1]:
import numpy
import itertools
import h5py
# make an array with a lot of stuff
@mgmarino
mgmarino / Move files using Dropbox SDK.md
Last active October 19, 2021 03:11
Move all files to another folder using Dropbox python SDK

Move files from one folder to another using Dropbox python SDK

A script to move all files from one folder to another in dropbox. It expects a JSON file credentials.json in the same directory of the form:

{
  "accessToken": "ACCESS_TOKEN",
  "sourceFolder": "/src_folder",
  "destinationFolder": "/dest_folder"
}

Keybase proof

I hereby claim:

  • I am mgmarino on github.
  • I am mikemarino (https://keybase.io/mikemarino) on keybase.
  • I have a public key ASAIGPtdpd5bBv6KvKHsHC9UxPObznQYc1RLm4WzumGbdQo

To claim this, I am signing this object:

import pynedm
import json
# Authentication
po = pynedm.ProcessObject(uri="http://raid.nedm1:5984",
username="admin",
password="""pw"""
)
acct = po.acct