Skip to content

Instantly share code, notes, and snippets.

View Toshakins's full-sized avatar
👽
experience tranquility

Anton Ovinnikov Toshakins

👽
experience tranquility
View GitHub Profile
@Toshakins
Toshakins / serializers.py
Created March 19, 2019 09:27
DRF Nested Multipart Example
class NestedSerializer(Serializer):
name = CharField()
...
class UserSerializer(Serializer):
user = JSONField(validators=nested_validator)
...
def nested_validator(value):
serializer = NestedSerializer(data=value)
@Toshakins
Toshakins / scratch.rb
Last active December 27, 2018 10:56
Method Mapping Demo
class Actions
def action_a
puts 'A'
end
def action_b
puts 'B'
end
def action_c
@Toshakins
Toshakins / wishlist.md
Last active June 14, 2021 07:56
Wishlist

вишлист закрыт

если что-то хочется подарить - дари. если не знаешь что - не дари, я не расстроюсь.

подсказать что мне хочется или нужно, к сожалению, не могу

@Toshakins
Toshakins / Code.gs
Created December 1, 2017 20:49
Spreadsheet notifications
function sendEmails() {
var sheet = SpreadsheetApp.getActiveSheet();
var startRow = 2; // First row of data to process
var numRows = 50; // Number of rows to process
// Fetch the range of cells A2:B50
var dataRange = sheet.getRange(startRow, 1, numRows, 2)
// Fetch values for each row in the Range.
var data = dataRange.getValues();
for (i in data) {
var row = data[i];
Schedule
10:00 Stage A
WebVR - The Next Frontier (ENG)
Martin Splitt
11:00 Stage B
Machines Must Suffer (RUS)
Oleksandr Pavlyshch
@Toshakins
Toshakins / README.MD
Created July 4, 2017 13:41
Form Checklist
  • All inputs should be accessible via keyboard
  • Form should be accessible without javascript
  • Form should be submitted on 'Enter' hit in a text field.
@Toshakins
Toshakins / firewall.sh
Last active May 4, 2017 16:10
Redirect ports on OS X El Capitan via embedded firewall
#!/bin/bash
echo "
rdr pass inet proto tcp from any to any port 443 -> 127.0.0.1 port 4443
" | sudo pfctl -ef -
@Toshakins
Toshakins / README.md
Created November 14, 2016 14:55
extremewindsorderok

README is empty

CXX/LD -o .build_release/test/test_all.testbin src/caffe/test/test_caffe_main.cpp
.build_release/tools/caffe
caffe: command line brew
usage: caffe <command> <args>
commands:
train train or finetune a model
test score a model
device_query show GPU diagnostic information
time benchmark model execution time
@Toshakins
Toshakins / music.js
Last active August 29, 2015 14:10
substack
return function (t) {
return (70*base() + sin(0.5 * t % 0.2)*60) / 40 + sin(300) * 10
function tan(x) {
return Math.tan(Math.PI * t * x);
}
function sin(x) {
return Math.sin(Math.PI * t * x);