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
on theSplit(theString, theDelimiter) | |
-- save delimiters to restore old settings | |
set oldDelimiters to AppleScript's text item delimiters | |
-- set delimiters to delimiter to be used | |
set AppleScript's text item delimiters to theDelimiter | |
-- create the array | |
set theArray to every text item of theString | |
-- restore the old setting | |
set AppleScript's text item delimiters to oldDelimiters | |
-- return the result |
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
def build_model(filename): | |
# ... same as before | |
global_step = tf.train.get_or_create_global_step() | |
train_op = optimizer.minimize(loss, global_step=global_step) | |
summary = tf.summary.merge_all() | |
global_vars = tf.global_variables() | |
uninitialized = tf.report_uninitialized_variables(tf.global_variables()) | |
global_init = tf.global_variables_initializer() |
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 tensorflow as tf | |
_CSV_COLUMNS = [ | |
'age', 'workclass', 'fnlwgt', 'education', 'education_num', | |
'marital_status', 'occupation', 'relationship', 'race', 'gender', | |
'capital_gain', 'capital_loss', 'hours_per_week', 'native_country', | |
'income_bracket' | |
] |
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 java.util.LinkedList; | |
import java.lang.Thread; | |
class Test { | |
class BlockingQueue { | |
public BlockingQueue(int size) { | |
this.size = size; | |
} |
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
<?xml version='1.0'?> | |
<!-- GistID: 8470342 --> | |
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'> | |
<fontconfig> | |
<match target="font"> | |
<edit mode="assign" name="rgba"> | |
<const>rgb</const> | |
</edit> | |
</match> | |
<match target="font"> |
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
// GistID: 7984760 | |
// KMP substring search && FSM substring search | |
#include <string> | |
#include <iostream> | |
#include <vector> | |
using namespace std; | |
typedef vector<vector<int> > FSMType; |
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/perl -w | |
# GistID: 7316128 | |
# example: argparse.pl arg1 arg2 arg3 --long-param x -l hh -a arg4 arg5 | |
# params = {"long"=>"x", "short"=>"hh", "switch-a":1} | |
# args = ("arg1", "arg2", "arg3", "arg4", "arg5") | |
use strict; | |
use 5.010; |
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
# GistID: 7287953 | |
startup_message off | |
escape ^X^X | |
caption always "%?%F%{-b 5w}%:%{-b bb}%? %H | %l | %m-%d %c |%?%F%{-b 4w}%?%L=%-Lw%45>%{-b w4}%n%f* %t%{-}%+Lw%-0<" |
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
┌──[chi@mint]──[~/android/system/packages/apps/Contacts]── (8e9a5fb...) * ──────── | |
$ git diff | |
diff --git a/src/com/android/contacts/dialpad/util/NameToNumberFactory.java b/src/com/android/contacts/dial | |
index c0adef6..3ca285b 100644 | |
--- a/src/com/android/contacts/dialpad/util/NameToNumberFactory.java | |
+++ b/src/com/android/contacts/dialpad/util/NameToNumberFactory.java | |
@@ -34,13 +34,15 @@ public class NameToNumberFactory { | |
// Check locale and returns matched class inherited from NameToNumber class. | |
NameToNumber instance; |
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 <vector> | |
#include <iostream> | |
#include <algorithm> | |
#include <iterator> | |
#include <map> | |
using namespace std; | |
int fact(int n) { |
NewerOlder