Skip to content

Instantly share code, notes, and snippets.

import 'package:flutter/material.dart';
void main() => runApp(
MaterialApp(
home: Scaffold(
appBar: AppBar(
title: Text('AppBar Title'),
centerTitle: true,
),
body: Center(
@kn0ch3n
kn0ch3n / flutter_example.dart
Created June 22, 2018 17:32
Flutter example
class CounterState extends State<Counter> {
int counter = 0;
void increment() {
// Tells the Flutter framework that state has changed,
// so the framework can run build() and update the display.
setState(() {
counter++;
});
}
@kn0ch3n
kn0ch3n / day_4.py
Created December 6, 2016 16:32
itertools.groupby basics
from itertools import groupby
data = 'abcdaba'
for k, g in groupby(sorted(data)):
print(k, len(list(g)))
{
"metadata": {
"name": "",
"signature": "sha256:3889b568d4c64c981644c595418fd02cb1cef5f6f0b20c4279a9d722fb0542f7"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@kn0ch3n
kn0ch3n / designer.html
Created November 18, 2014 12:41
designer
<link rel="import" href="../topeka-elements/theme.html">
<link rel="import" href="../topeka-elements/topeka-resources.html">
<link rel="import" href="../topeka-elements/topeka-app.html">
<link rel="import" href="../topeka-elements/topeka-datasource.html">
<polymer-element name="my-element">
<template>
<style>
:host {