This file contains 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
filename cp temp; | |
proc groovy classpath=cp; | |
submit parseonly; | |
import javax.crypto.spec.SecretKeySpec | |
import javax.crypto.spec.IvParameterSpec | |
import javax.crypto.Cipher | |
class GroovyCrypter { | |
def expandKey (def secret) { |
This file contains 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 win32com.client.dynamic import Dispatch | |
factory = Dispatch("SASObjectManager.ObjectFactoryMulti2") | |
serverDef = Dispatch("SASObjectManager.ServerDef") # no extra properties... local/zero-config server | |
sas = factory.CreateObjectByServer("SASApp", True, serverDef, "", "") | |
code = """ | |
*pre-code; |
This file contains 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
/* configure connection to metadata server */ | |
options metaserver="hostname" metaport=8561; | |
/* here we are defining out metadata query */ | |
/* we are making a call to GetMetadataObjects | |
and requesting a response listing all SAS | |
Workspace Servers defined in metadata | |
along with the associated properties which | |
contain the work reconnect in their | |
property name. */ |
This file contains 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
proc fcmp; | |
function to_jalali(sasdate) $ 200; | |
y=year(sasdate)-1600; | |
m=month(sasdate)-1; | |
d=day(sasdate)-1; | |
This file contains 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
filename inc temp; | |
data _null_; | |
file inc; | |
input @; | |
put _infile_; | |
cards4; | |
filename cp temp; | |
proc groovy classpath=cp; | |
add sasjar="commons_codec" version="1.7.0.0_SAS_20121211183158"; *version is specific to SAS Installation and may differ from this; |
This file contains 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
/* inspired by Rick Wicklin -- http://blogs.sas.com/content/iml/2015/02/11/binary-heart/ */ | |
proc fcmp outlib=work.funcs.graph; | |
function heartx(t); | |
return(16*sin(t)**3); | |
endsub; | |
function hearty(t); | |
return(13*cos(t) - 5*cos(2*t) - 2*cos(3*t) - cos(4*t)); | |
endsub; |
This file contains 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
$conn = New-Object -ComObject ADODB.Connection | |
#Connect to a remote server using IOM | |
$conn.Open('Provider=sas.IOMProvider.9.3;User ID=user;Password=pass;Data Source="";SAS Machine DNS Name=workspace.mycompany.com;SAS Port=8591;SAS Protocol=2') | |
#Assign a new libref using ADODB | |
$cmd = New-Object -ComObject ADODB.Command | |
$cmd.ActiveConnection = $conn | |
$cmd.CommandType = adCmdText | |
$cmd.CommandText = 'libname foo "/path/to/something"' |
This file contains 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
$conn = New-Object -ComObject ADODB.Connection | |
#Connect to a remote server using IOM | |
$conn.Open('Provider=sas.IOMProvider.9.3;User ID=user;Password=pass;Data Source="";SAS Machine DNS Name=workspace.mycompany.com;SAS Port=8591;SAS Protocol=2') | |
#Assign a new libref using ADODB | |
$cmd = New-Object -ComObject ADODB.Command | |
$cmd.ActiveConnection = $conn | |
$cmd.CommandType = adCmdText | |
$cmd.CommandText = 'libname foo "/path/to/something"' |
This file contains 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
/* | |
This SAS program uses the ARRPI translator at: | |
http://isithackday.com/arrpi.php | |
To translate whatever English text you supply into | |
Pirate speak for Talk Like a Pirate Day | |
This is a modification of the posting by Chris Hemedinger | |
to use PROC DS2 and the HTTP Package in place of PROC HTTP | |
*/ |
This file contains 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
/*Sign up for the Bing Translator, 2million characters/month of free translating!*/ | |
%let client_id=<<Your Client ID>>; | |
%let client_secret=<<Your Client Secret>>; | |
%let text=Merry Christmas; | |
%let from=en; /*English*/ | |
%let to=es; /*Spanish*/ | |
/*Link to language codes: http://msdn.microsoft.com/en-us/library/hh456380.aspx*/ | |
filename ivy "%sysfunc(pathname(work,l))/ivy.jar"; |
NewerOlder