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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Activity Voter</title> | |
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script> |
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
import React, { useState, useEffect } from "react"; | |
import ReactDOM from "react-dom"; | |
import "./styles.css"; | |
const getData = async (search) => { | |
const proxyurl = "https://cors-anywhere.herokuapp.com/"; | |
const url = `http://www.recipepuppy.com/api/?q=${search}`; | |
const response = await fetch(proxyurl + url).catch(() => |
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
<html> | |
<head> | |
<script src="https://unpkg.com/react@16/umd/react.development.js"></script> | |
<script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js"></script> | |
<script src="https://unpkg.com/babel-standalone@6.15.0/babel.min.js"></script> | |
<style> | |
/* | |
PASTE CSS HERE (Optional) | |
*/ | |
</style> |
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 search(nodeTree, query) { | |
for (var i = 0, len = nodeTree.length; i < len; i++) { | |
if (nodeTree[i].name === query) { | |
return nodeTree[i]; | |
} | |
if (nodeTree[i].children.length > 0) { | |
var new_search = search(nodeTree[i].children, query); | |
if (new_search) { |
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
<!-- DOCTYPE HTML --> | |
<html> | |
<head> | |
<title>iTunes API</title> | |
</head> | |
<body> | |
<div id="content"></div> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> | |
<script src="https://fb.me/react-0.14.6.js"></script> | |
<script src="https://fb.me/react-dom-0.14.6.js"></script> |
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
def Cost_Function_Derivative(X,Y,theta,j,m,alpha): | |
sumErrors = 0 | |
for i in xrange(m): | |
xi = X[i] | |
xij = xi[j] | |
hi = Hypothesis(theta,X[i]) | |
error = (hi - Y[i])*xij | |
sumErrors += error | |
m = len(Y) | |
constant = float(alpha)/float(m) |
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
<!DOCTYPE HMTL> | |
<html> | |
<head> | |
<script type="text/javascript"> | |
var canvas, ctx, index; | |
var o_img = new Image(); | |
o_img.src = 'http://i.imgur.com/JxByHOT.png'; | |
var x_img = new Image(); | |
x_img.src = 'http://i.imgur.com/mgdXoSG.png'; |