Skip to content

Instantly share code, notes, and snippets.

@lokitoth
lokitoth / Program.cs
Last active October 1, 2020 19:31
VowpalWabbit L2S SequenceSpan task example in C#
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Linq;
using System.Threading;
using VW;
namespace SearchSample
@lokitoth
lokitoth / clearable_product_type.h
Last active March 6, 2020 22:12
Templated Product Type with clear() object-reset semantics
namespace detail {
//////
/// Slot for a single data type in an aggregate struct
//////
template <typename T>
struct data_frame
{
private:
T _data;
@lokitoth
lokitoth / HttpClient.ts
Created May 20, 2017 03:34
Angular2 TypeScript REST client base class
import { Http, Response, Headers, RequestOptions } from "@angular/http";
import * as Rx from "rxjs/Rx";
export abstract class HttpClient {
constructor(private http: Http) {
}
protected referenceStringEncode(referenceString: string): string {
return referenceString.replace("/", "%2F");
}