Search Results

Search found 8 results on 1 pages for 'flyingcrab'.

Page 1/1 | 1 

  • Assignment in python for loop possible?

    - by flyingcrab
    I have a dictionary d (and a seperate sorted list of keys, keys). I wanted the loop to only process entries where the value is False - so i tried the following: for key in keys and not d[key]: #do foo I suppose my understanding of python sytax is not what i thought it was - because the assignment doesnt suppose to have happened above, and a i get an instanciation error. The below works of course, but I'd really like to be able to use something like the code above.. possible? for key in keys: if d[key]: continue #foo time! Thanks!

    Read the article

  • High volume SVM (machine learning) system

    - by flyingcrab
    I working on a possible machine learning project that would be expected to do high speed computations for machine learning using SVM (support vector machines) and possibly some ANN. I'm resonably comfortable working on matlab with these, but primarly in small datasets, just for experimentation. I'm wondering if this matlab based approach will scale? or should i be looking into something else? C++ / gpu based computing? java wrapping of the matlab code and pushing it onto app engine? Incidentally, there seems to be a lot fo literature on GPUs, but not much on how useful they are on machine learning applications using matlab, & the cheapest CUDA enlabled GPU money can buy? is it even worth the trouble?

    Read the article

  • Stack / base pointers in assembly

    - by flyingcrab
    I know this topic has been covered ad-naseum here, and other places on the internet - but hopefully the question is a simple one as I try to get my head around assembly... So if i understand correctly the ebp (base pointer) will point to the top of the stack, and the esp (stack pointer) will point to the bottom -- since the stack grows downward. esp therefore points to the 'current location'. So on a function call, once you've saved the ebp on the stack you insert a new stack frame - for the function. So in the case of the image below, if you started from N-3 you would go to N-2 with a function call. But when you are at N-2 - is your ebp == 25 and the esp == 24 (at least initially, before any data is placed on the stack)? Is this correct or am I of on a tangent here? Thanks!

    Read the article

  • latex - including a landscape pdf

    - by flyingcrab
    Having no end of trouble including a large landscape pdf in a portrait .tex document (using pdflatex). When it does show up, only the leftmost end of the pdf shows up, now matter how small i make the scale. And i cant seem to get it to show in landscape mode at all... Is anything wrong with the code i am using? \begin{landscape} \includegraphics[scale=0.1]{Appendix2.pdf} \end{landscape}

    Read the article

  • R adding infrequent date 'events' to a time series plot

    - by flyingcrab
    Hi, I am just starting on R - and have hit a bit of a deadlock with some time series data. I have a time series (date and value) in 'zoo' format, that I want to annotate with a cross when an event occurs. The events are irregular and in a csv format (just the dates, sometimes repeated). I've managed to read in the dates etc into a format that R accepts - but i cant seem to get a means to chart the main time series with the secondary events annotated on top?

    Read the article

  • accessing widgets inside a GWT element

    - by flyingcrab
    I want to access the text elements inside this textbox in GWT from the main method (where I call it like this) DialogBox aBox = newCandidatePop.buildNewElecPopup(); aBox.center(); aBox.getWidget(); MiscUiTools.newCandidateHandler(aBox.firstName, aBox.surName); in newCandidateHandler i want to attach a click handler to the two text boxes However, the above doesnt quite work - I cant get access to the aBox.firstName elements because they are static methods -- I am wondering what is best practice, how would you code something like this up? static TextBox firstName = new TextBox(); static TextBox surName = new TextBox(); static DialogBox box; // public newCandidatePop() { // box = buildNewElecPopup(); // } static public DialogBox buildNewElecPopup() { DialogBox box = new DialogBox(); box.setAutoHideEnabled(true); box.setText("Add a New Candidate"); box.setAnimationEnabled(true); box.setGlassEnabled(true); Grid dialogGrid = new Grid(2, 3); dialogGrid.setPixelSize(250 , 125); dialogGrid.setCellPadding(10); dialogGrid.setWidget(0, 0, new HTML("<strong>First Name</strong>")); dialogGrid.setWidget(0, 1, firstName); dialogGrid.setWidget(1, 0, new HTML("<strong>Surname</strong>")); dialogGrid.setWidget(1, 1, surName); box.add(dialogGrid); return box; }

    Read the article

  • javascript table - update on data request

    - by flyingcrab
    Hi, I am trying to update a table based on a json request. The first update / draw works fine - but any subsequent changes to the variables (the start and end date) do not show up - even though the json pulled from the server seems to be correct (according to firebug). AFAIK the code below should re-initialize everything - no sure what is going on (I'm using the Google vizulization api)? function handleQueryResponse(response) { if (response.isError()) { //alert('Error in query: ' + response.getMessage() + ' ' + response.getDetailedMessage()); return; } visualization = new google.visualization.Table(document.getElementById('visualization')); visualization.draw(response.getDataTable(), null); } One more thing: I'm working on a page that displays textbased tables and currently trying to decide between the google table (viz api) and a jQuery alternative I came across jqGrid any good ones I am missing?

    Read the article

  • Binning into timeslots - Is there a better way than using list comp?

    - by flyingcrab
    I have a dataset of events (tweets to be specific) that I am trying to bin / discretize. The following code seems to work fine so far (assuming 100 bins): HOUR = timedelta(hours=1) start = datetime.datetime(2009,01,01) z = [dt + x*HOUR for x in xrange(1, 100)] But then, I came across this fateful line at python docs 'This makes possible an idiom for clustering a data series into n-length groups using zip(*[iter(s)]*n)'. The zip idiom does indeed work - but I can't understand how (what is the * operator for instance?). How could I use to make my code prettier? I'm guessing this means I should make a generator / iterable for time that yields the time in graduations of an HOUR?

    Read the article

1