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
### Keybase proof | |
I hereby claim: | |
* I am logic-gate on github. | |
* I am mad_dev (https://keybase.io/mad_dev) on keybase. | |
* I have a public key whose fingerprint is 22F3 BEA2 7382 C170 8AA2 2FCE 73E6 908B DEB4 FEB3 | |
To claim this, I am signing this 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
#Simple example for using wtf-Flask's RECAPTCHA widget. | |
#APP.py | |
from flask import Flask, request, render_template | |
from flask.ext.wtf import Form | |
from flask.ext.wtf.recaptcha import RecaptchaField | |
from wtforms.fields import StringField | |
from wtforms.validators import DataRequired |
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
''' | |
redoxygen is a bulk sms gateway. https://www.redoxygen.net | |
Their developer's page lacks a python example...here it is. | |
''' | |
def sms(message, number): | |
url = 'http://www.redoxygen.net/sms.dll?Action=SendSMS&' | |
param = {} | |
param['AccountId'] = '' |
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 | |
# HabibLabReport.py V 0.1 - Habib LabReport CLI | |
# Copyright (C) <2014> mad_dev(A'mmer Almadani) | |
# | |
# Redistribution and use in source and binary forms, with or without | |
# modification, are permitted provided that the following conditions are met: | |
# * Redistributions of source code must retain the above copyright | |
# notice, this list of conditions and the following disclaimer. | |
# * Redistributions in binary form must reproduce the above copyright |
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 | |
import datetime | |
import urllib | |
import os | |
class REPORT(): | |
def cons(self): | |
date_now = datetime.datetime.now() | |
date = date_now.strftime("%Y_%m_%d") | |
time = date_now.strftime("%H:%M") |
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 python3 | |
import pifacedigitalio as pf | |
import time | |
import subprocess | |
import urllib | |
from xml.dom import minidom | |
def get_temp(cc): | |
##Thanks to http://stackoverflow.com/questions/16070885/python-yahoo-weather-xml-parse-works-with-2-7-1-but-not-2-6-1 |
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 python3 | |
import re | |
import subprocess | |
import pifacedigitalio as pio | |
import time | |
import datetime | |
def get_temp_from_system(): | |
temp = subprocess.check_output(['vcgencmd', 'measure_temp']) |
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
### Keybase proof | |
I hereby claim: | |
* I am Logic-gate on github. | |
* I am mad_dev (https://keybase.io/mad_dev) on keybase. | |
* I have a public key whose fingerprint is AE12 3A22 7CB2 35E3 7AB8 34C2 A6C5 335A C529 9679 | |
To claim this, I am signing this 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
https://dev.solus-project.com/T163 | |
Clone it -- https://github.com/meganz/MEGAsync | |
> git clone https://github.com/meganz/MEGAsync.git | |
> cd MEGAsync | |
> git submodule update --init --recursive | |
Get crypto++ | I think it's already in the repo (cryptopp-devel) if not: | |
> wget https://www.cryptopp.com/cryptopp563.zip #Tested on version 5.6.3 | |
> mkdir ~/crypto && cd ~/crypto && unzip ~/Downloads/cryptopp563.zip |
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 gspread | |
from oauth2client.service_account import ServiceAccountCredentials | |
class gHelper: | |
def __init__(self, json_creds): | |
self.scope = ['https://spreadsheets.google.com/feeds', | |
'https://www.googleapis.com/auth/drive'] | |
self.cred = ServiceAccountCredentials.from_json_keyfile_name( |
OlderNewer