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
# coding: utf-8 | |
# In[1]: | |
import os | |
import tensorflow as tf | |
import glob | |
import random | |
from numpy.random import randint |
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
# coding: utf-8 | |
import os | |
import numpy as np | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import matplotlib.image as mpimg |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <pthread.h> | |
int x = 0; | |
int n = 100; | |
pthread_t tid[100]; | |
pthread_mutex_t mut = PTHREAD_MUTEX_INITIALIZER; |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <pthread.h> | |
int x = 0; | |
int n = 100; | |
pthread_t tid[100]; |
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
array = %w(a b c) | |
hash = Hash[array.collect.zip(array.map{|c| c.upcase})] | |
p hash | |
# {"a"=>"A", "b"=>"B", "c"=>"C"} |
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
var MyImmutableArray = (function() { | |
var flyweight = {}; | |
return function(from, to) { | |
var k = from + ':' + to; | |
if (!flyweight[k]) { | |
var array = []; | |
for (var i = from; i <= to; i++) { | |
array.push(i); |
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
var Crepe = function() { | |
this.cost = function() { return 200; }; | |
this.toppings = function() { return []; }; | |
}; | |
var Topping = function(crepe) {}; | |
Topping.prototype = { | |
cost: function () { | |
return this.crepe.cost() + this.settings.cost; | |
}, |
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
var abstractBallFactory = (function() { | |
var types = {}; | |
return { | |
getBall: function(type, customizations) { | |
var constractor = types[type]; | |
return ( constractor ? new constractor(customizations) : null ); | |
}, | |
registerBall: function(type, constractor) { | |
types[type] = constractor; | |
return abstractBallFactory; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<div> | |
<form id="print-form"> | |
<p> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
</body> | |
</html> |
NewerOlder