This file contains 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
import { fox } from 'fetchfox'; | |
const f = await fox | |
.config({ | |
diskCache: '/tmp/fetchfox_cache', | |
fetcher: ['playwright', { headless: false, wait: 4000 }], | |
}) | |
.init('https://www.google.com/search?q=alabama+political+ad+agencies') | |
.crawl({ query: 'find links to earch results linking to ad agency companies. offsite search results only, not the ones on google.com.', limit: 10 }) | |
.extract({ |
This file contains 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
const scoreDataPoint = (dataPoint) => { | |
const sec = dataPoint.sec; | |
const cost = dataPoint.cost * 1000; // per 1k | |
const secBench = { good: 4, ok: 10, bad: 30 }; | |
const costBench = { good: 1, ok: 5, bad: 15 }; | |
let penalty = 1.0; | |
let secScore = 0.0; |
This file contains 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
package main | |
import ( | |
"fmt" | |
"time" | |
"github.com/garyburd/redigo/redis" | |
) | |
func main() { |
This file contains 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
package main | |
import ( | |
"fmt" | |
"time" | |
"github.com/garyburd/redigo/redis" | |
) | |
var test1Script = redis.NewScript(1, ` |