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
sleep_time = 0.1 | |
from spotipy import util | |
token = util.prompt_for_user_token('hello','user-read-email, user-follow-read',client_id='286f256e17b842a49dad8c4a45bd3c5f',client_secret='adb245ed82a0440b8d51641ad5c5c765',redirect_uri='http://0.0.0.0:3000') | |
import requests | |
import time | |
# fetching favorite artists |
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
deezer_id = 700513741 # paste your ID here | |
# hello, User | |
import requests | |
url = f"https://api.deezer.com/user/{deezer_id}" | |
user_response = requests.get(url) | |
name = user_response.json()['name'] | |
print(f"Hello, {name}!") | |
# fetching favorite artists |
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
text = """ | |
Невиконання першої умови свідчить про надмірну спрощеність моделі, | |
зокрема про необхідність збільшення порядку поліноміальної моделі. | |
Невиконання другої умови є свідченням того, що модель треба спростити, | |
наприклад зменшити порядок полінома. У деяких випадках друга умова | |
може не виконуватися навіть для однофакторних лінійних моделей. Найчастіше | |
це може бути наслідком свідомого підганяння емпіричних даних | |
під заздалегідь задану модель. Це часто роблять у навчальних задачах, але | |
на практиці такий результат свідчить про навмисне викривлення первинних | |
даних. Іншою причиною може бути неправильна (завищена) оцінка |
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
package whiteBox; | |
import deposit.FixedTotalDeposit; | |
import deposit.TotalDeposit; | |
import order.Order; | |
import order.OrderItem; | |
import order.ProductType; | |
import order.ShipmentType; | |
import org.junit.Test; |
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
require 'securerandom' | |
count = 20000 | |
output = File.open("coupons_#{count}.csv", 'w') | |
count.times do | |
output.puts SecureRandom.hex(10) | |
end | |
output.close |
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
Show hidden characters
[ | |
// These are from Atom | |
{ "keys": ["ctrl+\\"], "command": "toggle_side_bar" }, | |
{ "keys": ["ctrl+up"], "command": "swap_line_up" }, | |
{ "keys": ["ctrl+down"], "command": "swap_line_down" }, | |
// Go To Definition | |
{ "keys": ["ctrl+e"], "command": "goto_definition" }, | |
{ "keys": ["ctrl+t"], "command": "goto_symbol_in_project" }, | |
] |
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
class TypedArraySorter < Struct.new(:array) | |
def sort | |
joined_sorted_splitted_array | |
end | |
private | |
def splitted_array_by_types | |
result = [] | |
current_part = [] |
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
source 'https://rubygems.org' | |
gem 'capybara' | |
gem 'capybara-webkit' |
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
class ProgressBar | |
include ActionView::Helpers::TagHelper | |
def initialize(current:, min: 0, max: 100, text: '') | |
@current = current | |
@min = min | |
@max = max | |
@text = text | |
end |
NewerOlder