python -m cProfile -o skorch.prof skorch_bm.pyInstall and run snackviz
pip install snakeviz
snackviz skorch.prof
| # number of optimized prices | |
| num = 15 | |
| price_per_ride = 250 #cents | |
| percentage = 5 | |
| min_price = 500 #cent | |
| incease_percent = (100+percentage)/100.0 | |
| new_price_per_ride = price_per_ride/incease_percent | |
| # Calculate lowest number of rides to satisfy low price |
| #!/usr/bin/env python | |
| import os | |
| import argparse | |
| from datetime import datetime | |
| from calendar import month_name as months | |
| import shutil | |
| EXTENSIONS = ['.jpg', '.png', '.mov', '.mp4', '.tif', '.jpeg', '.raw'] | |
| OUTPUT_TEMPLATE = '/{year}/{year} - {month} - {month_name}' |
| CXX = g++ | |
| CXXFLAGS=-g -O2 -Wall -Wconversion | |
| SOURCES=$(wildcard src/**/*.cpp src/*.cpp) | |
| OBJECTS=$(patsubst src/%.cpp,bin/%.o,$(SOURCES)) | |
| EXECUT=build/test.exe | |
| MAIN=src/main.cpp | |
| LIB_SOURCES=$(filter-out $(MAIN), $(SOURCES)) |
| #!/usr/local/bin/python3 | |
| import argparse | |
| import re | |
| import subprocess | |
| def is_valid_link(link): | |
| match = re.compile(r"^https?://.+") | |
| link_match = match.findall(link) | |
| if link_match: |
| import matplotlib.pyplot as plt | |
| from numpy import exp, cos, pi, linspace | |
| from scipy.optimize import minimize | |
| eta = 0.5 | |
| omega = 2 * pi | |
| def damped_os(t): | |
| return exp(-eta * t) * cos(omega * t) |
| // Takes into account of multiple matching substrings and returns an array of String.Indexes | |
| extension String { | |
| func findIndexOf(subString: String) -> [String.Index]?{ | |
| let selfLength = countElements(self) | |
| let subStringLength = countElements(subString) | |
| if subStringLength == 0 || selfLength == 0 || selfLength < subStringLength { | |
| return nil |
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| import hashlib | |
| import subprocess | |
| import shutil | |
| from pathlib import Path | |
| def main(): |
| set -g base-index 1 | |
| setw -g pane-base-index 1 | |
| unbind x | |
| bind x kill-pane | |
| bind X kill-session | |
| set -g prefix C-a | |
| unbind C-b | |
| unbind-key j | |
| bind-key j select-pane -D | |
| unbind-key k |
| { | |
| "global": { | |
| "check_for_updates_on_startup": true, | |
| "show_in_menu_bar": true, | |
| "show_profile_name_in_menu_bar": false | |
| }, | |
| "profiles": [ | |
| { | |
| "complex_modifications": { | |
| "parameters": { |
python -m cProfile -o skorch.prof skorch_bm.pyInstall and run snackviz
pip install snakeviz
snackviz skorch.prof