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
Show hidden characters
[ | |
{ | |
"args": { | |
"token_type": "char", | |
"cmd" : "toggle" | |
}, | |
"command": "volcanise", | |
"context": [], | |
"keys": [ | |
"ctrl+," |
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 sublime, sublime_plugin | |
#add a keybinding for deselect set to enter | |
class DeselectCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
end = self.view.sel()[0].b | |
pt = sublime.Region(end, end) | |
self.view.sel().clear() | |
self.view.sel().add(pt) |
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 sublime, sublime_plugin, os, re | |
class FileNameComplete(sublime_plugin.EventListener): | |
def on_query_completions(self, view, prefix, locations): | |
completions = [] | |
sel = view.sel()[0].a | |
if "string" in view.syntax_name(sel): | |
pass |
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 sublime, sublime_plugin, re | |
class ClozeDeletionCommand(sublime_plugin.WindowCommand): | |
def run(self): | |
self.window.show_input_panel("Cloze Deletion", "", self.on_done, self.on_change, self.on_cancel) | |
def on_change(self, inp): | |
view = self.window.active_view() | |
sel = view.sel()[0]; |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Refresh</string> | |
<key>settings</key> | |
<array> | |
<dict> | |
<key>settings</key> |
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
Process: Sublime Text 2 [11187] | |
Path: /Applications/Sublime Text 2.app/Contents/MacOS/Sublime Text 2 | |
Identifier: com.sublimetext.2 | |
Version: Beta, Build 2199 (2199) | |
Code Type: X86-64 (Native) | |
Parent Process: launchd [151] | |
Date/Time: 2012-06-14 20:16:31.928 -0400 | |
OS Version: Mac OS X 10.7.3 (11D50b) | |
Report Version: 9 |
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
def func(s) -> str: | |
return "".join(f"!{c}"*2 for c in s)+"!" |
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
def func2() -> str: | |
b="shake" | |
g,a,c,d,o="gunna", "play", "break", "fake", f"I {b} it off" | |
def r(z): | |
return ", ".join([a]*5) | |
return f""" | |
Cause the {a}ers {g} {r(a)} | |
And the haters {r(b)} | |
Baby, I'm just {g} {r(a)} | |
{o}{o} |
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
def minimum_candidate_filter(l): | |
s=list(map(str, l)) | |
return [c for c in l if s==s[::-1] and c**(.5)%1==0] | |
print(minimum_candidate_filter([0, 1000, 121, 676])) |
OlderNewer