Skip to content

Instantly share code, notes, and snippets.

View chashmeetsingh's full-sized avatar
👨‍💻
/* No Comment */

Chashmeet Singh chashmeetsingh

👨‍💻
/* No Comment */
View GitHub Profile
import UIKit
import SpriteKit
import ParticlesLoadingView
class ViewController: UIViewController {
lazy var loadingView: ParticlesLoadingView = {
let x = UIScreen.mainScreen().bounds.size.width / 2 - (75 / 2) - 200
let y = UIScreen.mainScreen().bounds.size.height / 2 - (75 / 2)
let view = ParticlesLoadingView(frame: CGRect(x: x, y: y, width: 75, height: 75))
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
let navigationController: AppNavigationController = AppNavigationController(rootViewController: VideoViewController())
let menuViewController: AppMenuController = AppMenuController(rootViewController: navigationController)
menuViewController.edgesForExtendedLayout = .None
let tabBarController: BottomNavigationController = BottomNavigationController()
tabBarController.viewControllers = [RecipesViewController(), menuViewController, PhotoViewController()]
tabBarController.selectedIndex = 1
tabBarController.tabBar.tintColor = MaterialColor.white
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "jp.ogwork.freetransform"
minSdkVersion 15
targetSdkVersion 24
List<NameValuePair> someVariable = new ArrayList<NameValuePair>();
nameValuePairs.add(new BasicNameValuePair("query", "{articles{id}}"));
HttpClient httpclient=new DefaultHttpClient();
HttpPost httppost = new HttpPost("http://udacity-alumni-api.herokuapp.com/graphql");
httppost.setHeader(HTTP.CONTENT_TYPE,"application/x-www-form-urlencoded;charset=UTF-8");
try {
httppost.setEntity(new UrlEncodedFormEntity(someVariable, "UTF-8"));
} catch (UnsupportedEncodingException e) {
@chashmeetsingh
chashmeetsingh / only_choice
Last active May 19, 2017 09:08
only_choice
from utils import *
def only_choice(values):
for unit in unitlist:
for box in unitlist:
val = ''
for item in box:
if len(values[item]) > 1:
val += values[item]
s = ''
def naked_twins(values):
"""Eliminate values using the naked twins strategy.
Args:
values(dict): a dictionary of the form {'box_name': '123456789', ...}
Returns:
the values dictionary with the naked twins eliminated from peers.
"""
twins = []
//
// NewModel.swift
// Susi
//
// Created by Chashmeet Singh on 2017-06-08.
// Copyright © 2017 FOSSAsia. All rights reserved.
//
import RealmSwift
import Realm
@chashmeetsingh
chashmeetsingh / GSoC 2017 Final Submission Report.md
Last active September 2, 2017 22:20
GSoC 2017 Final Submission Report

Google Summer of Code 2017 Final Submission Report

Aim

The main aim of this project was to develop an iOS app on top of the SUSI.AI Server functionalities. The server makes use of different skills which are defined in the Skill Data Repository. The app will have functionalities such as replying intelligently to user's queries, helping users in their day to day lives, hot word detection, and training, synchronizing settings across all the clients and much more.

//
// DrawerViewController.swift
// GPS Info
//
// Created by Chashmeet Singh on 16/03/18.
// Copyright © 2018 Chashmeet Singh. All rights reserved.
//
import UIKit
import KYDrawerController
{"blame":["\/usr\/lib\/TweakInject.dylib"],"app_name":"SpringBoard","timestamp":"2018-05-11 23:53:33.78 +0530","app_version":"1.0","slice_uuid":"4b8315ac-1e25-39ec-a197-28a0027131d6","adam_id":0,"build_version":"50","bundleID":"com.apple.springboard","share_with_app_devs":true,"is_first_party":true,"bug_type":"109","os_version":"iPhone OS 11.1.2 (15B202)","incident_id":"1F9BE341-C4C0-406A-9C00-0271FF2BEFC7","name":"SpringBoard","symbolicated":true}
Incident Identifier: 1F9BE341-C4C0-406A-9C00-0271FF2BEFC7
CrashReporter Key: 9522b7619d0295c7962228c6dfd49ef220f6c335
Hardware Model: iPhone9,4
Process: SpringBoard [13234]
Path: /System/Library/CoreServices/SpringBoard.app/SpringBoard
Identifier: com.apple.springboard
Version: 50 (1.0)
Code Type: ARM-64 (Native)
Role: Foreground