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
class ZCL_ABAP_BENCHMARK_TOOL definition | |
public | |
final | |
create public . | |
public section. | |
class-methods START_TIMER . | |
class-methods STOP_TIMER . | |
class-methods GC . |
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
package week7 | |
object primes { | |
//infinite stream builder | |
def from(n: Int): Stream[Int] = n #:: from(n + 1) | |
//> from: (n: Int)Stream[Int] | |
//infinte stream of all natural numbers | |
val nats = from(0) //> nats : Stream[Int] = Stream(0, ?) | |
val m4s = nats map (_ * 4) //> m4s : scala.collection.immutable.Stream[Int] = Stream(0, ?) |
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
method calculate_hash. | |
" importing: string_data TYPE STRING | |
" returning: hash_value TYPE STRING | |
" | |
" Calculate the hash value for a given string and return as Base64. | |
" | |
data: lo_digest type ref to cl_abap_message_digest, | |
converter type ref to cl_abap_conv_out_ce, | |
data_as_xstring type xstring. |
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
report y_test_email_with_chart. | |
type-pools: abap . | |
tables: sflight . | |
constants: image_name_01 type string value 'Sailing.jpg' . | |
constants: image_name_02 type string value 'chart_01.jpg' . | |
constants: c_series_01 type string value 'series_01' . |
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
report ztcode. | |
parameters: month type dats default sy-datum obligatory, | |
user type usr02-bname obligatory default sy-uname. | |
types: begin of zusertcode, | |
operation type char30, | |
type type char10, | |
count type swncshcnt, | |
end of zusertcode. |
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
class zcl_zusers_dpc_ext definition | |
public | |
inheriting from zcl_zusers_dpc | |
create public . | |
public section. | |
methods /iwbep/if_mgw_appl_srv_runtime~execute_action redefinition. | |
protected section. | |
methods userset_get_entity redefinition. |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Name: ProCon Invoice Mapping | |
Author: Chris Mills | |
Details: Mapping implemented as an XSL as single SAP Invoice message needs to be split to mutliple ProCon messages, 1 per PO | |
and financials calculated by unique PO. i.e. if invoice has 3 line items which relate to two PO's then need to split to | |
two output messages and calculate the tax and net amounts by PO, recursion much easier in XSL | |
NOTE: This will only send items from the invoice that relate to a contract, the business rules are meant to be no multi-contract | |
invoices and no mix of 1 item against a contract and another not but if it happens ProCon will only see parts of the invoice |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
package shapeless.stuff | |
import shapeless._ | |
import nat._ | |
import ops.nat._ | |
import ops.hlist._ | |
/** | |
* The goal is to determine whether a list of numbers is the appropriate length | |
* (nine) and has a valid checksum, which is calculated by taking the sum of |
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 sys, cv2 | |
# Refactored https://realpython.com/blog/python/face-recognition-with-python/ | |
def cascade_detect(cascade, image): | |
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY) | |
return cascade.detectMultiScale( | |
gray_image, | |
scaleFactor = 1.15, | |
minNeighbors = 5, |