This file contains hidden or 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
//COS2611 UNIQUE ASSIGNMENT 394025 | |
//QUESTION 1: | |
#include <iostream> | |
#include "CustomLinkedList.h" | |
using namespace std; | |
int main() { | |
unorderedLinkedList<char> name; |
This file contains hidden or 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
#include <boost/scoped_ptr.hpp> | |
#include <iostream> | |
#include <queue> | |
template<typename T> | |
class TreeNode { | |
public: | |
TreeNode(const T& n, TreeNode* left = NULL, TreeNode* right = NULL) | |
: mValue(n), | |
mLeft(left), |
This file contains hidden or 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
from logging.handlers import SMTPHandler | |
from boto.ses.connection import SESConnection | |
from auth import AWS_ACCESS_KEY,AWS_SECRET_ACCESS_KEY | |
class SESHandler(SMTPHandler): | |
""" Send's an email using BOTO SES. | |
""" | |
def emit(self,record): | |
conn = SESConnection(AWS_ACCESS_KEY,AWS_SECRET_ACCESS_KEY) | |
conn.send_email(self.fromaddr,self.subject,self.format(record),self.toaddrs) |
This file contains hidden or 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/python | |
from boto.rds import RDSConnection,DBSecurityGroup | |
from auth import AWS_ACCESS_KEY,AWS_SECRET_ACCESS_KEY | |
from getmyip import GetMyIP | |
#Opens access for an IP address to the server. | |
class RDS(): | |
def __init__(self,ip=None): | |
self.connection = RDSConnection(AWS_ACCESS_KEY,AWS_SECRET_ACCESS_KEY,validate_certs=False) | |
self.ip = ip |
This file contains hidden or 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/python | |
import mechanize | |
class GetMyIP(): | |
def __init__(self): | |
br = mechanize.Browser() | |
br.set_handle_equiv(True) | |
#br.set_handle_gzip(True) | |
br.set_handle_redirect(True) | |
br.set_handle_referer(True) |
This file contains hidden or 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/python | |
##Default Installer for Remote Servers | |
from fabric.api import env,local,run,sudo,put,cd,settings,lcd | |
from fabric.contrib.files import upload_template,exists | |
import os | |
env.user = 'fabricuser' | |
env.hosts = [""] |
This file contains hidden or 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
[program:{{module}}] | |
command =uwsgi --chdir=/code/{{module}} --logto=/var/log/{{module}}.uwsgi.log --module={{module}}.wsgi:application --env DJANGO_SETTINGS_MODULE={{module}}.settings --socket={{server}} --processes={{processes}} --uid={{uid}} --gid={{gid}} --harakiri={{harakiri}} --home={{home}} |
This file contains hidden or 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
server { | |
listen {{ports}}; | |
{% if ssl_secure %} | |
include ssl_secure; | |
{% endif %} | |
server_name {{url}}; | |
client_max_body_size 5G; |
This file contains hidden or 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
server { | |
listen {{ports}}; | |
{% if ssl_secure %} | |
include ssl_secure; | |
{% endif %} | |
server_name {{url}}; | |
client_max_body_size 5G; |
This file contains hidden or 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/python | |
#run: python S3UploadGit.py <full_repo> <s3_full_name> | |
from CREDENTIALS import AWS_ACCESS_KEY, AWS_SECRET_ACCESS_KEY | |
from boto.s3.connection import S3Connection | |
from boto.s3.key import Key | |
from fabric.context_managers import shell_env | |
from fabric.api import local,settings,lcd,prefix | |
import os |
OlderNewer