This file contains 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
##Mac App Download List | |
* Appcleaner | |
* Mongohub | |
* Sequel Pro | |
* VLC | |
* Hub (brew install hub, for github command) | |
* GitHub | |
* Mou | |
* SourceTree |
This file contains 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
def create_directory (records) | |
@dir = [] # Store all {container_object_id : [file_object_id]} | |
@container = [] # All content | |
@file = [] # [file_object_ids] | |
if records.respond_to?('each') | |
records.each do |record| | |
if record['container'] == nil && record['type'] == "container" | |
@container.push record['object_id'] | |
end | |
This file contains 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
[{27=>[377, 379, 381, 383, 131, 133, 135, 603]}, {17=>[27, 371, 385, 369, 147]}, {603=>[605]}] |
This file contains 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
set encoding=utf-8 | |
syntax on | |
set nocompatible | |
set ai | |
set shiftwidth=2 | |
set tabstop=4 | |
set softtabstop=4 | |
set expandtab |
This file contains 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
public static void unzip(String zipFilePath, String dirPath, int bufferSize) throws IOException { | |
int size; | |
byte[] buffer = new byte[bufferSize]; | |
try { | |
if (!dirPath.endsWith("/")) { | |
dirPath += "/"; | |
} | |
File f = new File(dirPath); |
This file contains 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 | |
import pycurl | |
import io | |
def get_content(url): | |
res = requests.get(url) | |
return res.content | |
def html_parser(url): |
This file contains 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 | |
from flask import render_template, request, send_from_directory | |
from werkzeug.utils import secure_filename | |
from app import app | |
@app.route('/') | |
def index(): | |
return render_template('index.html') |
This file contains 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
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation"> | |
<div class="container"> | |
<div class="navbar-header"> | |
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse" > | |
<span class="sr-only">Toggle navigation</span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
<span class="icon-bar"></span> | |
</button> | |
<a class="navbar-brand" href="#" style="">Lab212</a> |
This file contains 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
def packed_bytes_to_iq(self, bytes): | |
''' Convenience function to unpack array of bytes to Python list/array | |
of complex numbers and normalize range. Called automatically by read_samples() | |
''' | |
if has_numpy: | |
# use NumPy array | |
iq = np.empty(len(bytes)//2, 'complex') | |
iq.real, iq.imag = bytes[::2], bytes[1::2] | |
iq /= (255/2) | |
iq -= (1 + 1j) |
OlderNewer