Edit weight of block without using drag and drop
you can do it by using context name in hook_context_load_alter() and tweak it.

/**
 * Implementation of hook_context_load_alter()
 */
function mymodule_context_load_alter(&amp;$context) {
  if ($context-&gt;name == 'my_context_name_from_the_ui') {
    $context-&gt;reactions['block']['blocks']['my_block_name']['weight'] = -99;
  }
}