Skip to content

Instantly share code, notes, and snippets.

@pepjo
pepjo / AutoComplete.jsx
Created February 12, 2017 13:20
material-ui 's AutoComplete element with working open and defaultOpen
import React, { Component, PropTypes } from 'react'
import ReactDOM from 'react-dom'
import keycode from 'keycode'
import TextField from 'material-ui/TextField'
import Menu from 'material-ui/Menu'
import MenuItem from 'material-ui/MenuItem'
import Divider from 'material-ui/Divider'
import Popover from 'material-ui/Popover/Popover'
import propTypes from 'material-ui/utils/propTypes'
@MelleB
MelleB / Kivy Aligned TextInput
Last active February 2, 2021 11:34
Kivy Aligned Text Input - halign + valign for TextInput
Note: This just aligns the position of the textblock, not the text itself.
@tshirtman
tshirtman / test_rounded.py
Created September 6, 2013 15:44
Rounded rectangle implementation, this is a widget, should probably be converted to a canvas instruction
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.widget import Widget
from kivy.properties import NumericProperty, ListProperty
from math import sin, cos, pi
kv = '''
BoxLayout:
FloatLayout:
RoundedBox:
@tito
tito / main.py
Created August 7, 2013 15:54
Kivy + Facebook SDK on Android
'''
Kivy + Facebook SDK
===================
This example works only on Android.
Create debug hash key (default debug key password is `android`)::
keytool -exportcert -alias androiddebugkey -keystore \
~/.android/debug.keystore | openssl sha1 -binary | openssl base64
@tshirtman
tshirtman / main.py
Created December 15, 2012 20:47
BorderImage example, pure python and kv.
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.uix.button import Button
from kivy.graphics import BorderImage
class MyApp(App):
def build(self):
root = Widget()
b = Button(center=(200, 200))
@jrivero
jrivero / csv_splitter.py
Created July 15, 2011 20:33 — forked from palewire/csv_splitter.py
A Python CSV splitter
import os
def split(filehandler, delimiter=',', row_limit=10000,
output_name_template='output_%s.csv', output_path='.', keep_headers=True):
"""
Splits a CSV file into multiple pieces.
A quick bastardization of the Python CSV library.
Arguments: