- First download
dbfpy: http://sourceforge.net/projects/dbfpy/files/latest/download?source=files - Then install:
sudo python setup.py install
To convert DBF file to CSV:
./dbf2csv database.dbf
| /* Note: don't run this all at once. There are prompts to run some queries in another session, etc. */ | |
| WHILE @@trancount > 0 | |
| ROLLBACK | |
| GO | |
| USE master; | |
| GO | |
| IF DB_ID('lockingtest') IS NOT NULL |
| function Get-ArchiveItems { | |
| param([Parameter(Mandatory)][string]$Archive) | |
| function recurse-items { | |
| param([object]$items) | |
| foreach($item in $items) { | |
| $item | |
| $folder = $item.GetFolder | |
| if ($folder) { | |
| recurse-items $folder.Items() |
| -- Get Max ID from table | |
| SELECT MAX(id) FROM table; | |
| -- Get Next ID from table | |
| SELECT nextval('table_id_seq'); | |
| -- Set Next ID Value to MAX ID | |
| SELECT setval('table_id_seq', (SELECT MAX(id) FROM table)); |
| /* Adrian Sullivan - 2019/11/15 Fun with polygons. */ | |
| /* Thanks to Michael J Swart for all the awesome work on color https://michaeljswart.com/ */ | |
| DECLARE @tt table(id int identity(0,1), label varchar(50), gg geometry); | |
| SET NOCOUNT ON; | |
| DECLARE @g geometry = 'POLYGON((-121.97087 37.372518,-121.97087 37.372518,-121.970863 37.372517,-121.970845 37.372515,-121.97087 37.372518))'; | |
| DECLARE @i int = 1; | |
| WHILE @i <= 450 |
| """ | |
| Compare Excel Sheeets | |
| Inspired by https://pbpython.com/excel-diff-pandas-update.html | |
| """ | |
| import argparse | |
| import pandas as pd | |
| import numpy as np |
dbfpy: http://sourceforge.net/projects/dbfpy/files/latest/download?source=filessudo python setup.py installTo convert DBF file to CSV:
./dbf2csv database.dbf
| # based on https://dba.meta.stackexchange.com/revisions/3e578461-07e9-46f2-b81d-a5f3e582171a/view-source | |
| Set-Location ~/repos/git/SQL-Server-First-Responder-Kit | |
| # https://stackoverflow.com/a/43737097/4709762 | |
| # $regexUrl='(http[s]?)(:\/\/)([^\s,]+)(?=")' | |
| # https://stackoverflow.com/questions/3809401/what-is-a-good-regular-expression-to-match-a-url | |
| $regexUrl = 'https?:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)' |
| import-module poshrsjob; | |
| $DownloadDir = "/users/andy/Downloads/poshrsjob"; | |
| $MaxJobs = 3; | |
| foreach ($i in 1..24) { | |
| Start-RSJob -Throttle $MaxJobs -Batch "Demo" -argumentlist $i, $DownloadDir -ScriptBlock { | |
| param($JobNum, $OutputDir) | |
| $OutputFile = Join-Path -Path $OutputDir -ChildPath "RSJob$JobNum.zip"; | |
| Start-Sleep -Seconds (get-random -Minimum 1 -Maximum 15); | |
| Invoke-WebRequest -uri "https://github.com/proxb/PoshRSJob/archive/master.zip" -OutFile $OutputFile; | |
| } |
| // Jeremie Miserez <jeremie@miserez.org>, 2015 | |
| // | |
| // A little bit of Javascript to let you export your Google Music library, playlists, and album track lists :) | |
| // | |
| // I posted this as an answer here: http://webapps.stackexchange.com/questions/50311/print-playlist-from-google-play-music | |
| // | |
| // 1. Go to: https://play.google.com/music/listen#/all (or your playlist) | |
| // | |
| // 2. Open a developer console (F12 for Chrome). Paste | |
| // code below into the console. |
| /*********************************************************************** | |
| Copyright 2016, Kendra Little - LittleKendra.com | |
| MIT License, http://www.opensource.org/licenses/mit-license.php | |
| ***********************************************************************/ | |
| USE WideWorldImporters; | |
| GO | |
| IF (select count(*) from sys.schemas where name='ddl')=0 | |
| exec ('CREATE SCHEMA ddl AUTHORIZATION dbo;'); |