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 alpaca_trade_api as tradeapi | |
import time | |
import datetime | |
from datetime import timedelta | |
from pytz import timezone | |
tz = timezone('EST') | |
import numpy as np | |
import pandas as pd |
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
#CODE | |
#Generate root password | |
import random, string | |
password = ''.join(random.choice(string.ascii_letters + string.digits) for i in range(20)) | |
#Download ngrok | |
! wget -q -c -nc https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip | |
! unzip -qq -n ngrok-stable-linux-amd64.zip | |
#Setup sshd |
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 os | |
import requests | |
import json | |
SLACK_WEBHOOK= os.environ.get("SLACK_WEBHOOK") | |
def send_message(messages, channel="abhishek", username="beast"): | |
""" | |
:param messages: list of texts |
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
def plot_eli5_top_explanations( | |
model: Model, | |
image: np.array, | |
class_names_mapping: Dict[int, str], | |
top_preds_count: int = 3, | |
fig_name: Optional[str] = None | |
) -> None: | |
image_columns = 3 | |
image_rows = math.ceil(top_preds_count / image_columns) |
Here I have 2 methods for running portainer on windows, a quick, preferred method only requiring a fairly recent version of docker, or a more complicated method to try if that does not work.
This setup will let you run Portainer on windows by using the docker.for.win.localhost endpoint.
Please note:
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
/* | |
DESCRIPTION | |
----------- | |
Use NodeJS to read RFID ids through the USB serial stream. Code derived from this forum: | |
http://groups.google.com/group/nodejs/browse_thread/thread/e2b071b6a70a6eb1/086ec7fcb5036699 | |
CODE REPOSITORY | |
--------------- | |
https://gist.github.com/806605 |
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 __future__ import print_function, division | |
from keras.datasets import mnist | |
from keras.layers import Input, Dense, Reshape, Flatten, Dropout | |
from keras.layers import BatchNormalization, Activation | |
from keras.layers.advanced_activations import LeakyReLU | |
from keras.models import Sequential, Model | |
from keras.optimizers import Adam |
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
// actions/action_select_contact.js | |
function selectContact(contact) { | |
return { | |
type: 'CONTACT_SELECTED', | |
payload: contact | |
} | |
} | |
export default selectContact; |
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 python3 | |
""" | |
To run: python3 nb2to3.py notebook-or-directory | |
""" | |
# Authors: Thomas Kluyver, Fernando Perez | |
# See: https://gist.github.com/takluyver/c8839593c615bb2f6e80 | |
import argparse | |
import pathlib | |
from nbformat import read, write |
NewerOlder