Skip to content

Instantly share code, notes, and snippets.

View bearrito's full-sized avatar
💭
Working

Barrett Strausser bearrito

💭
Working
  • Pittsburgh, Pa
  • 02:15 (UTC -12:00)
View GitHub Profile
@bearrito
bearrito / eksctl-config.yaml
Created November 7, 2022 16:10 — forked from davivcgarcia/eksctl-config.yaml
Amazon EKS Workshop - Cluster Config Example (eksctl)
kind: ClusterConfig
apiVersion: eksctl.io/v1alpha5
metadata:
name: sandbox
version: "1.21"
region: us-east-1
cloudWatch:
clusterLogging:
enableTypes:
- api
@bearrito
bearrito / gist:4404431a27282644030946faf9f7c4f0
Created August 18, 2016 12:54
azure_service_bus_subclass
class BNRServiceBusService(ServiceBusService):
def __init__(self, shared_access_key_value,
x_ms_version='2011-06-01',
timeout=DEFAULT_HTTP_TIMEOUT):
'''
Initializes the service bus service for a namespace with the specified
authentication settings (SAS or ACS).
service_namespace:
Service bus namespace, required for all operations. If None,
@bearrito
bearrito / BsonObjectIdPickler.scala
Created December 25, 2014 19:09
pickling BSONObjectIDs
import reactivemongo.bson.BSONObjectID
import scala.pickling._
object Vinegar {
implicit def BSONObjectIdPickler(implicit stringPickler: SPickler[String], stringUnpickler: Unpickler[String], pf: PickleFormat) =
new SPickler[BSONObjectID] with Unpickler[BSONObjectID] {
val format: PickleFormat = pf
def pickle(id: BSONObjectID, builder: PBuilder):Unit = {
model=als-model
model.instance-dir=/home/bearrito/oryxmigration/models
serving-layer.api.port=8091
computation-layer.api.port=8092
@bearrito
bearrito / gist:7923873
Created December 12, 2013 06:12
slick_type_problem
package com.poweredanalytics
// Use H2Driver to connect to an H2 database
import scala.slick.driver.H2Driver.simple._
import scala.slick.lifted.{TableQuery, Tag}
import org.h2.table.Table
import scala.slick.direct.AnnotationMapper.column
import org.h2.engine.Database
object FirstExample extends App {
In the binary-class case, we refer to this pairwise method
as the ROC Area SVM, or ROC-SVM. An ROC-SVM is
trained by solving the following optimization problem:
min ||w|| ^2 + L(w, P)
Here, P is the set of all candidate pairs in the original data set D . A candidate pair contains one xp member of the positive class and one xn member of the negative class, and is used to construct a labeled pairwise example ((xp − xn),+1)