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
""" | |
Useful utilities when working with datetimes, written for and tested with python 3.6 | |
With other versions of python you're on your own. | |
(should work find with at least 3.5 though) | |
""" | |
from datetime import datetime, date, timedelta, timezone, tzinfo | |
def set_timezone(dt: datetime, tz: tzinfo) -> datetime: |
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
#!/usr/bin/env node | |
var path = require('path'); | |
var precompile = require('nunjucks/src/precompile').precompile; | |
var Environment = require('nunjucks/src/environment').Environment; | |
var lib = require('nunjucks/src/lib'); | |
var nunjucks = require('nunjucks'); | |
nunjucks.installJinjaCompat(); | |
var yargs = require('yargs') |
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
deploy: | |
needs: | |
- test | |
- lint | |
if: "success() && startsWith(github.ref, 'refs/tags/')" | |
runs-on: ubuntu-latest | |
env: | |
HEROKU_API_KEY: ${{ secrets.HEROKU_API_KEY }} | |
HEROKU_APP: <heroku app name> |
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 django.db import connection | |
from django.utils.log import getLogger | |
logger = getLogger(__name__) | |
class QueryCountDebugMiddleware(object): | |
""" | |
This middleware will log the number of queries run | |
and the total time taken for each request (with a | |
status code of 200). It does not currently support |
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 <stdio.h> | |
#include <string.h> | |
#include <stdint.h> //uint8_t and friends | |
int main(void){ | |
uint8_t settings[] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x01}; // preamble, stx and other stuff must be defined here | |
char text[] = "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
#!/usr/bin/env python3 | |
""" | |
pull from and pushing to other people's pull requests | |
(might require an auth key for private repos) | |
""" | |
import os | |
import re | |
import sys | |
import requests |
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
""" | |
This benchmark is a modified version of the benchmark available at | |
https://github.com/samuelcolvin/pydantic/tree/master/benchmarks to support | |
benchmarking msgspec. | |
The benchmark measures the time to JSON encode/decode `n` random objects | |
matching a specific schema. It compares the time required for both | |
serialization _and_ schema validation. | |
""" |
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
0815.ru | |
0815.ru0clickemail.com | |
0815.ry | |
0815.su | |
0845.ru | |
0clickemail.com | |
0-mail.com | |
0wnd.net | |
0wnd.org | |
10mail.com |
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 gi.repository import Gtk, Gdk, WebKit | |
class BrowserTab(Gtk.VBox): | |
def __init__(self, *args, **kwargs): | |
super(BrowserTab, self).__init__(*args, **kwargs) | |
go_button = Gtk.Button("go to...") | |
go_button.connect("clicked", self._load_url) | |
self.url_bar = Gtk.Entry() |
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
""" | |
License: MIT | |
Copyright (c) 2022 Samuel Colvin. | |
See https://twitter.com/adriangb01/status/1573708407479189505 | |
## Usage | |
Once installed just add |
OlderNewer