Skip to content

Instantly share code, notes, and snippets.

View rebeccapeltz's full-sized avatar

Rebeccca Peltz rebeccapeltz

View GitHub Profile
require("dotenv").config();
const cloudinary = require("cloudinary").v2;
cloudinary.api
.create_streaming_profile("podcast_hd_h264", {
display_name: "Custom podcast h264",
representations: [
{
transformation: [
{
<!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>Transforms</title>
<style>
.bdr {

Web Development Certificate Alumni

The following individuals have successfully completed the Web Development Certificate at Seattle University. They are listed according to the quarter they completed.

Summer 2018

sstot = sum((credit$R1 - mean(credit$R1))^2)
totsse =0
accuracy = rep(0,nrow(credit))
r2 = 0
#cross validate nfold leave one out
for (i in 1:nrow(credit)){
# print(i)
model.svm = svm(R1 ~ ., data=credit[-i,])
pred.svm = sapply(predict(model.svm,credit[i,]),roundOff)
# print(paste("pred",pred.svm))
@rebeccapeltz
rebeccapeltz / webdev_alumni.md
Last active June 29, 2018 00:51 — forked from shawnr/webdev_alumni.md
Web Development Certificate Alumni

Web Development Certificate Alumni

The following individuals have successfully completed the Web Development Certificate at Seattle University. They are listed according to the quarter they completed.

Spring 2018

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
</head>
<body>
<script id="jsbin-javascript">
@rebeccapeltz
rebeccapeltz / genetic_reproduction.js
Created May 29, 2017 17:29
Genetic Algorithm Reproduction transcribed to JavaScript
GA.evolvePopulation = function (generation) {
var newGeneration = new Population(generation.populationSize(), false);
var elitismOffset = 0;
//keep best offsrping from past generation in first position if elitism is enabled
if (GA.elitism) {
newGeneration.saveTour(0, pop.getFittest());
elitismOffset = 1;
}
//choose parent and "mate" - create new offspring from current generation
for (var i = elitismOffset; i < newGeneration.populationSize(); i++) {
@rebeccapeltz
rebeccapeltz / trees.js
Created May 29, 2017 17:14
Implementing a Binary Search Tree with utility in JavaScript
'use strict';
//https://gist.github.com/alexhawkins/f993569424789f3be5db
//http: //stackoverflow.com/questions/1331289/javascript-binary-search-tree-implementation
function BinarySearchTree(value) {
this.value = value;
this.left = null;
this.right = null;
}
@rebeccapeltz
rebeccapeltz / stack.js
Created May 29, 2017 17:05
Implement a stack by wrapping a JavaScript array.
"use strict";
var Stack = function() {
this._arr = [];
this.top = null;
this.size = this._arr.length;
};
Stack.prototype.push = function(data) {
this._arr[this.size] = data;
this.size += 1;
@rebeccapeltz
rebeccapeltz / reverse.js
Created May 29, 2017 16:55
Reverse a string O(N) and O(N/2)
// O(N)
function(str) {
if (str.length < 2) return str;
return str.split('').reverse().join('');
}
// O(N/2)
function(str) {
var buffer = new Buffer(str);
for (var i=0;i< buffer.length/2; i++){