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
/* @flow */ | |
export class GraphQLSchema { | |
getQueryType() { | |
return "foobar"; | |
} | |
} |
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
version: '2' | |
services: | |
web: | |
image: node:4-slim | |
volumes: | |
- .:/app | |
command: node /app/index.js | |
ports: | |
- "9500:9500" |
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 strict'; | |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | |
Function.prototype.$asyncbind = function $asyncbind(self, catcher) { | |
'use strict'; | |
if (!Function.prototype.$asyncbind) { | |
Object.defineProperty(Function.prototype, '$asyncbind', { | |
value: $asyncbind, |
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
{ | |
"api": { | |
"id": "string", | |
"name": "string", | |
"sort_order": 0, | |
"backend_protocol": "http", | |
"frontend_host": "string", | |
"backend_host": "string", | |
"servers": [ | |
{ |
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/bash | |
export NAME=ghost | |
export TARGET=root@1.2.3.4 | |
export SERVICE=$(mktemp) | |
cat > $SERVICE <<EOF | |
[Unit] | |
Description=Ghost | |
After=docker.service |
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 <bits/stdc++.h> | |
using namespace std; | |
bool prime(long n) { | |
if (n < 2) return false; | |
for (long i = 2; i*i <= n; i++) { | |
if (n % i == 0) return 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
#!/bin/sh | |
printf "Hello world" |
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
Error: NodeDef mentions attr 'dilations' not in Op<name=Conv2D; signature=input:T, filter:T -> output:T; attr=T:type,allowed=[DT_HALF, DT_FLOAT]; attr=strides:list(int); attr=use_cudnn_on_gpu:bool,default=true; attr=padding:string,allowed=["SAME", "VALID"]; attr=data_format:string,default="NHWC",allowed=["NHWC", "NCHW"]>; NodeDef: import/module_apply_default/MobilenetV2/Conv/Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 2, 2, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/gpu:0"](import/module_apply_default/MobilenetV2/input, import/module_apply_default/MobilenetV2/Conv/Conv2D/ReadVariableOp). (Check whether your GraphDef-interpreting binary is up to date with your GraphDef-generating binary.). | |
[[Node: import/module_apply_default/MobilenetV2/Conv/Conv2D = Conv2D[T=DT_FLOAT, data_format="NHWC", dilations=[1, 1, 1, 1], padding="SAME", strides=[1, 2, 2, 1], use_cudnn_on_gpu=true, _device="/job:localhost/replica:0/task:0/gpu:0"](import/m |
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
require 'open-uri' | |
require 'json' | |
require 'parallel' | |
packages = File.read('01.most-dependent-upon.md').scan(/\[([\w-]+)\]/m).to_a.map(&:first) | |
Parallel.each(packages) do |package| | |
begin | |
parsed = JSON.parse(open('https://registry.npmjs.org/' + package).read) | |
url = URI.parse(parsed['repository']['url']) |
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 tensorflow as tf | |
import requests | |
import responder | |
import os, tempfile | |
# download("http://gajamed.pl/uploads/2016/04/29.jpg") | |
# => "/tmp/foo.jpg" | |
def download(url): | |
dest = os.path.join(tempfile.mkdtemp(), 'image.jpg') | |
response = requests.get(url, allow_redirects=True) |
OlderNewer