Discover gists
View ValidateYoutubeVideoId.js
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
| function validVideoId(id) { | |
| var img = new Image(); | |
| img.src = "http://img.youtube.com/vi/" + id + "/mqdefault.jpg"; | |
| img.onload = function () { | |
| checkThumbnail(this.width); | |
| } | |
| } | |
| function checkThumbnail(width) { | |
| //HACK a mq thumbnail has width of 320. |
View Delayed-Feather.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View conv.cu
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
| #include <cudnn.h> | |
| #include <cassert> | |
| #include <cstdlib> | |
| #include <iostream> | |
| #include <opencv2/opencv.hpp> | |
| #define checkCUDNN(expression) \ | |
| { \ | |
| cudnnStatus_t status = (expression); \ | |
| if (status != CUDNN_STATUS_SUCCESS) { \ |
View Qt 5 Dark Fusion Palette
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
| qApp->setStyle(QStyleFactory::create("Fusion")); | |
| QPalette darkPalette; | |
| darkPalette.setColor(QPalette::Window, QColor(53,53,53)); | |
| darkPalette.setColor(QPalette::WindowText, Qt::white); | |
| darkPalette.setColor(QPalette::Base, QColor(25,25,25)); | |
| darkPalette.setColor(QPalette::AlternateBase, QColor(53,53,53)); | |
| darkPalette.setColor(QPalette::ToolTipBase, Qt::white); | |
| darkPalette.setColor(QPalette::ToolTipText, Qt::white); | |
| darkPalette.setColor(QPalette::Text, Qt::white); |
View git.diff.txt
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/.etckeeper b/.etckeeper | |
| index 2373f10..32d85d1 100755 | |
| --- a/.etckeeper | |
| +++ b/.etckeeper | |
| @@ -2,6 +2,8 @@ | |
| mkdir -p './X11/xkb' | |
| mkdir -p './apache2/mods-available' | |
| +mkdir -p './apt/preferences.d' | |
| +mkdir -p './apt/sources.list.d' |
View gist:8279494
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
| T1: w(x=1) | |
| T2: r(x=null) | |
| SCHEDULE NL: | |
| @ wall clock time 1, T1 begins and commits | |
| @ wall clock time 2, T2 begins and commits | |
| NL is serializable: NL is equivalent to executing T2;T1 | |
| NL is not linearizable: T2 should have read x=1 |
View Good-CONTRIBUTING.md-template.md
Contributing
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
Please note we have a code of conduct, please follow it in all your interactions with the project.
Pull Request Process
- Ensure any install or build dependencies are removed before the end of the layer when doing a
View dash_simple_example_pandas_datareader.py
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
| # See official docs at https://dash.plotly.com | |
| # pip install dash pandas | |
| from dash import Dash, dcc, html, Input, Output | |
| import plotly.express as px | |
| import pandas as pd | |
| df = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/gapminderDataFiveYear.csv') |
NewerOlder