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
import com.sas.iom.SASIOMDefs.GenericError; | |
import com.sas.services.connection.ConnectionInterface; | |
import com.sas.services.connection.ZeroConfigWorkspaceServer; | |
import com.sas.services.connection.ManualConnectionFactoryConfiguration; | |
import com.sas.services.connection.ConnectionFactoryManager; | |
import com.sas.services.connection.ConnectionFactoryInterface; | |
import com.sas.services.connection.ConnectionFactoryException; | |
import com.sas.services.connection.SecurityPackageCredential; | |
import com.sas.iom.SAS.ILanguageService; |
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
# Example of how to use Python on Windows to | |
# transfer a file to a SAS Integration Technologies client | |
# You can connect to a remote SAS Workspace | |
# and write a file through a binary stream | |
# run a program and collect the SAS log | |
__author__ = 'FriedEgg' | |
import win32com.client,os,binascii |
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
/*----------------------------------------------------------------------------------------------------------------------------------------- | |
*-Usage Parameters | |
*/ | |
%let api_key = <YOUR TWITTER API_KEY>; | |
%let api_secret = <YOUR TWITTER API_SECRET>; | |
%let search_query = %23SASGF13+OR+%23SASGF14+OR+%23SASGF15; | |
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; | |
filename ivy "%sysfunc(pathname(work,l))/ivy.jar"; | |
proc http | |
method = 'get' | |
url = 'http://central.maven.org/maven2/org/apache/ivy/ivy/2.3.0-rc1/ivy-2.3.0-rc1.jar' | |
out = ivy | |
; | |
run; |
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
%let api_key=<<YOUR GOOGLE API_KEY>>; | |
filename cp temp; | |
filename ivy "%sysfunc(pathname(work,l))/ivy.jar"; | |
proc http | |
method = 'get' | |
url = 'http://central.maven.org/maven2/org/apache/ivy/ivy/2.3.0-rc1/ivy-2.3.0-rc1.jar' | |
out = ivy |
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 outlib=work.func.api; | |
subroutine geocode(address $, adr $, lat, lng); | |
outargs adr, lat, lng; | |
api_key="<<YOUR API KEY>>"; | |
length url c adr $ 32767 prxadr prxlat prxlng lat lng 8 fileref $ 8; | |
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
/** GoogleTrends4SAS | |
* | |
* Description: An interface for collecting search results from the unofficial Google Trends API using PROC GROOVY | |
* | |
* Note: YOU MUST ALTER THE GROOVY CODE MANUALLY. | |
* Find the value of PREF cookie on the machine executing the code and enter it below. | |
* Note: As writted here for SAS 9.4 on Linux x64, available versions of Groovy for sasjar will be dependent on version and OS | |
*/ | |
filename cp temp; |
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
/*a manual implementation*/ | |
proc groovy; | |
submit; | |
import java.awt.Font; | |
import java.awt.Canvas; | |
font = new Font("Arial", Font.PLAIN, 12) | |
c = new Canvas() | |
metrics = c.getFontMetrics(font) |
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 groovy; | |
submit; | |
import javax.swing.JFileChooser | |
def openChooser = new JFileChooser( | |
dialogTitle: "Choose a file or directory", | |
fileSelectionMode: JFileChooser.FILES_AND_DIRECTORIES | |
) | |
fc = openChooser | |
fc.showOpenDialog() | |
exports = [selectedFile: fc.selectedFile] |
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"; |
OlderNewer