Monday, June 24, 2019
Doing everything in wrong manner
Here is a script to replace all sizes in template project to twice smaller. It is bad idea to use regular expressions for html and it is uncommon to change text on the fly in C# but it works.
public static void Main(string[] args)
{
string path = @"email\src";
Regex sizeRegEx = new Regex("size=\".+\"");
Regex valueRegEx = new Regex(@"\d+");
foreach(string file in Directory.GetFiles(path, "*.html", SearchOption.AllDirectories))
{
string text = File.ReadAllText(file);
var aStringBuilder = new StringBuilder(text);
foreach(Match m in sizeRegEx.Matches(text))
{
Console.WriteLine(m.Value);
Match valueMath = valueRegEx.Match(m.Value);
Console.WriteLine(valueMath.Value);
aStringBuilder.Remove(m.Index + valueMath.Index, valueMath.Value.Length);
int size = int.Parse(valueRegEx.Match(m.Value).Value);
string newValue = (size / 2).ToString();
aStringBuilder.Insert(m.Index + valueMath.Index, newValue);
if(valueMath.Value.Length == 2 && newValue.Length == 1)
{
aStringBuilder.Insert(m.Index + valueMath.Index + 1, " ");
}
}
File.WriteAllText(file, aStringBuilder.ToString());
}
}
public static string DeleteLines(string input, int linesToSkip)
{
int startIndex = 0;
for (int i = 0; i < linesToSkip; ++i)
startIndex = input.IndexOf('\n', startIndex) + 1;
return input.Substring(startIndex);
}
Friday, April 5, 2019
OneNote as heap of theses
Within a year I collecting ideas and theses for my Post AI book in one great service I know for me. This service is a part of Microsoft Office 365 known as Microsoft Onenote. It is available for all my devices as same as Windows and Linux desktop. It is possible to add named notes that i can append on every day traffic jam. And this is free sync point within my devices so that I have one complete story as result.
Tuesday, February 12, 2019
OpenCL 2.1 NEO
Here my test of integrated OpenCL kernels. I compile CapsBasic-beignet and it shows me that I have new NEO driver that replace beignet.
Number of available platforms: 2
Platform names:
[0] Intel(R) OpenCL HD Graphics [Selected]
[1] Intel Gen OCL Driver
Number of devices available for each type:
CL_DEVICE_TYPE_CPU: 0
CL_DEVICE_TYPE_GPU: 1
CL_DEVICE_TYPE_ACCELERATOR: 0
*** Detailed information for each device ***
CL_DEVICE_TYPE_GPU[0]
CL_DEVICE_NAME: Intel(R) Gen9 HD Graphics NEO
CL_DEVICE_AVAILABLE: 1
CL_DEVICE_VENDOR: Intel(R) Corporation
CL_DEVICE_PROFILE: FULL_PROFILE
CL_DEVICE_VERSION: OpenCL 2.1 NEO
CL_DRIVER_VERSION: 19.03.12192
CL_DEVICE_OPENCL_C_VERSION: OpenCL C 2.0
CL_DEVICE_MAX_COMPUTE_UNITS: 23
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1100
CL_DEVICE_MAX_WORK_GROUP_SIZE: 256
CL_DEVICE_ADDRESS_BITS: 64
CL_DEVICE_MEM_BASE_ADDR_ALIGN: 1024
CL_DEVICE_MAX_MEM_ALLOC_SIZE: 1595310080
CL_DEVICE_GLOBAL_MEM_SIZE: 3190620160
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 1595310080
CL_DEVICE_GLOBAL_MEM_CACHE_SIZE: 524288
CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: 64
CL_DEVICE_LOCAL_MEM_SIZE: 65536
CL_DEVICE_PROFILING_TIMER_RESOLUTION: 83
CL_DEVICE_IMAGE_SUPPORT: 1
CL_DEVICE_ERROR_CORRECTION_SUPPORT: 0
CL_DEVICE_HOST_UNIFIED_MEMORY: 1
CL_DEVICE_EXTENSIONS: cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_depth_images cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_image2d_from_buffer cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_media_block_io cl_intel_driver_diagnostics cl_intel_device_side_avc_motion_estimation cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_khr_fp64 cl_khr_subgroups cl_khr_il_program cl_intel_spirv_device_side_avc_motion_estimation cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_motion_estimation cl_intel_advanced_motion_estimation cl_intel_va_api_media_sharing
CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT: 4
CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG: 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT: 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE: 1
CL_DEVICE_NATIVE_VECTOR_WIDTH_INT: 4
CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG: 1
CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT: 1
CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE: 1
Then I tested Intel(R) OpenCL HD Graphics with fractal-gen-opencl but results for existing implementation is not optimistic because it cannot perform
10000000
Number of available platforms: 2
Platform names:
[0] Intel(R) OpenCL HD Graphics [Selected]
[1] Intel Gen OCL Driver
Number of devices available for each type:
CL_DEVICE_TYPE_CPU: 0
CL_DEVICE_TYPE_GPU: 1
CL_DEVICE_TYPE_ACCELERATOR: 0
*** Detailed information for each device ***
CL_DEVICE_TYPE_GPU[0]
CL_DEVICE_NAME: Intel(R) Gen9 HD Graphics NEO
CL_DEVICE_AVAILABLE: 1
CL_DEVICE_VENDOR: Intel(R) Corporation
CL_DEVICE_PROFILE: FULL_PROFILE
CL_DEVICE_VERSION: OpenCL 2.1 NEO
CL_DRIVER_VERSION: 19.03.12192
CL_DEVICE_OPENCL_C_VERSION: OpenCL C 2.0
CL_DEVICE_MAX_COMPUTE_UNITS: 23
CL_DEVICE_MAX_CLOCK_FREQUENCY: 1100
CL_DEVICE_MAX_WORK_GROUP_SIZE: 256
CL_DEVICE_ADDRESS_BITS: 64
CL_DEVICE_MEM_BASE_ADDR_ALIGN: 1024
CL_DEVICE_MAX_MEM_ALLOC_SIZE: 1595310080
CL_DEVICE_GLOBAL_MEM_SIZE: 3190620160
CL_DEVICE_MAX_CONSTANT_BUFFER_SIZE: 1595310080
CL_DEVICE_GLOBAL_MEM_CACHE_SIZE: 524288
CL_DEVICE_GLOBAL_MEM_CACHELINE_SIZE: 64
CL_DEVICE_LOCAL_MEM_SIZE: 65536
CL_DEVICE_PROFILING_TIMER_RESOLUTION: 83
CL_DEVICE_IMAGE_SUPPORT: 1
CL_DEVICE_ERROR_CORRECTION_SUPPORT: 0
CL_DEVICE_HOST_UNIFIED_MEMORY: 1
CL_DEVICE_EXTENSIONS: cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_depth_images cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_image2d_from_buffer cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_media_block_io cl_intel_driver_diagnostics cl_intel_device_side_avc_motion_estimation cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_khr_fp64 cl_khr_subgroups cl_khr_il_program cl_intel_spirv_device_side_avc_motion_estimation cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_motion_estimation cl_intel_advanced_motion_estimation cl_intel_va_api_media_sharing
CL_DEVICE_PREFERRED_VECTOR_WIDTH_INT: 4
CL_DEVICE_PREFERRED_VECTOR_WIDTH_LONG: 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_FLOAT: 1
CL_DEVICE_PREFERRED_VECTOR_WIDTH_DOUBLE: 1
CL_DEVICE_NATIVE_VECTOR_WIDTH_INT: 4
CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG: 1
CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT: 1
CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE: 1
Then I tested Intel(R) OpenCL HD Graphics with fractal-gen-opencl but results for existing implementation is not optimistic because it cannot perform
10000000
iterations to use on each pixel to determine its set membership of mandelbrot fractal. I was waiting a day but it still calculate pixels. 1000000 iterations works very fast ~8sec to create 768x786 fractal.
mandelbrot
burning-ship
Wednesday, January 30, 2019
OpenCL runtime on my computer
A year as I installed New Inlel CPU to my computer. It's quite cheap unit from 8th generation with GPU on chip and with opencl cores to perform parallel calculations. I have an idea to try wrapper to opencllib in .net core and start learning opencl with my CUDA background. I just found Ubuntu 18.04 already has runtime. Here is my clinfo. As you can see Beignet is us used for check device, but Neo is going to replace it soon.
clinfo
beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware
(If you have multiple ICDs installed and OpenCL works, you can ignore this message)
beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware
(If you have multiple ICDs installed and OpenCL works, you can ignore this message)
Number of platforms 2
Platform Name Intel(R) OpenCL HD Graphics
Platform Vendor Intel(R) Corporation
Platform Version OpenCL 2.1
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_depth_images cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_image2d_from_buffer cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_media_block_io cl_intel_driver_diagnostics cl_intel_device_side_avc_motion_estimation cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_khr_fp64 cl_khr_subgroups cl_khr_il_program cl_intel_spirv_device_side_avc_motion_estimation cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_motion_estimation cl_intel_advanced_motion_estimation cl_intel_va_api_media_sharing
Platform Host timer resolution 1ns
Platform Extensions function suffix INTEL
Platform Name Intel Gen OCL Driver
Platform Vendor Intel
Platform Version OpenCL 2.0 beignet 1.3
Platform Profile FULL_PROFILE
Platform Extensions cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_khr_byte_addressable_store cl_khr_3d_image_writes cl_khr_image2d_from_buffer cl_khr_depth_images cl_khr_spir cl_khr_icd cl_intel_accelerator cl_intel_subgroups cl_intel_subgroups_short cl_khr_gl_sharing
Platform Extensions function suffix Intel
beignet-opencl-icd: no supported GPU found, this is probably the wrong opencl-icd package for this hardware
(If you have multiple ICDs installed and OpenCL works, you can ignore this message)
Platform Name Intel(R) OpenCL HD Graphics
Number of devices 1
Device Name Intel(R) Gen9 HD Graphics NEO
Device Vendor Intel(R) Corporation
Device Vendor ID 0x8086
Device Version OpenCL 2.1
Driver Version 19.03.12192
Device OpenCL C Version OpenCL C 2.0
Device Type GPU
Device Profile FULL_PROFILE
Device Available Yes
Compiler Available Yes
Linker Available Yes
Max compute units 23
Max clock frequency 1100MHz
Device Partition (core)
Max number of sub-devices 0
Supported partition types None
Max work item dimensions 3
Max work item sizes 256x256x256
Max work group size 256
Preferred work group size multiple 32
Max sub-groups per work group 32
Sub-group sizes (Intel) 8, 16, 32
Preferred / native vector sizes
char 16 / 16
short 8 / 8
int 4 / 4
long 1 / 1
half 8 / 8 (cl_khr_fp16)
float 1 / 1
double 1 / 1 (cl_khr_fp64)
Half-precision Floating-point support (cl_khr_fp16)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Single-precision Floating-point support (core)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Correctly-rounded divide and sqrt operations Yes
Double-precision Floating-point support (cl_khr_fp64)
Denormals Yes
Infinity and NANs Yes
Round to nearest Yes
Round to zero Yes
Round to infinity Yes
IEEE754-2008 fused multiply-add Yes
Support is emulated in software No
Address bits 64, Little-Endian
Global memory size 3190620160 (2.971GiB)
Error Correction support No
Max memory allocation 1595310080 (1.486GiB)
Unified memory for Host and Device Yes
Shared Virtual Memory (SVM) capabilities (core)
Coarse-grained buffer sharing Yes
Fine-grained buffer sharing No
Fine-grained system sharing No
Atomics No
Minimum alignment for any data type 128 bytes
Alignment of base address 1024 bits (128 bytes)
Preferred alignment for atomics
SVM 64 bytes
Global 64 bytes
Local 64 bytes
Max size for global variable 65536 (64KiB)
Preferred total size of global vars 1595310080 (1.486GiB)
Global Memory cache type Read/Write
Global Memory cache size 524288 (512KiB)
Global Memory cache line size 64 bytes
Image support Yes
Max number of samplers per kernel 16
Max size for 1D images from buffer 99706880 pixels
Max 1D or 2D image array size 2048 images
Base address alignment for 2D image buffers 4 bytes
Pitch alignment for 2D image buffers 4 pixels
Max 2D image size 16384x16384 pixels
Max planar YUV image size 16384x16352 pixels
Max 3D image size 16384x16384x2048 pixels
Max number of read image args 128
Max number of write image args 128
Max number of read/write image args 128
Max number of pipe args 16
Max active pipe reservations 1
Max pipe packet size 1024
Local memory type Local
Local memory size 65536 (64KiB)
Max number of constant args 8
Max constant buffer size 1595310080 (1.486GiB)
Max size of kernel argument 1024
Queue properties (on host)
Out-of-order execution Yes
Profiling Yes
Queue properties (on device)
Out-of-order execution Yes
Profiling Yes
Preferred size 131072 (128KiB)
Max size 67108864 (64MiB)
Max queues on device 1
Max events on device 1024
Prefer user sync for interop Yes
Profiling timer resolution 83ns
Execution capabilities
Run OpenCL kernels Yes
Run native kernels No
Sub-group independent forward progress Yes
IL version SPIR-V_1.0
SPIR versions 1.2
printf() buffer size 4194304 (4MiB)
Built-in kernels block_motion_estimate_intel;block_advanced_motion_estimate_check_intel;block_advanced_motion_estimate_bidirectional_check_intel;
Motion Estimation accelerator version (Intel) 2
Device-side AVC Motion Estimation version 1
Supports texture sampler use Yes
Supports preemption No
Device Extensions cl_khr_3d_image_writes cl_khr_byte_addressable_store cl_khr_fp16 cl_khr_depth_images cl_khr_global_int32_base_atomics cl_khr_global_int32_extended_atomics cl_khr_icd cl_khr_image2d_from_buffer cl_khr_local_int32_base_atomics cl_khr_local_int32_extended_atomics cl_intel_subgroups cl_intel_required_subgroup_size cl_intel_subgroups_short cl_khr_spir cl_intel_accelerator cl_intel_media_block_io cl_intel_driver_diagnostics cl_intel_device_side_avc_motion_estimation cl_khr_priority_hints cl_khr_throttle_hints cl_khr_create_command_queue cl_khr_fp64 cl_khr_subgroups cl_khr_il_program cl_intel_spirv_device_side_avc_motion_estimation cl_intel_spirv_media_block_io cl_intel_spirv_subgroups cl_khr_mipmap_image cl_khr_mipmap_image_writes cl_intel_planar_yuv cl_intel_packed_yuv cl_intel_motion_estimation cl_intel_advanced_motion_estimation cl_intel_va_api_media_sharing
Platform Name Intel Gen OCL Driver
Number of devices 0
NULL platform behavior
clGetPlatformInfo(NULL, CL_PLATFORM_NAME, ...) Intel(R) OpenCL HD Graphics
clGetDeviceIDs(NULL, CL_DEVICE_TYPE_ALL, ...) Success [INTEL]
clCreateContext(NULL, ...) [default] Success [INTEL]
clCreateContext(NULL, ...) [other] <error: no devices in non-default plaforms>
clCreateContextFromType(NULL, CL_DEVICE_TYPE_DEFAULT) Success (1)
Platform Name Intel(R) OpenCL HD Graphics
Device Name Intel(R) Gen9 HD Graphics NEO
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CPU) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_GPU) Success (1)
Platform Name Intel(R) OpenCL HD Graphics
Device Name Intel(R) Gen9 HD Graphics NEO
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ACCELERATOR) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_CUSTOM) No devices found in platform
clCreateContextFromType(NULL, CL_DEVICE_TYPE_ALL) Success (1)
Platform Name Intel(R) OpenCL HD Graphics
Device Name Intel(R) Gen9 HD Graphics NEO
ICD loader properties
ICD loader Name OpenCL ICD Loader
ICD loader Vendor OCL Icd free software
ICD loader Version 2.2.11
ICD loader Profile OpenCL 2.1Ni
Tuesday, January 29, 2019
It's path to Zen
I want to tell about simple strategy to use multiple code editors alongside to maintain huge code open source code. For example, you need to maintain code that can be debugged only in certain remote environment and then, you have to develop new module for big plugin architecture.
It is better to study code on the fly with tiny editor without code completion and refactoring. This editor also will be connected to remote host with rsync. I prefer Zed Code editor available as chrome plugin.
Zen is lightweight to work with small projects from chromebook and you can start with cheap environment. But in case you work with new plugins, then you need to learn architecture and decisions contains in solution code. It is better to use code analysis tools and smart navigation in solution. Alongside with Zen i have used Visual Code for me.
Visual Code
Stage and production environment have no advantages to rapid development, but it allow to test real word responses.
Slow remote
Monday, January 7, 2019
I grow reading books
React.Js быстрый старт. Стоян Стефанов. Издательство "Питер"
Scalability rules. 50 principles for scaling web sites.Martin L. Abbot, Michael T. Fishero
The Open CL specification. Khronos Open CL workging group.
Introducing Bootstrap 4. Jorg Krause
Entity Framework 6 recipes. Barin Driscoll. Nitin Gupta, Robert Vettor, Zeeshman Hirani, and Latty Tenny
97 things every software architect should know
CL via C# 4th edition
Deploying Chromebooks in the classroom, Guy Hart-Davis
Fireworks algorithm. Ying Tan.
The CUDA handbook, Nicholas Wilt
Twitter Bootstrap succinctly, by Peter Shaw
Scalability rules. 50 principles for scaling web sites.Martin L. Abbot, Michael T. Fishero
A book to make complete web solutions really robust and stable for work with huge amount customers or consumers. I can recommend it for maintenance as same to make leap in quality after acquire code base. Tips is not based on any framework so it might be architect challenge to apply book recommendations to modern infrastructure.
The Open CL specification. Khronos Open CL workging group.
this book have not included kernel language i could looked for. This is a reference to functions provided with open cl library. I was found it similar to CUDA library I studied before. it's also describes how to manage device context with c# and java wrappers. This is low level access but it's the fastest.
Introducing Bootstrap 4. Jorg Krause
Entity Framework 6 recipes. Barin Driscoll. Nitin Gupta, Robert Vettor, Zeeshman Hirani, and Latty Tenny
This excellent book for those who really want to know all aspects of ORM and database. It covers multiple non trivial examples and advanced designs. You can ask yourself about ESQL using or complex tapes in case of maintainability of your code. Then you will do the choice to add this complexity to solution or not.
97 things every software architect should know
CL via C# 4th edition
Deploying Chromebooks in the classroom, Guy Hart-Davis
Fireworks algorithm. Ying Tan.
The CUDA handbook, Nicholas Wilt
Twitter Bootstrap succinctly, by Peter Shaw
Wednesday, October 31, 2018
Selected theoretical publications on GA clustering and source code isomorphism.
Data Clustering using Genetic Algorithm. Zheyung Feng.
Работа написана в 2012 и обладает максимально возможной , полнотой описания операторов
генетического алгоритма и их воздействие на производительность и определение глобального
минимума. Показывается добавление шагов k-mean к каждой итерации генетического алгоритма,
что приводит к заметному уменьшению шагов решения. Так же определено, что предварительная
сортировка данных приводит к увеличению вероятности нахождения локального минимума, но
операторы генетического алгоритма могут быть подобраны так, что исправляют эту возможную
ситуацию. Так же затронут вопрос неевклидовых кластеров вытянутой или серповидной формы, за
их нахождение отвечают операторы селекции, объединяющие и удаляющие кластера. Статья
является наглядным пособием по созданию инструментов классификации на основе GA.
Implementation and Analysis of Graph Algorithm Used for Software Plagiatism Identification. Dr. Carlos Rivero
То , что среди статей об классификации данных освещаю и статьи по поиску плагиата в
программах, говорит о моей цели объединить два механизма определения схожести.
Классификатор и анализ изоморфизма связаны между собой в том , что классификация кода не
может быть представлена евклидовом пространством, вместо этого определением разницы в коде
может заниматься изоморфный анализ графов активности, полученных ANTLR.
В статье не только рассматривается способ сохранения AST , в базе данных графов Neo4j , но и
алгоритм нахождения подобных поддеревьев в полученной базе данных. К сожалению, средства
нахождения изоморфизма в работе не указан, но они ссылаются на GraphQL и Nema.
Parallel programing with Inductive Synthesis. Shaon Barman, Rastislav Bodik, Sagar Jain, Yewen Pu, Saurabh Srivastava, and Nicholas Tung.
Эта работа может показаться сугубо математической, так как в ней обсуждается нахождение
коэффициентов факторизованного представления полинома, но в целом она рассказывает более
общий принцип адаптации выбранного алгоритма к необходимому математическому решению с
помощью gpu. Если представить, что генетический алгоритм действительно найдет подходящий
для решения проблем программный код, то параметры взаимодействия с этим кодом, как и
внутренние коэффициенты нужно будет вычислить. При этом можно применять индуктивный
подход. Такая операция перебора и определения коэффициентов возможна с помощью gpu.
Abstract Syntax Tree Generation using Modified Grammar for Source Code Plagiatism Detection. Resmi N. G. Soman K. P.
В статье от Resmi и Soman обсуждается каким образом пробовать делать грамматику для ANTLR ,
инвариантной к стилю написания кода. Затрагивается проблема вариаций в синтаксисе и
адаптация к комментариям и другим не связанным с синтаксисом элементам. Но к сожалению , не
решена инвариантность синтаксического сахара. Метод фильтрации кода на уровне грамматики ,
в принципе можно использовать как базовый при внесении AST в базу данных ArangoDB, но
парсинг полноценной грамматики и вычисление разницы между графами может пополнить
метаданные вершин графа, оставленными автором комментариями.
Genetic Algorithm for Clustering with an Ordered Representation. Jay Bhuyan
Работа представлена в 1991 году и отражает использование генетического алгоритма в
кластеризации данных, как нового метода, позволяющего обходить локальные минимумы в
решении. В примере рассматривается евклидово пространство и два вида жадных алгоритмов.
Алгоритм называется жадным , если он принимает во внимание оптимальное решение на каждом
шаге алгоритма.
Если данные заранее отсортированы , с применением эвристического сравнения данных между
собой, то генетический алгоритм получает схожесть.
Автор показывает , что применение эвристических правил в генетическом алгоритме позволяет
балансировать между производительностью и точностью. Также в эвристике автор предлагает
использовать противоположные суждения, для того чтобы найти глобальный оптимум. И главной
идеей является утверждение в том , что подготовленные данные лучше поддаются
классификации, и в этом могут помочь сортировки больших данных, которые я описал в блоге .
Monday, September 10, 2018
.NET Portability Analyzer
Когда то использовал автоматический анализатор кода для проверки совместимости .NET приложений с Xamarin платформой. Мое приложение тогда показало 100% совместимость, все таки Mono+GtkSharp. Теперь портируя приложения на .Net Core тоже использую подобный анализатор.
Собрать можно с помощью скрипта
.\build.ps1 -Configuration Debug -Platform AnyCPU
после этого посмотреть установленные на компьютере платформы
.\ApiPort.exe listTargets
Проверить, что требует портирования, задав платформы:
.\ApiPort.exe analyze -f "my.exe" -t ".NET Framework, Version=4.6.2" -t ".Net Core, Version=2.1" -r HTML -o AnalysisReport.html
Еще, есть UI, тем более что WPF уже будет в .NET Core 3.0
Вот какого плана создается отчет
| Target type | .Net Core,Version=v2.1 | .NET Framework,Version=v4.6.2 | Recommended changes |
|---|---|---|---|
| Microsoft.AspNetCore.StaticFiles.FileExtensionContentTypeProvider | |||
| #ctor | |||
| get_Mappings | |||
| TryGetContentType(System.String,System.String@) | |||
| Microsoft.VisualBasic.Devices.ComputerInfo | |||
| #ctor | |||
| get_AvailablePhysicalMemory | |||
| get_OSFullName | |||
| get_TotalPhysicalMemory | |||
| System.Configuration.ConfigurationElement | Use configuration appropriate for your application model. For portable Framework Components, expose API for configuration on type. | ||
| #ctor | Use configuration appropriate for your application model. For portable Framework Components, expose API for configuration on type. | ||
| get_Item(System.String) | Use configuration appropriate for your application model. For portable Framework Components, expose API for configuration on type. | ||
| set_Item(System.String,System.Object) | Use configuration appropriate for your application model. For portable Framework Components, expose API for configuration on type. | ||
| System.Configuration.ConfigurationManager | Use configuration appropriate for your application model. For portable Framework Components, expose API for configuration on type. | ||
| get_AppSettings | Use configuration appropriate for your application model. For portable Framework Components, expose API for configuration on type. | ||
| GetSection(System.String) | Use configuration appropriate for your application model. For portable Framework Components, expose API for configuration on type. | ||
| System.Configuration.ConfigurationPropertyAttribute | Use configuration appropriate for your application model. For portable Framework Components, expose API for configuration on type. | ||
| #ctor(System.String) | Use configuration appropriate for your application model. For portable Framework Components, expose API for configuration on type. | ||
| System.Configuration.ConfigurationSection | Use configuration appropriate for your application model. For portable Framework Components, expose API for configuration on type. | ||
| #ctor | Use configuration appropriate for your application model. For portable Framework Components, expose API for configuration on type. |
Subscribe to:
Posts (Atom)
debug magazine archive
71 jounals still available on issuu with great story of netlabels time. debug_mag Publisher Publications - Issuu
-
71 jounals still available on issuu with great story of netlabels time. debug_mag Publisher Publications - Issuu
-
ypyrohov Fiverr Seller I am software engineer .Net on Linux an...
-
This iportant option in Visual studio I started to use from 2004, in JetBrains Rider 'Always Select Opened File' option is located ...


