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 ( | |
"fmt" | |
"time" | |
"github.com/aws/aws-sdk-go/aws" | |
"github.com/aws/aws-sdk-go/aws/credentials" | |
"github.com/aws/aws-sdk-go/service/cloudfront" | |
) |
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 peewee import * | |
from models import News, database | |
compiler = database.get_compiler() | |
print(News.select().where(News.url == 'test').sql(compiler)) |
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 xml.etree import ElementTree | |
from lxml.etree import XML | |
import xmltodict | |
import untangle | |
from benchmarker import Benchmarker | |
N = 1000 * 1 | |
N = 1000 * 100 | |
xml_string = """<?xml version="1.0"?> |
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
# | |
# about | |
# ----- | |
# create magic file of font type list(type.mgk) for GraphicsMagick. | |
# use only on macOS. | |
# | |
# output file format | |
# ------------------ | |
# | |
# <?xml version="1.0"?> |
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
module gendoukage | |
go 1.16 | |
require github.com/gorilla/mux v1.8.0 // indirect |
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 grapefruit import Color | |
from fabulous.xterm256 import rgb_to_xterm | |
new_vim_color = [] | |
def html2xterm256(color): | |
r, g, b = Color.HtmlToRgb(html_color) | |
r = int(r * 255) |
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 std::collections::HashMap; | |
use rusoto_core::credential::ProfileProvider; | |
use rusoto_core::request::HttpClient; | |
use rusoto_core::Region; | |
use rusoto_sns::{ | |
Sns, | |
SnsClient, | |
CreatePlatformApplicationInput, | |
CreatePlatformEndpointInput, |
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 time | |
import re | |
import requests | |
PAGE_SIZE = 100 | |
SLEEP_TIME = 60 # sec | |
BASE_URL = "https://api.github.com/search/repositories?q=rust+language:rust&sort=stars&order=desc&per_page=100&page=%d" | |
RE_PREFIX_RS_AND_DASH = re.compile("^rs-") | |
RE_PREFIX_RS_AND_DOT = re.compile("^rs\.") |
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 datetime import datetime | |
from benchmarker import Benchmarker | |
with Benchmarker(1000*500, width=40) as bench: | |
@bench("datetime->str(strftime)") | |
def _(bm): | |
d = datetime(2019, 1, 2) | |
for i in bm: |
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
diff --git a/DreamGame.py b/DreamGame.py | |
index bbe3119..9723b73 100644 | |
--- a/DreamGame.py | |
+++ b/DreamGame.py | |
@@ -34,18 +34,24 @@ class DreamGame(SimGame): | |
vision_aggro_rule, | |
damage_provokes_rule] | |
- def __init__(self, bf=None, rules=None, is_sim = False, is_server=True, seed = None): | |
+ def __init__( |
NewerOlder