sudo apt update && sudo apt upgrade
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
import React from "react"; | |
import Files from "react-butterfiles"; | |
/** | |
* Retrieve pre-signed POST data from a dedicated API endpoint. | |
* @param selectedFile | |
* @returns {Promise<any>} | |
*/ | |
const getPresignedPostData = selectedFile => { | |
return new Promise(resolve => { |
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
import io | |
from IPython.nbformat import current | |
with io.open(filepath, 'r', encoding='utf-8') as f: | |
nb = current.read(f, 'json') | |
word_count = 0 | |
for cell in nb.worksheets[0].cells: | |
if cell.cell_type == "markdown": | |
word_count += len(cell['source'].replace('#', '').lstrip().split(' ')) |
kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
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
__author__ = 'dkarchmer' | |
''' | |
This script emulates a stand-alone Python based client. It relies on Boto3 to access AWS, but | |
requires your Django server to have an API for your user to access Cognito based credentials | |
Because of Cognito, the client (this script) will only get temporary AWS credentials associated | |
to your user and only your user, and based on whatever you configure your AIM Policy to be. | |
Most Cognito examples demonstrate how to use Cognito for Mobile Apps, so this scripts demonstrate | |
how to create a stand-alone Python script but operating similarly to these apps. |
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
'use strict'; | |
/** | |
* Module dependencies | |
*/ | |
var actionUtil = require('sails/lib/hooks/blueprints/actionUtil'), | |
_ = sails.lodash; | |
var async = require('sails/node_modules/async'); | |
/** |
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
package main | |
import ( | |
"bytes" | |
"encoding/gob" | |
"fmt" | |
) | |
type MyFace interface { | |
A() |
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
#!/usr/bin/env python | |
#-------------------------------------------------------------------------- | |
# Tic Tac Toe game in Python | |
# Author: Mawuli Adzaku <[email protected]> | |
# Date: 20-05-2013 | |
# Tested with Python 2.7 | |
# TO RUN: | |
# sudo chmod a+x tictactoe.py | |
# ./tictactoe.py | |
# OR JUST RUN : python tictactoe.py |