-
Install VS Build Tools using PortableBuildTools
https://github.com/Data-Oriented-House/PortableBuildTools -
for version 14.44.17.14 it creates
devcmd.bat
in thevs_BuildTools
folder- copy this
devcmd.bat
toVC\vcvarsall.bat
- in
vcvarsall.bat
create an environment variableLIBPATH
and set it to the same value asLIB
(query_vcvarsall
in distuils msvc9compiler needsLIBPATH
in addition toLIB
)
- copy this
-
set
VS140COMNTOOLS
to thevs_BuildTools\VC\Tools
folder
(this makes surevcvarsall.bat
is being found by distutils)
This file contains hidden or 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
import holidays | |
import numpy as np | |
import pandas as pd | |
start = '2025-04-30' | |
end = '2025-05-06' | |
# holidays (end date is included) | |
h = holidays.country_holidays('DE', subdiv='SN') | |
print(h.get_working_days_count(start, end)- h.is_working_day(end)) |
This file contains hidden or 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
def make_colormap_from_mpl(cm): | |
"""Create look-up table to convert grayscale to BGR-image. | |
The returned colormap can be used like | |
bgr_img = colormap[gray_img] | |
Args: | |
cm: Matplotlib colormap name, e.g. "autumn" or | |
colormap instance e.g. mpl.cm.autumn |
It's not possible to configure the export function of vscode-jupyter
by extra command line arguments
passed to nbconvert
. The feature request microsoft/vscode-jupyter#13918 was declined.
A workaround is to specify additional arguments
in a configuration file jupyter_nbconvert_config.py
in the .jupyter
folder (its location can be shown by
python.exe -m jupyter --path
).
Contents of jupyter_nbconvert_config.py
to hide prompts (equivalent to --no-prompt
):
c = get_config()
This file contains hidden or 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
import numpy as np | |
import scipy | |
def feltz_miller(*samples): | |
k = len(samples) | |
m_j = np.array([len(sample) - 1 for sample in samples]) | |
cv_j = np.array([np.std(sample, ddof=1) / np.mean(sample) for sample in samples]) | |
d = np.sum(m_j * cv_j) / np.sum(m_j) |
This file contains hidden or 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
import locale | |
import platform | |
import matplotlib as mpl | |
import matplotlib.pyplot as plt | |
import numpy as np | |
dates = np.arange(np.datetime64('2022-12-01'), np.datetime64('2022-12-02'), np.timedelta64(1, 'h')) | |
values = np.zeros_like(dates, dtype=int) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
import tkinter as tk | |
import tkinter.font | |
root = tk.Tk() | |
print('Standard fonts:') | |
for name in sorted(tk.font.names()): | |
config = tk.font.Font(name=name, exists=True).config() | |
print(f"{name:20.20}: {config['family']} {config['size']} {config['weight']}") |
This file contains hidden or 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
val scripts = listOf( | |
""" | |
if (1 != 0) { | |
document.writeln('valid'); | |
}else{ | |
document.writeln('invalid'); }; | |
</script>""", | |
""" | |
if (0 != 0) { |
This file contains hidden or 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
import numpy as np | |
import perfplot | |
import matplotlib.pyplot as plt | |
plt.figure(figsize=(10,6)) | |
xy = [51,52] | |
maxint = 10 | |
def setup(n): |
NewerOlder