Issue # | Comment # | 👍 | 👎 | score |
---|---|---|---|---|
17262 | 250240826 | 69 | 52 | 0.311292774877992 |
32825 | 506707539 | 87 | 44 | 0.323308270676692 |
17262 | 250240848 | 45 | 43 | 0.366809089148894 |
18964 | 278239115 | 27 | 51 | 0.37097635610659 |
[19412](https://github.com/gol |
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 render_template, flash, redirect, request, send_from_directory, url_for | |
import uuid | |
import os | |
import subprocess | |
import random | |
cwd = os.getcwd() | |
tmp_path = "/tmp/echo/" | |
serve_dir = "audio/" | |
docker_cmd = "docker run -m=100M --cpu-period=100000 --cpu-quota=40000 --network=none -v {path}:/share lumjjb/echo_container:latest python run.py" |
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 sys | |
from subprocess import call | |
import signal | |
import os | |
def handler(signum, frame): | |
os._exit(-1) | |
signal.signal(signal.SIGALRM, handler) | |
signal.alarm(30) |
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
#!/bin/sh | |
### | |
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer) | |
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
### | |
# Alot of these configs have been taken from the various places | |
# on the web, most from here | |
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
SHELL := /bin/bash | |
REV := $(shell git rev-parse HEAD) | |
CHANGES := $(shell test -n "$$(git status --porcelain)" && echo '+CHANGES' || true) | |
TARGET := packer-provisioner-itamae-local | |
VERSION := $(shell cat VERSION) | |
OS := darwin freebsd linux openbsd | |
ARCH := 386 amd64 |
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
package main | |
import ( | |
"crypto/tls" | |
"encoding/json" | |
"fmt" | |
"log" | |
"net" | |
"net/http" | |
) |
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
func (a *alertWrapper) Error(err error) error { | |
// sentry Go SDK uses asynchronous transport, if fatal (os.Exit) or panic is called after the alert | |
// the event might get dropped, so we call Flush explicitly. | |
defer sentry.Flush(time.Second * 2) | |
hub := sentry.CurrentHub().Clone() | |
ev := sentry.NewEvent() | |
ev.Level = sentry.LevelError |
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
{ | |
"id": 28265, | |
"language": "Go", | |
"fork": false, | |
"forks_count": 20568, | |
"open_issues_count": 3299, | |
"stargazers_count": 58727, | |
"watchers_count": 58727, | |
"archived": false, | |
"disabled": false, |
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
WITH votes AS ( | |
SELECT | |
number_id, | |
id, | |
SUM(CAST(plus_one + 1 AS FLOAT)) AS U, | |
SUM(CAST(minus_one + 1 AS FLOAT)) AS D | |
FROM | |
comments | |
GROUP BY | |
id, |
OlderNewer