from wmi_query import wmi_query
opts = {'user': 'user',
'password': 'passwd',
#!/usr/local/bin/python3.6 | |
# -*- coding: utf-8 -*- | |
""" | |
Generate pot file for xml language. | |
This script will create a pot file only for xml files. | |
To update another file create with other language use poedit to that. | |
""" | |
===> Installing for clamav-0.100.0_1 | |
===> Checking if clamav already installed | |
===> Registering installation for clamav-0.100.0_1 | |
Installing clamav-0.100.0_1... | |
===> Creating groups. | |
Using existing group 'clamav'. | |
Using existing group 'mail'. | |
===> Creating users | |
Using existing user 'clamav'. | |
===> SECURITY REPORT: |
# $FreeBSD$ | |
PORTNAME= google-api-php-client | |
PORTVERSION= 2.2.1 | |
DISTVERSIONPREFIX= v | |
CATEGORIES= www | |
PKGNAMEPREFIX= ${PHP_PKGNAMEPREFIX} | |
MAINTAINER= [email protected] | |
COMMENT= Google api client for php |
from wmi_query import wmi_query
opts = {'user': 'user',
'password': 'passwd',
import re | |
from requests_html import HTMLSession | |
s = HTMLSession() | |
r = s.get('https://cbf.com.br/competicoes/brasileiro-serie-a/equipes/2018') | |
times = [x.attrs['title'] for x in r.html.find('div.cell')[0].find('a')] | |
times_renomeados = [] | |
for time in times: |
#!/usr/bin/python3 | |
# -*- codinf: utf-8 -*- | |
import json |
import time | |
def cpu_percent(): | |
tmp_total = 0 | |
tmp_idle = 0 | |
for i in range(10): | |
cpu_data = !head -n1 /proc/stat | |
user, nice, system, idle, iowait, irq, softirq, steal, guest, guest_nice = cpu_data[0].split()[1:] | |
diff_idle = int(idle) - tmp_idle | |
total_cpu_boot = sum(map(int, [user, nice, system, idle, iowait, irq, softirq, steal])) |
<?php | |
require_once('config.inc'); | |
$dhcp = $config['dhcpd']; | |
if (!empty($dhcp)) { | |
foreach ($dhcp as $name => $iface) { | |
if (!empty($iface['staticmap'])) { | |
file_put_contents("/root/{$name}.csv", "mac;ip;hostname;descr\n"); | |
foreach ($iface['staticmap'] as $static) { |