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
from flask import Flask | |
app = Flask(__name__) | |
""" | |
Usage: Install Flask, export this file as the `FLASK_APP` then `flask run`. | |
The resulting server will return the status code you as it for. Exemple gratis: | |
curl 127.0.0.1/404 - will return a 404 | |
curl 127.0.0.1/500 - will return a 500 |
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
{ | |
"name": "invalid-token-sscce", | |
"version": "0.0.1", | |
"description": "", | |
"main": "index.js", | |
"engines": { | |
"node": ">=12" | |
}, | |
"scripts": { | |
"test": "nyc ava", |
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
""" | |
pip install click | |
""" | |
import click | |
import itertools | |
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
// Do assume there exists a lodash.js file in the same directory level./// <reference path="./model.ts" /> | |
import "./lodash.js"; |
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
""" | |
An __init__ file, to make this a package. | |
""" |
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 <string.h> | |
#include <list> | |
#include <iostream> | |
#include <sstream> | |
using namespace std; | |
typedef struct point{ | |
int row, col; | |
} point; |
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
g++ -isystem /opt/lib/gtest-1.7.0/include/ -pthread /opt/lib/gtest-1.7.0/fused-src/gtest/gtest_main.cc $1.cpp /opt/lib/gtest-1.7.0/libgtest.a -o $1 |
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
/** | |
Parse an XML String. It may be worthwhile to cache the DocumentBuilder | |
object so we do not need to create an object everytime the method is | |
invoked. | |
@param xml | |
@return an org.w3c.dom.Document object | |
@referece http://stackoverflow.com/a/562207/777225 | |
*/ | |
public static Document loadXMLFromString(String xml) throws Exception |
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
/** | |
* Set the character at a particular index in the given String. | |
* | |
* @param str | |
* The string to tweak. | |
* @param index | |
* The index where the replacement will take effect. | |
* @param chr | |
* The character to set in the given index. | |
*/ |
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 | |
import math | |
""" | |
Proof-of-concept pseudocode for SMS point-to-point | |
packing. | |
""" | |
def pack(char_encodings): |
NewerOlder