Skip to content Skip to sidebar Skip to footer
Showing posts with the label C++

Python Ctypes: Wraping C++ Class With Operators

I want to wrap a small test C++ class for use in python using ctypes. The class is called Edge and … Read more Python Ctypes: Wraping C++ Class With Operators

Using The Python/c Api To Get The Values Of Pystrings In The Interpreter As Cstrings Within A C Program

I've been messing around with the Python/C API and have this code: #include #include #include… Read more Using The Python/c Api To Get The Values Of Pystrings In The Interpreter As Cstrings Within A C Program

Signed Equivalent Of A 2's Complement Hex Value

On the python terminal when I do :- In [6]: 0xffffff85 Out[6]: 4294967173 In [9]: '%d' %(0… Read more Signed Equivalent Of A 2's Complement Hex Value

Dll Load Failed: %1 Is Not A Valid Win32 Application

So I have a situation where I need to make binary patches and then be able to apply them from withi… Read more Dll Load Failed: %1 Is Not A Valid Win32 Application

How To Find Horizon Line Efficiently In A High-altitude Photo?

I am trying to detect the horizon in images taken from high altitude, so as to determine the orient… Read more How To Find Horizon Line Efficiently In A High-altitude Photo?

Compiling Pyx Files

I've just started to learn cython and this is the first time that I'm trying to compile .py… Read more Compiling Pyx Files

Detecting When A Gtk Window Is Done Moving/resizing By The User

I want to detect when the user finished re-sizing or moving the GTK window. Basically an equivalent… Read more Detecting When A Gtk Window Is Done Moving/resizing By The User

Python Ctypes Calling Reboot() From Libc On Linux

I'm trying to call the reboot function from libc in Python via ctypes and I just can not get it… Read more Python Ctypes Calling Reboot() From Libc On Linux

Why Is Python Faster Than C When Concatenating Two Strings?

Currently I want to compare the speed of Python and C when they're used to do string stuff. I t… Read more Why Is Python Faster Than C When Concatenating Two Strings?

How To Register A Destructor For A C-allocated Numpy Array?

I want to allocate numbers for a numpy array in C/C++, and pass them to python as a numpy array. Th… Read more How To Register A Destructor For A C-allocated Numpy Array?

How To Find If Two Numbers Are Consecutive Numbers In Gray Code Sequence

I am trying to come up with a solution to the problem that given two numbers, find if they are the … Read more How To Find If Two Numbers Are Consecutive Numbers In Gray Code Sequence

Passing List Of Numpy Arrays To C Using Cython

I have a list list_of_arrays of 3D numpy arrays that I want to pass to a C function with the templa… Read more Passing List Of Numpy Arrays To C Using Cython

Difference Between Np.int, Np.int_, Int, And Np.int_t In Cython?

I am a bit struggled with so many int data types in cython. np.int, np.int_, np.int_t, int I guess … Read more Difference Between Np.int, Np.int_, Int, And Np.int_t In Cython?

How To Call A Builtin Function (or Method) From C Code Of A Python Extension Module?

What I currently want to accomplish is to tweak Pythons itertools module function combinations to … Read more How To Call A Builtin Function (or Method) From C Code Of A Python Extension Module?

Whats The Best Data Structure For A Calendar / Day Planner?

I'm an intermediate programmer. I know C very well, Java somewhat well, and have just done some… Read more Whats The Best Data Structure For A Calendar / Day Planner?

Passing A List Of Strings To From Python/ctypes To C Function Expecting Char **

I have a C function which expects a list \0 terminated strings as input: void external_C( int lengt… Read more Passing A List Of Strings To From Python/ctypes To C Function Expecting Char **

Pickling A Python Extension Type Defined As A C Struct Having Pyobject* Members

I am running C++ code via Python and would like to pickle an extension type. So I have a C++ struct… Read more Pickling A Python Extension Type Defined As A C Struct Having Pyobject* Members

Encrypt/unencrypt Python Scripts In C

duplicates (that I havent found answers in): https://stackoverflow.com/questions/4066361/how-to-obf… Read more Encrypt/unencrypt Python Scripts In C

How Do I Use The Correct Dll Files To Enable 3rd Party C Libraries In A Cython C Extension?

I have a C function that involves decompressing data using zstd. I am attempting to call that funct… Read more How Do I Use The Correct Dll Files To Enable 3rd Party C Libraries In A Cython C Extension?

Initializer Is Not A Constant, Error C2099, On Compiling A Module Written In C For Python

i tried to compile a python module called distance, whith c 'python setup.py install --with-c&#… Read more Initializer Is Not A Constant, Error C2099, On Compiling A Module Written In C For Python