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
// see https://gist.github.com/2382341 | |
// scalaz for only solution3 | |
import scalaz._ | |
import Scalaz._ | |
object SolutionForMultiNestedMatchforMyStudy { | |
def f(num: Int): Option[Int] = { | |
num match { |
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
#!/bin/bash | |
# Copyright (c) Jupyter Development Team. | |
# Distributed under the terms of the Modified BSD License. | |
set -e | |
if [[ ! -z "${JUPYTERHUB_API_TOKEN}" ]]; then | |
# launched by JupyterHub, use single-user entrypoint | |
exec /usr/local/bin/start-singleuser.sh $* | |
else |
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 requests | |
from bs4 import BeautifulSoup | |
from multiprocessing.dummy import Pool | |
import os | |
os.chdir(r'E:\python\2017_4_20') | |
mp3_url = 'http://www.ximalaya.com/2452186/album/4015467' | |
headers = { |
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
#!coding:utf-8 | |
#!coding:/usr/bin/python | |
""" | |
dependency: | |
you have to install beautifulsoup4 modulex | |
sudo pip install beautifulsoup4 | |
description: | |
ximalaya downloading program made by Meyou(Wuhan) --2015.4.27 |
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
#!/bin/sh | |
# one way (older scala version will be installed) | |
# sudo apt-get install scala | |
#2nd way | |
sudo apt-get remove scala-library scala | |
wget http://www.scala-lang.org/files/archive/scala-2.11.2.deb | |
sudo dpkg -i scala-2.11.2.deb | |
sudo apt-get update |
NewerOlder