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
# -*- coding: utf-8 -*- | |
import re, urllib2, json, time | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf8') | |
file = open('server.log') | |
list = file.readlines() | |
file.close() |
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
# -*- coding: utf-8 -*- | |
import re | |
file = open('shadowsocks.log') | |
list = file.readlines() | |
file.close() | |
pattern = re.compile(r'INFO.+(\d+\.){3}\d+') |
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/python | |
# -*- coding: utf-8 -*- | |
from email import encoders | |
from email.header import Header | |
from email.mime.text import MIMEText | |
from email.utils import parseaddr, formataddr | |
import smtplib |
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
// | |
// DBBaseObject.swift | |
// DianZiCheng | |
// | |
// Created by jackyshan on 2017/5/28. | |
// Copyright © 2017年 jackyshan. All rights reserved. | |
// | |
import UIKit |
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
private var key: Void? | |
extension MAPolyline { | |
var isWalk: Bool? { | |
get { | |
return objc_getAssociatedObject(self, &key) as? Bool | |
} | |
set { | |
objc_setAssociatedObject(self, | |
&key, newValue, |
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
let interval = Observable<Int>.interval(0.6, scheduler: MainScheduler.instance) | |
let disinterval = interval.subscribe(onNext: { (time) in | |
guard time < lines.count else { | |
return | |
} | |
self.searchBusLine(lineId: lines[time].gid) | |
}) | |
let timeE:DispatchTime = DispatchTime.now() + Double(lines.count*Int(NSEC_PER_SEC)) / Double(NSEC_PER_SEC); | |
DispatchQueue.main.asyncAfter(deadline: timeE) { |
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
enum TestError: Error { | |
case errorcatch | |
} | |
var count = 1 | |
let symbol1 = Observable<String>.create { (observer) -> Disposable in | |
observer.onNext("symbol1--------test") | |
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
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_table); | |
} | |
@Override | |
protected void onStart() {//开启 | |
super.onStart(); | |
} |
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
// | |
// BusDriverFeedbackViewController.swift | |
// renttravel | |
// | |
// Created by jackyshan on 2017/3/8. | |
// Copyright © 2017年 GCI. All rights reserved. | |
// | |
import UIKit | |
import RxSwift |