Skip to content

Instantly share code, notes, and snippets.

View matiasvallejosdev's full-sized avatar
🚀
Ship It

Matias Vallejos matiasvallejosdev

🚀
Ship It
View GitHub Profile
@kuc-arc-f
kuc-arc-f / app.js
Created January 18, 2022 02:31
Serverless Framework express, prisma (mysql) sample
const serverless = require('serverless-http');
const express = require('express');
const indexRouter = require('./routes/index');
const usersRouter = require('./routes/users');
const app = express();
app.use('/', indexRouter);
app.use('/users',usersRouter);
module.exports = app;
@amrrs
amrrs / avoid_colab_close.js
Created August 17, 2021 20:02
How to avoid Google Colab Session Closing automatically?
//credit - https://huggingface.co/blog/fine-tune-wav2vec2-english (Patrick von Platen)
// run this on your Chrome / Browser Console (where Colab is present)
function ConnectButton(){
console.log("Connect pushed");
document.querySelector("#top-toolbar > colab-connect-button").shadowRoot.querySelector("#connect").click()
}
var colab = setInterval(ConnectButton,60000);
@nikhilkumarsingh
nikhilkumarsingh / ddbocal.ipynb
Last active May 7, 2021 23:40
AWS DynamoDB Local
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import boto3
def main():
# 1 - Create Client
ddb = boto3.resource('dynamodb',
endpoint_url='http://localhost:8000',
region_name='dummy',
aws_access_key_id='dummy',
aws_secret_access_key='dummy')
# 2 - Create the Table
ddb.create_table(TableName='Transactions',
@gvvynplaine
gvvynplaine / .gitignore
Last active January 25, 2022 19:58
jupyter notebook gitignore
# gitignore template for Jupyter Notebooks
# website: http://jupyter.org/
.ipynb_checkpoints
*/.ipynb_checkpoints/*
# IPython
profile_default/
ipython_config.py
@nicoavila
nicoavila / docker-compose.yml
Last active January 8, 2025 23:14
Docker Compose file for a MySQL 5.7 container
version: '3.3'
services:
database:
image: mysql:5.7
container_name: mysql
restart: always
environment:
MYSQL_DATABASE: 'db'
MYSQL_USER: 'user'
MYSQL_PASSWORD: 'password'
// extension awaiter/methods can be used by this namespace
using UniRx.Async;
// You can return type as struct UniTask<T>, it is unity specialized lightweight alternative of Task<T>
// no(or less) allocation and fast excution for zero overhead async/await integrate with Unity
async UniTask<string> DemoAsync()
{
// You can await Unity's AsyncObject
var asset = await Resources.LoadAsync<TextAsset>("foo");
@vmandic
vmandic / dotnet core .gitignore
Last active March 2, 2025 20:23
A default .NET Core project .gitignore file - or just type `dotnet new gitignore`
# From .NET Core 3.0 you can use the command: `dotnet new gitignore` to generate a customizable .gitignore file
*.swp
*.*~
project.lock.json
.DS_Store
*.pyc
# Visual Studio Code
.vscode
@Fhernd
Fhernd / estadisticas-arreglo.py
Created February 15, 2018 00:10
Estadísticas básicas en Python con Numpy.
import numpy as np
arreglo_primos = np.array([2, 3, 7, 19, 23])
# Promedio:
print(np.mean(arreglo_primos))
print('')
# Mediana:
@fmachado
fmachado / soap-and-rest-versus-sql-odbc-access-to-data.md
Created August 9, 2017 13:27
SOAP and REST versus SQL/ODBC Access to Data

Disclaimer While doing a research for a SCADA integration project, I found this document on Google cache as the main site was unavailable. It has some good points and may be useful for anyone looking for this comparison.

Many people question the concept of using SOAP or REST based services to deliver data from a database when they could potentially use SQL/ODBC. In general terms, if your requirement is for complex SQL/ODBC queries, SQL/ODBC is the way to go. However, when the requirement is less about complex queries and more about accessing and/or updating the data, SOAP and REST provides many advantages in today’s' networks.

Feature SQL/ODBC SOAP/REST
Standards While an SQL standard exists, there are different flavors implemented by different databases. Fully standards based using WSDL, SOAP, REST, XML, HTTP and TCP/IP
C