I hereby claim:
- I am joshisa on github.
- I am boilerupnc (https://keybase.io/boilerupnc) on keybase.
- I have a public key ASDafqvWKxiRU-OJ7L6B116RAs-bi_xZtS1Ce9MbConUnQo
To claim this, I am signing this object:
| // Demonstrates a way to create an API Key User with Cloudant and set permissions | |
| var dbname = 'somedb'; | |
| var cloudantCreds = { | |
| username: 'cloudantusername', | |
| password: 'cloudantpassword' | |
| }; | |
| var auth = 'Basic ' + new Buffer( cloudantCreds.username + ':' + cloudantCreds.password).toString('base64'); | |
| var options = { |
| var cloudantCreds = { | |
| username: 'cloudantusername', | |
| password: 'cloudantpassword' | |
| }; | |
| var dbname = 'cloudantdbname'; | |
| var auth = 'Basic ' + new Buffer( cloudantCreds.username + ':' + cloudantCreds.password).toString('base64'); | |
| var options = { |
| _codes = { | |
| # Informational. | |
| 100: ('continue',), | |
| 101: ('switching_protocols',), | |
| 102: ('processing',), | |
| 103: ('checkpoint',), | |
| 122: ('uri_too_long', 'request_uri_too_long'), | |
| 200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/', '✓'), | |
| 201: ('created',), |
| #!/bin/sh | |
| echo "What should the Application be called (no spaces allowed e.g. GCal)?" | |
| read inputline | |
| name=$inputline | |
| echo "What is the url (e.g. https://www.google.com/calendar/render)?" | |
| read inputline | |
| url=$inputline |
| //the code below will embed replace [gist id=x] tags with an embedded gist similar to the way the Wordpress Gist | |
| //plugin works. I wrote this in order to import posts from Wordpress. See //GB: for the changes. | |
| //SPJ: Updated for compatibility with Ghost 0.6.4 | |
| /** | |
| * ### Read | |
| * Find a post, by ID, UUID, or Slug | |
| * | |
| * @public | |
| * @param {{id_or_slug (required), context, status, include, ...}} options |
| #List unique values in a DataFrame column | |
| pd.unique(df.column_name.ravel()) | |
| #Convert Series datatype to numeric, getting rid of any non-numeric values | |
| df['col'] = df['col'].astype(str).convert_objects(convert_numeric=True) | |
| #Grab DataFrame rows where column has certain values | |
| valuelist = ['value1', 'value2', 'value3'] | |
| df = df[df.column.isin(value_list)] |
| Source: http://orga.cat/posts/most-useful-git-commands | |
| Not all commands written here are git commands, but all of them are related to git. Please refer to the documentation for more details. | |
| Set your details | |
| git config --global user.name "John Doe" | |
| git config --global user.email "[email protected]" | |
| Use --global to set the configuration for all projects. If git config is used without --global and run inside a project directory, the settings are set for the specific project. | |
| Make git ignore file modes |
| Verifying that +boilerupnc is my blockchain ID. https://onename.com/boilerupnc |
| # Installing the very useful iPython extension autotime (src: https://github.com/cpcloud/ipython-autotime) | |
| %install_ext https://raw.github.com/cpcloud/ipython-autotime/master/autotime.py | |
| %load_ext autotime | |
| def get_file_content(credentials): | |
| '''For given credentials, this functions returns a StringIO object containg the file content.''' | |
| url1 = ''.join([credentials['auth_url'], '/v3/auth/tokens']) | |
| data = {'auth': {'identity': {'methods': ['password'], | |
| 'password': {'user': {'name': credentials['username'],'domain': {'id': credentials['domainId']}, |
I hereby claim:
To claim this, I am signing this object: