- Python 3
- Pip 3
$ brew install python3| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
Picking the right architecture = Picking the right battles + Managing trade-offs
| " copy all this into a vim buffer, save it, then... | |
| " source the file by typing :so % | |
| " Now the vim buffer acts like a specialized application for mastering vim | |
| " There are two queues, Study and Known. Depending how confident you feel | |
| " about the item you are currently learning, you can move it down several | |
| " positions, all the way to the end of the Study queue, or to the Known | |
| " queue. | |
| " type ,, (that's comma comma) |
| --- | |
| # This has been tested with ansible 1.3 with these commands: | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=false" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts isFirstRun=true" | |
| # ansible-playbook -i hosts ansible_conditionals_examples.yaml --extra-vars="hosts=myhosts" | |
| # NB: The type of the variable is crucial! | |
| - name: Ansible Conditionals Examples | |
| hosts: $hosts | |
| vars_files: |
This documentation aims at being a quick-straight-to-the-point-hands-on AWS resources manipulation with [boto3][0].
First of all, you'll need to install [boto3][0]. Installing it along with [awscli][1] is probably a good idea as
| { | |
| "AWSTemplateFormatVersion" : "2010-09-09", | |
| "Description" : "Builds a VPC w/ INET Gateway and 3 public subnets. **WARNING** This template creates Amazon EC2 instance(s). You will be billed for the AWS resources used if you create a stack from this template.", | |
| "Resources" : { | |
| "VPC" : { | |
| "Type" : "AWS::EC2::VPC", | |
| "Properties" : { |
| repo = '%s-tools' % node['lsb']['codename'] | |
| apt_repository 'scalyr-agent-2' do | |
| uri 'http://10.100.0.xx/repo/snapshots' | |
| arch 'amd64' | |
| distribution repo | |
| components [repo] | |
| key 'http://10.100.0.xx/repo/bjn.gpg' | |
| end | |
| package 'scalyr-agent-2' do |
| #include<cmath> | |
| #include<iostream> | |
| #include<climits> | |
| using namespace std; | |
| int Maximum_Sum_Subarray(int arr[],int n) //Overall Time Complexity O(n) | |
| { | |
| int ans = A[0],sum = 0; | |
| for(int i = 1;i < n; ++i) //Check if all are negative | |
| ans = max(ans,arr[i]); |