Command line internet radio player.
Ben Dowling - https://github.com/coderholic
PyRadio provides the following features:
and much more…
2022-02-14 s-n-g * version <IP_ADDRESS> (0.9-beta11) * fixing typo in player.py 2022-02-13 s-n-g * version <IP_ADDRESS> (0.9-beta10) * fixing #148 * fixing a potential psutil crash 2022-01-26 s-n-g * version <IP_ADDRESS> (0.9-beta9) * Fixing install.py 2022-01-25 s-n-g * version <IP_ADDRESS> (0.9-beta8) * Fixing (#147): Cannot type "t" in RadioBrowser Search window * Trying to fix install.py crash * Adding MPV support on Windows 2022-01-17 s-n-g * version <IP_ADDRESS> (0.9-beta7) * RadioBrowser config window almost finished * RadioBrowser search window shortcuts changes * save config before entering config window, when theme is changed * fixing compiling/build error for arch linux (#146) * fixing Windows installation as per (#145) * adding check for -p parameter (int) * keep looking for a station after playback failure when random is on * trying to better VLC start of playback detection * trying to eliminate crashes when window width gets small (like in tilling managers) * show correct help page when in online browser * disabling theme editing per (#141) * adding last opened playlist support as per (#138) * HTML help can be displayed using \h * Fixing installation of HTML files for all platforms and modes * Incorporating the Changelog into README.html (offline help) * install.py will always use the requested python version * install.py will use special indication per command line (-sng for --sng-master and -sng-dev for --sng-devel) * Adding --git option to install.py * Windows installation will fail if a dependency fails to install * mplayer on Windows: do not fail to start a station after astop/start command * Updating docs 2021-08-31 s-n-g * Version <IP_ADDRESS> (0.9-beta6) * Search history navigation will work with normal keys in addition to Control-key combinations (when a line editor does not have the focus) * When navigating to a new search term, in the RadioBrowser Search Window, the two main check boxes will always get the focus (makes it easier to navigate using normal keys) * Docs Updated 2021-08-22 s-n-g * Version <IP_ADDRESS> (0.9-beta5) * Fixing RadioBrowser save pop up window * Interchanging ^T and ^Y in the RadioBrowser Search Window * Addinf FULL_SCREEN_MODES for farter rendering 2021-08-20 s-n-g * Version <IP_ADDRESS> (0.9-beta4) * RadioBrowser: closing with "q" or "Escape" * RadioBrowser: do not close if network fails * RadioBrowser: added hidebroken to all queries * RadioBrowser: if limit=0, disable result limit * RadioBrowser: finalized config save / read function * RadioBrowser: All Search Window movement keys (^N, ^P, ^Y) will add a new history item (if possible) * RadioBrowser: ^B does not save history to file * RadioBrowser: Better navigation in the Search Window * Fixed a couple of python 2 crashes * Updated docs 2021-08-15 * Version <IP_ADDRESS> (0.9-beta3) * RadioBrowser History Management finalized * Fields' placement fixed in RadioBrowser Search Window * RadioBrowser man page added * Docs updated 2021-08-11 s-n-g * Version <IP_ADDRESS> (0.9-beta2) * Fixed a crash that would occur when searching for name only in RadioBrowser Search Window * Do not display the Theme Selection Window when pressing "t" in a RadioBrowser Line Editor * Updated History legend aread * Updated docs 2021-08-11 s-n-g * Version <IP_ADDRESS> (0.9-beta1) * Radio Browser implementation is now usable (but still not complete) * Implemented ^N,^P to play next/previous station as per (#135) * Several python2 fixes * Updating docs 2021-07-13 s-n-g * Version <IP_ADDRESS> This is an "internal" release testing (#135) 2021-05-11 s-n-g * Version <IP_ADDRESS> * Screen flickering when moving within the stations' list eliminated * VLC player is available again (disabled by unreported bug) * Advancing Radio Browser support * Fixing python 2 return from Radio Browser TUI breakage * Adding dnspython module availability check 2021-04-14 s-n-g * Version <IP_ADDRESS> * Implemented the so called "Listening" mode, in which PyRadio TUI can be reduced down to a single line (the "Status Bar"). Requested for tilling WM use (#128)[https://github.com/coderholic/pyradio/issues/128] 2021-04-03 s-n-g * Version 0.8.9 * Implemented a simplified method to install, update, uninstall. * PyRadio will detect its player abnormal termination. * Player's connection timeout can now be disabled. Once a player is started, it will be considered to be connected immediately. * stations.csv changes can now be integrated into user's stations.csv * mplayer "pyradio" profile will use the internal mixer to adjust volume * BUG FIX: Active players parameter list is always synchronized to saved. * BUG FIX: Clicking on empty space (past last station) will not crash pyradio. 2021-02-27 s-n-g * Version <IP_ADDRESS> (BUG FIX release) * Fixing -ap value not activated by player * Commenting out excessive error log messages 2021-02-27 s-n-g * Version <IP_ADDRESS> (BUG FIX release) * Fixing double click behavior (while in playback double clicking to a different station will start it. * vcl will not start muted (volume = 0) 2021-02-26 s-n-g * Version <IP_ADDRESS> * Basic mouse support implemented * Config option to enable mouse support added * Implementing players extra parameters set. * Player selection Config window redesigned. * Adding -ep. -ap, -lp command line parameters. * Fixing a bug which would lead to a crash when "r" would be pressed in the config window. * Playback will be restarted when vital parameters are changes (encoding, connection type, player parameters). * When restarting playback, play the correct station not the selected one. * adding autostart BAT file on Windows to prevent session locking when Windows terminate while PyRadio is still running * pyradio will always use a profile * Fixing several minor bugs. 2020-12-21 s-n-g * Theme selection window will not crash when resizing * After editing a station, restart playback only if the encoding of the station that's playing has been changed 2020-12-18 s-n-g * Version <IP_ADDRESS> * Gracefully exit when the terminal is closed 2020-12-14 s-n-g * Version <IP_ADDRESS> * Fixing (?) vlc terminataion on Windows * Restarting radio-browser.info implementation 2020-12-10 s-n-g * Starting 0.8.8 * Implementing "Paste to playlist" (\p) command * Implementing "Create Playlist" (\n) * Addind \u (show Unnamed Register) command * Fixing volume display for MPV on python3 before a valid Title has been received * Revert to stations playlist if default one (set by config) does not exist * Second level config windows will not be displayed when main window shows "Window too small" message * When opening a playlist/register from register mode, continue playing active station (if found in opened playlist/register) * Do not show "'" when opening a playlist/register from register mode * "Title: (null)" will not appear any more (vlc) 2020-11-23 s-n-g * Version 0.8.8-beta6 * Fixing playback for m3u8 (vlc) * Fixing "-u" functionality on Windows * Fixing "no player" messages * Stopping runaway threads from displaying messages after the player is stopped 2020-11-23 s-n-g * Version 0.8.8-beta5 * Adding VLC support on Windows 2020-11-17 s-n-g * Version 0.8.8-beta4 * Adding the "Force http connections" configuration option (#113) * Fixed a couple of bugs * Installation script will use Python 3 by default 2020-10-30 s-n-g * Version 0.8.8-beta3 * Re-implementing status bar output function * Connection timeout counter will be visible at 70% of timeout value * Player will be aware of mid-session connection timeout changes * Changing numbers presentation (adding "G" and "J" suffixes) * Adding a program termination speed up * Changing new version detection function No update notification will be displayed due to this change * Fixing TUI breaks due to multi-threading 2020-10-13 s-n-g This is a long-overdue update! This is a called a beta release in the sense that some of the intended features have not been implemented yet. * Version <IP_ADDRESS> (0.8.8-beta2) * Adding PASTE MODE in editing windows * Finalizing alternative modes (registers, register mode, extra commands, yank i.e. copy) - implementation started in 0.8.8-beta1 * Toggling transparency enabled in theme selection window * Pyradio respects global encoding * Info window gets updated as data are read * Display message when fallback theme is used (#99) * Fixing info window highlight and encoding issues * Making Station editor window size aware * Fixing -a command line parameter functionality * Build script accepts --user (for user only installation) on linux * Build script will clean up previous installation files * Fixing volume saving on Windows (mplayer) Implemented in 0.8.8-beta1 * Connection timeout counter * Station info window * Main help window has 3 pages now * Fixing playback restart when encoding changed Not implemented yet * \p - Select playlist/register to paste station * \n - Create new playlist 2020-03-16 s-n-g * Version <IP_ADDRESS> * Fixing macOS Catalina installation 2020-01-31 s-n-g * Version <IP_ADDRESS> * Fixing mpv playlist option (for mpv 0.32.0) 2020-01-26 s-n-g * 0.8.8-beta1 * Adding connection timeout counter * Adding station info window * Adding registers add, remove station, clear * Adding paste station to current playlist * g prefixed by a number jumps to it (same as G) * Dead keys (alternative mode and jump number) are now displayed at the bottom right corner of the window * Main help window has 3 pages now * Fixing playback restart when encoding changed * Replacing widechar.py with cjkwrap.py and adding its update script in devel/ 2019-12-23 s-n-g * Version 0.8.7 * Fixing volume issue with mpv * mpv on python3 uses socket communication only; no stdout parsing done anymore, as it is still done on python2, due to title (icy-title) encoding problems. * socat is no longer needed to use mpv 2019-12-14 s-n-g * Version 0.8.6 * Adding playlist history (for local playlists) * https URLs will be converted to http before connecting * Fixing station moving when appending station * Config / Default station: pading fixed * WINDOWS: Volume will be saved when mplayer is installed in %APPDATA%\pyradio 2019-11-15 s-n-g * PyRadio will not crush with mpv 0.30.0 Changing mpv's volume is still possible, but no info will be presented on the Status Bar. Furthermore, saving mpv's volume will not be possible ( mpv issue #7153: https://github.com/mpv-player/mpv/issues/7153 ) 2019-11-12 s-n-g * When default played is changed in the config, a message to restart the application is presented to the user * Config / Default station: pading fixed 2019-11-10 s-n-g * Fixing vlc returned volume parsing (due to locales decimal separator) 2019-10-29 s-n-g * FIX: Playlists flagged as changed when adding a station * Handling CJK presentation on station and playlist view * Preparing for online stations browser 2019-10-23 s-n-g * Handling CJK presentation on station and playlist window 2019-10-20 s-n-g * Version 0.8.2 * Fixing chars H,L,M rejected by line editor * Fixing station editor rejecting "\?" * Updating station's editor help messages 2019-10-19 s-n-g * Version 0.8.1 * CJK Unified Ideographs supported by the line editor * On python 2, trying to edit a station whose name contains non-ASCII characters is prohibited and will end up in displaying a relevant message * Line editor: using backslash to insert "?" and "\" * Search term will not be lost when resizing the window * Fixing issues with presenting search history * Themes now have a "Edit Cursor" field 2019-09-08 s-n-g * Version 0.8.0 * Adding station editor ("a" and "A" to add a station, "e" to edit) * Line editor supports unlimited string length * Main help window separated to two pages (navigation with "n" / "p") * Changing "e" to "E" to change a station's encoding * Changing "p" to "P" to jump to playing station / loaded playlist * Adding H, L to jump to top / bottom of screen * Changing M to jump to middle of screen * Changing volume, saving volume and muting is now available on most windows (pop up and questions) * Manipulating volume (keys m,v) on a help window, will close it if player not playing * Adding ^U, ^D to move station up, down * Search string will not be lost after displaying help * PyRadio runs on Windows (finally). Added an installation BAT file, icons, program shortcut and help (windows.md - windows.html) * Minor bug fixes 2019-07-15 s-n-g * Searching is now available on any window presenting a list of items * Transparency indication presentation always reflects setting * A locked session is indicated next to PyRadio version * Adding "Top" link to html files * Docs updated 2019-07-08 s-n-g * Version 0.7.8 * fixing playlist recovery message presentation * fixed foreign playlist management * fixed exiting when playlist is modified * when applying a them which is not supported, using "light" if "light" or "light_16_colors" is default * fixing update notification message "Will check again in 0 days" * update notification will clean files in all cases * adding "M" to config station selection * updating help for playlist and config station selection * heavy refactoring; using window stack and redisplay list 2019-06-26 s-n-g * Version 0.7.7 * mpv now uses a dedicated socket file. This way multiple instances of PyRadio can be executed. * Introducing session locking. * Added the "--unlock" command line parameter, to force sessions' unlock. * Added "M" command, which will jump to the middle of the list. * PyRadio can load external theme files. * Three more themes added. These are system themes (actual files). * Theme selection window reworked - themes are separated by location, theme selection is remembered when resizing, and loading default or saved theme (in config window). * PyRadio will report reverting to default theme. * PyRadio will check and report when a new release is available. * Added good bye message. * Theme editor implementation started (disabled for this release). * Minor other fixes. 2019-06-06 s-n-g * Verion <IP_ADDRESS> This is a BUG FIX release, fixing config status (indicating whether config is modified or not) 2019-06-02 s-n-g * Version <IP_ADDRESS> This is a BUG FIX release, fixing regression: config not saved when changing themes 2019-06-01 s-n-g * Version 0.7.6 * Added "e" option to change station's encoding. * Implemented playlist backup and recovery, to address saving errors. * Inform user when playlist not found and of playlist recovery result. * Parameter -s - Check if file is supported (ends with .csv) 2019-04-18 s-n-g * Version 0.7.5 * Minimum python version supported changed. Now it's 2.7+/3.5+ * Added configuration window (opens with "c"). * Canceling theme selection (not in config) will restore saved theme. * Done a bit of refactoring. 2019-02-14 s-n-g * Version 0.7.4 * Fixing p command for playlists view. * Selected station / playlist will be visible when resizing the terminal. * Calculating initial loaded playlist position in window. * Implemented dynamic list padding. * Correctly display failed station when returning to stations mode. * Help window gets redisplayed when the terminal is resized. * Updating docs 2019-02-04 s-n-g * Version 0.7.3 * Added "p" command to jump to playing station / loaded playlist. * Added two more themes (dark_16_colors and light_16_colors) * Improved black_on_white theme. * On a 8 color terminal, the fall-back theme will be "light", if "light_16_colors" is default. * Exiting if terminal cannot display colors. * Fixed player selection error screen. * Fixed a regression which might appear when loading a playlist 2019-02-02 s-n-g * Version 0.7.2 * Themes support added (4 hardcoded themes). * Command line option -t (--theme) THEME added. * Config option "theme" added. * Key "t" will open the "Theme Selection Window". * Key "T" will toggle transparency / use terminal's background color. * Alt keyboard combinations will not be considered as ESCAPE char. * Help / message windows use multiple colors. * Fixing a couple of minor bugs. 2019-02-10 s-n-g * Version 0.7.1 * Avoiding curses layout breakage due to BROKEN PIPE errors * Start of playback detection implemented. This is done by detecting the players audio decoder info, which actually mean that playback is on. If not detected within a timeout value, failure to connect is presumed * Volume adjustment, saving and muting is inhibited before start of playback is detected * Playing a station in random order will not stop until a working station is acquired or another action is taken (e.g pressing a key) * Stations name is limited to window width * Station title is validated before displayed 2019-01-21 s-n-g * Version 0.7.0 * added command line options -ls, -scd, -ocd * make sure config dir exists before doing anything with it * make sure the playlist is valid (-s option) * Option -s accepts playlist name only, if it exists in config dir, or playlist number as reported by the -ls command line option * -a command line option works in combination with -s * -l command line option prints a tabular list * started implementing playlist management. Now we can open another playlist, remove a station from a playlist and save a playlist. TODO: rename playlist, copy playlist, add station, edit station * added configuration file (~/.config/pyradio/config) TODO: edit configuration file within PyRadio * Input encoding can now de set either in a station by station mode or globally * ESCAPE now works for exit/cancel * ESCDELAY set to 25ms. Refer to https://stackoverflow.com/questions/27372068/why-does-the-escape-key-have-a-delay-in-python-curses for more info * "Foreign" playlist handing added. A playlist that does not reside in PyRadio's config dir (called a "foreign playlist") can now be copyied there, making it available for opening from within PyRadio. * '/' win no longer display help ('?' is still valid) * minor errors fixed * error_code renamed to operation_mode * build script working on MacOS 2018-12-02 s-n-g * Version 0.6.0 * PyRadio will not crash when no player found. * PyRadio will only display station name and icy-title (if received) * PyRadio version will include git revision when not on a git tag (i.e.not on a release tag) * Added '-u' option to specify player to use (or detection order) * A help message can be displayed (shortcut '?' or '/') * vlc will unmute on exit * Volume value is displayed while changing * Volume can be saved for mpv and mplayer (shortcut 'v') * pyradio.log is always saved in home directory * Both mpv and socat must be installed for mpv to be used as player * Added man page, thanks to AUR package pyradio-git (not installed by default; it's up to the packagers to do it) 2013-04-03 stac47 * Version 0.5.1 * Fixed regression on bottom panel not updated in Python 3 * Support of VLC as the underlying player * Probing the multimedia player available on the host system 2013-03-16 stac47 * Version 0.5.0 * Fix compatibility issue with Python 3 2012-08-31 klen * Version 0.4.2 * Add '-p' option 2012-08-30 klen * Version 0.4.1 * Fix user stations loading 2012-08-29 klen * Version 0.4.0 * Add console interface * Published on pypi
The best way to install PyRadio is via a distribution package, if one exists (e.g. Arch Linux and derivatives can install any of these packages from the AUR).
In any other case, and since PyRadio is currently not available via pip, you will have to build it from source.
$ pyradio -h usage: pyradio [-h] [-s STATIONS] [-p [PLAY]] [-u USE_PLAYER] [-a] [-ls] [-l] [-t THEME] [-scd] [-ocd] [-ep EXTRA_PLAYER_PARAMETERS] [-ap ACTIVE_PLAYER_PARAM_ID] [-lp] [--unlock] [-d] Curses based Internet radio player optional arguments: -h, --help show this help message and exit -s STATIONS, --stations STATIONS Use specified station CSV file. -p [PLAY], --play [PLAY] Start and play.The value is num station or empty for random. -u USE_PLAYER, --use-player USE_PLAYER Use specified player. A comma-separated list can be used to specify detection order. Supported players: mpv, mplayer, vlc. -a, --add Add station to list. -ls, --list-playlists List of available playlists in config dir. -l, --list List of available stations in a playlist. -t THEME, --theme THEME Use specified theme. -tlp, --toggle-load-last-playlist Toggle autoload last opened playlist. -scd, --show-config-dir Print config directory [CONFIG DIR] location and exit. -ocd, --open-config-dir Open config directory [CONFIG DIR] with default file manager. -ep EXTRA_PLAYER_PARAMETERS, --extra-player_parameters EXTRA_PLAYER_PARAMETERS Provide extra player parameters as a string. The parameter is saved in the configuration file and is activated for the current session. The string's format is [player_name:parameters]. player_name can be 'mpv', 'mplayer' or 'vlc'. Alternative format to pass a profile: [player_name:profile:profile_name]. In this case, the profile_name must be a valid profile defined in the player's config file (not for VLC). -ap ACTIVE_PLAYER_PARAM_ID, --active-player-param-id ACTIVE_PLAYER_PARAM_ID Specify the extra player parameter set to be used with the default player. ACTIVE_PLAYER_PARAM_ID is 1-11 (refer to the output of the -lp option) -lp, --list-player-parameters List extra players parameters. -U, --update Update PyRadio. --user Install only for current user (linux only). -R, --uninstall Uninstall PyRadio. --unlock Remove sessions' lock file. -d, --debug Start pyradio in debug mode.
The following options can also be set in PyRadio’s configuration file:
Main window Playlists window Themes window ------------------------------------------------------------------------------------------------------------------------------------- Up/Down/j/k/ PgUp/PgDown Change station selection Change station playlist Change station theme g Jump to first station Jump to first playlist Jump to first theme <n>G Jump to n-th / last station Jump to n-th / last playlist Jump to n-th / last theme H M L Jump to the top / middle bottom of the list [Valid] - P Jump to playing station Jump to playing playlist - Enter/Right/l Play selected station Open selected playlist Apply selected theme ^N / ^P Play next/previous station - - (if already in playback) r Select and play a random station Re-read playlists from disk - Space/Left/h Stop/start playing selected station - - Space - - Apply theme and make it default -/+ or ,/.  Show keys help [Valid] [Valid] # Redraw window [Valid] [Valid] Esc/q Quit - - Esc/q/Left/h - Cancel / close window Cancel / close window
The same logic applies to all PyRadio windows.
Note: All windows - except the Search window - support changing the volume and muting / unmuting the player (provided that PyRadio is actually connected to a station).
Note: When inserting numbers (either to jump to a station or to move a station), the number will be displayed at the right bottom corner of the window, suffixed by a “G”, i.e. pressing 35 will display [35G].
Note: When tagging a station position for a move action (by pressing “J”), the position will be displayed at the right bottom corner of the window, suffixed by a “J”, i.e. pressing “J” on position 35 will display [35J].
While in PyRadio main window, one can open the HTML (offline) help using “\h”.
This is just a helper function for windows users who cannot use the man pages, but is still available for all platforms.
PyRadio has the following primary modes:
A set of secondary modes is also available (a secondary mode works within a primary one):
The functions available through the secondary modes are content dependent, so you can see what command is available by pressing “?” while within a secondary mode. Pressing any other key will exit the secondary mode.
These modes are specifically designed to be used with tiling window managers, trying to face a rapid reduction of window height or width (or both).
In this mode, only a limited information is visible and if playback is on, the volume is the only thing that can be adjusted (or muted) and saved. This is the Limited display.
Note: These two modes do not work on Windows, either 7 or 10. The “Console”window will shrink as desired, but will not always notify PyRadio about it, so results will vary.
PyRadio upon its execution tries to read its configuration file (i.e. ~/.config/pyradio/config). If this file is not found, it will be created. If an error occurs while parsing it, an error message will be displayed and PyRadio will terminate.
The file contains parameters such as the player to use, the playlist to load etc. It is heavily commented (as you can see here), so that manual editing is really easy. The best practice to manually edit this file is executing PyRadio with the -ocd command line option, which will open the configuration directory in your file manager, and then edit it using your preferable text editor.
The file can also be altered while PyRadio is running by pressing “c”, which will open the “Configuration window”. This window presents all PyRadio options and provide the way to change them and finally save them by pressing “s”.
In any case, PyRadio will save the file before exiting (or in case Ctrl-C is pressed) if needed (e.g. if a config parameter has been changed during its execution).
If saving the configuration file fails, PyRadio will create a back up file and terminate. When restarted, PyRadio will try to restore previously used settings from the said back up file.
PyRadio reads the stations to use from a CSV file, where each line contains two columns, the first being the station name and the second being the stream URL.
Optionally, a third column can be inserted, stating the encoding used by the station (more on this at Specifying stations’ encoding).
PyRadio will by default load the user’s stations file (e.g. ~/.config/pyradio/stations.csv) to read the stations from. If this file is not found, it will be created and populated with a default set of stations.
Note: Older versions used to use ~/.pyradio as default stations file. If this file is found, it will be copied to use’s config directory (e.g. ~/.config/pyradio) and renamed to stations.csv or if this file exists, to pyradio.csv. In this case, this file will be the default one.
When the package’s “stations.csv” files is updated, the changes it has will not automatically appear in the user’s stations file.
What PyRadio will do is inform the user that these changes do exist and give him a chance to integrate these changes to his stations file, by appending the new stations to the file.
When this is done, the first added station will be selected so that the user can inspect the changes and decide to keep or delete the new stations.
PyRadio will only add stations to the user’s stations file; no station will be deleted as a result of this procedure.
PyRadio will normally load its default playlist file, as described above, upon its execution. A different file can be loaded when the -s command line option is used.
The -s option will accept:
Examples:
To load a playlist called “blues.csv”, one would use the command:
pyradio -s /path/to/blues.csv
If this file was saved inside PyRadio’s configuration directory, one could use the following command:
pyradio -s blues
To use the playlist number, one would execute the commands:
$ pyradio -ls Playlists found in "/home/user/.config/pyradio" 1. hip-hop 2. party 3. stations 4. huge 5. blues 6. rock 7. pop $ pyradio -s 5
Note: The default playlist to load can also be set in PyRadio’s configuration file, parameter default_playlist (default value is stations).
As already stated, PyRadio will normally load its default playlist (called “stations”) upon startup.
This behavior can be then changed in two ways:
This is accomplished using the “Def. playlist” configuration option (optionally along with the “Def. station” option).
This is accomplished using the “Open last playlist” configuration option.
In this case, the last used playlist will be opened the next time PyRadio will be executed, trying to restore the previously selected station or starting playback.
This option will take precedence before the “Def. playlist” configuration option (if it is used) and the “-s” (“–stations”) command line option.
Note: When the “Open last playlist” configuration option is set, all playlist operations will be performed to the last opened playlist. In order to use the “-a” (“–add”) or “-l” (“–list”) command line options along with the “-s” (“–stations”) command line option, the “-tlp” (“–toggle-load-last-playlist”) option can be used to temporarily deactivate autoloading.
Once PyRadio has been loaded, one can perform a series of actions on the current playlist and set of playlists saved in its configuration directory.
Currently, the following actions are available:
Pressing “a” or “A” will enable you to add a new station (either below the currently selected station or at the end of the list), while “e” will edit the currently selected station. All of these actions will open the “Station editor”.
If you just want to change the encoding of the selected station, just press “E”. If the station is currently playing, playback will be restarted so that the encoding’s change takes effect (hopefully correctly displaying the station/song title).
Then, when this is done, you can either save the modified playlist, by pressing “s”, or reload the playlist from disk, by pressing “R”. A modified playlist will automatically be saved when PyRadio exits (or Ctrl-C is pressed).
One thing you may also want to do is remove a station from a playlist, e.g. when found that it not longer works. You can do that by pressing “DEL” or “x”. The deleted station is copied to the unnamed register (refer to section Copying and pasting - Registers for more information).
Finally, opening another playlist is also possible. Just press “o” and you will be presented with a list of saved playlists to choose from. These playlists must be saved beforehand in PyRadio’s configuration directory.
While executing any of the previous actions, you may get confirmation messages (when opening a playlist while the current one is modified but not saved, for example) or error messages (when an action fails). Just follow the on screen information, keeping in mind that a capital letter as an answer will save this answer in PyRadio’s configuration file for future reference.
A playlist that does not reside within the program’s configuration directory is considered a “foreign” playlist. This playlist can only be opened by the “-s” command line option.
When this happens, PyRadio will offer you the choice to copy the playlist in its configuration directory, thus making it available for manipulation within the program.
If a playlist of the same name already exists in the configuration directory, the “foreign” playlist will be time-stamped. For example, if a “foreign” playlist is named “stations.csv”, it will be named “2019-01-11_13-35-47_stations.csv” (provided that the action was taken on January 11, 2019 at 13:35:47).
PyRadio will keep a history of all the playlists opened (within a given session), so that navigating between them is made easy.
In order to go back to the previous playlist, the user just has to press “\\” (double backslash). To get to the first playlist “\]” (backslash - closing square bracket) can be used.
Going forward in history is not supported.
On any window presenting a list of items (stations, playlists, themes) a search function is available by pressing “/”.
The Search Window supports normal and extend editing and in session history.
One can always get help by pressing the “?” key.
After a search term has been successfully found (search is case insensitive), next occurrence can be obtained using the “n” key and previous occurrence can be obtained using the “N” key.
PyRadio “Search function” and “Station editor” use a Line editor to permit typing and editing stations’ data.
The Line editor works both on Python 2 and Python 3, but does not provide the same functionality for both versions:
One can always display help by pressing “?”, but that pauses a drawback; one cannot actually have a “?” withing the string.
To do that, one would have to use the backslash key “\” and then press “?”.
To sum it all up:
When in Station editor, the Line editor recognizes an extra mode: Paste mode.
This mode is enabled by pressing “\p” and gets automatically disabled when the focus moves off the line editors.
This mode is designed to directly accept the “?” and “\” characters (which are normally used as commands indicators). This makes it possible to easily paste a station’s name and URL, especially when the “?” and “\” characters exist in them; it is very common to have them in URLs.
The Line editor supports the insertion of CJK Unified Ideographs, as described on CJK Unified Ideographs (Unicode block) also known as URO, abbreviation of Unified Repertoire and Ordering. These characters, although encoded as a single code-point (character), actually take up a 2-character space, when rendered on the terminal.
A depiction of the editor’s behavior can be seen at this image:
Rearranging the order of the stations in the playlist is another feature PyRadio offers.
All you have to do is specify the source station (the station to be moved) and the position it will be moved to (target).
There are three way to do that:
Normally, stations provide information about their status (including the title of the song playing, which PyRadio displays) in Unicode (utf-8 encoded). Therefore, PyRadio will use utf-8 to decode such data, by default.
In an ideal world that would be the case for all stations and everything would be ok and as far as PyRadio is concerned, songs’ titles would be correctly displayed. Unfortunately, this is not the case.
A lot of stations encode and transmit data in a different encoding (typically the encoding used at the region the come from). The result in PyRadio would be that a song title would be incorrectly displayed, not displayed at all, or trying to displaying it might even break PyRadio’s layout.
Note: vlc will not work in this case; it presumably tries to decode the said data beforehand, probably using utf-8 by default, and when it fails, it provides a “(null)” string, instead of the actual data. So, you’d better not use vlc if such stations are in your playlists.
PyRadio addresses this issue by allowing the user to declare the encoding to use either in a station by station mode or globally.
As previously stated, a PyRadio’s playlist can optionally contain a third column (in addition to the station name and station URL columns), which declares the station’s encoding.
So, when a non-utf-8 encoded station is inserted in a playlist, its encoding can also be declared along with its other data. The drawback of this feature is that an encoding must be declared for all stations (so that the CSV file structure remains valid). To put it simple, since one station comprises the third column, all stations must do so as well.
This may seem intimidating (and difficult to achieve), but it’s actually really simple; just add a “,” character at the end of the line of each station that uses the default encoding. In this way, all stations comprise the third column (either by declaring an actual encoding or leaving it empty).
Example:
Suppose we have a playlist with one utf-8 encoded station:
Station1,Station1_URL
Now we want to add “Station2” which is iso-8859-7 (Greek) encoded.
Since we know all stations must comprise the third (encoding) column, we add it to the existing station:
Station1,Station1_URL,
Finally, we insert the new station to the playlist:
Station1,Station1_URL, Station2,Station2_URL,iso-8859-7
Note: Using the -a command line option will save you all this trouble, as it will automatically take care of creating a valid CSV file. Alternatively, you can change the selected station’s encoding by pressing “E” while in PyRadio.
PyRadio’s configuration file contains the parameter default_encoding, which by default is set to utf-8.
Setting this parameter to a different encoding, will permit PyRadio to successfully decode such stations.
This would be useful in the case where most of your stations do not use utf-8. Instead of editing the playlist and add the encoding to each and every affected station, you just set it globally.
PyRadio is basically built around the existence of a valid media player it can use. Thus, it will auto detect the existence of its supported players upon its execution.
Currently, it supports MPV, MPlayer and VLC, and it will look for them in that order. If none of them is found, the program will terminate with an error.
Users can alter this default behavior by using the -u command line option. This option will permit the user either to specify the player to use, or change the detection order.
Example:
pyradio -u vlc
will instruct PyRadio to use VLC; if it is not found, the program will terminate with an error.
pyradio -u vlc,mplayer,mpv
will instruct PyRadio to look for VLC, then MPlayer and finaly for MPV and use whichever it finds first; if none is found, the program will terminate with an error.
The default player to use can also be set in PyRadio’s configuration file, parameter player (default value is mpv, mplayer, vlc), using the “Configuration Window”, through which extra player parameters can be set.
All three supported players can accept a significant number of “command line parameters”, which are well documented and accessible through man pages (on linux and macOs) or the documentation (on Windows).
PyRadio uses some of these parameters in order to execute and communicate with the players. In particular, the following parameters are in use by default:
| Player | Parameters |
|---|---|
| mpv | –no-video, –quiet, –input-ipc-server, –input-unix-socket, –playlist, –profile |
| mplayer | -vo, -quiet, -playlist, -profile |
| vlc | -Irc, -vv Windows only: –rc-host, –file-logging, –logmode, –log-verbose, –logfile |
Note: The user should not use or change the above player parameters. Failing to do so, may render the player unusable.
PyRadio provides a way for the user to add extra parameters to the player, either by a command line parameter, or the “Configuration Window” (under “Player:”).
This way, 10 sets of parameters can be inserted and made available for selection.
When the command line parameter (-ep or –extra_player_parameters) is used, the parameters specified must be of a specific format, and will be added to the list of parameters and made default for the player for the current session.
The format of the parameter is the following: [player_name:parameters]
Where:
Example:
pyradio -ep "vlc:--force-dolby-surround 2"
Note: When a parameter is passed to “mpv” or “mplayer”, PyRadio” will use the default player profile (called “pyradio”).
For “mpv” and “mplayer” a profile can be specified (“vlc” does not support profiles). In this case the format of the parameters part of the command line is: profile:profile_name.
Where:
Example:
pyradio -ep "mpv:profile:second_sound_card"
When the user uses the configuration window (shown in the following image), he is presented with an interface which will permit him to select the player to use with PyRadio and edit its extra parameters.
Each of the supported players can have up to 11 sets of extra parameters (the first one is the default).
The user can add (“a”) a new parameter, edit (“e”) an existing set and delete (“x” or “DEL”) one.
When all desired parameter sets are already defined, using the -ap (–active-player-param-id) command line parameter can activate the set that corresponds to the number specified. The number to use for any given set can be retrieved using the -lp (–list-player-parameters) command line parameter.
While PyRadio is running, the user can change the parameters set used by the player using the “Player Extra Parameters” window, by pressing “Z”.
If playback is on, changing the player’s parameters will make the player restart the playback so that the new parameters get used.
Note: Any changes made this way will not be saved but will be in effect until PyRadio terminates.
Most radio stations use plain old http protocol to broadcast, but some of them use https.
Experience has shown that playing a https radio station depends on the combination of the station’s configuration and the player used.
If such a station fails to play, one might as well try to use http protocol to connect to it.
PyRadio provides a way to instruct the player used to do so; the “Force http connections” configuration parameter. If it is False (the default), the player will use whatever protocol the station proposes (either http or https). When changed to True, all connections will use the http protocol.
When the selected player is initialized (at program startup), it reads this configuration parameter and acts accordingly.
If the parameter has to be changed mid-session (without restarting the program), one would press “z” to display the “Connection Type” window, where the parameter’s value can be set as desired.
Note: Changes made using the “Connection Type” window are not stored; next time the program is executed, it will use whatever value the configuration parameter holds. Furthermore, changing the configuration stored value, will not affect the “working” value of the parameter.
MPV and MPlayer, when started, use their saved (or default) volume level to play any multimedia content. Fortunately, this is not the case with VLC.
This introduces a problem to PyRadio: every time a user plays a station (i.e restarts playback), even though he may have already set the volume to a desired level, the playback starts at the player’s default level.
The way to come around it, is to save the desired volume level in a way that it will be used by the player whenever it is restarted.
This is done by typing “v” right after setting a desired volume level.
MPV uses profiles to customize its behavior.
PyRadio defines a profile called “[pyradio]” in MPV’s configuration file (e.g. ~/.config/mpv/mpv.conf). This profile will be used every time playback is started.
Example:
volume=100 [pyradio] volume=50
MPlayer uses profiles to customize its behavior as well.
PyRadio defines a profile called “[pyradio]” in MPV’s configuration file (e.g. ~/.mplayer/config). This profile will be used every time playback is started.
Example:
volume=100 [pyradio] softvol=1 softvol-max=300 volstep=1 volume=50
Note: Starting with PyRadio v. 0.8.9, mplayer’s default profile will use its internal mixer to adjust its volume; this is accompliced using the “softvol=1” and “softvol-max=300” lines above. The user may choose to remove these lines from the config (to activate system-wide volume adjustment) or add them to the config (in case the profile was created by an older PyRadio version).
When a connection to a radio station has been established, the station starts sending audio data for the user to listen to.
Well, that’s obvious, right?
Yes, but this is just half of the story.
The station actually also sends identification data, audio format data, notifications, etc. Part of this non-audio data transmitted by a station is the title of the song currently playing; this is why we can have this data displayed at the bottom of the screen.
Now, not all stations send the whole set of data; most send their name, website, genre and bit rate, for example, but some may omit the website or the genre.
PyRadio can receive, decode and display this data, and even help the user to identify an unknown station. This is the way to do it:
After a connection to a station has been established (after playback has started), just press “i” to display the station’s info.
The window that appears includes the “Playlist Name” (the station name we have in the playlist) and the “Reported Name” (the name the station transmitted to us) among other fields; an example can bee seen here:
If these two names are not identical, the user can press “r” to rename the station in the playlist using the “Reported Name”. This way an unknown station (when only the URL is known) can be correctly identified (after being inserted in a playlist with a dummy station name).
PyRadio takes the concept of registers from vim, and adapts their function to its own needs. So this is how it all works.
There are 36 named registers (name is a-z, 0-9) and one unnamed register.
To copy a station to a register one would press “y” and:
To open a named register, one would press “’” (single quote) and:
To rename a named register, one would press “\r” either in the “Registers window” or while editing the register.
To clear a named register, one would press “\c” either in the “Registers window” or while editing the register.
To clear all registers, one would press “\C” either in the “Registers window” or while editing a playlist or a register.
To paste the unnamed register to a playlist or register, one would press:
PyRadio comes with 6 preconfigured (hard coded) themes:
Furthermore, three 256-color system themes (these are actual files saved in the themes installation directory) are also available:
The visual result of an applied theme greatly depends on the terminal settings (e.g. foreground and background color settings, palette used, number of colors supported, real or pseudo-transparency support, etc.)
Pressing “t” will bring up the Theme selection window, which can be used to activate a theme and set the default one.
Note: Themes that use more colors than those supported by the terminal in use, will not be present in the Theme selection window. Furthermore, if a such at theme is set as default (or requested using the “-t” command line option), PyRadio will fall-back to the “dark” theme (or the “light” theme, if the terminal supports 8 colors and default theme is set to “light_16_colors”), and will display a relevant message at program startup.
The Theme selection window will remain open after activating a theme, so that the user can inspect the visual result and easily change it, if desired. Then, when he is satisfied with the activated theme, the window will have to be manually closed (by pressing “q” or any other relevant key - pressing “?” will bring up its help).
The use of custom themes and theme editing is not implemented yet; these are features for future releases.
PyRadio themes are able to be used with a transparent background.
Pressing “T” will toggle the transparency setting and save this state in PyRadio’s configuration file (transparency is off by default).
Setting transparency on, will actually force PyRadio to not use its own background color, effectively making it to display whatever is on the terminal (color/picture/transparency). The visual result depends on terminal settings and whether a compositor is running.
When the Theme selection window is visible, a “[T]” string displayed at its bottom right corner will indicate that transparency is on.
Being a console application, PyRadio was never intended to work with a mouse.
Furthermore, when using the mouse on a console application, the result is highly dependent on the terminal used and the way it implements mouse support.
Having said that, and since the question of using the mouse with PyRadio has been risen, basic mouse support has been implemented; starting, stopping and muting the player, scrolling within the playlist and adjusting the player’s volume is now possible using the mouse.
All one has to do is enable mouse support in the “Config Window” (mouse support is disabled by default) and restart PyRadio for the change to take effect.
Then, the mouse can be used as follows:
| Action | Result |
|---|---|
| Click | Change selection |
| Double click | Start / stop the player |
| Middle click | Toggle player muting (does not work with all terminals) |
| Wheel | Scroll up / down |
| Shift-Wheel | Adjust volume (does not work with all terminals) |
PyRadio supports the following Online radio directory services:
This is a community driven effort (like wikipedia) with the aim of collecting as many internet radio and TV stations as possible.
Read more at PyRadio RadioBrowser Implementation
To access supported services, just press “O” (capital “o”) at the program’s main window.
PyRadio uses session locking, which actually means that only the first instance executed within a given session will be able to write to the configuration file.
Subsequent instances will be “locked”. This means that the user can still play stations, load and edit playlists, load and test themes, but any changes will not be recorded in the configuration file.
If for any reason PyRadio always starts in “locked mode”, one can unlock the session, using the “–unlock” command line parameter.
PyRadio will periodically (once every 10 days) check whether a new version has been released.
If so, a notification message will be displayed, informing the user about it and asking to proceed with updating the program (provided this is not a distribution package).
First thing you do is get the installation script. Open a terminal and type:
cd wget https://raw.githubusercontent.com/coderholic/pyradio/master/pyradio/install.py
or using curl:
cd curl -L https://raw.githubusercontent.com/coderholic/pyradio/master/pyradio/install.py -o install.py
Note: If you have neither wget or curl installed, or you are on Windows, just right click on this link and use your browser “Save link as” menu entry to save the file in your home folder.
Finally, execute the command:
python install.py --force
PyRadio will uninstall all previously installed versions when updated (using the -U command line parameter), so no extra steps are needed any more to house keep your system.
Adding the “-d” option to the command line will instruct PyRadio to enter Debug mode, which means that it will print debug messages to a file. This file will always reside in the user’s home directory and will be named pyradio.log.
In case of a bug or a glitch, please include this file to the issue you will open at github.
When a bug is found, please do report it by opening an issue at github, as already stated above.
In you report you should, at the very least, state your pyradio version, python version and method of installation (built from source, AUR, snap, whatever).
It would be really useful to include ~/pyradio.log in your report.
To create it, enter the following commands in a terminal:
$ rm ~/pyradio.log $ pyradio -d
Then try to reproduce the bug and exit pyradio.
Finally, include the file produced in your report.
If you are a packager and would like to produce a package for your distribution please do follow this mini guide.
First of all, make sure you declare the pacakges’s requirements to the relevant section of your manifest (or whatever) file. These are:
After that, you will have to modify some files, because PyRadio is able to update and uninstall itself, when installed from source. This is something you do not want to be happening when your package is used; PyRadio should be updated and uninstalled using the distro package manager.
In order to accomplice that, you just have to change the distro configuration parameter in the config file. PyRadio will read this parameter and will disable updating and uninstalling, when set to anything other than “None”. So, here’s how you do that:
Once you are in the sources top level directory (typically “pyradio”), you execute the command:
sed -i 's/distro = None/distro = YOUR DISTRO NAME/' pyradio/config
Then you go on to produce the package as you would normally do.
For example, an Arch Linux packager would use this command:
sed -i 's/distro = None/distro = Arch Linux/' pyradio/config
The distro name you insert here will appear in PyRadio’s “Configuration Window”. In addition to that it will appear in the log file, so that I know where the package came from while debugging.
Having said that, if you are not packaging for a specific distribution, please do use something meaningful (for example, using “xxx” will do the job, but provides no useful information).
PyRadio uses code from the following projects:


Include details of my future team and the reflection on the personality test results.
Include the link to GitHub repository and the comment on the audit trail.
Include the description of my project idea and the discussion supporting it.
Include the description and the discussion of two technological areas.
Include the description of the daily work from the job that I desire.
Include the reflection based on teammates' feedbacks and the use of feedbacks.


Brian's Quiz Board
What standard is javascript based on?
JS
ECMAScript
C++
Java
Who designed Javascript?
Chris Beard
John Resig
Mitchell Baker
Brendan Eich
Which one is not a form input type?
Radio buttons
Check boxes
Slides
Date


--- layout: "page" title: "My projects" generator: "pagination" provider: "site.projects" max_page: 9 ---
{{ project.description }}


The difference between Git and Github is: Git is a version-control program that you download onto your computer. It lives locally on your computer and is run in Terminal. When you use terms like git init, git add . and git commit -m "message of changes implemented here", that is Git. Version control is especially awesome for coders because using git can be directly linked from the coding platform terminal thats on your local computer. Coders can share their work and can discuss changes before they are fully implemented on to their main work.
Git helps with tracking changes by allowing you to constantly make incremental changes to your code without messing up the original code written. Its kind of like adobe photoshop, where you draw a base and keep adding changes (layers) such as colours and shading without touching the original.Once you're happy with the drawing, you can merge all the layers to the original. Thats similarly what you can do with git.
Github is not on your computer but lives remotely in the Galaxy. The internet. You can store and access your work online. It helps to save your work and make improvements without changing the original code on the master branch that you're currently happy with. You can create multiple branches on the same code, write the changes made to the original, and keep making improvements in different repositories until satisfied enough to add to the original. Its a great way to make changes without actually changing the original code. That way you can keep track of the changes and not get any new bugs embedded in the original. You'll easily know where the bug is, in the new repository.


Demos
Home
|
Services
|
Contact Us
|
Dear Lili, I wanted to say hi, Congrats, Muki
for x = 10 to 1 { print(x); }
Our Service
Contact Us


base module¶
Summary¶
Provide base classes for solvers, problems, and oracles.
Listing¶
Solver : class Problem : class Oracle : class Solution : class
-
class
base.
Oracle
(fixed_factors)¶ Bases:
object
Base class to implement simulation oracles (models) featured in simulation-optimization problems.
-
name
¶ name of oracle
- Type
string
- Parameters
fixed_factors (dict) – dictionary of user-specified oracle factors
-
check_factor_datatype
(factor_name)¶ Determine if a factor’s data type matches its specification.
- Returns
is_right_type – indicates if factor is of specified data type
- Return type
-
check_simulatable_factor
(factor_name)¶ Determine if a simulation replication can be run with the given factor.
- Parameters
factor_name (string) – name of factor for dictionary lookup (i.e., key)
- Returns
is_simulatable – indicates if oracle specified by factors is simulatable
- Return type
-
check_simulatable_factors
()¶ Determine if a simulation replication can be run with the given factors.
- Returns
is_simulatable – indicates if oracle specified by factors is simulatable
- Return type
-
replicate
(rng_list)¶ Simulate a single replication for the current oracle factors.
- Parameters
rng_list (list of rng.MRG32k3a objects) – rngs for oracle to use when simulating a replication
- Returns
responses (dict) – performance measures of interest
gradients (dict of dicts) – gradient estimate for each response
-
-
class
base.
Problem
(fixed_factors, oracle_fixed_factors)¶ Bases:
object
Base class to implement simulation-optimization problems.
-
name
¶ name of problem
- Type
string
-
minmax
¶ indicator of maximization (+1) or minimization (-1) for each objective
- Type
tuple of int (+/- 1)
-
constraint_type
¶ - description of constraints types:
“unconstrained”, “box”, “deterministic”, “stochastic”
- Type
string
-
variable_type
¶ - description of variable types:
“discrete”, “continuous”, “mixed”
- Type
string
-
budget
¶ max number of replications (fn evals) for a solver to take
- Type
int > 0
-
oracle
¶ associated simulation oracle that generates replications
- Type
Oracle object
-
rng_list
¶ list of RNGs used to generate a random initial solution or a random problem instance
- Type
list of rng.MRG32k3a objects
- Parameters
-
attach_rngs
(rng_list)¶ Attach a list of random-number generators to the problem.
- Parameters
rng_list (list of rng.MRG32k3a objects) – list of random-number generators used to generate a random initial solution or a random problem instance
-
check_deterministic_constraints
(x)¶ Check if a solution x satisfies the problem’s deterministic constraints.
-
deterministic_objectives_and_gradients
(x)¶ Compute deterministic components of objectives for a solution x.
- Parameters
x (tuple) – vector of decision variables
- Returns
det_objectives (tuple) – vector of deterministic components of objectives
det_objectives_gradients (tuple) – vector of gradients of deterministic components of objectives
-
deterministic_stochastic_constraints_and_gradients
(x)¶ Compute deterministic components of stochastic constraints for a solution x.
- Parameters
x (tuple) – vector of decision variables
- Returns
det_stoch_constraints (tuple) – vector of deterministic components of stochastic constraints
det_stoch_constraints_gradients (tuple) – vector of gradients of deterministic components of stochastic constraints
-
factor_dict_to_vector
(factor_dict)¶ Convert a dictionary with factor keys to a vector of variables.
- Parameters
factor_dict (dictionary) – dictionary with factor keys and associated values
- Returns
vector – vector of values associated with decision variables
- Return type
-
get_random_solution
(rand_sol_rng)¶ Generate a random solution for starting or restarting solvers.
- Parameters
rand_sol_rng (rng.MRG32k3a object) – random-number generator used to sample a new random solution
- Returns
x – vector of decision variables
- Return type
-
response_dict_to_objectives
(response_dict)¶ Convert a dictionary with response keys to a vector of objectives.
- Parameters
response_dict (dictionary) – dictionary with response keys and associated values
- Returns
objectives – vector of objectives
- Return type
-
response_dict_to_stoch_constraints
(response_dict)¶ Convert a dictionary with response keys to a vector of left-hand sides of stochastic constraints: E[Y] >= 0
- Parameters
response_dict (dictionary) – dictionary with response keys and associated values
- Returns
stoch_constraints – vector of LHSs of stochastic constraint
- Return type
-
simulate
(solution, m=1)¶ Simulate m i.i.d. replications at solution x.
- Parameters
solution (Solution object) – solution to evalaute
m (int) – number of replications to simulate at x
-
-
class
base.
Solution
(x, problem)¶ Bases:
object
Base class for solutions represented as vectors of decision variables and dictionaries of decision factors.
-
rng_list
¶ rngs for oracle to use when running replications at the solution
- Type
list of rng.MRG32k3a objects
-
det_objectives_gradients
¶ gradients of deterministic components added to objectives
- Type
tuple of tuples (# objectives x dimension)
-
det_stoch_constraints_gradients
¶ gradients of deterministics components added to LHS stochastic constraints
- Type
tuple (# stochastic constraints x dimension)
-
objectives
¶ objective(s) estimates from each replication
- Type
numpy array (# replications x # objectives)
-
objectives_gradients
¶ gradient estimates of objective(s) from each replication
- Type
numpy array (# replications x # objectives x dimension)
-
stochastic_constraints
¶ stochastic constraint estimates from each replication
- Type
numpy array (# replications x # stochastic constraints)
-
stochastic_constraints_gradients
¶ gradient estimates of stochastic constraints from each replication
- Type
numpy array (# replications x # stochastic constraints x dimension)
- Parameters
x (tuple) – vector of decision variables
problem (Problem object) – problem to which x is a solution
-
attach_rngs
(rng_list, copy=True)¶ Attach a list of random-number generators to the solution.
- Parameters
rng_list (list of rng.MRG32k3a objects) – list of random-number generators used to run simulation replications
-
pad_storage
(m)¶ Append zeros to numpy arrays for summary statistics.
- Parameters
m (int) – number of replications to simulate
-
recompute_summary_statistics
()¶ Recompute summary statistics of the solution.
-
-
class
base.
Solver
(fixed_factors)¶ Bases:
object
Base class to implement simulation-optimization solvers.
-
name
¶ name of solver
- Type
string
-
objective_type
¶ - description of objective types:
“single” or “multi”
- Type
string
-
constraint_type
¶ - description of constraints types:
“unconstrained”, “box”, “deterministic”, “stochastic”
- Type
string
-
variable_type
¶ - description of variable types:
“discrete”, “continuous”, “mixed”
- Type
string
-
rng_list
¶ list of RNGs used for the solver’s internal purposes
- Type
list of rng.MRG32k3a objects
-
solution_progenitor_rngs
¶ list of RNGs used as a baseline for simulating solutions
- Type
list of rng.MRG32k3a objects
- Parameters
fixed_factors (dict) – dictionary of user-specified solver factors
-
attach_rngs
(rng_list)¶ Attach a list of random-number generators to the solver.
- Parameters
rng_list (list of rng.MRG32k3a objects) – list of random-number generators used for the solver’s internal purposes
-
check_factor_datatype
(factor_name)¶ Determine if a factor’s data type matches its specification.
- Parameters
factor_name (string) – string corresponding to name of factor to check
- Returns
is_right_type – indicates if factor is of specified data type
- Return type
-
check_solver_factor
(factor_name)¶ Determine if the setting of a solver factor is permissible.
- Parameters
factor_name (string) – name of factor for dictionary lookup (i.e., key)
- Returns
is_permissible – indicates if solver factor is permissible
- Return type
-
check_solver_factors
()¶ Determine if the joint settings of solver factors are permissible.
- Returns
is_simulatable – indicates if solver factors are permissible
- Return type
-
create_new_solution
(x, problem, crn_across_solns)¶ Create a new solution object with attached rngs primed to simulate replications.
-
rebase
(n_reps)¶ Rebase the progenitor rngs to start at a later subsubstream index.
- Parameters
n_reps (int >= 0) – substream index to skip to
-
solve
(problem, crn_across_solns)¶ Run a single macroreplication of a solver on a problem.
- Parameters
problem (Problem object) – simulation-optimization problem to solve
crn_across_solns (bool) – indicates if CRN are used when simulating different solutions
- Returns
recommended_solns (list of Solution objects) – list of solutions recommended throughout the budget
intermediate_budgets (list of ints) – list of intermediate budgets when recommended solutions changes
-


This unit is the largest with large numbers of personnels to one of the component organs of the centre, and has responsility for meeting the nursing needs of the University Community and its environs. The Unit renders its services/oversees other satelite clinics.
These are - MAin Campus, Kongo Campus, I.A.R., NAPRI, SBRS Funtua, DAC, Clinics Samaru, Mando Kaduna, Kabba, then Samaru clinic where OTS (Others) in the Community are seen.
The Unit render direct services to the public in addition to certain specialized services (clinics), such as:
Consultants do come from ABUTH to the inpatient in these clinics assigned by nurses.
| Main Campus | 44 Nurses (11 CNOs, 2 Contract CNOs) |
| Kongo Campus | 15 Nurses |
| I.A.R. | 2 Nurses |
| NAPRI | 2 Nurses |
| Mando | 1 Nurse (CNO) |
| Kabba | 1 Nurse (PNO) |
| DAC Samaru | 1 Nurse (CHO) |
| SBRS Funtua | 1 Nurse (CNO) Contract |
| Training / Course | 2 Nurses on Part-time |
| 1 Nurse on Sabbatical appointment | |
| 1 Nurse on Leave of Absent | |
| 6 Nurses on Various courses |
The staff strength above is in adequate to cater for the twenty four hours shifting duties, public holidays and other emergencies that may arise. Thus, there is need to add more hands.


DR. DOLITTLE 2 A film review by Steve Rhodes Copyright 2001 Steve Rhodes RATING (0 TO ****): **
In DR. DOLITTLE 2, Eddie Murphy repeats his role as the sweet doctor who has the gift of gab with animals. With female humans, especially his now dating, 16-year-old daughter Charisse (Raven-Symone), Dr. Dolittle is anything but the alpha male that he tries to get his animal friends to be.
A sometimes cute but too often flat tale, this sequel tries to get by with easy to devise, recycled humor ranging from piles of pigeon poop to a large, gaseous bear (voiced by Steve Zahn). Even the music choices lack originality. How many movies have featured "I Will Survive" recently? There are so many that I've lost count.
Sometimes redoing old themes can be funny. The best of these is a takeoff on THE GODFATHER, in which a beaver offers the doctor some fish in return for future services. When he refuses to accept the fish, Joey the Raccoon (voiced by Michael Rapaport) warns him, "Hey, the beaver offers you fish. You take the fish!"
Using the canonical kids' movie theme, the story features evil and unscrupulous big businessmen -- Are there any other kind in kids' shows? -- who are out to despoil the environment. Specifically, these guys, played by Jeffrey Jones and Kevin Pollak, work for a lumber company that is going to cut down trees so that people can live in houses. Shocking.
Still, some of the animals are cute. Pepito (voiced by Jacob Vargas), for example, is a chameleon with a "broken blender." No matter how hard he tries to switch color schemes, he just stays an icky green. And some of the scenes, like one involving a dog support group, in which the doctor has the dogs repeat in unison, "I am somebody's best friend," will bring a smile to your face. The result is an innocuous, but far from inspired film. Wait for video when the rental price will better reflect the value of the entertainment.
DR. DOLITTLE 2 runs 1:21. It is rated PG for language and crude humor and would be acceptable for most kids.
My son Jeffrey, age 12, gave it ***, liking the animal humor and the funny musical numbers. His cousins, Jacob, age 8, and Matthew, age 5, both gave it *** as well. Jacob's favorite part was "the bear going to the bathroom," and Matthew liked the talking bear parts best. None of them laughed much during the movie, but they smiled a lot.
The film is playing now in nationwide release in the United States. In the Silicon Valley, it is showing at the AMC and the Century theaters.
Web: http://www.InternetReviews.com Email<EMAIL_ADDRESS>Want free reviews and weekly movie and video recommendations via Email? Just send me a letter with the word "subscribe" in the subject line.
========== X-RAMR-ID: 28789 X-RT-AuthorID: 1271 X-RT-TitleID: 1108369 X-RT-RatingText: 2/4
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


class Solution: def getProbability(self, balls: List[int]) -> float: n = sum(balls) // 2 def count_comb(arr): total = math.factorial(sum(arr)) for a in arr: total /= math.factorial(a) return total total = ans = 0 for A in itertools.product(*[range(ball + 1) for ball in balls]): if sum(A) == n: B = [balls[i] - a for i, a in enumerate(A)] comb = count_comb(A) * count_comb(B) total += comb if sum(a > 0 for a in A) == sum(b > 0 for b in B): ans += comb return ans / total


This is the WordListsApi API
http://api.wordnik.com/v4/wordLists.{format}
POST
WordList to create
The auth token of the logged-in user, obtained by calling /account.{format}/authenticate/{username} (described above)


@blackjok3r you had off-handedly asked about pools using LABS daemon the other day:
genie@chickenpool_wallets:~$ komodo-cli -ac_name=MGNX cleanwallettransactions
{
"total_transactons": 56339,
"remaining_transactons": 6779,
"removed_transactions": 49560
}
yeah, it can make a difference


Raiffeisen Bank Aval to pay bail for its chairman in refinancing loan theft case
Pysaruk will continue to work as Chairman of the Board of Raiffeisen Bank Aval.
Kyiv-based Raiffeisen Bank Aval, Ukraine's largest bank with foreign capital in terms of assets, will pay UAH 5 million (US$206,271) in bail for its Board Chairman Oleksandr Pysaruk by decision of the High Anti-Corruption Court in the case of theft of a refinancing loan issued to VAB Bank.
"Raiffeisen Bank Aval informs that it will immediately take corresponding measures to provide the required bail according to the Court's decision," the bank's press service said on November 15.
At the same time, Pysaruk will continue his work as Chairman of the Board of Raiffeisen Bank Aval, it said.
"We are confident that Mr. Pysaruk will be cleared of any suspicion of wrongdoing and that he has always adhered to the highest professional and ethical standards, both at Raiffeisen Bank Aval and for many years at the IMF and other international institutions," Martin Grüll, Chairman of the Supervisory Board of Raiffeisen Bank Aval, added.
As UNIAN reported earlier, the High Anti-Corruption Court of Ukraine, within the case of VAB Bank refinancing theft, set a UAH 5 million bail for Pysaruk, who served as first deputy governor of the National Bank of Ukraine (NBU) during VAB Bank's bankruptcy.
The National Anti-corruption Bureau of Ukraine accused Pysaruk of conspiracy with VAB Bank owners when issuing a stabilization loan to the bank. However, the defense says the prosecution is based on value judgments.


Copyright © 2019 W3C® (MIT, ERCIM, Keio, Beihang). W3C liability, trademark and permissive document license rules apply.
This document collects use cases and requirements for improved support for timed events related to audio or video media on the web, where synchronization to a playing audio or video media stream is needed, and makes recommendations for new or changed web APIs to realize these requirements. The goal is to extend the existing support in HTML for text track cue events to add support for dynamic content replacement cues and generic metadata events that drive synchronized interactive media experiences, and improve the timing accuracy of rendering of web content intended to be synchronized with audio or video media playback.
This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at https://www.w3.org/TR/.
The Media & Entertainment Interest Group may update these
use cases and requirements over time. Development of new web
APIs based on the requirements described here, for example,
DataCue
, will proceed in the Web Platform Incubator Community Group
(WICG), with the goal of eventual standardization within a
W3C Working
Group. Contributors to this document are encouraged to
participate in the WICG. Where the requirements described here
affect the HTML specification, contributors will follow up with
WHATWG. The Interest Group
will continue to track these developments and provide input and
review feedback on how any proposed API meets these
requirements.
This document was published by the Media & Entertainment Interest Group as an Interest Group Note.
GitHub Issues are preferred for discussion of this specification.
Publication as an Interest Group Note does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.
The disclosure obligations of the Participants of this group are described in the charter.
This document is governed by the 1 March 2019 W3C Process Document.
There is a need in the media industry for an API to support
metadata events synchronized to audio or video media,
specifically for both out-of-band event
streams and in-band discrete events (for example,
MPD and emsg
events in MPEG-DASH). These media timed events can be used to support use cases
such as dynamic content replacement, ad insertion, or
presentation of supplemental content alongside the audio or
video, or more generally, making changes to a web page, or
executing application code triggered from JavaScript events, at
specific points on the
media timeline of an audio or video media stream.
The following terms are used in this document:
The following terms are defined in [HTML]:
activeCues
currentTime
enter
exit
oncuechange
onenter
onexit
TextTrack
TextTrackCue
timeupdate
setTimeout()
setInterval()
requestAnimationFrame()
The following term is defined in [HR-TIME]:
The following term is defined in [WEBVTT]:
Media timed events carry metadata that is related to points in time, or regions of time on the media timeline, which can be used to trigger retrieval and/or rendering of web resources synchronized with media playback. Such resources can be used to enhance user experience in the context of media that is being rendered. Some examples include display of social media feeds corresponding to a live video stream such as a sporting event, banner advertisements for sponsored content, accessibility-related assets such as large print rendering of captions, and display of track titles or images alongside an audio stream.
The following sections describe a few use cases in more detail.
A media content provider wants to allow insertion of content, such as personalised video, local news, or advertisements, into a video media stream that contains the main program content. To achieve this, media timed events can be used to describe the points on the media timeline, known as splice points, where switching playback to inserted content is possible.
The Society for Cable and Televison Engineers (SCTE) specification "Digital Program Insertion Cueing for Cable" [SCTE35] defines a data cue format for describing such insertion points. Use of these cues in MPEG-DASH and HLS streams is described in [SCTE35], sections 12.1 and 12.2.
A media content provider wants to provide visual information alongside an audio stream, such as an image of the artist and title of the current playing track, to give users live information about the content they are listening to.
HLS timed metadata [HLS-TIMED-METADATA] uses in-band ID3 metadata to carry the artist and title information, and image content. RadioVIS in DVB ([DVB-DASH], section 9.1.7) defines in-band event messages that contain image URLs and text messages to be displayed, with information about when the content should be displayed in relation to the media timeline.
A media streaming server uses media timed events to send control messages to media client library, such as dash.js. Typically segmented streaming protocols such as HLS and MPEG-DASH make use of a manifest document that informs the client of the available encodings of a media stream, e.g., the Media Presentation Description (MPD) document in [MPEGDASH].
Should any of the content in the manifest document need to
change, the client should refresh it by requesting an updated
copy from the server. Section 5.10.4 of [MPEGDASH] describes
an MPEG-DASH specific event that is used to notify a client
application. An in-band emsg
event is
used as an alternative to setting a cache duration in the
response to the HTTP request for the manifest, so the client
can refresh the MPD when it actually changes, as opposed to
waiting for a cache duration expiry period to elapse. This
also has the benefit of reducing the load on HTTP servers
caused by frequent server requests.
Reference: M&E IG call 1 Feb 2018: Minutes, [DASH-EVENTING].
A user records footage with metadata, including geolocation, on a mobile video device, e.g., drone or dashcam, to share on the web alongside a map, e.g., OpenStreetMap.
[WEBVMT] is an open format for metadata cues, synchronized with a timed media file, that can be used to drive an online map rendered in a separate HTML element alongside the media element on the web page. The media playhead position controls presentation and animation of the map, e.g., pan and zoom, and allows annotations to be added and removed, e.g., markers, at specified times during media playback. Control can also be overridden by the user with the usual interactive features of the map at any time, e.g., zoom. Concrete examples are provided by the tech demos at the WebVMT website.
A video image analysis system processes a media stream to detect and recognize objects shown in the video. This system generates metadata describing the objects, including timestamps that describe the when the objects are visible, together with position information (e.g., bounding boxes). A web application then uses this timed metadata to overlay labels and annotations on the video using HTML and CSS.
During a live media presentation, dynamic and unpredictable events may occur which cause temporary suspension of the media presentation. During that suspension interval, auxiliary content such as the presentation of UI controls and media files, may be unavailable. Depending on the specific user engagement (or not) with the UI controls and the time at which any such engagement occurs, specific web resources may be rendered at defined times in a synchronized manner. For example, a multimedia A/V clip along with subtitles corresponding to an advertisement, and which were previously downloaded and cached by the UA, are played out.
This section describes gaps in existing existing web platform capabilities needed to support the use cases and requirements described in this document. Where applicable, this section also describes how existing web platform features can be used as workarounds, and any associated limitations.
The DataCue
API has been previously discussed
as a means to deliver in-band event data to
web applications, but this is not implemented in all of the
main browser engines. It is
included in the 18 October 2018 HTML 5.3 draft
[HTML53-20181018], but is
not included in [HTML]. See discussion
here and notes on implementation status
here.
WebKit
supports a DataCue
interface that extends
HTML5 DataCue
with two attributes to support
non-text metadata, type
and
value
.
interface DataCue : TextTrackCue {
attribute ArrayBuffer data; // Always empty
// Proposed extensions.
attribute any value;
readonly attribute DOMString type;
};
type
is a string identifying the type of
metadata:
WebKit DataCue metadata
types |
|
|---|---|
"com.apple.quicktime.udta" |
QuickTime User Data |
"com.apple.quicktime.mdta" |
QuickTime Metadata |
"com.apple.itunes" |
iTunes metadata |
"org.mp4ra" |
MPEG-4 metadata |
"org.id3" |
ID3 metadata |
and value
is an object with the metadata item
key, data, and optionally a locale:
value = {
key: String
data: String | Number | Array | ArrayBuffer | Object
locale: String
}
Neither [MSE-BYTE-STREAM-FORMAT-ISOBMFF]
nor [INBANDTRACKS] describe
handling of emsg
boxes.
On resource constrained devices such as smart TVs and streaming sticks, parsing media segments to extract event information leads to a significant performance penalty, which can have an impact on UI rendering updates if this is done on the UI thread. There can also be an impact on the battery life of mobile devices. Given that the media segments will be parsed anyway by the user agent, parsing in JavaScript is an expensive overhead that could be avoided.
[HBBTV] section 9.3.2 describes a
mapping between the emsg
fields described
above and the
TextTrack
and
DataCue
APIs. A
TextTrack
instance is created for each event
stream signalled in the MPD document (as identified by the
schemeIdUri
and value
), and the
inBandMetadataTrackDispatchType
TextTrack
attribute contains the
scheme_id_uri
and value
values.
Because HbbTV devices include a native DASH client, parsing
of the MPD document and creation of the
TextTrack
s is done by the user agent, rather
than by application JavaScript code.
In browsers, non media web rendering is handled through
repaint operations at a rate that generally matches the
display refresh rate (e.g., 60 times per second), following
the user's wall clock. A web application can schedule actions
and render web content at specific points on the user's wall
clock, notably through Performance.now()
,
setTimeout()
,
setInterval()
, and
requestAnimationFrame()
.
In most cases, media rendering follows a different path, be it because it gets handled by a dedicated background process or by dedicated hardware circuitry. As a result, progress along the media timeline may follow a clock different from the user's wall clock. [HTML] recommends that the media clock approximate the user's wall clock but does not require it to match the user's wall clock.
To synchronize rendering of web content to a video with frame accuracy, a web application needs:
The following sub-sections discusses mechanisms currently available to web applications to track progress on the media timeline and render content at frame boundaries.
Cues (e.g.,
TextTrackCue
, or VTTCue
)
are units of time-sensitive data on a
media timeline [HTML]. The
time marches on steps in [HTML] control the firing of cue
events during media playback.
Time marches on requires a
timeupdate
event to be fired at the
media element between 15 and 250 milliseconds since the
last such event, and this requirement therefore specifies
the rate at which
time marches on is executed during playback. In
practice it has
been found that the timing varies between browser
implementations.
There are two methods a web application can use to handle cues:
oncuechange
handler function to the
TextTrack
and inspect the track's
activeCues
list. Because
activeCues
contains the list of cues
that are active at the time that
time marches on is run, it is possible for cues to
be missed by a web application using this method, where
cues appear on the
media timeline between successive executions of
time marches on during media playback. This may
occur if the cues have short duration, or by a
long-running event handler function.
onenter
and
onexit
handler functions to each cue.
The
time marches on steps guarantee that
enter
and
exit
events will be fired for all
cues, including those that appear on the
media timeline between successive executions of
time marches on during media playback. This method
is only possible for cues created by the web
application, i.e., VTTCue
objects, and not cue objects created by the user agent.
An issue with handling of text track and data cue events in HbbTV was reported in 2013. HbbTV requires the user agent to implement an MPEG-DASH client, and so applications must use the first of the above methods for cue handling, which means that applications can miss cues as described above.
timeupdate
events from the media
element
Another approach to synchronizing rendering of web
content to media playback is to use the
timeupdate
event, and for the web
application to manage the media timed
events to be triggered, rather than use the text track
cue APIs in [HTML]. This approach has the same
synchronization limitations as described above due to the
250 millisecond update rate specified in
time marches on, and so is
explicitly discouraged in [HTML]. In addition, the timing
variability of
timeupdate
events between browser engines
makes them unreliable for the purpose of synchronized
rendering of web content.
Synchronization accuracy can be improved by polling the
media element's
currentTime
property from a
setInterval()
callback, or by using
requestAnimationFrame()
for greater
accuracy. This technique can be useful in where content
should be animated smoothly in synchronicity with the
media, for example, rendering a playhead position marker in
an audio waveform visualization, or displaying web content
at specific points on the
media timeline. However, the use of
setInterval()
or
requestAnimationFrame()
for media
synchronized rendering is CPU intensive.
[HTML] does not expose any precise
mechanism to assess the time, from a user's wall clock
perspective, at which a particular media frame is going to
be rendered. A web application may only infer this
information by looking at the
media element's
currentTime
property to infer the frame
being rendered and the time at which the user will see the
next frame. This has several limitations:
currentTime
is represented as a
double
value, which does not allow to
identify individual frames due to rounding errors. This
is a known
issue.
currentTime
is updated at a user-agent
defined rate (typically the rate at which
time marches on runs), and is kept stable while
scripts are running. When a web application reads
currentTime
, it cannot tell when this
property was last updated, and thus cannot reliably
assess whether this property still represents the frame
currently being rendered.
This section describes recommendations from the Media & Entertainment Interest Group for the development of a generic media timed event API, and associated synchronization considerations.
The API should allow web applications to subscribe to
receive specific event streams by event type. For example, to
support MPEG-DASH emsg
and MPD events, the API
should allow subscription by id
and (optional)
value
. This is to make receiving events opt-in
from the application point of view. The user agent should
deliver only those events to a web application for which the
application has subscribed. The API should also allow web
applications to unsubscribe from specific event streams by
event type.
To be able to handle out of band events, including
MPEG-DASH MPD events, the API should allow web applications
to create events to be added to the
media timeline, to be triggered by the user agent. The
API should allow the web application to provide all necessary
parameters to define the event, including start and end
times, event type, and data payload. The payload should be
any data type (e.g., the set of types supported by the WebKit
DataCue
). For MPEG-DASH MPD events, the event
type is defined by the id
and (optional)
value
fields.
For those events that the application has subscribed to receive, the API should:
The API should provide guarantees that no events can be missed during linear playback of the media.
We recommend updating [INBANDTRACKS] to describe handling of in-band media timed events supported on the web platform, following a registry approach with one specification per media format that describes the event details for that format.
We recommend that browser engines support MPEG-DASH
emsg
in-band events and MPD out-of-band events, as part of their support for
the MPEG Common Media Application Format (CMAF)
[MPEGCMAF].
In order to achieve greater synchronization accuracy between media playback and web content rendered by an application, the time marches on steps in [HTML] should be modified to allow delivery of media timed event start time and end time notifications within 20 milliseconds of their positions on the media timeline.
Additionally, to allow such synchronization to happen at
frame boundaries, we recommend introducing a mechanism that
would allow a web application to accurately predict, using
the user's wall clock, when the next frame will be rendered
(e.g., as done in the
Web Audio API). The same outcome could perhaps be
achieved through a mechanism similar to
requestAnimationFrame()
that would allow to
couple rendering of non media web content and rendering of
the next media frame.
Thanks to François Daoust, Charles Lo, Nigel Megitt, Jon Piesing, Rob Smith, and Mark Vickers for their contributions and feedback on this document.


Deployments should be boring with no surprises
Deployments should be fast with minimal (or no) downtime
Deployments should be idempotently repeatable
Infrastructure as code: One source of truth
Remote Execution
Configuration Management
Parallel, Lightweight
Flexible
Python
YAML + Jinja
ZeroMQ + MsgPack
Master / Masterless
Linux, xBSD, Solaris, Windows
> wget -O install_salt.sh https://bootstrap.saltstack.com
> sudo sh install_salt.sh <args>
Install Master/Minion, preseed keys, set minion id + master dns, (not) start daemons
By hand or automated via Vagrant plugin, Terraform, AWS bootstrap shell script, ...
gitfs_provider: gitpython
gitfs_remotes:
- https://github.com/saltstack-formulas/postgres-formula.git
fileserver_backend:
- roots
- git
file_roots:
base:
- /srv/salt/states
- /srv/salt/formulas/sun-java-formula
pillar_roots:
base:
- /srv/salt/pillars
ext_pillar:
- git: master http://stash/project/conf.git root=subdirectory
log_level: debug
master: salt-master.etecture.com
log_level: debug
mine_interval: 1
grains:
roles:
- webserver
somekey:
- somevalue
id: some-node-name
> salt '*' cmd.run 'uname -a'
> salt 'minion*' disk.usage
> salt -G 'roles:webserver' pkg.install vim
> salt -C 'G@os:Ubuntu and G@roles:webserver' network.interfaces
include:
- some-other-state
app-running:
service.running:
- name: apache
- enable: True
- require:
- file: apache-config
Requistes match both state ID and name property
apache:
user: www-data
group: www-data
modules:
enabled:
- rewrite
disabled:
- php5
sites:
test:
enabled: true
ServerName: test.com
/etc/apache2/sites.available/somevhost.conf:
file.managed:
source: salt://vhost.tmpl
context: ...
Jinja2 Syntax
Conditional, Loops, Variables, Imports, ...
Template model is defined with context property in state
Pillar data is only synched to matching minions, state files to all machines.
Ready to use "formulas" or blueprints, for managing e.g. services, system configuration or more complex scenarios like autoscaling or docker orchestration
is very flexible and performant
can be combined very well with other tools
supports a good number of OSs and cloud providers
can be daunting at first, lots (and lots) of documentation
reasonably sized community, growing steadily


The ruins of Swansea Castle are the most striking reminder of the city’s medieval heritage. This is actually the ‘New’ Castle, built in the late 13th century to replace the ‘Old’ Castle (founded around 1106) nearby. The castle displayed the power and status of the Anglo-Norman de Briouze family, who ruled Swansea and the Marcher Lordship of Gower. As well as a large hall on the first floor, the castle boasted an inside latrine (toilet), and also contained a dungeon where criminals and opponents of Anglo-Norman rule were held. A surviving document tells us that the dungeon was supplied with new locks and keys in 1535. In the 18th century, a debtors’ prison was housed in the large square tower of the castle.


Open Search is a BIG deal!
... technically not THAT big a deal.
1. To improve the service
2. Targeted advertisements
Lawsuits over autocompletions
- Lawsuit France (2010): "cnfdi arnaque"
- Lawsuit Italy (2011): "[name] truffatore"
- Lawsuit Germany (2012): "bettina wulff prostituierte"
- Lawsuit Japan (2012): shows crimes by a man with the same name...
- Google update (2013) filters offensive completions for person names.
Autocompletion Stereotypes
Conclusion
-
Better prediction for longer queries...
- ... but need another key-stroke for short queries
- Improvements:
- Ask users about the usefulness of autocompletions
- Ask users about the ethics of autocompletions
- Linguistic knowledge to improve predictions
- PageRank and Spam scores to improve ethics
(links can also be manipulated)
-
arXiv 2007.02620v2
Open Search Outlook
- Research challenge: Content beats behavioral data!
- Do NOT track users/queries/clicks;
- Others (Ecosia, Qwant, Startpage) will add cool features.
- Research challenge: Federated search beats monolithic engines
Thanks
/


{include file="layout/c_style" /} {include file="layout/c_style" /} {include file="layout/c_corejs" /}


Click any of the teams below to see its members and information about it.
Try queries like these: august 2012
| created > 2012-8-15
Here's everything you can use: name
| created
| Key | Name | Donation Total |
|---|


Did The New Ferrari Roma Come From The Maserati Alfieri?
Debuting 5 years ago, the Maserati Alfieri concept has a lot in common with the newest Ferrari GT.
by Jack BookerDespite Ferrari’s design being heavily criticized in recent years, most people agree that the new Ferrari Roma is one of the best looking Ferraris in a long time. Maranello’s latest twin-turbo V8 GT appears sleek and reserved, and it is being compared to other low-key supercars such as Aston Martins or Porsches. Yes, these days you can be classy and minimal while also having 612 Horsepower, launching from 0-62mph in 3.4 seconds, and sounding like an Italian monster. This is all thanks to the sweeping elegant design of the Roma.
Though the new F-car is not as flashy as the recent SF90 Stradale, there is definitely a strong essence of Ferrari design language on display. The headlights and nose are very similar to the topless Ferrari Monza, which harkens to Ferraris of the 60s, and the big back end with quad tail lights and exhaust resemble other GT models like the 612 or 456. So yes, this is a real Ferrari with real Ferrari numbers. Or is it?
When in Roma...
Rumor has it that the newest prancing horse has a more direct Italian influence, only it isn’t technically from Ferrari. Yes, we have gotten word that the Ferrari Roma came from the Maserati Alfieri, not the Ferrari Portofino as the layout and specs may suggest. The Alfieri was revealed as a concept car in 2014, and production has been delayed until 2020 when it will replace the current GranTurismo. While the Alfieri is expected with various V6 engine options, and even an plug-in hybrid version, the concept was presented with the iconic Ferrari 136 V8 Engine. But the most convincing evidence of the Ferrari Roma having Maserati roots is in comparing it’s design with the Alfieri side-by-side.
The Alfieri’s sharp LED headlights and nose, the multi-piece front splitter and front wheel arches, and the rounded rear with horizontal tail lights all favor the Ferrari Roma. After 5 years of development and a new generation of V8 Ferrari engines, it is easy to see how the Roma could have been birthed from outside Maranello. 2020 should prove us right, as the Maserati Alfieri will make its production debut.
Regardless of the origin of the Ferrari Roma, the car will sell very well. We will eventually see how this new offering compares to its class on the track and in the real world, but on paper the Roma looks very impressive. If Ferrari is going to keep making more models and increase production numbers, I’m at least glad they are stealing customers from the likes of Aston Martin and Mercedes AMG.
To see what the Ferrari community is saying about the New Ferrari Roma, check out the Roma forum at FerrariChat.com and don't miss this hot thread with pictures from the reveal in Rome. We’d love to hear your thoughts on the car, so please join the conversation!


WITNESS LIST Redistricting Committee February 16, 2000-1:30P Redistricting On: Fields, Leslie (TX State Conference of NAACP Branches), Cedar Hill Hebert, J Gerald (TX Democratic Party), Washington D.C. Korbel, George (self), San Antonio Marsden, Julia (League of Women Voters of TX), Austin Perales, Nina (Mexican American Legal Defense and Educational Fund Inc.), San Antonio Registering, but not testifying: On: Southern, David (City of Granbury), Granbury


Our team consists of 4 seperate developers, as well as our Project Manager. Creating the 'Chef Portfolio' was a collective effort from every member of the team, taking roughly 1 week to finish. Each role handles and develops different sections of the project, and this is the compiled result. Enjoy!
I (Brandon F.) was in charge of the creating the Marketing Page for the project, which consists of the home page, the about page, and all the styling that the user can see on the website. This portion of the project took 3-4 days to complete entirely, while the bare bones version was finished in roughly 1-2 days.
Schrese H. and Daniel F. developed the application portion of our project. Not only did these two do the React II portion of the project, they also did the React I portion, due to unforseen circumstances with our original team. Everything you see after you click the 'sign in' button was done by these guys, in conjunction with backend contributions from Marcellino.
Marcellino F. developed the backend (data structure) for the React II team to use. He's the one who made the database that Schrese + Daniel used to create the application itself. Marcellino worked closely with the React II team and even rewrote the database a couple times when necessary.