Skip to content

Instantly share code, notes, and snippets.

View pbabbott's full-sized avatar

Brandon Abbott pbabbott

View GitHub Profile
import pandas as pd
data = [['Alex',10],['Bob',12],['Clarke',13]]
df = pd.DataFrame(data,columns=['Name','Age'],dtype=float)
print (df)
image: atlassian/default-image:2
pipelines:
branches:
qa:
- step:
name: Deploy to quality assurance
deployment: staging # can be test, staging or production
services:
- docker
@pbabbott
pbabbott / Dockerfile
Created August 8, 2018 21:34
Example dockerfile for a node app
FROM node:9
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json ./
COPY yarn.lock ./
RUN yarn install
@pbabbott
pbabbott / server.js
Created August 8, 2018 21:26
Example node server
import express from 'express';
import dotenv from 'dotenv';
import path from 'path';
const getConfigValue = (name, defaultValue) => {
let result = process.env[name];
return result ? result : defaultValue;
}
// Read configuration
import apiClient from 'somewhere-else';
const pokemonCache = {};
export function getRawPokemonData(id){
let cachedPokemon = pokemonCache[id];
if (cachedPokemon){
return new Promise((resolve, reject) =>{
resolve(cachedPokemon);