View download_and_upload_to_s3.py
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_and_upload_to_s3(request_url, s3_file_key): | |
manager = urllib3.PoolManager() | |
try: | |
response = manager.request('GET', request_url) | |
except (NewConnectionError, MaxRetryError): | |
return False | |
s3_client = boto3.client('s3') | |
try: | |
s3_client.put_object( |
View add.test.js
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
// test/arithmetic/add.test.js | |
import { add } from '../../src'; | |
test('Two integers should get added up', () => { | |
expect(add(2, 3)).toBe(5); | |
expect(add(-1, 0)).toBe(-1); | |
}); |
View add.js
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
// src/arithmetic/add.js | |
import add from 'lodash/add'; | |
export default (augend, addend) => add(augend, addend); |