Skip to content

Instantly share code, notes, and snippets.

View codetricity's full-sized avatar

Craig Oda codetricity

View GitHub Profile
@codetricity
codetricity / main.dart
Last active November 10, 2021 03:47
THETA ATK Layout Tutorial
import 'package:flutter/material.dart';
import 'package:thetaf/thetaf.dart';
void main() {
runApp(const AtkTutorial());
}
class AtkTutorial extends StatelessWidget {
const AtkTutorial({Key? key}) : super(key: key);
@codetricity
codetricity / main.dart
Created November 10, 2021 00:46
Oppkey THETA ATK Tutorial - Getting Started
import 'package:flutter/material.dart';
import 'package:thetaf/thetaf.dart';
void main() {
runApp(const AtkTutorial());
}
class AtkTutorial extends StatelessWidget {
const AtkTutorial({Key? key}) : super(key: key);
@codetricity
codetricity / main.dart
Created November 9, 2021 18:27
Simple template for Flutter App
import 'package:flutter/material.dart';
/// simple template for Flutter app
void main() {
runApp(const AtkTutorial());
}
class AtkTutorial extends StatelessWidget {
const AtkTutorial({Key? key}) : super(key: key);
@codetricity
codetricity / Main.java
Created November 9, 2021 15:20
example of finding matches in a string
public class Main {
public static void main(String[] args) {
String data = "CCAAAAATTT!";
char maxLetter = data.charAt(0);
int maxCount = 1;
for (int i = 0; i < data.length() -1; i++) {
int currentCount = 1;
char letter = data.charAt(i);
@codetricity
codetricity / main.dart
Last active June 14, 2021 01:28
Basic Dart Stream example
void main() async {
Stream<String> sushi = Stream<String>.periodic(Duration(seconds: 1), (x) => '$x: fish').take(10);
var mappedSushi = sushi.map((sushiPiece) => sushiPiece + ' mapped');
await mappedSushi.forEach( print);
}
/* output
0: fish mapped
1: fish mapped
@codetricity
codetricity / main.dart
Created August 2, 2020 00:22 — forked from alexeyismirnov/main.dart
MJPEG player written entirely in Flutter/Dart
import 'package:flutter/material.dart';
import 'mjpeg_view.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
@codetricity
codetricity / MainActivity.java
Created April 9, 2020 12:33
RICOH THETA Plug-in sample code by KA-2 for TensorFlow Lite plug-in
/**
* Copyright 2018 Ricoh Company, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
@codetricity
codetricity / theta_v_discover.py
Last active November 8, 2019 08:07
Ricoh THETA V client mode WiFi discovery for use with companion script to run WiFi API to control camera
#!/usr/bin/env python3
""" Example of browsing for a service (in this case, HTTP) """
import logging
import socket
import sys
from time import sleep
from zeroconf import ServiceBrowser, ServiceStateChange, Zeroconf
@codetricity
codetricity / theta_client_mode.py
Created February 26, 2018 22:54
THETA V Client Mode Test Script using Digest Authentication
"""
Test for THETA V client mode. Your workstation and the THETA V need to be
connected to the same WiFi router.
This test script uses Python modules requests and pprint.
To install requests and pprint
$ pip install requests
$ pip install pprint
Once connected with WiFi, use the API here:
@codetricity
codetricity / Oled.java
Last active June 20, 2019 00:51
RICOH THETA Z1 Open Source KA-2 OLED Library
/**
* Copyright 2018 Ricoh Company, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software