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
#!/bin/bash | |
# Terminate Logi Options if running | |
echo "Terminating Logi Options..." | |
pkill -f LogiOptions | |
# Remove Logi Options app | |
echo "Removing Logi Options from Applications directory..." | |
rm -rf /Applications/LogiOptions.app |
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
#include <Arduino.h> | |
#include "modelo_iris.h" // Inclua o arquivo gerado pelo microgenml | |
Eloquent::ML::Port::DecisionTree dt; | |
// Definir os pinos dos potenciômetros | |
#define POT1_PIN 34 // Potenciômetro 1 (Comprimento da Sépala) | |
#define POT2_PIN 35 // Potenciômetro 2 (Largura da Sépala) |
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
#!/bin/bash | |
EXCEPT_BRANCHES=("main") | |
usage() { | |
echo "Usage: $0 --except 'branch1 branch2 ...'" | |
exit 1 | |
} | |
while [[ "$#" -gt 0 ]]; do |
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
tell application "System Events" | |
tell application process "NotificationCenter" | |
repeat while true | |
if exists window "Notification Center" then | |
try | |
repeat with theWindow in (get windows whose name is "Notification Center") | |
set displaySize to size of theWindow | |
set notifSize to size of UI element 1 of scroll area 1 of group 1 of theWindow | |
set currentPos to position of theWindow | |
set newPos to {-((first item of displaySize) - (first item of notifSize)) / 2, ((second item of displaySize) - (second item of notifSize) - 56)} |
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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Blue Component</key> | |
<real>0.07884746789932251</real> | |
<key>Green Component</key> | |
<real>0.081504985690116882</real> |
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
# coding: utf-8 | |
# This sample code shows how to create a timeseries based on date periods to calculate | |
# the frequency that an event occurs in a hour. | |
# Links: | |
# - https://pandas.pydata.org/docs/reference/api/pandas.date_range.html | |
# - https://pandas.pydata.org/docs/getting_started/intro_tutorials/09_timeseries.html?highlight=resample#resample-a-time-series-to-another-frequency | |
import pandas as pd | |
import numpy as np |
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
document.querySelectorAll('input[type=number]').forEach(input => { | |
input.addEventListener('change', (e) => { | |
const value = e.target.value | |
const props = e.srcElement.attributes | |
console.log(`${props.min.value} ${props.max.value} ${value}`) | |
if (value <= props.min.value || value >= props.max.value) { | |
alert('valor muito baixo') | |
} | |
}) | |
}) |
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
to displayError() | |
display dialog "The script encountered a problem." | |
end displayError | |
set rightNow to (get current date) | |
set hoursNow to hours of rightNow | |
try | |
repeat while true | |
#display dialog hoursNow | |
if (hoursNow > 17) then |
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
try | |
repeat while true | |
say "Drink water now" | |
delay 300 | |
end repeat | |
end try |
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
# coding: utf-8 | |
d = date(2022, 2, 22) | |
d1 = date(2022, 3, 4) | |
abs(d-d1).days |
NewerOlder