Skip to content

Commit f3386a9

Browse files
fix production build issue
1 parent 17b3e42 commit f3386a9

File tree

6 files changed

+777
-866
lines changed

6 files changed

+777
-866
lines changed

content/blog/artificial-intelligence-and-machine-learning-what-are-they-and-why-are-t.md

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ thumbnailimage:
1010
---
1111
**Editor’s Note:** MapR products and solutions sold prior to the acquisition of such assets by Hewlett Packard Enterprise Company in 2019, may have older product names and model numbers that differ from current solutions. For information about current offerings, which are now part of HPE Ezmeral Data Fabric, please visit [https://www.hpe.com/us/en/software/data-fabric.html](https://www.hpe.com/us/en/software/data-fabric.html)
1212

13-
## Original Post Information:
13+
## Original Post Information
1414

1515
```
1616
"authorDisplayName": "Saira Kennedy",
@@ -22,8 +22,6 @@ thumbnailimage:
2222

2323
Editor's Note: This post is based on the MapR Academy course, [_Introduction to Artificial Intelligence and Machine Learning_](https://learn.ezmeral.software.hpe.com/bus-introduction-to-artificial-intelligence-and-machine-learning).
2424

25-
<div style="padding:75% 0 0 0;position:relative;"><iframe src="https://player.vimeo.com/video/279683304?title=0&byline=0&portrait=0" style="position:absolute;top:0;left:0;width:100%;height:100%;" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe></div><script src="https://player.vimeo.com/api/player.js"></script>
26-
2725
This post will give you a basic background on artificial intelligence and machine learning. It's a good place to gain an intro-level, working understanding of the categories, how they fit together, and their differences.
2826

2927
In this post, we begin by defining the differences between artificial intelligence and machine learning and what these terms mean. In future posts, we will discuss the different methods of machine learning and some of the most common algorithms available for your projects. After that, you'll learn about real-world use cases, utilizing this technology, and the unique value MapR solutions provide for machine learning endeavors.
@@ -60,9 +58,9 @@ Remember from the robot nesting doll example that machine learning is nested wit
6058

6159
Symbolic artificial intelligence is one of the first approaches to AI, which is based on the assertion that human intelligence can be achieved through the manipulation of symbols. This is the basis for physical symbol systems, also called formal systems, which center around three basic concepts that follow human thinking abilities:
6260

63-
* Symbols, like the plus sign as the physical joining of two perpendicular lines, are first encoded in our brains.
64-
* Thoughts are the structures, like the plus sign means to add things together.
65-
* The manipulation process is the act of thinking, or applying the symbol and its structure together, like when we use the plus sign in a mathematical equation for one plus two equals three.
61+
* Symbols, like the plus sign as the physical joining of two perpendicular lines, are first encoded in our brains.
62+
* Thoughts are the structures, like the plus sign means to add things together.
63+
* The manipulation process is the act of thinking, or applying the symbol and its structure together, like when we use the plus sign in a mathematical equation for one plus two equals three.
6664

6765
![](https://hpe-developer-portal.s3.amazonaws.com/uploads/media/2020/11/image15-1605168382441.jpg)
6866

gatsby-config.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,18 @@ const lunrHighlightPlugin = () => (builder) => {
88
builder.metadataWhitelist.push('position');
99
};
1010

11-
const stripMarkdown = (markdown) => {
12-
let text = markdown;
13-
remark()
11+
const stripMarkdown = async (markdown) => {
12+
// let text = markdown;
13+
// remark.then(r => {
14+
// r.remark().use(strip).process(markdown, (err, file) => {
15+
// text = file.contents;
16+
// });
17+
// });
18+
// return text;
19+
const markedup = await (await remark).remark()
1420
.use(strip)
15-
.process(markdown, (err, file) => {
16-
text = file.contents;
17-
});
18-
return text;
21+
.process(markdown);
22+
return markedup.contents;
1923
};
2024

2125
const paginatedCollection = (name, tag) => {

gatsby-node.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ exports.createPages = async ({ graphql, actions }) => {
6464
badgeImg,
6565
},
6666
});
67-
console.log(
68-
`Create pages /hackshack/workshops/${id - 1}/special-badge from ${id}`,
69-
);
70-
console.log('------------------------------');
67+
// console.log(
68+
// `Create pages /hackshack/workshops/${id - 1}/special-badge from ${id}`,
69+
// );
70+
// console.log('------------------------------');
7171
});
7272
} catch (error) {
7373
console.log('error: ', error);
@@ -93,8 +93,8 @@ exports.createPages = async ({ graphql, actions }) => {
9393
},
9494
});
9595

96-
console.log(`Create pages /hackshack/replays/${id} from ${id}`);
97-
console.log('------------------------------');
96+
// console.log(`Create pages /hackshack/replays/${id} from ${id}`);
97+
// console.log('------------------------------');
9898

9999
createPage({
100100
path: `/hackshack/workshop/${id}`,
@@ -107,8 +107,8 @@ exports.createPages = async ({ graphql, actions }) => {
107107
},
108108
});
109109

110-
console.log(`Create pages /hackshack/workshop/${id} from ${id}`);
111-
console.log('------------------------------');
110+
// console.log(`Create pages /hackshack/workshop/${id} from ${id}`);
111+
// console.log('------------------------------');
112112

113113
createPage({
114114
path: `/hackshack/workshop/${id}/finisher-badge`,
@@ -121,10 +121,10 @@ exports.createPages = async ({ graphql, actions }) => {
121121
},
122122
});
123123

124-
console.log(
125-
`Create pages /hackshack/workshop/${id}/finisher-badge from ${id}`,
126-
);
127-
console.log('------------------------------');
124+
// console.log(
125+
// `Create pages /hackshack/workshop/${id}/finisher-badge from ${id}`,
126+
// );
127+
// console.log('------------------------------');
128128
});
129129
} catch (error) {
130130
console.log('error: ', error);
@@ -294,10 +294,10 @@ exports.createPages = async ({ graphql, actions }) => {
294294
index === posts.length - 1 ? null : posts[index + 1].node;
295295
const next = index === 0 ? null : posts[index - 1].node;
296296
const { sourceInstanceName, slug } = post.node.fields;
297-
console.log(
298-
`Create pages /${sourceInstanceName}${slug} from ${slug}`,
299-
);
300-
console.log('------------------------------');
297+
// console.log(
298+
// `Create pages /${sourceInstanceName}${slug} from ${slug}`,
299+
// );
300+
// console.log('------------------------------');
301301
createPage({
302302
path: `/${sourceInstanceName}${slug}`,
303303
component: blogPost,
@@ -411,8 +411,8 @@ exports.createPages = async ({ graphql, actions }) => {
411411
});
412412
const tags = result.data.tagsGroup.group;
413413
tags.forEach((tag) => {
414-
console.log(`Create pages /blog/tag/${tag.fieldValue.toLowerCase()}/`);
415-
console.log('------------------------------');
414+
// console.log(`Create pages /blog/tag/${tag.fieldValue.toLowerCase()}/`);
415+
// console.log('------------------------------');
416416
createPage({
417417
path: `/blog/tag/${tag.fieldValue.toLowerCase()}/`,
418418
component: tagTemplate,
@@ -429,7 +429,7 @@ exports.createPages = async ({ graphql, actions }) => {
429429
exports.onCreatePage = ({ page, actions }) => {
430430
const { deletePage, createPage } = actions;
431431

432-
console.log(`onCreatePage ${page.componentPath}`);
432+
// console.log(`onCreatePage ${page.componentPath}`);
433433
return new Promise((resolve) => {
434434
// if the page component is the index page component
435435
if (page.componentPath.indexOf('/src/pages/Home/index.js') >= 0) {
@@ -450,7 +450,7 @@ exports.onCreateNode = ({ node, actions, getNode }) => {
450450

451451
if (node.internal.type === 'MarkdownRemark') {
452452
const { sourceInstanceName, absolutePath } = getNode(node.parent);
453-
console.log(`==== onCreateNode ${sourceInstanceName} ---- ${absolutePath}`);
453+
// console.log(`==== onCreateNode ${sourceInstanceName} ---- ${absolutePath}`);
454454
const value = createFilePath({ node, getNode });
455455
const date = new Date(node.frontmatter.date);
456456
const year = date.getFullYear();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
"react-player": "^2.13.0",
5454
"react-syntax-highlighter": "^15.5.0",
5555
"redux": "^5.0.0",
56-
"remark": "^15.0.1",
56+
"remark": "14.0.3",
5757
"strip-markdown": "^6.0.0",
5858
"styled-components": "5.3.11",
5959
"sweetalert2": "^11.10.1",

src/containers/SearchContainer/index.js

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -140,10 +140,9 @@ const getSearchResults = async (query) => {
140140

141141
const SearchContainer = ({ location }) => {
142142
const { term } = useParams(location);
143-
const initialSearch = getSearchResults(term);
144143
const [value, setValue] = useState(term);
145-
const [results, setResults] = useState(initialSearch.searchResults);
146-
const [categories, setCategories] = useState(initialSearch.searchCategories);
144+
const [results, setResults] = useState();
145+
const [categories, setCategories] = useState();
147146
const [activeCategoryIndex, setActiveCategoryIndex] = useState(0);
148147

149148
useEffect(() => {
@@ -164,12 +163,8 @@ const SearchContainer = ({ location }) => {
164163
setValue(newValue);
165164

166165
// update the URL
167-
const query = newValue ? `?term=${encodeURIComponent(newValue)}` : '';
168-
navigate(`/search/${query}`, { replace: true });
169-
170-
const { searchResults, searchCategories } = getSearchResults(newValue);
171-
setResults(searchResults);
172-
setCategories(searchCategories);
166+
// const query = newValue ? `?term=${encodeURIComponent(newValue)}` : '';
167+
// navigate(`/search/${query}`, { replace: true });
173168
// todo update route term= param
174169
};
175170

0 commit comments

Comments
 (0)