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
"""Fixes issue where Poetry ignores environment markers when using local path. | |
See https://github.com/python-poetry/poetry/issues/2765 | |
Usage: | |
$ poetry lock | |
$ python add_markers.py | |
""" | |
from __future__ import annotations |
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
# In IPython, you can change the current working directory using | |
# %cd /path/to/some/directory/ | |
import os | |
from pathlib import Path | |
# Directory containing folders you want to rename | |
here = Path(".") # "." means "the current directory" | |
# Loop through all the folders & files in this directory |
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 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 os | |
import subprocess | |
from pathlib import Path | |
path = Path("/Users/john/.virtualenvs") | |
list_subfolders_with_paths = [f.path for f in os.scandir(path) if f.is_dir()] | |
for folder in list_subfolders_with_paths: | |
virtualenv_name = folder.split("/")[-1] | |
print(f"🛠 Fixing {virtualenv_name}") | |
subprocess.run(["find", folder, "-type", "l", "-delete"]) |
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
<!DOCTYPE html>\n<html>\n<head>\n<title>\nNewspeak House\n-\nFellows and alumni\n\n</title>\n<link href=\'https://www.nwspk.com/fellowship\' rel=\'canonical\'>\n<link href=\'https://nwspk.com/humans.txt\' rel=\'author\' type=\'text/plain\'>\n<link rel="stylesheet" media="all" href="/assets/application-2390809e15d062726101ae7185d9c1b88caedf50ff88269f3c02abafca3ae4df.css" />\n<script src="/assets/application-88ed0f161404425e15bd21a8b0c950e249fb364b8edc7a799a11e01c6faa28c7.js"></script>\n<meta name="csrf-param" content="authenticity_token" />\n<meta name="csrf-token" content="iO2GG6DKdUB76QlntL8z+65lbP/DsUwAqf5fiL++L9kMRwrSQcn84wIs5C2DXAeBBYOcaJJ5P77C7HvEqt9dIA==" />\n<meta content=\'width=device-width, initial-scale=1\' name=\'viewport\'>\n\n</head>\n<body>\n<div class=\'logo\'>\n<a href="https://nwspk.com/">NEWSPEAK HOUSE</a>\n</div>\n<section class=\'page\'>\n<a class="back-link" href="/"><i class="fa fa-angle-double-left"></i></a>\n<div class=\'wrap\'>\n<h2>Newspeak House Fellowship</h2>\n<p class=\'fellowsh |
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
# If you come from bash you might have to change your $PATH. | |
export PATH=$HOME/bin:/usr/local/bin:$PATH | |
# Path to your oh-my-zsh installation. | |
export ZSH="/Users/john/.oh-my-zsh" | |
# Set name of the theme to load --- if set to "random", it will | |
# load a random theme each time oh-my-zsh is loaded, in which case, | |
# to know which specific one was loaded, run: echo $RANDOM_THEME | |
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes |
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 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
# Posted on StackOverflow: http://stackoverflow.com/questions/31010713/combining-dplyrmutate-with-lubridateymd-hms-in-r-randomly-causes-segfault | |
#!/usr/bin/env R | |
# -*- encoding:utf-8 -*- | |
require(lubridate) | |
require(dplyr) | |
set.seed(42) | |
make_some_random_datetimes = function(n) ymd("2015-01-01") + seconds(runif(n, min=0, max=60*60*24*365)) |