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
from cereal import car | |
from opendbc.can.packer import CANPacker | |
from openpilot.common.numpy_fast import clip | |
from openpilot.common.conversions import Conversions as CV | |
from openpilot.common.realtime import DT_CTRL | |
from openpilot.selfdrive.car import apply_driver_steer_torque_limits | |
from openpilot.selfdrive.car.interfaces import CarControllerBase | |
from openpilot.selfdrive.car.volkswagen import mqbcan, pqcan | |
from openpilot.selfdrive.car.volkswagen.values import CANBUS, CarControllerParams, VolkswagenFlags |
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
(() => { | |
const parseNumberFromElement = (selector) => parseInt($(selector).text().replace(',', '')) | |
const fmt = new Intl.NumberFormat('zh-TW') | |
let v = parseNumberFromElement('#num1') - parseNumberFromElement('#num2') - parseNumberFromElement('#num3') | |
let html = `<div class="EmbedBg TaiwanEmbed"> | |
<div class="TWtotalTwEmbed"> | |
<p class="TwTitle ">尚 未<br>判 定</p> | |
<div class="TwEmbed1 outbreak_info_block" style="width: 440px;"> |
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 cached_function(): | |
result = cache.get(cache_key) | |
if result: | |
return result | |
result = heavy_generate_function() | |
cache.set(cache_key, result, expire_time) | |
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 unicodedata | |
s1 = u'\u4f4f\u9662\u91ab\uf9c1\u4fdd\u96aa\uf90a' # string from pdf | |
s2 = u'\u4f4f\u9662\u91ab\u7642\u4fdd\u96aa\u91d1' # manual input | |
s3 = unicodedata.normalize('NFC', s1) | |
print s3 == s1 |
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
./configure --with-features=huge \ Thu 17 Aug 2017 12:19:54 PM CST | |
--enable-multibyte \ | |
--enable-rubyinterp=yes \ | |
--enable-pythoninterp=yes \ | |
--with-python-config-dir=/usr/lib/python2.7/config \ | |
--enable-python3interp=yes \ | |
--with-python3-config-dir=/usr/lib/python3.5/config \ | |
--enable-perlinterp=yes \ | |
--enable-luainterp=yes \ | |
--enable-cscope \ |
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
# -*- coding: utf8 -*- | |
from __future__ import unicode_literals | |
from csvkit import writer | |
from csvkit.unicsv import UnicodeCSVWriter | |
with open('test.csv', 'w') as f: | |
# IMPORTANT use csvkit.unicsv.UnicodeCSVWriter here instead of csvkit.writer | |
w = UnicodeCSVWriter(f, delimiter=b'\t', encoding='utf-16') | |
w.writerow(['"中文"\r\nline1\r\nline2\r\nline3', 'cell2']) | |
w.writerow(['"中文"\r\nline1\r\nline2\r\nline3', 'cell2']) |
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
// cheat js for http://game.ioxapp.com/eye-test/game.html | |
setInterval(function(){ | |
var d = {}; | |
$('#box span').each(function(idx, e){ | |
var k = $(e).attr('style'); | |
if (!(k in d)) { | |
d[k] = [e]; | |
} else { | |
d[k].push(e); | |
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder