Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def foo():
a = 1
def bar():
a += 1
return a
return bar
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
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
function replaceAllLink() {
var ruleMap = new Map(
[
["link.zhihu.com/?target=", [
"http://link.zhihu.com/?target=",
"https://link.zhihu.com/?target="
]]
]
)
package main
import (
"context"
"fmt"
"time"
"eleme/nex/db"
"eleme/nex/log"
"eleme/nex/utils"
package main
type S struct {
Inner int
}
func main() {
foo()
}
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:
@ethe
ethe / type.py
Created December 12, 2016 08:14
class Monomorphic(object):
def __init__(self, name):
self.name = name
def __repr__(self):
return super(Monomorphic, self).__repr__()
def apply_sub(self):
pass
# 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).
#