Skip to content

Instantly share code, notes, and snippets.

@xumx
xumx / Pixels
Created January 11, 2019 13:59
32 x 32 (0,5, #81645D), (9,21, #334422), (25,29, #42382E), (21,0, #817E80)
32 x 32 (1,2, #958B85), (21,27, #777769), (12,11, #6A655D), (15,4, #AAB3B2)
32 x 32 (1,3, #958B85), (24,18, #5B6546), (12,18, #525A3B), (12,16, #4A4B44)
32 x 32 (14,3, #AAAEB3), (31,19, #4B524D), (10,2, #8B959A), (5,29, #4C5B33)
32 x 32 (15,25, #383B2B), (16,20, #334422), (12,28, #89836D), (18,4, #7C858C)
32 x 32 (15,27, #4B5745), (22,24, #5A6242), (16,0, #869398), (6,14, #646B6A)
32 x 32 (16,25, #43542B), (1,25, #334422), (30,22, #6B7368), (12,17, #46533E)
32 x 32 (18,30, #4B4848), (11,30, #6A655D), (4,17, #737B49), (2,16, #74736C)
32 x 32 (2,12, #5B6546), (15,0, #869398), (21,15, #8D9395), (3,31, #6A6C4B)
32 x 32 (2,18, #798149), (17,26, #4C5B33), (18,8, #857A7A), (9,11, #3B4536)
@xumx
xumx / Fast.ai install script
Created July 9, 2018 09:50 — forked from gilrosenthal/Fast.ai install script
Fast.ai Install on Google Colab
!pip install fastai
!apt-get -qq install -y libsm6 libxext6 && pip install -q -U opencv-python
import cv2
from os import path
from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag
platform = '{}{}-{}'.format(get_abbr_impl(), get_impl_ver(), get_abi_tag())
accelerator = 'cu80' if path.exists('/opt/bin/nvidia-smi') else 'cpu'
!pip install -q http://download.pytorch.org/whl/{accelerator}/torch-0.3.0.post4-{platform}-linux_x86_64.whl torchvision
@xumx
xumx / widget.js
Last active October 20, 2020 03:39
KeyReply Chat Widget
(function () {
// Load Stylesheet
var root = 'https://files.keyreply.com'
var head = document.getElementsByTagName('head')[0],
stylesheet = document.createElement('link')
stylesheet.type = 'text/css'
stylesheet.rel = 'stylesheet'
stylesheet.href = root + '/files/boutir.css?13'
head.appendChild(stylesheet)
@xumx
xumx / example.py
Created June 8, 2016 02:28
Trick for charRNN to represent capitalization
import re
s = 'Hello World'
re.sub( '([A-Z])', '^\\1', s ).lower()
#reverse
s1 = "^hello ^world"
re.sub( '\^(.)', lambda match: match.group( 1 ).upper(), s1 )
@xumx
xumx / telegram.js
Created January 29, 2016 20:19
Telegram Client for SuperScript Chat Bot
var TelegramBot = require('node-telegram-bot-api');
var superscript = require("superscript");
var mongoose = require("mongoose");
var facts = require("sfacts");
var factSystem = facts.create('telegramFacts');
mongoose.connect('mongodb://localhost/superscriptDB');
var TopicSystem = require("superscript/lib/topics/index")(mongoose, factSystem);
// TopicSystem.importerFile('./data.json', function(){ })
@xumx
xumx / designer.html
Created July 25, 2014 04:29
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-animated-pages/core-animated-pages.html">
<link rel="import" href="../core-animated-pages/transitions/hero-transition.html">
<link rel="import" href="../core-animated-pages/transitions/cross-fade.html">
<link rel="import" href="../core-animated-pages/transitions/slide-down.html">
<link rel="import" href="../core-animated-pages/transitions/slide-up.html">
<link rel="import" href="../core-animated-pages/transitions/tile-cascade.html">
@xumx
xumx / designer.html
Created June 27, 2014 09:25
designer
<link rel="import" href="../paper-ripple/paper-ripple.html">
<link rel="import" href="../paper-radio-group/paper-radio-group.html">
<link rel="import" href="../paper-radio-button/paper-radio-button.html">
<polymer-element name="smu-room">
<template>
<style>
:host {
position: absolute;
@xumx
xumx / designer.html
Created June 27, 2014 05:37
designer
<link rel="import" href="../paper-ripple/paper-ripple.html">
<polymer-element name="smu-rooms">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
@xumx
xumx / designer.html
Created June 4, 2014 09:02
designer
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
@xumx
xumx / designer.html
Created June 4, 2014 09:01
designer
<link rel="import" href="../components/polymer/polymer.html">
<polymer-element name="new-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;