code stringlengths 1 1.72M | language stringclasses 1
value |
|---|---|
#!/usr/bin/python
import datetime
import sys
import textwrap
import common
from xml.dom import pulldom
PARSER = """\
/**
* Copyright 2009 Joe LaPenna
*/
package com.joelapenna.foursquare.parsers;
import com.joelapenna.foursquare.Foursquare;
import com.joelapenna.foursquare.error.FoursquareError;
import com.joel... | Python |
#!/usr/bin/python
"""
Pull a oAuth protected page from foursquare.
Expects ~/.oget to contain (one on each line):
CONSUMER_KEY
CONSUMER_KEY_SECRET
USERNAME
PASSWORD
Don't forget to chmod 600 the file!
"""
import httplib
import os
import re
import sys
import urllib
import urllib2
import urlparse
import user
from xml.... | Python |
#!/usr/bin/python
import os
import subprocess
import sys
BASEDIR = '../main/src/com/joelapenna/foursquare'
TYPESDIR = '../captures/types/v1'
captures = sys.argv[1:]
if not captures:
captures = os.listdir(TYPESDIR)
for f in captures:
basename = f.split('.')[0]
javaname = ''.join([c.capitalize() for c in basena... | Python |
#!/usr/bin/python
import logging
from xml.dom import minidom
from xml.dom import pulldom
BOOLEAN = "boolean"
STRING = "String"
GROUP = "Group"
# Interfaces that all FoursquareTypes implement.
DEFAULT_INTERFACES = ['FoursquareType']
# Interfaces that specific FoursqureTypes implement.
INTERFACES = {
}
DEFAULT_CLA... | Python |
# Django settings for festivalrock project.
#import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'... | Python |
from django.db import models
from django.contrib.auth.models import User
import barcode
from barcode.writer import ImageWriter
from festivalrock.settings import MEDIA_ROOT
from festivalrock.utils import CurrencyField
from datetime import date, timedelta
from decimal import Decimal
from django.template.defaultfilters im... | Python |
from django.db import models
from decimal import Decimal
class CurrencyField(models.DecimalField):
__metaclass__ = models.SubfieldBase
def __init__(self, *args, **kwargs):
kwargs['max_digits'] = 8
kwargs['decimal_places'] = 2
super(CurrencyField, self).__init__(*args, **kwargs)
... | Python |
from django import forms
from festivalrock.models import Descuento, Sector, DescuentoAnticipada, Festival,\
PuntoVenta, Noche, Presentacion, Banda
from festivalrock.utils import CurrencyField
class EmitirTicketForm(forms.Form):
DESCUENTOS_CHOICE = [( descuento.id, descuento.__str__() ) for descuento in Descue... | Python |
'''
Created on 09/07/2013
@author: root
'''
import unittest
from barcode.writer import ImageWriter
from barcode.ean import EAN8
class Test(unittest.TestCase):
def testName(self):
ean = EAN8(u'123456789', writer=ImageWriter())
fullname = ean.save('ean13_barcode')
pass
if __name__ == "__... | Python |
from django.conf.urls.defaults import patterns, include, url
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from festivalrock.models import Festival, Presentacion, Banda,\
Sector, Descuento, PuntoVenta, PerfilUsuario, DescuentoAnticipada, Butaca,\
Fila, Entrada, EntradaMen... | Python |
from django.core.management.base import BaseCommand
from festivalrock.models import PuntoVenta, PerfilUsuario, Festival, Presentacion,\
Banda, Sector, Descuento, DescuentoAnticipada, Noche
from optparse import make_option
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from ... | Python |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Vendedor.tipoUsuario'
db.add_column('festivalrock_vendedor', 'tipoUsuario',
... | Python |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Sector.cantidadButacas'
db.delete_column('festivalrock_sector', 'cantidadButacas')
... | Python |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'Vendedor'
db.delete_table('festivalrock_vendedor')
# Adding model 'PerfilUsuario'... | Python |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Sector.color'
db.add_column('festivalrock_sector', 'color',
self.gf('d... | Python |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Banda'
db.create_table('festivalrock_banda', (
('id', self.gf('django.db.models.... | Python |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Festival.sectores'
db.add_column('festivalrock_festival', 'sectores',
... | Python |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Festival.sectores'
db.delete_column('festivalrock_festival', 'sectores_id')
# Add... | Python |
# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Noche.sectores'
db.delete_column('festivalrock_noche', 'sectores_id')
# Adding M2... | Python |
"""
WSGI config for festivalrock project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATI... | Python |
from decimal import Decimal
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.core.urlresolvers import reverse
from django.forms.models import inlineformset_factory
from django.http import HttpRequest, HttpRespo... | Python |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "festivalrock.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| Python |
#!/usr/bin/env python
import os
import sys
import time
import shutil
import commands
from PyQt4 import QtGui,QtCore
def initialize():
'Set Working directory'
if 'core' in os.listdir(os.getcwd()):
create_directory()
else:
variable = sys.argv[0]
direc = os.path.dirname(variable)
... | Python |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'untitled.ui'
#
# Created: Wed Mar 30 10:34:13 2011
# by: PyQt4 UI code generator 4.8.3
#
# WARNING! All changes made in this file will be lost!
import os
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.f... | Python |
import os
from main_window import font_size
from PyQt4 import QtCore, QtGui
font_setting = font_size()
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
class Ui_ray_fusion(object):
def setupUi(self, ray_fusion):
... | Python |
import os
from main_window import font_size
from PyQt4 import QtCore, QtGui
font_setting = font_size()
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
class Ui_cookie_hijacker(object):
def setupUi(self, cookie_hijack... | Python |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Users\SAVIOUR\Desktop\untitled.ui'
#
# Created: Sun Sep 02 13:02:23 2012
# by: PyQt4 UI code generator 4.8.4
#
# WARNING! All changes made in this file will be lost!
import os
from main_window import font_size
from PyQt4 im... | Python |
import os
from main_window import font_size
from PyQt4 import QtCore, QtGui
font_setting = font_size()
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
class tips_dialog(object):
def setupUi(self, tips_dialog):
tips_dialog.setObjectName(_fromU... | Python |
import os
from main_window import font_size
from PyQt4 import QtCore, QtGui
font_setting = font_size()
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
class Ui_attack_settings(object):
def setupUi(self, attack_settings):
attack_settings.set... | Python |
import os
from main_window import font_size
from PyQt4 import QtCore, QtGui
font_setting = font_size()
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
class toolbox_win(object):
def setupUi(self, toolbox_win):
... | Python |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'untitled.ui'
#
# Created: Thu Oct 14 08:16:19 2010
# by: PyQt4 UI code generator 4.7.7
#
# WARNING! All changes made in this file will be lost!
import os
from main_window import font_size
from PyQt4 import QtCore, QtGui
fon... | Python |
__all__ = ['database', 'font_settings','main_window', 'tips', 'toolbox', 'attack_panel','geotrack','attack_settings','cookie_hijacker','ray_fusion','fern_pro_tip']
| Python |
import os
from main_window import font_size
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
font_setting = font_size()
class database_ui(object):
def setupUi(self, database):
database.setObjectName(_fromUtf8("dat... | Python |
# -*- coding: utf-8 -*-
#
# Created: Thu Aug 07 19:58:03 2014
# by: PyQt4 UI code generator 4.10.1
#
# WARNING! All changes made in this file will be lost!
import os
from main_window import font_size
from PyQt4 import QtCore, QtGui
font_setting = font_size()
try:
_fromUtf8 = QtCore.QString.fro... | Python |
import os
from main_window import font_size
from PyQt4 import QtCore, QtGui
font_setting = font_size()
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
class Ui_fern_geotrack(object):
def setupUi(self, fern_geotrack):
fern_geotrack.setObjectNa... | Python |
import os
import sys
import commands
from PyQt4 import QtCore, QtGui
#
# Create default font setting
#
if '.font_settings.dat' not in os.listdir(os.getcwd()):
default_font = open('%s/.font_settings.dat'%(os.getcwd()),'a+')
default_font.write('font_size = 7')
default_font.close()
def font_si... | Python |
import os
import thread
import sqlite3
import tracker_core
from gui.geotrack import *
from core import variables
from PyQt4 import QtGui,QtCore
fern_map_access = tracker_core.Fern_Geolocation()
class Fern_geolocation_tracker(QtGui.QDialog,Ui_fern_geotrack):
'''Main windows class'''
def __in... | Python |
#-------------------------------------------------------------------------------
# Name: Fern_Track
# Purpose: Tracking geographical location of Access points using mac address
#
# Author: Saviour Emmanuel Ekiko
#
# Created: 14/06/2011
# Copyright: (c) Fern Wifi Cracker 2011
# Licence: ... | Python |
#-------------------------------------------------------------------------------
# Name: MITM Core (Man In The Middle)
# Purpose: Redirecting Network traffic to attack host by various MITM engines
#
# Author: Saviour Emmanuel Ekiko
#
# Created: 15/08/2012
# Copyright: (c) Fern Wifi Cracker ... | Python |
#-------------------------------------------------------------------------------
# Name: Mozilla Cookies Engine
# Purpose: Mozilla Firefox Cookie Engine
#
# Author: Saviour Emmanuel Ekiko
#
# Created: 20/07/2012
# Copyright: (c) Fern Wifi Cracker 2012
# Licence: <GNU GPL v3>
#
#
#--... | Python |
#-------------------------------------------------------------------------------
# Name: Bruteforce Core
# Purpose: Bruteforcing network services
#
# Author: Saviour Emmanuel Ekiko
#
# Created: 27/11/2012
# Copyright: (c) Fern Wifi Cracker 2012
# Licence: <GNU GPL v3>
#
#
#---------... | Python |
import re
import os
import time
import signal
import sqlite3
import commands
import subprocess
from PyQt4 import QtCore,QtGui
from gui.cookie_hijacker import *
from mozilla_cookie_core import *
from cookie_hijacker_core import *
class Fern_Cookie_Hijacker(QtGui.QDialog,Ui_cookie_hijacker):
def _... | Python |
__all__ = ['tracker_core','fern_tracker','fern_cookie_hijacker','cookie_hijacker_core','mozilla_cookie_core','MITM_Core','fern_ray_fusion','bruteforce_core'] | Python |
#-------------------------------------------------------------------------------
# Name: Fern_Cookie_Hijacker
# Purpose: Captures http cookies from wireless networks
#
# Author: Saviour Emmanuel Ekiko
#
# Created: 14/06/2012
# Copyright: (c) Fern Wifi Cracker 2012
# Licence: <GNU GPL v... | Python |
import re
import string
import webbrowser
from PyQt4 import QtCore,QtGui
from gui.ray_fusion import *
from core.variables import *
from bruteforce_core import *
tutorial_link = "http://www.youtube.com/watch?v=_ztQQWMoVX4" # Video Tutorial link
class Ray_Fusion(QtGui.QDialog,Ui_ray_fusion):
def... | Python |
from core.fern import *
from core.tools import*
from core.functions import *
from core.settings import *
from core.variables import *
from gui.attack_panel import *
from core import variables
#
# Wep Attack window class for decrypting wep keys
#
class wep_attack_dialog(QtGui.QDialog,Ui_attack_panel):
... | Python |
#-------------------------------------------------------------------------------
# Name: WPS Core
# Purpose: For WPS Attacks using the (Reaver) tool
#
# Author: Saviour Emmanuel Ekiko
#
# Created: 03/09/2012
# Copyright: (c) Fern Wifi Cracker 2012
# Licence: <GNU GPL v3>
#
#
#------... | Python |
from core.fern import *
############# WEP/WPA/WPS GLOBAL VARIABLES #################
#
# WPS Variables
#
wps_functions = object() # Instance of WPS class
#
# Network scan global variable
#
scan_control = 0
static_channel = str()
monitor_interface = str()
monitor_mac_address = str()
#
# Upda... | Python |
import re
from core.fern import *
from gui.attack_panel import *
from core.functions import *
from core.settings import *
from core.variables import *
from core import variables
from PyQt4 import QtGui,QtCore
#
# Wpa Attack window class for decrypting wep keys
#
class wpa_attack_dialog(QtGui.QDialog,Ui... | Python |
import os
import sqlite3
class Fern_settings(object):
def __init__(self):
self.cwd = os.getcwd()
self._create_settings_directory()
self.settings_file = "key-database/Database.db"
self.settings_object = sqlite3.connect(self.settings_file)
self.cursor_object = self.settings_o... | Python |
__all__ = ['fern','wep','wpa','wps','database','tools','variables','functions','settings'] | Python |
import os
import re
import sqlite3
import commands
import subprocess
################### DATABASE INSERTION FUNCTIONS ##############
#
# Create database if it does not exist
#
def database_create():
temp = sqlite3.connect(os.getcwd() + '/key-database/Database.db') # Database File and Tab... | Python |
import core
from gui.database import *
from core.functions import *
from core.variables import *
#
# Class for Database key entries
#
class database_dialog(QtGui.QDialog,database_ui):
def __init__(self):
QtGui.QDialog.__init__(self)
self.setupUi(self)
self.retranslateUi(self)
... | Python |
import os
import re
import sys
import time
import thread
import urllib2
import shutil
import sqlite3
import commands
import subprocess
import variables
from PyQt4 import QtGui,QtCore
from wep import *
from wpa import *
from wps import *
from tools import *
from database import *
from variables import *
from functions... | Python |
from core import variables
from gui.tips import *
from gui.toolbox import *
from gui.settings import *
from gui.geotrack import *
from gui.font_settings import *
from core.variables import *
from core.functions import *
from gui.attack_settings import *
from core.settings import *
from gui.fern_pro_tip impo... | Python |
#!/usr/bin/env python
import os
import sys
import time
import shutil
import commands
from PyQt4 import QtGui,QtCore
def initialize():
'Set Working directory'
if 'core' in os.listdir(os.getcwd()):
create_directory()
else:
variable = sys.argv[0]
direc = os.path.dirname(variable)
... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import util
import json
import sys
import context
try:
fp = open("config.json","r")
file = fp.read()
j = json.read(file)
context.Config = j
fp.close()
except Exception:
print(u"設定ファイル形式が不正です。JSONフォーマットで記述してください。")
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
スピンコントロール設置パッケージ
"""
import context
import wx
import util
import event
"""
スピンコントロールビルダー
"""
class Builder:
"""
イニシャライズ
"""
def __init__(self):
self.ctrl = {}
self.count = event.Count()
"""
ボタン構築
"""
def bu... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
コンテキスト
"""
"""
メインフレームオブジェクト
"""
UI = None
"""
設定
"""
Config = None
"""
カウントオブジェクト
"""
Count = None
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
イベント処理
"""
import context
import re
import codecs
import util
import win32clipboard
import win32con
import thread
import threading
import ctypes
import ctypes.wintypes
import time
user32 = ctypes.windll.user32
ASFW_ANY = -1
LSFW_LOCK = 1
LSFW_UNLOCK = 2
WS_EX_LAYERE... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
ボタン設置パッケージ
"""
import context
import wx
import util
import event
"""
ボタンビルダー
"""
class Builder:
"""
イニシャライズ
"""
def __init__(self):
self.button = []
self.count = event.Count()
"""
ボタン構築
"""
def build(self):... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import util
import json
import sys
import context
try:
fp = open("config.json","r")
file = fp.read()
j = json.read(file)
context.Config = j
fp.close()
except Exception:
print(u"設定ファイル形式が不正です。JSONフォーマットで記述してください。")
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import util
import json
import sys
import context
try:
fp = open("config.json","r")
file = fp.read()
j = json.read(file)
context.Config = j
except Exception:
print(u"設定ファイル形式が不正です。JSONフォーマットで記述してください。")
"""
ctl = util.CountTool()
ctl... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import wx
import context
import util
import bank
class Builder:
def __init__(self, conf):
self.conf = conf
self.list = wx.ListCtrl(self.conf.target_panel,-1, style = wx.LC_REPORT, size=(500, 200))
pass
def setData(self):
se... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
コンテキスト
"""
"""
メインフレームオブジェクト
"""
UI = None
"""
設定
"""
Config = None
"""
カウントオブジェクト
"""
Count = None
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
コンテキスト
"""
"""
メインフレームオブジェクト
"""
UI = None
"""
設定
"""
Config = None
"""
カウントオブジェクト
"""
Count = None
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
イベント処理
"""
import context
import re
import codecs
import util
import win32clipboard
import win32con
import thread
import threading
import ctypes
import ctypes.wintypes
import time
user32 = ctypes.windll.user32
ASFW_ANY = -1
LSFW_LOCK = 1
LSFW_UNLOCK = 2
WS_EX_LAYERE... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
スピンコントロール設置パッケージ
"""
import context
import wx
import util
import event
"""
スピンコントロールビルダー
"""
class Builder:
"""
イニシャライズ
"""
def __init__(self):
self.ctrl = {}
self.count = event.Count()
"""
ボタン構築
"""
def bu... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import wx
import context
import util
import bank
class Builder:
def __init__(self, conf):
self.conf = conf
self.list = wx.ListCtrl(self.conf.target_panel,-1, style = wx.LC_REPORT, size=(500, 200))
pass
def setData(self):
se... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
ボタン設置パッケージ
"""
import context
import wx
import util
import event
"""
ボタンビルダー
"""
class Builder:
"""
イニシャライズ
"""
def __init__(self):
self.button = []
self.count = event.Count()
"""
ボタン構築
"""
def build(self):... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
スピンコントロール設置パッケージ
"""
import context
import wx
import util
import event
"""
スピンコントロールビルダー
"""
class Builder:
"""
イニシャライズ
"""
def __init__(self):
self.ctrl = {}
self.count = event.Count()
"""
ボタン構築
"""
def bu... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
ボタン設置パッケージ
"""
import context
import wx
import util
import event
"""
ボタンビルダー
"""
class Builder:
"""
イニシャライズ
"""
def __init__(self):
self.button = []
self.count = event.Count()
"""
ボタン構築
"""
def build(self):... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
スピンコントロール設置パッケージ
"""
import context
import wx
import util
import event
"""
スピンコントロールビルダー
"""
class Builder:
"""
イニシャライズ
"""
def __init__(self):
self.ctrl = {}
self.count = event.Count()
"""
ボタン構築
"""
def bu... | Python |
import string
import types
## json.py implements a JSON (http://json.org) reader and writer.
## Copyright (C) 2005 Patrick D. Logan
## Contact mailto:patrickdlogan@stardecisions.com
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Lesser Genera... | Python |
from distutils.core import setup
import py2exe
setup(windows=[
{'script':'bank.py', "icon_resources": [(1,"bank.ico")]}])
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
ボタン設置パッケージ
"""
import context
import wx
import util
import event
"""
ボタンビルダー
"""
class Builder:
"""
イニシャライズ
"""
def __init__(self):
self.button = []
self.count = event.Count()
"""
ボタン構築
"""
def build(self):... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
イベント処理
"""
import context
import re
import codecs
import util
import win32clipboard
import win32con
import thread
import threading
import ctypes
import ctypes.wintypes
import time
user32 = ctypes.windll.user32
ASFW_ANY = -1
LSFW_LOCK = 1
LSFW_UNLOCK = 2
WS_EX_LAYERE... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
コンテキスト
"""
"""
メインフレームオブジェクト
"""
UI = None
"""
設定
"""
Config = None
"""
カウントオブジェクト
"""
Count = None
| Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import wx
import context
import util
import bank
class Builder:
def __init__(self, conf):
self.conf = conf
self.list = wx.ListCtrl(self.conf.target_panel,-1, style = wx.LC_REPORT, size=(500, 200))
pass
def setData(self):
se... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import wx
import context
import util
import bank
class Builder:
def __init__(self, conf):
self.conf = conf
self.list = wx.ListCtrl(self.conf.target_panel,-1, style = wx.LC_REPORT, size=(500, 200))
pass
def setData(self):
se... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import util
import json
import sys
import context
try:
fp = open("config.json","r")
file = fp.read()
j = json.read(file)
context.Config = j
except Exception:
print(u"設定ファイル形式が不正です。JSONフォーマットで記述してください。")
"""
ctl = util.CountTool()
ctl... | Python |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
イベント処理
"""
import context
import re
import codecs
import util
import win32clipboard
import win32con
import thread
import threading
import ctypes
import ctypes.wintypes
import time
user32 = ctypes.windll.user32
ASFW_ANY = -1
LSFW_LOCK = 1
LSFW_UNLOCK = 2
WS_EX_LAYERE... | Python |
#!/usr/bin/env python
import time
t = time.time()
u = time.gmtime(t)
s = time.strftime('%a, %e %b %Y %T GMT', u)
print 'Content-Type: text/javascript'
print 'Cache-Control: no-cache'
print 'Date: ' + s
print 'Expires: ' + s
print ''
print 'var timeskew = new Date().getTime() - ' + str(t*1000) + ';'
| Python |
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
import os
PRJ_PATH=os.path.realpath(os.path.dirname(__file__))
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
if DEBUG:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
from django.db import models
class SMSLog(models.Model):
u'''
短信发送日志
'''
phone = models.CharField(u'手机号码(飞信登录账户)',max_length=50)
receiver = models.CharField(u'接受手机ID',max_length=1024,blank=True, null=True)
ip = models.CharField(u'登录IP',max_le... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
from django.http import HttpResponse,HttpResponseRedirect
from fetion.models import FetionStatus,SMSQueue
from fetion.models import FETION_STATUS_ENUM
from api.models import SMSLog
from django.utils import simplejson as json
import datetime
def query_img(request... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
from django.db import models
class SMSLog(models.Model):
u'''
短信发送日志
'''
phone = models.CharField(u'手机号码(飞信登录账户)',max_length=50)
receiver = models.CharField(u'接受手机ID',max_length=1024,blank=True, null=True)
ip = models.CharField(u'登录IP',max_le... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
from django.conf.urls.defaults import patterns, url
urlpatterns = patterns('api.views',
url(r'^q_img/(\d+)/([^/]+)$', 'query_img'),
url(r'^q_info/(\d+)/([^/]+)$', 'query_info'),
url(r'^post_sms/(\d+)/([^/]+)$', 'post_sms'),
)
| Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
from django.conf.urls.defaults import patterns, url
urlpatterns = patterns('api.views',
url(r'^q_img/(\d+)/([^/]+)$', 'query_img'),
url(r'^q_info/(\d+)/([^/]+)$', 'query_info'),
url(r'^post_sms/(\d+)/([^/]+)$', 'post_sms'),
)
| Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
from django.http import HttpResponse,HttpResponseRedirect
from fetion.models import FetionStatus,SMSQueue
from fetion.models import FETION_STATUS_ENUM
from api.models import SMSLog
from django.utils import simplejson as json
import datetime
def query_img(request... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
'''
Created on 2011-12-31
@author: fredzhu.com
'''
import threading,urllib,urllib2,time,datetime
import os,random,sys
from django.conf import settings
reload(sys)
if not settings.DEBUG:
sys.setdefaultencoding('utf8')
try:
import json
e... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
from django.db import models
import logging
logger = logging.getLogger('fetion')
FETION_STATUS_ENUM = (
("ONLINE",u"正常"),
("OFF",u"关闭"),
)
class FetionStatus(models.Model):
u'''
维护飞信程序状态
'''
phone = models.CharField(u'手机号码(飞信登录账户)',max_len... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
'''
Created on 2011-12-31
@author: fredzhu.com
'''
u'''
程序基于https://webim.feixin.10086.cn/login.aspx发送消息.不记录密码
'''
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.http import HttpResponse,HttpResponseRedire... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
import smtplib
from email.MIMEMultipart import MIMEMultipart
from email.MIMEText import MIMEText
#设置服务器,用户名、口令以及邮箱的后缀
mail_host="smtp.gmail.com"
mail_user="ad@fengsage.com"
mail_pass="sd145914sd"
def send_mail(to, subject, text):
msg = MIMEMult... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
import urllib2,datetime,re
def cron_check(datetime,cron):
u'''cron表达式
语法:
m[1-24] s[0-59]
参数:
* 通配任意
'''
def _validate(c,s,type):
u'''验证下
'''
if c == "*":
return True
c = int(c)
... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
import datetime
def cron_check(datetime,cron):
u'''cron表达式
语法:
d[1-12] D[1-31] m[1-24] s[0-59]
参数:
* 通配任意
'''
def _validate(c,s,type):
u'''验证下
'''
if c == "*":
return True
c ... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
from django.db import models
import logging
logger = logging.getLogger('fetion')
FETION_STATUS_ENUM = (
("ONLINE",u"正常"),
("OFF",u"关闭"),
)
class FetionStatus(models.Model):
u'''
维护飞信程序状态
'''
phone = models.CharField(u'手机号码(飞信登录账户)',max_len... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
from django.conf.urls.defaults import patterns, url
urlpatterns = patterns('fetion.views',
url(r'^$', 'index'),
url(r'^login$','login'),
url(r'^logout$','logout'),
url(r'^fetion/login$', 'fetion_login'),
url(r'^fetion/query$', 'fetion... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
CITY_LIST = (
('101210301',u'嘉兴'),
('101020100',u'上海')
)
def weather(city):
u'''天气预报
'''
import urllib2,json
API = u'http://m.weather.com.cn/data/%s.html'%city
resp = urllib2.urlopen(API)
if resp.getcode()!=200:
... | Python |
#!/usr/bin/env python
# --*-- encoding:utf-8 --*--
'''
Created on 2011-12-31
@author: fredzhu.com
'''
import threading,urllib,urllib2,time,datetime
import os,random,sys
from django.conf import settings
reload(sys)
if not settings.DEBUG:
sys.setdefaultencoding('utf8')
try:
import json
e... | Python |
Subsets and Splits
SQL Console for ajibawa-2023/Python-Code-Large
Provides a useful breakdown of language distribution in the training data, showing which languages have the most samples and helping identify potential imbalances across different language groups.