Telegram: Import numbers with format .txt to telegram - desktop

I have a list numbers (about 2000 contacts) with format .txt
Now want add numbers to my telegram, best idea for add import list to telegram
idea is possible in desktop or Android?

I don't think you can do it with dekstop. Either convert the txt file to csv and download "import csv" from Play Store which will simply add all the contacts from your file and then you can see them in your telegram list (If they have Telegram) OR convert them to vcf and open it from your File manager, it will automatically add them into your contacts list.
Also if you search in Play Store you may find an application to directly import numbers from txt file.

Related

Read-in df from csv before launching main app | Dash

I am trying to get my first dashboard with python dash running.
The whole thing is very similar to this https://github.com/dkrizman/dash-manufacture-spc-dashboard.
At the beginning a Dataframe is read in from a csv. My problem seems to be quite easy to solve but somehow I am not succeeding:
I want to create a initial window that allows the user to select (from e.g. dropdown) the csv file (or accordingly the path) that is read in. All the .csv files look the same but just have different values.
When using the modal components I get problems with the install of bootstrap and I thought there must be an easier way?
Thanks for your help!
Best,
Nik

Is there a way to copy Google Earth place names as text?

I'm new to python and doing a work project that involves juggling a lot (5-10k) of "places" (polygons representing regions) in google earth. As such, I wanted to run a list compare between the places I have in google earth against a txt file list of places I should have. The only problem is that I cannot seem to find a way to copy paste or otherwise capture the name text of the google earth places. Copying with control c or right click copy copies them as a KMZ file, or when pasted into a text editor gives the full source from their "properties" tab. I'm fairly confident in manipulating and comparing the lists once I have the data in that format, but could really use some help in attaining it as such.
First right-click on saved places in Google Earth and save as KML (text) file.
Next, you can use Python to extract the place names from the KML file.
Here's some sample code using pykml module to parse out the place names.
from pykml import parser
with open('places.kml') as f:
root = parser.parse(f).getroot()
# iterate over each placemark
for pm in root.Document.Placemark:
name = pm.name.text
print(name)

How do you get the names of all gif images in a folder in python 2?

I have a folder like C:\Temp\My Pictures and it has a bunch of gif pictures in it. I need to be able to get the name of the gif images in a string and I have no idea how. I looked everywhere and couldn't find an answer, please help!
Try using:
import os
for file in os.listdir("C:\Temp\My Pictures"):
if file.endswith(".gif"):
print file
You can read more, about os.listdir at the official docs here.
As PotatoIng_ is correct you may want to end up with a list of strings.
Try using this (works with Python 2 and 3):
import os
root, dirs, files=next(os.walk('C:\Temp\My Pictures'))
gifs=list(filter(lambda filename:filename.endswith('.gif'), files))
os.walk walks down the directory tree, but you only need the first result( that's the next). Now filter the files list and use those entries with filename.endswith('.gif') is True. filter returns an iterator in python 3 so use list to turn it into a list.
Result will be e.g.:
>>> gifs
['a.gif', 'b.gif', 'c.gif']

How to edit text file data with c++

I have a program that create a text file of stock items, which contains detail of 'total production' , 'stock remaining' and so on. Now my question is how do I edit that text file with my program. For example if I mistake to enter a correct data (like production was 500 pieces but enter only 400) now how can I edit my file to make it correct without effecting other data.
You probably should not create a text file in the first place. Did you consider using sqlite (or indexed files à la GDBM ...) or some real database like PostgreSQL or MongoDb?
If you insist on editing programmatically a textual file, the only way is to process every line : either keep all of them in memory, or copy them (except the one you'll change) to some new file.... But there is no portable way to change the content of a file in the middle.
You might also be interested in textual serialization formats like JSON, YAML (or maybe even XML).

read file from url path and display in chart format

i working on one project. i want to read file which path from url,this file containing xml data i have to show this data in chart format.
Basically, your steps may be these:
Validate the URL data (StructKeyExists + FileExists + isFile).
Read and parse XML file, you can do this with XmlParse.
Convert XML object into the query (see query functions).
Render the data using great charting tags.
If you want more detailed help -- please expand your question, to make it more specific.