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
from django.db import models | |
class Publisher(models.Model): | |
name = models.CharField(max_length=30) | |
address = models.CharField(max_length=50) | |
city = models.CharField(max_length=60) | |
state_province = models.CharField(max_length=30) | |
country = models.CharField(max_length=50) | |
website = models.URLField() |
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 urllib2 | |
import urllib | |
import datetime | |
import time | |
import re | |
import os | |
ContentID = urllib2.urlopen('http://bj.wokuan.cn/web/startenrequest.php').read() | |
ID = "".join(re.findall(r"cn=(\d*)",ContentID)) |
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/env python | |
#-*- coding: utf-8 -*- | |
import requests as rq | |
import re | |
def login(mobile, password, address): | |
s = rq.session() | |
r = s.get('http://202.106.46.37/?basname=W1-BTPZ-M6000') | |
headers = { |
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
const { Form, Card, Input, Row, Col } = antd | |
class MyForm extends React.Component { | |
render() { | |
const names = ['A', 'B', 'C', 'D', 'E', 'F'] | |
const inputCount = 20 | |
const formItemLayout = { | |
labelCol: { span: 4 }, | |
wrapperCol: { span: 20 } | |
} |
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
const { Form, Card, Input, Button, Row, Col } = antd | |
const inputCount = 20 | |
const formItemLayout = { | |
labelCol: { span: 4 }, | |
wrapperCol: { span: 20 } | |
} | |
const createDemoForm = name => { | |
return class Adapter extends React.Component { |
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
const { Form, Card, Input, Button, Row, Col, Spin } = antd | |
const inputCount = 20 | |
const formItemLayout = { | |
labelCol: { span: 4 }, | |
wrapperCol: { span: 20 } | |
} | |
const createDemoForm = name => { | |
return class Adapter extends React.Component { |
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
const wait = delay => { | |
return () => new Promise(resolve => { | |
setTimeout(() => { | |
console.log(`wait ${delay}ms`) | |
resolve() | |
}, delay) | |
}) | |
} | |
const wait200 = wait(200) |
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
const options = [ | |
{ | |
"value": "北京", | |
"label": "北京", | |
"children": [ | |
{ | |
"value": "北京", | |
"label": "北京" | |
} | |
] |