## sharepoint online – Extract the Name of the uploaded file in document library into another column

You cannot use a calculated column with the name column. You can build a designer workflow that runs on item creation and update the columns with data extracted from file name.

Alternatively, as you seem to be using SharePoint online you can also build a Microsoft flow to do the same.

To extract the first part I used the expression

``````substring(triggerBody()?('{Name}'), 0, lastIndexOf(triggerBody()?('{Name}'),'-'))
``````

For the second part I used an expression

``````substring(triggerBody()?('{Name}'), add(lastIndexOf(triggerBody()?('{Name}'),'-'),1), sub(sub(length(triggerBody()?('{Name}')),lastIndexOf(triggerBody()?('{Name}'),'-')),1))
``````

## Is it possible to extract entire blogspot blog?

I don’t mean my blog, with access to dashboard, but any blog, the one I access as reader.

I’d like to preserve as .pdf and/or to print some blogs I have been reading for a long time; they all have thousands of posts, so opening and exporting posts one by one is not an option. Several of those blogs are at blogspot, and several on self-hosted WP.

Site scrapper such as HTTrack is halfway to what I want; it downloads everything in one go, but then I have to convert .htm files to .pdf and merge them. Is there a neater way I can transform a blog into nice e-book?

## postgresql – In Postgres, what’s the most optimal way to extract and use a numeric value from within a JSONB field?

Most sources (e.g. this answer) seem to indicate that the canonical way to extract a numeric data type from a JSONB column with values like, say, `{"foo": 1.2345}` is to do `(col->>'foo')::numeric`.

Theoretically, though, the semantics are that this first needs to be converted from JSONB (which is fully capable of representing numerics in a binary format) to a textual representation of the characters, then parsed as a numeric.

If this is done in a tight loop, or as the basis for complicated comparisons, perhaps visiting the same row multiple times due to a join, does Postgres automatically know that it doesn’t need to format-and-parse these numbers every time, and does it optimize (or even JIT) accordingly? Is there a better way to do this?

## machine learning – How to extract an open research question from text with Natural Language Processing?

Researchers often broadly state one or several research problems as an “open research question” or an “open research problem”, a “research gap” or “desideratum” or often make “suggestions for further research”. The same terms are used across disciplines. Some disciplines are referring to categories of research gaps like an “evidence gap” (commonly used in medical research). There are probably less than a dozen terms used to describe the same thing.

As long as you are dealing with quantitative research (from natural to social sciences) these open research questions are mostly asked or at least repeated in the “conclusion”, “future research” or “discussion” section of an article. There are a very limited number of phrases used to introduce a desideratum like “further research… (is needed to/will show etc.)…”, “it remains to be seen, if…”. One could prepare a quite comprehensive list of such phrases rather quickly. Often these phrases also signify the beginning of the statement, which should be helpful.

In other words, you know what keywords and phrases to look for and have a measure of relevance by there position in the document. Also many open research problems are directly phrased as a question.

There has to be an element of human curation (aided by further NLP analysis), since it will be difficult to extract the exact statement and the statement has to be validated as non-redundant and preferably categorized (if applicable as “evidence gap”, “method gap” “sample gap” etc.)

Assuming you have a database of full-text articles (most pre-print servers give full access to content and meta-data), others give you free access to metadata and scientometric data. What methods, algorithms and software solutions (open source or SaaS) would you use or test?

API’s of science repositories and the access they give:

https://guides.lib.berkeley.edu/information-studies/apis

## sharepoint online – extract “all” numerics from text string

I have a Sharepoint Online list with a text field for a contact called Mobile Phone…
I want to extract the numerics only…

``````(111) 222-3333 would be 1112223333
+99 111-222-3333 would be 991112223333
111-222-3333 would be 1112223333
111 222 3333 would be 1112223333
``````

I was expecting to be able to do this with a calculated column, but it’s not as obvious as I thought. Ultimately our dialing system needs a numerics only version of the value (no special characters or spacing). I have seen similar questions answered here but not this exact need. Thanks in advance…

## I am unable to extract numeric fields from a PostgreSQL database using Dart and the Postgres package

I have a simple, single row, PostgreSQL database table that includes a numeric(8,2) field, set to 120.00, and a character field set to ‘N’.
This is a Windows 10 setup.
When I run the following Dart program the result is unexpected:

``````import 'package:postgres/postgres.dart';

void main() async {
print('Attaching to DB...');
final conn = PostgreSQLConnection(
'localhost',
5432,
'pdpdb',
);

await conn.open();
print('Connected to DB');

var results = await conn.query('''
SELECT verification, balance from contacts
''');

print(results);

await conn.close();
}
``````

My result is this:

``````Attaching to DB...
Connected to DB
((N,  ╔     ╗ 2))
``````

So the ‘N’ is clear, but the numeric field is gibberish!
Why am I not seeing 120.00 as I do when I run the same command using pgAdmin’s query tool:

I have tried to parse the field as if it were a double, but that gives me:

``````Unhandled exception:
FormatException: Invalid double
``````

I am sure this must be something obvious so any hints will be gratefully received. Thank you.

## Is there a way on Python to extract a time series from an image?

I am trying to extract a time series dataset from an image (with x-axis and y-axis). Is there a quick way to do so on Python?

To be more precise, this is my graph:
enter image description here
and I am trying to get daily data.

Any help?

Thanks! 🙂

## extract – Extracting data from a 3D distribution of points

Let’s create some random 3D data

``````Clear("Global`*");

data = Flatten(Table({i, j, k}, {i, -1, 1, 0.04}, {j, -1, 1, 0.04}, {k, -1, 1, 0.04}), 2);
``````

If we plot them we obtain this cube

``````plot = ListPointPlot3D(data, PlotStyle -> {Blue, PointSize(0.007)}, BoxRatios -> {1, 1, 1})
``````

Now I want to extract those 3D points $$(x,y,z)$$ which form the outer shell of the cube. I know that in this simple case the task is easy. But by actual data correspond to complicated 3D solids. So we need a method for extracting the outer data of a 3D ditribution of points.

Any suggestions?

## Better way to extract html table to dictionary using beautifulsoup in python

I am scrapping html pages. Part of the page has a table which has acts and sections of those acts mentioned in table format. For some other project I need to convert them to Dictionary. The key values are previously set (in the other project). I want to use the same key values for the dictionary and then replace corresponding sections with each new input. The code I have designed works but I am looking for better way to write it. Presently the code looks quite lengthy. The code:

``````from bs4 import BeautifulSoup as bs, NavigableString

openFile = open('/some path/samplePage.html')
soup = bs(openFile, 'html.parser')

acts = soup.select('#act_table td:nth-of-type(1)')
sections = soup.select('#act_table td:nth-of-type(2)')
dictionary = {}

ipc = 'indian penal code'
poa = 'prevention of atrocities'
pcso = 'protection of children from sexual'
pcr = 'protection of civil rights'

if len(acts) < 1:
print('no act mentioned')
elif len(acts) < 2:
act1 = tuple(acts(0).contents)
sections1 = tuple(sections(0).contents)
elif len(acts) < 3:
act1 = tuple(acts(0).contents)
sections1 = tuple(sections(0).contents)
act2 = tuple(acts(1).contents)
sections2 = tuple(sections(1).contents)
elif len(acts) < 4:
act1 = tuple(acts(0).contents)
sections1 = tuple(sections(0).contents)
act2 = tuple(acts(1).contents)
sections2 = tuple(sections(1).contents)
act3 = tuple(acts(2).contents)
sections3 = tuple(sections(2).contents)
elif len(acts) < 5:
act1 = tuple(acts(0).contents)
sections1 = tuple(sections(0).contents)
act2 = tuple(acts(1).contents)
sections2 = tuple(sections(1).contents)
act3 = tuple(acts(2).contents)
sections3 = tuple(sections(2).contents)
act4 = tuple(acts(3).contents)
sections4 = tuple(sections(3).contents)
else:
act1 = tuple(acts(0).contents)
sections1 = tuple(sections(0).contents)
act2 = tuple(acts(1).contents)
sections2 = tuple(sections(1).contents)
act3 = tuple(acts(2).contents)
sections3 = tuple(sections(2).contents)
act4 = tuple(acts(3).contents)
sections4 = tuple(sections(3).contents)
act5 = tuple(acts(4).contents)

if len(acts) == 0:
pass
# for first act in list
elif len(acts) == 1:
if ipc in str(act1).lower():
dictionary('IPC') = sections1
elif poa in str(act1).lower():
dictionary('PoA') = sections1
elif pcso in str(act1).lower():
dictionary('PCSO') = sections1
elif pcr in str(act1).lower():
dictionary('PCR') = sections1
else:
dictionary('Any Other Act') = str(act1).lower()
print(dictionary)

# for 2nd act in list
elif len(acts) == 2:
if ipc in str(act1).lower():
dictionary('IPC') = sections1
elif poa in str(act1).lower():
dictionary('PoA') = sections1
elif pcso in str(act1).lower():
dictionary('PCSO') = sections1
else:
dictionary('Any Other Act') = str(act1).lower()
if ipc in str(act2).lower():
dictionary('IPC') = sections2
elif poa in str(act2).lower():
dictionary('PoA') = sections2
elif pcso in str(act2).lower():
dictionary('PCSO') = sections2
else:
dictionary('Any Other Act') = act2
print(dictionary)
# for 3rd act in list
elif len(acts) == 3:
if ipc in str(act1).lower():
dictionary('IPC') = sections1
elif poa in str(act1).lower():
dictionary('PoA') = sections1
elif pcso in str(act1).lower():
dictionary('PCSO') = sections1
elif pcr in str(act1).lower():
dictionary('PCR') = sections1
else:
dictionary('Any Other Act') = str(act1).lower()
if ipc in str(act2).lower():
dictionary('IPC') = sections2
elif poa in str(act2).lower():
dictionary('PoA') = sections2
elif pcso in str(act2).lower():
dictionary('PCSO') = sections2
elif pcr in str(act2).lower():
dictionary('PCR') = sections2
else:
dictionary('Any Other Act') = act2
#for 3rd option
if ipc in str(act3).lower():
dictionary('IPC') = sections3
elif poa in str(act3).lower():
dictionary('PoA') = sections3
elif pcso in str(act3).lower():
dictionary('PCSO') = sections3
elif pcr in str(act3).lower():
dictionary('PCR') = sections3
else:
dictionary('Any Other Act') = act3
print(dictionary)
# for 4th act in list
elif len(acts) == 4:
if ipc in str(act1).lower():
dictionary('IPC') = sections1
elif poa in str(act1).lower():
dictionary('PoA') = sections1
elif pcso in str(act1).lower():
dictionary('PCSO') = sections1
elif pcr in str(act1).lower():
dictionary('PCR') = sections1
else:
dictionary('Any Other Act') = str(act1).lower()
if ipc in str(act2).lower():
dictionary('IPC') = sections2
elif poa in str(act2).lower():
dictionary('PoA') = sections2
elif pcso in str(act2).lower():
dictionary('PCSO') = sections2
elif pcr in str(act2).lower():
dictionary('PCR') = sections2
else:
dictionary('Any Other Act') = act2
# for 3rd option
if ipc in str(act3).lower():
dictionary('IPC') = sections3
elif poa in str(act3).lower():
dictionary('PoA') = sections3
elif pcso in str(act3).lower():
dictionary('PCSO') = sections3
elif pcr in str(act3).lower():
dictionary('PCR') = sections3
else:
dictionary('Any Other Act') = act3
# 4th Option
if ipc in str(act4).lower():
dictionary('IPC') = sections4
elif poa in str(act4).lower():
dictionary('PoA') = sections4
elif pcso in str(act4).lower():
dictionary('PCSO') = sections4
elif pcr in str(act4).lower():
dictionary('PCR') = sections4
else:
dictionary('Any Other Act') = act4
elif len(acts) == 5:
if ipc in str(act1).lower():
dictionary('IPC') = sections1
elif poa in str(act1).lower():
dictionary('PoA') = sections1
elif pcso in str(act1).lower():
dictionary('PCSO') = sections1
elif pcr in str(act1).lower():
dictionary('PCR') = sections1
else:
dictionary('Any Other Act') = str(act1).lower()
if ipc in str(act2).lower():
dictionary('IPC') = sections2
elif poa in str(act2).lower():
dictionary('PoA') = sections2
elif pcso in str(act2).lower():
dictionary('PCSO') = sections2
elif pcr in str(act2).lower():
dictionary('PCR') = sections2
else:
dictionary('Any Other Act') = act2
# for 3rd option
if ipc in str(act3).lower():
dictionary('IPC') = sections3
elif poa in str(act3).lower():
dictionary('PoA') = sections3
elif pcso in str(act3).lower():
dictionary('PCSO') = sections3
elif pcr in str(act3).lower():
dictionary('PCR') = sections3
else:
dictionary('Any Other Act') = act3
# 4th Option
if ipc in str(act4).lower():
dictionary('IPC') = sections4
elif poa in str(act4).lower():
dictionary('PoA') = sections4
elif pcso in str(act4).lower():
dictionary('PCSO') = sections4
elif pcr in str(act4).lower():
dictionary('PCR') = sections4
else:
dictionary('Any Other Act') = act4
print(dictionary)
``````

The HTML code of one of the files is here:

This may be a little confusing to understand but in a simple word, I want to be able to extract selective data from Sheet2 into Sheet 1.

Example. in Sheet1 Cells A8:A50 are empty, I want to be able to either type in a sheet (name) into one of those columns and the sheet to extract data from Sheet2

UPDATED: Explanation with Images.

Here in the image one, you can see I am inside my Overview tab (Main Tab). I have selected a box around CELL A8. I would like to be able to type the Sheets name into CELL A8 from the Sheets I already own “AAPL”, “DIS” or have the entire row automatically update every time a new Sheet is made.

Let’s say, I typed AAPL inside CELL A8, I want the formula to automatically head inside the AAPL tab and grab content from there and bring it into the Overview TAB and paste it inside the box below the “Company Name”

Something like this, I know it’s possible but it’s beyond my ability and in need of some guidance on how to get this complete.

Update: A gentleman said this is possible using Google Script. I am new to the script side of this – anyone able to recreate something as to what I am asking I’ll send you £10 via cashapp or PayPal as part of an appreciation for your effort. Unfortunately, I cannot share the script as it’s my main stock portfolio.

Second Update: I have discovered the beautiful but yet simple function “=Sheet2!A1” – That grabs any information for Sheet2 and brings it straight into that Cell. With a little bit of creativity, it’s working pretty well so far.