Skip to content

Instantly share code, notes, and snippets.

View eagleEggs's full-sized avatar
🍦

eagleEggs

🍦
  • Washington, DC
View GitHub Profile
hinge joint > bone > mesh
var go = GameObject.CreatePrimitive(PrimitiveType.Quad);
Color mesh = go.GetComponent<Renderer>().material.color = cs;
go.AddComponent<pixelSurrogate_hatch>();
go.transform.position = new Vector3(n, nn, 0);
@eagleEggs
eagleEggs / plotly_offline_graph_cli
Last active August 11, 2018 02:42
plotly offline graph from command line
Setting up the following will enable running a notebook from CLI and create a plotly image from the generated graph:
CLI:
sudo jupyter nbconvert --execute notebook.ipynb
Python:
At top of notebook: offline.init_notebook_mode()
After defining data and figure:
offline.iplot(fig, filename='graph', image='png')
@eagleEggs
eagleEggs / topangaGUI
Last active September 27, 2018 04:14
PySimpleGUI Code
import matplotlib
matplotlib.use('TkAgg')
import matplotlib as mpl
import matplotlib.pyplot as plt
import pandas as pd
import pylab
import seaborn as sns
from pandas.plotting import scatter_matrix
import numpy as np
from matplotlib.ticker import NullFormatter
@eagleEggs
eagleEggs / example fix dual Window
Created September 27, 2018 04:42
plot PySimpleGUI
import PySimpleGUI as sg
import matplotlib
matplotlib.use('TkAgg')
from matplotlib.backends.backend_tkagg import FigureCanvasAgg
import matplotlib.backends.tkagg as tkagg
import tkinter as Tk
"""
Demonstrates one way of embedding Matplotlib figures into a PySimpleGUI window.
Basic steps are:
@eagleEggs
eagleEggs / Dynamically Update Columns
Created September 30, 2018 03:12
Dynamically Update Columns
for image in fnames:
filename = os.path.join(folder, image)
image_elem = sg.Image(data = get_img_data(filename, first = True))
col5 = [[sg.ReadButton("Generate")],[sg.T("")],
[image_elem]]
@eagleEggs
eagleEggs / PSG
Created October 3, 2018 01:50
Progress Bar Issue - PSG
colm = [[sg.T("", background_color = "#282923")],[sg.T('Topanga ∩(^-^)∩ Test Anatomy', text_color = "#666463", background_color = "#282923", justification = "center"),
sg.ReadButton("Create a Topanga", border_width=0), sg.ReadButton("Open Project Folder", border_width=0), sg.ReadButton("Load", border_width=0), sg.ReadButton("Save", border_width=0),sg.ReadButton("Quit", border_width=0)],
[sg.T("")],
[sg.ProgressBar(10, orientation='h', size=(65,20), key='progress')],
[sg.ProgressBar(10, orientation='h', size=(65,10), key='progress2', bar_color=("#56D8EF", "#56D8EF"))],
[sg.T("", key = "step_status", background_color = "#282923", text_color = "#666463")]]
LookAndFeel():
@eagleEggs
eagleEggs / tabGroup
Created October 3, 2018 05:26
tabGroup
layout = [[sg.TabGroup([[
sg.Tab('General Settings', tab1, title_color = "#282923", background_color = "#282923"),
sg.Tab('Database Settings', tab2, title_color = "#282923", background_color = "#282923"),
sg.Tab('Custom App Settings', tab3, title_color = "#282923", background_color = "#282923"),
sg.Tab('Graphing', tab4, title_color = "#282923", background_color = "#282923"),
sg.Tab('Site Data', tab10, title_color = "#282923", background_color = "#282923"),
sg.Tab('Scratchboard', tab11, border_width =0, title_color = "#282923", background_color = "#282923"),
sg.Tab('Screenshots', tab5, title_color = "#282923", background_color = "#282923"),
sg.Tab('Reporting', tab6, title_color = "#282923", background_color = "#282923"),
sg.Tab('Logging', tab7, title_color = "#282923", background_color = "#282923"),
@eagleEggs
eagleEggs / PSG
Created October 3, 2018 06:14
Full Layout PSG
Commented below:
@eagleEggs
eagleEggs / Main Loop - TA
Last active November 18, 2018 00:35
Main Loop - TA
# REDESIGN 11/12/18
# MAIN: Three images across row
maindisplay = [[sg.T("")],[sg.Button(image_filename = "main_config.png", key = "config"), sg.Button(image_filename = "main_build.png", key = "build"), sg.Button(image_filename = "main_test.png", key = "test")],
[sg.ReadButton('', image_filename="license.png", key = "license"), sg.T("", size=(37,1)), sg.ReadButton('', image_filename = "exit.png", key = "exit")]]
layout = [[sg.Column(maindisplay)]]
##########################
### GUI VARS ###