Skip to content

Instantly share code, notes, and snippets.

View kpfromer's full-sized avatar
🏠
Working from home

Kyle Pfromer kpfromer

🏠
Working from home
View GitHub Profile
@kpfromer
kpfromer / calender.py
Last active August 29, 2015 14:27
School Calendar Program
# coding: utf-8
import ui, datetime, os, operator, notification, time
def createnotification(message, month, day, hour, minute):
shortt = str(datetime.datetime.now()).split()[1].split(':')
ct = (int(str(datetime.datetime.now().timetuple().tm_yday))*24*60*60) + (int(shortt[0])*60*60) + (int(shortt[1])*60) + float(shortt[2])
dt = (datetime.datetime(year=int(str(datetime.datetime.now().year)),month=month,day=day).timetuple().tm_yday*24*60*60)+hour*60*60+minute*60
print(dt-ct)
notification.schedule(message,dt-ct,'Clock_2')
@kpfromer
kpfromer / rPi3-ap-setup.sh
Created September 3, 2018 16:46 — forked from Lewiscowles1986/rPi3-ap-setup.sh
Raspberry Pi 3 access-point-setup
#!/bin/bash
#
# This version uses September 2017 august stretch image, please use this image
#
if [ "$EUID" -ne 0 ]
then echo "Must be root"
exit
fi

Zip excluding specific directories

Exclude .git file and node_modules directory

$ zip -r9 [target_file] [source_file] -x *.git* node_modules/\*

Exclude .git file and files in node_modules directory, but keep node_modules directory

$ zip -r9 [target_file] [source_file] -x *.git* node_modules/**\*
source /usr/share/zsh/scripts/zplug/init.zsh
alias ls='lsd'
export EDITOR=vim
# load the good parts from oh-my-zsh
zplug "lib/completion", from:oh-my-zsh
zplug "lib/git", from:oh-my-zsh
zplug "lib/history", from:oh-my-zsh
zplug "lib/key-bindings", from:oh-my-zsh
set nocompatible "I don't necessarily need Vim to be compatible with Vi
filetype off "Allow for plugins
scriptencoding utf-8
set encoding=utf-8 "Read files as UTF8
set fileencoding=utf-8 "Write new files as UTF8
set tabstop=4 "Tabs should appear to be 4 spaces wide
set softtabstop=4 "When deleting indenting spaces, delete 4 spaces/1 tab at a time
set shiftwidth=4 "Indents should be a tab
interface ParameterBase {
parameter: string;
}
type Parameter = ParameterBase &
({
floatValue: number;
})
| {
intValue: Number;
import { AsyncState } from './async_slice';
import { ServerProxyTransportService } from '../service/transport';
import { createSlice, createAsyncThunk } from '@reduxjs/toolkit';
// TODO: use from Jun's changes
export interface Trial {
name: string;
}
export interface Study {
const MockSidebar = () => <>Mock Sidebar</>;
jest.mock('react-redux', () => ({
connect: (mapStateToProps: any) => (component: any) => MockSidebar,
Provider: ({ store, children }: any) => children,
}));
jest.mock('@material-ui/core');
jest.mock('../store/view');
import * as React from 'react';
import { mount, shallow } from 'enzyme';
import { SidebarWidget, Sidebar } from './sidebar_widget';
import * as React from 'react';
import { ReactWidget } from '@jupyterlab/apputils';
import { store, AppDispatch } from '../store/store';
import { Provider, connect } from 'react-redux';
import { close, ViewType, setView } from '../store/view';
// import { Dashboard } from './dashboard';
const mapDispatchToProps = (dispatch: AppDispatch) => ({
setView: (view: ViewType) => dispatch(setView(view)),
close: () => dispatch(close()),
#!/bin/sh
# Cleanup
pipenv --rm
rm node_modules jupyterlab_caip_optimizer/node_modules -rf
# Install packages
npm install
npm run bootstrap
pipenv install