Skip to content

Instantly share code, notes, and snippets.

View nuriyevn's full-sized avatar
😎

nuriyevn

😎
View GitHub Profile
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):
<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 %}
def solve(s):
l = s.split()
new_list = []
stringLen = len(s)
newString = ''
awaitingWord = True
for i in range(stringLen):
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))
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):
public class StarterApplication extends Application {
public static final String TAG = "Starter";
@Override
public void onCreate() {
super.onCreate();
// Enable Local Datastore.
Parse.enableLocalDatastore(this);
<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" />
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");
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:
@nuriyevn
nuriyevn / MainActivity.java
Created April 5, 2021 19:22
JSON weather in some straing Hungary city :)
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;