Create an account


Welcome, Guest
You have to register before you can post on our site.

Username
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 20,125
» Latest member: udwivedi923
» Forum threads: 21,822
» Forum posts: 22,691

Full Statistics

Online Users
There are currently 754 online users.
» 0 Member(s) | 749 Guest(s)
Applebot, Baidu, Bing, Google, Yandex

 
  [Tut] Python Find in List [Ultimate Guide]
Posted by: xSicKxBot - 12-09-2022, 11:35 PM - Forum: Python - No Replies

Python Find in List [Ultimate Guide]

5/5 – (1 vote)

When Google was founded in 1998, Wallstreet investors laughed at their bold vision of finding data efficiently in the web. Very few people actually believed that finding things can be at the heart of a sustainable business — let alone be a long-term challenge worth pursuing.

We have learned that searching — and finding — things is crucial wherever data volumes exceed processing capabilities. Every computer scientist knows about the importance of search.

And even non-coders don’t laugh about Google’s mission anymore!

⭐⭐⭐ This article will be the web’s most comprehensive guide on FINDING stuff in a Python list. ⭐⭐⭐

It’s a living document where I’ll update new topics as I go along — so stay tuned while this article grows to be the biggest resource on this topic on the whole web!

Let’s get started with the very basics of finding stuff in a Python list:

Finding an Element in a List Using the Membership Operator


You can use the membership keyword operator in to check if an element is present in a given list. For example, x in mylist returns True if element x is present in my_list using the equality == operator to compare all list elements against the element x to be found.

Here’s a minimal example:

my_list = ['Alice', 'Bob', 'Sergey', 'Larry', 'Eric', 'Sundar'] if 'Eric' in my_list: print('Eric is in the list')

The output is:

Eric is in the list

Here’s a graphical depiction of how the membership operator works on a list of numbers:

Figure 1: Check the membership of item 42 in the list of integers.

To dive deeper into this topic, I’d love to see you watch my explainer video on the membership operators here: ?

YouTube Video



https://www.sickgaming.net/blog/2022/12/...ate-guide/

Print this item

  [Tut] jsPDF HTML Example with html2canvas for Multiple Pages PDF
Posted by: xSicKxBot - 12-09-2022, 11:35 PM - Forum: PHP Development - No Replies

jsPDF HTML Example with html2canvas for Multiple Pages PDF

by Vincy. Last modified on December 9th, 2022.

The jsPDF with html2canvas library is one of the best choices which gives the best output PDF from HTML.

You need to understand the dependent libraries to get better out of it. Effort-wise it is easier to create a PDF from HTML.

Before getting into the theory part, I want to give the solution directly to save your time :-). Then, I will highlight the area to strengthen the basics of jsPDF and html2canvas.

Quick solution


window.jsPDF = window.jspdf.jsPDF;
function generatePdf() { let jsPdf = new jsPDF('p', 'pt', 'letter'); var htmlElement = document.getElementById('doc-target'); // you need to load html2canvas (and dompurify if you pass a string to html) const opt = { callback: function (jsPdf) { jsPdf.save("Test.pdf"); // to open the generated PDF in browser window // window.open(jsPdf.output('bloburl')); }, margin: [72, 72, 72, 72], autoPaging: 'text', html2canvas: { allowTaint: true, dpi: 300, letterRendering: true, logging: false, scale: .8 } }; jsPdf.html(htmlElement, opt);
}

View Demo

jspdf html example

Steps to create the HTML example of generating a Multi-page PDF


This JavaScript imports the jsPDF and loads the html2canvas libraries. This example approaches the implementation with the following three steps.

  1. It gets the HTML content.
  2. It sets the html2canvas and jsPDF options of PDF display properties.
  3. It calls the jsPDF .html() function and thereby invokes a callback to output the PDF.

In a previous code, we have seen some small examples of converting HTML to PDF using the jsPDF library.

HTML code for Multi-page PDF content


This example HTML has the content target styled with internal CSS properties. These styles are for setting fonts, and spacing while converting this HTML to PDF.

The #doc-target is the PDF’s content target in this HTML. But, the #outer is the outer container to take care of the UI perception.

That means the PDF will reflect the styles from the #doc-target level of the HTML DOM. The #outer is for synchronizing the UI preview and the PDF result for the sake of the perception.

If you want to show a preview before PDF generation, there is an example for it before generating an invoice PDF.

These styles are

<HTML>
<HEAD> <TITLE>jsPDF HTML Example with html2canvas for Multiple Pages PDF</TITLE> <style> #doc-target { font-family: sans-serif; -webkit-font-smoothing: antialiased; color: #000; line-height: 1.6em; margin: 0 auto; } #outer { padding: 72pt 72pt 72pt 72pt; border: 1px solid #000; margin: 0 auto; width: 550px; } </style>
</HEAD>
<BODY> <div id="container"> <p> <button class="btn" on‌click="generatePdf()">Download PDF</button> </p> <div id="outer"> <div id="doc-target"> <h1>jsPDF HTML Example</h1> <div id="lipsum"> <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam tempor purus a congue ullamcorper. Nunc vulputate eros nunc, sed molestie orci interdum ut. Mauris non tristique neque, ut tincidunt lectus. Nunc sollicitudin eros sapien. Donec metus ex, vestibulum vel pharetra in, convallis id diam. Sed eu tellus pulvinar, fringilla est ut, feugiat nibh. Etiam eget commodo risus. Proin faucibus elementum enim, ut hendrerit nisi convallis at. Pellentesque volutpat, purus faucibus varius tincidunt, nulla erat convallis lacus, eu accumsan felis mauris eget velit. Vestibulum a neque purus. Vestibulum in ultricies justo. Fusce dapibus, sapien a mollis luctus, risus dolor hendrerit ex, in semper justo enim sed ante. Morbi ut urna et velit finibus vehicula. Vivamus elementum egestas ultrices. Proin rutrum orci odio, sit amet hendrerit diam vulputate a. </p> </div> </div> </div> </div> <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js" integrity="sha512-BNaRQnYJYiPSqHHDb58B0yaPfCu+Wgds8Gp/gU33kqBtgNS4tSPHuGibyoeqMV/TJlSKda6FXzoEyYGjTe+vXA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</BODY>
</HTML>

JavaScript jsPDF options for getting a multi-page PDF


In this example code, the JavaScript jsPDF code sets some options or properties. These are required for the below purposes

  • It sets the PDF content’s display properties
  • It defines the callback function to save or open the output PDF.

The below list has a short description of each option and its properties used in this example.

  • callback – It is a client-side method that is invoked when the output PDF is ready.
  • margin – It is the jsPDF option to specify the top, right, bottom and left margins of the PDF.
  • autoPaging – It is required when creating a multi-page PDF from HTML with the auto page break.
  • html2canvas – The jsPDF depends on html2canvas library. Knowing how to use these properties will help to get a satisfactory PDF output.
    • allowTaint – It allows the cross-origin images to taint the canvas if it is set as true. The default is false.
    • dpi – It is dots per inch. Giving 300 will be good which is a printing quality.
    • letterRendering – It allows rendering the letter properly with specified or supported fonts.
    • logging – It writes a log to the developer’s console while creating a PDF. The default is true, but this example disables it.
    • scale – Without specifying this option, it takes the browser’s device pixel ratio.

More references for the available options of creating a full-fledged jsPDF example


These are the library documentation links that guide to creating PDFs from HTML.

  1. jsPDF core inbuilt
  2. jsPDF html.js plugin
  3. Options – html2canvas

The jsPDF core alone has many features to create PDF documents on the client side. But, for converting HTML to a multi-page PDF document, the core jsPDF library is enough.

The latest version replaces the fromHTML plugin with the html.js plugin to convert HTML to PDF.

Above all the jsPDF depends on html2canvas for generating a PDF document. It hooks the html2canvas by supplying enough properties for creating a PDF document.

We used the html2canvas library to capture a screenshot of a webpage. It is a reputed and dependable library to generate and render canvas elements from HTML.

View DemoDownload

↑ Back to Top



https://www.sickgaming.net/blog/2022/12/...pages-pdf/

Print this item

  News - CoD: Modern Warfare 2 Adds First Raid Next Week
Posted by: xSicKxBot - 12-09-2022, 11:35 PM - Forum: Lounge - No Replies

CoD: Modern Warfare 2 Adds First Raid Next Week

Call Of Duty: Modern Warfare 2 is getting a free content update on December 14, which will include a new Raid mode.

Announced during The Game Awards 2022, players can expect Season One: Reloaded to feature Raids next week, starting with Episode 1: Atomgrad, with even more Raid episodes on the way.

Activision has previously confirmed that the first raid will be narrative-focused as it continues the Modern Warfare 2 storyline. Season One will also add a brand-new Spec Ops mission, as well as a new seasonal prestige system with more challenges for players and plenty of rewards.

Continue Reading at GameSpot

https://www.gamespot.com/articles/cod-mo...01-10abi2f

Print this item

  (Free Game Key) 4 Steam Freebies (DLCs and +1 Games)
Posted by: xSicKxBot - 12-09-2022, 11:35 PM - Forum: Deals or Specials - No Replies

4 Steam Freebies (DLCs and +1 Games)

Divine Knockout DKO
(for some reason this game says its a free 2 play game, but it costs money)
Activating the game this way will add +1 to your account, just click Install
Store Page

Capcom Arcade Stadium:FINAL FIGHT
This is a dlc for Capcom Arcade (f2p)
First activate
Capcom Arcade
Then Activate the DLC Final Fight

World of Warships New Year Camo
World of Warship - activate the base game first
New Year Camo Collection

World of Tanks Holiday Gift Pack
World of Tanks - activate the base game first
Holiday Gift Pack

We are welcoming everyone to join our discord[discord.gg]. We are more active there on finding giveaways, small or large, and there are daily raffles you can participate.

?GrabFreeGames.com ?Twitter ?Steam Curator ?Facebook[fb.me]?Discord[discord.gg]
❤️Support us: HumbleBundle Partner[www.humblebundle.com] Fanatical Affiliate[www.fanatical.com]


https://steamcommunity.com/groups/GrabFr...3044991668

Print this item

  PC - The Dark Pictures Anthology: The Devil in Me
Posted by: xSicKxBot - 12-09-2022, 11:35 PM - Forum: New Game Releases - No Replies

The Dark Pictures Anthology: The Devil in Me



From the creators of Until Dawn

Switch between the perspective of 5 playable characters - All can live or die in your version of the story

Multiple ways to play including 2 player online coop mode

Hugely branching storyline that changes based on the decisions you make

Each game in The Dark Pictures Anthology is a complete and original story in its own right

3 ways to play!

Introducing multiplayer to The Dark Pictures Anthology!

1. Solo story
The complete terrifying story as a single player experience

2. Movie night mode
You and up to 4 friends will play the story together on the couch, each controlling a different character

And:
3. Shared story
2 player online co-operative mode. Play the whole story online with a friend, making choices that affect you both.

Publisher: Bandai Namco Games

Release Date: Nov 18, 2022




https://www.metacritic.com/game/pc/the-d...evil-in-me

Print this item

  [Oracle Blog] The Arrival of Java 14!
Posted by: xSicKxBot - 12-09-2022, 06:12 AM - Forum: Java Language, JVM, and the JRE - No Replies

The Arrival of Java 14!

Follow OpenJDK on Twitter Download Oracle OpenJDK Download Oracle JDK Oracle is proud to announce the general availability of Java 14 representing the fifth feature release as part of the six-month cadence. This level of predictability, for over two years now, allows developers to more easily manage...


https://blogs.oracle.com/java/post/the-a...of-java-14

Print this item

  [Tut] Creating an Advent Calendar App in Python with AI Image Creation
Posted by: xSicKxBot - 12-09-2022, 06:12 AM - Forum: Python - No Replies

Creating an Advent Calendar App in Python with AI Image Creation

5/5 – (2 votes)
Example: AI-Generated Image

This blog describes a fun mini Python project using AI image creation for creating artwork for an advent calendar implemented using PyGame.

Context


It’s December 1st, and my daughter has just opened the first door on her physical advent calendar, counting down the days of the festival of general consumerism that some people call Christmas. Out pops a small chocolate with a festive robin embossed onto it.

I don’t really recall when the chocolate treat became ubiquitous. Back in my childhood days, advent calendar doors just opened to reveal an image.

Example: AI-Generated Image

This article describes a mini project to generate a virtual old-school Advent calendar using royalty-free bespoke images generated from Python using a third-party AI service through an API.

All code and some AI-generated image samples are available on GitHub.

Painting the Images


There are now many AI engines for creating images from a text description. This project uses deepai. Creating an image with the deepai API is pretty simple. They provide code samples for several languages on their site.


I further selected the engine for producing art in the impressionism style but you can choose from a range of other styles at https://api.deepai.org.

The aipaint function below uses the requests library post method to send a description string e.g. "Christmas presents under tree" to the API endpoint https://api.deepai.org/api/impressionism-painting-generator with an API key included in the header.

Note that the AI artist style forms parts of the end-point URL.

An API key is used to control access to the API service. The quickstart api-key below is only good for about 10 free requests. You can pay $5 for a new API key and 100 more request calls if you so wish.

def aipaint(description): r = requests.post( "https://api.deepai.org/api/impressionism-painting-generator", data={ 'text': description, }, headers={'api-key': 'quickstart-QUdJIGlzIGNvbWluZy4uLi4K'} ) ret = r.json() return ret

The aipaint() function will return a JSON object, including an element called output_url from which the image can be viewed. 

The following is an example AI painting created, in the impressionist style, for the description "Christmas presents under tree":


The output_url will look something like this https://api.deepai.org/job-view-file/eb6...output.jpg

Be warned when you read this – the above URL will no longer exist. The created image is only hosted by deepai for a few hours, so our advent calendar code will need to download to a local folder.  

To download the image we can use urlretrieve:

painting=aipaint(description) urllib.request.urlretrieve(painting['output_url'], filename)

Caching 25 Images


The original hope was to create images on the fly as an advent door is opened, but as there is a cost for each API request and up to 30 seconds is required for each image to be generated by the AI engine and downloaded, an alternative approach was adopted in writing a prepaint.py script to create and download 25 images.

prepaint.py

import urllib.request
import config
import requests
import urllib.request
from os.path import exists def aipaint(description): r = requests.post( "https://api.deepai.org/api/impressionism-painting-generator", data={ 'text': description, }, headers={'api-key': 'quickstart-QUdJIGlzIGNvbWluZy4uLi4K'} ) ret = r.json() return ret count=1 while count<=25: # pop off the first image description description=config.descriptions.pop(0) # push it back on at end (this ensures we cycle through descriptions and never run out ) # obviously best if there are 25 descriptions though config.descriptions.append(description) filename='./images/image'+ (f"{count:02d}") +".jpg" if(exists(filename)): print(filename + " already exists") else: print("Painting: "+description) try: painting=aipaint(description) if(len(painting)<2): if(painting['status']): print("You've probably run out of deepai (free) credits.") print("Status returned "+painting['status']) else: print("Storing as "+filename) urllib.request.urlretrieve(painting['output_url'], filename) print("Paint now dried on "+filename) except Exception as ex: print("Paint "+filename+" failed") print(ex) count+=1 print("Paintings complete and paint has dried!")
print("Now run main.py to access the Advent calendar")

config.descriptions is a list of Christmas image descriptions.

Ideally, there should be 25 descriptions, but we treat the array as a circular queue so that every time we pop an item off the front, we push back at the end of the queue.

This just ensures we can generate 25 images even without 25 descriptions. My experimentation suggests you will not get the same image back from two requests with the same image description anyway!

Images are cached in an images folder with 25 filenames image01.jpg through image25.jpg

filename='./images/image'+ (f"{count:02d}") +".jpg"

The script first checks whether an image already exists – if yes we just loop through to the next image.

With the code in GitHub I’ve included 25 images. If you want to generate your own just delete some or all from the images folder and edit the descriptions in config.py.

If you don’t yet want to purchase deepai credits – I recommend you just delete a few to experiment.

Sample output from the prepaint.py script


The Advent app


I chose to use the PyGame library to produce the virtual Advent app.

Running main.py launches a window with a grid of 25 doors.

Red doors indicate available doors to open based on the current date of the month. When a red labeled door is opened, a festive image is displayed along with a short promotion text that can be customized in config.py



A click on the image re-displays the grid of calendar doors.

A click on the lower portion of the screen opens a browser with the configured URL.

The PyGame script itself is fairly straightforward. Just one interesting snippet to highlight: To arrange the doors in a ‘random’ order. An array of the numbers 1 to 25 is created (constants HEIGHT and WIDTH are both defined as 5 in config.py).

This array is shuffled using random.shuffle. By pre-setting the random seed to a set figure (here 1 was chosen), the same random shuffle is produced every time the main.py is run.

doormap=list(range(1,HEIGHT*WIDTH+1))
random.seed(1)
random.shuffle(doormap)

Appendix – Full Code


Here are the two code files:

config.py:

HEIGHT = 5
WIDTH = 5 descriptions=["Christmas presents under tree", "Santas Elf", "Santa in sleigh flying over a town delivering gifts on christmas eve", "candy cane on an christmas tree", "a festive robin redbreast", "a snowman with carrot nose and presents", "fairy on top of a christmas tree", "children playing with christmas presents", "christmas lunch", "christmas carol singers", "christmas bells in a christmas tree", "rudolph the red nosed reindeer", "Santa in sleigh", "two snowmen with presents", "snowy village scene", "christmas decoration", "christmas bells", "christmas snowflake", "christmas pudding with custard", "christmas feast with turkey", "father christmas laughing", "christmas baby in a manger", "christmas mulled wine", "children enjoying playing with a new toy train", ] gifts=[('8 python cheat sheets','https://blog.finxter.com/python-cheat-sheets/'),
('the finxter academy','https://academy.finxter.com/'),
('the finxter app','https://app.finxter.com/learn/computer/science/'),
('the finxster freelancer course','https://finxter.gumroad.com/l/python-freelancer/'),
('The Ultimate Guide to Start Learning Python','https://blog.finxter.com/start-learning-python/'),
('Coffee Break Numpy book','https://www.amazon.com/gp/product/B07WHB8FWC/ref=as_li_tl?ie=UTF8&tag=finxter-20&camp=1789&creative=9325&linkCode=as2&creativeASIN=B07WHB8FWC&linkId=447a5019492081d1b2892d9470bb29fc'),
('Leaving the Rat Race with Python book','https://www.amazon.com/Leaving-Rat-Race-Python-Developing-ebook/dp/B08G1XLDNB/ref=sr_1_5?qid=1670149592&refinements=p_27%3AChristian+Mayer&s=digital-text&sr=1-5&text=Christian+Mayer'),
('Coffee break Python book','https://www.amazon.com/Coffee-Break-Python-Kickstart-Understanding-ebook/dp/B07GSTJPFD/ref=sr_1_4?qid=1670149592&refinements=p_27%3AChristian+Mayer&s=digital-text&sr=1-4&text=Christian+Mayer'),
('Coffee Break Python Slicing','https://www.amazon.com/Coffee-Break-Python-Slicing-Workouts-ebook/dp/B07KSHLLG5/ref=sr_1_8?qid=1670149592&refinements=p_27%3AChristian+Mayer&s=digital-text&sr=1-8&text=Christian+Mayer'),
('Coffee Break Pandas','https://www.amazon.com/Coffee-Break-Pandas-Puzzles-Superpower-ebook/dp/B08NG8QHW7/ref=sr_1_9?qid=1670149592&refinements=p_27%3AChristian+Mayer&s=digital-text&sr=1-9&text=Christian+Mayer'),
('',''),

main.py:

import pygame
import sys
import time
import random
import datetime
import webbrowser
import config HEIGHT = config.HEIGHT
WIDTH = config.WIDTH
LINEHEIGHT = 30
CLICKABLEHEIGHT = 150
FONT = 'verdana' # Colors
BLACK = (0, 0, 0)
GRAY = (200, 200, 200)
WHITE = (255, 255, 255)
RED = (200, 0, 0) # use a seeded random shuffle on numbers 1 to 25 # specify seed to always generate the same random sequence of door labels for our 5x5 grid
doormap=list(range(1,HEIGHT*WIDTH+1))
random.seed(1) random.shuffle(doormap) #get current time
d = datetime.datetime.now()
#get the day of month
datemax=int(d.strftime("%d")) #lambda function to convert eg 1 to 1st, 2 to 2nd
ordinal = lambda n: "%d%s" % (n,"tsnrhtdd"[(n//10%10!=1)*(n%10<4)*n%10::4]) # Create game
pygame.init()
size = width, height = 500, 500
screen = pygame.display.set_mode(size)
pygame.display.set_caption('Finxter Advent Calendar') #font_name = 'calibr'#pygame.font.get_default_font()
bigfont = pygame.font.SysFont(FONT, 20)
hugefont = pygame.font.SysFont(FONT, 40) # Compute board size
BOARD_PADDING = 10
board_width = width - (BOARD_PADDING * 2)
board_height = height - (BOARD_PADDING * 2)
cell_size = int(min(board_width / WIDTH, board_height / HEIGHT))
halfcell_size=cell_size/2+10
board_origin = (BOARD_PADDING, BOARD_PADDING) # utility function to add text to screen
def addText(text, position, color): giftText = bigfont.render(text, True, color) giftRect = giftText.get_rect() giftRect.center = position screen.blit(giftText, giftRect) # start from the main grid when dooropen>0 it indicate the door/image to display
dooropen=0 while True: # Check if game quit for event in pygame.event.get(): if event.type == pygame.QUIT: sys.exit() screen.fill(BLACK) if dooropen: # paint the correct image onto the screen filename='images/image'+ (f"{dooropen:02d}") +".jpg" image = pygame.image.load(filename) rect = image.get_rect() screen.blit(image, rect) # going to create a semi transparent clickable area which can link to a URL # the URL 'gifts' are stored in the imported config giftlabel,gifturl = config.gifts[dooropen%len(config.gifts)] s = pygame.Surface((width,CLICKABLEHEIGHT)) s.set_alpha(200) s.fill(GRAY) screen.blit(s, (0,height-CLICKABLEHEIGHT)) clickable = pygame.Rect(0,height-CLICKABLEHEIGHT,width,CLICKABLEHEIGHT) # add text to the clickable area if(dooropen==25): addText("It's Christmas!", ((width / 2), 4*cell_size+LINEHEIGHT), RED) else: addText("On the "+ ordinal(25-dooropen) +" night before xmas", ((width / 2), 4*cell_size), WHITE) addText("Finxter brought unto me:", ((width / 2), 4*cell_size+LINEHEIGHT), WHITE) addText(giftlabel, ((width / 2), 4*cell_size+(2*LINEHEIGHT)), RED) # open URL in browser if clickable area clicked # otherwise close the door by setting dooropen to 0 click, _, _ = pygame.mouse.get_pressed() if click == 1: mouse = pygame.mouse.get_pos() if clickable.collidepoint(mouse) : time.sleep(0.2) webbrowser.open(gifturl, new=dooropen, autoraise=True) else: dooropen = 0 time.sleep(0.2) pygame.display.flip() continue # Draw board cells = [] for i in range(HEIGHT): row = [] for j in range(WIDTH): # Draw rectangle for cell rect = pygame.Rect( board_origin[0] + j * cell_size, board_origin[1] + i * cell_size, cell_size, cell_size ) pygame.draw.rect(screen, GRAY, rect) pygame.draw.rect(screen, WHITE, rect, 3) doornumber=doormap[(j*HEIGHT)+i] label = hugefont.render(str(doornumber), True, RED if doornumber<=datemax else WHITE) labelRect = label.get_rect() labelRect.center = (j * cell_size+halfcell_size, i * cell_size+halfcell_size) screen.blit(label, labelRect) row.append(rect) cells.append(row) left, _, right = pygame.mouse.get_pressed() if left: mouse = pygame.mouse.get_pos() for i in range(HEIGHT): for j in range(WIDTH): if cells[i][j].collidepoint(mouse) and dooropen==0: dooropen=doormap[(j*HEIGHT)+i] # did they attempt to open a door ahead of current date # dont allow that! if dooropen>datemax: dooropen=0 time.sleep(0.2) pygame.display.flip()

prepaint.py:

import urllib.request
import config
import requests
from os.path import exists def aipaint(description): r = requests.post( "https://api.deepai.org/api/impressionism-painting-generator", data={ 'text': description, }, headers={'api-key': 'quickstart-QUdJIGlzIGNvbWluZy4uLi4K'} ) ret = r.json() return ret count=1 while count<=25: # pop off the first image description description=config.descriptions.pop(0) # push it back on at end (this ensures we cycle through descriptions and never run out ) # obviously best is there are 25 descriptions though config.descriptions.append(description) filename='./images/image'+ (f"{count:02d}") +".jpg" if(exists(filename)): print(filename+" already exists") else: print("Painting: "+description) try: painting=aipaint(description) if(len(painting)<2): if(painting['status']): print("You've probably run out of deepai (free) credits.") print("Status returned "+painting['status']) else: print("Storing as "+filename) urllib.request.urlretrieve(painting['output_url'], filename) print("Paint now dried on "+filename) except Exception as ex: print("Paint "+filename+" failed") print(ex) count+=1 print("Paintings complete and paint has dried!")
print("Now run main.py to access the Advent calendar")


https://www.sickgaming.net/blog/2022/12/...-creation/

Print this item

  (Indie Deal) FREE Mumps, Blowfish & Drug Dealer Flash Deal
Posted by: xSicKxBot - 12-09-2022, 06:11 AM - Forum: Deals or Specials - No Replies

FREE Mumps, Blowfish & Drug Dealer Flash Deal

Mumps FREEbie
[freebies.indiegala.com]
https://www.youtube.com/watch?v=CXKTdAuEClA
[www.indiegala.com]


https://steamcommunity.com/groups/indieg...6700191479

Print this item

  PC - Goat Simulator 3
Posted by: xSicKxBot - 12-09-2022, 06:11 AM - Forum: New Game Releases - No Replies

Goat Simulator 3



That's right - we're doing this again. The baa has been raised, and Pilgor is joined by other goats too. You can invite up to three friends in local or online co-op, create carnage as a team, or compete in mini-games and then not be friends anymore.

Get ready for another round of udder mayhem. Lick, headbutt, and ruin your way through a brand new open world in the biggest waste of your time since Goat Simulator! We won't tell you how to play (except in the tutorial), but merely provide the means to be the goats of your dreams.

Publisher: Coffee Stain Publishing

Release Date: Nov 17, 2022




https://www.metacritic.com/game/pc/goat-simulator-3

Print this item

  [Oracle Blog] JDK 14 Has Been Released
Posted by: xSicKxBot - 12-08-2022, 01:23 PM - Forum: Java Language, JVM, and the JRE - No Replies

JDK 14 Has Been Released

JDK 14 is live! Download it from the Java SE Downloads page. See the JDK 14 Release Notes for detailed information about this release. The following are some of the important additions and updates in Java SE 14 and JDK 14: Switch Expressions is now a permanent feature. See JEP 361: Switch Expression...


https://blogs.oracle.com/java/post/jdk-1...n-released

Print this item

 
Latest Threads
Shein Coupon & Promo Cod...
Last Post: udwivedi923
2 hours ago
"Updated" Shein Coupon & ...
Last Post: udwivedi923
2 hours ago
"Updated" Shein Coupon & ...
Last Post: udwivedi923
2 hours ago
[40% OFF 【Shein Coupon &...
Last Post: udwivedi923
2 hours ago
[$200 OFF 【Shein Coupon ...
Last Post: udwivedi923
2 hours ago
[$300 OFF 【Shein Coupon ...
Last Post: udwivedi923
2 hours ago
[$50 OFF 【Shein Coupon &...
Last Post: udwivedi923
2 hours ago
"Updated" Shein Coupon & ...
Last Post: udwivedi923
2 hours ago
{SPECIAL} Shein Coupon Co...
Last Post: udwivedi923
2 hours ago
{SPECIAL} Shein Coupon Co...
Last Post: udwivedi923
2 hours ago

Forum software by © MyBB Theme © iAndrew 2016