This file contains hidden or 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
'''Train a Siamese MLP on pairs of digits from the MNIST dataset. | |
It follows Hadsell-et-al.'06 [1] by computing the Euclidean distance on the | |
output of the shared network and by optimizing the contrastive loss (see paper | |
for mode details). | |
[1] "Dimensionality Reduction by Learning an Invariant Mapping" | |
http://yann.lecun.com/exdb/publis/pdf/hadsell-chopra-lecun-06.pdf | |
Gets to 99.5% test accuracy after 20 epochs. |
This file contains hidden or 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 keras import backend as K | |
if K.backend() == "tensorflow": | |
print("Using tensorflow - try to use jit") | |
import keras.backend.tensorflow_backend as bck | |
config = bck.tf.ConfigProto() | |
config.graph_options.optimizer_options.global_jit_level = bck.tf.OptimizerOptions.ON_1 | |
bck.set_session(bck.tf.Session(config=config)) |
This file contains hidden or 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
1 #include <Python.h> | |
2 #include <iostream> | |
3 #include "theano_mod_helper.h" | |
4 #include "cuda_ndarray.cuh" | |
5 ////////////////////// | |
6 //// Support Code | |
7 ////////////////////// | |
8 | |
9 | |
10 namespace { |
This file contains hidden or 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
for i in \"*\";do echo "$i"; mv "$i" "$(echo "$i" | tr -d \")";done; |
This file contains hidden or 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
public interface Attachable { | |
public File getFile(); | |
public String getTitle(); | |
public String getDescription(); | |
public String getRealFileName(); | |
public Double getSize();//double? | |
public void saveFile(File destination); | |
} |
This file contains hidden or 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
location ~ [^/]\.php(/|$) { | |
fastcgi_split_path_info ^(.+?\.php)(/.*)$; | |
if (!-f $document_root$fastcgi_script_name) { | |
return 404; | |
} | |
# NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini | |
include fastcgi_params; | |
# | |
# # With php5-cgi alone: |
This file contains hidden or 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
####READ COMMENTS | |
#### comments contain instruction that are must be done and not via terminal! | |
############################################################################# | |
# install ubuntu | |
# make sure to add security group that allows to connect mysql instance | |
sudo apt-get update | |
# add ngix repository | |
#ubnutu get stable | |
sudo -s |
This file contains hidden or 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
for (i=1;i<100;i++) {console.log(i + " " + Math.log2(i) + " " + Math.ceil(Math.log2(i)));} |
This file contains hidden or 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
LOAD DATA INFILE 'treksheb.csv' into table treks_heb | |
-> FIELDS TERMINATED BY ',' | |
-> ENCLOSED BY '"' | |
-> LINES TERMINATED BY '\r\n' | |
-> IGNORE 1 LINES | |
-> (ProductId,name,Shortdescription,FullDescription,AttributeTypeId,CustomValue,DisplayOrder,SpecificationAttributeName,SpecificationAttributeOptionName); |
This file contains hidden or 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
<!DOCTYPE html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0"> | |
</head> | |
<style type="text/css"> | |
html, body { | |
height: 100%; | |
margin: 0; | |
} | |
iframe { |