Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 hashlib | |
| import random | |
| import time | |
| from collections import defaultdict | |
| class Transaction: | |
| def __init__(self, sender, recipient, amount, timestamp=None): | |
| self.sender = sender | |
| self.recipient = recipient | |
| self.amount = amount |
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 Windows terminal | |
| docker run -p 6080:80 --shm-size=512m --name ros_go1 -d tiryoh/ros-desktop-vnc:melodic | |
| # Access the instance through the url | |
| http://localhost:6080 | |
| # From home directory in Docker | |
| mkdir -p catkin_ws/src | |
| # Go into catkin workspace |
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
| docker run -p 6080:80 --shm-size=512m tiryoh/ros2-desktop-vnc:foxy | |
| # Go to http://localhost:6080 and open a terminal | |
| # Menu > System Tools > MATE Terminal | |
| sudo apt update | |
| mkdir -p ~/ros2_ws/src | |
| cd ~/ros2_ws/src |
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
| export const Colors = { | |
| primary: '#22C55E', | |
| darkPrimary: '#15803D', | |
| faintPrimary: '#D5EED6', | |
| tintPrimary: '#F0FDF4', | |
| background: '#F8F8F8', | |
| secondary: '#062638', | |
| textDark: '#191A1C', | |
| text: '#4B5563', |
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
| function replaceUri(uri) { | |
| if (uri.startsWith('ipfs')) { | |
| return uri.replace('ipfs://', 'https://ipfs.io/ipfs/'); | |
| } | |
| return uri; | |
| } | |
| async function fetchImageUri(uri) { | |
| if (!uri) { |
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 { createSlice } from '@reduxjs/toolkit'; | |
| const authSlice = createSlice({ | |
| name: 'auth', | |
| initialState: { | |
| user: null, | |
| isLoading: false, | |
| error: null, | |
| }, | |
| reducers: { |
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 { createSlice } from '@reduxjs/toolkit'; | |
| const initialState = { | |
| senderLocation: null, | |
| receiverLocation: null, | |
| // other state properties... | |
| }; | |
| const locationSlice = createSlice({ | |
| name: 'location', |
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 { createSlice } from '@reduxjs/toolkit'; | |
| const initialState = { | |
| senderLocation: null, | |
| receiverLocation: null, | |
| // other state properties... | |
| }; | |
| const locationSlice = createSlice({ | |
| name: 'location', |
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 { createSlice, createAsyncThunk } from '@reduxjs/toolkit'; | |
| const rideRequestSlice = createSlice({ | |
| name: 'rideRequest', | |
| initialState: { | |
| address: '', | |
| deliveryDetails: '', | |
| isLoading: false, | |
| error: null, | |
| }, |
NewerOlder