Skip to content

Instantly share code, notes, and snippets.

@lcomplete
lcomplete / crawl_music.py
Created June 28, 2020 07:52
python抓取音乐(早期代码,已经无法使用)
#coding=utf-8
import urllib,urllib2,re,os,json,gevent,traceback
from BeautifulSoup import BeautifulSoup
from gevent import monkey
monkey.patch_all()
rootUrl='http://music.baidu.com'
artistId=2825 #想批量下载并归类你喜欢的歌手的所有专辑?那就把这里替换成该歌手在百度音乐的Id吧,例如:http://music.baidu.com/artist/2825
@lcomplete
lcomplete / mysql_dim_date.sql
Created June 28, 2020 07:43
mysql创建日期维度表
drop table if exists dim_date;
CREATE TABLE dim_date
(
date_key int NOT NULL,
full_date date NULL,
date_name char(11) NOT NULL,
date_name_us char(11) NOT NULL,
date_name_eu char(11) NOT NULL,
day_of_week tinyint NOT NULL,
day_name_of_week char(10) NOT NULL,
@lcomplete
lcomplete / app.config
Created June 20, 2020 03:25 — forked from grenade/app.config
Emit log4net entries to logstash over UDP in near-realtime
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
</configSections>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<log4net>
<appender name="UdpAppender" type="log4net.Appender.UdpAppender">

C#编码规范

概述

规范制定原则

  • 方便代码的交流和维护。
  • 不影响编码的效率,不与大众习惯冲突。
  • 使代码更美观、阅读更方便。
  • 使代码的逻辑更清晰、更易于理解。