Here is a sample multi-provider Vagrantfile that can use either VirtualBox or Docker as a provider with vagrant:
$touch Vagrantfile
#Copy and paste Vagrantfile into newly created file
- repo: https://github.com/pre-commit/pre-commit-hooks | |
rev: v1.2.3 | |
hooks: | |
- id: trailing-whitespace | |
exclude: (\.css$|\.html$) | |
- id: check-merge-conflict | |
- id: debug-statements | |
- id: flake8 | |
args: [--max-line-length=131, --ignore=W503] | |
exclude: (.*/migrations/.*|.*/data/.*|.*/settings/.*)$ |
Note: This was written using elasticsearch 0.9.
Elasticsearch will automatically create an index (with basic settings and mappings) for you if you post a first document:
$ curl -X POST 'http://localhost:9200/thegame/weapons/1' -d \
'{
"_id": 1,
/* Useful celery config. | |
app = Celery('tasks', | |
broker='redis://localhost:6379', | |
backend='redis://localhost:6379') | |
app.conf.update( | |
CELERY_TASK_RESULT_EXPIRES=3600, | |
CELERY_QUEUES=( | |
Queue('default', routing_key='tasks.#'), |
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 |
running 2429 tests | |
.................................................................................................... | |
.................................................................................................... | |
.................................................................................................... | |
.................................................................................................... | |
..........................................................................i......................... | |
...................................ii..iii.......................................................... | |
...................................................................i................................ | |
.............i...................................................................................... |
error: internal compiler error: librustc_mir/transform/elaborate_drops.rs:375: drop of untracked, uninitialized value bb8, place ((*_3).0: core::option::Option<T>) (Parent(Some(mp3))) | |
--> libstd/sync/mpsc/spsc_queue.rs:139:13 | |
| | |
139 | (*n).value = Some(t); | |
| ^^^^^^^^^^ | |
thread 'main' panicked at 'Box<Any>', librustc_errors/lib.rs:499:9 | |
stack backtrace: | |
0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace | |
at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49 |
diff --git a/src/librustc_mir/dataflow/mod.rs b/src/librustc_mir/dataflow/mod.rs | |
index 85458c7..eb5aace 100644 | |
--- a/src/librustc_mir/dataflow/mod.rs | |
+++ b/src/librustc_mir/dataflow/mod.rs | |
@@ -11,7 +11,7 @@ | |
use syntax::ast::{self, MetaItem}; | |
use rustc_data_structures::indexed_set::{IdxSet, IdxSetBuf}; | |
-use rustc_data_structures::indexed_vec::Idx; | |
+use rustc_data_structures::indexed_vec::{Idx, IndexVec}; |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env python | |
# marc-w.com | |
# Built and tested on Django 1.5 | |
class BulkInsertManager(models.Manager): | |
def _bulk_insert_ignore(self, create_fields, values, print_sql=False): | |
''' | |
Bulk insert/ignore | |
@param create_fields : list, required, fields for the insert field declaration |