How can I check if a Python unicode string contains non-Western letters?

I have a Python Unicode string. I want to make sure it only contains letters from the Roman alphabet (A through Z), as well as letters commonly found in European alphabets, such as ß, ü, ø, é,...

Converting Roman Numerals to integers in python

This is now my current code after what user2486 said. def romanMap(): map=(("M", 1000),("CM", 900),("D", 500),("CD", 400),("C", 100),("XC", 90),("L", 50),("XL", 40),("X", 10),("IX",...

python pip trouble installing from requirements.txt

I've had great luck with pip in the past, but working at installing some stuff in a venv on is giving me some headaches. I keep getting errors like No distributions at all found for...

gcloud compute execute command remotely

Currently, if I want to execute something on a VM, I copy files over like this: gcloud compute --project <project_id> copy-files --zone <zone_name> /home/roman/source/dir...

How to transliterate Urdu word to Roman Urdu Phonetically using Google Translator

Is there any way to transliterate Urdu Word to Roman Urdu using Google Translator Phonetically ? https://en.wikipedia.org/wiki/Roman_Urdu I want to use Translator API in python to convert the word...

Matplotlib cannot find basic fonts

I am using matplotlib version 2.0.0 on Python 3 in a miniconda virtual environment. I am working on a unix scientific computing cluster where I don't have root privileges. I am generally executing...

reportlab vertical codebar code39

Beginning with reportlab with python, final step of my little medical app. I can't find a working solution for setting up a vertical barcode in a Frame designed for it (side thin frame)....

Python multiprocessing apply_async "assert left > 0" AssertionError

I am trying to load numpy files asynchronously in a Pool: self.pool = Pool(2, maxtasksperchild = 1) ... nextPackage = self.pool.apply_async(loadPackages, (...)) for fi in np.arange(len(files)): ...

Unable to install packages from amazon repo on AWS EC2 instance Ubuntu

I'm having an EC2 instance on AWS, contains platform as Ubuntu. I'm unable to install anything from the command line toolsudo apt-get install <package> The result pops out on screen is like >...

sre_constants.error: missing ),unterminated subpattern

i am gaurav and i am learning programming. i was reading regular expressions in dive into python 3,so i thought to try myself something so i wrote this code in eclipse but i got a lot of...

Unable to detect gibberish names using Python

I am trying to build Python model that could classify account names as either legitimate or gibberish. Capitalization is not important in this particular case as some legitimate account names...

How to change the font family/style when printing to the console?

The question is straightforward, is it possible to change the font family of text in a Python print() output? Like Times New Roman, Arial, or Comic Sans? I only want to change some of the output....

Arabic number to Roman Numeral Converter: Number containing 4 will not convert

Numbers that do not contain 4 convert just fine, but once number that contain 4 is tested, it does not convert properly. I am new to python and I am struggling to see what was wrong in the code....

Ubuntu systemd custom service failing with python script

Would like to get some help with systemd daemon service in Ubuntu. I have a python script I wrote to disable the touchscreen on a Dell XPS which is more of a problem than a useful feature. The...

Cuda Runtime Error cudaErrorNoDevice: no CUDA-capable device is detected

I am using Chainer, Cupy for CUDA 8.0 . I am trying to train machine learning model using python3.5 script, but I got this error: cupy.cuda.runtime.CUDARuntimeError: cudaErrorNoDevice: no...

Integer to Roman while loop explanation-Python

I am trying to understand the while loop and sorted call in the program to convert a number to Roman numerals below. numerals = { 1 : "I", 4 : "IV", 5 : "V", 9 : "IX", 10 : "X", 40 : "XL", ...

Changing the font of ax.text in matplotlib

I am making a python plot using matplotlib. At the start of the code, I use: plt.rcParams['font.family'] = 'serif' plt.rcParams['font.serif'] = ['Times New Roman'] +...

Get list style types in MS Word add-in Javascript APIs

I am trying to use the Word add-in Javascript APIs to print the level and style type of lists in a document. I am using the following code: Word.run(function (context) { var range =...

Using a geopoint property in Azure IOT Central

I'm using the IOTC firmware (through python).I have been able to upload location data as telemetry. However I have not been able to upload location data as a basic property. Is this...

How do I change Heading font face and size in python-docx?

I filed this as a python-docx issue: https://github.com/python-openxml/python-docx/issues/805 but was requested to open a discussion...

Matplotlib: Times New Roman DOES NOT appears bold. Why?

I cannot get bold axis labels and ticks labels when the font is Times New Roman. However, bold option works with other fonts. I am suing python 3.7 and matplotlib 3.1.3. Please help! import numpy...

Roman to Integer python

I am trying to solve this python problem with python3, my code looks like this. class Solution: def romanToInt(self, s: str) -> int: # Define integer value to each roman ...

Error with Python3 to connect to snowflake: snowflake.connector.errors.OperationalError::Failed to execute:'SSLSocket' object has no attribute 'conn

It seems there is some issue with latest snowflake connector . I am trying to install it on Ubuntu OS and trying to connect to snowflake but it gives error AttributeError: 'SSLSocket' object has...

Python - Convert a roman numeral to an integer

I've tried the following Python 3 code that transform from Roman to Integer. The code is working fine at a glance. But there are certain problem happened when I input X, V or related to X and V...

How to make a batch file wait for all processes of another call to finish before continuing

The idea of this script is to take a (lecture) video, split it into smaller pieces, remove the silence for each one, and merge them back together, for increased performance, since the...

Django: Subprocess Continuous Output To HTML View

I need a HTML webpage in my Django app to load and show the continous output of a script in a scrollable box. Is this possible? I'm presently using a subprocess to run a Python script, but the...

raise IOError("%s not found." % path)

In the past week, I spent my time trying to solve a big problem when compiling my program.py. My program script is: import numpy import matplotlib import matplotlib.pyplot as plt import...

How to fix a problem that "apt-get install" doesn't work because of python issue

I'm using Ubuntu 16.04.I'd like to install a ROS related package with "apt-get install", but it doesn't work. Terminal said like following. $ sudo apt-get install ros-kinetic-libuvc Reading...

CoreText note: warning on macOS when running Tkinter and Python

I am creating a Tkinter app in python3 in macOS Catalina. The app is running fine but whenever a data is inserted into tk.Text, I get the following warning: --> 2020-10-10 13:15:51.048...

Python3 Import Error: undefined symbol: aes_hw_encrypt

I am trying to use DialogFlow to make a small talk chatbot on Raspberry Pi 4, and I am getting this error: ImportError:...