Skip to content

Instantly share code, notes, and snippets.

View yogeshsajanikar's full-sized avatar

Yogesh Sajanikar yogeshsajanikar

  • Pune, India
View GitHub Profile
@yogeshsajanikar
yogeshsajanikar / config.ttl
Created September 6, 2017 16:37
Fuseki Configuration with inference
@prefix : <#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
[] rdf:type fuseki:Server ;
fuseki:services (
<#fedoraService>
@yogeshsajanikar
yogeshsajanikar / Merge3.hs
Last active February 10, 2016 10:44
3 way merge
{-# LANGUAGE TypeFamilies #-}
module Mergeable where
import qualified Data.Map.Strict as Map
import Data.Map.Strict (Map)
import Data.Maybe
data Diff a = Same a
| Change a a
// Immutable PriorityQueue in Scala
// Most functions run in O(log n)
// Developed in Scala version 2.7.7
// Implementation: Leftist Heap (See "Purely Functional Data Structures")
// Author: Masaki Hara (ackie.h.gmai _at_ gmail.com)
package scala.collection.immutable
import priorityqueue._
import spray.json._
import reactivemongo.bson._
import reactivemongo.bson.handlers.{ BSONReader, BSONWriter, RawBSONWriter }
import scala.util.{ Try, Success, Failure }
import org.apache.commons.codec.binary.Hex
import org.joda.time.format.ISODateTimeFormat
import org.joda.time.{ DateTime, DateTimeZone }
import java.nio.ByteBuffer
import org.jboss.netty.buffer.ChannelBuffers
@yogeshsajanikar
yogeshsajanikar / build.sbt
Created March 7, 2015 05:05
SBT configuration to enable check style settings and findbugs
import de.johoop.findbugs4sbt.FindBugs._
// other settings...
com.etsy.sbt.Checkstyle.checkstyleSettings
findbugsSettings
// in project/plugin.sbt
addSbtPlugin("com.etsy" % "sbt-checkstyle-plugin" % "0.4.1")
@yogeshsajanikar
yogeshsajanikar / build.sbt
Created March 7, 2015 05:03
Build configuration to enable scalacheck with scalatest
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.12.2" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.1" % "test"
module IterateeIO where
import IterateeM
import System.FilePath
import Data.Maybe
import qualified Data.ByteString as S
import qualified Data.ByteString.Lazy as L
import qualified Data.ByteString.Lazy.Char8 as L8
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE BangPatterns #-}
import Control.Applicative
import Data.Attoparsec.ByteString.Char8
import Data.ByteString.Char8 as T hiding(length)
import qualified Data.ByteString.Lazy.Char8 as Tl
import qualified Data.Attoparsec.ByteString.Lazy as Al
--import qualified Data.ByteString.Lazy.IO as TIO