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
require 'csv' | |
# Parses CSV-exported data from SleepBot | |
def parse_export(row) | |
# Parse the wake up date | |
date_to = row[0].tr("'","").split('-') | |
date_to = Time.new(date_to[2].to_i, date_to[1], date_to[0]) | |
# Parse the wake up/sleep times | |
time_from = row[1].tr("'","").split(':') |
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 { Injectable } from '@angular/core'; | |
import * as kaiAds from '../../../assets/js/kaiads.min.js' | |
@Injectable({ | |
providedIn: 'root' | |
}) | |
export class KaiAdsService { | |
publisherId: string = 'XXXXXX' | |
testing: false |
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
static void start_accelerometer() { | |
sensor_type_e type = SENSOR_ACCELEROMETER; | |
int max_batch_latency = 30000; // 300 is max queue, 100 ms is default period | |
if (sensor_get_default_sensor(type, &sensor) == SENSOR_ERROR_NONE) | |
{ | |
if (sensor_create_listener(sensor, &listener) == SENSOR_ERROR_NONE | |
&& sensor_listener_set_max_batch_latency(listener, max_batch_latency) == SENSOR_ERROR_NONE | |
&& sensor_listener_set_event_cb(listener, 100, accelerometer_sensor_event_callback, NULL) == SENSOR_ERROR_NONE | |
&& sensor_listener_set_option(listener, SENSOR_OPTION_ALWAYS_ON) == SENSOR_ERROR_NONE |
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 { expose } from "threads/worker" | |
import app from '../../app' | |
const jobWorker = { | |
async doMyJob() { | |
const reports: Report[] = await app.service('reports').create() | |
} | |
} |
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 { expose } from "threads/worker" | |
const jobWorker = { | |
async doMyJob() { | |
console.log('Hello from worker thread!') | |
} | |
} | |
export type JobWorker = typeof jobWorker | |
expose(jobWorker) |
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
sudo apt-get update | |
sudo apt-get install repo |
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
mkdir projectDir | |
cd projectDir |
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
python3 /usr/bin/repo init -u https://android.googlesource.com/platform/manifest -b android-security-10.0.0_r58 |
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
python3 /usr/bin/repo sync |
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
source build/envsetup.sh | |
m -j CtsVerifier |