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
The following generators are available on this platform: | |
Unix Makefiles = Generates standard UNIX makefiles. | |
Ninja = Generates build.ninja files (experimental). | |
Watcom WMake = Generates Watcom WMake makefiles. | |
CodeBlocks - Ninja = Generates CodeBlocks project files. | |
CodeBlocks - Unix Makefiles = Generates CodeBlocks project files. | |
CodeLite - Ninja = Generates CodeLite project files. | |
CodeLite - Unix Makefiles = Generates CodeLite project files. | |
Eclipse CDT4 - Ninja = Generates Eclipse CDT 4.0 project files. | |
Eclipse CDT4 - Unix Makefiles |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
import json | |
import time | |
import logging | |
from collections import UserDict | |
class AutoReloadConfig(UserDict): | |
""" | |
A dictionary that automatically reloads itself from a file. | |
On each call to __getitem__(), check if config is older than reload_period and if yes then reload from file. |
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
#r "<path/to/Suave.dll>" | |
open Suave | |
open Suave.Successful | |
open Suave.RequestErrors | |
/// <summary> | |
/// Same as pathScan but also passes the HttpContext to the handler h. | |
/// See pathScan: https://github.com/SuaveIO/suave/blob/0524552a876526ae6623ba6fdf4ca3a06feaf510/src/Suave/Combinators.fs#L413 | |
/// </summary> | |
let pathScanContext (pf : PrintfFormat<_,_,_,_,'t>) (h : HttpContext -> 't -> WebPart) : WebPart = |
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
type TaskResult<'a,'b> = Task<Result<'a,'b>> | |
module TaskResult = | |
let bind (f: 'a -> TaskResult<'b,'e>) (x: TaskResult<'a,'e>): TaskResult<'b,'e> = task { | |
match! x with | |
| Ok success -> return! f success | |
| Error failure -> return Error failure | |
} | |
// should it be called bindResult or bindTask? |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"> | |
<title>TextSymbol with Halo - 4.9</title> | |
<style> | |
html, | |
body, | |
#viewDiv { |
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
""" | |
| frame | which | center-x | center-y | vector | vector_array | | |
| 44 | 0 | 55.5 | 29.3 | "49 44 31 22 26 22 44 ..." | [49, 44, 31, 22, 26, 22, 44, ...] | | |
""" | |
import pandas as pd | |
df = pd.read_csv(r"C:\Users\egubser\Downloads\blobs.csv", sep=';') | |
df['vector_array'] = df.vector.apply(lambda v: [int(k) for k in v.split(' ')]) |
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
module AsyncBoundedCacheTests | |
open System | |
open Xunit | |
[<Fact>] | |
let ``insert items`` () = async { | |
let f = fun x -> async { | |
do! Async.Sleep(1) | |
return x |
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
module AsyncBoundedCache | |
open System | |
open System.Collections.Concurrent | |
open System.Threading | |
open System.Threading.Tasks | |
let startTime = DateTime.UtcNow.Ticks / 10000000L | |
let now () = int ((DateTime.UtcNow.Ticks / 10000000L) - startTime) |
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
""" | |
Given the python code: | |
out.p = inp.x + inp.y | |
out.q = inp.y + 1 | |
It finds these dependencies: | |
inputs are x, y | |
outputs are p, q | |
""" |
OlderNewer