Skip to content

Instantly share code, notes, and snippets.

View SMaguina's full-sized avatar

Sylvia Maguiña SMaguina

View GitHub Profile
@SMaguina
SMaguina / program.cs
Created January 8, 2016 00:08
File transfer script
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace FileTransfer
{
class Program
@SMaguina
SMaguina / pydrill.py
Last active November 2, 2015 01:40
Web Page GUI Drill Project *Final Draft* - Python 3
import tkinter as tk
from tkinter import ttk
import webbrowser
import sqlite3
#Create database
db = sqlite3.connect('storagetest.db')
cursor = db.cursor()
cursor.execute('''CREATE TABLE IF NOT EXISTS content(id INTEGER PRIMARY KEY, name TEXT)''')
db.commit()
@SMaguina
SMaguina / dogdb.py
Created October 17, 2015 02:54
Dog Shelter Sqlite Database - Python 2
import sqlite3
conn = sqlite3.connect('dogrecord.db')
def createTable():
conn.execute("CREATE TABLE if not exists DOG_INFO( \
ID INTEGER PRIMARY KEY AUTOINCREMENT, \
NAME TEXT, \
GENDER TEXT, \
MICROCHIP INT, \
@SMaguina
SMaguina / tkintersqlite.py
Last active November 2, 2015 01:40
Web Page Generator GUI *Draft*- Python 3
from tkinter import *
from tkinter import ttk
import webbrowser
import sqlite3
#Create database
db = sqlite3.connect('storagetest.db')
cursor = db.cursor()
cursor.execute('''CREATE TABLE IF NOT EXISTS content(id INTEGER PRIMARY KEY, name TEXT)''')
db.commit()
@SMaguina
SMaguina / ruby.rb
Created October 15, 2015 04:33
Decoding the Mystery
message = "Fraq hf gur pbqr lbh hfrq gb qrpbqr guvf zrffntr"
def decode_entry(num)
if num == 32
num.chr
elsif num < 78
(num + 13).chr
else
(num - 13).chr
end
@SMaguina
SMaguina / featuresdb.py
Last active August 24, 2020 07:05
Combining SQLite and wxPython GUI feature requests - Python 2
import wx
import sqlite3
import os
import datetime as dt
import time
import shutil
class Frame(wx.Frame):
def __init__(self, title):
wx.Frame.__init__(self, None, title=title, size=(500,250))
@SMaguina
SMaguina / guiscripts.py
Created October 7, 2015 23:06
wxPython GUI File Import Drill - Python 2
import wx
import os
import datetime as dt
import shutil
class Frame(wx.Frame):
def __init__(self, title):
wx.Frame.__init__(self, None, title=title, size=(300,250))
panel = wx.Panel(self)
@SMaguina
SMaguina / timezones.py
Last active October 9, 2015 05:08
Datetime Drill - Python 2
from datetime import datetime, timedelta
from pytz import timezone
#Time Format
fmt = "%H:%M:%S"
now_pacific = datetime.now(timezone('US/Pacific'))
print 'Portland HQ Time:', now_pacific.strftime(fmt)
now_eastern = now_pacific.astimezone(timezone('US/Eastern'))
@SMaguina
SMaguina / phonelist.py
Created October 5, 2015 22:25
Phone List Tkinter App Drill
from tkinter import *
from phones import *
import pickle
def whichSelected () :
print ("At %s of %d" % (select.curselection(), len(phonelist)))
return int(select.curselection()[0])
def addEntry () :
phonelist.append ([nameVar.get(), phoneVar.get()])
@SMaguina
SMaguina / feedback_form.py
Created October 1, 2015 23:09
Explore Cali Feedback Form - http://explorecalifornia.org
from tkinter import *
from tkinter import ttk
from tkinter import messagebox
class Feedback:
def __init__(self, master):
master.title('Explore Cali Feedback Form')
master.resizable(False, False)