Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| def foo(): | |
| a = 1 | |
| def bar(): | |
| a += 1 | |
| return a | |
| return bar |
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
| class KubernetesHelm < Formula | |
| desc "The Kubernetes package manager" | |
| homepage "https://helm.sh/" | |
| url "https://github.com/kubernetes/helm.git", | |
| :tag => "v2.9.1", | |
| :revision => "20adb27c7c5868466912eebdf6664e7390ebe710" | |
| head "https://github.com/kubernetes/helm.git" | |
| bottle do | |
| cellar :any_skip_relocation |
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
| In [5]: --------------------------------------------------------------------------- | |
| timeout Traceback (most recent call last) | |
| /usr/local/lib/python2.7/site-packages/thriftpy_cli/cmd.pyc in <module>() | |
| ----> 1 client.sync_user_data([calc_thrift.User(pass_id=12345678, phone='17600396522')]) | |
| /usr/local/lib/python2.7/site-packages/thriftpy/thrift.pyc in _req(self, _api, *args, **kwargs) | |
| 196 # wait result only if non-oneway | |
| 197 if not getattr(result_cls, "oneway"): | |
| --> 198 return self._recv(_api) | |
| 199 |
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 replaceAllLink() { | |
| var ruleMap = new Map( | |
| [ | |
| ["link.zhihu.com/?target=", [ | |
| "http://link.zhihu.com/?target=", | |
| "https://link.zhihu.com/?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
| package main | |
| import ( | |
| "context" | |
| "fmt" | |
| "time" | |
| "eleme/nex/db" | |
| "eleme/nex/log" | |
| "eleme/nex/utils" |
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
| package main | |
| type S struct { | |
| Inner int | |
| } | |
| func main() { | |
| foo() | |
| } |
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
| def is_surrogate(string): | |
| for index, char in enumerate(string): | |
| if 0xD800 <= ord(char) <= 0xDBFF: | |
| try: | |
| next_char = string[index + 1] | |
| except IndexError: | |
| pass | |
| if 0xDC00 <= ord(next_char) <= 0xDFFF: | |
| return True | |
| else: |
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
| class Monomorphic(object): | |
| def __init__(self, name): | |
| self.name = name | |
| def __repr__(self): | |
| return super(Monomorphic, self).__repr__() | |
| def apply_sub(self): | |
| pass |
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
| # vim:ft=zsh ts=2 sw=2 sts=2 | |
| # | |
| # agnoster's Theme - https://gist.github.com/3712874 | |
| # A Powerline-inspired theme for ZSH | |
| # | |
| # # README | |
| # | |
| # In order for this theme to render correctly, you will need a | |
| # [Powerline-patched font](https://gist.github.com/1595572). | |
| # |