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
func renderer(_ renderer: SCNSceneRenderer, nodeFor anchor: ARAnchor) -> SCNNode? { | |
let node = SCNNode() | |
if let imageAnchor = anchor as? ARImageAnchor { | |
let plane = SCNPlane(width: imageAnchor.referenceImage.physicalSize.width, height: imageAnchor.referenceImage.physicalSize.height) | |
plane.firstMaterial?.diffuse.contents = UIColor(white: 1, alpha: 0.8) | |
let material = SCNMaterial() | |
material.diffuse.contents = viewObj | |
plane.materials = [material] | |
let planeNode = SCNNode(geometry: plane) | |
planeNode.eulerAngles.x = -.pi / 2 |
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
let configuration = ARImageTrackingConfiguration() | |
let warrior = ARReferenceImage(UIImage(named: "DD")!.cgImage!,orientation: CGImagePropertyOrientation.up,physicalWidth: 0.90) | |
configuration.trackingImages = [warrior] | |
configuration.maximumNumberOfTrackedImages = 1 |
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 android.os.Build | |
import android.view.ViewTreeObserver | |
import android.widget.TextView | |
/** | |
*Created by Amit.Bhati on 08/04/18. | |
*/ | |
class MultiLinesTextViewUtils(builder: Builder) { | |
private var getLines: GetLines = builder.getListener()!! |
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
pragma solidity ^0.4.15; | |
/** | |
* Overflow aware uint math functions. | |
*/ | |
contract SafeMath { | |
//internals | |
function safeMul(uint a, uint b) internal pure returns (uint) { | |
uint c = a * b; |
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
0x26FB0db2d1928528106dA9Cc9Be97e768aEe3e94 |
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
0x97178e7f1352da4Cf4Be0eCe8Ddb034F6c61214e |
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
# The function that rules them all! | |
# This function will be called when the script is executed and will ask the user for the seed and then listens to | |
# the users commands. All functions above will be called directly or indirectly through this function. | |
def main(): | |
ask_seed = True | |
while ask_seed: | |
global seed | |
global file_name | |
seed = log_in() | |
file_name = create_file_name() |
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
# Gets all assosiated transactions from the saved addresses and saves the transaction data in the account file | |
def get_transfers(full_history, print_history=True): | |
account_history_executing = True | |
api = Iota(iota_node, seed) | |
address_count = len(address_data) | |
all_txn_hashes = [] | |
saved_txn_hashes = [] | |
new_txn_hashes = [] | |
i = 0 |
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
# -------------------------------------Transaction history------------------------------------------------------------ | |
# Reads the data from the account file and displays it to the user. | |
# If full_history is True it will print all transactions that are saved. | |
# If full_history is false it will print only confirmed transactions unless the transaction is no older then | |
# 6 hours, then it will print the transaction regardless of it's confirmation state | |
def print_transaction_history(full_history=False, print_history=True): | |
regex = r"^(?=.*?[9])(?=.*?[A-Z])[A-Z9_]+$" | |
current_unix_time = time.time() |
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
#rotate servo motor according to transaction | |
def rotate_motor(): | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setwarnings(False) | |
GPIO.setup(25, GPIO.OUT) | |
pwm=GPIO.PWM(25,50) | |
pwm.start(7.5) | |
try: |