Tagged Questions
1
vote
1answer
41 views
Are these set-uid scripts/binaries secure?
I have a system that needs to be able to reboot a different piece of hardware partway through a script that programs it. It used to wait for me to come and reboot the hardware halfway through, but ...
4
votes
1answer
214 views
Meeting Point problem from interviewstreet.com
I am trying to solve the "Meeting Point" problem from interviewstreet.com:
There is an infinite integer grid at which N people have their houses on. They decide to unite at a common meeting place, ...
2
votes
2answers
108 views
creating a hash based sorting algorithm
For experimental and learning purposes. I was trying to create a sorting algorithm from a hash function that gives a value biased on alphabetical sequence of the string, it then would ideally place it ...
5
votes
1answer
93 views
How can I optimize this linspace method build in Python's C API?
Today I built a linspace function in Python's C API, here is its code:
static PyObject *
linspace(PyObject * self, PyObject * args)
{
int n, i;
double start, end;
if ...
1
vote
3answers
59 views
Python & C: Trying to create a dict of all declared variables and functions and their types of a .c source file
Basically trying to create a dict of all declared variables and functions along with their types of a .c source file. Does anyone think I missed anything?
#!usr/python
import string
import re
from ...
3
votes
3answers
215 views
Thinking in python
Magnus Lie Hetland in his Beginning python wrote a code to replicate the range() built-in.
def interval(start, stop=None, step=1):
if stop is None:
start, stop = 0, start
result = ...