Skip to content

Instantly share code, notes, and snippets.

@galamdring
galamdring / retrieveSSMParameters.go
Created May 20, 2020 16:20
Retrieve SSM Parameter Store values in Golang
package main
import (
"fmt"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/ssm"
"strings"
)
@galamdring
galamdring / FindTheSingleton.py
Created December 3, 2019 20:53
Find a odd main out in a list of paired ints
import time
from random import randint
class FindTheSingleton:
# This creates our array, adding each random number twice then appending the non-paired number
def generateArray(length, singleton):
if length % 2 == 0 :
# increase the length to be odd, so we can fit all pairs except the singleton.
length = length+1
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace WpfApp1
{
public class ArrayOfIntsSolutions
{
//This tests the HashSet solution, optimized through the fact that the HashSet will not allow adding of duplicate values.