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
function Send-FTP | |
{ | |
<# | |
.SYNOPSIS | |
Upload files to FTP server | |
.DESCRIPTION | |
Upload files to a FTP address, | |
using System.Net.WebClient to connect to the FTP server | |
uploading to the given address |
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
function Expand-ArchiveDotNet{ | |
<# | |
.SYNOPSIS | |
Expands an archive. Extract files contained. | |
.DESCRIPTION | |
Expand-Archive doesn't exist in powershell version 4 (only >= 5) | |
This is a .Net implementation of it. | |
.PARAMETER Path |
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
function Get-ObjectProperty { | |
param($InputObject, $Path="[ORIGIN]") | |
Get-Member -InputObject $InputObject | Where-Object {$_.MemberType -eq 'Property'} | ` | |
Select-Object -ExpandProperty Name | Foreach-Object { | |
"[ORIGIN].$_ : $($InputObject.$_)" | |
Get-ObjectProperty -InputObject $InputObject.$_ -Path "$Path.$_" | |
} | |
} |
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 Grade: | |
""" | |
""" | |
def __init__(self, value, weight): | |
if 0 > value or 100 < value: | |
raise "Cannot create new Grade object. Grade value must be in range [0,100]" | |
# 0-100 | |
self.value = value | |
if 1 > weight or 4 < weight: | |
raise "Cannot create new Grade object. Grade weight must be in range [1,4]" |
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 math | |
print('1)') | |
L = [3, 7, 2] | |
Histo = ['*'*i for i in L] | |
print(Histo) |