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
dbd4792efe78a537191bebaafff323eed332f0194bf246f80893f9ccedc04e38 |
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
# Start a local webserver to serve the file of your current directory on the LAN: | |
# Python version 2.x: | |
python -m SimpleHTTPServer | |
# Python version 3.x: | |
python3 -m http.server | |
#Start a local SMTP server to debug your app emails. Emails will be printed on stdout: | |
python -m smtpd -c DebuggingServer -n | |
#Parse and prettify a JSON string with: |
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
class Karatsuba | |
attr_reader :ab, :cd, :result, :right_result, :multipliers | |
def right? | |
@right_result == @result | |
end | |
private | |
def initialize ab, cd, right_result | |
@right_result = right_result |
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
var gulp = require('gulp'); | |
var connect = require('gulp-connect'); | |
gulp.task('serve', function () { | |
connect.server({ | |
port: 3000 | |
}); | |
}); | |
gulp.task('default', ['serve']); |
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 <omp.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <time.h> | |
#define N 10 | |
int main() | |
{ | |
srand(time(NULL)); |
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 <mpi.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <math.h> | |
#include <omp.h> | |
#include <time.h> | |
#define N 10 | |
int main(int argc, char** argv) { |
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
strToBase64: function(input){ | |
var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', | |
result = '', | |
chr1, chr2, chr3, | |
enc1, enc2, enc3, enc4, | |
i = 0; | |
do { | |
chr1 = input.charCodeAt(i++); | |
chr2 = input.charCodeAt(i++); |
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 <omp.h> | |
#include <stdio.h> | |
int num_threads, thread_id; | |
int main() | |
{ | |
#pragma omp threadprivate(thread_id) | |
#pragma omp parallel | |
{ |
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
#define BUF_SIZE 10 | |
#define NC 8 | |
#define NP 3 | |
#define MAX_RAND_INT 100 | |
#define MIN_RAND_INT 0 | |
#include <pthread.h> | |
#include <semaphore.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
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
(function(){ | |
function* test() { | |
let data = yield getData(); | |
console.log(data); | |
if(data > 30) { | |
yield foo(); | |
} else { | |
console.log("Fail"); | |
} |
NewerOlder