gravid 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 121455ca1be78b1f63265d981451d323f1c9cdc8
4
- data.tar.gz: 1f279dbfb1e79a8ecb0bc798e5c5bed839dc39bf
3
+ metadata.gz: ad14042722eff88612188966831fc1e16fb42329
4
+ data.tar.gz: 5cd0169f8ed86cfd16eb703231eaccd14113b3b0
5
5
  SHA512:
6
- metadata.gz: b0beace999dbcc563f8441ca8198763312611d40b74bd7366fc47f3b53a710534a22e8dd653c0b608cc1b3bdcc3480558fca2038c8c88902cb16d6a2157aa802
7
- data.tar.gz: 821385d0994b5e2801e1ad4e7d26e4e24d38e064b8fe38680784defc48ba4b2c0a370934b3806c4926dca86d9fc1911d4896433c5a565ce5f0bd0fbee321506a
6
+ metadata.gz: f64516544a0ed2c1b1279e6203cdcde7d8e8adbec2c9f0fd1d57be0ad65f9db47407d40f9be0aa5ad11dabe4091c9c728b3cbabf53a0cdb13fe1d6c49962b8c7
7
+ data.tar.gz: 6f6928388ffb4e901de3916cd0271816aa1c764c54fc9a02361a4cabcae2fb2aa9476c592654ccd0e2a372c60c4392cf228b5a69ef0067fc4c342d99b6c9126f
data/404.html ADDED
@@ -0,0 +1,9 @@
1
+ ---
2
+ layout: post
3
+ ---
4
+
5
+ <div class="container">
6
+ <h1>404: PAGE NOT FOUND</h1>
7
+
8
+ <p>Sorry, I've misplaced that URL or it's pointing to something that doesn't exist. <a href="/">Head back home</a> to try finding it again.</p>
9
+ </div>
@@ -0,0 +1,8 @@
1
+ ---
2
+ layout: post
3
+ title: "Inspirations"
4
+ ---
5
+
6
+ Inspiration from [Sofish's personal blog](https://github.com/sofish/sofi.sh).
7
+
8
+ <!-- more -->
@@ -0,0 +1,62 @@
1
+ ---
2
+ layout: post
3
+ title: "My first blog"
4
+ ---
5
+
6
+ This is my first blog powered by gravid.
7
+
8
+ <!-- more -->
9
+
10
+ # gravid
11
+
12
+ Welcome to your new Jekyll theme - gravid!
13
+
14
+ Being talented just like being gravid, must be known with a long time past. I think I need more time to be talented, so I choose an easy one and named 'gravid'. 😊
15
+
16
+ [Theme preview](https://zddhub.github.io)
17
+
18
+ ![Screenshot](/assets/gravid_blog_preview.png)
19
+
20
+ ## Installation
21
+
22
+ Add this line to your Jekyll site's `Gemfile`:
23
+
24
+ ```ruby
25
+ gem "gravid"
26
+ ```
27
+
28
+ And add this line to your Jekyll site's `_config.yml`:
29
+
30
+ ```yaml
31
+ theme: gravid
32
+ ```
33
+
34
+ And then execute:
35
+
36
+ $ bundle
37
+
38
+ Or install it yourself as:
39
+
40
+ $ gem install gravid
41
+
42
+ ## Development
43
+
44
+ Gravid has been scaffolded by the `jekyll new-theme` command and therefore has all the necessary files and directories to have a new Jekyll site up and running with zero-configuration.
45
+
46
+ To set up your environment to develop this theme, run `bundle install`.
47
+
48
+ Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
49
+
50
+ When your theme is released, only the files in `_layouts`, `_includes`, and `_sass` tracked with Git will be released.
51
+
52
+ ## Contributing
53
+
54
+ Bug reports and pull requests are welcome on GitHub at https://github.com/zddhub/gravid. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
55
+
56
+ ## Thanks
57
+
58
+ Inspiration from [Sofish's personal blog](https://github.com/sofish/sofi.sh), Thanks.
59
+
60
+ ## License
61
+
62
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,114 @@
1
+ ---
2
+ layout: post
3
+ title: "My second blog"
4
+ ---
5
+
6
+ Welcome to your new Jekyll theme - gravid!
7
+
8
+ This post shows how to syntax highlighting code.
9
+
10
+ <!-- more -->
11
+
12
+ html:
13
+
14
+ ```html
15
+ <!DOCTYPE html>
16
+ <html lang="{{ page.lang | default: site.lang | default: "en" }}">
17
+
18
+ <body>
19
+ <main class="page-content" aria-label="Content">
20
+ <div class="wrapper">
21
+ </div>
22
+ </main>
23
+ </body>
24
+
25
+ </html>
26
+
27
+ ```
28
+
29
+ c++:
30
+
31
+ ```cpp
32
+ /*************************************************************************
33
+ * Copyright (c) 2014 Zhang Dongdong
34
+ * All rights reserved.
35
+ *
36
+ * Licensed under the Apache License, Version 2.0 (the "License");
37
+ * you may not use this file except in compliance with the License.
38
+ * You may obtain a copy of the License at
39
+ *
40
+ * http://www.apache.org/licenses/LICENSE-2.0
41
+ *
42
+ * Unless required by applicable law or agreed to in writing, software
43
+ * distributed under the License is distributed on an "AS IS" BASIS,
44
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
45
+ * See the License for the specific language governing permissions and
46
+ * limitations under the License.
47
+ **************************************************************************/
48
+ #include "sketchsearcher.h"
49
+ using namespace sse;
50
+
51
+ SketchSearcher::SketchSearcher(Json &config)
52
+ : _indexFile(config.getValue("searcher$indexfile", "/tmp/SketchSearchDemo/data/model_indexfile"))
53
+ , _vocabularyFile(config.getValue("searcher$vocabulary", "/tmp/SketchSearchDemo/data/vocabulary"))
54
+ , _fileList(config.getValue("searcher$filelist", "/tmp/SketchSearchDemo/data/model_filelist"))
55
+ , _numOfResults(convert<uint>(config.getValue("searcher$results_num", "25"), UINT))
56
+ , _numOfViews(convert<uint>(config.getValue("searcher$views_num", "1"), UINT))
57
+ {
58
+ index = new InvertedIndex();
59
+ index->load(_indexFile);
60
+
61
+ read(_vocabularyFile, vocabulary);
62
+
63
+ galif = new Galif();
64
+
65
+ quantizer = QuantizerHard<Vec_f32_t, L2norm_squared<Vec_f32_t> >();
66
+
67
+ files = new FileList;
68
+ files->load(_fileList);
69
+ }
70
+
71
+ SketchSearcher::~SketchSearcher()
72
+ {
73
+ delete index;
74
+ delete galif;
75
+ delete files;
76
+ }
77
+
78
+ void SketchSearcher::query(const std::string &fileName, QueryResults &results)
79
+ {
80
+ //extract features
81
+ KeyPoints_t keypoints;
82
+ Features_t features;
83
+ cv::Mat image = cv::imread(fileName.c_str());
84
+
85
+ galif->compute(image, keypoints, features);
86
+
87
+ //quantize
88
+ Vec_f32_t query;
89
+ quantize(features, vocabulary, query, quantizer);
90
+
91
+ TF_simple tf;
92
+ IDF_simple idf;
93
+
94
+ std::vector<ResultItem_t> _results;
95
+ //std::cout<< "query: " <<_results.size()<<std::endl;
96
+
97
+ if(_numOfViews == 1)
98
+ {
99
+ index->query(query, tf, idf, _numOfResults, _results);
100
+ }
101
+ else {
102
+ index->query(query, tf, idf, _numOfResults, _numOfViews, _results);
103
+ }
104
+
105
+ results.resize(_results.size());
106
+
107
+ for(uint i = 0; i < _results.size(); i++) {
108
+
109
+ results[i].ratio = _results[i].first;
110
+ results[i].imageIndex = _results[i].second;
111
+ results[i].imageName = files->getFilename(_results[i].second);
112
+ }
113
+ }
114
+ ```
data/about.md ADDED
@@ -0,0 +1,8 @@
1
+ ---
2
+ layout: post
3
+ title: About
4
+ ---
5
+
6
+ About page
7
+
8
+ If you have any question about this theme, please feel free to [email me](zddhub@gmail.com)
data/archive.md ADDED
@@ -0,0 +1,6 @@
1
+ ---
2
+ layout: archive
3
+ title: Archive
4
+ ---
5
+
6
+ # Archive
data/index.md ADDED
@@ -0,0 +1,10 @@
1
+ ---
2
+ layout: home
3
+ ---
4
+
5
+ ZDDHUB's blog
6
+ =============
7
+
8
+ Being talented just like being gravid, must be known with a long time past. I think I need more time to be talented, so I choose an easy one and named `gravid`. 😊
9
+
10
+ I still write something, as below:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gravid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - zddhub
@@ -59,6 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - 404.html
62
63
  - LICENSE.txt
63
64
  - README.md
64
65
  - _includes/footer.html
@@ -69,14 +70,20 @@ files:
69
70
  - _layouts/home.html
70
71
  - _layouts/page.html
71
72
  - _layouts/post.html
73
+ - _posts/2017-06-05-inspiration.md
74
+ - _posts/2017-06-07-first-blog.md
75
+ - _posts/2017-06-08-second-blog.md
72
76
  - _sass/gravid.scss
73
77
  - _sass/gravid/_base.scss
74
78
  - _sass/gravid/_layout.scss
75
79
  - _sass/gravid/_syntax-highlighting.scss
76
80
  - _sass/sofish/_typo.scss
81
+ - about.md
82
+ - archive.md
77
83
  - assets/avatar.jpg
78
84
  - assets/gravid_blog_preview.png
79
85
  - assets/main.scss
86
+ - index.md
80
87
  homepage: https://github.com/zddhub/gravid
81
88
  licenses:
82
89
  - MIT