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
var CardIO = null; | |
try { | |
CardIO = UIViewController.extend({ | |
setup: function() { | |
CardIOUtilities.preload(); | |
}, | |
init: function() { | |
var self = this.super.init(); | |
if (self) { |
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 serial | |
import kivy | |
from kivy.app import App | |
from kivy.clock import Clock | |
from kivy.core.window import Window | |
from kivy.uix.scrollview import ScrollView | |
from kivy.uix.gridlayout import GridLayout | |
from kivy.properties import ObjectProperty, StringProperty |
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 | |
from sys import argv, exit | |
import random | |
big_file_name = "big_file.txt" | |
max_size_of_number = 1000000 | |
random.seed(123) | |
if len(argv) != 2: | |
print "Usage: %s Num_Lines" % __file__ |
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/python | |
from sys import argv | |
import multiprocessing as mp | |
import time | |
# Ajust for number of cpus/memory | |
# Each process will sort an array of size : ratio_per_process * size_array_largest | |
ratio_per_process = 30000 | |
# Lets consolidate the Sort after some number of interations | |
num_interations = 50 |
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
puts "The Mick " | |
puts "Gap Year " | |
puts "Stan Lees Lucky Man " | |
puts "The Worst Witch " | |
puts "The Middle " | |
puts "Master of None " | |
puts "Sense8 " | |
puts "Da Vincis Demons " | |
puts "Scorpion " | |
puts "Citizen Khan " |
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
# Ruby 2.3.3 | |
# puts print | |
# Simbols are simpler String objs | |
# Constants are Capitalized variables | |
# Methods name finishing with a question mark returns booleans | |
# You can chain methods: job.get().askRaise() | |
# Global vars starts with a Dollar sign: $ | |
# Instance vars starts with an At sign: @ |
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
############################################################ | |
# Dockerfile to build Python / Django / Mysql small container images | |
# Based on Linux Alpine | |
############################################################ | |
# Set the base image | |
FROM alpine | |
# File Author / Maintainer | |
MAINTAINER Alexandre Andrade [email protected] |
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 getpass | |
from cryptography.fernet import Fernet | |
import sys | |
def get_credentials(): | |
# SoftLayer Username/ Api Key encrypted | |
encrypted_credentials = b'' | |
secret_key = getpass.getpass("Please enter your secret key: ") |
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
from datadog import initialize, api | |
import sys | |
def dd_init(): | |
dd_options = { | |
'api_key': '', | |
'app_key': '' | |
} | |
initialize(**dd_options) | |
return api |
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
""" | |
Cancel the server with SoftLayer, turn it off and mute the Datadog alerts for it. | |
The host will be available until the next 16th day of the month. | |
""" | |
import SoftLayer | |
import sys | |
from CC_SoftLayer import get_credentials as sl_get_cred | |
from CC_Datadog import dd_init |