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 | |
// OpenZeppelin Contracts v4.4.0 (token/ERC20/ERC20.sol) | |
pragma solidity ^0.8.0; | |
import "./IERC20.sol"; | |
import "./extensions/IERC20Metadata.sol"; | |
import "../../utils/Context.sol"; | |
/** |
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
#importing libraries | |
from kucoin.client import Client | |
import json | |
import math | |
import time | |
import datetime | |
#API KEYS to the exchange | |
api_key = "xxxxxx" |
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
var firebase = require("firebase"); | |
var RSVP = require('rsvp'); | |
exports.getInstance = function(){ | |
initFirebase() | |
return firebase | |
} | |
/**Responsible for initalizing firebase database.*/ |
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 UIKit | |
class DataSource{ | |
//Static method - no need to initialize the instance of the class | |
class func locations()->[String]{ | |
let a = "a" | |
let b = "b" | |
return [a,b] |
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
from twitter import * | |
import os | |
import oauth | |
#Create a new Twitter app first: https://apps.twitter.com/app/new | |
APP_KEY,APP_SECRET = 'H3kQtN5PQgRiA0ocRCCjqjt2P', '51UaJFdEally81B7ZXjGHkDoDKTYy430yd1Cb0St5Hb1BVcDfE' | |
# OAUTH_TOKEN, OAUTH_TOKEN_SECRET = '149655407-TyUPMYjQ8VyLNY5p7jq0aMy8PjtFtd7zkIpDh3ZA', 'IUVpiDpoVmdO75UaHOTinAv5TOsAQmddttNENh9ofYuWO' |
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
/// Used to interact with the 2k games server API, and upload images to the server | |
class APIOperations: NSObject, NSURLSessionDelegate { | |
/** This method is using just a genereic URLSession to upload image to a server | |
- Parameters: | |
- Image: image to upload | |
- imageType: kind of image (2k type) don't confuse it with png/jpg | |
- callback: callback that contains information about successful or failed operation |
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
//: Playground - noun: a place where people can play | |
import UIKit | |
import XCPlayground | |
var str = "Hello, playground" | |
///https://developer.apple.com/library/watchos/recipes/Playground_Help/Chapters/AddResource.html | |
/** | |
{ "feed": | |
{ |
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
// | |
// JMCBeaconManager.h | |
// iBeaconTest | |
// | |
/** | |
* Class that can be used to monitor nearby beacons. To use it you should follow the steps: | |
1. Check if beacons are supported calling isSupported method | |
2. Register regions to monitor | |
3. Specify beaconFound block to monitor beacons. | |
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
static func uploadImage(image:UIImage,token:String, imageType:String, callback:((message:String?, error:String?)->Void))->NSURLSessionTask{ | |
var imageData = UIImagePNGRepresentation(image) | |
var request = NSMutableURLRequest(URL: NSURL(string:APIKeys.url.rawValue)!) | |
request.cachePolicy = NSURLRequestCachePolicy.ReloadIgnoringLocalAndRemoteCacheData | |
var session = NSURLSession.sharedSession() | |
request.HTTPMethod = "POST" | |
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 <FFEF/FatFractal.h> | |
@interface MyFractal : FatFractal | |
@end | |
@interface FatFractal() | |
- (void) setValuesOnObject:(id)obj fromDict:(NSDictionary *)dict loadFromCacheOnly:(BOOL)loadFromCacheOnly | |
doAutoLoadRefs:(BOOL)doAutoLoadRefs doAutoLoadBlobs:(BOOL)doAutoLoadBlobs; |
NewerOlder