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
// | |
// RCTVisionModule.m | |
// VisionNativeModulePOC | |
// | |
// Created by Tanner West on 6/2/23. | |
// | |
#import <Foundation/Foundation.h> | |
#import <React/RCTBridgeModule.h> |
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, {FC} from 'react'; | |
import {Button, NativeModules, SafeAreaView} from 'react-native'; | |
const {VisionModule} = NativeModules; | |
const App: FC = () => { | |
return ( | |
<SafeAreaView> | |
<Button title="Say Hello" onPress={() => VisionModule?.sayHello()} /> | |
</SafeAreaView> | |
); |
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
// | |
// RCTVisionModule.m | |
// VisionNativeModulePOC | |
// | |
// Created by Tanner West on 6/2/23. | |
// | |
#import <Foundation/Foundation.h> | |
#import <React/RCTBridgeModule.h> |
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
// | |
// RCTVisionModule.swift | |
// VisionNativeModulePOC | |
// | |
// Created by Tanner West on 6/2/23. | |
// | |
import Foundation | |
@objc(RCTVisionModule) | |
class RCTVisionModule: NSObject { |
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
{ | |
tweets: [ | |
{ | |
dateTimeISO: '1776-07-04T12:00:00Z', | |
content: 'We hold these truths to be self-evident, that all men are created equal, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness. #IndependenceDay', | |
sender: 'Thomas Jefferson' | |
}, | |
{ | |
dateTimeISO: '1776-07-04T12:10:00Z', | |
content: 'Today is a day that will be remembered throughout history. The Continental Congress has declared independence from Great Britain. Let freedom ring! 🇺🇸 #IndependenceDay', |
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
const { Configuration, OpenAIApi } = require("openai"); | |
const configuration = new Configuration({ | |
apiKey: "xxx", | |
}); | |
const openai = new OpenAIApi(configuration); | |
async function callCompletionAPI() { | |
try { |
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
from PIL import Image | |
import os | |
import colorsys | |
def hue_rotation(image_path, output_path, degrees): | |
image = Image.open(image_path) | |
image = image.convert("RGB") | |
pixels = image.load() | |
width, height = image.size | |
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
// | |
// RCTVisionModule.m | |
// VisionNativeModulePOC | |
// | |
// Created by Tanner West on 6/2/23. | |
// | |
#import <Foundation/Foundation.h> | |
#import <React/RCTBridgeModule.h> |
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
// | |
// RCTVisionModule.swift | |
// VisionNativeModulePOC | |
// | |
// Created by Tanner West on 6/2/23. | |
// | |
import Foundation | |
@objc(RCTVisionModule) |
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 { | |
Button, | |
RefreshControl, | |
SafeAreaView, | |
ScrollView, | |
Text, | |
View, | |
} from "react-native"; | |
import { Provider, useDispatch, useSelector } from "react-redux"; | |
import { configureStore } from "@reduxjs/toolkit"; |