Skip to content

Instantly share code, notes, and snippets.

View magcius's full-sized avatar
🐬
it's a dAmN cOld NiGhT tryin 2 figure out this life

Jasper St. Pierre magcius

🐬
it's a dAmN cOld NiGhT tryin 2 figure out this life
View GitHub Profile
#include <glib.h>
typedef struct {
GSList *stack;
} MachineState;
static void machine_push (MachineState *state, int v);
static int machine_pop (MachineState *state);
/* pushes an operand onto the operand stack */
class ReplaceMetadataTest(BasicUserTestCase, TestCase):
def test_replace_metadata(self):
test_zipfile = get_test_zipfile('LotsOfFiles')
metadata = models.parse_zipfile_metadata(test_zipfile)
test_zipfile.seek(0)
new_path = default_storage.save('LotsOfFiles.zip', File(test_zipfile))
test_zipfile.close()
import collections
import math
import operator
import re
import string
VALID_ID = re.compile('[a-zA-Z$_][a-zA-Z0-9$_]*$')
BASIC_TOKENS = [
import collections
import math
import operator
import re
import string
VALID_ID = re.compile('[a-zA-Z$_][a-zA-Z0-9$_]*$')
BASIC_TOKENS = [
import ast
import math
import operator
OPERS = {
ast.Add: operator.add,
ast.Sub: operator.sub,
ast.Mult: operator.mul,
ast.Div: operator.div,
summary for asctest.abc, 178.0 bytes
constants:
ints:
ints[0] = 0
uints:
uints[0] = 0
doubles:
doubles[0] = nan
utf8:
utf8[0] = ''
"use strict";
define(['jquery'], function($) {
// Each table row has four columns:
// ===================================================================
// | Old Line Number | Old Contents | New Line Number | New Contents |
//
// Each "buildChunk" function below should build full row(s).
#include <gtk/gtk.h>
int
main(int argc, char* argv[]) {
GtkWidget *window;
cairo_region_t *input_region;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
// application/javascript;version=1.8
const Lang = imports.lang;
const GLib = imports.gi.GLib;
const GObject = imports.gi.GObject;
const Clutter = imports.gi.Clutter;
const Cogl = imports.gi.Cogl;
Clutter.init(null);
// A container like StBin, but taking the child's scale into account
// when requesting a size
const DashItemContainer = new Lang.Class({
Name: 'DashItemContainer',
Extends: St.Container,
_init: function() {
this.parent({ style_class: 'dash-item-container' });
this._delegate = this;