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
''' | |
export SPOTIPY_REDIRECT_URI='http://localhost:8888/callback' | |
export SPOTIPY_CLIENT_ID={API_CLIENT_ID} | |
export SPOTIPY_CLIENT_SECRET={API_CLIENT_SECRET} | |
''' | |
import collections | |
import math | |
import spotipy | |
import spotipy.util as util |
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 tweepy import API | |
from tweepy import Stream | |
from tweepy import OAuthHandler | |
from tweepy.streaming import StreamListener | |
import os | |
import re | |
import urllib2 | |
C_KEY = os.environ['C_KEY'] |
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
#! /env/bin/python | |
# https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#get-change-detail | |
# https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html | |
# #add-reviewer | |
# https://review.openstack.org/Documentation/cmd-set-reviewers.html | |
""" | |
user1 to review [user2, user3] | |
user2 to review [user1, user3] |
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 textblob import TextBlob | |
from tweepy import API | |
from tweepy import OAuthHandler | |
import config | |
import logging | |
LOGGER = logging.getLogger("twentiment") | |
logging.basicConfig( | |
level=logging.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
javascript:(function(){ | |
function copyTextToClipboard(text) { | |
var textArea = document.createElement("textarea"); | |
textArea.style.position = 'fixed'; | |
textArea.style.top = 0; | |
textArea.style.left = 0; | |
textArea.style.width = '2em'; | |
textArea.style.height = '2em'; | |
textArea.style.padding = 0; | |
textArea.style.border = 'none'; |
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/python | |
from __future__ import print_function | |
from ast import literal_eval | |
from argparse import ArgumentParser | |
import urllib2 | |
BASE_URL = "https://{jenkins}/job/%s/%s" |
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 | |
. /etc/os-release | |
IMAGE="container-demo.img" | |
die() { echo "FATAL: $@" >&2 ; exit 1 ; } | |
info() { echo "INFO: $@" ; } | |
install_dependencies() { |
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
install | |
lang en_GB.UTF-8 | |
keyboard us | |
timezone --utc GMT | |
auth --useshadow --enablemd5 | |
selinux --disabled | |
firewall --disabled | |
services --enabled=NetworkManager,sshd | |
eula --agreed |
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 asyncio, asyncssh, sys | |
class MySSHClientSession(asyncssh.SSHClientSession): | |
def data_received(self, data, datatype): | |
print(data, end='') | |
def connection_lost(self, exc): | |
if exc: | |
print('SSH session error: ' + str(exc), file=sys.stderr) |
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 bash | |
TOKEN=$(oc whoami -t) | |
podman login docker-registry.default.svc:5000 -u test_admin -p $TOKEN | |
git clone https://github.com/ansibleplaybookbundle/import-vm-apb.git && cd import-vm-apb | |
docker build -t docker-registry.default.svc:5000/openshift/import-vm-apb:latest . | |
docker save docker-registry.default.svc:5000/openshift/import-vm-apb:latest -o import-vm-apb.tar | |
podman import import-vm-apb.tar docker-registry.default.svc:5000/openshift/import-vm-apb:latest |