V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX  ›  tikazyq  ›  全部回复第 44 页 / 共 44 页
回复总数  876
1 ... 35  36  37  38  39  40  41  42  43  44  
2016-07-15 19:08:24 +08:00
回复了 tikazyq 创建的主题 Python 为爬虫构建代理池
@binux 自己的验证地址是指提供代理的网站吗?
2016-07-15 18:22:53 +08:00
回复了 tikazyq 创建的主题 Python 为爬虫构建代理池
@facat 多谢 这个可行的 不过怎么解决效率问题呢?而且有些代理直接指向单一网站,这种如何检测啊
2015-10-18 01:01:30 +08:00
回复了 tikazyq 创建的主题 Linux 请教 sed 替换修改 xml 文件问题
@rrfeng 那咋弄啊?
2015-10-17 18:21:48 +08:00
回复了 tikazyq 创建的主题 Linux 请教 sed 替换修改 xml 文件问题
@henryon

<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5"
metadata-complete="true"
>


<!-- Uncomment if you are trying to use a Resin version before 3.0.19.
Their XML implementation isn't entirely compatible with Xerces.
Below are the implementations to use with Sun's JVM.
<system-property javax.xml.xpath.XPathFactory=
"com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl"/>
<system-property javax.xml.parsers.DocumentBuilderFactory=
"com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl"/>
<system-property javax.xml.parsers.SAXParserFactory=
"com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"/>
-->

<!-- People who want to hardcode their "Solr Home" directly into the
WAR File can set the JNDI property here...
-->
<!--
<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>/usr/solr/server/solr</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
-->

<!-- Any path (name) registered in solrconfig.xml will be sent to that filter -->
<filter>
<filter-name>SolrRequestFilter</filter-name>
<filter-class>org.apache.solr.servlet.SolrDispatchFilter</filter-class>
<!--
Exclude patterns is a list of directories that would be short circuited by the
SolrDispatchFilter. It includes all Admin UI related static content.
NOTE: It is NOT a pattern but only matches the start of the HTTP ServletPath.
-->
<init-param>
<param-name>excludePatterns</param-name>
<param-value>/css/.+,/js/.+,/img/.+,/tpl/.+</param-value>
</init-param>
</filter>

<filter-mapping>
<!--
NOTE: When using multicore, /admin JSP URLs with a core specified
such as /solr/coreName/admin/stats.jsp get forwarded by a
RequestDispatcher to /solr/admin/stats.jsp with the specified core
put into request scope keyed as "org.apache.solr.SolrCore".

It is unnecessary, and potentially problematic, to have the SolrDispatchFilter
configured to also filter on forwards. Do not configure
this dispatcher as <dispatcher>FORWARD</dispatcher>.
-->
<filter-name>SolrRequestFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

<servlet>
<servlet-name>Zookeeper</servlet-name>
<servlet-class>org.apache.solr.servlet.ZookeeperInfoServlet</servlet-class>
</servlet>

<servlet>
<servlet-name>LoadAdminUI</servlet-name>
<servlet-class>org.apache.solr.servlet.LoadAdminUiServlet</servlet-class>
</servlet>

<!-- Remove in Solr 5.0 -->
<!-- This sends SC_MOVED_PERMANENTLY (301) for resources that changed in 4.0 -->
<servlet>
<servlet-name>RedirectOldAdminUI</servlet-name>
<servlet-class>org.apache.solr.servlet.RedirectServlet</servlet-class>
<init-param>
<param-name>destination</param-name>
<param-value>${context}/#/</param-value>
</init-param>
</servlet>

<servlet>
<servlet-name>RedirectOldZookeeper</servlet-name>
<servlet-class>org.apache.solr.servlet.RedirectServlet</servlet-class>
<init-param>
<param-name>destination</param-name>
<param-value>${context}/zookeeper</param-value>
</init-param>
</servlet>

<servlet>
<servlet-name>RedirectLogging</servlet-name>
<servlet-class>org.apache.solr.servlet.RedirectServlet</servlet-class>
<init-param>
<param-name>destination</param-name>
<param-value>${context}/#/~logging</param-value>
</init-param>
</servlet>

<servlet>
<servlet-name>SolrRestApi</servlet-name>
<servlet-class>org.restlet.ext.servlet.ServerServlet</servlet-class>
<init-param>
<param-name>org.restlet.application</param-name>
<param-value>org.apache.solr.rest.SolrSchemaRestApi</param-value>
</init-param>
</servlet>

<servlet-mapping>
<servlet-name>RedirectOldAdminUI</servlet-name>
<url-pattern>/admin/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>RedirectOldAdminUI</servlet-name>
<url-pattern>/admin</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>RedirectOldZookeeper</servlet-name>
<url-pattern>/zookeeper.jsp</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>RedirectLogging</servlet-name>
<url-pattern>/logging</url-pattern>
</servlet-mapping>

<!-- Servlet Mapping -->
<servlet-mapping>
<servlet-name>Zookeeper</servlet-name>
<url-pattern>/zookeeper</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>LoadAdminUI</servlet-name>
<url-pattern>/admin.html</url-pattern>
</servlet-mapping>

<servlet-mapping>
<servlet-name>SolrRestApi</servlet-name>
<url-pattern>/schema/*</url-pattern>
</servlet-mapping>

<mime-mapping>
<extension>.xsl</extension>
<!-- per http://www.w3.org/TR/2006/PR-xslt20-20061121/ -->
<mime-type>application/xslt+xml</mime-type>
</mime-mapping>

<welcome-file-list>
<welcome-file>admin.html</welcome-file>
</welcome-file-list>

</web-app>
2015-10-17 18:20:21 +08:00
回复了 tikazyq 创建的主题 Linux 请教 sed 替换修改 xml 文件问题
@rrfeng 多谢,现在已经用 python re 搞定了

python <<EOF
import re
fpath = '/usr/tomcat/webapps/solr/WEB-INF/web.xml'
rep_str = '''
<env-entry>
<env-entry-name>solr/home</env-entry-name>
<env-entry-value>/usr/solr/server/solr</env-entry-value>
<env-entry-type>java.lang.String</env-entry-type>
</env-entry>
'''
with open(fpath) as f: text = f.read()
text = re.sub('<!--\s+<env-entry>.*</env-entry>\s+-->', rep_str, text, flags=re.DOTALL)
with open(fpath, 'wb') as f: f.write(text)
EOF
2015-10-16 23:07:55 +08:00
回复了 tikazyq 创建的主题 Linux 请教 sed 替换修改 xml 文件问题
@maskerTUI 因为要用 vagrant 自动生成集群,用 vim 就不方便了
2015-10-16 23:07:10 +08:00
回复了 tikazyq 创建的主题 Linux 请教 sed 替换修改 xml 文件问题
@rrfeng 的确可以用 shell 调用 python 操作,大好,谢谢!
2015-07-29 03:35:44 +08:00
回复了 chengzhoukun 创建的主题 程序员 大家有自己的英文技术博客吗,是怎么维护的?
你们都是用什么框架搭建博客的啊?
2015-07-07 01:02:25 +08:00
回复了 ShiehShieh 创建的主题 Python V 站上有多少人是用 Python 做 Data Science 的,想知道。 :doge:
我也用python,有时候R也会用到。但感觉python处理数据的速度比较快,处理量也比较大
请问互联网行业数据分析出道的转金融量化分析,可行吗?需要补哪些知识呢?
2015-04-28 03:46:05 +08:00
回复了 jhony 创建的主题 Python requests 库调用 Session 方法打开关联网站,输出却为空?
chrome点开看network看response,把http://jwweb.yzu.edu.cn:8082/xsxt/xsxt.jsp这个requst的内容看看
2015-04-24 02:30:22 +08:00
回复了 lhuiwu6 创建的主题 Python 你们都用 python 做什么开发?除了 web 开发外.
数据分析,机器学习
2015-04-24 02:26:41 +08:00
回复了 jhony 创建的主题 Python requests 库调用 Session 方法打开关联网站,输出却为空?
看看r.status_code和r.content,去网站上看看是不是用了javascript读入内容,requests不能读js
2015-04-23 19:10:01 +08:00
回复了 tikazyq 创建的主题 Python Bokeh+Flask 搭建 Dashboard?
@killpanda 太感谢了!问题解决了!
2015-04-23 15:44:50 +08:00
回复了 holinhot 创建的主题 Python 请教如何删除 6 万 txt 中重复的行
cat <filename> | sort | uniq >> unique.txt

6万行数据不算大,直接unix操作就ok
2014-11-04 04:11:11 +08:00
回复了 paloalto 创建的主题 奇思妙想 半夜冒出一个无聊想法,24 小时不间断直播一项事物。
1 ... 35  36  37  38  39  40  41  42  43  44  
关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3456 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 22ms · UTC 04:48 · PVG 12:48 · LAX 20:48 · JFK 23:48
Developed with CodeLauncher
♥ Do have faith in what you're doing.