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
| # Check if SSE instructions are available on the machine where | |
| # the project is compiled. | |
| MACRO (FindSSE) | |
| IF(CMAKE_SYSTEM_NAME MATCHES "Linux") | |
| EXEC_PROGRAM(cat ARGS "/proc/cpuinfo" OUTPUT_VARIABLE CPUINFO) | |
| STRING(REGEX REPLACE "^.*(sse2).*$" "¥¥1" SSE_THERE ${CPUINFO}) | |
| STRING(COMPARE EQUAL "sse2" "${SSE_THERE}" SSE2_TRUE) |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.ComponentModel; | |
| using System.Linq; | |
| using System.Linq.Expressions; | |
| namespace MongoDB.Migrations | |
| { | |
| public class MigratableObject : ISupportInitialize | |
| { |
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
| _ = ( | |
| 255, | |
| lambda | |
| V ,B,c | |
| :c and Y(V*V+B,B, c | |
| -1)if(abs(V)<6)else | |
| ( 2+c-4*abs(V)**-0.4)/i | |
| ) ;v, x=1500,1000;C=range(v*x | |
| );import struct;P=struct.pack;M,\ | |
| j ='<QIIHHHH',open('M.bmp','wb').write |
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
| """Information Retrieval metrics | |
| Useful Resources: | |
| http://www.cs.utexas.edu/~mooney/ir-course/slides/Evaluation.ppt | |
| http://www.nii.ac.jp/TechReports/05-014E.pdf | |
| http://www.stanford.edu/class/cs276/handouts/EvaluationNew-handout-6-per.pdf | |
| http://hal.archives-ouvertes.fr/docs/00/72/67/60/PDF/07-busa-fekete.pdf | |
| Learning to Rank for Information Retrieval (Tie-Yan Liu) | |
| """ | |
| import numpy as np |
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
| // memdjpeg - A super simple example of how to decode a jpeg in memory | |
| // Kenneth Finnegan, 2012 | |
| // blog.thelifeofkenneth.com | |
| // | |
| // After installing jpeglib, compile with: | |
| // cc memdjpeg.c -ljpeg -o memdjpeg | |
| // | |
| // Run with: | |
| // ./memdjpeg filename.jpg | |
| // |
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
| // From http://stackoverflow.com/questions/9128519/reading-many-values-from-numpy-c-api | |
| /* | |
| Make | |
| g++ -o matrix_multiply.o -c matrix_multiply.cpp -I{python include file for numpy/noprefix.h} -I{python include} -fPIC -O2 -Wno-deprecated -Wno-write-strings | |
| g++ -o matrix_multiply.so -shared matrix_multiply.o -L{boost lib path} -lz -lm -ldl -lpthread -boost_python | |
| Python code: | |
| import numpy | |
| import matrix_multiply |
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
| using System; | |
| using System.CodeDom.Compiler; | |
| using System.IO; | |
| using System.Linq; | |
| using System.Reflection; | |
| using System.Text; | |
| using System.Web.Razor; | |
| using Microsoft.CSharp; | |
| namespace SpecUtils |
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
| #Gitignore for files generated by Xilinx ISE | |
| *.log | |
| *.svf | |
| *.scr | |
| *.cmd | |
| *.bak | |
| *.lso | |
| *.elf | |
| *.ace |
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
| public static class BubbleBabble | |
| { | |
| private static readonly string vowels = "aeiouy"; | |
| private static readonly string consonants = "bcdfghklmnprstvzx"; | |
| public static string Convert(byte[] bytes) | |
| { | |
| int seed = 1; | |
| int rounds = 1 + bytes.Length / 2; | |
| StringBuilder result = new StringBuilder(); |
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
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Runtime.InteropServices; | |
| using System.Windows.Media; | |
| using System.Windows.Media.Imaging; | |
| namespace OpenCVFaceDetector | |
| { | |
| class DllPaths |