Skip to content

Instantly share code, notes, and snippets.

View ssisaias's full-sized avatar
👨‍💻
:)

Isaias S. Silva ssisaias

👨‍💻
:)
View GitHub Profile
@ssisaias
ssisaias / com.vscodium.codium
Last active November 2, 2024 17:03
vscodium gnome 42 .desktop entries with working pin to dash and url handler
#com.vscodium.codium-url-handler.desktop
[Desktop Entry]
Name=VSCodium - URL Handler
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=dist/VSCodium-vscodium-95fd5b7/VSCode-linux-x64/codium --reuse-window --open-url %U
Icon=dist/VSCodium-vscodium-95fd5b7/vscode/resources/linux/code.svg
Type=Application
NoDisplay=true
StartupNotify=true
Things I installed to obtain the FUKCING GERDAME SHIELD,
So I can remove later:::
1. sudo apt install python3-pip
2. python -m pip install pyautogui
3. sudo apt-get install python3-tk python3-dev
#xinput float or attach keyboard sample:
#lenovo 330
xinput float 13
xinput reattach 13 3
xinput float 17
xinput reattach 17 3
@ssisaias
ssisaias / js-browser.js
Last active June 8, 2021 21:57
simple exercise
// Grade conversion
sistemaNotas = function(nota){
if(nota>100||nota<1) return 'Invalid score';
if(nota<60){
return 'F'
} else if(nota<70) {
return 'D'
} else if(nota<80) {
return 'C'
} else if(nota<90) {
var primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97] ;
function binS(x){
var n = primes.length;
var min = 0;
var max = n-1;
var found = false;
var lookupPos = 0;
while(min<=max){
@ssisaias
ssisaias / settings.json
Last active June 9, 2020 01:02
VS Code Setting (JSON)
{
"workbench.colorTheme": "Dracula",
"workbench.iconTheme": "material-icon-theme",
"workbench.startupEditor": "newUntitledFile",
"editor.tabSize": 2,
"workbench.editor.labelFormat": "short",
public boolean mediate(MessageContext context) {
try {
log.warn("OPERATION: ");
Axis2MessageContext axis2MsgCtx = ((Axis2MessageContext) context);
Iterator<String> propNames = axis2MsgCtx.getAxis2MessageContext().getOperationContext().getPropertyNames();
while(propNames.hasNext()) {
String propKey = propNames.next();
log.warn("NAME - "+ propKey + " VALUE - " + axis2MsgCtx.getAxis2MessageContext().getOperationContext().getProperty(propKey).toString());
}
[Rainmeter]
Update=5000
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=3
BackgroundMargins=0,34,0,14
[Metadata]
; Contains basic information of the skin.
Name=System
@ssisaias
ssisaias / WSO2-Axiom-RemoveTagFromPayload.java
Last active April 18, 2019 16:57
Remove tag from payload using WSO2 axiom engine and custom mediators
public boolean mediate(MessageContext context) {
try {
String test = context.getProperty("mock_property").toString();
OMElement xmlPayload = AXIOMUtil.stringToOM(test);
//log.info(xmlPayload);
OMElement envelope = context.getEnvelope().getBody().getFirstElement();
//log.info(envelope);
OMElement body = envelope.getFirstElement();
//log.info(body);
OMElement items = body.getFirstElement();
import nltk
import csv
import pickle
from nltk.tokenize import word_tokenize
from nltk.corpus import stopwords
class Analise (object):
def __init__(self):
self.stop_words = set(stopwords.words("portuguese"))
self.dataPath_treino = 'output.txt'