Mac 启用NTFS

How to Enable NTFS Write Support in Mac OS X http://osxdaily.com/2013/10/02/enable-ntfs-write-support-mac-os-x/

READ MORE

python3+2 不换行打印,多用于进度条 process bar

用tqdm包实现进度条: tqdm基本用法: from time import sleep from tqdm import tqdm for i in tqdm(range(10000)): sleep(0.01) tqdm更多用法:https://blog.csdn.net/langb2014/article/details/54798823 python3 不换行打印,多用于进度条 process bar process = 0 # process bar for i in user: process += 1 print("\rProcess: %f " % (process/len(user)), end='') process_code() 更多样式: proc += 1 print('\r loading... %.2f %%' % (process/len(user)*100), end='') python2: 对于py2来讲,主要起作用的是末尾的逗号: print '\r loading... {:.3f}' .format( (float(proces))/len(user)*100 ) , print('%.3f' % 1.12345678) # Let's take 3 decimal places print'{:.3f}'.format(3.14159)

READ MORE

面向的phthon2+3 的场景,Anaconda 安装+环境配置+管理

standard procedure in pyCharm for creating environment when Anaconda installed Create a conda env via pyCharm open pyCharm create new project – select Conda as New env using. Locations: ~\Anaconda_x\envs\py3env PythonVersion: python3.6 (python2.x as alternate) Conda Excutable: ~\Anaconda_x\Scripts\conda.exe ☑️⊙Make available to all projects you can open terminal tab(Alt + F12) in pyCharm and manage the packages using conda commands. For instance, run the commands below for installing the numpy package: activate py3env conda list numpy conda install numpy=1.15.1 Test python 3 code:

READ MORE

How can I manage the modules for python2 when python3 installed as well. In OSX

ref: https://stackoverflow.com/questions/53385448/how-can-i-manage-the-modules-for-python2-when-python3-installed-as-well-in-osx I’m using OSX and I installed python3 with anaconda installed. In my OSX, there exists two versions of python, i.e. python2 and python3. I managed the modules in anaconda which only affect modules in python3. But how can I manage(install, delete, update) the modules for python2? I’ve checked some posts about ‘python2 is at /usr/bin/python’ . So it’s ok to use python2 by ‘/usr/bin/python’ without configuring alias. But, how can I manage(install, delete, update) the modules for python2 when python3 installed as well.

READ MORE

Google Colab Notebook 的外部文件引用配置

Google Colab Notebook 的外部文件引用配置 Reference: How to upload the file and read Google Colab 先装工具:google-drive-ocamlfuse !apt-get install -y -qq software-properties-common python-software-properties module-init-tools !add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null !apt-get update -qq 2>&1 > /dev/null !apt-get -y install -qq google-drive-ocamlfuse fuse from google.colab import auth auth.authenticate_user() from oauth2client.client import GoogleCredentials creds = GoogleCredentials.get_application_default() import getpass !google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret} < /dev/null 2>&1 | grep URL vcode = getpass.getpass() !echo {vcode} | google-drive-ocamlfuse -headless -id={creds.client_id} -secret={creds.client_secret} 去网页确认一下: confirm the authentication of this access.

READ MORE

Zotero 容量满了,用云盘自动同步 - Extending Zotero's syncing folder size by DropBox

Zotero 容量满了,用云盘自动同步 就同步“storage" 那个文件夹就行了。 https://www.zotero.org/support/sync#alternative_syncing_solutions https://forums.zotero.org/discussion/29831/what-is-this-pipes-folder-in-my-zotero-folder What you should do, is In Zotero re-locate the data directory back out of the Google Drive folder (same instructions as you followed previously). Close Zotero/Firefox. Disable Google Drive syncing In Google Drive folder, move (not copy) the “storage” folder out of the Zotero data directory somewhere else inside the Google Drive folder. Move the Zotero data directory out of Google Drive folder to the folder you selected above in Zotero. Set up a symbolic link inside the Zotero data directory and point it to the new location of the storage folder.

READ MORE

用python + networkx探索和分析网络数据

Edited by Markdown Refered from: John Ladd, Jessica Otis, Christopher N. Warren, and Scott Weingart, “Exploring and Analyzing Network Data with Python,” The Programming Historian 6 (2017), https://programminghistorian.org/en/lessons/exploring-and-analyzing-network-data-with-python. 只是一个笔记,细节要看原文。 用python探索和分析网络数据 Table of Contents 目标和要求 [数据准备 和 NetworkX 安装](#数据准备 和 NetworkX 安装) 获取数据和基本的操作 进一步分析 [添加属性](#Add attributes) 网络度量分析 The Shape of the Network 最短路径 找出最大component 并生成子图 triadic closure Centrality 度数 特征值中心性 介数中心性 社区发现 导出数据和做结论 目标和要求 **Goals:**做完这里的步骤,你将得到如下技能: 使用Python的NetworkX 包来分析一个网络。 通过分析一个humanities network data来得到以下几点: 网络结构和path length 找到重要的或中心的节点 找到社区和subgroups 通过量化网络分析的方法,你将可以回答像这样的问题: What is the overall structure of the network?

READ MORE

从诠释学到数据到网络:历史来源的数据提取和网络可视化

从诠释学到数据到网络:历史来源的数据提取和网络可视化 reference:From Hermeneutics to Data to Networks: Data Extraction and Network Visualization of Historical Sources 本教程介绍如何通过使用定性数据分析(QDA)和社会网络分析(SNA)中开发的非技术方法从历史来源提取网络数据(人员、机构、地点等),以及如何使用平台无关的、特别易于使用的Palladio将这些数据可视化。 Table of Contents 简介和案例 [编码方案coding scheme](#编码方案coding scheme) 用Palladio可视化 可视化后的附加值 其他可视化工具 简介和案例 网络可视化可以帮助人文学者揭示文本来源中隐藏的、复杂的模式和结构。本教程解释了如何使用Qualitative Data Analysis (QDA) and Social Network Analysis (SNA)中开发的非技术方法从历史来源提取网络数据(人员、机构、地点等), 及怎样使用一个独立与平台的、易用的可视化工具Palladiolink来可视化网络。 图1:Palladio中的网络可视化以及在本教程结束时您将能够创建的内容。 上图显示的是拉尔夫·诺伊曼(Ralph Neumann)网络中的一段摘录,特别是他与那些在1943年至1945年期间帮助过他和他妹妹的人之间的联系。您可以很容易地修改图表,并询问:谁以哪种方式提供了帮助? 什么时候帮助的? 谁与谁有联系? This tutorial: data extraction from unstructured text shows one way to visualize it using Palladio 案例背景 这是一个人类学phD的研究案例的一部分,比如,作者研究这样的问题: 社会关系在多大程度上可以解释为什么普通人愿意冒险帮助别人? 这种关系如何使人们能够在资源有限的情况下提供这些帮助? 社会关系如何帮助犹太难民在地下生存? 在这个项目中,网络可视化帮助我发现了迄今为止被遗忘但非常重要的联系人经纪人,突出了犹太难民作为联系人经纪人的整体意义,并且在1942年到1945年间,帮助了大约1400人,总共有5000次。 下面我将介绍的编码方案是我在博士项目(二战期间关于秘密支持网络)中的一个简化版本。 编码方案coding scheme 在可视化网络关系时,首先也是最困难的挑战之一是决定谁应该是网络的一部分,以及选择的参与者之间的关系将被编码。这可能需要一些时间来弄清楚,并且可能是一个迭代的过程,因为您需要平衡您的研究兴趣和假设与您的文本中的信息的可用性,并以严格的和必要的简化编码方案来表示。 在这个过程中主要的问题是: 两个参与者之间关系的哪些方面是相关的? 谁是网络的一部分?谁不是呢? 哪些属性重要? 你的分析目标是什么? 想要找到啥? 我找到了以下这些问题的答案: 什么定义了两个参与者之间的关系? 任何直接有助于被迫害者生存的行动。这包括非犹太共产主义者,但不包括那些选择不谴责难民或仅仅是演员之间的熟人的旁观者(因为消息来源没有足够的报道)。行动者被编码为提供或接受援助行为的人,独立于他们的难民身份。目前还没有一种简单而可靠的方法来处理含糊不清和怀疑。因此,我选择只收集可验证的数据。 谁是网络的一部分?谁不是呢? 任何被称为帮助者的人,参与帮助活动,参与旨在抑制帮助行为的活动。事实上,一些帮助活动与我的案例研究无关,但在其他情况下,这种方法揭示了迄今为止网络之间意想不到的交叉连接。 你观察到哪些类型的关系? 粗略的分类:帮助的形式,关系的强度,帮助的持续时间,帮助的时间,第一次见面的时间(都用6个月的步骤编码 Both coded in six-months steps)。

READ MORE

delete content on the right of cursor, Mac

Forward delete content on the right of cursor, Mac It’s not convenient to press Fn+delete to delete content on the right of cursor, on Macintosh. They’re too faraway. Forward Deleting For instance: For test: ab|cd, the cursor is between b and c, deleteForward makes the text ab|cd into ab|d . Use Mastero Keyboard tool: Adding the Macro for DeleteForward For adding the action, select ‘KeyStroke’: Another method using Karabiner tool (not tested) Use Karabiner to remap RightShift+delete to Fn+delete so that we can only one right hand to implement that deleting backward.

READ MORE

markdown工具对比: 作业部落 vs Typora

2者都挺优秀的,但是在具体使用时还是遇到一些问题: 功能 作业部落 Typora 图片调整大小 × √ how to 在线同步,易于分享 √ × pdf对emoji的支持 × √ pdf的text view: View pdf as a text file 时,对中文的支持,这个影响pdf内搜索中文的性能,以及分享上传后是否会乱码。 √ × 代码语法支持高亮 × √

READ MORE