Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| from bs4 import BeautifulSoup | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding('utf-8') | |
| USE_PROXY = True | |
| if USE_PROXY: | |
| import requesocks as requests | |
| else: |
| var __on = false; | |
| var vis = (function(){ | |
| var stateKey, eventKey, keys = { | |
| hidden: "visibilitychange", | |
| webkitHidden: "webkitvisibilitychange", | |
| mozHidden: "mozvisibilitychange", | |
| msHidden: "msvisibilitychange" | |
| }; |
Look at LSB init scripts for more information.
Copy to /etc/init.d:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)| var data = [61.5, 65.2, 72.3, 75.1, 85.0, 86.2, 61.0, 64.3, 72.1, 75.8, 79.9, 84.8, 63.1, 65.0, 77.0, 74.0, 88.0, 87.0, 60.4, 65.9, 79.5, 70.1, 80.4, 85.9, 90.0]; | |
| d3 .select('#chart') | |
| .datum(data) | |
| .call(histogramChart() | |
| .width(700) | |
| .height(250) | |
| .lowerBand(55) | |
| .upperBand(95) | |
| .bins(7) |
Prereq:
apt-get install zsh
apt-get install git-coreGetting zsh to work in ubuntu is weird, since sh does not understand the source command. So, you do this to install zsh
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | zsh
| /* Quick implementation of Exponential and Geometric random number generators | |
| For example you can use it to simulate when an event is going to happen next, given its average rate: | |
| Buses arrive every 30 minutes on average, so that's an average rate of 2 per hour. | |
| I arrive at the bus station, I can use this to generate the next bus ETA: | |
| randomExponential(2); // => 0.3213031016466269 hours, i.e. 19 minutes | |
| */ |
| // put this in playground | |
| class MyView : NSView { | |
| override func drawRect(dirtyRect: NSRect) { | |
| let pathRect = NSInsetRect(self.bounds, 1, 1) | |
| let path = NSBezierPath(roundedRect: pathRect, xRadius: 10, yRadius: 10) | |
| path.lineWidth = 4 | |
| NSColor.greenColor().setFill() | |
| NSColor.blackColor().setStroke() | |
| path.fill() |
| /*! | |
| * Copyright 2016 MoSeeker, Inc. | |
| * @author Towry Wang | |
| */ | |
| var verge = require('verge'); | |
| var classes = require('dom-classes'); | |
| var objectAssign = require('object-assign'); | |
| function LazyLoad(options) { |
| // usage | |
| import historyFallback from 'lib/polyfill/historyFallback' | |
| import historySupport from 'lib/support/history'; | |
| let redirected = historyFallback('/', historySupport ? 'history' : 'hash'); | |
| if (!redirected) { | |
| // You app ... | |
| // Vue.use(VueRouter); |