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 models | |
# Create your models here. |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<module type="PYTHON_MODULE" version="4"> | |
<component name="FacetManager"> | |
<facet type="django" name="Django"> | |
<configuration> | |
<option name="rootFolder" value="$MODULE_DIR$" /> | |
<option name="settingsModule" value="MyProject/settings.py" /> | |
<option name="manageScript" value="manage.py" /> | |
<option name="environment" value="<map/>" /> | |
</configuration> |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<module type="PYTHON_MODULE" version="4"> | |
<component name="FacetManager"> | |
<facet type="django" name="Django"> | |
<configuration> | |
<option name="rootFolder" value="$MODULE_DIR$" /> | |
<option name="settingsModule" value="MyProject/settings.py" /> | |
<option name="manageScript" value="manage.py" /> | |
<option name="environment" value="<map/>" /> | |
</configuration> |
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 | |
import os, sys, re, argparse | |
class FileObject(object): | |
lines = None | |
def __init__(self, file_path=None, *args, **kwargs): | |
with open(file_path, 'r') as file_: | |
self.lines = file_.readlines() |
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 | |
import argparse | |
import sys | |
def main(file_path): | |
symbol = '#' | |
with open(file_path, 'r') as file_: | |
for line in file_.readlines(): |
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 | |
import serial | |
import os, sys | |
import signal | |
import datetime | |
TRANSFER_RATE = '9600' | |
MOUNT_BASE_DIR = '/dev/ttyACM' | |
PATH_TO_LOGS = 'monitoring_logs' |
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 <Servo.h> | |
#include <Ultrasonic.h> | |
Servo myservo; | |
Ultrasonic ultrasonic(8, 13); | |
String splitter = ","; | |
void setup() | |
{ | |
myservo.attach(9); |
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 <Servo.h> | |
#include <Ultrasonic.h> | |
#define usTRIG 12 | |
#define usECHO 8 | |
#define servoPIN 11 | |
Servo servo; | |
void setup() { |
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 collections import OrderedDict | |
def main(): | |
x_min = float(input('Первое значение в диапозоне: ')) | |
x_max = float(input('Второе значение в диапозоне: ')) | |
h = float(input('Шаг: ')) | |
intervals = generate_intervals_size(x_min, x_max, h); | |
with open('numbers', 'r') as f: |
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 MkbView(ListAPIView): | |
queryset = models.Mkb.objects.all() | |
serializer_class = serializers.Mkb | |
filter_class = filters.Mkb | |
def list(self, request, *args, **kwargs): | |
object_list = super().list(request, *args, **kwargs).data | |
return Response({ | |
'results': [ | |
{ |
OlderNewer