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
| def conv_bn(inp, oup, stride): | |
| return nn.Sequential( | |
| nn.Conv2d(inp, oup, 3, stride, 1, bias=False), | |
| nn.BatchNorm2d(oup), | |
| nn.ReLU6(inplace=True) | |
| ) | |
| def conv_1x1_bn(inp, oup): | |
| return nn.Sequential( |
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
| import sys | |
| from pathlib import Path | |
| from functools import partial | |
| from collections import defaultdict | |
| import logging | |
| import torch | |
| logger = logging.getLogger(__name__) |
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
| import threading | |
| import time | |
| import flask | |
| import cv2 | |
| class CameraThread(threading.Thread): | |
| def __init__(self): | |
| super().__init__() |
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
| #! /usr/bin/env python3 | |
| import argparse | |
| from pathlib import Path | |
| from random import shuffle | |
| import shutil | |
| if __name__ == '__main__': | |
| parser = argparse.ArgumentParser(description=""" | |
| Split a dataset in two given a ratio. |
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
| local torch =require 'torch' | |
| local nn =require 'nn' | |
| local rnn =require 'rnn' | |
| local gnuplot = require 'gnuplot' | |
| torch.setnumthreads(4) | |
| print('number of threads: ' .. torch.getnumthreads()) | |
| batchSize = 16 | |
| rho = 16 -- sequence length |
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
| #pragma once | |
| #include <cstdint> | |
| #include <cassert> | |
| #include <algorithm> | |
| #include <cstdlib> | |
| #include <cstdio> | |
| namespace net { |
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
| maze : maze.o | |
| gcc $^ -o $@ | |
| %.o : %.c | |
| gcc -std=c99 -Wall -Werror $^ -c -o $@ |
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
| " Night Garden | |
| " Author: Simon Guillot <[first name].[last name]@epita.fr> | |
| " Note: Based on the Tomorrow-Night-Eighties theme | |
| hi clear | |
| set background=dark | |
| if version > 580 | |
| " no guarantees for version 5.8 and below, but this makes it stop | |
| " complaining |
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
| The C implementation is rather more complex than the C++ version. |
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 <boost/spirit/include/qi.hpp> | |
| #include <boost/spirit/include/phoenix_core.hpp> | |
| #include <boost/spirit/include/phoenix_operator.hpp> | |
| #include <boost/spirit/include/phoenix_stl.hpp> | |
| #include <iostream> | |
| #include <vector> | |
| #include <string> | |
| std::vector<std::string> parse_enum(const std::string enum_str) { | |
| namespace spirit = boost::spirit; |
NewerOlder