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 sublime, sublime_plugin | |
import subprocess | |
pwd = "" | |
class MePasswordCommand(sublime_plugin.WindowCommand): | |
def run(self): | |
self.window.show_input_panel("password", "", self.on_input, self.getpwd, None) | |
def getpwd(self, password): |
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
# basic makefile for D language - made by darkstalker slightly modified by matovitch | |
DCC=dmd | |
DFLAGS= -w | |
LIBS= | |
SRC= $(wildcard *.d) | |
OBJ= $(SRC:.d=.o) | |
INT= $(SRC:.d=.di) | |
DOC= $(SRC:.d=.html) | |
OUT= $(shell basename `pwd`) | |
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
#ifndef MYLSH_H | |
#define MYLSH_H | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <limits.h> | |
static const uint8_t uint_shuf[256] = {0x7f,0x87,0x95,0x7e,0xf1,0x0c,0x2c,0xc5, | |
0x8f,0xba,0xf3,0xcd,0x09,0xa2,0x5b,0x8e, | |
0xd7,0xf0,0x39,0x85,0x3c,0xe7,0xd4,0x7a, |
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 "mylsh.h" | |
int main(int argc, char** argv) { | |
if (argc != 3) | |
return EXIT_FAILURE; |
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 <queue> | |
#include <cstdlib> | |
#include <iostream> | |
static const int n_log2 = 3; //length of the array log2 | |
static const int n = 1 << n_log2; //length of the array | |
static const int ker = 3; //length of the kernel | |
int abs(int x) | |
{ |
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
#ifndef __KMEANS_H__ | |
#define __KMEANS_H__ | |
#include <ctime> | |
#include <vector> | |
#include <limits> | |
#include <cstddef> | |
namespace kmeans | |
{ |
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 <ctime> | |
#include <cstddef> | |
#include <algorithm> | |
#include <iostream> | |
#include "kmeans.hpp" | |
static const std::size_t nPoints = 50000; | |
static const std::size_t nClusters = 100; | |
struct Point |
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
#ifndef __VISITOR_HPP__ | |
#define __VISITOR_HPP__ | |
template<typename... Types> | |
struct Visitor; | |
template<typename... Visitors> | |
struct Visitable; | |
template<typename T> |
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 "visitor.hpp" | |
#include <iostream> | |
class OtherTypeAsteroid; | |
class ExplodingAsteroid; | |
class ApolloSpacecraft; | |
class OthersSpacecraft; | |
class SpaceShip {}; | |
class Asteroid : public Visitor<ApolloSpacecraft, OthersSpacecraft>{}; |
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
mode ASSEMBLER | |
{ | |
"iadd" => TKN_IADD; | |
"isub" => TKN_ISUB; | |
"imul" => TKN_IMUL; | |
"idiv" => TKN_IDIV; | |
"imod" => TKN_IMOD; | |
"ineg" => TKN_INEG; |
OlderNewer