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
func palindrome(string: String) -> Bool { | |
var replacedString = string.replacingOccurrences(of: " ", with: "") | |
replacedString = replacedString.components(separatedBy:.punctuationCharacters).joined() | |
return replacedString.lowercased() == String(replacedString.lowercased().reversed()) | |
} |
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
class ViewController: UIViewController, ARSCNViewDelegate, ARSessionDelegate { | |
@IBOutlet weak var sceneView: ARSCNView! | |
override func viewDidLoad() { | |
super.viewDidLoad() | |
} | |
func run() { | |
let configuration = ARWorldTrackingConfiguration() |
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
def main(): | |
crawl = WebCrawler() | |
new_data = crawl.request_resource() | |
if new_data is not None: | |
for url in new_data: | |
print(url) |
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
def request_resource(self): | |
r = requests.get(self.url) | |
urls = re.findall('http[s]?://(?:[a-zA-Z]|[0-9]|[$-_@.&+]|[!*\(\),]|(?:%[0-9a-fA-F][0-9a-fA-F]))+', r.text) | |
return urls |
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
def __init__(self): | |
print(sys.argv[0]) | |
if sys.argv[1].startswith("http://") or sys.argv[1].startswith("https://"): | |
self.url = sys.argv[1] | |
else: | |
self.url = "https://" + sys.argv[1] |
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 UIKit | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
var coordinator: MainCoordinator! | |
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { | |
window = UIWindow(frame: UIScreen.main.bounds) |
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 UIKit | |
protocol ApplicationCoordinator { | |
var appCoordinator: Coordinator! { get set } | |
var window: UIWindow { get set } | |
func start() | |
} |
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 UIKit | |
protocol TabControllerCoordinator: Coordinator { | |
var tabBarController: UITabBarController { get set } | |
var childCoordinators: [NavigationCoordinator] { get set } | |
} |
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 UIKit | |
protocol Coordinator: class { | |
weak var delegate: CoordinatorDelegate? { get set } | |
var type: CoordinatorType { get set } | |
func start() | |
} |
NewerOlder