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
| prediction | row_id | class_1 | class_2 | class_3 | | |
| ---|---------|-----|----|--- | | |
| 1 | 0 | 0.998750 | 0.000002 | 0.00003 | | |
| prediction | row_id | class_1_label | class_1_probability | class_2_label | class_2_probability |class_3_label | class_3_probability | | |
| ---|---------|-----|----|--- | ---| ---| --| |
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 class UserHistory_CreateUpdateFromUser { | |
static final String NEWUSERLIST = 'newUserList'; | |
static final String LOBCHANNELLIST = 'lOBChannelList'; | |
static final String ISACTIVELIST = 'isActiveList'; | |
static final String UMANAGERLIST = 'uManagerList'; |
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
class KitchenSink(object): | |
def drain(self): | |
print('wash') | |
class NoSink(object): | |
def noop(self): | |
print('noop') | |
def __getattr__(self, name): | |
if hasattr(KitchenSink, name): |
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
// mongo 127.0.0.1/MMApp collect.js >> collects.txt | |
var collects= db.getCollectionNames(); | |
collects.forEach(function(name, i) { | |
var c = db[name].find(); | |
while(c.hasNext()) { | |
printjson(c.next()) | |
} | |
}); |
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
# put in __init__.py | |
def enum(*vals, **enums): | |
""" | |
Enum without third party libs and compatible with py2 and py3 versions. | |
""" | |
enums.update(dict(zip(vals, vals))) | |
return type('Enum', (), enums) | |
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
# Implict return | |
class SomeClass(Object): | |
def implicit_do_stuff(self, val): | |
if self.some_value: | |
return val + 1 | |
return val | |
def implicit_do_stuff(self, val): | |
if self.some_value: |
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
_MISSING = object() | |
def update_method(user, first_name=_MISSING, last_name=_MISSING): | |
if first_name is not _MISSING: | |
user.first_name = first_name | |
if last_name is not _MISSING: | |
user.last_name = last_name | |
user.save() # or someshit |
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
######################## | |
## Variables | |
######################## | |
variable "environment_name" { | |
description = "The name of the environment" | |
} | |
variable "vpc_id" { |
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
email = InboudEmail(from="keith@email", body="HIIII PANDA") | |
contact_form_email = EmailToContact(email) | |
contact_from_email. | |
class EmailToContact { | |
public static Contact findOrBuildContact(String email_address) { | |
Contact result = "Select * from contact where email = email_Address" | |
if result == Empty {} // Null,[],empty AKA no match found |
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
String info = 'Starting Program'; | |
// SOQL query to load data into object(s) | |
// Load ALL books into the list of books | |
List<Book__c> books = [SELECT Price__c, Name From Book__c]; | |
// Load only 1 book into a single book object | |
Book__c book = [SELECT Price__c, Name From Book__c limit 1]; |