This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SETUVAR __fish_init_2_39_8:\x1d | |
SETUVAR __fish_init_2_3_0:\x1d | |
SETUVAR __fish_init_3_x:\x1d | |
SETUVAR fish_color_autosuggestion:7596E4 | |
SETUVAR fish_color_cancel:\x2dr | |
SETUVAR fish_color_command:164CC9 | |
SETUVAR fish_color_comment:007B7B | |
SETUVAR fish_color_cwd:purple | |
SETUVAR fish_color_cwd_root:red | |
SETUVAR fish_color_end:02BDBD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fish_prompt --description 'Write out the prompt' | |
set -l last_status $status | |
if not set -q __fish_git_prompt_show_informative_status | |
set -g __fish_git_prompt_show_informative_status 1 | |
end | |
if not set -q __fish_git_prompt_hide_untrackedfiles | |
set -g __fish_git_prompt_hide_untrackedfiles 1 | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ammonite.ops._ | |
import mill._ | |
import mill.util.Ctx | |
import mill.modules.Jvm | |
trait FlywayModule extends JavaModule { | |
def flywayMigrationPaths: T[Seq[PathRef]] = T { resources() } | |
def flywayUser: T[String] | |
def flywayPassword: T[String] | |
def flywayJdbcUrl: T[String] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Created on Dec 10, 2017 | |
@author: jachin,Nie | |
A tf implementation of NFM | |
Reference: | |
[1] Neural Factorization Machines for Sparse Predictive Analytics | |
Xiangnan He,School of Computing,National University of Singapore,Singapore 117417,dcshex@nus.edu.sg | |
Tat-Seng Chua,School of Computing,National University of Singapore,Singapore 117417,dcscts@nus.edu.sg |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- | |
-- User: netanelrabinowitz | |
-- Date: 17/04/2018 | |
-- Time: 16:31 | |
-- | |
function insert_trimmed_list(rec, bin, max_size, trimmed_size, value, ttl) | |
local l = rec[bin] | |
if (l == nil) then | |
l = list() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sealed abstract class Memo[K, V] { | |
def apply(z: K => V): K => V | |
} | |
object Memo { | |
def memo[K, V](f: (K => V) => K => V): Memo[K, V] = new Memo[K, V] { | |
def apply(z: K => V) = f(z) | |
} | |
def mutableHashMapMemo[K, V]: Memo[K, V] = mutableMapMemo(new mutable.HashMap[K, V]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://2017.flatmap.no/talks/hauck/ | |
object SimpleFinalEncodingExample { | |
sealed trait Expr[A] { | |
def lit(x: Int): A | |
def neg(e: A): A | |
def add(e1: A, e2: A): A | |
} | |
sealed trait ExprMul[A] { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* User: netanelrabinowitz | |
* Date: 26/12/2017 | |
* Time: 15:00 | |
*/ | |
//https://typelevel.org/blog/2017/12/20/who-implements-typeclass.html | |
sealed trait ISOAdder[A] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* User: netanelrabinowitz | |
* Date: 16/12/2017 | |
* Time: 14:11 | |
*/ | |
import shapeless._ | |
import shapeless.ops.hlist | |
import shapeless.labelled.{field, FieldType} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* User: netanelrabinowitz | |
* Date: 16/12/2017 | |
* Time: 11:39 | |
*/ | |
sealed trait JsonValue | |
case class JsonObject(fields: List[(String, JsonValue)]) extends JsonValue | |
case class JsonArray(items: List[JsonValue]) extends JsonValue | |
case class JsonString(value: String) extends JsonValue |
NewerOlder