This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO OFF | |
:: Run a command inside the %pyenv% conda environment and exit | |
:: Because 'conda run' is a lie | |
SET interactive=0 | |
SET pyenv=base | |
ECHO %CMDCMDLINE% | FINDSTR /L %COMSPEC% >NUL 2>&1 | |
IF %ERRORLEVEL% == 0 SET interactive=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
def binomial(n, k): | |
""" | |
A fast way to calculate binomial coefficients by Andrew Dalke. | |
See http://stackoverflow.com/questions/3025162/statistics-combinations-in-python | |
""" | |
if 0 <= k <= n: | |
ntok = 1 | |
ktok = 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import sys | |
def findJobsSection(tag): | |
return tag.name == 'section' and tag.has_attr('class') and 'job-listing' in tag['class'] | |
def parseJob(li): | |
a_tag = li.a | |
return { |