(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| #!/usr/bin/env python | |
| """Simple HTTP Server With Upload. | |
| This module builds on BaseHTTPServer by implementing the standard GET | |
| and HEAD requests in a fairly straightforward manner. | |
| """ |
| from ctypes import * | |
| from ctypes.wintypes import * | |
| WNDPROCTYPE = WINFUNCTYPE(c_int, HWND, c_uint, WPARAM, LPARAM) | |
| WS_EX_APPWINDOW = 0x40000 | |
| WS_OVERLAPPEDWINDOW = 0xcf0000 | |
| WS_CAPTION = 0xc00000 |
| #!/usr/bin/python | |
| #-*- coding=utf-8 -*- | |
| """用于和地理信息有关的数据处理 | |
| """ | |
| __author__ = ['"wuyadong" <[email protected]>'] | |
| import math |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
By: @BTroncone
Also check out my lesson @ngrx/store in 10 minutes on egghead.io!
Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!
Table of Contents
| from django.db import models | |
| class Member(models.Model): | |
| # RE: null vs blank | |
| # | |
| # NULL https://docs.djangoproject.com/en/1.10/ref/models/fields/#null | |
| # Avoid using null on string-based fields such as CharField and TextField because | |
| # empty string values will always be stored as empty strings, not as NULL. | |
| # |
| import emoji | |
| import schedule | |
| import asyncio | |
| import inspect | |
| from datetime import datetime | |
| class Job(schedule.Job): |
Instructions tested with a Raspberry Pi 2 with an 8GB memory card. Probably also works fine on a Raspberry Pi 3.
Download the latest Raspbian Jessie Light image. Earlier versions of Raspbian won't work.
Write it to a memory card using Etcher, put the memory card in the RPi and boot it up.
| """ | |
| RSA Sign a Message using a private key | |
| Just turns this example into a script: | |
| https://cryptography.io/en/latest/hazmat/primitives/asymmetric/rsa/#signing | |
| """ | |
| import sys | |
| import hashlib | |
| import base64 |
| from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator | |
| # First we create a little helper function, becase we will potentially have many PaginatedTypes | |
| # and we will potentially want to turn many querysets into paginated results: | |
| def get_paginator(qs, page_size, page, paginated_type, **kwargs): | |
| p = Paginator(qs, page_size) | |
| try: | |
| page_obj = p.page(page) | |
| except PageNotAnInteger: |