Verify if a item has a receipt.
17059
def has_receipt(item):
    
    pronac_id = str(item['idPronac'])
    item_id = str(item["idPlanilhaItens"])

    combined_id = f'{pronac_id}/{item_id}'

    return combined_id in data.receipt.index
1061872
private boolean lookForStore(int seen) {
        if (!OpcodeUtils.isStore(seen)) {
            return false;
        }

        storeReg = RegisterUtils.getStoreReg(this, seen);
        return true;
    }
494838
def _build_receipt_table(result, billing="hourly", test=False):
    """"""
    title = "OrderId: %s" % (result.get('orderId', 'No order placed'))
    table = formatting.Table(['Cost', 'Description'], title=title)
    table.align['Cost'] = 'r'
    table.align['Description'] = 'l'
    total = 0.000
    if test:
        prices = result['prices']
    else:
        prices = result['orderDetails']['prices']

    for item in prices:
        rate = 0.000
        if billing == "hourly":
            rate += float(item.get('hourlyRecurringFee', 0.000))
        else:
            rate += float(item.get('recurringFee', 0.000))
        total += rate
        table.add_row([rate, item['item']['description']])
    table.add_row(["%.3f" % total, "Total %s cost" % billing])
    return table
142420
public function verifyReceipt($receipt) {
        $Request = $this->getRequest($this->getEndpointUrl());
        $Request->addPostField('receipt-data', $receipt)
            ->addPostField('password', $this->getPassword());
        $data = $Request->send();
        try {
            return ResponsePayload::initializeByString($data);
        } catch (InvalidArgumentException $Ex) {
            try {
                return RenewableStatus::initializeByString($data);
            } catch (InvalidArgumentException $ex) {
                return Status::initializeByString($data);
            }
        }
    }
654494
def count(self, item):
        """"""
        if not isinstance(item, str):
            return 0
        count = 0
        for entry in self:
            if item.lower() == entry.lower():
                count += 1
        return count
809044
def IsAllSpent(self):
        
        for item in self.Items:
            if item == CoinState.Confirmed:
                return False
        return True
1001651
def instance_contains(container, item):
    """"""
    return item in (member for _, member in inspect.getmembers(container))
386925
def verifyChecksum(  order_Id,  amount,  authDesc,  checksum) 
			String str = @merchant_Id+"|"+order_Id+"|"+amount+"|"+authDesc+"|"+@working_Key
			String newChecksum = Zlib::adler32(str).to_s
			return (newChecksum.eql?(checksum)) ? true : false
		end
445523
def check_inclusions(item, included=[], excluded=[]):
    """"""
    if (len(included) == 0):
        if len(excluded) == 0 or item not in excluded:
            return True
        else:
            return False
    else:
        if item in included:
            return True
    return False
1157929
def money_receipts(pronac, dt):
    
    df = verified_repeated_receipts_for_pronac(pronac)
    comprovantes_saque = df[df['tpFormaDePagamento'] == 3.0]

    return metric_return(comprovantes_saque)
71668
def verify(self, checksum=None, token=None, full_response=False):
        """"""
        payload = {"checksum":checksum, "a":"verify"}
        if token:
            payload.update({"token":token})
        return self.get_shards(Shard(**payload), full_response=True)
689468
def Verify(self, mempool):
        
        if not super(ClaimTransaction, self).Verify(mempool):
            return False

        # wat does this do
        # get all claim transactions from mempool list
        # that are not this claim
        # and gather all the claims of those claim transactions
        # and see if they intersect the claims of this transaction
        # and if that number is greater than zero that we do not verify
        # (now, to do that in python)
        # if (mempool.OfType < ClaimTransaction > ().Where(p => p != this).SelectMany(p= > p.Claims).Intersect(Claims).Count() > 0)
        # return false;

        # im sorry about the below
        otherclaimTxs = [tx for tx in mempool if tx is ClaimTransaction and tx is not self]
        for other in otherclaimTxs:
            # check to see if the length of the intersection between this objects claim's and the other txs claims is > 0
            if len([list(filter(lambda x: x in self.Claims, otherClaims)) for otherClaims in other.Claims]):
                return False

        txResult = None
        for tx in self.GetTransactionResults():
            if tx.AssetId == Blockchain.SystemCoin().Hash:
                txResult = tx
                break

        if txResult is None or txResult.Amount > Fixed8(0):
            return False

        try:
            return Blockchain.CalculateBonusIgnoreClaimed(self.Claims, False) == -txResult.Amount

        except Exception as e:
            logger.error('Could not calculate bonus: %s ' % e)

        return False
912958
function verifyExpiration() {
    if (opt.removeExpired === false) return;
    let now = Date.now();
    Object.keys(SESSION_STORE).forEach((id) => {
      let item = SESSION_STORE[id];
      if (!item) return;
      if (now < item.e) return;
      delete SESSION_STORE[id];
    });
  }
518666
def verify_false(self, expr, msg=None):
        
        try:
            self.assert_false(expr, msg)
        except AssertionError, e:
            if msg:
                m = "%s:\n%s" % (msg, str(e))
            else:
                m = str(e)
            self.verification_erorrs.append(m)
948442
def safe_record(ctx, item):
    """"""
    if isinstance(item, basestring):
        return ctx.env.ref(item)
    return item
817884
def verify(self):
        ''''''

        c = self.database.cursor()
        non_exist = set()

        no_db_entry = set(os.listdir(self.cache_dir))
        try:
            no_db_entry.remove('file_database.db')
            no_db_entry.remove('file_database.db-journal')
        except:
            pass

        for row in c.execute("SELECT path FROM files"):
            path = row[0]

            repo_path = os.path.join(self.cache_dir, path)

            if os.path.exists(repo_path):
                no_db_entry.remove(path)
            else:
                non_exist.add(path)

        if len(non_exist) > 0:
            raise Exception(
                "Found {} records in db for files that don't exist: {}" .format(
                    len(non_exist),
                    ','.join(non_exist)))

        if len(no_db_entry) > 0:
            raise Exception("Found {} files that don't have db entries: {}"
                            .format(len(no_db_entry), ','.join(no_db_entry)))
654243
private static <T> boolean containsIdentity(List<T> list, T object) {
		for (T item : list) {
			if (item == object) {
				return true;
			}
		}
		return false;
	}