This has been moved to the Matrix AI blog: https://matrix.ai/2018/03/24/developing-with-nix/
Note that if you just to compile a simple C program, and you don't want to fiddle with environments:
nix-shell --packages stdenv
(if-not goog.DEBUG | |
(def register-sub rf/register-sub) | |
(do | |
(defonce subcounts (atom {})) | |
(aset js/document "subcounts" #(.table js/console (clj->js | |
(for [[k vs] | |
(reverse (sort-by :total-time @subcounts))] | |
(assoc vs :subscription (str k)))))) |
class Index(object): | |
def __init__(self,): | |
self.idx_to_val = [] | |
self.val_to_idx = {} | |
def get_id(self, val): | |
return self.val_to_idx[val] | |
def get_val(self, idx): | |
return self.idx_to_val[idx] |
''' | |
Copyright (c) 2013 Zohaib Sibte Hassan | |
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE |
This has been moved to the Matrix AI blog: https://matrix.ai/2018/03/24/developing-with-nix/
Note that if you just to compile a simple C program, and you don't want to fiddle with environments:
nix-shell --packages stdenv
We want to move the Wellcome Library away from the Wellcome Player and onto the IIIF 2.0 Universal Viewer (UV).
This allows us to move all the Wellcome Library's image API endpoints to the protoype DLCS (Digital Library Cloud Services) that we have started building.
We have a problem. We have video, audio and born-digital content, besides image sequence content. We don't want to maintain the Player and the UV together. This non-image content is a tiny fraction of the total, but an important one.
Other institutions share this problem, and everyone agrees that IIIF will need to extend to handle non-image-sequence resources - "IxIF". We want to inherit all that we can from IIIF - the JSON-LD, the Open Annotation model, the manifest wrapper and general approach to metadata ("presentation not semantics"). Shared Canvas may be appropriate for some media but not others.
(comment ; Fun with transducers, v2 | |
;; Still haven't found a brief + approachable overview of Clojure 1.7's new | |
;; transducers in the particular way I would have preferred myself - so here goes: | |
;;;; Definitions | |
;; Looking at the `reduce` docstring, we can define a 'reducing-fn' as: | |
(fn reducing-fn ([]) ([accumulation next-input])) -> new-accumulation | |
;; (The `[]` arity is actually optional; it's only used when calling | |
;; `reduce` w/o an init-accumulator). |
# -- coding: utf-8 -- | |
from win32api import * | |
from win32gui import * | |
import win32con | |
import sys, os | |
import struct | |
import time | |
class WindowsBalloonTip: |
#!/usr/bin/env python3 | |
""" | |
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors |
{ | |
"fonts": ["./src/NotoSerifSC-Bold.otf"], | |
"texts": " 0123456789:年月日时分秒公元农历腊零初一二三四五六七八九十廿甲乙丙丁戊己庚辛壬癸子丑寅卯辰巳午未申酉戌亥立春雨水惊蛰春分清明谷雨立夏小满芒种夏至小暑大暑立秋处暑白露秋分寒露霜降立冬小雪大雪冬至小寒大寒" | |
} |
// JavaScript error reporting functions, including automatic window.onerror | |
// and unhandledrejection reporting. | |
// | |
// Based on: | |
// https://kevinlocke.name/bits/2019/07/30/more-robust-javascript-error-reporting/ | |
// | |
// API: | |
// reportError(message, error): | |
// Report an exception with optional message and exception value. | |
// reportRejection(message, cause): |