This file contains hidden or 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
| .file "c1.cpp" | |
| .section .rodata.str1.1,"aMS",@progbits,1 | |
| .LC1: | |
| .string "%g %gi" | |
| .section .text.startup,"ax",@progbits | |
| .p2align 4,,15 | |
| .globl main | |
| .type main, @function | |
| main: | |
| .LFB42: |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <complex.h> | |
| #include <math.h> | |
| #ifndef complex | |
| #define complex _Complex | |
| #endif |
This file contains hidden or 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
| fs = require 'fs' | |
| _reload_timestamp = null | |
| setInterval( | |
| -> fs.stat __filename, (err, stat) -> | |
| _reload_timestamp ?= stat.mtime | |
| if stat.mtime > _reload_timestamp | |
| console.info "reloading" | |
| process.exit(100) | |
| 3000 |
This file contains hidden or 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
| fetch_url = (st, param, cb) -> | |
| request { | |
| url: param.url | |
| pool: false | |
| timeout: (param.timeout ? config_def.timeout) * 1000 | |
| }, | |
| (err, resp, body) -> | |
| if err or resp.statusCode != 200 | |
| warn "fetch_url() failed:", param.url, err | |
| else |
This file contains hidden or 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
| #!/usr/bin/python3 | |
| # from functools import reduce | |
| # from itertools import product | |
| from time import time | |
| t0 = time() | |
| digs = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] | |
| sums = {i:0 for i in range(28)} |
This file contains hidden or 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
| // | |
| // http://www.pjrc.com/teensy/td_libs_OneWire.html | |
| // http://www.pjrc.com/teensy/arduino_libraries/OneWire.zip | |
| // http://playground.arduino.cc/Learning/OneWire | |
| // | |
| #include <OneWire.h> | |
| // DS18S20 Temperature chip i/o | |
| OneWire ds(10); // on pin 10 |
This file contains hidden or 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
| def parse( data ): | |
| """ | |
| @return {ok:<0|1>,ts:<utc_datetime>,coord:[<lon>,<lat>],speed:<km/h>,dir:<bearing>} | |
| or None on error or not gps ok | |
| """ | |
| try: | |
| gp = data.index("GPRMC") | |
| cp = data.index("*",gp+4) |
This file contains hidden or 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
| #!/usr/bin/python | |
| # coding: utf-8 | |
| from bottle import get, post, route, run, template, request, redirect | |
| posts = [] | |
| form_html = \ | |
| """ | |
| <form method=POST action="form"> |
This file contains hidden or 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
| def getWindchill(self): | |
| """ | |
| Return wind chill in degrees Celsius | |
| """ | |
| # http://en.wikipedia.org/wiki/Wind_chill - North American wind chill | |
| # index | |
| if self.w_chill is None: | |
| if (self.temp and self.temp <= 10 and | |
| self.windspeed and (self.windspeed*3.6) > 4.8): |
This file contains hidden or 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
| body { | |
| padding:100px; | |
| } | |
| /* Tooltip block */ | |
| .tooltip { | |
| font-size: 12px; | |
| color:#FFF; | |
| position:relative; |