Skip to content

Instantly share code, notes, and snippets.

View siennathesane's full-sized avatar
😃
tickle the code, make it laugh

Sienna siennathesane

😃
tickle the code, make it laugh
View GitHub Profile
$StorageName = "pioneertest"
$ResourceGroup = "test-01"
$Location = "West US"
$SubscriptionName = ""
$OpsManURI = ""
# set global verbosity for all commands.
$PSDefaultParameterValues['*:Verbose'] = $true
Write-Host "Cleaning out old Resource Group."
Remove-AzureRmResourceGroup -Name $ResourceGroup -Verbose -Force
@siennathesane
siennathesane / regions.py
Created September 18, 2017 19:45
Get a list of all Azure Regions for your Subscription.
from azure.common.credentials import ServicePrincipalCredentials
from azure.mgmt.resource.subscriptions import SubscriptionClient
from json import dumps
import os
def get_azure_regions():
client = SubscriptionClient(credential_loader())
locations = client.subscriptions.list_locations(os.getenv("AZURE_SUBSCRIPTION_ID"))
attempts = 0
def ask_lt(s):
s = s.strip() # Believe this removes all whitespace from left and right
# Need to trim both left and right for elipses
while s[:3] == '...':
s = s[3:]
while s[-3:] == '...':
s = s[:-3]
params = {"text": s, "language": "en-US"}
resp = requests.get("http://127.0.0.1:8081/v2/check", params=params).json()
from __future__ import print_function
import os
import subprocess
import sys
import threading
import time
import requests
from flask import Flask, request, redirect, url_for, flash
{u'text': u'help me', u'length': 4, u'offset': 0}
{u'text': u'so did something that no one else ever has...', u'length': 2, u'offset': 0}
{u'text': u'find will honor Phil', u'length': 4, u'offset': 0}
{u'text': u'that he owes me', u'length': 4, u'offset': 0}
{u'text': u'the next day we honored film because it was...', u'length': 3, u'offset': 0}
{u'text': u'...ientist on behalf of reading Dynamics I thank you Phil and presented our first-ever Trailblaze...', u'length': 14, u'offset': 43}
{u'text': u'...The next day we honored film because it wasthank you, Philng to do and because I happy s...', u'length': 8, u'offset': 43}
{u'text': u'...The next day we honored film because it waswas thanku, Philng to do and because I happ...', u'length': 6, u'offset': 43}
{u'text': u'...The next day we honored film because it waswas wasanku, Philng to do and because I hap...', u'length': 6, u'offset': 43}
{u'text': u'...The next day we honored film because it waswas wassanku, Philng to do and because I ha...', u'length': 6,
from __future__ import print_function
import os
import subprocess
import sys
import threading
import time
from flask import Flask, request, redirect, url_for, flash
from flask_session import Session
@siennathesane
siennathesane / main.go
Created July 5, 2017 17:49
WoW Auction Scraper
package main
import (
"encoding/json"
"flag"
"fmt"
"github.com/jinzhu/gorm"
_ "github.com/jinzhu/gorm/dialects/sqlite"
"github.com/mxplusb/azeroth"
"go.uber.org/ratelimit"
using NUnit.Framework;
using System;
namespace Automata.Tests
{
[TestFixture]
class WorkSpaceTest
{
private WorkSpace ws;
private Config cfg;
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using Newtonsoft.Json.Serialization;
using System.Reflection;
using System.Linq;
@siennathesane
siennathesane / workspace.cs
Created June 24, 2017 06:25
initialises a new workspace object.
using Microsoft.Extensions.Configuration;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.InteropServices;
using Newtonsoft.Json.Serialization;
using System.Reflection;
using System.Linq;