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
| for i in range(len(endpoints)/2): | |
| actendpts.append(self.screenXFromImageCoords(endpoints[i*2],endpoints[i*2+1])) # actual x-coordinate | |
| actendpts.append(self.screenYFromImageCoords(endpoints[i*2],endpoints[i*2+1])) # actual y-coordinate | |
| for i in [x * 2 for x in range(len(endpoints)/2)]: # iterate over every other integer [0, 2, 4, ...] | |
| actendpts.append(self.screenXFromImageCoords(endpoints[i],endpoints[i+1])) # actual x-coordinate | |
| actendpts.append(self.screenYFromImageCoords(endpoints[i],endpoints[i+1])) # actual y-coordinate | |
| for (x,y) in [(endpoints[i*2],endpoints[i*2+1]) for i in range(len(endpoints)/2)]: # iterate over each pair of integers | |
| actendpts.append(self.screenXFromImageCoords(x,y)) # actual x-coordinate |
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 drawPolyLine(*args, **kwargs): | |
| width = kwargs.pop('width', 0) | |
| fill = kwargs.pop('fill', (255,255,255)) | |
| display = kwargs.pop('display', True) | |
| print "width: %s\nfill: %s\ndisplay: %s" % (width, fill, display) | |
| for arg in args: | |
| print arg |
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
| evshield.waitForButtonPress(BTN_GO); | |
| evshield.waitForButtonPress(BTN_GO, 1); // "breathing" led pattern: http://www.mindsensors.com/reference/EVShield/html/class_e_v_shield.html#af6551565c91c30c4dcbf3816f45832ed | |
| while (!evshield.getButtonState(BTN_GO)) { | |
| if (millis() % 1000 < 3) { | |
| Serial.println("Press GO button to continue"); | |
| } | |
| } |
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
| str = "One Two\nThree Four"; | |
| str.split('\n').map(function(l){return l.split(' ');}); | |
| // https://cloud.githubusercontent.com/assets/5026621/19372551/0d04c452-918b-11e6-8245-70bf616d3458.png | |
| //or | |
| str.split('\n').map(String.prototype.split.bind(' ')); |
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
| /* | |
| Fraction.java - Version 1.01 - 6/7/2013 | |
| _____ _ _ _____ _ | |
| / ___| | | | | |_ _| | | | |
| \ `--. ___| |_| |__ | | ___ _ __ ___ _ __ ___ | |__ __ _ _ _ _ __ ___ | |
| `--. \/ _ \ __| '_ \ | |/ _ \ '_ \ / _ \ '_ ` _ \| '_ \ / _` | | | | '_ ` _ \ | |
| /\__/ / __/ |_| | | | | | __/ | | | __/ | | | | | |_) | (_| | |_| | | | | | | | |
| \____/ \___|\__|_| |_| \_/\___|_| |_|\___|_| |_| |_|_.__/ \__,_|\__,_|_| |_| |_| | |
| Creates a basic fraction with a numerator and denominator field. |
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
| /* | |
| GuassianElimination2.java - Version 1.01 - 5/16/2013 | |
| _____ _ _ _____ _ | |
| / ___| | | | | |_ _| | | | |
| \ `--. ___| |_| |__ | | ___ _ __ ___ _ __ ___ | |__ __ _ _ _ _ __ ___ | |
| `--. \/ _ \ __| '_ \ | |/ _ \ '_ \ / _ \ '_ ` _ \| '_ \ / _` | | | | '_ ` _ \ | |
| /\__/ / __/ |_| | | | | | __/ | | | __/ | | | | | |_) | (_| | |_| | | | | | | | |
| \____/ \___|\__|_| |_| \_/\___|_| |_|\___|_| |_| |_|_.__/ \__,_|\__,_|_| |_| |_| | |
| Description. |
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
| <html> | |
| <title>CSS3 Animations Examples</title> | |
| <head> | |
| <style> | |
| @keyframes fadeIn { | |
| from { opacity: 0; } | |
| to { opacity: 1; } | |
| } | |
| @keyframes fadeInUp { |
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
| 'use strict'; | |
| var Alexa = require('alexa-sdk'); | |
| var APP_ID = 'amzn1.ask.skill.5f3759df-5f37-59df-5f3759df5f37'; | |
| exports.handler = function(event, context, callback) { | |
| var alexa = Alexa.handler(event, context); | |
| alexa.APP_ID = APP_ID; | |
| alexa.registerHandlers(handlers); | |
| alexa.execute(); | |
| }; |
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
| 'use strict'; | |
| var Alexa = require('alexa-sdk'); | |
| var APP_ID = 'amzn1.ask.skill.5f3759df-5f37-59df-5f3759df5f37'; | |
| var request = require('request'); | |
| exports.handler = function(event, context, callback) { | |
| var alexa = Alexa.handler(event, context); | |
| alexa.APP_ID = APP_ID; | |
| alexa.registerHandlers(handlers); |
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
| # you have | |
| x1 = 3309 | |
| y1 = 2406 | |
| x2 = 3386 | |
| y2 = 506 | |
| x3 = 347 | |
| y3 = 426 | |
| x4 = 311 | |
| y4 = 2199 | |
| # and must assign the following to s.ts_cal: {'x1':3309, 'y1':2406, 'x2':3386, 'y2':506, 'x3':347, 'y3':426, 'x4':311, 'y4':2199} |