Skip to content

Instantly share code, notes, and snippets.

Youssef Kashef kashefy

  • Berlin, Germany
Block or report user

Report or block kashefy

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@octavifs
octavifs / std::vector_to_boost::python::list.cpp
Last active Jun 7, 2017
Converts C++ std::vector to boost::python::list
View std::vector_to_boost::python::list.cpp
// Converts a C++ vector to a python list
template <class T>
boost::python::list toPythonList(std::vector<T> vector) {
typename std::vector<T>::iterator iter;
boost::python::list list;
for (iter = vector.begin(); iter != vector.end(); ++iter) {
list.append(*iter);
}
return list;
}
You can’t perform that action at this time.