Example for timezoned beat task with Celery 4.4.0. Two ways to create datetime object inside crontab's nowfun that seemingly produce same result actually behave differentlty.
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 | |
# Remove ibus from zoom .deb dependencies | |
# From https://unix.stackexchange.com/a/705250 | |
set -xe | |
# tmp=$(mktemp -d) | |
# cd "${tmp}" | |
# name='zoom.deb' |
com.yoga_dlya_nachinayuschih_pohudeniya
com.meditacija_dlja_nachinajushhih
https://gist.github.com/ctrl-freak/24ac0e61b7cf550a6945
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
const dino = ` | |
__ | |
/ _) | |
_.----._/ / | |
/ / | |
__/ ( | ( | | |
/__.-'|_|--|_| | |
` | |
console.log(dino) |
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 time import sleep | |
n = 10 | |
for i in range(n + 1): | |
print(f"\rsleeping ... {i} / {n}", end="\r") | |
sleep(.5) | |
print() |
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 python2 | |
import os | |
import sys | |
def split(filehandler, delimiter=',', row_limit=700000, | |
output_name_template='output_%s.csv', output_path='.', keep_headers=True): | |
import csv | |
reader = csv.reader(filehandler, delimiter=delimiter) | |
current_piece = 1 |
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
[tool.poetry] | |
name = "poetry_tutorial_project" | |
version = "0.1.0" | |
description = "Simple Python project built with Poetry." | |
authors = ["Todd Birchard <[email protected]>"] | |
maintainers = ["Todd Birchard <[email protected]>"] | |
license = "MIT" | |
readme = "README.md" | |
homepage = "" | |
repository = "https://github.com/hackersandslackers/python-poetry-tutorial/" |
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
[tool.poetry] | |
name = "example_project" | |
version = "0.1.0" | |
description = "Dependencies for this resolve for eternity" | |
authors = [] | |
[tool.poetry.dependencies] | |
python = "^3.5" | |
awscli = "^1.15" | |
google-api-python-client = "^1.7.4" |
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 python | |
from __future__ import print_function | |
import sys | |
def heidi_decode(hexstr): | |
shift = int(hexstr[-1]) | |
l = [int(hexstr[i:i+2], 16) for i in range(0, len(hexstr), 2)] | |
return ''.join(chr(v - shift) for v in l) |
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
# -*- coding: utf-8 -*- | |
class JSONSerializable: | |
def _serialize(self, value): | |
if type(value) not in (int, float, bool, type(None)): | |
return str(value) | |
return value | |
def as_dict(self): |
NewerOlder