This file contains 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
abstract class Atom(val isotope : Int, val charge : Int = 0) { | |
def number : Int | |
def name : String | |
def symbol : String | |
def valence : Set[Int] = Set.empty[Int] | |
} | |
trait Organic | |
object Atom { |
This file contains 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 trait BombLike { | |
def power : Int | |
def name : String | |
} | |
case class Bomb(power : Int, name : String) extends BombLike { | |
println("Explosion!") | |
} | |
case object Clock extends BombLike { |
This file contains 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
class Telnet extends Actor with ActorLogging { | |
override def receive : Receive = { | |
case Connected(remote, _) => | |
log.info(s"Incoming connection from: $remote") | |
val handler = context.actorOf(Props[SimplisticHandler]) | |
sender() ! Register(handler) | |
} | |
} | |
class SimplisticHandler extends Actor with ActorLogging { |
This file contains 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
/* | |
class Functor f where | |
fmap :: (a -> b) -> f a -> f b | |
*/ | |
trait Functor[F[_]] { | |
def fmap[A, B](f : F[A])(g : A => B) : F[B] | |
} |
This file contains 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
2017-03-28 11:45:28 +0300 | |
cmake | |
--build | |
. | |
/usr/local/Cellar/cmake/3.7.2/bin/cmake -H/tmp/llvm-4.0-20170328-2197-1mw2b8z/llvm-4.0.0.src -B/tmp/llvm-4.0-20170328-2197-1h2a439 --check-build-system CMakeFiles/Makefile.cmake 0 | |
/usr/local/Cellar/cmake/3.7.2/bin/cmake -E cmake_progress_start /tmp/llvm-4.0-20170328-2197-1h2a439/CMakeFiles /tmp/llvm-4.0-20170328-2197-1h2a439/CMakeFiles/progress.marks | |
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all | |
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f lib/Demangle/CMakeFiles/LLVMDemangle.dir/build.make lib/Demangle/CMakeFiles/LLVMDemangle.dir/depend |
This file contains 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
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
module Main where | |
-- Integer and Boolean literals | |
data Lit = LInt Int | |
| LBool Bool | |
deriving (Show, Eq, Ord) |
This file contains 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
-- Based on http://www2.mpip-mainz.mpg.de/~andrienk/journal_club/integrators.pdf | |
{-# LANGUAGE NoImplicitPrelude #-} | |
module Integrator where | |
import Data.Array.Accelerate | |
import Data.Array.Accelerate.Linear | |
import Data.Array.Accelerate.Control.Lens | |
type R = Float |
This file contains 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
#!/bin/sh | |
DIR=$(basename "`pwd`") | |
# Setup nodeJS project | |
cat > package.json <<EOF | |
{ | |
"name": "$DIR", | |
"version": "1.0.0", | |
"description": "", |
This file contains 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
#!/bin/sh | |
# Install whisper.cpp from here: https://github.com/ggerganov/whisper.cpp | |
# You may also need ffmpeg for conversion | |
WHISPER_PATH=/Users/pavel/.local/share/whisper.cpp | |
MODEL="large" | |
usage() | |
{ |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import json | |
import os | |
import argparse | |
import os.path as osp | |
from typing import Union | |
import torch | |
from transformers import GenerationConfig, LlamaForCausalLM, LlamaTokenizer |
OlderNewer