Skip to content

Instantly share code, notes, and snippets.

View oatmealraisin's full-sized avatar

Ryan Murphy oatmealraisin

View GitHub Profile
#include <curl/multi.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/select.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <zlib.h>
#define MAX_WAIT_MSECS 30*1000 /* Wait max. 30 seconds */
[OSEv3:children]
masters
nodes
etcd
lb
[OSEv3:vars]
# General Ansible options
PLAY [Initialization Checkpoint Start] ***************************************************************************************************************************************
TASK [Set install initialization 'In Progress'] ******************************************************************************************************************************
Thursday 05 July 2018 18:54:09 +0000 (0:00:00.096) 0:00:00.096 *********
ok: [master-1.compute-1.amazonaws.com]
PLAY [Populate config host groups] *******************************************************************************************************************************************
TASK [Load group name mapping variables] *************************************************************************************************************************************
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/select.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <zlib.h>
#define CHUNK 16384
##############################
# ~/.config/neomutt/neomuttrc
##############################
set wait_key = no # shut up, mutt
set header_cache = ~/.cache/neomutt
set timeout = 3 # idle time before scanning
set mail_check = 0 # minimum time between scans
set sleep_time = 0
set mail_check_stats
mkdir test
cd test
python -m virtualenv venv
source venv/bin/activate
pip install pyspark -t python
zip -9 pyspark.zip -r python/
# upload file to s3
aws lambda publish-layer-version --layer-name bacrey-ml-pyspark --content 'S3Bucket=my-bucket,S3Key=pyspark.zip' --debug --profile my_profile
[Default Applications]
x-scheme-handler/http=firefox.desktop
x-scheme-handler/https=firefox.desktop
x-scheme-handler/ftp=firefox.desktop
x-scheme-handler/chrome=firefox.desktop
text/html=firefox.desktop
text/xml=firefox.desktop;org.qutebrowser.qutebrowser.desktop;
application/x-extension-htm=firefox.desktop
application/x-extension-html=firefox.desktop
application/x-extension-shtml=firefox.desktop

Plutus Bank API

'/register': Provides API functionality for registering user credentials and gesture data with the Bank API and the Gesture API. '/auth': Provides functionality for authenticating a user, either with username and password, or username and gesture data. After successful authentications, returns a token inside a JSON response which can be used to authenticate further interactions with the Bank API. '/reset': Provides functionality for reseting a password in the Bank and Gesture APIs. '/clear': Provides functionality for clearing a user record and gesture data stored by the Gesture API. '/helloworld/': Provides a helloworld endpoint which requires a token to authenticate, returning some sample response.

Installation

[centos@ip-172-31-42-182 plutus-bank-api]$ python bank_api.py
File "bank_api.py", line 39
log.debug(f"{time.strftime(ftime)}:Time to connect to Postgres: {ctime}")
^
SyntaxError: invalid syntax
ERROR:bank_api:Exception on /auth [POST]
Traceback (most recent call last):
File "/usr/local/bank/venv/lib/python3.6/site-packages/flask/app.py", line 2446, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/bank/venv/lib/python3.6/site-packages/flask/app.py", line 1951, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/bank/venv/lib/python3.6/site-packages/flask/app.py", line 1820, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/usr/local/bank/venv/lib/python3.6/site-packages/flask/_compat.py", line 39, in reraise
raise value