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
| # dependencies for our dijkstra's implementation | |
| from queue import PriorityQueue | |
| from math import inf | |
| # graph dependency | |
| import networkx as nx | |
| """Dijkstra's shortest path algorithm""" | |
| def dijkstra(graph: 'networkx.classes.graph.Graph', start: str, end: str) -> 'List': | |
| """Get the shortest path of nodes by going backwards through prev list |
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
| """os.walk() variation with Google Drive API v3.""" | |
| from collections.abc import Iterator, Sequence | |
| import os | |
| import pathlib | |
| from typing import TypedDict | |
| # $ pip install google-api-python-client google-auth-oauthlib | |
| from apiclient import discovery | |
| from google.oauth2 import credentials |
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 Foundation | |
| import AudioToolbox | |
| class KKSimplePlayer: NSObject { | |
| var URL: NSURL | |
| var URLSession: NSURLSession! | |
| var packets = [NSData]() | |
| var audioFileStreamID: AudioFileStreamID = nil | |
| var outputQueue: AudioQueueRef = nil | |
| var streamDescription: AudioStreamBasicDescription? |