Search
new [^\(](null, ([^,]+), ("[^"]+").?(?:\r)
Replace
[$2] = $0z
Against
def count_upper_words(str): | |
words = str.split(' '); | |
print('\n\n---- %s ----' % str) | |
return sum([word.isupper() for word in words]) | |
print(count_upper_words('Fast')) | |
print(count_upper_words('SLOW')) | |
print(count_upper_words('first MIDDLE Last')) |
def capital_chars(word): | |
return [c.isupper() for c in word] | |
def analyze(str): | |
has_words = ' ' in str | |
if has_words: | |
words = str.split(' '); | |
for word in words: |
import os | |
from os import path | |
def import_settings(file_path): | |
with open(file_path) as gcode_file: | |
all_lines = gcode_file.readlines() | |
# Filter to comments with equals | |
comments = [comment for comment in all_lines if comment.startswith('; ') and len(comment.split('=')) == 2] |
import os | |
from os import path | |
def import_settings(file_path): | |
with open(file_path) as gcode_file: | |
all_lines = gcode_file.readlines() | |
# Filter to comments with equals | |
comments = [comment for comment in all_lines if comment.startswith('; ') and len(comment.split('=')) == 2] |
// https://octicons.github.com/ | |
jQuery('.js-icon-item').each(function(f) { | |
var el = $(this); | |
el.attr('title', el.attr('data-name').replace('octicon-', '')); | |
}); | |
Search
new [^\(](null, ([^,]+), ("[^"]+").?(?:\r)
Replace
[$2] = $0z
Against
docker run -it ubuntu | |
apt install wget | |
apt install zip | |
# perform the download - stackoverflow:https://stackoverflow.com/questions/23446635/ | |
wget -r -np -nH --cut-dirs=3 -R index.html https://dev.w3.org/SVG/tools/svgweb/samples/svg-files/ | |
# zip the content | |
cd /samples/svg-files | |
zip -r svg.zip . |
string filePath = Path.Combine(path, mode + ".json"); | |
var theme = JsonConvert.DeserializeObject<ThemeSet>( | |
File.ReadAllText(filePath); | |
if (theme.AccentColors == null || theme.AccentColors.Count <= 0) | |
{ | |
theme.AccentColors = this.Colors; | |
File.WriteAllText( | |
filePath, |
foreach(var mode in item.Value.Modes) | |
{ | |
string directory = $@"c:\temp\themes\{item.Key}"; | |
Directory.CreateDirectory(directory); | |
var theme = item.Value.GetTheme(mode, item.Value.DefaultColor); | |
theme.ThemeName = $"{item.Key} {mode}"; | |
File.WriteAllText( | |
Path.Combine(directory, $"{item.Key}-{mode}.json"), |
var xxx = new Dictionary<string, Color>() | |
{ | |
{ "Red - Dark", new Color(172, 25, 61) }, | |
{ "Pink - Dark", new Color(220, 79, 173) }, | |
{ "Orange - Dark", new Color(255, 129, 25) }, | |
{ "Green - Dark", new Color(0, 138, 23) }, | |
{ "Blue - Dark", new Color(0, 75, 139) }, | |
{ "Teal - Dark", new Color(0, 130, 153) }, | |
{ "Light Blue - Dark", new Color(93, 178, 255) }, | |
{ "Purple - Dark", new Color(70, 23, 180) }, |