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
func session(_ session: WCSession, didReceive file: WCSessionFile ) { | |
count+=1 | |
let data: NSData = NSData( contentsOf: file.fileURL )! | |
if(file.fileURL.absoluteString.contains("qr")){ | |
print(count,file.fileURL.absoluteString) | |
QRImage = UIImage( data: data as Data )! | |
self.QRImageView.setImage(QRImage) | |
} |
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 url:URL = URL(string:"https://twitter.com/"+textField.text!+"/profile_image?size=bigger")! | |
var err: NSError?; | |
var imageData :NSData = try! NSData(contentsOf: url, options: NSData.ReadingOptions.mappedIfSafe); | |
var img = UIImage(data:imageData as Data); | |
var IconImagePath: String { | |
let doc = NSSearchPathForDirectoriesInDomains( .documentDirectory, .userDomainMask, true )[0] as String | |
return ( doc as NSString ).appendingPathComponent("icon_send.jpg" ) | |
} |
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
@IBAction func pushImmageButton(_ sender: Any) { | |
let ciFilter = CIFilter(name: "CIQRCodeGenerator") | |
ciFilter?.setDefaults() | |
let baseUrlString="https://twitter.com/" | |
let qrString = baseUrlString+textField.text! | |
let data = qrString.data(using: String.Encoding.utf8) | |
ciFilter?.setValue(data, forKey: "inputMessage") | |
ciFilter?.setValue("L", forKey: "inputCorrectionLevel") |
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
#! /usr/bin/env python | |
# coding: utf-8 | |
# coding=utf-8 | |
# -*- coding: utf-8 -*- | |
# vim: fileencoding=utf-8 | |
import sys | |
from PIL import ImageFont | |
from PIL import Image | |
from PIL import ImageDraw | |
import io |
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
#! /usr/bin/env python | |
# coding: utf-8 | |
# coding=utf-8 | |
# -*- coding: utf-8 -*- | |
# vim: fileencoding=utf-8 | |
import sys | |
from PIL import ImageFont | |
from PIL import Image | |
from PIL import ImageDraw | |
import io |
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
using UnityEngine; | |
using System; | |
using System.Collections; | |
using System.Net; | |
using System.IO; | |
using System.Net.Sockets; | |
using System.Text; | |
using System.Threading; | |
using MiniJSON; |
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
#include <dlib/opencv.h> | |
#include <opencv2/opencv.hpp> | |
#include <opencv2/highgui/highgui.hpp> | |
#include <dlib/image_processing/frontal_face_detector.h> | |
#include <dlib/image_processing/render_face_detections.h> | |
#include <dlib/image_processing.h> | |
#include <dlib/gui_widgets.h> | |
#include <sys/types.h> | |
#include <sys/socket.h> |
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 'discordrb' | |
require "csv" | |
#client_idはbotに設定されているものを入力 prefixはコマンドの呼び出しの時の記号(!play 等の!部分 ?とかでも可) | |
bot = Discordrb::Commands::CommandBot.new token: '自分のトークン', client_id: 000000000000, prefix: '!' | |
#スプラトゥーンの武器名が入っているcsvファイルを読み込み | |
data = CSV.read('buki.csv') | |
bot.command :random_buki do |event| | |
server = bot.servers.first[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
from __future__ import print_function | |
from future.standard_library import install_aliases | |
install_aliases() | |
from urllib.parse import urlparse, urlencode | |
from urllib.request import urlopen, Request | |
from urllib.error import HTTPError | |
import json | |
import os |
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 binascii | |
import nfc | |
import pandas as pd | |
import urllib | |
import urllib2 | |
class MyCardReader(object): | |
def on_connect(self, tag): | |
print "touched" |
NewerOlder