- Strength to Increase Rep
- +6
- Strength to Decrease Rep
- -1
- Upvotes Received
- 39
- Posts with Upvotes
- 36
- Upvoting Members
- 18
- Downvotes Received
- 30
- Posts with Downvotes
- 25
- Downvoting Members
- 13
- Interests
- Programming, Security, Electronics, Chemistry, Biology
- PC Specs
- Primary: Void Linux, Intel Pentium 4 HT 3.5GHz, 3.5GB DDR2, Galaxy GeForce GT430
Re: I wanted to ask something for my friend Tcll, how would you link a MAC address with no IP up to a network namespace? I know nothing about network namespaces or much about networking atall, he doesnt know mainly what commands to run or configure it. Thanks :). | |
Truthfully it isn't really that special, but it is a bit cancerous as I only have `atan()` and not `atan2()`... What's special about it is every other function I see seems to be intrinsic with 1 axis needing a `sqrt()` to manage singularities, where what I'm looking to achieve is … | |
Sorry for the lousy title, "InterProcess Communication" was too long Basically, I'm looking to use the native `_winapi` and `msvcrt` modules to launch an integrated python interpreter and communicate with it over pipes I can't find anything on Google or DDG, and I've been searching for days, but nobody uses … | |
This actually started (in a convo with Dani) as a simple idea of just upvoting comments made to posts, buuut I quickly got ideas for turning comments into a sort-of Reddit-style thread system, where comments could be collapsed so the original general idea of the forum thread could be viewed. … | |
So I've successfully written a metaclass that gives python the functionality of private attributes in classes. Q: But what about `inst.__private`? A: >>> class A(object): __slots__ = ['__private'] def __new__(cls): inst = object.__new__(cls) inst.__private = 10 return inst def showprivate(inst): return inst.__private >>> inst = A() >>> inst.showprivate() 10 >>> … | |
class foo(object): __slots__ = ['__base__'] What's expected is for `foo.__base__` to be a member_descriptor object but instead what you get is: >>> foo.__base__ <class 'object'> >>> foo.__base__ is object True I guess something happens within the magic of class construction that makes use of `__base__` as an object. I stumbled … | |
Re: Well, right now i'm following a tutorial on game making for c++, but is this really the best programming language for video games? Also i'd like to know if can recommend me a book ( i've seen some book on amazon but i don't really know wich one to choose … | |
If you're in one of those predicaments where `cls.__private` attributes just aren't enough since they can easily be accessed through `inst._cls__private`, and you need something a little more secure, here's a method I've been playing with for a while that fills that gap. Note that this uses `__slots__`, more info … | |
Re: numbers = [2,3,1,5,7,8,9,5,4,6] print(numbers) tool_1 = int(input()) tool_2 = int(input()) x = numbers.index (tool_1) y = numbers.index (tool_2) numbers[x] = (tool_2) numbers[y] = (tool_1) print(numbers) So I want this code to run until the numbers list is in this exact order 1,2,3,4,5,6,7,8,9 Is there a Do until loop or someway … | |
so I'm working on a class for a vector which I want to hash like a tuple, and to do so, a vector instance needs acess to it's properties. here's the constructor for the performative properties I'm using, and the vector class: def newProp(): newdict = {} getter = newdict.get … | |
I have an automated API with a secure frontend/backend structure where backend object attributes are hidden with frontend proxy classes. basically, when accessing an object from the frontend, you get a proxy object disguised as the backend object with all it's explicitly "public" functionality. what I'm dealing with right now … | |
I've been working with my own system using CPU-managed hitdefs (rectangles for mouse-events) since I didn't want to redraw everything for the gl feedback buffer... (basically I can do all the hitdef position management once during the frame loop) now that modern gl has come into play, I would like … | |
**Usage:** Provides a secure frontend object with restricted access to attributes of the backend object. | |
now I know your first thought is going to be rotation matrices, but take a moment to think about how they're applied... I'm wondering if there isn't something more efficient, or if there really needs to be that many operations per bone and vertex. I'm looking for the smallest data … | |
Basically, I'm working with zipimport to load plugins. These plugins contain binary modules which can only be loaded via retrieving their data. Copying them to a temporary directory is stupid, so how can I get a handle to a dynamic process which I can inject the stream into before it's … | |
Re: It's hard for me to admit it but there are things, ten things to be exact, that I really hate about Linux. Sometimes I think it's just me but I do see other people stating a few of these in the forums so I'm at least not alone with some … | |
so what I'm doing is building my own python IDE using PyQt. nothing can do what I need it to without a loss of something else, let alone properly. so I'm using a QPainter and getting the best results yet. however I'm having a problem trying to build indent guides … | |
basically, I have some code defined to be executed in a restricted namespace: code = ''' def func(): print 'success' ''' NS = {} NS.update(__builtins__) exec code in NS try: f = NS['func'] print f # should print a function object f() except KeyError: print 'failure' as you can guess... … | |
Re: I'm not a programmer. I am doing a project for Biology where I will be conducting an experiment on reaction times. Briefly, the subject should click anywhere on the screen as soon as a dot or circle (some graphic) appears on the screen. Details: 1. Program must start at a … | |
ok, so if you know me well, this gets a little complex... what I'm trying to do is execute a function from a script that requires 2 arguments where the names varry depending on the script. but I'd like that function to be executed in a namespace where I can … | |
this applies to 3D vertex coordinates if I was planing to lower the quality and byte size to a bu16, bs16, bu8, or bs8 mantissa, how would I calculate the exponent I'd need to restore them when the data is needed?? some help understanding, here's the code that reads the … | |
been scouring google for nearly a month now trying to find something. now as the requirement grows, I need more help tryingto find something. Portable Python is what I'm currently using, but alot of my developers (including myself) don't like the Wine wrapper... Pyzo supports linux mac and win, but … | |
Re: [URL="http://www.pcadvisor.co.uk/poll/index.cfm?action=showresults&pid=3228421"]A new poll into Operating System popularity by a British computer magazine[/URL] has revealed that an incredible 37 percent of respondents are still using Windows XP. That's more than Windows 7 which managed to woo 30 percent of the folk taking part, and Vista could only garner a pretty poor … | |
Re: Here lambda is used to create a one-line function for factorials. | |
Re: It's been a year now since the Dyre malware family was first profiled, and there is no sign of infection rates slowing down. In fact, [reports](http://www.scmagazine.com/trend-micro-documents-new-malware-infections/article/418266/) would seem to suggest just the opposite with infections up from 4,000 at the end of last year to 9,000 at the start of … | |
I've been here before but I'm looking to find a single-pass method to input the LRS `[[0,0,0],[0,0,0],[1,1,1]]` and get a basic 3x4 (at least) matrix in return: [ [1,0,0,0], [0,1,0,0], [0,0,1,0] ] ^ matrix is NOT transposed (I'll never understand why we use column-major) anyone got anything on this?? > … | |
ok, so I'm trying to basically load a dll that can be under multiple names: - freetype6 - libfreetype-6 and more I don't want it to find freetype.dll (I want it to search for 'freetype' and '6') how can I load a dll with a regex from the system paths?? … | |
ok, so this is a bit complex, I'm writing a bit-field function using a template, which can consist of: field( Template, Value ) field( [1,7,15] ,255 ) #int representation... field( ['1','3','4'] ,255 ) #bit representation... #>>> [1,7,15] field( [1,7,15] ,[1,7,15] ) field( ['1','3','4'] ,[1,7,15] ) #>>> 255 so what I'm … | |
Re: I, and many others, desired a "switch" keyword in Python. For me it was to a desire to make some of my code more compact and readable, as I often have many user selected options for the code to weed through. So I set off on a journey to figure … | |
basically, what I want to do is add a function name to an outside reference in a safe sys.modules reference without copying the name... best idea I got is to call a 3rd party function: def myfunc(args): x = None return x addname() # add 'myfunc' to sys.modules['/safe_ref/'] anyone got … |