Use macports to install:
sudo port install gtk2 +x11
(NOTE) we are going to need mp-gcc for this:
sudo port install mp-gcc10
sudo port select --set gcc mp-gcc10
sudo port install intltool
sudo port install pkgconfig
Use macports to install:
sudo port install gtk2 +x11
(NOTE) we are going to need mp-gcc for this:
sudo port install mp-gcc10
sudo port select --set gcc mp-gcc10
sudo port install intltool
sudo port install pkgconfig
原文:Linux中国
Python-mode 是一个 Vim 插件,它使你能够在 Vim 编辑器中更快的利用包括 pylint、rope、pydoc、pyflakes、pep8、autopep8、pep257 和 mccable 在内的各种库来写 Python 代码,这些库提供了一些编码功能,比如静态分析、特征重构、折叠、补全和文档等。
-- Aaron Kili
本文导航
#coding=utf8 | |
import itchat, time | |
SINCERE_WISH = u'祝%s新年快乐!' | |
REAL_SINCERE_WISH = u'祝%s新年快乐!!' | |
def send_wishes(): | |
friendList = itchat.get_friends(update=True)[1:] | |
for friend in friendList: | |
# 如果不是演示目的,把下面的方法改为itchat.send即可 |
import numpy as np | |
from matplotlib import pyplot as plt | |
fig = plt.figure(figsize=(5, 4)) | |
# Generate some data | |
mu, sigma = 1e7, 1e6 | |
s = np.random.normal(mu, sigma, 10000) | |
# Plot it | |
plt.hist(s, 30, histtype='step') | |
# Format it |
# -*- encoding: UTF-8 -*- | |
import os | |
import httplib2 | |
# pip install --upgrade google-api-python-client | |
from oauth2client.file import Storage | |
from apiclient.discovery import build | |
from oauth2client.client import OAuth2WebServerFlow |
""" | |
MIT License | |
Copyright (c) 2017 Cyrille Rossant | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |
When working with feature branches, the master branch on your fork becomes useless (you probably base your branches on upstream/master). As a result you fork's master gets outdated, and can lead to mistakes.
Deleting it is a good idea, but github needs a "default branch" to show on website, this script will create an orphan "_default" branch with just an explanatory README.md on it, and set that as default for github (you'll be asked your github password).
DISCLAIMER: This script will delete your master branch locally and remotely, be sure you don't need it anymore before running this!
import os | |
import random | |
import string | |
import tempfile | |
import subprocess | |
def random_id(length=8): | |
return ''.join(random.sample(string.ascii_letters + string.digits, length)) | |
TEMPLATE_SERIAL = """ |