├── HowtoOpenFilePython ├── text_file.txt ├── main.py └── file.py ├── SwiftandPythonInteropUsingDynamicMemberLookup ├── PythonBridge │ ├── Sources │ │ └── CPython │ │ │ ├── CPython.c │ │ │ └── include │ │ │ ├── module.modulemap │ │ │ └── CPython.h │ ├── Tests │ │ ├── LinuxMain.swift │ │ └── PythonBridgeTests │ │ │ └── XCTestManifests.swift │ ├── README.md │ └── Package.swift └── Compute │ └── compute.py ├── MVVM ├── MVVM Sample │ ├── apple.png │ ├── swift.png │ ├── python.png │ ├── javascript.png │ ├── MVVM_Sample.xcdatamodeld │ │ └── MVVM_Sample.xcdatamodel │ │ │ └── contents │ ├── ArticleProtocol.swift │ ├── Article.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── ArticleCellTableViewCell.swift │ ├── ArticleData.swift │ ├── Info.plist │ ├── ArticleViewModel.swift │ └── Base.lproj │ │ └── LaunchScreen.storyboard ├── MVVM Sample.xcodeproj │ ├── xcuserdata │ │ ├── matteaton.xcuserdatad │ │ │ ├── xcdebugger │ │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ │ └── xcschememanagement.plist │ │ └── trekkmini-1.xcuserdatad │ │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ ├── matteaton.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ │ └── trekkmini-1.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── MVVM SampleTests │ ├── Info.plist │ └── MVVM_SampleTests.swift └── MVVM SampleUITests │ ├── Info.plist │ └── MVVM_SampleUITests.swift ├── CloudAnimation ├── images │ ├── moon.png │ ├── sun.png │ ├── cloud1.png │ ├── cloud2.png │ ├── cloud3.png │ ├── cloud4.png │ ├── clouds26.svg │ ├── camera70.svg │ ├── cloud4.svg │ ├── cloud127.svg │ ├── clouds64.svg │ └── sun79.svg ├── README.md └── css │ └── main.css ├── TriviaGameAnimation ├── math2.mp3 ├── wrongSound.mp3 ├── wrongSound2.mp3 ├── RightSound2 2.mp3 └── index.html ├── README.md ├── Drupal_Write_Engine ├── sites │ ├── all │ │ └── libraries │ │ │ ├── Encryption │ │ │ ├── keys │ │ │ │ ├── key.pub │ │ │ │ └── private.pem │ │ │ └── UKEncryption.php │ │ │ ├── mongoDB.libraries.info │ │ │ ├── Encryption.libraries.info │ │ │ └── php-opencloud.libraries.info │ └── default │ │ └── modules │ │ ├── uk_user │ │ ├── uk_user.module │ │ └── uk_user.info │ │ ├── uk_data_api │ │ └── uk_data_api.info │ │ ├── uk_create_user │ │ ├── uk_create_user.info │ │ └── uk_create_user.module │ │ └── uk_export_data │ │ └── uk_export_data.info └── README.md ├── AgnosticDevNetworkTesting ├── IMG_1048.PNG ├── Debug │ ├── icon120.png │ ├── icon180.png │ ├── icon40.png │ ├── icon58.png │ ├── icon60.png │ ├── icon80.png │ ├── icon87.png │ ├── icon120-1.png │ └── icon80_2.png ├── Release │ ├── icon120.png │ ├── icon180.png │ ├── icon40.png │ ├── icon58.png │ ├── icon60.png │ ├── icon80.png │ ├── icon87.png │ └── icon120-1.png ├── StandardIcon │ ├── logo.png │ ├── default.png │ ├── icon120.png │ ├── icon40.png │ ├── icon58.png │ ├── icon80.png │ └── icon87.png └── Agnostic Development │ ├── Agnostic Development │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── logo.imageset │ │ │ ├── logo.png │ │ │ ├── logo-signle.png │ │ │ └── Contents.json │ │ ├── AppIconDebug.appiconset │ │ │ ├── icon40.png │ │ │ ├── icon58.png │ │ │ ├── icon60.png │ │ │ ├── icon87.png │ │ │ ├── icon120-1.png │ │ │ ├── icon120.png │ │ │ ├── icon180.png │ │ │ ├── icon80_2.png │ │ │ └── Contents.json │ │ ├── AppIconRelease.appiconset │ │ │ ├── icon120.png │ │ │ ├── icon180.png │ │ │ ├── icon40.png │ │ │ ├── icon58.png │ │ │ ├── icon60.png │ │ │ ├── icon80.png │ │ │ ├── icon87.png │ │ │ ├── icon120-1.png │ │ │ └── Contents.json │ │ └── AppIconTesting.appiconset │ │ │ ├── icon120.png │ │ │ ├── icon180.png │ │ │ ├── icon40.png │ │ │ ├── icon58.png │ │ │ ├── icon60.png │ │ │ ├── icon80.png │ │ │ ├── icon87.png │ │ │ ├── icon120-1.png │ │ │ └── Contents.json │ ├── NetworkProtocol.swift │ ├── Helper.swift │ ├── ArticleTableCell.swift │ ├── Info.plist │ ├── Classes │ │ └── Reachability.swift │ ├── Article.swift │ ├── ArticleDetailViewController.swift │ ├── AppDelegate.swift │ └── Base.lproj │ │ └── LaunchScreen.storyboard │ ├── Agnostic Development.xcodeproj │ ├── xcuserdata │ │ └── matteaton.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ └── matteaton.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ ├── Agnostic DevelopmentTests │ ├── Info.plist │ └── Agnostic_DevelopmentTests.swift │ ├── AgnosticDevelopmentUITests │ ├── Info.plist │ ├── AgnosticDevelopmentTestArticleLinkButton.swift │ └── AgnosticDevelopmentTableViewUITests.swift │ ├── AgnosticDevelopmentLatencyTest │ └── Info.plist │ ├── AgnosticDevelopmentAutomatedUITests │ ├── Info.plist │ └── AgnosticDevelopmentAutomatedUITests.swift │ └── Testing │ └── urls ├── XCTestExample ├── XCTestExample │ ├── swift-bird.png │ ├── CustomTableCell.swift │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ └── Contents.json │ ├── XCTestExample.xcdatamodeld │ │ └── XCTestExample.xcdatamodel │ │ │ └── contents │ ├── DetailViewController.swift │ ├── Info.plist │ └── Base.lproj │ │ └── LaunchScreen.storyboard ├── XCTestExample.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ └── matteaton.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── xcuserdata │ │ └── matteaton.xcuserdatad │ │ └── xcschemes │ │ └── xcschememanagement.plist ├── XCTestExampleTests │ ├── Info.plist │ ├── TestEventCreation.swift │ ├── TestCustomCell.swift │ ├── CoreDataTestClass.swift │ └── TestTitleGeneration.swift └── XCTestExampleUITests │ ├── Info.plist │ └── XCTestExampleUITests.swift ├── Agnostic Development ├── Agnostic Development │ ├── Assets.xcassets │ │ ├── Contents.json │ │ ├── logo.imageset │ │ │ ├── logo.png │ │ │ ├── logo-signle.png │ │ │ └── Contents.json │ │ ├── AppIconDebug.appiconset │ │ │ ├── icon120.png │ │ │ ├── icon180.png │ │ │ ├── icon40.png │ │ │ ├── icon58.png │ │ │ ├── icon60.png │ │ │ ├── icon87.png │ │ │ ├── icon120-1.png │ │ │ ├── icon80_2.png │ │ │ └── Contents.json │ │ ├── AppIconRelease.appiconset │ │ │ ├── icon120.png │ │ │ ├── icon180.png │ │ │ ├── icon40.png │ │ │ ├── icon58.png │ │ │ ├── icon60.png │ │ │ ├── icon80.png │ │ │ ├── icon87.png │ │ │ ├── icon120-1.png │ │ │ └── Contents.json │ │ └── AppIconTesting.appiconset │ │ │ ├── icon120.png │ │ │ ├── icon180.png │ │ │ ├── icon40.png │ │ │ ├── icon58.png │ │ │ ├── icon60.png │ │ │ ├── icon80.png │ │ │ ├── icon87.png │ │ │ ├── icon120-1.png │ │ │ └── Contents.json │ ├── NetworkProtocol.swift │ ├── Info.plist │ ├── AppDelegate.swift │ └── Base.lproj │ │ └── LaunchScreen.storyboard ├── Agnostic Development.xcodeproj │ ├── xcuserdata │ │ └── matteaton.xcuserdatad │ │ │ ├── xcdebugger │ │ │ └── Breakpoints_v2.xcbkptlist │ │ │ └── xcschemes │ │ │ └── xcschememanagement.plist │ └── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ └── matteaton.xcuserdatad │ │ └── UserInterfaceState.xcuserstate ├── Helper.swift ├── Agnostic DevelopmentTests │ ├── Info.plist │ └── Agnostic_DevelopmentTests.swift ├── ArticleTableCell.swift ├── Article.swift └── ArticleDetailViewController.swift ├── video_field ├── README.md ├── video_field.info └── video_field.install ├── videoInteraction ├── README.md ├── styles.css ├── script.js └── index.html ├── TestingandConvertingHexadecimalDatainC └── TestingBufferData │ ├── main │ ├── conversion.o │ ├── conversion_tests.o │ ├── conversion_tests.h │ ├── compile.py │ ├── conversion.c │ └── conversion_tests.c ├── UsingCoreMLtoCreateASongRecommendationEngine ├── Artist.mlmodel ├── DataPipeline │ ├── genre_remove_genreN.py │ ├── string_conversions.py │ ├── city_conversion.py │ ├── genre_list.py │ ├── artist_conversion.py │ ├── genre_split_out.py │ ├── match_artist_genre.py │ ├── normalize_lat_long.py │ ├── build_artist_genre.py │ ├── ExtraData │ │ ├── id_genre_subset.json │ │ ├── id_artist_subset.json │ │ └── sublist.txt │ └── process.py └── coreml_conversion.py ├── TaylorSeriesExpansion ├── TaylorSeries.playground │ ├── contents.xcplayground │ ├── playground.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcuserdata │ │ │ ├── matteaton.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ │ │ └── trekkmini-1.xcuserdatad │ │ │ └── UserInterfaceState.xcuserstate │ └── Contents.swift └── README.md ├── HowtoSortObjectsByDateinSwift └── SortByDate.playground │ ├── contents.xcplayground │ ├── playground.xcworkspace │ ├── contents.xcworkspacedata │ └── xcuserdata │ │ └── matteaton.xcuserdatad │ │ └── UserInterfaceState.xcuserstate │ └── Contents.swift ├── Node_Read_Engine ├── app │ ├── config │ │ ├── database.js │ │ └── passport.js │ ├── models │ │ ├── statistics.js │ │ ├── leaderboard.js │ │ ├── questions.js │ │ ├── challenges.js │ │ └── users.js │ └── logic │ │ └── logic.js ├── README.md ├── package.json └── server.js ├── Py37_Socket ├── server_socket.py └── client_socket.py ├── PythonPrimeNumberComputation └── prime_numbers_list.py └── HowtoUsePythonListComprehensions └── listComprehensions.py /HowtoOpenFilePython/text_file.txt: -------------------------------------------------------------------------------- 1 | Line one of the file 2 | Line two of the file 3 | Line three of the file -------------------------------------------------------------------------------- /SwiftandPythonInteropUsingDynamicMemberLookup/PythonBridge/Sources/CPython/CPython.c: -------------------------------------------------------------------------------- 1 | #include -------------------------------------------------------------------------------- /MVVM/MVVM Sample/apple.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/MVVM/MVVM Sample/apple.png -------------------------------------------------------------------------------- /MVVM/MVVM Sample/swift.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/MVVM/MVVM Sample/swift.png -------------------------------------------------------------------------------- /MVVM/MVVM Sample/python.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/MVVM/MVVM Sample/python.png -------------------------------------------------------------------------------- /CloudAnimation/images/moon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/CloudAnimation/images/moon.png -------------------------------------------------------------------------------- /CloudAnimation/images/sun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/CloudAnimation/images/sun.png -------------------------------------------------------------------------------- /MVVM/MVVM Sample/javascript.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/MVVM/MVVM Sample/javascript.png -------------------------------------------------------------------------------- /TriviaGameAnimation/math2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/TriviaGameAnimation/math2.mp3 -------------------------------------------------------------------------------- /CloudAnimation/images/cloud1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/CloudAnimation/images/cloud1.png -------------------------------------------------------------------------------- /CloudAnimation/images/cloud2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/CloudAnimation/images/cloud2.png -------------------------------------------------------------------------------- /CloudAnimation/images/cloud3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/CloudAnimation/images/cloud3.png -------------------------------------------------------------------------------- /CloudAnimation/images/cloud4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/CloudAnimation/images/cloud4.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Blog-Examples 2 | Code that has been used as an example or the topic of a blog post on http://agnosticdev.com 3 | -------------------------------------------------------------------------------- /Drupal_Write_Engine/sites/all/libraries/Encryption/keys/key.pub: -------------------------------------------------------------------------------- 1 | -----BEGIN PUBLIC KEY----- 2 | mykey 3 | -----END PUBLIC KEY----- 4 | -------------------------------------------------------------------------------- /TriviaGameAnimation/wrongSound.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/TriviaGameAnimation/wrongSound.mp3 -------------------------------------------------------------------------------- /TriviaGameAnimation/wrongSound2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/TriviaGameAnimation/wrongSound2.mp3 -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/IMG_1048.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/IMG_1048.PNG -------------------------------------------------------------------------------- /TriviaGameAnimation/RightSound2 2.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/TriviaGameAnimation/RightSound2 2.mp3 -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Debug/icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Debug/icon120.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Debug/icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Debug/icon180.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Debug/icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Debug/icon40.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Debug/icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Debug/icon58.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Debug/icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Debug/icon60.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Debug/icon80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Debug/icon80.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Debug/icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Debug/icon87.png -------------------------------------------------------------------------------- /Drupal_Write_Engine/sites/all/libraries/Encryption/keys/private.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN RSA PRIVATE KEY----- 2 | mykey 3 | -----END RSA PRIVATE KEY----- 4 | -------------------------------------------------------------------------------- /XCTestExample/XCTestExample/swift-bird.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/XCTestExample/XCTestExample/swift-bird.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Debug/icon120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Debug/icon120-1.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Debug/icon80_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Debug/icon80_2.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Release/icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Release/icon120.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Release/icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Release/icon180.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Release/icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Release/icon40.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Release/icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Release/icon58.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Release/icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Release/icon60.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Release/icon80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Release/icon80.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Release/icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Release/icon87.png -------------------------------------------------------------------------------- /video_field/README.md: -------------------------------------------------------------------------------- 1 | video_field 2 | =========== 3 | 4 | Very basic Drupal module that creates a field for embedded URLs. Then outputs an iFrame. 5 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Release/icon120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Release/icon120-1.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/StandardIcon/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/StandardIcon/logo.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/StandardIcon/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/StandardIcon/default.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/StandardIcon/icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/StandardIcon/icon120.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/StandardIcon/icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/StandardIcon/icon40.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/StandardIcon/icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/StandardIcon/icon58.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/StandardIcon/icon80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/StandardIcon/icon80.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/StandardIcon/icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/StandardIcon/icon87.png -------------------------------------------------------------------------------- /CloudAnimation/README.md: -------------------------------------------------------------------------------- 1 | # CloudAnimation 2 | GSAP animation based the time of day. 3 | 4 | # Demo on CodePen 5 | http://codepen.io/agnosticdev/pen/GpJjvO 6 | -------------------------------------------------------------------------------- /videoInteraction/README.md: -------------------------------------------------------------------------------- 1 | videoInteraction 2 | ================ 3 | 4 | A very simple jQuery pluging that plays a YouTube video when the image overlay is clicked. 5 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /TestingandConvertingHexadecimalDatainC/TestingBufferData/main: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/TestingandConvertingHexadecimalDatainC/TestingBufferData/main -------------------------------------------------------------------------------- /UsingCoreMLtoCreateASongRecommendationEngine/Artist.mlmodel: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/UsingCoreMLtoCreateASongRecommendationEngine/Artist.mlmodel -------------------------------------------------------------------------------- /Drupal_Write_Engine/sites/default/modules/uk_user/uk_user.module: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /TestingandConvertingHexadecimalDatainC/TestingBufferData/conversion_tests.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/TestingandConvertingHexadecimalDatainC/TestingBufferData/conversion_tests.o -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/logo.imageset/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/logo.imageset/logo.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development.xcodeproj/xcuserdata/matteaton.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /SwiftandPythonInteropUsingDynamicMemberLookup/PythonBridge/Tests/LinuxMain.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | import PythonBridgeTests 4 | 5 | var tests = [XCTestCaseEntry]() 6 | tests += PythonBridgeTests.allTests() 7 | XCTMain(tests) -------------------------------------------------------------------------------- /video_field/video_field.info: -------------------------------------------------------------------------------- 1 | name = Video Field 2 | description = Provides a textfield to add a simple embed URL from host like Vimeo or YouTube. 3 | package = Fields 4 | core = 7.x 5 | php = 5.2 6 | files[] = video_field.module 7 | -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/logo.imageset/logo-signle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/logo.imageset/logo-signle.png -------------------------------------------------------------------------------- /Drupal_Write_Engine/sites/all/libraries/php-opencloud.libraries.info: -------------------------------------------------------------------------------- 1 | name = php-opencloud 2 | machine name = php-opencloud 3 | description = Rackspace SDK for OpenStack APIs 4 | version = 1.7.2 5 | files[php][] = vendor/autoload.php 6 | -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon120.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon180.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon40.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon58.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon60.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon87.png -------------------------------------------------------------------------------- /TaylorSeriesExpansion/TaylorSeries.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon120-1.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon80_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon80_2.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon120.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon180.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon40.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon58.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon60.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon80.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon87.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon120.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon180.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon40.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon58.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon60.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon80.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon87.png -------------------------------------------------------------------------------- /HowtoSortObjectsByDateinSwift/SortByDate.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon120-1.png -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon120-1.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development.xcodeproj/xcuserdata/matteaton.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | -------------------------------------------------------------------------------- /MVVM/MVVM Sample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /TaylorSeriesExpansion/TaylorSeries.playground/playground.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /HowtoSortObjectsByDateinSwift/SortByDate.playground/playground.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Node_Read_Engine/app/config/database.js: -------------------------------------------------------------------------------- 1 | // config/database.js 2 | module.exports = { 3 | 4 | 'url' : 'mongodb://drupalUser:7JU9tODj73vAu0dW9E4O@104.236.121.242:27017/drupal_uk_mongo' 5 | // 'url' : 'mongodb://104.236.121.242:27017/drupal_uk_mongo' 6 | }; 7 | -------------------------------------------------------------------------------- /XCTestExample/XCTestExample.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/logo.imageset/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/logo.imageset/logo.png -------------------------------------------------------------------------------- /MVVM/MVVM Sample.xcodeproj/project.xcworkspace/xcuserdata/matteaton.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/MVVM/MVVM Sample.xcodeproj/project.xcworkspace/xcuserdata/matteaton.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/logo.imageset/logo-signle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/logo.imageset/logo-signle.png -------------------------------------------------------------------------------- /MVVM/MVVM Sample.xcodeproj/project.xcworkspace/xcuserdata/trekkmini-1.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/MVVM/MVVM Sample.xcodeproj/project.xcworkspace/xcuserdata/trekkmini-1.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Node_Read_Engine/README.md: -------------------------------------------------------------------------------- 1 | # Node_Read_Engine 2 | 3 | This project is a small web service that connects with MongoDB to serve data on authenticated routes. The data 4 | the web service is serving is synced data from a Drupal 7 CMS. The Drupal project is called Drupal_Write_Engine. 5 | -------------------------------------------------------------------------------- /SwiftandPythonInteropUsingDynamicMemberLookup/PythonBridge/Tests/PythonBridgeTests/XCTestManifests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | #if !os(macOS) 4 | public func allTests() -> [XCTestCaseEntry] { 5 | return [ 6 | testCase(PythonBridgeTests.allTests), 7 | ] 8 | } 9 | #endif -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon40.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon58.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon60.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon87.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon120-1.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon120.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon180.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon80_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/icon80_2.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon120.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon180.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon40.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon58.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon60.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon80.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon87.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon120.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon180.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon40.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon58.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon60.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon80.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon87.png -------------------------------------------------------------------------------- /Drupal_Write_Engine/sites/default/modules/uk_data_api/uk_data_api.info: -------------------------------------------------------------------------------- 1 | name = Useless Knowledge Data API 2 | description = This module exposes write functions 3 | package = Useless Knowledge Custom Modules 4 | core = 7.x 5 | php = 5.3 6 | files[] = uk_data_api.module 7 | 8 | 9 | dependencies[] = user -------------------------------------------------------------------------------- /XCTestExample/XCTestExample.xcodeproj/project.xcworkspace/xcuserdata/matteaton.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/XCTestExample/XCTestExample.xcodeproj/project.xcworkspace/xcuserdata/matteaton.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/icon120-1.png -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon120-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/icon120-1.png -------------------------------------------------------------------------------- /Drupal_Write_Engine/sites/default/modules/uk_create_user/uk_create_user.info: -------------------------------------------------------------------------------- 1 | name = Useless Knowledge Create User 2 | description = This module sets automatic values for newly created users 3 | package = Useless Knowledge Custom Modules 4 | core = 7.x 5 | php = 5.3 6 | files[] = uk_create_user.module 7 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /Drupal_Write_Engine/sites/default/modules/uk_user/uk_user.info: -------------------------------------------------------------------------------- 1 | name = Useless Knowledge User Extnesion 2 | description = This module exposes functions build on top of the user module 3 | package = Useless Knowledge Custom Modules 4 | core = 7.x 5 | php = 5.3 6 | files[] = uk_user.module 7 | 8 | 9 | dependencies[] = user -------------------------------------------------------------------------------- /TaylorSeriesExpansion/TaylorSeries.playground/playground.xcworkspace/xcuserdata/matteaton.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/TaylorSeriesExpansion/TaylorSeries.playground/playground.xcworkspace/xcuserdata/matteaton.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development.xcodeproj/project.xcworkspace/xcuserdata/matteaton.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/Agnostic Development/Agnostic Development.xcodeproj/project.xcworkspace/xcuserdata/matteaton.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /TaylorSeriesExpansion/TaylorSeries.playground/playground.xcworkspace/xcuserdata/trekkmini-1.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/TaylorSeriesExpansion/TaylorSeries.playground/playground.xcworkspace/xcuserdata/trekkmini-1.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /HowtoSortObjectsByDateinSwift/SortByDate.playground/playground.xcworkspace/xcuserdata/matteaton.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/HowtoSortObjectsByDateinSwift/SortByDate.playground/playground.xcworkspace/xcuserdata/matteaton.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /Drupal_Write_Engine/sites/default/modules/uk_export_data/uk_export_data.info: -------------------------------------------------------------------------------- 1 | name = Useless Knowledge Export Data 2 | description = This module exports data to MongoDB when the cron runs 3 | package = Useless Knowledge Custom Modules 4 | core = 7.x 5 | php = 5.3 6 | files[] = uk_create_user.module 7 | 8 | 9 | dependencies[] = libraries (2.x) -------------------------------------------------------------------------------- /SwiftandPythonInteropUsingDynamicMemberLookup/PythonBridge/Sources/CPython/include/CPython.h: -------------------------------------------------------------------------------- 1 | // Point to the Python.h header file on Linux or macOS. 2 | #ifdef __linux__ 3 | #include "/usr/include/python2.7/Python.h" 4 | #elif __APPLE__ 5 | #include "/usr/include/python2.7/Python.h" 6 | #else 7 | #error Was not able to detect the operating system properly. 8 | #endif -------------------------------------------------------------------------------- /Node_Read_Engine/app/models/statistics.js: -------------------------------------------------------------------------------- 1 | //model file to build out users 2 | 3 | 4 | var mongoose = require('mongoose'); 5 | var Schema = mongoose.Schema; 6 | 7 | var StatsSchema = new Schema({ 8 | type: String, 9 | request_date: Date, 10 | request_time: String 11 | }); 12 | 13 | module.exports = mongoose.model('statistics', StatsSchema); -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development.xcodeproj/project.xcworkspace/xcuserdata/matteaton.xcuserdatad/UserInterfaceState.xcuserstate: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/agnosticdev/Blog-Examples/HEAD/AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development.xcodeproj/project.xcworkspace/xcuserdata/matteaton.xcuserdatad/UserInterfaceState.xcuserstate -------------------------------------------------------------------------------- /MVVM/MVVM Sample/MVVM_Sample.xcdatamodeld/MVVM_Sample.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /Node_Read_Engine/app/models/leaderboard.js: -------------------------------------------------------------------------------- 1 | //model file to build out nodes 2 | 3 | 4 | var mongoose = require('mongoose'); 5 | var Schema = mongoose.Schema; 6 | 7 | var LeaderboardSchema = new Schema({ 8 | title: String, 9 | created: String, 10 | leaderboard_data: Array 11 | }); 12 | 13 | module.exports = mongoose.model('leaderboards', LeaderboardSchema); -------------------------------------------------------------------------------- /MVVM/MVVM Sample/ArticleProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ArticleProtocol.swift 3 | // MVVM Sample 4 | // 5 | // Created by Matt Eaton on 10/29/16. 6 | // Copyright © 2016 AgnosticDev. All rights reserved. 7 | // 8 | 9 | protocol ArticleProtocol: class { 10 | // Signaling function that hands the ArticleViewController new data 11 | func resetTableData(articleData: [Article]) 12 | } 13 | -------------------------------------------------------------------------------- /TestingandConvertingHexadecimalDatainC/TestingBufferData/conversion_tests.h: -------------------------------------------------------------------------------- 1 | /** 2 | * conversion_test.h 3 | * 4 | * Conversion Tests Module header 5 | * Include this header to test out sprintf hex conversions 6 | **/ 7 | #ifndef CONVERSION_TESTS_H_INCLUDED 8 | #define CONVERSION_TESTS_H_INCLUDED 9 | 10 | int test_sprintf_hex_data(unsigned int decimalHexValue, int size); 11 | #endif -------------------------------------------------------------------------------- /UsingCoreMLtoCreateASongRecommendationEngine/DataPipeline/genre_remove_genreN.py: -------------------------------------------------------------------------------- 1 | import os, sys, time, json 2 | 3 | 4 | with open('final_artist.json') as json_genre_data: 5 | genre_data = json.load(json_genre_data) 6 | for genre_obj in genre_data: 7 | 8 | if 'Genre5' in genre_obj: 9 | del genre_obj['Genre5'] 10 | 11 | 12 | with open('final_artist.json', 'w') as outfile: 13 | json.dump(genre_data, outfile) -------------------------------------------------------------------------------- /Node_Read_Engine/app/models/questions.js: -------------------------------------------------------------------------------- 1 | //model file to build out nodes 2 | 3 | 4 | var mongoose = require('mongoose'); 5 | var Schema = mongoose.Schema; 6 | 7 | var QuestionSchema = new Schema({ 8 | uid: String, 9 | title: String, 10 | type: String, 11 | nid: String, 12 | category: String, 13 | question: String, 14 | points: String, 15 | answers: Array 16 | }); 17 | 18 | module.exports = mongoose.model('questions', QuestionSchema); 19 | -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "logo-signle.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "logo.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/NetworkProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NetworkProtocol.swift 3 | // Agnostic Development 4 | // 5 | // Created by Matt Eaton on 5/20/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | 10 | public protocol NetworkProtocol: class { 11 | 12 | // 13 | // MARK: - Notify the user interface once the network is finished loading 14 | // 15 | func networkReceivedError(error: String) 16 | func articlesFinishedLoading(articles: [Article]) 17 | } 18 | -------------------------------------------------------------------------------- /videoInteraction/styles.css: -------------------------------------------------------------------------------- 1 | 2 | body{ 3 | background-color:#f1f1f1; 4 | } 5 | 6 | .container{ 7 | width:960px; 8 | margin:0 auto; 9 | background-color: #fff; 10 | } 11 | 12 | .video-container{ 13 | width:640px; 14 | margin:40px auto; 15 | height:390px; 16 | position:relative; 17 | } 18 | 19 | .video-embed{ 20 | position: absolute;; 21 | top:0; 22 | } 23 | 24 | .image-overlay{ 25 | position: absolute;; 26 | top:0; 27 | cursor: pointer; 28 | } 29 | -------------------------------------------------------------------------------- /UsingCoreMLtoCreateASongRecommendationEngine/DataPipeline/string_conversions.py: -------------------------------------------------------------------------------- 1 | import os, sys, time, json 2 | 3 | 4 | # Open final artist and replace the genres with a number 5 | with open('final_artist.json') as json_conversion_data: 6 | conversion_data = json.load(json_conversion_data) 7 | for obj in conversion_data: 8 | 9 | obj["Latitude"] = float(obj["Latitude"]) 10 | obj["Longitude"] = float(obj["Longitude"]) 11 | 12 | 13 | with open('final_artist.json', 'w') as outfile: 14 | json.dump(conversion_data, outfile) 15 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/logo.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "logo-signle.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "logo.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/NetworkProtocol.swift: -------------------------------------------------------------------------------- 1 | // 2 | // NetworkProtocol.swift 3 | // Agnostic Development 4 | // 5 | // Created by Matt Eaton on 5/20/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | 10 | public protocol NetworkProtocol: class { 11 | 12 | // 13 | // MARK: - Notify the user interface once the network is finished loading 14 | // 15 | func networkReceivedError(error: String) 16 | func articlesFinishedLoading(articles: [Article]) 17 | } 18 | -------------------------------------------------------------------------------- /MVVM/MVVM Sample/Article.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Article.swift 3 | // MVVM Sample 4 | // 5 | // Created by Matt Eaton on 10/28/16. 6 | // Copyright © 2016 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | // Simple Article Model Object 12 | class Article { 13 | 14 | var title: String 15 | var date: Date 16 | var image: Data 17 | 18 | init(title: String, date: Date, image: Data) { 19 | 20 | self.title = title 21 | self.date = date 22 | self.image = image 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /video_field/video_field.install: -------------------------------------------------------------------------------- 1 | array( 11 | 'type' => 'varchar', 12 | 'length' => 250, 13 | 'not null' => FALSE 14 | ), 15 | ); 16 | $indexes = array( 17 | 'embed_url' => array('embed_url'), 18 | ); 19 | return array( 20 | 'columns' => $columns, 21 | 'indexes' => $indexes, 22 | ); 23 | } 24 | -------------------------------------------------------------------------------- /Node_Read_Engine/app/models/challenges.js: -------------------------------------------------------------------------------- 1 | //model file to build out users 2 | 3 | 4 | var mongoose = require('mongoose'); 5 | var Schema = mongoose.Schema; 6 | 7 | var ChallengeSchema = new Schema({ 8 | nid: String, 9 | title: String, 10 | type: String, 11 | challenging_user: Array, 12 | user_being_challenged: Array, 13 | score: String, 14 | category: String, 15 | challenge_complete: String, 16 | challege_created: String, 17 | challenge_closed: String 18 | }); 19 | 20 | module.exports = mongoose.model('challenges', ChallengeSchema); 21 | -------------------------------------------------------------------------------- /Node_Read_Engine/app/logic/logic.js: -------------------------------------------------------------------------------- 1 | // functions that help out our server file 2 | // our server file acts like our controller in a MVC setup 3 | 4 | 5 | // logic.js 6 | // ======== 7 | var mongoose = require('mongoose'); 8 | var Statistics = require('../models/statistics'); 9 | 10 | 11 | module.exports = { 12 | 13 | saveRouterStats: function(object){ 14 | var s = new Statistics(object); 15 | console.log(object); 16 | s.save(function (err) { 17 | if (err) console.log(err); 18 | // saved! 19 | }); 20 | }, validateHeader: function(header){ 21 | 22 | 23 | } 24 | 25 | 26 | 27 | }; -------------------------------------------------------------------------------- /Drupal_Write_Engine/README.md: -------------------------------------------------------------------------------- 1 | # Drupal_Write_Engine 2 | 3 | This project was created to work side-by-side with the Node_Read_Engine is the sense that all the data is either 4 | entered or posted into this CMS. Then once the save, update, or delete occurs the data is then synced with a MongoDB 5 | datastore where it is accessed from the Node_Read_Engine. Only the necessary data is synced with MongoDB. This means 6 | that most of the fields Drupal carries on a node are not present in MongoDB. This was done so Node.js was not 7 | concerned about the format the data was in, but to simply serve the data as fast as possible. 8 | -------------------------------------------------------------------------------- /Agnostic Development/Helper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Helper.swift 3 | // Agnostic Development 4 | // 5 | // Created by Matt Eaton on 4/23/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | struct Helper { 12 | 13 | // 14 | // MARK: - Help to get the logo for the navigation bar 15 | // 16 | static func getLogo() -> UIImageView { 17 | 18 | let logo = UIImage(named: "logo.png") 19 | let logoImageView = UIImageView(image: logo) 20 | logoImageView.contentMode = .scaleAspectFit 21 | return logoImageView 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /Node_Read_Engine/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "game-api", 3 | "main": "server.js", 4 | "dependencies": { 5 | "express": "~4.0.0", 6 | "mongoose": "~3.6.13", 7 | "body-parser": "~1.0.1", 8 | "passport" : "~0.1.17", 9 | "passport-local" : "~0.1.6", 10 | "passport-facebook" : "~1.0.2", 11 | "passport-twitter" : "~1.0.2", 12 | "connect-flash" : "~0.1.1", 13 | "bcrypt-nodejs" : "latest", 14 | "cookie-parser": "~1.0.0", 15 | "morgan": "~1.0.0", 16 | "method-override": "~1.0.0", 17 | "express-session": "~1.0.0" 18 | } 19 | } 20 | 21 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Helper.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Helper.swift 3 | // Agnostic Development 4 | // 5 | // Created by Matt Eaton on 4/23/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | struct Helper { 12 | 13 | // 14 | // MARK: - Help to get the logo for the navigation bar 15 | // 16 | static func getLogo() -> UIImageView { 17 | 18 | let logo = UIImage(named: "logo.png") 19 | let logoImageView = UIImageView(image: logo) 20 | logoImageView.contentMode = .scaleAspectFit 21 | return logoImageView 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /XCTestExample/XCTestExample/CustomTableCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CustomTableCell.swift 3 | // XCTestExample 4 | // 5 | // Created by Matt Eaton on 10/8/16. 6 | // Copyright © 2016 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class CustomTableCell: UITableViewCell { 12 | 13 | @IBOutlet weak var rowImage: UIImageView? 14 | @IBOutlet weak var titleLabel: UILabel? 15 | @IBOutlet weak var dateLabel: UILabel? 16 | 17 | override func awakeFromNib() { 18 | super.awakeFromNib() 19 | } 20 | 21 | override func setSelected(_ selected: Bool, animated: Bool) { 22 | super.setSelected(selected, animated: animated) 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /TaylorSeriesExpansion/README.md: -------------------------------------------------------------------------------- 1 | # TaylorSeriesExpansion 2 | Swift Playground for a Taylor Series Expansion for e^3 up to the order 5th order polynomial, when x = 3. Also note, for the sake of calculation I set e equal to it's approximate decimal value, 2.71828, so it could be calculated. 3 | 4 | Please note, I am not a mathematician. I just seen a reference to the Taylor Series on Twitter one day and was inspired to create this Playground. Please submit a pull request if I have an error. 5 | 6 | Inspiration for this equation used in this Playground came from this Khan Academy video about the Taylor Series Expansion: 7 | https://www.khanacademy.org/math/integral-calculus/sequences-series-approx-calc/taylor-series/v/visualizing-taylor-series-for-e-x 8 | -------------------------------------------------------------------------------- /UsingCoreMLtoCreateASongRecommendationEngine/DataPipeline/city_conversion.py: -------------------------------------------------------------------------------- 1 | import os, sys, time, json 2 | 3 | city_list = [] 4 | 5 | # Open final artist and replace the genres with a number 6 | with open('final_artist.json') as json_city_data: 7 | city_data = json.load(json_city_data) 8 | for city_obj in city_data: 9 | index = 0 10 | 11 | if city_obj['City'] not in city_list: 12 | city_list.append(city_obj['City']) 13 | city_obj['City'] = (len(city_list) - 1) 14 | else: 15 | city_obj['City'] = city_list.index(city_obj['City']) 16 | index += 1 17 | 18 | 19 | with open('final_artist.json', 'w') as outfile: 20 | json.dump(city_data, outfile) 21 | 22 | 23 | with open('city_list.json', 'w') as outfile: 24 | json.dump(city_list, outfile) -------------------------------------------------------------------------------- /MVVM/MVVM SampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /UsingCoreMLtoCreateASongRecommendationEngine/DataPipeline/genre_list.py: -------------------------------------------------------------------------------- 1 | import os, sys, time, json 2 | 3 | genre_list = [] 4 | 5 | 6 | # Open final artist and replace the genres with a number 7 | with open('final_artist.json') as json_genre_data: 8 | genre_data = json.load(json_genre_data) 9 | for genre_obj in genre_data: 10 | index = 0 11 | for genre in genre_obj['genre']: 12 | if genre not in genre_list: 13 | genre_list.append(genre) 14 | genre_obj['genre'][index] = (len(genre_list) - 1) 15 | else: 16 | genre_obj['genre'][index] = genre_list.index(genre) 17 | index += 1 18 | 19 | 20 | with open('final_artist.json', 'w') as outfile: 21 | json.dump(genre_data, outfile) 22 | 23 | 24 | with open('genre_list.json', 'w') as outfile: 25 | json.dump(genre_list, outfile) -------------------------------------------------------------------------------- /MVVM/MVVM SampleUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /UsingCoreMLtoCreateASongRecommendationEngine/DataPipeline/artist_conversion.py: -------------------------------------------------------------------------------- 1 | import os, sys, time, json 2 | 3 | artist_list = [] 4 | 5 | # Open final artist and replace the genres with a number 6 | with open('final_artist.json') as json_artist_data: 7 | artist_data = json.load(json_artist_data) 8 | for artist_obj in artist_data: 9 | index = 0 10 | 11 | if artist_obj['Artist'] not in artist_list: 12 | artist_list.append(artist_obj['Artist']) 13 | artist_obj['Artist'] = (len(artist_list) - 1) 14 | else: 15 | artist_obj['Artist'] = artist_list.index(artist_obj['Artist']) 16 | index += 1 17 | 18 | 19 | with open('final_artist.json', 'w') as outfile: 20 | json.dump(artist_data, outfile) 21 | 22 | 23 | with open('artist_list.json', 'w') as outfile: 24 | json.dump(artist_list, outfile) -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development.xcodeproj/xcuserdata/matteaton.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Agnostic Development.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 30959B0D1EAD3D1800954777 16 | 17 | primary 18 | 19 | 20 | 30959B211EAD3D1900954777 21 | 22 | primary 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /MVVM/MVVM Sample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /XCTestExample/XCTestExampleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /XCTestExample/XCTestExampleUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /Agnostic Development/Agnostic DevelopmentTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /XCTestExample/XCTestExample/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /Agnostic Development/ArticleTableCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ArticleTableCell.swift 3 | // Agnostic Development 4 | // 5 | // Created by Matt Eaton on 4/23/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ArticleTableCell: UITableViewCell { 12 | 13 | // 14 | // MARK: - IBOutlets 15 | // 16 | @IBOutlet weak var articleTitle: UILabel? 17 | @IBOutlet weak var articleDate: UILabel? 18 | @IBOutlet weak var articleDesc: UILabel? 19 | 20 | override func awakeFromNib() { 21 | super.awakeFromNib() 22 | } 23 | 24 | override func setSelected(_ selected: Bool, animated: Bool) { 25 | super.setSelected(selected, animated: animated) 26 | // Configure the view for the selected state 27 | } 28 | 29 | } 30 | 31 | -------------------------------------------------------------------------------- /UsingCoreMLtoCreateASongRecommendationEngine/DataPipeline/genre_split_out.py: -------------------------------------------------------------------------------- 1 | import os, sys, time, json 2 | 3 | 4 | with open('final_artist.json') as json_genre_data: 5 | genre_data = json.load(json_genre_data) 6 | for genre_obj in genre_data: 7 | 8 | if len(genre_obj['genre']) > 0: 9 | genre_obj['Genre1'] = genre_obj['genre'][0] 10 | if len(genre_obj['genre']) > 1: 11 | genre_obj['Genre2'] = genre_obj['genre'][1] 12 | if len(genre_obj['genre']) > 2: 13 | genre_obj['Genre3'] = genre_obj['genre'][2] 14 | if len(genre_obj['genre']) > 3: 15 | genre_obj['Genre4'] = genre_obj['genre'][3] 16 | if len(genre_obj['genre']) > 4: 17 | genre_obj['Genre5'] = genre_obj['genre'][4] 18 | 19 | del genre_obj['genre'] 20 | 21 | 22 | with open('final_artist.json', 'w') as outfile: 23 | json.dump(genre_data, outfile) 24 | 25 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic DevelopmentTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /MVVM/MVVM Sample/ArticleCellTableViewCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ArticleCellTableViewCell.swift 3 | // MVVM Sample 4 | // 5 | // Created by Matt Eaton on 10/28/16. 6 | // Copyright © 2016 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ArticleCellTableViewCell: UITableViewCell { 12 | 13 | // Custom UITableCell 14 | 15 | @IBOutlet weak var articleImage: UIImageView? 16 | @IBOutlet weak var articleTitle: UILabel? 17 | @IBOutlet weak var articleDate: UILabel? 18 | 19 | override func awakeFromNib() { 20 | super.awakeFromNib() 21 | // Initialization code 22 | } 23 | 24 | override func setSelected(_ selected: Bool, animated: Bool) { 25 | super.setSelected(selected, animated: animated) 26 | // Configure the view for the selected state 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /XCTestExample/XCTestExample/XCTestExample.xcdatamodeld/XCTestExample.xcdatamodel/contents: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /MVVM/MVVM Sample/ArticleData.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ArticleData.swift 3 | // MVVM Sample 4 | // 5 | // Created by Matt Eaton on 10/28/16. 6 | // Copyright © 2016 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class ArticleData { 12 | 13 | // For sake of example this class is used to setup an array to hold articles in memory 14 | // Normally this would be some sort of persistent data storage object 15 | var articles = [Article]() 16 | 17 | func sortArticleDataAlpha() ->[Article] { 18 | return self.articles.sorted(by: { $0.title < $1.title }) 19 | } 20 | 21 | func sortArticleDataByDate() ->[Article] { 22 | return self.articles.sorted(by: { $0.date < $1.date }) 23 | } 24 | 25 | init (articles: [Article]) { 26 | self.articles = articles 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/AgnosticDevelopmentUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/ArticleTableCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ArticleTableCell.swift 3 | // Agnostic Development 4 | // 5 | // Created by Matt Eaton on 4/23/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ArticleTableCell: UITableViewCell { 12 | 13 | // 14 | // MARK: - IBOutlets 15 | // 16 | @IBOutlet weak var articleTitle: UILabel? 17 | @IBOutlet weak var articleDate: UILabel? 18 | @IBOutlet weak var articleDesc: UILabel? 19 | 20 | override func awakeFromNib() { 21 | super.awakeFromNib() 22 | } 23 | 24 | override func setSelected(_ selected: Bool, animated: Bool) { 25 | super.setSelected(selected, animated: animated) 26 | // Configure the view for the selected state 27 | } 28 | 29 | } 30 | 31 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/AgnosticDevelopmentLatencyTest/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/AgnosticDevelopmentAutomatedUITests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | 22 | 23 | -------------------------------------------------------------------------------- /MVVM/MVVM Sample.xcodeproj/xcuserdata/matteaton.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MVVM Sample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 711219C31DC3B9BF006109D0 16 | 17 | primary 18 | 19 | 20 | 711219DA1DC3B9C1006109D0 21 | 22 | primary 23 | 24 | 25 | 711219E51DC3B9C1006109D0 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /MVVM/MVVM Sample.xcodeproj/xcuserdata/trekkmini-1.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | MVVM Sample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 711219C31DC3B9BF006109D0 16 | 17 | primary 18 | 19 | 20 | 711219DA1DC3B9C1006109D0 21 | 22 | primary 23 | 24 | 25 | 711219E51DC3B9C1006109D0 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /XCTestExample/XCTestExample.xcodeproj/xcuserdata/matteaton.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | XCTestExample.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | 13 | SuppressBuildableAutocreation 14 | 15 | 305DF8F11DA94FF700FE6720 16 | 17 | primary 18 | 19 | 20 | 305DF90A1DA94FF800FE6720 21 | 22 | primary 23 | 24 | 25 | 305DF9151DA94FF800FE6720 26 | 27 | primary 28 | 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /Node_Read_Engine/app/models/users.js: -------------------------------------------------------------------------------- 1 | //model file to build out users 2 | 3 | 4 | var mongoose = require('mongoose'); 5 | var bcrypt = require('bcrypt-nodejs'); 6 | var Schema = mongoose.Schema; 7 | 8 | var UsersSchema = new Schema({ 9 | local: { 10 | email : String, 11 | key: String, 12 | }, 13 | uid: String, 14 | name: String, 15 | created: String, 16 | member_for: String, 17 | status: Boolean, 18 | facebook: Boolean, 19 | twitter: Boolean, 20 | email: String, 21 | image: String, 22 | badge: String, 23 | score: String 24 | }); 25 | 26 | 27 | 28 | // checking if key is valid 29 | UsersSchema.methods.validPassword = function(key) { 30 | if(this.local.key == key){ 31 | return true; 32 | }else{ 33 | return false; 34 | } 35 | }; 36 | 37 | module.exports = mongoose.model('users', UsersSchema); 38 | 39 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Testing/urls: -------------------------------------------------------------------------------- 1 | https://www.agnosticdev.com/blog-entry/swift/swift-optionals-and-type-safety 2 | https://www.agnosticdev.com/blog-entry/python/using-scikit-learn-and-coreml-create-music-recommendation-engine 3 | https://www.agnosticdev.com/blog-entry/ios/attending-wwdc-2017-predictions-answered 4 | https://www.agnosticdev.com/blog-entry/swift-c-python/swift-4-proposal-168-multi-line-string-literals 5 | https://www.agnosticdev.com/blog-entry/team-leadership/technical-leadership-and-managing-projects-large-and-small 6 | https://www.agnosticdev.com/blog-entry/swift/swift-weak-and-unowned-references 7 | https://www.agnosticdev.com/blog-entry/ios/attending-wwdc-2017 8 | https://www.agnosticdev.com/blog-entry/python/python-standard-library-implementation-partial 9 | https://www.agnosticdev.com/blog-entry/swift/swift-programming-language 10 | https://www.agnosticdev.com/blog-entry/web-services/designing-architecture-scales-your-product 11 | -------------------------------------------------------------------------------- /UsingCoreMLtoCreateASongRecommendationEngine/DataPipeline/match_artist_genre.py: -------------------------------------------------------------------------------- 1 | import os, sys, time, json 2 | 3 | artists_location_without_genre_list = [] 4 | artists_genre_list = [] 5 | final_list = [] 6 | 7 | # Open artist location without genre json 8 | with open('data/artists_location_without_genre.json') as json_location_without_genre_data: 9 | data = json.load(json_location_without_genre_data) 10 | artists_location_without_genre_list = data['data'] 11 | 12 | # Open artist genre json 13 | with open('data/artist_genre.json') as json_artist_genre_data: 14 | artists_genre_list = json.load(json_artist_genre_data) 15 | 16 | for artist in artists_location_without_genre_list: 17 | for artist_genre in artists_genre_list: 18 | if artist["Artist"] in artists_genre_list: 19 | if "genre" not in artist: 20 | artist["genre"] = artists_genre_list[artist["Artist"]] 21 | final_list.append(artist) 22 | 23 | 24 | with open('final_artist.json', 'w') as outfile: 25 | json.dump(final_list, outfile) -------------------------------------------------------------------------------- /Py37_Socket/server_socket.py: -------------------------------------------------------------------------------- 1 | import socket 2 | from sys import platform 3 | 4 | HOST = '' 5 | PORT = 53091 6 | with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: 7 | # Bind to a blank host:port and listen for connections. 8 | s.bind((HOST, PORT)) 9 | s.listen(1) 10 | print("Waiting for a connection...") 11 | conn, addr = s.accept() 12 | with conn: 13 | print('Connection bound with address: {0}'.format(addr[0])) 14 | 15 | while True: 16 | # Block and read up to 512 bytes from the read buffer. 17 | data = conn.recv(512) 18 | if not data: 19 | break 20 | else: 21 | read_data = len(str(data)) 22 | if s.getblocking(): 23 | print("(Blocking socket) Reading {0} " 24 | "bytes".format(read_data)) 25 | else: 26 | print("(Non-blocking socket) Reading {0} " 27 | "bytes".format(read_data)) 28 | conn.sendall(data) -------------------------------------------------------------------------------- /SwiftandPythonInteropUsingDynamicMemberLookup/PythonBridge/README.md: -------------------------------------------------------------------------------- 1 | # PythonBridge 2 | 3 | Swift library that calls into a Python module to perform some computations or actions and then passes the data back to Swift for display, if needed. An example here would be crunching some numbers on a website (Vapor) and then displaying the computed values in a web application. 4 | 5 | **NOTE** The PythonBridge.swift file in this library was not originally written by me. I refactored it for demostration purposes, but did not originally write it. This file was an example file used to supported the [Dynamic Member Lookup](https://forums.swift.org/t/se-0195-introduce-user-defined-dynamic-member-lookup-types/8658) proposal originally and all credit for this file should be given to the Swift Community. Having said that, if you are wanting to build your own Python Bridge using Python's C extensions and expose it to Swift, please get in contact with me. I would love to help. 6 | 7 | 8 | This library has been tested using Python 2.7 and Swift 4.2 on Ubuntu 16.04 and macOS 10.13. 9 | -------------------------------------------------------------------------------- /UsingCoreMLtoCreateASongRecommendationEngine/DataPipeline/normalize_lat_long.py: -------------------------------------------------------------------------------- 1 | import os, sys, time, json 2 | 3 | latitude = [] 4 | longitude = [] 5 | 6 | with open('final_artist.json') as json_lat_long_data: 7 | lat_long_data = json.load(json_lat_long_data) 8 | 9 | 10 | for obj in lat_long_data: 11 | 12 | if 'Longitude' in obj: 13 | try: 14 | i = longitude.index(obj['Longitude']) 15 | obj['Longitude'] = i 16 | except: 17 | i = len(longitude) 18 | longitude.append(obj['Longitude']) 19 | obj['Longitude'] = i 20 | 21 | 22 | if 'Latitude' in obj: 23 | try: 24 | i = latitude.index(obj['Latitude']) 25 | obj['Latitude'] = i 26 | except: 27 | i = len(latitude) 28 | latitude.append(obj['Latitude']) 29 | obj['Latitude'] = i 30 | 31 | 32 | with open('final_artist.json', 'w') as outfile: 33 | json.dump(lat_long_data, outfile) 34 | 35 | with open('latitude_data.json', 'w') as latitude_file: 36 | json.dump(latitude, latitude_file) 37 | 38 | with open('longitude_data.json', 'w') as longitude_file: 39 | json.dump(longitude, longitude_file) -------------------------------------------------------------------------------- /videoInteraction/script.js: -------------------------------------------------------------------------------- 1 | 2 | (function($){ 3 | 4 | //very quick plugin for swapping videos into a variable until you are ready for them 5 | $.fn.videoInteraction = function(){ 6 | this.each(function(){ 7 | //varibles 8 | var self = $(this), 9 | $image = self.parent().find('.image-overlay'), 10 | $video = self.find('iframe'); 11 | 12 | //remove the video until we are ready for it 13 | $video.remove(); 14 | //bind an event to the image overlay 15 | $image.on('click', handleVideoSwap); 16 | //this function hides the image overlay and starts the youtube player 17 | function handleVideoSwap(e){ 18 | $(e.target).css('display', 'none'); 19 | self.append($video); 20 | } 21 | }); 22 | }; 23 | 24 | $('.video-embed').videoInteraction(); 25 | 26 | }(jQuery)); 27 | 28 | -------------------------------------------------------------------------------- /XCTestExample/XCTestExampleTests/TestEventCreation.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestEventCreation.swift 3 | // XCTestExample 4 | // 5 | // Created by Matt Eaton on 10/8/16. 6 | // Copyright © 2016 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import CoreData 11 | @testable import XCTestExample 12 | 13 | class TestEventCreation: CoreDataTestClass { 14 | 15 | var newEvent:Event? 16 | 17 | override func setUp() { 18 | super.setUp() 19 | let newEventEntity = NSEntityDescription.entity(forEntityName: "Event", in: managedObjectContext!) 20 | newEvent = Event(entity: newEventEntity!, insertInto: managedObjectContext) 21 | } 22 | 23 | override func tearDown() { 24 | super.tearDown() 25 | } 26 | 27 | func testNewEvent() { 28 | XCTAssertNotNil(self.newEvent, "Cannot create a new event!") 29 | } 30 | 31 | override func testPerformanceExample() { 32 | // This is an example of a performance test case. 33 | self.measure { 34 | // Put the code you want to measure the time of here. 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /CloudAnimation/images/clouds26.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /UsingCoreMLtoCreateASongRecommendationEngine/DataPipeline/build_artist_genre.py: -------------------------------------------------------------------------------- 1 | import os, sys, time, json 2 | 3 | json_id_genre_list = [] 4 | json_id_artist_list = [] 5 | final_dict = {} 6 | 7 | # Open genre list and read the data in the array to a list 8 | with open('artist_id_genre.json') as json_id_genre_data: 9 | genre_data = json.load(json_id_genre_data) 10 | json_id_genre_list = genre_data['data'] 11 | 12 | # Open artist list and read the data in the array to a list 13 | with open('id_artist.json') as json_artist_genre_data: 14 | artist_data = json.load(json_artist_genre_data) 15 | json_id_artist_subset = artist_data['data'] 16 | 17 | 18 | for artist in json_id_artist_subset: 19 | for genre in json_id_genre_list: 20 | if artist["id"] == genre["id"]: 21 | if artist["artist"] in final_dict: 22 | if (genre["genre"] not in final_dict[artist["artist"]] and 23 | len(final_dict[artist["artist"]]) < 6): 24 | final_dict[artist["artist"]].append(genre["genre"]) 25 | else: 26 | final_dict[artist["artist"]] = [genre["genre"]] 27 | 28 | 29 | 30 | with open('artist_genre.json', 'w') as outfile: 31 | json.dump(final_dict, outfile) 32 | -------------------------------------------------------------------------------- /MVVM/MVVM SampleTests/MVVM_SampleTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MVVM_SampleTests.swift 3 | // MVVM SampleTests 4 | // 5 | // Created by Matt Eaton on 10/28/16. 6 | // Copyright © 2016 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import MVVM_Sample 11 | 12 | class MVVM_SampleTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /MVVM/MVVM Sample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /Agnostic Development/Agnostic DevelopmentTests/Agnostic_DevelopmentTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Agnostic_DevelopmentTests.swift 3 | // Agnostic DevelopmentTests 4 | // 5 | // Created by Matt Eaton on 4/23/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import Agnostic_Development 11 | 12 | class Agnostic_DevelopmentTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /XCTestExample/XCTestExample/DetailViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // DetailViewController.swift 3 | // XCTestExample 4 | // 5 | // Created by Matt Eaton on 10/8/16. 6 | // Copyright © 2016 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class DetailViewController: UIViewController { 12 | 13 | @IBOutlet weak var detailDescriptionLabel: UILabel! 14 | 15 | 16 | func configureView() { 17 | // Update the user interface for the detail item. 18 | if let detail = self.detailItem { 19 | if let label = self.detailDescriptionLabel { 20 | label.text = detail.timestamp!.description 21 | } 22 | } 23 | } 24 | 25 | override func viewDidLoad() { 26 | super.viewDidLoad() 27 | // Do any additional setup after loading the view, typically from a nib. 28 | self.configureView() 29 | } 30 | 31 | override func didReceiveMemoryWarning() { 32 | super.didReceiveMemoryWarning() 33 | // Dispose of any resources that can be recreated. 34 | } 35 | 36 | var detailItem: Event? { 37 | didSet { 38 | // Update the view. 39 | self.configureView() 40 | } 41 | } 42 | 43 | 44 | } 45 | 46 | -------------------------------------------------------------------------------- /Py37_Socket/client_socket.py: -------------------------------------------------------------------------------- 1 | import socket 2 | 3 | 4 | HOST = 'localhost' 5 | PORT = 53091 6 | write_index = 0 7 | with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s: 8 | try: 9 | s.connect((HOST, PORT)) 10 | except OSError as err: 11 | print("Client socket failed to open with error: {0}".format(err)) 12 | 13 | while write_index < 10: 14 | string = "Writing data at index: {0} ".format(write_index) 15 | s.sendall(str.encode(string)) 16 | # Block and write up to 512 bytes to the write buffer. 17 | data = s.recv(512) 18 | # Using bpo-32373, check to see if this socket is blocking. 19 | if s.getblocking(): 20 | print("(Blocking socket) " + data.decode()) 21 | else: 22 | print("(Non-blocking socket) " + data.decode()) 23 | 24 | write_index += 1 25 | 26 | # Close the socket, but wait.... is it really closed??? 27 | s.close() 28 | # Just to make sure (bpo-32454), send data to validate that the 29 | # socket is closed. 30 | try: 31 | s.sendall(str.encode('closed')) 32 | print("Client socket remains open") 33 | except OSError as err: 34 | print("Client socket is closed with error: {0}".format(err)) 35 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic DevelopmentTests/Agnostic_DevelopmentTests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Agnostic_DevelopmentTests.swift 3 | // Agnostic DevelopmentTests 4 | // 5 | // Created by Matt Eaton on 4/23/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | @testable import Agnostic_Development 11 | 12 | class Agnostic_DevelopmentTests: XCTestCase { 13 | 14 | override func setUp() { 15 | super.setUp() 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | } 18 | 19 | override func tearDown() { 20 | // Put teardown code here. This method is called after the invocation of each test method in the class. 21 | super.tearDown() 22 | } 23 | 24 | func testExample() { 25 | // This is an example of a functional test case. 26 | // Use XCTAssert and related functions to verify your tests produce the correct results. 27 | } 28 | 29 | func testPerformanceExample() { 30 | // This is an example of a performance test case. 31 | self.measure { 32 | // Put the code you want to measure the time of here. 33 | } 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /UsingCoreMLtoCreateASongRecommendationEngine/coreml_conversion.py: -------------------------------------------------------------------------------- 1 | from sklearn.linear_model import LinearRegression 2 | import pandas as pd 3 | import coremltools 4 | 5 | # Create a pandas data frame 6 | json_data_frame = pd.read_json('final_artist.json') 7 | 8 | 9 | model = LinearRegression() 10 | model.fit(json_data_frame[["City", "Genre1", "Latitude", "Longitude"]], json_data_frame["Artist"]) 11 | 12 | coreml_model = coremltools.converters.sklearn.convert(model, ["City", "Genre1", "Latitude", "Longitude"], "Artist") 13 | 14 | # Set model metadata 15 | coreml_model.author = 'Matthew Eaton' 16 | coreml_model.license = 'BSD' 17 | coreml_model.short_description = 'Predicts the next artist based upon random music data' 18 | 19 | # Set feature descriptions manually 20 | coreml_model.input_description['City'] = 'City where artist is from' 21 | coreml_model.input_description['Genre1'] = 'The genre the artist falls into' 22 | coreml_model.input_description['Latitude'] = 'Latitude of where this artist is from' 23 | coreml_model.input_description['Longitude'] = 'Longitude of where this artist is from' 24 | 25 | # Set the output descriptions 26 | coreml_model.output_description['Artist'] = 'Predicted Artist' 27 | 28 | # Save the model 29 | coreml_model.save('Artist.mlmodel') 30 | 31 | 32 | -------------------------------------------------------------------------------- /UsingCoreMLtoCreateASongRecommendationEngine/DataPipeline/ExtraData/id_genre_subset.json: -------------------------------------------------------------------------------- 1 | {"data":[{"id":"AR658OS1187FB5C451","genre":"ost"}, 2 | {"id":"AR658OS1187FB5C451","genre":"spoken word"}, 3 | {"id":"AR658OS1187FB5C451","genre":"worship music"}, 4 | {"id":"AR658OS1187FB5C451","genre":"christmas music"}, 5 | {"id":"AR658OS1187FB5C451","genre":"soulful"}, 6 | {"id":"AR658OS1187FB5C451","genre":"synthpop"}, 7 | {"id":"AR658OS1187FB5C451","genre":"christian pop"}, 8 | {"id":"AR658OS1187FB5C451","genre":"praise & worship"}, 9 | {"id":"AR658OS1187FB5C451","genre":"modern worship"}, 10 | {"id":"AR658OS1187FB5C451","genre":"praise"}, 11 | {"id":"AR658OS1187FB5C451","genre":"christian woman"}, 12 | {"id":"AR658OS1187FB5C451","genre":"solo artist"}, 13 | {"id":"AR658OS1187FB5C451","genre":"funk soul"}, 14 | {"id":"AR65K7A1187FB4DAA4","genre":"hip hop"}, 15 | {"id":"AR65K7A1187FB4DAA4","genre":"pop"}, 16 | {"id":"AR65K7A1187FB4DAA4","genre":"rock"}, 17 | {"id":"AR65K7A1187FB4DAA4","genre":"soul"}, 18 | {"id":"AR65K7A1187FB4DAA4","genre":"adult contemporary"}, 19 | {"id":"AR65K7A1187FB4DAA4","genre":"ballad"}, 20 | {"id":"AR65K7A1187FB4DAA4","genre":"club"}, 21 | {"id":"AR65K7A1187FB4DAA4","genre":"soundtrack"}, 22 | {"id":"AR65K7A1187FB4DAA4","genre":"female"}, 23 | {"id":"AR65K7A1187FB4DAA4","genre":"rap"}]} -------------------------------------------------------------------------------- /SwiftandPythonInteropUsingDynamicMemberLookup/PythonBridge/Package.swift: -------------------------------------------------------------------------------- 1 | // swift-tools-version:4.0 2 | // The swift-tools-version declares the minimum version of Swift required to build this package. 3 | 4 | import PackageDescription 5 | 6 | let package = Package( 7 | name: "PythonBridge", 8 | products: [ 9 | // Products define the executables and libraries produced by a package, and make them visible to other packages. 10 | .library( 11 | name: "PythonBridge", 12 | targets: ["PythonBridge"]), 13 | ], 14 | dependencies: [ 15 | // Dependencies declare other packages that this package depends on. 16 | // .package(url: /* package url */, from: "1.0.0"), 17 | ], 18 | targets: [ 19 | // Targets are the basic building blocks of a package. A target can define a module or a test suite. 20 | // Targets can depend on other targets in this package, and on products in packages which this package depends on. 21 | .target( 22 | name: "CPython", 23 | dependencies: []), 24 | .target( 25 | name: "PythonBridge", 26 | dependencies: ["CPython"]), 27 | .testTarget( 28 | name: "PythonBridgeTests", 29 | dependencies: ["PythonBridge"]), 30 | ] 31 | ) 32 | -------------------------------------------------------------------------------- /XCTestExample/XCTestExampleTests/TestCustomCell.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestCustomCell.swift 3 | // XCTestExample 4 | // 5 | // Created by Matt Eaton on 10/8/16. 6 | // Copyright © 2016 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | @testable import XCTestExample 12 | 13 | class TestCustomCell: XCTestCase { 14 | 15 | var testTable = UITableView() 16 | 17 | override func setUp() { 18 | super.setUp() 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | testTable.register(CustomTableCell.self, forCellReuseIdentifier: "Cell") 21 | } 22 | 23 | override func tearDown() { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | super.tearDown() 26 | } 27 | 28 | func testCustomCell() { 29 | let customCell: CustomTableCell = testTable.dequeueReusableCell(withIdentifier: "Cell") as! CustomTableCell 30 | XCTAssertNotNil(customCell, "No Custom Cell Available") 31 | } 32 | 33 | func testPerformanceExample() { 34 | // This is an example of a performance test case. 35 | self.measure { 36 | // Put the code you want to measure the time of here. 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon40.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon60.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon58.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon87.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon80_2.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon120.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "icon120-1.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon180.png", 49 | "scale" : "3x" 50 | } 51 | ], 52 | "info" : { 53 | "version" : 1, 54 | "author" : "xcode" 55 | } 56 | } -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon40.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon60.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon58.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon87.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon80.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon120.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "icon120-1.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon180.png", 49 | "scale" : "3x" 50 | } 51 | ], 52 | "info" : { 53 | "version" : 1, 54 | "author" : "xcode" 55 | } 56 | } -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon40.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon60.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon58.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon87.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon80.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon120.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "icon120-1.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon180.png", 49 | "scale" : "3x" 50 | } 51 | ], 52 | "info" : { 53 | "version" : 1, 54 | "author" : "xcode" 55 | } 56 | } -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationPortraitUpsideDown 35 | 36 | UIViewControllerBasedStatusBarAppearance 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /Agnostic Development/Article.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Article.swift 3 | // Agnostic Development 4 | // 5 | // Created by Matt Eaton on 4/23/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public class Article: NSObject { 12 | 13 | // 14 | // MARK: - Public Instance Properties 15 | // 16 | public var title: String? 17 | public var dateString: String? 18 | public var articleDescription: String? 19 | public var link: String? 20 | 21 | // 22 | // MARK: - Private Instance Property 23 | // 24 | private let networkKeyMap: [String: String] = ["title": "title", 25 | "dateString": "date", 26 | "articleDescription": "description", 27 | "link": "link"] 28 | 29 | override init() { 30 | super.init() 31 | } 32 | 33 | convenience init(jsonObject: [String: AnyObject]) { 34 | self.init() 35 | 36 | // Parse network objects based upon a network key-value mapping schema 37 | for (key, value) in networkKeyMap { 38 | if let networkObject = jsonObject[value] as? String { 39 | self.setValue(networkObject, forKey: key) 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /CloudAnimation/images/camera70.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationPortraitUpsideDown 35 | 36 | UIViewControllerBasedStatusBarAppearance 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /HowtoOpenFilePython/main.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # 4 | # $ python main.py text_file.txt 5 | # $ ./ main.py text_file.txt 6 | # $ ./main.py < text_file.txt 7 | # $ ./main.py 8 | # 9 | from __future__ import print_function 10 | from file import File 11 | import os, sys 12 | 13 | 14 | # Main function 15 | def main(): 16 | 17 | # If there is a file expected from STDIN, create the file object 18 | # and the file object will attempt to read the contents of STDIN 19 | # in the constructor. 20 | file = File() 21 | 22 | for line in file.file_lines: 23 | print("Line for file: " + line) 24 | 25 | 26 | ''' 27 | log_file = 'logs/log' 28 | complete_content = '' 29 | content_list = [] 30 | try: 31 | with open(log_file, 'r') as file_obj: 32 | complete_content = file_obj.read() 33 | 34 | except ValueError: 35 | # Write the raised error 36 | error_raised = "Error loading file: " + str(sys.exc_info()[0]) 37 | # Display the error to the console 38 | print(error_raised) 39 | exit("This program needs an input file to continue. Exiting...") 40 | 41 | # Explode or split the string contents to a list 42 | content_list = complete_content.split("\n") 43 | 44 | for line in content_list: 45 | print("Line for file: " + line) 46 | 47 | ''' 48 | 49 | exit("Exiting...") 50 | 51 | # Execution of the main function 52 | if __name__ == "__main__": 53 | main() -------------------------------------------------------------------------------- /CloudAnimation/images/cloud4.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /MVVM/MVVM SampleUITests/MVVM_SampleUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // MVVM_SampleUITests.swift 3 | // MVVM SampleUITests 4 | // 5 | // Created by Matt Eaton on 10/28/16. 6 | // Copyright © 2016 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class MVVM_SampleUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /TestingandConvertingHexadecimalDatainC/TestingBufferData/compile.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Import needed stdlib and other dependencies 5 | # 6 | from __future__ import print_function 7 | import os, sys, time, subprocess, shutil, datetime 8 | 9 | 10 | # Iterate through files in this directory and remove all old .o files 11 | for file_item in os.listdir('.'): 12 | if file_item[-2:] == '.o': 13 | print("Found .o file: " + file_item) 14 | os.remove(file_item) 15 | 16 | # Iterate through files in this directory and compile all .c files to .o files 17 | for file_item in os.listdir('.'): 18 | if file_item[-2:] == '.c': 19 | print("Found .c file: " + file_item) 20 | 21 | compile_command = "gcc -c " + file_item + " -o " + file_item[:(len(file_item) -2)] + ".o" 22 | os.system(compile_command) 23 | 24 | 25 | # Iterate through files in this directory and capture them in a list 26 | object_files = [] 27 | for file_item in os.listdir('.'): 28 | if file_item[-2:] == '.o': 29 | object_files.append(file_item) 30 | 31 | # Iterate through files in this directory and link them together to form a binary 32 | final_command = "gcc " 33 | for object_file in object_files: 34 | final_command += object_file + " " 35 | 36 | 37 | final_command += " -o main" 38 | 39 | # Build the binary 40 | os.system(final_command) 41 | 42 | 43 | # Executes the binary 44 | print("PROGRAM OUT: ") 45 | os.system("./main") 46 | 47 | -------------------------------------------------------------------------------- /Drupal_Write_Engine/sites/all/libraries/Encryption/UKEncryption.php: -------------------------------------------------------------------------------- 1 | fp = fopen("/var/www/html/drupal-7-uk/sites/all/libraries/Encryption/keys/key.pub", "r"); 17 | $this->pubkey = fread($this->fp, 8192); 18 | fclose($this->fp); 19 | 20 | if (openssl_public_encrypt($data, $encrypted, $this->pubkey)) 21 | $data = base64_encode($encrypted); 22 | else 23 | throw new Exception('Unable to encrypt data. Perhaps it is bigger than the key size?'); 24 | 25 | return $data; 26 | } 27 | 28 | public function decrypt($data) 29 | { 30 | 31 | $this->fp = fopen("/var/www/html/drupal-7-uk/sites/all/libraries/Encryption/keys/private.pem", "r"); 32 | $this->privkey = fread($this->fp, 8192); 33 | fclose($this->fp); 34 | 35 | if (openssl_private_decrypt(base64_decode($data), $decrypted, $this->privkey)) 36 | $data = $decrypted; 37 | else 38 | $data = ''; 39 | 40 | return $data; 41 | } 42 | } -------------------------------------------------------------------------------- /XCTestExample/XCTestExampleUITests/XCTestExampleUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // XCTestExampleUITests.swift 3 | // XCTestExampleUITests 4 | // 5 | // Created by Matt Eaton on 10/8/16. 6 | // Copyright © 2016 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class XCTestExampleUITests: XCTestCase { 12 | 13 | override func setUp() { 14 | super.setUp() 15 | 16 | // Put setup code here. This method is called before the invocation of each test method in the class. 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | // UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method. 21 | XCUIApplication().launch() 22 | 23 | // In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this. 24 | } 25 | 26 | override func tearDown() { 27 | // Put teardown code here. This method is called after the invocation of each test method in the class. 28 | super.tearDown() 29 | } 30 | 31 | func testExample() { 32 | // Use recording to get started writing UI tests. 33 | // Use XCTAssert and related functions to verify your tests produce the correct results. 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /CloudAnimation/images/cloud127.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 6 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /CloudAnimation/css/main.css: -------------------------------------------------------------------------------- 1 | /* 2 | Cloud Animation 3 | 4 | */ 5 | body{ 6 | padding: 0; 7 | margin: 0; 8 | width: 100%; 9 | height: 100%; 10 | } 11 | #stage { 12 | width: 100%; 13 | height: 100%; 14 | background-color:#ccece4; 15 | position: fixed; 16 | top:0; 17 | display: none; 18 | } 19 | 20 | #grass { 21 | height: 50px; 22 | background-color: #96c249; 23 | width: 100%; 24 | display: block; 25 | position: absolute; 26 | } 27 | 28 | #ground { 29 | position:fixed; 30 | bottom: 0; 31 | width: 100%; 32 | display: block; 33 | height:20px; 34 | background-color: #b8a669; 35 | } 36 | 37 | #sun { 38 | top:10px; 39 | position: absolute; 40 | display: block; 41 | left:10px; 42 | z-index: 50; 43 | } 44 | 45 | .cloud { 46 | position: absolute; 47 | display: block; 48 | } 49 | 50 | #cloud1 { 51 | top:50px; 52 | z-index: 100; 53 | left:-250px; 54 | } 55 | 56 | #cloud2 { 57 | top:80px; 58 | z-index: 200; 59 | left:-340px; 60 | } 61 | 62 | #cloud3 { 63 | top:30px; 64 | z-index: 300; 65 | right:-350px; 66 | } 67 | 68 | #cloud4 { 69 | top:120px; 70 | z-index: 350; 71 | left:-350px; 72 | } 73 | 74 | #clock { 75 | background-color:#fafafa; 76 | width: 700px; 77 | position: absolute; 78 | z-index: 50; 79 | display: block; 80 | left:0; 81 | right:0; 82 | margin: 50px auto; 83 | border: 4px solid #ababab; 84 | } 85 | 86 | #time { 87 | font-size: 64px; 88 | color:#ababab; 89 | text-align: center; 90 | } -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconDebug.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon40.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon60.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon58.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon87.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon80_2.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon120.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "icon120-1.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon180.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "idiom" : "ios-marketing", 53 | "size" : "1024x1024", 54 | "scale" : "1x" 55 | } 56 | ], 57 | "info" : { 58 | "version" : 1, 59 | "author" : "xcode" 60 | } 61 | } -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconRelease.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon40.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon60.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon58.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon87.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon80.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon120.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "icon120-1.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon180.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "idiom" : "ios-marketing", 53 | "size" : "1024x1024", 54 | "scale" : "1x" 55 | } 56 | ], 57 | "info" : { 58 | "version" : 1, 59 | "author" : "xcode" 60 | } 61 | } -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Assets.xcassets/AppIconTesting.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon40.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon60.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon58.png", 19 | "scale" : "2x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon87.png", 25 | "scale" : "3x" 26 | }, 27 | { 28 | "size" : "40x40", 29 | "idiom" : "iphone", 30 | "filename" : "icon80.png", 31 | "scale" : "2x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon120.png", 37 | "scale" : "3x" 38 | }, 39 | { 40 | "size" : "60x60", 41 | "idiom" : "iphone", 42 | "filename" : "icon120-1.png", 43 | "scale" : "2x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "icon180.png", 49 | "scale" : "3x" 50 | }, 51 | { 52 | "idiom" : "ios-marketing", 53 | "size" : "1024x1024", 54 | "scale" : "1x" 55 | } 56 | ], 57 | "info" : { 58 | "version" : 1, 59 | "author" : "xcode" 60 | } 61 | } -------------------------------------------------------------------------------- /XCTestExample/XCTestExample/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UIStatusBarTintParameters 32 | 33 | UINavigationBar 34 | 35 | Style 36 | UIBarStyleDefault 37 | Translucent 38 | 39 | 40 | 41 | UISupportedInterfaceOrientations 42 | 43 | UIInterfaceOrientationPortrait 44 | UIInterfaceOrientationLandscapeLeft 45 | UIInterfaceOrientationLandscapeRight 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /Drupal_Write_Engine/sites/default/modules/uk_create_user/uk_create_user.module: -------------------------------------------------------------------------------- 1 | 999){ 23 | //sets the badge as master yoda 24 | $edit['field_user_badge'][LANGUAGE_NONE][0]['tid'] = 14; 25 | }else if($score > 499 && $score < 999){ 26 | //sets the badge as guru 27 | $edit['field_user_badge'][LANGUAGE_NONE][0]['tid'] = 13; 28 | }else if($score > 99 && $score < 499){ 29 | //sets the badge as smarty pants 30 | $edit['field_user_badge'][LANGUAGE_NONE][0]['tid'] = 12; 31 | }else{ 32 | //sets the badge as novice 33 | $edit['field_user_badge'][LANGUAGE_NONE][0]['tid'] = 11; 34 | } 35 | } 36 | } 37 | 38 | /*** Ensure that a regular user cannot edit their score or badge ***/ 39 | function uk_create_user_form_alter(&$form, &$form_state, $form_id){ 40 | //@TODO 41 | 42 | } 43 | 44 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development.xcodeproj/xcuserdata/matteaton.xcuserdatad/xcschemes/xcschememanagement.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | SchemeUserState 6 | 7 | Agnostic Development.xcscheme 8 | 9 | orderHint 10 | 0 11 | 12 | AgnosticDevelopmentAutomatedUITests.xcscheme 13 | 14 | orderHint 15 | 3 16 | 17 | AgnosticDevelopmentLatencyTest.xcscheme 18 | 19 | orderHint 20 | 1 21 | 22 | AgnosticDevelopmentUITests.xcscheme 23 | 24 | orderHint 25 | 2 26 | 27 | 28 | SuppressBuildableAutocreation 29 | 30 | 300EDB3E1F7FD9F300BC2FC2 31 | 32 | primary 33 | 34 | 35 | 30375B0D1F8E3BEC0055D13C 36 | 37 | primary 38 | 39 | 40 | 308FE1911FB0E5A100DD9520 41 | 42 | primary 43 | 44 | 45 | 30959B0D1EAD3D1800954777 46 | 47 | primary 48 | 49 | 50 | 30959B211EAD3D1900954777 51 | 52 | primary 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /SwiftandPythonInteropUsingDynamicMemberLookup/Compute/compute.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # 3 | 4 | import os, sys 5 | import numpy as np 6 | 7 | class compute: 8 | 9 | def __init__(self, dynamic_text, numeric_list): 10 | self.dynamic_text = dynamic_text 11 | self.static_text = "Hello from Python" 12 | self.numeric_list = numeric_list 13 | 14 | def get_static_text(self): 15 | return self.static_text 16 | 17 | def get_dynamic_text(self): 18 | return self.dynamic_text 19 | 20 | def add_to_list(self, added_values): 21 | self.numeric_list = self.numeric_list + added_values 22 | 23 | 24 | def get_mean(self): 25 | if self.numeric_list.count > 0: 26 | return np.mean(self.numeric_list) 27 | else: 28 | return -1 29 | 30 | def get_median(self): 31 | if self.numeric_list.count > 0: 32 | return np.median(self.numeric_list) 33 | else: 34 | return -1 35 | 36 | def get_min(self): 37 | if self.numeric_list.count > 0: 38 | return np.amin(self.numeric_list) 39 | else: 40 | return -1 41 | 42 | def get_max(self): 43 | if self.numeric_list.count > 0: 44 | return np.amax(self.numeric_list) 45 | else: 46 | return -1 47 | 48 | def get_standard_deviation(self): 49 | if self.numeric_list.count > 0: 50 | return np.std(self.numeric_list) 51 | else: 52 | return -1 53 | 54 | def get_square_root(self): 55 | if self.numeric_list.count > 0: 56 | return np.sqrt(self.numeric_list) 57 | else: 58 | return [-1] 59 | -------------------------------------------------------------------------------- /PythonPrimeNumberComputation/prime_numbers_list.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # 4 | # Support: 5 | # This program supports Python 2.7 -> Python 3.5 6 | # This program was design to run on a *nix system 7 | # This program was tested with a virtualenv for 2.7 and 3.5 8 | # 9 | # Overview: 10 | # The purpose of this program is to write a program that display prime 11 | # numbers from 1 to 100 12 | # 13 | import os, sys 14 | 15 | # Find a prime number 16 | def is_prime(num): 17 | i = 0 18 | for e in range(1, (num + 1)): 19 | if num % e == 0: 20 | i += 1 21 | 22 | if i > 2: 23 | return False 24 | 25 | return True 26 | 27 | 28 | 29 | # Main definition 30 | def main(): 31 | primes = [] 32 | for i in range(1, 100): 33 | # Add some common filters to reduce time complexity 34 | if i > 2 and i % 2 == 0: 35 | continue 36 | if i > 3 and i % 3 == 0: 37 | continue 38 | if i > 5 and i % 5 == 0: 39 | continue 40 | if i > 7 and i % 7 == 0: 41 | continue 42 | if i % 9 == 0: 43 | continue 44 | 45 | # If we have made is it this far, by the laws of multiples 46 | # we know that we do not have to go through the expensive 47 | # routine of checking if the number is prime or not 48 | # As the iterator grows the time complexity of checking if the number 49 | # is prime or not grows with it. 50 | primes.append(i) 51 | 52 | # Uncomment here to use the is_prime method 53 | #if is_prime(i): 54 | # primes.append(i) 55 | 56 | 57 | # Display prime numbers 58 | for i in primes: 59 | print("Prime: " + str(i)) 60 | exit("Goodbye!") 61 | 62 | 63 | 64 | # Execute the main function 65 | if __name__ == '__main__': 66 | main() 67 | -------------------------------------------------------------------------------- /XCTestExample/XCTestExampleTests/CoreDataTestClass.swift: -------------------------------------------------------------------------------- 1 | // 2 | // CoreDataTestClass.swift 3 | // XCTestExample 4 | // 5 | // Created by Matt Eaton on 10/8/16. 6 | // Copyright © 2016 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import CoreData 11 | 12 | class CoreDataTestClass: XCTestCase { 13 | 14 | // Create a local NSManagedObjectContext 15 | var managedObjectContext: NSManagedObjectContext? = nil 16 | 17 | // In iOS 10 and Swift 3 this is all I need to create my core data stack 18 | lazy var persistentContainer: NSPersistentContainer = { 19 | let container = NSPersistentContainer(name: "XCTestExample") 20 | container.loadPersistentStores(completionHandler: { (storeDescription, error) in 21 | if let error = error as NSError? { 22 | fatalError("Unresolved error \(error), \(error.userInfo)") 23 | } 24 | }) 25 | return container 26 | }() 27 | 28 | override func tearDown() { 29 | super.tearDown() 30 | managedObjectContext = nil 31 | } 32 | 33 | override func setUp() { 34 | super.setUp() 35 | // Set the NSManagedObjectContext with the view Context 36 | managedObjectContext = self.persistentContainer.viewContext 37 | } 38 | 39 | func testExample() { 40 | // This is an example of a functional test case. 41 | // Use XCTAssert and related functions to verify your tests produce the correct results. 42 | } 43 | 44 | func testPerformanceExample() { 45 | // This is an example of a performance test case. 46 | self.measure { 47 | // Put the code you want to measure the time of here. 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /XCTestExample/XCTestExampleTests/TestTitleGeneration.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestTitleGeneration.swift 3 | // XCTestExample 4 | // 5 | // Created by Matt Eaton on 10/8/16. 6 | // Copyright © 2016 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | import XCTest 11 | @testable import XCTestExample 12 | 13 | class TestTitleGeneration: XCTestCase { 14 | 15 | let master = MasterViewController() 16 | 17 | override func setUp() { 18 | super.setUp() 19 | // Put setup code here. This method is called before the invocation of each test method in the class. 20 | } 21 | 22 | override func tearDown() { 23 | // Put teardown code here. This method is called after the invocation of each test method in the class. 24 | super.tearDown() 25 | } 26 | 27 | func testRandomTitle() { 28 | 29 | // Declare two constant lengths for random string generation length 30 | let firstTestLength = 10 31 | let secondTestLength = 15 32 | 33 | // Get the first string 34 | let firstString = master.getRandomString(stringLength: firstTestLength) 35 | XCTAssertEqual(firstString.characters.count, firstTestLength, "First string characters should equal \(firstTestLength)") 36 | // Get the second string 37 | let secondString = master.getRandomString(stringLength: secondTestLength) 38 | XCTAssertEqual(secondString.characters.count, secondTestLength, "Second string characters should equal \(secondTestLength)") 39 | 40 | } 41 | 42 | func testPerformanceExample() { 43 | // This is an example of a performance test case. 44 | self.measure { 45 | // Put the code you want to measure the time of here. 46 | } 47 | } 48 | 49 | } 50 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Classes/Reachability.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Reachability.swift 3 | // Agnostic Development 4 | // 5 | // Created by Matt Eaton on 11/6/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import SystemConfiguration 10 | 11 | public class Reachability { 12 | 13 | class func isConnectedToNetwork() -> Bool { 14 | 15 | var zeroAddress = sockaddr_in(sin_len: 0, sin_family: 0, sin_port: 0, sin_addr: in_addr(s_addr: 0), sin_zero: (0, 0, 0, 0, 0, 0, 0, 0)) 16 | zeroAddress.sin_len = UInt8(MemoryLayout.size(ofValue: zeroAddress)) 17 | zeroAddress.sin_family = sa_family_t(AF_INET) 18 | 19 | let defaultRouteReachability = withUnsafePointer(to: &zeroAddress) { 20 | $0.withMemoryRebound(to: sockaddr.self, capacity: 1) {zeroSockAddress in 21 | SCNetworkReachabilityCreateWithAddress(nil, zeroSockAddress) 22 | } 23 | } 24 | 25 | var flags: SCNetworkReachabilityFlags = SCNetworkReachabilityFlags(rawValue: 0) 26 | if SCNetworkReachabilityGetFlags(defaultRouteReachability!, &flags) == false { 27 | return false 28 | } 29 | 30 | /* Only Working for WIFI 31 | let isReachable = flags == .reachable 32 | let needsConnection = flags == .connectionRequired 33 | 34 | return isReachable && !needsConnection 35 | */ 36 | 37 | // Working for Cellular and WIFI 38 | let isReachable = (flags.rawValue & UInt32(kSCNetworkFlagsReachable)) != 0 39 | let needsConnection = (flags.rawValue & UInt32(kSCNetworkFlagsConnectionRequired)) != 0 40 | let ret = (isReachable && !needsConnection) 41 | 42 | return ret 43 | 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /XCTestExample/XCTestExample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Article.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Article.swift 3 | // Agnostic Development 4 | // 5 | // Created by Matt Eaton on 4/23/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | public class Article: NSObject { 12 | 13 | // 14 | // MARK: - Public Instance Properties 15 | // 16 | public var title: String? 17 | public var dateString: String? 18 | public var articleDescription: String? 19 | public var URLLink: String? 20 | 21 | // 22 | // MARK: - Private Instance Property 23 | // 24 | private let networkKeyMap: [String: String] = ["title": "title", 25 | "dateString": "date", 26 | "articleDescription": "description", 27 | "URLLink": "URLLink"] 28 | 29 | override init() { 30 | super.init() 31 | } 32 | 33 | convenience init(jsonObject: [String: AnyObject]) { 34 | self.init() 35 | 36 | // Parse network objects based upon a network key-value mapping schema 37 | for (key, value) in networkKeyMap { 38 | if let networkObject = jsonObject[value] as? String { 39 | //self.setValue(networkObject, forKey: key) 40 | if key == "title" { 41 | self.title = networkObject 42 | } else if key == "dateString" { 43 | self.dateString = networkObject 44 | } else if key == "articleDescription" { 45 | self.articleDescription = networkObject 46 | } else if key == "URLLink" { 47 | self.URLLink = networkObject 48 | } 49 | } 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /Agnostic Development/ArticleDetailViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ArticleDetailViewController.swift 3 | // Agnostic Development 4 | // 5 | // Created by Matt Eaton on 4/23/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ArticleDetailViewController: UIViewController { 12 | 13 | // 14 | // MARK: - IBOutlets 15 | // 16 | @IBOutlet weak var articleTitle: UILabel! 17 | @IBOutlet weak var articleDate: UILabel! 18 | @IBOutlet weak var articleDesc: UILabel! 19 | @IBOutlet weak var articleLink: UIButton! 20 | 21 | // 22 | // MARK: Constants 23 | // 24 | var selectedArticle: Article? 25 | 26 | // 27 | // MARK: View Controller Methods 28 | // 29 | override func viewDidLoad() { 30 | super.viewDidLoad() 31 | 32 | // Set navigation bar logo 33 | self.navigationItem.titleView = Helper.getLogo() 34 | 35 | self.setup() 36 | } 37 | 38 | override func didReceiveMemoryWarning() { 39 | super.didReceiveMemoryWarning() 40 | } 41 | 42 | // 43 | // MARK: Instance Methods 44 | // 45 | func setup() { 46 | if let passedInArticle = selectedArticle { 47 | self.articleTitle.text = passedInArticle.title 48 | self.articleDate.text = passedInArticle.dateString 49 | self.articleDesc.text = passedInArticle.articleDescription 50 | self.articleDesc.sizeToFit() 51 | } 52 | } 53 | 54 | // 55 | // MARK: IBOutlets 56 | // 57 | @IBAction func viewLink(sender: UIButton) { 58 | 59 | guard let articleLink = selectedArticle?.link else { 60 | return 61 | } 62 | 63 | if let url = URL(string: articleLink) { 64 | UIApplication.shared.open(url, options: [:]) 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/AgnosticDevelopmentAutomatedUITests/AgnosticDevelopmentAutomatedUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AgnosticDevelopmentAutomatedUITests.swift 3 | // AgnosticDevelopmentAutomatedUITests 4 | // 5 | // Created by Matt Eaton on 11/6/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import Foundation 11 | 12 | class AgnosticDevelopmentAutomatedUITests: XCTestCase { 13 | 14 | var app: XCUIApplication! 15 | var buttonIDs: [String] = [] 16 | 17 | override func setUp() { 18 | super.setUp() 19 | NSLog("setUp") 20 | // Parse the comma separated TEST_ARGs variable 21 | if let BUTTON_ID_ARGS = ProcessInfo.processInfo.environment["BUTTON_ID_ARGS"] { 22 | buttonIDs = BUTTON_ID_ARGS.components(separatedBy: ",") 23 | NSLog("BUTTON_ID_ARGS: \(BUTTON_ID_ARGS)") 24 | NSLog("Launch Data BUTTON_ID_ARGS Count: \(buttonIDs.count)") 25 | } else { 26 | // If you do not get any test args, assert failure 27 | XCTAssert(false, "FAIL: No data found in BUTTON_ID_ARGS") 28 | } 29 | 30 | // In UI tests it is usually best to stop immediately when a failure occurs. 31 | continueAfterFailure = false 32 | app = XCUIApplication() 33 | 34 | } 35 | 36 | override func tearDown() { 37 | // Put teardown code here. This method is called after the invocation of each test method in the class. 38 | super.tearDown() 39 | } 40 | 41 | func testCommandLineData() { 42 | 43 | app.launch() 44 | NSLog("Passed in data: \(buttonIDs[0])") 45 | // Assert that we are displaying the button 46 | let unknownButton = app.tables[buttonIDs[0]] 47 | 48 | unknownButton.tap() 49 | XCTAssertTrue(true, "Reached the end with success") 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /TestingandConvertingHexadecimalDatainC/TestingBufferData/conversion.c: -------------------------------------------------------------------------------- 1 | /** 2 | * Hexadecimal character conversion to ascii 3 | * Included testing module to test our accuracy in our conversion 4 | * 5 | * Compile: (compile.py handles this for you) 6 | * gcc -c conversion.c -o conversion.o 7 | * gcc -c conversion_tests.c -o conversion_tests.o 8 | * gcc conversion.o conversion_tests.o -o conversion 9 | * 10 | * ./compile.py form the command line with at least Python 2.7 11 | **/ 12 | #include 13 | #include "conversion_tests.h" 14 | 15 | #define SMALL_BUFFER_SIZE 2 16 | #define LARGE_BUFFER_SIZE 8 17 | 18 | int main(int argc, char **argv) { 19 | 20 | // Value between 0 and 255 21 | unsigned char hexData[SMALL_BUFFER_SIZE] = {0x6a, 0xdc}; 22 | char hexSwapArray[4]; 23 | 24 | for (int i = 0; i < SMALL_BUFFER_SIZE; i += 1) { 25 | // hexSwapArray contains the original characters and hexData has the 26 | // current set being formatted as lowercase hexidecimal 27 | sprintf(hexSwapArray, "%x", hexData[i]); 28 | printf("char string: %s\n", hexSwapArray); 29 | } 30 | 31 | // Now let's test our code out using the algorithm implemented above 32 | // Check the accuracy of sprintf by manually converting the decimal value 33 | // to a hex value and comparing the two char arrays 34 | 35 | // Can no longer use unsigned char as values are now outside 0 and 255 36 | unsigned int hexDataRetro[LARGE_BUFFER_SIZE] = {0x00, 0x3f3f, 0x0d, 0x3f, 37 | 0xdddd, 0xcd, 0x02, 0x5f}; 38 | for (int e = 0; e < LARGE_BUFFER_SIZE; e += 1) { 39 | printf("-------- TEST START --------\n"); 40 | if (test_sprintf_hex_data(hexDataRetro[e], LARGE_BUFFER_SIZE) == 0) { 41 | printf("PASSED: The comparison using sprintf DID compare correctly\n"); 42 | } else { 43 | printf("FAILED: The comparison using sprintf did not compare correctly\n"); 44 | } 45 | printf("----------------------------\n"); 46 | } 47 | 48 | return 0; 49 | } -------------------------------------------------------------------------------- /videoInteraction/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Video Interaction 5 | 6 | 7 | 8 |
9 |
10 |
11 | 12 |
13 |
14 | Image Overlay 15 |
16 |
17 |
18 |
19 | 20 |
21 |
22 | Image Overlay 23 |
24 |
25 |
26 |
27 | 28 |
29 |
30 | Image Overlay 31 |
32 |
33 |
34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /UsingCoreMLtoCreateASongRecommendationEngine/DataPipeline/process.py: -------------------------------------------------------------------------------- 1 | # Import needed stdlib and other dependencies 2 | import os, sys, time 3 | 4 | complete_content = "" # The string contents of the file 5 | file_lines = [] # A list of lines that the complete_content will be exploded to 6 | new_lines = [] 7 | 8 | 9 | 10 | # Open file, read contents into a list to be parsed 11 | try: 12 | # Open the file and read the contents into a 13 | with open("artist.txt", 'r') as file: 14 | complete_content = file.read() 15 | 16 | # Explode or split the string contents to a list 17 | file_lines = complete_content.split("\n") 18 | 19 | except ValueError: 20 | file_open_errors = "Unexpected error loading file: " + str(sys.exc_info()[0]) 21 | 22 | # Write the raised error 23 | error_raised = "Unexpected error loading file: " + str(sys.exc_info()[0]) 24 | # Display the error to the console 25 | print(error_raised) 26 | exit("This program needs an input file to continue. Exiting...") 27 | 28 | 29 | i = 0 30 | # Loop through each file line and discern what needs to be done with the data 31 | for line in file_lines: 32 | # {"46.44231", "-93.36586", "Go Fish", "Twin Cities, MN"}, 33 | # Split the line by whitespace so we can parse the line 34 | command_list = line.split('", "') 35 | line = "" 36 | 37 | if len(command_list) is not 4: 38 | continue 39 | i += 1 40 | 41 | if len(command_list) > 0 and command_list[0] is not None: 42 | lat = command_list[0] 43 | lat = lat[:1] + '"Latitude":' + lat[1:] 44 | line += lat + '", ' 45 | 46 | if len(command_list) > 0 and command_list[1] is not None: 47 | lon = command_list[1] 48 | line += '"Longitude":"' + lon + '", ' 49 | 50 | if len(command_list) > 1 and command_list[2] is not None: 51 | art = command_list[2] 52 | line += '"Artist":"' + art + '", ' 53 | 54 | if len(command_list) > 2 and command_list[3] is not None: 55 | city = command_list[3] 56 | line += '"City":"' + city 57 | 58 | line += '\n' 59 | new_lines.append(line) 60 | 61 | # Write the new file 62 | json_file = open("new_artists.json", "w") 63 | for l in new_lines: 64 | json_file.write(l) 65 | 66 | json_file.close() 67 | -------------------------------------------------------------------------------- /UsingCoreMLtoCreateASongRecommendationEngine/DataPipeline/ExtraData/id_artist_subset.json: -------------------------------------------------------------------------------- 1 | {"data":[{"id":"AR2HXXS1187B9AF3E2","artist":"Jesus Jones"}, 2 | {"id":"AR6F6I21187FB5A3AA","artist":"Aesop Rock"}, 3 | {"id":"ARODP5P1187FB40142","artist":"Eddie Cano"}, 4 | {"id":"AR0WQ1Q1187B992E16","artist":"Richard Smith"}, 5 | {"id":"ARGPFYP1187B98F5CB","artist":"The Highwaymen"}, 6 | {"id":"ARWJHW61187B98FA8E","artist":"Papa Wemba"}, 7 | {"id":"AREFFEC1187B98E12F","artist":"Digital Mystikz"}, 8 | {"id":"AR6GSIE1187B98C3C7","artist":"Ned Miller"}, 9 | {"id":"ARTKTYG1187FB40CBA","artist":"Dendemann"}, 10 | {"id":"ARVLIVA1187B991590","artist":"Zeca Baleiro"}, 11 | {"id":"AROIHOI122988FEB8E","artist":"Mario Rosenstock"}, 12 | {"id":"ARPUBU61187B98A4E6","artist":"John Mayall"}, 13 | {"id":"ARLWDC31187B9B4D71","artist":"Radio Birdman"}, 14 | {"id":"ARSS4Y41187B9B0AC6","artist":"Bobaflex"}, 15 | {"id":"ARQKBSH1187B9B4B99","artist":"Francis Dhomont"}, 16 | {"id":"AR8FMEN1187FB4A657","artist":"Lizzy Borden"}, 17 | {"id":"ARE0OLY1187B9AD19F","artist":"Jesse Malin"}, 18 | {"id":"ARZVJ641187FB36FA4","artist":"Alexander Zonjic"}, 19 | {"id":"ARLE1JH1187B9B630B","artist":"Zbigniew Preisner"}, 20 | {"id":"AR0RCMP1187FB3F427","artist":"Billie Jo Spears"}, 21 | {"id":"ARE8GLF1187FB52532","artist":"Red Hot Chili Peppers"}, 22 | {"id":"ARVMZFK11F50C4A0D2","artist":"Tunsi"}, 23 | {"id":"AR65K7A1187FB4DAA4","artist":"Beyoncé"}, 24 | {"id":"ARKEZNY1187B9B7F6C","artist":"Irini Merkouri"}, 25 | {"id":"ARJFDKM1269FB35F40","artist":"Monique Morelli"}, 26 | {"id":"ARGVJPK1187B9909EA","artist":"Josh Groban"}, 27 | {"id":"ARCID1N1187FB51DA0","artist":"Carlos Nuñez"}, 28 | {"id":"ARPCDZM1187B996876","artist":"Dyango"}, 29 | {"id":"AR3FE581187FB3F90A","artist":"Fabolous"}, 30 | {"id":"ARMSL551187FB3F4B0","artist":"K's Choice"}, 31 | {"id":"AREWQSE1187B9AEC6C","artist":"The Jackson Southernaires"}, 32 | {"id":"ARDNS031187B9924F0","artist":"Tim Wilson"}, 33 | {"id":"ARJA1841187FB3A029","artist":"David Bowie"}, 34 | {"id":"ARD3LXU1187B9ABFC5","artist":"Sex Pistols"}, 35 | {"id":"ARH4N0N1187FB3E1F1","artist":"Malkit Singh"}, 36 | {"id":"AR10USD1187B99F3F1","artist":"Silverstein"}, 37 | {"id":"AR1PNWN1187FB4A404","artist":"El Gran Combo De Puerto Rico"}]} -------------------------------------------------------------------------------- /TriviaGameAnimation/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Trivia Game Animation 5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
TIME:
20 |
21 |
22 |
SCORE:
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |

WEB TRIVIA GAME

44 |
45 | 46 |
47 |
48 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /UsingCoreMLtoCreateASongRecommendationEngine/DataPipeline/ExtraData/sublist.txt: -------------------------------------------------------------------------------- 1 | {"46.44231", "-93.36586", "Go Fish", "Twin Cities, MN"}, 2 | {"51.59678", "-0.33556", "Screaming Lord Sutch", "Harrow, Middlesex, England"}, 3 | {"40.69626", "-73.83301", "Morton Gould", "Richmond Hill, NY"}, 4 | {"43.58828", "-79.64372", "Crash Parallel", "Mississauga"}, 5 | {"59.91228", "10.74998", "Prins Thomas", "Oslo"}, 6 | {"56.95468", "-98.30897", "Blinker The Star", "Canada"}, 7 | {"51.16418", "10.45415", "17 Hippies", "Fort Worth Texas USA"}, 8 | {"37.30198", "-78.3926", "Lady Of Rage", "Farmville, VA"}, 9 | {"52.22357", "6.89537", "Hans Theessink / Gerry Lockran", "Enschede, Netherlands"}, 10 | {"38.8991", "-77.029", "War Of Ages", "Washington, D.C."}, 11 | {"31.1689", "-100.07715", "Lucky Luciano", "Texas"}, 12 | {"52.88356", "-1.97406", "Duncan Browne Sebastian Graham Jones", "England"}, 13 | {"52.88356", "-1.97406", "Steve Brookstein", "England"}, 14 | {"47.16116", "19.50496", "Evelyne Dubourg", "Hungary"}, 15 | {"49.38426", "-84.75627", "Splatter", "CANADA - Ontario"}, 16 | {"41.93197", "-71.44431", "David Olney", "Lincoln, RI"}, 17 | {"27.9758", "-81.54106", "Niza", "Florida"}, 18 | {"34.05349", "-118.24532", "Meow Meow", "California - LA"}, 19 | {"34.05349", "-118.24532", "The Malibooz", "California - LA"}, 20 | {"33.74831", "-84.39111", "The Tag Team", "Atlanta, GA"}, 21 | {"52.88356", "-1.97406", "Matt Schofield", "UK - England - East"}, 22 | {"18.45462", "-66.06462", "Ismael Rivera", "Santurce, Puerto Rico"}, 23 | {"34.7519" , "-92.13055", "Ramon Ayala", "AR"}, 24 | {"60.3907" , "5.33275", "Vulture Industries", "Bergen"}, 25 | {"42.50382", "12.57347", "NO FEAR", "ITALY"}, 26 | {"40.4203" , "-3.70577", "Susanne Sundfør", "Madrid Spain"}, 27 | {"42.32356", "-122.87561", "Virus Nine", "Medford, OR"}, 28 | {"42.31256", "-71.08868", "The Ducky Boys", "Boston, MA"}, 29 | {"38.8235" , "-75.92381", "Seventh Key", "Maryland"}, 30 | {"40.65507", "-73.94888", "Life Of Agony", "Brooklyn, NY"}, 31 | {"43.29368", "5.37249", "Akhenaton", "Marseilles, France"}, 32 | {"40.71455", "-74.00712", "Sugar Eater", "NY - Upstate NY"}, 33 | {"64.55653", "12.66538", "Mark Steiner", "NORWAY"}, 34 | {"35.21962", "-80.01955", "John Brown", "North Carolina"}, -------------------------------------------------------------------------------- /CloudAnimation/images/clouds64.svg: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /TestingandConvertingHexadecimalDatainC/TestingBufferData/conversion_tests.c: -------------------------------------------------------------------------------- 1 | /** 2 | * conversion_test.c 3 | * 4 | * Conversion Tests Module code 5 | * This module test's the accuracy of our hex values being converted with sprintf 6 | * This file can optionally be compiled with the main program. 7 | * This file should be recognized with compile.py 8 | **/ 9 | #include 10 | #include 11 | #include "conversion_tests.h" 12 | 13 | 14 | /** 15 | * Our test function manually converts the decimal represented decimalHexValue 16 | * to a hex value by hand. 17 | * 18 | * The hex value is then compared against the output of sprintf to check accuracy 19 | * and to check if we can assert accuracy on sprintf for converting hex values. 20 | */ 21 | int test_sprintf_hex_data(unsigned int decimalHexValue, int size) { 22 | 23 | // This implementation is fairly wasteful in terms of memory 24 | // The three char arrays represent an optomistic chunk of memory to prove our test 25 | // Using an assigned char limit could be dangerous in this situation 26 | // It might be better to look into dynamically allocation memory using calloc in a running app 27 | char hexChars[16] = "0123456789abcdef"; 28 | unsigned int decimalValue = decimalHexValue; 29 | char reverseBuffer[10], swapBuffer[10], compareBuffer[10]; 30 | int whileFlag = 1, index = 0, reverseIndex = 0; 31 | 32 | // Zero out the reverseBuffer and compareBuffer for potential memory issues 33 | for (int j = 0; j < 10; j += 1) { 34 | reverseBuffer[j] = 0; 35 | compareBuffer[j] = 0; 36 | } 37 | 38 | while(whileFlag) { 39 | if (decimalValue > 0) { 40 | reverseBuffer[index] = hexChars[decimalValue % 16]; 41 | index += 1; 42 | decimalValue = decimalValue / 16; 43 | 44 | } else { 45 | whileFlag = 0; 46 | } 47 | } 48 | 49 | if (index > 0) { 50 | for (int e = (index-1); e >= 0; e -= 1) { 51 | compareBuffer[reverseIndex] = reverseBuffer[e]; 52 | reverseIndex += 1; 53 | } 54 | } else { 55 | compareBuffer[reverseIndex] = '0'; 56 | } 57 | 58 | // Print out the swap and compare buffers 59 | sprintf(swapBuffer, "%x", decimalHexValue); 60 | printf("swap buffer : %s\n", swapBuffer); 61 | printf("compare buffer: %s\n", compareBuffer); 62 | 63 | return strcmp(swapBuffer, compareBuffer); 64 | } -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/ArticleDetailViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ArticleDetailViewController.swift 3 | // Agnostic Development 4 | // 5 | // Created by Matt Eaton on 4/23/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ArticleDetailViewController: UIViewController { 12 | 13 | // 14 | // MARK: - IBOutlets 15 | // 16 | @IBOutlet weak var articleTitle: UILabel! 17 | @IBOutlet weak var articleDate: UILabel! 18 | @IBOutlet weak var articleDesc: UILabel! 19 | @IBOutlet weak var articleLink: UIButton! 20 | 21 | // 22 | // MARK: Constants 23 | // 24 | var selectedArticle: Article? 25 | 26 | // 27 | // MARK: View Controller Methods 28 | // 29 | override func viewDidLoad() { 30 | super.viewDidLoad() 31 | 32 | // Set navigation bar logo 33 | self.navigationItem.titleView = Helper.getLogo() 34 | 35 | // Setup XCUITest Accessibility Labels 36 | articleTitle.accessibilityIdentifier = "label--articleTitleLabel" 37 | articleDate.accessibilityIdentifier = "label--articleDateLabel" 38 | articleDesc.accessibilityIdentifier = "label--articleDescriptionLabel" 39 | articleLink.accessibilityIdentifier = "button--articleLinkButton" 40 | 41 | self.setup() 42 | } 43 | 44 | override func didReceiveMemoryWarning() { 45 | super.didReceiveMemoryWarning() 46 | } 47 | 48 | // 49 | // MARK: Instance Methods 50 | // 51 | func setup() { 52 | if let passedInArticle = selectedArticle { 53 | self.articleTitle.text = passedInArticle.title 54 | self.articleDate.text = passedInArticle.dateString 55 | self.articleDesc.text = passedInArticle.articleDescription 56 | self.articleDesc.sizeToFit() 57 | } 58 | } 59 | 60 | // 61 | // MARK: IBOutlets 62 | // 63 | @IBAction func viewLink(sender: UIButton) { 64 | 65 | guard let articleLink = selectedArticle?.URLLink else { 66 | return 67 | } 68 | 69 | if let url = URL(string: articleLink) { 70 | UIApplication.shared.open(url, options: [:]) 71 | } 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /Node_Read_Engine/server.js: -------------------------------------------------------------------------------- 1 | // server.js 2 | 3 | // BASE SETUP 4 | // ============================================================================= 5 | 6 | // call the packages we need 7 | var express = require('express'); // call express 8 | var app = express(); // define our app using express 9 | var port = process.env.PORT || 8181; // set our port 10 | var bodyParser = require('body-parser'); 11 | var mongoose = require('mongoose'); 12 | var passport = require('passport'); 13 | var flash = require('connect-flash'); 14 | var session = require('express-session'); 15 | var cookieParser = require('cookie-parser'); 16 | var morgan = require('morgan'); 17 | var configDB = require('./app/config/database.js'); 18 | 19 | 20 | 21 | // configuration =============================================================== 22 | mongoose.connect(configDB.url); // connect to our database 23 | 24 | 25 | require('./app/config/passport')(passport); // pass passport for configuration 26 | 27 | // configure app to use bodyParser() 28 | // this will let us get the data from a POST 29 | 30 | app.use(morgan('dev')); // log every request to the console 31 | app.use(cookieParser()); // read cookies (needed for auth) 32 | app.use(bodyParser.urlencoded({ extended: true })); 33 | app.use(bodyParser.json()); 34 | 35 | // required for passport 36 | app.use(session({ 37 | secret: 'HVCyKhngHz6lfPROwKvjqm6mPuchP3U7WE8KO3Pp', 38 | resave: true, 39 | saveUninitialized: true, 40 | cookie: { 41 | secure: true, 42 | maxAge: new Date(Date.now() + 3600000) 43 | } 44 | })); // session secret 45 | app.use(passport.initialize()); 46 | app.use(passport.session()); // persistent login sessions 47 | app.use(flash()); // use connect-flash for flash messages stored in session 48 | 49 | // ROUTES FOR OUR API 50 | // ============================================================================= 51 | 52 | require('./app/routes/routes')(app, passport); // pass our application into our routes 53 | 54 | 55 | 56 | // START THE SERVER 57 | // ============================================================================= 58 | app.listen(port); 59 | console.log('Magic happens on port ' + port); 60 | 61 | 62 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/AgnosticDevelopmentUITests/AgnosticDevelopmentTestArticleLinkButton.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AgnosticDevelopmentTestArticleLinkButton.swift 3 | // AgnosticDevelopmentUITests 4 | // 5 | // Created by Matt Eaton on 10/23/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | 11 | class AgnosticDevelopmentTestArticleLinkButton: XCTestCase { 12 | 13 | var app: XCUIApplication! 14 | 15 | override func setUp() { 16 | super.setUp() 17 | 18 | // In UI tests it is usually best to stop immediately when a failure occurs. 19 | continueAfterFailure = false 20 | app = XCUIApplication() 21 | } 22 | 23 | override func tearDown() { 24 | // Put teardown code here. This method is called after the invocation of each test method in the class. 25 | super.tearDown() 26 | } 27 | 28 | func testArticleButton() { 29 | app.launch() 30 | 31 | // Assert that we are displaying the tableview 32 | let articleTableView = app.tables["table--articleTableView"] 33 | 34 | XCTAssertTrue(articleTableView.exists, "The article tableview exists") 35 | 36 | // Get an array of cells 37 | let tableCells = articleTableView.cells 38 | print("Count of table cells \(tableCells.count)") 39 | 40 | if tableCells.count > 0 { 41 | // Grab the first cell and verify that it exists and tap it 42 | let cellZero = tableCells.element(boundBy: 0) 43 | XCTAssertTrue(cellZero.exists, "The first cell is in place on the table") 44 | // Does this actually take us to the next screen 45 | cellZero.tap() 46 | // This verifies that our article title label exists 47 | let articleButton = app.buttons["button--articleLinkButton"] 48 | XCTAssertTrue(articleButton.exists, "Validating article button") 49 | // Attempt to open the article button in safari 50 | articleButton.tap() 51 | // If we make it here we can assume that the article was opened successfully 52 | XCTAssertTrue(true, "Opening the article was successful") 53 | 54 | } else { 55 | XCTAssert(false, "Was not able to find any table cells") 56 | } 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Agnostic Development 4 | // 5 | // Created by Matt Eaton on 4/23/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | // Override point for customization after application launch. 19 | UIApplication.shared.statusBarStyle = .lightContent 20 | 21 | return true 22 | } 23 | 24 | func applicationWillResignActive(_ application: UIApplication) { 25 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 26 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 27 | } 28 | 29 | func applicationDidEnterBackground(_ application: UIApplication) { 30 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 31 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 32 | } 33 | 34 | func applicationWillEnterForeground(_ application: UIApplication) { 35 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 36 | } 37 | 38 | func applicationDidBecomeActive(_ application: UIApplication) { 39 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 40 | } 41 | 42 | func applicationWillTerminate(_ application: UIApplication) { 43 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 44 | } 45 | 46 | 47 | } 48 | 49 | -------------------------------------------------------------------------------- /HowtoUsePythonListComprehensions/listComprehensions.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | 4 | 5 | # List comprehension take's the form of 6 | # [ (output) (for loop(s)) (condition)] 7 | 8 | 9 | def print_list(list_arg, label): 10 | for n in list_arg: 11 | print(label + ": " +str(n)) 12 | 13 | ##################### Example One ##################### 14 | 15 | # Example One 16 | # Example one square's a list of numbers by hand 17 | 18 | print("------------------By Hand------------------") 19 | 20 | l = [4, 5, 6, 7, 8] 21 | squared_list = [] 22 | for n in l: 23 | squared_list.append(n*n) 24 | 25 | print_list(squared_list, "Squared Number") 26 | 27 | print("-----------List Comprehension--------------") 28 | 29 | # Square a list of numbers using a list comprehension 30 | squared_list = [n * n for n in l] 31 | print_list(squared_list, "Squared Number") 32 | 33 | # Takes the form 34 | # [(output) (for loop)] 35 | # Squared Number: 16 36 | # Squared Number: 25 37 | # Squared Number: 36 38 | # Squared Number: 49 39 | # Squared Number: 64 40 | 41 | ##################### Example Two ##################### 42 | 43 | # Example Two 44 | # Create a matrix/NumPy array by hand 45 | # Example two includes a double for loop that creates a 2d array/list 46 | dx = [3, 4, 5, 9] 47 | dy = [5, 3, 2, 1] 48 | output_matrix = [] 49 | 50 | for dx_n in dx: 51 | dx_row = [] 52 | for dy_n in dy: 53 | dx_row.append(dx_n * dy_n) 54 | output_matrix.append(dx_row) 55 | 56 | print("------------------By Hand------------------") 57 | print(output_matrix) 58 | 59 | print("-----------List Comprehension--------------") 60 | output = [] 61 | output = [[dx_n * dy_n for dy_n in dy] for dx_n in dx] 62 | 63 | print(output) 64 | 65 | # Takes the form 66 | # [ [(output) (for columns] | for rows )] 67 | # [[15, 9, 6, 3], [20, 12, 8, 4], [25, 15, 10, 5], [45, 27, 18, 9]] 68 | 69 | #################### Example Three #################### 70 | 71 | # Example Three 72 | # Create a list of even numbers using a list comprehension that contains a conditional 73 | 74 | print("------------------By Hand------------------") 75 | 76 | l = [3, 4, 5, 6, 8, 9, 11, 12, 13, 14, 15] 77 | even_list = [] 78 | for num in l: 79 | if num % 2 == 0: 80 | even_list.append(num) 81 | 82 | print_list(even_list, "Even Number") 83 | 84 | print("-----------List Comprehension--------------") 85 | even = [] 86 | even = [num for num in l if num % 2 == 0] 87 | print_list(even, "Even Number") 88 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/AgnosticDevelopmentUITests/AgnosticDevelopmentTableViewUITests.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AgnosticDevelopmentUITests.swift 3 | // AgnosticDevelopmentUITests 4 | // 5 | // Created by Matt Eaton on 10/11/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import XCTest 10 | import Foundation 11 | 12 | class AgnosticDevelopmentTableViewUITests: XCTestCase { 13 | 14 | var app: XCUIApplication! 15 | 16 | override func setUp() { 17 | super.setUp() 18 | 19 | // In UI tests it is usually best to stop immediately when a failure occurs. 20 | continueAfterFailure = false 21 | app = XCUIApplication() 22 | 23 | } 24 | 25 | override func tearDown() { 26 | // Put teardown code here. This method is called after the invocation of each test method in the class. 27 | super.tearDown() 28 | } 29 | 30 | func testTableInteraction() { 31 | app.launch() 32 | 33 | // Assert that we are displaying the tableview 34 | let articleTableView = app.tables["table--articleTableView"] 35 | 36 | XCTAssertTrue(articleTableView.exists, "The article tableview exists") 37 | 38 | // Get an array of cells 39 | let tableCells = articleTableView.cells 40 | print("Count of table cells \(tableCells.count)") 41 | 42 | if tableCells.count > 0 { 43 | let count: Int = (tableCells.count - 1) 44 | 45 | let promise = expectation(description: "Wait for table cells") 46 | 47 | for i in stride(from: 0, to: count , by: 1) { 48 | // Grab the first cell and verify that it exists and tap it 49 | let tableCell = tableCells.element(boundBy: i) 50 | XCTAssertTrue(tableCell.exists, "The \(i) cell is in place on the table") 51 | // Does this actually take us to the next screen 52 | tableCell.tap() 53 | 54 | if i == (count - 1) { 55 | promise.fulfill() 56 | } 57 | // Back 58 | app.navigationBars.buttons.element(boundBy: 0).tap() 59 | } 60 | waitForExpectations(timeout: 20, handler: nil) 61 | XCTAssertTrue(true, "Finished validating the table cells") 62 | 63 | } else { 64 | XCTAssert(false, "Was not able to find any table cells") 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /HowtoOpenFilePython/file.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding: utf-8 -*- 3 | # 4 | # 5 | from __future__ import print_function 6 | import os, sys 7 | 8 | class File(): 9 | 10 | # 11 | # Constructor 12 | # 13 | def __init__(self): 14 | self.file_lines = [] 15 | self.__file_input_name = "" 16 | self.__complete_content = "" 17 | self.__file_input_stdin = None 18 | 19 | # Read STDIN and the contents of the file 20 | self.parse_stdin() 21 | 22 | if self.__file_input_name is not "" or self.__file_input_stdin is not None: 23 | self.read_content_of_file() 24 | else: 25 | exit("Something went wrong parsing your input file. Exiting...") 26 | 27 | if len(self.file_lines) == 0: 28 | exit("Nothing was read in to memory from the file. Exiting...") 29 | 30 | # 31 | # Parse STDIN if any was presented when the program was run 32 | # 33 | def parse_stdin(self): 34 | # Use sys.argv or sys.stdin to get the file input from the command line 35 | if len(sys.argv) > 1 and sys.argv[1] is not None: 36 | # Recognize that sys.argv has a file argument in it 37 | self.__file_input_name = sys.argv[1] 38 | elif not sys.stdin.isatty(): 39 | # isatty() makes sure stdin has data http://man7.org/linux/man-pages/man3/isatty.3.html 40 | # Recognize that there is a file object in sys.stdin 41 | self.__file_input_stdin = sys.stdin 42 | else: 43 | # Display the error to the console 44 | print("OOPs! There was an issue locating your input file") 45 | exit("Please provide a valid filename or file as a CLI argument") 46 | 47 | # 48 | # The the contents of the file that was presented 49 | # 50 | def read_content_of_file(self): 51 | # -------- Attempt to open the file and read contents -------- 52 | 53 | # Open file, read contents into a list to be parsed 54 | try: 55 | # Open the file and read the contents into a 56 | if self.__file_input_stdin is None: 57 | with open(self.__file_input_name, 'r') as file_obj: 58 | self.__complete_content = file_obj.read() 59 | else: 60 | self.__complete_content = self.__file_input_stdin.read() 61 | 62 | # Explode or split the string contents to a list 63 | self.file_lines = self.__complete_content.split("\n") 64 | 65 | except ValueError: 66 | # Write the raised error 67 | error_raised = "Error loading file: " + str(sys.exc_info()[0]) 68 | # Display the error to the console 69 | print(error_raised) 70 | exit("This program needs an input file to continue. Exiting...") 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AppDelegate.swift 3 | // Agnostic Development 4 | // 5 | // Created by Matt Eaton on 4/23/17. 6 | // Copyright © 2017 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | @UIApplicationMain 12 | class AppDelegate: UIResponder, UIApplicationDelegate { 13 | 14 | var window: UIWindow? 15 | 16 | 17 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { 18 | if CommandLine.arguments.contains("--resetApp") { 19 | print("Reset app state if needed!!") 20 | } 21 | 22 | // Override point for customization after application launch. 23 | UIApplication.shared.statusBarStyle = .lightContent 24 | 25 | return true 26 | } 27 | 28 | func applicationWillResignActive(_ application: UIApplication) { 29 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. 30 | // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game. 31 | } 32 | 33 | func applicationDidEnterBackground(_ application: UIApplication) { 34 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. 35 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. 36 | } 37 | 38 | func applicationWillEnterForeground(_ application: UIApplication) { 39 | // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background. 40 | } 41 | 42 | func applicationDidBecomeActive(_ application: UIApplication) { 43 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. 44 | } 45 | 46 | func applicationWillTerminate(_ application: UIApplication) { 47 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /MVVM/MVVM Sample/ArticleViewModel.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewModel.swift 3 | // MVVM Sample 4 | // 5 | // Created by Matt Eaton on 10/28/16. 6 | // Copyright © 2016 AgnosticDev. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | 11 | class ArticleViewModel { 12 | 13 | // Article Protocol 14 | weak var articleDelegate: ArticleProtocol? 15 | // Private Article Object 16 | private var article: Article? 17 | var articleData: ArticleData? 18 | 19 | // The title for this article 20 | var titleText: String? { 21 | // Force unwrap the title as it is an expected value 22 | return article!.title 23 | } 24 | 25 | // The formatted date for this article 26 | var dateFormattedString: String? { 27 | // Unwrap date optional to make sure there is a value 28 | if let dateVal = article?.date { 29 | let dateStringFormatter = DateFormatter() 30 | dateStringFormatter.dateFormat = "dd-MM-yyyy" 31 | return dateStringFormatter.string(from:dateVal) 32 | } else { 33 | // Could return a default value here 34 | // For sake of example return nil 35 | return nil 36 | } 37 | } 38 | 39 | // The image for this article 40 | var image: Data? { 41 | // Unwrap image optional to make sure there is a value 42 | if let imageData = article?.image { 43 | return imageData 44 | } else { 45 | // Could return a default image here 46 | // For sake of example return nil 47 | return nil 48 | } 49 | } 50 | 51 | // I have questions around the placement of this function 52 | // I am thinking there may be a better place for this function 53 | // This function calls out to the ArticleData object and gets a sorted array of the article data 54 | func getArticleData(withFlag: String) { 55 | 56 | // This function calls back to the View Controller not using KVO or RAC but a protocol instead 57 | if withFlag == "alpha" { 58 | articleDelegate?.resetTableData(articleData: articleData!.sortArticleDataAlpha()) 59 | } else { 60 | articleDelegate?.resetTableData(articleData: articleData!.sortArticleDataByDate()) 61 | } 62 | } 63 | 64 | // This initializer is a convenience initializer because I need to call the standard constructor in AppDelegate 65 | // to get a strong reference to this class and I need to call this convenience initializer when I want to wrap 66 | // an Article object in the properties of this class 67 | convenience init? (article: Article) { 68 | self.init() 69 | self.article = article 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /HowtoSortObjectsByDateinSwift/SortByDate.playground/Contents.swift: -------------------------------------------------------------------------------- 1 | //: Playground - noun: a place where people can play 2 | 3 | import Cocoa 4 | 5 | class customObject: NSObject { 6 | 7 | var title: String = "" 8 | var desc: String = "" 9 | var date: Date = Date() 10 | 11 | required init(title: String, desc: String, dateString: String) { 12 | // Set the title and description 13 | self.title = title 14 | self.desc = desc 15 | 16 | // Set the date formatter and optionally set the formatted date from string 17 | let dateFormatter = DateFormatter() 18 | dateFormatter.dateFormat = "MMMM d, yyyy" 19 | if let date = dateFormatter.date(from: dateString) { 20 | self.date = date 21 | } 22 | } 23 | } 24 | // Create 5 sample objects for testing, all with sporadic dates 25 | var obj3 = customObject(title: "TLS 1.3 - Better, Stronger, Faster", desc: "Overview of TLS 1.3", dateString: "January 6, 2018") 26 | var obj4 = customObject(title: "User Interface Testing with Swift and XCTest", desc: "Overview of UI Testing", dateString: "December 10, 2017") 27 | var obj2 = customObject(title: "How to Use Python List Comprehensions", desc: "Overview of Python List Comprehensions", dateString: "December 2, 2017") 28 | var obj1 = customObject(title: "Attending WWDC 2017 - Predictions Answered", desc: "Predictions Answered on WWDC 2017", dateString: "June 13, 2017") 29 | var obj5 = customObject(title: "Swift Network Testing - Automate XCTest with Python", desc: "Automate XCTest with Python", dateString: "November 26, 2017") 30 | 31 | // Display the dates and titles 32 | print("Unsorted Date from obj1: \(obj1.date) with title: \(obj1.title)") 33 | print("Unsorted Date from obj2: \(obj2.date) with title: \(obj2.title)") 34 | print("Unsorted Date from obj3: \(obj3.date) with title: \(obj3.title)") 35 | print("Unsorted Date from obj4: \(obj4.date) with title: \(obj4.title)") 36 | print("Unsorted Date from obj5: \(obj5.date) with title: \(obj5.title)\n") 37 | 38 | // Now, with 3 short lines of code is where the magic happens 39 | // First the objects are wrapped up in a generic array 40 | var customObjects = [obj1, obj2, obj3, obj4, obj5] 41 | // Next, the .sorted(by:) method returns a collection that compares an element in the array against the next element and arranges the collection by date. 42 | // The sorted collection is assigned back to the customObjects array for display 43 | customObjects = customObjects.sorted(by: { 44 | $0.date.compare($1.date) == .orderedDescending 45 | }) 46 | // The sorted customObjects collection is then printed out to display the objects sorted descending by date 47 | for obj in customObjects { 48 | print("Sorted Date: \(obj.date) with title: \(obj.title)") 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /CloudAnimation/images/sun79.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | 10 | 11 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | -------------------------------------------------------------------------------- /Node_Read_Engine/app/config/passport.js: -------------------------------------------------------------------------------- 1 | // config/passport.js 2 | 3 | // load all the things we need 4 | var LocalStrategy = require('passport-local').Strategy; 5 | 6 | // load up the user model 7 | var User = require('../models/users'); 8 | 9 | // expose this function to our app using module.exports 10 | module.exports = function(passport) { 11 | 12 | // ========================================================================= 13 | // passport session setup ================================================== 14 | // ========================================================================= 15 | // required for persistent login sessions 16 | // passport needs ability to serialize and unserialize users out of session 17 | 18 | // used to serialize the user for the session 19 | passport.serializeUser(function(user, done) { 20 | done(null, user.uid); 21 | }); 22 | 23 | // used to deserialize the user 24 | passport.deserializeUser(function(id, done) { 25 | User.findById(uid, function(err, user) { 26 | done(err, user); 27 | }); 28 | }); 29 | 30 | // ========================================================================= 31 | // LOCAL LOGIN ============================================================= 32 | // ========================================================================= 33 | // we are using named strategies since we have one for login and one for signup 34 | // by default, if there was no name, it would just be called 'local' 35 | 36 | passport.use('local-login', new LocalStrategy({ 37 | // by default, local strategy uses username and password, we will override with email 38 | usernameField : 'email', 39 | passwordField : 'key', 40 | passReqToCallback : true // allows us to pass back the entire request to the callback 41 | }, 42 | function(req, email, key, done) { // callback with email and password from our form 43 | console.log(email); 44 | console.log(key); 45 | // find a user whose email is the same as the forms email 46 | // we are checking to see if the user trying to login already exists 47 | User.findOne({ 'local.email' : email }, function(err, user) { 48 | console.log('Username ' + user.name); 49 | // if there are any errors, return the error before anything else 50 | if (err) 51 | return done(err); 52 | 53 | // if no user is found, return the message 54 | if (!user) 55 | return done(null, false, req.flash('loginMessage', 'No user found.')); // req.flash is the way to set flashdata using connect-flash 56 | 57 | // if the user is found but the key is wrong 58 | if (!user.validPassword(key)) 59 | return done(null, false, req.flash('loginMessage', 'Oops! Wrong key.')); // create the loginMessage and save it to session as flashdata 60 | 61 | // all is well, return successful user 62 | return done(null, user); 63 | }); 64 | 65 | })); 66 | 67 | }; -------------------------------------------------------------------------------- /TaylorSeriesExpansion/TaylorSeries.playground/Contents.swift: -------------------------------------------------------------------------------- 1 | /** 2 | * Taylor Series Approximations about x=3 up to order 10 3 | * 4 | * Based upon inspiration from: 5 | * https://www.khanacademy.org/math/integral-calculus/sequences-series-approx-calc/taylor-series/v/visualizing-taylor-series-for-e-x 6 | * https://youtu.be/AFMXixBVP-0?t=174 7 | * 8 | */ 9 | 10 | import Foundation 11 | 12 | /** 13 | * Factorial generator 14 | */ 15 | func factorial(f: Int) -> Int { 16 | // Make sure we are not calculating factorials for 0 17 | if f == 0 { 18 | return 0 19 | } 20 | var f = f 21 | for i in stride(from: f, to: 1, by:-1) { 22 | f *= i 23 | } 24 | return f 25 | } 26 | 27 | /** 28 | * Exponent generator 29 | */ 30 | func exponent(v: Double, power:Int) -> Double { 31 | // Make sure there is no upper bound issues 32 | if power == 0 { 33 | return 0 34 | } 35 | var v = v 36 | for _ in 1.. Void { 48 | 49 | // Set numerical value for e 50 | let e: Double = 2.71828 51 | var approx_polynomials: [Double] = [] 52 | 53 | // Add in e^3, this is the first term in the series 54 | let zero_value = exponent(v: e, power:Int(x)) 55 | approx_polynomials.append(zero_value) 56 | 57 | // Generate the decimal approximation up to order five 58 | for index in stride(from: 1, to: 6, by:+1) { 59 | 60 | // Step 1, get the power 61 | // e^3 62 | let power:Double = exponent(v: e, power:Int(x)) 63 | // Step 2, get the factorial 64 | // index! 65 | let fact:Double = Double(factorial(f: Int(index))) 66 | 67 | // Step 3, get the parenthesis value 68 | // (x - 3) 69 | // Mostly useless, but part of the equation 70 | var paran:Double = Double((x - x)) 71 | 72 | // Step 4, apply exponent to parenthesis value 73 | // (x - 3)^index 74 | // Equals zero almost always 75 | paran = exponent(v: paran, power:Int(index)) 76 | 77 | // Compute decimal approx at order (index) 78 | var orderValue:Double? 79 | if paran != 0 { 80 | orderValue = ((power / fact) * paran) 81 | } else { 82 | orderValue = (power / fact) 83 | } 84 | 85 | for val in approx_polynomials { 86 | orderValue = orderValue! + val 87 | } 88 | approx_polynomials.append(orderValue!) 89 | } 90 | 91 | var i:Int = 0 92 | for v in approx_polynomials { 93 | print("Decimal Approx: \(round(100*v)/100) at order \(i)") 94 | i = i + 1 95 | } 96 | } 97 | 98 | // Approximate the decimal values greater that 3 when x equals 3 99 | var x: Double = 3.0 100 | taylorSeriesApprox(x: x) 101 | 102 | -------------------------------------------------------------------------------- /Agnostic Development/Agnostic Development/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /AgnosticDevNetworkTesting/Agnostic Development/Agnostic Development/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /MVVM/MVVM Sample/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | --------------------------------------------------------------------------------