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
from lxml import etree | |
def main(): | |
some_file = "http://gist.github.com/api/v1/xml/gists/kennethreitz" | |
tree = etree.parse(some_file) | |
root = tree.getroot() | |
for element in root.iter("description"): | |
print("%s" % (element.text)) | |
main() |
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
#=============================================================================== | |
# lab7.py | |
# Student Name: Michael O'Connell | |
# Assignment: Lab #7 | |
# Submission Date: 11/05/2008 | |
# Honor Code Statement: I received no assistance on this assignment that | |
# violates the guidelines as set forth by the instructor | |
# and the class syllabus. | |
# References: Blackboard Forums, Python Texts, Lab and Class Slides, http://forums.devshed.com/python-programming-11/password-input-100483.html for the getpass help | |
# Comments: Over all no major problems, figuring out how to use the dictionaries was a little tough. Instead of using a raw_input for the |
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
Downloading/unpacking krpython | |
Running setup.py egg_info for package krpython | |
warning: no files found matching 'CHANGELOG' | |
warning: no files found matching 'data/krpython.desktop' | |
Requirement already satisfied (use --upgrade to upgrade): pygments in /usr/local/Cellar/python/2.7/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from krpython) | |
Downloading/unpacking pyparsing (from krpython) | |
Running setup.py egg_info for package pyparsing | |
Requirement already satisfied (use --upgrade to upgrade): xerox in /usr/local/Cellar/python/2.7/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages (from krpython) |
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
#!/usr/bin/perl -w | |
use strict; | |
my$f= $[;my | |
$ch=0;sub l{length} | |
sub r{join"", reverse split | |
("",$_[$[])}sub ss{substr($_[0] | |
,$_[1],$_[2])}sub be{$_=$_[0];p | |
(ss($_,$f,1));$f+=l()/2;$f%=l | |
();$f++if$ch%2;$ch++}my$q=r |
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
from flask import Flask, Response, render_template | |
import time | |
import datetime | |
import random | |
app = Flask(__name__) | |
MEETING_TITLES = ['Firefly Fan Club Meeting', 'Klingon 302: Dealing with Qapla\'', 'Star Trek: An Introduction to Looking Pensive in your Ready Room', 'Synergy Ad Synergy Targeting Synergy', 'Synergy', 'Star Wars: How to Discover the Force Within', 'Elvish 101: Na vedui!', 'Sign Builders Anonymous', 'Very Important Business Meeting', 'Branded Integrations with Content Creators', 'User Sourced Ad Integration with P2P Technology', 'Cloudsourced Integration Synergy', 'Matching Brands to Alpha Based Consumers', 'Radical Transparency with Multistage Engagement', 'Mobile Based App Farming and You', 'Geotargeting Adserve with Content Synergy'] | |
ENDPOINTS_MAIN = ['/', '/xml'] | |
ENDPOINTS_XML = ['/xml/ems'] | |
ENDPOINTS_EMS = ['/xml/ems/city', '/xml/ems/envision', '/xml/ems/delphi', '/xml/ems/salespro', '/xml/ems/ebms', '/xml/ems/isac'] |
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
import sys | |
import os | |
import struct | |
from ctypes import (CDLL, get_errno) | |
from ctypes.util import find_library | |
from socket import ( | |
socket, | |
AF_BLUETOOTH, | |
SOCK_RAW, | |
BTPROTO_HCI, |
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
from bs4 import BeautifulSoup | |
import csv | |
import requests | |
def get_linup(): | |
"""Returns a request response object of the lineup html""" | |
return requests.get('http://lineup.bonnaroo.com') |
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
<xsl:key name="product" match="/xpath/xpath/text()" use="." /> | |
<xsl:template match="/"> | |
<xsl:for-each select="/xpath/xpath/text()[generate-id()= generate-id(key('product',.)[1])]"> | |
<li> | |
<xsl:value-of select="."/> | |
</li> | |
</xsl:for-each> |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading.Tasks; | |
using Microsoft.AspNetCore.Mvc; | |
using Microsoft.AspNetCore.Http; | |
using Microsoft.AspNetCore.Http.Headers; | |
using Newtonsoft.Json; | |
namespace Test.Controllers |
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
using System; | |
using System.Diagnostics; | |
using System.Linq; | |
using System.IO.Ports; | |
using SpotifyAPI.Local; | |
using System.Collections.Generic; | |
using System.Collections.Concurrent; | |
using System.Threading; | |
class PortDataReceived |
OlderNewer