This list served quite some people but someone else did a better job since.
Go to https://github.com/umpirsky/country-list for a list in your language and format.
I've also compiled a list of nationalities
This list served quite some people but someone else did a better job since.
Go to https://github.com/umpirsky/country-list for a list in your language and format.
I've also compiled a list of nationalities
| # coding=utf8 | |
| import PIL | |
| from PIL import ImageFont | |
| from PIL import Image | |
| from PIL import ImageDraw | |
| def text2png(text, fullpath, color = "#000", bgcolor = "#FFF", fontfullpath = None, fontsize = 13, leftpadding = 3, rightpadding = 3, width = 200): | |
| REPLACEMENT_CHARACTER = u'\uFFFD' | |
| NEWLINE_REPLACEMENT_STRING = ' ' + REPLACEMENT_CHARACTER + ' ' |
| // | |
| // A minimal TCP client using the ZMQ API. This demonstrates a | |
| // useful mechanism for bridging a ZMQ based system out to other | |
| // TCP based systems. | |
| // | |
| #include "czmq.h" |
Run with Python:
pip-2.7 install cffi PYTHON=python2.7 sh go.sh
Run with PyPy:
pip-pypy install cffi PYTHON=pypy sh go.sh
| Basic example. The dialog is actually an activity with theme set to "@android:style/Theme.Dialog". Pressing the snooze button will trigger the dialog again after an amount of time. |
| # Copy of http://stackoverflow.com/a/20104705 | |
| from flask import Flask, render_template | |
| from flask_sockets import Sockets | |
| app = Flask(__name__) | |
| app.debug = True | |
| sockets = Sockets(app) | |
| @sockets.route('/echo') |
| from kivy.lang import Builder | |
| from kivy.uix.gridlayout import GridLayout | |
| from kivy.properties import DictProperty, NumericProperty, StringProperty, \ | |
| BooleanProperty, ObjectProperty | |
| from operator import itemgetter | |
| from kivy.uix.button import Button | |
| from kivy.uix.textinput import TextInput | |
| from kivy.uix.label import Label | |
| Builder.load_string(""" |
| # Inspired from http://coding4streetcred.com/blog/post/Asymmetric-Encryption-Revisited-(in-PyCrypto) | |
| # PyCrypto docs available at https://www.dlitz.net/software/pycrypto/api/2.6/ | |
| from Crypto import Random | |
| from Crypto.PublicKey import RSA | |
| import base64 | |
| def generate_keys(): | |
| # RSA modulus length must be a multiple of 256 and >= 1024 | |
| modulus_length = 256*4 # use larger value in production |
| # -*- coding: utf-8 -*- | |
| from flask import Flask, request, render_template, current_app | |
| from flask_wtf import Form | |
| from wtforms.validators import DataRequired | |
| from wtforms import SelectField, SelectMultipleField, SubmitField | |
| app = Flask(__name__) |