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
#!/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
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
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
# Download the "Android Studio" (version 3.2.1 as today) from | |
# https://developer.android.com/studio/#downloads | |
# Extract and move to the Desktop | |
# Download the "Command line tools only" from the same page | |
# Extrat to ~/Downloads and then: | |
cd ~/Desktop/Android\ Studio.app/ | |
mv ~/Downloads/tools ./ | |
# Download the "SDK Platform Tools" from |
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
### BEGIN INIT INFO | |
# Provides: access-point | |
# Required-Start: $remote_fs $syslog | |
# Required-Stop: $remote_fs $syslog | |
# Default-Start: 2 3 4 5 | |
# Default-Stop: 0 1 6 | |
# Short-Description: Control hostapd access point | |
# Description: Control hostapd Wifi access point on Raspberry Pi 3 running Kali Linux | |
### END INIT INFO | |
MENUDIR=./ |
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
AWSTemplateFormatVersion : '2010-09-09' | |
Transform: AWS::Serverless-2016-10-31 | |
Resources: | |
LambdaFunction: | |
Type: AWS::Serverless::Function | |
Properties: | |
Handler: index.handler | |
Runtime: nodejs8.10 | |
MemorySize: 128 | |
Timeout: 15 |
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
AWSTemplateFormatVersion: "2010-09-09" | |
Description: "An example lambda template to demonstrate persistent state between executions" | |
Resources: | |
LambdaExecutionRole: | |
Type: "AWS::IAM::Role" | |
Properties: | |
AssumeRolePolicyDocument: | |
Version: "2012-10-17" | |
Statement: | |
- Effect: Allow |
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
AWSTemplateFormatVersion: '2010-09-09' | |
Parameters: | |
ApiGatewayStack: | |
Description: The stack where the api gateway rest api is defined | |
Type: String | |
Default: dev-maat-apigw-app | |
EventBucket: | |
Type: String | |
Default: dev-maat-bucket | |
CorsAllowOrigin: |
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 node | |
// Search and Destroy | |
// | |
const path = require('path') | |
const fs = require('fs') | |
const createPackageJson = () => { | |
const packageJsonContent = ` | |
{ | |
"name": "sad", |