This file contains 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 requests | |
import re | |
from bs4 import BeautifulSoup | |
import xlwt | |
def getData(temp): | |
wbk = xlwt.Workbook() | |
sheet = wbk.add_sheet('sheet 1') |
This file contains 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
{ | |
"draw_white_space": "all", | |
"font_size": 19, | |
"word_wrap": "auto", | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"tab_size": 2 | |
} |
This file contains 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
#include "rapidjson/document.h" | |
#include "rapidjson/writer.h" | |
#include <iostream> | |
#include "rapidjson/filereadstream.h" | |
#include <cstdio> | |
using namespace rapidjson; | |
int main(){ | |
FILE* fp = fopen("factory.json", "rb"); |
This file contains 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
#include <iostream> | |
#include <vector> | |
using namespace std; | |
int main() | |
{ | |
vector<int> Numvec; //定义一个整型的容器,它的类型是vector<int> | |
vector<int>::iterator Numer; //定义一个整型容器的迭代器,它的类型是vector<int>::iterator | |
int intNum; |
This file contains 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
http://askubuntu.com/questions/289559/how-can-i-create-a-windows-bootable-usb-stick-with-ubuntu |
This file contains 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
''' | |
adminreverse from here http://djangosnippets.org/snippets/2032/ | |
changed for working with ForeignKeys | |
''' | |
''' | |
reverseadmin | |
============ | |
Module that makes django admin handle OneToOneFields in a better way. | |
A common use case for one-to-one relationships is to "embed" a model | |
inside another one. For example, a Person may have multiple foreign |
This file contains 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
begin 777 portal.bin | |
M(R!796QC;VUE#0H-"B,C($ME>0T*#0I24T$@4'5B;&EC($ME>3H@*$XL(#<I | |
M#0I.(#T@,C,S("H@30T*32!I<R!T:&4@9W)E871E<W0@9F]U<BUD:6=I="!P | |
M<FEM92!T:&%T(&UA:V5S($X@96YD('=I=&@@,C,S#0H-"B,C($5N8W)Y<'1E | |
M9"!!=61I="!142!G<F]U<"!N=6UB97(-"@T*5&AE($%U9&ET(%%1(&=R;W5P | |
M(&YU;6)E<B!I<R!E;F-R>7!T960@=VET:"!T:&4@*BI24T$@4'5B;&EC($ME | |
M>2HJ+@T*#0I@8&`-"D-/3D-!5"A$14-265!4*#$Y-S,W,BDN=&]3=')I;F<H | |
M*2P@1$5#4EE05"@S,S,P-SDI+G1O4W1R:6YG*"DI#0I@8&`-"@T*(R!#05!4 | |
M0TA!#0I5<V4@=&AI<R!G:7-T(')E=FES:6]N(&`W9#(S939E.3DY-&)B-F9A | |
M93@W-&1A8C,U930V9F0W-6(Y9&0Q-6)E8"!R97-U;'0@87,@0T%05$-(02X- |
This file contains 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
# This is a skeleton for testing models including examples of validations, callbacks, | |
# scopes, instance & class methods, associations, and more. | |
# Pick and choose what you want, as all models don't NEED to be tested at this depth. | |
# | |
# I'm always eager to hear new tips & suggestions as I'm still new to testing, | |
# so if you have any, please share! | |
# | |
# @kyletcarlson | |
# | |
# This skeleton also assumes you're using the following gems: |
This file contains 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
<ul class="pagination pagination-sm no-margin pull-right"> | |
@if ($lastPage > 1) | |
@if ($currentPage > 1) | |
@for ($i = 1; $i <= $extremePagesLimit; $i++) | |
@if($i < $currentPage - $nearbyPagesLimit) | |
<li> | |
<a href="?page={{$i}}">{{$i}}</a> | |
</li> | |
@endif | |
@endfor |
This file contains 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
php_install_dir=/usr/local/php7 | |
cp php.ini-production $php_install_dir/etc/php.ini | |
Mem=`free -m | awk '/Mem:/{print $2}'` | |
if [ $Mem -gt 1024 -a $Mem -le 1500 ];then | |
Memory_limit=192 | |
elif [ $Mem -gt 1500 -a $Mem -le 3500 ];then | |
Memory_limit=256 | |
elif [ $Mem -gt 3500 -a $Mem -le 4500 ];then | |
Memory_limit=320 | |
elif [ $Mem -gt 4500 ];then |
OlderNewer