- MBrace: Existing, opinionated library for distributed computing
- Vagabond: F# project for moving compiled thunks around using reflection and ref-emit magic
- AssemblySaver.cs: Original inspiration for Vagabond
- FsPickler: Serialization library
- Vagabond: F# project for moving compiled thunks around using reflection and ref-emit magic
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
<Query Kind="Program" /> | |
void Main() | |
{ | |
const string fileName = @"C:\Users\asaeeduddin\Downloads\Interview\scores.csv"; | |
String[] lines = File.ReadAllLines(fileName); | |
//todo calculate the average for each student and display the student’s name with the highest average. | |
var averages = lines | |
// Parse rows (probably could have si |
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
// Note: Prefer static typing over defensive programming, lots of tests | |
// Note: The simple recursive impl. here is sufficient when dealing with small input (e.g unwrapping JSON), for potentially large input the recursion should be unrolled | |
interface Nested<T> extends Array<T | Nested<T>> { } | |
function* flatten<T>(items: Nested<T>): Iterable<T> { | |
for (var i of items) | |
if (Array.isArray(i)) yield* flatten(i); | |
else yield i; | |
} |
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
fs.readdir(source, function (err, files) { | |
if (err) { | |
console.log('Error finding files: ' + err) | |
} else { | |
files.forEach(function (filename, fileIndex) { | |
console.log(filename) | |
gm(source + filename).size(function (err, values) { | |
if (err) { | |
console.log('Error identifying file size: ' + err) | |
} else { |
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
using System.IO; | |
using Microsoft.AspNetCore.Builder; | |
using Microsoft.AspNetCore.Hosting; | |
using Nancy; | |
using Nancy.Conventions; | |
using Nancy.Owin; | |
namespace ConsoleApplication | |
{ | |
public class Program |
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 readCSV(path: string) { | |
const lines = fs.readFileSync(path) | |
.toString() | |
.split(/\r?\n/) | |
.map(line => line.split(/\s*,\s*/)); | |
const header = lines[0]; | |
const data = lines.slice(1); | |
return data |
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
# Start X server. Requires xming or cygwin with the xorg packages installed | |
Function bootx { | |
XWin :0 -multiwindow -clipboard -wgl -ac -listen tcp | |
} | |
# Find local machine's IP on network interface connected to docker server | |
Function Get-DockerRoutableIP { | |
if (Get-Command docker-machine -errorAction SilentlyContinue) { | |
return (Find-NetRoute -RemoteIPAddress $(docker-machine ip default)).IPAddress | |
} |
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
#pragma once | |
#include "SFML\Graphics.hpp" | |
#include "SFML\Window.hpp" | |
#include "SFML\System.hpp" | |
using namespace sf; | |
class Game | |
{ | |
private: |
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
# Watch out for babun installation asspains. Immediately after babun install, cd to .babun folder and run ./update.bat | |
# See babun/babun#702 | |
pact install curl python python-devel python-setuptools python-crypto openssl openssl-devel libffi-devel gcc-g++ vim git wget; | |
# If you've somehow ended up with python < 2.7.9 just give up and shoot yourself in the head now | |
# Try this first though | |
pact update python | |
# If you still don't have the right python, try using easy_install or get_pip.py to install from source or some curl'd down wheel |
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
https://github.com/dotnet/coreclr/issues/2715#issuecomment-174761980 | |
https://github.com/dotnet/corefx/blob/master/src/System.Runtime.Serialization.Primitives/src/System/Runtime/Serialization/ISerializationSurrogateProvider.cs |