128 private links
Visual scripting framework for python.
Negli ultimi anni lo sviluppo di web API si è notevolmente incrementato a seguito della diffusione di client etereogenei e di nuove tecnologie: PC desktop, dispositivi mobili come cellulari e tablet, IOT (Internet of Things), Big Data, usano tutti interfacce web based per connettere e aggregare componenti e dati distribuiti al fine di creare sempre nuove soluzioni/servizi per qualsisi tipo di business globale. E’ nata per questo la necessità di creare dei sistemi di backend “neutrali” che forniscono dati in maniera “grezza” (tipicamente nel formato JSON o XML) che poi vengono utilizzati opportunamente sulle varie tipologie di dispositivi. Il modello adottato per la progettazione delle API è l ‘ormai conslidato REST.
In breve, questo modello consente di strutturare le API in risorse logiche su cui si opera mediante il protocollo HTPP usando le operazioni standard che quest’ultimo ci mette a disposizione, quindi: GET, POST, PUT e DELETE.
Esula da questo articolo l’approfondire il modello REST; fornirò alla fine un elenco di risorse utili per chi volesse approfondire l’argomento. Qui invece verrano descritte 10 best pactices per progettare/sviluppare una API in maniera chiara e pulita. L'utilizzo di metodologie e convenzioni chiare e predefinite consente meglio di condividere le informazioni tra sviluppatori, architetti e designer al fine di migliorare tutto il ciclo di implementazione di una web API.
Ma vediamo l’elenco delle 10 best practices:
Indice
- Usare Nomi e non Verbi
- Usare i Nomi al plurale
- GET e parametri di query non dovrebbero alterare lo stato
- Usa le sub-resources per descrivere le relazioni
- Usa gli header HTTP per definire i formati di serializzazione dei dati
- Use HATEOAS
- Implementa operazioni di filtraggio, ordinamento, selezione di specifici campi e paginazione per le collection: Filtraggio, Ordinamento, Selezione di campi, Paginazione
- Versiona la tua API
- Gestisci gli errori usando i codici di stato HTTP: Usa il payload dell’errore
- Consenti l’override dei metodi HTTP
Overview This article is written from a programmer’s perspective, where a monad is a software engineering pattern. Like other patterns, you may have already used it without knowing it was the monad pattern. There is still value in studying such patterns, because then you can use it more fluidly. There...
As used to author Heaven's Vault, 80 Days and Sorcery!: produce interactive scripts by writing in pure-text with ink markup.
This article compares the performance of several approaches when summing two sequences element-wise with different Python loops.
Is there a way to conveniently define a C-like structure in Python? I'm tired of writing stuff like:
class MyStruct():
def __init__(self, field1, field2, field3):
self.field1 = field1
self.field2 = field2
self.field3 = field3
It will make your productivity plummet
The people who created C sure loved keeping the number of keywords low, and today I’m going to show you yet another place you can use the static
keyword in C99.
You might have seen function parameter declaration for array parameters that include the size:
void foo(int myArray[10]);
The function will still receive a naked int *
, but the [10]
part can serve as documentation for the people reading the code, saying that the function expects an array of 10 ints.
But, you can actually also use the keyword static
between the brackets:
void bar(int myArray[static 10]);
This tells the compiler that it should assume that the array passed to bar has at least 10 elements. (Note that this rules out a NULL
pointer!)
This article introduces how to build a Python and Flask based web application for performing text analytics on internet resources such as blog pages. To perform text analytics I will utilizing Requests for fetching web pages, BeautifulSoup for parsing html and extracting the viewable text and, apply the TextBlob package to calculate a few sentiment scores.
Steven Rostedt wanted to do a little housekeeping, specifically with the function tracing code used in debugging the kernel. Up until then, the kernel could enable function tracing using either GCC's -pg flag or a combination of -pg and -mfentry. In each case, GCC would create a special routine that would execute at the start of each function, so the kernel could track calls to all functions. With just -pg, GCC would create a call to mcount() in all C functions, although with -pg coupled with -mfentry, it would create a call to fentry().
Blog of Raph Levien.
Deep Semantic Code Search aims to explore a joint embedding space for code and description vectors and then use it for a code search application.
Solution for the Range Minimum Query problem with Sparse Tables and Dynamic Programming.
Blog Chris Siebenmann is a Unix sysadmin who now works at the Department of Computer Science, University of Toronto.
A toy project started to see how well a simple LSTM model can autocomplete python code.
It gives quite decent results by saving above 30% key strokes in most files, and close to 50% in some. We calculated key strokes saved by making a single (best) prediction and selecting it with a single key.
We do a beam search to find predictions, upto ~10 characters ahead. So far it's too inefficient, if you are wondering about editor integration.
The web platform is the delivery mechanism of choice for a ton of software these days, either through the web browser itself or through Electron, but that doesn’t mean there isn’t a place for a good old fashioned straight-up desktop application in the picture.
Fortunately, it’s easier than ever to write a usable, pretty, and performant desktop app, using my language of choice (Rust) and the wildly successful cross-platform GUI framework GTK.
GUI prototyped using Glade.
Pike is a dynamic programming language with a syntax similar to Java and C. It is simple to learn, does not require long compilation passes and has powerful built-in data types allowing simple and really fast data manipulation.
Pike is a general purpose programming language, which means that you can put it to use for almost any task. Its application domain spans anything from the world of the Net to the world of multimedia applications, or environments where your shell could use some spicy text processing or system administration tools. Your imagination sets the limit, but Pike will probably extend it far beyond what you previously considered within reach.