|
duck monster posted:Because gently caress javascript. This is a project fueled by hate. The best kind of project You're doing God's work, son. Finish it
|
# ? Nov 26, 2015 20:43 |
|
|
# ? Jun 11, 2024 18:08 |
|
What's the best way to find a project to contribute to? I have a 3-4 month break while my thesis gets assessed and just rewrote a massive chunk of my own big personal project so I'm sick of it, but still want to code something.
|
# ? Nov 27, 2015 05:36 |
|
Murodese posted:What's the best way to find a project to contribute to? I have a 3-4 month break while my thesis gets assessed and just rewrote a massive chunk of my own big personal project so I'm sick of it, but still want to code something. What kind of stuff are you interested in? Just try and think of a package that you use that you think could be improved, or a need that you think could be met by creating a new package.
|
# ? Nov 27, 2015 06:12 |
|
QuarkJets posted:What kind of stuff are you interested in? Just try and think of a package that you use that you think could be improved, or a need that you think could be met by creating a new package. You don't even need to think it needs improved, because even if you don't think it needs improvement, I guarantee it does and theres probably an issue tracker with lots of bugs needing fixes.
|
# ? Nov 27, 2015 16:02 |
|
Murodese posted:What's the best way to find a project to contribute to? I have a 3-4 month break while my thesis gets assessed and just rewrote a massive chunk of my own big personal project so I'm sick of it, but still want to code something.
|
# ? Nov 28, 2015 06:43 |
|
Is this the right place to ask tkinter questions? I have a quick question about layout. That's an extremely rough mockup of what my UI is supposed to look like (it's a simulation of an industrial process.) I'm thinking of using grid layout, but the bottom half of the UI would have seperate columns from the top half. Is there a way to set that up, where you have two separate layouts on a single app?
|
# ? Nov 28, 2015 21:30 |
|
I'm trying to install a package for a student project, but my Python3.5 shell does not recognize any commands of the form code:
I apologize if this is a stupid question.
|
# ? Nov 28, 2015 23:36 |
|
LookingGodIntheEye posted:I'm trying to install a package for a student project, but my Python3.5 shell does not recognize any commands of the form in a command prompt, go to the directory with python.exe and try: python ./scripts/easy_install.exe and then whatever options you need with that
|
# ? Nov 28, 2015 23:59 |
|
StashAugustine posted:Is this the right place to ask tkinter questions? I have a quick question about layout. Can't you set this up as multiple Frames? Then you can .grid() the individual widgets in each Frame however you want.
|
# ? Nov 29, 2015 05:29 |
|
FoiledAgain posted:Can't you set this up as multiple Frames? Then you can .grid() the individual widgets in each Frame however you want. Yeah that worked. I haven't used tkinter in like two years so my knowledge is rusty. e:nvm figured it out StashAugustine fucked around with this message at 19:27 on Nov 29, 2015 |
# ? Nov 29, 2015 19:06 |
|
So I have a little script to download pdfs but I think the way I'm currently doing it is really inefficient. If the file doesn't exist already it just downloads it normally, if it does exist it checks the size of the pdf and if its different it downloads it with another name. But from what I understand the way I've written it entails downloading the file twice, once to check its size and then again if its a different size. My main concern is that I am potentially downloading lots of files only for them to be the same size and therefore not saved. Is there a way for me to find out the size of the pdf file without opening the whole file (this information isn't listed on the page anywhere, so comparing that isn't an option). Here is my sitty code: code:
|
# ? Dec 2, 2015 15:15 |
|
Under Windows what's the most straightforward library to print something like a label from python? Using whatever font and size (Courier 20), and then whatever paper size (4x6) for example.
|
# ? Dec 2, 2015 22:05 |
|
Bob Morales posted:Under Windows what's the most straightforward library to print something like a label from python? Using make, I created a template of a LaTex file that I then created with Python to produce the final LaTex file that I finally created with LaTex. Alternatively, I have used matplotlib to do something similar, but joined them together with PdfPages. If you are comfortable with matplotlib, that's probably your best bet.
|
# ? Dec 2, 2015 22:17 |
|
Anyone have experience with fuzzywuzzy? https://github.com/seatgeek/fuzzywuzzy I'd like to use the process.extract function but it's way slower than just iterating through the list with a for loop and running fuzz.ratio on each item. Am I doing something wrong here? code:
|
# ? Dec 3, 2015 03:47 |
|
vodkat posted:So I have a little script to download pdfs but I think the way I'm currently doing it is really inefficient. If the file doesn't exist already it just downloads it normally, if it does exist it checks the size of the pdf and if its different it downloads it with another name. But from what I understand the way I've written it entails downloading the file twice, once to check its size and then again if its a different size. My main concern is that I am potentially downloading lots of files only for them to be the same size and therefore not saved. Is there a way for me to find out the size of the pdf file without opening the whole file (this information isn't listed on the page anywhere, so comparing that isn't an option).
|
# ? Dec 3, 2015 04:14 |
|
Hed posted:Urlopen's info method should just get the head and compare so I think you're doing it right. You may want to stand up a simplehttpserver and point your grabber there to verify though Thanks, thats good to know!
|
# ? Dec 3, 2015 11:49 |
|
I'm writing an app in python. One part is a simple android/ios portion. Another is a website portion and the third part is a python API to tie it together. I'm using flask right now (just started). Should I use django to make the website portion easier? The website will be like a queue of work, when they finish one item it should load the next.
|
# ? Dec 3, 2015 15:56 |
|
If you are already using Flask for the API, why not go whole hog? Are you having any specific difficulties using Flask?
|
# ? Dec 3, 2015 17:03 |
|
Bob Morales posted:Under Windows what's the most straightforward library to print something like a label from python? Here's what I ended up doing: code:
|
# ? Dec 3, 2015 17:38 |
|
5436 posted:I'm writing an app in python. One part is a simple android/ios portion. Another is a website portion and the third part is a python API to tie it together. I'm using flask right now (just started). Should I use django to make the website portion easier? The website will be like a queue of work, when they finish one item it should load the next.
|
# ? Dec 3, 2015 19:53 |
|
Dominoes posted:It's hard to tell from that description alone. If you're going to use more than one of the following, consider switching to Django: database, admin page, user login, email. Yea I will most likely use all. Facebook/Google login, light email, and most likely a mysql db. HardDisk posted:If you are already using Flask for the API, why not go whole hog? Are you having any specific difficulties using Flask? I like Flask a lot. To give you a better idea, there are users and commenters. A user will upload an image (through a simple android/ios app) and the commenters (there are many of them) will leave a comment on that image. Once that image gets 10 comments (from 10 unique commenters) it returns the comments to the user. The whole commenting workflow will be a web app. They look at the image, leave a short text comment, submit it, move onto the next item.
|
# ? Dec 3, 2015 22:03 |
|
I'm biased because I'm working with Flask for three years now, and I strongly prefer it over Django overall. Something about Django just doesn't click with me for some reason, because every time I start a Django project to try and learn it, it feels bloated right out of the gate. Having said that, for you project in particular you might need a lot of tuning for how each user's queue should behave (what jobs should appear in each queue and so on), and that will probably imply in a lot of tuning of your models. And for that, you will probably need a decent administrative interface, and Flask-Admin isn't quite there yet in terms of flexibility IMO (It's either a fairly rigid set of basic CRUD views or it's a completely blank template for you to build upon). Apparently Django's admin is better, but I really can't say how and where. Another sore spot for Flask vs Django is the social login, were Django's has to be better because every Flask extension that I worked with so far was kinda poo poo. Having said all that, though, if you have the time and the inclination to do that, I would suggest building your front-end in both frameworks so you can then compare them much better that way. Your application logic shouldn't have anything to do with your web framework anyway. If you have any Flask questions, though, feel free to ask.
|
# ? Dec 3, 2015 22:32 |
|
I don't think the work queues need too much tuning, I haven't thought the full solution for it but I assume there will be a queue of items and it'll serve up the next item to whichever commenter is on. The interface is simple, display image, text box to comment, next button to submit that comment and get the next image. I do need social login (google + facebook). Is it possible to simply program the service portion in flask and use something else for the front end? Well I guess I know its possible but is it optimal to getting off the ground quickly? I'm not really a developer so I haven't made a web app before.
|
# ? Dec 3, 2015 23:28 |
|
5436 posted:Is it possible to simply program the service portion in flask and use something else for the front end? Well I guess I know its possible but is it optimal to getting off the ground quickly? I'm not really a developer so I haven't made a web app before. I think you can, but I don't think there's any point to using something else than flask specifically for the front-end, since it already does have something to both render your templates in the server (Jinja2) and to serve the rendered template as a HTML page.
|
# ? Dec 3, 2015 23:53 |
|
I wrote a recommendation engine on Python/Django that tries to recommend places to travel to. It uses other people's choices (simplified pearson correlation), and a tag system. Does it seem to give reasonable results? website. Might use this as an excuse to learn scikit learn.5436 posted:Yea I will most likely use all. Facebook/Google login, light email, and most likely a mysql db. Dominoes fucked around with this message at 15:02 on Dec 4, 2015 |
# ? Dec 4, 2015 14:45 |
|
The thing with Django's bloat is that, functionally, it doesn't matter. You just don't use the parts you don't want. However, there is the initial problem of grasping all the parts of it and how they work together. Once you've done that though, it's simple to do a very basic website or something very complex.
|
# ? Dec 4, 2015 20:27 |
|
Is there a preferred python library for dealing with GPS coordinates? Specifically I'll be converting them to a coordinate system in meters. I'm looking to maintain accuracy for distances of < 1 meter, so I'm hesitant to roll my own given the possibility of floating-point issues. However Google is not helping. This seems like a common enough issue that there would be a library, no?
|
# ? Dec 4, 2015 21:16 |
|
Thermopyle posted:The thing with Django's bloat is that, functionally, it doesn't matter. You just don't use the parts you don't want. SurgicalOntologist posted:Is there a preferred python library for dealing with GPS coordinates? Specifically I'll be converting them to a coordinate system in meters. I'm looking to maintain accuracy for distances of < 1 meter, so I'm hesitant to roll my own given the possibility of floating-point issues. However Google is not helping. This seems like a common enough issue that there would be a library, no? Dominoes fucked around with this message at 21:24 on Dec 4, 2015 |
# ? Dec 4, 2015 21:21 |
|
Dominoes posted:Could you be more specific? What coordinate system to and from? I interface with them in pairs degree-decimals (ie no minutes, seconds etc; NSEW is determined by sign), then run them through trig equations to calculate things like a new position from an old position and heading, the distances between two points etc. You can convert to minutes/seconds etc with modulus math. Degree-decimal to x,y in meters (with the origin specified by another degree-decimal pair). Easy enough to implement Haversine myself, just thought there might be something out there already.
|
# ? Dec 4, 2015 21:48 |
|
SurgicalOntologist posted:Degree-decimal to x,y in meters (with the origin specified by another degree-decimal pair). Easy enough to implement Haversine myself, just thought there might be something out there already. Scikit-learn can do Haversine, although I don't know if there's anything special in that implementation compared to doing it yourself.
|
# ? Dec 4, 2015 22:20 |
|
SurgicalOntologist posted:Degree-decimal to x,y in meters (with the origin specified by another degree-decimal pair). Easy enough to implement Haversine myself, just thought there might be something out there already. Alternatively, you could (possibly?) calculate the heading and dist from the origin to the point using haversine, then use basic trig to convert it to a flat grid system. The error will be small enough for small distances. For finding distance and bearing: Python code:
Python code:
Dominoes fucked around with this message at 13:08 on Dec 5, 2015 |
# ? Dec 4, 2015 22:50 |
|
Dominoes posted:I wrote a recommendation engine on Python/Django that tries to recommend places to travel to. It uses other people's choices (simplified pearson correlation), and a tag system. Does it seem to give reasonable results? website. Might use this as an excuse to learn scikit learn.
|
# ? Dec 4, 2015 23:43 |
|
Might be tons of overkill, but I used the GDAL python bindings (http://gdal.org/) in the past and it worked well.
|
# ? Dec 5, 2015 01:06 |
|
Dominoes posted:I wrote a recommendation engine on Python/Django that tries to recommend places to travel to. It uses other people's choices (simplified pearson correlation), and a tag system. Does it seem to give reasonable results? website. Might use this as an excuse to learn scikit learn. It didn't find Mexico City, but the recommendations seemed reasonable.
|
# ? Dec 5, 2015 01:25 |
|
SurgicalOntologist posted:Is there a preferred python library for dealing with GPS coordinates? Specifically I'll be converting them to a coordinate system in meters. I think pyproj is what you're asking for. It's for converting a point from one coordinate system to another, for example I use it for converting from EPSG:4326 (your standard lat/lon projection) to EPSG:3857 (Web Mercator, where the coordinates are in meters). If that's what you're asking for, this is the recommended library. If you're worried about accuracy issues, be sure you use the right projection info for your source and destination projections when you call the Proj() constructor. sund posted:Might be tons of overkill, but I used the GDAL python bindings (http://gdal.org/) in the past and it worked well. This works, too, is a VERY useful library, and is also using Proj.4 behind the scenes to do reprojections, but if you don't need the other stuff it supplies, pyproj is going to be much easier to install.
|
# ? Dec 5, 2015 01:39 |
|
The only time I tried to do a coordinate transformation in Python, I gave up and just used ogr2ogr.
|
# ? Dec 5, 2015 04:35 |
|
Cool, thanks for the tips everyone. I did end up implementing it myself, but I'll check those options out as well. I didn't realize until now that I was essentially doing a map projection. Dominoes: what is ʶ? And why won't this work in other quadrants? Seems fine since you're using atan2
|
# ? Dec 5, 2015 05:13 |
|
This might be a bit too specific (or even closer to a linear algebra questions than to a python questions), but I'm doing a machine learning class and was wondering whether there's a way to do the below thing without the loop, using only vector/matrix operations:Python code:
|
# ? Dec 5, 2015 10:13 |
|
Loezi posted:This might be a bit too specific (or even closer to a linear algebra questions than to a python questions), but I'm doing a machine learning class and was wondering whether there's a way to do the below thing without the loop, using only vector/matrix operations: You can use einsum to do it like this: code:
There's also this monsterosity: code:
|
# ? Dec 5, 2015 11:15 |
|
|
# ? Jun 11, 2024 18:08 |
|
Cingulate posted:Scikit-learn is really intuitive and easy to learn. You'll be running Random Forests in like 15 minutes. Baby Babbeh posted:It didn't find Mexico City, but the recommendations seemed reasonable. SurgicalOntologist posted:Dominoes: what is ʶ? And why won't this work in other quadrants? Seems fine since you're using atan2 You're right; I just tested the script I posted; it works as-is for all quadrants. Dominoes fucked around with this message at 12:10 on Dec 5, 2015 |
# ? Dec 5, 2015 12:02 |