Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
keep_p = 1- dropout_p | |
a = np.sqrt(target_var / (keep_p *((1-keep_p) * np.power(alpha-target_mean,2) + target_var))) | |
b = target_mear - a * (keep_p * target_mean + (1 - keep_p) * alpha) | |
def alpha_dropout(x, alpha_p=-1.758, dropout_p=0.05): | |
mask = np.random.rand(*x.shape) > dropout_p | |
x[mask] = alpha_p | |
output = a*x + b | |
return output |
#!/usr/bin/env ruby | |
# List of spam accounts | |
spam_accounts = %w(spamacc@podA spamacc@podB spamacc@mypod) | |
# Delete comments even if spammer isn't a local user or spam isn't on a | |
# local users account. | |
# And delete posts of users in spam_accounts that aren't local. | |
always_delete = true |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
// float->half variants. | |
// by Fabian "ryg" Giesen. | |
// | |
// I hereby place this code in the public domain, as per the terms of the | |
// CC0 license: | |
// | |
// https://creativecommons.org/publicdomain/zero/1.0/ | |
// | |
// float_to_half_full: This is basically the ISPC stdlib code, except | |
// I preserve the sign of NaNs (any good reason not to?) |