結論としては...社内専用システムを用意したりする余裕のない組織、ガバナンスの弱い組織、強い技術リードがいない組織は、単一レポは難しそう...
I hereby claim:
- I am peketamin on github.
- I am peketamin (https://keybase.io/peketamin) on keybase.
- I have a public key ASAjWnO2sh4WV9znCF2rDgm5gIDtZAYK8_vOjePQgIQEyAo
To claim this, I am signing this object:
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.models import F, Case, When, FloatField | |
from myapp import models | |
md = models.MyModel.objects.filter(pk=3).annotate(pr=Case(When(price__gte=40., then=F('price') * 10), default=F('price') / 10, output_fields=FloatField())).first() | |
In [27]: md.price | |
Out[27]: 40.7424047560126 | |
In [29]: md.pr | |
Out[29]: 407.424047560126 |
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
class HatebuLongTitler { | |
constructor () { | |
HatebuLongTitler.makeStyle(); | |
HatebuLongTitler.applyStyle(); | |
} | |
static makeStyle() { | |
const newRule = ` | |
.style-headline:not(.search-url-nothing) .entrylist-main .entrylist-contents-title { | |
white-space: none!important; |
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
if(typeof(String.prototype.trim) === "undefined") | |
{ | |
String.prototype.trim = function() | |
{ | |
return String(this).replace(/^\s+|\s+$/g, ''); | |
}; | |
} | |
class PCHateBuCommentStyle { |
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 java.awt.*; | |
import java.awt.event.*; | |
public class Rei26 extends Frame { | |
private int oldx = 0, oldy = 0; | |
public Rei26() { | |
setSize(400, 300); | |
addWindowListener(new WindowAdapter() { | |
public void windowClosing(WindowEvent e) { | |
System.exit(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
package cat | |
import ( | |
"bytes" | |
) | |
func buf(ss []string) string { | |
var b bytes.Buffer | |
for _, s := range ss { | |
b.WriteString(s) |
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.core.validators import ValidationError # type: ignore[attr-defined] | |
from django.core.validators import RegexValidator | |
## validators.py | |
phone_number_validator = RegexValidator( | |
regex=r"^[0-9-()+ ]{9,20}$", message="入力可能文字は半角の、数字、ハイフン、括弧のみ. 9文字以上, 20文字以下." | |
) | |
## models.py |
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 pathlib import PosixPath | |
from django import forms | |
from django.conf import settings | |
from django.contrib import admin | |
from my_app.models import Item | |
class ItemForm(forms.ModelForm): |
NewerOlder