Status for all orders in a stock

        https://starfighter.readme.io/docs/status-for-all-orders-in-a-stock
198126
def status_for_all_orders_in_a_stock(self, stock):
        
        url_fragment = 'venues/{venue}/accounts/{account}/stocks/{stock}/orders'.format(
            stock=stock,
            venue=self.venue,
            account=self.account,
        )
        url = urljoin(self.base_url, url_fragment)
        return self.session.get(url).json()
650542
def toner_status(self, filter_supported: bool = True) -> Dict[str, Any]:
        """"""
        toner_status = {}
        for color in self.COLOR_NAMES:
            try:
                toner_stat = self.data.get(
                    '{}_{}'.format(SyncThru.TONER, color), {})
                if filter_supported and toner_stat.get('opt', 0) == 0:
                    continue
                else:
                    toner_status[color] = toner_stat
            except (KeyError, AttributeError):
                toner_status[color] = {}
        return toner_status
740762
def get_orders(self, **params):
        """"""
        response = self._get('v2', 'orders', params=params)
        return self._make_api_object(response, Order)
805529
public function index()
    {
        $orderStateGrid = new OrderStatusDataGrid($this->repository->query());

        return view('avored-framework::product.order-status.index')->with('dataGrid', $orderStateGrid->dataGrid);
    }
1283735
public static function statusUpdate($orderStatusUpdate)
    {
        if (empty($orderStatusUpdate)) {
            throw new OpenPayU_Exception('Empty order status data');
        }

        try {
            $authType = self::getAuth();
        } catch (OpenPayU_Exception $e) {
            throw new OpenPayU_Exception($e->getMessage(), $e->getCode());
        }

        $data = OpenPayU_Util::buildJsonFromArray($orderStatusUpdate);
        $pathUrl = OpenPayU_Configuration::getServiceUrl() . self::ORDER_SERVICE . $orderStatusUpdate['orderId'] . '/status';

        $result = self::verifyResponse(OpenPayU_Http::doPut($pathUrl, $data, $authType), 'OrderStatusUpdateResponse');

        return $result;
    }
1254290
def get_stock_codes(realtime=False):
    """"""
    if realtime:
        all_stock_codes_url = "http://www.shdjt.com/js/lib/astock.js"
        grep_stock_codes = re.compile(r"~(\d+)`")
        response = requests.get(all_stock_codes_url)
        stock_codes = grep_stock_codes.findall(response.text)
        with open(stock_code_path(), "w") as f:
            f.write(json.dumps(dict(stock=stock_codes)))
        return stock_codes

    with open(stock_code_path()) as f:
        return json.load(f)["stock"]
955714
def admin_update_sort_order
      params[:product_ids].each_with_index do |product_id, index|
        Product.find(product_id.to_i).update_attribute(:sort_order, index)
      end      
      render :json => { :success => true }
    end
1064801
def status(self):
        """"""
        status_request = etcdrpc.StatusRequest()
        status_response = self.maintenancestub.Status(
            status_request,
            self.timeout,
            credentials=self.call_credentials,
            metadata=self.metadata
        )

        for m in self.members:
            if m.id == status_response.leader:
                leader = m
                break
        else:
            # raise exception?
            leader = None

        return Status(status_response.version,
                      status_response.dbSize,
                      leader,
                      status_response.raftIndex,
                      status_response.raftTerm)
364236
def status(context):
    """"""
    context.obj.find_repo_type()
    context.obj.call([context.obj.vc_name, 'status'])
481472
def Cmd_display(self):
    
    re = "%(stock_no)s %(stock_name)s %(stock_date)s %(stock_price)s %(stock_range)s %(stock_range_per).2f%% %(RABC)s %(stock_vol)s" % {
        'stock_name': unicode(self.stock_name),
        'stock_no': unicode(self.stock_no),
        'stock_date': unicode(self.data_date[-1]),
        'stock_price': unicode(self.raw_data[-1]),
        'stock_range': unicode(self.stock_range[-1]),
        'stock_range_per': self.range_per,
        'stock_vol': self.stock_vol[-1]/1000,
        'RABC': self.RABC
      }
    return re
1137389
def output(self):
    #re = "{%(time)s} %(name)s %(stock_no)s %(c)s %(range)+.2f(%(pp)+.2f%%) %(value)s" % {
    '''
    
    '''
    if covstr(self.g['range']) > 0:
      css = "red"
    elif covstr(self.g['range']) < 0:
      css = "green"
    else:
      css = "gray"

    re = {
      'name': self.g['name'],
      'stock_no': self.g['no'],
      'time': self.g['time'],
      'open': self.g['open'],
      'h': self.g['h'],
      'l': self.g['l'],
      'c': self.g['c'],
      'max': self.g['max'],
      'min': self.g['min'],
      'range': covstr(self.g['range']),
      'ranges': self.g['ranges'],
      'value': self.g['value'],
      'pvalue': self.g['pvalue'],
      'pp': covstr(self.g['pp']),
      'top5buy': self.g['top5buy'],
      'top5sell': self.g['top5sell'],
      'crosspic': self.g['crosspic'],
      'css': css
    }
    return re
573463
static function orderStatusCount( $showInactive = false )
    {
        $db = eZDB::instance();

        $condText = '';
        if ( !$showInactive )
            $condText = " WHERE is_active = 1";
        $countArray = $db->arrayQuery(  "SELECT count( * ) AS count FROM ezorder_status$condText" );
        return $countArray[0]['count'];
    }
432930
def update_status(table_name="swdata", date_column="date"):
    
    status_text = 'Latest entry: {}'.format(
        _get_most_recent_record(table_name, date_column))
    L.info(status_text)

    scraperwiki.status('ok', status_text)
1051173
def checkStock(self):
        """"""
        if not self.preferences:
            logger.debug("no preferences")
            return None
        soup = BeautifulSoup(
            self.xpath(path['stock-table'])[0].html, "html.parser")
        count = 0
        # iterate through product in left panel
        for product in soup.select("div.tradebox"):
            prod_name = product.select("span.instrument-name")[0].text
            stk_name = [x for x in self.preferences
                        if x.lower() in prod_name.lower()]
            if not stk_name:
                continue
            name = prod_name
            if not [x for x in self.stocks if x.product == name]:
                self.stocks.append(Stock(name))
            stock = [x for x in self.stocks if x.product == name][0]
            if 'tradebox-market-closed' in product['class']:
                stock.market = False
            if not stock.market:
                logger.debug("market closed for %s" % stock.product)
                continue
            sell_price = product.select("div.tradebox-price-sell")[0].text
            buy_price = product.select("div.tradebox-price-buy")[0].text
            sent = int(product.select(path['sent'])[0].text.strip('%')) / 100
            stock.new_rec([sell_price, buy_price, sent])
            count += 1
        logger.debug(f"added %d stocks" % count)
        return self.stocks
166891
def status(self, s=None):
        
        if s is None:
            return self.states[self._status]
        if isinstance(s, str):
            s = self.states.index(s)
        self._status = s
        self.textproperty.SetLineOffset(self.offset)
        self.actor.SetInput(self.spacer + self.states[s] + self.spacer)
        s = s % len(self.colors)  # to avoid mismatch
        self.textproperty.SetColor(colors.getColor(self.colors[s]))
        bcc = numpy.array(colors.getColor(self.bcolors[s]))
        self.textproperty.SetBackgroundColor(bcc)
        if self.showframe:
            self.textproperty.FrameOn()
            self.textproperty.SetFrameWidth(self.framewidth)
            self.textproperty.SetFrameColor(numpy.sqrt(bcc))
1313587
def show_status(self):
        
        txt = 'Agent Status:\n'
        print(txt)
        txt += "start_x  = " + str(self.start_x) + "\n"
        txt += "start_y  = " + str(self.start_y) + "\n"
        txt += "target_x = " + str(self.target_x) + "\n"
        txt += "target_y = " + str(self.target_y) + "\n"
        txt += "current_x = " + str(self.current_x) + "\n"
        txt += "current_y = " + str(self.current_y) + "\n"
       
        
        print(self.grd)
        return txt
182459
def status(c):
    
    # TODO: wants some holistic "you don't actually HAVE any changes to
    # release" final status - i.e. all steps were at no-op status.
    actions, state = _converge(c)
    table = []
    # NOTE: explicit 'sensible' sort (in rough order of how things are usually
    # modified, and/or which depend on one another, e.g. tags are near the end)
    for component in "changelog version tag".split():
        table.append((component.capitalize(), actions[component].value))
    print(tabulate(table))
    return actions, state