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/env python3 | |
| # -*- coding: utf-8 -*- | |
| import wx | |
| class Example(wx.Frame): | |
| def __init__(self, parent, title): | |
| super(Example, self).__init__(parent, title=title) |
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
| import unirest | |
| def convert_currency(origin, destination, amount = 1): | |
| convert = origin+"_"+destination | |
| urlRequest = "https://free.currconv.com/api/v7/convert?q="+convert+"&compact=ultra&apiKey=47353d3141893576b990" | |
| response = unirest.get(urlRequest) | |
| return amount * response.body[convert] | |
| usdcop = convert_currency("USD","COP") |
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
| /* keep a reference to original toISOString to use it into new method */ | |
| const oldToISOString = Date.prototype.toISOString | |
| /* Define new method */ | |
| const toISOString = function toISOString(date) { | |
| if(!date) return date; | |
| /* extract GTM timezone from date.toString() */ | |
| const regex = /(?:GMT)([-+]\d*)/gm; | |
| let gtm = regex.exec(date.toString())[1]; | |
| gtm = [...gtm]; | |
| /* insert ':' in time -0500 -> -05:00*/ |
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
| // Create a private scope. | |
| (function( $, on ){ | |
| // I proxy the given function and return the resultant GUID | |
| // value that jQuery has attached to the function. | |
| var createAndReturnProxyID = function( target ){ | |
| // When generating the proxy, it doesn't matter what the | |
| // "context" is (window in this case); we never actually |
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
| ### | |
| Module dependencies | |
| ### | |
| require.paths.unshift "#{__dirname}/lib/support/express-csrf/" | |
| require.paths.unshift "#{__dirname}/lib/support/node_hash/lib/" | |
| express = require 'express' | |
| app = module.exports = express.createServer() | |
| RedisStore = require 'connect-redis' |