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 time | |
import os | |
import websocket | |
import json | |
from dotenv import load_dotenv | |
load_dotenv() | |
api_key = os.environ.get('binance_api') | |
api_secret = os.environ.get('binance_secret') | |
def on_message(ws, message): |
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
<html> | |
<head><title>Ordering notice</title></head> | |
<body> | |
<h1>Ordering notice</h1> | |
<p>Dear {{ person_name }},</p> | |
<p>Thanks for placing an order from {{ company }}. It's scheduled to | |
ship on {{ ship_date|date:"F j, Y" }}.</p> | |
<p>Here are the items you've ordered:</p> | |
<ul> | |
{% for item in item_list %} |
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
def solve(s): | |
l = s.split() | |
new_list = [] | |
stringLen = len(s) | |
newString = '' | |
awaitingWord = True | |
for i in range(stringLen): |
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 string | |
alpha = string.ascii_lowercase | |
n = int(input()) | |
L = [] | |
for i in range(n): | |
s = "-".join(alpha[i:n]) | |
L.append((s[::-1]+s[1:]).center(4*n-3, "-")) | |
print('\n'.join(L[:0:-1]+L)) |
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
def print_rangoli(size): | |
central = '' | |
for i in range(size-1, 0, -1): | |
central = central + chr(int(ord('a') + i)) + '-' | |
central = central + chr(int(ord('a') + 0)) + central[::-1] | |
width = len(central) | |
p = '' | |
for j in range(size-1, -1, -1): |
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
public class StarterApplication extends Application { | |
public static final String TAG = "Starter"; | |
@Override | |
public void onCreate() { | |
super.onCreate(); | |
// Enable Local Datastore. | |
Parse.enableLocalDatastore(this); |
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
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> | |
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" /> | |
<uses-permission android:name="android.permission.INTERNET" /> | |
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> | |
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> | |
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> | |
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" /> | |
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" /> |
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
ImageView pictureId = (ImageView)findViewById(R.id.pictureId); | |
BitmapDrawable drawableforimage = (BitmapDrawable) pictureId.getDrawable(); | |
Bitmap bitmap = drawableforimage.getBitmap(); | |
ByteArrayOutputStream stream = new ByteArrayOutputStream(); | |
bitmap.compress(Bitmap.CompressFormat.PNG,100,stream); | |
byte[] byteArray = stream.toByteArray(); | |
ParseFile file = new ParseFile("grapefruit.jpg",byteArray); | |
ParseObject object = new ParseObject("Image"); |
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
if __name__ == '__main__': | |
n = int(raw_input()) | |
arr = map(int, raw_input().split()) | |
maximum = arr[0] | |
last_max = None | |
for i in range(1, len(arr)): | |
#знаходимо максимальний максимум | |
if arr[i] > maximum: |
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 com.example.myapplication; | |
import androidx.appcompat.app.AppCompatActivity; | |
import android.graphics.Bitmap; | |
import android.os.AsyncTask; | |
import android.os.Bundle; | |
import android.util.Log; | |
import org.json.JSONArray; |
NewerOlder