This file contains hidden or 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/python3 | |
| # Scroll to the bottom for benchmarking results. | |
| import html | |
| import os | |
| import aiosqlite | |
| from datetime import datetime | |
| from typing import List, Optional | |
| from contextlib import asynccontextmanager |
This file contains hidden or 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 logging | |
| import asyncio | |
| import json | |
| from asyncio import sleep | |
| from fastapi import FastAPI, APIRouter, Request, File, UploadFile | |
| from fastapi.routing import APIRoute | |
| from fastapi.encoders import jsonable_encoder | |
| from fastapi.responses import ( |
This file contains hidden or 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 "golang.org/x/tour/pic" | |
| func Pic(dx, dy int) [][]uint8 { | |
| a := make([][]uint8, dy) | |
| for i := range a { | |
| a[i] = make([]uint8, dx) | |
| } | |
| for i := 0; i < dy; i++ { |
This file contains hidden or 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 bash | |
| # memusg -- Measure memory usage of processes | |
| # Usage: memusg COMMAND [ARGS]... | |
| # | |
| # Author: Jaeho Shin <netj@sparcs.org> | |
| # Created: 2010-08-16 | |
| ############################################################################ | |
| # Copyright 2010 Jaeho Shin. # | |
| # # | |
| # Licensed under the Apache License, Version 2.0 (the "License"); # |
This file has been truncated, but you can view the full file.
This file contains hidden or 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
| emails = [ | |
| ".impo-text", | |
| "0-00.usa.cc", | |
| "0-180.com", | |
| "0-30-24.com", | |
| "0-420.com", | |
| "0-900.com", | |
| "0-aa.com", | |
| "0-attorney.com", | |
| "0-mail.com", |
This file contains hidden or 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 'spec_helper' | |
| require 'pry' | |
| describe "Workflows" do | |
| context "when all jobs finish successfuly" do | |
| it "marks workflow as completed" do | |
| flow = TestWorkflow.create | |
| perform_enqueued_jobs do | |
| flow.start! | |
| end |
This file contains hidden or 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: | |
| - rubocop-performance | |
| - rubocop-rails | |
| AllCops: | |
| TargetRubyVersion: 2.6 | |
| Exclude: | |
| - "config/**/*.rb" | |
| - "db/**/*.rb" | |
| - "**/Rakefile" |
This file contains hidden or 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 http://zzapper.co.uk/vimtips.html | |
| ------------------------------------------------------------------------------ | |
| " new items marked [N] , corrected items marked [C] | |
| " *best-searching* | |
| /joe/e : cursor set to End of match | |
| 3/joe/e+1 : find 3rd joe cursor set to End of match plus 1 [C] | |
| /joe/s-2 : cursor set to Start of match minus 2 | |
| /joe/+3 : find joe move cursor 3 lines down | |
| /^joe.*fred.*bill/ : find joe AND fred AND Bill (Joe at start of line) | |
| /^[A-J]/ : search for lines beginning with one or more A-J |
This file contains hidden or 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 <QDebug> | |
| #include <QString> | |
| #include <QStringList> | |
| #include <QRegularExpression> | |
| #include <QRegularExpressionMatchIterator> | |
| #include <QFile> | |
| class StringSplit { | |
| public: | |
| StringSplit(QString string) { |
This file contains hidden or 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 'json' | |
| require 'faraday' | |
| connection = Faraday.new do |conn| | |
| conn.adapter Faraday.default_adapter | |
| end | |
| # GET request | |
| response = connection.get('https://httpbin.org/get', data: 'this is the data') | |
| puts "Response from get: #{response.body}" |
NewerOlder