Skip to content

Instantly share code, notes, and snippets.

View rickybassom's full-sized avatar

Ricky Bassom rickybassom

View GitHub Profile
@rickybassom
rickybassom / gmn_data_analysis_template.ipynb
Last active April 21, 2023 22:15
gmn_data_analysis_template.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rickybassom
rickybassom / main.vala
Last active October 23, 2021 19:00
Simple Gtk.Application example in vala
public class Application : Gtk.Application {
public Application () {
Object(application_id: "my.application",
flags: ApplicationFlags.FLAGS_NONE);
}
protected override void activate () {
// create the window of this application and show it
Gtk.ApplicationWindow window = new Gtk.ApplicationWindow (this);
@rickybassom
rickybassom / index.html
Last active June 27, 2020 01:49
Demonstrating how to communicate to and from GTK Webkit
<html>
<head></head>
<body>
<h1>This is a webpage that can receive and send data to the native UI (GTK)</h1>
<br>
<input class="text" onkeyup="document.title = this.value" onkeydown="document.title = this.value"></input><label>Type in here to change the native gui text</label>
<h3 class="count"> - </h3>
<div class="color" style="width: 100px; height: 100px; background-color: red;"></div>
<p>Vala, GTK, Webkit, Javascript</p>
</body>
@rickybassom
rickybassom / main.vala
Last active September 5, 2017 15:36
Simple Gtk3 Webkit Example (Vala)
using GLib;
using Gtk;
using WebKit;
public class Browser : Window {
private const string URL = "http://google.com";
public Browser() {
this.window_position = WindowPosition.CENTER;
@rickybassom
rickybassom / GtkCssEx.py
Last active October 21, 2015 16:27
Styling Gtk Windows with CSS (Python)
# https://developer.gnome.org/gtk3/3.6/GtkCssProvider.html
self.win.set_name('MyWindow')
self.button.set_name("Test")
self.style_provider = Gtk.CssProvider()
css = open('/path/to/your/style.css'), 'rb') # rb needed for python 3 support
css_data = css.read()
css.close()
@rickybassom
rickybassom / LeapMotion.py
Last active October 21, 2015 16:28
Leap Motion (Python)
import Leap, sys
class LeapMotionListener(Leap.Listener):
finger_names = ["Thumb", "Index", "Middle", "Ring", "Pinky"]
bone_name = ["Metacarpal", "Proximal", "Intermediate", "Distal"]
state_names = ["STATE_INVALID", "STATE_START", "STATE_UPDATE", "STATE_END"]
def on_init(self, controller):
print("Int")