Skip to content

Instantly share code, notes, and snippets.

View eventures-io's full-sized avatar

Peter Symoens eventures-io

View GitHub Profile
@eventures-io
eventures-io / vectorized_logistic_regression.py
Created December 12, 2022 12:00 — forked from akashjaswal/vectorized_logistic_regression.py
Vectorized Implementation of Logistic Regression using Numpy
'''
Logistic Regression - Vectorized Implementation w/ Numpy
Setup:
- features X = Feature Vector of shape (m, n) [Could append bias term to feature matrix with ones(m, 1)]
- Target y = discrete variable - shape (m, 1) (Consider Binary for now)
- Weights = Weight matrix of shape (n, 1) - initialize with zeros
- Standardize features to have zero mean and unit variance.
Gradient Descent Algorithm:
let positionData = [
{
'type': 'Feature',
'geometry': {
'type': 'Point',
'coordinates': [-55, 39]
},
'properties': {
'icon': {
'iconUrl': 'assets/images/ship-icon.svg',
@eventures-io
eventures-io / ArrayExercise.js
Created May 15, 2016 14:57 — forked from SteveBate/ArrayExercise.js
Exercise testing the various Javascript Array methods but particularly the functional methods available
// set up arrays
var numbers = [1,12,4,18,9,7,11,3,101,5,6];
var strings = ['this','is','a','collection','of','words'];
// array.reduce - find largest number
var largestValue = numbers.reduce(function(x,y){ return x > y ? x : y });
console.log('largest number: ' + largestValue);
// array.reduce - find longest string
@eventures-io
eventures-io / app.ts
Created February 10, 2016 13:09
User component
import {Component} from 'angular2/core';
import {RouteConfig, Router, ROUTER_DIRECTIVES} from 'angular2/router';
import {FORM_PROVIDERS} from 'angular2/common';
import {Home} from './home/home';
import {UserList} from './user/user-list';
import {UserComponent} from './user/user-component';
import {NotificationCenter} from './common/notification-center/notification-center';
import {NotificationService} from './common/notification-center/notification-service';
import {HttpClient} from './common/http-client';
import {Component} from 'angular2/core';
import {RouteConfig, Router, ROUTER_DIRECTIVES} from 'angular2/router';
import {FORM_PROVIDERS} from 'angular2/common';
import {Home} from './home/home';
import {UserList} from './user/user-list';
import {UserComponent} from './user/user-component';
import {NotificationCenter} from './common/notification-center/notification-center';
import {NotificationService} from './common/notification-center/notification-service';
import {HttpClient} from './common/http-client';

Organic Button

Elastic button, has pounding hearth for loading animation, will burst into ready state once done.

A Pen by Rik Schennink on CodePen.

License.

@eventures-io
eventures-io / gist:a1ca0e4b392f03abef3d
Created August 14, 2015 20:48
Amazon ec2 container log file
[ 0.000000] Initializing cgroup subsys cpuset
[ 0.000000] Initializing cgroup subsys cpu
[ 0.000000] Initializing cgroup subsys cpuacct
[ 0.000000] Linux version 3.14.35-28.38.amzn1.x86_64 (mockbuild@gobi-build-64012) (gcc version 4.8.2 20140120 (Red Hat 4.8.2-16) (GCC) ) #1 SMP Wed Mar 11 22:50:37 UTC 2015
[ 0.000000] Command line: root=LABEL=/ console=ttyS0
[ 0.000000] e820: BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009dfff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009e000-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000003fffffff] usable
/**
* Interceptor
* Implements functionality to catch various requests and fire events when they happen. This is generally to ensure
* that responses from the server are handled in a uniform fashion across the application. Also, by firing events
* it allows to have any number of handlers attach to the response.
*
* @author Kirk Bushell
* @date 28th March 2013
*/
var module = angular.module('core.interceptor', []);