Skip to content

Instantly share code, notes, and snippets.

Yogesh Sajanikar yogeshsajanikar

View GitHub Profile
@yogeshsajanikar
yogeshsajanikar / config.ttl
Created Sep 6, 2017
Fuseki Configuration with inference
View config.ttl
@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>
View Merge3.hs
{-# 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
View PriorityQueue.scala
// 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._
View JsBSONHandlers.scala
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 Mar 7, 2015
SBT configuration to enable check style settings and findbugs
View build.sbt
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 Mar 7, 2015
Build configuration to enable scalacheck with scalatest
View build.sbt
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.12.2" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "2.2.1" % "test"
View IterateeIO.hs
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
View STLReader.hs
{-# 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
You can’t perform that action at this time.