Information about node (docker/swarm daemon) info.
This file contains hidden or 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
FROM python:2.7-alpine | |
MAINTAINER Nick Janetakis <[email protected]> | |
ENV INSTALL_PATH /bsawf | |
RUN mkdir -p $INSTALL_PATH | |
WORKDIR $INSTALL_PATH | |
COPY requirements.txt requirements.txt | |
RUN apk add --no-cache --virtual .build-deps \ |
This file contains hidden or 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
# script to download up to <= 3200 (the official API limit) of most recent tweets from a user's timeline | |
from pymongo import MongoClient | |
import tweepy | |
import json | |
#Twitter API credentials | |
CONSUMER_KEY = '' | |
CONSUMER_SECRET = '' | |
ACCESS_TOKEN = '' |
This file contains hidden or 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
FROM python:3.6-alpine | |
ENV PYTHONUNBUFFERED 1 | |
ARG git_username | |
ARG git_password | |
EXPOSE 8004 | |
RUN mkdir /opt/app | |
WORKDIR /opt/app |
This file contains hidden or 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="keywords" content="remark,remarkjs,markdown,slideshow,presentation" /> | |
<meta name="description" content="A simple, in-browser, markdown-driven slideshow tool." /> | |
<title>Software Testing</title> | |
<style> | |
@import url(https://fonts.googleapis.com/css?family=Droid+Serif); | |
@import url(https://fonts.googleapis.com/css?family=Yanone+Kaffeesatz); |
This file contains hidden or 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
[{"city": "Aarhus", "country": "Denmark", "iata_code": "AAR"}, {"city": "Abadan", "country": "Iran", "iata_code": "ABD"}, {"city": "Abeche", "country": "Chad", "iata_code": "AEH"}, {"city": "Aberdeen", "country": "United Kingdom", "iata_code": "ABZ"}, {"city": "Aberdeen (SD) ", "country": "USA", "iata_code": "ABR"}, {"city": "Abidjan", "country": "Cote d'Ivoire", "iata_code": "ABJ"}, {"city": "Abilene (TX) ", "country": "USA", "iata_code": "ABI"}, {"city": "Abu Dhabi - Abu Dhabi International", "country": "United Arab Emirates", "iata_code": "AUH"}, {"city": "Abuja - Nnamdi Azikiwe International Airport", "country": "Nigeria", "iata_code": "ABV"}, {"city": "Abu Rudeis", "country": "Egypt", "iata_code": "AUE"}, {"city": "Abu Simbel", "country": "Egypt", "iata_code": "ABS"}, {"city": "Acapulco", "country": "Mexico", "iata_code": "ACA"}, {"city": "Accra - Kotoka International Airport", "country": "Ghana", "iata_code": "ACC"}, {"city": "Adana", "country": "Turkey", "iata_code": "ADA"}, {"city": "Addis Ababa - Bol |
This file contains hidden or 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 java.util.LinkedHashMap; | |
import java.util.Map; | |
import java.util.Stack; | |
public class BracketsUtils { | |
private static final char OPENING_BRACKET = '['; | |
private static final char CLOSING_BRACKET = ']'; | |
public static int findClosingBracket(String text, int openingBracketIndex) { |
This file contains hidden or 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 python3 | |
import yaml | |
def version(filename): | |
'''Load version from Chart.yaml file.''' | |
with open(filename, 'r') as f: | |
return yaml.load(f).get('version') | |
def set(filename, major, minor, patch): |
This file contains hidden or 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
#!/bin/bash | |
ORIGIN=$(git log -n 1 --oneline --format=format:%H origin/master helm/pfapi/Chart.yaml) | |
LOCAL=$(git log -n 1 --oneline --format=format:%H HEAD helm/pfapi/Chart.yaml) | |
CHART=$(git status --porcelain | grep Chart.yaml) | |
if [ "$ORIGIN" = "$LOCAL" ]; then | |
if [[ -z "$CHART" ]]; then | |
echo -e "#######################################\n# Don't forget to update Charts.yaml. #\n#######################################" | |
fi |
This file contains hidden or 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
# coding: utf-8 | |
class EmptyClass(object): | |
def __repr__(self): | |
return "" | |
Empty = EmptyClass() | |
class Node(object): | |
def __init__(self, value, key=None): |