-- Allow to execute external scripts such as R and PythonEXEC sp_configure 'external scripts enabled', 1;RECONFIGURE WITH OVERRIDE;GO -- Restart SQL Server to apply changes -- Check whether the Python script works well or notEXEC sp_execute_external_script@language = N'Python',@script = N'import sysimport numpy as npimport pandas as pdprint(sys.version)print(np.__version__)print(pd.__version__)';
참고 :Data model > Special method names > Basic customizationUnderstanding __new__ and __init__ class Class1: def __new__(cls): # allocator print('in __new__') return super().__new__(cls) def __init__(self): # initializer print('in __init__') super().__init__() def __del__(self): # finalizer print('in __del__') def say(self, words: str): print("say", words) if __name__ == '__main__': c1 = Class1()..
How to find a Python package's dependencies from pip._vendor import pkg_resources _package_name = 'zipline'_package = pkg_resources.working_set.by_key[_package_name] # retrieve dependencies from setup.pyfor requirement in _package.requires(): print(requirement) $ pip freeze $ pip list $ pip show pandas $ pip check pipdeptree $ pip install pipdeptree$ pipdeptree
참고 :C Structure Initialization #include #include #include #include struct x { INT32 a; INT32 b; INT32 c;}; int _tmain(INT32 argc, LPTSTR argv[]) { struct x x1 = {0}; _tprintf(_T("%d %d %d \n"), x1.a, x1.b, x1.c); struct x x2; memset(&x2, 0, sizeof(x2)); _tprintf(_T("%d %d %d \n"), x2.a, x2.b, x2.c); return EXIT_SUCCESS;} /* Output0 0 00 0 0*/
#include #include #include #include int _tmain(INT32 argc, LPTSTR argv[]){ // MAX_PATH : The maximum character length of a path. TCHAR currentDirectory[MAX_PATH]; TCHAR windowsDirectory[MAX_PATH]; TCHAR systemDirectory[MAX_PATH]; // GetCurrentDirectory GetWindowsDirectory GetSystemDirectory // If the function fails, the return value is zero. DWORD result1 = GetCurrentDirectory(MAX_PATH, currentD..
[C# Java] 1차원 배열의 초기화 방법에 대해서 알아보자. // [C# Java] OK. Since arrays are objects, we need to instantiate them with the new keywordint[] myArray = new int[3];myArray[0] = 10;myArray[1] = 20;myArray[2] = 30; // [C#] OK. We can provide initial values to the array when it is declared by using curly brackets// [Java] Error. We can not define dimension expressions when an array initializer is providedint..
참고 :[C#] switch Statement[C++] switch Statement[Java] switch Statement[C# vs Java] Flow Control switch 구문에서 fall-through 지원 여부를 C# C++ Java 각각에 대해 알아보자. C# C++ Java 공통 코드는 아래와 같다. int number = 2;switch (number){case 1: // print "one" statement for C# C++ Java respectively break;case 2: // print "two" statement for C# C++ Java respectively break;case 3: // print "three" statement for C# C++ Java ..
기본 자료형의 size를 byte 단위로 표시해보자. 참고 : [C#]Reference Tables for TypesDefault Values 참고 : [Java]Primitive Data TypesClass NumberClass BooleanClass Character 참고 : [C++]Fundamental TypesData Type RangesInteger Limits // C# : Built-In Typesusing System; namespace Sharp1{ class Program { static void Main(string[] args) { Console.WriteLine("sizeof(byte) : " + sizeof(byte) + " bytes"); Console.WriteLine("s..