Skip to content

Instantly share code, notes, and snippets.

✌️
Do the right thing

mour mylamour

View GitHub Profile
@mylamour
mylamour / System Design.md
Last active Mar 28, 2019 — forked from vasanthk/System Design.md
System Design Cheatsheet
View System Design.md

系统设计备忘录

挑选正确的架构约等于选择正确的战斗并做好权衡

基本步骤

  1. 明确系统边界
  • 用户案列 (描述哪些业务,事件,组合在一起会产生什么样的效果)
    • 谁使用这个系统?
    • 他们怎么使用这个系统?
View hmm.py
import numpy as np
from hmmlearn import hmm
from sklearn.datasets import load_iris,load_diabetes
from sklearn.metrics import accuracy_score
from sklearn.model_selection import train_test_split
CLASSES = 4
ITERATIONS = 100000
iris = load_iris()
View guessLan.py
import os
import fire
from colorama import Fore
from collections import Counter
# SUPPORT_SUFFIX = ['lua','c','cpp','py','java','scala','php','js']
# 如果给个最低均值就好了,或者比率
PROJECTLAN = {
@mylamour
mylamour / download.py
Created Oct 29, 2018
[threatfeeds download] #python #threat feeds.io
View download.py
import re, os, sys
import json
import logging
import hashlib
import requests
from functools import partial
from bs4 import BeautifulSoup
from concurrent.futures import ProcessPoolExecutor
from multiprocessing import Pool, TimeoutError
from urllib.parse import urlparse
@mylamour
mylamour / raspberry-HIFI.md
Last active Sep 30, 2018
#Raspberry# #HIFI Berry#
View raspberry-HIFI.md

我的是板子是Raspberry Zero W

sudo vim /boot/config.txt

dtoverlay=hifiberry-dac

然后aplay -l检测 声卡是否加载了,你要加载你自己的型号。我的是hifiberry-dac的。可以看到card-1已经加载了hifiberry

@mylamour
mylamour / mac-sb.md
Last active Jan 11, 2019
使用mac中遇到的傻屌问题
View mac-sb.md
  1. mac 挂载ntfs盘
macbook:~ uwe$ sudo umount /Volumes/UNTITLED
macbook:~ uwe$ sudo mount -t ntfs -o rw,auto,nobrowse /dev/disk3s1 ~/ntfs-volume

image image

@mylamour
mylamour / runhound.md
Last active Aug 31, 2018
#code searching#
View runhound.md
@mylamour
mylamour / kreas probelm.md
Created Aug 16, 2018
#keras# #learning# #question#
View kreas probelm.md
  • Name "Keras" not found
keras.models.load_model("xxxxx.h5")

修改为

keras.models.load_model("xxxxx.h5",custom_objects={"keras":keras})
You can’t perform that action at this time.