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
void _process() async { | |
final uuid = Uuid(); | |
final random = uuid.v4(); | |
final outputFilename = | |
"${(await getTemporaryDirectory()).path}/$random.png"; | |
await compute(stitch, [widget.images, outputFilename]); | |
setState(() { | |
_outputFilename = outputFilename; | |
}); | |
img.Image? output = await img.decodeImageFile(outputFilename); |
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
require("dotenv").config(); | |
const fs = require("fs"); | |
const FormData = require("form-data"); | |
var rfs = require("recursive-fs"); | |
const basePathConverter = require("base-path-converter"); | |
const got = require("got"); | |
const pinDirectoryToPinata = async (src) => { | |
const url = `https://api.pinata.cloud/pinning/pinFileToIPFS`; | |
var status = 0; |
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
suspend fun syncResults(progress: (message: String) -> Unit) { | |
val directory = resultsDirectory | |
val files = directory.listFiles() | |
if (files.size == 0) return | |
progress("starting results sync") | |
files.map { | |
ioScope.launch { | |
progress("uploading planogram $it") | |
val jsonString = it.readText() |
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
class YoloObjectDetection private constructor(context: Context) { | |
companion object { | |
@Volatile private var INSTANCE: YoloObjectDetection? = null | |
fun getInstance(context: Context): YoloObjectDetection = | |
INSTANCE ?: synchronized(this) { INSTANCE ?: YoloObjectDetection(context).also { INSTANCE = it}} | |
} | |
} |
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
import React, { useEffect, useState, useCallback, useRef } from 'react'; | |
import Axios from 'axios'; | |
import WaveformCanvas from './WaveformCanvas'; | |
import Timeline from './Timeline'; | |
import { useAnimationFrame } from '../../helpers/helper'; | |
import { useKeyPress } from '../../hooks/keyPressHooks'; | |
export default function Waveform({ src }) { | |
const audioContextRef = useRef(); | |
const audioBufferRef = useRef(); |
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
import React, { useEffect, useState, useRef } from "react"; | |
import WaveSurfer from "wavesurfer.js"; | |
import TimeLine from "wavesurfer.js/dist/plugin/wavesurfer.timeline"; | |
import MyTimeLine from "./wavesurfer.markers"; | |
import { useKeyPress } from "./keyPressHooks"; | |
import SoundTouch from "./soundtouch"; | |
const ZOOM_RANGE = { | |
min: 20, | |
max: 200 |
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
import React, { useState } from 'react'; | |
import { Form, Header, Segment, Dropdown, Label, Button } from 'semantic-ui-react'; | |
import { Query, Mutation } from 'react-apollo'; | |
import gql from 'graphql-tag'; | |
import MembersSelectionBox from './MembersSelectionBox'; | |
export default ({ id, onSaved }) => { | |
const [name, setName] = useState(); | |
return ( | |
<Segment> |
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
version: "3" | |
services: | |
server: | |
image: node:8 | |
volumes: | |
- ./:/app | |
working_dir: /app | |
depends_on: | |
- mongo | |
environment: |
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
import {Animated, Dimensions, NativeModules, Platform, StyleSheet} from 'react-native'; | |
import {formStyle} from './forms'; | |
import {FEED} from './app'; | |
import DeviceInfo from 'react-native-device-info'; | |
import * as config from '../config'; | |
const { StatusBarManager } = NativeModules; | |
const WIDTH = Dimensions.get('window').width; | |
const HEIGHT = Dimensions.get('window').height; |
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
fun setExactAlarm(type: Int, triggerAtMillis: Long, operation: PendingIntent ) { | |
if (Build.VERSION.SDK_INT >= 23) | |
alarmManager.setExactAndAllowWhileIdle(type, triggerAtMillis, operation) | |
else if (Build.VERSION.SDK_INT >= 19) | |
alarmManager.setExact(type, triggerAtMillis, operation) | |
else | |
alarmManager.set(type, triggerAtMillis, operation) | |
} | |
setExactAlarm(AlarmManager.ELAPSED_REALTIME_WAKEUP, SystemClock.elapsedRealtime() + (1000 * notification.active_after), |
NewerOlder