Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View scj7t4's full-sized avatar

Stephen Jackson scj7t4

  • Albuquerque, NM
View GitHub Profile
import holoviews as hv
from bokeh.models import CheckboxGroup
from bokeh.sampledata.stocks import AAPL, GOOG
from holoviews import opts
from holoviews.plotting.links import RangeToolLink
import pandas as pd
from holoviews.streams import Stream
hv.extension('bokeh')
@scj7t4
scj7t4 / stock_shower.py
Last active February 7, 2020 20:14
Trying to make it so I can choose stocks with a dynamic map
import holoviews as hv
from bokeh.models import CheckboxGroup
from bokeh.sampledata.stocks import AAPL, GOOG
from holoviews import opts
from holoviews.plotting.links import RangeToolLink
import pandas as pd
from holoviews.streams import Stream
hv.extension('bokeh')
@scj7t4
scj7t4 / gist:8e083741402d905f6139
Created December 5, 2014 16:07
Brackets Operator
class Pair
{
private:
int m_val1;
int m_val2;
public:
int operator[](int index) const;
};
int Pair::operator[](int index) const
@scj7t4
scj7t4 / gist:47f5276a2b907be5d6df
Created November 6, 2014 14:56
Extreme Sorting
#include <algorithm>
#include <vector>
#include <cmath>
#include <iostream>
using namespace std;
template<typename T>
class dsort
{
// Programmer: Jennifer Leopold date: September 17, 2014
// File: hw4.cpp
// Purpose: Simulate a vending machine that dispenses
// medications.
//
// To compile: fg++ hw4.cpp -o hw4
//
// To execute: ./hw4
#include <iostream>
#include<iostream>
using namespace std;
template <class T>
class StaticThing
{
public:
StaticThing()
{
f = open(file)
contents = f.readlines()
while len(contents):
line = contents.pop(0)
#Then if you need to read another line:
#but you'd need to test to make sure the next line is there?
if len(contents) > 0:
line = contents.pop(0)
@scj7t4
scj7t4 / LoadBalancePrototype.cpp
Created July 9, 2013 21:13
Load Balancing Prototype
class LBAgentBase
{
public:
// USER OVERLOADED FUNCTIONS
// USER OVERLOADABLE FUNCTIONS
void Init(); /// Called in run, sets any persistent user defined values like collected devices
void DetermineState(); /// Function which computes the state based on the current normal.
SignalValue ComputeNormal(vector uuid devicetype valuetype value); /// Using the collected state, compute normal.
SignalValue ComputeGateway(device state); /// Given the current state of local devices, compute & return agg
/// gateway.
Hello World
# Supervisord auto-start
#
# description: Auto-starts supervisord
# processname: supervisord
# pidfile: /var/run/supervisord.pid
SUPERVISORD=/usr/bin/supervisord
SUPERVISORCTL=/usr/bin/supervisorctl
case $1 in