This file contains hidden or 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
{ | |
"photo": { | |
"id": "39682607563", | |
"secret": "d25982c3ef", | |
"server": "7834", | |
"farm": 8, | |
"camera": "Canon EOS 7D Mark II", | |
"exif": [ | |
{ | |
"tagspace": "IFD0", |
This file contains hidden or 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 random import randint | |
from math import * | |
# Retourne la liste des nombre premiers jusqu'a n | |
def nombrePremiers(n): | |
assert n > 1 | |
premiers = [] | |
restant = list(range(2, n+1)) | |
limite = sqrt(n) | |
premierRestant = 2 |
This file contains hidden or 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 math import * | |
from time import sleep | |
g = 9.80665 | |
l = 200 | |
a = 0.02 | |
pulse = sqrt(g/l) | |
dt = 0.05 | |
clock = 0 |
This file contains hidden or 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
<?php | |
namespace App; | |
class Instagram | |
{ | |
public function getMedias() | |
{ | |
$json = file_get_contents("https://www.instagram.com/graphql/query/?query_hash=e769aa130647d2354c40ea6a439bfc08&variables=%7B%22id%22%3A%225408546825%22,%20%22first%22%3A%2250%22,%20%22after%22%3A%20%22%22%7D"); | |
$data = json_decode($json, true); |
This file contains hidden or 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 marked from 'marked' | |
import Moment from 'moment' | |
export const state = () => ({ | |
drawerEnabled: false, | |
showBody: false, | |
isLoading: false, | |
articles: [], | |
article: {}, | |
locale: 'fr', |
This file contains hidden or 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
var express = require('express') | |
var multer = require('multer') | |
var storage = multer.diskStorage({ | |
destination: function (req, file, cb) { | |
cb(null, './uploads') | |
}, | |
filename: function (req, file, cb) { | |
cb(null, file.originalname) | |
} |
This file contains hidden or 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/arduino-cli core install arduino:avr -v | |
INFO[0000] Config file not found, using default values | |
INFO[0000] arduino-cli version 0.11.0 | |
INFO[0000] Checking if CLI is Bundled into the IDE | |
INFO[0000] Loading hardware from: /home/pi/.arduino15/packages | |
INFO[0000] Loading package arduino from: /home/pi/.arduino15/packages/arduino/hardware | |
INFO[0000] Checking existence of 'tools' path: /home/pi/.arduino15/packages/arduino/tools | |
INFO[0000] Loading tools from dir: /home/pi/.arduino15/packages/arduino/tools | |
INFO[0000] Loading package builtin from: /home/pi/.arduino15/packages/builtin | |
INFO[0000] Checking existence of 'tools' path: /home/pi/.arduino15/packages/builtin/tools |
This file contains hidden or 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/arduino-cli core uninstall arduino:avr -v | |
INFO[0000] Config file not found, using default values | |
INFO[0000] arduino-cli version 0.11.0 | |
INFO[0000] Checking if CLI is Bundled into the IDE | |
INFO[0000] Loading hardware from: /home/pi/.arduino15/packages | |
INFO[0000] Loading package arduino from: /home/pi/.arduino15/packages/arduino/hardware | |
INFO[0000] Loaded platform platform="arduino:[email protected]" | |
INFO[0000] Checking existence of 'tools' path: /home/pi/.arduino15/packages/arduino/tools | |
INFO[0000] Loading tools from dir: /home/pi/.arduino15/packages/arduino/tools | |
INFO[0000] Loaded tool tool="arduino:[email protected]" |
This file contains hidden or 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/arduino-cli core uninstall arduino:samd -v | |
INFO[0000] Config file not found, using default values | |
INFO[0000] arduino-cli version 0.11.0 | |
INFO[0000] Checking if CLI is Bundled into the IDE | |
INFO[0000] Loading hardware from: /home/pi/.arduino15/packages | |
INFO[0000] Loading package arduino from: /home/pi/.arduino15/packages/arduino/hardware | |
INFO[0000] Loaded platform platform="arduino:[email protected]" | |
INFO[0000] Loaded platform platform="arduino:[email protected]" | |
INFO[0000] Checking existence of 'tools' path: /home/pi/.arduino15/packages/arduino/tools | |
INFO[0000] Loading tools from dir: /home/pi/.arduino15/packages/arduino/tools |
This file contains hidden or 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
uploadMedias () { | |
this.uploadLoading = true | |
const promises = this.files.map(file => this.loadFile(file)) | |
Promise.all(promises).then(results => { | |
const formData = new FormData() | |
results.forEach(r => formData.append(r[0], new Blob([new Uint8Array(r[1])]), r[2])) | |
this.$apitator.post('/delegate/medias', formData, { withAuth: true }).then(res => { | |
console.log(res.data) | |
this.$store.commit('ADD_ALERT', { |