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
| #!/usr/bin/env python3 | |
| """ | |
| Samsung Motion Photo extractor | |
| This code is the minimal version of the work in https://github.com/joemck/ExtractMotionPhotos | |
| Usage: python3 samsung_motion_photo_extractor.py <motion_photo_file> | |
| """ | |
| def init_search(magic): | |
| """ |
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 { useState, useCallback, useRef } from 'react'; | |
| function useWebSocket(url) { | |
| const [isConnected, setConnected] = useState(false); | |
| const [socket, setSocket] = useState(null); | |
| const isReconnectionEnable = useRef(true); | |
| const setReconnectionEnable = useCallback((newValue) => { | |
| isReconnectionEnable.current = newValue; | |
| }, []); |
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
| extension UIView { | |
| func bounceAnimationX(angle: Double, speed: Double = 1) { | |
| var inTransform = CATransform3DIdentity; | |
| inTransform.m34 = 1.0 / 1000.0; | |
| inTransform = CATransform3DRotate(inTransform, CGFloat(angle * Double.pi / 180), 0, 1, 0) | |
| var outTransform = CATransform3DIdentity; | |
| outTransform.m34 = 1.0 / 500.0; | |
| outTransform = CATransform3DRotate(outTransform, 0, 0, 1, 0) | |