Movies as code - Free your coding mind...
"Unfortunately, no one can be told what the Matrix is. You have to see it for yourself."
Morpheus, The Matrix
January 3, 2013 | Action | submitted by nick
def watch():
makes_sense = true
number_of_episodes_made = 121
number_of_episodes_left = number_of_episodes_made
while number_of_episodes_left:
makes_sense = false
print "I hate myself"
number_of_episodes_left -= 1
Vote up this code4
| Comedy | submitted by vake
dude@dude :~$ whereis mycar | grep "continuum transfunctioner"
Vote up this code2
| Adventure | submitted by vake
public String getLife(float number){
return "a fearsome Bengal tiger.";
}
public static void main(){
System.out.println(this.getLife(Math.PI));
}
Vote up this code4
| Science Fiction | submitted by Bussiere
import sys
class inception():
level = 0
level_max = 0
current_level = 0
def __init__(self,level_max=6):
self.level_max=level_max
def spinning_top(self):
n = 1
while True:
if (n-1 > self.current_level) :
print 'we can go deeper'
print n-1
try:
sys._getframe(n)
except ValueError:
self.current_level = n - 1
return n - 1
n += 1
def going_deeper(self):
self.level = self.spinning_top()
if self.level < self.level_max :
self.level = self.spinning_top()
y = self
y.going_deeper().next()
yield (self.level)
yield(self.level)
Voyage = inception(5)
Voyage.spinning_top()
Voyage.going_deeper().next()
Vote up this code3
December 19, 2012 | Science Fiction | submitted by Jill-Jênn
Disney.budget -= 350000000 # 250M for the film, 100M for the marketing
Disney.budget +- 282778100 # Oops
Disney.fire('Rich Ross') # Head of Walt Disney Studios
Vote up this code6
| Science Fiction | submitted by OzVessalius
Kyon->WakeUp();
Kyon->SearchForHaruhi(boost::bind(&SearchForHaruhiHandler, Kyon));
void SearchForHaruhiHandler(CKyon* pKyon)
{
if (!pKyon->HaveFoundHaruhi())
{
pKyon->GetKickedByTsuruya();
pKyon->Cry();
pKyon->FindYuki();
pKyon->PlayToComputer();
God* pHaruhi = pKyon->SearchHaruhiSync(); // Synchronous
if (pHaruhi != nullptr)
{
pHaruhi->Listen(pKyon);
pHaruhi->GoFindMikuruYukiItsukiAndKyon();
pHaruhi->ImagineTheBrigadeSOS();
pKyon->PowerOnComputer();
Computer->DisplayShell("~Yuki");
pKyon->UseKeyOnComputer(); // Magic Spell.
pKyon->Yell("YEAAAAAAAAAAAAAAAAAAAAAAAAAAH !");
pKyon->TimeTravel(Time::Now() - Time::Years(3), Mikuru->NewVersion()));
pKyon->TalkingAboutTimeTravellingWithYukiAndMikuru();
pKyon->TakeAGunMadeByYuki();
pKyon->TimeTravel(Time::Now + Time::Years(3), Mikuru->NewVersion());
pKyon->TryToShootOldYuki();
pKyon->GetStabbed();
pKyon->SeeOldMikuruAndNewMikuruWTF();
Unknown->SaveKyonEveryone();
pKyon->NothingHasHappen();
}
else
throw std::runtime_error("Haruhi won't go to school.");
}
else
throw std::runtime_error("Failed to make Haruhi disappear.");
}
Vote up this code1
| Horror | submitted by Adriana Elizondo
$n = 7;
while ($n > 0){
echo "$n days";
$n--;
}
if ($n == 0){
echo "Time's up!";
echo '
';
echo '
';
echo '
';
}
?>
Vote up this code1
| Action | submitted by Edgar Eler
for(Actor actor : hollywood.getActorsList()){
if((actor.getAge() > 60 && actor.getSuccessRate() < 0.25) || actor.getSalary() <= 500 || actor.isStuntman()){
movie.getActorsList().add(actor);
}
}
movie.setHistory(null);
movie.setPlot(null);
movie.setDialogs(null);
movie.setSoundtrack(new File("C:UsersSlyMusicboom.wav"));
movie.setFrameTransitionEffect(new File("C:UsersSlyPicturesexplosion.gif"));
Vote up this code4
| Comedy | submitted by Jill-Jênn
class Ralph(object):
@staticmethod
def yell(mantra):
print mantra.upper()
@staticmethod
def wreck(item):
del item
class Vanellope(object):
@staticmethod
def cries():
return False # SPOILER
games = ['Fix-It Felix', '...', 'Sugar Rush'] # SPOILER
for game in games:
Ralph.yell("I'm gonna wreck it!")
for item in game:
Ralph.wreck(item)
if Vanellope.cries():
break
Vote up this code1