You will need an access token from azure devops. Get yours here. This script will need contributor access to the project in question.
# populate user map in Map-IssueToWorkitem
You will need an access token from azure devops. Get yours here. This script will need contributor access to the project in question.
# populate user map in Map-IssueToWorkitem
import akka.http.scaladsl.coding.Gzip | |
import akka.http.scaladsl.model._ | |
object GzipBinEncoder extends Gzip(GzipBinEncoderFilter) | |
object GzipBinEncoderFilter extends (HttpMessage => Boolean) { | |
override def apply(message: HttpMessage): Boolean = | |
message match { | |
case req: HttpRequest ⇒ req.entity.contentType.mediaType.isCompressible | |
case res@HttpResponse(status, _, _, _) => |
function Async(fn, args=[]) { | |
let stack = [(handler) => fn.apply(undefined, args.concat([handler]))]; | |
let error = (e) => { throw new Error(`An error occured - ${e.message}`); } | |
function asyncCombine(fn, nfn, nargs) { | |
return handler => fn((...args) => { | |
let res = getOrError(args); | |
return nfn.apply(undefined, nargs.concat([res, handler])); | |
}); |
// Similar to http://stackoverflow.com/questions/9850786/is-there-such-a-thing-as-bidirectional-maps-in-scala#9851520 | |
object BiMap { | |
private[BiMap] trait MethodDistinctor | |
implicit final object MethodDistinctor extends MethodDistinctor | |
def apply[X, Y](tuples: (X, Y)*) = new BiMap(tuples.toMap, tuples.map(_.swap).toMap) | |
def apply[X, Y](m: Map[X, Y]) = new BiMap(m, m.toSeq.map(_.swap).toMap) | |
} |
object Shadower { | |
case class Term(t: String, start: Int, end: Int) | |
implicit object SpanTerm extends Span[Term] { | |
def start(t: Term) = t.start | |
def end(t: Term) = t.end | |
} |
package com.thron.aws; | |
import javax.crypto.Mac; | |
import javax.crypto.spec.SecretKeySpec; | |
import java.io.UnsupportedEncodingException; | |
import java.net.MalformedURLException; | |
import java.net.URLEncoder; | |
import java.nio.charset.StandardCharsets; | |
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; |