I hereby claim:
- I am szastupov on github.
- I am szastupov (https://keybase.io/szastupov) on keybase.
- I have a public key whose fingerprint is B85B B0D5 5772 7618 6F6F 4DAE 015D 9FBF 37D4 D119
To claim this, I am signing this object:
function compress(signal, threshold, ratio, makeup) { | |
return signal.map(x => { | |
let amp = Math.abs(x) | |
let sign = Math.sign(x) | |
if (amp > threshold) { | |
amp = (amp - threshold) * ratio + threshold | |
} | |
return sign * (amp * makeup) | |
}) | |
} |
context.evaluateScript("var console = { log: function(...args) { _consoleLog(args.join(' ')) } }") | |
let consoleLog: @convention(block) (String) -> Void = { message in | |
print("console.log: " + message) | |
} | |
context.setObject(unsafeBitCast(consoleLog, to: AnyObject.self), forKeyedSubscript: "_consoleLog" as (NSCopying & NSObjectProtocol)!) |
[ | |
{ | |
"key": "ctrl+1", | |
"command": "workbench.action.focusFirstEditorGroup" | |
}, | |
{ | |
"key": "ctrl+2", | |
"command": "workbench.action.focusSecondEditorGroup" | |
}, | |
{ |
import sqlalchemy as sa | |
from sqlalchemy.ext.declarative import as_declarative, declared_attr | |
from sqlalchemy.orm import relationship, sessionmaker | |
engine = sa.create_engine('sqlite://') | |
Session = sessionmaker(bind=engine) | |
@as_declarative() |
async function foo (bar) { | |
return bar + ' baz' | |
} | |
foo('test').then(console.log) |
import { deleteAt, updateObjectAt, swap } from '../../lib/farr' | |
export function defaultDataReducer(name, initialData = null) { | |
const initialState = { | |
[name]: initialData, | |
isFetching: true, | |
isFetched: false, | |
isRequested: false | |
} |
.theme-one-dark-ui { | |
.syntax--variable { | |
color: inherit; | |
} | |
.syntax--this { | |
color: #e06c75; | |
} | |
} |
const updater = (data, onUpdate) => (field) => (value) => { | |
onUpdate({ | |
...data, | |
[field]: value | |
}) | |
} |
I hereby claim:
To claim this, I am signing this object:
import logging | |
from tornado.websocket import WebSocketHandler | |
from tornado.web import asynchronous | |
from tornado.ioloop import PeriodicCallback | |
from helpers.event_bus import bus | |
from helpers.api import CommonHandlerMixin | |
from helpers.auth import http_token | |
from functools import partial | |
from . import routes |