This file contains hidden or 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
openapi: 3.0.3 | |
info: | |
title: Game Score manager API | |
version: 1.3.9 | |
description: Swagger for Game Score manager | |
contact: | |
email: alejo 85981@gmail.com | |
name: Alejandro Romero | |
license: | |
name: Apache 2.0 |
This file contains hidden or 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 { ChangeEvent, useState } from 'react'; | |
function FileUploadMultiple() { | |
const [fileList, setFileList] = useState<FileList | null>(null); | |
const handleFileChange = (e: ChangeEvent<HTMLInputElement>) => { | |
setFileList(e.target.files); | |
}; | |
const handleUploadClick = () => { |
This file contains hidden or 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 { ChangeEvent, useState } from 'react'; | |
function FileUploadSingle() { | |
const [file, setFile] = useState<File>(); | |
const handleFileChange = (e: ChangeEvent<HTMLInputElement>) => { | |
if (e.target.files) { | |
setFile(e.target.files[0]); | |
} | |
}; |
This file contains hidden or 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
#========================================================================# | |
# file_collector.py # | |
#========================================================================# | |
#========================================================================# | |
# usage: file_collector.py [-h] [-f FILE] [-o OUTPUT_FOLDER] # | |
#========================================================================# | |
# optional arguments: | |
# -h, --help show this help message and exit | |
# -f FILE, --file FILE the xlsx file that contains all the files to be | |
# collected |
This file contains hidden or 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
/* Useful celery config. | |
app = Celery('tasks', | |
broker='redis://localhost:6379', | |
backend='redis://localhost:6379') | |
app.conf.update( | |
CELERY_TASK_RESULT_EXPIRES=3600, | |
CELERY_QUEUES=( | |
Queue('default', routing_key='tasks.#'), |
This file contains hidden or 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 sys | |
# To store no of test cases here (2). | |
t = int(sys.stdin.readline()) # | |
# To store input here (0 1 1) and (0 1 2). | |
l = [] | |
while t: | |
# To store the size of array here (3). | |
n = int(sys.stdin.readline()) |
This file contains hidden or 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
<?php | |
try { | |
$soap = new soapclient("https://www.superfinanciera.gov.co/SuperfinancieraWebServiceTRM/TCRMServicesWebService/TCRMServicesWebService?WSDL", array( | |
'soap_version' => SOAP_1_1, | |
'trace' => 1, | |
"location" => "http://www.superfinanciera.gov.co/SuperfinancieraWebServiceTRM/TCRMServicesWebService/TCRMServicesWebService", | |
)); | |
$response = $soap->queryTCRM(array('tcrmQueryAssociatedDate' => date("Y-m-d"))); | |
$response = $response->return; | |
if($response->success) |
This file contains hidden or 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
curl -XPUT 'http://localhost:9200/mis_documentos/_settings' -d '{ | |
"analysis" : { | |
"analyzer":{ | |
"no_accent": { | |
"tokenizer": "standard", | |
"filter": [ "lowercase", "asciifolding", "default_spanish_stopwords", "default_spanish_stemmer" ] | |
} | |
}, | |
"filter" : { | |
"default_spanish_stemmer" : { |
This file contains hidden or 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
curl -XPOST 'localhost:9200/idx30/_close' | |
curl -XPUT 'localhost:9200/idx30/_settings' -d '{ | |
"index.analysis.analyzer.default.filter.0": "standard", | |
"index.analysis.analyzer.default.tokenizer": "standard", | |
"index.analysis.analyzer.default.filter.1": "lowercase", | |
"index.analysis.analyzer.default.filter.2": "stop", | |
"index.analysis.analyzer.default.filter.3": "asciifolding", | |
"index.number_of_replicas": "1" | |
}' |
This file contains hidden or 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
var request = require('request'); | |
var sendMessage = function(device, message){ | |
var restKey = '****'; | |
var appID = '****'; | |
request( | |
{ | |
method:'POST', | |
uri:'https://onesignal.com/api/v1/notifications', | |
headers: { |
NewerOlder