# 有三个显示器
outs = ['e1', 'h1', 'e2']
# 需要得到的数组
[['e1'],
['h1'],
['e2'],
['e1', 'h1'],
['e1', 'e2'],通过fchdir和getcwd获取文件描述符对应的文件名
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
int main()
{
char cwdbuf[4096];
This file contains hidden or 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
| import time | |
| def print_progress(completed, length=20, cell='█', empty='░', begin='', end=''): | |
| completed = int(completed) | |
| completed = length if completed > length else completed | |
| print(begin + cell * completed + empty * (length-completed) + end, end='') | |
| for i in range(51): | |
| print('\r', end='') | |
| print_progress(i, 50, cell='=', empty=' ', begin='[', end=']') |
This file contains hidden or 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 <stdio.h> | |
| #include <stdlib.h> | |
| #include <unistd.h> | |
| int progress(char *buf, ssize_t bufsize, | |
| int completed, int length, | |
| char cell, char empty, | |
| char begin, char end) | |
| { | |
| int i = 0; |
This file contains hidden or 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
| int t_remain; | |
| for (t_remain = 2; t_remain = sleep(t_remain);); | |
| t_remain = 2; | |
| while (t_remain = sleep(t_remain)); |
Theme: Darcula
Custom UI Font: Source Han Sans CN Medium:16
Code Font: Source Code Pro Medium:18
如果不介意加粗看不清的话,把Medium设置为Bold能更清晰
Code Scheme: One Dark/Darcula
This file contains hidden or 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
| PN mode: | |
| j -> down | |
| k -> up | |
| h -> left | |
| l -> right | |
| Caps -> Ctrl_L | |
| Ctrl_L -> Win | |
| Fn + Caps -> Caps |
This file contains hidden or 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
| package wekaTest | |
| import weka.clusterers.AbstractClusterer | |
| import weka.clusterers.FilteredClusterer | |
| import weka.clusterers.SimpleKMeans | |
| import weka.core.EuclideanDistance | |
| import weka.core.Instances | |
| import weka.core.SelectedTag | |
| import weka.core.converters.ConverterUtils.DataSource | |
| import weka.filters.unsupervised.attribute.Remove |
This file contains hidden or 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
| let mapleader=' ' | |
| """" idea设置 | |
| " 导航 | |
| nnoremap gi :action GotoImplementation<cr> | |
| nnoremap gu :action FindUsages<cr> | |
| nnoremap gU :action FindUsagesInFile<cr> | |
| nnoremap gd :action GotoDeclaration<cr> | |
| nnoremap gs :action GotoSuperMethod<cr> |
This file contains hidden or 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
| from mitmproxy import http | |
| import asyncio | |
| def request(flow: http.HTTPFlow): | |
| flow.intercept() | |
| async def resume(): | |
| try: | |
| await async_request(flow) |