• Most votes
  • Most comments
  • Newest
  • Activity
  • Showing only topics in ~comp with the tag "python". Back to normal view / Search all groups
    1. So, the black installation doc tells me to install black by using: pip install black I don't know what pip is so I go read about it here. These instructions tell me that pip is already installed...

      So, the black installation doc tells me to install black by using: pip install black

      I don't know what pip is so I go read about it here. These instructions tell me that pip is already installed since I have the latest version of Python installed.

      That's wonderful, right?

      Not for me. How do I install black?

      Black can be installed by running pip install black.

      Do I run this from the Terminal (I'm using Mac)?

      5 votes
    2. I'm fairly new to Tildes and have become so impressed that I want to learn Python in order to contribute to its success. I have approximately 15 years of experience with classic ASP/ASP.NET and...

      I'm fairly new to Tildes and have become so impressed that I want to learn Python in order to contribute to its success. I have approximately 15 years of experience with classic ASP/ASP.NET and haven't coded since 2008.

      I've been pointed to VSCodium for an editor.

      I'm using OSX and wondered how I would set up an executable environment for testing/development.

      Other than that, is there anything else you'd recommend for me to get started?

      17 votes
    3. Hi, There's a certain site which hosts media files and has a player that depends on a lot of third-party resources to play, while browsers have native support for those file types. Those 3rd-party...

      Hi,

      There's a certain site which hosts media files and has a player that depends on a lot of third-party resources to play, while browsers have native support for those file types. Those 3rd-party resources are often blocked by ad blockers and I have no desire to white-list them. I would like to extract the direct link to the media file and make it playable on my custom web page.

      The link to the media file is present in the page source of each page, always on the same line. It's not anchored in HTML but present in the JavaScript for the player, like so:

          $(document).ready(function(){
            $("#jquery_jplayer_1").jPlayer({
              ready: function () {
                $(this).jPlayer("setMedia", {
                  [ext]: "https://[domain]/[filename.ext]"
                });
              },
      

      In this example it's on line #5. [ext] = the file extension.

      I want to build the following:

      • A web page with a form with a single input field meant to receive links from that specific file host
      • [Something] that extracts the file link from the source of the host's page
      • Present the linked file as playable in an embedded native player

      So far I've managed to create a form with an input box and a submit button, but it doesn't do anything yet. What is the best way to build the actual functionality? I know HTML/CSS. I have some rudimentary understanding of JavaScript/jQuery and Python3, so those would be my preferred tools.

      For those worried about piracy: The files in question are not copyrighted and I'm not looking to make copies. I just want to make them playable. This is for personal use.

      Thank you for reading this far. Any and all advice is welcome!

      11 votes
    4. I've been trying to understand Docker and while also learning Python it occurred to me that virtual environments seem to be the same thing. They're probably not, but can anyone shed some light on...

      I've been trying to understand Docker and while also learning Python it occurred to me that virtual environments seem to be the same thing. They're probably not, but can anyone shed some light on this?

      6 votes
    5. News Desk Updated!

      A few weeks ago I posted a project I was working on to read news from the command line. I incorporated the suggestions given in that thread (license, requirements.txt, etc), incorporated...

      A few weeks ago I posted a project I was working on to read news from the command line. I incorporated the suggestions given in that thread (license, requirements.txt, etc), incorporated suggestions I've received elsewhere, and added a few features.

      Here's the updated link: News Desk

      Any feedback would be much appreciated!

      Edit: And a specific point for feedback. I store the user's API key in ~/.nd_config/key which I think is a step up from requiring the user to set their key as an environment variable (which is how I had it originally). Still though, is there some way I can not store the key in plaintext and still have it in a format that is readable by the computer and can be used to verify API access?

      7 votes
    6. As some of you may know, Tildes is written in Pyramid. I've done some OSS work in Pyramid and Flask, but my paid web dev work the past few years has been mostly in Django. There are some newer...

      As some of you may know, Tildes is written in Pyramid. I've done some OSS work in Pyramid and Flask, but my paid web dev work the past few years has been mostly in Django. There are some newer frameworks out there like Sanic or Falcon, and some older ones like Zope, CherryPy and Turbogears, that I've played with but have no real experience in.

      Personally, I like Django for its "batteries included" and its big ecosystem, Flask for its minimalism and Pyramid for its elegant design. There's no single framework that fits all needs and all have their share of annoyances - Django can be quite difficult to swap out things like the default ORM or template system (though these have gotten better in recent versions), Flask has some architectural issues with request and other global variables, and Pyramid perhaps suffers from a relatively small ecosystem and lack of "one way to do it".

      What are your experiences and preferences?

      9 votes
    7. https://john-millikin.com/reddit-front-page-2018 Not sure if this is of interest to anyone else, but it might be a good starting point if you want to find Reddit posts worth cross-posting here. It...

      https://john-millikin.com/reddit-front-page-2018

      Not sure if this is of interest to anyone else, but it might be a good starting point if you want to find Reddit posts worth cross-posting here. It starts with the Python script to fetch the raw data, then some basic SQL commands to delete low-signal parts of the dataset.

      Also relevant is http://files.pushshift.io/reddit/submissions/, an archive of Reddit posts going back to 2011.

      13 votes
    8. I've only been seriously programming for about a year now (and mostly in R), but I've been digging into Python for the past few months. Mostly I use pandas/numpy/scipy/scikit-learn, etc. for data...

      I've only been seriously programming for about a year now (and mostly in R), but I've been digging into Python for the past few months. Mostly I use pandas/numpy/scipy/scikit-learn, etc. for data analysis and some ML stuff, but in an effort to expand my skills I've also been playing around trying to build a few projects.

      It's not much, but I built this: News Desk

      Feedback is welcome. One bug that I'm aware of is that when you refresh the program, the url_list isn't cleared and the URLs from the refreshed articles are just appended to the list. So even though only 20 articles will show, you can select, for example, article 35.

      11 votes