Skip to content

Instantly share code, notes, and snippets.

View Arsey's full-sized avatar

Alexander Lazarev Arsey

  • Ukraine, Poltava
View GitHub Profile
@Arsey
Arsey / readme.md
Created June 13, 2017 11:05 — forked from flyyufelix/readme.md
Resnet-152 pre-trained model in Keras

ResNet-152 in Keras

This is an Keras implementation of ResNet-152 with ImageNet pre-trained weights. I converted the weights from Caffe provided by the authors of the paper. The implementation supports both Theano and TensorFlow backends. Just in case you are curious about how the conversion is done, you can visit my blog post for more details.

ResNet Paper:

Deep Residual Learning for Image Recognition.
Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun
arXiv:1512.03385
Using Theano backend.
th
(0, 'input_1')
(1, 'convolution2d_1')
(2, 'batchnormalization_1')
(3, 'convolution2d_2')
(4, 'batchnormalization_2')
(5, 'convolution2d_3')
(6, 'batchnormalization_3')
(7, 'maxpooling2d_1')
@Arsey
Arsey / start_from_z
Created November 25, 2014 19:28
start print from Z layer
<?php
$reading = fopen('1.gcode', 'r');
$writing = fopen('1.tmp', 'w');
$replaced = false;
$i = 0;
echo '<pre>';
while (!feof($reading)) {
$i++;
[
{"title": "Фан-зона", "shapes":"18,72,18,166,330,166,330,72" },
{"title": "Танцевальный партер", "sector_id": 2663, "shapes": "18,216,18,312,330,312,331,216"},
{"title": "VIP light - входной", "sector_id": 4390, "shapes": "17,354,17,424,331,424,331,354"},
{"title": "VIP балкон light", "shapes": "423,250,424,313,628,312,629,250"},
{"title": "VIP center", "sector_id":8852, "shapes": "368,321,368,424,684,424,684,321"},
{"title": "Super VIP left", "sector_id": 2666, "shapes": "367,29,418,29,418,313,367,313"},
{"title": "Super VIP right", "shapes": "633,28,684,28,684,313,633,313"}
]
The objective of this post is to get you from absolutely nothing, to a fully functional nodejs environment.
Software used: Ubuntu 11.10, Nodejs v0.6.12, Nginx, MongoDB, Redis, and NPM modules.
1. Download and install the latest version of Ubuntu: http://www.ubuntu.com/download (don't select any extra items to install when prompted)
2. Once you are logged in and are at your Ubuntu command prompt, install the necessary software you will need:
a. sudo apt-get install openssh-server
b. sudo apt-get install libssl-dev
c. sudo apt-get install git
d. sudo apt-get install g++
e. sudo apt-get install make
<?php
while ($TRows = mysql_fetch_array($TSettings)) {
if ($TRows['field_name'] == 'Product Status') {
$SelSql .= ", CASE 1 WHEN products.products_status = 1 THEN 'Active' WHEN products.products_status = 0 THEN 'Inactive' ELSE 'Discontinued' END";
}
if ($TRows['field_name'] == 'Stock Quantity') {
$SelSql .= ", products.products_quantity";
@Arsey
Arsey / gist:8157988
Created December 28, 2013 10:11
modified to support group choosing buildDropdown function from bootstrap-multiselects by David Stutz(https://github.com/davidstutz/bootstrap-multiselect)
// Build the dropdown and bind event handling.
buildDropdown : function() {
var alreadyHasSelectAll = this.$select[0][0] ? this.$select[0][0].value == this.options.selectAllValue : false;
// If options.includeSelectAllOption === true, add the include all
// checkbox.
if (this.options.includeSelectAllOption && this.options.multiple && !alreadyHasSelectAll) {
this.$select.prepend('<option value="' + this.options.selectAllValue + '">' + this.options.selectAllText + '</option>');
}
@Arsey
Arsey / gist:8157974
Created December 28, 2013 10:08
modified to support group choosing createOptionValue function from bootstrap-multiselects by David Stutz(https://github.com/davidstutz/bootstrap-multiselect)
// Will build an dropdown element for the given option.
createOptionValue : function(element,groupId) {
if ($(element).is(':selected')) {
$(element).attr('selected', 'selected').prop('selected', true);
}
// Support the label attribute on options.
var label = $(element).attr('label') || $(element).text();
var value = $(element).val();
var inputType = this.options.multiple ? "checkbox" : "radio";