├── jupyter_config_hacks.py ├── requirements.txt ├── start_jump ├── README.md ├── .gitignore ├── lazy_helpers.py ├── extra.sh ├── CODE_OF_CONDUCT.md ├── jupyter_new.sh ├── jupyter.sh ├── LICENSE ├── Mini Solutions.ipynb └── http_data_sources └── public_ldap_committees.json /jupyter_config_hacks.py: -------------------------------------------------------------------------------- 1 | c.NotebookApp.allow_origin = '*' 2 | c.NotebookApp.allow_remote_access = True 3 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | pyspark 2 | perceval 3 | meetup-api 4 | urllib3 5 | beautifulsoup4 6 | requests 7 | selenium 8 | zope.interface 9 | backoff 10 | twython 11 | -------------------------------------------------------------------------------- /start_jump: -------------------------------------------------------------------------------- 1 | # Start's an sshuttle tunnel to the dataproc closter holden-magic-m, depends on https://github.com/sshuttle/sshuttle 2 | set -x 3 | sshuttle --auto-hosts -r hkarau@`gcloud compute instances describe holden-magic-m |grep natIP | cut -d " " -f 6` 10.138.0.0/16 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # diversity-analytics 2 | Analytics on Apache Projects for Gender Diversity. 3 | 4 | ## Related Projects and Work 5 | 6 | See [perceval](https://github.com/grimoirelab/perceval) and [Gender-diversity Analysis of the Linux Kernel Technical Contributions](https://blog.bitergia.com/2016/10/11/gender-diversity-analysis-of-the-linux-kernel-technical-contributions/) from [Bitergia](https://www.bitergia.com/). 7 | 8 | See also Paco's [exsto](https://github.com/ceteri/exsto). 9 | 10 | ## Email list / Google group 11 | 12 | https://groups.google.com/forum/#!managemembers/oss-diversity-discussion 13 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | env/ 12 | build/ 13 | develop-eggs/ 14 | dist/ 15 | downloads/ 16 | eggs/ 17 | .eggs/ 18 | lib/ 19 | lib64/ 20 | parts/ 21 | sdist/ 22 | var/ 23 | *.egg-info/ 24 | .installed.cfg 25 | *.egg 26 | 27 | # PyInstaller 28 | # Usually these files are written by a python script from a template 29 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 30 | *.manifest 31 | *.spec 32 | 33 | # Installer logs 34 | pip-log.txt 35 | pip-delete-this-directory.txt 36 | 37 | # Unit test / coverage reports 38 | htmlcov/ 39 | .tox/ 40 | .coverage 41 | .coverage.* 42 | .cache 43 | nosetests.xml 44 | coverage.xml 45 | *,cover 46 | .hypothesis/ 47 | 48 | # Translations 49 | *.mo 50 | *.pot 51 | 52 | # Django stuff: 53 | *.log 54 | local_settings.py 55 | 56 | # Flask stuff: 57 | instance/ 58 | .webassets-cache 59 | 60 | # Scrapy stuff: 61 | .scrapy 62 | 63 | # Sphinx documentation 64 | docs/_build/ 65 | 66 | # PyBuilder 67 | target/ 68 | 69 | # IPython Notebook 70 | .ipynb_checkpoints 71 | 72 | # pyenv 73 | .python-version 74 | 75 | # celery beat schedule file 76 | celerybeat-schedule 77 | 78 | # dotenv 79 | .env 80 | 81 | # virtualenv 82 | venv/ 83 | ENV/ 84 | 85 | # Spyder project settings 86 | .spyderproject 87 | 88 | # Rope project settings 89 | .ropeproject 90 | -------------------------------------------------------------------------------- /lazy_helpers.py: -------------------------------------------------------------------------------- 1 | # Lazy objects, for the serializer to find them we put them here 2 | 3 | class LazyDriver(object): 4 | _driver = None 5 | 6 | @classmethod 7 | def get(cls): 8 | import os 9 | if cls._driver is None: 10 | from pyvirtualdisplay import Display 11 | display = Display(visible=0, size=(1024, 768)) 12 | display.start() 13 | cls._display = display 14 | from selenium import webdriver 15 | # Configure headless mode 16 | chrome_options = webdriver.ChromeOptions() #Oops 17 | chrome_options.add_argument('--verbose') 18 | chrome_options.add_argument('--ignore-certificate-errors') 19 | log_path = "/tmp/chromelogpanda{0}".format(os.getpid()) 20 | if not os.path.exists(log_path): 21 | os.mkdir(log_path) 22 | chrome_options.add_argument("--log-path {0}/log.txt".format(log_path)) 23 | chrome_options.add_argument("--no-sandbox") 24 | chrome_options.add_argument("--disable-setuid-sandbox") 25 | cls._driver = webdriver.Chrome(chrome_options=chrome_options) 26 | return cls._driver 27 | 28 | @classmethod 29 | def reset(cls): 30 | cls._display.stop() 31 | cls._driver.Dispose() 32 | 33 | 34 | class LazyPool(object): 35 | _pool = None 36 | 37 | @classmethod 38 | def get(cls): 39 | if cls._pool is None: 40 | import urllib3 41 | cls._pool = urllib3.PoolManager() 42 | return cls._pool 43 | -------------------------------------------------------------------------------- /extra.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "Running extra V1.1" 4 | 5 | conda install -c anaconda nltk scipy pandas 6 | conda install -c conda-forge spacy 7 | 8 | 9 | pip install --upgrade pip & 10 | pip_pid=$! 11 | # TODO: Post sparklingml on pypi so we don't have to do this 12 | git clone git://github.com/sparklingpandas/sparklingml.git || echo "Already cloned" 13 | chown -R yarn sparklingml 14 | pushd sparklingml 15 | git pull || echo "Failed to update sparklingml, using old checkout" 16 | ./build/sbt assembly &> sbt_outputlog & 17 | sbt_pid=$! 18 | popd 19 | 20 | # See issue: https://github.com/nteract/coffee_boat/issues/47 21 | mkdir -p /home/nltk_data 22 | chown -R yarn /home/nltk_data 23 | python -m nltk.downloader vader_lexicon &> vader_install_log & 24 | python -c "import spacy;spacy.load('en')" || python -m spacy download en &> spacy_install_en_log & 25 | wait $pip_pid || echo "Already upgraded pip" 26 | # We end up using system pyspark anyways and pypandoc is having issues 27 | #pip install "pyspark==2.3.0" 28 | pip install perceval 29 | pip install urllib3 30 | pip install beautifulsoup4 31 | pip install requests 32 | pip install "selenium==3.6.0" 33 | pip install zope.interface 34 | pip install pyarrow 35 | pip install meetup.api 36 | pip install statsmodels 37 | pip install backoff 38 | pip install gender-guesser 39 | pip install nameparser 40 | pip install Genderize 41 | # Wait for sparklingml's sbt build to be finished then install the rest of sparklingml 42 | wait $sbt_pid || echo "sbt_pid already installed" 43 | pushd /sparklingml 44 | pip install -e . || echo "Failed to install sparklingml, soft skip." 45 | popd 46 | # nltk data needs to be readable by the user we run as 47 | chown -R yarn /home/nltk_data 48 | cat vader_install_log 49 | pip install twython "tensorboard==1.7.0" "tensorflow==1.7.0" PyGithub coffee_boat PyVirtualDisplay & 50 | echo "Done" 51 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | # Contributor Covenant Code of Conduct 2 | 3 | ## Our Pledge 4 | 5 | In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. 6 | 7 | ## Our Standards 8 | 9 | Examples of behavior that contributes to creating a positive environment include: 10 | 11 | * Using welcoming and inclusive language 12 | * Being respectful of differing viewpoints and experiences 13 | * Gracefully accepting constructive criticism 14 | * Focusing on what is best for the community 15 | * Showing empathy towards other community members 16 | 17 | Examples of unacceptable behavior by participants include: 18 | 19 | * The use of sexualized language or imagery and unwelcome sexual attention or advances 20 | * Trolling, insulting/derogatory comments, and personal or political attacks 21 | * Public or private harassment 22 | * Publishing others' private information, such as a physical or electronic address, without explicit permission 23 | * Other conduct which could reasonably be considered inappropriate in a professional setting 24 | 25 | ## Our Responsibilities 26 | 27 | Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. 28 | 29 | Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. 30 | 31 | ## Scope 32 | 33 | This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. 34 | 35 | ## Enforcement 36 | 37 | Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at holden@pigscanfly.ca OR if the issue involves Holden or you are not comfortable contacting Holden ann.spencer@dominodatalab.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. 38 | 39 | Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. 40 | 41 | ## Attribution 42 | 43 | This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] 44 | 45 | [homepage]: http://contributor-covenant.org 46 | [version]: http://contributor-covenant.org/version/1/4/ 47 | -------------------------------------------------------------------------------- /jupyter_new.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script installs Jupyter notebook (http://jupyter.org/) on a Google Cloud 4 | # Dataproc cluster. 5 | # Jupyter is successor of iPython Notebook 6 | # 7 | # This init action depends on init-action for Conda. Git repo and branch for 8 | # init actions might be overridden by specifying INIT_ACTIONS_REPO and 9 | # INIT_ACTIONS_BRANCH metadata keys. 10 | 11 | set -exo pipefail 12 | 13 | readonly ROLE="$(/usr/share/google/get_metadata_value attributes/dataproc-role)" 14 | readonly INIT_ACTIONS_REPO="$(/usr/share/google/get_metadata_value attributes/INIT_ACTIONS_REPO \ 15 | || echo 'https://github.com/GoogleCloudPlatform/dataproc-initialization-actions.git')" 16 | readonly INIT_ACTIONS_BRANCH="$(/usr/share/google/get_metadata_value attributes/INIT_ACTIONS_BRANCH \ 17 | || echo 'master')" 18 | 19 | # Colon-separated list of conda channels to add before installing packages 20 | readonly JUPYTER_CONDA_CHANNELS="$(/usr/share/google/get_metadata_value attributes/JUPYTER_CONDA_CHANNELS)" 21 | 22 | # Colon-separated list of conda packages to install, for example 'numpy:pandas' 23 | readonly JUPYTER_CONDA_PACKAGES="$(/usr/share/google/get_metadata_value attributes/JUPYTER_CONDA_PACKAGES)" 24 | 25 | echo "Cloning fresh dataproc-initialization-actions from repo ${INIT_ACTIONS_REPO} and branch ${INIT_ACTIONS_BRANCH}..." 26 | git clone -b "${INIT_ACTIONS_BRANCH}" --single-branch "${INIT_ACTIONS_REPO}" 27 | 28 | # Ensure we have conda installed. 29 | ./dataproc-initialization-actions/conda/bootstrap-conda.sh 30 | 31 | source /etc/profile.d/conda.sh 32 | 33 | if [ -n "${JUPYTER_CONDA_CHANNELS}" ]; then 34 | echo "Adding custom conda channels '${JUPYTER_CONDA_CHANNELS//:/ }'" 35 | conda config --add channels "${JUPYTER_CONDA_CHANNELS//:/,}" 36 | fi 37 | 38 | if [ -n "${JUPYTER_CONDA_PACKAGES}" ]; then 39 | echo "Installing custom conda packages '${JUPYTER_CONDA_PACKAGES/:/ }'" 40 | # Do not use quotes so that space separated packages turn into multiple arguments 41 | conda install ${JUPYTER_CONDA_PACKAGES//:/ } 42 | fi 43 | 44 | # Install jupyter on all nodes to start with a consistent python environment 45 | # on all nodes. Also, pin the python version to ensure that conda does not 46 | # update python because the latest version of jupyter supports a higher version 47 | # than the one already installed. See issue #300 for more information. 48 | PYTHON="$(ls /opt/conda/bin/python || which python)" 49 | PYTHON_VERSION="$(${PYTHON} --version 2>&1 | cut -d ' ' -f 2)" 50 | conda install jupyter matplotlib "python==${PYTHON_VERSION}" 51 | 52 | conda install 'testpath<0.4' 53 | 54 | # For storing notebooks on GCS. Pin version to make this script hermetic. 55 | pip install jgscm==0.1.7 56 | # Everyone needs pandas 57 | pip install pandas 58 | 59 | if [[ "${ROLE}" == 'Master' ]]; then 60 | ./dataproc-initialization-actions/jupyter/internal/setup-jupyter-kernel.sh 61 | # This snippet is brought to you by the bad idea bears. 62 | sudo mkdir -p /root/.jupyter || echo "already have config" 63 | sudo gsutil cp gs://asf-diversity-data/jupyter_config_hacks.py /root/.jupyter/ 64 | sudo chmod 777 /root/.jupyter/jupyter_notebook_config.py 65 | cat /root/.jupyter/jupyter_config_hacks.py >> /root/.jupyter/jupyter_notebook_config.py 66 | # End of bad idea bears snippet 67 | ./dataproc-initialization-actions/jupyter/internal/launch-jupyter-kernel.sh 68 | fi 69 | echo "Completed installing Jupyter!" 70 | 71 | # Install Jupyter extensions (if desired) 72 | # TODO: document this in readme 73 | if [[ ! -v "${INSTALL_JUPYTER_EXT}" ]]; then 74 | INSTALL_JUPYTER_EXT=false 75 | fi 76 | if [[ "${INSTALL_JUPYTER_EXT}" = true ]]; then 77 | echo "Installing Jupyter Notebook extensions..." 78 | ./dataproc-initialization-actions/jupyter/internal/bootstrap-jupyter-ext.sh 79 | echo "Jupyter Notebook extensions installed!" 80 | fi 81 | -------------------------------------------------------------------------------- /jupyter.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # This script installs Jupyter notebook (http://jupyter.org/) on a Google Cloud 4 | # Dataproc cluster. 5 | # Jupyter is successor of iPython Notebook 6 | # 7 | # This init action depends on init-action for Conda. Git repo and branch for 8 | # init actions might be overridden by specifying INIT_ACTIONS_REPO and 9 | # INIT_ACTIONS_BRANCH metadata keys. 10 | 11 | set -exo pipefail 12 | echo "Running V: Boo-4" 13 | 14 | gsutil cp gs://boo-stuff/extra.sh ./ 15 | chmod a+x extra.sh 16 | # Begin secrets 17 | gsutil cp gs://boo-stuff/secrets.sh ./ 18 | gsutil cp gs://boo-stuff/secrets.literal ./ 19 | source ./secrets.sh 20 | mkdir -p ~/ 21 | cat secrets.sh >> ~/.bashrc 22 | 23 | 24 | readonly ROLE="$(/usr/share/google/get_metadata_value attributes/dataproc-role)" 25 | 26 | readonly DEAFULT_INIT_ACTIONS_REPO="gs://dataproc-initialization-actions" 27 | readonly INIT_ACTIONS_REPO="$(/usr/share/google/get_metadata_value attributes/INIT_ACTIONS_REPO || 28 | echo ${DEAFULT_INIT_ACTIONS_REPO})" 29 | readonly INIT_ACTIONS_BRANCH="$(/usr/share/google/get_metadata_value attributes/INIT_ACTIONS_BRANCH || 30 | echo 'master')" 31 | 32 | # Colon-separated list of conda channels to add before installing packages 33 | readonly JUPYTER_CONDA_CHANNELS="$(/usr/share/google/get_metadata_value attributes/JUPYTER_CONDA_CHANNELS || true)" 34 | 35 | # Colon-separated list of conda packages to install, for example 'numpy:pandas' 36 | readonly JUPYTER_CONDA_PACKAGES="$(/usr/share/google/get_metadata_value attributes/JUPYTER_CONDA_PACKAGES || true)" 37 | 38 | readonly INSTALL_JUPYTER_EXT="$(/usr/share/google/get_metadata_value attributes/INSTALL_JUPYTER_EXT || 39 | echo 'false')" 40 | 41 | echo "Cloning initialization actions from '${INIT_ACTIONS_REPO}' repo..." 42 | INIT_ACTIONS_DIR=$(mktemp -d -t dataproc-init-actions-XXXX) 43 | readonly INIT_ACTIONS_DIR 44 | export INIT_ACTIONS_DIR 45 | if [[ ${INIT_ACTIONS_REPO} == gs://* ]]; then 46 | gsutil -m rsync -r "${INIT_ACTIONS_REPO}" "${INIT_ACTIONS_DIR}" 47 | else 48 | git clone -b "${INIT_ACTIONS_BRANCH}" --single-branch "${INIT_ACTIONS_REPO}" "${INIT_ACTIONS_DIR}" 49 | fi 50 | find "${INIT_ACTIONS_DIR}" -name '*.sh' -exec chmod +x {} \; 51 | 52 | # Ensure we have Conda installed. 53 | bash "${INIT_ACTIONS_DIR}/conda/bootstrap-conda.sh" 54 | 55 | if [[ -f /etc/profile.d/conda.sh ]]; then 56 | source /etc/profile.d/conda.sh 57 | fi 58 | 59 | if [[ -f /etc/profile.d/effective-python.sh ]]; then 60 | source /etc/profile.d/effective-python.sh 61 | fi 62 | 63 | # Install jupyter on all nodes to start with a consistent python environment 64 | # on all nodes. Also, pin the python version to ensure that conda does not 65 | # update python because the latest version of jupyter supports a higher version 66 | # than the one already installed. See issue #300 for more information. 67 | PYTHON="$(ls /opt/conda/bin/python || command -v python)" 68 | PYTHON_VERSION="$(${PYTHON} --version 2>&1 | cut -d ' ' -f 2)" 69 | conda install jupyter matplotlib "python==${PYTHON_VERSION}" 70 | # Extra PySpark stuff 71 | PYSPARK_PYTHON="${PYTHON}" 72 | PYSPARK_DRIVER_PYTHON="${PYTHON}" 73 | export PYSPARK_PYTHON 74 | export PYSPARK_DRIVER_PYTHON 75 | 76 | 77 | conda install 'testpath<0.4' 78 | 79 | if [ -n "${JUPYTER_CONDA_CHANNELS}" ]; then 80 | IFS=":" read -r -a channels <<<"${JUPYTER_CONDA_CHANNELS}" 81 | echo "Adding custom conda channels '${channels[*]}'" 82 | for channel in "${channels[@]}"; do 83 | conda config --add channels "${channel}" 84 | done 85 | fi 86 | 87 | if [ -n "${JUPYTER_CONDA_PACKAGES}" ]; then 88 | IFS=":" read -r -a packages <<<"${JUPYTER_CONDA_PACKAGES}" 89 | echo "Installing custom conda packages '${packages[*]}'" 90 | conda install "${packages[@]}" 91 | fi 92 | 93 | # For storing notebooks on GCS. Pin version to make this script hermetic. 94 | pip install jgscm==0.1.7 95 | 96 | if [[ "${ROLE}" == 'Master' ]]; then 97 | "${INIT_ACTIONS_DIR}/jupyter/internal/setup-jupyter-kernel.sh" 98 | "${INIT_ACTIONS_DIR}/jupyter/internal/launch-jupyter-kernel.sh" 99 | fi 100 | echo "Completed installing Jupyter!" 101 | 102 | # Install Jupyter extensions (if desired) 103 | # TODO: document this in readme 104 | if [[ "${INSTALL_JUPYTER_EXT}" == true ]]; then 105 | echo "Installing Jupyter Notebook extensions..." 106 | "${INIT_ACTIONS_DIR}/jupyter/internal/bootstrap-jupyter-ext.sh" 107 | echo "Jupyter Notebook extensions installed!" 108 | fi 109 | 110 | 111 | echo "Starting extra..." 112 | whoami 113 | ./extra.sh &> /tmp/extra_log & 114 | extra_pid=$! 115 | disown $extra_pid 116 | echo "Done." 117 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Mini Solutions.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [ 8 | { 9 | "data": { 10 | "text/html": [ 11 | "\n", 12 | "
SparkContext
\n", 14 | "\n", 15 | " \n", 16 | "\n", 17 | "v2.2.1yarnpyspark-shellSparkSession - hive
\n", 52 | " \n", 53 | "SparkContext
\n", 55 | "\n", 56 | " \n", 57 | "\n", 58 | "v2.2.1yarnpyspark-shell| \n", 225 | " | backend_name | \n", 226 | "backend_version | \n", 227 | "category | \n", 228 | "data | \n", 229 | "origin | \n", 230 | "perceval_version | \n", 231 | "project_name | \n", 232 | "tag | \n", 233 | "timestamp | \n", 234 | "updated_on | \n", 235 | "uuid | \n", 236 | "
|---|---|---|---|---|---|---|---|---|---|---|---|
| 0 | \n", 241 | "Git | \n", 242 | "0.10.2 | \n", 243 | "commit | \n", 244 | "{'Commit': 'Martin Ritchie <ritchiem@apache.or... | \n", 245 | "https://github.com/apache/qpid.git | \n", 246 | "0.9.16 | \n", 247 | "qpid | \n", 248 | "https://github.com/apache/qpid.git | \n", 249 | "1.523656e+09 | \n", 250 | "1.158764e+09 | \n", 251 | "68dd458759540e7649a5c970937ddd710afd166f | \n", 252 | "
| 1 | \n", 255 | "Git | \n", 256 | "0.10.2 | \n", 257 | "commit | \n", 258 | "{'Commit': 'Martin Ritchie <ritchiem@apache.or... | \n", 259 | "https://github.com/apache/qpid.git | \n", 260 | "0.9.16 | \n", 261 | "qpid | \n", 262 | "https://github.com/apache/qpid.git | \n", 263 | "1.523656e+09 | \n", 264 | "1.159348e+09 | \n", 265 | "db0f4b7f409abc534b4b90b4814685fd91645a79 | \n", 266 | "
| 2 | \n", 269 | "Git | \n", 270 | "0.10.2 | \n", 271 | "commit | \n", 272 | "{'Commit': 'Martin Ritchie <ritchiem@apache.or... | \n", 273 | "https://github.com/apache/qpid.git | \n", 274 | "0.9.16 | \n", 275 | "qpid | \n", 276 | "https://github.com/apache/qpid.git | \n", 277 | "1.523656e+09 | \n", 278 | "1.160049e+09 | \n", 279 | "59ab9e2a41c0e2f9c4f73e5c37a3262c05b46ed4 | \n", 280 | "
| 3 | \n", 283 | "Git | \n", 284 | "0.10.2 | \n", 285 | "commit | \n", 286 | "{'Commit': 'Robert Greig <rgreig@apache.org>',... | \n", 287 | "https://github.com/apache/qpid.git | \n", 288 | "0.9.16 | \n", 289 | "qpid | \n", 290 | "https://github.com/apache/qpid.git | \n", 291 | "1.523656e+09 | \n", 292 | "1.160684e+09 | \n", 293 | "b13f951ada229fb15aa122f2cba58e0a367d0086 | \n", 294 | "
| 4 | \n", 297 | "Git | \n", 298 | "0.10.2 | \n", 299 | "commit | \n", 300 | "{'Commit': 'Alan Conway <aconway@apache.org>',... | \n", 301 | "https://github.com/apache/qpid.git | \n", 302 | "0.9.16 | \n", 303 | "qpid | \n", 304 | "https://github.com/apache/qpid.git | \n", 305 | "1.523656e+09 | \n", 306 | "1.161215e+09 | \n", 307 | "bce67ae826132c4008aca047e74026b29fee3b52 | \n", 308 | "
| 5 | \n", 311 | "Git | \n", 312 | "0.10.2 | \n", 313 | "commit | \n", 314 | "{'Commit': 'Gordon Sim <gsim@apache.org>', 'Au... | \n", 315 | "https://github.com/apache/qpid.git | \n", 316 | "0.9.16 | \n", 317 | "qpid | \n", 318 | "https://github.com/apache/qpid.git | \n", 319 | "1.523656e+09 | \n", 320 | "1.161768e+09 | \n", 321 | "e0291768664ef9e6691efe4946ca3adb154bedc6 | \n", 322 | "
| \n", 416 | " | author | \n", 417 | "
|---|---|
| 0 | \n", 422 | "Martin Ritchie <ritchiem@apache.org> | \n", 423 | "
| 1 | \n", 426 | "Martin Ritchie <ritchiem@apache.org> | \n", 427 | "
| 2 | \n", 430 | "Martin Ritchie <ritchiem@apache.org> | \n", 431 | "
| 3 | \n", 434 | "Robert Greig <rgreig@apache.org> | \n", 435 | "
| 4 | \n", 438 | "Alan Conway <aconway@apache.org> | \n", 439 | "
| \n", 532 | " | tld | \n", 533 | "num | \n", 534 | "
|---|---|---|
| 0 | \n", 539 | "org | \n", 540 | "1076444 | \n", 541 | "
| 1 | \n", 544 | "com | \n", 545 | "383104 | \n", 546 | "
| 2 | \n", 549 | "net | \n", 550 | "13682 | \n", 551 | "
| 3 | \n", 554 | "io | \n", 555 | "12934 | \n", 556 | "
| 4 | \n", 559 | "de | \n", 560 | "7849 | \n", 561 | "
| 5 | \n", 564 | "uk | \n", 565 | "6434 | \n", 566 | "
| 6 | \n", 569 | "edu | \n", 570 | "6351 | \n", 571 | "
| 7 | \n", 574 | "au | \n", 575 | "6201 | \n", 576 | "
| 8 | \n", 579 | "spamassassin_role <spamassassin_role@unknown | \n", 580 | "2419 | \n", 581 | "
| 9 | \n", 584 | "hu | \n", 585 | "1808 | \n", 586 | "