This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <xmmintrin.h> | |
| #define SIZE 600 | |
| float rgb_sum_product(float * pixels) { | |
| float sum_red = 0.0, sum_green = 0.0, sum_blue = 0.0; | |
| for (int i = 0; i < SIZE - 3; i += 3) { | |
| sum_red = sum_red + pixels[i]; |
This file contains hidden or 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
| #!/bin/bash | |
| # Script: my-pi-temp.sh | |
| # Purpose: Display the ARM CPU and GPU temperature of Raspberry Pi 2/3 | |
| # Author: Vivek Gite <www.cyberciti.biz> under GPL v2.x+ | |
| # ------------------------------------------------------- | |
| cpu=$(</sys/class/thermal/thermal_zone0/temp) | |
| echo "$(date) @ $(hostname)" | |
| echo "-------------------------------------------" | |
| echo "GPU => $(/opt/vc/bin/vcgencmd measure_temp)" | |
| echo "CPU => $((cpu/1000))'C" |
This file contains hidden or 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
| // Run this to set the graphql exposed name for columns and built-in hasura graphql action to | |
| // Afterwards run metadata export as the metadata set into the server does not write back out through docker to local file system | |
| // `npx hasura --project ../hasura metadata export` | |
| import { getIntrospectionQuery } from 'graphql' | |
| import http from 'http' | |
| import url from 'url' | |
| import fs from 'fs' | |
| import dotenv from 'dotenv' | |
| import fetch from 'node-fetch' |
This file contains hidden or 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
| p() { | |
| if [[ -f bun.lockb ]]; then | |
| echo "Using bun" | |
| command bun "$@" | |
| elif [[ -f pnpm-lock.yaml ]]; then | |
| echo "Using pnpm" | |
| command pnpm "$@" | |
| elif [[ -f yarn.lock ]]; then | |
| echo "Using yarn" | |
| command yarn "$@" |
OlderNewer