markdown stringlengths 0 37k | code stringlengths 1 33.3k | path stringlengths 8 215 | repo_name stringlengths 6 77 | license stringclasses 15
values |
|---|---|---|---|---|
3.4. Integrated Timestep
Is Required: TRUE Type: INTEGER Cardinality: 1.1
Timestep for the aerosol model (in seconds) | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.key_properties.timestep_framework.integrated_timestep')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
3.5. Integrated Scheme Type
Is Required: TRUE Type: ENUM Cardinality: 1.1
Specify the type of timestep scheme | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.key_properties.timestep_framework.integrated_scheme_type')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# Valid Choices:
# "Explicit"
# "Implicit"
# "Semi-implicit"
# "Semi-analytic"
# "Impact solver"
# ... | notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
4. Key Properties --> Meteorological Forcings
**
4.1. Variables 3D
Is Required: FALSE Type: STRING Cardinality: 0.1
Three dimensionsal forcing variables, e.g. U, V, W, T, Q, P, conventive mass flux | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.key_properties.meteorological_forcings.variables_3D')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
4.2. Variables 2D
Is Required: FALSE Type: STRING Cardinality: 0.1
Two dimensionsal forcing variables, e.g. land-sea mask definition | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.key_properties.meteorological_forcings.variables_2D')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
4.3. Frequency
Is Required: FALSE Type: INTEGER Cardinality: 0.1
Frequency with which meteological forcings are applied (in seconds). | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.key_properties.meteorological_forcings.frequency')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
5. Key Properties --> Resolution
Resolution in the aersosol model grid
5.1. Name
Is Required: TRUE Type: STRING Cardinality: 1.1
This is a string usually used by the modelling group to describe the resolution of this grid, e.g. ORCA025, N512L180, T512L70 etc. | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.key_properties.resolution.name')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
5.2. Canonical Horizontal Resolution
Is Required: FALSE Type: STRING Cardinality: 0.1
Expression quoted for gross comparisons of resolution, eg. 50km or 0.1 degrees etc. | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.key_properties.resolution.canonical_horizontal_resolution')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
5.3. Number Of Horizontal Gridpoints
Is Required: FALSE Type: INTEGER Cardinality: 0.1
Total number of horizontal (XY) points (or degrees of freedom) on computational grid. | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.key_properties.resolution.number_of_horizontal_gridpoints')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
5.4. Number Of Vertical Levels
Is Required: FALSE Type: INTEGER Cardinality: 0.1
Number of vertical levels resolved on computational grid. | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.key_properties.resolution.number_of_vertical_levels')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
5.5. Is Adaptive Grid
Is Required: FALSE Type: BOOLEAN Cardinality: 0.1
Default is False. Set true if grid resolution changes during execution. | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.key_properties.resolution.is_adaptive_grid')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# Valid Choices:
# True
# False
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
6. Key Properties --> Tuning Applied
Tuning methodology for aerosol model
6.1. Description
Is Required: TRUE Type: STRING Cardinality: 1.1
General overview description of tuning: explain and motivate the main targets and metrics retained. &Document the relative weigh... | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.key_properties.tuning_applied.description')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
6.2. Global Mean Metrics Used
Is Required: FALSE Type: STRING Cardinality: 0.N
List set of metrics of the global mean state used in tuning model/component | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.key_properties.tuning_applied.global_mean_metrics_used')
# PROPERTY VALUE(S):
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
6.3. Regional Metrics Used
Is Required: FALSE Type: STRING Cardinality: 0.N
List of regional metrics of mean state used in tuning model/component | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.key_properties.tuning_applied.regional_metrics_used')
# PROPERTY VALUE(S):
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
6.4. Trend Metrics Used
Is Required: FALSE Type: STRING Cardinality: 0.N
List observed trend metrics used in tuning model/component | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.key_properties.tuning_applied.trend_metrics_used')
# PROPERTY VALUE(S):
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
7. Transport
Aerosol transport
7.1. Overview
Is Required: TRUE Type: STRING Cardinality: 1.1
Overview of transport in atmosperic aerosol model | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.transport.overview')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
7.2. Scheme
Is Required: TRUE Type: ENUM Cardinality: 1.1
Method for aerosol transport modeling | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.transport.scheme')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# Valid Choices:
# "Uses Atmospheric chemistry transport scheme"
# "Specific transport scheme (eulerian)"
# "Specific transport scheme (semi-lagrangian)"
# ... | notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
7.3. Mass Conservation Scheme
Is Required: TRUE Type: ENUM Cardinality: 1.N
Method used to ensure mass conservation. | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.transport.mass_conservation_scheme')
# PROPERTY VALUE(S):
# Set as follows: DOC.set_value("value")
# Valid Choices:
# "Uses Atmospheric chemistry transport scheme"
# "Mass adjustment"
# "Concentrations positivity"
# "Gradients mo... | notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
7.4. Convention
Is Required: TRUE Type: ENUM Cardinality: 1.N
Transport by convention | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.transport.convention')
# PROPERTY VALUE(S):
# Set as follows: DOC.set_value("value")
# Valid Choices:
# "Uses Atmospheric chemistry transport scheme"
# "Convective fluxes connected to tracers"
# "Vertical velocities connected to tracers... | notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
8. Emissions
Atmospheric aerosol emissions
8.1. Overview
Is Required: TRUE Type: STRING Cardinality: 1.1
Overview of emissions in atmosperic aerosol model | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.emissions.overview')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
8.2. Method
Is Required: TRUE Type: ENUM Cardinality: 1.N
Method used to define aerosol species (several methods allowed because the different species may not use the same method). | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.emissions.method')
# PROPERTY VALUE(S):
# Set as follows: DOC.set_value("value")
# Valid Choices:
# "None"
# "Prescribed (climatology)"
# "Prescribed CMIP6"
# "Prescribed above surface"
# "Interactive"
# "Interactiv... | notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
8.3. Sources
Is Required: FALSE Type: ENUM Cardinality: 0.N
Sources of the aerosol species are taken into account in the emissions scheme | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.emissions.sources')
# PROPERTY VALUE(S):
# Set as follows: DOC.set_value("value")
# Valid Choices:
# "Vegetation"
# "Volcanos"
# "Bare ground"
# "Sea surface"
# "Lightning"
# "Fires"
# "Aircraft"
# "An... | notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
8.4. Prescribed Climatology
Is Required: FALSE Type: ENUM Cardinality: 0.1
Specify the climatology type for aerosol emissions | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.emissions.prescribed_climatology')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# Valid Choices:
# "Constant"
# "Interannual"
# "Annual"
# "Monthly"
# "Daily"
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
8.5. Prescribed Climatology Emitted Species
Is Required: FALSE Type: STRING Cardinality: 0.1
List of aerosol species emitted and prescribed via a climatology | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.emissions.prescribed_climatology_emitted_species')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
8.6. Prescribed Spatially Uniform Emitted Species
Is Required: FALSE Type: STRING Cardinality: 0.1
List of aerosol species emitted and prescribed as spatially uniform | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.emissions.prescribed_spatially_uniform_emitted_species')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
8.7. Interactive Emitted Species
Is Required: FALSE Type: STRING Cardinality: 0.1
List of aerosol species emitted and specified via an interactive method | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.emissions.interactive_emitted_species')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
8.8. Other Emitted Species
Is Required: FALSE Type: STRING Cardinality: 0.1
List of aerosol species emitted and specified via an "other method" | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.emissions.other_emitted_species')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
8.9. Other Method Characteristics
Is Required: FALSE Type: STRING Cardinality: 0.1
Characteristics of the "other method" used for aerosol emissions | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.emissions.other_method_characteristics')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
9. Concentrations
Atmospheric aerosol concentrations
9.1. Overview
Is Required: TRUE Type: STRING Cardinality: 1.1
Overview of concentrations in atmosperic aerosol model | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.concentrations.overview')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
9.2. Prescribed Lower Boundary
Is Required: FALSE Type: STRING Cardinality: 0.1
List of species prescribed at the lower boundary. | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.concentrations.prescribed_lower_boundary')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
9.3. Prescribed Upper Boundary
Is Required: FALSE Type: STRING Cardinality: 0.1
List of species prescribed at the upper boundary. | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.concentrations.prescribed_upper_boundary')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
9.4. Prescribed Fields Mmr
Is Required: FALSE Type: STRING Cardinality: 0.1
List of species prescribed as mass mixing ratios. | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.concentrations.prescribed_fields_mmr')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
9.5. Prescribed Fields Mmr
Is Required: FALSE Type: STRING Cardinality: 0.1
List of species prescribed as AOD plus CCNs. | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.concentrations.prescribed_fields_mmr')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
10. Optical Radiative Properties
Aerosol optical and radiative properties
10.1. Overview
Is Required: TRUE Type: STRING Cardinality: 1.1
Overview of optical and radiative properties | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.overview')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
11. Optical Radiative Properties --> Absorption
Absortion properties in aerosol scheme
11.1. Black Carbon
Is Required: FALSE Type: FLOAT Cardinality: 0.1
Absorption mass coefficient of black carbon at 550nm (if non-absorbing enter 0) | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.absorption.black_carbon')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
11.2. Dust
Is Required: FALSE Type: FLOAT Cardinality: 0.1
Absorption mass coefficient of dust at 550nm (if non-absorbing enter 0) | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.absorption.dust')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
11.3. Organics
Is Required: FALSE Type: FLOAT Cardinality: 0.1
Absorption mass coefficient of organics at 550nm (if non-absorbing enter 0) | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.absorption.organics')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
12. Optical Radiative Properties --> Mixtures
**
12.1. External
Is Required: TRUE Type: BOOLEAN Cardinality: 1.1
Is there external mixing with respect to chemical composition? | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.mixtures.external')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# Valid Choices:
# True
# False
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
12.2. Internal
Is Required: TRUE Type: BOOLEAN Cardinality: 1.1
Is there internal mixing with respect to chemical composition? | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.mixtures.internal')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# Valid Choices:
# True
# False
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
12.3. Mixing Rule
Is Required: FALSE Type: STRING Cardinality: 0.1
If there is internal mixing with respect to chemical composition then indicate the mixinrg rule | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.mixtures.mixing_rule')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
13. Optical Radiative Properties --> Impact Of H2o
**
13.1. Size
Is Required: TRUE Type: BOOLEAN Cardinality: 1.1
Does H2O impact size? | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.impact_of_h2o.size')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# Valid Choices:
# True
# False
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
13.2. Internal Mixture
Is Required: TRUE Type: BOOLEAN Cardinality: 1.1
Does H2O impact internal mixture? | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.impact_of_h2o.internal_mixture')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# Valid Choices:
# True
# False
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
14. Optical Radiative Properties --> Radiative Scheme
Radiative scheme for aerosol
14.1. Overview
Is Required: TRUE Type: STRING Cardinality: 1.1
Overview of radiative scheme | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.radiative_scheme.overview')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
14.2. Shortwave Bands
Is Required: TRUE Type: INTEGER Cardinality: 1.1
Number of shortwave bands | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.radiative_scheme.shortwave_bands')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
14.3. Longwave Bands
Is Required: TRUE Type: INTEGER Cardinality: 1.1
Number of longwave bands | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.radiative_scheme.longwave_bands')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
15. Optical Radiative Properties --> Cloud Interactions
Aerosol-cloud interactions
15.1. Overview
Is Required: TRUE Type: STRING Cardinality: 1.1
Overview of aerosol-cloud interactions | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.cloud_interactions.overview')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
15.2. Twomey
Is Required: TRUE Type: BOOLEAN Cardinality: 1.1
Is the Twomey effect included? | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.cloud_interactions.twomey')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# Valid Choices:
# True
# False
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
15.3. Twomey Minimum Ccn
Is Required: FALSE Type: INTEGER Cardinality: 0.1
If the Twomey effect is included, then what is the minimum CCN number? | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.cloud_interactions.twomey_minimum_ccn')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
15.4. Drizzle
Is Required: TRUE Type: BOOLEAN Cardinality: 1.1
Does the scheme affect drizzle? | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.cloud_interactions.drizzle')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# Valid Choices:
# True
# False
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
15.5. Cloud Lifetime
Is Required: TRUE Type: BOOLEAN Cardinality: 1.1
Does the scheme affect cloud lifetime? | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.cloud_interactions.cloud_lifetime')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# Valid Choices:
# True
# False
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
15.6. Longwave Bands
Is Required: TRUE Type: INTEGER Cardinality: 1.1
Number of longwave bands | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.optical_radiative_properties.cloud_interactions.longwave_bands')
# PROPERTY VALUE:
# Set as follows: DOC.set_value(value)
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
16. Model
Aerosol model
16.1. Overview
Is Required: TRUE Type: STRING Cardinality: 1.1
Overview of atmosperic aerosol model | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.model.overview')
# PROPERTY VALUE:
# Set as follows: DOC.set_value("value")
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
16.2. Processes
Is Required: TRUE Type: ENUM Cardinality: 1.N
Processes included in the Aerosol model. | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.model.processes')
# PROPERTY VALUE(S):
# Set as follows: DOC.set_value("value")
# Valid Choices:
# "Dry deposition"
# "Sedimentation"
# "Wet deposition (impaction scavenging)"
# "Wet deposition (nucleation scavenging)"
# "... | notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
16.3. Coupling
Is Required: FALSE Type: ENUM Cardinality: 0.N
Other model components coupled to the Aerosol model | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.model.coupling')
# PROPERTY VALUE(S):
# Set as follows: DOC.set_value("value")
# Valid Choices:
# "Radiation"
# "Land surface"
# "Heterogeneous chemistry"
# "Clouds"
# "Ocean"
# "Cryosphere"
# "Gas phase chem... | notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
16.4. Gas Phase Precursors
Is Required: TRUE Type: ENUM Cardinality: 1.N
List of gas phase aerosol precursors. | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.model.gas_phase_precursors')
# PROPERTY VALUE(S):
# Set as follows: DOC.set_value("value")
# Valid Choices:
# "DMS"
# "SO2"
# "Ammonia"
# "Iodine"
# "Terpene"
# "Isoprene"
# "VOC"
# "NOx"
# "Oth... | notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
16.5. Scheme Type
Is Required: TRUE Type: ENUM Cardinality: 1.N
Type(s) of aerosol scheme used by the aerosols model (potentially multiple: some species may be covered by one type of aerosol scheme and other species covered by another type). | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.model.scheme_type')
# PROPERTY VALUE(S):
# Set as follows: DOC.set_value("value")
# Valid Choices:
# "Bulk"
# "Modal"
# "Bin"
# "Other: [Please specify]"
# TODO - please enter value(s)
| notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
16.6. Bulk Scheme Species
Is Required: TRUE Type: ENUM Cardinality: 1.N
List of species covered by the bulk scheme. | # PROPERTY ID - DO NOT EDIT !
DOC.set_id('cmip6.aerosol.model.bulk_scheme_species')
# PROPERTY VALUE(S):
# Set as follows: DOC.set_value("value")
# Valid Choices:
# "Sulphate"
# "Nitrate"
# "Sea salt"
# "Dust"
# "Ice"
# "Organic"
# "Black carbon / soot"
# "... | notebooks/messy-consortium/cmip6/models/emac-2-53-aerchem/aerosol.ipynb | ES-DOC/esdoc-jupyterhub | gpl-3.0 |
Explore the Data
Play around with view_sentence_range to view different parts of the data. | view_sentence_range = (0, 10)
"""
DON'T MODIFY ANYTHING IN THIS CELL
"""
import numpy as np
print('Dataset Stats')
print('Roughly the number of unique words: {}'.format(len({word: None for word in text.split()})))
scenes = text.split('\n\n')
print('Number of scenes: {}'.format(len(scenes)))
sentence_count_scene = [sc... | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Implement Preprocessing Functions
The first thing to do to any dataset is preprocessing. Implement the following preprocessing functions below:
- Lookup Table
- Tokenize Punctuation
Lookup Table
To create a word embedding, you first need to transform the words to ids. In this function, create two dictionaries:
- Dict... | import numpy as np
import problem_unittests as tests
from collections import Counter
def create_lookup_tables(text):
"""
Create lookup tables for vocabulary
:param text: The text of tv scripts split into words
:return: A tuple of dicts (vocab_to_int, int_to_vocab)
"""
counts = Counter(text)
... | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Tokenize Punctuation
We'll be splitting the script into a word array using spaces as delimiters. However, punctuations like periods and exclamation marks make it hard for the neural network to distinguish between the word "bye" and "bye!".
Implement the function token_lookup to return a dict that will be used to token... | def token_lookup():
"""
Generate a dict to turn punctuation into a token.
:return: Tokenize dictionary where the key is the punctuation and the value is the token
"""
# TODO: Implement Function
punct_list = {'.': '||period||',
',': '||comma||',
'"': '||quotat... | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Preprocess all the data and save it
Running the code cell below will preprocess all the data and save it to file. | """
DON'T MODIFY ANYTHING IN THIS CELL
"""
# Preprocess Training, Validation, and Testing Data
helper.preprocess_and_save_data(data_dir, token_lookup, create_lookup_tables) | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Check Point
This is your first checkpoint. If you ever decide to come back to this notebook or have to restart the notebook, you can start from here. The preprocessed data has been saved to disk. | """
DON'T MODIFY ANYTHING IN THIS CELL
"""
import helper
import numpy as np
import problem_unittests as tests
int_text, vocab_to_int, int_to_vocab, token_dict = helper.load_preprocess()
len(int_text) | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Build the Neural Network
You'll build the components necessary to build a RNN by implementing the following functions below:
- get_inputs
- get_init_cell
- get_embed
- build_rnn
- build_nn
- get_batches
Check the Version of TensorFlow and Access to GPU | """
DON'T MODIFY ANYTHING IN THIS CELL
"""
from distutils.version import LooseVersion
import warnings
import tensorflow as tf
# Check TensorFlow Version
assert LooseVersion(tf.__version__) >= LooseVersion('1.0'), 'Please use TensorFlow version 1.0 or newer'
print('TensorFlow Version: {}'.format(tf.__version__))
# Che... | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Input
Implement the get_inputs() function to create TF Placeholders for the Neural Network. It should create the following placeholders:
- Input text placeholder named "input" using the TF Placeholder name parameter.
- Targets placeholder
- Learning Rate placeholder
Return the placeholders in the following the tuple (... | def get_inputs():
"""
Create TF Placeholders for input, targets, and learning rate.
:return: Tuple (input, targets, learning rate)
"""
inputs = tf.placeholder(tf.int32, [None, None], name='input')
targets = tf.placeholder(tf.int32, [None, None], name='targets')
learning_rate = tf.placeholder... | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Build RNN Cell and Initialize
Stack one or more BasicLSTMCells in a MultiRNNCell.
- The Rnn size should be set using rnn_size
- Initalize Cell State using the MultiRNNCell's zero_state() function
- Apply the name "initial_state" to the initial state using tf.identity()
Return the cell and initial state in the follo... | def get_init_cell(batch_size, rnn_size):
"""
Create an RNN Cell and initialize it.
:param batch_size: Size of batches
:param rnn_size: Size of RNNs
:return: Tuple (cell, initialize state)
"""
lstm = tf.contrib.rnn.BasicLSTMCell(rnn_size)
cell = tf.contrib.rnn.MultiRNNCell([lstm] * 2)
... | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Word Embedding
Apply embedding to input_data using TensorFlow. Return the embedded sequence. | def get_embed(input_data, vocab_size, embed_dim):
"""
Create embedding for <input_data>.
:param input_data: TF placeholder for text input.
:param vocab_size: Number of words in vocabulary.
:param embed_dim: Number of embedding dimensions
:return: Embedded input.
"""
embedding = tf.Variab... | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Build RNN
You created a RNN Cell in the get_init_cell() function. Time to use the cell to create a RNN.
- Build the RNN using the tf.nn.dynamic_rnn()
- Apply the name "final_state" to the final state using tf.identity()
Return the outputs and final_state state in the following tuple (Outputs, FinalState) | def build_rnn(cell, inputs):
"""
Create a RNN using a RNN Cell
:param cell: RNN Cell
:param inputs: Input text data
:return: Tuple (Outputs, Final State)
"""
outputs, final_state = tf.nn.dynamic_rnn(cell, inputs, dtype=tf.float32)
final_state = tf.identity(final_state, name="final_state"... | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Build the Neural Network
Apply the functions you implemented above to:
- Apply embedding to input_data using your get_embed(input_data, vocab_size, embed_dim) function.
- Build RNN using cell and your build_rnn(cell, inputs) function.
- Apply a fully connected layer with a linear activation and vocab_size as the number... | def build_nn(cell, rnn_size, input_data, vocab_size):
"""
Build part of the neural network
:param cell: RNN cell
:param rnn_size: Size of rnns
:param input_data: Input data
:param vocab_size: Vocabulary size
:return: Tuple (Logits, FinalState)
"""
inputs = get_embed(input_data, vocab... | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Batches
Implement get_batches to create batches of input and targets using int_text. The batches should be a Numpy array with the shape (number of batches, 2, batch size, sequence length). Each batch contains two elements:
- The first element is a single batch of input with the shape [batch size, sequence length]
- Th... | def get_batches(int_text, batch_size, seq_length):
"""
Return batches of input and target
:param int_text: Text with the words replaced by their ids
:param batch_size: The size of batch
:param seq_length: The length of sequence
:return: Batches as a Numpy array
"""
slice_size = batch_siz... | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Neural Network Training
Hyperparameters
Tune the following parameters:
Set num_epochs to the number of epochs.
Set batch_size to the batch size.
Set rnn_size to the size of the RNNs.
Set seq_length to the length of sequence.
Set learning_rate to the learning rate.
Set show_every_n_batches to the number of batches the ... | # Number of Epochs
num_epochs = 50
# Batch Size
batch_size = 128
# RNN Size
rnn_size = 1024
# Sequence Length
seq_length = 16
# Learning Rate
learning_rate = 0.001
# Show stats for every n number of batches
show_every_n_batches = 11
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
save_dir = './save' | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Build the Graph
Build the graph using the neural network you implemented. | """
DON'T MODIFY ANYTHING IN THIS CELL
"""
from tensorflow.contrib import seq2seq
train_graph = tf.Graph()
with train_graph.as_default():
vocab_size = len(int_to_vocab)
input_text, targets, lr = get_inputs()
input_data_shape = tf.shape(input_text)
cell, initial_state = get_init_cell(input_data_shape[0]... | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Train
Train the neural network on the preprocessed data. If you have a hard time getting a good loss, check the forms to see if anyone is having the same problem. | """
DON'T MODIFY ANYTHING IN THIS CELL
"""
batches = get_batches(int_text, batch_size, seq_length)
with tf.Session(graph=train_graph) as sess:
sess.run(tf.global_variables_initializer())
for epoch_i in range(num_epochs):
state = sess.run(initial_state, {input_text: batches[0][0]})
for batch_i... | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Save Parameters
Save seq_length and save_dir for generating a new TV script. | """
DON'T MODIFY ANYTHING IN THIS CELL
"""
# Save parameters for checkpoint
helper.save_params((seq_length, save_dir)) | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Checkpoint | """
DON'T MODIFY ANYTHING IN THIS CELL
"""
import tensorflow as tf
import numpy as np
import helper
import problem_unittests as tests
_, vocab_to_int, int_to_vocab, token_dict = helper.load_preprocess()
seq_length, load_dir = helper.load_params() | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Implement Generate Functions
Get Tensors
Get tensors from loaded_graph using the function get_tensor_by_name(). Get the tensors using the following names:
- "input:0"
- "initial_state:0"
- "final_state:0"
- "probs:0"
Return the tensors in the following tuple (InputTensor, InitialStateTensor, FinalStateTensor, ProbsTen... | def get_tensors(loaded_graph):
"""
Get input, initial state, final state, and probabilities tensor from <loaded_graph>
:param loaded_graph: TensorFlow graph loaded from file
:return: Tuple (InputTensor, InitialStateTensor, FinalStateTensor, ProbsTensor)
"""
inputs = loaded_graph.get_tensor_by_na... | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Choose Word
Implement the pick_word() function to select the next word using probabilities. | from random import randint
def pick_word(probabilities, int_to_vocab):
"""
Pick the next word in the generated text
:param probabilities: Probabilites of the next word
:param int_to_vocab: Dictionary of word ids as the keys and words as the values
:return: String of the predicted word
"""
r... | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
Generate TV Script
This will generate the TV script for you. Set gen_length to the length of TV script you want to generate. | gen_length = 300
# homer_simpson, moe_szyslak, or Barney_Gumble
prime_word = 'moe_szyslak'
"""
DON'T MODIFY ANYTHING IN THIS CELL THAT IS BELOW THIS LINE
"""
loaded_graph = tf.Graph()
with tf.Session(graph=loaded_graph) as sess:
# Load saved model
loader = tf.train.import_meta_graph(load_dir + '.meta')
loa... | DLND-tv-script-generation/dlnd_tv_script_generation.ipynb | Kulbear/deep-learning-nano-foundation | mit |
2. Save frame and display JPG | frame = hdmi.frame()
orig_img_path = '/home/xilinx/jupyter_notebooks/examples/data/orig.jpg'
frame.save_as_jpeg(orig_img_path)
Image(filename=orig_img_path) | Pynq-Z1/notebooks/examples/video_filters.ipynb | JorisBolsens/PYNQ | bsd-3-clause |
3. Gray Scale filter
This cell should take ~50s to complete. Note that there are better ways (e.g., openCV, etc.) to do grayscale conversion, but this is just an example of doing that without using any additional library. | from pynq.drivers.video import MAX_FRAME_WIDTH
frame_i = frame.frame
height = hdmi.frame_height()
width = hdmi.frame_width()
for y in range(0, height):
for x in range(0, width):
offset = 3 * (y * MAX_FRAME_WIDTH + x)
gray = round((0.299*frame_i[offset+2]) +
(0.587*frame_i[of... | Pynq-Z1/notebooks/examples/video_filters.ipynb | JorisBolsens/PYNQ | bsd-3-clause |
4. Sobel filter
This cell should take ~80s to complete. Note that there are better ways (e.g., openCV, etc.) to do sobel filter, but this is just an example of doing that without using any additional library.
Compute the Sobel Filter output with sobel operator:
$G_x=
\begin{bmatrix}
-1 & 0 & +1 \
-2 & 0 & +2 \
-1 & 0 &... | height = 1080
width = 1920
sobel = Frame(1920, 1080)
frame_i = frame.frame
for y in range(1,height-1):
for x in range(1,width-1):
offset = 3 * (y * MAX_FRAME_WIDTH + x)
upper_row_offset = offset - MAX_FRAME_WIDTH*3
lower_row_offset = offset + MAX_FRAME_WIDTH*3
gx = abs(-frame... | Pynq-Z1/notebooks/examples/video_filters.ipynb | JorisBolsens/PYNQ | bsd-3-clause |
5: Free up space | hdmi.stop()
del sobel
del hdmi | Pynq-Z1/notebooks/examples/video_filters.ipynb | JorisBolsens/PYNQ | bsd-3-clause |
We'll gather the contents of a single message. 2017_Jan_0 is one that includes a personal signature, as well as the standard Full Disclosure footer.
2017_Jan_45 is a message that includes a PGP signature. | year = '2005'
month = 'Jan'
id = '0'
url = 'http://seclists.org/fulldisclosure/' + year + '/' + month + '/' + id
r = requests.get(url)
content = r.text
from IPython.display import Pretty
Pretty(content) | Parsers/SecLists/Reply-Parse.ipynb | sailuh/perceive | gpl-2.0 |
Each message in the FD list is wrapped in seclists.org code, including navigation, ads, and trackers, all irrelevant to us. The body of the reply is contained between two comments, <!--X-Body-of-Message--> and <!--X-Body-of-Message-End-->.
BeautifulSoup isn't great at handling comments, so we first use simp... | start = content.index('<!--X-Body-of-Message-->') + 24
end = content.index('<!--X-Body-of-Message-End-->')
body = content[start:end]
soup = BeautifulSoup(body, 'html5lib')
bodyhtml = soup.find('body')
raw = bodyhtml.text
Pretty(raw) | Parsers/SecLists/Reply-Parse.ipynb | sailuh/perceive | gpl-2.0 |
Signature extraction
Messages to the FD list usually end with a common footer:
2002-2005:
_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.netsys.com/full-disclosure-charter.html
2005-2014:
_______________________________________________
Full-Disclosure - We beli... | workcopy = raw
footers = [m.start() for m in re.finditer('_{47}', workcopy)]
for f in reversed(footers):
possible = workcopy[f:f+190]
lines = possible.splitlines()
if(len(lines) == 4
and lines[1][0:15] == 'Full-Disclosure'
and lines[2][0:8] == 'Charter:'
and lines[3][0:20] == 'Host... | Parsers/SecLists/Reply-Parse.ipynb | sailuh/perceive | gpl-2.0 |
PGP messages
As can be expected, many messages offer a PGP signature validation. This isn't useful to our processing, so we'll take it out. First, we define get_raw_message with code we've used previously. We then create strip_pgp, looking for the PGP signature. We can just use simple text searches again, with an excep... | def get_raw_message(url):
r = requests.get(url)
content = r.text
start = content.index('<!--X-Body-of-Message-->') + 24
end = content.index('<!--X-Body-of-Message-End-->')
body = content[start:end]
soup = BeautifulSoup(body, 'html5lib')
bodyhtml = soup.find('body')
return bodyhtml.text
... | Parsers/SecLists/Reply-Parse.ipynb | sailuh/perceive | gpl-2.0 |
Talon processing
Next, we'll attempt to use talon to strip out the signature from the message. Talon provides two different ways to find the signature, "brute force" and "machine learning".
We'll try the brute force method first. | import talon
from talon.signature.bruteforce import extract_signature
reply, signature = extract_signature(raw)
if(not signature is None):
Pretty(signature)
Pretty(reply) | Parsers/SecLists/Reply-Parse.ipynb | sailuh/perceive | gpl-2.0 |
At least for 2017_Jan_0, it is pretty effective. 2017_Jan_45 was not successful at all. Now, we'll try the machine learning style, to compare. | talon.init()
from talon import signature
reply_ml, sig_ml = signature.extract(raw, sender="dawid@legalhackers.com")
print(sig_ml)
#reply_ml | Parsers/SecLists/Reply-Parse.ipynb | sailuh/perceive | gpl-2.0 |
This doesn't seem to output anything. I'm unclear whether or not this library is already trained; documentation states that it was trained on the authors' personal email and an ENRON set. There is an open issue on github https://github.com/mailgun/talon/issues/143 from July asking about the same thing. We will stick wi... | rx = re.compile('<([^\s>]+)(\s|/>)+')
tags = {}
for tag in rx.findall(str(bodyhtml)):
tagtype = tag[0]
if not tagtype.startswith('/'):
if tagtype in tags:
tags[tagtype] = tags[tagtype] + 1
else:
tags[tagtype] = 1
print(tags) | Parsers/SecLists/Reply-Parse.ipynb | sailuh/perceive | gpl-2.0 |
Extract link domains
We'll record what domains are linked to in each message. We use BeautifulSoup to pull out all <a> tags, then urlparse to determine the domain within. | from urllib.parse import urlparse
sites = {}
atags = bodyhtml.find_all('a')
hrefs = [link.get('href') for link in atags]
for link in hrefs:
parsedurl = urlparse(link)
site = parsedurl.netloc
if site in sites:
sites[site] = sites[site] + 1
else:
sites[site] = 1
sites | Parsers/SecLists/Reply-Parse.ipynb | sailuh/perceive | gpl-2.0 |
Add SECOORA models and observations. | from utilities import titles, fix_url
secoora_models = ['SABGOM', 'USEAST', 'USF_ROMS',
'USF_SWAN', 'USF_FVCOM']
for secoora_model in secoora_models:
if titles[secoora_model] not in dap_urls:
log.warning('{} not in the NGDC csw'.format(secoora_model))
dap_urls.append(titles[secoo... | notebooks/timeSeries/ssv/00-velocity_secoora.ipynb | ocefpaf/secoora | mit |
FIXME: deal with ($u$, $v$) and speed, direction. | from iris.exceptions import CoordinateNotFoundError, ConstraintMismatchError
from utilities import TimeoutException, secoora_buoys, get_cubes
urls = list(secoora_buoys())
buoys = dict()
for url in urls:
try:
cubes = get_cubes(url, name_list=name_list,
bbox=bbox, time=(start, sto... | notebooks/timeSeries/ssv/00-velocity_secoora.ipynb | ocefpaf/secoora | mit |
Make sure your HDFS is still on and the input files (the three books) are still in the input folder.
Create the input RDD from the files on the HDFS (hdfs://localhost:54310/user/ubuntu/input). | lines = sc.textFile('hdfs://localhost:54310/user/ubuntu/input')
lines.count() | instructor-notes/3-pyspark-wordcount.ipynb | dsiufl/2015-Fall-Hadoop | mit |
Simple Word Count
Perform the counting, by flatMap, map, and reduceByKey. | from operator import add
counts = lines.flatMap(lambda x: x.split()).map(lambda x: (x, 1)).reduceByKey(add) | instructor-notes/3-pyspark-wordcount.ipynb | dsiufl/2015-Fall-Hadoop | mit |
Take the top 10 frequently used words | counts.takeOrdered(10, lambda x: -x[1]) | instructor-notes/3-pyspark-wordcount.ipynb | dsiufl/2015-Fall-Hadoop | mit |
Pattern Matching WordCount
Read the pattern file into a set. (file: /home/ubuntu/shortcourse/notes/scripts/wordcount2/wc2-pattern.txt) | pattern = set()
f = open('/home/ubuntu/shortcourse/notes/scripts/wordcount2/wc2-pattern.txt')
for line in f:
words = line.split()
for word in words:
pattern.add(word) | instructor-notes/3-pyspark-wordcount.ipynb | dsiufl/2015-Fall-Hadoop | mit |
Perform the counting, by flatMap, filter, map, and reduceByKey. | result = lines.flatMap(lambda x: x.split()).filter(lambda x: x in pattern).map(lambda x: (x, 1)).reduceByKey(add) | instructor-notes/3-pyspark-wordcount.ipynb | dsiufl/2015-Fall-Hadoop | mit |
Collect and show the results. | result.collect()
# stop the spark context
sc.stop() | instructor-notes/3-pyspark-wordcount.ipynb | dsiufl/2015-Fall-Hadoop | mit |
Make a project
We have a few LAS files in a folder; we can load them all at once with standard POSIX file globbing syntax: | p = welly.read_las("../../tests/assets/example_*.las") | docs/_userguide/Projects.ipynb | agile-geoscience/welly | apache-2.0 |
Now we have a project, containing two files: | p | docs/_userguide/Projects.ipynb | agile-geoscience/welly | apache-2.0 |
You can pass in a list of files or URLs: | p = welly.read_las(['../../tests/assets/P-129_out.LAS',
'https://geocomp.s3.amazonaws.com/data/P-130.LAS',
'https://geocomp.s3.amazonaws.com/data/R-39.las',
]) | docs/_userguide/Projects.ipynb | agile-geoscience/welly | apache-2.0 |
This project has three wells: | p | docs/_userguide/Projects.ipynb | agile-geoscience/welly | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.