Skip to content

Instantly share code, notes, and snippets.

View crysmej04's full-sized avatar

Crystal Mejia crysmej04

View GitHub Profile
@crysmej04
crysmej04 / add_trip.html
Created January 31, 2018 05:14
Travel Buddy
<!DOCTYPE html>
<html lang="en">
<head>
{% load staticfiles %}
<link rel="stylesheet" type="text/css" href="{% static 'users_app/css/styles.css' %}">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<form action="{% url 'index' %}" method="POST" class="form-horizontal">
{% csrf_token %}
<input class="btn btn-default" id="submitbutton" type="submit" value="Logout">
</form>
@crysmej04
crysmej04 / index.html
Created January 25, 2018 03:08
Login/Registration
<html>
<head>
<meta charset="utf-8">
<title>Login and Registration</title>
<meta name="description" content="Login and Registration exercises for Django">
{% load staticfiles %}
<link rel="stylesheet" type="text/css" href="{% static 'loginapps/css/styles.css' %}">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
</head>
<body>
1)
Use world;
SELECT Country.Name, CountryLanguage.Language, CountryLanguage.Percentage
FROM Country
left join CountryLanguage on CountryLanguage.CountryCode = Country.Code
WHERE CountryLanguage.Language = 'Slovene'
ORDER BY CountryLanguage.Percentage DESC;
2)
Use world;
<html>
<head>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='style.css') }}">
<style>
body{
text-align: center;
}
div.box{
height: 150px;
width: 150px;
<h2>About Me:</h2>
<div>My name is Rick Sanchez. I like to get Rickity Rickity Recked, son.</div>
Wubba Lubba Dubb Dubb, Grass tastes bad.
Don't forget to get Schwifty, kids!
<p><a href='/projects'>Check out this list!</a></p>
import random
import itertools
outcomes = { 'heads':0,
'tails':0,
}
sides = outcomes.keys()
for n in range(1,5001):
outcomes[ random.choice(sides) ] += 1
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\Crystal Mejia>python
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> x = ["hello",2,54,-2,7,12,98,"world"]
>>> print x[0]
hello
>>> print x[7]
Microsoft Windows [Version 10.0.14393]
(c) 2016 Microsoft Corporation. All rights reserved.
C:\Users\Crystal Mejia>$ pip install {{python]]
'$' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\Crystal Mejia>pip
Usage:
<!doctype html>
<html>
<head>
<title>Gotta Catch 'Em All!</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
for (var i = 1; i < 152; i++) {
$('body').append(`<img src="http://pokeapi.co/media/img/${i}.png">`)
}
var users = {
'Students': [
{first_name: 'Michael', last_name : 'Jordan'},
{first_name : 'John', last_name : 'Rosales'},
{first_name : 'Mark', last_name : 'Guillen'},
{first_name : 'KB', last_name : 'Tonel'}
],
'Instructors': [
{first_name : 'Michael', last_name : 'Choi'},
{first_name : 'Martin', last_name : 'Puryear'}