This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| find_package(Git QUIET) | |
| if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git/modules") | |
| # Update submodules as needed | |
| OPTION(GIT_SUBMODULE "Check submodules during build" ON) | |
| if(GIT_SUBMODULE) | |
| message(STATUS "Git submodules found - updating") | |
| execute_process( | |
| COMMAND ${GIT_EXECUTABLE} submodule update --init --recursive |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| # Default style options for all languages | |
| BasedOnStyle: Google | |
| ColumnLimit: 79 | |
| IndentWidth: 4 | |
| IndentWrappedFunctionNames: true | |
| TabWidth: 4 | |
| DeriveLineEnding: false |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Using nvm | |
| wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.36.0/install.sh | bash | |
| source ~/.bashrc | |
| nvm -v | |
| nvm install node # latest | |
| nvm install 12.16.3 # nvm install --lts | |
| nvm alias default 12.16.3 # nvm alias default lts/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| format_mq() { | |
| echo $1/$2 | |
| cd $1 | |
| cd $2 | |
| chmod 777 ./* | |
| chmod 777 Fold1/* | |
| chmod 777 Fold2/* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * MIT License | |
| * | |
| * Copyright (c) 2019 Patrick Cox | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
| * | |
| * The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
| * | |
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| SERVICE_NAME='<Azure Search Service Name>' | |
| API_VER='2017-11-11' | |
| ADMIN_KEY='<API KEY>' | |
| CONTENT_TYPE='application/json' | |
| INDEX_NAME='Azure Search Service index name>' | |
| URL="https://$SERVICE_NAME.search.windows.net/indexes/$INDEX_NAME/docs?api-version=$API_VER" | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import os | |
| import json | |
| import requests | |
| import feedparser | |
| from bs4 import BeautifulSoup | |
| from bs4.element import Comment | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Grab the visible text from a webpage | |
| Based on the stackoverflow post https://stackoverflow.com/questions/1936466/beautifulsoup-grab-visible-webpage-text | |
| """ | |
| from bs4 import BeautifulSoup | |
| from bs4.element import Comment | |
| import requests | |
| def tag_visible(element): | |
| if element.parent.name in ['style', 'script', 'head', 'title', 'meta', '[document]']: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private static void UploadToIndex<T>(ISearchIndexClient indexClient, IndexBatch<T> batch, int count=0) | |
| { | |
| try | |
| { | |
| indexClient.Documents.Index(batch); | |
| } | |
| catch (IndexBatchException e) | |
| { | |
| // Try to index n times and give up if it still fails | |
| if (count == 5) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!usr/bin/env python3 | |
| ############################################# | |
| # Author: Patrick T Cox | |
| # Date Created: 16 February 2017 | |
| # Date Updated: 15 November 2017 | |
| # Project: Simple Twitter Crawler | |
| # File: simple_twitter_crawler.py | |
| # | |
| # Description: Collects a list of links by crawling tweets while filtering |