« first day (3553 days earlier)      last day (1378 days later) » 

12:17 AM
@Aran-Fey but I need to run the form output through a python script, and return the output from the script, not the form
 
12:40 AM
@PedroSpinola Yep, that is what Aran was talking about: you would need to send a POST or GET request from within your HTML/JS script to your server which contains the python script then allow that to return the output (template)
 
Oh I see! So I must understand there is no security concern for now, right?
 
^^ you can use JS to do this but you don't need to. HTML allows for POST/GET requests using a standard form submission (this is basic HTML so if you don't know this I would look up some videos and tutorials on basic HTML and web development or you will get very lost jumping straight to using flask)
 
I will do some reading on how to manipulate post/get and get those data available to py script.
 
Security is a completely different question and JS will not help with this (using HTTPS over HTTP will but again that's a whole different issue)
 
hello fellow python friends
As a network engineering major, is a PYTHON/PERL track a good idea?
 
12:44 AM
yo Cran
 
hello :D
 
@LinkBerest yes I'll have a look over security again when I deploy the website, but using get/post won't be a concern in that sense, riight?
 
no - it is a sense in that you cannot begin to plan security issues if you do not understand basic request protocols
 
I will use direct html to post/get. Js is only to validate and create the form.
alright @LinkBerest, thanks a lot man - I'll read some more in-depth about http and https requests tomorrow before going on with the "connection" form-python script
thanks @Aran-Fey too ^^
have a good night :D
 
@PedroSpinola if its only on localhost you will not need https - if you do not understand that basic architecture you need to research web development from the beginning - take this or any course or tutorial or etc... or you will be very, very lost trying to jump into flask
@CranberryJuice I don't know what you mean by "track" (I'm assuming deciding on some courses) - I use Python a lot for networking tasks. I also use a lot of scripting languages (including powershell when dealing with Win) so its not a bad choice. I used to use Perl a lot but haven't touched it for 3 years at this point
 
1:03 AM
@LinkBerest I mean by learn python and perl to help boost my resume once I graduate. Like is python and perl going to help me in networking in the long run? I know python is but I've heard others say pearl is good as well
I've just been trying to decide what languages I can learn (besides bash and other CL scripting languages I know) to help in the real world(I'm 19, sophmore)
 
1:25 AM
That isn’t really a reasonable question to ask. Which language you use is going to depend a lot on the specific job and the task you want to accomplish.
Rather than trying to learn languages, focus on practical tasks, using any language you want or seems appropriate. If you build some hobby projects, or even better, contribute to open source projects, that is something better for your resume than just claiming you “know” languages A, B, and C.
Oh...I just read up to see you’re focusing on “network engineering”. In that case, I guess contributing to open source software projects may be less important. Still depends a lot on what you actually want to do, though.
 
 
1 hour later…
2:39 AM
@LinkBerest it's only on localhost while I'm developing it, but when I finish I intend to publish it on the web. I will take a look at this course content - thanks! But you know, I don't expect to reach high quality code or web application, because I don't have knowledge or experience and I won't get enough for this project in time. I just expect to have a fully functional application: input and output for the python code, and for this script to be secure.
If we can lend a couple of clients with it I hope to get a professional and qualified dev on the team to take proper care of code, architecture and infrastructure :)
I have been coding/studying/building for 200 hours already, and I expect around 100 more before I finish. If I would aim for top quality, I'd have to go for at least 10x that, time I don't have available at all.
 
@PedroSpinola What I was describing was not high level - it was the basic level of understanding I would expect for anyone attempting this task. You have to know how "the web" works at a conceptual level before attempting to build anything
 
@CranberryJuice learning the language by itself means very little to be honest. If you want real knowledge and experience, which will help you on your resume aswell as on real interviews, go for real projects, you will learn a ton and will have fun too! Maybe you can make something useful, also.
 
@PedroSpinola Exactly
 
But do I @LinkBerest ? I'm not saying I'm not gonna try and read and learn what you linked and more about requests etc, but I have a flask running with no problem atm
@CodyGray wrong user :P
 
Haha ok, I was wondering if it was that or you were just agreeing
 
2:48 AM
You do not know what a "request" is - that means you do not know how "flask" is handling communications between Python (the server) -> HTML (the UI) -> the Client and back. This is fundamental: everything else builds off of how you set up this type of communication
 
Oh yeah, that's for sure Link. But this will be my object of study tomorrow, before I try to handle requests to pass data and connect form-pyscript.
After that I'll have to learn how to deploy this thing to a real server, and I'm sure I'll have to go even deeper on that knowledge
This is all very new to me. I have managed tech projects before, but never really coded except for a ultima online cheat program when I was 15 lol
 
@CranberryJuice actually to build off what Cody said (re: open source) with networking I look for "setup print server using RasberryPI" and either a github or video link (or anything else using IoT or Server setups like this) so picking projects like that and learning the language they require (could be Scala, Python, Java, C++, etc) is a good way to go
 
Last 20 days I learned python, javascript, html, css, json, flask, mysql. Wayyy to go lol
@CranberryJuice If I might add to Link's and Cody's advice, learn as you go, like me. It's a lot easier to learn when you have a real project to apply theory! Maybe you even have a startup idea or something: build it! gl ;)
 
@CodyGray This is why I stopped using SO Jobs - the developer story is great for people who use opensource but gov guys like me (or people who code proprietary code - i.e. traditional CVs) just don't fit their model
 
@LinkBerest Yup… Same problem for me. Also, no way to filter out jobs that aren’t English-speaking. And too much webby stuff.
 
3:02 AM
you guys do freelance? or you mean normal jobs?
 
I don’t. I don’t have any time with my real job and the work I do here.
SO Jobs doesn’t really do freelance or consulting. It’s all full-time or internships.
 
I've gone from corporate -> gov -> consulting -> gov & academia
@CodyGray yep, I did a few webby & mobile jobs in my time but so prefer building full systems
 
seems good :)
 
@LinkBerest What do you mean by “full systems”? What kind of work are you doing now for government or academia?
 
teaching and signal processing stuff for academia; building data flows and the backend and devops systems for various data analytic applications and dashboards for the other
or that's what I was doing in my job - lately its a much broader scope due to how few people we have
 
3:24 AM
Ah, so you actually teach signal processing at the university level?
 
3:39 AM
nope - I build signal processing apps for research. I teach intro classes and a few upper level OOP and Data Engineering courses (okay, there's a little in one of those classes but its very low level)
 
I see
What kinds of signals, if you don't mind my asking?
 
This answer doesn't address the question at all. I left a comment for OP saying that a month ago and no response.
..or else, should we just as Needs clarity, since the OP doesn't give any specifics about what in the examples doesn't work according to their understanding
 
@smci Did you downvote it? That's the appropriate response to answers that aren't useful and/or don't help to solve the problem. (Leaving a comment is also fine, of course, as you did.)
Whether the question should be closed is an entirely different issue. Please don't take your judgments of the answer(s) and apply them to the question.
 
well, one of the current things we are looking at is the effect of masks on speech recognition and how the application of different filters (built by finding predicable patterns of alteration within a wave and using frequency-sweep test signals based on microphone captures) effects this - i.e. can we apply these to hearing aids/phones. I do a lot of the augmented listening and the a bit of video/audio processing for better automation for data capture
 
3:54 AM
@LinkBerest Oh, that's very cool
And you do all this data processing/filtering in Python? Or you use other tools, too?
 
depends on the group - its mostly Python but their are still a few Matlab people (and if I have to build a full automation systems or dashboards: I tend to move towards Java/Scala for that task - though a lot of Python ends up mixed up in this)
anyway - I'm out for the night. rbrb
 
 
3 hours later…
6:46 AM
@PedroSpinola What kind of data do you feel you will be handling?
Be aware that as soon as your site goes online, you will be targeted. Pretty much immediately. Given that you're racing through on your development, you really better not be handling any sensitive client data on a first-run. My reading of what you wrote suggests that you need clients before you can get professional assistance with your site. That could be a recipe for disaster
 
DON
7:06 AM
how to set up Python Debug Server in edit configuration Pycharm IDE
i'am using Pycharm community edition
 
^closed
FWIW, that was the best question I've seen this morning. :/
 
> asked Jul 25 '18
probably because question quality took a serious nosedive
 
Indeed. Just saw a homework question that still had "Can you draw all possible states [...] on a sheet of paper?" in it. Thanks for helping up help you, respected question asker. :/
The OP wasn't even a new member, they're close to 10k rep.
 
8:07 AM
@MisterMiyagi FWIW, there's a guy whose been a member for almost 11 years, with over 50k rep and 117 gold badges. He has no (undeleted) answers & has asked over 1200 questions. You'd think by now he'd be an expert, but he still asks spoon-feeding / cargo-cult stuff.
 
It's kinda depressing to see people seemingly not pick up anything even after so long... :/
 
@MisterMiyagi I agree. I don't get any satisfaction from spoon-feeding people like that. And it's kinda scary that there are professional coders like that.
 
8:23 AM
@MisterMiyagi probably one with 30 score in their top tag (i.e. professional asker type)
 
8:43 AM
@MisterMiyagi Nice use of while from syntax. :D
But to be fair, I guess it can be hard to find a dupe for that if you don't understand what's causing the problem. OTOH, it sounds like he's doing a coding challenge... and probably didn't even think of running his code on his own test data.
 
9:17 AM
@PM2Ring Never saw that before, what is it actually supposed to do?
 
@IvoMerchiers it gets called if the while loop exits regularly because its condition isn't fulfilled any more. An irregular exit would be if there was a break at some point, and that's why the loop exits.
 
@Arne while from?
 
haha, whoops
 
I was having a mini panic there :P
 
my mind translated it into a while..else. is that even a thing?
 
9:23 AM
Not to my knowledge, but you just prompted me to do a frantic search :)
 
it is valid syntax. No clue when it would be useful, and I don't think I ever saw it
now I need to find out what while from even is
 
Ah, I was referring to while from myself. I thought I was missing something fundamental when you gave the explanation
 
while-else works the same as for-else. Never needed the former.
 
9:42 AM
It actually wasn't open at the time... in fact I think I closed it just before it stopped working in the task manager due to the program crashing and locking one of the word documents.

However, while I've found that running CreateObject('Word.Application') creates a new backround Word process in task manager - DispatchEX('Word.Application') still results in "AttributeError: module 'comtypes.client' has no attribute 'DispatchEX'".

It's really weird and I don't understand it as it was working great before.
 
10:19 AM
needs details, OP is at the n'th revision of desired formula stackoverflow.com/questions/62790070/…
 
@IvoMerchiers Sorry for the confusion. I was just being silly. That while from isn't part of the code, it just got included into the code block by accident.
 
haha okay np, just thought it was some magical new syntax :)
 
 
1 hour later…
11:37 AM
typo, missing quotes around string stackoverflow.com/questions/62793900/…
 
Closed
 
12:25 PM
@JamesMcIntyre Did you search for that error
 
12:52 PM
@LinkBerest I actually had done but at that stage I still didn't have word open in the background.

I've just tried win32com.client.DispatchEx with Word in the background and my previous optimisation of having the create instance before the loop and close instance after and now the PDFs are creating in under a second each!

You are a saint @LinkBerest

To ensure that word is open in the background would you run StartWord = comtypes.client.CreateObject('Word.Application') at the start and StartWord.Quit() at the end?
 
user13036845
Hello everyone! I'm new in the chatroom. And was wondering if someone here knows pygame.
 
@BruceBanner Hello :) Please take some time to read our room rules regarding posting code
Specifically, if you have big blocks of code, they should be hosted off-site and linked here so they don't disrupt other conversations. That said, have you made sure that you have an MCVE that people might be able to help with?
 
user13036845
@roganjosh Got it!
 
Good good :) Welcome
 
@JamesMcIntyre if you're looping through several files see this for the basic process and issues
 
1:17 PM
P.s. I tried to format the code above with alt + c (stackapps.com/questions/3161/…) but it didn't seem to work
 
ctrl + k is the normal way to block-format, but it won't work if you mix plaintext with the bit you want to format. We have a guide for that (it's in the top right of the room)
What you have linked is a custom script
I'm moving that in the meantime since you double-pinged and it's missing indentation. Please practice in the sandbox (linked in the guide) and re-post when you've fixed it
 
@LinkBerest @LinkBerest I think that is effectivly the same as what I've got. What I'm worried about is if Word happens to not be open in the backround when at some point in the future when the automation is due to start. Should I insert StartWord = comtypes.client.CreateObject('Word.Application') in before the start of my code to ensure that Word is open in the backround?
import os
import comtypes.client
import win32com.client

wdFormatPDF = 17

word = win32com.client.DispatchEx('Word.Application')

for line in VDDs:
    doc = word.Documents.Open(os.getcwd() + "/PDFs/" + str(line[13]) + ".docx")
    doc.SaveAs(os.getcwd() + "/PDFs/" + str(line[13]) + ".pdf", FileFormat=wdFormatPDF)
    doc.Close()
    os.remove("PDFs/" + str(line[13]) + ".docx")
word.Quit()
 
Thanks :)
 
1:34 PM
Hmm, I just got logged out of SO. Weird.
 
Hello
 
@AndrasDeak that's even a thing? Wow... :p
 
apparently :P
 
The sirens and red strobe light went off; there was no way that incident was going under his radar :)
 
@ChrisP you are missing an MCVE. Please don't ask for debugging help without an MCVE.
 
2:06 PM
@MisterMiyagi - should I just delete my answer and vote to close the question since it is not very clear what the OP wants? - stackoverflow.com/questions/62760241/…
 
2:19 PM
@wwii I'm in no position to tell you what to do. As said, I don't get the question (cv'd myself) – if it's the same for you, cv it. Your answer is not wrong, and given the obscure question it might just be right.
I simply don't know.
 
@roganjosh I'll be handling only dictionary values (pairs of strings)
 
So, no login?
 
But no of course not I'd never put client data at risk like that. I know I'm not a professional
admin login oonly
hmm
I don't know really
I'll have to study
What we want is for the users (our to-be clients) not to be able to access the python code, that's all.
We may get professional help if really needed, but it will be much cheaper with a working concept and prototype
I'm not handling sensitive data per se, like credit card info, names, nothing liike that
no client data at all
it's only a consultation software to help with business decisions (without inputing sensitive business data)
(at prototype level, of course)
 
Ok. Not even passwords? (I assume the admin is you and not one of their reps?).
 
not even passwords
it will be tested with would-be clients by my partner himself
he will use my credentials
I mean: maybe at some point we can give someone access with their own login + pwd.
Well I'll take your advice and don't let this slip. I appreciate
I'm a fast learner, so maybe I'll deal with it myself, let's see :)
 
2:33 PM
Ok. Please note that this isn't a personal chat, so you can gather your responses up into single posts, not one per sentence. But, good luck :) There's a few of us in this room that work with web if you're unsure
 
whatsapp tendencies lmao :P
yeah, I'll be learning a lot the next few days - my challenge is to find suitable resources for someone in my position, which is not an easy task as most of them are written for badass devs and students who dedicate most of their life (or work/school-life) to such endeavours, like probably yourself and most devs :P
 
that's rare, someone speaking highly of programming students
 
The bread-and-butter of my referrals: Mega Tutorial
 
I have deep respect to passionate people who dedicate to specific fields of thought/practice. Particularly in sciences and arts. But it's a tradeoff you know :P
 
@PedroSpinola methinks you assumed too much about me :)
 
2:46 PM
Yeah rogan that's what I've been reading and following to build my application, and it's awesome. But he's using wtforms and because I wasn't able to achieve what I needed with it I went with javascript for the forms. Or I would just follow on :P
I tend to do that rogan :P
 
Nah, you can ditch wtforms. I now never user them. They're just a mess with AJAX
@SawanKumar is this Python-related? It looks like a headset
 
3:14 PM
Might be looking for a Python API to work with it
 
 
2 hours later…
5:20 PM
Thanks
My friend in Australia sent me this news article. I wonder if we can make a new Indiana Jones film from it? Speeding wagon, deadly snake, improvised weapons... it has all the pieces :)
 
@roganjosh I can't help but feel their reasoning is backwards. Injecting a meaningless default which hides future errors seems to be the path "asking for future problems".
 
5:36 PM
No error, no problem
 
They seem to be aware of this via their colleague, though? If you think it can be objectively answered then I will consider re-voting but I'm not sure I'm convinced it's useful
 
I've seen this reasoning come up often, usually by people not used to the liberal exception throwing of Python. I see some merit in making an argument, but I'm not sure whether I'm objective.
Hm, on second thought I think there are two cases, each of which can be answered objectively. Basically, do they have a valid default or not?
 
There could also be a case for None being a useful default?
 
then it's unclear
 
I'd assume just the cases "has a useful default" and "does not have a useful default". Whichever is the case for the problem at hand is their problem. :P
 
5:40 PM
@MisterMiyagi snap :) In which case, I'm not too fussed that it remains closed tbh, even if the reason might not be the best (in the end, we're still building up the narrative for them and debating it)
 
I'm fine either way.
Policing Philosophy: Is a question with an objectively enumerable set of opinions still opinion based?
 
@MisterMiyagi mabe not, but it's probably too broad
 
@roganjosh Add this to the extremely long list of reasons NOT to live in Australia. The place actively wants to kill you.
 
@roganjosh how do they mess withAJAX? just curious
p.s sorted the problem from yesterday came down to a mistype within the config :/
 
@MattDMo mmm, I dunno. I've been battling CSS/JS for the last couple of days. It would liven things up a bit :P
 
5:46 PM
CSS I can handle, JS is another story. Maybe a nice winter vacation is just what you need.
 
@Kwsswart Because they mainly work when you need a full page refresh, resetting the fields. If you don't refresh the page, then you have to slightly-hackily clear the fields for the next input.
 
@AndrasDeak True that. More appropriate for some other SE site at least.
Now I wish there were a way to retract reopen votes... :/
 
@roganjosh Oh I see so is it better to do forms with javascript
the tutorial never mentions the downfall
 
@Kwsswart Not to mention when I want dynamic dropdowns based on the selection from another dropdown. Then they just get in my way tbh. It, of course, can be done, but I seriously start questioning why I'm even bothering. The validators are nice for validating emails in sigh-up forms, I guess
@Kwsswart It won't, and you should keep in mind that I generally build dashboards rather than traditional sites where you just submit forms and have done with it, so my view is perhaps skewed
 
@roganjosh If/when I pick up some real js/HTML5, I'm interested in extending wtf or flask-wtf to improve some of HTML5's features, I wonder if some hooks could be incorporated to do what you're talking about?
 
5:55 PM
@roganjosh fair enough what do you usually use when working with forms and validators
 
@toonarmycaptain Ajax is jQuery, not vanilla JS, so I'm not sure it's influenced by HTML5. Do you have any specific ideas on what you're suggesting? I'm not sure I follow properly
@Kwsswart I write my own validation code
 
@roganjosh Thought so but do you use combination of jquery and flask for validation and dynamic loading?
 
@Kwsswart I'm half way through ripping my own website apart. The front-end code is awful (and the site looks drab). I initially just intended to give it a face-lift, but no, I'm not letting that code pass :) I hope to have it done by the end of the week, and I intend to github a lot of it. I'll ping you then
 
@roganjosh Unless I misunderstand, HTML5 has more form field features/ability to restrict input than previous versions (I haven't touched this for a few months). I'd like to try to implement some of them, probably plus some simple js features, in wtforms. I'd naiively presume that some of that reset fields js sort of stuff could have hooks implemented at the same time.
kw naiively lol
 
@roganjosh I would be interested in seeing it and seeing how you do it because I have yet to use jquery and have only been using wtforms or html forms
 
6:12 PM
@Kwsswart in that case, in the meantime, I threw something together in my last answer. Note; I was just trying to connect dots for the OP to make a stand-alone program - it has no form validation and isn't great code. But you can copy/paste it and run it to see
 
@roganjosh thanks man will take a look at that
 
@toonarmycaptain I know that it can do some front-end validation. I'd have to dig quite a bit into the flask-wtf codebase to see applications. That's not to say that it can't be done; I ditched the library relatively early-on
 
let me know when you github the other one as I would love to see it
 
 
2 hours later…
8:26 PM
// A macro to disallow the evil copy constructor and operator= functions, somebody has a strong stance on the copy constructor xD
 
8:38 PM
@Hakaishin syntax error
 
9:14 PM
I have ctrl-f'd the docs for "path" and found nothing relevant
I was implied to that I can convert an image, using its path, into some skimage-related object. I do not know what was meant when this was said to me
Any idea what they might have meant?
 
@JohnnyApplesauce do you have an exact quote for that?
That's too vague to say anything meaningful. You can read images into numpy arrays for instance, which skimage is probably built on top...
@JohnnyApplesauce and ctrl+f is rarely relevant. Use the search box.
e.g. scikit-image.org/docs/stable/api/… from what you linked
 
 
1 hour later…
10:47 PM
@toonarmycaptain we have a lot of problems with injection when we try to use frontend validation even with HTML5 (though I do use it - just don't rely on it)
 

« first day (3553 days earlier)      last day (1378 days later) »