full node – Mempool count is too low

I’m running a full node. I wanted to get a list of all mempool txs (using getrawmempool false), and found that it only came back with around 3000, where all the block explorers are currently showing around 12000. I understand that mempools will differ between nodes, but this seems like a very big difference. Can I do anything about this?

Edit: Here is getmempoolinfo:

"size": 1985,
"bytes": 3458091,
"usage": 10785216,
"maxmempool": 300000000,
"mempoolminfee": 0.00001000,
"minrelaytxfee": 0.00001000

categories – Count how many posts have a specified tag AND category

I know how to count how many posts has a certain tag, or category

For example:

$term_slug = 'some-post-tag';
$term = get_term_by('slug', $term_slug, $post_tag);
echo $term->count;

Is there anyway to count how many posts that have a tag AND a specified category?

I want to count how many posts that have the tag(slug) “cats” and the category slug “allow-list”

Is this even possible?

8 – View only displays nodes that has comments when adding comment count field

On drupal 8 I am facing an issue with views.
I created a view listing all nodes of a certain content type.
I added basic fields, Title, Date content was created, and a read more link.
The view works fine with these fields, but when i add Comment Statistics: Comment count, all nodes that don’t have any comment don’t show up in the view.
It only lists nodes that received comments.

Any idea on how to fix this ? Am I doing something wrong ?


What is the probability of having forks in PoW given different network size (miners count)?

Given a network of k miners, what is the impact of k on the probability of having forks in Bitcoin or any PoW-based blockchain?

It is clear for me that a network with fewer miners will have less probability of having a fork than a network with higher number of miners.

Is there any mathematical formula that shows this relation?

column – Count Number of Items of Specific Value and update field in another list

I am stumbling with this in a huge way and I’m hoping someone here can help.
I have a SharePoint List that has two fields I want to collect data from. The first field in Location and the Second is Status.

I am looking for a way to show in possibly another list:
Location Name – Number of Items Listed to that Location – Number of Items in Status 1 (specific to this location) , Number of Items in Status 2 (specific to this Location)

There are a number of different Locations but only 2 status options. I cannot use the excel webpart (not enabled in our company) to extract the data and show it that way so needing to find a workaround.
I hope all the above makes sense!

Thanks in advance to anyone that might be able to help!


python – Pandas – How to iterrrate through groupby to count number of occurences

I have a DF like the below:

I want to groupby price, count the number of occurrences where action == N / U / D for each price.

ID,Action,indicator,side, price, quantity

Current code:

pricelist = ()
column_names = ('Price', 'N', 'U', 'D')
df_counter = pd.DataFrame(columns = column_names)

for name, group in df.groupby('Price'):
    price = name
    if price not in pricelist:
        n_count = group('Action')(group('Action')=='N').count()
        u_count = group('Action')(group('Action')=='U').count()
        d_count = group('Action')(group('Action')=='D').count()
        dflist = (price, n_count, u_count, d_count)
        price_dict = {'Price':price,'N':n_count, 'U':u_count,'D':d_count}
        df1 = pd.DataFrame((price_dict), columns=price_dict.keys())
        result = df_counter.append(df1)


Price N U D
0 136.938 1 0 0

Why is it not creating a longer dataframe? I basically have the result of I print out the price_dict, however am struggling to save it to a Dataframe.

Count occurrences of a specific word in Google Spreadsheet

I have some cells with text. I need to count the occurrences of a specific word from those cells.

Example sheet:https://docs.google.com/spreadsheets/d/1WECDbepLtZNwNfUmjxfKlCbLJgjyUBB72yvWDMzDBB0/edit?usp=sharing

worksheet function – Count mismatches between rows in google sheet

Need some help on this cause I’m getting an issue

I’ve this three columns (Time, R1 and R2) and I’m trying to count the mismatches between R1 and R2 but for each month (on the time column)

I already used a formula but I’m having an issue to add 1.

=iferror(if(EOMONTH($A64,0)=$A64,SUMPRODUCT(month(Database!$C$2:$C) = month($A64),--(Database!G$2:G <> Database!H$2:H)),""),"Error")

This part “month(Database!$C$4:$C) = month($A5)” is where I compare the information of the months, ( but I’m having an issue cause cause “month(Database!$C$4:$C)” only retrieves 4 that is the month of april)

This part “(Database!G$4:G <> Database!H$4:H)” is where I compare the columns R1 and R2

The part “EOMONTH($A5,0)=$A5” is where I take the month to based myself

Time R1 R2

2020-04-30  BA  BU

2020-04-30  BU  BA

2020-04-29  BA  BU

2020-04-29  BU  BA

2020-04-28  BA  BU

2020-04-28  AA  BA

2020-04-25  AA  BA

2020-04-22  BU  BA

2020-04-19  AA  BU

2020-04-19  AA  BA

2020-03-27  BA  AA

2020-03-27  BA  AA

2020-03-26  BU  AA

2020-03-18  BA  AA

2020-03-18  AA  BU

loops – Get Page Count from PDF in ruby to run a system call

I have a pdf file that I want to get the page count and for each page I want to run a system call and then I want to compare the output with a variable

I tried this

LEGAL_PDF_SIZE = 612 x 1008 pts
in_file = ARGV.first

pdf_count = `pdfinfo "#{in_file}"  | grep 'Pages:'`.gsub(/Pages:s*b/, '').chomp

x = pdf_count.to_i + 1

x.times do |i|
 puts `pdfinfo -l #{i} "#{in_file}"  | grep 'Page    #{i} size:'`.gsub(/Page    #{i} size:s*b/, '').chomp  

My output

612 x 792 pts (letter)
612 x 1008 pts
612 x 1008 pts
612 x 1008 pts

This gives me the output I am looking for but from there how can I be able to compare the output to see if it includes the variable LEGAL_PDF_SIZE because if it equals then I want to go into an if-else statement

Or is there a way to avoid what I am doing and be able to get the page count by using File.open in ruby?

query – Using count on two coumns yields same values in both columns (Postgresql)

I am looking at agent call data and want to calculate how many agents worked at a certain time bracket and how many calls where done in the same time bracket to get an average call volume per agent within a certain time frame.

select count(agent_id) as Agent_cnt, (call_id) as Call_cnt,
 case when date::time between '24:00:00' and '01:00:00' then '24-01 AM'
      when date::time between '23:00:00' and '24:00:00' then '23-24 PM' else 'Other' end as time_bracket,
from agent_call
where country='SWE'
group by 3,4,5;

How come I get same values for Agent and Call count? Do I need to partition by for agents/calls?