Based on dribbble shot https://dribbble.com/shots/2097042-Widget-Weather by kylor
A Pen by Josh Bader on CodePen.
Based on dribbble shot https://dribbble.com/shots/2097042-Widget-Weather by kylor
A Pen by Josh Bader on CodePen.
| /* | |
| * Inspired by: http://stackoverflow.com/questions/4360060/video-streaming-with-html-5-via-node-js | |
| */ | |
| var http = require('http'), | |
| fs = require('fs'), | |
| util = require('util'); | |
| http.createServer(function (req, res) { | |
| var path = 'video.mp4'; |
| class EventEmitter { | |
| constructor(){ | |
| this.events = {}; | |
| } | |
| on(eventName, cb){ | |
| if(this.events[eventName]){ | |
| this.events[eventName].push(cb); | |
| } else { | |
| this.events[eventName] = [cb]; | |
| } |
| export default function (ComposedComponent) { | |
| class Authentication extends Component{ | |
| /*Defined contextTypes to access context */ | |
| static contextTypes = { | |
| router: React.PropTypes.object | |
| } | |
| /*Made used of context to define route*/ | |
| componentWillMount(){ |
| 'use strict'; | |
| const http = require('http'); | |
| const url = require('url'); | |
| const qs = require('querystring'); | |
| const port = 3000; | |
| /*Pure nodejs way of routing, an obj to provide methods as main key then routes with deep clone*/ | |
| let routes = { |
| //... | |
| Model.add({ | |
| content: { | |
| type: Types.Html, wysiwyg: true, height: 400 | |
| }, | |
| hash : { | |
| type : String, | |
| hidden : true | |
| }, |
| function getDistanceFromLatLonInKm(lat1,lon1,lat2,lon2) { | |
| var R = 6371; // Radius of the earth in km | |
| var dLat = deg2rad(lat2-lat1); // deg2rad below | |
| var dLon = deg2rad(lon2-lon1); | |
| var a = | |
| Math.sin(dLat/2) * Math.sin(dLat/2) + | |
| Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) * | |
| Math.sin(dLon/2) * Math.sin(dLon/2) | |
| ; | |
| var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); |
| Option Explicit | |
| Sub AllSectionsToSubDoc() | |
| Dim x As Long | |
| Dim Sections As Long | |
| Dim Doc As Document | |
| Application.ScreenUpdating = False | |
| Application.DisplayAlerts = False |
| import pandas as pd | |
| import datetime as dt | |
| import pandas_datareader.data as pdr | |
| p = print | |
| # ============================================================================= | |
| # return dataframe | |
| # ============================================================================= |
| import numpy as np | |
| import pandas as pd | |
| import datetime as dt | |
| from sklearn.datasets import make_classification | |
| def create_price_data(start_price: float = 1000.00, mu: float = .0, var: float = 1.0, n_samples: int = 1000000): | |
| i = np.random.normal(mu, var, n_samples) | |
| df0 = pd.date_range(periods=n_samples, freq=pd.tseries.offsets.Minute(), end=dt.datetime.today()) |