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
| var iterations = 100000000; | |
| var stats = { | |
| win: 0, | |
| loose: 0 | |
| } | |
| function generatePrises() { | |
| var initial = [0, 0, 0]; | |
| initial[Math.floor(Math.random() * 3)] = 1; |
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
| with tbl2_view as ( | |
| with tbl3_view as ( | |
| with tbl4_view as ( | |
| select * from tbl4 | |
| ) | |
| select tbl3.*, json_agg(tbl4_view) as tbl4 from tbl3 | |
| inner join tbl4_view on tbl4_view.tbl3_id = tbl3.id | |
| group by tbl3.id | |
| ) |
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 React, { Component } from 'react'; | |
| import AceEditor from 'react-ace'; | |
| import brace from 'brace' | |
| import sql from 'brace/mode/sql'; | |
| import xcode from 'brace/theme/xcode'; | |
| export default class Explorer extends Component { | |
| constructor(args) { | |
| super(args); |
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 React, { Component } from 'react'; | |
| import { connect } from "react-redux"; | |
| import Window from "components/Window"; | |
| import Toolbar from "components/Toolbar"; | |
| import { query } from "reducers/connections"; | |
| var AceEditor = require('react-ace'); | |
| var brace = require('brace'); | |
| require('brace/mode/sql'); | |
| require('brace/theme/xcode'); |
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 React, { Component } from 'react'; | |
| import { connect } from "react-redux"; | |
| import Window from "components/Window"; | |
| import Toolbar from "components/Toolbar"; | |
| import { query } from "reducers/connections"; | |
| var AceEditor = require('react-ace'); | |
| var brace = require('brace'); | |
| require('brace/mode/sql'); | |
| require('brace/theme/xcode'); |
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
| var parser = parse({delimiter: ',', columns: ['code', 'date', 'open', 'high', 'low', 'close', 'volume', 'f0']}); | |
| var saver = transform(function(asset, cb) { | |
| models.MetastockHistory.create({ | |
| code: asset['code'], | |
| date: moment(asset['date'], 'YYYYMMDD').format(), | |
| price: parseFloat(asset['close']) | |
| }).then(function (result) { | |
| cb(null, result); | |
| }); |
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
| var parser = parse({delimiter: ',', columns: ['code', 'date', 'open', 'high', 'low', 'close', 'volume', 'f0']}); | |
| var saver = transform(function(asset, cb) { | |
| models.MetastockHistory.create({ | |
| code: asset['code'], | |
| date: moment(asset['date'], 'YYYYMMDD').format(), | |
| price: parseFloat(asset['close']) | |
| }).then(function (result) { | |
| cb(null, result); | |
| }); |
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
| var parser = parse({delimiter: ',', columns: ['code', 'date', 'open', 'high', 'low', 'close', 'volume', 'f0']}); | |
| var saver = transform(function(asset, cb) { | |
| models.MetastockHistory.create({ | |
| code: asset['code'], | |
| date: moment(asset['date'], 'YYYYMMDD').format(), | |
| price: parseFloat(asset['close']) | |
| }).then(function (result) { | |
| cb(null, result); | |
| }); |
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
| var fs = require('fs'); | |
| var gulp = require('gulp'); | |
| var env = process.env.NODE_ENV || 'development'; | |
| var child_process = require('child_process'); | |
| var config = require('../../config/config.json')[env]; | |
| var path = require('path'); | |
| var minimist = require('minimist'); | |
| var knownOptions = { | |
| string: ['from'], |
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
| # prompt style and colors based on Steve Losh's Prose theme: | |
| # http://github.com/sjl/oh-my-zsh/blob/master/themes/prose.zsh-theme | |
| # | |
| # vcs_info modifications from Bart Trojanowski's zsh prompt: | |
| # http://www.jukie.net/bart/blog/pimping-out-zsh-prompt | |
| # | |
| # git untracked files modification from Brian Carper: | |
| # http://briancarper.net/blog/570/git-info-in-your-zsh-prompt | |
| function virtualenv_info { |