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 | |
| # Build A Website With Python-Flask and Nginx | |
| # Doc: http://yieldnull.com/blog/0b2e0169df807bec78b3ad3eea87105a2e5299c6/ | |
| # http://yieldnull.com/blog/cd7be487eb5148eb4aa905543c1fd1396b618a6b/ | |
| # Author: YieldNull | |
| # Updated On: 2016/02/25 | |
| if [ ! $# = 3 ] ; then | |
| echo "Args: project_name port domain_name" |
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
| package whu; | |
| import java.awt.*; | |
| import java.io.*; | |
| import java.net.HttpURLConnection; | |
| import java.net.URL; | |
| import java.net.URLConnection; | |
| import java.nio.file.Files; | |
| import java.nio.file.StandardCopyOption; | |
| import java.util.HashMap; |
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
| #!/usr/bin/env python3 | |
| """ | |
| Sorting algorithms | |
| Created By YieldNull at 4/14/16 | |
| """ | |
| def insertion_sort(lst): |
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 os | |
| import logging | |
| import requests | |
| from multiprocessing.pool import ThreadPool | |
| from multiprocessing import Queue | |
| def download(task_file, repository, pool_size=8): | |
| logger = logging.getLogger('downloader') | |
| logging.basicConfig(stream=sys.stdout, level=logging.INFO) |
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 scala.tools.nsc.{Global, Settings} | |
| import scala.reflect.internal.util.BatchSourceFile | |
| import tools.nsc.io.{VirtualDirectory, AbstractFile} | |
| import scala.reflect.internal.util.AbstractFileClassLoader | |
| import java.security.MessageDigest | |
| import java.math.BigInteger | |
| import collection.mutable | |
| import java.io.File | |
| object CompileTest { |
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 sys | |
| import logging | |
| from multiprocessing.pool import Pool | |
| logging.basicConfig(stream=sys.stdout, level=logging.INFO, | |
| format='%(asctime)s - %(processName)s %(threadName)s - %(name)s - %(levelname)s - %(message)s') | |
| if __name__ == "__main__": | |
| def job(name): | |
| logger = logging.getLogger(name) |
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 os | |
| import socket | |
| def main(): | |
| sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) | |
| sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) | |
| sock.bind(('127.0.0.1', 9999)) | |
| sock.listen() |
OlderNewer