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
#!perl | |
$|=1; | |
eval { | |
#- Access the Clipboard -# | |
use Win32::Clipboard; | |
my $CLIP = Win32::Clipboard(); | |
my $input; | |
if ($CLIP->IsText()) { |
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
@echo off | |
REM ---------------------- | |
REM ----- ARGUMENTS ------ | |
REM ---------------------- | |
set PATH=%~1 | |
set FILE=%~n1 | |
set DIR=%~dp1 | |
set EXTENSION=%~x1 | |
REM ---------------------- |
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
#!perl | |
#--------------------------------------------------------------------------------------------- | |
#-------------------------- Prerequisites ---------------------------------------------------- | |
#--------------------------------------------------------------------------------------------- | |
# This Perl script is using Imagemagick to compress the pictures. | |
# This tool shall be downloaded and installed first. | |
#--------------------------------------------------------------------------------------------- | |
#--------------------------------------------------------------------------------------------- |
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
REM !IMPORTANT: May not work with Lotus Notes 8.5.x on Windows 7! | |
@echo off | |
c: | |
cd \ | |
mkdir Backup_notes\data | |
cd Program Files | |
cd IBM | |
cd lotus/notes | |
@echo on |
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
Sub Insert_x_rows() | |
' | |
' Insert a given number of rows into a MS Word Table | |
' | |
' | |
Dim n_rows As Integer | |
n_rows = InputBox("How many rows shall be inserted?", "Insert Rows") | |
Selection.InsertRowsBelow n_rows |
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
#!python | |
import os | |
import re | |
import sys | |
import subprocess | |
''' | |
svn_revert_clean.py - script to remove unversioned files and perform svn revert |
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
#!/python | |
from collections import defaultdict, Counter | |
# BONUS: fuzzy logic when entering countries and cities | |
try: | |
from fuzzywuzzy import fuzz | |
FUZZY_ENABLED = True | |
print("") | |
except ImportError as e: |
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 timeit | |
from typing import Dict, Generator, List | |
Range3 = Generator[int, None, None] | |
def myrange3(start: int, stop: int = None, step: int = 1) -> Range3: | |
if stop is None: | |
current, stop = 0, start |
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
#!/usr/bin/env python3 | |
import solution | |
import pytest | |
list_test_inputs = [ | |
(10,), | |
(10, 20), | |
(20, 10), |
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
#!/usr/bin/env python3 | |
import solution | |
logfilename = "mini-access-log.txt" | |
def test_read_logs(): | |
log_list = solution.logtolist(logfilename) | |
assert len(log_list) == 206 |
OlderNewer