This file contains hidden or 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 pya | |
| class AreaCalculator(pya.QDialog): | |
| """ | |
| This class implements a dialog for calculating area of shapes | |
| in a layout. The calculator adds up shapes in the currently | |
| selected cell and below. | |
| """ | |
| def button_clicked(self, checked): |
This file contains hidden or 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
| // Place your key bindings in this file to override the defaults | |
| [ | |
| { "key": "ctrl+`", "command": "workbench.action.focusActiveEditorGroup", "when": "terminalFocus" }, | |
| { "key": "ctrl+`", "command": "workbench.action.terminal.focus", "when": "!terminalFocus" }, | |
| ] |
This file contains hidden or 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
| %YAML 1.2 | |
| --- | |
| # JEOL jdf & sdf file syntax highlight for sublime | |
| # WTJ, 20180316 | |
| # See http://www.sublimetext.com/docs/3/syntax.html | |
| file_extensions: | |
| - jdf | |
| - sdf | |
| scope: source.example-c |
This file contains hidden or 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
| function rpn | |
| % simple rpn (Reverse Polish notation) calculator | |
| % | |
| % WTJ | |
| % 20180113 | |
| fprintf(['Reverse Polish notation calculator. Type h or help to see available functions.'... | |
| '\n\tWentao Jiang, 20180113\n']); | |
| stack = NaN(10000); | |
| ind = 1; |
This file contains hidden or 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
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Thu Jan 4 20:02:31 2018 | |
| @author: linqs-wentao | |
| """ | |
| class fiberpull: | |
| def __init__(self, ctrlraddr, d0_fiber=2, d_fiber=1, t_heat=10): |
This file contains hidden or 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
| cpp-5 : Depends: gcc-5-base (= 5.4.1-2ubuntu1~14.04) but 5.4.0-6ubuntu1~16.04.4 is installed | |
| gcc-5 : Depends: gcc-5-base (= 5.4.1-2ubuntu1~14.04) but 5.4.0-6ubuntu1~16.04.4 is installed | |
| gcc-5-multilib : Depends: gcc-5-base (= 5.4.1-2ubuntu1~14.04) but 5.4.0-6ubuntu1~16.04.4 is installed | |
| lib32asan2 : Depends: gcc-5-base (= 5.4.1-2ubuntu1~14.04) but 5.4.0-6ubuntu1~16.04.4 is installed | |
| lib32gcc-5-dev : Depends: gcc-5-base (= 5.4.1-2ubuntu1~14.04) but 5.4.0-6ubuntu1~16.04.4 is installed | |
| lib32mpx0 : Depends: gcc-5-base (= 5.4.1-2ubuntu1~14.04) but 5.4.0-6ubuntu1~16.04.4 is installed | |
| libasan2 : Depends: gcc-5-base (= 5.4.1-2ubuntu1~14.04) but 5.4.0-6ubuntu1~16.04.4 is installed | |
| libgcc-5-dev : Depends: gcc-5-base (= 5.4.1-2ubuntu1~14.04) but 5.4.0-6ubuntu1~16.04.4 is installed | |
| libmpx0 : Depends: gcc-5-base (= 5.4.1-2ubuntu1~14.04) but 5.4.0-6ubuntu1~16.04.4 is installed | |
| libx32asan2 : Depends: gcc-5-base (= 5.4.1-2ubuntu1~14.04) but 5.4.0-6ubuntu1~16.04.4 is installed |
This file contains hidden or 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, time | |
| class InsertDatetimeCommand(sublime_plugin.TextCommand): | |
| def run(self, edit): | |
| sel = self.view.sel() | |
| for s in sel: | |
| # self.view.replace(edit, s, time.ctime()) | |
| self.view.replace(edit, s, time.strftime('D%Y%m%dT%H%M')) | |
This file contains hidden or 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
| { | |
| "cmd": ["dot", "-Tsvg", "-O", "$file"], | |
| // "cmd": ["dot", "-Tpng", "-O", "$file"], | |
| // "cmd": ["dot", "-Tpdf", "-O", "$file"], | |
| "file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)", | |
| "selector": "source.python" | |
| } |
This file contains hidden or 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
| %% | |
| %% By Jacob ([email protected]) | |
| % Department of Physics, THU | |
| % First edited January 1, 2016 | |
| % | |
| % | |
| %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
| %%%%frequently used head template: |
NewerOlder