Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
TLJH Managing GPU visibility ( CUDAVISIBLEDEVICES )



Hello everyone,

I just joined this community, and this is my first message here. I am a second-year student studying SE in Serbia. I've set up JupyterHub from my Ubuntu server, which runs on 8GPUS. I am looking to restrict and manage GPU resources for the users of JupyterHub.Some schemes would look like this:

\-Admin

|- user1: 2 usable GPUs

|- user2: 3 usable GPUs

|- user3: 4 usable GPUs

|- user4: 1 usable GPU

I looked through documentation from links( such as:

\-https://medium.com/rapids-ai/setting-up-gpu-data-science-environments-for-hackathons-cdb52e7781a5

\-https://developer.nvidia.com/blog/cuda-pro-tip-control-gpu-visibility-cuda\_visible\_devices/

\-https://tljh.jupyter.org/en/latest/topic/tljh-config.html

Trust me, my first three pages of google are purple :D ), and I could not find the particular thing that is suitable for me and working. This is what I have so far, and with sudo tljh-config show:


users:
admin:
- skynet
allowed:
- good-user1
- marko
limits:
memory: 4G
marko:
CUDA
VISIBLEDEVICES: 0,1,2
https:
enabled: true
user
environment:


/r/IPython
https://redd.it/xk3bm5
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!

Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!

This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.

/r/Python
https://redd.it/xkldrj
Add custom entries to the JupyterLab launcher with jupyterapplauncher

Hi all, I want to present my new JupyterLab extension jupyter_app_launcher (https://github.com/trungleduc/jupyter\_app\_launcher). It is used to customize the JupyterLab launcher with a simple YAML file.

​

https://reddit.com/link/xke81n/video/rd8ukezni9p91/player

Users can add custom entries to the launcher to:

Open a predefined notebook or markdown file.
Render a notebook in dashboard mode
Open a notebook with Voila
Local/remote services like Plotly Dash or Streamlit

A live demo is available at https://mybinder.org/v2/gh/trungleduc/jupyter\_app\_launcher/main?urlpath=lab

Documentation: https://jupyter-app-launcher.readthedocs.io/

/r/JupyterNotebooks
https://redd.it/xke81n
Add custom entries to the JupyterLab launcher with jupyterapplauncher

Hi all, I want to present my new JupyterLab extension jupyter_app_launcher (https://github.com/trungleduc/jupyter\_app\_launcher). It is used to customize the JupyterLab launcher with a simple YAML file.

https://reddit.com/link/xke6q4/video/myekrzjfi9p91/player

Users can add custom entries to the launcher to:

Open a predefined notebook or markdown file.
Render a notebook in dashboard mode
Open a notebook with Voila
Local/remote services like Plotly Dash or Streamlit

A live demo is available at https://mybinder.org/v2/gh/trungleduc/jupyter\_app\_launcher/main?urlpath=lab

Documentation: https://jupyter-app-launcher.readthedocs.io/

/r/JupyterNotebooks
https://redd.it/xke6q4
OpenAI's Whisper: an open-sourced neural net "that approaches human level robustness and accuracy on English speech recognition." Can be used as a Python package or from the command line
https://openai.com/blog/whisper/

/r/Python
https://redd.it/xkwt34
TLJH GPU management

Hello everyone,

I just joined this community, and this is my first message here. I am a second-year student studying SE in Serbia. I've set up JupyterHub from my Ubuntu server, which runs on 8GPUS. I am looking to restrict and manage GPU resources for the users of JupyterHub.Some schemes would look like this:

\-Admin

|- user1: 2 usable GPUs

|- user2: 3 usable GPUs

|- user3: 4 usable GPUs

|- user4: 1 usable GPU

​

I looked through documentation from links( such as:

\-[https://medium.com/rapids-ai/setting-up-gpu-data-science-environments-for-hackathons-cdb52e7781a5](https://medium.com/rapids-ai/setting-up-gpu-data-science-environments-for-hackathons-cdb52e7781a5)

\-[https://developer.nvidia.com/blog/cuda-pro-tip-control-gpu-visibility-cuda\_visible\_devices/](https://developer.nvidia.com/blog/cuda-pro-tip-control-gpu-visibility-cuda_visible_devices/)

\-[https://tljh.jupyter.org/en/latest/topic/tljh-config.html](https://tljh.jupyter.org/en/latest/topic/tljh-config.html)

Trust me, my first three pages of google are purple :D ), and I could not find the particular thing that is suitable for me and working. This is what I have so far, and with sudo tljh-config show:

users:
admin:
- skynet
allowed:
- good-user_1
- marko
limits:
memory: 4G
marko:
CUDA_VISIBLE_DEVICES: 0,1,2
https:
enabled: true
user_environment:
default_app: jupyterhub


/r/JupyterNotebooks
https://redd.it/xk34ub
This media is not supported in your browser
VIEW IN TELEGRAM
I made a small demo app for creating an image slider using JSONField

https://redd.it/xl1aps
@pythondaily
Django ADFS Question

Hello my application uses Django ADFS using Azure AD. It works as it should be I cannot seem to figure out how to get the users role from Azure or the package. Was wondering if anyone knew how to print out the users role as there is two groups users and admins

/r/django
https://redd.it/xlx8n6
Seeking professional data scientists for research study - 30 min virtual interview, compensation provided

Hello! My name is Aayushi Roy, I’m part of a research team at the University of Maryland studying how data scientists collaborate. We’re looking for professional data scientists to participate in a research interview study about how data scientists work together to perform data analysis (flyer).

Participants will be asked a set of questions regarding their collaborative environment and what tools they use to perform data analysis. The study will take about 30 minutes to complete and will be held over Zoom. Upon successful completion of the interview, participants will receive $20 in compensation.

Responses will be anonymized. This study has been approved by the Institutional Review Board at the University of Maryland, College Park.

To be eligible, you must:
- Be at least 18 years old
- Work with data and perform data science work as part of your job description
- Use computational notebooks
- Have experience in data science tools/workflows

Participation will entail:
- Completing a pre-study demographics questionnaire (5 minutes)
- Answering interview questions about your collaborative environment and the tools you use (30 min)

If you are or someone you know is interested, please DM me or email me at aroy2530@umd.edu. Thank you for your time and consideration!

/r/JupyterNotebooks
https://redd.it/xm1mku
I wrote my first real scripts today

I’m a water resource engineer by trade, learning to code partially for fun and partially in the hopes of making my job easier. Today I needed to convert a whole bunch of files from one format to another, edit some particular values in the header, and convert to a third format. Rather than spend all day doing it by hand, I spent all day writing a script that does it in seconds…and it works!

It’s a piddling little script, only about 50 lines, but it does exactly what I want it to do, and now in the future when I have to deal with this process again, I’ll be armed and ready.

I know this is nothing revolutionary, but honestly it feels pretty good to write working code to address a real life problem! Hopefully the next one goes a bit faster…

/r/Python
https://redd.it/xlgo4a
Brainfried: A Brainfuck to Assembly Compiler

A while back I worked on a project called Brainfried which takes Brainfuck source code and compiles it to Intel x86 64 assembly which then gets compiled using nasm. Because Brainfried compiles to assembly unlike a lot of other Brainfuck programs which interpret the code. Brainfried runs a lot faster.

Right now, because the generated assembly works of syscalls. It can only be used with Linux

/r/Python
https://redd.it/xm8n2h
How can I use crispy-forms with bootstrap-select?

I want to replace the crispy-forms default bootstrap select with the bootstrap-select (https://developer.snapappointments.com/bootstrap-select/)

​

It's like I'm fighting an uphill battle. I tried adding the "selectpicker" class to the widget but then the bootstrap-select appears INSIDE a normal bootstrap select. Then I tried defining my own field element for crispy-forms but now the bootstrap-select is not aligned with the rest of the form, it's missing the little required star, etc....

​

Is there an easy way to do this?

​

My form (I want the State to be a selectpicker):

class AddressForm(forms.Form):
email = forms.CharField(widget=forms.TextInput(attrs={"placeholder": "email"}))
password = forms.CharField(widget=forms.PasswordInput())
address1 = forms.CharField(
label="Address", widget=forms.TextInput(attrs={"placeholder": "1234 Main St"})
)
address
2 = forms.CharField(
widget=forms.TextInput(attrs={"placeholder": "Apartment, studio, or floor"})
)
city = forms.CharField()
state = forms.ChoiceField(choices=STATES)


/r/django
https://redd.it/xm3fzx