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
from functools import partial | |
from urllib.parse import ( | |
quote, | |
urlencode, | |
) | |
from PyQt5.QtNetwork import QNetworkRequest | |
from picard import config, log | |
from picard.metadata import register_track_metadata_processor |
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 datetime | |
import csv | |
import requests | |
from bs4 import BeautifulSoup | |
zendesk = "https://[endpoint].zendesk.com" | |
language = "en-us" |
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
git branch -a | grep -v HEAD | perl -ne 'chomp($_); s|^\*?\s*||; if (m|(.+)/(.+)| && not $d{$2}) {print qq(git branch --track $2 $1/$2\n)} else {$d{$_}=1}' | csh -xfs |
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
docker ps --format='{{.Names}}' | xargs -P0 -d '\n' -n1 sh -c 'docker logs "$1" --follow | sed "s/^/$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
LAST_REPO="" | |
cd() { builtin cd "$@" git rev-parse 2>/dev/null | |
if [ $? -eq 0 ]; then | |
if [ "$LAST_REPO" != $(basename $(git rev-parse --show-toplevel)) ]; then | |
onefetch | |
LAST_REPO=$(basename $(git rev-parse --show-toplevel)) | |
fi | |
fi | |
} |
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
{ | |
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
"blocks": [ | |
{ | |
"alignment": "right", | |
"segments": [ | |
{ | |
"background": "#292929", | |
"foreground": "#fb7e14", | |
"leading_diamond": "\ue0b6", |
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 bpy | |
selection = bpy.context.selected_objects | |
for o in selection: | |
try: | |
bpy.context.view_layer.objects.active = o | |
bpy.ops.mesh.customdata_custom_splitnormals_clear() | |
except: | |
print("Object has no custom split normals: " + o.name + ", skipping") |
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 bpy | |
depsgraph = bpy.context.evaluated_depsgraph_get() | |
object = bpy.data.objects['Source'] # Object that has the hair simulation | |
taper = bpy.data.objects['Taper'] # Curve each generated curve object should use as a taper | |
particles_coll = bpy.data.collections.new(name="particles") | |
bpy.context.scene.collection.children.link(particles_coll) | |
start_frame = bpy.context.scene.frame_start | |
end_frame = bpy.context.scene.frame_end | |
for frame in range(start_frame, end_frame + 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
var regBlock = /^[0-9]+\n(.+\n)+/gm; //Use /^\n(.+\n)+/gm if there are no leading sequence numbers | |
var regText = /^[0-9]+\n(.+\n)/gm; //Use /^\n(.+\n)/gm if there are no leading sequence numbers | |
var regTime = /[0-9:]{2}:[0-9]{2}:[0-9]{2},[0-9]{3} --> [0-9:]{2}:[0-9]{2}:[0-9]{2},[0-9]{3}/gm; | |
var result; | |
final = []; | |
while((result = regBlock.exec(text)) !== null) { | |
while((resultTime = regTime.exec(result[0])) !== null) { | |
start = resultTime[0].split(" --> ")[0]; | |
end = resultTime[0].split(" --> ")[1]; |