List of helpful shortcuts for faster coding
If you have any other helpful shortcuts, feel free to add in the comments of this gist :)
| // File: @openzeppelin/contracts/GSN/Context.sol | |
| // SPDX-License-Identifier: MIT | |
| pragma solidity ^0.7.5; | |
| /* | |
| * @dev Provides information about the current execution context, including the | |
| * sender of the transaction and its data. While these are generally available | |
| * via msg.sender and msg.data, they should not be accessed in such a direct |
| http://www.oreilly.com/data/free/files/2014-data-science-salary-survey.pdf | |
| http://www.oreilly.com/data/free/files/2015-data-science-salary-survey.pdf | |
| http://www.oreilly.com/data/free/files/Data_Analytics_in_Sports.pdf | |
| http://www.oreilly.com/data/free/files/advancing-procurement-analytics.pdf | |
| http://www.oreilly.com/data/free/files/ai-and-medicine.pdf | |
| http://www.oreilly.com/data/free/files/analyzing-data-in-the-internet-of-things.pdf | |
| http://www.oreilly.com/data/free/files/analyzing-the-analyzers.pdf | |
| http://www.oreilly.com/data/free/files/architecting-data-lakes.pdf | |
| http://www.oreilly.com/data/free/files/being-a-data-skeptic.pdf | |
| http://www.oreilly.com/data/free/files/big-data-analytics-emerging-architecture.pdf |
| function change_alias(alias) { | |
| var str = alias; | |
| str = str.toLowerCase(); | |
| str = str.replace(/à|á|ạ|ả|ã|â|ầ|ấ|ậ|ẩ|ẫ|ă|ằ|ắ|ặ|ẳ|ẵ/g,"a"); | |
| str = str.replace(/è|é|ẹ|ẻ|ẽ|ê|ề|ế|ệ|ể|ễ/g,"e"); | |
| str = str.replace(/ì|í|ị|ỉ|ĩ/g,"i"); | |
| str = str.replace(/ò|ó|ọ|ỏ|õ|ô|ồ|ố|ộ|ổ|ỗ|ơ|ờ|ớ|ợ|ở|ỡ/g,"o"); | |
| str = str.replace(/ù|ú|ụ|ủ|ũ|ư|ừ|ứ|ự|ử|ữ/g,"u"); | |
| str = str.replace(/ỳ|ý|ỵ|ỷ|ỹ/g,"y"); | |
| str = str.replace(/đ/g,"d"); |
| function toJSON(node) { | |
| node = node || this; | |
| var obj = { | |
| nodeType: node.nodeType | |
| }; | |
| if (node.tagName) { | |
| obj.tagName = node.tagName.toLowerCase(); | |
| } else | |
| if (node.nodeName) { | |
| obj.nodeName = node.nodeName; |
| from numpy import loadtxt, zeros, ones, array, linspace, logspace, mean, std, arange | |
| from mpl_toolkits.mplot3d import Axes3D | |
| import matplotlib.pyplot as plt | |
| from pylab import plot, show, xlabel, ylabel | |
| #Evaluate the linear regression | |
| def feature_normalize(X): | |
| ''' | |
| Returns a normalized version of X where |
| import { Component, Input, OnChanges, SimpleChanges, SimpleChange } from '@angular/core'; | |
| declare class TypedChange<T = any> extends SimpleChange { | |
| previousValue: T; | |
| currentValue: T; | |
| firstChange: boolean; | |
| constructor(previousValue: T, currentValue: T, firstChange: boolean); | |
| /** | |
| * Check whether the new value is the first value assigned. | |
| */ |
| import {NgModule} from '@angular/core'; | |
| import {RouterModule, Routes} from '@angular/router'; | |
| import {AuthGuard} from './shared/services/auth.guard'; | |
| import {HomeComponent} from './home/home.component'; | |
| export const routes: Routes = [ | |
| { | |
| path: ':realm', canActivate: [AuthGuard], | |
| children: [ | |
| {path: '', redirectTo: 'home', pathMatch: 'full'}, |
| module.exports = React.createClass({ | |
| componentWillEnter(cb) { | |
| doSomeAsyncAnimationStuff(function() { | |
| cb(); | |
| }); | |
| }, | |
| componentDidEnter() { | |
| // Called after cb arg from componentWillEnter is called |