pmset -g assertions sudo powermetrics --show-process-energy sudo pmset schedule cancelall pmset -g log | grep "Wake Requests"
suggestions:
https://twitter.com/jckwhet/status/1018256785839394816?lang=en
➜ sqlitetest time ./main | |
=== SQLite Load Testing Program === | |
Database path: ./people.db | |
=== DATABASE ALREADY CONTAINS 3230001 RECORDS === | |
Proceeding with queries... | |
=== QUERY BY SSN TIMING === | |
Running 1000 random SSN queries... | |
Queried 100/1000 SSNs (23728.07 queries/sec, 10.00% complete) |
package main | |
import ( | |
"cloud.google.com/go/storage" | |
"context" | |
"fmt" | |
"math/rand" | |
"os" | |
"os/signal" | |
"sync" |
package main | |
import ( | |
"context" | |
"flag" | |
"fmt" | |
"github.com/redis/go-redis/v9" | |
"golang.org/x/sync/errgroup" | |
"math/rand" | |
"net" |
pmset -g assertions sudo powermetrics --show-process-energy sudo pmset schedule cancelall pmset -g log | grep "Wake Requests"
suggestions:
https://twitter.com/jckwhet/status/1018256785839394816?lang=en
Programmatic finished in 687498 ms | |
Programmatic finished in 1152935 ms | |
Ran calculations 1000000000 times. Results: | |
|-----------------------------------| | |
| Flips | Programmatic | Mathy | | |
|-----------------------------------| | |
| 0 | 499999527 | 499991146 | | |
| 1 | 249993072 | 249998627 | | |
| 2 | 125001055 | 125011612 | |
match (p:person)-[:transact]->(:order)-[:contain]->(:product)<-[:contain]-(:order)-[:contain]->(prd:product) where p.id=294 return distinct prd limit 1 | |
redis graph | |
https://youtu.be/JNpHba2kRGM | |
https://youtu.be/aGHALjV6JGc | |
https://youtu.be/FC4PVQpwhqQ |
#!/usr/bin/env groovy | |
@Grapes([ | |
@Grab(group='redis.clients', module='jedis', version='3.2.0'), | |
@Grab(group='org.slf4j', module='slf4j-nop', version='1.7.30') | |
]) | |
import redis.clients.jedis.JedisPool | |
def jedisPool = new JedisPool() |
package main | |
import ( | |
"flag" | |
"github.com/thoas/go-funk" | |
"log" | |
"time" | |
) | |
type result struct { |
@Grapes([ | |
@Grab(group='org.apache.pdfbox', module='pdfbox', version='2.0.13'), | |
@Grab(group='org.apache.tika', module='tika-core', version='1.18'), | |
@Grab(group='me.xdrop', module='fuzzywuzzy', version='1.2.0') | |
]) | |
import org.apache.pdfbox.pdmodel.PDDocument | |
import org.apache.pdfbox.text.PDFTextStripper | |
import org.apache.tika.Tika | |
import java.util.concurrent.ConcurrentLinkedQueue |
from __future__ import division | |
import sheep | |
from color import RGB | |
A = [1, 3, 4, 7, 9, 12, 16, 18, 19, 21, 22, 24, 27, 30, 33, 35, 37, 39, 42] | |
B = [2, 5, 6, 8, 11, 13, 14, 15, 17, 20, 23, 25, 26, 28, 29, 31, 32, 34, 36, 40, 41, 43] | |
class Josh(object): |