Skip to content

Instantly share code, notes, and snippets.

View Franck1333's full-sized avatar
🐍
I'm trying new things

Franck Rochat Franck1333

🐍
I'm trying new things
View GitHub Profile
@Franck1333
Franck1333 / GPSoI.py
Last active November 7, 2019 20:55
Get IP Localization of an user via GPS over Internet
#!/usr/bin/env python
# -*- coding: UTF8 -*-
#Aides: https://stackoverflow.com/questions/24906833/get-your-location-through-python
#Aides: https://github.com/Franck1333/GPS-Display/blob/master/Mon_Travail/Recuperation_Determination.py
import requests #<-- Utilisation d'une Adresse URL Normalisée
import json #<-- Permet l'expoitation de fichier en format JSON
import googlemaps #pip install -U googlemaps <-- API Python de Google MAPS
@Franck1333
Franck1333 / Date_Heure_Annee.py
Last active June 21, 2018 16:44
This feature allow you to get system time in many different format
#!/usr/bin/env python
# -*- coding: cp1252 -*-
#Aides: https://stackoverflow.com/questions/28189442/datetime-current-year-and-month-python/28189525
from datetime import datetime
def temps_actuel():
currentSecond= datetime.now().second #Obtention de la Seconde Actuel
@Franck1333
Franck1333 / Input_Keyboard.py
Created June 27, 2018 14:56
#"The raw_input does not interpret the input. It always returns the input of the user without changes"
#Aides: https://www.python-course.eu/input.php
#"The raw_input does not interpret the input. It always returns the input of the user without changes"
name = raw_input("What's your name? ")
print("Coucou", name)
@Franck1333
Franck1333 / Deezer-Recherche.py
Last active June 27, 2018 17:06
Work with Deezer API / Look for the current Top Chart and allow you to search and get suggestions of the content on Deezer
#!/usr/bin/env python
# -*- coding: UTF8 -*-
#Aides : https://developers.deezer.com/api
#Aides : http://json.parser.online.fr/
import json #Traitement du fichier JSON reçu
import requests #<-- Utilisation d'une Adresse URL Normalisée
@Franck1333
Franck1333 / GPSoI_for_suggest.py
Last active July 3, 2018 11:41
Get suggestions of places near where your IP adress is located
#!/usr/bin/env python
# -*- coding: UTF8 -*-
#Aides: https://stackoverflow.com/questions/24906833/get-your-location-through-python
#Aides: https://github.com/Franck1333/GPS-Display/blob/master/Mon_Travail/Recuperation_Determination.py
import requests #<-- Utilisation d'une Adresse URL Normalisée
import json #<-- Permet l'expoitation de fichier en format JSON
import googlemaps #pip install -U googlemaps <-- API Python de Google MAPS
@Franck1333
Franck1333 / food_suggest.py
Last active June 28, 2018 17:38
Get suggestions of a recipe over 50 000 recipes availables on http://food2fork.com/
#!/usr/bin/env python
# -*- coding: UTF8 -*-
#Aides : https://market.mashape.com/community/food2fork
#Aides : http://unirest.io/python.html
#Aides : http://json.parser.online.fr/
import requests #<-- Utilisation d'une Adresse URL Normalisée
import json #<-- Permet l'expoitation de fichier en format JSON
@Franck1333
Franck1333 / Meteo.py
Last active July 2, 2018 13:43
Get Weather with pyowm API and with GPSoI.py
#!/usr/bin/env python
# -*- coding: UTF8 -*-
#Aides :
#https://github.com/csparpa/pyowm #pip install pyowm
#http://pyowm.readthedocs.io/en/latest/index.html
#https://gist.github.com/Franck1333/37b6e562f8765086f69588244aee1a5c That's GPSoI.py file
import time
import os
@Franck1333
Franck1333 / Setup.py
Last active November 7, 2019 20:55
Using a Setup.py Generator // Example of Setup.py (using set-me-up.py from https://gist.github.com/ojii/3906682 )
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
#Aides : Using set-me-up.py from https://gist.github.com/ojii/3906682 ,
#Aides : The generator "set-me-up.py" need a "__init__.py" file in the main root directorie to work .
#HOW INSTALL AND USE THIS PROJECT:
#in the console : sudo python setup.py install
#And all the depencies will be installed with the Project
@Franck1333
Franck1333 / tkinter_test.py
Created September 22, 2018 12:59
How to use TKINTER // Test,Exemple
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#Aides : http://apprendre-python.com/page-tkinter-interface-graphique-python-tutoriel
#Aides : http://www.fil.univ-lille1.fr/~marvie/python/chapitre6.html
import os
import sys
from tkinter import *
fenetre = Tk()
@Franck1333
Franck1333 / Internet_Example1.py
Created September 28, 2018 15:28
Get a child window with Tkinter/Python (Meteo Example)
#AIDE : https://www.daniweb.com/programming/software-development/threads/39554/how-to-opening-a-new-window-on-clicking-menu-item
# display message in a child window
from Tkinter import *
def messageWindow():
# create child window
win = Toplevel()
# display message