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 dgl | |
| from dgl import DGLGraph | |
| import torch | |
| from dgl import DropEdge | |
| def drop_edges_in_blocks(blocks, drop_prob=0.2): | |
| new_blocks = [] | |
| for block in blocks: | |
| kept_edges = {} |
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
| <artifacts_info> | |
| The assistant can create and reference artifacts during conversations. Artifacts are for substantial, self-contained content that users might modify or reuse, displayed in a separate UI window for clarity. | |
| # Good artifacts are... | |
| - Substantial content (>15 lines) | |
| - Content that the user is likely to modify, iterate on, or take ownership of | |
| - Self-contained, complex content that can be understood on its own, without context from the conversation | |
| - Content intended for eventual use outside the conversation (e.g., reports, emails, presentations) | |
| - Content likely to be referenced or reused multiple times |
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
| ###### Java | |
| export JAVA_HOME=$(/usr/libexec/java_home) | |
| export PATH=/Users/plin/Opt/apache-maven-3.5.2/bin:$PATH | |
| export JAVA_HOME=`/usr/libexec/java_home -v 1.8` | |
| alias j8="export JAVA_HOME=`/usr/libexec/java_home -v 1.8`; java -version" | |
| alias j10="export JAVA_HOME=`/usr/libexec/java_home -v 10`; java -version" | |
| ###### Scala |
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
| ### .latexmkrc starts | |
| # $pdf_previewer = 'open -a Skim'; | |
| # $pdflatex = "xelatex -synctex=1 -interaction=nonstopmode"; | |
| $pdf_mode = 1; | |
| $preview_continuous_mode = 1; | |
| $pdf_update_method = 0; | |
| $clean_ext = "synctex.gz acn acr alg aux bbl bcf blg brf fdb_latexmk glg glo gls idx ilg ind ist lof log lot out run.xml toc dvi"; | |
| # @generated_exts = (@generated_exts, 'synctex.gz'); |
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
| rsync -chavzP --stats /path/to/source /path/to/target |
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
| $pdf_previewer = "open -a Skim" | |
| http://mg.readthedocs.io/latexmk.html |
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
| ((latex-mode | |
| (TeX-master . "paper"))) |
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
| ## Wget Example | |
| Download *.jpg files from https://example.com/XXX/YYY and its subdirectories to | |
| the current directory, with USERNAME and PASSWORD if required. | |
| ```bash | |
| $ wget -r -A .jpg -nd -np -c --user=USERNAME --password=PASSWORD https://example.com/XXX/YYY | |
| ``` | |
| "-r", recursive. Download recursively to search subdirectories. |
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
| [alias] | |
| co = checkout | |
| br = branch | |
| ci = commit | |
| st = status | |
| df = diff | |
| # Show verbose output about tags, branches or remotes | |
| tags = tag -l | |
| brs = branch -a | |
| remotes = remote -v |
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
| export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
| export CLICOLOR=1 | |
| export LSCOLORS=ExFxBxDxCxegedabagacad | |
| alias ls='ls -GF' | |
| alias ll='ls -GFl' | |
| alias lh='ls -GFlh' |
NewerOlder