Skip to content

Instantly share code, notes, and snippets.

View raidery's full-sized avatar
🎯
Focusing

Raider raidery

🎯
Focusing
  • IBM
  • China
View GitHub Profile
// see https://gist.github.com/2382341
// scalaz for only solution3
import scalaz._
import Scalaz._
object SolutionForMultiNestedMatchforMyStudy {
def f(num: Int): Option[Int] = {
num match {
#!/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
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 = {
#!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
@raidery
raidery / gist:5d4e4667401834bd4468
Created November 7, 2014 05:31
Scala and sbt installation on ubuntu 12.04
#!/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