Visualize data from google calendar through google-calendar-api in Calendar View from https://bl.ocks.org/mbostock/4063318
This file contains 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
[ | |
{ | |
"key": "0 歲", | |
"value": 27783 | |
}, | |
{ | |
"key": "10 歲", | |
"value": 21775 | |
}, | |
{ |
This file contains 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
diff --git a/src/components/github-htmlview.component.js b/src/components/github-htmlview.component.js | |
index 1d50925..83e04d3 100644 | |
--- a/src/components/github-htmlview.component.js | |
+++ b/src/components/github-htmlview.component.js | |
@@ -204,8 +204,10 @@ export class GithubHtmlView extends Component { | |
/<span class="email-hidden-toggle"><a href="#">…<\/a><\/span>/g, | |
'' | |
) | |
- .replace(/<\/summary>/g, '</summary><hidden>') | |
+ .replace(/<details>/g, '<details><hidden>') |
This file contains 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
class ResizeObserver { | |
constructor() { | |
this.observables = []; | |
// Array of observed elements that looks like this: | |
// [{ | |
// el: domNode, | |
// callback: func, | |
// size: {height: x, width: y} | |
// }] | |
this.boundCheck = this.check.bind(this); |
This file contains 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 readline = require('readline'); | |
var google = require('googleapis'); | |
var googleAuth = require('google-auth-library'); | |
// If modifying these scopes, delete your previously saved credentials | |
// at ~/.credentials/calendar-nodejs-quickstart.json | |
var SCOPES = ['https://www.googleapis.com/auth/calendar.readonly']; | |
var TOKEN_DIR = (process.env.HOME || process.env.HOMEPATH || | |
process.env.USERPROFILE) + '/.credentials/'; |
This file contains 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
console.log('popup ready!'); | |
let startPredicting = false; | |
let times = 0; | |
let y = 0; | |
document.addEventListener('DOMContentLoaded', function() { | |
let video = document.getElementById('video'); | |
let still = document.getElementById('still'); |
This file contains 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
chrome.runtime.onMessage.addListener(gotMessage) | |
function gotMessage(message, sender, sendResponse){ | |
let direction = 0; | |
if(message.direction == 'up'){ | |
direction = -500; | |
} else if(message.direction == 'down'){ | |
direction = +500; | |
} else if (message.direction == 'turn off') { | |
const mask = document.getElementById('body-maskDiv'); | |
if (mask) { |
Data source from https://sites.google.com/site/rlearningsite/catagory/logit Only use for demo & test
This file contains 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
from flask import Flask, Blueprint, request, current_app, jsonify | |
import requests | |
import json | |
video_blueprint = Blueprint( | |
'video', | |
__name__ | |
) |
This file contains 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
const fs = require('fs'); | |
const readline = require('readline'); | |
const { google } = require('googleapis'); | |
// If modifying these scopes, delete token.json. | |
const SCOPES = ['https://www.googleapis.com/auth/calendar.readonly']; | |
// The file token.json stores the user's access and refresh tokens, and is | |
// created automatically when the authorization flow completes for the first | |
// time. | |
const TOKEN_PATH = 'token.json'; |