Scala Parser, why doesn't "pat <~ pat ~> pat" work?

Trying out a simple parser combinator, I'm running into compilation errors. I would like to parse -- "Smith, Joe" into its Name object like Name(Joe, Smith). Simple enough, I guess. Here is the...

JNDI InvalidNameException

I'm always getting an error when getting a name from my active directory server. The error is the following: javax.naming.InvalidNameException: Invalid name: "CN=»OGMA Serviço...

What is the most efficient way of updating data in a MySQL table using Python avoiding loops?

What is the best way to format data? Here is the background : I am using nameparser to parse a name the best way possible. I built a wrapper that calls the nameparser and then stores the parsed...

What's causing local variable reference error?

ALSO: CAN SOMEONE tell me why it's not picking up 'website'? I'm trying to figure out what's causing this error: line 60: What's causing this error??? Only arising on the first...

How to avoid unicodeError?

I'm trying to write to a file and I get the following error: Traceback (most recent call last): File "/private/var/folders/jv/9_sy0bn10mbdft1bk9t14qz40000gn/T/Cleanup At...

Search within many fields with Lucene

how to Search within many fields with Lucene ? I can do a search based on a field or all fields. But within a few field can not. my code : public class Users { public string Name {...

Constructor class cannot be applied to given types

Why am I getting this error when I try to compile the class with main() in it? Driver.java:7: error: constructor NameParser in class NameParser cannot be applied to given types; NameParser...

Keep getting some permission denied error

I keep getting some permission denied error, what is that? Every time when I am trying to install anything, the same permission denied error message I get in python, in nltk tool error: could not...

Why is my C++ Regular Expression not working?

Okay, so I am trying to learn c++ regular expressions and I am having some trouble with it. I went over the code, and at least to me, it makes logical sense. I also tested it online using a regex...

How do I execute and return the results of a python script in c#?

How do I execute and return the results of a python script in c#? I am trying to run a python script from my controller. I have python.exe setup in a virtual environment folder created with the...

python udf in hive

I want to write hive udf in python to parse name column (using https://pypi.python.org/pypi/nameparser) and put the parsed values in different columns of...

Can I use python 're' to parse complex human names?

So one of my major pain points is name comprehension and piecing together household names & titles. I have a 80% solution with a pretty massive regex I put together this morning that I probably...

How to return two values in Python

I have following code below. class NameParser: def __init__(self): self.getName def getName(self, name): splitName = name.split(' ') surname = splitName.pop() ...

How to get NLTK sentence tokenizer read a column in a file

I'm a newbie to Python and started playing with NLTK this evening. I've read in a file with pandas and now trying to call one column, the description. I'm hitting a problem with the code because...

Parsec permutation parsing

I wrote such permutation parsing example: data Entry = Entry { first_name :: String , last_name :: String , date_of_birth :: Maybe String , nationality :: Maybe String , parentage ::...

How to use the PHP template engine in Twig instead of the Twig syntax within Silex 2

In Silex2 I am able to use Twig templates but I want to use the PHP engine of Twig, instead of the Twig syntax. For example this guide describes how to do it for Symfony but not Silex 2. My Silex...

Vectorize HumanName library for pandas dataframe column

I have a full_name column in a pandas DataFrame which has names of individuals. For example: Full_Name Saumendra Nayak Pawan Shinde Arun Chopra Neil Anderson I have to separate these names into...

I am trying to make an array for each column of a CSV file,

I have an excel document that I have exported as CSV. It looks like this: "First Name","Last Name","First Name","Last Name","Address","City","State" "Bob","Robertson","Roberta","Robertson","123...

AWS Elastic Beanstalk throws error cc1plus doesn't exist

I'm currently deploying a fairly simple Django site to AWS Elastic Beanstalk, but my most recent deployment failed with the...

Too many pythons on my Mac, and pip install is not install package into the right python package folder

I want to use virtualenv on my Mac, and I installed it with pip: pip install virtualenv /usr/local/lib/python2.7/site-packages/pip/commands/install.py:194: UserWarning: Disabling all use of...

TypeScript dynamic generate value type checking

Suppose I have a generic function that takes raw data, and an array of parsers to generate a simple object function parseData<T extends object>( rawData: any, ...parsers: Array<{ field:...

Split and map original values to different pandas column

I would like to map a function that splits names with the help of the nameparser package in python. The function I use is the following: def extract_parts(name): first, middle, last =...