Différences entre les versions de « Eloïse Tabouret »

De {}
Aller à la navigation Aller à la recherche
Ligne 1 : Ligne 1 :
  
 +
 +
===Avancement BOT==
 +
 +
<syntaxhighlight lang="python">
 +
 +
import tweepy
 +
import time
 +
import json
 +
import datetime
 +
import time
 +
import random
 +
 +
consumer_key = 'dMlC2Wo4vAXhTS8B1VPMn2x34'
 +
 +
consumer_secret = 'YXs7zscYU5zVOT9i9v2Jq9s7PwsLf2GbMmgr1UmgoWNrFBOwvI'
 +
 +
access_token = '1370384534001291270-fbVB0ruO0IcZEqKc8iXfZmzp4T3O1J'
 +
 +
access_token_secret = 'bcBhDOFdN0bPoNwlpb7wYkpaMt6JivGmRGD2Tt4NI0x23'
 +
 +
 +
 +
#remplacer par api key et api secret key
 +
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
 +
 +
auth.set_access_token(access_token, access_token_secret)
 +
api = tweepy.API(auth)
 +
 +
 +
 +
tweetTexts = ["'On aurait dû'", "'Il aurait fallut'", "'Si on avait pas'"]
 +
 
 +
 +
 +
phrase = random.choice(tweetTexts)
 +
print(phrase)
 +
 +
tweets = tweepy.Cursor(api.search, q=phrase, tweet_mode='extended').items(1)
 +
 +
 +
 +
for tweet in tweets:
 +
    print(tweet)
 +
    print(tweet.full_text)
 +
    print("The tweet id is:", tweet._json['id'])
 +
 +
 +
 +
</syntaxhighlight>
  
 
===Schéma bot===
 
===Schéma bot===

Version du 26 mars 2021 à 18:47


=Avancement BOT

import tweepy
import time
import json
import datetime
import time
import random

consumer_key = 'dMlC2Wo4vAXhTS8B1VPMn2x34'

consumer_secret = 'YXs7zscYU5zVOT9i9v2Jq9s7PwsLf2GbMmgr1UmgoWNrFBOwvI'

access_token = '1370384534001291270-fbVB0ruO0IcZEqKc8iXfZmzp4T3O1J'

access_token_secret = 'bcBhDOFdN0bPoNwlpb7wYkpaMt6JivGmRGD2Tt4NI0x23'



#remplacer par api key et api secret key
auth = tweepy.OAuthHandler(consumer_key, consumer_secret)
 
auth.set_access_token(access_token, access_token_secret)
api = tweepy.API(auth)



tweetTexts = ["'On aurait dû'", "'Il aurait fallut'", "'Si on avait pas'"]
  


phrase = random.choice(tweetTexts)
print(phrase)
 
tweets = tweepy.Cursor(api.search, q=phrase, tweet_mode='extended').items(1)


 
for tweet in tweets:
    print(tweet)
    print(tweet.full_text)
    print("The tweet id is:", tweet._json['id'])

Schéma bot

https://www.linternaute.fr/dictionnaire/fr/liste-type/

Bot schéma.jpg

TWITTER DEVELOPER

As a student in marketing, we are currently working on analyzing the preferences of users and then we have to imagine an account that may interest a group of users based on the data collected, in field such as furniture, clothing or food. As a school project, I have to collect the interest of other users, and then elaborate a commercial page, to correspond to these interests, and share commercials offer and articles, on the account like a blog.

Capture d’écran 2021-02-15 à 10.49.56.png

Capture d’écran 2021-02-15 à 10.53.46.png

Mise en page HTML 07/12

</synthaxhyghlight>

<html>
 </head>

 
  <body>
 
    <h1>Poyeme</h1>
    <p><font size="3" face="helvetica" color="pink">Petits bafouillages poétiques insensés...</font></p>
    <img src="images/image1.jpg">

 <pre>
      danser J' la mauX
      Italie fusse la s pistou ,
      Je vais le chemin !
      vais Je le a=our
      </pre>




 <pre>
         Italie calisse le deboires
         avais J' la savon
         quoi Je fusse le alcool
         que Je ai reve la alcool pistou
      </pre>



 
 <pre>
             le casse couvert fusse
             que Je fuit la deboires !
             J' ai reve le mauX !
             Je taaJAIjAaSK$ la mauX couvert 
      </pre>
 



 <pre>
                   Italie tour le pieton couvert ,
                   la casse couvert aime ,
                   Italie sortez le casse pistou
                   Jul vais la pistou couvert !
      </pre>
 


  </body>
</html>

Énoncé recueil de poèmes

Une interface web qui génère un recueil de poème, dont la couverture est faites de pixels de couleurs, chaque lettre équivaut à une couleurs et l’ordre de celle-ci, variable générera des pattern différent.

Chaque recueil sera différent, les poèmes crée auront une place aléatoire sur la page

Ou

Une interface ou l’utilisateur doit faire des choix, c’est à dire qu’il doit répondre à des question mettant en place ds variable, la combinaison de toutes les réponse permet la création d’un recueil (presque) unique.


Le code

1000100 1100001 1101110 1110011 0100000 1110011 1100101 1110011 0100000 1100100 1100101 1100010 1101111 1101001 1110010 1100101 1110011 1001100 0100111 1100001 0111101 1101111 1110101 1110010 0100000 1100100 0100111 1110101 1101110 0100000 1110011 1101111 1101001 1110010


Poésie générative

# -*- coding: utf-8 -*-
import random

noms = ['soupe','pistou','alcool','Chien','casse','savon','deboires','MESSAGE','ALERTE','plafond','GQSK','s','chemin','pieton','mauX','a=our','soir']
ponctuation = [',','!']
nompropre =  [ 'Italie','Jul' ]
articles = ['la','le']
pronomspersonnel = ["Je","J'"]
pronoms = ['moi','que','ses','quoi'] 
verbe = ["aime","est","vais","danser","calisse","veux","fusse","glissait","sortez","avais","ai reve","fuit","dit","tour","tombe","taaJAIjAaSK$"]
qualificatif = ['pistou','couvert',]

vers1 = random.choice(articles) + " " + random.choice(noms) + " " + random.choice(qualificatif)+ " " + random.choice(verbe) + " " + random.choice(ponctuation)
vers2 = random.choice(pronomspersonnel) + " " + random.choice(verbe) + " " + random.choice(articles) + " " + random.choice(noms) + " " + random.choice(qualificatif) + " " + random.choice(ponctuation)
vers3 = random.choice(articles) + " " + random.choice(noms) + " " + random.choice(qualificatif) + " " + random.choice(verbe)
vers4 = random.choice(pronomspersonnel) + " " + random.choice(verbe) + " " + random.choice(articles) + " " + random.choice(noms) + " " + random.choice(ponctuation)
vers5 = random.choice(verbe)  + " " + random.choice(pronomspersonnel) + " " + random.choice(articles) + " " + random.choice(noms)
vers6 = random.choice(verbe)  + " " + random.choice(pronomspersonnel) + " " + random.choice(articles) + " " + random.choice(noms) + " " + random.choice(qualificatif) 
vers7 = random.choice(nompropre) + " " + random.choice(verbe) + " " + random.choice(articles) + " " + random.choice(noms)
vers8 = random.choice(nompropre) + " " + random.choice(verbe) + " " + random.choice(articles) + " " + random.choice(noms) + " " + random.choice(ponctuation)
vers9 = random.choice(nompropre) + " " + random.choice(verbe) + " " + random.choice(articles) + " " + random.choice(noms) + " " + random.choice(qualificatif)
vers10 = random.choice(nompropre) + " " + random.choice(verbe) + " " + random.choice(articles) + " " + random.choice(noms) + " " + random.choice(qualificatif) + " " + random.choice(ponctuation)
vers11 = random.choice(pronoms) + " " + random.choice(pronomspersonnel) + " " + random.choice(verbe) + " " + random.choice(articles) + " " + random.choice(noms)+ " " + random.choice(qualificatif) + " " + random.choice(ponctuation)
vers11 = random.choice(pronoms) + " " + random.choice(pronomspersonnel) + " " + random.choice(verbe) + " " + random.choice(articles) + " " + random.choice(noms)+ " " + random.choice(qualificatif)
vers12 = random.choice(pronoms) + " " + random.choice(pronomspersonnel) + " " + random.choice(verbe) + " " + random.choice(articles) + " " + random.choice(noms)
vers13 = random.choice(pronoms) + " " + random.choice(pronomspersonnel) + " " + random.choice(verbe) + " " + random.choice(articles) + " " + random.choice(noms) + " " + random.choice(ponctuation)

structures = [ vers1 , vers2 , vers3 , vers4 , vers5 , vers6 , vers7 , vers8 , vers9 , vers10 , vers11 , vers12 , vers13 ]

rendu = random.choice(structures)

print(rendu)


Jouons une brève partie de Cache-cache

# -*-coding: utf-8 -*-
import time

print("Veux tu jouer a cache cache ?")
 
reponse = raw_input()

if reponse == "Non":
	print("Tant pis!")
elif reponse == "Oui":
	print("Tu as 20 secondes pour te cacher!")

	for compteur in range(1, 20):
		print(str(compteur) + "...")
		time.sleep(1)

	print("j'arrive!")
	print("Es tu derriere le canape ?")

	cache = raw_input()

	if cache == "Oui":
		print("Trouvé! J'ai gagné")
	elif cache == "Non":
		print("Es tu sous le lit ?")

	reponse2 = raw_input()

	if reponse2 == "Oui" :
		print("Trouvé! J'ai gagné")
	elif cache == "Non":
		print("Tu es trop bien caché! J'ai perdu...")

Trouve ton nom de héros

# -*-coding: utf-8 -*-
# Un script qui te demande ton nom de héros, le met à l'endroit puis à l'envers, puis mélange les lettres aléatoirement
import time


print("Si on partait à l'aventure?")

reponse = raw_input()

if reponse == "Non":
	print("Tant pis!")
elif reponse == "Oui":
	print("Super! Pour commencer notre histoire il nous faut le nom de notre héros, comment s'appelle t-il? ")

	name = raw_input()

	namelength = len(name)

	for compteur in range (0, namelength):
		print(name[compteur])
		time.sleep(1)

	print ("l'invincible " + name + " ?")
	time.sleep(3)
	print("Je suis pas convaincu...C'est pas très original...Je vais essayer quelque chose d'autre! ")

	for compteur in range (namelength - 1, -1, -1):
		print(name[compteur])
		time.sleep(1)

	ch1 = name 
	ch2 = ""
	 
	for lettre in reversed(ch1):
	    ch2 += lettre
	     
	

	print ("l'incroyable " + ch2 + " ?")
	time.sleep(3)
	print("Mouai, c'est pas encore ça... Il te faut un nom qui marquera les esprit, j'essaie quelque chose de différent! ")



	time.sleep(3)	
	import random
	word = name
	shuffled = list(word)
	random.shuffle(shuffled)
	shuffled = name.join(shuffled)
	print shuffled + (" ! Voilà un nom qui marquera l'histoire! Allez, je te laisse sauver le monde! A plus tard!")