示例#1
0
文件: bio.py 项目: qholness/homepage
def bio():
  """Define your bio here and quotes"""
  import sys
  import random
  from run import location
  from nav import nav
  from head import head
  from javascript import javascript
  from quotes_text import quote_pic, quote_list





  quote_person = random.choice(quote_list.keys())
  quote = quote_list[quote_person]
  pic = quote_pic[quote_person]




  return '''
    <html lang="en">
    '''+head()+'''
      <body>
        '''+nav()+'''
              <div class="container">
                <div class="starter-template">
                  <div align=left>
                    <h2>Sup,</h2>
                    <img src="/static/images/self_bbq.jpg" height=180px width=240px />
                    </br>
                    <p>I Guess my story is just starting to open.</p>
                    <p>Hi! My name is Quentin and I am currently a City Employee in Chicago. I work in the budget office and perform budget analysis for requests, proposals and examine capital projects</p>
                    <p>In my spare time I am learning programming/web development, an avid gamer, a chef (kind of) and an <em>Economist</em></p>
                    <p>I enjoy examing our world from an economic perspective and my favorite part of the field was Strategy and Urban Economics</p>
                    <p>There's a lot to be learned about Public Finance from SimCity 4... The best City-simulator ever</p>
                    </br>
                    <p>Along with the accolades of academia and work I would like to do some game design.</p>
                    <p>One of the reasons I love video games so much is because they're an unexplored territory for many individuals and I constantly find myself saying: You know, this would be much more intuitively conveyed if you designed a game around it.</p>
                    <p>I would like to find the midpoint of programming, economics and game design (probably known as <em>Software Engineer</em>) and this site is part of that process</p>

                  </div>
                  <div class="span3">
                    '''+pic+'''
                      </br>
                    <p>
                      '''+quote+'''
                    </p>
                  </div>
                </div>
              </div>
        '''+javascript()+'''
示例#2
0
文件: run.py 项目: qholness/homepage
def under_construction():
	'''Page currently under construction'''
	import sys
	from run import location
	from nav import nav
	from head import head
	from javascript import javascript
	return '''
	<html lang="en">
	'''+head()+'''
		<body>
		'''+nav()+'''
			<div class="container">
				<div class="starter-template">
					<div class="span9">
						<h1>Page Currently Under Under Construction</h1>
					</div>
				</div>
			</div>
		'''+javascript()+'''
示例#3
0
def war():
  import sys
  from run import location
  from nav import nav
  from head import head
  from javascript import javascript





  return '''
    <html lang="en">
    '''+head()+'''
      <body>
        '''+nav()+'''
              <div class="container">
                <div class="row-fluid" align="center">
                  <h1>Under Construction</h1>
                  </div>
                </div>
              </div>
        '''+javascript()+'''
示例#4
0
文件: main.py 项目: GudmundurE/leikur
import random
import classes
import mobs
import nav
import directions
import weapons
import fight
from playsound import playsound
from os import system

cls = lambda: system('cls')

playsound('Tonlist_Leikur_1.mp3', False)

kort = nav.nav()

x_pos = random.randint(4, 8)
y_pos = random.randint(4, 8)

player_xp = 0
cls()
print("Welcome")
wants_to_play = input("Press enter to start playing...")
cls()

while True:

    print("You play as a dwarf who is on his way to a bar")
    class_chosen = input("Chose your class: Warrior/1, Ranger/2, Mage/3: ")

    if class_chosen == "1":
示例#5
0
def travel_description():
  """Define your travel blog here and quotes"""
  from selenium import webdriver  
  import sys
  import random
  from run import location
  from nav import nav
  from head import head
  from javascript import javascript
  import time
  sys.path.insert(0, location+"/static")





  return '''
      <html lang="en">
      '''+head()+'''
        <body>
          '''+nav()+'''
                <div class="container">
                  <div class="starter-template">
                    <div class="span9" align="left">
                      <img src="/static/images/Milwaukee_2015/puffy_face.jpg" height=240px width=360px style="opacity:1.0"/>
                      <h3>It's nice to travel every once in a while.</h3>
                          <p>Coming from a military background, you move around a lot. Unfortunately, you kind of lose pieces of yourself with each move. But after a while, you realize that those pieces can be replaced by experiences and people. After working in City Hall for about 7 months, my girlfriend Mimi Brown and I decided to take a weekend and travel to somewhere we've never been before...</p>
                          <p></p>
                    </div>

                    <div class="span8" align="right">
                      <img src="/static/images/Milwaukee_2015/SAM_0487.jpg" heigh=266px width=266px/>
                      <h3>It was a small trip but...</h3>
                        <p>When you're starting over sometimes it is best to start slow.</p>
                        <p>I hadn't traveled anywhere in a while and Milwaukee is a city I've always been kind of fascinated with. I don't know much about the city but after living in many places, I kind of realized that Midwestern cities have a bit more of a European feel to them than many other cities.</p>
                        <p>That can probably be chalked up to the high heritage and immigrant representation and the fact that many of these cities are very old and are made up of late 1800's-early 1900's newcomers looking for the American Dream...</p>
                        <p><em>Somehow they found Milwaukee</em></p>
                    </div>

                    <div class="span8" align="left">
                      <img src="/static/images/Milwaukee_2015/SAM_0365.jpg" heigh=266px width=266px/>
                      <h3>It's quite a large city but...</h3>
                        <p>Downtown felt a bit vacant this weekend.</p>
                        <p><em>Which is extremely contradictory to this photo</em></p>
                        <p>It's something that I note about every city I go to. I've got a soft spot for urban planning and architecture so I examine the city I'm in from as much as I know about urban planning as possible.</p>
                        <p>In that mindset, I really enjoyed Milwaukee! I tried convincing Mimi to rent a scooter with me but she was terrified!</p>
                        <p>Also... The scooter place was apparently closed for good and we didn't find out until we got there... Bummer!</p>
                    </div>

                    <div class="span8" align="right">
                      <img src="/static/images/Milwaukee_2015/SAM_0228.jpg" heigh=266px width=266px/>
                      <h3>There's a lot to do for a tourist!</h3>
                        <p>The Milwaukee Lakeshore trumps the Chicago Lakeshore in my mind now!</p>
                        <p>It was probably the open space, the giant park with a lagoon in the middle, the fact that it was, oddly, more developed as a park than a tourist trap and I enjoyed the views of the city from the Lakefront. Milwaukee has some pretty cool buildings...</p>
                        <p>And stairs! I have a slight love of stairs in grassy places and Milwaukee had a set! Bridges in Chicago or okay... BUT STAIRS!</p>
                        <p>Maybe it's because it reminded me of Italian skinny staircases between buildings.</p>
                        <p>Regardless, whoever decided that stairs were a good idea here has my condolences. There's even ramps for handicap access.</p>
                        <p><em>And it never hurts to see a little whale tail</em></p>
                    </div>

                    <div class="span8" align="left">
                      <img src="/static/images/Milwaukee_2015/SAM_0465.jpg" heigh=266px width=266px/>
                      <h3>People Are Really Nice in Milwaukee</h3>
                        <p>There's a lot of rude people everywhere you go but strangly... Milwaukee surprised me.</p>
                        <p>Mimi and I were walking at night back to our hotel and we were crossing a street. There was a car in our path on the crosswalk and the gentleman driving the great Buick stuck his head out of the window and shouted: "I'm sorry! I'm in the way!"</p>
                        <p><em>This came as a shock.</em></p>
                        <p>After coming across many drivers who don't care for the safety of many pedestrians... Milwaukee was an amazing experience as a pedestrian. Maybe it was the clearer skies. Maybe it was the slower pace.</p>
                        <p>Regardless of the matter, I felt safe enough walking the streets of Milwaukee even if some of them were ghost towns compared to Chicago's hustle and bustle.</p>
                        
                        <p>There was also this guy with a pet lizard!</p>
                        <p>It was the first time I'd ever touched one and... To be honest... It made me want a pet lizard.</p>
                        <p>She was very docile. Not at all what I expected out of a lizard.</p>
                        <p>Would I be interested in living in Milwaukee? Not right now... But if I could commute from Milwaukee to Chicago, I might consider it.</p>
                        <p>Especially for this view:</p>
                        <img src="/static/images/Milwaukee_2015/Rustico.jpg" height="240px" width="360px"/>
                    </div>

                    <div class="span8" align="left">
                      <h3>All in all, it was worth it.</h3>
                        <p>If there's one thing to take away from anything it's that there's a vast world out there worth experiencing.</p>
                        <p>Not everyone gets the privilege of travel and not everyone gets the privilege of leisure.</p>
                        <p>So my adivce: <em>share</em>.</p>
                        <p>Don't just share what you take in but share who you are and share your ideas.</p>
                        <p>We've got too many caustic things in the world to hold onto.</p>
                        <em><p>It's best to lift your hands...</p>
                        <p>Let go</p>
                        <p>And enjoy life</p></em>
                    </div>
                  <div class='container'>
                    <em><p align='left'>Signing off</p>
                  <p align=left> -Quentin</p></em>
                  </div>
                  </div>
                </div>
          '''+javascript()+'''
示例#6
0
def travel_blog():
  """Define your travel blog here and quotes"""
  import sys
  import random
  import requests
  from run import location
  from nav import nav
  from head import head
  from javascript import javascript
  sys.path.insert(0, location+"/static")
  from places_been import places
  import time
  random.seed(int(time.time()))

  


  def trips(destinations):
    localelist = ['''<li><a href="/templates/travel/'''+i+'''"><p>'''+i+'''</p></a></li>''' for i in destinations[0:5]]
    return localelist

  localelist = trips(places)

  choice = random.choice(places)
  search_choice = choice.split()
  new_search = []
  for i in search_choice:
    if i==" ":
      new_search.append('+')
    else:
      new_search.append(i)
  search_choice = "".join(new_search)

  gmaps_api_key = "AIzaSyBcbjQasg7sG9X2knTPjfN301ZPsxrNc6w"


  """HTML"""
  return '''
    <html lang="en">
    '''+head()+'''
      <body>
        '''+nav()+'''
              <div class="container">
                <div class="starter-template">
                  <div class="span3" align="left">
                   <ul>
                    '''+"".join(localelist)+'''
                   </ul>
                  </div>
                    <iframe width="100%"height="600"frameborder="0" style="border:0" src="https://www.google.com/maps/embed/v1/place?key='''+gmaps_api_key+'''&q='''+search_choice+'''&attribution_source=Google+Maps+Embed+API &attribution_web_url=http://www.butchartgardens.com/ &attribution_ios_deep_link_id=comgooglemaps://?daddr=Butchart+Gardens+Victoria+BC" allowfullscreen></iframe>             
                </div>
              </div>
        '''+javascript()+'''
      </body>
    </html>
  '''
# <iframe width="100%"height="600"frameborder="0" style="border:0"src="https://www.google.com/maps/embed/v1/place?key='''+gmaps_api_key+'''&q='''+search_choice+'''&attribution_source=Google+Maps+Embed+API &attribution_web_url=http://www.butchartgardens.com/ &attribution_ios_deep_link_id=comgooglemaps://?daddr=Butchart+Gardens+Victoria+BC" allowfullscreen> </iframe> 


# /*<script>
#                       var options = {
#                           center: new google.maps.LatLng(55.378051, -3.435973),
#                           mapTypeId: google.maps.MapTypeId.ROADMAP,
#                           zoom: 8
#                       };
#                       var map = new google.maps.Map(document.getElementById('map'), options);

#                       var coords = [
#                           [54.97784, -1.612916],
#                           [55.378051, -3.435973]
#                           // and additional coordinates, just add a new item
#                       ];

#                       for (var i = 0; i < coords.length; i++) {
#                           // create a closure for your latitude/longitude pair
#                           (function(coord) {
#                               // set the location...
#                               var latLng = new google.maps.LatLng(coord[0], coord[1]);
#                               // ...and add the Marker to your map
#                               var marker = new google.maps.Marker({
#                                   position: latLng,
#                                   map: map
#                               });
#                           })(coords[i]);
#                       };
#                   </script>
示例#7
0
def Walmart_closings():
  import sys
  from run import location
  sys.path.insert(0, location+"/static")
  from nav import nav
  from head import head
  from javascript import javascript




  return '''
  <html lang="en">
  '''+head()+'''
  <body>
  '''+nav()+'''

    <div class="container">

      <div class="starter-template">
        <div class="span9">
          <h1>Under Construction</h1>
      </div>
    </div>
    '''+javascript()+'''
    </body>
</html>
'''





#   return '''
# 	<html lang="en">
#  	'''+head()+'''
#   <body>
#   '''+nav()+'''

#     <div class="container">

#       <div class="starter-template">
#         <div class="span9">
#           <h1>This page is meant for walmart closings</h1>
#           <p class="lead">You'll need a few things: A map and statisticss about the walmart: asset value, location... All organized in a nice format for others to use</p>
#         </div>
#       </div>

#     <div class="container">
#       <p>Paragraph 1</p>
#     </div>

#     </div>
#     <div class="container-fluid">
#     <p>Testing</p>
#       <div class="row">
#         <p >Things I like</p>
#         <div class="span3">
#           <iframe height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/213051315&color=2fa1c7&show_artwork=false"></iframe>
#         </div>
#       </div>
#     </div>
#     '''+javascript()+'''
#     </body>
# </html>
# '''