PS/2 rouge sur +5V PS/2 noir sur GND PS/2 vert sur 3 (clock) PS/2 blanc sur 4 (data)
speaker sur 8 et ground
brancher les fils I2C comme dans https://www.aranacorp.com/fr/communication-i2c-entre-raspberry-pi-et-arduino/
# à mettre dans mercanet/views.py dans MercanetViewSet | |
@csrf_exempt | |
@api_view(['POST']) | |
@authentication_classes([]) | |
@permission_classes([]) | |
@parser_classes((JSONParser,)) | |
@csrf_exempt | |
@method_decorator(csrf_exempt) |
{"Seal": "fc70595248c8951596bb3cf2fbde5a0dcceb0c0d64c45affc8fb8fdee8418a12", "InterfaceVersion": "HP_2.16", "Data": {"s10TransactionId": "86", "transactionDateTime": "2017-11-25T18:10:44+01:00", "maskedPan": "5017##########10", "preAuthenticationValue": "null", "mandateUsage": "null", "instalmentAmountsList": "null", "valueDate": "null", "captureLimitDate": "20171125", "s10transactionIdsList": "null", "dccResponseCode": "null", "paymentMeanBrand": "VISA", "orderChannel": "INTERNET", "cardProductCode": "F", "acquirerResponseMessage": "null", "amount": "123", "transactionActors": "null", "paymentMeanTradingName": "null", "paymentMeanType": "CARD", "paymentMeanId": "null", "mandateCertificationType": "null", "dccProvider": "null", "holderAuthentRelegation": "N", "acquirerResponseIdentifier": "null", "mandateId": "null", "mandateAuthentMethod": "null", "instalmentNumber": "null", "customerMobilePhone": "null", "complementaryCode": "00", "responseCode": "00", "preAuthenticationProfile": "null", "dccExchangeRate": |
{ | |
"args": {}, | |
"data": "", | |
"files": {}, | |
"form": { | |
"Data": "captureDay=0|captureMode=AUTHOR_CAPTURE|currencyCode=978|merchantId=211000021310001|orderChannel=INTERNET|responseCode=00|transactionDateTime=2017-11-28T21:53:00+01:00|transactionReference=2017112821632667547e7cd3e0466547863|keyVersion=1|acquirerResponseCode=00|amount=279|authorisationId=672173|panExpiryDate=201801|paymentMeanBrand=VISA|paymentMeanType=CARD|complementaryCode=00|complementaryInfo=<CARD_INFOS BDOM=XXX COUNTRY=FRA PRODUCTCODE=F NETWORK=VISA BANKCODE=20041 PRODUCTNAME=VISA CLASSIC PRODUCTPROFILE=XXX />|customerIpAddress=134.214.181.92|maskedPan=5017##########01|scoreProfile=profil1|holderAuthentRelegation=N|holderAuthentStatus=NOT_ENROLLED|transactionOrigin=INTERNET|paymentPattern=ONE_SHOT|customerMobilePhone=null|mandateAuthentMethod=null|mandateUsage=null|transactionActors=null|mandateId=null|captureLimitDate=20171128|dccStatus=null|dccResponseCode=null|dccAmount=null|dccCurrencyCode=null|dccExchangeRate=null|dccExchangeRa |
<project name="chat" default="all" basedir="." xmlns:ivy="antlib:org.apache.ivy.ant"> | |
<!-- Paramètres du projet --> | |
<property name="projet.sources.dir" value="src"/> | |
<property name="projet.lib.dir" value="lib"/> | |
<property name="projet.jar.file" value="release.jar"/> | |
<property name="projet.bin.dir" value="out"/> | |
<property name="projet.class.main" value="MaClassePrincipale" /> | |
<!-- Dépendances du projet--> | |
<target name="resolve" depends="install-ivy,setup" description="Use ivy to resolve classpaths"> | |
<ivy:retrieve pathid="libs.path"> |
#!/bin/bash | |
# Use this script to create a cool bash prompt: paste the output into your .bashrc | |
# look https://misc.flogisoft.com/bash/tip_colors_and_formatting#colors1 to get a list of available colors for 256-color terminals | |
# also, if you do not see the '>' character in your terminal, install the powerline fonts | |
PS1="" | |
lastbg=-1 | |
function append { | |
PS1+="$1" | |
} | |
function color { |
import Prelude hiding (Left, Right) | |
data Instruction = Forward Int| Left Int| Right Int| Repeat Int [Instruction] deriving (Show, Read) | |
derouler [] a = a | |
derouler (i:rprog) a = case i of | |
(Repeat x ri)->derouler rprog ((concat (replicate x (derouler ri [])) )++a) | |
_ ->derouler rprog (i:a) | |
points [] posx posy angle pts = pts | |
points (i:rprog) posx posy angle pts = case i of | |
Left t->points rprog posx posy (angle+((realToFrac t)*3.1415/180)) pts |
--EXAMPLE : of course you need GHC installed, and ghci's `runhaskell | |
-- wanted prompt : [Segment 8 202 [Bold,Text " \\u "],Segment 202 16 [Bold,Text "@ "],Segment 240 255 [Underline,Text "\\H",StopUnderline,Text " "],Segment 220 16 [Bold,Text "$ "]] | |
-- run in shell export PS1=$(echo '[Segment 8 202 [Bold,Text " \\u "],Segment 202 16 [Bold,Text "@ "],Segment 240 255 [Underline,Text "\\H",StopUnderline,Text " "],Segment 220 16 [Bold,Text "$ "]]' | runhaskell haskell-powerline-prompt-generator.hs ) | |
-- my prompt : [Segment 10 202 [Bold,Text " \\u "],Segment 202 16 [Bold,Text "\\H "],Segment 12 231 [Underline,Text "\\w",StopUnderline,Text " "],Segment 220 16 [Bold,Text "$ "]] | |
data PromptPart = ForegroundColor Int |BackgroundColor Int | Bold| StopBold|Underline|StopUnderline | Text String | Reset | |
deriving (Show, Read, Ord, Eq) | |
data Segment = Segment Int Int [PromptPart] deriving (Show, Read, Ord, Eq) | |
-- bg fg |
from socket import socket, AF_INET, SOCK_DGRAM, IPPROTO_UDP, SOL_SOCKET, SO_BROADCAST, SO_REUSEPORT, SO_REUSEADDR | |
from threading import Thread | |
import sys | |
import readline | |
class NetworkListener(Thread): | |
def __init__(self, sock, run): | |
self.sock = sock | |
self.running=run | |
super().__init__() | |
self.daemon = True |
set ts=4 | |
set sw=4 | |
augroup configgroup | |
autocmd VimEnter * highlight clear SignColumn | |
autocmd FileType python set sw=4 | |
autocmd FileType python let python_highlight_all = 1 | |
autocmd FileType python set ts=4 | |
autocmd FileType python set sts=4 | |
" " expand tabs into spaces | |
autocmd FileType python set expandtab |
PS/2 rouge sur +5V PS/2 noir sur GND PS/2 vert sur 3 (clock) PS/2 blanc sur 4 (data)
speaker sur 8 et ground
brancher les fils I2C comme dans https://www.aranacorp.com/fr/communication-i2c-entre-raspberry-pi-et-arduino/