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
$request_verifier = tt_global_state()->get_request_verifier(); | |
$callback_url = tt_global_state() | |
->get_global_vars() | |
->get_with_default('fides_callback_url', tt_global_state()->get_web_dir()); | |
$request_verifier->submit_for_verification($request, $callback_url); |
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
,month,eb2_wait_time,eb3_wait_time,eb3_current_month_advance_months,eb3_next_month_advance_months,advance,前进 | |
121,Dec-2007,59,73,3,-1,FALSE,1 | |
120,Jan-2008,60,75,-1,1,TRUE,0 | |
119,Feb-2008,60,75,1,13,TRUE,1 | |
118,Mar-2008,51,63,13,3,TRUE,1 | |
117,Apr-2008,52,61,3,1,TRUE,1 | |
116,May-2008,52,61,1,-1,FALSE,1 | |
115,Jun-2008,50,63,-1,0,FALSE,0 | |
114,Jul-2008,51,64,0,0,FALSE,0 | |
113,Aug-2008,26,65,0,0,FALSE,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
from sklearn.metrics import precision_recall_curve | |
import matplotlib.pyplot as plt | |
precision, recall, thresholds = precision_recall_curve(b_test, predictions) | |
plt.step(recall, precision, color='b', alpha=0.2, | |
where='post') | |
plt.fill_between(recall, precision, step='post', alpha=0.2, | |
color='b') | |
plt.xlabel('Recall') | |
plt.ylabel('Precision') |
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
#standardsql | |
WITH all_spams_fides AS ( | |
SELECT DISTINCT requestId, | |
FIRST_VALUE(vrd.score) OVER (PARTITION BY requestId ORDER BY vrd.score DESC) as score, | |
is_admin_deleted | |
FROM mi.fides_events_nrt n, UNNEST(verifierData) as vrd | |
INNER JOIN a.mts_requests r ON r.request_id = requestId | |
WHERE (n._PARTITIONTIME >= '2017-09-21' OR n._PARTITIONTIME IS NULL) | |
AND time > 1506034800000 |
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
#standardsql | |
with users as ( | |
select usr_user_id | |
from `website.usr_users` | |
WHERE | |
TIMESTAMP_MILLIS(usr_signup_date) >= '2018-05-01' | |
AND TIMESTAMP_MILLIS(usr_signup_date) < '2018-06-01' | |
AND usr_phn_phone_number_id IS NOT NULL | |
), req as ( | |
select |
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
#standardsql | |
with voip_req as ( | |
SELECT | |
-- requestId, kv1. value as number, kv2. value as name | |
requestId | |
FROM | |
mi.fides_events_nrt, | |
fides_events_nrt.kvPairString kv, | |
fides_events_nrt.kvPairString kv1, | |
fides_events_nrt.kvPairString kv2 |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 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
name | |
.....*... | |
.....*....... | |
....*...... | |
....*aaa | |
...*... | |
..*.. | |
aa*aaa | |
aa*aaaa | |
aa*acs |
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 requests | |
URL = "" | |
headers = {'Authorization': ''} | |
def send_request(zip_code, search_query): | |
PARAMS = {'zip_code':zip_code, 'search_query': search_query} | |
r = requests.get(url = URL, params = PARAMS, headers = headers) | |
data = 0 | |
if r.status_code != 200: | |
print "status_code not 200", r |
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 Queue | |
class AbNode(object): | |
def __init__(self, d): | |
self.data = d | |
self.children = [] | |
def serial_bfs(node): | |
vals = [] | |
q = Queue.Queue() |
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 requests | |
import threading | |
url = "http://localhost:17943/v1/feeds/profile" | |
querystring = {"maxresults":"2","nextpagetoken":"1"} | |
headers = { | |
'cache-control': "no-cache", | |
'postman-token': "32412874-eb43-37c4-fbd6-939d99a3881a" |
OlderNewer