Skip to content

Instantly share code, notes, and snippets.

View Santiago-j-s's full-sized avatar

Santiago Santana Santiago-j-s

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<?php
namespace backend\models\charts;
use common\models\ChecklistLineInstance;
use Yii;
use yii\db\Query;
function queryLines(): Query
{
app.post("/login", (req, res) => {
let body = req.body
Usuario.findOne({user: body.user}, (error, userDB) =>{
if(error){
res.status(400);
res.render('error.hbs', { error: error })
}
@Santiago-j-s
Santiago-j-s / request.json
Last active June 29, 2020 13:15
Example POST request with base64 data
{
"description": "description-test",
"photo": "iVBORw0KGgoAAAANSUhEUgAAAxQAAAKDCAYAAACDl0zeAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAPHXSURBVHhe7P0HfBx5fh54P51zo7vRyBkEwJyGcfLszIbZnLS72tUqWDq9r2zJtny2pdNZd5Z9/tgnvZbPWp9tfRRs5V1tTpMzOUMOOcwBBBGInLrROef39y80OBiGWU4vh0Ngnu9uDYHqylWN/j1d9a/SheKZCoiIiIiIiGqgr/5LRERERET0jjFQEBERERFRzRgoiIiIiIioZgwURERERERUMwYKIiIiIiKqGQMFERERERHVjIGCiIiIiIhqxkBBREREREQ1Y6AgIiIiIqKaMVAQEREREVHNGCiIiIiIiKhmDBRERERERFQzBgoiIiIiIqoZAwUREREREdWMgYKIiIiIiGrGQEFERERERDXTheKZSvXnd6RSeXO01T8TEREREdH7xy0HipXQcKN/VzoiIiIiIlr/dDpd9adbCBQ3Cg5qdJ1ep01I+1kbQoaR/xERERER0fq1nACWqfr/lgJFuVy++rNilDBhMBigl3+1rhosqtFD+y8REREREa0/K4FChYmylP43DRQr4WF1oFBnNox6PcxmI4wGvQQJ6fRYDhSrTnsQEREREdH6puUE6W4YKK4NE5VKWQKEASajAVazSfuX+YGIiIiIiK67bexKmFBBYiVMmAxGLUjYLCpM6BkmiIiIiIhIc8PnUKhQsdIZ1CVOJoPWGQwqTDBNEBERERHRsrcNFDpUtMubVsKEaitBRERERES04i2BYiVIaI2wVaCQAGHVLnMyMEwQEREREdF1rjtDsXJHJ3U7WJPJCLPRyMuciIiIiIjohm56yZNetZ3g3ZyIiIiIiOhtXBcoVJiQ/2pBQt0qloiIiIiI6GauBoqV9hPLnXoCngoUPD1BR
# https://github.com/hardcoreplayers/dotfiles/blob/master/tmux/.tmux.conf
# battery colors
set -g @batt_color_charge_secondary_tier8 'colour0'
set -g @batt_color_charge_secondary_tier7 'colour0'
set -g @batt_color_charge_secondary_tier6 'colour0'
set -g @batt_color_charge_secondary_tier5 'colour0'
set -g @batt_color_charge_secondary_tier4 'colour15'
set -g @batt_color_charge_secondary_tier3 'colour15'
set -g @batt_color_charge_secondary_tier2 'colour15'
@Santiago-j-s
Santiago-j-s / dia1.md
Last active June 8, 2020 00:06
Clasificadores probabilisticos en aprendizaje automático

Día 1

Papers:

  • ImageNet Classification with Deep Convolutional Neural Networks
  • A Neural Probabilistic Language Model
  • Human-level control through deep reinforcement learning
  • Mastering the game of Go with deep neural networks ad tree search
  • A general reinforcement learning algorithm that masters chess, shogi, Go through self-play
  • Human-level performance in 3d multiplayer games with population-based reinforcement learning
@Santiago-j-s
Santiago-j-s / machine.js
Last active May 5, 2020 19:59
Generated by XState Viz: https://xstate.js.org/viz
const DIAS_CRITICIDAD_MEDIA = 30;
const DIAS_CRITICIDAD_ALTA = 15;
const DIAS_VENCIDO = 0;
const isProximoAVencer = (context) => context.dias ? context.dias <= DIAS_CRITICIDAD_ALTA : false;
const isVencido = (context) => (context.dias !== undefined) ? context.dias <= 0 : false;
const isCriticidadMedia = (context) => context.dias ? context.dias <= DIAS_CRITICIDAD_MEDIA : false;
const checklistMachine = {
id: "checklist",
No overload matches this call.
Overload 1 of 2, '(config: MachineConfig<any, any, AnyEventObject>, options?: Partial<MachineOptions<any, AnyEventObject>> | undefined, initialContext?: any): StateMachine<...>', gave the following error.
Type '{ id: string; states: StateNodesConfig<any, any, AnyEventObject>; config: StateNodeConfig<any, any, AnyEventObject>; ... 20 more ...; __xstatenode: true; }' is not assignable to type 'StateNodeConfig<any, any, AnyEventObject>'.
Types of property 'states' are incompatible.
Type 'StateNodesConfig<any, any, AnyEventObject>' is not assignable to type 'StatesConfig<any, any, AnyEventObject>'.
Index signatures are incompatible.
Type 'StateNode<any, any, AnyEventObject, any>' is not assignable to type 'StateNodeConfig<any, any, AnyEventObject>'.
Types of property 'after' are incompatible.
Type 'DelayedTransitionDefinition<any, AnyEventObject>[]' is not assignable to type 'Record<string | number, string | Tra
@Santiago-j-s
Santiago-j-s / machine.js
Last active April 27, 2020 20:08
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
// - XState (all XState exports)