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
#! /usr/bin/env python | |
# | |
# Example program using irc.bot. | |
# | |
# Joel Rosdahl <[email protected]> | |
"""A simple example bot. | |
This is an example bot that uses the SingleServerIRCBot class from | |
irc.bot. The bot enters a channel and listens for commands in |
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 -*- | |
"""Database module, including the SQLAlchemy database object and DB-related | |
utilities. | |
""" | |
from sqlalchemy.orm import relationship | |
from .extensions import db | |
from .compat import basestring | |
# Alias common SQLAlchemy names |
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 datetime as dt | |
from flask_login import UserMixin | |
from recruit_app.extensions import bcrypt | |
from recruit_app.database import ( | |
Column, | |
db, | |
Model, |
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
/* NAME: Samantha Prickett | |
* CLASS: CSC 102.002 | |
* PROGRAM: program7.java | |
* DATE: 03/15/15 | |
**/ | |
import javax.swing.JOptionPane; | |
// Tells java to use JOptionPane | |
import java.util.*; | |
public class program7{ |
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
@staticmethod | |
def update_characters_from_list(characters): | |
for character in characters.result: | |
if EveManager.check_if_character_exist(characters.result[character]['id']): | |
eve_char = EveManager.get_character_by_character_name(characters.result[character]['name']) | |
if characters.result[character]['alliance']['id'] != 0: | |
if str(characters.result[character]['alliance']['id']) != eve_char.alliance_id: | |
if not EveAllianceInfo.query.filter_by(alliance_id=character.alliance_id).first(): | |
allianceinfo = EveApiManager.get_alliance_information(characters.result[character]['alliance']['id']) | |
if allianceinfo: |
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
@staticmethod | |
def update_characters_from_list(characters, user_id, api_id): | |
EveManager.create_alliances_from_list(characters) | |
EveManager.create_corporations_from_list(characters) | |
EveManager.create_characters_from_list(characters, user_id, api_id) | |
for character in characters.result: | |
if EveManager.check_if_character_exist(characters.result[character]['id']): | |
eve_char = EveManager.get_character_by_character_name(characters.result[character]['name']) |
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 datetime as dt | |
from recruit_app.extensions import bcrypt | |
from recruit_app.database import ( | |
Column, | |
db, | |
Model, | |
ReferenceCol, | |
relationship, |
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 -*- | |
'''The app module, containing the app factory function.''' | |
from flask import Flask, render_template | |
from recruit_app.settings import ProdConfig | |
from recruit_app.assets import assets | |
from recruit_app.extensions import ( | |
bcrypt, | |
cache, | |
db, |
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
from http://www.reddit.com/r/dataisbeautiful/comments/1yyo3f/i_pulled_up_my_skype_conversation_logs_and_made_a/cfxi46n | |
-------bash --------------- | |
sqlite3 ~/Library/Application\ Support/Skype/[skypeUsername]/main.db "SELECT author, from_dispname, datetime(timestamp, 'unixepoch') as date, body_xml FROM Messages ORDER BY timestamp;" > ~/Desktop/skype.log | |
----------python now-------------- | |
with open('/Users/[YOUR USER]/Desktop/skype.log') as log: | |
data = log.readlines() |
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
from flask import flash, current_app, url_for, redirect, request | |
from rauth import OAuth2Service | |
class OAuthSignIn(object): | |
providers = None | |
def __init__(self, provider_name): | |
self.provider_name = provider_name | |
credentials = current_app.config['OAUTH_CREDENTIALS'][provider_name] | |
self.consumer_id = credentials['id'] |