Skip to content

Instantly share code, notes, and snippets.

View deenar's full-sized avatar

Deenar Toraskar deenar

View GitHub Profile
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"rgLocation": {
"type": "string",
"defaultValue": "northeurope",
"metadata": {
"description": "Azure region to deploy the budget automation resources in. Budgets and spends include spending on resources across all regions"
}
import monocle.std.option.some
import monocle.function.Index._
import monocle.function.At._
// you should be able to zoom into any field, a Lens is returned if there are no Option or List elements in the chain
// currently you need to either get or getOption, based on where you get a Lens or an Optional
//These would make thing even nicer https://github.com/optics-dev/Monocle/pull/886, https://github.com/optics-dev/Monocle/pull/908, https://github.com/optics-dev/Monocle/pull/902 and https://github.com/optics-dev/Monocle/pull/912
val altContMethodLens = Contact4.AltContactMethod.anotherchoiceoption
// an Optional is returned if one exists
val chargeValueOpt = Contact4.Charge.value
case class Address (
label: Option[String],
countryCode: Option[String],
countryName: Option[String],
stateCode: Option[String],
state: Option[String],
countyCode: Option[String],
county: Option[String],
city: Option[String],
<?xml version="1.0" encoding="utf-8"?>
<xs:schema targetNamespace="urn:swift:xsd:envelope"
elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
>
<xs:element name="Envelope">
<xs:complexType >
<xs:sequence>
<xs:element name="AppHdr"/>
<xs:element name="Document"/>
<?xml version="1.0" encoding="UTF-8"?>
<!--Generated by Standards Editor (build:R1.6.16) on 2020 Mar 05 10:41:58, ISO 20022 version : 2013-->
<xs:schema xmlns="urn:swift:xsd:common" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="urn:swift:xsd:common">
<xs:complexType name="AccountIdentification4Choice">
<xs:choice>
<xs:element name="IBAN" type="IBAN2007Identifier"/>
<xs:element name="Othr" type="GenericAccountIdentification1"/>
</xs:choice>
</xs:complexType>
<xs:complexType name="AccountSchemeName1Choice">
@deenar
deenar / pla.scala
Created August 24, 2016 12:02
PlaReport
case class PlaRow (period: String, meanOverStdDev : Double, varianceOverVariance : Double, platTest : Boolean )
case class PlaSet (desk : String, hypoPnlType:String, riskPnlType: String, plaRows :Seq[PlaRow], plaTest: Boolean, average: PlaRow)
case class PlaReport (plaSets : Seq[PlaSet])
@deenar
deenar / spark-defaults.conf
Last active January 15, 2016 12:30
CDH 5.4 and Spark 1.5.1
sysJupiterDev@gbrdcr00015n02: /bigdata/projects/MERCURY
$ ls spark-1.5.1-bin-hadoop2.6/conf/yarn-conf/
core-site.xml hadoop-env.sh hdfs-site.xml hive-site.xml mapred-site.xml ssl-client.xml topology.map topology.py yarn-site.xml
#!/usr/bin/env bash
##
# Generated by Cloudera Manager and should not be modified directly
##
if [ -z "$SPARK_CONF_DIR" ]; then
export SPARK_CONF_DIR=$(cd $(dirname $BASH_SOURCE) && pwd)
fi
export SPARK_HOME=/opt/tools/spark-1.5.1-bin-hadoop2.6/
@deenar
deenar / README.md
Created September 30, 2015 05:35 — forked from mbostock/.block
Icicle

This “icicle” diagram uses d3.layout.partition to divide space with area proportional to the value of nodes in a tree. See also the zoomable icicle.

@deenar
deenar / README.md
Last active September 30, 2015 05:27 — forked from vgrocha/README.md

d3-bilevelLabelTooltip

This is a modified d3js bilevel partition in which labels and tooltips were added.

The idea is to have an abbreviation of the partition displayed and a tooltip with a fancier description and the size of that partition.

The base for this chart was Mike's Bilevel Partition. Tooltips thanks to Sharon Howard