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 numpy as np | |
import pickle | |
def load_and_cache(filename): | |
output = None | |
cache_dir = '/tmp/my_project_cache/' | |
os.makedirs(cache_dir, mode=0o744, exist_ok=True) | |
cache = cache_dir + filename + '.pkl' | |
if not os.path.exists(cache): | |
output = np.genfromtxt(filename, dtype=float, delimiter=',') # TODO: Fill your logic |
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
javascript: void | |
function($) { | |
var loadBookmarklet = function($) { | |
(function() { | |
if ("www.zomato.com" == document.domain) { | |
var msg = ""; | |
try { | |
splits = $('meta[property="al:android:url"]').attr("content").split("/"); | |
const id = splits[3], | |
page_type = splits[2]; |
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 org.paulbetts.shroom.core; | |
import android.os.AsyncTask; | |
import com.squareup.okhttp.*; | |
import java.io.IOException; | |
import java.io.InputStream; | |
import java.io.UnsupportedEncodingException; | |
import java.util.Arrays; |
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/python | |
import os | |
from flask import Flask, Response, request, abort, render_template_string, send_from_directory | |
import Image | |
import StringIO | |
app = Flask(__name__) | |
WIDTH = 1000 |
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
image: docker:latest | |
# When using dind, it's wise to use the overlayfs driver for | |
# improved performance. | |
variables: | |
DOCKER_DRIVER: overlay | |
GCP_PROJECT_ID: CHANGE-TO-GCP-PROJECT-ID | |
IMAGE_NAME: image_id | |
services: |
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 okhttp3.Call; | |
import okhttp3.OkHttpClient; | |
import okhttp3.Request; | |
import okhttp3.Response; | |
import okhttp3.mockwebserver.MockResponse; | |
import okhttp3.mockwebserver.MockWebServer; | |
import okhttp3.mockwebserver.RecordedRequest; | |
import org.junit.Rule; | |
import org.junit.Test; |
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 okhttp3.ResponseBody; | |
import okhttp3.mockwebserver.MockResponse; | |
import okhttp3.mockwebserver.MockWebServer; | |
import okhttp3.mockwebserver.RecordedRequest; | |
import org.junit.Rule; | |
import org.junit.Test; | |
import retrofit2.Call; | |
import retrofit2.Response; | |
import retrofit2.Retrofit; | |
import retrofit2.http.GET; |
Update: As of 11 January 2022, git.io no longer accepts new URLs.
Command:
curl https://git.io/ -i -F "url=https://github.com/YOUR_GITHUB_URL" -F "code=YOUR_CUSTOM_NAME"
URLs that can be created is from:
https://github.com/*
https://*.github.com
OlderNewer