Dump existing data:
python3 manage.py dumpdata > datadump.json
Change settings.py to Postgres backend.
Make sure you can connect on PostgreSQL. Then:
| # An example to get the remaining rate limit using the Github GraphQL API. | |
| import requests | |
| headers = {"Authorization": "Bearer YOUR API KEY"} | |
| def run_query(query): # A simple function to use requests.post to make the API call. Note the json= section. | |
| request = requests.post('https://api.github.com/graphql', json={'query': query}, headers=headers) | |
| if request.status_code == 200: |
| """Short and sweet LSTM implementation in Tensorflow. | |
| Motivation: | |
| When Tensorflow was released, adding RNNs was a bit of a hack - it required | |
| building separate graphs for every number of timesteps and was a bit obscure | |
| to use. Since then TF devs added things like `dynamic_rnn`, `scan` and `map_fn`. | |
| Currently the APIs are decent, but all the tutorials that I am aware of are not | |
| making the best use of the new APIs. | |
| Advantages of this implementation: |
| var React = require('react/addons'); | |
| var ReactIgnore = { | |
| displayName: 'ReactIgnore', | |
| shouldComponentUpdate (){ | |
| return false; | |
| }, | |
| render (){ | |
| return React.Children.only(this.props.children); | |
| } |
| <div class="row" id="box-search"> | |
| <div class="thumbnail text-center"> | |
| <img src="img/cafe.jpg" alt="" class="img-responsive"> | |
| <div class="caption"> | |
| <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Ab, quisquam?</p> | |
| </div> | |
| </div> | |
| </div> |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
| license: mit |
| 'use strict'; | |
| var Q = require('q'); | |
| // `condition` is a function that returns a boolean | |
| // `body` is a function that returns a promise | |
| // returns a promise for the completion of the loop | |
| function promiseWhile(condition, body) { | |
| var done = Q.defer(); |