This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import threading | |
import time | |
try: | |
from RPi import GPIO | |
except ImportError: | |
from minimock import Mock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import threading | |
import time | |
import math | |
from pwm_led import PWMLed | |
try: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<meta charset="utf-8"> | |
<script> | |
function logging(message) { | |
// console.log(message); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
#import <CommonCrypto/CommonCryptor.h> | |
@interface AES128ECBCipher : NSObject | |
- (AES128ECBCipher *)initWithKey:(NSString *)key; | |
#pragma mark - encryption |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
""" | |
Update version string in Info.plist on iOS project. | |
""" | |
from __future__ import print_function | |
import re | |
INFO_PLIST_PATH = 'project/project-Info.plist' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@staticmethod | |
def iter_chunk(iter, chunk_size): | |
pool = [] | |
for index, item in enumerate(iter, start=1): | |
pool.append(item) | |
if index % chunk_size == 0: | |
yield pool | |
pool = [] | |
if pool: | |
yield pool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
class AppleReceiptVerifyStatusError(Exception): | |
pass | |
class AppleReceipt(object): | |
@staticmethod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import time | |
import RPi.GPIO as GPIO | |
GPIO.setmode(GPIO.BOARD) | |
GPIO.setup(12, GPIO.OUT) | |
p = GPIO.PWM(12, 50) # channel=12 frequency=50Hz | |
p.start(0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import textwrap | |
import base64 | |
from Crypto.Signature import PKCS1_v1_5 | |
from Crypto.Hash import SHA | |
from Crypto.PublicKey import RSA | |
class GooglePlayReceiptValidator(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import threading | |
try: | |
from django.utils.functional import cached_property | |
except ImportError: | |
cached_property = property |
OlderNewer