# Download installer
wget https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh
bash Anaconda3-2020.02-Linux-x86_64.sh
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
version: "3" | |
services: | |
web: | |
image: YOUR_DOCKER_ID/pyapp:latest | |
deploy: | |
replicas: 2 | |
ports: | |
- "80:80" | |
networks: | |
- webnet |
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
<!-- Preloading Files --> | |
<script> | |
function lazyLoadLibraries() { | |
const csslibraries = [ | |
'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/styles/monokai-sublime.min.css', | |
] | |
const jslibraries = [ | |
'https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.18.1/highlight.min.js', | |
] |
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 socket import SOCK_STREAM | |
from time import sleep | |
import psutil | |
standard_ports = { | |
# Connections | |
21, 22, 25, 53, 3389, | |
# Databases | |
3306, 5432, 1433, 6379, 11211, |
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
--- | |
driver: | |
name: azurerm | |
driver_config: | |
subscription_id: '91d5ad1d-29c6-442e-9f1b-a8bb6fef2189' | |
location: 'East US' | |
machine_size: 'Standard_B1s' | |
username: 'TestAdmin' | |
password: 'TestPassword@123' |
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 PORT = 33333; | |
var HOST = '0.0.0.0'; | |
var dgram = require('dgram'); | |
var server = dgram.createSocket('udp4'); | |
server.on('listening', function() { | |
var address = server.address(); | |
console.log('UDP Server listening on ' + address.address + ':' + address.port); | |
}); |
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
--- | |
apiVersion: v1 | |
kind: Secret | |
metadata: | |
name: default-server-secret | |
type: Opaque | |
data: | |
tls.crt: LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS0tCk1JSUZLakNDQkJLZ0F3SUJBZ0lTQkZlMEI3cEExZm5kYjE1MzNGalpoM2dMTUEwR0NTcUdTSWIzRFFFQkN3VUEKTURJeEN6QUpCZ05WQkFZVEFsVlRNUll3RkFZRFZRUUtFdzFNWlhRbmN5QkZibU55ZVhCME1Rc3dDUVlEVlFRRApFd0pTTXpBZUZ3MHlNVEEwTURJeE1ETTNNemhhRncweU1UQTNNREV4TURNM016aGFNQjB4R3pBWkJnTlZCQU1NCkVpb3VhWEF1YzJ0aFlYTnNZV0p6TG1OdmJUQ0NBU0l3RFFZSktvWklodmNOQVFFQkJRQURnZ0VQQURDQ0FRb0MKZ2dFQkFORmVhbkNtVmN3YzhoNE96ekIya2FuQ1Jtbjdubi8xQ3JzT3p2dER3TXI1RGcxOU0ybE5oVGM2M01ETQpjK0E1TzFzQ2I5WTQvV3dka0tTaWRrRHpPS0pNMUpiVmxBNGs0Y003OUoyZXFZSGJ6aUF2bUtTNGJDQmtqTTlaCkk4citweVN6L2xaZjZnT29KbWFDYU8rNzdQSkk3QVdzai82QlBqQUNGbmYzN05MWFB0UUt1cXR6WHh1aGl4UlcKQjhVWWFSM0tMeFpaU3g2ZDlsRzg5enR4clBTa1VTZDJLZFVlZXNLdGlVYmtLeEdTYlpBUXJ5SDhINjRoYlV1KwpVQ0N3RVpqc3M4aEp4TWdnTU1zM1ZHaWVuQWlIdVc5SDZidGdPSGVpa2xVT1hITllkbTh5WHpjRlRCTkxrMCtzClhEVEZFWTZBdVVaUHBDOUUvMCtKQmpKSzh6TUNBd0VBQWFPQ0FrMHdnZ0pKTUE0R0ExVWREd0VCL3dRRUF3SUYKb0RBZEJnTlZIU1VFRm |
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 numpy as np | |
EPSILON = 1e-10 | |
def _error(actual: np.ndarray, predicted: np.ndarray): | |
""" Simple error """ | |
return actual - predicted | |
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
sudo su | |
apt-get update | |
apt-get install -y ansible | |
echo ANSIBLE_HOST_KEY_CHECKING=False >> /etc/environment | |
echo " | |
[machines] |
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 boto3 | |
lamba_client = boto3.client('lambda', region_name='REGION_NAME') | |
lamba_client.add_permission( | |
FunctionName='create_lab', | |
StatementId='AWSEventsRule', | |
Action='lambda:InvokeFunction', | |
Principal='events.amazonaws.com', | |
SourceArn='arn:aws:events:REGION_NAME:ACCOUNT_NUMBER:rule/*', |
NewerOlder