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 | |
class LevelCreator(object): | |
_json_obj = None | |
_file_name = str() | |
_level_id = str() | |
_source_layer_id = str() | |
_output_layer_id = str() | |
_next_uid = int() | |
_tile_size = 16 # px |
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
/** This code was written as a solution for the following Stack Overflow entry: | |
* https://stackoverflow.com/questions/48307362/draw-a-multi-polygon-with-metric-dimensions-over-part-of-a-sphere-using-d3-geo/48336677 | |
* | |
* Even though it seems to work fine, this code has at least 2 needs for improvements: | |
* - some of the types and functions here actually exist in existing libraries and could be used from them instead | |
* - d3-geo's mercator projection inverted should be able to do the same job more elegantly, in combination with | |
* other d3-geo features | |
*/ | |
import * as turf from '@turf/turf'; // https://npmjs.com/package/@turf/turf |
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
# coding=utf-8 | |
from __future__ import print_function | |
from datetime import date, datetime | |
# --------------- Helpers that build all of the responses ---------------------- | |
def build_speechlet_response(title, output, reprompt_text, should_end_session): | |
return { |
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
""" | |
This sample demonstrates a simple skill built with the Amazon Alexa Skills Kit. | |
The Intent Schema, Custom Slots, and Sample Utterances for this skill, as well | |
as testing instructions are located at http://amzn.to/1LzFrj6 | |
For additional samples, visit the Alexa Skills Kit Getting Started guide at | |
http://amzn.to/1LGWsLG | |
""" | |
from __future__ import print_function |
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 scala.language.implicitConversions | |
import scala.language.postfixOps | |
// numerator | |
// ( numerator ÷ denominator ) create a fraction object as ----------- | |
// denominator | |
object Main extends App { | |
implicit def intToFraction(i: Int) = new IntWithFraction(i) |
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
{ | |
"compilerOptions": { | |
"target": "es5", | |
"module": "commonjs", | |
"moduleResolution": "node", | |
"emitDecoratorMetadata": true, | |
"experimentalDecorators": true, | |
"allowSyntheticDefaultImports": true, | |
"sourceMap": true, | |
"noEmitHelpers": true, |
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
var gulp = require('gulp'); | |
var styleguide = require('sc5-styleguide'); | |
var sass = require('gulp-sass'); | |
const projectTitle = 'C4RE Style Guide'; | |
const sourcePath = 'src'; | |
const outputPath = 'output'; | |
const styleSourcePath = sourcePath + '/styles'; | |
const scssRoot = styleSourcePath + '/tutorial.scss'; | |
const scssWild = styleSourcePath + '/**/*.scss'; |
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
// Imports | |
var gulp = require('gulp'); | |
var sass = require('gulp-sass'); | |
var styleguide = require('sc5-styleguide'); | |
// Path definitions | |
var sourcePath = 'src'; |
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 xs from 'xstream'; | |
import { run } from '@cycle/xstream-run'; | |
import { makeDOMDriver, div, span, i, header, h1, section, button } from '@cycle/dom'; | |
const | |
html = require('./panel.html'), | |
css = require('./panel.css'); | |
function main(sources) { | |
const subscriptions$ = xs.of([ |
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 xs from 'xstream'; | |
import { run } from '@cycle/xstream-run'; | |
import { makeDOMDriver, div } from '@cycle/dom'; | |
// import { Observable } from 'rxjs/Observable'; | |
const | |
html = require('./panel.html'), | |
css = require('./panel.css'); | |
function main() { |