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
#!/usr/bin/env python | |
# -- coding: utf-8 -- | |
import numpy,os,caffe | |
import scipy.misc | |
import numpy as np | |
MODEL_FILE="models/bvlc_alexnet/deploy.prototxt" | |
PRETRAINED_MODEL_FILE="models/bvlc_alexnet/bvlc_alexnet.caffemodel" | |
CATEGORY_FILE="data/ilsvrc12/synset_words.txt" |
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
package main | |
import ( | |
"fmt" | |
"github.com/PuerkitoBio/goquery" | |
"os" | |
"strconv" | |
) | |
func gradeToScore(grade string) float64 { |
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
Index: include/ndk/pstypes.h | |
=================================================================== | |
--- include/ndk/pstypes.h (revision 67961) | |
+++ include/ndk/pstypes.h (working copy) | |
@@ -826,6 +826,77 @@ | |
#ifndef NTOS_MODE_USER | |
// | |
+// Job Information Structures for NtQueryInformationJobObject | |
+// |
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 System.Environment | |
import System.IO | |
import Data.Bits | |
run :: String -> String -> String | |
run source input = run' ([], source) ([], (repeat 0)) input | |
run' :: (String, String) -- a zipper for instructions | |
-> ([Int], [Int]) -- a zipper for memory |
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 Debug.Trace | |
import Data.List | |
import Data.Bits | |
--main = putStrLn (imageToPpm (render 640 480 4 2)) | |
main = putStrLn (imageToPpm (render 320 240 8 4)) | |
-- it takes about one hour in my laptop | |
-- constants |
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 Control.Monad | |
charToInteger c = toInteger (fromEnum c - fromEnum '0') | |
cutDown x | |
| x >= fromIntegral 0 = floor x | |
| otherwise = ceiling x | |
-- cards scores | |
solve :: String -> [Integer] -> [Integer] |
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 <iostream> | |
#include <string> | |
#include <algorithm> | |
#include <vector> | |
#include <set> | |
#include <map> | |
using namespace std; | |
class Solver { |
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
#!/usr/bin/env ruby | |
your_class = 'ぬ' | |
hiragana = 'あいうえお' \ | |
'かきくけこ' \ | |
'さしすせそ' \ | |
'たちつてと' \ | |
'なにぬねの' \ | |
'はひふへほ' \ | |
'まみむめも' \ |
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 <vector> | |
#include <set> | |
#include <cmath> | |
using namespace std; | |
class px { | |
public: | |
px(void){this->x = 0; this->y = 0;return;} | |
px(int x, int y){this->x = x;this->y = y;return;} | |
int x, y; |
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> | |
inline int colour(int N, int a, int b){ | |
if(a > N / 2) a = N - a + 1; | |
if(b > N / 2) b = N - b + 1; | |
if(a > b){ | |
int t = a; | |
a = b; | |
b = t; | |
} | |
return ((a - 1) % 3) + 1; |
NewerOlder