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
#!/bin/bash | |
src=$1 | |
des=$2 | |
width=$3 | |
height=$4 | |
watermark=$5 | |
if [ `identify -format "%n" ${src}` -eq 1 ] | |
then | |
convert ${src} -resize ${width}x${height} ${des} |
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
#include <stdlib.h> | |
#include <stdio.h> | |
#include <immintrin.h> | |
const static __m256i SEED_MUL = _mm256_set1_epi32(214013); | |
const static __m256i SEED_ADDI = _mm256_set1_epi32(2531011); | |
const static __m256i SEED_MASK = _mm256_set1_epi32(0x3F800000); | |
const static __m256 FLOAT_1 = _mm256_set1_ps(1.f); | |
const static __m256i INT32_1 = _mm256_set1_epi32(1); |
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
int checksum(const char *str) | |
{ | |
int weight[] = {7, 3, 1}; | |
int checksum = 0; | |
int len = strlen(str); | |
for (int i = 0; i < len; ++i) { | |
int mappedNum = 0; | |
if (isdigit(str[i])) { |
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 numpy as np | |
import cv2 | |
import glob | |
# termination criteria | |
criteria = (cv2.TERM_CRITERIA_EPS + cv2.TERM_CRITERIA_MAX_ITER, 30, 0.001) | |
cbrow = 7 | |
cbcol = 9 |
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
#include <utility> | |
#include <iostream> | |
class ctor | |
{ | |
public: | |
ctor() | |
{ | |
std::cout << "default ctor" << std::endl; | |
} |
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
#include <cstdio> | |
#include <cstdint> | |
#include <cstring> | |
#include <iostream> | |
#include <vector> | |
#include <openssl/ecdsa.h> | |
#include <openssl/sha.h> | |
#include <openssl/pem.h> | |
#include <openssl/x509.h> |
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 vpn ipsec ipsec-interfaces interface pppoe0 | |
set vpn ipsec auto-firewall-nat-exclude enable | |
set vpn ipsec nat-traversal enable | |
set vpn ipsec esp-group esp-azure compression disable | |
set vpn ipsec esp-group esp-azure lifetime 3600 | |
set vpn ipsec esp-group esp-azure mode tunnel | |
set vpn ipsec esp-group esp-azure pfs disable | |
set vpn ipsec esp-group esp-azure proposal 1 encryption aes256 | |
set vpn ipsec esp-group esp-azure proposal 1 hash sha1 |
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
all: | |
g++ -shared interop.cpp -o libmain.so |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <gnutls/gnutls.h> | |
#include <gnutls/x509.h> | |
int main(void) | |
{ | |
FILE *fl; |
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
function [ freq ] = HPS(audiofile) | |
CORRECTFACTOR=1; | |
[sample, fs] = audioread(audiofile); | |
fftn = fs; | |
sample = sample .* hann(length(sample)); | |
fftr = abs(fft(sample,fftn)); | |
fftr = fftr(1:fftn/2); | |
OlderNewer