首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏MeteoAI

    Cartopy调用天地图作为底图

    = "1909" # 输入利奇马台风的编号 1909 url = "http://d1.weather.com.cn/typhoon/typhoon_data/"+year+"/"+typhoon_id typhoon.loc[(typhoon['wind']>=10.8) & (typhoon['wind']<=17.1),'class']='TROPICAL DEPRESSION' typhoon.loc [(typhoon['wind']>17.2) & (typhoon['wind']<=24.4),'class']='TROPICAL STORM' typhoon.loc[(typhoon[ ']>32.7) & (typhoon['wind']<=41.4),'class']="<em>TYPHOON</em>" typhoon.loc[(typhoon['wind']>41.5) & (typhoon ['wind']<=50.9),'class']="SEVERE <em>TYPHOON</em>" typhoon.loc[(typhoon['wind']>51),'class']="SUPER TYPHOON

    5.1K32发布于 2019-09-17
  • 来自专栏Python大数据分析

    使用Matplotlib & Cartopy绘制我国台风路径图

    lat_1 = typhoon.iloc[typhoonPoint,3]/10 lon_1 = typhoon.iloc[typhoonPoint,4]/10 )-1): lat_1 = typhoon.iloc[typhoonPoint,3]/10 lon_1 = typhoon.iloc[typhoonPoint,4]/10 lat_2 = typhoon.iloc[typhoonPoint+1,3]/10 lon_2 = typhoon.iloc[typhoonPoint+1,4]/10 )-1): lat_1 = typhoon.iloc[typhoonPoint,3]/10 lon_1 = typhoon.iloc[typhoonPoint,4]/10 lat_2 = typhoon.iloc[typhoonPoint+1,3]/10 lon_2 = typhoon.iloc[typhoonPoint+1,4]/10

    3.7K20编辑于 2022-04-03
  • 来自专栏气python风雨

    数据获取 | python爬取CMA台风路径

    /weatherservice/typhoon/jsons/list_{year}? typhoons:") # 打印年份和台风信息提示 for typhoon in typhoon_list: # 格式化台风编号 num = f"TC{typhoon[3]}" # 获取或生成中文名称 name_cn = typhoon[2] if typhoon[2] ! /weatherservice/typhoon/jsons/view_%s? /weatherservice/typhoon/jsons/list_{year}?

    1.1K10编辑于 2024-07-30
  • 来自专栏一个执拗的后端搬砖工

    使用本地缓存

    version>18.0</version> </dependency> 二、实现本地缓存 我们借助guava的本地缓存并对其封装,实现我们的本地缓存操作工具类,实现方式如下: package com.typhoon.demo1 100) .expireAfterWrite(24, TimeUnit.HOURS).recordStats().build(); /** * 放入本地缓存 * * @author Typhoon 使用其他方式获取

  • *
  • 如果穿进来callable为null,调用<method>get(key)</method>
  • *
* * @author Typhoon catch (Exception e) { e.printStackTrace(); } return value; } /** * 失效某个key * * @author Typhoon .cache.LocalCacheUtil; import com.typhoon.demo1.dao.UserDao; import com.typhoon.demo1.entity.User; public

2.1K10发布于 2020-11-19
  • 来自专栏一个执拗的后端搬砖工

    Springboot修改上下文路径

    System.setProperty("server.servlet.context-path","/typhoon2") 修改springboot启动程序: ? 从启动日志可以看出springboot应用的上下文路径已经改为typhoon2了: ? 3 命令行参数 Springboot还提供了一种方式,作为命令行参数的一部分传递上下文信息。 $ java -jar app.jar --server.servlet.context-path=/typhoon3 先运行打包命令: mvn -U clean compile package 然后可以看到在target目录下生成了jar包,然后再执行上述java命令,可以看到应用上下文路径修改为typhoon3了: ? 从日志中可以看出springboot应用的上下文路径已经改为typhoon4了。 总结 在本文中,我们研究了在Spring引导应用程序中更改上下文路径的不同方法。

    2.3K20发布于 2020-11-19
  • 来自专栏一个执拗的后端搬砖工

    spring redis实现注解缓存

    -- 扫描包 --> <context:component-scan base-package="com.<em>typhoon</em>.spring_jdbctemplate"/> <! 接口定义: package com.typhoon.spring_jdbctemplate.service; import com.typhoon.spring_jdbctemplate.entity.User ; import com.typhoon.spring_jdbctemplate.entity.User; import com.typhoon.spring_jdbctemplate.service.UserService ; import com.typhoon.spring_jdbctemplate.util.DataSourceUtils; /** * 用户操作dao * * @author Typhoon ; import com.typhoon.spring_jdbctemplate.entity.User; import com.typhoon.spring_jdbctemplate.service.UserService

    94610发布于 2020-11-19
  • 来自专栏一个执拗的后端搬砖工

    基于业务的列表比较器

    UserComparetor:这是一个自定义比较器,根据需要自己实现(该案例中我们比较用户信息) 下边贴出了各个类的代码实现 IComparator: /** * 执行比较的接口 * * @author Typhoon paramT */ public abstract void onDelete(T paramT); } AbstractComparator: /** * 对比 * * @author Typhoon );// 将拼接结果转换成字符串后返回(唯一字符串) } /** * 判断源数据和目标数据是否相等 *

    * 比较规则自定义 *

    * * @author Typhoon rule.isHash()); return sValue.equals(tValue); } /** * 由源数据单元素和目标列表对比,检查是否需要新增 * * @author Typhoon ) {// 如果有判定属性相等的内容,返回目标列表中的该元素 return t; } } return null; } /** * 检查是否需要删除 * * @author Typhoon

    2.5K10发布于 2020-11-19
  • 来自专栏气象杂货铺

    天气和气象数据网站集合,以及.nc数据的打开方法

    www.seniverse.com/ 其个人免费版效果不错,功能肯定比专业版要少,访问量限额:400次/小时 国内的彩云天气 http://www.caiyunapp.com/ 3.台风网站 台风路径 http://typhoon.zjwater.gov.cn /default.aspx 提供当前和历史台风数据和路径数据 中国天气台风网 http://typhoon.weather.com.cn/ 效果没有上面的好 温州台风网-台风路径-台风最新消息http: //www.wztf121.com/ 中央气象台台风网 http://typhoon.nmc.cn/web.html 中国台风网 http://www.typhoon.org.cn/ 深圳台风网 http

    12.1K50发布于 2020-05-26
  • 来自专栏孤独的S

    python ---超级。无敌之究极简单之获取台风经纬度

    代码如下: import requests url2 = 'http://typhoon.weather.com.cn/data/typhoonFlash/taifeng1.xml' responese import requests url2 = 'http://typhoon.weather.com.cn/data/typhoonFlash/taifeng1.xml' responese = requests.get 首先第一步提取台风的编号: import requests url2 = 'http://typhoon.weather.com.cn/data/typhoonFlash/taifeng1.xml' 接着拼接url: for i in range(len(taifengcode)): url = 'http://typhoon.weather.com.cn/data/typhoonFlash

    1.1K30发布于 2019-09-28
  • 来自专栏好奇心Log

    python绘图 | 多种台风路径可视化实现方法

    下载地址:http://tcdata.typhoon.org.cn/ 温州台风网 温州台风网的数据是实时发布数据的记录,时间分辨率最高达1小时,对于台风轨迹具有更加精细化的表述。 cimgt from PIL import Image import warnings warnings.filterwarnings('ignore') df = pd.read_csv('./2018typhoon.csv [a,b,c,d,e,f], numpoints=1, handletextpad=0, loc='upper left', shadow=True) plt.title(f'{title} Typhoon /typhoon_one.png') draw_single(df[df['编号']==1818]) ? 定义绘制多个台风路径方法,并绘制2018年全年的全部台风路径。 /typhoon_multi.png') draw_multi(df) ? 定义绘制单个台风gif路径演变方法,并绘制2018年第18号台风的gif路径图。

    1.3K22发布于 2020-10-29
  • 来自专栏一个执拗的后端搬砖工

    基于领域模型构建多模块项目骨架

    groupId:com.typhoon.skeleton artifactId:skeleton version:1.0-SNAPSHOT 删除skeleton项目下除pom.xml的所有文件,并修改打包方式为 archetype.properties</propertyFile> </configuration> </plugin> developer <developers> <developer> <name>Typhoon </name> <email>ScorpioAeolus@gmail.com</email> <organization>Typhoon is comming! </organization> <organizationUrl>https://scorpioaeolus.oschina.io/typhoon/</organizationUrl> </ developer> </developers> 2:在父模块根目录下添加archetype.properties archetype.groupId=com.typhoon.skeleton archetype.artifactId

    2K20发布于 2020-11-19
  • 来自专栏气象学家

    python绘图 | 多种台风路径可视化实现方法

    下载地址:http://tcdata.typhoon.org.cn/ 温州台风网 温州台风网的数据是实时发布数据的记录,时间分辨率最高达1小时,对于台风轨迹具有更加精细化的表述。 cimgt from PIL import Image import warnings warnings.filterwarnings('ignore') df = pd.read_csv('./2018typhoon.csv [a,b,c,d,e,f], numpoints=1, handletextpad=0, loc='upper left', shadow=True) plt.title(f'{title} Typhoon /typhoon_one.png') draw_single(df[df['编号']==1818]) ? 定义绘制多个台风路径方法,并绘制2018年全年的全部台风路径。 /typhoon_multi.png') draw_multi(df) ? 定义绘制单个台风gif路径演变方法,并绘制2018年第18号台风的gif路径图。

    4.1K52发布于 2020-11-06
  • 来自专栏好奇心Log

    Python可视化 | CMA热带气旋最佳路径数据集读取与绘制

    matplotlib.pyplot as plt import cartopy.crs as ccrs import cartopy.feature as cfeature def reader( typhoon_txt : os.PathLike, code: Union[str, int] ) -> Tuple[List[str], pd.DataFrame]: typhoon_txt = Path(typhoon_txt ) if isinstance(code, int): code = "{:04}".format(code) with open(typhoon_txt, "r") as txt_handle

    3K40发布于 2021-05-28
  • 来自专栏气python风雨

    重磅!Python台风路径还能这样画

    : os.PathLike, code: Union[str, int] ) -> Tuple[List[str], pd.DataFrame]: typhoon_txt = Path(typhoon_txt ) if isinstance(code, int): code = "{:04}".format(code) with open(typhoon_txt, "r") as : os.PathLike, code: Union[str, int] ) -> Tuple[List[str], pd.DataFrame]: typhoon_txt = Path(typhoon_txt ) if isinstance(code, int): code = "{:04}".format(code) with open(typhoon_txt, "r") as : os.PathLike, code: Union[str, int] ) -> Tuple[List[str], pd.DataFrame]: typhoon_txt = Path(typhoon_txt

    93210编辑于 2024-06-20
  • 来自专栏一个执拗的后端搬砖工

    设计模式----单例模式详解

    饿汉模式:利用jvm类加载机制,在类加载到jvm后就完成唯一实例的初始化 /** * 饿汉模式 * * @author Typhoon * @date 2018-04-14 21:27 Saturday 有些可能很少用到,都加在到内存中造 成压力 懒汉模式:也即是在jvm加载类的时候并不初始化唯一实例,而是在第一次被调用的时候被初始化 /** * 懒汉模式 * * @author Typhoon 不会过早占用内存 缺点:对方法做了同步控制,吞吐量有瓶颈 双重校验锁:其实这个是基于懒汉模式的改进,用同步代码块代替同步方法来提高性能和吞吐量 /** * 双重校验锁 * * @author Typhoon 优势:既实现了懒汉模式,也解决了并发初始化问题 缺点:存在jvm指令重排问题 静态内部类:通过静态内部类来实现单例模式 /** * 静态内部类 * * @author Typhoon * @date

    65520发布于 2020-11-19
  • 来自专栏一个执拗的后端搬砖工

    基于jdbcTemplate实现物理分页

    artifactId> <version>1.2.28</version></dependency> 编写实现逻辑 1)数据操作接口 /** * 自定义jdbc操作 * * @author Typhoon V2.0.0 */ public interface CustomJdbcOperations extends JdbcOperations { /** * 分页查询 * * @author Typhoon Object... args) throws DataAccessException; } 2)jdbcTemplate扩展实现 /** * jdbcTemplate扩展实现 * * @author Typhoon } 暴露CustomJdbcTemplate 此处我们为了方便测试,依旧使用之前的无spring配置操作JdbcTemplate: /** * 简化数据源配置类 * * @author Typhoon dataSource); return customJdbcTemplate; } } 编写单元测试 1)Dao操作层 /** * 用户操作dao * * @author Typhoon

    2.8K40发布于 2020-11-19
  • 来自专栏python与大数据分析

    PostgreSQL计算影响某地的台风

    .* from typhoon_his_point_info a where getdistance(a.pointlat,pointlng,19.137154,109.876876)<= earth_distance(ll_to_earth (109.876876, 19.137154),ll_to_earth(a.pointlng, a.pointlat)) as distance,a.* from typhoon_his_point_info

    49030编辑于 2022-12-13
  • SharePoint漏洞被利用传播勒索软件

    攻击细节据某机构披露,至少三个疑似与中国关联的黑客组织(Linen Typhoon、Violet Typhoon和Storm-2603)正在利用Microsoft SharePoint公开漏洞实施攻击。

    30310编辑于 2025-08-04
  • 来自专栏一个执拗的后端搬砖工

    dubbo富客户端

    new RuntimeException("jedis没有初始化"); } } } UserReadClient /** * 用户信息操作客户端 * * @author Typhoon gitee.com/ScorpioAeolus/dubbo-consumer 在dubbo-consumer.xml中添加远程服务引用: <dubbo:reference interface="com.<em>typhoon</em>.service.UserService protocol="dubbo" timeout="30000"/> 在主配置文件或者其他配置中增加: <bean id = "cacheManager" class="com.<em>typhoon</em>.cache.CacheManager property name="jedisPool" ref="jedisPool" /> </bean> <bean id = "userReadClient" class="com.<em>typhoon</em>.client.UserReadClient

    3K50发布于 2020-11-19
  • 来自专栏一个执拗的后端搬砖工

    徒手搭建dubbo服务

    -- 接口依赖 --> <dependency> <groupId>com.typhoon</groupId> <artifactId>dubbo-server-interface</artifactId 编写一个简单的用户查询接口和实现: (I)在dubbo-server-interface中定义接口和数据传输类 UserDto: /** * 用户信息数据传输类 * * @author Typhoon interface UserService { UserDto queryByPK(Long id); } (II)编写服务实现 User: /** * 用户信息实体类 * * @author Typhoon 编写单元测试消费服务 编写dubbo单元测试基类,代码如下: /** * 免配置dubbo服务单元测试 * * @author Typhoon * @date 2017-08-03 17 artifactId>commons-lang3</artifactId> <version>3.1</version> </dependency> <dependency> <groupId>com.typhoon

    64910发布于 2020-11-19
  • 领券