This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gi | |
gi.require_version('Gtk', '3.0') | |
from gi.repository import Gtk, GdkPixbuf, GLib | |
win = Gtk.Window() | |
win.connect("delete-event", Gtk.main_quit) | |
win.show_all() | |
theme = Gtk.IconTheme.get_default() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Run this in three different terminal windows (presumes download of NSQD): | |
# - rm *.dat && ./nsqd | |
# - ./raw_perf.py read | |
# - ./raw_perf.py write | |
# | |
from __future__ import print_function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
This is significantly derived from StackContext, Apache 2.0 license | |
''' | |
from tornado.stack_context import StackContextInconsistentError, _state | |
class ContextLocal(object): | |
''' | |
Implements a threadlocal-like mechanism that can be used to track data | |
across tornado asynchronous calls. This is very similar to (and based |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import shutil | |
import threading | |
import hal | |
import wpilib | |
import logging | |
logger = logging.getLogger('exposure_control') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python3 | |
import wpilib | |
from robotpy_ext.control import xbox_controller | |
import magicbot | |
class MyRobot(magicbot.MagicRobot): | |
def createObjects(self): | |
self.driveStick = xbox_controller.XboxController(0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import threading | |
import wpilib | |
class MyRobot(wpilib.SampleRobot): | |
def robotInit(self): | |
c = threading.Condition() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import collections | |
import time | |
import wpilib | |
class MyRobot(wpilib.IterativeRobot): | |
'''Main robot class''' | |
def robotInit(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.takari.incrementalbuild.spi; | |
import java.io.File; | |
import java.io.IOException; | |
import java.io.Serializable; | |
import java.util.ArrayList; | |
import java.util.Collection; | |
import java.util.Collections; | |
import java.util.HashSet; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package io.takari.incrementalbuild.spi; | |
import java.io.File; | |
import java.util.HashSet; | |
import javax.inject.Inject; | |
import javax.inject.Named; | |
import org.apache.maven.execution.scope.MojoExecutionScoped; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
PKG="$1" | |
SRPM=$(dnf download --source -v $PKG | tee /dev/stderr | grep -o '.*--> Package \:.*\:.*\.src\.rpm$' | rev | cut -f 1 -d' ' | rev | uniq) | |
rpm2cpio $SRPM | cpio -idmv |