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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
pre-process-midnight.py | |
Descp: A very simple script that add the missing time part 00:00:00 | |
at midnight for tomst output files in lolly version 1.40. | |
Created on: 21-dec-2023 | |
Copyright 2023-2024 Abel 'Akronix' Serrano Juste <[email protected]> | |
LICENSE: GPLv3.0 | |
""" |
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
#!/usr/bin/env python3 | |
# -*- coding: utf-8 -*- | |
""" | |
get_b64_png.py | |
Descp: A very simple script to get the b64 code for a png image from a given | |
URL. | |
Created on: 26-may-2019 |
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
# Serve lib/ folder only in development mode | |
@server_bp.route('/lib/<dep>', defaults={'path': ''}) | |
@server_bp.route('/lib/<path:path>/<dep>') | |
def serve_lib_in_dev(path, dep): | |
path = os.path.join('lib/', path) | |
dev = current_app.config["DEBUG"] | |
if dev: | |
return flask.send_from_directory(path, dep) | |
else: | |
print('Trying to retrieve a dependency from a local folder in production. Skipping.') |
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
use utf8; | |
use feature 'say'; | |
#~ $filename=$ARGV[0]; | |
# uncomment to define the input file here instead of using standard input | |
#~ my $encoding = ":encoding(UTF-8)"; | |
#~ open (FH, " < $encoding", $filename) or die "Error trying to write on $filename: $!\n"; | |
# uncomment to define the output file here instead of using standard output |
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
use utf8; | |
use feature 'say'; | |
#~ $filename=$ARGV[0]; | |
# uncomment to define the input file here instead of using standard input | |
#~ my $encoding = ":encoding(UTF-8)"; | |
#~ open (FH, " < $encoding", $filename) or die "Error trying to write on $filename: $!\n"; | |
# uncomment to define the output file here instead of using standard output |
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
import dash | |
import dash_core_components as dcc | |
import dash_html_components as html | |
print(dcc.__version__) # 0.6.0 or above is required | |
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css'] | |
app = dash.Dash(__name__, external_stylesheets=external_stylesheets) |
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 <stdio.h> | |
#include <termios.h> | |
#include <unistd.h> | |
// from https://stackoverflow.com/a/17271636/2904315 | |
#define clear() printf("\033[H\033[J") | |
// emulate getch() of conio.h | |
int getch() { | |
// from http://stackoverflow.com/a/23035044/15472 |
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
import React from 'react' | |
import { Field, reduxForm } from 'redux-form' | |
const SimpleForm = (props) => { | |
const { handleSubmit, pristine, submitting } = props | |
return ( | |
<form onSubmit={handleSubmit}> | |
<div> | |
<label>First Name</label> | |
<div> |