- Strength to Increase Rep
- +7
- 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
150 Posted Topics
Re: hey I'm here, I just want to mention I didn't force my friend to ask for me or anything if anyone gets that idea ;) he fully offered because he's getting impatient my primary workstation has been offline for so long, mainly because figuring this out could take years (which … | |
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: IK this question has been solved already, but here's my input for noobs: I prefer Portable Python 2.7 with PyOpenGL and PyGLFW using GLSL (GL 4.0 preferred) for code simplicity. (use GLSL and make the GPU do most of the work (especially for the draw-code) or otherwize you'll choke your … | |
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: I prefer the use of the sorted() iterator (yes, this is procedural O(1\*n)) for n in sorted(numbers): | |
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: I only complain about the dependencies and stability. I'm using Xubuntu right now and have all kinds of useless programs installed as they're required by more useful programs... alot of wasted space here. as for stability, nearly every kernel update I get gives me a new thing that no longer … | |
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: > This article has been dead for over six months <<< so what, I have a reason for necro-posting in that the info provided here is not very good. (threads don't disappear or I wouldn't have stumbled upon this one just now) ___ Pyglet is like PyQt4 when it comes … | |
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: I like hacking my OS to make it even cooler, 7 won't allow me do that. that said, it still has the same problem as Vista which had the 95 to XP support removed. (meaning my drivers for my GCN/PS2/XBox controller converter don't work on 7) UAC still sucks, Active … | |
Re: this is very nice, I'm probably one of the biggest fans of 1-liners out there, so yah, good job :) just to note, you could always invert instead of index ;) and do we really need a lambda?? >>> def fact(n): return (n>1)^1 or fact(n-1)*n >>> fact(53) 4274883284060025564298013753389399649690343788366813724672000000000000L ^now we're … | |
Re: this is why I moved off windows... hearing about stuff like this P's me off knowing how easy it is to steal private data, and how far idiots will go to do it mainly just to get a quick buck. is it possible to detect these attacks and redirect them … | |
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: not bad :) I'm actually working on a similar implementation for my program's extendable scripts: current normal statement: (what I already have) switch( 'FF' ) if case( '80' ): pass elif case( '88' ): pass elif case( '98' ): pass elif case( 'FF' ): pass improved future stuff: switch( 'FF' … | |
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 … | |
apparently this seems to be pretty unheard of because of the over-glorified NumPy extension, which yes is faster than using python alone, but most likely not as fast as defining the raw complex methods such as matrix inversion in plain C. with NumPy you need to make an array object … | |
for those who don't know, the PNG format in WinXP MS Paint is actually extended. the format is supplied via mfc42u.dll found in system32/ with this in mind, it may be possible to write an exploit to add extended support for even more formats, and quite possibly custom formats. | |
I'm stuck dealing with strings which is a pain when porting code... I'm doing stuff such as porting this: enum { VAL_NULL = 0, VAL_INT, VAL_FLOAT, VAL_STR, VAL_ANY, VAL_CODE, VAL_MACRO, VAL_IDENT }; to this: for i,v in enumerate([ 'VAL_NULL','VAL_INT','VAL_FLOAT','VAL_STR','VAL_ANY','VAL_CODE','VAL_MACRO','VAL_IDENT' ]): globals()[v]=i anyone know of a method I could use to … | |
Re: if you can take a look in task manager, you can see what processes are hijacking your system. on Win7 I just found a bunch of dllhost.exe processes. I ended up removing that along with Internet Explorer, Windows Powershell, and dllhst3g.exe whatever your process is that's running, it's not recommended … | |
what I'm basically trying to do is: x = struct( size=4, order='var0', # <<< struct.__call__( size, order, **vars ) var0 = bu32 # { 'var0': bu32, } ) data = x() # read data from imported file print data.var0 # should return a bu32 int if data.__class__ == x: pass … | |
alright, so here's what I got: # -*- coding: utf-8 -*- W = 25 l = [[u'â–‘' for c in range(W)] for r in range(5)] _Y = 2 for X in range(W): Y = _Y+((X&3)-(X&2))-(2*((X&3)==3)) # <-- this could be better l[Y][X] = u'â–ˆ' for r in l: print ''.join(r) … | |
as the title states, on on linux (Wine32) it works perfectly: http://lh3.ggpht.com/-heB_VObWcwE/VUgfS4bkLkI/AAAAAAAAJAA/tHZzjq2RElw/s642/SIDE_firstPort.png but on windows (synced code) I get this: Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> ================================ RESTART ================================ >>> C:\Documents and Settings\Owner\My … | |
so I was trying to think of ways to reduce python's memory usage when you write your code. my logic is telling me your class instances will use less memory if you write your class functions before writing your class: def classfunc( inst, arg ): pass class mainclass: pass inst … | |
ok, I just want to note, I understand the basic methods of a struct, but I'd like to understand deeper... how exactly does a struct work on the CPU?? (where and how does it store the code template, how is it called, and what is it stored as) I'm trying … | |
![]() | Re: Java is bad .NET is very bad (anything MS-based is bad) C is the next closest thing to ASM, and C++ is a slightly dirtier extension of C I personally prefer python... it's not as powerful, but it's the simplest language I've seen. :) (Python3 is a little more powerful, … |
so I've got XP x64 edition, and apparently active desktop was removed, meaning my interactive html desktop background that told me a bunch of things from the internet is no longer usable. anyone know of a good free replacment software?? | |
so I've been working with alot of common interfaces and the typical layout for this data seems to follow: - LRS (Loc, Rot, Scale) >( calculated to )> 3x4 transform matrix (Parent Relation) - 3x4 local-bind matrix (Parent relation) - 3x4 inverse-bind matrix (Inverse-World Relation) the most important matrix is … | |
As the title implies, what I want to do is create main.py and have it open a window. after the window is open, I want to edit main.py, and when finished editing, hit File -> Reload in the window's menu bar. what's expected is for the window to update with … | |
Re: ever since I've stumbled across Python Tools a while ago, I've never set it down :) I even had to rate the implementation to be better than Eclipse. :) I've tried Aptana, which has alot of cool and convenient code-completion features, but no smart popups, and forced the use of … | |
Re: because spud-head engineers don't truely know what "safe" means. the NSA can do whatever the F they want. I've known the system was compromized for a long time now, and MS is only making it worse. this is one reason I don't use the new kernel and still use XP64 … | |
Re: I refuse to upgrade because of the RAT MS built in Vista (hackers can't confirm this one works), and up. (one of my friends has a friend who disabled Win8's RAT using python) ^ I'm trying to get info on how he did it but my friend hasn't been able … | |
Re: get off his butt grib, I have a good reason for using WinXP. Win95 isn't too far behind it, and really, is a fun OS to play with. in any case, it's good to see programmers still working with outdated OS's. :) (sometimes you need to take a huge step … | |
as the title states, I know runpy can run a module's code w/o importing it, but what I'm trying to do is send the module object to a... function supplied by my interface which is directly called by the module. what I'm talking about is: my interface provides these functions … | |
First off, I know this question doesn't exactly belong here... I'm asking here because this is the lowest common ground between binary opcodes and: # python 2.7 class A(object): def __init__(this): print 'I am initialized!' instance = A() my question is, what's the equivelant of that in either PPC or … | |
I used to be an IE8 user and refused to use IE9 or above due to how when there was a conflict with certain cases, it would allow that case. Chrome sucks and I'm never using it again... I hear it actually has security now, but I'm not chancing it … |
The End.