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
| # Your init script | |
| # | |
| # Atom will evaluate this file each time a new window is opened. It is run | |
| # after packages are loaded/activated and after the previous editor state | |
| # has been restored. | |
| # | |
| # An example hack to log to the console when each text editor is saved. | |
| # | |
| # atom.workspace.observeTextEditors (editor) -> | |
| # editor.onDidSave -> |
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
| sudo apt-get remove scala-library scala | |
| sudo wget www.scala-lang.org/files/archive/scala-2.10.4.deb | |
| sudo dpkg -i scala-2.10.4.deb | |
| sudo apt-get update | |
| sudo apt-get install scala | |
| wget http://scalasbt.artifactoryonline.com/scalasbt/sbt-native-packages/org/scala-sbt/sbt/0.12.4/sbt.deb | |
| sudo dpkg -i sbt.deb | |
| sudo apt-get update | |
| sudo apt-get install sbt |
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
| /* | |
| * Catch v1.3.3 | |
| * Generated: 2016-01-22 07:51:36.661106 | |
| * ---------------------------------------------------------- | |
| * This file has been merged from multiple headers. Please don't edit it directly | |
| * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. | |
| * | |
| * Distributed under the Boost Software License, Version 1.0. (See accompanying | |
| * file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) | |
| */ |
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 java.io.*; | |
| import java.util.InputMismatchException; | |
| /** | |
| * Created by Shreyans on $DATE at $TIME using IntelliJ IDEA (Fast IO Template) | |
| */ | |
| class $NAME | |
| { | |
| public static void main(String[] args) throws Exception |
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
| // Get the method | |
| try { | |
| java.lang.reflect.Method method = obj.getClass().getMethod(methodName, param1.class, param2.class, ..); | |
| } catch (SecurityException e) { | |
| e.printStackTrace(); | |
| } catch (NoSuchMethodException e) { | |
| e.printStackTrace(); | |
| } | |
| // Invoke the method |
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 <time.h> | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| inline uint64_t rdtsc() { | |
| uint32_t lo, hi; | |
| __asm__ __volatile__ ( | |
| "xorl %%eax, %%eax\n" | |
| "cpuid\n" |
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 enum AcademicDegree { | |
| DEGREE_MSC, DEGREE_PHD, DEGREE_PHD_HAB, DEGREE_PROF; | |
| private static final AcademicDegree[] VALUES = values(); | |
| private static final int SIZE = VALUES.length; | |
| private static final Random RANDOM = new Random(); | |
| public static AcademicDegree getRandomLetter() { | |
| return VALUES[RANDOM.nextInt(SIZE)]; |
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 java.io.BufferedReader; | |
| import java.io.File; | |
| import java.io.FileNotFoundException; | |
| import java.io.FileReader; | |
| import java.io.IOException; | |
| import java.nio.charset.Charset; | |
| import java.nio.file.Files; | |
| import java.nio.file.Path; | |
| import java.nio.file.Paths; | |
| import java.util.Scanner; |
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
| #define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); } | |
| inline void gpuAssert(cudaError_t code, const char *file, int line, bool abort=true) | |
| { | |
| if (code != cudaSuccess) | |
| { | |
| fprintf(stderr,"GPUassert: %s %s %d\n", cudaGetErrorString(code), file, line); | |
| if (abort) exit(code); | |
| } | |
| } |
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 <termios.h> | |
| void hide_keystrokes() { | |
| struct termios tty; | |
| tcgetattr(STDIN_FILENO, &tty); | |
| tty.c_lflag &= ~ECHO; | |
| tcsetattr(STDIN_FILENO, TCSANOW, &tty); | |
| } | |
| void show_keystrokes() { |