Change log history
pymicro version 0.4.0
- updated version number to 0.4.0 (Henry Proudhon)
- added license file (Henry Proudhon)
- prefer the use of is instead of == testing for None (Henry Proudhon)
- adjust assertion after updating Al cif file (Henry Proudhon)
- new fil_utils tests (Henry Proudhon)
- added memory mapping option to HST_read function (Henry Proudhon)
- use the proper fcc Ni cif file (Henry Proudhon)
- added Ga and Mn cif files (Henry Proudhon)
- cleaening up cif files and minor tweaks (Henry Proudhon)
- added lattice arg to angle_between_directions to prevent forcing it to cubic (Henry Proudhon)
- added new test for angle between two hkl directions (Henry Proudhon)
- reformated all code with a consisten style (Henry Proudhon)
- doc changes to reflect new file organisation (Henry Proudhon)
- moving a bunch of file for a better organisation, created external folder (Henry Proudhon)
- cleaning old stuff, moving tifffile out (Henry Proudhon)
- new edge_actor method and updated show_boundaries (Henry Proudhon)
- hist now plot in a new figure (Henry Proudhon)
- updated xray_trans function, added table for densities (Henry Proudhon)
- moved all mass attenuation coefficients to the data folder (Henry Proudhon)
- fixed all docstrings (Henry Proudhon)
- fixed bug in compute_ellipsis method (Henry Proudhon)
- fixed dupplicate link for packages and added xray package (Henry Proudhon)
- added a4 paper option (Henry Proudhon)
- new example laue_ellipse (Henry Proudhon)
- more fixes to the compute_ellpisis method (Henry Proudhon)
- new test for select_lambda method (Henry Proudhon)
- added docstring + bugfix in compute_ellpisis (Henry Proudhon)
- fix small typo with the data_type variable (Henry Proudhon)
- make full use of the detector variable in compute_ellpisis (Henry Proudhon)
- modified detector classes, added new class PerkinElmer1620 (Henry Proudhon)
- added initial code for Laue diffraction calculation and one first unit test (Henry Proudhon)
- added a vtkCleanPolyData step for the show_boundaries method (Henry Proudhon)
- added docstring for function show_boundaries (Henry Proudhon)
- updated changelog (Henry Proudhon)
pymicro version 0.3.3
- updated version number (Henry Proudhon)
- added new example for misorientation (Henry Proudhon)
- corrested a few typos (Henry Proudhon)
- corrected a few small bugs (Henry Proudhon)
- new orientations types and misorientation code (Henry Proudhon)
- added symmetry operator for cubic structure (Henry Proudhon)
- new tests for misorientation caculations (Henry Proudhon)
- make scene3d more simple to use with better defaults (Henry Proudhon)
- initial support for volume rendering (Henry Proudhon)
- working on ImageViewer (Henry Proudhon)
- new xray absorption data (Henry Proudhon)
- updated import_modules.py with new functions (Henry Proudhon)
- new legend format option in plot_xray_trans (Henry Proudhon)
- new absorption data (Henry Proudhon)
- added color option for atoms and bond in lattice_3d (Henry Proudhon)
- fixed version pb with np.savetxt (Henry Proudhon)
- small fix with psi_values (Henry Proudhon)
- modified ImageViewer to work with Qt (Henry Proudhon)
- improved detector code, both for Mar and Xpad (Henry Proudhon)
- fixed fwhm for Voigt function (Henry Proudhon)
- removed broken method get_octaedral_slip_systems (Henry Proudhon)
- added new sagital_regroup method (Henry Proudhon)
- fix data folder (Henry Proudhon)
- a first example for finite elements (Henry Proudhon)
- __init__ file for fe package and texture rst file (Henry Proudhon)
- initial commit of the finite element part of pymicro (Henry Proudhon)
- fix typo, remove print output (Henry Proudhon)
- small fix in xray_utils (Henry Proudhon)
- new method angle_with_direction (Henry Proudhon)
- add check for nbParams in init (Henry Proudhon)
- added lambda to keV conversion functions (Henry Proudhon)
- added installation section (Henry Proudhon)
- new example with skimage and radon (Henry Proudhon)
- docstrings for contourFilter (Henry Proudhon)
- fix orientation_tensor stuff for Taylor calculation (Henry Proudhon)
- fix orientation_tensor stuff for Taylor calculation (Henry Proudhon)
- added contour plot for pole figures and a demonstrating example (Henry Proudhon)
- added more slip planes families and slip systems families, updated testing (Henry Proudhon)
- fixed typo in dct_omega_angles (Henry Proudhon)
- moved dc_omega_angles to the Orientation class (Henry Proudhon)
- fixed colors when plotting ipf (Henry Proudhon)
- new options to dsplay mesh edges in show_mesh (Henry Proudhon)
- cleanup: moved the testing code of TaylorModel to external files (Henry Proudhon)
- fixed a missing Update which caused the actor not to be displayed (Henry Proudhon)
- new Taylor model class (experimental) (Henry Proudhon)
- updated xray data files for Cu and Al (Henry Proudhon)
- new method to compute a slip system orientation strain and rotation tensors (Henry Proudhon)
- added change log history to the documentation (Henry Proudhon)
pymicro version 0.3.2
- updated version number (Henry Proudhon)
- docstring changes (Henry Proudhon)
- a few tweaks in dct_projection (Henry Proudhon)
- changed numpy in np and added a new method circle_line_3d (Henry Proudhon)
- update flat field code for xpad (Henry Proudhon)
- improved xpad code to hangle multiple images in raw or nxs, added flat field correction (Henry Proudhon)
- fixed minus sign in dct_omega_angles (Henry Proudhon)
- one more fix to the elevationFilter (Henry Proudhon)
- changed the way the elevation axis is handled (Henry Proudhon)
- fixed broken docstring in elevationFilter (Henry Proudhon)
- added the possibility to use any axis in the elevationFilter (Henry Proudhon)
- added new example with segmented crack (Henry Proudhon)
- add grain objects to View (Henry Proudhon)
- new find_planes_in_zone method (Henry Proudhon)
- fixed bug in lambda_nm_to_keV and lambda_angstrom_to_keV (Henry Proudhon)
- updated documentation (Henry Proudhon)
- recompiled some figures (Henry Proudhon)
- new test apply_orientation_to_actor (Henry Proudhon)
- added skimage dependency (Henry Proudhon)
- fixed vtk version problem for function volren (Henry Proudhon)
- fixed vtk version problem for function volren (Henry Proudhon)
- small fix with f.tell() (Henry Proudhon)
- fix int conversion for numpy version (Henry Proudhon)
- imporved View app and added it to the list of imported modules (Henry Proudhon)
- modified dct_projection to use radon from skimage (Henry Proudhon)
- new methods for rotating crystals and topotomography alignment with tests (Henry Proudhon)
- new method to compute the scattering vector (Henry Proudhon)
- corrected type in docstring (Henry Proudhon)
- changed copyright year (Henry Proudhon)
- missing file from previous commit (Henry Proudhon)
- increased a bit the resolution for 2 examples (Henry Proudhon)
- added example for volume rendering (Henry Proudhon)
- added change log history to the documentation (Henry Proudhon)
pymicro version 0.3.1
- updated version number (Henry Proudhon)
- added new example for misorientation (Henry Proudhon)
- corrested a few typos (Henry Proudhon)
- corrected a few small bugs (Henry Proudhon)
- new orientations types and misorientation code (Henry Proudhon)
- added symmetry operator for cubic structure (Henry Proudhon)
- new tests for misorientation caculations (Henry Proudhon)
- make scene3d more simple to use with better defaults (Henry Proudhon)
- initial support for volume rendering (Henry Proudhon)
- working on ImageViewer (Henry Proudhon)
- new xray absorption data (Henry Proudhon)
- updated import_modules.py with new functions (Henry Proudhon)
- new legend format option in plot_xray_trans (Henry Proudhon)
- new absorption data (Henry Proudhon)
- added color option for atoms and bond in lattice_3d (Henry Proudhon)
- fixed version pb with np.savetxt (Henry Proudhon)
- small fix with psi_values (Henry Proudhon)
- modified ImageViewer to work with Qt (Henry Proudhon)
- improved detector code, both for Mar and Xpad (Henry Proudhon)
- fixed fwhm for Voigt function (Henry Proudhon)
- removed broken method get_octaedral_slip_systems (Henry Proudhon)
- added new sagital_regroup method (Henry Proudhon)
- fix data folder (Henry Proudhon)
- a first example for finite elements (Henry Proudhon)
- __init__ file for fe package and texture rst file (Henry Proudhon)
- initial commit of the finite element part of pymicro (Henry Proudhon)
- fix typo, remove print output (Henry Proudhon)
- small fix in xray_utils (Henry Proudhon)
- new method angle_with_direction (Henry Proudhon)
- add check for nbParams in init (Henry Proudhon)
- added lambda to keV conversion functions (Henry Proudhon)
- added installation section (Henry Proudhon)
- new example with skimage and radon (Henry Proudhon)
- docstrings for contourFilter (Henry Proudhon)
- fix orientation_tensor stuff for Taylor calculation (Henry Proudhon)
- fix orientation_tensor stuff for Taylor calculation (Henry Proudhon)
- added contour plot for pole figures and a demonstrating example (Henry Proudhon)
- added more slip planes families and slip systems families, updated testing (Henry Proudhon)
- fixed typo in dct_omega_angles (Henry Proudhon)
- moved dc_omega_angles to the Orientation class (Henry Proudhon)
- fixed colors when plotting ipf (Henry Proudhon)
- new options to dsplay mesh edges in show_mesh (Henry Proudhon)
- cleanup: moved the testing code of TaylorModel to external files (Henry Proudhon)
- fixed a missing Update which caused the actor not to be displayed (Henry Proudhon)
- new Taylor model class (experimental) (Henry Proudhon)
- updated xray data files for Cu and Al (Henry Proudhon)
- new method to compute a slip system orientation strain and rotation tensors (Henry Proudhon)
- added change log history to the documentation (Henry Proudhon)
pymicro version 0.3.0
- 32120a1 changed version number to 0.3.0 (Henry Proudhon)
- debfbb8 updated pole figure example (Henry Proudhon)
- 0cdd294 fixed colormap issue when using map_field option (Henry Proudhon)
- 7323228 changes in examples to account for previous commits (Henry Proudhon)
- 4a51061 small bounding box fix in the map_data_with_clip method (Henry Proudhon)
- 3b72591 significant changes to handle field map with pole figures (Henry Proudhon)
- 267ca37 new OrientationTests class (Henry Proudhon)
- 667fcaf new test_from_symbol test method (Henry Proudhon)
- f94eb22 very small docstring changes (Henry Proudhon)
- 61e311e show_data has been split in show_array and show_mesh (Henry Proudhon)
- b46f7e4 corrected typo (Henry Proudhon)
- 9a43e04 final docstring changes to the texture module (Henry Proudhon)
- cbbe2ae new example to demonstrate field coloring in pole figures (Henry Proudhon)
- 5d090fe a little more explanations (Henry Proudhon)
- 2a4e4d2 more docstring fixes in texture.py (Henry Proudhon)
- acdaa6e change part of the title for inverse pole figure from family to axis (Henry Proudhon)
- 64cca29 more docstring formatting (Henry Proudhon)
- 5c13e80 updated some docs with Info field lists (Henry Proudhon)
- 667b8f2 Merge branch ‘master’ of vcs:pymicro (Nicolas Gueninchault)
- 3f705d9 new methods Calculate_Omega_dct, calc_poles_id11, Sam2Lab, Lab2sam, Sam2Sam (Nicolas Gueninchault)
- a161f58 new methods plot_ipf_density, Eul2Mat, Write_inp_crystals (Nicolas Gueninchault)
- cdba718 improved docstrings in apply_orientation_to_actor (Henry Proudhon)
- fc530aa changed the way the rotation is applied in apply_orientation_to_actor (Henry Proudhon)
- 5c15dda cleaned grain_hkl_anim_3d.py (Henry Proudhon)
- 6d8f9e0 added options in unit_arrow_3d to display text in 3d aside the arrow (Henry Proudhon)
- e119dfe more file for X-ray attenuation coefficients (Henry Proudhon)
- 24f2700 new code for X-ray detectors with two examples (Henry Proudhon)
- cc88b87 added extension option in load_STL_actor function (Henry Proudhon)
- 8dd35e4 add opacity in alpha_cmap (Henry Proudhon)
- 6edfd6e small fix with iren.AddObserver (Henry Proudhon)
- 8f5b9e5 improved handling of Voigt function (Henry Proudhon)
- ffdaa04 updated example to use the new animation framework (Henry Proudhon)
- 9fd27d4 add new plot_pf_hot function (Henry Proudhon)
- 96bacb8 added x1x2x3 rotation type when importing orientations from z-set (Henry Proudhon)
- a141131 small fix to read image with HST_read (Henry Proudhon)
- 99f276c updated version (Henry Proudhon)
- 692f89a new dct_projection function and various small fixes (Henry Proudhon)
- a987c56 improved anim framework (Henry Proudhon)
- 31106b5 added new hkl families (Henry Proudhon)
- b1623aa new set_opacity for assembly and more parameters in unit_arrow_3d (Henry Proudhon)
- dcf3810 improved plot_xray_trans function (Henry Proudhon)
pymicro version 0.2.3
- c5d5ebb small typo (Henry Proudhon)
- eb77e84 new color_bar function and new colormaps (Henry Proudhon)
- 7c61f57 added class for the Voigt fitting function (Henry Proudhon)
- c0f082d new recipe to explein how 3d images are structured and should be read (Henry Proudhon)
- 22b710d new class to allow pyplot showing the pixel value and associated example (Henry Proudhon)
- a3ffd0e small fix to the Gold pole figure example (Henry Proudhon)
- 4a6984c testing the Orientation class, merged Schmid factor utilities from Nfun into the Orientation class (Henry Proudhon)
- 6e0e2e1 fidling with no longer supported matplotlib wx backend (Henry Proudhon)
- 271bbd8 new recipe to explain plotting, reading, writting 2d images with pyplot (Henry Proudhon)
- 46591a3 fix always plot sst in plot_pole_figures (Henry Proudhon)
- 31e27a6 added missing files to the tree (Henry Proudhon)
- 424d22b added a picture for fitting functions (Henry Proudhon)
- fdde04a changed doc accordingly to build the new math module (Henry Proudhon)
pymicro version 0.2.2
- cec8566 changed version number to 0.2.2 (Henry Proudhon)
- 34f0601 allow to use a custom fit function in the fitting module (Henry Proudhon)
- 02c1cf9 added a general use fit method (Henry Proudhon)
- 28fd8d3 added a new example to demonstrate fitting (Henry Proudhon)
- af6c1ad new math package with fitting functions (Henry Proudhon)
- 7b442f7 added a Makefile to run all example at once (Henry Proudhon)
- 944cb9f modified all examples to use the new scene3d stuff (Henry Proudhon)
- c40a540 new file to configure ipython and updated documentation (Henry Proudhon)
- a4fc7f5 docstrings updates (Henry Proudhon)
- b48f7c5 changed from angstrom to nanometer when loading from CIF (Henry Proudhon)
- dc7eacd added a new way to create crystal lattice via CIF files (Henry Proudhon)
- 28709df further improvements with Scene3d (Henry Proudhon)
- 5cc5bbc minor changes after last commit (Henry Proudhon)
- 8e8a353 adapted cubic_crystal example to new scene3d code (Henry Proudhon)
- 05cd497 new code to simplify building a 3d scene (Henry Proudhon)
- 3af0c66 improved axes_actor (Henry Proudhon)
- 1771ee7 corrected small bug in HST_read parameters (Henry Proudhon)
- caf7955 new method to generate a microstructure with a random texture (Henry Proudhon)
- b9be508 added new elevationFilter (Henry Proudhon)
- 04a4aa9 added num_color parameter to show_grains (Henry Proudhon)
- df2b20d new xray package with a first example (Henry Proudhon)
- 215f1bf corrected small bug with cut option in auto_min_max (Henry Proudhon)
- b5b0c7d new method for inverting a vtk lookup table (Henry Proudhon)
- d6d4bce added new vtk stuff for displaying a pin hole and a Fresnel zone plate (Henry Proudhon)
- 71b7d4d method to show xray arrow and fix to the slits (Henry Proudhon)
- 4fa08d4 new method read_euler_txt (Henry Proudhon)
- f3402b2 new method to display X-ray slits (Henry Proudhon)
- a757cda new method to import a list of orientation from a text file and 2 new pole figure examples with 10000 orientations (Henry Proudhon)
- cbe74e9 changed default ipf color to black, removed unecessary output (Henry Proudhon)
- 7b420f4 small docstring fixes (Henry Proudhon)
- fb5ae80 Worked on adding the possibility of plot direct and inverse PF not in reference to Z (Nicolas GUENINCHAULT)
- 836f143 updated my_fun.py, adding a function to plot crystal rotations into ipf, sst ,... (Nicolas GUENINCHAULT)
- 8e10d45 adding my_fun file containing simple functions using pymicro. For now my_fun contain one class ‘Nfun’ with two functions dedicated to compute Schmid factors (Nicolas GUENINCHAULT)
- 34d6516 some bugs get fixed ... (Nicolas GUENINCHAULT)
- 1d40e45 test (Nicolas GUENINCHAULT)
- cfa3dde Corrected x1, x2, x3 instead of x1, x1, x1 (Erembert Nizery)
- 076c91f Merge branch ‘master’ of vcs:pymicro (Erembert Nizery)
- 5da5d5e added normalized vectors to compute B. (thank you Erembert ;-) ) (Nicolas GUENINCHAULT)
- 861aef1 Merge branch ‘master’ of vcs:pymicro (Erembert Nizery)
- 2d09cd9 Merge branch ‘master’ of vcs:pymicro (Erembert Nizery)
- 9d117f3 Merge branch ‘master’ of vcs:pymicro (Nicolas GUENINCHAULT)
- 83209f3 added the possibility of computiong the orientation matric from rotation like in a .inp file from Zebulon : Zrot2OrientationMatrix (Nicolas GUENINCHAULT)
- 0004dc5 updated pole figure doc example (Henry Proudhon)
- fb8b165 pole figures can now be plotted with respect to X, Y or Z direction (Henry Proudhon)
- 1d2679a Merge branch ‘master’ of vcs:pymicro (Henry Proudhon)
- 9574b8d lots of update to handle upgrade to centos7 with backward compatibility with centos5 (Henry Proudhon)
- de17c9d added new example with map_data_with_clip (Henry Proudhon)
- 96b5538 added new test for vtk numpy array (Henry Proudhon)
- 329321f conf.py now gets the version number in the main __init__.py file (Henry Proudhon)
- 505ebd6 adding modified symetry function in plot_sst (ss_syletry to sst_symetry_cubic) (Nicolas GUENINCHAULT)
- f48dc7a Merge branch ‘master’ of vcs:pymicro (Henry Proudhon)
- 7b94c4d updated docstrings for dct_omega_angles (Henry Proudhon)
- dd5dd78 added reciprocal lattice calcultion (Henry Proudhon)
- e9b1daa Bug corrected (function sst_symmetry_cubic called instead of sst_symmetry) (Erembert Nizery)
- 2ddb457 Merge branch ‘master’ of vcs:pymicro (Henry Proudhon)
- 58cc9ee new example to display a polycrystal in 3d (Henry Proudhon)
- 72404c9 new load_STL_actor and show_data methods (Henry Proudhon)
- 7bce0fb removed .pyc test files from tree (Henry Proudhon)
- 067e52b moved tests for HklPlane in single file (Henry Proudhon)
- adc3ccd First version of fastcrystal.py (Erembert Nizery)
- be2673a Plotting two points for directions lying in plane. (Erembert Nizery)
- c1be990 Reduced IPF set as default in plot_pole_figures. (Erembert Nizery)
- 607bd2c sst_symmetry_cubic corrected (used for IPF plot) (Erembert Nizery)
- 24563a0 No change - only test. (Erembert Nizery)
- af9999e Merge branch ‘master’ of vcs:pymicro (Nicolas GUENINCHAULT)
- 8754ac0 just a test (Nicolas GUENINCHAULT)
- e0ed245 fix HST_read while using autoparse_filename option (Henry Proudhon)
- acc05b2 added non single atom basis for unit cells (Henry Proudhon)
- f1743ca new hcp crystal example (Henry Proudhon)
- dca3079 fix show_grains not showing grain 1 (Henry Proudhon)
- db72a68 fix print statement in edf_read (Henry Proudhon)
- 131cc1d fix version number for tagging (Henry Proudhon)
- ef62d20 fix version number for tagging (Henry Proudhon)
- 17cf50e added all the possible lattice centering and subsequent fixes in docs and examples (Henry Proudhon)
- 0a9ba28 moved wxPlotPanel.py to apps sub-package (Henry Proudhon)
- f710e6c added new static method to easily plot a pole figure for a single orientation, docstring fixes (Henry Proudhon)
- 92a2002 added new method map_data, new options to map_data_with_clip, fixed many docstrings (Henry Proudhon)
- 937993c added math to Orientation docstring (Henry Proudhon)
- 19dc758 moved wxPlotPanel.py to apps package (Henry Proudhon)
- 042faf4 fixed note directives in doctrings (Henry Proudhon)
- b427466 fixed vtk.util mock (Henry Proudhon)
- 5c13de4 small doctring fixes and variable renaming (Henry Proudhon)
- 272498d fixed import * for vtk colors (Henry Proudhon)
- 15b8466 several fixes to edf_write, now handle SignedInteger encoding (Henry Proudhon)
- 94bb046 new method to compute euler angle as in MandelCrystal (Henry Proudhon)
- 819bf56 added more matplotlib mocks (Henry Proudhon)
- 76c1543 added more mocks (Henry Proudhon)
- ba09f84 removed unecessary toctree maxdepth option (Henry Proudhon)
- 9264ef0 many docstrings fixes and new function plot_sst (Henry Proudhon)
- 825052f many docstrings fixes (Henry Proudhon)
- ab42227 modified __init__ files (Henry Proudhon)
- 71cc94d new figure AlLi_sam8_pole_figure for documentation (Henry Proudhon)
- 3a902f8 small fix in new option autoparse_filename (Henry Proudhon)
- 8807aa4 added cookbook with first recipe (Henry Proudhon)
- d9de338 mock tifffile to build doc (Henry Proudhon)
- c428b7b subsequent modifications in edf_read and edf_write (Henry Proudhon)
- 84f1687 fixed Size field in edf header (Henry Proudhon)
- 4dc6d2e now using mock module to help build documentation (Henry Proudhon)
- f4bf3e9 trying to fix sphinx path on remote server (Henry Proudhon)
- 36a4eb8 trying to fix sphinx path on remote server (Henry Proudhon)
- 83d081b removed unused jsMath and MathJax from tree (Henry Proudhon)
- 05eed8f trying to fix sphinx path on remote server (Henry Proudhon)
- 3ea96dd trying to fix sphinx path on remote server (Henry Proudhon)
- 0e25b9a modified files not to depend on matplotlib (Henry Proudhon)
- 293f4c6 added thumb images files for example gallery (Henry Proudhon)
- 8d022c8 added schmid factor calculations (for octaedral slip) (Henry Proudhon)
- e080880 change number of bytes to 512 to peek in header in edf_info (Henry Proudhon)
- 18e7bd5 do not include auto_example in the tree (Henry Proudhon)
- fd4f935 file changes for the automated gallery of example (Henry Proudhon)
- 38ea32b added an automated gallery of example (Henry Proudhon)
- 0c0b002 added max_opacity option in vtkSetVisibility animation (Henry Proudhon)
- dc540a9 new function show_grains (Henry Proudhon)
- e756429 fixes path to example files (Henry Proudhon)
- 84b9f42 small fixes to cubic_crystal_3d example (Henry Proudhon)
- 94259eb very small fix to lattice_3d_with_planes function for opacity (Henry Proudhon)
- 2802f36 make current image name readonly (StaticText) (Henry Proudhon)
- fd7e133 added docstrings for edf_info and unpack_header (Henry Proudhon)
- c1a6757 new functions edf_info and esrf_to_numpy_datatype (Henry Proudhon)
- bd7cbd7 fixed doctstring for alpha_cmap (Henry Proudhon)
- d79ebd4 moved example files (Henry Proudhon)
- 125f6bf updated documentation with examples (Henry Proudhon)
- 6e79251 added flat field correction function (Henry Proudhon)
- 7dbd525 more __init__ stuff (Henry Proudhon)
- c1c1557 now load tif files as well (Henry Proudhon)
- ff80f6e added recad util functions (Henry Proudhon)
- 9afc721 documented some functions likre vtk_write (Henry Proudhon)
- 8a0c100 small fix to the raw_mar_read function (Henry Proudhon)
- 057911c added/fixed docstrings (Henry Proudhon)
- 3e592b2 moved all examples to different subfolders (Henry Proudhon)
- a4d68a1 new application to view image files in a folder (Henry Proudhon)
- dbfa470 small change on how to get the image dim from the header in edf_read (Henry Proudhon)
- 8f161ae added mousse_3d example (Henry Proudhon)
- 7b23d95 bug fix in bragg calculation and minor docstring changes (Henry Proudhon)
- 6b9ead1 added more families in HklPlane get_family method (Henry Proudhon)
- dba603f fixed docstrings in the microstructure module (Henry Proudhon)
- 6910930 added bragg_angle method with unit testing (Henry Proudhon)
- 85d07ca added image for hist function (Henry Proudhon)
- 9469a33 small docstrings changes (Henry Proudhon)
- 8f5499c added new method dct_omega_angles to the Grain class (Henry Proudhon)
- 80ab017 small docstrings changes (Henry Proudhon)
- 7f30e18 changed origin to lower in show_and_save function (Henry Proudhon)
- 0e2d8f1 added save option in render function and fixed the documentation (Henry Proudhon)
- 7706ffa a few more documentation fixes (Henry Proudhon)
- 5fa810f fixed the documentation of the hist function (Henry Proudhon)
- b9696d9 added examples folder and some documentation of these examples (Henry Proudhon)
- 2204068 added new method show_and_save for a 2d image (Henry Proudhon)
- fd873c9 improve documentation in vtk_utils (Henry Proudhon)
- 2bf1e91 added new vtk function map_data_with_clip (Henry Proudhon)
- 64f3871 improved documentation for color maps (Henry Proudhon)
- a2b90e2 added test for tif file (Henry Proudhon)
- c4d6dce added tifffile module (Henry Proudhon)
- 945257e improved documentation for vtk_utils (Henry Proudhon)
- 63465a0 improved the documentation with sphinx (Henry Proudhon)
- 9e8a10e added pymicro logo (Henry Proudhon)
- 2dd3e8b added Dependencies section to the documentation (Henry Proudhon)
- 5f437ac switched to shpinx theme proBlue (Henry Proudhon)
- 46d3ceb updated documentation (Henry Proudhon)
- 2d9cb0b remove old rst files from the crystal package (Henry Proudhon)
- b9c398b updated documentation (Henry Proudhon)
- 7b9ddef new method grain_3d with subsequent changes (Henry Proudhon)
- bbedd5e added verbose mode to hkl plane normal method (Henry Proudhon)
- 2fa7585 added modules in sphinx, updated documentation (Henry Proudhon)
- 5fd4612 deleted old unmaintained stuff (Henry Proudhon)
- 0a54b50 changed numpy import (Henry Proudhon)
- 1396e7a added new classes to handle animations through a 3d scene (Henry Proudhon)
- 3caf836 added support for hkl planes in hexagonal lattices (Henry Proudhon)
- fec27d8 fixed a small issue with dot product for python2.6 at esrf (Henry Proudhon)
- 4c48986 added opacity control in add_plane_to_grid function (Henry Proudhon)
- 69fb39c bug correction in HklPlane normal (Henry Proudhon)
- b66f374 removed printed output (Henry Proudhon)
- 8f3cbb8 several corrections + added hexagonal 3d lattice handling (Henry Proudhon)
- 3899715 remove old diffract.py file (Henry Proudhon)
- af2c658 remove old grains.py file (Henry Proudhon)
- 7747c77 remove old grain_conn.py file (Henry Proudhon)
- e474f65 remove old chg_label.py file (Henry Proudhon)
- 78e094b remove old grain_53.py file (Henry Proudhon)
- 539c61b remove old animp.py file (Henry Proudhon)
- 8ec9806 added a grain_ids filter to load a microstructure from an XML file (Henry Proudhon)
- fd20143 added .gitignore file (Henry Proudhon)
- cc51795 new file to handle animation (rotation around Z axis for now) (Henry Proudhon)
- 1ac249b added new add_grain_to_3d_scene method (Henry Proudhon)
- fcab593 added new method: lattice_3d_with_planes (Henry Proudhon)
- 56858bc bug correction in slip plane rotation (Henry Proudhon)
- 370a5cd added a way to control which planes are used in add_HklPlanes_with_orientation_in_grain (Henry Proudhon)
- 5798f2d added a box_3d method (Henry Proudhon)
- 9a98c38 improve consistency in file names when saving microstructure in xml format (Henry Proudhon)
- 54c0693 added verbose mode to add_vtk_mesh in class Grain (Henry Proudhon)
- c9c5758 small corrections like phi1 in phi1() (Henry Proudhon)
- 4d995ed added scaling possibility to unit_arrow_3d (Henry Proudhon)
- 622e39d removed shpinx doc build from tree (Henry Proudhon)
- 50d2923 removed .pyc files rom tree (Henry Proudhon)
- 5cfdc17 started to remove .pyc files (Henry Proudhon)
- 25629f0 small changes in pole figure legend handling (Henry Proudhon)
- d683db9 small update of slip_traces doc (Henry Proudhon)
- 2f6ae4e added slip_traces methods for HklPlane class (Henry Proudhon)
- b905bed added interplanar_spacing calculation for HklPlane class (Henry Proudhon)
- 15f28fc remove attribute normal from the HklPlane class (a method exists) (Henry Proudhon)
- f90f19c added lattice attribute to the HklPlane class (Henry Proudhon)
- 5c64e60 corrected a small bug in get_family (Henry Proudhon)
- 245211d added doc to the get_family method (Henry Proudhon)
- 0fe48e5 added a static get_family method to the HklPlane class (Henry Proudhon)
- 4da82b5 changed default clipping range in setup_camera (Henry Proudhon)
- 6bfc2b5 added verbose option to read_image_data, changed setupCamera name to setup_camera (Henry Proudhon)
- 0ed75d4 fix header in edf_write according to data type (Henry Proudhon)
- e5f61e8 added alpha_cmap method (Henry Proudhon)
- 666ed65 added a method to automatically setup the vtk camera (Henry Proudhon)
- 9cc44b5 fixed issue with .info file in HST_write (Henry Proudhon)
- 5732820 added VTK_UNSIGNED_INT to uint32 equivalence (Henry Proudhon)
- b6aa3e6 added density option in grey level histogram plotting (Henry Proudhon)
- ed6ad97 corrected prefix variable in grey level histogram plotting (Henry Proudhon)
- d4e321d added new grey level histogram plotting (Henry Proudhon)
- 6fc4d64 add variable header in read_image_data (Henry Proudhon)
- a5c51f7 fixed orientation issue in add_hklplane_to_grain (Henry Proudhon)
- d873f01 added float and double conversion from numpy to vtk (Henry Proudhon)
- b266ec4 merged contourByDiscreteMarchingCubes intour contour filter (Henry Proudhon)
- d6c6735 removed crystal/microstructure.pyc (Henry Proudhon)
- 9b985d3 added contour filter method (Henry Proudhon)
- fdbb00b corrected bug in OrientationMatrix2Euler when Phi=0 (Henry Proudhon)
- 230f395 changed from PyMicro to pymicro (Henry Proudhon)
- 3a7e3bf Show only one point per grain in legend in direct pole figures (Henry Proudhon)
- a733719 added custom legend for direct pole figure (Henry Proudhon)
- d42c915 updated apply_orientation_to_actor for new Orientation class syntax, added custom color for unit_arrow_3d (Henry Proudhon)
- 364d72b added euler angle corrections from orientation matrix (Henry Proudhon)
- d2e754d improved pole figures (Henry Proudhon)
- e23c32b added project documentation through sphinx (Henry Proudhon)
pymicro version 0.1.0
- ce0ce0b changed from white color to (1,1,1) (Henry Proudhon)
- 008a44c cleaned up crystal_lattice_3d (Henry Proudhon)
- a12ee2f documentation small correction (Henry Proudhon)
- 0cadf68 documentation small corrections (Henry Proudhon)
- d86433a added several helper vtk functions (read, outline, render, contour) (Henry Proudhon)
- b028bd2 added add_outline method in vtk_utils (Henry Proudhon)
- 9dac6e3 update happy new year (Henry Proudhon)
- d8eb5f3 initial project version (Henry Proudhon)


THE ENGLISH PATIENT A film review by Bryant Frazer Copyright 1996 Bryant Frazer
THE ENGLISH PATIENT opens with one of the film's many touchstone images -- somebody is touching brush to paper, drawing seemingly inscrutable lines with some precision. We wonder whether this is some unfamiliar language, but as the credits progress, the image takes on the shape of a human figure, swimming. The image, we will later learn, has been copied from the ancient paintings on the wall of a desert cave.
The cave of swimmers, as it is known, is discovered by a geographic expedition engaged in mapping out the Sahara Desert for the British government. The next day, those explorers will be taking refuge against a huge windstorm that fills the air with sand. Two lovers-to-be are holed up in a truck that strains against the ferocious clamor outside. One of them, inspired by the danger, begins to tell the other stories about the wind -- the Aajej, the Ghibli, and the Simoon, a wind so terrible that a nation declared war on it. The winds are harbingers for these characters, like the waters that sweep a swimming man downstream no matter how he struggles against the current. Nations at war conjure up a ferocious storm, tearing lovers apart and bringing others caroming together at odd angles.
Director Anthony Minghella (TRULY, MADLY, DEEPLY) has freely adapted Michael Ondaatje's Pulitzer Prize-winning novel into a flavorful melange, weaving through time from 1944 Italy to late 1930s Egypt and back again before tracing careful steps tying the two stories together. In the one tale, French-Canadian nurse Hana (Juliette Binoche, radiant as ever) deserts her Red Cross convoy to care for a badly burned man identified only as "English patient" -- he was rescued by Bedouin tribesmen after Nazi gunners shot his plane out of the air over the Sahara. This patient is essentially a corpse waiting to lose consciousness, but he retains some shred of good humor; under interrogation over his nationality, he cracks, "I'm a bit of toast, my friend -- butter me and slip a poached egg on top."
Nationality matters a great deal as World War II winds down, and being revealed as a German would be the worst fate to befall a patient in an Italian hospital circa 1944, even one so badly scarred as this. We soon learn that he's not English at all; he's the Hungarian Count Laszlo de Almasy (Ralph Fiennes), and he was a cartographer in the employ of the British government. It's the tale leading up to that beautifully rendered but ill-fated flight over the Sahara which constitutes the second, arguably more compelling, story of THE ENGLISH PATIENT.
It's an absolute pleasure to follow these characters through the film's 160-minute length. Minghella is a confident director surrounded by expert performers, and he's created a swooning, full-tilt epic of desire, betrayal, war-tattered lives, and landscapes shaped like a woman's body. Navigating a world littered with bombs and mines, these characters nurture passions that will reverberate across borders and echo through time. Chief among these is the wickedly intellectual affair between Almasy and Katherine Clifton (Kristin Scott Thomas), the wife of another member of his expedition.
Meanwhile (at least in terms of screen time), Hana is falling in love, not with her patient, but with Kip (Naveen Andrews) a Sikh bomb disposal expert who enters her life by shooing her away from the monastery's piano -- he fears the Germans have mined it, and he's right. Kip sets up camp nearby, and helps Hana care for her patient. He tries to read Rudyard Kipling aloud to the patient, and the two of them get into an argument over the prose. "Your eye is too impatient," the patient scolds him. "Think about the speed of his pen." Later, Kip will lure Hana to his bedroom with a trail of snail-shell lamps, and will send her on a rope-and-pulleys tour of a frescoed church. Such shamelessly romantic conceits are the stuff that makes this film go, and mostly it just goes beautifully.
Scott Thomas's performance has been singled out for special praise, but in truth they are all remarkable, from Fiennes' handsomely tormented lead to Willem Dafoe's mysterious, thumbless Caravaggio. John Seale's cinematography is mostly stunning, although the sameness of the orange tones gets to be a little much in such a lengthy outing. Film editor Walter Murch (instrumental in the editing and sound design of APOCALYPSE NOW) doubtless deserves special praise for his world-class technique -- Minghella acknowledges that the film's mostly seamless feat of flitting over and over again from setting to setting was largely conceived and achieved in the cutting room.  In the final scenes, as Binoche hitches a ride to Florence on the back of a truck, we cross-cut from a shot of that biplane, once again in the sky over the Sahara, to a shot of Binoche's face, reaching some kind of resolution at last, to a shot of trees on the roadside, filtering and flickering the sunlight as we ride past, and finally to the sun itself, blazing pure white on the cinema screen (the credits roll over this in black). I can't explain exactly what such a sequence means -- but if I could, it wouldn't be pure cinema. It is.
The big-screen tricks Minghella brings to bear on this story aren't exactly high-concept, but they work like a charm -- the biplane flight that opens and closes the film is impossibly romantic and surreal (to ironic effect), Fred Astaire sings "Cheek to Cheek" on the soundtrack (to devastating effect), and a crucial plane crash in the latter reels is almost frighteningly effective -- you feel like the audience at one of the first demonstrations of moving pictures, who reportedly leapt out of their seats with fear as a locomotive apparently bore down upon them. If anything, THE ENGLISH PATIENT has too many ideas and too much portentous symbology for its own good -- a common affliction of movies that try to pack too many signs and metaphors from source novels into their own text. For its flaws, and despite a patch during the third act where it seems to lose its way, THE ENGLISH PATIENT is one bold melodrama. From beginning to end, it's gasping for air and striving for greatness. It never quite reaches that summit, but it's an intoxicating view all the same.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


About this signage
This signage was designed by Gavin Elliott for the Newcastle product development unit.
Printing guidance
This signage looks best printed and used as die-cut printing and fitting.
Download file bundle{% extends "layout.html" %} {% block page_title %} DWP Design Repository {% endblock %} {% block content %}
This signage was designed by Gavin Elliott for the Newcastle product development unit.
This signage looks best printed and used as die-cut printing and fitting.
Download file bundle


{% extends 'base-static.html' %} {% load static %} {% block content %}
By signing up you agree to DineLine's Terms and Conditions and Privacy Policy.
Already have an account? Sign In.
Don't feel like signing up yet? Exit.


Source code for admit.util.VLSR
#! /usr/bin/env python
#! /usr/bin/env casarun
"""
**VLSR** --- Simple VLSR catalog and calculator.
------------------------------------------------
This module defines the VLSR class.
"""
import sys, os
import numpy as np
from admit.util.AdmitLogging import AdmitLogging as logging
try:
import utils
have_ADMIT = True
except:
have_ADMIT = False
try:
from astroquery.simbad import Simbad
have_SB = True
except:
have_SB = False
try:
from astroquery.ned import Ned
have_NED = True
except:
have_NED = False
[docs]class VLSR(object):
"""
Simple VLSR catalog and calculator.
Possible extensions:
- merge in multiple tables, now hardcoded to a single
table in $ADMIT/etc/vlsr.tab
- allow astroquery from NED and/or SIMBAD
(this may need to run in pure-python, outside of ADMIT/CASA)
- name matching is now done in upper case by default
Attributes
----------
None
"""
def __init__(self, upper=True):
self.version = "27-apr-2016"
if have_ADMIT:
self.table = utils.admit_root() + "/etc/vlsr.tab"
self.cat = read_vlsr(self.table,upper)
logging.debug("VLSR: %s, found %d entries" % (self.table,len(self.cat)))
else:
logging.warning("VLSR: Warning, no ADMIT, empty catalogue")
self.cat = {}
[docs] def vlsr(self, name, upper=True):
""" return VLSR from requested object
name matching is done in upper case by default
If no match is found, 0.0 is returned.
"""
# print "VLSR debug",name,self.cat
if len(name) == 0: return 0.0
src = name.upper()
quote1 = "'"
quote2 = '"'
if src[0] == quote1:
src = src.strip(quote1)
if src[0] == quote2:
src = src.strip(quote2)
if self.cat.has_key(src):
return self.cat[src]
else:
return 0.0
[docs] def vlsr2(self, name):
""" experimental Simbad/NED
"""
if have_SB:
print "Trying SIMBAD..."
try:
t1 = Simbad.query_object(name)
print t1.colnames
print t1
except:
pass
else:
print "No SIMBAD"
if have_NED:
print "Trying NED..."
try:
t2 = Ned.query_object(name)
print t2.colnames
print t2
print 'VLSR=',t2['Velocity'].item()
except:
pass
else:
print "No NED"
[docs] def try_SB(self,name):
return 0.0
[docs] def try_NED(self,name):
return 0.0
[docs]def read_vlsr(filename, upper=True):
""" read the ADMIT vlsr.cat table
This table is peculiar in allowing spaces in source names,
but then requires the name to be single (or double) quotes.
The source name is stored without these quotes.
The 2nd column is VLSR in km/s
Anything beyond is ignored, so comments are allowed
Also note we are taking the source names "as is", so
it is suggested they are in upper case.
"""
fp = open(filename)
lines = fp.readlines()
#print 'Found %d lines in %s' % (len(lines),filename)
cat = {}
quote1 = "'"
quote2 = '"'
for line in lines:
w = line.split()
if len(w) < 2:
continue
elif line[0] == '#':
continue
elif line[0] == quote1:
loc = line[1:].find(quote1) + 1
if loc==0:
print "VLSR: Skipping bad line",line.strip()," in ",filename
continue
src = line[1:loc] # sourcename without the quotes
if upper:
src = src.upper()
cat[src] = float(line[loc+1:].split()[0])
elif line[0] == quote2:
loc = line[1:].find(quote2) + 1
if loc==0:
print "VLSR: Skipping bad line",line.strip()," in ",filename
continue
src = line[1:loc] # sourcename without the quotes
if upper:
src = src.upper()
cat[src] = float(line[loc+1:].split()[0])
else:
src = w[0]
if upper:
src = src.upper()
cat[src] = float(w[1])
return cat
if __name__ == "__main__":
vq = VLSR()
print vq.vlsr("NGC6503") # should print 25.0
print vq.vlsr("ngc6503") # should print 25.0
print vq.vlsr("foobar") # should print 0.0
print vq.vlsr("L1551 NE") # should print 7.0
print vq.vlsr("'L1551 NE'") # should print 7.0
vq.vlsr2("NGC6503")


Before Change
exp = list(database.experiments.find({"name": "voila_voici"}))
exp = exp[0]
exp_id = exp["_id"]
trials = list(database.trials.find({"experiment": exp_id}))
assert len(trials) == 2
assert trials[0]["status"] == "broken"
// This time we use true `get_execution_environment which pass properly int code to child.
error_code = orion.core.cli.main(
[
"hunt",
"--config",
"./orion_config.yaml",
"--worker-trials",
"2",
"python",
"black_box.py",
"interrupt_trial",
]
+ user_args
)
assert error_code == 130
captured = capsys.readouterr()
assert "Orion is interrupted.\n" in captured.out
assert captured.err == ""
exp = list(database.experiments.find({"name": "voila_voici"}))
exp = exp[0]
exp_id = exp["_id"]
trials = list(database.trials.find({"experiment": exp_id}))
After Change
exp = list(storage.fetch_experiments({"name": "voila_voici"}))
exp = exp[0]
exp_id = exp["_id"]
trials = list(storage.fetch_trials(uid=exp_id))
assert len(trials) == 2
assert trials[0].status == "broken"


I am Muthomi
glad to see you!
I’m a software developer! I can help you build a product , feature or website Look through
some of my work and experience! If you like what you see and have a project you need
coded, don’t
hestiate to contact me.


Thailand
There’s no real restriction regarding what you can wear. Short, skirt, top tank no
problems, local normally wear longuer clothes but you can also see them in short and top
tank (they wear long clothes because they don’t want to tan.. a cultural thing) BUT when
you visit temples you need to cover your knees and shoulder (man and woman) they are a
little bit less strict with tourist, but it is still a requirement. If you don’t want to
walk around all the time in long clothing bring a change of clothes.
Sometime, when you visit temple they can lend you for free sarung or longer clothing but
most of the time you have to pay for them (buy or rent).
Also in Thailand, before entering an habitation or a temple they will ask you to remove
your shoes. If you stay at a more touristy hotel, you will be allowed to keep your
shoes. But if like us you book on AirBnb you will most likely be ask to remove your
shoes and leave them outside.
Singapore
Text in progess :)
Tips:
I use my own sarong (Pareo). I wear for example short with a t-shirt that covers my
shoulder. Once it’s time to visit a temple, I put on the sarong to cover my knees
and make a skirt. OR I wear a long dress and cover my shoulder with the sarong. Most
of the time, I was allowed everywhere with just a long dress even if the top was
top-tank style.
Indonesia


While working for a startup named Wireload, I contributed to the development of YippieMove, an email migration tool used by individuals, corporations, Ivy League universities, and even some Internet service providers.
YippieMove facilitates the easy transfer of an entire email account from one provider to another. Common use cases include:
At YippieMove, we used Python with the Django framework. Client-side styling code was written in LESS and compiled to CSS. JavaScript was used with frameworks such as jQuery to provide the interactivity featured in YippieMove's customer migration management panels.
On the backend, YippieMove is powered by load-balanced gunicorn
instances connected to PostgreSQL databases with some features using MongoDB. Email account authentication was provided by OAuth2.
Migration tasks were managed asynchronously using Celery. Migration servers, "movers", were spun up and down dynamically using CloudSigma as a cloud provider.
Payments were processed initially by Google Checkout (now called Google Wallet), but part of my work was to transition to Stripe.


Welcome to JavaScript!!
Hi, My name is Shubham Tiwari and this is JavaScript Essential Training. get the deep understanding of javascript syntax and learn techniques of building dynamic user interfaces;
Hi, My name is Shubham Tiwari and this is JavaScript Essential Training. get the deep understanding of javascript syntax and learn techniques of building dynamic user interfaces;


Auto-increment versionCode in build.gradle file
Starting from this blog post by Bryan Rosenbaum, here is a gradle task to auto increment versionCode inside your build.gradle file.
Now run gradle incrementVersionCode
and your build.gradle will be automatically updated.
Pubblicato il
November
4th,
2014
by
Andrea Maglie
Condividi!


{% load labels %} {% load humanize %}
|
Project Title: {{project.name}} |
|
Project Internal ID: {{project.id}} |
|
Costing ID: {{project.proj_costing_id}} |
|
Client Name: {{project.client.name}} ({{project.client.department}}) |
|
Internal: {{project.internal}} |
|
Start: {{project.start}} |
|
End: {{project.end}} |
|
FTE: {{project.fte}}% |
|
Status: {{project.get_status_display}} |
|
Service Days: {{project.days}} |
|
Service Rate: {{project.rate}} |
|
FTE Duration (Days): {{project.duration}} |
|
Staff Time Chargable to Service Account: {{project.charged}} |
|
Invoice Received Date: {{project.invoice_received}} |
|
Allocated Percentage: {{project.percentage}}% |
|
Overhead Rate (pro-rata): £{{project.overheads|dp2}} |
|
Initial Salary Band: G{{project.salary_band.grade}}.{{project.salary_band.grade_point}} ({{project.salary_band.year.year}}) |
Description / Notes:
|
Created by: {{project.creator}} |
|
Created Date: {{project.created}} |


Personal Training
Personal trainer is essential for achieving your fitness goals, whether weight loss based, sports driven or for athletics purpose. We can help you with unique requirements like rebuilding the muscles, improving mobility and setting realistic and specific goals.


Preparation time
less than 30 mins
Cooking time
over 2 hours
Serves
Serves 6
For a proper Sunday lunch that won't break the bank try this beef shin stew. Serve with some creamy mash for a mouthwatering meal.
Try the
Eat Well for Less quiz
to find out how you could cut your food bills.
Preheat the oven to 160C/140C Fan/Gas 3.
Heat 2 tablespoons of the oil in a large heavy-bottomed frying pan over a medium heat. Add the onions, carrots, celery and garlic and fry until they start to colour. Transfer to a large lidded casserole dish.
Put the flour on a plate and season with salt and pepper. Coat the beef in the seasoned flour and shake off any excess flour. Turn the heat up to high, then add the remaining oil to the frying pan. Fry the beef, in batches, for 1 minute on each side until browned all over. Add the beef to the casserole dish.
Add a splash of ale to the frying pan and scrape off any cooked on pieces of food, then pour it all into the casserole dish. Pour in the remaining ale, the beef stock and rosemary. Put in the oven and cook for 3-4 hours, or until the meat falls easily from the bone.
Meanwhile, bring a pot of lightly salted water to the boil and add the potatoes. Cook for 15-20 minutes until tender. Drain and return to the pot. Mash until smooth. Mix in the butter and milk. Season to taste with salt and pepper.
Serve the braised shin with the mash.


<glossdef>
The <glossdef> element specifies the definition of one sense of a term. If a term has multiple senses, create a separate <glossentry> topic to define each sense.
<glossentry>
Category: Glossentry elements


My PLStroika
07 Nov 2012I've been using R on a daily basis for more than seven years, and I've been developing R packages over the last three years.
I consider myself an experienced useR and most of my coworkers consider me an R master. However, there are still a lot of things that I don't know about R. To be honest, is not uncommon for me to learn something new about R almost everyday, whether it is a new way to perform some task, or a new trick to do some calculation.
Part of the reason why I'm still learning so much is because of the availability of online resources like github and r-bloggers (just to mention two of them), that are full of rich information that otherwise I wouldn't get access to.
From a developer's standpoint, the exponential growth of Resources to help us create, design, and maintain R packages has been amazing. Compared to three years ago when I launched my first R package in 2009, now I have things like rstudio, roxygen2, devtools, knitr, as well as many blog posts and forums of discussion where other guys share their experiences, frustrations, and solutions to common —and not so common— problems.
At least in my case, this abundance of tools has given me the opportunity to launch new packages in a faster way, and also to work on existing packages that I had temporarily abandoned because of the painstaking job of maintaining them.
Right now I'm in the middle of a redesigning process of my package "plspm"
, and
the website plsmodeling.
Thanks to the resources that I already mentioned, I feel better equipped to perform a
major surgery on my beloved plspm. I know the changes I'm making may affect some
people's work (hopefully not that many). But my only intention is to keep alive my
packages while still providing useful and reliable software. By the way, this is the
other reason why I haven't been posting new stuff in this space. As soon as I'm done with
the PLStroika and everything goes back to normal, I'll come back with more posts.


Gin, Raspberry Syrup, Dry Vermouth, Lemon, Egg White
Gin, Lemon, Lime, Soda, Cream, Egg White, Orange Blossom Water
Gin, Montenegro, Grapefruit, Lime, Honey, Cinnamon
Whiskey, Cold Brew Coffee, White Vermouth, Grains of Paradise Syrup, Grapefuit Chantilly
Tequila, Watermelon Oleo, St germain, Basil, Lemon, Lime, White Ale
Tennessee Whiskey, Fresh Pressed Apples, Caramel, Rooibos, Aquafaba, Lactic Acid
A Cacao Nib Junglebird Riff and a White Mezcal Negroni


Profile
Sales
Inventory
Orders
Deliveries
Inventory
Product
Price
Quantity
Amount
Sample
1.00
2
2.00
Sample
1.00
7
7.00
×
Product Information
Part No
Barcode
Particular
Description
Capital
SRP
Quantity


This document describes how to build and install Open vSwitch on a Red Hat Enterprise Linux (RHEL) host. If you want to install Open vSwitch on a generic Linux host, see [INSTALL.md] instead.
We have tested these instructions with RHEL 5.6 and RHEL 6.0.
You may build from an Open vSwitch distribution tarball or from an Open vSwitch Git tree.
The default RPM build directory (_topdir) has five directories in the top-level: 1. BUILD/ Where the software is unpacked and built. 2. RPMS/ Where the newly created binary package files are written. 3. SOURCES/ Contains the original sources, patches, and icon files. 4. SPECS/ Contains the spec files for each package to be built. 5. SRPMS/ Where the newly created source package files are written.
Before you begin, note the RPM sources directory on your version of RHEL. The command "rpmbuild --showrc" will show the configuration for each of those directories. Alternatively, the command "rpm --eval '%{topdir}'" shows the current configuration for the top level directory and the command "rpm --eval '%{sourcedir}'" does the same for the sources directory. On RHEL 5, the default RPM _topdir is /usr/src/redhat and the default RPM sources directory is /usr/src/redhat/SOURCES. On RHEL 6, the default _topdir is $HOME/rpmbuild and the default RPM sources directory is $HOME/rpmbuild/SOURCES.
Install build prerequisites:
yum install gcc make python-devel openssl-devel kernel-devel graphviz \
kernel-debug-devel autoconf automake rpm-build redhat-rpm-config \
libtool
If you are building from a distribution tarball, skip to step 3. Otherwise, you must be building from an Open vSwitch Git tree. Determine what version of Autoconf is installed (e.g. run "autoconf --version"). If it is not at least version 2.63, then you have two choices:
a. Install Autoconf 2.63 or later, one way or another.
b. Create a distribution tarball on some other machine, by running "./boot.sh; ./configure; make dist" in the Git tree. You must run this on a machine that has the tools listed in [INSTALL.md] as prerequisites for building from a Git tree. Afterward, proceed with the rest of the instructions using the distribution tarball.
Some versions of the RHEL 6 kernel-devel package contain a broken "build" symlink. If you are using such a version, you must fix the problem before continuing.
To find out whether you are affected, run:
cd /lib/modules/<version>
ls -l build/
where <version>
is the version number of the RHEL 6 kernel. (The
trailing slash in the final command is important. Be sure to include
it.) If the "ls" command produces a directory listing, your
kernel-devel package is OK. If it produces a "No such file or
directory" error, your kernel-devel package is buggy.
If your kernel-devel package is buggy, then you can fix it with:
cd /lib/modules/<version>
rm build
ln -s /usr/src/kernels/<target> build
where <target>
is the name of an existing directory under
/usr/src/kernels, whose name should be similar to <version>
but may
contain some extra parts. Once you have done this, verify the fix with
the same procedure you used above to check for the problem.
If you are building from a distribution tarball, skip to step 5. Otherwise, create a distribution tarball from the root of the Git tree by running:
./boot.sh
./configure
make dist
Now you have a distribution tarball, named something like openvswitch-x.y.z.tar.gz. Copy this file into the RPM sources directory, e.g.:
cp openvswitch-x.y.z.tar.gz $HOME/rpmbuild/SOURCES
Make another copy of the distribution tarball in a temporary directory. Then unpack the tarball and "cd" into its root, e.g.:
tar xzf openvswitch-x.y.z.tar.gz
cd openvswitch-x.y.z
To build Open vSwitch userspace, run:
rpmbuild -bb rhel/openvswitch.spec
This produces two RPMs: "openvswitch" and "openvswitch-debuginfo".
The above command automatically runs the Open vSwitch unit tests. To disable the unit tests, run:
rpmbuild -bb --without check rhel/openvswitch.spec
If the build fails with "configure: error: source dir /lib/modules/2.6.32-279.el6.x86_64/build doesn't exist" or similar, then the kernel-devel package is missing or buggy. Go back to step 1 or 2 and fix the problem.
On RHEL 6, to build the Open vSwitch kernel module, copy rhel/openvswitch-kmod.files into the RPM sources directory and run:
rpmbuild -bb rhel/openvswitch-kmod-rhel6.spec
You might have to specify a kernel version and/or variants, e.g.:
rpmbuild -bb \
-D "kversion 2.6.32-131.6.1.el6.x86_64" \
-D "kflavors default debug kdump" \
rhel/openvswitch-kmod-rhel6.spec
This produces an "kmod-openvswitch" RPM for each kernel variant, in this example: "kmod-openvswitch", "kmod-openvswitch-debug", and "kmod-openvswitch-kdump".
A RHEL host has default firewall rules that prevent any Open vSwitch tunnel traffic from passing through. If a user configures Open vSwitch tunnels like Geneve, GRE, VXLAN, LISP etc., they will either have to manually add iptables firewall rules to allow the tunnel traffic or add it through a startup script (Please refer to the "enable-protocol" command in the ovs-ctl(8) manpage).
Simple integration with Red Hat network scripts has been implemented. Please read [rhel/README.RHEL] in the source tree or /usr/share/doc/openvswitch/README.RHEL in the installed openvswitch package for details.
Please report problems to bugs@openvswitch.org.


[§9-16] Monitoring and evaluation. (a) Every foundation grant contract shall be monitored by the foundation to ensure compliance with this part.
(b) Every foundation grant contract shall be evaluated annually to determine whether the grant attained the intended results in the manner contemplated.
(c) The foundation shall develop procedures and adopt rules under chapter 91 for monitoring and evaluating grant contracts. [L 1992, c 181, pt of §1]


typedef struct
{
unsigned char NumEntries; /* number of entries in structure */
char Ref; /* directory reference character */
char Entries[10][4]; /* entry items */
} DirectoryPath;
(This is a packed structure on 1 byte boundaries)
The DirectoryPath structure is modeled after the way in which working directory paths are written and read using the 'CD' DOS command. For example when typing 'CD' in a sub-directory in DOS you may get this:
CD<ENTER>The string that was given by 'CD' has a depth of 3 sub-directories referenced from the root. If this information was to be returned in the DirectoryPath structure then:
NumEntries = 3 (there are 3 entries, one for each sub-directory)This analogy continues to work for setting the working directory with the DOS 'CD' command. For example:
CD \MAIL\WK3\TUES\MORN <ENTER>This command would set the current directory to '\MAIL\WK3\TUES\MORN' as referenced from the root. To do this with the DirectoryPath structure, first set the 'Operation' flag to 0 to set the current directory and fill out the value as:
NumEntries = 4If the current directory is '\MAIL\WK3\TUES\MORN' and the desired directory is '\MAIL\WK3\WED' there is a short cut using the 'CD':
CD .\..\WED <ENTER>This syntax of this command says that from the current directory '.' go to the previous directory '..' and then go to the sub-directory 'WED'. This short cut can also be done with the DirectoryPath structure:
NumEntries = 2 (there are 2 entries)Note that the 'Entries' are left justified and padded with spaces to 4 characters. The sub-directory depth is limited to 10 deep. If the 'NumEntries' is set to or is read to be 0 then the current directory is at the ROOT. Here are the allowable values for all of the components of the DirectoryPath structure:
NumEntries: 0-10


We are a team of native English speakers in Mexico City. We love to teach face-to-face, using modern techniques. Our goal is to help entrepreneurs and business professionals exceed their potential, helping them connect and do business globally. Read our Mission Statement.
Our method offers a combination of theory, practice, dramatization, role-play, and technology in order to increase self-awareness and focus on negotiations. This allows participants to apply the skills acquired in real world situations.
Our philosophy is to partner with our clients. Everything we do is customized. We can help your employees add even greater value to your company and themselves. They will become your international ambassadors when you are conducting business in global markets.
Designed for discovering English at your own pace.
$259 MXN per month
Self Study Platform with:
Perfect for learning in a structured environment.
From $3,500 MXN per student / per month
Selection of courses
3 hours per week with your Teacher
Course materials and resources
Self Study Platform with:
Perfect for flexibility and personalised English coaching
$9,000 MXN per student / per month
Selection of courses
4 hours per week with your Business Coach
3 hours per week with your Teacher
Course materials and resources
Self Study Platform with:
A course developed for beginner levels, which is designed for developing a basic understanding of English. Get started with essential management of grammar and vocabulary.
During the course the students will learn the basis of the language, the proper use of basic grammar and, with the help of our teachers, the students will start to fully engage with all language skills.
Take the first step to becoming Bilingual!
A conversation-based course for intermediate B2 speakers and above.
Our teachers are trained to identify the needs of individual students and create an active and dynamic experience around conversation and the development of oral skills with current and relevant topics.
The course will help you improve your vocabulary, pronunciation, listening skills and most importantly; the course will help you become a fluent and well spoken individual.
Don't be afraid to speak up. We know you can speak as well as you can understand!
A unique learning experience! You will learn English in-depth focusing on business, tailored to your job and with a higher and more applicable standard of business English.
During the course you will learn the grammar, vocabulary and all the language skills required for you to succeed in the business world. You will learn practical and business-focused skills with confidence building techniques for effective communication, while you get a better understanding of the grammar used in each situation.
These courses are designed for book-based full interactive activities, and to practice with real and possible future business scenarios.

A Business English course designed to meet your unique needs. We personalize the course according to what matters most to you. We have and/or can create a fully customized course that is built-to-suit your individual requirements.
Whatever your job demands, we provide exactly what you’re asking for with courses such as:
Ditch the PowerPoint and speak for yourself!
Zoe was born in the UK. She founded be School in 2014 when she moved to Mexico City after several years teaching English.
Daniel was born in Mexico City but grew up in Texas. Daniel is be School's client manager and oversees our client relationships and implentation of classes.
Nadine is from the UK and has lived in Mexico City for almost a decade. Nadine is an experienced copywriter and oversees be School's course content.
Max is from Canada and moved to Mexico City in 2015. Max is one of be School's lead teachers and oversees our teacher training.
Yana is from the United States. Yana has a background in education and runs be School's social media channels.
Jay is from the UK. Jay is a qualified lawyer and self-taught developer. Jay looks after be School's digital presence.
be School is a premiere learning institute for business professionals seeking to gain confidence in their English language skills. We are committed to teaching professionals how to effectively communicate in the workplace, using English in both verbal and written form.
Our objective is to immerse Mexican business professionals in daily activities that will build confidence in their English language development, regardless of situation or context. Our students will engage with their English colleagues with poise and conviction.
We value each customer as an individual, not a level or a number. We take pride in our personalised approach, bespoke materials, and engaging teaching style. be School will identify the primary language needs of the student to ensure appropriate tutelage.
Changing the way that Business English schools operate in Mexico, be School provides a holistic approach to learning. This approach encourages student achievement and creates further opportunities for career growth within the international business community.
be School is committed to building trust between our partnerships, working alongside our partnership companies, and developing global Ambassadors.


PicoBudget is a simple expense tracking app. You can add different accounts and then do transactions on them. Further PicoBudget enables you to see how much you spend per given category. Nice charts help you understand your data. PicoBudget is completely free, give it a try now!


Pig Dice
A game of skill... or not.
Add Next Player
Let's Play!
To play against the computer,
enter "COMP" as the player's name.
Active Player:
Current Turn Score:
0
Roll
Hold


prtDataSetStandard Standard Data Set Object
DATASET = prtDataSetStandard returns a standard data set object
DATASET = prtDataSetStanard(PROPERTY1, VALUE1, ...) constructs a
prtDataSetStandard object DATASET with properties as specified by
PROPERTY/VALUE pairs.
A prtDataSetStandard object inherits all properties from the
prtDataSetBase class. In addition, it has the following properties:
observations - A matrix of observations that has size nObservations
by nFeatures, i.e. each row contains one observation
made up of nFeatures.
targets - The class corresponding to each observation. The
number of targets must be empty, or equal the
number of observations.
nObservations - The number of observations, read-only.
nFeatures - The number of features per observation, read-only
isLabeled - Flag indicating whether the data is labeled or not,
read only.
name - String variable containing the name of the data set
description - Description of data set
userData - Additional data user may include with data set


from unityagents import UnityEnvironment
import sys
[docs]class Env:
'''A convinience function for generating episodes and memories
This convinience class generates a context manager that can be
used for generating a Unity environment. The Unity environment
and the OpenAI Gym environment operates slightly differently
and hence it will be difficult to create a uniform algorithm that
is able to solve everything at the sametime. This environment
tries to solve that problem.
'''
def __init__(self, fileName, showEnv=False, trainMode=True):
'''Initialize the environment
This sets up the requirements that will later be used for generating
the Unity Environment. This assumes that you will provide a binary
file for generating the environment. There are different ways in
which the environment can be generated. It can be generated either
in a *headless* mode by using showEnv as False, in which case the
environment will not show a window at startup. This is good for
training, as well as situations when you are running the environment
without the presence of an X server, especially when you are running
this environment remotely. The other thing that you can do is to
specify that this is being run in `trainMode`. In this case, the
environment will be primed for training. That is, each frame will
finish as soon as possible. This is not good for observing what is
happening. However, this significantly increases the speed of
training.
Arguments:
fileName {str} -- Path to the binary file. This file must be
the same as the one for which the `unityagents` package
has been generated.
Keyword Arguments:
showEnv {bool} -- Set this to ``True`` if you want to view the
environment (default: {False})
trainMode {bool} -- Set this to ``True`` if you want the environment
tobe in training mode (i.e. fast execution) (default: {True})
'''
try:
self.no_graphics = not showEnv
self.trainMode = trainMode
self.fileName = fileName
self.states = None
except Exception as e:
raise type(e)(
'lib.envs.envUnity.Env.__init__ - ERROR - ' + str(e)
).with_traceback(sys.exc_info()[2])
return
[docs] def __enter__(self):
'''generate a context manager
This will actually generate the context manager and allow you use this
within a ``with`` statement. This is the function that actually
initialized the environment and maintains it, until it is needed.
Returns:
``this`` -- Returns an instance of the same class
'''
try:
self.env = UnityEnvironment(
file_name = self.fileName,
no_graphics = self.no_graphics )
# get the default brain
self.brain_name = self.env.brain_names[0]
self.brain = self.env.brains[self.brain_name]
self.env_info = self.env.reset(train_mode = self.trainMode)[self.brain_name]
self.num_agents = len(self.env_info.agents)
self.action_size = self.brain.vector_action_space_size
except Exception as e:
raise type(e)(
'lib.envs.envUnity.Env.__enter__ - ERROR - ' + str(e)
).with_traceback(sys.exc_info()[2])
return self
[docs] def reset(self):
'''reset the environment before starting an episode
Returns:
status -- The current status after the reset
'''
try:
self.env.reset(train_mode=self.trainMode)
self.states = self.env_info.vector_observations
except Exception as e:
raise type(e)(
'lib.envs.envUnity.Env.reset - ERROR - ' + str(e)
).with_traceback(sys.exc_info()[2])
return self.states
[docs] def step(self, policy):
'''advance one step by taking an action
This function takes a policy function and generates an action
according to that particular policy. This results in the
advancement of the episode into a one step with the return
of the reward, and the next state along with any done
information.
Arguments:
policy {function} -- This function takes a state vector and
returns an action vector. It is assumed that the policy
is the correct type of policy, and is capable if taking
the right returning the right type of vector corresponding
the the policy for the current environment. It does not
check for the validity of the policy function
Returns:
list -- This returns a list of tuples containing the tuple
``(s_t, a_t, r_{t+1}, s_{t+1}, d)``. One tuple for each
agent. Even for the case of a single agent, this is going
to return a list of states
'''
try:
states = self.states.copy()
actions = policy(states)
env_info = self.env.step(actions)[self.brain_name]
next_states = env_info.vector_observations
rewards = env_info.rewards
dones = env_info.local_done
self.states = next_states
results = []
for i in range(self.num_agents):
state = states[i]
action = actions[i]
reward = rewards[i]
next_state = next_states[i]
done = dones[i]
results.append((state, action, reward, next_state, done))
except Exception as e:
raise type(e)(
'lib.envs.envUnity.Env.step - ERROR - ' + str(e)
).with_traceback(sys.exc_info()[2])
return results
[docs] def episode(self, policy, maxSteps=None):
'''generate data for an entire episode
This function generates an entire episde. It plays the environment
by first resetting it too the beginning, and then playing the game for
a given number of steps (or unless the game is terminated). It generates
a set of list of tuplees, again one for each agent. Rememebr that even
when the number of agents is 1, it will still return a list oof states.
Arguments:
policy {function} -- The function that takes the current state and
returns the action vector.
Keyword Arguments:
maxSteps {int or None} -- The maximum number of steps that the agent is
going to play the episode before the episode is terminated. (default:
{None} in which case the episode will continue until it actually
finishes)
Returns:
list -- This returns the list of tuples for the entire episode. Again, this
is a lsit of lists, one for each agent.
'''
try:
self.reset()
stepCount = 0
allResults = [[] for _ in range(self.num_agents)]
while True:
stepCount += 1
finished = False
results = self.step(policy)
for agent in range(self.num_agents):
state, action, reward, next_state, done = results[agent]
allResults[agent].append(results[agent])
finished = finished or done
if finished:
break
if (maxSteps is not None) and (stepCount >= maxSteps):
break
except Exception as e:
raise type(e)(
'lib.envs.envUnity.Env.episode - ERROR - ' + str(e)
).with_traceback(sys.exc_info()[2])
return allResults
[docs] def __exit__(self, exc, value, traceback):
'''Exit the context manager
The exit funciton that will result in exiting the
context manager. Typically one is supposed to check
the error if any at this point. This will be handled
at a higher level
Arguments:
*args {[type]} -- [description]
'''
if not exec:
self.env.close()
return True


Scraping HTML with XPath
I came with the idea of this booklet thank to Peter that kindly answered a question on the Pharo mailing-list. To help Peter showed to a Pharoer how to scrap the web site mentioned in Chapter 2 using XPath. In addition, some years ago I was maintaining Soup a scraping framework because I want to write an application to manage my magic cards. Since then I always wanted to try XPath and in addition I wanted to offer this booklet to Peter. Why because I asked Peter if he would like to write something and he told that he was at a great age where he would not take any commitment. I realised that I would like to get as old as him and be able to hack like a mad in Pharo with new technology. So this booklet is a gift to Peter, a great and gentle Pharoer. I would like to thank Monty the developer of the XML package suite for its great implementation and the feedback on this booklet. Stef
Little Journey into XPath
XPath is the de factor standard language for navigating an XML document and selecting nodes from it. XPath expressions act as queries that identifies nodes. In this chapter we will go through the main concepts and show some of the ways we can access nodes in a xml document. All the expressions can be executed on the spot, so do not hesitate to experiment with them.
Getting started
You should load the XML parser and XPath library as follows:
An example
As an example we will take the possible representation of Magic cards, starting with the Arcane Lighthouse that you can view at http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=389430 and is shown in Figure .
Creating a tree of objects
In Pharo it is always powerful to get an object and interact with it.
So let us do that now using the XMLDOMParser
to convert our data in a tree of objects (as shown in Figure ).
Note that the escaped the '
with an extra quote as in can''t
.
Nodes, node sets and atomic values
We will be working with three kinds of XPath constructs: nodes, node sets, and atomic values.
Node sets are sets (duplicate-free collections) of nodes. All node sets produced by XPath location path expressions are sorted in document order, the order in the document source that they appear in.
The following elements are nodes:
Atomic values are strings, numbers, and booleans. Here are some examples of atomic values:
Basic tree relationships
Since we are talking about trees, nodes can have multiple relationships with each other: parent, child and siblings. Let us set some simple vocabulary.
- Parent. Each node can have at most one parent. The root node of the tree, usually a document, has no parent. In the Arcane Lighthouse example, the card element is the parent of the cardname, types, year, rarity, expansion and cardtext elements. In XPath, attribute and namespace nodes treat the element they belong to as their parent.
- Children. Document and element nodes may have zero, one or more children, which can be elements, text nodes, comments or processing instructions. The cardname, types, year, rarity, expansion and cardtext elements are all children of the card element. Confusingly, even though attribute and namespace nodes can have element parents in XPath, they aren't children of their parent elements.
- Siblings. Siblings are child nodes that have the same parent. The cardname, types, year, rarity, expansion and cardtext elements are all siblings. Attributes and and namespace nodes have no siblings.
- Ancestors. A node's parent, parent's parent, etc. Ancestors of the cardname element are the card element and the cardset nodes.
- Descendants A node's children, children's children, etc. Descendants of the cardset element are the card,cardname, types, year, rarity, expansion and cardtext elements.
A large example
Let us expand our example to have cover more cases.
Select the raw tab and click on self in the inspector (as shown in Figure ). Now we are ready to learn XPath.
Node selection
The following table shows the XPath expressions. Often the current node is also named the context.
| Expression | Description | |
| nodename | Selects all child nodes with the name "nodename" | |
| / | Selects the root node | |
| // | Selects any node from the current node that match the context selection | |
| . | Selects the context (current) node | |
| .. | Selects the parent of the context (current) node | |
| @ | Selects attributes of the context node |
In the following we expect that the variable tree
is bound the full document tree we previously created parsing the XML string.
Location path expressions return node sets, which are empty if no nodes match. Now let us play with the system to really see how it works.
Node tag name selection
There are several way to test and select nodes.
| nodename | Selects all child nodes with the name "nodename" | |
| card | Selects all child nodes with the name "card" | |
| prefix:localName | Selects all child nodes with the qualified name "prefix:localName" | |
| or if at least one prefix/namespace URI pair was declared in the | ||
| XPathContext, the child nodes with the local name "localName" | ||
| and the namespace URI bound to "prefix" |
In standard XPath, qualified name tests like prefix:localName select nodes with the same local name and the namespace URI of the prefix, which must be declared in the controlling XPath context prior to evaluation. The selected nodes from the document can have different prefixes (or none at all), because matching is based on local name and namespace URI.
To simplify things, the Pharo XPath library (unlike others) by default matches qualified name tests against the literal qualified names of nodes, ignoring namespace URIs completely, and does not require you to pre-declare namespace prefix/URI pairs in the XPathContext object before evaluation. Declaring at least one namespace prefix/URI pair will trigger standard behavior, where all prefixes used in qualified name tests must be pre-declared, and matching will be done based on local names and namespace URIs.
Context and parent
| . | Selects the current context node | |
| .. | Selects the parent of the current context node |
The following expression shows that .
(period) selects the context node, initially the node XPath evaluation begins in.
Matching path-based child nodes
The operator /
selects from the root node.
| / | Selects from the root node | |
| /cardset | Selects the root element cardset | |
| cardset/card | Selects all the card grandchildren from the cardset children of the context node |
The following expression selects all the card nodes under cardset node.
XPath
objects lazily compile their source to an executable form the first time they're evaluated, and the compiled form and its source are cached globally, so caching the XPath
object itself in a variable is normally unecessary to avoid recompilation and is only slightly faster. The previous expression is equivalent to the following expression using the xpath:
message.
Matching deep nodes
The //
operation selects all the nodes matching the selection.
| // | Selects from the context (current) node and all descendants | |
| //year | Selects all year node children of the context node and of its descendants | |
| cardset//year | Selects all year node children of the cardset context node children and their descendants |
Let us try with another element such as the expansion of a card.
The XPath library extends XMLNode
classes with binary selectors to encode certain XPath expressions directly in Pharo. So the previous expression can be expressed as follows using the message //
:
Identifying attributes
@
matches attributes.
| Expression | Description | |
| @ | Selects attributes | |
| //@lang | Selects all attributes that are named lang |
The following expression returns all the attributes whose name is lang
.
Predicates
Predicates are used to find a specific node or a node that contains a specific value. Predicates are always embedded in square brackets.
Let us study some examples:
First element
The following expression selects the first card child of the cardset element.
In the XPath Pharo implementation, the message ??
can be used for position or block predicates.
the previous expression is equivalent to the following one
Block or position predicates can be applied with ??
to axis node test arguments or to result node sets.
The following expression returns the first element of each 'card' descendant:
Other position functions
The following expression selects the last card node that is the child of the cardset node.
The following selects the second to last node. In our case since we only have two elements we get the first.
We can also use the position function and use it to identify nodes. The following selects the first two card nodes that are children of the cardset node.
Selecting based on node value
In addition we can select nodes based on a value of a node. The following query selects all the card nodes (of the cardset) that have a year greater than 2014.
The following query selects all the cardname nodes of the card children of cardset that have a year greater than 2014.
Selecting nodes based on attribute value
We can also select nodes based on the existence or value of an attribute. The following expression returns the cardname that have the lang attribute and whose value is 'en'.
Note that we can simply get the card from the name using '..'.
Selecting Unknown Nodes
In addition we can use wildcard to select any node.
| Wildcard | Description | |
| * | Matches any element node | |
| @* | Matches any attribute node | |
| node() | Matches any node of any kind |
For example //*
selects all elements in a document.
While //@*
selects all the attributes of any node.
For example //cardname[@*]
selects all cardname elements which have at least one attribute of any kind.
The following expression selects all child nodes of cardset.
The following expression selects all the cardname of all the child nodes of cardset.
Handling multiple queries
By using the |
union operator in an XPath expression you can select several paths.
The following expression selects both the cardname and year of card nodes located anywhere in the document.
XPath axes
XPath introduces another way to select nodes using location step following the syntax: axisname::nodetest[predicate]
.
Such expressions can be used in the steps of location paths (see below).
An axis defines a node-set relative to the context (current) node. Here is a table of the available axes. Except for the namespace axis, all of these have binary selector equivalents.
| AxisName | Result |
| ancestor | Selects all context (current) node ancestors |
| ancestor-or-self | ... and the context node itself |
| attribute | Selects all context (current) node attributes |
| child | Selects all context (current) node children |
| descendant | Selects all context node descendants |
| descendant-or-self | ... and the context node itself |
| following | Selects everything after the context node closing tag |
| following-sibling | Selects all siblings after the context node |
| namespace | Selects all context node namespace nodes |
| parent | Selects context node parent |
| preceding | Selects all nodes that appear before the context node |
| except ancestors, attribute nodes and namespace nodes | |
| preceding-sibling | Selects all siblings before the context node |
| self | Selects the context node |
Paths
A location path can be absolute or relative. An absolute location path starts with a slash ( / ) (/step/step/...) and a relative location path does not (step/step/...). In both cases the location path consists of one or more location steps, each separated by a slash.
Each step is evaluated against the nodes in the context node-set.
A location step, axisname::nodetest[predicate]
, consists of:
- an axis (defines the tree-relationship between the selected nodes and the context node)
- a node-test (identifies a node within an axis)
- zero or more predicates (to further refine the selected node-set)
The following example access the year node of all the children of the cardset.
The following expression gets the ancestor of the year node and selects the cardname.
The previous expression could be rewritten using a position predicate. Parentheses are needed so the predicate applies to the entire node set produced by the absolute location path, rather than just the last step, otherwise it would select the first year of each card, instead of the first year overall:
Conclusion
XPath is a powerful language. The Pharo XPath library developed and maintained by Monty van OS and the Pharo Extras Team implements the full standard 1.0. Coupled with the live programming capabilities of Pharo, it gives a really powerful way to explore structured XML data.
Scraping HTML
Internet pages provide a lot of information and often you would like to be able to access and manipulate it in another form than HTML: HTML is just plain verbose. What you would like is to get access to only the information you are interested in and get the results in a form that you can easily build more software. This is the objective of HTML scraping. In Pharo you can scrape web pages using different libraries such as XMLParser and SOUP. In this chapter we will show you how we can do that using XMLParser to locate and collect the data we need and JSON to format and output the information.
This chapter has been originally written by Peter Kenny and we thank him for sharing with the community this little tutorial.
Getting started
You can use the Catalog browser to load XMLParserHTML and NeoJSON just execute the following expressions:
Define the Problem
This tutorial is based on a real life problem. We need to consult a database published by the US Department of Agriculture, extract data for over 8000 food ingredients and their nutrient contents and output the results as a JSON file. The main list of ingredients can be found at the following url: https://ndb.nal.usda.gov/ndb/search/list?sort=ndb&ds=Standard+Reference (as shown in Figure ). You can also find the HTML version of the file in the github repository of this book https://github.com/SquareBracketAssociates/Booklet-Scraping/resources.
This table shows the first 50 rows, each corresponding to an ingredient. The table shows the NDB number, description and food group for each ingredient. Clicking on the number or description leads to a detailed table for the ingredient. This table comes in two forms, basic details and full details, and the information we want is in the full details. The full detailed table for the first ingredient can be found at the url: https://ndb.nal.usda.gov/ndb/foods/show/1?format=Full (as shown in Figure ).
There are two areas of information that need to be extracted from this detailed table:
- There is a row of special factors, in this case beginning with 'Carbohydrate Factor: 3.87'. This is to be extracted as a set of (name, value) pairs. The number of factors can vary; some ingredients do not have any.
- There is a table of data for various nutrients, which are arranged in groups - proximates, vitamins, lipids etc. The number of columns in the table varies from one ingredient to another, but in every case the first three columns are nutrient name, unit of measurement and quantity; we have to extract these columns for every listed nutrient.
The requirement is to extract all this information for each ingredient, and then output it as a JSON file:
- NBD number, description and food group from the main list;
- Factor names and values from the detailed table;
- Nutrient details from the detailed table.
First find the required data
To start, we have to find where the required data are to be found in the HTML file. The general rule about this is that there are no rules. Web site designers are concerned only with the visual effect of the page, and they can use any of the many tricks of HTML to produce the desired effects. We use the XML HTML parser to convert text into an XML tree (a tree whose nodes are XML objects). We then explore this tree to find the elements we want, and for each one we have to find signposts showing a route through the tree to uniquely locate the element, using a combination of XPath and Smalltalk programming as required. We may use the names or attributes of the HTML tags, each of which becomes an instance of XMLElement in the tree, or we may match against the text content of a node.
First read in the table of ingredients (first 50 rows only) as in the url.
You can execute the expression and inspect its result. You will obtain an inspector on the tree and you can navigate this tree as shown in Figure .
Since you may want to work on files that you saved on your disc you can also parse a file and get an XML tree as follows:
The simplest way to explore the tree is starting from the top, i.e. by opening up the
node, but this can be tedious and confusing; we often find that there are many levels of nested

nodes before finding what we want. Alternatively, we can use XPath speculatively to look for interesting nodes. In the case of the foods list, we might guess that the list of ingredients will be stored in a

node. Having parsed the web page as shown above in a playground, we can then enter:
and select 'do it and go', which shows an XMLNodeList
of all the table nodes - only one in this case. If there were several, we could use the attributes of the node or any of its ancestors to locate the one we want. We find by searching up several generations a node

which is unique, so we could use this as a signpost. The table body contains a row for each ingredient; the first cell in the row is a "badge" which is of no interest, but the remaining three cells in the row are the number, description and group name that we want. The second and third cells both contain an emebedded node
showing the relative url of the associated detail table.
The exploration of the detail table proceeds in a similar way; we search for text nodes which contain the word "Factor", and then for a table containing the nutrient details. More of this below.
Going back to our problem
Here we present the essential points of the data scraping and JSON output for one item, in a logical order. The code is presented as it could be entered in a playground. There are brief comments on the format of the data and the signposts used to locate it. First read in the table of ingredients (first 50 rows only) as before.
The detail rows are in the body of the table in the div node whose class is 'wbox'.
Note that the signposts do not need to show every step of the way, provided the route is unique; we do not need to mention the

node, because there is only one

. Now extract the text content of the four cells in each row; 'strings first' is a convenient way of finding the text in a node while ignoring any descendent nodes, and we routinely trim redundant spaces.
To prepare for export to JSON, it is handy to put the three required fields (ignoring the first) in a Dictionary indexed by their field names. Using an OrderedDictionary is not strictly necessary, but it does mean that the JSON output is easier for a human to understand.
If we 'do it and go' the next line, we can see the JSON layout. For this demo, we do not need to export to a JSON file; it is easier to look at it as text in the playground.
We can find the relative url address of the ingredient details from the href in the second cell. Because this is the address of the basic details table, we edit it to discard all the parameters, so that we can edit in the parameters for the full table.
Up to this point, we have been constructing lists with data for all 50 ingredients in the table. To show how to process the ingredient details, we just process the first ingredient in the file. The production version would have to run through all the rows in the ingredientAddress collection. We read and parse the detail file, after editing the url.
The data for the factors are contained in
nodes within

nodes. This does not identify them uniquely, so we extract all such nodes with XPath and then use ordinary Smalltalk to find the ones mentioning the word 'Factor'.
Note: it appears that the web designers have used no-break space characters to control the formatting, and these are not removed by 'trim', so we use the 'trimRight:' clause above to remove them.
The layout of the nutrients table is messy, presumably to achieve the effect of the inserted row with the nutrient group name. This means that we cannot locate the nutrient rows using

nodes, as we did for the main list. Instead we have to get at all the individual table cells in
nodes, and then count them in groups equal to the row length. Since the row length is not a constant, we have to determine it by examining the data for one row that in a

node.
Finally assemble all the information for the first ingredient as a JSON file. NeoJSON automatically takes care of embedding dictionaries within a collection within a dictionary. (See specimen in Figure )
Turning the pages
The code above will extract the data for one ingredient, and could obviously be repeated for all the 50 items in one page of data. However, the entire database contains 8789 ingredients at the time of writing, which amounts to 176 pages. The database seems to impose a limit of 50 ingredients per page, so to process the entire database we need to read the pages in succession. Each page contains a link which, if clicked, will load the next page. We can do this programmatically, by finding the link after processing the page. The link is contained in node

, so we can use the code:
This is a common requirement in processing large databases on the web, and so we can use a standard pattern:
Conclusion
We have presented a way to extract information from a structured document. The methods used are of course particular to the layout of the USDA database, but the general principles should be clear. A mixture of XPath and Smalltalk can be used in order to locate the required data.
One problem which can arise, if we need to repeat the extraction with updated data, is that the web designers can change the layout of the pages; this did in fact happen with the USDA table in the 15 months between originally tackling the problem and writing this article. The usual result is that the signposts no longer work, and the XPath results are empty. If the update is being run automatically, say on a daily basis, it may be worth while inserting defensive code in the processing, which will raise an exception if the results are not as expected. How to do this will depend on the particular application.
Scraping Magic
In this chapter we will scrap the web site of Magic the gathering and in particular the card database. (Yes I play Magic not super good but well I have fun). Here is one example http://gatherer.wizards.com/Pages/Card/Details.aspx?multiverseid=389430 as shown in Figure . Now we will try to show you how we explore the HTML page using the excellent Pharo inspector: diving in the tree nodes and checking live their attributes or children is simply super cool.
Getting a tree
The first thing was to make sure that we can get a tree from the web page. For this task we used the XMLHTMLParser
class and sends it the message parseURL:
. How did we find this message... Simply looking on the class side methods of the class.
How did we find the class, well looking at the subclass of XMLDOMParser
because HTML is close to XML or the inverse :).
First the card visual
First we would like to grab the card visual because this is fun and cool. When we open the card visual in a separate window we see that the url is http://gatherer.wizards.com/Handlers/Image.ashx?multiverseid=389430&type=card. Therefore we started to look for Handlers in the nodes as shown in Figure .
No so cool but working...
 This happens often when scraping HTML, but we can do better. By the way note also that we start to enter directly XPath command using the XPath pane and using the doit and go facilities of the inspector. This way we do not have to get the page from internet all the time.
Revisiting it
We could not really show you such ugly expressions so we had to find a better one.
So first we look at the img that has src as atttribute as shown below and in Figure .
Then as shown in Figure we inspected the right node.
Finally since we were on this exact node, we looked in its class to see if we could get an API to get the attribute in a nice way as shown in Figure .
Now that we have the visual path, we can use the HTTP client of Pharo to get the image as shown in Figure .
Getting data
Since this web page is probably generated, we look for example for the artist string in the source and we found the following matches:
This one is more interesting:
We can build queries to identify node elements having this id. To avoid to perform an internet request each time, we typed directly XPath path in the XPath pane of the inspector as shown in Figure . Now trying to get faster we looked at all the class="row" as shown in Figure .
The following expression returns the pair label and value for example for the card name label and its value.
So we can now query all the fields
Now we can convert this into a dictionary
And convert it into JSON for fun
Now we can apply the same technique to access all the cards and also different pages to extract all the card unique id and query the database. But this is left as an exercise.
Conclusion
We show you how we could access the page and navigate interactively through it using XPath and live programming feature of Pharo. This chapter should show the great value to be able to tweak you live a document and navigate to find the information you really want.