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
| $ONCE | |
| Insert into Contacts (FirstName, LastName, Company) | |
| Values | |
| $EACH+ | |
| ('$0', '$1', '$2')<% if ($rownumOne != $numrows) {','} %> |
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
| <% $row | |
| .replace(/a dull boy/,'an axe-wielding maniac') | |
| .replace(/an axe/,'a teddy bear') | |
| .replace(/work/,'sex') | |
| %> |
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
| # encoding=utf8 | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding('utf8') |
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
| n = [3, 5, 7] | |
| def double_list(x): | |
| for i in range(0, len(x)): | |
| x[i] = x[i] * 2 | |
| return x | |
| print double_list(n) |
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
| # encoding=utf8 # This eliminates issues with Unicode errors that I was previously encountering. | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding('utf8') | |
| from ebaysdk.finding import Connection as Finding | |
| import csv | |
| """The first function only finds a total page count. This func outputs the Page count, | |
| and will be used as Range in the next Func.""" |
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
| USE companydb | |
| DECLARE @companyname_active TABLE | |
| ( | |
| [Custom Label] VARCHAR(75) | |
| ,[Purchases] INT | |
| ,[Category Number] INT | |
| ,[Price] DECIMAL(6,2) | |
| ,[Item Title] VARCHAR(90) | |
| ) |
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
| import _mssql | |
| # Connect to the SQL Server Database | |
| conn = _mssql.connect(server='Servernamehere', user='serverusername', password='serverpassword', \ | |
| database='databasename') | |
| # Run The Select Query against the Database | |
| conn.execute_query('SELECT TOP 10 [Item ID],[Custom Label],[Quantity Available] FROM [bsusa_active_staging]') | |
| # Create the Lists |
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 lxml import html | |
| import csv, os, json | |
| import requests | |
| #from exceptions import ValueError | |
| from time import sleep | |
| def AmzonParser(url): | |
| headers = { | |
| 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36'} |
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
| def stocktrack(stock,buysell,qty): | |
| import sqlite3 | |
| from yahoo_finance import Share | |
| conn = sqlite3.connect('Stocks.db') | |
| c = conn.cursor() | |
| c.execute('''CREATE TABLE IF NOT EXISTS stocks | |
| (date text, trans text, symbol text, qty real, price real, total real)''') |
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
| import pandas as pd | |
| import io | |
| import requests | |
| import time | |
| def google_stocks(symbol, startdate=(1, 1, 2005), enddate=None): | |
| startdate = str(startdate[0]) + '+' + str(startdate[1]) + '+' + str(startdate[2]) | |
| if not enddate: |