Skip to content

Commit

Permalink
Allow specifying priority in config, make report 23 #1
Browse files Browse the repository at this point in the history
  • Loading branch information
lmcnulty committed Aug 3, 2022
1 parent caa08c6 commit f5aa774
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 32 deletions.
66 changes: 35 additions & 31 deletions site/gatsby-site/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,37 +41,41 @@ const config = {
algoliaAppId: process.env.GATSBY_ALGOLIA_APP_ID || 'JD5JCVZEVS',
algoliaSearchKey: process.env.GATSBY_ALGOLIA_SEARCH_KEY || 'c5e99d93261645721a1765fe4414389c',
algoliaAdminKey: process.env.ALGOLIA_ADMIN_KEY,
featured: [
12, // YouTube says it will crack down on bizarre videos targeting children
23, // Is Starbucks shortchanging its baristas?
45, // Google's Anti-Bullying AI Mistakes Civility for Decency
101, // Google Photo App Labels Black Couple 'Gorillas'
217, // Tougher Turing Test Exposes Chatbots’ Stupidity
368, // Because Stanislav Petrov reported a computer malfunction in 1983, we know him today as "The man who saved the world"
392, // 'Flash Crash' arrest shakes investors' confidence
519, // TV news report prompts viewers' Amazon Echo devices to order unwanted dollhouses
595, // Chinese AI traffic cam mistook a bus ad for a human and publicly shamed the CEO it depicted for jaywalking
620, // Is AI Sexist?
679, // A.I. Video Depicting Barack Obama Shows Dangers of Fake News
835, // LinkedIn’s search algorithm apparently favored men until this week
1065, // Centrelink robo-debt 'abject failure' and arguably unlawful, Victoria Legal Aid says
1118, // That Viral 'FaceApp' Is Making Everyone Look Whiter
1235, // Security robot 'drowns itself' in office fountain
1245, // Robot Stabs A Man To Death At A Factory In Haryana's Manesar!
1374, // Tay (bot)
1420, // South Korean AI chatbot pulled from Facebook after hate speech towards minorities
1427, // Fired by Bot at Amazon: ‘It’s You Against the Machine’
1468, // TikTok Deleted My Account Because I’m a Latina Trans Woman
1470, // The Death and Life of an Admissions Algorithm
1505, // Students of color are getting flagged to their teachers because testing software can’t see them
1509, // Humanoid Robot Keeps Getting Fired From His Jobs
1539, // Why Stanford Researchers Tried to Create a ‘Gaydar’ Machine
1543, // How Wrongful Arrests Based on AI Derailed 3 Men's Lives
1551, // Hundreds of AI tools have been built to catch covid. None of them helped.
1561, // A new AI draws delightful and not-so-delightful images
1606, // Driverless car starts to pull away after being stopped by police
1773, // Chess robot goes rogue, breaks seven-year-old player's finger
],
featured: {
/* <report_number>: <priority>
*
* (The higher the priority, the earlier an item will appear in the initial results)
*/
23: 2, // Is Starbucks shortchanging its baristas?
12: 1, // YouTube says it will crack down on bizarre videos targeting children
45: 1, // Google's Anti-Bullying AI Mistakes Civility for Decency
101: 1, // Google Photo App Labels Black Couple 'Gorillas'
217: 1, // Tougher Turing Test Exposes Chatbots’ Stupidity
368: 1, // Because Stanislav Petrov reported a computer malfunction in 1983, we know him today as "The man who saved the world"
392: 1, // 'Flash Crash' arrest shakes investors' confidence
519: 1, // TV news report prompts viewers' Amazon Echo devices to order unwanted dollhouses
595: 1, // Chinese AI traffic cam mistook a bus ad for a human and publicly shamed the CEO it depicted for jaywalking
620: 1, // Is AI Sexist?
679: 1, // A.I. Video Depicting Barack Obama Shows Dangers of Fake News
835: 1, // LinkedIn’s search algorithm apparently favored men until this week
1065: 1, // Centrelink robo-debt 'abject failure' and arguably unlawful, Victoria Legal Aid says
1118: 1, // That Viral 'FaceApp' Is Making Everyone Look Whiter
1235: 1, // Security robot 'drowns itself' in office fountain
1245: 1, // Robot Stabs A Man To Death At A Factory In Haryana's Manesar!
1374: 1, // Tay (bot)
1420: 1, // South Korean AI chatbot pulled from Facebook after hate speech towards minorities
1427: 1, // Fired by Bot at Amazon: ‘It’s You Against the Machine’
1468: 1, // TikTok Deleted My Account Because I’m a Latina Trans Woman
1470: 1, // The Death and Life of an Admissions Algorithm
1505: 1, // Students of color are getting flagged to their teachers because testing software can’t see them
1509: 1, // Humanoid Robot Keeps Getting Fired From His Jobs
1539: 1, // Why Stanford Researchers Tried to Create a ‘Gaydar’ Machine
1543: 1, // How Wrongful Arrests Based on AI Derailed 3 Men's Lives
1551: 1, // Hundreds of AI tools have been built to catch covid. None of them helped.
1561: 1, // A new AI draws delightful and not-so-delightful images
1606: 1, // Driverless car starts to pull away after being stopped by police
1773: 1, // Chess robot goes rogue, breaks seven-year-old player's finger
},
},
},
sidebar: {
Expand Down
2 changes: 1 addition & 1 deletion site/gatsby-site/src/utils/AlgoliaUpdater.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class AlgoliaUpdater {
incident_id: incident.incident_id,
incident_date: incident.date,
epoch_incident_date: getUnixTime(new Date(incident.date)),
featured: config?.header?.search?.featured.includes(report.report_number) ? 1 : 0,
featured: config?.header?.search?.featured[report.report_number] || 0,
};

if (classificationsHash[entry.incident_id]) {
Expand Down

0 comments on commit f5aa774

Please sign in to comment.