Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

gusibi gusibi

🎯
Focusing
Block or report user

Report or block gusibi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View skipLinkedList.go
package main
import (
"fmt"
"math"
"math/rand"
// "time"
)
/*
View package_and_deploy_lambda_function.sh
#!/bin/bash
# expects the lambda function .py file to be in the same directory as this script.
# based off of Amazon's official documentation:
# http://docs.aws.amazon.com/lambda/latest/dg/with-s3-example-deployment-pkg.html#with-s3-example-deployment-pkg-python
# get the lambda function
lambda_func_file=$1
lambda_func="${lambda_func_file%.*}"
# exit if no file specified
[[ -z "$1" ]] && { echo "Lambda function is empty" ; exit 1; }
# generate a deployment timestamp
@gusibi
gusibi / python-design-patter-command.py
Last active Jan 9, 2018
python设计模式-命令模式
View python-design-patter-command.py
#! -*- coding: utf-8 -*-
"""
命令模式
"""
class Command(object):
def execute(self):
@gusibi
gusibi / python-design-patter-command.py
Created Jan 9, 2018
python设计模式-命令模式
View python-design-patter-command.py
#! -*- coding: utf-8 -*-
"""
命令模式
"""
class Command(object):
def execute(self):
@gusibi
gusibi / python-design-patter-builder.py
Created Nov 12, 2017
add python-design-patter-builder
View python-design-patter-builder.py
#! -*- coding: utf-8 -*-
"""
建造者模式
"""
import time
STEP_DELAY = 0.1
@gusibi
gusibi / python-design-patter-abstract-factory.py
Last active Oct 28, 2017
python设计模式-抽象工厂模式
View python-design-patter-abstract-factory.py
#! -*- coding: utf-8 -*-
"""
抽象工厂模式
"""
# 原料
class FreshClams:
@gusibi
gusibi / python-design-patter-factory-method.py
Created Oct 28, 2017
python 设计模式-工厂方法模式
View python-design-patter-factory-method.py
#! -*- coding: utf-8 -*-
"""
工厂方法模式
"""
class Pizza:
name = None
@gusibi
gusibi / python-design-patter-observer.py
Last active Dec 11, 2019
python-design-patter-observer.py
View python-design-patter-observer.py
#! -*- coding: utf-8 -*-
import itertools
'''
观察者模式实现
'''
class Publisher:
You can’t perform that action at this time.