Skip to content

Instantly share code, notes, and snippets.


Dennis Richardson 4SkyNet

View GitHub Profile
4SkyNet /
Created Dec 14, 2018 — forked from x0xMaximus/
Bacterial Foraging Optimization Algorithm
# Bacterial Foraging Optimization Algorithm
# (c) Copyright 2013 Max Nanis [].
import os, random, math, csv
class BFOA():
def __init__(self, pop_size = 100, problem_size = 2, dimension = [-1, 1], elim_disp_steps = 1, repro_steps = 4, chem_steps = 30):
self.step_index = 0
self.run_id = os.urandom(6).encode('hex')
# Copyright 2018 The TensorFlow Probability Authors.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# Unless required by applicable law or agreed to in writing, software
4SkyNet /
Created Nov 24, 2017 — forked from samrocketman/
On Ubuntu 16.04, since iOS 10 update, libimobiledevice can't connect to my iPhone. This is my attempt to document a fix.

Why this document?

I upgraded my iPhone 5s to iOS 10 and could no longer retrieve photos from it. This was unacceptable for me so I worked at achieving retrieving my photos. This document is my story (on Ubuntu 16.04).

The solution is to compile libimobiledevice and ifuse from source.


Who is this guide intended for?

4SkyNet / notebook.ipynb
Created Jul 17, 2017 — forked from eamartin/notebook.ipynb
Understanding & Visualizing Self-Normalizing Neural Networks
View notebook.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import theano
import theano.tensor as T
import lasagne
from collections import OrderedDict
def get_adam_steps_and_updates(all_grads, params, learning_rate=0.001,
beta1=0.9, beta2=0.999, epsilon=1e-8):
t_prev = theano.shared(lasagne.utils.floatX(0.))
4SkyNet /
Last active Aug 31, 2020
TensorFlow Code Style

1. Python style

Generally follow PEP8 Python style guide

But! Try to use Tensorflow wherever it useful (or possible...)

2. Tensors

  • Operations that deal with batches may assume that the first dimension of a Tensor is the batch dimension.
4SkyNet /
Created Oct 4, 2016 — forked from siemanko/
Simple implementation of LSTM in Tensorflow in 50 lines (+ 130 lines of data generation and comments)
"""Short and sweet LSTM implementation in Tensorflow.
When Tensorflow was released, adding RNNs was a bit of a hack - it required
building separate graphs for every number of timesteps and was a bit obscure
to use. Since then TF devs added things like `dynamic_rnn`, `scan` and `map_fn`.
Currently the APIs are decent, but all the tutorials that I am aware of are not
making the best use of the new APIs.
Advantages of this implementation:
You can’t perform that action at this time.