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
public class Simple_Mock{ | |
class Mission{ | |
public Mission(){ | |
} | |
public void complete(int arg){ | |
// code | |
} | |
public boolean isComplete(){ | |
//code | |
return false; |
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
ar = [[-1 for i in range (5)] for j in range (10)] # this means creating an array with 5 cols and 10 rows | |
ar[9][4] #this would result in -1, means the 10th row, 5th col, i.e. the right-bottom corner of the array | |
ar[4][9] | |
len(ar) #number of rows | |
len(ar[0]) #number of cols |
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
# this is a simplified version of seeing how to upload | |
# referencing from https://gist.github.com/teasherm/bb73f21ed2f3b46bc1c2ca48ec2c1cf5 | |
import boto3 | |
import os | |
from boto3.s3.transfer import TransferConfig | |
def upload_to_s3(filename, path): | |
bucket_name = 'BUCKET_name' #should be a bucket name | |
s3 = boto3.client('s3') |
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
def download(filename, path): | |
s3.download_file(bucket_name, filename, path+filename) # the path is where you want to put you documents |