Skip to content

Instantly share code, notes, and snippets.

View maxkleiner's full-sized avatar

Max Kleiner maxkleiner

View GitHub Profile
@maxkleiner
maxkleiner / CPUClockFrequency
Created January 11, 2021 20:18
CPUClockFrequency
const
SHighResCounterError = 'High resolution counter error';
function CPUClockFrequency: Word64;
var
Freq : int64;
begin
Freq := 0;
if not QueryPerformanceFrequency(Freq) then
xraise (ETimerError2.Create(SHighResCounterError));
@maxkleiner
maxkleiner / regex
Created January 11, 2021 20:01
These e-mails were extracted with a RegEx as Regextractor
procedure RegEX_ExtractDemo;
var regEx: TRegExpr; //or OleVariant if HISUtils;
InStr, ResStr: String;
begin
ResStr:='';
InStr:= 'Please e-mail us at support@mycompany.com or to sales@mycompany.com';
// Create a regular expression
regEx:= TRegExpr.create; //HISUtils.RegExpr;
// Set regular expression pattern that specifies an e-mail address
regEx.Expression:='\w+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,6}';
@maxkleiner
maxkleiner / sentimenttree2.ipynb
Created November 5, 2020 11:18
sentimenttree2.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maxkleiner
maxkleiner / sentimenttree.ipynb
Created November 5, 2020 10:46
sentimenttree.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maxkleiner
maxkleiner / sentimenttree.ipynb
Created November 5, 2020 10:44
sentimenttree.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maxkleiner
maxkleiner / objectdetector3.ipynb
Created August 4, 2020 12:05
objectdetector3.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maxkleiner
maxkleiner / nltk4.ipynb
Created April 28, 2020 17:57
nltk4.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maxkleiner
maxkleiner / logisticregression.ipynb
Last active January 11, 2021 21:42
logisticregression.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maxkleiner
maxkleiner / maxnet24.ipynb
Created March 13, 2020 20:41
maxnet24.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@maxkleiner
maxkleiner / defaultdictstat2.py
Last active November 10, 2019 15:44
DefaultDict is a dictionary that is initialized with a default value when each key is encountered for the first time.
#my_default_dict = {}
from collections import defaultdict
# to prevent key error - KeyError: 't'
my_default_dict = defaultdict(int)
for letter in 'the red maXbox fox ran as fast as it could':
my_default_dict[letter] += 1
print(my_default_dict)