Skip to content

Instantly share code, notes, and snippets.

View unoexperto's full-sized avatar

unoexperto

View GitHub Profile
@stettix
stettix / things-i-believe.md
Last active March 20, 2024 17:45
Things I believe

Things I believe

This is a collection of the things I believe about software development. I have worked for years building backend and data processing systems, so read the below within that context.

Agree? Disagree? Feel free to let me know at @JanStette. See also my blog at www.janvsmachine.net.

Fundamentals

Keep it simple, stupid. You ain't gonna need it.

@assiotis
assiotis / ServerCalls.scala
Created January 1, 2018 00:19
An example of how to translate between gRPC and akka streams server-side using the reactive-grpc project
import java.util.concurrent.ExecutorService
import akka.stream.Materializer
import akka.stream.scaladsl.{Flow, Sink, Source}
import com.salesforce.reactivegrpccommon.{ReactivePublisherBackpressureOnReadyHandler, ReactiveStreamObserverPublisher}
import io.grpc.internal.{GrpcUtil, SerializingExecutor}
import io.grpc.stub.{CallStreamObserver, ServerCallStreamObserver, StreamObserver}
import io.grpc.{Status, StatusException, StatusRuntimeException}
import scala.concurrent.ExecutionContext
@dbarnes
dbarnes / OSX Sierra + Titan Xp eGPU. Tensorflow 1.2.1. + CUDA 8 + cuDNN 6.md
Last active March 28, 2020 19:23
OSX Sierra + Titan Xp eGPU. Tensorflow 1.2.1. + CUDA 8 + cuDNN 6

OSX Sierra + Titan Xp eGPU. Tensorflow 1.2.1. + CUDA 8 + cuDNN 6

This gist summarises the tensorflow related steps I took to get the above combo working.

When its all tested in c++ I'll update the instructions fully (and add anything I forgot below).

But in summary ( with the current master dd06643cf098ed362212ce0f76ee746951466e81 ):

I have uploaded the pip wheel which I believe should work if you have the same setup but no promises (built for compute capability 3.5, 5.2, 6.0 and named tensorflow-gpu). Install with (not sure dropbox allows this direct linking):

@joeyAghion
joeyAghion / mongodb_collection_sizes.js
Last active February 9, 2024 22:37
List mongodb collections in descending order of size. Helpful for finding largest collections. First number is "size," second is "storageSize."
var collectionNames = db.getCollectionNames(), stats = [];
collectionNames.forEach(function (n) { stats.push(db[n].stats()); });
stats = stats.sort(function(a, b) { return b['size'] - a['size']; });
for (var c in stats) { print(stats[c]['ns'] + ": " + stats[c]['size'] + " (" + stats[c]['storageSize'] + ")"); }
import scala.annotation.tailrec
object Crap extends App {
val BASE = 16
val DIGITS = "0123456789ABCDEF"
// Original
def encode0(number: BigInt): String = {
require(number > 0, "number must not be negative")
@ymasory
ymasory / scala-irc
Last active August 30, 2017 21:16
List of all Scala-related IRC channels.
Please help compile a list of all Scala-related IRC rooms.
All of these channels are on Freenode.
#akka | concurrency & distribution framework
#argonaut | json library
#fp-in-scala | the book Functional Programming in Scala
#geotrellis | geoprocessing library
#indyscala | regional scala group
#json4s | json library
@samklr
samklr / TontonMartin.scala
Created September 27, 2012 10:24
ScalaFistes
object FuncourseWithUncleMartin{
*/
object Setsss{
def contains(s: Set, elem: Int): Boolean = s(elem)
def singleton(elem: Int): Set = Set(elem)//(x :Int) => x == elem
def union(s: Set, t: Set): Set = (x : Int) => s(x) || t(x)