Skip to content

Instantly share code, notes, and snippets.

View Ulu2005's full-sized avatar

Kowa Ulu2005

View GitHub Profile
@Ulu2005
Ulu2005 / cmu_course.md
Created July 13, 2015 21:45
CMU CS Course Info

#CMU Course Info 整理自一亩三分地

##08722 – Data Structurefor application programmers 这门课主要是开给EBIZ和MISM的,在MISM那边的课号是95772. 但是很多ECE, INI的同学,以及咱ME转CS帮都在上这门课。这门课只有半学期,一共6个credits,相当于1.5学分。内容非常基础,但是我觉得帮助挺大的,对于非CS科班出身想转CS的同学非常建议上一下, 基础越弱收获越大,要是基础比较硬的话就不用上了。LZ上的其它CS的课几乎都是各种牛校的PHD出身,这门课的老师好像都没有PHD学位,肯定没法去上15的课,但是讲课挺用心,讲的也很清楚。讲课这东西真的不是老师自己越牛就讲的越好。尤其数据结构这种比较基础的内容。这门课从最简单的内容讲起,包括array, arraylist, linked list, stack, queue,sorting(bubble, selection, insertion, merge, quick, heap), hashTable, hashMap,hashSet, BST, TreeMap, TreeSet, Huffman coding, Heap. 每周一次quiz, lab, homework。讲的时候内容都围绕Java Collection 来讲,还涉及与collection有关的comparator, iterator 等内容。这门课完全就是针对面试的,作业要求先手写代码(虽然大部分时候都是先ECLIPSE敲好再抄到纸上的)。

6次homework,前面的非常简单,后面稍微麻烦一点,难度都不大,就是让你去熟悉这些数据结构能自己implement,也能用JAVA COLLECTION。

  1. 自己implement 一个 arraylist 实现各种要求
  2. Queue, stack 的implement和应用
@Ulu2005
Ulu2005 / doubanBookYearlyReport.py
Last active January 8, 2018 07:44
douban book yearly report
#!/usr/bin/env python3
import json
import urllib.request
YEAR = 2017
USER_ID = '替换ID'
BASE_URL = 'https://api.douban.com/v2/book/user/{}'.format(USER_ID)
DATE_RANGE = 'from={}-01-01T00:00:00+08:00&to={}-12-31T23:59:59+08:00'.format(
YEAR, YEAR)
@Ulu2005
Ulu2005 / malloc-hint2.txt
Created November 2, 2014 19:29
hints malloc lab
(text of an email to the class from Dave O'Hallaron)
I've noticed that a number of you are having trouble getting started
with Lab 6. The purpose of this note is to help you get started by
guiding you through the initial steps I take when I do the lab.
This lab is too hard to do all at once, so I break it up into more
managable pieces. I start by developing a simple implicit list
allocator. Later, I will improve this code with a faster and more
memory efficient free list organization. But by starting with the
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
class Solution {
public:
void reverseWords(string &s) {
@Ulu2005
Ulu2005 / dnsmasq.md
Created February 24, 2016 20:06
(RT)在 OS X Mountain Lion 上使用 dnsmasq

dnsmasq 可以提供 DNS 缓存和 DHCP 服务功能。对于在本地搭建一个 DNS 是再好不过了。

我的需求如下:

  • 对于特定域,使用特定的 DNS
  • 对于特定的几个域名,手工指定 IP

我的环境如下:

@Ulu2005
Ulu2005 / install.sh
Last active November 1, 2015 01:43 — forked from akolosov/gist:cedaac86b333a4ced95f
Install Vim with lua support and GUI on Ubuntu 14.04
#!/bin/sh
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev mercurial libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev
sudo mkdir /usr/include/lua5.1/include
sudo ln -s /usr/include/luajit-2.0 /usr/include/lua5.1/include
cd ~
git clone https://github.com/vim/vim.git
{
"id": "trk_Txyy1vaM",
"object": "Tracker",
"mode": "test",
"tracking_code": "EZ4000000004",
"status": "delivered",
"created_at": "2014-11-18T10:51:54Z",
"updated_at": "2014-11-19T10:51:54Z",
"signed_by": "John Tester",
"weight": 17.6,
@Ulu2005
Ulu2005 / gist:4238410
Created December 8, 2012 03:09
Engineering Thermaldynamics

#工程热力学第9章——气体动力循环笔记

这一章主要讲活塞式内燃机和燃气轮机的燃烧循环,通过合理的简化,得到易于分析却又具备参考价值的理想循环。

##核心概念

###性能参数类

  • 循环净功 = 吸热量 - 放热量
  • 循环热效率 = 净功 / 吸收热 = 1 - (放热量 / 吸热量)
  • 相对内效率
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal