|
SDLXX
1.0.0
Modern C++17 wrapper for SDL
|
Class that represents a texture in an efficient driver-specific way. More...
#include <Texture.h>
Public Types | |
| enum | Access { Access::STATIC, Access::STREAMING, Access::TARGET } |
| The access pattern allowed for a texture. More... | |
| using | Format = uint32_t |
Public Member Functions | |
| Texture (std::shared_ptr< Renderer > renderer, int width, int height, Format format=UNKNOWN, Access access=Access::STATIC) | |
| Create a texture for a rendering context. More... | |
| Texture (std::shared_ptr< Renderer > renderer, const Surface &surface) | |
| Create a texture from an existing surface. More... | |
| ~Texture () | |
| Destroy the texture. More... | |
| std::tuple< Dimensions, Format, Access > | query () const |
| Query the attributes of a texture. More... | |
| Dimensions | getDimensions () const |
| Query the dimensions of a texture. More... | |
| Format | getFormat () const |
| Query the format of a texture. More... | |
| Access | getAccess () const |
| Query the actual access to the texture. More... | |
| void | setModulation (const Color &color) |
| Set an additional color value used in render copy operations. More... | |
| Color | getModulation () const |
| Get the additional color value used in render copy operations. More... | |
Static Public Attributes | |
| static const Format | UNKNOWN = 0 |
| Default pixel format. More... | |
Friends | |
| class | Renderer |
Class that represents a texture in an efficient driver-specific way.
| using sdlxx::core::Texture::Format = uint32_t |
|
strong |
The access pattern allowed for a texture.
| Enumerator | |
|---|---|
| STATIC | Changes rarely, not lockable |
| STREAMING | Changes frequently, lockable |
| TARGET | Texture can be used as a render target |
| sdlxx::core::Texture::Texture | ( | std::shared_ptr< Renderer > | renderer, |
| int | width, | ||
| int | height, | ||
| Format | format = UNKNOWN , |
||
| Access | access = Access::STATIC |
||
| ) |
Create a texture for a rendering context.
| renderer | The renderer. |
| width | The width of the texture in pixels. |
| height | The height of the texture in pixels. |
| format | The format of the texture. |
| access | One of the enumerated values in Texture::Access. |
| if | no rendering context is active, the format is unsupported, or the width or height are out of range. |
Create a texture from an existing surface.
| renderer | The renderer. |
| surface | The surface containing pixel data used to fill the texture. |
| sdlxx::core::Texture::~Texture | ( | ) |
Destroy the texture.
| Access sdlxx::core::Texture::getAccess | ( | ) | const |
Query the actual access to the texture.
| Dimensions sdlxx::core::Texture::getDimensions | ( | ) | const |
Query the dimensions of a texture.
| Format sdlxx::core::Texture::getFormat | ( | ) | const |
Query the format of a texture.
| Color sdlxx::core::Texture::getModulation | ( | ) | const |
Get the additional color value used in render copy operations.
| std::tuple<Dimensions, Format, Access> sdlxx::core::Texture::query | ( | ) | const |
Query the attributes of a texture.
| void sdlxx::core::Texture::setModulation | ( | const Color & | color | ) |
Set an additional color value used in render copy operations.
| color | The color value multiplied into copy operations. |
|
friend |
|
static |
Default pixel format.


This document describes the changes in the configuration system in astropy 0.4 and how to update code to use it.
If you never edited the configuration file in ~/.astropy/config/astropy.cfg, there is nothing for you to do. The first time you import astropy 0.4, it will automatically be replaced with the configuration file template for astropy 0.4.
If you did edit the configuration file, it will be left untouched. However, the template for astropy 0.4 will be installed as ~/.astropy/config/astropy.0.4.cfg. You can manually compare your changes to this file to determine what customizations should be brought over.
Saving configuration items from Python has been completely removed. Instead, the configuration file must be edited directly.
The location of the configuration parameters have been simplified, so they always appear in a high-level subpackage of astropy, rather than low-level file names (which were really an implementation detail that shouldn’t have been exposed to the user). On the Python side, configuration items always are referenced through a conf object at the root of a subpackage.
Some configuration items that affect the results of science calculations have been removed as configuration parameters altogether and converted to science state objects that must be changed from Python code.
The following table lists all of the moves (in alphabetical order by original configuration file location). The old names will continue to work both from Python and the configuration file for the astropy 0.4 release cycle, and will be removed altogether in astropy 0.5.
| Old config file location | Old Python location | New config file location | New Python location |
|---|---|---|---|
| [] unicode_output | UNICODE_OUTPUT | unchanged | conf.unicode_output |
| [coordinates.name_resolve] name_resolve_timeout | coordinates.name_resolve.NAME_RESOLVE_TIMEOUT | [astropy.utils.data] remote_timeout | astropy.utils.data.conf.remote_timeout |
| [coordinates.name_resolve] sesame_url | coordinates.name_resolve.SESAME_URL | removed | coordinates.name_resolve.sesame_url.get/set |
| [coordinates.name_resolve] sesame_database | coordinates.name_resolve.SESAME_DATABASE | removed | coordinates.name_resolve.sesame_database.get/set |
| [cosmology.core] default_cosmology | cosmology.core.DEFAULT_COSMOLOGY | removed | cosmology.default_cosmology.get/set |
| [io.fits] enable_record_valued_keyword_cards | io.fits.ENABLE_RECORD_VALUED_KEYWORD_CARDS | unchanged | io.fits.conf.enable_record_valued_keyword_cards |
| [io.fits] extension_name_case_sensitive | io.fits.EXTENSION_NAME_CASE_SENSITIVE | unchanged | io.fits.conf.extension_name_case_sensitive |
| [io.fits] strip_header_whitespace | io.fits.STRIP_HEADER_WHITESPACE | unchanged | io.fits.conf.strip_header_whitespace |
| [io.fits] use_memmap | io.fits.USE_MEMMAP | unchanged | io.fits.conf.use_memmap |
| [io.votable.table] pedantic | io.votable.table.PEDANTIC | [io.votable] pedantic | io.votable.conf.pedantic |
| [logger] log_exceptions | logger.LOG_EXCEPTIONS | unchanged | logger.conf.log_exceptions |
| [logger] log_file_format | logger.LOG_FILE_FORMAT | unchanged | logger.conf.log_file_format |
| [logger] log_file_level | logger.LOG_FILE_LEVEL | unchanged | logger.conf.log_file_level |
| [logger] log_file_path | logger.LOG_FILE_PATH | unchanged | logger.conf.log_file_path |
| [logger] log_level | logger.LOG_LEVEL | unchanged | logger.conf.log_level |
| [logger] log_to_file | logger.LOG_TO_FILE | unchanged | logger.conf.log_to_file |
| [logger] log_warnings | logger.LOG_WARNINGS | unchanged | logger.conf.log_warnings |
| [logger] use_color | logger.USE_COLOR | [] use_color | conf.use_color |
| [nddata.nddata] warn_unsupported_correlated | nddata.nddata.WARN_UNSUPPORTED_CORRELATED | [nddata] warn_unsupported_correlated | nddata.conf.warn_unsupported_correlated |
| [table.column] auto_colname | table.column.AUTO_COLNAME | [table] auto_colname | table.conf.auto_colname |
| [table.jsviewer] jquery_url | table.jsviewer.JQUERY_URL | unchanged | table.jsviewer.conf.jquery_url |
| [table.jsviewer] datatables_url | table.jsviewer.DATATABLES_URL | unchanged | table.jsviewer.conf.datatables_url |
| [table.pprint] max_lines | table.pprint.MAX_LINES | [] max_lines | conf.max_lines |
| [table.pprint] max_width | table.pprint.MAX_WIDTH | [] max_width | conf.max_width |
| [utils.console] use_color | utils.console.USE_COLOR | [] use_color | conf.use_color |
| [utils.data] compute_hash_block_size | astropy.utils.data.COMPUTE_HASH_BLOCK_SIZE | unchanged | astropy.utils.data.conf.compute_hash_block_size |
| [utils.data] dataurl | astropy.utils.data.DATAURL | unchanged | astropy.utils.data.conf.dataurl |
| [utils.data] delete_temporary_downloads_at_exit | astropy.utils.data.DELETE_TEMPORARY_DOWNLOADS_AT_EXIT | unchanged | astropy.utils.data.conf.delete_temporary_downloads_at_exit |
| [utils.data] download_cache_block_size | astropy.utils.data.DOWNLOAD_CACHE_BLOCK_SIZE | unchanged | astropy.utils.data.conf.download_cache_block_size |
| [utils.data] download_cache_lock_attempts | astropy.utils.data.download_cache_lock_attempts | unchanged | astropy.utils.data.conf.download_cache_lock_attempts |
| [utils.data] remote_timeout | astropy.utils.data.REMOTE_TIMEOUT | unchanged | astropy.utils.data.conf.remote_timeout |
| [vo.client.conesearch] conesearch_dbname | vo.client.conesearch.CONESEARCH_DBNAME | [vo] conesearch_dbname | vo.conf.conesearch_dbname |
| [vo.client.vos_catalog] vos_baseurl | vo.client.vos_catalog.BASEURL | [vo] vos_baseurl | vo.conf.vos_baseurl |
| [vo.samp.utils] use_internet | vo.samp.utils.ALLOW_INTERNET | [vo.samp] use_internet | vo.samp.conf.use_internet |
| [vo.validator.validate] cs_mstr_list | vo.validator.validate.CS_MSTR_LIST | [vo.validator] conesearch_master_list | vo.validator.conf.conesearch_master_list |
| [vo.validator.validate] cs_urls | vo.validator.validate.CS_URLS | [vo.validator] conesearch_urls | vo.validator.conf.conesearch_urls |
| [vo.validator.validate] noncrit_warnings | vo.validator.validate.noncrit_warnings | [vo.validator] noncritical_warnings | vo.validator.conf.noncritical_warnings |
For an affiliated package to support both astropy 0.3 and 0.4, following the astropy 0.3 config instructions should continue to work. Note that saving of configuration items has been removed entirely from astropy 0.4 without a deprecation cycle, so if saving configuration programmatically is important to your package, you may want to consider another method to save that state.
However, by the release of astropy 0.5, the astropy 0.3 config API will no longer work. The following describes how to transition an affiliated package written for astropy 0.3 to support astropy 0.4 and later. It will not be possible to support astropy 0.3, 0.4 and 0.5 simultaneously. Below pkgname is the name of your affiliated package.
The automatic generation of configuration files from the ConfigurationItem objects that it finds has been removed. Instead, the project should include a hard-coded “template” configuration file in pkgname/pkgname.cfg. By convention, and to ease upgrades for end users, all of the values should be commented out. For example:
[nddata]
## Whether to issue a warning if NDData arithmetic is performed with
## uncertainties and the uncertainties do not support the propagation of
## correlated uncertainties.
# warn_unsupported_correlated = True
Affiliated packages should transition to using astropy.config.ConfigItem objects as members of astropy.config.ConfigNamespace subclasses.
For example, the following is an example of the astropy 0.3 and earlier method to define configuration items:
from astropy.config import ConfigurationItem
ENABLE_RECORD_VALUED_KEYWORD_CARDS = ConfigurationItem(
'enabled_record_valued_keyword_cards', True,
'If True, enable support for record-valued keywords as described by '
'FITS WCS Paper IV. Otherwise they are treated as normal keywords.')
EXTENSION_NAME_CASE_SENSITIVE = ConfigurationItem(
'extension_name_case_sensitive', False,
'If True, extension names (i.e. the EXTNAME keyword) should be '
'treated as case-sensitive.')
The above, converted to the new method, looks like:
from astropy import config as _config
class Conf(_config.ConfigNamespace):
"""
Configuration parameters for `astropy.io.fits`.
"""
enable_record_valued_keyword_cards = _config.ConfigItem(
True,
'If True, enable support for record-valued keywords as described by '
'FITS WCS Paper IV. Otherwise they are treated as normal keywords.',
aliases=['astropy.io.fits.enabled_record_valued_keyword_cards'])
extension_name_case_sensitive = _config.ConfigItem(
False,
'If True, extension names (i.e. the ``EXTNAME`` keyword) should be '
'treated as case-sensitive.')
conf = Conf()
ConfigAlias objects can be used when a configuration item has been moved from an astropy 0.3-style ConfigurationItem to an astropy 0.4-style ConfigItem inside of a ConfigNamespace.
In the above example, the following adds backward-compatible hooks so the old Python locations of the configuration items will continue to work from user code:
ENABLE_RECORD_VALUED_KEYWORD_CARDS = _config.ConfigAlias(
'0.4', 'ENABLE_RECORD_VALUED_KEYWORD_CARDS',
'enable_record_valued_keyword_cards')
If a configuration item is moved or renamed within the configuration file, the aliases kwarg to ConfigItem can be used so that the old location will continue to be used as a fallback. For example, if the old location of an item was:
[coordinates.name_resolve]
sesame_url = http://somewhere.com
One might want to drop the fact that that is implemented in the module name_resolve and just store the configuration in coordinates:
[coordinates]
sesame_url = http://somewhere.com
When defining the ConfigItem for this entry, the aliases kwarg can list the old location(s) of the configuration item:
sesame_url = _config.ConfigItem(
["http://somewhere.com"],
"""Docstring""",
aliases=['astropy.coordinates.name_resolve.sesame_url'])


Zhongtai Property Group specializes in the provision of security guard services, patrol duty, access control and other security services, as well as various property-related consultancy services.
So easy to use, even your dog could do it.
We have all the dogs, the greatest dogs.
Find the love of your dog's life or your money back.
Simple and affordable price plans for your and your dog.
5 Matches Per Day
10 Messages Per Day
Unlimited App Usage
Unlimited Matches
Unlimited Messages
Unlimited App Usage
Pirority Listing
Unlimited Matches
Unlimited Messages
Unlimited App Usage


Action Icons
| 3d_rotation |
accessibility |
accessible |
account_balance |
account_balance_wallet |
account_box |
account_circle |
add_shopping_cart |
alarm |
alarm_add |
alarm_off |
alarm_on |
all_out |
android |
announcement |
aspect_ratio |
assessment |
assignment |
assignment_ind |
assignment_late |
assignment_return |
assignment_returned |
assignment_turned_in |
autorenew |
backup |
book |
bookmark |
bookmark_border |
bug_report |
build |
cached |
camera_enhance |
card_giftcard |
card_membership |
card_travel |
change_history |
check_circle |
chrome_reader_mode |
class |
| code |
compare_arrows |
copyright |
credit_card |
dashboard |
date_range |
delete |
delete_forever |
description |
dns |
done |
done_all |
donut_large |
donut_small |
eject |
euro_symbol |
event |
event_seat |
exit_to_app |
explore |
extension |
face |
favorite |
favorite_border |
feedback |
find_in_page |
find_replace |
fingerprint |
flight_land |
flight_takeoff |
flip_to_back |
flip_to_front |
g_translate |
gavel |
get_app |
gif |
grade |
group_work |
help |
| help_outline |
highlight_off |
history |
home |
hourglass_empty |
hourglass_full |
http |
https |
important_devices |
info |
info_outline |
input |
invert_colors |
label |
label_outline |
language |
launch |
lightbulb_outline |
line_style |
line_weight |
list |
lock |
lock_open |
lock_outline |
loyalty |
markunread_mailbox |
motorcycle |
note_add |
offline_pin |
opacity |
open_in_browser |
open_in_new |
open_with |
pageview |
pan_tool |
payment |
perm_camera_mic |
perm_contact_calendar |
perm_data_setting |
| perm_device_information |
perm_identity |
perm_media |
perm_phone_msg |
perm_scan_wifi |
pets |
picture_in_picture |
picture_in_picture_alt |
play_for_work |
polymer |
power_settings_new |
pregnant_woman |
print |
query_builder |
question_answer |
receipt |
record_voice_over |
redeem |
remove_shopping_cart |
reorder |
report_problem |
restore |
restore_page |
room |
rounded_corner |
rowing |
schedule |
search |
settings |
settings_applications |
settings_backup_restore |
settings_bluetooth |
settings_brightness |
settings_cell |
settings_ethernet |
settings_input_antenna |
settings_input_component |
settings_input_composite |
settings_input_hdmi |
| settings_input_svideo |
settings_overscan |
settings_phone |
settings_power |
settings_remote |
settings_voice |
shop |
shop_two |
shopping_basket |
shopping_cart |
speaker_notes |
speaker_notes_off |
spellcheck |
star |
stars |
store |
subject |
supervisor_account |
swap_horiz |
swap_vert |
swap_vertical_circle |
system_update_alt |
tab |
tab_unselected |
theaters |
thumb_down |
thumb_up |
thumbs_up_down |
toc |
today |
toll |
touch_app |
track_changes |
translate |
trending_down |
trending_flat |
trending_up |
turned_in |
turned_in_not |
| update |
verified_user |
view_agenda |
view_array |
view_carousel |
view_column |
view_day |
view_headline |
view_list |
view_module |
view_quilt |
view_stream |
view_week |
visibility |
visibility_off |
watch_later |
work |
youtube_searched_for |
zoom_in |
zoom_out |
Alert Icons
| add_alert |
error |
error_outline |
warning |
AV Icons
| add_to_queue |
airplay |
album |
art_track |
av_timer |
branding_watermark |
call_to_action |
closed_caption |
equalizer |
explicit |
fast_forward |
fast_rewind |
featured_play_list |
featured_video |
fiber_dvr |
fiber_manual_record |
fiber_new |
fiber_pin |
fiber_smart_record |
forward_10 |
forward_30 |
forward_5 |
games |
hd |
hearing |
high_quality |
library_add |
library_books |
library_music |
loop |
mic |
mic_none |
mic_off |
movie |
music_video |
new_releases |
not_interested |
note |
pause |
| pause_circle_filled |
pause_circle_outline |
play_arrow |
play_circle_filled |
play_circle_outline |
playlist_add |
playlist_add_check |
playlist_play |
queue |
queue_music |
queue_play_next |
radio |
recent_actors |
remove_from_queue |
repeat |
repeat_one |
replay |
replay_10 |
replay_30 |
replay_5 |
shuffle |
skip_next |
skip_previous |
slow_motion_video |
snooze |
sort_by_alpha |
stop |
subscriptions |
subtitles |
surround_sound |
video_call |
video_label |
video_library |
videocam |
videocam_off |
volume_down |
volume_mute |
volume_off |
volume_up |
web |
web_asset |
Communication Icons
| business |
call |
call_end |
call_made |
call_merge |
call_missed |
call_missed_outgoing |
call_received |
call_split |
chat |
chat_bubble |
chat_bubble_outline |
clear_all |
comment |
contact_mail |
contact_phone |
contacts |
dialer_sip |
dialpad |
email |
forum |
import_contacts |
import_export |
invert_colors_off |
live_help |
location_off |
location_on |
mail_outline |
message |
messenger |
no_sim |
phone |
phonelink_erase |
phonelink_lock |
phonelink_ring |
phonelink_setup |
portable_wifi_off |
present_to_all |
ring_volume |
| rss_feed |
screen_share |
speaker_phone |
stay_current_landscape |
stay_current_portrait |
stay_primary_landscape |
stay_primary_portrait |
stop_screen_share |
swap_calls |
textsms |
voicemail |
vpn_key |
Content Icons
| add |
add_box |
add_circle |
add_circle_outline |
archive |
backspace |
block |
clear |
content_copy |
content_cut |
content_paste |
create |
delete_sweep |
drafts |
filter_list |
flag |
font_download |
forward |
gesture |
inbox |
link |
low_priority |
mail |
markunread |
move_to_inbox |
next_week |
redo |
remove |
remove_circle |
remove_circle_outline |
reply |
reply_all |
report |
save |
select_all |
send |
sort |
text_format |
unarchive |
undo |
weekend |
Device Icons
| access_alarm |
access_alarms |
access_time |
add_alarm |
airplanemode_active |
airplanemode_inactive |
battery_alert |
battery_charging_full |
battery_full |
battery_unknown |
bluetooth |
bluetooth_connected |
bluetooth_disabled |
bluetooth_searching |
brightness_auto |
brightness_high |
brightness_low |
brightness_medium |
data_usage |
developer_mode |
devices |
dvr |
gps_fixed |
gps_not_fixed |
gps_off |
graphic_eq |
location_disabled |
location_searching |
network_cell |
network_wifi |
nfc |
screen_lock_landscape |
screen_lock_portrait |
screen_lock_rotation |
screen_rotation |
sd_storage |
settings_system_daydream |
signal_cellular_4_bar |
signal_cellular_connected_no_internet_4_bar |
| signal_cellular_no_sim |
signal_cellular_null |
signal_cellular_off |
signal_wifi_4_bar |
signal_wifi_4_bar_lock |
signal_wifi_off |
storage |
usb |
wallpaper |
widgets |
wifi_lock |
wifi_tethering |
Editor Icons
| attach_file |
attach_money |
border_all |
border_bottom |
border_clear |
border_color |
border_horizontal |
border_inner |
border_left |
border_outer |
border_right |
border_style |
border_top |
border_vertical |
bubble_chart |
drag_handle |
format_align_center |
format_align_justify |
format_align_left |
format_align_right |
format_bold |
format_clear |
format_color_fill |
format_color_reset |
format_color_text |
format_indent_decrease |
format_indent_increase |
format_italic |
format_line_spacing |
format_list_bulleted |
format_list_numbered |
format_paint |
format_quote |
format_shapes |
format_size |
format_strikethrough |
format_underlined |
functions |
highlight |
| insert_chart |
insert_comment |
insert_drive_file |
insert_emoticon |
insert_invitation |
insert_link |
insert_photo |
linear_scale |
merge_type |
mode_comment |
mode_edit |
monetization_on |
money_off |
multiline_chart |
pie_chart |
pie_chart_outlined |
publish |
short_text |
show_chart |
space_bar |
strikethrough_s |
text_fields |
title |
vertical_align_bottom |
vertical_align_center |
vertical_align_top |
wrap_text |
File Icons
| attachment |
cloud |
cloud_circle |
cloud_done |
cloud_download |
cloud_off |
cloud_queue |
cloud_upload |
create_new_folder |
file_download |
file_upload |
folder |
folder_open |
folder_shared |
Hardware Icons
| cast |
cast_connected |
computer |
desktop_mac |
desktop_windows |
developer_board |
device_hub |
devices_other |
dock |
gamepad |
headset |
headset_mic |
keyboard |
keyboard_arrow_down |
keyboard_arrow_left |
keyboard_arrow_right |
keyboard_arrow_up |
keyboard_backspace |
keyboard_capslock |
keyboard_hide |
keyboard_return |
keyboard_tab |
keyboard_voice |
laptop |
laptop_chromebook |
laptop_mac |
laptop_windows |
memory |
mouse |
phone_android |
phone_iphone |
phonelink |
phonelink_off |
power_input |
phonelink |
router |
scanner |
security |
sim_card |
| smartphone |
speaker |
speaker_group |
tablet |
tablet_android |
tablet_mac |
toys |
tv |
videogame_asset |
watch |
Maps Icons
| add_location |
beenhere |
directions |
directions_bike |
directions_boat |
directions_bus |
directions_car |
directions_railway |
directions_run |
directions_subway |
directions_transit |
directions_walk |
edit_location |
ev_station |
flight |
hotel |
layers |
layers_clear |
local_activity |
local_airport |
local_atm |
local_bar |
local_cafe |
local_car_wash |
local_convenience_store |
local_dining |
local_drink |
local_florist |
local_gas_station |
local_grocery_store |
local_hospital |
local_hotel |
local_laundry_service |
local_library |
local_mall |
local_movies |
local_offer |
local_parking |
local_pharmacy |
| local_phone |
local_pizza |
local_play |
local_post_office |
local_printshop |
local_see |
local_shipping |
local_taxi |
map |
my_location |
navigation |
near_me |
person_pin |
person_pin_circle |
pin_drop |
place |
rate_review |
restaurant |
restaurant_menu |
satellite |
store_mall_directory |
streetview |
subway |
terrain |
traffic |
train |
tram |
transfer_within_a_station |
zoom_out_map |
Navigation Icons
| apps |
arrow_back |
arrow_drop_down |
arrow_drop_down_circle |
arrow_drop_up |
arrow_downward |
arrow_forward |
arrow_upward |
cancel |
check |
chevron_left |
chevron_right |
close |
expand_less |
expand_more |
first_page |
fullscreen |
fullscreen_exit |
last_page |
menu |
more_horiz |
more_vert |
refresh |
subdirectory_arrow_left |
subdirectory_arrow_right |
unfold_less |
unfold_more |
Notification Icons
| adb |
airline_seat_flat |
airline_seat_flat_angled |
airline_seat_individual_suite |
airline_seat_legroom_extra |
airline_seat_legroom_normal |
airline_seat_legroom_reduced |
airline_seat_recline_extra |
airline_seat_recline_normal |
bluetooth_audio |
confirmation_number |
disc_full |
do_not_disturb |
do_not_disturb_alt |
do_not_disturb_off |
do_not_disturb_on |
drive_eta |
enhanced_encryption |
event_available |
event_busy |
event_note |
folder_special |
live_tv |
mms |
more |
network_check |
network_locked |
no_encryption |
ondemand_video |
personal_video |
phone_bluetooth_speaker |
phone_forwarded |
phone_in_talk |
phone_locked |
phone_missed |
phone_paused |
power |
priority_high |
sd_card |
| sim_card_alert |
sms |
sms_failed |
sync |
sync_disabled |
sync_problem |
system_update |
tap_and_play |
time_to_leave |
vibration |
voice_chat |
vpn_lock |
wc |
wifi |
Photos Icons
| add_a_photo |
add_to_photos |
adjust |
assistant |
assistant_photo |
audiotrack |
blur_circular |
blur_linear |
blur_off |
blur_on |
brightness_1 |
brightness_2 |
brightness_3 |
brightness_4 |
brightness_5 |
brightness_6 |
brightness_7 |
broken_image |
brush |
burst_mode |
camera |
camera_alt |
camera_front |
camera_rear |
camera_roll |
center_focus_strong |
center_focus_weak |
collections |
collections_bookmark |
color_lens |
colorize |
compare |
control_point |
control_point_duplicate |
crop |
crop_16_9 |
crop_3_2 |
crop_5_4 |
crop_7_5 |
| crop_din |
crop_free |
crop_landscape |
crop_original |
crop_portrait |
crop_square |
dehaze |
details |
edit |
exposure |
exposure_neg_1 |
exposure_neg_2 |
exposure_plus_1 |
exposure_plus_2 |
exposure_zero |
filter |
filter_1 |
filter_2 |
filter_3 |
filter_4 |
filter_5 |
filter_6 |
filter_7 |
filter_8 |
filter_9 |
filter_9_plus |
filter_b_and_w |
filter_center_focus |
filter_drama |
filter_frames |
filter_hdr |
filter_none |
filter_tilt_shift |
filter_vintage |
flare |
flash_auto |
flash_off |
flash_on |
flip |
| gradient |
grain |
grid_off |
grid_on |
hdr_off |
hdr_on |
hdr_strong |
hdr_weak |
healing |
image |
image_aspect_ratio |
iso |
landscape |
leak_add |
leak_remove |
lens |
linked_camera |
looks |
looks_3 |
looks_4 |
looks_5 |
looks_6 |
looks_one |
looks_two |
loupe |
monochrome_photos |
movie_creation |
movie_filter |
music_note |
nature |
nature_people |
navigate_before |
navigate_next |
palette |
panorama |
panorama_fish_eye |
panorama_horizontal |
panorama_vertical |
panorama_wide_angle |
| photo |
photo_album |
photo_camera |
photo_filter |
photo_library |
photo_size_select_actual |
photo_size_select_large |
photo_size_select_small |
picture_as_pdf |
portrait |
remove_red_eye |
rotate_90_degrees_ccw |
rotate_left |
rotate_right |
slideshow |
straighten |
style |
switch_camera |
switch_video |
tag_faces |
texture |
timelapse |
timer_10 |
timer |
timer_3 |
timer_off |
tonality |
transform |
tune |
view_comfy |
view_compact |
vignette |
wb_auto |
wb_cloudy |
wb_incandescent |
wb_iridescent |
wb_sunny |
Places Icons
| ac_unit |
airport_shuttle |
all_inclusive |
beach_access |
business_center |
casino |
child_care |
child_friendly |
fitness_center |
free_breakfast |
golf_course |
hot_tub |
kitchen |
pool |
room_service |
rv_hookup |
smoke_free |
smoking_rooms |
spa |
Social Icons
| cake |
domain |
group |
group_add |
location_city |
mood |
mood_bad |
notifications |
notifications_none |
notifications_off |
notifications_active |
notifications_paused |
pages |
party_mode |
people |
people_outline |
person |
person_add |
person_outline |
plus_one |
poll |
public |
school |
sentiment_dissatisfied |
sentiment_neutral |
sentiment_satisfied |
sentiment_very_dissatisfied |
sentiment_very_satisfied |
share |
whatshot |
Toggle Icons
| check_box |
check_box_outline_blank |
indeterminate_check_box |
radio_button_unchecked |
radio_button_checked |
star |
star_half |
star_border |


Products
About Us
Support
Contact Us
GO TO CONSOLE
Account
Sign In
Sign Out
Prodcuts
Overview
Real Time Collector
Family Data
Family ID
Family Name
Add Family
Add Family
Edit Family
Select Family ID
Edit Family


It generates a ATG component by creating default appropriate property file
The generated property file contains classname and all fields with public setters
By default component creates in the same namespace as package of the class under "src/config" folder


---
layout: post
title: 'Caroline McCarthy: Onward, to the Plex.'
date: '2011-04-21T11:59:22-07:00'
tags:
tumblr_url: http://alexhwilliams.tumblr.com/post/4812219772/caroline-mccarthy-onward-to-the-plex
---
Caroline McCarthy: Onward, to the Plex.
caro:
So I have some big news.
After five incredible years at CNET, I’m moving on. May 6 is my last day; ten days later, I will join Google’s New York office as a member of its fledgling Trends & Insights team. I’ll be doing a lot of writing, editing, and analysis as I work with Alli Mooney to…


The Red Badge of Courage
by Stephen Crane
Chapter 14
Additional Information
- Year Published: 1895
- Language: English
- Country of Origin: United States of America
- Source: Crane, S. (1895) The Red Badge of Courage New York: Charles Scribner’s Sons
-
Readability:
- Flesch–Kincaid Level: 5.9
- Word Count: 1,895
- Genre: Realism
- Keywords: 19th century literature, american literature
- ✎ Cite This
Downloads
When the youth awoke it seemed to him that he had been asleep for a thousand years, and he felt sure that he opened his eyes upon an unexpected world. Gray mists were slowly shifting before the first efforts of the sun rays. An impending splendor could be seen in the eastern sky. An icy dew had chilled his face, and immediately upon arousing he curled farther down into his blanket. He stared for a while at the leaves overhead, moving in a heraldic wind of the day.
The distance was splintering and blaring with the noise of fighting. There was in the sound an expression of a deadly persistency, as if it had not began and was not to cease.
About him were the rows and groups of men that he had dimly seen the previous night. They were getting a last draught of sleep before the awakening. The gaunt, careworn features and dusty figures were made plain by this quaint light at the dawning, but it dressed the skin of the men in corpse-like hues and made the tangled limbs appear pulseless and dead. The youth started up with a little cry when his eyes first swept over this motionless mass of men, thick-spread upon the ground, pallid, and in strange postures. His disordered mind interpreted the hall of the forest as a charnel place. He believed for an instant that he was in the house of the dead, and he did not dare to move lest these corpses start up, squalling and squawking. In a second, however, he achieved his proper mind. He swore a complicated oath at himself. He saw that this somber picture was not a fact of the present, but a mere prophecy.
He heard then the noise of a fire crackling briskly in the cold air, and, turning his head, he saw his friend pottering busily about a small blaze. A few other figures moved in the fog, and he heard the hard cracking of axe blows.
Suddenly there was a hollow rumble of drums. A distant bugle sang faintly. Similar sounds, varying in strength, came from near and far over the forest. The bugles called to each other like brazen gamecocks. The near thunder of the regimental drums rolled.
The body of men in the woods rustled. There was a general uplifting of heads. A murmuring of voices broke upon the air. In it there was much bass of grumbling oaths. Strange gods were addressed in condemnation of the early hours necessary to correct war. An officer’s peremptory tenor rang out and quickened the stiffened movement of the men. The tangled limbs unraveled. The corpse-hued faces were hidden behind fists that twisted slowly in the eye sockets.
The youth sat up and gave vent to an enormous yawn. “Thunder!” he remarked petulantly. He rubbed his eyes, and then putting up his hand felt carefully the bandage over his wound. His friend, perceiving him to be awake, came from the fire. “Well, Henry, ol’ man, how do yeh feel this mornin’?” he demanded.
The youth yawned again.  His head, in truth, felt precisely like a melon, and there was an unpleasant sensation at his stomach.
“Oh, Lord, I feel pretty bad,” he said.
“Thunder!” exclaimed the other. “I hoped ye’d feel all right this mornin’. Let’s see th’ bandage—I guess it’s slipped.” He began to tinker at the wound in rather a clumsy way until the youth exploded.
“Gosh-dern it!” he said in sharp irritation; “you’re the hangdest man I ever saw! You wear muffs on your hands. Why in good thunderation can’t you be more easy? I’d rather you’d stand off an’ throw guns at it.
He glared with insolent command at his friend, but the latter answered soothingly. “Well, well, come now, an’ git some grub,” he said. “Then, maybe, yeh’ll feel better.”
At the fireside the loud young soldier watched over his comrade’s wants with tenderness and care. He was very busy marshaling the little black vagabonds of tin cups and pouring into them the streaming iron colored mixture from a small and sooty tin pail. He had some fresh meat, which he roasted hurriedly on a stick. He sat down then and contemplated the youth’s appetite with glee.
The youth took note of a remarkable change in his comrade since those days of camp life upon the river bank. He seemed no more to be continually regarding the proportions of his personal prowess. He was not furious at small words that pricked his conceits. He was no more a loud young soldier. There was about him now a fine reliance. He showed a quiet belief in his purposes and his abilities. And this inward confidence evidently enabled him to be indifferent to little words of other men aimed at him.
The youth reflected. He had been used to regarding his comrade as a blatant child with an audacity grown from his inexperience, thoughtless, headstrong, jealous, and filled with a tinsel courage. A swaggering babe accustomed to strut in his own dooryard. The youth wondered where had been born these new eyes; when his comrade had made the great discovery that there were many men who would refuse to be subjected by him. Apparently, the other had now climbed a peak of wisdom from which he could perceive himself as a very wee thing. And the youth saw that ever after it would be easier to live in his friend’s neighborhood.
His comrade balanced his ebony coffee-cup on his knee. “Well, Henry,” he said, “what d’yeh think th’ chances are? D’yeh think we’ll wallop ‘em?”
The youth considered for a moment.
His friend looked a trifle amazed. “Would I?” he asked. He pondered. “Well, perhaps I would,” he decided at last. He stared humbly at the fire.
The youth was quite disconcerted at this surprising reception of his remarks. “Oh, no, you wouldn’t either,” he said, hastily trying to retrace.
But the other made a deprecating gesture. “Oh, yeh needn’t mind, Henry,” he said. “I believe I was a pretty big fool in those days.” He spoke as after a lapse of years.
There was a little pause.
“All th’ officers say we’ve got th’ rebs in a pretty tight box,” said the friend, clearing his throat in a commonplace way. “They all seem t’ think we’ve got ‘em jest where we want ‘em.”
“I don’t know about that,” the youth replied. “What I seen over on th’ right makes me think it was th’ other way about. From where I was, it looked as if we was gettin’ a good poundin’ yestirday.”
“D’yeh think so?” inquired the friend. “I thought we handled ‘em pretty rough yestirday.”
“Not a bit,” said the youth. “Why, lord, man, you didn’t see nothing of the fight. Why!” Then a sudden thought came to him. “Oh! Jim Conklin’s dead.”
His friend started. “What? Is he? Jim Conklin?”
The youth spoke slowly. “Yes. He’s dead. Shot in th’ side.”
“Yeh don’t say so. Jim Conklin. . .poor cuss!”
All about them were other small fires surrounded by men with their little black utensils. From one of these near came sudden sharp voices in a row. It appeared that two light-footed soldiers had been teasing a huge, bearded man, causing him to spill coffee upon his blue knees. The man had gone into a rage and had sworn comprehensively. Stung by his language, his tormentors had immediately bristled at him with a great show of resenting unjust oaths. Possibly there was going to be a fight.
The friend arose and went over to them, making pacific motions with his arms. “Oh, here, now, boys, what’s th’ use?” he said. “We’ll be at th’ rebs in less’n an hour. What’s th’ good fightin’ ‘mong ourselves?”
One of the light-footed soldiers turned upon him red-faced and violent. “Yeh needn’t come around here with yer preachin’. I s’pose yeh don’t approve ‘a fightin’ since Charley Morgan licked yeh; but I don’t see what business this here is ‘a yours or anybody else.”
“Well, it ain’t,” said the friend mildly.
“Well, he—,” said the two, indicating their opponent with accusative forefingers.
The huge soldier was quite purple with rage. He pointed at the two soldiers with his great hand, extended clawlike. “Well, they—”
But during this argumentative time the desire to deal blows seemed to pass, although they said much to each other. Finally the friend returned to his old seat. In a short while the three antagonists could be seen together in an amiable bunch.
“Jimmie Rogers ses I’ll have t’ fight him after th’ battle t’-day,” announced the friend as he again seated himself. “He ses he don’t allow no interferin’ in his business.
The youth laughed. “Yer changed a good bit. Yeh ain’t at all like yeh was. I remember when you an’ that Irish feller—” He stopped and laughed again.
“No, I didn’t use t’ be that way,” said his friend thoughtfully. “That’s true ‘nough.”
“Well, I didn’t mean—” began the youth.
The friend made another deprecatory gesture. “Oh, yeh needn’t mind, Henry.”
There was another little pause.
“Th’ reg’ment lost over half th’ men yestirday,” remarked the friend eventually. “I thought ‘a course they was all dead, but, laws, they kep’ a-comin’ back last night until it seems, after all, we didn’t lose but a few. They’d been scattered all over, wanderin’ around in th’ woods, fightin’ with other reg’ments, an’ everything. Jest like you done.”
“So?” said the youth.


|
DotNetBrowser
1.16
|
Contains information about SSL certificate error. More...
Public Member Functions | |
| CertificateErrorParams (string url, Certificate certificate, ResourceType resourceType, NetError certificateError) | |
| Constructs a new CertificateErrorParams instance. More... | |
Properties | |
| string | RequestURL [get] |
| Gets a string that represents URL of the request that causes SSL certificate error. More... | |
| ResourceType | ResourceType [get] |
| Gets type of the resource that has initiated the request. More... | |
| NetError | CertificateError [get] |
| Gets network error code that describes the reason of SSL certificate error. More... | |
| Certificate | Certificate [get] |
| Gets Certificate object with the information about problematic SSL certificate. More... | |
Contains information about SSL certificate error.
| DotNetBrowser.CertificateErrorParams.CertificateErrorParams | ( | string | url, |
| Certificate | certificate, | ||
| ResourceType | resourceType, | ||
| NetError | certificateError | ||
| ) |
Constructs a new CertificateErrorParams instance.
| url | a string that represents URL of the request that causes SSL certificate error. |
| certificate | Certificate object with the information about problematic SSL certificate. |
| resourceType | type of the resource that has initiated the request. |
| certificateError | network error code that describes the reason of SSL certificate error. |
|
get |
Gets Certificate object with the information about problematic SSL certificate.
the problematic SSL certificate.
|
get |
Gets network error code that describes the reason of SSL certificate error.
|
get |
Gets a string that represents URL of the request that causes SSL certificate error.
|
get |
Gets type of the resource that has initiated the request.


Control The Arduino From An App. This example shows how to make an app that controls an Arduino board, by communicating over the TCP networking protocol.
Communication with the Arduino is made using a WiFi shield or an Ethernet shield.
When using a WiFi shield, you communicate directly from your mobile device to the Arduino. Make sure you are on the same LAN for this to work.
When using am Ethernet shield, you communicate from your mobile device to a WiFi router, that in turn need to be able to connect to the IP-address of the Ethernet shield.
You can browse the source code for this example at the Evothings GitHub repository
The file index.html is the entry point of the app. File arduinotcp.js contains functions for scripting the Arduino from JavaScript. You can set pin mode and set HIGH/LOW for pins.
The file arduinowifi.ino contains the Arduino WiFi server that listens for commands from the app.
The file arduinoethernet.ino contains the Arduino Ethernet server that listens for commands from the app.
This example runs in Evothings Viewer on Android or iOS.
You need to run this example in Evothings Viewer. Alternatively, you can build a Cordova application if you wish to distribute the app. You then need to include the Cordova plugin org.chromium.socket. Read more in the documentation of the Evothings Viewer.
For the Arduino setup, you need:
Here is a sketch using the Arduino Ethernet shield:
Here is a photo of a board configured to work with this example, using an Arduino WiFi shield. Note that output pin 2 is used (it may look like pin 3 in the photo).
Follow these steps to get started with this example:


The
New Yorker
News Desk
Dominique Gardner, One of R. Kelly’s Longtime Girlfriends, Speaks Out
Personal History
My Father's Stack of Books
Culture Desk
The Uncanny, Unsettling World of Shen Yun
Does the ubiquitous dance troupe really present five thousand years of civilization reborn?
Letter from London
The Chaotic Triumph of the "Bad Boy of Brexit"
News & Culture
The Software That Shapes Workers’ Lives
On “Shrill” and “Better Things,” Women Stop Being Good Sports
Dick Dale, the Lebanese-American Who Invented Surf Rock
All magazine issues since 2008 are now available in The New Yorker Today app. Download now >>
Spotlight
On Television
Idris Elba makes a Charming Foray into Sitcoms
The Current
In Iowa, See Beto Run
Page-Turner
W.S. Merwin in The New Yorker
The New Yorker Interview
Masha and Keith Gessen on Writing about Russia
Advertisements go here
Subscribe to my Youtube Channel


{% extends 'layout.html' %} {% block body %}
This will add attendance to the groups total. It will be the number dividing the swimmers attendance to get their attendance percentage.
This will add attendance for each swimmer according to how much of the practice they show up to. The drop down is custom attendance amounts while the left most button is the most common. It will show green once they are at practice.
Pressing the reset button as shown will take away the green from all of the rows in the table. This will show that practice is over. It can be pressed at any time. The green is just a visual helper.
This button will lead to a form which will allow you to create a swimmer by filling in a name and their group
This button will need to be activated by pressing the enable delete button. Then the swimmer can be deleted by pressing the delete button in their row. If you accidentally clicked the delete it can be undone if you click the undo button at the top.
Archiving is saving the attendance data to your google drive account in Google Sheets. You will need to login to your Google Account and then select the corresponding export button. The file will then be created on your Google Drive account and you can view it / print it.
{% endblock %}


Spotify has weird limits on their add albums API. If you have a very large library, 900+ albums, everything won't transfer. If you have Spotify installed you can use the Open in Spotify link to add missed albums.
Feel free to contact me here


| Core genes | (99% <= strains <= 100%) | {{item.core_genes}} |
| Soft core genes | (95% <= strains < 99%) | {{item.soft_core_genes}} |
| Shell genes | (15% <= strains < 95%) | {{item.shell_genes}} |
| Cloud genes | (0% <= strains < 15%) | {{item.cloud_genes}} |
| Total genes | (0% <= strains <= 100%) | {{item.total_genes}} |


Computer Science
Go back to Index
Name
Picture
Thomas Allen
Michael Bradshaw
Alex McAllister
David Toth


A Practical Guide to Policy Optimization.
June 6, 2017
Table of Contents
Introduction
“Your scientists were so
preoccupied with whether or not they could, they didn’t stop to think if they
should.” — Ian Malcom. The simulation above is from the work of [Schulman, et
al., 2015].
Reinforcement learning is a branch of machine learning that answers the ambitious question: How do we teach a machine to learn complex behaviors on its own, with limited supervision? While reinforcement learning, or RL, has been around in one form or another for decades, in the last few years it’s made remarkable strides and is having something of a renaissance.
Consider, as an example, the simulation to the right, which shows an autonomous spacecraft attempting to land between two flags on the lunar surface. The spacecraft is controlled by a neural network brain, which can take in various sensor readings subsequently fire the craft’s orientation engines or main thrusters. Its initial attempts are dismal: It careens wildly off-screen. It fires its thrusters haphazardly until it plows into the hard lunar soil. But after several iterations of its learning algorithm, we find it quite proficient: Not only does it land, but it does so deftly, and with panache.
This behavior was not hard-coded by a human programmer — the RL agent learned it through experience: by trying and failing and getting a little bit better after each attempt. The only supervision involved was the numerical reward signal the authors provided at each timestep to let the robot know how well it was doing. In this case, the reward is simply the forward velocity of the robotActually the reward signal is a slightly more complicated than that. In addition to the forward velocity, the authors add a couple small terms designed to penalize large torques and impact forces. Defining a reward signal for a problem is something of an art, and how to do it best remains an open research question. , the idea being that a properly walking robot should move faster than one flopping about on the ground. By slowly adapting its behavior in order to maximize some function of this reward, our bipedal friend learns how to coordinate its legs and arms in a complex and effective way. This ability to learn sophisticated behaviors with minimal oversight is among the great advantages of reinforcement learning.
But let’s be a bit more precise about what is happening here. At each timestep of the simulation, , our robot takes an action, , selected from its list of available actions according to some plan that depends on its currently observed state, . For the bipedal robot above, actions correspond to the application of certain torques and forces to its ten different joints. The state is a 22-dimensional vector recording the position and motion of the robot’s head, trunk, and extremeties. After taking an action, the robot receives a numerical reward , and observes the next state, . And so on.
The goal of RL is to learn to maximize the total cumulative reward, also known as the return,
or something like it, by learning how to take the right action at the right time. Note that we’re maximizing the cumulative, not instantaneous reward. We’re interested in the long game, not short-term gains; this means that we may often have to do something suboptimal in the short-term to better achieve our long-term goalsAnd this touches on one of the chief challenges of RL: How do we know how to value an action when it might not bear fruit until the distant future? This thorny issue is known, variously, as the credit assignment or distal reward problem. .
There are a lot of ways to skin this cat, and RL now comprises many techniques, including Monte Carlo, dynamic programming, policy optimization methods, and endless variants thereof. Each method has its strengths, weaknesses, and domains of applicability.
In this article we explore the policy optimization approach, wherein our agent tries to directly learn the best policy, . The policy is the overarching plan, the strategy. It’s how the agent answers the question, what action should I take, given I find myself in this particular state? Think of it as the brain of the RL agent. More precisely, the policy tells us the likelihood that the agent should select an action, , given it finds itself in a state, For a stochastic policy, that is — which is what we consider here. We could also work with deterministic policies, where the action is not sampled from a distribution, but is the direct output of some function. . The trick, or one of the tricks, anyway, is to somehow model this policy using a function approximator, then tinker with the approximation to increase the expected return.
Note the subscript, which indicates the likelihood depends on a parameter vector , the meaning of which depends on how we model . If we’re using a neural network, which is what we’ll be doing here, then maps to the weights and biases of the networkThe size of this parameter vector depends on the size of the neural networks used to model the policy, but is typically large, containing hundreds if not thousands of parameters. This is part of what makes RL, and so-called deep-RL, in particular, so theoretically challenging and computationally intensive. . In that case, the input to the network is the currently observed state vector, and its outputs are the probabilities of taking the next actions, which actions may be discrete or, as in the case of the bipedal robot, continuous. But much more on all that later. However we decide to model it, our goal is to somehow iteratively tweak so that produces the largest expected return. As we’ll see, some tweaks are better than others.
This article divides into three parts: Part I defines the problem a bit more formally and introduces the simple RL problem we will use as an example thoughout; Part II walks through an iterative method for optimizing the policy known as Trust Region Policy Optimization, which can efficiently solve a variety of RL problems; finally, Part III shows how to practically implement the algorithm using the tensorflow framework.
Although we strive to be self-contained, we must assume the following of our intrepid reader: she is unafraid of linear algebra and vector calculus; she can compute gradients of multivariate functions for the purposes of optimization; she is familiar with basic probability theory; and she has fiddled, at least a bit, with simple neural networks of the multilayer perceptron variety. That said, as we sail forth we’ll recommend reviews and tutorials as necessary to help the despondent traveler.
Resources and References
Excellent resources for learning about reinforcement learning abound. RL’s foundational text is arguably Barto & Sutton’s Reinforcement Learning: An Introduction, which provides an historical overview of the problem, an introduction to the fundamentals of temporal difference learning, Q-learning, and much more. David Silver’s notes from his lectures at University College London provide an up-to-date perspective on these topics, and their modern extensions. John Schulman’s Introduction to Reinforcement Learning lectures provide insights into many of the topics that we will discuss in this article, with an emphasis on Deep Reinforcement Learning.
Indeed, the algorithms discussed here are based on two papers by Schulman and friends. The first is Trust Region Policy Optimization, which introduces a practical method for robustly and efficiently solving the policy gradient problem. The second is High-Dimensional Continuous Control Using Generalized Advantage Estimation, which shows how to use parameterized value functions to reduce the variance of policy gradient estimates while limiting the introduction of bias, and which technique, incidentally, was used to train our introductory lunar lander and bipedal walker. If none of this makes sense, well, read on, as these are the sorts of things we mean to clarify.
Finally, the algorithms we develop in this article are available on Github for all your policy gradient optimizing needs.
Part I: Fundamentals
Markov Decision Processes
Before we talk in any detail about policy optimization, we need to more formally introduce the notion of a Markov Decision Process, or MDP, which is the mathematical language natural to reinforcement learning. MDPs comprise five major components: 1) a set of states, , that our system could be in; 2) a set of allowable actions, These sets of actions and states could be discrete or continuous, depending on the problem. For what we’re doing here, they’ll be continuous. ; 3) a model of system dynamics, , which tells us the probability of transitioning from one state to the next given we’ve taken some action; 4) a scalar reward function, ; and, finally, 5) some way to select the starting state, .
Let’s consider that fifth element first, because, well, before anything else can happen, we must know the initial state of our MDP. For some scenarios, is deterministic — a chess board, for example, is always in the same state at the beginning of a game. For other scenarios, the starting state may be different every time, as when training an autonomous vehicle to drive through a city — every training episode will look different, with different cars, traffic patterns and densities, etc. In that case, we draw our initial state from a probability distribution, , which may be some known distribution over the parameters of our environment, if we’re simulating it in a computer, or may be realized by the real world itself.
The set of states in an MDP, , must have the so-called Markov Property, by which we mean the system dynamics depend only on the current state, , and not on any prior states, . In practice, this is not a stringent requirement. If we find our system depends on the last two states, and , for example, we can simply concatenate these to form a new state, , which does satisfy the Markov property.
However we find ourselves in state , the next thing we do is take some action , and thereby transition to the state , according to some probabilistic transition model, The ~ symbol here means is distributed as, by which we mean the quantity on the left of the ~ is randomly sampled from the probability distribution on its right. . For all this effort we receive a scalar reward, . By repeating this process, we construct a trajectory, . The classic Markov Decision Process is illustrated below.
The transition dynamicsFor RL, we do not necessarily need to have a model of the system dynamics. The agent can simply take an action, let the system evolve, and observe the resulting state and reward. It need not have a detailed model of its environment and how it interacts with it; this is known as model-free RL. Having a model can help accelerate learning in some cases, but because models are usually only approximations to what is really going on, it is often difficult to reliably train model-based RL agents. This tension between model-free and model-based RL is the source of much new research these days. might be modeled by a computer simulation, as for the lunar lander animated above, or, in the case of a physical robot, by the actual physics governing our Universe. Either way, we keep sampling our trajectory until a terminal state is reached, which, depending on what we’re trying to accomplish, could happen after we’ve observed a preordained number of timesteps, when our robot falls over, or after our game is lost or won. The trajectory that results from these efforts constitutes an episodeOf course, not all RL scenarios are episodic, having a well defined beginning and end. Scenarios such as stock trading or natural language processing may be continuous. For the most part, the methods discussed here can be adapted to continuous scenarios with little trouble. .
The Policy
One thing we’ve not discussed is how to select an action at each timestep. As mentioned in the introduction, this is the job of the policy, . The policy is the overarching strategy or plan. It tells our agent how to act when it finds itself in a certain state. Solving an MDP means finding the policy that maximizes the expected return, or some function thereof. The policy could be deterministic, in which case the action is the output of a function of the current state, ; or stochastic, wherein the action is sampled from a probability distribution conditioned on the current state, . Here we focus on stochastic policies.
Before we can do anything, however, we have to somehow realize our policy; that is, we must represent it mathematically. Because we do not a priori know what policy is best, we’ll need a flexible representation we can modify as we go along.
There are many sensible ways to approximate functionsFor an nice overview of function approximation in the context of RL, see Chapter 8 of Barto and Sutton, or David Silver’s sixth lecture . . For our purposes, we will use multilayer perceptrons (MLPs)New to neural networks? Two great tutorials are available here and here. . MLPs are feed-forward artificial neural networks capable of representing complex, nonlinear functions. Despite their power, they are quite simple mathematically. Think of an MLP as a fancy function, , a machine that takes in vector-valued input, , transforms it in some way, and returns vector-valued output, :
To be a little more concrete, let’s walk through a quick example of using an MLP to implement a policy. Suppose the state space of our MDP is four-dimensional, and we have two different continuous actions that we can take at each time instant. Then we could implement the policy using something like the neural network illustrated below:
The red circles at the lowest level represent the numerical inputs to this network (here four, the dimension of our state space), which we represent mathematically as a dimensional matrix, . These inputs are propagated into the hidden layer of the network by multiplying by a dimensional connection matrix, :
Note that the comes about because we happen to have eight neurons (or nodes) in our hidden layer. In practice, depending on the complexity of the problem we’re trying to address, we might have dozens or hundreds of neurons per hidden layer. In this case, the result is a dimensional matrix, , which is the raw output of the middle layer, to which we next apply the so-called activation function, , to obtain the output of the hidden layer:
There are many possible choices for the activation function. While a full discussion is beyond the scope of this article, popular choices include sigmoid, , and RELU operations. Different activation functions offer different levels of performance on different problems, but their inclusion is non-negotiable: they introduce critical nonlinearities that allow neural networks, in principle at least, to approximate any functionSans nonlinear activations, the output of the neural network becomes a simple matrix multiplication of its input; the problem thereby reduces to one of linear regression — which may be fine, but we will generally want to be able to express more complicated relationships. .
Finally, the output of the hidden layer is propagated to the output of the network via another matrix multiplication, and the application of a second activation function (which need not be the same as the first):
The -sized matrix ensures that the output of the network is just two numbers, represented by a -dimensional matrix. And that’s it: we’ve implemented a policy using a neural network! Given a state, , we can process it using our network via Eq. 1, with , to produce an output, .
Now, how do we interpret ? How does it correspond to the stochastic policy we’ve been discussing? It depends on how we’re modeling the underlying probability distribution from which we’re drawing our actions. A popular choice for continuous action spaces is to model the policy as a -dimensional Gaussian with a fixed (generally diagonal) covariance, . In that case, we interpret the output of the network as the mean of this distribution. To be completely explicit, our action is drawn from a multivariate normal distribution,
where,
At each timestep, we propagate the through the MLP to obtain a mean action vector, ; we draw an action from a normal distribution with this mean according to Eq. 2; we take that action; we observe our new state and reward; and on and on.
So we’re done, except for the small matter of finding the right policy. We’ve not said much about those weight matrices, , and . The matrices comprise the parameters of our network, and therefore define our policy. For convenience, rather than referring to the and the parameters separately, we will denote the full set of parameters specifying the network as ; you can regard as the concatenation of all the elements of the weight matrices into one long vector and, indeed, when we actually implement these algorithms, this is exactly what we will do, for the sake of computational convenience and efficiency. For this example, then, .
We can now talk meaningfully about our parameterized policy, , where the subscript indicates that the policy depends on (in the example here) a list of 48 numbers. Before training, is typically initialized to random numbers near zero, a choice that will not, in general, yield an optimal policy. The goal of policy optimization is to somehow change in response to states observed, actions taken, and rewards received, so that the policy ultimately performs well — in the sense that it generates a good return.
But before we wade into those deep waters, a brief interlude: let’s introduce an example problem that will help make our discussion more concrete. While we could use an impressively difficult problem as our example, such scenarios are unnecessarily complicated when we’re trying to learn the basics, and can take a long time to train and simulate. So we’ll focus instead on a dead simple scenario, which can be trained in just a few minutes on a mediocre laptopWe should rest assured, however, that the methods introduced here are applicable to more complex, real-world problems. .
Part II: Trust Region Policy Optimization
The problem of teaching a machine to learn an optimal policy is frustrated by the long delay between actions and their positive or negative influence on rewards. This is known as the credit assignment problemIn the behavioral psychology literature, this is the notorious distal reward problem. .
Part III: Implementation
So, how to implement TRPO efficiently?


Installation¶
You should always have installation instructions for your package. Experienced coders will know how to install your code, but what about new users who may not be very familiar with Python?
The source files in the
GitHub repo include a
demo Python package called mypack
.
The mypack
package is very simple and all the dependencies are on PyPi.
This means they can all be listed within the setup.py
file. There are three
ways you can install mypack
:
Directly from the GitHub repository:
pip install git+https://github.com/jennirinker/code-for-the-world
Clone it and then install from the local copy:
git clone https://github.com/jennirinker/code-for-the-world cd code-for-the-world pip install .
Same as above but with an editable installation good for developers:
git clone https://github.com/jennirinker/code-for-the-world cd code-for-the-world pip install -e .


Boskalis grows in the Middle East with Horizon
Papendrecht (The Netherlands) - Dutch dredging and heavylift company Royal Boskalis Westminster has acquired the remaining 37.5% in the United Arab Emirates’s Horizon Group
Papendrecht (The Netherlands) - Dutch dredging and heavylift company Royal Boskalis Westminster has acquired the remaining 37.5% in the United Arab Emirates’s Horizon Group.
Earlier this year, Boskalis already acquired 62.5% of the shares. The 2019 revenue is expected to exceed USD 100 million and the activities will be consolidated as of 2020. Following this transaction, Boskalis will be able to optimize its successful and expanding position in the marine geophysical and geotechnical survey market.
Horizon will continue to focus on its traditionally strong market position in the Middle East and Northwest Europe with opportunities to expand into the emerging offshore wind market in the Far East making it highly complementary to the position already held by Boskalis through Gardline in Northwest Europe and on the East Coast of the United States.
Horizon was established in 2004 and is located in Sharjah in the United Arab Emirates. Its activities are largely based in the Arabian Gulf, the Red Sea and an increasing presence for offshore wind in the Far East. Its clients range from national and international oil companies as well as reputable international EPCI contractors to the oil and gas industry as well as offshore wind farm developers.


LOMOTIL - diphenoxylate hydrochloride and atropine sulfate tablet
Physicians Total Care, Inc.
Each Lomotil tablet and each 5 ml of Lomotil liquid for oral use contains:
diphenoxylate hydrochloride 2.5 mg
atropine sulfate ................. 0.025 mg
Diphenoxylate hydrochloride, an antidiarrheal, is ethyl 1-(3-cyano-3,3-diphenylpropyl)-4-phenylisonipecotate monohydrochloride and has the following structural formula:
Inactive ingredients of Lomotil tablets include acacia, corn starch, magnesium stearate, sorbitol, sucrose, and talc. Inactive ingredients of Lomotil liquid include cherry flavor, citric acid, ethyl alcohol 15%, glycerin, sodium phosphate, sorbitol, and water.
Diphenoxylate is rapidly and extensively metabolized in man by ester hydrolysis to diphenoxylic acid (difenoxine), which is biologically active and the major metabolite in the blood. After a 5-mg oral dose of carbon-14 labeled diphenoxylate hydrochloride in ethanolic solution was given to three healthy volunteers, an average of 14% of the drug plus its metabolites was excreted in the urine and 49% in the feces over a four-day period. Urinary excretion of the unmetabolized drug constituted less than 1% of the dose, and diphenoxylic acid plus its glucuronide conjugate constituted about 6% of the dose. In a 16-subject crossover bioavailability study, a linear relationship in the dose range of 2.5 to 10 mg was found between the dose of diphenoxylate hydrochloride (given as Lomotil liquid) and the peak plasma concentration, the area under the plasma concentration-time curve, and the amount of diphenoxylic acid excreted in the urine. In the same study the bioavailability of the tablet compared with an equal dose of the liquid was approximately 90%. The average peak plasma concentration of diphenoxylic acid following ingestion of four 2.5-mg tablets was 163 ng/ml at about 2 hours, and the elimination half-life of diphenoxylic acid was approximately 12 to 14 hours.
In dogs, diphenoxylate hydrochloride has a direct effect on circular smooth muscle of the bowel that conceivably results in segmentation and prolongation of gastrointestinal transit time. The clinical antidiarrheal action of diphenoxylate hydrochloride may thus be a consequence of enhanced segmentation that allows increased contact of the intraluminal contents with the intestinal mucosa.
Lomotil is contraindicated in patients with
LOMOTIL IS NOT AN INNOCUOUS DRUG AND DOSAGE RECOMMENDATIONS SHOULD BE STRICTLY ADHERED TO, ESPECIALLY IN CHILDREN. LOMOTIL IS NOT RECOMMENDED FOR CHILDREN UNDER 2 YEARS OF AGE. OVERDOSAGE MAY RESULT IN SEVERE RESPIRATORY DEPRESSION AND COMA, POSSIBLY LEADING TO PERMANENT BRAIN DAMAGE OR DEATH (SEE OVERDOSAGE).
THE USE OF LOMOTIL SHOULD BE ACCOMPANIED BY APPROPRIATE FLUID AND ELECTROLYTE THERAPY, WHEN INDICATED. IF SEVERE DEHYDRATION OR ELECTROLYTE IMBALANCE IS PRESENT, LOMOTIL SHOULD BE WITHHELD UNTIL APPROPRIATE CORRECTIVE THERAPY HAS BEEN INITIATED. DRUG-INDUCED INHIBITION OF PERISTALSIS MAY RESULT IN FLUID RETENTION IN THE INTESTINE, WHICH MAY FURTHER AGGRAVATE DEHYDRATION AND ELECTROLYTE IMBALANCE.
LOMOTIL SHOULD BE USED WITH SPECIAL CAUTION IN YOUNG CHILDREN BECAUSE THIS AGE GROUP MAY BE PREDISPOSED TO DELAYED DIPHENOXYLATE TOXICITY AND BECAUSE OF THE GREATER VARIABILITY OF RESPONSE IN THIS AGE GROUP.
Antiperistaltic agents may prolong and/or worsen diarrhea associated with organisms that penetrate the intestinal mucosa (toxigenic E. coli, Salmonella, Shigella), and pseudomembranous enterocolitis associated with broad-spectrum antibiotics. Antiperistaltic agents should not be used in these conditions.
In some patients with acute ulcerative colitis, agents that inhibit intestinal motility or prolong intestinal transit time have been reported to induce toxic megacolon. Consequently, patients with acute ulcerative colitis should be carefully observed and Lomotil therapy should be discontinued promptly if abdominal distention occurs or if other untoward symptoms develop.
Since the chemical structure of diphenoxylate hydrochloride is similar to that of meperidine hydrochloride, the concurrent use of Lomotil with monoamine oxidase (MAO) inhibitors may, in theory, precipitate hypertensive crisis.
Lomotil should be used with extreme caution in patients with advanced hepatorenal disease and in all patients with abnormal liver function since hepatic coma may be precipitated.
Diphenoxylate hydrochloride may potentiate the action of barbiturates, tranquilizers, and alcohol. Therefore, the patient should be closely observed when any of these are used concomitantly.
Since a subtherapeutic dose of atropine has been added to the diphenoxylate hydrochloride, consideration should be given to the precautions relating to the use of atropine. In children, Lomotil should be used with caution since signs of atropinism may occur even with recommended doses, particularly in patients with Down's syndrome.
Information For PatientsINFORM THE PATIENT (PARENT OR GUARDIAN) NOT TO EXCEED THE RECOMMENDED DOSAGE AND TO KEEP LOMOTIL OUT OF THE REACH OF CHILDREN AND IN A CHILD-RESISTANT CONTAINER. INFORM THE PATIENT OF THE CONSEQUENCES OF OVERDOSAGE, INCLUDING SEVERE RESPIRATORY DEPRESSION AND COMA, POSSIBLY LEADING TO PERMANENT BRAIN DAMAGE OR DEATH. Lomotil may produce drowsiness or dizziness. The patient should be cautioned regarding activities requiring mental alertness, such as driving or operating dangerous machinery. Potentiation of the action of alcohol, barbiturates, and tranquilizers with concomitant use of Lomotil should be explained to the patient. The physician should also provide the patient with other information in this labeling, as appropriate.
Drug InteractionsKnown drug interactions include barbiturates, tranquilizers, and alcohol. Lomotil may interact with MAO inhibitors (see Warnings).
In studies with male rats, diphenoxylate hydrochloride was found to inhibit the hepatic microsomal enzyme system at a dose of 2 mg/kg/day. Therefore, diphenoxylate has the potential to prolong the biological half-lives of drugs for which the rate of elimination is dependent on the microsomal drug metabolizing enzyme system.
Carcinogenesis, Mutagenesis, Impairment Of FertilityNo long-term study in animals has been performed to evaluate carcinogenic potential. Diphenoxylate hydrochloride was administered to male and female rats in their diets to provide dose levels of 4 and 20 mg/kg/day throughout a three-litter reproduction study. At 50 times the human dose (20 mg/kg/day), female weight gain was reduced and there was a marked effect on fertility as only 4 of 27 females became pregnant in three test breedings. The relevance of this finding to usage of Lomotil in humans is unknown.
PregnancyPregnancy Category C. Diphenoxylate hydrochloride has been shown to have an effect on fertility in rats when given in doses 50 times the human dose (see above discussion). Other findings in this study include a decrease in maternal weight gain of 30% at 20 mg/kg/day and of 10% at 4 mg/kg/day. At 10 times the human dose (4 mg/kg/day), average litter size was slightly reduced.
Teratology studies were conducted in rats, rabbits, and mice with diphenoxylate hydrochloride at oral doses of 0.4 to 20 mg/kg/day. Due to experimental design and small numbers of litters, embryotoxic, fetotoxic, or teratogenic effects cannot be adequately assessed. However, examination of the available fetuses did not reveal any indication of teratogenicity.
There are no adequate and well-controlled studies in pregnant women. Lomotil should be used during pregnancy only if the anticipated benefit justifies the potential risk to the fetus.
Nursing MothersCaution should be exercised when Lomotil is administered to a nursing woman, since the physicochemical characteristics of the major metabolite, diphenoxylic acid, are such that it may be excreted in breast milk and since it is known that atropine is excreted in breast milk.
Pediatric UseLomotil may be used as an adjunct to the treatment of diarrhea but should be accompanied by appropriate fluid and electrolyte therapy, if needed. LOMOTIL IS NOT RECOMMENDED FOR CHILDREN UNDER 2 YEARS OF AGE. Lomotil should be used with special caution in young children because of the greater variability of response in this age group. See Warnings and Dosage and Administration. In case of accidental ingestion by children, see Overdosage for recommended treatment.
At therapeutic doses, the following have been reported; they are listed in decreasing order of severity, but not of frequency:
Nervous system: numbness of extremities, euphoria, depression, malaise/lethargy, confusion, sedation/drowsiness, dizziness, restlessness, headache.
Allergic: anaphylaxis, angioneurotic edema, urticaria, swelling of the gums, pruritus.
Gastrointestinal system: toxic megacolon, paralytic ileus, pancreatitis, vomiting, nausea, anorexia, abdominal discomfort.
The following atropine sulfate effects are listed in decreasing order of severity, but not of frequency: hyperthermia, tachycardia, urinary retention, flushing, dryness of the skin and mucous membranes. These effects may occur, especially in children.

Lomotil is classified as a Schedule V controlled substance by federal regulation. Diphenoxylate hydrochloride is chemically related to the narcotic analgesic meperidine.
Drug abuse and dependenceIn doses used for the treatment of diarrhea, whether acute or chronic, diphenoxylate has not produced addiction.
Diphenoxylate hydrochloride is devoid of morphine-like subjective effects at therapeutic doses. At high doses it exhibits codeine-like subjective effects. The dose which produces antidiarrheal action is widely separated from the dose which causes central nervous system effects. The insolubility of diphenoxylate hydrochloride in commonly available aqueous media precludes intravenous self-administration. A dose of 100 to 300 mg/day, which is equivalent to 40 to 120 tablets, administered to humans for 40 to 70 days, produced opiate withdrawal symptoms. Since addiction to diphenoxylate hydrochloride is possible at high doses, the recommended dosage should not be exceeded.
RECOMMENDED DOSAGE SCHEDULES SHOULD BE STRICTLY FOLLOWED.
Diagnosis: Initial signs of overdosage may include dryness of the skin and mucous membranes, mydriasis, restlessness, flushing, hyperthermia, and tachycardia followed by lethargy or coma, hypotonic reflexes, nystagmus, pinpoint pupils, and respiratory depression. Respiratory depression may be evidenced as late as 30 hours after ingestion and may recur despite an initial response to narcotic antagonists. TREAT ALL POSSIBLE LOMOTIL OVERDOSAGES AS SERIOUS AND MAINTAIN MEDICAL OBSERVATION FOR AT LEAST 48 HOURS, PREFERABLY UNDER CONTINUOUS HOSPITAL CARE.
Treatment: In the event of overdose, induction of vomiting, gastric lavage, establishment of a patent airway, and possibly mechanically assisted respiration are advised. In vitro and animal studies indicate that activated charcoal may significantly decrease the bioavailability of diphenoxylate. In noncomatose patients, a slurry of 100 g of activated charcoal can be administered immediately after the induction of vomiting or gastric lavage.
A pure narcotic antagonist (eg, naloxone) should be used in the treatment of respiratory depression caused by Lomotil. When a narcotic antagonist is administered intravenously, the onset of action is generally apparent within two minutes. It may also be administered subcutaneously or intramuscularly, providing a slightly less rapid onset of action but a more prolonged effect.
To counteract respiratory depression caused by Lomotil overdosage, the following dosage schedule for the narcotic antagonist naloxone hydrochloride should be followed:
Adult dosage: An initial dose of 0.4 mg to 2 mg of naloxone hydrochloride may be administered intravenously. If the desired degree of counteraction and improvement in respiratory functions is not obtained, it may be repeated at 2- to 3-minute intervals. If no response is observed after 10 mg of naloxone hydrochloride has been administered, the diagnosis of narcotic-induced or partial narcotic-induced toxicity should be questioned. Intramuscular or subcutaneous administration may be necessary if the intravenous route is not available.
Children: The usual initial dose in children is 0.01 mg/kg body weight given I.V. If this dose does not result in the desired degree of clinical improvement, a subsequent dose of 0.1 mg/kg body weight may be administered. If an I.V. route of administration is not available, naloxone hydrochloride may be administered I.M. or S.C. in divided doses. If necessary, naloxone hydrochloride can be diluted with sterile water for injection.
Following initial improvement of respiratory function, repeated doses of naloxone hydrochloride may be required to counteract recurrent respiratory depression. Supplemental intramuscular doses of naloxone hydrochloride may be utilized to produce a longer-lasting effect.
Since the duration of action of diphenoxylate hydrochloride is longer than that of naloxone hydrochloride, improvement of respiration following administration may be followed by recurrent respiratory depression. Consequently, continuous observation is necessary until the effect of diphenoxylate hydrochloride on respiration has passed. This effect may persist for many hours. The period of observation should extend over at least 48 hours, preferably under continuous hospital care. Although signs of overdosage and respiratory depression may not be evident soon after ingestion of diphenoxylate hydrochloride, respiratory depression may occur from 12 to 30 hours later.
DO NOT EXCEED RECOMMENDED DOSAGE.
Adults: The recommended initial dosage is two Lomotil tablets four times daily or 10 ml (two regular teaspoonfuls) of Lomotil liquid four times daily (20 mg per day). Most patients will require this dosage until initial control has been achieved, after which the dosage may be reduced to meet individual requirements. Control may often be maintained with as little as 5 mg (two tablets or 10 ml of liquid) daily.
Clinical improvement of acute diarrhea is usually observed within 48 hours. If clinical improvement of chronic diarrhea after treatment with a maximum daily dose of 20 mg of diphenoxylate hydrochloride is not observed within 10 days, symptoms are unlikely to be controlled by further administration.
Children: Lomotil is not recommended in children under 2 years of age and should be used with special caution in young children (see Warnings and Precautions). The nutritional status and degree of dehydration must be considered. In children under 13 years of age, use Lomotil liquid. Do not use Lomotil tablets for this age group.
Only the plastic dropper should be used when measuring Lomotil liquid for administration to children.
Dosage schedule for children: The recommended initial total daily dosage of Lomotil liquid for children is 0.3 to 0.4 mg/kg, administered in four divided doses. The following table provides an approximate initial daily dosage recommendation for children.
| Age (years) |
Approximate weight | Dosage in ml (four times daily) |
|
|---|---|---|---|
| (kg) | (lb) | ||
| 2 | 11–14 | 24–31 | 1.5–3.0 |
| 3 | 12–16 | 26–35 | 2.0–3.0 |
| 4 | 14–20 | 31–44 | 2.0–4.0 |
| 5 | 16–23 | 35–51 | 2.5–4.5 |
| 6–8 | 17–32 | 38–71 | 2.5–5.0 |
| 9–12 | 23–55 | 51–121 | 3.5–5.0 |
These pediatric schedules are the best approximation of an average dose recommendation which may be adjusted downward according to the overall nutritional status and degree of dehydration encountered in the sick child. Reduction of dosage may be made as soon as initial control of symptoms has been achieved. Maintenance dosage may be as low as one-fourth of the initial daily dosage. If no response occurs within 48 hours, Lomotil is unlikely to be effective.

Tablets—round, white, with SEARLE debossed on one side and 61 on the other side and containing 2.5 mg of diphenoxylate hydrochloride and 0.025 mg of atropine sulfate, supplied as:
NDC Number Size
54868-0427-5 bottle of 10
54868-0427-4 bottle of 12
54868-0427-3 bottle of 30
54868-0427-0 bottle of 100
Rx only
|
LOMOTIL
diphenoxylate hydrochloride tablet | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
|
| Labeler - Physicians Total Care, Inc. (194123980) |
| Establishment | |||
| Name | Address | ID/FEI | Business Operations |
|---|---|---|---|
| Physicians Total Care, Inc. | 194123980 | repack, relabel |


gdalwarp¶
Image reprojection and warping utility
Synopsis¶
gdalwarp [--help-general] [--formats]
[-s_srs srs_def] [-t_srs srs_def] [-ct string] [-to "NAME=VALUE"]* [-novshiftgrid]
[-order n | -tps | -rpc | -geoloc] [-et err_threshold]
[-refine_gcps tolerance [minimum_gcps]]
[-te xmin ymin xmax ymax] [-te_srs srs_def]
[-tr xres yres] [-tap] [-ts width height]
[-ovr level|AUTO|AUTO-n|NONE] [-wo "NAME=VALUE"] [-ot Byte/Int16/...] [-wt Byte/Int16]
[-srcnodata "value [value...]"] [-dstnodata "value [value...]"]
[-srcalpha|-nosrcalpha] [-dstalpha]
[-r resampling_method] [-wm memory_in_mb] [-multi] [-q]
[-cutline datasource] [-cl layer] [-cwhere expression]
[-csql statement] [-cblend dist_in_pixels] [-crop_to_cutline]
[-of format] [-co "NAME=VALUE"]* [-overwrite]
[-nomd] [-cvmd meta_conflict_value] [-setci] [-oo NAME=VALUE]*
[-doo NAME=VALUE]*
srcfile* dstfile
Description¶
The gdalwarp utility is an image mosaicing, reprojection and warping utility. The program can reproject to any supported projection, and can also apply GCPs stored with the image if the image is “raw” with control information.
-
-s_srs
<srs def>
¶ Set source spatial reference.
The coordinate systems that can be passed are anything supported by the OGRSpatialReference.SetFromUserInput() call, which includes EPSG PCS and GCSes (i.e. EPSG:4296), PROJ.4 declarations (as above), or the name of a .prj file containing well known text. Starting with GDAL 2.2, if the SRS has an explicit vertical datum that points to a PROJ.4 geoidgrids, and the input dataset is a single band dataset, a vertical correction will be applied to the values of the dataset.
-
-t_srs
<srs_def>
¶ Set target spatial reference.
The coordinate systems that can be passed are anything supported by the OGRSpatialReference.SetFromUserInput() call, which includes EPSG PCS and GCSes (i.e. EPSG:4296), PROJ.4 declarations (as above), or the name of a .prj file containing well known text. Starting with GDAL 2.2, if the SRS has an explicit vertical datum that points to a PROJ.4 geoidgrids, and the input dataset is a single band dataset, a vertical correction will be applied to the values of the dataset.
-
-ct
<string>
¶ A PROJ string (single step operation or multiple step string starting with +proj=pipeline), a WKT2 string describing a CoordinateOperation, or a urn:ogc:def:coordinateOperation:EPSG::XXXX URN overriding the default transformation from the source to the target CRS. It must take into account the axis order of the source and target CRS.
New in version 3.0.
-
-to
<NAME=VALUE>
¶ Set a transformer option suitable to pass to
GDALCreateGenImgProjTransformer2()
.
-
-novshiftgrid
¶
Disable the use of vertical datum shift grids when one of the source or target SRS has an explicit vertical datum, and the input dataset is a single band dataset.
New in version 2.2.
-
-order
<n>
¶ order of polynomial used for warping (1 to 3). The default is to select a polynomial order based on the number of GCPs.
-
-tps
¶
Force use of thin plate spline transformer based on available GCPs.
-
-rpc
¶
Force use of RPCs.
-
-geoloc
¶
Force use of Geolocation Arrays.
-
-et
<err_threshold>
¶ Error threshold for transformation approximation (in pixel units - defaults to 0.125, unless, starting with GDAL 2.1, the RPC_DEM warping option is specified, in which case, an exact transformer, i.e. err_threshold=0, will be used).
-
-refine_gcps
<tolerance minimum_gcps>
¶ Refines the GCPs by automatically eliminating outliers. Outliers will be eliminated until minimum_gcps are left or when no outliers can be detected. The tolerance is passed to adjust when a GCP will be eliminated. Not that GCP refinement only works with polynomial interpolation. The tolerance is in pixel units if no projection is available, otherwise it is in SRS units. If minimum_gcps is not provided, the minimum GCPs according to the polynomial model is used.
-
-te
<xmin ymin xmax ymax>
¶ Set georeferenced extents of output file to be created (in target SRS by default, or in the SRS specified with
-te_srs
)
-
-te_srs
<srs_def>
¶ Specifies the SRS in which to interpret the coordinates given with -te. The <srs_def> may be any of the usual GDAL/OGR forms, complete WKT, PROJ.4, EPSG:n or a file containing the WKT. This must not be confused with -t_srs which is the target SRS of the output dataset.
-te_srs
is a convenience e.g. when knowing the output coordinates in a geodetic long/lat SRS, but still wanting a result in a projected coordinate system.
-
-tr
<xres> <yres>
¶ Set output file resolution (in target georeferenced units)
-
-tap
¶
(target aligned pixels) align the coordinates of the extent of the output file to the values of the
-tr
, such that the aligned extent includes the minimum extent.
-
-ts
<width> <height>
¶ Set output file size in pixels and lines. If width or height is set to 0, the other dimension will be guessed from the computed resolution. Note that
-ts
cannot be used with-tr
-
-ovr
<level|AUTO|AUTO-n|NONE>
¶ To specify which overview level of source files must be used. The default choice, AUTO, will select the overview level whose resolution is the closest to the target resolution. Specify an integer value (0-based, i.e. 0=1st overview level) to select a particular level. Specify AUTO-n where n is an integer greater or equal to 1, to select an overview level below the AUTO one. Or specify NONE to force the base resolution to be used (can be useful if overviews have been generated with a low quality resampling method, and the warping is done using a higher quality resampling method).
-
-wo
`"NAME=VALUE"`
¶ Set a warp option. The
GDALWarpOptions::papszWarpOptions
docs show all options. Multiple-wo
options may be listed.
-
-ot
<type>
¶ Force the output image bands to have a specific type. Use type names (i.e.
Byte
,Int16
,…)
-
-wt
<type>
¶ Working pixel data type. The data type of pixels in the source image and destination image buffers.
-
-r
<resampling_method>
¶ Resampling method to use. Available methods are:
near
: nearest neighbour resampling (default, fastest algorithm, worst interpolation quality).bilinear
: bilinear resampling.cubic
: cubic resampling.cubicspline
: cubic spline resampling.lanczos
: Lanczos windowed sinc resampling.average
: average resampling, computes the weighted average of all non-NODATA contributing pixels.mode
: mode resampling, selects the value which appears most often of all the sampled points.max
: maximum resampling, selects the maximum value from all non-NODATA contributing pixels.min
: minimum resampling, selects the minimum value from all non-NODATA contributing pixels.med
: median resampling, selects the median value of all non-NODATA contributing pixels.q1
: first quartile resampling, selects the first quartile value of all non-NODATA contributing pixels.q3
: third quartile resampling, selects the third quartile value of all non-NODATA contributing pixels.sum
: compute the weighted sum of all non-NODATA contributing pixels (since GDAL 3.1)
-
-srcnodata
<value [value...]>
¶ Set nodata masking values for input bands (different values can be supplied for each band). If more than one value is supplied all values should be quoted to keep them together as a single operating system argument. Masked values will not be used in interpolation. Use a value of
None
to ignore intrinsic nodata settings on the source dataset.
-
-dstnodata
<value [value...]>
¶ Set nodata values for output bands (different values can be supplied for each band). If more than one value is supplied all values should be quoted to keep them together as a single operating system argument. New files will be initialized to this value and if possible the nodata value will be recorded in the output file. Use a value of
None
to ensure that nodata is not defined. If this argument is not used then nodata values will be copied from the source dataset.
-
-srcalpha
¶
Force the last band of a source image to be considered as a source alpha band.
-
-nosrcalpha
¶
Prevent the alpha band of a source image to be considered as such (it will be warped as a regular band)
New in version 2.2.
-
-dstalpha
¶
Create an output alpha band to identify nodata (unset/transparent) pixels.
-
-wm
<memory_in_mb>
¶ Set the amount of memory that the warp API is allowed to use for caching. The value is interpreted as being in megabytes if the value is less than 10000. For values >=10000, this is interpreted as bytes.
-
-multi
¶
Use multithreaded warping implementation. Two threads will be used to process chunks of image and perform input/output operation simultaneously. Note that computation is not multithreaded itself. To do that, you can use the
-wo
NUM_THREADS=val/ALL_CPUS option, which can be combined with-multi
-
-q
¶
Be quiet.
-
-of
<format>
¶ Select the output format. Starting with GDAL 2.3, if not specified, the format is guessed from the extension (previously was GTiff). Use the short format name.
-
-co
<NAME=VALUE>
¶ Many formats have one or more optional creation options that can be used to control particulars about the file created. For instance, the GeoTIFF driver supports creation options to control compression, and whether the file should be tiled.
The creation options available vary by format driver, and some simple formats have no creation options at all. A list of options supported for a format can be listed with the –formats command line option but the documentation for the format is the definitive source of information on driver creation options. See Raster drivers format specific documentation for legal creation options for each format.
-
-cutline
<datasource>
¶ Enable use of a blend cutline from the name OGR support datasource.
-
-cl
<layername>
¶ Select the named layer from the cutline datasource.
-
-cwhere
<expression>
¶ Restrict desired cutline features based on attribute query.
-
-cblend
<distance>
¶ Set a blend distance to use to blend over cutlines (in pixels).
-
-crop_to_cutline
¶
Crop the extent of the target dataset to the extent of the cutline.
-
-overwrite
¶
Overwrite the target dataset if it already exists.
-
-nomd
¶
Do not copy metadata. Without this option, dataset and band metadata (as well as some band information) will be copied from the first source dataset. Items that differ between source datasets will be set to * (see
-cvmd
option).
-
-cvmd
<meta_conflict_value>
¶ Value to set metadata items that conflict between source datasets (default is “*”). Use “” to remove conflicting items.
-
-setci
¶
Set the color interpretation of the bands of the target dataset from the source dataset.
-
-oo
<NAME=VALUE>
¶ Dataset open option (format specific)
-
-doo
<NAME=VALUE>
¶ Output dataset open option (format specific)
New in version 2.1.
-
<srcfile>
¶
The source file name(s).
-
<dstfile>
¶
The destination file name.
Mosaicing into an existing output file is supported if the output file already exists. The spatial extent of the existing file will not be modified to accommodate new data, so you may have to remove it in that case, or use the -overwrite option.
Polygon cutlines may be used as a mask to restrict the area of the destination file that may be updated, including blending. If the OGR layer containing the cutline features has no explicit SRS, the cutline features must be in the SRS of the destination file. When writing to a not yet existing target dataset, its extent will be the one of the original raster unless -te or -crop_to_cutline are specified.
When doing vertical shift adjustments, the transformer option -to ERROR_ON_MISSING_VERT_SHIFT=YES can be used to error out as soon as a vertical shift value is missing (instead of 0 being used).
Starting with GDAL 3.1, it is possible to use as output format a driver that only supports the CreateCopy operation. This may internally imply creation of a temporary file.
Examples¶
Basic transformation:
gdalwarp -t_srs EPSG:4326 input.tif output.tif
For instance, an eight bit spot scene stored in GeoTIFF with control points mapping the corners to lat/long could be warped to a UTM projection with a command like this:
gdalwarp -t_srs '+proj=utm +zone=11 +datum=WGS84' -overwrite raw_spot.tif utm11.tif
For instance, the second channel of an ASTER image stored in HDF with control points mapping the corners to lat/long could be warped to a UTM projection with a command like this:
New in version 2.2.
gdalwarp -overwrite HDF4_SDS:ASTER_L1B:"pg-PR1B0000-2002031402_100_001":2 pg-PR1B0000-2002031402_100_001_2.tif
To apply a cutline on a un-georeferenced image and clip from pixel (220,60) to pixel (1160,690):
gdalwarp -overwrite -to SRC_METHOD=NO_GEOTRANSFORM -to DST_METHOD=NO_GEOTRANSFORM -te 220 60 1160 690 -cutline cutline.csv in.png out.tif
where cutline.csv content is like:
id,WKT
1,"POLYGON((....))"
To transform a DEM from geoid elevations (using EGM96) to WGS84 ellipsoidal heights:
New in version 2.2.
gdalwarp -overwrite in_dem.tif out_dem.tif -s_srs EPSG:4326+5773 -t_srs EPSG:4979


Home
New Location Intake
New Store Intake Form
Store location
Minimum number of customers per hour
Maximun number of customers per hour
Average amount of cookies sold per transaction
submit
Hourly Cookie Sales for All Locations