This file contains hidden or 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 tensorflow as tf | |
| x = tf.Variable(3, name="x") | |
| y = tf.Variable(4, name="y") | |
| f = x + y + 2 | |
| with tf.Session() as sess: | |
| x.initializer.run() | |
| y.initializer.run() |
This file contains hidden or 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 movieRatings = [ | |
| "The girl next door": 8, "মাটির ময়না": 10, "খোঁজ The Search": 10, "Star Wars: A new hope": 10, | |
| "The Godfather": 10, "Grave of the fireflies": 10 | |
| ] | |
| let dk = movieRatings.keys | |
| for k in dk { | |
| print(k) | |
| } |
This file contains hidden or 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 😎 = "Imma gonna write all in 😈 emojis" | |
| print(😎) | |
| print("\(😎) has \(😎.characters.count) characters in it") |
This file contains hidden or 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 m:String = "Hola!" | |
| var len = m.characters.count | |
| // let's get the 3rd character | |
| var thirdIndex = m.index(m.firstIndex, offsetBy:2) | |
| print(m[thirdIndex]) |
This file contains hidden or 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 Cocoa | |
| // declaring dictionary | |
| var dict1: Dictionary<String, Int> = [:] | |
| var dict2 = Dictionary<String, Int>() | |
| var dict3: [String:Int] = [:] | |
| var dict4 = [String:Int]() | |
| /* | |
| So you can either use (), in that case mention type after = |
This file contains hidden or 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
| // | |
| // ViewController.swift | |
| // Simple Face Detector | |
| // | |
| import UIKit | |
| import CoreImage | |
| class ViewController: UIViewController { |
This file contains hidden or 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 math | |
| i = 1 | |
| for i in range(1,20): | |
| if i > 10: | |
| diff = int(math.fabs(20-i)) | |
| print(diff, end=",") | |
| else: | |
| print(i, end=",") |
This file contains hidden or 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 : | |
| https://stackoverflow.com/questions/4842448/getting-processor-information-in-python | |
| """ | |
| import os, platform, subprocess, re | |
| def get_processor_name(): | |
| if platform.system() == "Windows": |
This file contains hidden or 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 <iostream> | |
| #include <random> | |
| using namespace std; | |
| int main(int argc, const char * argv[]) { | |
| random_device rd; | |
| mt19937_64 eng(rd()); | |
| uniform_int_distribution<> dist(25, 63); | |
This file contains hidden or 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
| git | |
| libibus-1.0-0 | |
| libibus-1.0-dev | |
| ibus | |
| automake | |
| autoconf | |
| gjs | |
| gir1.2-gjsdbus-1.0 | |
| gir1.2-ibus-1.0 |