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
hexString = "" | |
hexString = hexString[2:-2] | |
hexString = hexString.replace("7d01", "7d") | |
hexString = hexString.replace("7d02", "7e") | |
payload = bytearray.fromhex(hexString) |
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
__all__ = ['rsa'] | |
# Don't look below, you will not understand this Python code :) I don't. | |
# generated by js2py | |
from js2py.pyjs import * | |
# setting scope | |
var = Scope( JS_BUILTINS ) | |
set_global_object(var) |
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
#!/system/bin/sh | |
su -c " | |
echo \"enter /system/etc\" &&\ | |
cd /system/etc &&\ | |
echo \"mount /system rw\" &&\ | |
mount -o rw,remount /system &&\ | |
echo \"patch nfc id\" &&\ | |
sed -i -e 's/33, 04, 01, 02, 03, 04,/33, 04, AA, AA, AA, AA,/g' libnfc-nxp.conf &&\ | |
echo \"mount /system ro\" &&\ | |
mount -o ro,remount /system &&\ |
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
void CSID::getLabelContourMask(cv::Mat &mask, bool _thick_line) | |
{ | |
// default width | |
int line_width = 2; | |
if ( !_thick_line ) line_width = 1; | |
int width = m_matData.cols; | |
int height = m_matData.rows; | |
mask.create(height, width, CV_8UC1 ); |
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
# | |
# python drive.py "origin" ["waypoint" ... ] "destination" | |
# | |
# i.e. python drive.py "Union Square, San Francisco" "Ferry Building, San Francisco" 'Bay Bridge' SFO | |
import sys, json, urllib2, md5, os.path, pprint | |
from math import radians, sin, cos, atan2, pow, sqrt | |
from urllib import quote_plus | |
from xml.sax.saxutils import escape | |
from optparse import OptionParser |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <math.h> | |
typedef struct _lbheader{ | |
unsigned short identifier; // 0x0000 | |
unsigned int filesize; // 0x0002 | |
unsigned int reserved; // 0x0006 |
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
# 5550 | |
# 1978 | |
# 5551 | |
# 1979 | |
# 5552 | |
# 1980 | |
# 5553 | |
# 1981 | |
# 5554 | |
# 1982 |
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
path_binary_file <- "~/Dropbox/元智課程資料/研究所課程/資料探勘/VQ/COL.sil" | |
n_dimension <- 26 | |
n_element_byte <- 4 | |
#------read file----- | |
#create file connection | |
zz <- file(path_binary_file, "rb") | |
# calculate number of element bt file size | |
n_total_element <- file.info(path_binary_file)$size/n_element_byte |