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
//SPDX-License-Identifier: MIT | |
pragma solidity ^0.8.4; | |
interface IERC20 { | |
function totalSupply() external view returns (uint); | |
function balanceOf(address account) external view returns (uint); | |
function transfer(address recipient, uint amount) external returns (bool); | |
function allowance(address owner, address spender) external view returns (uint); | |
function approve(address spender, uint amount) external returns (bool); | |
function transferFrom(address sender, address recipient, uint amount) external returns (bool); |
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
use binance::api::*; | |
use binance::futures::userstream::*; | |
use binance::futures::websockets::*; | |
use std::sync::atomic::{AtomicBool}; | |
fn main() { | |
user_stream(); | |
} |
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
// SPDX-License-Identifier: GPL-3.0 | |
pragma solidity >=0.7.0 <0.9.0; | |
/* states | |
0 fundable | |
1 completed | |
*/ | |
contract FundingProject{ | |
enum State {Open, Closed} |
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 add_field(sender, object): | |
table_name = sender._meta.db_table | |
app = sender._meta.app_label | |
model = sender.__name__.lower() | |
if object.system: | |
field = get_model_field(sender, object) | |
if field is not None: | |
field.verbose_name = object.label | |
if field.null: | |
field.blank = not object.required |
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 os, sys | |
from PIL import Image | |
import argparse | |
import time | |
import math | |
def convert_size(size_bytes): | |
if size_bytes == 0: | |
return "0B" | |
size_name = ("B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB") |
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 static boolean uploadFile( String sourceFileUri, List<NameValuePair> params){ | |
String fileName = sourceFileUri; | |
HttpURLConnection conn = null; | |
DataOutputStream dos = null; | |
String lineEnd = "\r\n"; | |
String twoHyphens = "--"; | |
String boundary = "*****"; | |
int bytesRead, bytesAvailable, bufferSize; |
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.fundarte.circuitoteatral; | |
import android.graphics.Bitmap; | |
import android.graphics.BitmapShader; | |
import android.graphics.Canvas; | |
import android.graphics.Paint; | |
import android.graphics.Rect; | |
import android.graphics.RectF; | |
import android.graphics.Shader; |