Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

GuiYang liuguiyangnwpu

💭
I may be slow to respond.
Block or report user

Report or block liuguiyangnwpu

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@liuguiyangnwpu
liuguiyangnwpu / Computer Science Students.md
Last active Jul 31, 2019
主要描述下计算机领域对于职业技能的准备点,希望大家多多补充!
View Computer Science Students.md

该如何学习?

  • 建议给自己制定一个计划,计划应该细致一些,细致到这一周的目标最好,太细不好,因为工程师会被新技术,新方向给吸引,因此给自己留足溜号的时间
  • 不要排斥新东西,新技术
  • 思考问题要有深度(这一点自己做的不好)

该学什么?

这里按照自己熟悉和了解的领域进行编写,大家轻轻拍砖😄

操作系统

  • 除了学习先修课程,其中推荐一些课程
@liuguiyangnwpu
liuguiyangnwpu / # opencv3 - 2017-01-12_19-59-03.txt
Created Jan 17, 2017
opencv3 (homebrew/science/opencv3) on macOS 10.12.2 - Homebrew build logs
View # opencv3 - 2017-01-12_19-59-03.txt
Homebrew build logs for homebrew/science/opencv3 on macOS 10.12.2
Build date: 2017-01-12 19:59:03
View Mac install opencv3.md
  • install python3
brew install python3 
brew install homebrew/dupes/tcl-tk
brew uninstall python3
# brew install python3 --with-brewed-tk
brew install python3 --with-tcl-tk
brew linkapps python3

brew uninstall freetype
@liuguiyangnwpu
liuguiyangnwpu / shutil_get_terminal_size.md
Created Dec 20, 2016
主要是解决pip 安装ipython 后启动不起来,发生了shutil_get_terminal_size ?
View shutil_get_terminal_size.md
/usr/lib/python2.7/site-packages/IPython/utils/terminal.py

from backports.shutil_get_terminal_size import get_terminal_size as _get_terminal_size
from shutil_backports import get_terminal_size as _get_terminal_size
View socket-python.md
  • server
#coding=utf-8

#创建SocketServerTCP服务器:
import SocketServer
from SocketServer import StreamRequestHandler as SRH
from time import ctime
@liuguiyangnwpu
liuguiyangnwpu / install_python.sh
Created Nov 7, 2016 — forked from andriisoldatenko/install_python.sh
Install local Python 2.7.10 on CentOS 7
View install_python.sh
TMP_PATH=~/tmp_install_python
# Versions section
PYTHON_MAJOR=2.7
PYTHON_VERSION=$PYTHON_MAJOR.10
mkdir $TMP_PATH && cd $TMP_PATH
# Update yum and libraries
yum -y update
@liuguiyangnwpu
liuguiyangnwpu / copyDirs.md
Created Aug 14, 2016
使用Python拷贝文件夹中的文件,并对文件进行些操作!
View copyDirs.md
#!/usr/bin/env python
# coding=utf-8

import os
import pandas as pd

saveDir = "/home/fighter/imageretrievedata/for_train/"

def deal_cluster(filePaths):
@liuguiyangnwpu
liuguiyangnwpu / TrieTree.md
Created Aug 14, 2016
使用C++创建TrieTree数据结构,也就是所说的字典树结构!
View TrieTree.md
#include <iostream>
#include <vector>

using namespace std;

const int NodeMax = 26;
typedef struct _TrieNode {
    int cnt;
    struct _TrieNode* next[NodeMax];
@liuguiyangnwpu
liuguiyangnwpu / Design_DataStruct.md
Last active Aug 4, 2016
在数据结构设计中的重要思路,替换原则
View Design_DataStruct.md
  • 对于一个单链表,我们假设这样一种情况,我们不知道单链表的头节点,我们只是知道单链表中某一个节点的指针,现在我们想删除这个节点,我们如何做到?

    • 第一个方案,我们假设一个Flag,确定当我们访问链表中的数据为Flag标志信息的时候,我们可以认为这个节点是我们已经被标志的删除节点;
    • 第二个方案(替换原则),我们可以将该节点的后继节点的信息拷贝到当前的节点上,然后将当前的节点的后继节点删除即可;
  • 在我做leetcode是遇到这样的一个问题,设计一个数据结构,实现插入、删除、随机获取一个数据的均需要咋O(1)的时间完成。

class RandomizedSet {
public:
    /** Initialize your data structure here. */
@liuguiyangnwpu
liuguiyangnwpu / Learning STL 03.md
Last active Aug 4, 2016
使用STL中的Map和Hash_Map和Unordered_Map的底层细节区别
View Learning STL 03.md
  • unordered_map在迭代器遍历时候key,value出现的顺序是未定义
  • 在STL中的Map底层的实现是红黑树,其插入和查找效率较低,对于插入和查找效率较高的HashMapC11推荐使用unordered_map
  • 在MSDN中又这样的描述

Internally, the elements in the unordered_map are not sorted in any particular order with respect to either their key or mapped values, but organized into buckets depending on their hash values to allow for fast access to individual elements directly by their key values (with a constant average time complexity on average).

unordered_map containers are faster than map containers to access individual elements by their key, although they are generally less efficient for range iteration through a subset of their elements.

这段英文按我的理解就是unordered_map的快速插入和快速查找都是没有问题的,只不过对于迭代器遍历的速度恐怕会相比低效一些。

You can’t perform that action at this time.