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
function getBitcoinPrice() { | |
//make a request to the api | |
$.ajax({ | |
url: "https://api.coindesk.com/v1/bpi/currentprice.json", | |
success: function(data) { | |
//parse the data | |
var bitcoinPrice = data.bpi.USD.rate; | |
//display the data | |
$("#bitcoin-price").html(bitcoinPrice); | |
} |
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
function rockPaperScissors() { | |
var player1 = prompt("Player 1, choose rock, paper, or scissors"); | |
var player2 = prompt("Player 2, choose rock, paper, or scissors"); | |
if (player1 === player2) { | |
alert("It's a tie!"); | |
} else if (player1 === "rock") { | |
if (player2 === "scissors") { | |
alert("Player 1 wins!"); | |
} else { | |
alert("Player 2 wins!"); |
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
@-webkit-keyframes hideThenRecreate { | |
from { | |
visibility: hidden; | |
} | |
to { | |
visibility: visible; | |
} | |
} | |
@keyframes hideThenRecreate { |
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
import json, requests, os | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) | |
if not os.path.exists("livre"): | |
os.makedirs("livre") | |
with open("pages.json") as file: | |
tab = json.loads(file.read()) |
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
import config | |
import urllib.request | |
from datetime import date | |
from instabot import Bot | |
#variables | |
today = date.today(); | |
bot = Bot() | |
bot.login(username = "yourusername", password = "yourpassword"); |
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
""" | |
Code by: Keany Vy KHUN | |
Description: Call github api to GET random repo | |
""" | |
#pip3 install selenium | |
#pip3 install requests | |
#pip3 install json | |
""" |
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
import requests | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
# remove ssl certificate | |
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) | |
# ent login | |
username="" | |
password="" |
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
""" | |
Code by: Keany Vy KHUN | |
Description: Call github api to GET random repo | |
""" | |
import requests, json | |
from requests.packages.urllib3.exceptions import InsecureRequestWarning | |
from time import sleep | |
requests.packages.urllib3.disable_warnings(InsecureRequestWarning) |
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
import random, os, urllib.request | |
nbdownload = 100 #nombre d'images à générer | |
def program(): | |
init() | |
download() | |
def init(): | |
print(""" |
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
//Script de reset des position | |
function resetPlateau() { | |
var sheet = SpreadsheetApp.getActiveSheet(); | |
var data = sheet.getDataRange().getValues(); | |
for(var i = 4; i < 20; i++) { | |
//Logger.log('Get num :' + data[i][0]); | |
var num = i - 4; | |
var tab = i + 1; | |
//Tableau Millitaire |
NewerOlder