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,119
» Latest member: albert42
» Forum threads: 21,742
» Forum posts: 22,608

Full Statistics

Online Users
There are currently 1448 online users.
» 1 Member(s) | 1441 Guest(s)
Applebot, Baidu, Bing, Facebook, Google, Yandex, albert42

 
  [Oracle Blog] JDK 15.0.1, 11.0.9, 8u271, and 7u281 Have Been Released!
Posted by: xSicKxBot - 12-19-2022, 10:32 AM - Forum: Java Language, JVM, and the JRE - No Replies

JDK 15.0.1, 11.0.9, 8u271, and 7u281 Have Been Released!

The Java SE 15.0.1, 11.0.9, 8u271, and 7u281 update releases are now available. You can download the latest JDK releases from the Java SE Downloads page. OpenJDK 15.0.1 is available on http://jdk.java.net/15/. New Features, Changes, and Notable Bug Fixes For information about the new features, chang...


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

Print this item

  [Tut] This is How I Played a Sinus Tone in My Jupyter Notebook (Python)
Posted by: xSicKxBot - 12-19-2022, 10:32 AM - Forum: Python - No Replies

This is How I Played a Sinus Tone in My Jupyter Notebook (Python)

5/5 – (1 vote)

What/Why? I want to write a simple Python script that warns me if crypto price data (e.g., BTC) crosses a certain threshold. This can be useful for trading or some other apps, so I thought it would be fun to do it.

The tutorial in front of you simply documents my learnings on creating a sinus tone in my Jupyter Notebook—so it may benefit you as well.

If you want the whole tutorial on my mini project, you can check it out here on the Finxter blog:

? Recommended Tutorial: I Made a Python Script That Beeps When BTC or ETH Prices Drop


Challenge


? Challenge: Write Python code in a Jupyter Notebook that creates a sinus tone when executed.

Solution


The easy way to solve this challenge is the following. ?

This code creates a sine wave with a frequency of 500 Hz and plays it in the IPython environment. The wave is created using the NumPy library by specifying the frequency and the length of the wave (15000*2). The rate of the wave is set to 10000 Hz and autoplay is set to True so that the wave will start playing immediately.

import numpy as np
from IPython.display import Audio # Create the tone as a NumPy Sinus Wave
wave = np.sin(2*np.pi*500*np.arange(15000*2)/15000) # Play the Sinus Wave (tone)
Audio(wave, rate=10000, autoplay=True)

This generates the following beep sound in your Jupyter Notebook:


What happens if you change the rate argument of the Audio() function call to be 20000 instead of 10000?

# Play the Sinus Wave (tone)
Audio(wave, rate=20000, autoplay=True)

The beep sound tone gets higher:


You can play around with the Jupyter notebook here:


But what if you don’t have a Jupyter notebook but a normal Python script (Win/Linux/macOS)?

In that case, you cannot use the IPython library. Instead, follow the steps outlined in the following tutorial on the Finxter blog—you still can play beep sounds!

? Recommended Tutorial: How to Make a Beep Sound in Python?

Thanks for Reading! ♥


You’re welcome to join our free email academy where I share all our coding projects and cheat sheets on a weekly basis:



https://www.sickgaming.net/blog/2022/12/...ok-python/

Print this item

  (Indie Deal) Infliction Deal, Alawar Giveaways, New Expansions
Posted by: xSicKxBot - 12-19-2022, 10:31 AM - Forum: Deals or Specials - No Replies

Infliction Deal, Alawar Giveaways, New Expansions

Alawar Giveaways
[www.indiegala.com]

https://www.youtube.com/watch?v=DNKEXWzIGNg
Spintires Franchise Sale, all titles 75% OFF
[www.indiegala.com]
New Expansions
[www.indiegala.com]
Warhammer 40,000: Chaos Gate - Daemonhunters - Duty Eternal[www.indiegala.com] | 15%
Jurassic World Evolution 2: Dominion Malta Expansion[www.indiegala.com] | 10%
Planet Zoo: Grasslands Animal Pack[www.indiegala.com] | 17%
Cities: Skylines - Financial Districts[www.indiegala.com] | 18%
Cities: Skylines - Content Creator Pack: Map Pack 2[www.indiegala.com] | 16%
Cities: Skylines - African Vibes[www.indiegala.com] | 15%
Cities: Skylines - Financial Districts Bundle[www.indiegala.com] | 14%
Solasta: Crown of the Magister - Inner Strength[www.indiegala.com] | 12%
MY HERO ONE'S JUSTICE 2 - Season Pass 2[www.indiegala.com] | 13%
Klonoa Phantasy Reverie Series: Special Bundle[www.indiegala.com] | 15%
DRAGON BALL XENOVERSE 2 - HERO OF JUSTICE Pack Set[www.indiegala.com] | 13%
https://www.youtube.com/watch?v=VVfIwh2XDQ8
Vorax DevLog Update #5 is live

[discord.gg]



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

Print this item

  (Free Game Key) Sable - Free Epic Games Game
Posted by: xSicKxBot - 12-19-2022, 10:31 AM - Forum: Deals or Specials - No Replies

Sable - Free Epic Games Game

Sable - 24 hours only
https://store.epicgames.com/p/sable

This game is free to keep if claimed by December 19, 2022 5:00 PM or in a day

- Click on the GET Button
- Verify that the price is zero
- Click on the Place Order Button
- Thats it, the game will be added to you Epic Games Account

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...5453174474

Print this item

  News - Fortnite And My Hero Academia: How To Get Deku's Smash Mythic Weapon
Posted by: xSicKxBot - 12-19-2022, 10:30 AM - Forum: Lounge - No Replies

Fortnite And My Hero Academia: How To Get Deku's Smash Mythic Weapon

My Hero Academia has arrived in Fortnite, and over the next two weeks, it's going to have a huge impact on how you play. That's because this collab isn't just about item shop cosmetics--though it certainly does have those. But on top of that, the island is now home to a new MHA-themed Mythic weapon: Deku's Smash.

Deku's Smash is just as big of a shift to the Fortnite meta as the Kamehameha was during the Dragonball collaboration this past summer. This is to say you should expect things to blow up a lot more during the next two weeks, as players will no doubt be constantly throwing this thing around.

What actually is the Deku's Smash mythic weapon?

Remember how the Kamehameha was basically a giant laser that would melt anything that you pointed it at--provided you could survive the lengthy charge-up time? The Deku's Smash is a pretty similar concept, with the main difference being that it's more like you're throwing a very large bomb.

Continue Reading at GameSpot

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

Print this item

  PC - Dwarf Fortress
Posted by: xSicKxBot - 12-19-2022, 10:29 AM - Forum: New Game Releases - No Replies

Dwarf Fortress



The deepest, most intricate simulation of a world that's ever been created. The legendary Dwarf Fortress is now on Steam. Build a fortress and try to help your dwarves survive against a deeply generated world.

Publisher: Bay 12 Games

Release Date: Dec 06, 2022




https://www.metacritic.com/game/pc/dwarf-fortress

Print this item

  [Oracle Blog] JDK 15 Is Live!
Posted by: xSicKxBot - 12-18-2022, 11:52 AM - Forum: Java Language, JVM, and the JRE - No Replies

JDK 15 Is Live!

JDK 15 is live! Download it from the Java SE Downloads page. See the JDK 15 Release Notes for detailed information about this release. The following are some of the important additions and updates in Java SE 15 and JDK 15: Text Blocks, first previewed in Java SE 13, is a permanent feature in this re...


https://blogs.oracle.com/java/post/jdk-15-is-live

Print this item

  [Tut] I Made a Python Script That Beeps When BTC or ETH Prices Drop
Posted by: xSicKxBot - 12-18-2022, 11:52 AM - Forum: Python - No Replies

I Made a Python Script That Beeps When BTC or ETH Prices Drop

4.5/5 – (2 votes)

This tutorials shares my experience of creating a simple Python script that warns me if crypto price data (e.g., BTC or ETH) crosses a certain threshold.

Why would I need this? Well, the script can be useful for trading signals if I want to react quickly. While I don’t really trade, this script may be useful to time some buy or sell orders in a volatile market environment.

Besides — it’s fun and easy and quick, 5 minutes tops, so let’s just do it!

? Challenge: I want to create a small Python script — that also works for Jupyter notebooks — to play a tone or warning signal as soon as Bitcoin or ETH price cross a certain threshold!

My Python Script if Crypto Prices Drop

This short clip shows you the tone it generates when BTC falls under a certain price — wait for the beep:

YouTube Video

You can run the Bitcoin price warning script in your background in a separate browser tab in a Colab Jupyter Notebook (code below).

Okay, let’s build the code in three easy steps.

Step 1: Get Bitcoin, Ethereum, or Crypto Prices in Python


First, install the Historic Crypto library to access live cryptocurrency data.

Jupyter Notebook: ?
!pip install Historic-Crypto Shell or Terminal: ?
pip install Historic-Crypto

Second, create a new object of the LiveCryptoData class, passing in the currency pair

  • 'BTC-USD' for Bitcoin and USD
  • 'ETH-USD' for Ethereum and USD
  • 'BTC-ETH' for Bitcoin and Ethereum

Third, use the LiveCryptoData(...).return_data() method to return a DataFrame and store it in a variable called data.

from Historic_Crypto import LiveCryptoData
data = LiveCryptoData('BTC-USD').return_data()
print(data)

Output:

Collecting data for 'BTC-USD'
Checking if user supplied is available on the CoinBase Pro API...
Connected to the CoinBase Pro API.
Ticker 'BTC-USD' found at the CoinBase Pro API, continuing to extraction.
Status Code: 200, successful API call. ask bid volume \
time 2022-12-17 18:36:26.149769+00:00 16720.58 16720.56 28130.05026215 trade_id price size time 2022-12-17 18:36:26.149769+00:00 472092300 16720.58 0.0028569

Fourth, print the first element in the price Series, which represents the current price of Bitcoin in US Dollars. So to get the current price, I simply call:

print(data['price'][0])
# 16722.21

I’m sure the price is completely outdated when you read this. ?

Okay, now that I have the price data, I’ll create some code to create a warning tone.

Step 2: Play Sinus Tone in Jupyter Notebook



My goal is to play a tone — any audio signal, really — even when the Python script or Jupyter notebook is not in the foreground.

I decided on an audio signal rather than a popup because popups are more intrusive to my workflow, and they may “pop up” in the background without me even seeing it.

Also, I may want to walk around and get some coffee ☕ — and still be warned when BTC crosses my threshold! ⚠

? How to create a sinus wave in a Jupyter Notebook in Python?

This code imports the NumPy library and the IPython.display library. It then creates a waveform with a frequency of 500 Hz and a duration of 2 seconds. The code then plays the waveform using the Audio() function from the IPython.display library. The rate is set to 10,000 Hz and autoplay is set to True so the sound will automatically play when the code is run.

import numpy as np
from IPython.display import Audio wave = np.sin(2*np.pi*500*np.arange(15000*2)/15000)
Audio(wave, rate=10000, autoplay=True)

Note that this code will only work in a Jupyter Notebook. To make a tone in any Python script, you can read the following tutorial on the Finxter blog:

? Recommended: How to Create a Beep in Python?

YouTube Video

Step 3: Putting It All Together in a Jupyter Notebook


The following script for Jupyter Notebooks runs forever until the current Bitcoin price drops below a user-defined threshold. If it does, it issues an audio wave sound that makes you aware of the event.

!pip install Historic-Crypto
from Historic_Crypto import LiveCryptoData
import numpy as np
from IPython.display import Audio
import time wave = np.sin(2*np.pi*500*np.arange(15000*2)/15000)
threshold = 16710 # usd per btc def get_price(): data = LiveCryptoData('BTC-USD', verbose=False).return_data() return float(data['price'][0]) print('Price warning below', threshold, 'USD per BTC')
print('Starting price', get_price(), 'USD per BTC') while get_price() > threshold: time.sleep(4) Audio(wave, rate=10000, autoplay=True)

You can change the threshold variable that is highlighted in the code above to control the price threshold that will cause the beep sound to play.

Try it yourself in my interactive Jupyter notebook here (Colab):


You can change the price data to Ethereum by using this function instead:

def get_price(): data = LiveCryptoData('ETH-USD', verbose=False).return_data() return float(data['price'][0])

In a similar manner, this will also work for other crypto tickers or trading pairs.

Thanks! ♥


I loved having you here. Feel free to stay updated with all our programming projects and download your coding cheat sheets here:



https://www.sickgaming.net/blog/2022/12/...ices-drop/

Print this item

  (Indie Deal) FREE Suna, Maleficence Tales Bundle, Maximum Movie Deals
Posted by: xSicKxBot - 12-18-2022, 11:52 AM - Forum: Deals or Specials - No Replies

FREE Suna, Maleficence Tales Bundle, Maximum Movie Deals

Suna FREEbie
[freebies.indiegala.com]
Do you have the courage to confront your past?

https://www.youtube.com/watch?v=3r5jmr2yrF0
Maleficence Tales Bundle | 8 eBooks | 92% OFF
[www.indiegala.com]
?Sometimes being the bad guy doesn't mean you are a bad guy?...other times you may be the worst calamity threatening the world, known as evil incarnate & a malevolent monster on par to demons. A new villainous eBook bundle is here.

https://www.youtube.com/watch?v=flLl1N0bLKM
Movie Games S.A. Winter Sale, up to 90% OFF
[www.indiegala.com]
Maximum Games Winter Sale, up to 90%OFF
[www.indiegala.com]
New Vorax Video
https://youtu.be/IpNkEt-ypSs


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

Print this item

  (Free Game Key) Costume Quest 2 - Free Epic Games Game
Posted by: xSicKxBot - 12-18-2022, 11:52 AM - Forum: Deals or Specials - No Replies

Costume Quest 2 - Free Epic Games Game

This giveaway is on the Epic Games platform

Epic Games is giving away free games every week for a few years

To grab the game for free:
Costume Quest 2 - 24 hours only
https://store.epicgames.com/en-US/p/costume-quest-2
- Click on the GET Button
- Verify that the price is zero
- Click on the Place Order Button
- Thats it, the game will be added to you Epic Games Account

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...5449567556

Print this item

 
Latest Threads
RebatesMe Grocery Deals E...
Last Post: albert42
6 minutes ago
World Cup 2026 Lemfi Help...
Last Post: Tumb01
22 minutes ago
Try Lemfi This World Cup ...
Last Post: Tumb01
24 minutes ago
World Cup 2026 Lemfi UK C...
Last Post: Tumb01
25 minutes ago
Lemfi Transfer Time + Wor...
Last Post: Tumb01
26 minutes ago
Lemfi USA World Cup 2026 ...
Last Post: Tumb01
27 minutes ago
Lemfi Business + World Cu...
Last Post: Tumb01
28 minutes ago
World Cup 2026 Lemfi Prom...
Last Post: Tumb01
30 minutes ago
World Cup 2026: Is Lemfi ...
Last Post: Tumb01
31 minutes ago
Kod Temu Nowy Użytkownik ...
Last Post: faran8888
1 hour ago

Forum software by © MyBB Theme © iAndrew 2016