content
stringlengths 4
1.04M
| lang
stringclasses 358
values | score
int64 0
5
| repo_name
stringlengths 5
114
| repo_path
stringlengths 4
229
| repo_licenses
sequencelengths 1
8
|
---|---|---|---|---|---|
localparam [15:0] INIT_0 = {
INIT[ 60], INIT[ 56], INIT[ 52], INIT[ 48], INIT[ 44], INIT[ 40], INIT[ 36], INIT[ 32], INIT[ 28], INIT[ 24], INIT[ 20], INIT[ 16], INIT[ 12], INIT[ 8], INIT[ 4], INIT[ 0]
};
localparam [15:0] INIT_1 = {
INIT[ 61], INIT[ 57], INIT[ 53], INIT[ 49], INIT[ 45], INIT[ 41], INIT[ 37], INIT[ 33], INIT[ 29], INIT[ 25], INIT[ 21], INIT[ 17], INIT[ 13], INIT[ 9], INIT[ 5], INIT[ 1]
};
localparam [15:0] INIT_2 = {
INIT[ 62], INIT[ 58], INIT[ 54], INIT[ 50], INIT[ 46], INIT[ 42], INIT[ 38], INIT[ 34], INIT[ 30], INIT[ 26], INIT[ 22], INIT[ 18], INIT[ 14], INIT[ 10], INIT[ 6], INIT[ 2]
};
localparam [15:0] INIT_3 = {
INIT[ 63], INIT[ 59], INIT[ 55], INIT[ 51], INIT[ 47], INIT[ 43], INIT[ 39], INIT[ 35], INIT[ 31], INIT[ 27], INIT[ 23], INIT[ 19], INIT[ 15], INIT[ 11], INIT[ 7], INIT[ 3]
};
| SystemVerilog | 2 | gudeh/yosys | techlibs/gowin/brams_init3.vh | [
"ISC"
] |
/turf
icon = 'icons/turf.dmi'
icon_state = "turf"
/turf/blue
icon_state = "turf_blue"
/mob
icon = 'icons/mob.dmi'
icon_state = "mob"
New()
..()
loc = locate(5, 5, 1)
verb/tell_location()
usr << "You are at ([x], [y], [z])"
verb/say(message as text)
var/list/viewers = viewers()
for (var/mob/viewer in viewers)
viewer << "[ckey] says: \"[message]\""
verb/say_loud()
var/msg = input("Please put the message you want to say loudly.", "Say Loud", "Hello!")
world << "[ckey] says loudly: \"[msg]\""
verb/move_up()
step(src, UP)
verb/move_down()
step(src, DOWN)
verb/roll_dice(dice as text)
var/result = roll(dice)
usr << "The total shown on the dice is: [result]"
/mob/Stat()
statpanel("Status", "CPU: [world.cpu]")
/world/New()
..()
world.log << "World loaded!"
| DM | 3 | MarkSuckerberg/OpenDream | TestGame/code.dm | [
"MIT"
] |
coclass 'TestGMM'
coinsert 'TestBase'
create=: 3 : 0
a=: coname ''
)
testDiagSimple=: 3 : 0
R=: 0.5 + -: ? 100 4 $ 0 NB. random in ranfe [0.5,1]
D=: R * 100 4 $ , (=@i.) 4
gmm=: (D; 1; 'diag'; 1e_3; 1; 1e_4) conew 'GMM'
fit__gmm assertNoThrow 200
)
testFullSimple=: 3 : 0
R=: 0.5 + -: ? 100 4 $ 0 NB. random in ranfe [0.5,1]
D=: R * 100 4 $ , (=@i.) 4
gmm=: (D; 1; 'full'; 1e_3; 1; 1e_4) conew 'GMM'
fit__gmm assertNoThrow 200
)
testTiedSimple=: 3 : 0
R=: 0.5 + -: ? 100 4 $ 0 NB. random in ranfe [0.5,1]
D=: R * 100 4 $ , (=@i.) 4
gmm=: (D; 1; 'tied'; 1e_3; 1; 1e_4) conew 'GMM'
fit__gmm assertNoThrow 200
)
testSphericalSimple=: 3 : 0
R=: 0.5 + -: ? 100 4 $ 0 NB. random in ranfe [0.5,1]
D=: R * 100 4 $ , (=@i.) 4
gmm=: (D; 1; 'spherical'; 1e_3; 1; 1e_4) conew 'GMM'
fit__gmm assertNoThrow 200
)
run=: 3 : 0
testDiagSimple testWrapper 'Simple GMM test, diagonal covariance'
if. -.gmm -:'' do. destroy__gmm 0 end.
testFullSimple testWrapper 'Simple GMM test, full covariance'
if. -.gmm -:'' do. destroy__gmm 0 end.
testTiedSimple testWrapper 'Simple GMM test, tied covariance'
if. -.gmm -:'' do. destroy__gmm 0 end.
testSphericalSimple testWrapper 'Simple GMM test, spherical covariance'
if. -.gmm -:'' do. destroy__gmm 0 end.
''
)
destroy=: 3 : 0
codestroy ''
)
tg=: '' conew 'TestGMM'
run__tg 0 | J | 3 | jonghough/jlearn | test/testgmm.ijs | [
"MIT"
] |
definition module Builtin.ABC
from Cloogle.DB import :: ABCInstructionEntry
builtin_abc_instructions :: [ABCInstructionEntry]
| Clean | 2 | clean-cloogle/Cloogle | backend/Builtin/ABC.dcl | [
"MIT"
] |
bad = _123
| TOML | 0 | vanillajonathan/julia | stdlib/TOML/test/testfiles/invalid/integer-underscore-before.toml | [
"Zlib"
] |
[[container-images.whats-next]]
== What to Read Next
Once you've learned how to build efficient container images, you can read about <<deployment#deployment.cloud.kubernetes, deploying applications to a cloud platform>>, such as Kubernetes.
| AsciiDoc | 0 | techAi007/spring-boot | spring-boot-project/spring-boot-docs/src/docs/asciidoc/container-images/whats-next.adoc | [
"Apache-2.0"
] |
// Regression test for issue #64433.
//
// See issue-64391-2.rs for more details, as that was fixed by the
// same PR.
//
// check-pass
// edition:2018
#[derive(Debug)]
struct A<'a> {
inner: Vec<&'a str>,
}
struct B {}
impl B {
async fn something_with_a(&mut self, a: A<'_>) -> Result<(), String> {
println!("{:?}", a);
Ok(())
}
}
async fn can_error(some_string: &str) -> Result<(), String> {
let a = A { inner: vec![some_string, "foo"] };
let mut b = B {};
Ok(b.something_with_a(a).await.map(drop)?)
}
fn main() {
}
| Rust | 4 | Eric-Arellano/rust | src/test/ui/async-await/issues/issue-64433.rs | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
from typing import List, Tuple
from itertools import chain
import re
from ..errors import Errors
def get_alignments(A: List[str], B: List[str]) -> Tuple[List[List[int]], List[List[int]]]:
# Create character-to-token mappings
char_to_token_a = tuple(chain(*((i,) * len(x.lower()) for i, x in enumerate(A))))
char_to_token_b = tuple(chain(*((i,) * len(x.lower()) for i, x in enumerate(B))))
str_a = "".join(A).lower()
str_b = "".join(B).lower()
cdef int len_str_a = len(str_a)
cdef int len_str_b = len(str_b)
# Check that the two texts only differ in whitespace and capitalization
if re.sub(r"\s+", "", str_a) != re.sub(r"\s+", "", str_b) or \
len_str_a != len(char_to_token_a) or \
len_str_b != len(char_to_token_b):
raise ValueError(Errors.E949.format(x=str(A[:10]), y=str(B[:10])))
cdef int char_idx_a = 0
cdef int char_idx_b = 0
cdef int token_idx_a = 0
cdef int token_idx_b = 0
cdef int prev_token_idx_a = -1
cdef int prev_token_idx_b = -1
a2b = []
b2a = []
while char_idx_a < len_str_a and char_idx_b < len_str_b:
# Find the current token position from the character position
token_idx_a = char_to_token_a[char_idx_a]
token_idx_b = char_to_token_b[char_idx_b]
# Add a set for the next token if a token boundary has been crossed
if prev_token_idx_a != token_idx_a:
a2b.append(set())
if prev_token_idx_b != token_idx_b:
b2a.append(set())
# Process the alignment at the current position
if A[token_idx_a] == B[token_idx_b] and \
(char_idx_a == 0 or \
char_to_token_a[char_idx_a - 1] < token_idx_a) and \
(char_idx_b == 0 or \
char_to_token_b[char_idx_b - 1] < token_idx_b):
# Current tokens are identical and both character offsets are the
# start of a token (either at the beginning of the document or the
# previous character belongs to a different token)
a2b[-1].add(token_idx_b)
b2a[-1].add(token_idx_a)
char_idx_a += len(A[token_idx_a])
char_idx_b += len(B[token_idx_b])
elif str_a[char_idx_a] == str_b[char_idx_b]:
# Current chars are identical
a2b[-1].add(token_idx_b)
b2a[-1].add(token_idx_a)
char_idx_a += 1
char_idx_b += 1
elif str_a[char_idx_a].isspace():
# Skip unaligned whitespace char in A
char_idx_a += 1
elif str_b[char_idx_b].isspace():
# Skip unaligned whitespace char in B
char_idx_b += 1
else:
# This should never happen
raise ValueError(Errors.E949.format(x=str(A[:10]), y=str(B[:10])))
prev_token_idx_a = token_idx_a
prev_token_idx_b = token_idx_b
# Process unaligned trailing whitespace
a2b.extend([set()] * len(set(char_to_token_a[char_idx_a:])))
b2a.extend([set()] * len(set(char_to_token_b[char_idx_b:])))
# Return values as sorted lists per token position
return [sorted(x) for x in a2b], [sorted(x) for x in b2a]
| Cython | 5 | snosrap/spaCy | spacy/training/align.pyx | [
"MIT"
] |
# defining lists in prolog
<- first(?x, pair(?x, ?more))
<- rest(?more, pair(?x, ?more))
<- member(?x, pair(?x, ?more))
<- member(?x, pair(?y, ?more)) :- member(?x, ?more)
<- length(nil, 0)
<- length(pair(?x, nil), inc(0))
<- length(pair(?first, ?rest), inc(?n)) :- length(?rest, ?n)
| Prolog | 4 | skynetshrugged/paip-python | paip/examples/prolog/pair.prolog | [
"BSD-2-Clause"
] |
---
layout: post
title: Polymorphic Perplexion
date: 2020-04-12
comments: true
author: Ranjit Jhala
published: true
tags: basic
demo: Insert.hs
---
Polymorphism plays a vital role in automating verification in LH.
However, thanks to its ubiquity, we often take it for granted, and
it can be quite baffling to figure out why verification fails with
monomorphic signatures. Let me explain why, using a simple example
that has puzzled me and other users several times.
<!-- more -->
<div class="hidden">
\begin{code}
module PolymorphicPerplexion where
\end{code}
</div>
A Type for Ordered Lists
------------------------
[Previously](https://ucsd-progsys.github.io/liquidhaskell-blog/2013/07/29/putting-things-in-order.lhs/)
we have seen how you can use LH to define a type of lists whose values are in increasing
(ok, non-decreasing!) order.
First, we define an `IncList a` type, with `Emp` ("empty")
and `:<` ("cons") constructors.
\begin{code}
data IncList a = Emp
| (:<) { hd :: a, tl :: IncList a }
infixr 9 :<
\end{code}
Next, we refine the type to specify that each "cons" `:<`
constructor takes as input a `hd` and a `tl` which must
be an `IncList a` of values `v` each of which is greater
than `hd`.
\begin{code}
{-@ data IncList a = Emp
| (:<) { hd :: a, tl :: IncList {v:a | hd <= v}}
@-}
\end{code}
We can confirm that the above definition ensures that the only
*legal* values are increasingly ordered lists, as LH accepts
the first list below, but rejects the second where the elements
are out of order.
\begin{code}
legalList :: IncList Int
legalList = 0 :< 1 :< 2 :< 3 :< Emp
illegalList :: IncList Int
illegalList = 0 :< 1 :< 3 :< 2 :< Emp
\end{code}
A Polymorphic Insertion Sort
----------------------------
Next, lets write a simple *insertion-sort* function that
takes a plain unordered list of `[a]` and returns the elements
in increasing order:
\begin{code}
insertSortP :: (Ord a) => [a] -> IncList a
insertSortP xs = foldr insertP Emp xs
insertP :: (Ord a) => a -> IncList a -> IncList a
insertP y Emp = y :< Emp
insertP y (x :< xs)
| y <= x = y :< x :< xs
| otherwise = x :< insertP y xs
\end{code}
Happily, LH is able to verify the above code without any trouble!
(If that seemed too easy, don't worry: if you mess up the comparison,
e.g. change the guard to `x <= y` LH will complain about it.)
A Monomorphic Insertion Sort
----------------------------
However, lets take the *exact* same code as above *but* change
the type signatures to make the functions *monomorphic*, here,
specialized to `Int` lists.
\begin{code}
insertSortM :: [Int] -> IncList Int
insertSortM xs = foldr insertM Emp xs
insertM :: Int -> IncList Int -> IncList Int
insertM y Emp = y :< Emp
insertM y (x :< xs)
| y <= x = y :< x :< xs
| otherwise = x :< insertM y xs
\end{code}
Huh? Now LH appears to be unhappy with the code! How is this possible?
Lets look at the type error:
\begin{spec}
/Users/rjhala/PerplexingPolymorphicProperties.lhs:80:27-38: Error: Liquid Type Mismatch
80 | | otherwise = x :< insertM y xs
^^^^^^^^^^^^
Inferred type
VV : Int
not a subtype of Required type
VV : {VV : Int | x <= VV}
In Context
x : Int
\end{spec}
LH *expects* that since we're using the "cons" operator `:<` the "tail"
value `insertM y xs` must contain values `VV` that are greater than the
"head" `x`. The error says that, LH cannot prove this requirement of
*actual* list `insertM y xs`.
Hmm, well thats a puzzler. Two questions that should come to mind.
1. *Why* does the above fact hold in the first place?
2. *How* is LH able to deduce this fact with the *polymorphic* signature but not the monomorphic one?
Lets ponder the first question: why *is* every element
of `insert y xs` in fact larger than `x`? For three reasons:
(a) every element in `xs` is larger than `x`, as the
list `x :< xs` was ordered,
(b) `y` is larger than `x` as established by the `otherwise` and crucially
(c) the elements returned by `insert y xs` are either `y` or from `xs`!
Now onto the second question: how *does* LH verify the polymorphic code,
but not the monomorphic one? The reason is the fact (c)! LH is a *modular*
verifier, meaning that the *only* information that it has about the behavior
of `insert` at a call-site is the information captured in the (refinement)
*type specification* for `insert`. The *polymorphic* signature:
\begin{spec}
insertP :: (Ord a) => a -> IncList a -> IncList a
\end{spec}
via *parametricity*, implicitly states fact (c). That is, if at a call-site
`insertP y xs` we pass in a value that is greater an `x` and a list of values
greater than `x` then via *polymorphic instantiation* at the call-site, LH
infers that the returned value must also be a list of elements greater than `x`!
However, the *monomorphic* signature
\begin{spec}
insertM :: Int -> IncList Int -> IncList Int
\end{spec}
offers no such insight. It simply says the function takes in an `Int` and another
ordered list of `Int` and returns another ordered list, whose actual elements could
be arbitrary `Int`. Specifically, at the call-site `insertP y xs` LH has no way to
conclude the the returned elements are indeed greater than `x` and hence rejects
the monomorphic code.
Perplexity
----------
While parametricity is all very nice, and LH's polymorphic instanatiation is very
clever and useful, it can also be quite mysterious. For example, q curious user
Oisín [pointed out](https://github.com/ucsd-progsys/liquidhaskell-tutorial/issues/91)
that while the code below is *rejected* that if you *uncomment* the type signature
for `go` then it is *accepted* by LH!
\begin{code}
insertSortP' :: (Ord a) => [a] -> IncList a
insertSortP' = foldr go Emp
where
-- go :: (Ord a) => a -> IncList a -> IncList a
go y Emp = y :< Emp
go y (x :< xs)
| y <= x = y :< x :< xs
| otherwise = x :< go y xs
\end{code}
This is thoroughly perplexing, but again, is explained by the absence of
parametricity. When we *remove* the type signature, GHC defaults to giving
`go` a *monomorphic* signature where the `a` is not universally quantified,
and which roughly captures the same specification as the monomorphic `insertM`
above causing verification to fail!
Restoring the signature provides LH with the polymorphic specification,
which can be instantiated at the call-site to recover the fact `(c)`
that is crucial for verification.
Moral
-----
I hope that example illustrates two points.
First, *parametric polymorphism* lets type specifications
say a lot more than they immediately let on: so do write
polymorphic signatures whenever possible.
Second, on a less happy note, *explaining* why fancy type
checkers fail remains a vexing problem, whose difficulty
is compounded by increasing the cleverness of the type
system.
We'd love to hear any ideas you might have to solve the
explanation problem!
| Literate Haskell | 5 | curiousleo/liquidhaskell | docs/blog/2020-04-12-polymorphic-perplexion.lhs | [
"MIT",
"BSD-3-Clause"
] |
<!---
Name : GoogleCalendar.cfc
Author : Raymond Camden
Created : 04/20/2006
Last Updated : 11/11/2010
History : Fixed date logic, added ability to return future events only (rkc 9/26/06)
: Todd@CFSilence added logic to return reminder info. Date is in minutes (todd 9/27/06)
: Scott M. noted that convertDate needed to check for + as well as - (rkc 10/8/06)
: added getCalendars, updated addEvent (rkc 10/8/06)
: Update to check for multi-day events (rkc 1/4/07)
: Fixed an offset issue in start/end time (rkc 8/8/07)
: Major rewrite (rkc 8/6/08)
: Query updates for getEntries (rkc 8/20/08)
: See readme, tired of updating two places... ;)
TODO:
Add sets for tzoffset, calendarurl
--->
<cfcomponent displayName="Google Calendar" hint="Interacts with the Google Calendar API" extends="base" output="false">
<cfset variables.tzOffset = 0>
<cfset variables.username = "">
<!--- EVENT STATUS (Static) --->
<!--- http://code.google.com/apis/gdata/common-elements.html#gdEventStatus --->
<cfset variables.eventStatuses = structNew()>
<cfset variables.eventStatuses["cancelled"] = "http://schemas.google.com/g/2005##event.canceled">
<cfset variables.eventStatuses["confirmed"] = "http://schemas.google.com/g/2005##event.confirmed">
<cfset variables.eventStatuses["tentative"] = "http://schemas.google.com/g/2005##event.tentative">
<!--- TRANSPARENCY STATUS (Static) --->
<cfset variables.busyStatuses["busy"] = "http://schemas.google.com/g/2005##event.opaque">
<cfset variables.busyStatuses["free"] = "http://schemas.google.com/g/2005##event.transparent">
<cffunction name="init" access="public" returnType="GoogleCalendar" output="false">
<cfargument name="username" type="string" required="true" hint="Username">
<cfargument name="password" type="string" required="true" hint="Password">
<cfargument name="tzOffset" type="numeric" required="false" hint="Your offset from GMT.">
<!--- set up base defaults --->
<cfset super.init(arguments.tzoffset)>
<cfset getAuthCode(arguments.username,arguments.password,"camden-googlecal-1.0","cl")>
<cfset variables.username = arguments.username>
<cfreturn this>
</cffunction>
<cffunction name="addEvent" access="public" returnType="any" output="false" hint="Adds an event. Returns Success or another message.">
<cfargument name="title" type="string" required="true">
<cfargument name="description" type="string" required="true">
<cfargument name="start" type="date" required="true">
<cfargument name="end" type="date" required="true">
<cfargument name="where" type="string" required="false">
<cfargument name="authorname" type="string" required="false">
<cfargument name="authoremail" type="string" required="false">
<cfargument name="busy" type="boolean" required="false">
<cfargument name="eventstatus" type="string" required="false">
<cfargument name="calendarid" type="string" required="false">
<cfargument name="allday" type="boolean" required="false">
<cfargument name="resultType" type="string" required="false" hint="fileContent,fullResponse,successCode" default="successcode">
<cfargument name="recurrence" type="struct" required="false" hint="struct with all recurrence info you need these values in your struct... dow, dom, interval, frequency, until, byday">
<cfset var busyCode = "">
<cfset var eventCode = "">
<cfset var result = "">
<cfset var myxml = "">
<cfset var loc = "">
<cfset var curl = "http://www.google.com/calendar/feeds/default/private/full">
<cfset var recur = "">
<cfset var masterStart = start>
<cfset var masterEnd = "">
<cfif structKeyExists(arguments, "allDay") and allDay>
<cfset masterEnd = start>
<cfelse>
<cfset masterEnd = end>
</cfif>
<cfif structKeyExists(arguments, "calendarid")>
<!--- manipulate the curl --->
<cfset curl = replace(curl, "/default", "/#arguments.calendarid#")>
</cfif>
<!--- if all day event no need for times --->
<cfif structKeyExists(arguments, "allday") AND arguments.allday>
<cfset arguments.start = dateFormat(arguments.start, "yyyy-mm-dd")>
<cfset arguments.end = dateFormat(arguments.end, "yyyy-mm-dd")>
<cfelse>
<!--- add our offsets to our times --->
<cfset arguments.start = dateAdd("h", -1 * getTZOffset(), arguments.start)>
<cfset arguments.end = dateAdd("h", -1 * getTZOffset(), arguments.end)>
<!--- Nice logic by Roger Benningfield --->
<cfset arguments.start = dateFormat(arguments.start, "yyyy-mm-dd") & "T" & timeFormat(arguments.start, "HH:mm:ss") & "Z">
<cfset arguments.end = dateFormat(dateadd('d',1,arguments.end), "yyyy-mm-dd") & "T" & timeFormat(arguments.end, "HH:mm:ss") & "Z">
</cfif>
<!--- convert busy/eventstatus --->
<cfif structKeyExists(arguments, "busy")>
<cfif arguments.busy>
<cfset busyCode = getBusyStatusCode("busy")>
<cfelse>
<cfset busyCode = getBusyStatusCode("free")>
</cfif>
</cfif>
<cftry>
<cfsavecontent variable="myxml">
<cfoutput>
<entry xmlns='http://www.w3.org/2005/Atom' xmlns:gd='http://schemas.google.com/g/2005'>
<category scheme='http://schemas.google.com/g/2005##kind' term='http://schemas.google.com/g/2005##event'></category>
<title type='text'>#arguments.title#</title>
<content type='html'>#xmlFormat(arguments.description)#</content>
<cfif structKeyExists(arguments, "authorname") and structKeyExists(arguments, "authoremail")>
<author>
<name>#arguments.authorName#</name>
<email>#arguments.authorEmail#</email>
</author>
</cfif>
<cfif busyCode is not "">
<gd:transparency value='http://schemas.google.com/g/2005##event.opaque'> </gd:transparency>
</cfif>
<cfif eventCode is not "">
<gd:eventStatus value='http://schemas.google.com/g/2005##event.confirmed'> </gd:eventStatus>
</cfif>
<!--- if the structure is defined then its recurrence time!--->
<cfif isDefined('recurrence')>
<cfset recur = createRecurrenceString(recurrence,allday,masterStart,masterEnd)>
<gd:recurrence xmlns:gd="http://schemas.google.com/g/2005"> #recur# </gd:recurrence>
<cfelse>
<!--- no recurrence so set the start and end date/times--->
<cfif structKeyExists(arguments, "where")>
<gd:where valueString='#arguments.where#'></gd:where>
</cfif>
<gd:when startTime='#arguments.start#' endTime='#arguments.end#'></gd:when>
</cfif>
</entry>
</cfoutput>
</cfsavecontent>
<cfcatch>
<cfrethrow>
</cfcatch>
</cftry>
<cfhttp url="#curl#" method="post" result="result" redirect="false">
<cfhttpparam type="header" name="Content-Type" value="application/atom+xml">
<cfhttpparam type="header" name="Authorization" value="GoogleLogin auth=#variables.authcode#">
<cfhttpparam type="body" value="#myxml#">
</cfhttp>
<cfif result.responseheader.status_code is "302">
<cfset loc = result.responseheader.location>
<cfhttp url="#loc#" method="post" result="result" redirect="false">
<cfhttpparam type="header" name="Content-Type" value="application/atom+xml">
<cfhttpparam type="header" name="Authorization" value="GoogleLogin auth=#variables.authcode#">
<cfhttpparam type="body" value="#myxml#">
</cfhttp>
</cfif>
<cfif result.responseheader.status_code is "201">
<cfif arguments.resultType eq 'fileContent'>
<cfreturn result.fileContent>
<cfelseIf arguments.resultType eq 'fullResponse'>
<cfreturn result>
<cfelse>
<cfreturn "Success">
</cfif>
<cfelse>
<cfreturn "Error: #result.statuscode# #result.filecontent#">
</cfif>
</cffunction>
<!--- add calendar --->
<cffunction name="addCalendar" access="public" returnType="string" output="false" hint="Adds a calendar. Returns Success or another message.">
<cfargument name="title" type="string" required="true">
<cfargument name="description" type="string" required="true">
<cfargument name="color" type="string" required="true" hint="the hex code for a color">
<cfset var busyCode = "">
<cfset var eventCode = "">
<cfset var result = "">
<cfset var myxml = "">
<cfset var loc = "">
<cfset var curl = "http://www.google.com/calendar/feeds/default/owncalendars/full">
<cfif structKeyExists(arguments, "calendarid")>
<!---manipulate the curl --->
<cfset curl = replace(curl, "/default", "/#arguments.calendarid#")>
</cfif>
<cfsavecontent variable="myxml">
<cfoutput>
<entry xmlns='http://www.w3.org/2005/Atom'
xmlns:gd='http://schemas.google.com/g/2005'
xmlns:gCal='http://schemas.google.com/gCal/2005'>
<title type='text'>#arguments.title#</title>
<summary type='text'>#xmlFormat(arguments.description)#</summary>
<gCal:timezone value='Central'></gCal:timezone>
<gCal:hidden value='false'></gCal:hidden>
<gCal:color value='#color#'></gCal:color>
<gd:where rel='' label='' valueString=''></gd:where>
</entry>
</cfoutput>
</cfsavecontent>
<cfhttp url="#curl#" method="post" result="result" redirect="false">
<cfhttpparam type="header" name="Content-Type" value="application/atom+xml">
<cfhttpparam type="header" name="Authorization" value="GoogleLogin auth=#variables.authcode#">
<cfhttpparam type="body" value="#myxml#">
</cfhttp>
<cfif result.responseheader.status_code is "302">
<cfset loc = result.responseheader.location>
<cfhttp url="#loc#" method="post" result="result" redirect="false">
<cfhttpparam type="header" name="Content-Type" value="application/atom+xml">
<cfhttpparam type="header" name="Authorization" value="GoogleLogin auth=#variables.authcode#">
<cfhttpparam type="body" value="#myxml#">
</cfhttp>
</cfif>
<cfif result.responseheader.status_code is "201">
<cfreturn "Success">
<cfelse>
<cfreturn "Error: #result.statuscode# #result.filecontent#">
</cfif>
</cffunction>
<cffunction name="deleteEvent" access="public" returnType="string" hint="Deletes an event." output="false">
<cfargument name="id" type="string" required="true" hint="ID value of entry.">
<cfset var result = "">
<cfhttp url="#urlDecode(arguments.id)#" method="DELETE" result="result" redirect="true">
<cfhttpparam type="header" name="Authorization" value="GoogleLogin auth=#variables.authCode#">
<cfhttpparam type="header" name="If-Match" value="*">
</cfhttp>
<cfif structKeyExists(result.responseheader,"location")>
<cfhttp url="#result.responseheader.location#" method="DELETE" result="result" redirect="true">
<cfhttpparam type="header" name="Authorization" value="GoogleLogin auth=#variables.authCode#">
<cfhttpparam type="header" name="If-Match" value="*">
</cfhttp>
</cfif>
<cfif result.responseheader.status_code is "201">
<cfreturn "Success">
<cfelse>
<cfreturn "Error: #result.statuscode#">
</cfif>
</cffunction>
<cffunction name="getBusyStatuses" access="private" returnType="struct" output="false" hint="Returns structure of Busy Statuses">
<cfreturn variables.busyStatuses>
</cffunction>
<cffunction name="getBusyStatusCode" access="private" returnType="string" output="false" hint="Translates a string to gd:transparency.">
<cfargument name="string" type="string" required="true">
<cfset var es = getBusyStatuses()>
<cfif structKeyExists(es, arguments.string)>
<cfreturn es[arguments.string]>
</cfif>
<cfthrow message="Invalid string passed to getBusyStatusCode: #arguments.string#">
</cffunction>
<cffunction name="getBusyStatusString" access="private" returnType="string" output="false" hint="Translates a gd:transparency to a string.">
<cfargument name="code" type="string" required="true">
<cfset var es = getBusyStatuses()>
<cfset var key = "">
<cfloop item="key" collection="#es#">
<cfif es[key] is arguments.code>
<cfreturn key>
</cfif>
</cfloop>
<cfthrow message="Invalid code passed to getBusyStatusString: #arguments.code#">
</cffunction>
<cffunction name="getCalendars" access="public" returnType="query" output="false" hint="Returns all the calendars for the user.">
<cfset var getcalurl = "http://www.google.com/calendar/feeds/default">
<cfset var result = "">
<cfset var cals = queryNew("accesslevel,color,hidden,id,published,summary,timezone,title,updated,where")>
<cfset var calListXML = "">
<cfset var x = "">
<cfset var numCals = "">
<cfset var entry = "">
<cfset var cal = "">
<cfset var lpos = "">
<cfset var key = "">
<cfhttp url="#getcalurl#" method="get" result="result">
<cfhttpparam type="header" name="Authorization" value="GoogleLogin auth=#variables.authcode#">
</cfhttp>
<cfif result.responseheader.status_code is "200">
<cfset calListXML = xmlParse(result.filecontent)>
<cfset numCals = arrayLen(calListXML.feed.entry)>
<cfloop index="x" from="1" to="#numCals#">
<cfset entry = calListXML.feed.entry[x]>
<cfset cal = structNew()>
<cfset cal.id = listLast(entry.id.xmlText,"/")>
<cfset cal.published = convertDate(entry.published.xmltext, variables.tzoffset)>
<cfset cal.updated = convertDate(entry.updated.xmltext, variables.tzoffset)>
<cfset cal.title = entry.title.xmltext>
<cfif structKeyExists(entry, "summary")>
<cfset cal.summary = entry.summary.xmltext>
<cfelse>
<cfset cal.summary = "">
</cfif>
<cfset cal.timezone = entry["gCal:timezone"].xmlAttributes.value>
<cfset cal.hidden = entry["gCal:hidden"].xmlAttributes.value>
<cfset cal.color = entry["gCal:color"].xmlAttributes.value>
<cfset cal.accesslevel = entry["gCal:accesslevel"].xmlAttributes.value>
<cfif structKeyExists(entry, "gCal:where")>
<cfset cal.where = entry["gCal:where"].xmlAttributes.valueString>
<cfelse>
<cfset cal.where = "">
</cfif>
<cfset queryAddRow(cals)>
<cfloop item="key" collection="#cal#">
<cfset querySetCell(cals, key, cal[key])>
</cfloop>
</cfloop>
</cfif>
<cfreturn cals>
</cffunction>
<cffunction name="getEvents" access="public" returnType="any" output="false" hint="Gets events.">
<cfargument name="calid" type="string" required="true" hint="Calendar ID">
<cfargument name="returnType" required="false" hint="specify which type of result set is returned (options: query, xmlarray)">
<cfargument name="maxevents" type="numeric" required="false" hint="Max number of events. Google will default to 25">
<cfargument name="futureevents" type="boolean" required="false" hint="Show only future events">
<cfargument name="orderby" type="string" required="false" hint="Can be lastmodified (default) or starttime">
<cfargument name="sortdir" type="string" required="false" hint="ascending or descending">
<cfargument name="startMin" type="date" required="false" hint="Earliest date to return.">
<cfargument name="startMax" type="date" required="false" hint="Latest date to return.">
<cfargument name="singleEvents" type="string" required="false" hint="Expand Recurring events.">
<cfargument name="q" type="string" required="false" hint="Simple keyword for search.">
<cfset var result = "">
<cfset var baseurl = "http://www.google.com/calendar/feeds">
<cfset var entries = "">
<cfset var s = "">
<cfset var x = "">
<cfset var col = "">
<cfset var key = "">
<cfset var y = "">
<cfset var events = queryNew("author,authoremail,busystatus,date,endtime,eventstatus,recurrence,reminder,starttime,where,category,content,id,published,title,updated,editlink,who")>
<cfset var entry = "">
<cfset var theOffset = "">
<cfset var curl = "#baseurl#/#arguments.calid#/private/full?">
<cfset var recData = "">
<cfset arguments.calid = trim(arguments.calid)>
<cfif structKeyExists(arguments, "maxevents")>
<cfset curl = curl & "&max-results=#arguments.maxevents#">
</cfif>
<cfif structKeyExists(arguments, "futureevents")>
<cfset curl = curl & "&futureevents=#arguments.futureevents#">
</cfif>
<cfif structKeyExists(arguments, "orderby")>
<cfset curl = curl & "&orderby=#arguments.orderby#">
</cfif>
<cfif structKeyExists(arguments, "sortdir")>
<cfset curl = curl & "&sortorder=#arguments.sortdir#">
</cfif>
<cfif structKeyExists(arguments, "startMin")>
<cfset curl = curl & "&start-min=#DateFormat(arguments.startMin, "yyyy-mm-dd")#T00:00:00">
</cfif>
<cfif structKeyExists(arguments, "startMax")>
<cfset curl = curl & "&start-max=#DateFormat(arguments.startMax, "yyyy-mm-dd")#T23:59:59">
</cfif>
<cfif structKeyExists(arguments, "q")>
<cfset curl = curl & "&q=#urlEncodedFormat(arguments.q)#">
</cfif>
<cfif structKeyExists(arguments, "singleevents")>
<cfset curl = curl & "&singleevents=#arguments.singleEvents#">
</cfif>
<cfhttp url="#curl#" result="result">
<cfhttpparam type="header" name="Authorization" value="GoogleLogin auth=#variables.authcode#">
</cfhttp>
<cfset entries = xmlSearch(result.fileContent,"//*[local-name() = 'entry']")>
<cfloop index="x" from="1" to="#arrayLen(entries)#">
<cfset entry = entries[x]>
<cfset s = structNew()>
<cfloop index="col" list="id,published,updated,title,content,category">
<cfset s[col] = entry[col].xmlText>
</cfloop>
<cfset s.author = "">
<cfif structKeyExists(entry, "author") and structKeyExists(entry.author, "name")>
<cfset s.author = entry.author.name.xmlText>
</cfif>
<cfset s.authoremail = "">
<cfif structKeyExists(entry, "author") and structKeyExists(entry.author, "email")>
<cfset s.authoremail = entry.author.email.xmlText>
</cfif>
<cfset s.where = "">
<cfif structKeyExists(entry, "gd:where") and structKeyExists(entry["gd:where"].xmlAttributes,"valueString")>
<cfset s.where = entry["gd:where"].xmlAttributes.valueString>
</cfif>
<cfset s.busystatus = "">
<cfif structKeyExists(entry, "gd:transparency") and structKeyExists(entry["gd:transparency"].xmlAttributes,"value")>
<cfset s.busystatus = getBusyStatusString(entry["gd:transparency"].xmlAttributes.value)>
</cfif>
<cfset s.eventstatus = "">
<cfif structKeyExists(entry, "gd:eventstatus") and structKeyExists(entry["gd:eventstatus"].xmlAttributes,"value")>
<cfset s.eventstatus = getEventStatusString(entry["gd:eventstatus"].xmlAttributes.value)>
</cfif>
<cfif structKeyExists(entry, "gd:recurrence")>
<cfset s.recurrence = parseRecurrence(entry["gd:recurrence"].xmlText)>
<cfelse>
<cfset s.recurrence = "Onetime">
</cfif>
<cfset s.starttime = "">
<cfset s.endtime = "">
<cfif structKeyExists(entry, "gd:when") and structKeyExists(entry["gd:when"].xmlAttributes,"starttime")>
<cfset s.starttime = entry["gd:when"].xmlAttributes.starttime>
</cfif>
<cfif structKeyExists(entry, "gd:when") and structKeyExists(entry["gd:when"].xmlAttributes,"endtime")>
<cfset s.endtime = entry["gd:when"].xmlAttributes.endtime>
</cfif>
<!--- This logic written by Todd ([email protected]) --->
<cfset s.reminder = "">
<cfif structKeyExists(entry, "gd:when") and structKeyExists(entry["gd:when"], "gd:reminder") and structKeyExists(entry["gd:when"]["gd:reminder"].xmlAttributes,"minutes")>
<cfset s.reminder = entry["gd:when"]["gd:reminder"].xmlAttributes.minutes>
</cfif>
<cfif structKeyExists(entry, "gd:who")>
<cfset s.who = "">
<cfloop index="y" from="1" to="#arrayLen(entry['gd:who'])#">
<cfif NOT findNoCase("group.calendar.google.com",entry["gd:who"][y].xmlAttributes.email)>
<cfset s.who = listAppend(s.who,entry["gd:who"][y].xmlAttributes.email)>
</cfif>
</cfloop>
</cfif>
<!---
Funny logic. So it seems as if Google does NOT offset for 'full day' events.
So a timed event is correct off, but a non timed event is not.
--->
<cfif s.starttime is "" or not findNoCase("t", s.starttime)>
<cfif s.recurrence neq "Onetime">
<cfset recData = parseRecurrenceDate(entry["gd:recurrence"].xmlText)>
<cfif structKeyExists(recData, "startdate")>
<cfset s.date = recData.startdate>
</cfif>
<cfif structKeyExists(recData, "starttime")>
<cfset s.starttime = recData.starttime>
</cfif>
<cfif structKeyExists(recData, "endtime")>
<cfset s.endtime = recData.endtime>
</cfif>
<cfelse>
<cfset s.date = "">
</cfif>
<cfelse>
<cfset s.date = convertDate(s.starttime, getTZOffset())>
<!---
offset for startime needs to modded. It has an offset in it.
So it may be -7.
If your offset is -5, then the real offset is +2, or yourOffet-theoffset
--->
<cfset theOffset = listLast(s.starttime, "-+")>
<cfset theOffset = val(listFirst(theOffset,":"))>
<cfif not find("+", s.starttime)>
<cfset theOffset = -1*theOffset>
</cfif>
<cfset s.starttime = convertDate(s.starttime, getTZOffset() )>
<!--- is it possible endtime doesn't exist? mabe --->
<cfif s.endtime is not "">
<cfset theOffset = listLast(s.endtime, "-+")>
<cfset theOffset = val(listFirst(theOffset,":"))>
<cfif not find("+", s.endtime)>
<cfset theOffset = -1*theOffset>
</cfif>
<cfset s.endtime = convertDate(s.endtime, getTZOffset())>
</cfif>
</cfif>
<cfloop index="y" from="1" to="#arrayLen(entry.link)#">
<cfif entry.link[y].xmlAttributes.rel is "edit">
<cfset s.editlink = entry.link[y].xmlAttributes.href>
</cfif>
</cfloop>
<cfset queryAddRow(events)>
<cfloop item="key" collection="#s#">
<cfset querySetCell(events, key, s[key])>
</cfloop>
</cfloop>
<cfif isDefined('arguments.returnType')>
<cfif arguments.returnType eq 'xmlarray'>
<cfreturn entries>
<cfelseif arguments.returnType eq 'query'>
<cfreturn events>
<cfelse>
<cfreturn events>
</cfif>
<cfelse>
<cfreturn events>
</cfif>
</cffunction>
<cffunction name="getEventStatuses" access="private" returnType="struct" output="false" hint="Returns structure of Event Statuses">
<cfreturn variables.eventStatuses>
</cffunction>
<cffunction name="getEventStatusCode" access="private" returnType="string" output="false" hint="Translates a string to gd:eventstatus.">
<cfargument name="string" type="string" required="true">
<cfset var es = getEventStatuses()>
<cfif structKeyExists(es, arguments.string)>
<cfreturn es[arguments.string]>
</cfif>
<cfthrow message="Invalid string passed to getEventStatusCode: #arguments.string#">
</cffunction>
<cffunction name="getEventStatusString" access="private" returnType="string" output="false" hint="Translates a gd:eventStatus to a string.">
<cfargument name="code" type="string" required="true">
<cfset var es = getEventStatuses()>
<cfset var key = "">
<cfloop item="key" collection="#es#">
<cfif es[key] is arguments.code>
<cfreturn key>
</cfif>
</cfloop>
<cfthrow message="Invalid code passed to getEventStatusString: #arguments.code#">
</cffunction>
<cffunction name="getTZOffset" access="public" returnType="numeric" output="false" hint="Returns tzoffset value.">
<cfreturn variables.tzOffset>
</cffunction>
<cffunction name="parseRecurrence" access="private" returnType="string" output="false" hint="Translate the funky recurrence data into a nice string.">
<cfargument name="recurrence" type="string" required="true">
<cfset var result = "">
<cfset var freq = "">
<!--- get freq --->
<cfset freq = reFindNoCase("FREQ=[a-z]*", arguments.recurrence,1,true)>
<!--- Right now my logic is to just use the freq string. Not 100% right. --->
<cfif freq.pos[1] neq 0>
<cfset freq = mid(arguments.recurrence, freq.pos[1], freq.len[1])>
<cfset freq = replaceNoCase(freq, "FREQ=", "")>
<cfset result = freq>
</cfif>
<cfreturn result>
</cffunction>
<!--- REALLY unsure about some of the changes here... --->
<cffunction name="parseRecurrenceDate" access="private" returnType="struct" output="false" hint="Translate the funky recurrence data into a nice string.">
<cfargument name="recurrence" type="string" required="true">
<cfset var result = structNew()>
<cfset var resultstr = "">
<cfset var datestring = "" abs ABS Abs()>
<cfset var year = "">
<cfset var month = "">
<cfset var day = "">
<cfset var hour = "">
<cfset var minute = "">
<cfset var second = "">
<!--- get freq --->
<cfset datestring = reFindNoCase("DTSTART;(VALUE=DATE|TZID=[a-z/]+):([0-9]+)(T([0-9]+)){0,1}", arguments.recurrence,1,true)>
<cfif datestring.pos[1] neq 0 and arrayLen(datestring.pos) gte 3>
<cfset resultstr = mid(arguments.recurrence, datestring.pos[3], datestring.len[3])>
<!--- This should be YYYYMMDD --->
<cfif len(resultstr) is 8>
<cfset year = left(resultstr, 4)>
<cfset month = mid(resultstr, 5, 2)>
<cfset day = right(resultstr, 2)>
<cfset result.startdate = createDate(year,month,day)>
</cfif>
</cfif>
<cfif arrayLen(datestring.pos) gte 4 and datestring.pos[4] neq 0>
<cfset resultstr = mid(arguments.recurrence, datestring.pos[4], datestring.len[4])>
<!--- This should be HHMMSS --->
<cfif len(resultstr) is 7>
<!--- strip the T --->
<cfset resultstr = replace(resultstr, "T", "")>
<cfset hour = left(resultstr, 2)>
<cfset minute = mid(resultstr, 3, 2)>
<cfset second = right(resultstr, 2)>
<cfset result.starttime = createDateTime(year,month,day,hour,minute,second)>
<!--- go ahead and set start to the same... --->
<cfset result.startdate = result.starttime>
</cfif>
</cfif>
<cfset datestring = reFindNoCase("DTEND;(VALUE=DATE|TZID=[a-z/]+):([0-9]+)(T([0-9]+)){0,1}", arguments.recurrence,1,true)>
<cfif datestring.pos[1] neq 0 and arrayLen(datestring.pos) gte 3>
<cfset resultstr = mid(arguments.recurrence, datestring.pos[3], datestring.len[3])>
<!--- This should be YYYYMMDD --->
<cfif len(resultstr) is 8>
<cfset year = left(resultstr, 4)>
<cfset month = mid(resultstr, 5, 2)>
<cfset day = right(resultstr, 2)>
<cfset result.enddate = createDate(year,month,day)>
</cfif>
</cfif>
<cfif arrayLen(datestring.pos) gte 4 and datestring.pos[4] neq 0>
<cfset resultstr = mid(arguments.recurrence, datestring.pos[4], datestring.len[4])>
<!--- This should be HHMMSS --->
<cfif len(resultstr) is 7>
<cfset resultstr = replace(resultstr, "T", "")>
<cfset hour = left(resultstr, 2)>
<cfset minute = mid(resultstr, 3, 2)>
<cfset second = right(resultstr, 2)>
<cfset result.endtime = createDateTime(year,month,day,hour,minute,second)>
</cfif>
</cfif>
<cfreturn result>
</cffunction>
<cffunction name="updateEvent" access="remote" returntype="any" output="false" hint="updates an event">
<cfargument name="calID" required="true">
<cfargument name="eventID" required="true">
<cfargument name="title" type="string" required="false">
<cfargument name="description" type="string" required="false">
<cfargument name="start" type="date" required="false">
<cfargument name="end" type="date" required="false">
<cfargument name="where" type="string" required="false">
<cfargument name="authorname" type="string" required="false">
<cfargument name="authoremail" type="string" required="false">
<cfargument name="busy" type="boolean" required="false">
<cfargument name="eventstatus" type="string" required="false">
<cfargument name="allday" type="boolean" required="false">
<cfargument name="recurrence" type="struct" required="false" >
<cfargument name="resultType" type="string" hint='fullResponse'>
<cfargument name="editLink" type="string" hint="custom edit link used for deleting a single occurance in an event series" default="">
<cfset var events = "">
<cfset var repStr = "">
<cfset var x2 = "">
<cfset var x3 = "">
<cfset var recur = "">
<cfset var editURL = "">
<cfset var xml = "">
<cfset var eventInfo = "">
<cfset var y = "">
<cfset var masterEnd = "">
<cfset var x = "">
<cfset var updateResult = "">
<!---get the events and loop through them to get the events info--->
<cfinvoke method="getEvents" returnvariable="events">
<cfinvokeargument name="calID" value="#arguments.calID#">
<cfinvokeargument name="returnType" value="xmlarray">
<cfinvokeargument name="maxevents" value="100000">
</cfinvoke>
<cfif allday>
<cfset masterEnd = start>
<cfelse>
<cfset masterEnd = end>
</cfif>
<cfloop index="x" from="1" to="#arrayLen(events)#">
<cfif compare(urldecode(events[x].id.xmltext), urldecode(eventID)) eq 0><!--- if the event id's are the same --->
<cfset events[x].title.xmlText = arguments.title>
<cfset events[x].content.xmlText = arguments.description>
<cfif structKeyExists(events[x], "author") and structKeyExists(events[x].author, "name")>
<cfset events[x].author.name.xmlText = arguments.authorName>
</cfif>
<cfif structKeyExists(events[x], "author") and structKeyExists(events[x].author, "email")>
<cfset events[x].author.email.xmlText = arguments.authoremail>
</cfif>
<cfif structKeyExists(events[x], "gd:where") and structKeyExists(events[x]["gd:where"].xmlAttributes,"valueString")>
<cfset events[x]["gd:where"].xmlAttributes.valueString = arguments.where>
</cfif>
<!--- handle event date and time --->
<cfif not isdefined('recurrence')><!--- if the recurrence structure is not passed to the functions--->
<!--- get rid of recurrence stucture if it is there--->
<cfscript>
structDelete(events[x],'gd:recurrence');
</cfscript>
<cfif allDay>
<!--- needed if going from a recurring structure to a single instance and event is all day--->
<cfif not structKeyExists(events[x], "gd:when")>
<cfset repStr = '<gd:when xmlns:gd="http://schemas.google.com/g/2005" endTime="#DateFormat(arguments.end,"yyyy-mm-dd")#" startTime="#DateFormat(arguments.start,"yyyy-mm-dd")#"><gd:reminder method="email" minutes="10"/><gd:reminder method="alert" minutes="10"/></gd:when></entry>'>
<cfset x2 = rereplace(events[x],"</entry>",repStr,"one")>
<cfelse>
<cfif structKeyExists(events[x], "gd:when") and structKeyExists(events[x]["gd:when"].xmlAttributes,"starttime") and isDefined('arguments.start')>
<cfset events[x]["gd:when"].xmlAttributes.starttime = DateFormat(arguments.start,'yyyy-mm-dd')>
</cfif>
<cfif structKeyExists(events[x], "gd:when") and structKeyExists(events[x]["gd:when"].xmlAttributes,"endtime") and isDefined('arguments.end')>
<cfset events[x]["gd:when"].xmlAttributes.endtime = DateFormat(DateAdd('d',1,arguments.end),'yyyy-mm-dd')><!---DateAdd('d',1,arguments.end),'yyyy-mm-dd')>--->
</cfif>
</cfif>
<cfelse>
<!--- needed if going from a recurring structure to a single instance and event is not all day--->
<cfif not structKeyExists(events[x], "gd:when")>
<cfset repStr = '<gd:when xmlns:gd="http://schemas.google.com/g/2005" endTime="#DateFormat(arguments.end,"yyyy-mm-dd")#T#TimeFormat(arguments.end,"HH:mm:ss")#" startTime="#DateFormat(arguments.start,"yyyy-mm-dd")#T#TimeFormat(arguments.start,"HH:mm:ss")#"></gd:when></entry>'>
<cfset x2 = rereplace(events[x],"</entry>",repStr,"one")>
<cfelse>
<cfif structKeyExists(events[x], "gd:when") and structKeyExists(events[x]["gd:when"].xmlAttributes,"starttime") and isDefined('arguments.start')>
<cfset events[x]["gd:when"].xmlAttributes.starttime = DateFormat(arguments.start,'yyyy-mm-dd') & 'T' & TimeFormat(arguments.start,'HH:mm:ss')>
</cfif>
<cfif structKeyExists(events[x], "gd:when") and structKeyExists(events[x]["gd:when"].xmlAttributes,"endtime") and isDefined('arguments.end')>
<cfset events[x]["gd:when"].xmlAttributes.endtime = DateFormat(arguments.end,'yyyy-mm-dd') & 'T' & TimeFormat(arguments.end,'HH:mm:ss')>
</cfif>
</cfif>
</cfif>
<!--- make x an xml object again --->
<cfif isXML('x2')>
<cfset x3 = XMLParse(x2)>
<cfelse>
<cfset x3 = events[x]>
</cfif>
</cfif>
<!--- deal with recurrence--->
<cfif isDefined('recurrence')>
<cfset recur = createRecurrenceString(recurrence,allday,start,masterEnd)>
<cfif not StructKeyExists(events[x], "gd:recurrence")>
<!--- awful things done here to get the recurrence to work--->
<cfset repStr = '<gd:recurrence xmlns:gd="http://schemas.google.com/g/2005">#recur#</gd:recurrence></entry>'>
<cfset x2 = rereplace(events[x],"</entry>",repStr,"one")>
<cfset x3 = XMLParse(x2)>
<cfelse>
<cfset events[x]["gd:recurrence"].xmlText = #recur#>
<cfset x3 = events[x]>
</cfif>
<cfelse>
</cfif>
<!--- get edit url to update event with --->
<cfloop index="y" from="1" to="#arrayLen(events[x].link)#">
<cfif events[x].link[y].xmlAttributes.rel is "edit">
<cfset editURL = events[x].link[y].xmlAttributes.href>
</cfif>
</cfloop>
<cfif editLink neq ''>
<cfset editURL = editLink>
</cfif>
<cfset xml = x3>
<cfinvoke method="sendUpdateEventRequest" returnvariable="updateResult">
<cfinvokeargument name="editURL" value="#editURL#">
<cfinvokeargument name="xml" value="#xml#">
</cfinvoke>
<cfset eventInfo = structNew()>
<cfif resultType eq 'fullResponse'>
<cfreturn updateResult>
<!---<cfelse>
<cfreturn "Error: #result.statuscode# #result.filecontent#">--->
</cfif>
</cfif>
</cfloop>
<cfreturn 'Could not find event to update'>
</cffunction>
<cffunction name="createRecurrenceString" access="remote" returntype="any" hint="creates a recurrence string for adding or updating an event" output="false">
<cfargument name="recurrence" required="true">
<cfargument name="allday" required="true">
<cfargument name="start" required="true">
<cfargument name="end" required="true">
<cfset var recur = "">
<cfif allday>
<cfset recur = "DTSTART;VALUE=DATE:#DateFormat(arguments.start,'yyyymmdd')#
DTEND;VALUE=DATE:#DateFormat(arguments.end,'yyyymmdd')#
">
<cfelse>
<cfset recur = "DTSTART;TZID=America/Chicago:#DateFormat(arguments.start,'yyyymmdd')#T#TimeFormat(arguments.start,'HHmmss')#
DTEND;TZID=America/Chicago:#DateFormat(arguments.end,'yyyymmdd')#T#TimeFormat(arguments.end,'HHmmss')#
">
</cfif>
<cfset recur = recur & "RRULE:FREQ=#recurrence.frequency#;WKST=SU;">
<cfif not allDay>
<!--- You will noticed that there are four hours added on to the following line. this is done because it is what google does to get the recurrence to run correctly. Dont ask... --->
<cfset recur = recur & "UNTIL=#DateFormat(recurrence.until,'yyyymmdd')#T#TimeFormat(dateadd('h',4,recurrence.until),'HHmmss')#Z;">
<cfelse>
<cfset recur = recur & "UNTIL=#DateFormat(recurrence.until,'yyyymmdd')#;">
</cfif>
<cfset recur = recur & "INTERVAL=#recurrence.interval#;">
<cfif recurrence.monthday>
<cfset recur = recur & "BYMONTHDAY=#recurrence.DOM#
">
<cfelse>
<cfset recur = recur & "BYDAY=#recurrence.byday#
">
</cfif>
<cfset recur = recur & "BEGIN:VTIMEZONE
TZID:America/Chicago
X-LIC-LOCATION:America/Chicago
BEGIN:DAYLIGHT
TZOFFSETFROM:-0600
TZOFFSETTO:-0500
TZNAME:CDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0500
TZOFFSETTO:-0600
TZNAME:CST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
">
<cfreturn recur>
</cffunction>
<cffunction name="removeAllEvents" access="remote" output="yes">
<cfargument name="calID" required="true">
<cfset var events = "">
<cfset var test = "">
<cfset var editURL = "">
<cfset var x = "">
<cfset var y = "">
<cfinvoke method="getEvents" returnvariable="events">
<cfinvokeargument name="calID" value="#arguments.calID#">
<cfinvokeargument name="returnType" value="xmlarray">
<cfinvokeargument name="singleEvents" value="false">
<cfinvokeargument name="maxevents" value="10000">
</cfinvoke>
<cfloop index="x" from="1" to="#arrayLen(events)#">
<cftry>
<cfloop index="y" from="1" to="#arrayLen(events[x].link)#">
<cfif events[x].link[y].xmlAttributes.rel is "edit">
<cfset editURL = events[x].link[y].xmlAttributes.href>
</cfif>
</cfloop>
<cfif structKeyExists(events[x], "gd:eventStatus")>
<cfset events[x]["gd:eventStatus"].xmlattributes.value = 'http://schemas.google.com/g/2005##event.canceled'>
</cfif>
<cfset test = sendUpdateEventRequest(editURL,events[x])>
<cfcatch>
<cfoutput>ERROR - #cfcatch.Message#</cfoutput><br>
</cfcatch>
</cftry>
</cfloop>
</cffunction>
<cffunction name="removeSingleOccurance" access="remote" output="false">
<cfargument name="eventTitle" required="true">
<cfargument name="date" type="date" required="true">
<cfargument name="calID" required="true">
<cfset var editURL = "">
<cfset var test = "">
<cfset var x = "">
<cfset var y = "">
<cfset var events = "">
<cfinvoke method="getEvents" returnvariable="events">
<cfinvokeargument name="calID" value="#calID#">
<cfinvokeargument name="returnType" value="xmlarray">
<cfinvokeargument name="singleEvents" value="true">
<cfinvokeargument name="maxevents" value="100000">
<cfinvokeargument name="q" value="#eventTitle#">
</cfinvoke>
<cfloop index="x" from="1" to="#arrayLen(events)#">
<cftry>
<cfif compare(urldecode(events[x].title.xmltext), eventTitle) eq 0 and dateCompare(ParseDateTime(date), ParseDateTime(mid(replace(events[x]["gd:when"].xmlAttributes.startTime, "T", " "),1, 19)),'d') eq 0>
<cfloop index="y" from="1" to="#arrayLen(events[x].link)#">
<cfif events[x].link[y].xmlAttributes.rel is "edit">
<cfset editURL = events[x].link[y].xmlAttributes.href>
</cfif>
</cfloop>
<cfif structKeyExists(events[x], "gd:eventStatus")>
<cfset events[x]["gd:eventStatus"].xmlattributes.value = 'http://schemas.google.com/g/2005##event.canceled'>
</cfif>
<cfset test = sendUpdateEventRequest(editURL,events[x])>
<cfreturn test>
</cfif>
<cfcatch>
<cfoutput>ERROR - #cfcatch.Message#</cfoutput><br>
</cfcatch>
</cftry>
</cfloop>
</cffunction>
<cffunction name="sendUpdateEventRequest" access="remote" returntype="any" description="send HTTP request to google for an update of an event" output="false">
<cfargument name="editURL" required="true">
<cfargument name="xml" required="true">
<cfset var loc = "">
<cfset var result = "">
<cfhttp url="#editURL#" method="put" result="result" redirect="false">
<cfhttpparam type="header" name="Content-Type" value="application/atom+xml">
<cfhttpparam type="header" name="Authorization" value="GoogleLogin auth=#variables.authcode#">
<cfhttpparam type="body" value="#xml#">
</cfhttp>
<cfif result.responseheader.status_code is "302">
<cfset loc = result.responseheader.location>
<cfhttp url="#loc#" method="put" result="result" redirect="false">
<cfhttpparam type="header" name="Content-Type" value="application/atom+xml">
<cfhttpparam type="header" name="Authorization" value="GoogleLogin auth=#variables.authcode#">
<cfhttpparam type="body" value="#xml#">
</cfhttp>
</cfif>
<cfreturn result>
</cffunction>
</cfcomponent>
| ColdFusion CFC | 5 | subethaedit/SubEthaEd | Documentation/ModeDevelopment/Reference Files/CFML/GoogleCalendar.cfc | [
"MIT"
] |
// Copyright (c) 2014 Intel Corp
// Copyright (c) 2014 The Chromium Authors
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell co
// pies of the Software, and to permit persons to whom the Software is furnished
// to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IM
// PLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNES
// S FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
// OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WH
// ETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
// CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#ifndef CONTENT_NW_SRC_API_SHORTCUT_GLOBAL_SHORTCUT_LISTENER_H_
#define CONTENT_NW_SRC_API_SHORTCUT_GLOBAL_SHORTCUT_LISTENER_H_
#include <map>
#include "base/basictypes.h"
#include "ui/events/keycodes/keyboard_codes.h"
namespace ui {
class Accelerator;
}
namespace nwapi {
// Platform-neutral implementation of a class that keeps track of observers and
// monitors keystrokes. It relays messages to the appropriate observer when a
// global shortcut has been struck by the user.
class GlobalShortcutListener {
public:
class Observer {
public:
// Called when your global shortcut (|accelerator|) is struck.
virtual void OnKeyPressed(const ui::Accelerator& accelerator) = 0;
};
virtual ~GlobalShortcutListener();
static GlobalShortcutListener* GetInstance();
// Register an observer for when a certain |accelerator| is struck. Returns
// true if register successfully, or false if 1) the specificied |accelerator|
// has been registered by another caller or other native applications, or
// 2) shortcut handling is suspended.
//
// Note that we do not support recognizing that an accelerator has been
// registered by another application on all platforms. This is a per-platform
// consideration.
bool RegisterAccelerator(const ui::Accelerator& accelerator,
Observer* observer);
// Stop listening for the given |accelerator|, does nothing if shortcut
// handling is suspended.
void UnregisterAccelerator(const ui::Accelerator& accelerator,
Observer* observer);
// Stop listening for all accelerators of the given |observer|, does nothing
// if shortcut handling is suspended.
void UnregisterAccelerators(Observer* observer);
// Suspend/Resume global shortcut handling. Note that when suspending,
// RegisterAccelerator/UnregisterAccelerator/UnregisterAccelerators are not
// allowed to be called until shortcut handling has been resumed.
void SetShortcutHandlingSuspended(bool suspended);
// Returns whether shortcut handling is currently suspended.
bool IsShortcutHandlingSuspended() const;
protected:
GlobalShortcutListener();
// Called by platform specific implementations of this class whenever a key
// is struck. Only called for keys that have an observer registered.
void NotifyKeyPressed(const ui::Accelerator& accelerator);
private:
// The following methods are implemented by platform-specific implementations
// of this class.
//
// Start/StopListening are called when transitioning between zero and nonzero
// registered accelerators. StartListening will be called after
// RegisterAcceleratorImpl and StopListening will be called after
// UnregisterAcceleratorImpl.
//
// For RegisterAcceleratorImpl, implementations return false if registration
// did not complete successfully.
virtual void StartListening() = 0;
virtual void StopListening() = 0;
virtual bool RegisterAcceleratorImpl(const ui::Accelerator& accelerator) = 0;
virtual void UnregisterAcceleratorImpl(
const ui::Accelerator& accelerator) = 0;
// The map of accelerators that have been successfully registered as global
// shortcuts and their observer.
typedef std::map<ui::Accelerator, Observer*> AcceleratorMap;
AcceleratorMap accelerator_map_;
// Keeps track of whether shortcut handling is currently suspended.
bool shortcut_handling_suspended_;
DISALLOW_COPY_AND_ASSIGN(GlobalShortcutListener);
};
} // namespace nwapi
#endif // CONTENT_NW_SRC_API_SHORTCUT_GLOBAL_SHORTCUT_LISTENER_H_
| C | 5 | namaljayathunga/nw.js | src/api/shortcut/global_shortcut_listener.h | [
"MIT"
] |
#include "caffe2/utils/math/elementwise.h"
#include <type_traits>
#include <thrust/execution_policy.h>
#include <thrust/fill.h>
#include <thrust/functional.h>
#include <thrust/transform.h>
#include "caffe2/core/context_gpu.h"
#include "caffe2/utils/conversions.h"
#include "caffe2/utils/math/half_utils.h"
#include "caffe2/utils/math/utils.h"
namespace caffe2 {
namespace math {
namespace {
template <typename T>
__global__ void SinCosCUDAKernel(const int N, const T* X, T* S, T* C) {
const int i = blockIdx.x * CAFFE_CUDA_NUM_THREADS + threadIdx.x;
if (i < N) {
#if __CUDA_ARCH__ >= 350 || defined(USE_ROCM)
c10::cuda::compat::sincos(__ldg(X + i), S + i, C + i);
#else
c10::cuda::compat::sincos(X[i], S + i, C + i);
#endif
}
}
#if defined(USE_ROCM)
template <typename TAlpha, typename TData>
__global__ void AxpyCUDAKernel(
const std::int64_t N,
const TAlpha alpha,
const TData* X,
TData* Y) {
const int64_t index = static_cast<int64_t>(blockIdx.x) *
static_cast<int64_t>(CAFFE_CUDA_NUM_THREADS) +
static_cast<int64_t>(threadIdx.x);
if (index < N) {
Y[index] += static_cast<TData>(alpha) * __ldg(X + index);
}
}
template <typename TAlpha, typename TData>
__global__ void AxpyCUDAKernel(
const std::int64_t N,
const TAlpha* alpha,
const TData* X,
TData* Y) {
__shared__ TData a;
if (threadIdx.x == 0) {
a = static_cast<TData>(__ldg(alpha));
}
__syncthreads();
const int64_t index = static_cast<int64_t>(blockIdx.x) *
static_cast<int64_t>(CAFFE_CUDA_NUM_THREADS) +
static_cast<int64_t>(threadIdx.x);
if (index < N) {
Y[index] += a * __ldg(X + index);
}
}
#define DELEGATE_HALF_AXPY_CUDA_KERNEL(TAlpha, FMAFunc) \
template <> \
__global__ void AxpyCUDAKernel<TAlpha, at::Half>( \
const std::int64_t N, \
const TAlpha alpha, \
const at::Half* X, \
at::Half* Y) { \
const int64_t index = static_cast<int64_t>(blockIdx.x) * \
static_cast<int64_t>(CAFFE_CUDA_NUM_THREADS) + \
static_cast<int64_t>(threadIdx.x); \
if (index < N) { \
Y[index] = convert::To<TAlpha, at::Half>(FMAFunc( \
alpha, \
convert::To<at::Half, TAlpha>(X[index]), \
convert::To<at::Half, TAlpha>(Y[index]))); \
} \
} \
template <> \
__global__ void AxpyCUDAKernel<TAlpha, at::Half>( \
const std::int64_t N, \
const TAlpha* alpha, \
const at::Half* X, \
at::Half* Y) { \
__shared__ TAlpha a; \
if (threadIdx.x == 0) { \
a = __ldg(alpha); \
} \
__syncthreads(); \
const int64_t index = static_cast<int64_t>(blockIdx.x) * \
static_cast<int64_t>(CAFFE_CUDA_NUM_THREADS) + \
static_cast<int64_t>(threadIdx.x); \
if (index < N) { \
Y[index] = convert::To<TAlpha, at::Half>(FMAFunc( \
a, \
convert::To<at::Half, TAlpha>(X[index]), \
convert::To<at::Half, TAlpha>(Y[index]))); \
} \
}
DELEGATE_HALF_AXPY_CUDA_KERNEL(float, fmaf)
#undef DELEGATE_HALF_AXPY_CUDA_KERNEL
#endif // USE_ROCM
template <typename TAlpha, typename TData>
__global__ void AxpbyCUDAKernel(
const std::int64_t N,
const TAlpha alpha,
const TData* X,
const TAlpha beta,
TData* Y);
template <typename TAlpha, typename TData>
__global__ void AxpbyCUDAKernel(
const std::int64_t N,
const TAlpha* alpha,
const TData* X,
const TAlpha* beta,
TData* Y);
#define DELEGATE_AXPBY_CUDA_KERNEL(TAlpha, TData, FMAFunc) \
template <> \
__global__ void AxpbyCUDAKernel<TAlpha, TData>( \
const std::int64_t N, \
const TAlpha alpha, \
const TData* X, \
const TAlpha beta, \
TData* Y) { \
const int64_t index = static_cast<int64_t>(blockIdx.x) * \
static_cast<int64_t>(CAFFE_CUDA_NUM_THREADS) + \
static_cast<int64_t>(threadIdx.x); \
if (index < N) { \
Y[index] = FMAFunc( \
static_cast<TData>(alpha), \
X[index], \
static_cast<TData>(beta) * Y[index]); \
} \
} \
template <> \
__global__ void AxpbyCUDAKernel<TAlpha, TData>( \
const std::int64_t N, \
const TAlpha* alpha, \
const TData* X, \
const TAlpha* beta, \
TData* Y) { \
__shared__ TData a; \
__shared__ TData b; \
if (threadIdx.x == 0) { \
a = static_cast<TData>(*alpha); \
b = static_cast<TData>(*beta); \
} \
__syncthreads(); \
const int64_t index = static_cast<int64_t>(blockIdx.x) * \
static_cast<int64_t>(CAFFE_CUDA_NUM_THREADS) + \
static_cast<int64_t>(threadIdx.x); \
if (index < N) { \
Y[index] = FMAFunc(a, X[index], b * Y[index]); \
} \
}
DELEGATE_AXPBY_CUDA_KERNEL(float, float, fmaf)
DELEGATE_AXPBY_CUDA_KERNEL(float, double, fma)
#undef DELEGATE_AXPBY_CUDA_KERNEL
#define DELEGATE_HALF_AXPBY_CUDA_KERNEL(TAlpha, FMAFunc) \
template <> \
__global__ void AxpbyCUDAKernel<TAlpha, at::Half>( \
const std::int64_t N, \
const TAlpha alpha, \
const at::Half* X, \
const TAlpha beta, \
at::Half* Y) { \
const int64_t index = static_cast<int64_t>(blockIdx.x) * \
static_cast<int64_t>(CAFFE_CUDA_NUM_THREADS) + \
static_cast<int64_t>(threadIdx.x); \
if (index < N) { \
Y[index] = convert::To<TAlpha, at::Half>(FMAFunc( \
alpha, \
convert::To<at::Half, TAlpha>(X[index]), \
beta * convert::To<at::Half, TAlpha>(Y[index]))); \
} \
} \
template <> \
__global__ void AxpbyCUDAKernel<TAlpha, at::Half>( \
const std::int64_t N, \
const TAlpha* alpha, \
const at::Half* X, \
const TAlpha* beta, \
at::Half* Y) { \
__shared__ TAlpha a; \
__shared__ TAlpha b; \
if (threadIdx.x == 0) { \
a = *alpha; \
b = *beta; \
} \
__syncthreads(); \
const int64_t index = static_cast<int64_t>(blockIdx.x) * \
static_cast<int64_t>(CAFFE_CUDA_NUM_THREADS) + \
static_cast<int64_t>(threadIdx.x); \
if (index < N) { \
Y[index] = convert::To<TAlpha, at::Half>(FMAFunc( \
a, \
convert::To<at::Half, TAlpha>(X[index]), \
b * convert::To<at::Half, TAlpha>(Y[index]))); \
} \
}
DELEGATE_HALF_AXPBY_CUDA_KERNEL(float, fmaf)
#undef DELEGATE_HALF_AXPBY_CUDA_KERNEL
template <typename TAlpha, typename TData>
__global__ void ScaleCUDAKernel(
const std::int64_t N,
const TAlpha alpha,
const TData* X,
TData* Y);
template <typename TAlpha, typename TData>
__global__ void ScaleCUDAKernel(
const std::int64_t N,
const TAlpha* alpha,
const TData* X,
TData* Y);
#define CAFFE2_SPECIALIZED_SCALE_CUDA_KERNEL(TAlpha, TData) \
template <> \
__global__ void ScaleCUDAKernel<TAlpha, TData>( \
const std::int64_t N, const TAlpha alpha, const TData* X, TData* Y) { \
const int64_t index = static_cast<int64_t>(blockIdx.x) * \
static_cast<int64_t>(CAFFE_CUDA_NUM_THREADS) + \
static_cast<int64_t>(threadIdx.x); \
if (index < N) { \
Y[index] = static_cast<TData>(alpha) * X[index]; \
} \
} \
template <> \
__global__ void ScaleCUDAKernel<TAlpha, TData>( \
const std::int64_t N, const TAlpha* alpha, const TData* X, TData* Y) { \
__shared__ TData a; \
if (threadIdx.x == 0) { \
a = static_cast<TData>(*alpha); \
} \
__syncthreads(); \
const int64_t index = static_cast<int64_t>(blockIdx.x) * \
static_cast<int64_t>(CAFFE_CUDA_NUM_THREADS) + \
static_cast<int64_t>(threadIdx.x); \
if (index < N) { \
Y[index] = a * X[index]; \
} \
}
CAFFE2_SPECIALIZED_SCALE_CUDA_KERNEL(float, float)
CAFFE2_SPECIALIZED_SCALE_CUDA_KERNEL(double, double)
CAFFE2_SPECIALIZED_SCALE_CUDA_KERNEL(float, double)
CAFFE2_SPECIALIZED_SCALE_CUDA_KERNEL(std::int32_t, std::int32_t)
CAFFE2_SPECIALIZED_SCALE_CUDA_KERNEL(std::int64_t, std::int64_t)
#undef CAFFE2_SPECIALIZED_SCALE_CUDA_KERNEL
#define CAFFE2_SPECIALIZED_HALF_SCALE_CUDA_KERNEL(TAlpha) \
template <> \
__global__ void ScaleCUDAKernel<TAlpha, at::Half>( \
const std::int64_t N, \
const TAlpha alpha, \
const at::Half* X, \
at::Half* Y) { \
const int64_t index = static_cast<int64_t>(blockIdx.x) * \
static_cast<int64_t>(CAFFE_CUDA_NUM_THREADS) + \
static_cast<int64_t>(threadIdx.x); \
if (index < N) { \
Y[index] = convert::To<TAlpha, at::Half>( \
alpha * convert::To<at::Half, TAlpha>(X[index])); \
} \
} \
template <> \
__global__ void ScaleCUDAKernel<TAlpha, at::Half>( \
const std::int64_t N, \
const TAlpha* alpha, \
const at::Half* X, \
at::Half* Y) { \
__shared__ TAlpha a; \
if (threadIdx.x == 0) { \
a = *alpha; \
} \
__syncthreads(); \
const int64_t index = static_cast<int64_t>(blockIdx.x) * \
static_cast<int64_t>(CAFFE_CUDA_NUM_THREADS) + \
static_cast<int64_t>(threadIdx.x); \
if (index < N) { \
Y[index] = convert::To<TAlpha, at::Half>( \
a * convert::To<at::Half, TAlpha>(X[index])); \
} \
}
CAFFE2_SPECIALIZED_HALF_SCALE_CUDA_KERNEL(float)
#undef CAFFE2_SPECIALIZED_HALF_SCALE_CUDA_KERNEL
} // namespace
#define CAFFE2_SPECIALIZED_CUDA_SET(T) \
template <> \
CAFFE2_CUDA_EXPORT void Set<T, CUDAContext>( \
const std::int64_t N, const T alpha, T* Y, CUDAContext* context) { \
if (N == 0) { \
return; \
} \
if (alpha == T(0)) { \
cudaMemsetAsync(Y, 0, sizeof(T) * N, context->cuda_stream()); \
} else { \
thrust::fill( \
thrust::cuda::par.on(context->cuda_stream()), Y, Y + N, alpha); \
} \
}
CAFFE2_SPECIALIZED_CUDA_SET(bool)
CAFFE2_SPECIALIZED_CUDA_SET(char)
CAFFE2_SPECIALIZED_CUDA_SET(std::int8_t)
CAFFE2_SPECIALIZED_CUDA_SET(std::int16_t)
CAFFE2_SPECIALIZED_CUDA_SET(std::int32_t)
CAFFE2_SPECIALIZED_CUDA_SET(std::int64_t)
CAFFE2_SPECIALIZED_CUDA_SET(std::uint8_t)
CAFFE2_SPECIALIZED_CUDA_SET(std::uint16_t)
CAFFE2_SPECIALIZED_CUDA_SET(float)
CAFFE2_SPECIALIZED_CUDA_SET(double)
CAFFE2_SPECIALIZED_CUDA_SET(at::Half)
CAFFE2_SPECIALIZED_CUDA_SET(at::BFloat16)
#undef CAFFE2_SPECIALIZED_CUDA_SET
#define DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(T, Func, DeviceFunc) \
template <> \
CAFFE2_CUDA_EXPORT void Func<T, CUDAContext>( \
const int N, const T* X, T* Y, CUDAContext* context) { \
if (N > 0) { \
thrust::transform( \
thrust::cuda::par.on(context->cuda_stream()), \
X, \
X + N, \
Y, \
[] __device__(const T x) { return DeviceFunc(x); }); \
} \
}
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Exp, expf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Log, logf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Log1p, log1pf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Sin, sinf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Asin, asinf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Cos, cosf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Acos, acosf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Tan, tanf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Atan, atanf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Sinh, sinhf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Cosh, coshf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Tanh, tanhf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Abs, fabsf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Inv, utils::Inv<float>)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(double, Inv, utils::Inv<double>)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Sqr, utils::Square<float>)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Sqrt, sqrtf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Rsqrt, rsqrtf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(
std::int32_t,
Cube,
utils::Cube<std::int32_t>)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(
std::int64_t,
Cube,
utils::Cube<std::int64_t>)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Cube, utils::Cube<float>)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(double, Cube, utils::Cube<double>)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Cbrt, cbrtf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Erf, erff)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(double, Erf, erf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, CdfNorm, normcdff)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(double, CdfNorm, normcdf)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(bool, Not, utils::Not<bool>)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(
std::int32_t,
Neg,
utils::Negate<std::int32_t>)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(
std::int64_t,
Neg,
utils::Negate<std::int64_t>)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Neg, utils::Negate<float>)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(double, Neg, utils::Negate<double>)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(
std::int32_t,
Sign,
utils::Sign<std::int32_t>)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(
std::int64_t,
Sign,
utils::Sign<std::int64_t>)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(float, Sign, utils::Sign<float>)
DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION(double, Sign, utils::Sign<double>)
#undef DELEGATE_SIMPLE_CUDA_UNARY_FUNCTION
#define DELEGATE_CUDA_POWX(T, DeviceFunc) \
template <> \
CAFFE2_CUDA_EXPORT void Powx<T, CUDAContext>( \
const int N, const T* A, const T b, T* Y, CUDAContext* context) { \
thrust::transform( \
thrust::cuda::par.on(context->cuda_stream()), \
A, \
A + N, \
Y, \
[b] __device__(const T x) { return DeviceFunc(x, b); }); \
}
DELEGATE_CUDA_POWX(float, powf)
#undef DELEGATE_CUDA_POWX
#define CAFFE2_SPECIALIZED_CUDA_SINCOS(T) \
template <> \
CAFFE2_CUDA_EXPORT void SinCos<T, CUDAContext>( \
const int N, const T* X, T* S, T* C, CUDAContext* context) { \
if (N > 0) { \
const int K = DivUp(N, CAFFE_CUDA_NUM_THREADS); \
SinCosCUDAKernel<T> \
<<<K, CAFFE_CUDA_NUM_THREADS, 0, context->cuda_stream()>>>( \
N, X, S, C); \
C10_CUDA_KERNEL_LAUNCH_CHECK(); \
} \
}
CAFFE2_SPECIALIZED_CUDA_SINCOS(float)
CAFFE2_SPECIALIZED_CUDA_SINCOS(double)
#undef CAFFE2_SPECIALIZED_CUDA_SINCOS
#define DELEGATE_CUDA_SCALE(T, CuBLASFunc) \
template <> \
CAFFE2_CUDA_EXPORT void Scale<T, T, CUDAContext>( \
const std::int64_t N, \
const T alpha, \
const T* X, \
T* Y, \
CUDAContext* context) { \
if (N == 0) { \
return; \
} \
if (Y == X) { \
CUBLAS_ENFORCE(cublasSetPointerMode( \
context->cublas_handle(), CUBLAS_POINTER_MODE_HOST)); \
CUBLAS_ENFORCE(CuBLASFunc(context->cublas_handle(), N, &alpha, Y, 1)); \
} else { \
const std::int64_t M = DivUp<std::int64_t>(N, CAFFE_CUDA_NUM_THREADS); \
ScaleCUDAKernel<T, T> \
<<<M, CAFFE_CUDA_NUM_THREADS, 0, context->cuda_stream()>>>( \
N, alpha, X, Y); \
C10_CUDA_KERNEL_LAUNCH_CHECK(); \
} \
} \
template <> \
CAFFE2_CUDA_EXPORT void Scale<T, T, CUDAContext>( \
const std::int64_t N, \
const T* alpha, \
const T* X, \
T* Y, \
CUDAContext* context) { \
if (N == 0) { \
return; \
} \
if (Y == X) { \
CUBLAS_ENFORCE(cublasSetPointerMode( \
context->cublas_handle(), CUBLAS_POINTER_MODE_DEVICE)); \
CUBLAS_ENFORCE(CuBLASFunc(context->cublas_handle(), N, alpha, Y, 1)); \
} else { \
const std::int64_t M = DivUp<std::int64_t>(N, CAFFE_CUDA_NUM_THREADS); \
ScaleCUDAKernel<T, T> \
<<<M, CAFFE_CUDA_NUM_THREADS, 0, context->cuda_stream()>>>( \
N, alpha, X, Y); \
C10_CUDA_KERNEL_LAUNCH_CHECK(); \
} \
}
DELEGATE_CUDA_SCALE(float, cublasSscal)
DELEGATE_CUDA_SCALE(double, cublasDscal)
#undef DELEGATE_CUDA_SCALE
#if !defined(USE_ROCM)
#define DELEGATE_CUDA_SCALE_EX( \
TAlpha, TData, kAlphaType, kDataType, kExecutionType) \
template <> \
CAFFE2_CUDA_EXPORT void Scale<TAlpha, TData, CUDAContext>( \
const std::int64_t N, \
const TAlpha alpha, \
const TData* X, \
TData* Y, \
CUDAContext* context) { \
if (N == 0) { \
return; \
} \
if (Y == X) { \
CUBLAS_ENFORCE(cublasSetPointerMode( \
context->cublas_handle(), CUBLAS_POINTER_MODE_HOST)); \
CUBLAS_ENFORCE(cublasScalEx( \
context->cublas_handle(), \
N, \
&alpha, \
kAlphaType, \
Y, \
kDataType, \
1, \
kExecutionType)); \
} else { \
const std::int64_t M = DivUp<std::int64_t>(N, CAFFE_CUDA_NUM_THREADS); \
ScaleCUDAKernel<TAlpha, TData> \
<<<M, CAFFE_CUDA_NUM_THREADS, 0, context->cuda_stream()>>>( \
N, alpha, X, Y); \
C10_CUDA_KERNEL_LAUNCH_CHECK(); \
} \
} \
template <> \
CAFFE2_CUDA_EXPORT void Scale<TAlpha, TData, CUDAContext>( \
const std::int64_t N, \
const TAlpha* alpha, \
const TData* X, \
TData* Y, \
CUDAContext* context) { \
if (N == 0) { \
return; \
} \
if (Y == X) { \
CUBLAS_ENFORCE(cublasSetPointerMode( \
context->cublas_handle(), CUBLAS_POINTER_MODE_DEVICE)); \
CUBLAS_ENFORCE(cublasScalEx( \
context->cublas_handle(), \
N, \
alpha, \
kAlphaType, \
Y, \
kDataType, \
1, \
kExecutionType)); \
} else { \
const std::int64_t M = DivUp<std::int64_t>(N, CAFFE_CUDA_NUM_THREADS); \
ScaleCUDAKernel<TAlpha, TData> \
<<<M, CAFFE_CUDA_NUM_THREADS, 0, context->cuda_stream()>>>( \
N, alpha, X, Y); \
C10_CUDA_KERNEL_LAUNCH_CHECK(); \
} \
}
DELEGATE_CUDA_SCALE_EX(float, double, CUDA_R_32F, CUDA_R_64F, CUDA_R_64F)
DELEGATE_CUDA_SCALE_EX(float, at::Half, CUDA_R_32F, CUDA_R_16F, CUDA_R_32F)
#undef DELEGATE_CUDA_SCALE_EX
#endif // USE_ROCM
#define CAFFE2_SPECIALIZED_CUDA_SCALE(TAlpha, TData) \
template <> \
CAFFE2_CUDA_EXPORT void Scale<TAlpha, TData, CUDAContext>( \
const std::int64_t N, \
const TAlpha alpha, \
const TData* X, \
TData* Y, \
CUDAContext* context) { \
if (N > 0) { \
const std::int64_t M = DivUp<std::int64_t>(N, CAFFE_CUDA_NUM_THREADS); \
ScaleCUDAKernel<TAlpha, TData> \
<<<M, CAFFE_CUDA_NUM_THREADS, 0, context->cuda_stream()>>>( \
N, alpha, X, Y); \
C10_CUDA_KERNEL_LAUNCH_CHECK(); \
} \
} \
template <> \
CAFFE2_CUDA_EXPORT void Scale<TAlpha, TData, CUDAContext>( \
const std::int64_t N, \
const TAlpha* alpha, \
const TData* X, \
TData* Y, \
CUDAContext* context) { \
if (N > 0) { \
const std::int64_t M = DivUp<std::int64_t>(N, CAFFE_CUDA_NUM_THREADS); \
ScaleCUDAKernel<TAlpha, TData> \
<<<M, CAFFE_CUDA_NUM_THREADS, 0, context->cuda_stream()>>>( \
N, *alpha, X, Y); \
C10_CUDA_KERNEL_LAUNCH_CHECK(); \
} \
}
CAFFE2_SPECIALIZED_CUDA_SCALE(std::int32_t, std::int32_t)
CAFFE2_SPECIALIZED_CUDA_SCALE(std::int64_t, std::int64_t)
#if defined(USE_ROCM)
CAFFE2_SPECIALIZED_CUDA_SCALE(float, double)
CAFFE2_SPECIALIZED_CUDA_SCALE(float, at::Half)
#endif // USE_ROCM
#undef CAFFE2_SPECIALIZED_CUDA_SCALE
#define DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(T, Func, DeviceFunc) \
template <> \
CAFFE2_CUDA_EXPORT void Func<T, CUDAContext>( \
const int N, const T* A, const T* B, T* C, CUDAContext* context) { \
if (N > 0) { \
thrust::transform( \
thrust::cuda::par.on(context->cuda_stream()), \
A, \
A + N, \
B, \
C, \
DeviceFunc); \
} \
}
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(
std::int32_t,
Add,
thrust::plus<std::int32_t>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(
std::int64_t,
Add,
thrust::plus<std::int64_t>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(float, Add, thrust::plus<float>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(double, Add, thrust::plus<double>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(at::Half, Add, utils::HalfAddFunctor())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(
std::int32_t,
Sub,
thrust::minus<std::int32_t>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(
std::int64_t,
Sub,
thrust::minus<std::int64_t>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(float, Sub, thrust::minus<float>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(double, Sub, thrust::minus<double>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(at::Half, Sub, utils::HalfSubFunctor())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(
std::int32_t,
Mul,
thrust::multiplies<std::int32_t>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(
std::int64_t,
Mul,
thrust::multiplies<std::int64_t>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(float, Mul, thrust::multiplies<float>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(double, Mul, thrust::multiplies<double>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(at::Half, Mul, utils::HalfMulFunctor())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(
std::int32_t,
Div,
thrust::divides<std::int32_t>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(
std::int64_t,
Div,
thrust::divides<std::int64_t>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(float, Div, thrust::divides<float>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(double, Div, thrust::divides<double>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(at::Half, Div, utils::HalfDivFunctor())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(float, Min, thrust::minimum<float>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(double, Min, thrust::minimum<double>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(float, Max, thrust::maximum<float>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(double, Max, thrust::maximum<double>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(bool, And, thrust::logical_and<bool>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(bool, Or, thrust::logical_or<bool>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(bool, Xor, thrust::bit_xor<bool>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(bool, BitwiseAnd, thrust::bit_and<bool>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(
std::int32_t,
BitwiseAnd,
thrust::bit_and<std::int32_t>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(
std::int64_t,
BitwiseAnd,
thrust::bit_and<std::int64_t>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(bool, BitwiseOr, thrust::bit_or<bool>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(
std::int32_t,
BitwiseOr,
thrust::bit_or<std::int32_t>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(
std::int64_t,
BitwiseOr,
thrust::bit_or<std::int64_t>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(bool, BitwiseXor, thrust::bit_xor<bool>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(
std::int32_t,
BitwiseXor,
thrust::bit_xor<std::int32_t>())
DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION(
std::int64_t,
BitwiseXor,
thrust::bit_xor<std::int64_t>())
#undef DELEGATE_SIMPLE_CUDA_BINARY_FUNCTION
#define DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(T, Func, DeviceComp) \
template <> \
CAFFE2_CUDA_EXPORT void Func<T, CUDAContext>( \
const int N, const T* A, const T* B, bool* C, CUDAContext* context) { \
if (N > 0) { \
thrust::transform( \
thrust::cuda::par.on(context->cuda_stream()), \
A, \
A + N, \
B, \
C, \
DeviceComp); \
} \
}
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(bool, EQ, thrust::equal_to<bool>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(
std::int32_t,
EQ,
thrust::equal_to<std::int32_t>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(
std::int64_t,
EQ,
thrust::equal_to<std::int64_t>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(float, EQ, thrust::equal_to<float>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(double, EQ, thrust::equal_to<double>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(bool, NE, thrust::not_equal_to<bool>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(
std::int32_t,
NE,
thrust::not_equal_to<std::int32_t>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(
std::int64_t,
NE,
thrust::not_equal_to<std::int64_t>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(float, NE, thrust::not_equal_to<float>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(
double,
NE,
thrust::not_equal_to<double>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(bool, LT, thrust::less<bool>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(
std::int32_t,
LT,
thrust::less<std::int32_t>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(
std::int64_t,
LT,
thrust::less<std::int64_t>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(float, LT, thrust::less<float>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(double, LT, thrust::less<double>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(bool, LE, thrust::less_equal<bool>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(
std::int32_t,
LE,
thrust::less_equal<std::int32_t>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(
std::int64_t,
LE,
thrust::less_equal<std::int64_t>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(float, LE, thrust::less_equal<float>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(double, LE, thrust::less_equal<double>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(bool, GT, thrust::greater<bool>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(
std::int32_t,
GT,
thrust::greater<std::int32_t>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(
std::int64_t,
GT,
thrust::greater<std::int64_t>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(float, GT, thrust::greater<float>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(double, GT, thrust::greater<double>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(bool, GE, thrust::greater_equal<bool>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(
std::int32_t,
GE,
thrust::greater_equal<std::int32_t>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(
std::int64_t,
GE,
thrust::greater_equal<std::int64_t>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(float, GE, thrust::greater_equal<float>())
DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION(
double,
GE,
thrust::greater_equal<double>())
#undef DELEGATE_SIMPLE_CUDA_COMPARE_FUNCTION
#define DELEGATE_CUDA_AXPY(T, CuBLASFunc) \
template <> \
CAFFE2_CUDA_EXPORT void Axpy<T, T, CUDAContext>( \
const std::int64_t N, \
const T alpha, \
const T* X, \
T* Y, \
CUDAContext* context) { \
CUBLAS_ENFORCE(cublasSetPointerMode( \
context->cublas_handle(), CUBLAS_POINTER_MODE_HOST)); \
CUBLAS_ENFORCE( \
CuBLASFunc(context->cublas_handle(), N, &alpha, X, 1, Y, 1)); \
} \
template <> \
CAFFE2_CUDA_EXPORT void Axpy<T, T, CUDAContext>( \
const std::int64_t N, \
const T* alpha, \
const T* X, \
T* Y, \
CUDAContext* context) { \
CUBLAS_ENFORCE(cublasSetPointerMode( \
context->cublas_handle(), CUBLAS_POINTER_MODE_DEVICE)); \
CUBLAS_ENFORCE( \
cublasSaxpy(context->cublas_handle(), N, alpha, X, 1, Y, 1)); \
}
DELEGATE_CUDA_AXPY(float, cublasSaxpy)
#undef DELEGATE_CUDA_AXPY
#if !defined(USE_ROCM)
#define DELEGATE_CUDA_AXPY_EX( \
TAlpha, TData, kAlphaType, kDataType, kExecutionType) \
template <> \
CAFFE2_CUDA_EXPORT void Axpy<TAlpha, TData, CUDAContext>( \
const std::int64_t N, \
const TAlpha alpha, \
const TData* X, \
TData* Y, \
CUDAContext* context) { \
CUBLAS_ENFORCE(cublasSetPointerMode( \
context->cublas_handle(), CUBLAS_POINTER_MODE_HOST)); \
CUBLAS_ENFORCE(cublasAxpyEx( \
context->cublas_handle(), \
N, \
&alpha, \
kAlphaType, \
X, \
kDataType, \
1, \
Y, \
kDataType, \
1, \
kExecutionType)); \
} \
template <> \
CAFFE2_CUDA_EXPORT void Axpy<TAlpha, TData, CUDAContext>( \
const std::int64_t N, \
const TAlpha* alpha, \
const TData* X, \
TData* Y, \
CUDAContext* context) { \
CUBLAS_ENFORCE(cublasSetPointerMode( \
context->cublas_handle(), CUBLAS_POINTER_MODE_DEVICE)); \
CUBLAS_ENFORCE(cublasAxpyEx( \
context->cublas_handle(), \
N, \
alpha, \
kAlphaType, \
X, \
kDataType, \
1, \
Y, \
kDataType, \
1, \
kExecutionType)); \
}
DELEGATE_CUDA_AXPY_EX(float, double, CUDA_R_32F, CUDA_R_64F, CUDA_R_64F)
DELEGATE_CUDA_AXPY_EX(float, at::Half, CUDA_R_32F, CUDA_R_16F, CUDA_R_32F)
#undef DELEGATE_CUDA_AXPY_EX
#else // USE_ROCM
#define CAFFE2_SPECIALIZED_CUDA_AXPY(TAlpha, TData) \
template <> \
CAFFE2_CUDA_EXPORT void Axpy<TAlpha, TData, CUDAContext>( \
const std::int64_t N, \
const TAlpha alpha, \
const TData* X, \
TData* Y, \
CUDAContext* context) { \
const std::int64_t M = DivUp<std::int64_t>(N, CAFFE_CUDA_NUM_THREADS); \
AxpyCUDAKernel<TAlpha, TData> \
<<<M, CAFFE_CUDA_NUM_THREADS, 0, context->cuda_stream()>>>( \
N, alpha, X, Y); \
C10_CUDA_KERNEL_LAUNCH_CHECK(); \
} \
template <> \
CAFFE2_CUDA_EXPORT void Axpy<TAlpha, TData, CUDAContext>( \
const std::int64_t N, \
const TAlpha* alpha, \
const TData* X, \
TData* Y, \
CUDAContext* context) { \
const std::int64_t M = DivUp<std::int64_t>(N, CAFFE_CUDA_NUM_THREADS); \
AxpyCUDAKernel<TAlpha, TData> \
<<<M, CAFFE_CUDA_NUM_THREADS, 0, context->cuda_stream()>>>( \
N, alpha, X, Y); \
C10_CUDA_KERNEL_LAUNCH_CHECK(); \
}
CAFFE2_SPECIALIZED_CUDA_AXPY(float, double)
CAFFE2_SPECIALIZED_CUDA_AXPY(float, at::Half)
#undef CAFFE2_SPECIALIZED_CUDA_AXPY
#endif // USE_ROCM
#define CAFFE2_SPECIALIZED_CUDA_AXPBY(TAlpha, TData) \
template <> \
CAFFE2_CUDA_EXPORT void Axpby<TAlpha, TData, CUDAContext>( \
const std::int64_t N, \
const TAlpha alpha, \
const TData* X, \
const TAlpha beta, \
TData* Y, \
CUDAContext* context) { \
const std::int64_t M = DivUp<std::int64_t>(N, CAFFE_CUDA_NUM_THREADS); \
AxpbyCUDAKernel<TAlpha, TData> \
<<<M, CAFFE_CUDA_NUM_THREADS, 0, context->cuda_stream()>>>( \
N, alpha, X, beta, Y); \
C10_CUDA_KERNEL_LAUNCH_CHECK(); \
} \
template <> \
CAFFE2_CUDA_EXPORT void Axpby<TAlpha, TData, CUDAContext>( \
const std::int64_t N, \
const TAlpha* alpha, \
const TData* X, \
const TAlpha* beta, \
TData* Y, \
CUDAContext* context) { \
const std::int64_t M = DivUp<std::int64_t>(N, CAFFE_CUDA_NUM_THREADS); \
AxpbyCUDAKernel<TAlpha, TData> \
<<<M, CAFFE_CUDA_NUM_THREADS, 0, context->cuda_stream()>>>( \
N, alpha, X, beta, Y); \
C10_CUDA_KERNEL_LAUNCH_CHECK(); \
}
CAFFE2_SPECIALIZED_CUDA_AXPBY(float, float)
CAFFE2_SPECIALIZED_CUDA_AXPBY(float, double)
CAFFE2_SPECIALIZED_CUDA_AXPBY(float, at::Half)
#undef CAFFE2_SPECIALIZED_CUDA_AXPBY
} // namespace math
} // namespace caffe2
| Cuda | 4 | xiaohanhuang/pytorch | caffe2/utils/math/elementwise.cu | [
"Intel"
] |
.ContextMenu {
position: absolute;
background-color: var(--color-context-background);
box-shadow: 1px 1px 2px var(--color-shadow);
border-radius: 0.25rem;
overflow: hidden;
z-index: 10000002;
user-select: none;
} | CSS | 3 | GBKstc/react-analysis | packages/react-devtools-shared/src/devtools/ContextMenu/ContextMenu.css | [
"MIT"
] |
FORMAT: 1A
# Top Secret API
# Resource [/resource]
## Update Resource [PUT]
+ Request (text/plain)
+ Response 200 (text/plain; charset=utf-8)
+ Body
token=5229c6e8e4b0bd7dbb07e29c
| API Blueprint | 3 | tomoyamachi/dredd | packages/dredd/test/fixtures/sanitation/plain-text-response-body.apib | [
"MIT"
] |
;; tools/debugger/autoload/evil.el -*- lexical-binding: t; -*-
;;;###if (featurep! :editor evil)
;;;###autoload (autoload '+debugger:start "tools/debugger/autoload/evil" nil t)
(evil-define-command +debugger:start (&optional path)
"Initiate debugger for current major mode"
(interactive "<f>")
;; TODO Add python debugging
(let ((default-directory (doom-project-root)))
(pcase major-mode
((or 'c-mode 'c++-mode)
(realgud:gdb (if path (concat "gdb " path))))
('ruby-mode
;; FIXME
(doom:repl nil (format "run '%s'" (file-name-nondirectory (or path buffer-file-name)))))
('sh-mode
(let ((shell sh-shell))
(when (string= shell "sh")
(setq shell "bash"))
(pcase shell
("bash"
(realgud:bashdb (if path (concat "bashdb " path))))
("zsh"
(realgud:zshdb (if path (concat "zshdb " path))))
(_ (user-error "No shell debugger for %s" shell)))))
((or 'js-mode 'js2-mode 'js3-mode)
(realgud:trepanjs))
('haskell-mode (haskell-debug))
(_ (user-error "No debugger for %s" major-mode)))))
;;;###autoload (autoload '+debugger:toggle-breakpoint "tools/debugger/autoload/evil" nil t)
(evil-define-command +debugger:toggle-breakpoint (&optional bang)
(interactive "<!>")
(call-interactively (if bang #'realgud:cmd-clear #'realgud:cmd-break)))
| Emacs Lisp | 5 | leezu/doom-emacs | modules/tools/debugger/autoload/evil.el | [
"MIT"
] |
import Debug "mo:base/Debug";
import Nat "mo:base/Nat";
import I "mo:base/Iter";
import List "mo:base/List";
import RBT "mo:base/RBTree";
let sorted =
[
(1, "reformer"),
(2, "helper"),
(3, "achiever"),
(4, "individualist"),
(5, "investigator"),
(6, "loyalist"),
(7, "enthusiast"),
(8, "challenger"),
(9, "peacemaker"),
];
let unsort =
[
(6, "loyalist"),
(3, "achiever"),
(9, "peacemaker"),
(1, "reformer"),
(4, "individualist"),
(2, "helper"),
(8, "challenger"),
(5, "investigator"),
(7, "enthusiast"),
];
var t = RBT.RBTree<Nat, Text>(Nat.compare);
assert RBT.size(t.share()) == 0;
for ((num, lab) in unsort.vals()) {
Debug.print (Nat.toText num);
Debug.print lab;
t.put(num, lab);
};
do { var i = 1;
for ((num, lab) in t.entries()) {
assert(num == i);
i += 1;
}};
assert RBT.size(t.share()) == 9;
do { var i = 9;
for ((num, lab) in t.entriesRev()) {
assert(num == i);
i -= 1;
}};
assert RBT.size(t.share()) == 9;
| Modelica | 4 | nomeata/motoko-base | test/RBTreeTest.mo | [
"Apache-2.0"
] |
class Float {
"""
Standard class for floating point number values in Fancy.
"""
include: Number
forwards_unary_ruby_methods
ruby_aliases: [ '+, '-, '*, '/, '==, '<, '>, '<=, '>=, '**]
alias_method: 'modulo: for: 'modulo
alias_method: ":%" for: "modulo:" # use a : so we dont overwrite ruby's % operator
}
| Fancy | 3 | bakkdoor/fancy | lib/rbx/float.fy | [
"BSD-3-Clause"
] |
/*
* Copyright (c) 2020, Hüseyin Aslıtürk <[email protected]>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <LibGUI/AbstractButton.h>
class KeyButton final : public GUI::AbstractButton {
C_OBJECT(KeyButton)
public:
virtual ~KeyButton() override;
void set_pressed(bool value) { m_pressed = value; }
Function<void()> on_click;
protected:
virtual void click(unsigned modifiers = 0) override;
virtual void leave_event(Core::Event&) override;
virtual void mousemove_event(GUI::MouseEvent&) override;
virtual void paint_event(GUI::PaintEvent&) override;
private:
KeyButton() = default;
bool m_pressed { false };
};
| C | 4 | r00ster91/serenity | Userland/Applications/KeyboardMapper/KeyButton.h | [
"BSD-2-Clause"
] |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {getSystemPath, normalize, virtualFs} from '@angular-devkit/core';
import {TempScopedNodeJsSyncHost} from '@angular-devkit/core/node/testing';
import {HostTree} from '@angular-devkit/schematics';
import {SchematicTestRunner, UnitTestTree} from '@angular-devkit/schematics/testing';
import * as shx from 'shelljs';
describe('routerlink emptyExpr assignment migration', () => {
let runner: SchematicTestRunner;
let host: TempScopedNodeJsSyncHost;
let tree: UnitTestTree;
let tmpDirPath: string;
let previousWorkingDir: string;
let warnOutput: string[];
beforeEach(() => {
runner = new SchematicTestRunner('test', require.resolve('../migrations.json'));
host = new TempScopedNodeJsSyncHost();
tree = new UnitTestTree(new HostTree(host));
writeFile('/tsconfig.json', JSON.stringify({
compilerOptions: {
lib: ['es2015'],
},
}));
writeFile('/angular.json', JSON.stringify({
version: 1,
projects: {t: {architect: {build: {options: {tsConfig: './tsconfig.json'}}}}}
}));
warnOutput = [];
runner.logger.subscribe(logEntry => {
if (logEntry.level === 'warn') {
warnOutput.push(logEntry.message);
}
});
previousWorkingDir = shx.pwd();
tmpDirPath = getSystemPath(host.root);
// Switch into the temporary directory path. This allows us to run
// the schematic against our custom unit test tree.
shx.cd(tmpDirPath);
});
afterEach(() => {
shx.cd(previousWorkingDir);
shx.rm('-r', tmpDirPath);
});
function writeFile(filePath: string, contents: string) {
host.sync.write(normalize(filePath), virtualFs.stringToFileBuffer(contents));
}
function runMigration() {
return runner.runSchematicAsync('migration-v13-router-link-empty-expression', {}, tree)
.toPromise();
}
it('should warn for emptyExpr assignment in inline template', async () => {
writeFile('/index.ts', `
import {Component} from '@angular/core';
@Component({
template: '<div [routerLink]=""></div>',
})
export class MyComp {}
`);
await runMigration();
expect(warnOutput.length).toBe(1);
expect(warnOutput[0]).toMatch(/^⮑ {3}index\.ts@5:25/);
const content = tree.readContent('/index.ts');
expect(content).toContain(`<div [routerLink]="[]"></div>`);
});
it('should warn for EmptyExpr assignment in external templatae', async () => {
writeFile('/index.ts', `
import {Component} from '@angular/core';
@Component({
templateUrl: './tmpl.html',
})
export class MyComp {}
`);
writeFile('/tmpl.html', `
<div *ngIf="somePartner() | async as partner">
<some-comp [routerLink]=""></some-comp>
</div>
`);
await runMigration();
expect(warnOutput.length).toBe(1);
expect(warnOutput).toMatch(/^⮑ {3}tmpl\.html@3:20/);
const content = tree.readContent('/tmpl.html');
expect(content).toContain(`<some-comp [routerLink]="[]"></some-comp>`);
});
it('should warn for `[routerLink]`', async () => {
writeFile('/index.ts', `
import {Component} from '@angular/core';
@Component({
templateUrl: './tmpl.html',
})
export class MyComp {}
`);
writeFile('/tmpl.html', `
<div>
<some-comp [routerLink]></some-comp>
</div>
`);
await runMigration();
const content = tree.readContent('/tmpl.html');
expect(content).toContain(`<some-comp [routerLink]="[]"></some-comp>`);
});
it('should work for many instances in a single template', async () => {
writeFile('/index.ts', `
import {Component} from '@angular/core';
@Component({
templateUrl: './tmpl.html',
})
export class MyComp {}
`);
writeFile('/tmpl.html', `
<some-comp1 [routerLink]=""></some-comp1> <some-comp2 [routerLink]=""></some-comp2>
<some-comp3 [routerLink]=""></some-comp3> <some-comp4 [routerLink]=""></some-comp4>
`);
await runMigration();
const content = tree.readContent('/tmpl.html');
expect(content).toContain(
`<some-comp1 [routerLink]="[]"></some-comp1> <some-comp2 [routerLink]="[]"></some-comp2>`);
expect(content).toContain(
`<some-comp3 [routerLink]="[]"></some-comp3> <some-comp4 [routerLink]="[]"></some-comp4>`);
});
it('should work for many references to one template', async () => {
writeFile('/index.ts', `
import {Component} from '@angular/core';
@Component({
templateUrl: './tmpl.html',
})
export class MyComp {}
@Component({
templateUrl: './tmpl.html',
})
export class MyComp2 {}
`);
writeFile('/tmpl.html', `<some-comp1 [routerLink]=""></some-comp1>`);
await runMigration();
const content = tree.readContent('/tmpl.html');
expect(content).toContain(`<some-comp1 [routerLink]="[]"></some-comp1>`);
});
it('does not migrate empty attribute expression because it is equivalent to empty string, not undefined',
async () => {
writeFile('/index.ts', `
import {Component} from '@angular/core';
@Component({
templateUrl: './tmpl.html',
})
export class MyComp {}
@Component({
templateUrl: './tmpl.html',
})
export class MyComp2 {}
`);
const contents = `<some-comp1 routerLink=""></some-comp1>`;
writeFile('/tmpl.html', contents);
await runMigration();
const content = tree.readContent('/tmpl.html');
expect(content).toEqual(contents);
});
it('should work for files that use CRLF line endings', async () => {
writeFile(
'/index.ts',
`
import {Component} from '@angular/core';
@Component({` +
'template: `<div [routerLink]=\'\'>\r\n{{1}}\r\n</div>`' +
`})
export class MyComp {}
`);
await runMigration();
expect(warnOutput.length).toBe(1);
expect(warnOutput[0]).toMatch(/^⮑ {3}index\.ts@4:35/);
const content = tree.readContent('/index.ts');
expect(content).toContain(`<div [routerLink]='[]'>\r\n{{1}}\r\n</div>`);
});
it('should work for files that use CRLF line endings before routerLink bindings', async () => {
writeFile(
'/index.ts',
`
import {Component} from '@angular/core';
@Component({` +
'template: `' +
'\r\n\r\n\r\n<div [routerLink]>{{1}}</div>`' +
`})
export class MyComp {}
`);
await runMigration();
expect(warnOutput.length).toBe(1);
expect(warnOutput[0]).toMatch(/^⮑ {3}index\.ts@7:6/);
const content = tree.readContent('/index.ts');
expect(content).toContain(`\r\n\r\n\r\n<div [routerLink]="[]">{{1}}</div>`);
});
it('should avoid duplicated transforms if files are part of multiple targets', async () => {
writeFile('/angular.json', JSON.stringify({
version: 1,
projects: {
build: {
architect: {
build: {options: {tsConfig: './tsconfig.json'}},
test: {options: {tsConfig: './tsconfig.json'}}
}
},
}
}));
writeFile('/tmpl.html', `<some-comp [routerLink]=""></some-comp>`);
writeFile('/index.ts', `
import {Component} from '@angular/core';
@Component({templateUrl: './tmpl.html'})
export class MyComp {}
`);
await runMigration();
const content = tree.readContent('/tmpl.html');
expect(content).toContain(`<some-comp [routerLink]="[]"></some-comp>`);
});
});
| TypeScript | 5 | OakMolecule/angular | packages/core/schematics/test/routerlink_empty_expr_migration_spec.ts | [
"MIT"
] |
-- @shouldFailWith TypesDoNotUnify
module Main where
data Proxy a = Proxy
data F f a = F (f a)
fproxy :: forall f a. Proxy f -> Proxy a -> Proxy (F f a)
fproxy _ _ = Proxy
test = c
where
a = fproxy (Proxy :: _ Proxy)
b = a (Proxy :: _ Int)
c = a (Proxy :: _ "foo")
| PureScript | 4 | andys8/purescript | tests/purs/failing/PolykindGeneralizationLet.purs | [
"BSD-3-Clause"
] |
<?xml version="1.0" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi">
<!-- Copy all attributes and elements to the output. -->
<xsl:template match="@*|*">
<xsl:copy>
<xsl:apply-templates select="@*|*"/>
</xsl:copy>
</xsl:template>
<xsl:output method="xml" indent="yes" />
<!-- Move all files in directory into first component in that directory. -->
<xsl:template match="wix:Component[1]">
<xsl:copy>
<xsl:apply-templates select="@*|*"/>
<xsl:for-each select="../wix:Component[preceding-sibling::*]/wix:File">
<xsl:copy>
<!-- Component can only have one KeyPath -->
<xsl:apply-templates select="@*[not(name()='KeyPath')]|*"/>
</xsl:copy>
</xsl:for-each>
</xsl:copy>
</xsl:template>
<!-- Now the rest of components are empty, find them. -->
<xsl:key name="empty-cmp-ids" match="wix:Component[preceding-sibling::*]" use="@Id" />
<!-- And remove. -->
<xsl:template match="wix:Component[preceding-sibling::*]" />
<!-- Also remove componentsrefs referencing empty components. -->
<xsl:template match="wix:ComponentRef[key('empty-cmp-ids', @Id)]" />
</xsl:stylesheet>
| XSLT | 5 | Eric-Arellano/rust | src/etc/installer/msi/squash-components.xsl | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
solve;
| AMPL | 2 | thuenen/State-Elimination-for-Mixed-Integer-Optimal-Control-of-PDEs-by-Semigroup-Theory | HeatCtrl/solve.ampl | [
"MIT"
] |
--TEST--
Bug #43053 (Regression: some numbers shown in scientific notation)
--FILE--
<?php
echo 1200000.00."\n";
echo 1300000.00."\n";
echo 1400000.00."\n";
echo 1500000.00."\n";
?>
--EXPECT--
1200000
1300000
1400000
1500000
| PHP | 1 | guomoumou123/php5.5.10 | Zend/tests/bug43053.phpt | [
"PHP-3.01"
] |
SmalltalkCISpec {
#name : 'Metacello TravisCI 3',
#loading : [
SCIMetacelloLoadSpec {
#baseline : 'Metacello',
#load : [ 'TravisCI_3' ],
#directory : 'repository'
}
]
}
| STON | 4 | tom95/metacello | .smalltalkB.ston | [
"MIT"
] |
# Copyright 2017 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# distutils: language=c++
cdef class TimerWrapper:
cdef grpc_custom_timer *c_timer
cdef object timer
cdef object event
cdef class SocketWrapper:
cdef object sockopts
cdef object socket
cdef object closed
cdef grpc_custom_socket *c_socket
cdef char* c_buffer
cdef size_t len
cdef grpc_custom_socket *accepting_socket
cdef grpc_custom_connect_callback connect_cb
cdef grpc_custom_write_callback write_cb
cdef grpc_custom_read_callback read_cb
cdef grpc_custom_accept_callback accept_cb
cdef grpc_custom_close_callback close_cb
cdef class ResolveWrapper:
cdef grpc_custom_resolver *c_resolver
cdef const char* c_host
cdef const char* c_port
| Cython | 4 | arghyadip01/grpc | src/python/grpcio/grpc/_cython/_cygrpc/grpc_gevent.pxd.pxi | [
"Apache-2.0"
] |
/*
* @ENABLED: false
*
* This is a conds test modified to exercise actions arguments.
*/
%%{
machine foo;
action c(v) { $v }
}%%
| Ragel in Ruby Host | 3 | podsvirov/colm-suite | test/ragel.d/argsinc.rl | [
"MIT"
] |
@import url('theme.css');
/* Logo background */
.wy-side-nav-search, .wy-side-nav-search img {
background-color: #ffffff !important;
}
.highlight {
background: #f1f3f4;
}
.navbar {
background: #ffffff;
}
.navbar-nav {
background: #ffffff;
}
/* side bar */
.wy-nav-side {
background: #f1f3f4;
}
.wy-menu-vertical a {
color: #707070;
}
.wy-side-nav-search div.version {
color: #404040;
}
| CSS | 3 | GinkoBalboa/xgboost | doc/_static/custom.css | [
"Apache-2.0"
] |
if ( req.url.ext ~ "(?i)^(gif|png|jpg|jpeg|webp)$" ) {
set req.http.X-Fastly-Imageopto-Api = "fastly";
}
| VCL | 4 | paliarush/fastly-magento2 | etc/vcl_snippets_image_optimizations/recv.vcl | [
"BSD-3-Clause"
] |
(kicad_pcb (version 20171130) (host pcbnew 5.1.9-73d0e3b20d~88~ubuntu20.04.1)
(general
(thickness 1.6)
(drawings 21)
(tracks 157)
(zones 0)
(modules 6)
(nets 11)
)
(page A4)
(layers
(0 F.Cu signal)
(31 B.Cu signal)
(32 B.Adhes user)
(33 F.Adhes user)
(34 B.Paste user)
(35 F.Paste user)
(36 B.SilkS user)
(37 F.SilkS user)
(38 B.Mask user)
(39 F.Mask user)
(40 Dwgs.User user)
(41 Cmts.User user)
(42 Eco1.User user)
(43 Eco2.User user)
(44 Edge.Cuts user)
(45 Margin user)
(46 B.CrtYd user)
(47 F.CrtYd user)
(48 B.Fab user)
(49 F.Fab user)
)
(setup
(last_trace_width 0.25)
(user_trace_width 0.2)
(user_trace_width 0.5)
(user_trace_width 1)
(user_trace_width 1.2)
(trace_clearance 0.2)
(zone_clearance 0.508)
(zone_45_only no)
(trace_min 0.2)
(via_size 0.8)
(via_drill 0.4)
(via_min_size 0.4)
(via_min_drill 0.3)
(user_via 0.6 0.3)
(user_via 0.8 0.5)
(uvia_size 0.3)
(uvia_drill 0.1)
(uvias_allowed no)
(uvia_min_size 0.2)
(uvia_min_drill 0.1)
(edge_width 0.15)
(segment_width 0.2)
(pcb_text_width 0.3)
(pcb_text_size 1.5 1.5)
(mod_edge_width 0.15)
(mod_text_size 1 1)
(mod_text_width 0.15)
(pad_size 1.524 1.524)
(pad_drill 0.762)
(pad_to_mask_clearance 0.051)
(solder_mask_min_width 0.25)
(aux_axis_origin 0 0)
(visible_elements FFFFFF7F)
(pcbplotparams
(layerselection 0x010fc_ffffffff)
(usegerberextensions false)
(usegerberattributes false)
(usegerberadvancedattributes false)
(creategerberjobfile false)
(excludeedgelayer true)
(linewidth 0.100000)
(plotframeref false)
(viasonmask false)
(mode 1)
(useauxorigin false)
(hpglpennumber 1)
(hpglpenspeed 20)
(hpglpendiameter 15.000000)
(psnegative false)
(psa4output false)
(plotreference true)
(plotvalue true)
(plotinvisibletext false)
(padsonsilk false)
(subtractmaskfromsilk false)
(outputformat 1)
(mirror false)
(drillshape 1)
(scaleselection 1)
(outputdirectory ""))
)
(net 0 "")
(net 1 1)
(net 2 2)
(net 3 3)
(net 4 4)
(net 5 5)
(net 6 6)
(net 7 7)
(net 8 8)
(net 9 9)
(net 10 "Net-(J4-Pad6)")
(net_class Default "This is the default net class."
(clearance 0.2)
(trace_width 0.25)
(via_dia 0.8)
(via_drill 0.4)
(uvia_dia 0.3)
(uvia_drill 0.1)
(add_net 1)
(add_net 2)
(add_net 3)
(add_net 4)
(add_net 5)
(add_net 6)
(add_net 7)
(add_net 8)
(add_net 9)
(add_net "Net-(J4-Pad6)")
)
(module rofi:molex-505004-0812 (layer F.Cu) (tedit 5FEB03D2) (tstamp 5D6FC0A4)
(at 118.5 65.5 180)
(path /5D6FDCDA)
(fp_text reference J4 (at 0 3.3 180) (layer F.SilkS) hide
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value Molex (at 0 -3.2 180) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -2.1 1.25) (end -1.2 1.25) (layer F.SilkS) (width 0.15))
(fp_line (start -2.1 -1.25) (end 2.1 -1.25) (layer F.Fab) (width 0.12))
(fp_line (start 2.1 -1.25) (end 2.1 1.25) (layer F.Fab) (width 0.12))
(fp_line (start 2.1 1.25) (end -2.1 1.25) (layer F.Fab) (width 0.12))
(fp_line (start -2.1 1.25) (end -2.1 -1.25) (layer F.Fab) (width 0.12))
(fp_poly (pts (xy -1.2 -0.9) (xy 1.2 -0.9) (xy 1.2 0.9) (xy -1.2 0.9)) (layer Dwgs.User) (width 0.1))
(fp_line (start -1.6 -1.5) (end -2.4 -1.5) (layer F.SilkS) (width 0.15))
(fp_line (start -2.4 -1.5) (end -2.4 -0.7) (layer F.SilkS) (width 0.15))
(fp_line (start -2.1 -0.6) (end -2.1 1.25) (layer F.SilkS) (width 0.15))
(fp_line (start 1.2 1.25) (end 2.1 1.25) (layer F.SilkS) (width 0.15))
(fp_line (start 2.1 1.25) (end 2.1 -1.25) (layer F.SilkS) (width 0.15))
(fp_line (start 2.1 -1.25) (end 1.3 -1.25) (layer F.SilkS) (width 0.15))
(pad 8 smd rect (at 0.8 1.7 180) (size 0.55 1.524) (layers F.Cu F.Paste F.Mask)
(net 1 1))
(pad 6 smd rect (at 0.2 1.7 180) (size 0.2 1.524) (layers F.Cu F.Paste F.Mask)
(net 10 "Net-(J4-Pad6)"))
(pad 4 smd rect (at -0.2 1.7 180) (size 0.2 1.524) (layers F.Cu F.Paste F.Mask)
(net 7 7))
(pad 2 smd rect (at -0.8 1.7 180) (size 0.55 1.524) (layers F.Cu F.Paste F.Mask)
(net 4 4))
(pad 5 smd rect (at 0.2 -1.7 180) (size 0.2 1.524) (layers F.Cu F.Paste F.Mask)
(net 6 6))
(pad 7 smd rect (at 0.8 -1.7 180) (size 0.55 1.524) (layers F.Cu F.Paste F.Mask)
(net 2 2))
(pad 1 smd rect (at -0.8 -1.7 180) (size 0.55 1.524) (layers F.Cu F.Paste F.Mask)
(net 3 3))
(pad 3 smd rect (at -0.2 -1.7 180) (size 0.2 1.524) (layers F.Cu F.Paste F.Mask)
(net 5 5))
)
(module Connector_PinSocket_2.00mm:PinSocket_1x09_P2.00mm_Vertical (layer F.Cu) (tedit 5C8A47CA) (tstamp 5C9AEE22)
(at 110.5 60 90)
(descr "Through hole straight socket strip, 1x09, 2.00mm pitch, single row (from Kicad 4.0.7), script generated")
(tags "Through hole socket strip THT 1x09 2.00mm single row")
(path /5C8A47A6)
(fp_text reference J2 (at 0 -2.5 90) (layer F.SilkS) hide
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value OUT (at 0 18.5 90) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -1 -1) (end 0.5 -1) (layer F.Fab) (width 0.1))
(fp_line (start 0.5 -1) (end 1 -0.5) (layer F.Fab) (width 0.1))
(fp_line (start 1 -0.5) (end 1 17) (layer F.Fab) (width 0.1))
(fp_line (start 1 17) (end -1 17) (layer F.Fab) (width 0.1))
(fp_line (start -1 17) (end -1 -1) (layer F.Fab) (width 0.1))
(fp_line (start -1.06 1) (end 1.06 1) (layer F.SilkS) (width 0.12))
(fp_line (start -1.06 1) (end -1.06 17.06) (layer F.SilkS) (width 0.12))
(fp_line (start -1.06 17.06) (end 1.06 17.06) (layer F.SilkS) (width 0.12))
(fp_line (start 1.06 1) (end 1.06 17.06) (layer F.SilkS) (width 0.12))
(fp_line (start 1.06 -1.06) (end 1.06 0) (layer F.SilkS) (width 0.12))
(fp_line (start 0 -1.06) (end 1.06 -1.06) (layer F.SilkS) (width 0.12))
(fp_line (start -1.5 -1.5) (end 1.5 -1.5) (layer F.CrtYd) (width 0.05))
(fp_line (start 1.5 -1.5) (end 1.5 17.5) (layer F.CrtYd) (width 0.05))
(fp_line (start 1.5 17.5) (end -1.5 17.5) (layer F.CrtYd) (width 0.05))
(fp_line (start -1.5 17.5) (end -1.5 -1.5) (layer F.CrtYd) (width 0.05))
(fp_text user %R (at 0 8 180) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(pad 9 thru_hole oval (at 0 16 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 9 9))
(pad 8 thru_hole oval (at 0 14 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 8 8))
(pad 7 thru_hole oval (at 0 12 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 7 7))
(pad 6 thru_hole oval (at 0 10 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 6 6))
(pad 5 thru_hole oval (at 0 8 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 5 5))
(pad 4 thru_hole oval (at 0 6 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 4 4))
(pad 3 thru_hole oval (at 0 4 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 3 3))
(pad 2 thru_hole oval (at 0 2 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 2 2))
(pad 1 thru_hole rect (at 0 0 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 1 1))
(model ${KISYS3DMOD}/Connector_PinSocket_2.00mm.3dshapes/PinSocket_1x09_P2.00mm_Vertical.wrl
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)
(module Connector_PinSocket_2.00mm:PinSocket_1x09_P2.00mm_Vertical (layer F.Cu) (tedit 5C8A47CE) (tstamp 5C9AEE06)
(at 110.5 76 90)
(descr "Through hole straight socket strip, 1x09, 2.00mm pitch, single row (from Kicad 4.0.7), script generated")
(tags "Through hole socket strip THT 1x09 2.00mm single row")
(path /5C8A482C)
(fp_text reference J1 (at 0 -2.5 90) (layer F.SilkS) hide
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value IN (at 0 18.5 90) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_line (start -1.5 17.5) (end -1.5 -1.5) (layer F.CrtYd) (width 0.05))
(fp_line (start 1.5 17.5) (end -1.5 17.5) (layer F.CrtYd) (width 0.05))
(fp_line (start 1.5 -1.5) (end 1.5 17.5) (layer F.CrtYd) (width 0.05))
(fp_line (start -1.5 -1.5) (end 1.5 -1.5) (layer F.CrtYd) (width 0.05))
(fp_line (start 0 -1.06) (end 1.06 -1.06) (layer F.SilkS) (width 0.12))
(fp_line (start 1.06 -1.06) (end 1.06 0) (layer F.SilkS) (width 0.12))
(fp_line (start 1.06 1) (end 1.06 17.06) (layer F.SilkS) (width 0.12))
(fp_line (start -1.06 17.06) (end 1.06 17.06) (layer F.SilkS) (width 0.12))
(fp_line (start -1.06 1) (end -1.06 17.06) (layer F.SilkS) (width 0.12))
(fp_line (start -1.06 1) (end 1.06 1) (layer F.SilkS) (width 0.12))
(fp_line (start -1 17) (end -1 -1) (layer F.Fab) (width 0.1))
(fp_line (start 1 17) (end -1 17) (layer F.Fab) (width 0.1))
(fp_line (start 1 -0.5) (end 1 17) (layer F.Fab) (width 0.1))
(fp_line (start 0.5 -1) (end 1 -0.5) (layer F.Fab) (width 0.1))
(fp_line (start -1 -1) (end 0.5 -1) (layer F.Fab) (width 0.1))
(fp_text user %R (at 0 8 180) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(pad 1 thru_hole rect (at 0 0 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 1 1))
(pad 2 thru_hole oval (at 0 2 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 2 2))
(pad 3 thru_hole oval (at 0 4 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 3 3))
(pad 4 thru_hole oval (at 0 6 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 4 4))
(pad 5 thru_hole oval (at 0 8 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 5 5))
(pad 6 thru_hole oval (at 0 10 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 6 6))
(pad 7 thru_hole oval (at 0 12 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 7 7))
(pad 8 thru_hole oval (at 0 14 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 8 8))
(pad 9 thru_hole oval (at 0 16 90) (size 1.35 1.35) (drill 0.8) (layers *.Cu *.Mask)
(net 9 9))
(model ${KISYS3DMOD}/Connector_PinSocket_2.00mm.3dshapes/PinSocket_1x09_P2.00mm_Vertical.wrl
(at (xyz 0 0 0))
(scale (xyz 1 1 1))
(rotate (xyz 0 0 0))
)
)
(module MountingHole:MountingHole_2mm (layer F.Cu) (tedit 5C8A4532) (tstamp 5C9A4BBE)
(at 107.8 67.9)
(descr "Mounting Hole 2mm, no annular")
(tags "mounting hole 2mm no annular")
(path /5C8A456A)
(attr virtual)
(fp_text reference H2 (at 0 -3.2) (layer F.SilkS) hide
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value MountingHole (at 0 3.1) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_circle (center 0 0) (end 2 0) (layer Cmts.User) (width 0.15))
(fp_circle (center 0 0) (end 2.25 0) (layer F.CrtYd) (width 0.05))
(fp_text user %R (at 0.3 0) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(pad "" np_thru_hole circle (at 0 0) (size 2 2) (drill 2) (layers *.Cu *.Mask))
)
(module MountingHole:MountingHole_2mm (layer F.Cu) (tedit 5C8A4536) (tstamp 5C9A4BB6)
(at 129.2 68)
(descr "Mounting Hole 2mm, no annular")
(tags "mounting hole 2mm no annular")
(path /5C8A451E)
(attr virtual)
(fp_text reference H1 (at 0 -3.2) (layer F.SilkS) hide
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value MountingHole (at 0 3.1) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_circle (center 0 0) (end 2.25 0) (layer F.CrtYd) (width 0.05))
(fp_circle (center 0 0) (end 2 0) (layer Cmts.User) (width 0.15))
(fp_text user %R (at 0.3 0) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(pad "" np_thru_hole circle (at 0 0) (size 2 2) (drill 2) (layers *.Cu *.Mask))
)
(module rofi:pogo_pads_4_3 (layer F.Cu) (tedit 5C8A424D) (tstamp 5C999B9D)
(at 118.5 70)
(path /5C8A40F9)
(fp_text reference J3 (at 0 4.5) (layer F.SilkS) hide
(effects (font (size 1 1) (thickness 0.15)))
)
(fp_text value POGO (at 0 -2.25) (layer F.Fab)
(effects (font (size 1 1) (thickness 0.15)))
)
(pad 1 smd circle (at -4.5 0) (size 2.5 2.5) (layers F.Cu F.Paste F.Mask)
(net 1 1))
(pad 2 smd circle (at -1.5 0) (size 2.5 2.5) (layers F.Cu F.Paste F.Mask)
(net 2 2))
(pad 3 smd circle (at 1.5 0) (size 2.5 2.5) (layers F.Cu F.Paste F.Mask)
(net 3 3))
(pad 4 smd circle (at 4.5 0) (size 2.5 2.5) (layers F.Cu F.Paste F.Mask)
(net 4 4))
(pad 5 smd circle (at -3 2.5) (size 2.5 2.5) (layers F.Cu F.Paste F.Mask)
(net 5 5))
(pad 6 smd circle (at 0 2.5) (size 2.5 2.5) (layers F.Cu F.Paste F.Mask)
(net 6 6))
(pad 7 smd circle (at 3 2.5) (size 2.5 2.5) (layers F.Cu F.Paste F.Mask)
(net 7 7))
)
(gr_text TabPosition (at 141 71) (layer Eco1.User) (tstamp 5EB19712)
(effects (font (size 1 1) (thickness 0.15)))
)
(gr_text TabPosition (at 96 64) (layer Eco1.User) (tstamp 5EB1970B)
(effects (font (size 1 1) (thickness 0.15)))
)
(gr_line (start 103 64) (end 107 64) (layer Eco1.User) (width 0.15) (tstamp 5EB196FD))
(gr_line (start 134 71) (end 130 71) (layer Eco1.User) (width 0.15))
(gr_text TabPosition (at 125 82) (layer Eco2.User) (tstamp 5EB196DD)
(effects (font (size 1 1) (thickness 0.15)))
)
(gr_text TabPosition (at 112 53) (layer Eco2.User)
(effects (font (size 1 1) (thickness 0.15)))
)
(gr_line (start 125 79) (end 125 76) (layer Eco2.User) (width 0.15) (tstamp 5EB196BA))
(gr_line (start 112 57) (end 112 60) (layer Eco2.User) (width 0.15))
(gr_text "PogoPads\nv0.2 9/2019\nro.fi.muni.cz" (at 118.5 70.5) (layer B.SilkS)
(effects (font (size 1.5 1.5) (thickness 0.3)) (justify mirror))
)
(gr_text 7 (at 124 72.5) (layer F.SilkS)
(effects (font (size 1.5 1.5) (thickness 0.3)))
)
(gr_text 5 (at 113 72.5) (layer F.SilkS)
(effects (font (size 1.5 1.5) (thickness 0.3)))
)
(gr_text 4 (at 125.5 70) (layer F.SilkS)
(effects (font (size 1.5 1.5) (thickness 0.3)))
)
(gr_text 1 (at 112 70) (layer F.SilkS)
(effects (font (size 1.5 1.5) (thickness 0.3)))
)
(gr_line (start 108 59) (end 129 59) (layer Edge.Cuts) (width 0.2) (tstamp 5C9B08FC))
(gr_arc (start 129 74.5) (end 129 77) (angle -90) (layer Edge.Cuts) (width 0.15))
(gr_arc (start 108 74.5) (end 105.5 74.5) (angle -90) (layer Edge.Cuts) (width 0.15))
(gr_arc (start 108 61.5) (end 108 59) (angle -90) (layer Edge.Cuts) (width 0.15))
(gr_arc (start 129 61.5) (end 131.5 61.5) (angle -90) (layer Edge.Cuts) (width 0.15))
(gr_line (start 131.5 74.5) (end 131.5 61.5) (layer Edge.Cuts) (width 0.2))
(gr_line (start 108 77) (end 129 77) (layer Edge.Cuts) (width 0.2))
(gr_line (start 105.5 61.5) (end 105.5 74.5) (layer Edge.Cuts) (width 0.2))
(segment (start 110.5 60) (end 110.5 76) (width 1.2) (layer B.Cu) (net 1))
(segment (start 110.5 66.5) (end 114 70) (width 1.2) (layer F.Cu) (net 1))
(segment (start 110.5 63.575) (end 110.5 66.5) (width 1.2) (layer F.Cu) (net 1))
(segment (start 116.8 63.8) (end 110.725 63.8) (width 1.2) (layer F.Cu) (net 1))
(segment (start 116.8 63.8) (end 117.7 63.8) (width 0.5) (layer F.Cu) (net 1))
(segment (start 110.725 63.8) (end 110.5 63.575) (width 1.2) (layer F.Cu) (net 1))
(segment (start 110.5 63.575) (end 110.5 60.8) (width 1.2) (layer F.Cu) (net 1))
(segment (start 117 69.454594) (end 117 70) (width 1.5) (layer F.Cu) (net 2))
(segment (start 117 69.743998) (end 117 70) (width 1.5) (layer F.Cu) (net 2))
(segment (start 117 67.9) (end 117.7 67.2) (width 0.5) (layer F.Cu) (net 2))
(via (at 116.000002 68.1) (size 0.8) (drill 0.4) (layers F.Cu B.Cu) (net 2))
(via (at 116 66.9) (size 0.8) (drill 0.4) (layers F.Cu B.Cu) (net 2))
(segment (start 116.000002 68.1) (end 116.000002 66.900002) (width 1.2) (layer F.Cu) (net 2))
(segment (start 116.000002 66.900002) (end 116 66.9) (width 1.2) (layer F.Cu) (net 2))
(segment (start 116.000002 68.1) (end 116.000002 69.000002) (width 1.2) (layer F.Cu) (net 2))
(segment (start 115.232184 62.875011) (end 116 63.642827) (width 1.2) (layer B.Cu) (net 2))
(segment (start 116 63.642827) (end 116 69.5) (width 1.2) (layer B.Cu) (net 2))
(segment (start 115.212096 62.875011) (end 115.232184 62.875011) (width 1.2) (layer B.Cu) (net 2))
(segment (start 113.791999 74.524999) (end 113.024999 75.291999) (width 1.2) (layer B.Cu) (net 2))
(segment (start 113.791999 61.475001) (end 113.812086 61.475001) (width 1.2) (layer B.Cu) (net 2))
(segment (start 116.5 70) (end 116 69.5) (width 1.2) (layer F.Cu) (net 2))
(segment (start 113.024999 60.708001) (end 113.791999 61.475001) (width 1.2) (layer B.Cu) (net 2))
(segment (start 117 70) (end 116.5 70) (width 1.2) (layer F.Cu) (net 2))
(segment (start 113.812086 61.475001) (end 115.212096 62.875011) (width 1.2) (layer B.Cu) (net 2))
(segment (start 112.5 60) (end 113.024999 60.524999) (width 1.2) (layer B.Cu) (net 2))
(segment (start 113.024999 75.475001) (end 112.5 76) (width 1.2) (layer B.Cu) (net 2))
(segment (start 113.812087 74.524999) (end 113.791999 74.524999) (width 1.2) (layer B.Cu) (net 2))
(segment (start 116.000002 69.000002) (end 117 70) (width 1.2) (layer F.Cu) (net 2))
(via (at 116 69.5) (size 0.8) (drill 0.4) (layers F.Cu B.Cu) (net 2))
(segment (start 113.024999 60.524999) (end 113.024999 60.708001) (width 1.2) (layer B.Cu) (net 2))
(segment (start 113.024999 75.291999) (end 113.024999 75.475001) (width 1.2) (layer B.Cu) (net 2))
(segment (start 116 72.337086) (end 113.812087 74.524999) (width 1.2) (layer B.Cu) (net 2))
(segment (start 116 69.5) (end 116 72.337086) (width 1.2) (layer B.Cu) (net 2))
(segment (start 116.000002 69.000002) (end 116.000002 66.900002) (width 1.2) (layer F.Cu) (net 2))
(segment (start 117.3 67.1) (end 117 67.4) (width 1.2) (layer F.Cu) (net 2))
(segment (start 117 67.4) (end 117 70) (width 1.2) (layer F.Cu) (net 2))
(segment (start 120 70) (end 120 69.743998) (width 1.5) (layer F.Cu) (net 3))
(segment (start 120 67.9) (end 119.3 67.2) (width 0.5) (layer F.Cu) (net 3))
(segment (start 120 70) (end 120 67.9) (width 0.5) (layer F.Cu) (net 3))
(segment (start 115.024999 60.708001) (end 115.024999 60.524999) (width 1.2) (layer B.Cu) (net 3))
(segment (start 115.024999 75.475001) (end 115.024999 75.291999) (width 1.2) (layer B.Cu) (net 3))
(segment (start 115.791999 61.475001) (end 115.024999 60.708001) (width 1.2) (layer B.Cu) (net 3))
(segment (start 118.89994 64.522679) (end 118.652282 64.275021) (width 1.2) (layer B.Cu) (net 3))
(segment (start 117.232184 62.875011) (end 117.212096 62.875011) (width 1.2) (layer B.Cu) (net 3))
(segment (start 114.5 76) (end 115.024999 75.475001) (width 1.2) (layer B.Cu) (net 3))
(segment (start 115.024999 75.291999) (end 118.89994 71.417058) (width 1.2) (layer B.Cu) (net 3))
(segment (start 115.024999 60.524999) (end 114.5 60) (width 1.2) (layer B.Cu) (net 3))
(segment (start 118.652282 64.275021) (end 118.632193 64.275021) (width 1.2) (layer B.Cu) (net 3))
(segment (start 118.632193 64.275021) (end 117.232184 62.875011) (width 1.2) (layer B.Cu) (net 3))
(segment (start 117.212096 62.875011) (end 115.812086 61.475001) (width 1.2) (layer B.Cu) (net 3))
(segment (start 115.812086 61.475001) (end 115.791999 61.475001) (width 1.2) (layer B.Cu) (net 3))
(via (at 118.89994 68.59994) (size 0.8) (drill 0.4) (layers F.Cu B.Cu) (net 3))
(segment (start 120 69.7) (end 118.89994 68.59994) (width 0.5) (layer F.Cu) (net 3))
(segment (start 120 70) (end 120 69.7) (width 0.5) (layer F.Cu) (net 3))
(segment (start 118.89994 68.59994) (end 118.89994 64.522679) (width 1.2) (layer B.Cu) (net 3))
(via (at 118.89994 69.59994) (size 0.8) (drill 0.4) (layers F.Cu B.Cu) (net 3))
(segment (start 119.3 70) (end 118.89994 69.59994) (width 0.5) (layer F.Cu) (net 3))
(segment (start 120 70) (end 119.3 70) (width 0.5) (layer F.Cu) (net 3))
(segment (start 118.89994 71.417058) (end 118.89994 69.59994) (width 1.2) (layer B.Cu) (net 3))
(segment (start 118.89994 69.59994) (end 118.89994 68.59994) (width 1.2) (layer B.Cu) (net 3))
(segment (start 120 70) (end 119.5 70) (width 0.5) (layer F.Cu) (net 3))
(segment (start 119.5 70) (end 118.9 70.6) (width 0.5) (layer F.Cu) (net 3))
(via (at 118.9 70.6) (size 0.8) (drill 0.4) (layers F.Cu B.Cu) (net 3))
(segment (start 119.3 63.8) (end 119.3 62) (width 0.5) (layer F.Cu) (net 4))
(segment (start 117.791999 74.524999) (end 117.024999 75.291999) (width 1.2) (layer B.Cu) (net 4))
(segment (start 119.212096 73.124989) (end 117.812086 74.524999) (width 1.2) (layer B.Cu) (net 4))
(segment (start 120.29995 63.942777) (end 120.29995 72.057222) (width 1.2) (layer B.Cu) (net 4))
(segment (start 119.232184 62.875011) (end 120.29995 63.942777) (width 1.2) (layer B.Cu) (net 4))
(segment (start 119.212096 62.875011) (end 119.232184 62.875011) (width 1.2) (layer B.Cu) (net 4))
(segment (start 117.024999 75.291999) (end 117.024999 75.475001) (width 1.2) (layer B.Cu) (net 4))
(segment (start 117.812086 61.475001) (end 119.212096 62.875011) (width 1.2) (layer B.Cu) (net 4))
(segment (start 117.791999 61.475001) (end 117.812086 61.475001) (width 1.2) (layer B.Cu) (net 4))
(segment (start 117.024999 60.524999) (end 117.024999 60.708001) (width 1.2) (layer B.Cu) (net 4))
(segment (start 116.5 60) (end 117.024999 60.524999) (width 1.2) (layer B.Cu) (net 4))
(segment (start 117.812086 74.524999) (end 117.791999 74.524999) (width 1.2) (layer B.Cu) (net 4))
(segment (start 117.024999 60.708001) (end 117.791999 61.475001) (width 1.2) (layer B.Cu) (net 4))
(segment (start 119.232183 73.124989) (end 119.212096 73.124989) (width 1.2) (layer B.Cu) (net 4))
(segment (start 120.29995 72.057222) (end 119.232183 73.124989) (width 1.2) (layer B.Cu) (net 4))
(segment (start 117.024999 75.475001) (end 116.5 76) (width 1.2) (layer B.Cu) (net 4))
(segment (start 116.5 61) (end 117.5 62) (width 1.2) (layer F.Cu) (net 4))
(segment (start 117.5 62) (end 119.3 62) (width 1.2) (layer F.Cu) (net 4))
(segment (start 116.5 60) (end 116.5 61) (width 1.2) (layer F.Cu) (net 4))
(segment (start 125.5 67.5) (end 123 70) (width 1.2) (layer F.Cu) (net 4))
(segment (start 125.5 65.323998) (end 125.5 67.5) (width 1.2) (layer F.Cu) (net 4))
(segment (start 122.176002 62) (end 125.5 65.323998) (width 1.2) (layer F.Cu) (net 4))
(segment (start 119.3 62) (end 122.176002 62) (width 1.2) (layer F.Cu) (net 4))
(segment (start 115.5 72.5) (end 118.5 75.5) (width 1.2) (layer F.Cu) (net 5))
(via (at 121.7 66.8) (size 0.8) (drill 0.4) (layers F.Cu B.Cu) (net 5))
(segment (start 120.8 65.9) (end 121.7 66.8) (width 0.2) (layer F.Cu) (net 5))
(segment (start 119.022998 65.9) (end 120.8 65.9) (width 0.2) (layer F.Cu) (net 5))
(segment (start 118.7 67.2) (end 118.7 66.222998) (width 0.2) (layer F.Cu) (net 5))
(segment (start 118.7 66.222998) (end 119.022998 65.9) (width 0.2) (layer F.Cu) (net 5))
(segment (start 119.791999 61.475001) (end 119.812086 61.475001) (width 1.2) (layer B.Cu) (net 5))
(segment (start 121.212096 73.124989) (end 119.812086 74.524999) (width 1.2) (layer B.Cu) (net 5))
(segment (start 121.232184 73.124989) (end 121.212096 73.124989) (width 1.2) (layer B.Cu) (net 5))
(segment (start 121.69996 72.657213) (end 121.232184 73.124989) (width 1.2) (layer B.Cu) (net 5))
(segment (start 119.812086 74.524999) (end 119.791999 74.524999) (width 1.2) (layer B.Cu) (net 5))
(segment (start 121.69996 63.342787) (end 121.69996 72.657213) (width 1.2) (layer B.Cu) (net 5))
(segment (start 121.212096 62.875011) (end 121.232184 62.875011) (width 1.2) (layer B.Cu) (net 5))
(segment (start 118.5 60) (end 119.024999 60.524999) (width 1.2) (layer B.Cu) (net 5))
(segment (start 119.024999 75.475001) (end 118.5 76) (width 1.2) (layer B.Cu) (net 5))
(segment (start 119.024999 60.524999) (end 119.024999 60.708001) (width 1.2) (layer B.Cu) (net 5))
(segment (start 119.024999 60.708001) (end 119.791999 61.475001) (width 1.2) (layer B.Cu) (net 5))
(segment (start 121.232184 62.875011) (end 121.69996 63.342787) (width 1.2) (layer B.Cu) (net 5))
(segment (start 119.024999 75.291999) (end 119.024999 75.475001) (width 1.2) (layer B.Cu) (net 5))
(segment (start 119.791999 74.524999) (end 119.024999 75.291999) (width 1.2) (layer B.Cu) (net 5))
(segment (start 119.812086 61.475001) (end 121.212096 62.875011) (width 1.2) (layer B.Cu) (net 5))
(segment (start 118.5 72.5) (end 118.5 72.756002) (width 1.5) (layer F.Cu) (net 6))
(segment (start 121.024999 75.291999) (end 121.024999 75.475001) (width 1.2) (layer B.Cu) (net 6))
(segment (start 118.3 67.2) (end 118.3 65.8) (width 0.2) (layer F.Cu) (net 6))
(segment (start 118.6 65.5) (end 121.765685 65.5) (width 0.2) (layer F.Cu) (net 6))
(segment (start 121.024999 60.524999) (end 121.024999 60.708001) (width 1.2) (layer B.Cu) (net 6))
(segment (start 121.812086 74.524999) (end 121.791999 74.524999) (width 1.2) (layer B.Cu) (net 6))
(segment (start 123.09997 62.762885) (end 123.09997 67.39997) (width 1.2) (layer B.Cu) (net 6))
(segment (start 121.024999 60.708001) (end 121.791999 61.475001) (width 1.2) (layer B.Cu) (net 6))
(segment (start 121.812086 61.475001) (end 123.09997 62.762885) (width 1.2) (layer B.Cu) (net 6))
(segment (start 123.09997 66.834285) (end 123.09997 67.39997) (width 0.2) (layer F.Cu) (net 6))
(segment (start 121.024999 75.475001) (end 120.5 76) (width 1.2) (layer B.Cu) (net 6))
(segment (start 121.791999 61.475001) (end 121.812086 61.475001) (width 1.2) (layer B.Cu) (net 6))
(segment (start 120.5 60) (end 121.024999 60.524999) (width 1.2) (layer B.Cu) (net 6))
(segment (start 121.765685 65.5) (end 123.09997 66.834285) (width 0.2) (layer F.Cu) (net 6))
(segment (start 121.791999 74.524999) (end 121.024999 75.291999) (width 1.2) (layer B.Cu) (net 6))
(segment (start 123.09997 67.39997) (end 123.09997 73.237115) (width 1.2) (layer B.Cu) (net 6))
(segment (start 118.3 65.8) (end 118.6 65.5) (width 0.2) (layer F.Cu) (net 6))
(via (at 123.09997 67.39997) (size 0.8) (drill 0.4) (layers F.Cu B.Cu) (net 6))
(segment (start 123.09997 73.237115) (end 121.812086 74.524999) (width 1.2) (layer B.Cu) (net 6))
(segment (start 120.5 74.5) (end 120.5 76) (width 1.2) (layer F.Cu) (net 6))
(segment (start 118.5 72.5) (end 120.5 74.5) (width 1.2) (layer F.Cu) (net 6))
(segment (start 124.49998 67.165631) (end 124.49998 66.599946) (width 1.2) (layer B.Cu) (net 7))
(segment (start 123.174999 60.837913) (end 124.49998 62.162894) (width 1.2) (layer B.Cu) (net 7))
(via (at 124.49998 66.599946) (size 0.8) (drill 0.4) (layers F.Cu B.Cu) (net 7))
(segment (start 123.174999 75.325001) (end 123.174999 75.162086) (width 1.2) (layer B.Cu) (net 7))
(segment (start 122.5 60) (end 123.174999 60.674999) (width 1.2) (layer B.Cu) (net 7))
(segment (start 123.174999 75.162086) (end 124.49998 73.837105) (width 1.2) (layer B.Cu) (net 7))
(segment (start 123.000034 65.1) (end 124.099981 66.199947) (width 0.2) (layer F.Cu) (net 7))
(segment (start 122.5 76) (end 123.174999 75.325001) (width 1.2) (layer B.Cu) (net 7))
(segment (start 124.099981 66.199947) (end 124.49998 66.599946) (width 0.2) (layer F.Cu) (net 7))
(segment (start 118.7 64.762) (end 119.038 65.1) (width 0.2) (layer F.Cu) (net 7))
(segment (start 119.038 65.1) (end 123.000034 65.1) (width 0.2) (layer F.Cu) (net 7))
(segment (start 124.49998 73.837105) (end 124.49998 67.165631) (width 1.2) (layer B.Cu) (net 7))
(segment (start 123.174999 60.674999) (end 123.174999 60.837913) (width 1.2) (layer B.Cu) (net 7))
(segment (start 124.49998 66.034261) (end 124.49998 66.599946) (width 1.2) (layer B.Cu) (net 7))
(segment (start 118.7 63.8) (end 118.7 64.762) (width 0.2) (layer F.Cu) (net 7))
(segment (start 124.49998 62.162894) (end 124.49998 66.034261) (width 1.2) (layer B.Cu) (net 7))
(segment (start 122.5 73.5) (end 122.5 76) (width 1.2) (layer F.Cu) (net 7))
(segment (start 121.5 72.5) (end 122.5 73.5) (width 1.2) (layer F.Cu) (net 7))
(segment (start 125.174999 75.325001) (end 124.5 76) (width 1.2) (layer B.Cu) (net 8))
(segment (start 125.174999 60.674999) (end 125.174999 60.857999) (width 1.2) (layer B.Cu) (net 8))
(segment (start 125.174999 75.142) (end 125.174999 75.325001) (width 1.2) (layer B.Cu) (net 8))
(segment (start 124.5 60) (end 125.174999 60.674999) (width 1.2) (layer B.Cu) (net 8))
(segment (start 125.90001 61.58301) (end 125.90001 74.416989) (width 1.2) (layer B.Cu) (net 8))
(segment (start 125.90001 74.416989) (end 125.174999 75.142) (width 1.2) (layer B.Cu) (net 8))
(segment (start 125.174999 60.857999) (end 125.90001 61.58301) (width 1.2) (layer B.Cu) (net 8))
(segment (start 127.30002 60.80002) (end 127.30002 75.19998) (width 1.2) (layer B.Cu) (net 9))
(segment (start 126.5 60) (end 127.30002 60.80002) (width 1.2) (layer B.Cu) (net 9))
(segment (start 127.30002 75.19998) (end 127.174999 75.325001) (width 1.2) (layer B.Cu) (net 9))
(segment (start 127.174999 75.325001) (end 126.5 76) (width 1.2) (layer B.Cu) (net 9))
)
| KiCad | 5 | patrykf03/KiKit | test/resources/conn-fail.kicad_pcb | [
"MIT"
] |
~VERSION INFORMATION
VERS. 2.0 : CWLS LOG ASCII STANDARD -VERSION 2.0
WRAP. NO : ONE LINE PER TIME STEP
#
~WELL INFORMATION
STRT .S 0.0000 :START TIME
STOP .S 39.9000 :STOP TIME
STEP .S 0.3000 :STEP
NULL . -999.25 :NULL VALUE
COMP . ANY OIL COMPANY INC. :COMPANY
WELL . ANY ET 12-34-12-34 :WELL
FLD . WILDCAT :FIELD
LOC . 12-34-12-34W5 :LOCATION
PROV . ALBERTA :PROVINCE
SRVC . ANY LOGGING COMPANY INC. :SERVICE COMPANY
DATE . 13-DEC-86 :LOG DATE
UWI . 100123401234W500 :UNIQUE WELL ID
#
~CURVE INFORMATION
ETIM .S : 1 ELAPSED TIME
BFR1 .OHMM : 2 SINGLE PROBE 1 RESISTIVITY
BSG1 .PSIG : 3 SINGLE PROBE 1 STRAIN GAUGE PRESSURE
#
~PARAMETER INFORMATION
MRT .DEGC 67.0 : BOTTOM HOLE TEMPERATURE
GDEPT .M 3456.5 : GAUGE DEPTH
DFD .KG/M3 1000.0 : MUD WEIGHT
#
~A
0.0000 0.2125 16564.1445
0.3000 0.2125 16564.1445
0.6000 0.2125 16564.2421
0.9000 0.2125 16564.0434
1.2000 0.2125 16564.0430
1.5000 0.2125 16564.0435
| Lasso | 2 | tui95/lasio | tests/examples/2.0/sample_2.0_based.las | [
"MIT"
] |
\ Return the output of a system command as a string.
\ Examples:
\ " hostname" $system$ type
\ " hostname -I" $system$ -newline type
\ " date" $system type
\ Removes, if present, a single instance of the given character from
\ the end of the string
: ?remove ( adr len char -- adr len' )
over 0= if drop exit then ( adr len char )
2 pick 2 pick + 1- c@ = if 1- then ( adr len' )
;
\ Removes, if present, a newline sequence from the end of the string
: -newline ( adr len -- adr len' ) $0a ?remove $0d ?remove ;
#4096 buffer: system-buf
\ If the command returned an error code it might be in this value
0 value system-retval
\ Executes the system command cmd$, returning its output (limited to
\ 4096 characters) as a string,
: $system$ ( cmd$ -- result$ )
" popen:%s" sprintf r/o open-file abort" Can't run command" >r ( r:fd )
system-buf #1024 r@ read-file abort" Can't read popen output" ( len r:fd )
r> close-file to system-retval ( len )
system-buf swap ( result$ )
;
| Forth | 4 | andrewtholt/cforth-ath | src/app/bluez/system.fth | [
"MIT"
] |
lines(0);
ilib_verbose(0);
ierr = exec('loader.sce', 'errcatch');
if ierr <> 0 then
disp(lasterror());
exit(ierr);
end
a = 37
b = 42
// Now call our C function with a bunch of callbacks
printf("Trying some C callback functions\n");
printf(" a = %i\n", a);
printf(" b = %i\n", b);
printf(" ADD(a,b) = %i\n", do_op(a,b,funcvar_get()));
exit
| Scilab | 3 | kyletanyag/LL-Smartcard | cacreader/swig-4.0.2/Examples/scilab/funcptr/runme.sci | [
"BSD-3-Clause"
] |
function hello () {
EVENT_DATA=$1
echo "$EVENT_DATA" 1>&2;
RESPONSE="{\"body\": {\"input\": $EVENT_DATA, \"msg\": \"Wecome to serverless!\"}}"
echo $RESPONSE
}
| Shell | 4 | Arun-kc/serverless | lib/plugins/create/templates/aws-provided/handler.sh | [
"MIT"
] |
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#pragma once
#include <chrono>
#include <folly/concurrency/UnboundedQueue.h>
#include <folly/executors/DrivableExecutor.h>
namespace folly {
/*
* A DrivableExecutor can be driven via its drive() method or its driveUntil()
* that drives until some time point.
*/
class TimedDrivableExecutor : public DrivableExecutor {
public:
TimedDrivableExecutor();
~TimedDrivableExecutor() noexcept override;
/// Implements DrivableExecutor
void drive() noexcept override;
// Make progress if there is work to do and return true. Otherwise return
// false.
bool try_drive() noexcept;
// Make progress on this Executor's work. Acts as drive, except it will only
// wait for a period of timeout for work to be enqueued. If no work is
// enqueued by that point, it will return.
template <typename Rep, typename Period>
bool try_drive_for(
const std::chrono::duration<Rep, Period>& timeout) noexcept {
return try_wait_for(timeout) && run() > 0;
}
// Make progress on this Executor's work. Acts as drive, except it will only
// wait until deadline for work to be enqueued. If no work is enqueued by
// that point, it will return.
template <typename Clock, typename Duration>
bool try_drive_until(
const std::chrono::time_point<Clock, Duration>& deadline) noexcept {
return try_wait_until(deadline) && run() > 0;
}
void add(Func) override;
/// Do work. Returns the number of functions that were executed (maybe 0).
/// Non-blocking, in the sense that we don't wait for work (we can't
/// control whether one of the functions blocks).
/// This is stable, it will not chase an ever-increasing tail of work.
/// This also means, there may be more work available to perform at the
/// moment that this returns.
size_t run() noexcept;
// Do work until there is no more work to do.
// Returns the number of functions that were executed (maybe 0).
// Unlike run, this method is not stable. It will chase an infinite tail of
// work so should be used with care.
// There will be no work available to perform at the moment that this
// returns.
size_t drain() noexcept;
/// Wait for work to do.
void wait() noexcept;
// Return true if there is work to do, false otherwise
bool try_wait() noexcept;
/// Wait for work to do or for a period of timeout, whichever is sooner.
template <typename Rep, typename Period>
bool try_wait_for(
const std::chrono::duration<Rep, Period>& timeout) noexcept {
return func_ || queue_.try_dequeue_for(func_, timeout);
}
/// Wait for work to do or until deadline passes, whichever is sooner.
template <typename Clock, typename Duration>
bool try_wait_until(
const std::chrono::time_point<Clock, Duration>& deadline) noexcept {
return func_ || queue_.try_dequeue_until(func_, deadline);
}
private:
UMPSCQueue<Func, true> queue_;
Func func_;
};
} // namespace folly
| C | 5 | Harshitha91/Tmdb-react-native-node | ReactNativeFrontend/ios/Pods/Flipper-Folly/folly/executors/TimedDrivableExecutor.h | [
"Apache-2.0"
] |
Red [
Title: "Red clip test"
Author: "bitbegin"
Tabs: 4
File: %clip-test.red
Needs: View
]
drawings: [
"default replace"
[
clip [move 50x50 line 50x50 150x50 150x150 50x150]
fill-pen 0.255.0.128
box 0x0 200x200
]
"intersect"
[
clip [move 50x50 line 50x50 150x50 150x150 50x150] intersect
fill-pen 0.255.0.128
box 0x0 200x200
]
"union"
[
clip [move 50x50 line 50x50 150x50 150x150 50x150] union
fill-pen 0.255.0.128
box 0x0 200x200
]
"xor"
[
clip 50x50 150x150 xor
fill-pen 0.255.0.128
box 0x0 200x200
]
"exclude"
[
clip 50x50 150x150 exclude
fill-pen 0.255.0.128
box 0x0 200x200
]
"commands replace" [
fill-pen 0.0.255.128
clip 50x50 150x150 [
fill-pen 0.255.0.128
box 0x0 200x200
]
box 150x150 200x200
]
"commands intersect" [
fill-pen 0.0.255.0
clip 50x50 150x150 intersect [
fill-pen 0.255.0.128
box 0x0 200x200
]
box 150x150 200x200
]
]
index: 2
board: layout [
below
label: text "" 200x30 font [size: 14]
canvas: base 200x200 255.0.0.128
below
across
btn-prev: button "previous" [
unless btn-next/enabled? [ btn-next/enabled?: true ]
either index > 2 [
index: index - 2
label/text: drawings/(index - 1)
canvas/draw: drawings/:index
show canvas
][ btn-prev/enabled?: false ]
]
btn-next: button "next" [
unless btn-prev/enabled? [ btn-prev/enabled?: true ]
either index < length? drawings [
index: index + 2
label/text: drawings/(index - 1)
canvas/draw: drawings/:index
show canvas
][ btn-next/enabled?: false ]
]
do [
label/text: drawings/(index - 1)
canvas/draw: drawings/:index
btn-prev/enabled?: false
]
]
board/text: "clip demos"
view board
| Red | 3 | GalenIvanov/red | tests/clip-test.red | [
"BSL-1.0",
"BSD-3-Clause"
] |
<?xml version="1.0" encoding="utf-8"?>
<configurationSectionModel dslVersion="1.0.0.0" Id="5bfcd33f-6f41-45f4-91b9-6744a999b715" namespace="VBSample" xmlSchemaNamespace="urn:vbsample" xmlns="http://schemas.microsoft.com/dsltools/ConfigurationSectionDesigner">
<typeDefinitions>
<externalType name="String" namespace="System" />
<externalType name="Boolean" namespace="System" />
<externalType name="Int32" namespace="System" />
<externalType name="Int64" namespace="System" />
<externalType name="Single" namespace="System" />
<externalType name="Double" namespace="System" />
<externalType name="DateTime" namespace="System" />
<externalType name="TimeSpan" namespace="System" />
</typeDefinitions>
<configurationElements>
<configurationSection name="VBSection" codeGenOptions="Singleton, XmlnsProperty" xmlSectionName="vBSection">
<baseClass>
<configurationSectionMoniker name="/5bfcd33f-6f41-45f4-91b9-6744a999b715/VBSubSection" />
</baseClass>
<attributeProperties>
<attributeProperty name="DotNet" isRequired="false" isKey="false" isDefaultCollection="false" xmlName="dotNet" isReadOnly="false">
<type>
<externalTypeMoniker name="/5bfcd33f-6f41-45f4-91b9-6744a999b715/String" />
</type>
</attributeProperty>
</attributeProperties>
<elementProperties>
<elementProperty name="VBElement" isRequired="false" isKey="false" isDefaultCollection="false" xmlName="vBElement" isReadOnly="false">
<type>
<configurationElementMoniker name="/5bfcd33f-6f41-45f4-91b9-6744a999b715/VBElement" />
</type>
</elementProperty>
<elementProperty name="VBCollection" isRequired="false" isKey="false" isDefaultCollection="false" xmlName="vBCollection" isReadOnly="false">
<type>
<configurationElementCollectionMoniker name="/5bfcd33f-6f41-45f4-91b9-6744a999b715/VBCollection" />
</type>
</elementProperty>
</elementProperties>
</configurationSection>
<configurationElement name="VBElement" inheritanceModifier="Sealed">
<baseClass>
<configurationElementMoniker name="/5bfcd33f-6f41-45f4-91b9-6744a999b715/Schnoll" />
</baseClass>
<attributeProperties>
<attributeProperty name="Angular" isRequired="true" isKey="true" isDefaultCollection="false" xmlName="angular" isReadOnly="false">
<type>
<externalTypeMoniker name="/5bfcd33f-6f41-45f4-91b9-6744a999b715/Double" />
</type>
</attributeProperty>
</attributeProperties>
</configurationElement>
<configurationElementCollection name="VBCollection" xmlItemName="vBElement" codeGenOptions="Indexer, AddMethod, RemoveMethod, GetItemMethods">
<itemType>
<configurationElementMoniker name="/5bfcd33f-6f41-45f4-91b9-6744a999b715/VBElement" />
</itemType>
</configurationElementCollection>
<configurationElement name="Schnoll" inheritanceModifier="Abstract">
<attributeProperties>
<attributeProperty name="Scholl" isRequired="false" isKey="false" isDefaultCollection="false" xmlName="scholl" isReadOnly="false">
<type>
<externalTypeMoniker name="/5bfcd33f-6f41-45f4-91b9-6744a999b715/DateTime" />
</type>
</attributeProperty>
</attributeProperties>
</configurationElement>
<configurationSection name="VBSubSection" codeGenOptions="Singleton" xmlSectionName="vBSubSection" />
</configurationElements>
<propertyValidators>
<validators />
</propertyValidators>
</configurationSectionModel> | Csound | 3 | skyhoshi/ConfigurationSectionDesigner | src/Debugging/VBDebugging/VBSample.csd | [
"MIT"
] |
doctype html
html
head
title Fortunes
body
== yield | Slim | 1 | xsoheilalizadeh/FrameworkBenchmarks | frameworks/Ruby/sinatra-sequel/views/layout.slim | [
"BSD-3-Clause"
] |
/**
* @license
* Copyright Google LLC All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import {absoluteFrom, AbsoluteFsPath, FileSystem, getFileSystem, PathSegment} from '../../../../src/ngtsc/file_system';
import {runInEachFileSystem} from '../../../../src/ngtsc/file_system/testing';
import {EntryPointPackageJson} from '../../../src/packages/entry_point';
import {BackupFileCleaner, NgccDirectoryCleaner, PackageJsonCleaner} from '../../../src/writing/cleaning/cleaning_strategies';
runInEachFileSystem(() => {
describe('cleaning strategies', () => {
let fs: FileSystem;
let _abs: typeof absoluteFrom;
beforeEach(() => {
fs = getFileSystem();
_abs = absoluteFrom;
});
describe('PackageJsonCleaner', () => {
let packageJsonPath: AbsoluteFsPath;
beforeEach(() => {
packageJsonPath = _abs('/node_modules/pkg/package.json');
});
describe('canClean()', () => {
it('should return true if the basename is package.json', () => {
const strategy = new PackageJsonCleaner(fs);
expect(strategy.canClean(packageJsonPath, fs.basename(packageJsonPath))).toBe(true);
});
it('should return false if the basename is not package.json', () => {
const filePath = _abs('/node_modules/pkg/index.js');
const fileName = fs.basename(filePath);
const strategy = new PackageJsonCleaner(fs);
expect(strategy.canClean(filePath, fileName)).toBe(false);
});
});
describe('clean()', () => {
it('should not touch the file if there is no build marker', () => {
const strategy = new PackageJsonCleaner(fs);
const packageJson: EntryPointPackageJson = {name: 'test-package'};
fs.ensureDir(fs.dirname(packageJsonPath));
fs.writeFile(packageJsonPath, JSON.stringify(packageJson));
strategy.clean(packageJsonPath, fs.basename(packageJsonPath));
const newPackageJson = JSON.parse(fs.readFile(packageJsonPath)) as EntryPointPackageJson;
expect(newPackageJson).toEqual({name: 'test-package'});
});
it('should remove the processed marker', () => {
const strategy = new PackageJsonCleaner(fs);
const packageJson: EntryPointPackageJson = {
name: 'test-package',
__processed_by_ivy_ngcc__: {'fesm2015': '8.0.0'}
};
fs.ensureDir(fs.dirname(packageJsonPath));
fs.writeFile(packageJsonPath, JSON.stringify(packageJson));
strategy.clean(packageJsonPath, fs.basename(packageJsonPath));
const newPackageJson = JSON.parse(fs.readFile(packageJsonPath)) as EntryPointPackageJson;
expect(newPackageJson).toEqual({name: 'test-package'});
});
it('should remove the new entry points', () => {
const strategy = new PackageJsonCleaner(fs);
const packageJson: EntryPointPackageJson = {
name: 'test-package',
__processed_by_ivy_ngcc__: {'fesm2015': '8.0.0'}
};
fs.ensureDir(fs.dirname(packageJsonPath));
fs.writeFile(packageJsonPath, JSON.stringify(packageJson));
strategy.clean(packageJsonPath, fs.basename(packageJsonPath));
const newPackageJson = JSON.parse(fs.readFile(packageJsonPath)) as EntryPointPackageJson;
expect(newPackageJson).toEqual({name: 'test-package'});
});
it('should remove the prepublish script if there was a processed marker', () => {
const strategy = new PackageJsonCleaner(fs);
const packageJson: EntryPointPackageJson = {
name: 'test-package',
__processed_by_ivy_ngcc__: {'fesm2015': '8.0.0'},
scripts: {prepublishOnly: 'added by ngcc', test: 'do testing'},
};
fs.ensureDir(fs.dirname(packageJsonPath));
fs.writeFile(packageJsonPath, JSON.stringify(packageJson));
strategy.clean(packageJsonPath, fs.basename(packageJsonPath));
const newPackageJson = JSON.parse(fs.readFile(packageJsonPath)) as EntryPointPackageJson;
expect(newPackageJson).toEqual({
name: 'test-package',
scripts: {test: 'do testing'},
});
});
it('should revert and remove the backup for the prepublish script if there was a processed marker',
() => {
const strategy = new PackageJsonCleaner(fs);
const packageJson: EntryPointPackageJson = {
name: 'test-package',
__processed_by_ivy_ngcc__: {'fesm2015': '8.0.0'},
scripts: {
prepublishOnly: 'added by ngcc',
prepublishOnly__ivy_ngcc_bak: 'original',
test: 'do testing'
},
};
fs.ensureDir(fs.dirname(packageJsonPath));
fs.writeFile(packageJsonPath, JSON.stringify(packageJson));
strategy.clean(packageJsonPath, fs.basename(packageJsonPath));
const newPackageJson =
JSON.parse(fs.readFile(packageJsonPath)) as EntryPointPackageJson;
expect(newPackageJson).toEqual({
name: 'test-package',
scripts: {prepublishOnly: 'original', test: 'do testing'},
});
});
it('should not touch the scripts if there was not processed marker', () => {
const strategy = new PackageJsonCleaner(fs);
const packageJson: EntryPointPackageJson = {
name: 'test-package',
scripts: {
prepublishOnly: 'added by ngcc',
prepublishOnly__ivy_ngcc_bak: 'original',
test: 'do testing'
},
};
fs.ensureDir(fs.dirname(packageJsonPath));
fs.writeFile(packageJsonPath, JSON.stringify(packageJson));
strategy.clean(packageJsonPath, fs.basename(packageJsonPath));
const newPackageJson = JSON.parse(fs.readFile(packageJsonPath)) as EntryPointPackageJson;
expect(newPackageJson).toEqual({
name: 'test-package',
scripts: {
prepublishOnly: 'added by ngcc',
prepublishOnly__ivy_ngcc_bak: 'original',
test: 'do testing'
}
});
});
});
});
describe('BackupFileCleaner', () => {
let filePath: AbsoluteFsPath;
let backupFilePath: AbsoluteFsPath;
beforeEach(() => {
filePath = _abs('/node_modules/pkg/index.js');
backupFilePath = _abs('/node_modules/pkg/index.js.__ivy_ngcc_bak');
});
describe('canClean()', () => {
it('should return true if the file name ends in .__ivy_ngcc_bak and the processed file exists',
() => {
const strategy = new BackupFileCleaner(fs);
fs.ensureDir(fs.dirname(filePath));
fs.writeFile(filePath, 'processed file');
fs.writeFile(backupFilePath, 'original file');
expect(strategy.canClean(backupFilePath, fs.basename(backupFilePath))).toBe(true);
});
it('should return false if the file does not end in .__ivy_ngcc_bak', () => {
const strategy = new BackupFileCleaner(fs);
fs.ensureDir(fs.dirname(filePath));
fs.writeFile(filePath, 'processed file');
fs.writeFile(backupFilePath, 'original file');
expect(strategy.canClean(filePath, fs.basename(filePath))).toBe(false);
});
it('should return false if the file ends in .__ivy_ngcc_bak but the processed file does not exist',
() => {
const strategy = new BackupFileCleaner(fs);
fs.ensureDir(fs.dirname(filePath));
fs.writeFile(backupFilePath, 'original file');
expect(strategy.canClean(backupFilePath, fs.basename(backupFilePath))).toBe(false);
});
});
describe('clean()', () => {
it('should move the backup file back to its original file path', () => {
const strategy = new BackupFileCleaner(fs);
fs.ensureDir(fs.dirname(filePath));
fs.writeFile(filePath, 'processed file');
fs.writeFile(backupFilePath, 'original file');
strategy.clean(backupFilePath, fs.basename(backupFilePath));
expect(fs.exists(backupFilePath)).toBe(false);
expect(fs.readFile(filePath)).toEqual('original file');
});
});
});
describe('NgccDirectoryCleaner', () => {
let ivyDirectory: AbsoluteFsPath;
beforeEach(() => {
ivyDirectory = _abs('/node_modules/pkg/__ivy_ngcc__');
});
describe('canClean()', () => {
it('should return true if the path is a directory and is called __ivy_ngcc__', () => {
const strategy = new NgccDirectoryCleaner(fs);
fs.ensureDir(ivyDirectory);
expect(strategy.canClean(ivyDirectory, fs.basename(ivyDirectory))).toBe(true);
});
it('should return false if the path is a directory and not called __ivy_ngcc__', () => {
const strategy = new NgccDirectoryCleaner(fs);
const filePath = _abs('/node_modules/pkg/other');
fs.ensureDir(ivyDirectory);
expect(strategy.canClean(filePath, fs.basename(filePath))).toBe(false);
});
it('should return false if the path is called __ivy_ngcc__ but does not exist', () => {
const strategy = new NgccDirectoryCleaner(fs);
expect(strategy.canClean(ivyDirectory, fs.basename(ivyDirectory))).toBe(false);
});
it('should return false if the path is called __ivy_ngcc__ but is not a directory', () => {
const strategy = new NgccDirectoryCleaner(fs);
fs.ensureDir(fs.dirname(ivyDirectory));
fs.writeFile(ivyDirectory, 'some contents');
expect(strategy.canClean(ivyDirectory, fs.basename(ivyDirectory))).toBe(false);
});
});
describe('clean()', () => {
it('should remove the __ivy_ngcc__ directory', () => {
const strategy = new NgccDirectoryCleaner(fs);
fs.ensureDir(ivyDirectory);
fs.ensureDir(fs.resolve(ivyDirectory, 'subfolder'));
fs.writeFile(fs.resolve(ivyDirectory, 'subfolder', 'file.txt'), 'file contents');
strategy.clean(ivyDirectory, fs.basename(ivyDirectory));
expect(fs.exists(ivyDirectory)).toBe(false);
});
});
});
});
});
| TypeScript | 5 | John-Cassidy/angular | packages/compiler-cli/ngcc/test/writing/cleaning/cleaning_strategies_spec.ts | [
"MIT"
] |
#pragma once
#include <cstdint>
namespace c10 {
enum class AliasAnalysisKind : uint8_t {
INTERNAL_SPECIAL_CASE,
CONSERVATIVE, // The most conservative alias analysis type, assumes
// side-effects. This is the default analysis.
FROM_SCHEMA,
PURE_FUNCTION
};
#if !defined(_MSC_VER)
constexpr // Our current MSVC version has a bug that doesn't allow this to be constexpr.
#endif
inline const char* toString(AliasAnalysisKind aliasAnalysisKind) {
return (aliasAnalysisKind == AliasAnalysisKind::CONSERVATIVE)
? "CONSERVATIVE"
: (aliasAnalysisKind == AliasAnalysisKind::FROM_SCHEMA)
? "FROM_SCHEMA"
: (aliasAnalysisKind == AliasAnalysisKind::PURE_FUNCTION)
? "PURE_FUNCTION"
: (aliasAnalysisKind == AliasAnalysisKind::INTERNAL_SPECIAL_CASE)
? "INTERNAL_SPECIAL_CASE"
: "UNKNOWN";
}
} // namespace c10
| C | 4 | Hacky-DH/pytorch | aten/src/ATen/core/dispatch/OperatorOptions.h | [
"Intel"
] |
module appendixA/properties
pred show {
some r: univ->univ {
some r -- nonempty
r.r in r -- transitive
no iden & r -- irreflexive
~r in r -- symmetric
~r.r in iden -- functional
r.~r in iden -- injective
univ in r.univ -- total
univ in univ.r -- onto
}
}
run show for 4
assert ReformulateNonEmptinessOK {
all r: univ->univ |
some r iff (some x, y: univ | x->y in r)
}
check ReformulateNonEmptinessOK
| Alloy | 4 | Kaixi26/org.alloytools.alloy | org.alloytools.alloy.extra/extra/models/book/appendixA/properties.als | [
"Apache-2.0"
] |
shared void run() {
value b = "\{REVERSE SOLIDUS}";
value q = "\{QUOTATION MARK}";
value i = "\n ";
value s = """shared void run() {
value b = "&{REVERSE SOLIDUS}";
value q = "&{QUOTATION MARK}";
value i = "&n ";
value s = %%%$%%%;
printAll {
values = { for (c in s) (c == #0024.character then "".join { for (c in s) c == #000A.character then i else String {c}})
else (c == #0025.character then q)
else (c == #0026.character then b)
else c};
separator = "";
};
}""";
printAll {
values = { for (c in s) (c == #0024.character then "".join { for (c in s) c == #000A.character then i else String {c}})
else (c == #0025.character then q)
else (c == #0026.character then b)
else c};
separator = "";
};
}
| Ceylon | 3 | MakeNowJust/quine | quine.ceylon | [
"Beerware"
] |
# -*- mode: snippet -*-
# name: def.self
# key: defs
# --
def self.$1($2)
$0
end
| Self | 2 | jdlehman/dotfiles | emacs.d/snippets/ruby-mode/def.self | [
"MIT"
] |
use "http"
use "jennet"
actor Main
new create(env: Env) =>
let auth =
try
env.root as AmbientAuth
else
env.out.print("unable to use network.")
return
end
let j =
Jennet(auth, env.out, "3000")
.> get("/", EmptyHandler)
.> get("/user/:name", GetUserHandler)
.> post("/user", EmptyHandler)
let j' = consume val j
try j'.serve()? else j'.dispose() end
primitive GetUserHandler is Handler
fun apply(c: Context, req: Payload val): Context iso^ =>
let res = Payload.response()
let name = c.param("name")
res.add_chunk(name)
c.respond(req, consume res)
consume c
primitive EmptyHandler is Handler
fun apply(c: Context, req: Payload val): Context iso^ =>
let res = Payload.response()
c.respond(req, consume res)
consume c | Pony | 3 | mattiapenati/web-frameworks | pony/jennet/main.pony | [
"MIT"
] |
package gen
builtin tables : (
n: int,
?nulls: float,
?tags: [{name: string, cardinality: int}],
) => [{A with _time: time, _value: float}]
| FLUX | 3 | geropl/flux | stdlib/internal/gen/gen.flux | [
"MIT"
] |
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { CancellationTokenSource, CancellationToken } from 'vs/base/common/cancellation';
import { OutputChannel } from 'vs/workbench/services/search/node/ripgrepSearchUtils';
import { RipgrepTextSearchEngine } from 'vs/workbench/services/search/node/ripgrepTextSearchEngine';
import { TextSearchProvider, TextSearchComplete, TextSearchResult, TextSearchQuery, TextSearchOptions } from 'vs/workbench/services/search/common/searchExtTypes';
import { Progress } from 'vs/platform/progress/common/progress';
import { Schemas } from 'vs/base/common/network';
export class RipgrepSearchProvider implements TextSearchProvider {
private inProgress: Set<CancellationTokenSource> = new Set();
constructor(private outputChannel: OutputChannel) {
process.once('exit', () => this.dispose());
}
provideTextSearchResults(query: TextSearchQuery, options: TextSearchOptions, progress: Progress<TextSearchResult>, token: CancellationToken): Promise<TextSearchComplete> {
const engine = new RipgrepTextSearchEngine(this.outputChannel);
if (options.folder.scheme === Schemas.vscodeUserData) {
// Ripgrep search engine can only provide file-scheme results, but we want to use it to search some schemes that are backed by the filesystem, but with some other provider as the frontend,
// case in point vscode-userdata. In these cases we translate the query to a file, and translate the results back to the frontend scheme.
const translatedOptions = { ...options, folder: options.folder.with({ scheme: Schemas.file }) };
const progressTranslator = new Progress<TextSearchResult>(data => progress.report({ ...data, uri: data.uri.with({ scheme: options.folder.scheme }) }));
return this.withToken(token, token => engine.provideTextSearchResults(query, translatedOptions, progressTranslator, token));
} else {
return this.withToken(token, token => engine.provideTextSearchResults(query, options, progress, token));
}
}
private async withToken<T>(token: CancellationToken, fn: (token: CancellationToken) => Promise<T>): Promise<T> {
const merged = mergedTokenSource(token);
this.inProgress.add(merged);
const result = await fn(merged.token);
this.inProgress.delete(merged);
return result;
}
private dispose() {
this.inProgress.forEach(engine => engine.cancel());
}
}
function mergedTokenSource(token: CancellationToken): CancellationTokenSource {
const tokenSource = new CancellationTokenSource();
token.onCancellationRequested(() => tokenSource.cancel());
return tokenSource;
}
| TypeScript | 4 | KevinAo22/vscode | src/vs/workbench/services/search/node/ripgrepSearchProvider.ts | [
"MIT"
] |
LITHO,CANAL,CODIGO
000241,A,000074
000214,A,000070
000221,A,000048
000213,A,000051
000240,C,000055
000193,A,000064
000227,A,000042
000224,A,000045
000235,A,000069
000230,A,000061
000236,A,000044
000228,A,000058
000222,A,000059
000223,A,000053
000225,A,000052
000215,A,000071
000242,A,000046
000231,A,000068
000232,A,000065
000233,A,000066
000234,A,000054
000239,A,000047
000238,A,000050
000237,A,000049
000212,A,000072
000226,A,000073
000243,A,000062
000220,A,000060
000229,A,000056
000216,B,000043
000217,A,000057
000202,A,000097
000197,A,000089
000196,A,000082
000203,A,000114
000174,A,000091
000081,A,000123
000082,A,000084
000041,A,000075
000042,A,000079
000205,A,000085
000180,A,000094
000210,A,000081
000199,A,000120
000177,A,000088
000176,A,000100
000083,A,000124
000097,A,000096
000175,A,000078
000201,A,000092
000084,A,000076
000198,A,000107
000200,A,000093
000194,A,000080
000195,A,000115
000204,A,000086
000211,A,000099
000178,A,000117
000179,A,000077
000274,A,000179
000273,A,000135
000295,A,000178
000276,A,000130
000275,A,000140
000291,A,000164
000288,A,000126
000290,A,000141
000294,A,000157
000289,A,000176
000282,A,000156
000281,A,000175
000280,A,000148
000279,A,000159
000293,A,000166
000278,A,000151
000303,A,000138
000286,A,000172
000277,A,000153
000287,A,000146
000296,A,000169
000285,A,000128
000283,A,000155
000284,A,000171
000271,A,000144
000292,A,000174
000246,C,000005
000247,C,000109
000258,C,000036
000248,B,000009
000260,C,000010
000263,C,000028
000264,C,000095
000311,C,000103
000307,C,000134
000192,C,000013
000187,C,000027
000186,C,000118
000270,C,000026
000310,C,000014
000309,B,000039
000255,C,000020
000244,C,000029
000245,C,000030
000254,C,000021
000305,C,000022
000252,C,000019
000251,C,000031
000250,C,000016
000249,C,000002
000308,C,000024
000259,C,000023
000256,C,000040
000266,C,000003
000268,C,000112
000257,C,000032
000265,C,000037
000267,C,000136
000262,C,000101
000304,C,000011
000261,C,000034
000306,C,000033
000269,C,000038
000253,C,000006
000336,B,000004
000337,B,000106
000339,C,000131
000351,B,000111
000340,B,000129
000341,B,000142
000342,B,000105
000352,B,000116
000343,C,000180
000344,B,000167
000346,B,000015
000335,B,000152
000332,B,000018
000329,C,000182
000327,B,000041
000328,C,000173
000330,A,000154
000331,B,000170
000323,A,000184
000325,B,000127
000326,C,000147
000353,B,000150
000322,B,000007
000348,B,000001
000319,C,000162
000318,B,000098
000338,C,000183
000321,B,000008
000350,B,000149
000345,B,000122
000317,B,000133
000324,C,000139
000333,C,000168
000334,B,000158
000349,B,000110
000320,C,000160
| IDL | 1 | plandauro/admision | storage/calificacioncepreII/2019-Ihojaidentificacion.dlm | [
"MIT"
] |
module audiostreamerscrobbler.maintypes.AppMetadata
import java.lang.System
let APP_NAME = "AudioStreamerScrobbler"
let APP_VERSION = "0.01"
struct AppMetaData = {
appName,
appVersion,
platform
}
function getAppMetaData = {
let platform = System.getProperty("os.name")
return AppMetaData(APP_NAME, APP_VERSION, platform)
} | Golo | 4 | vvdleun/audiostreamerscrobbler | src/main/golo/include/maintypes/AppMetadata.golo | [
"MIT"
] |
{
"Version" : 0.2,
"ModuleName" : "test1",
"Options" : {
"Warnings" : "All",
"PreprocessorDefinitions" : [
"IMPORT_STATIC=\"\""
],
"TargetType" : "Executable",
"TargetFileName" : "test1",
"Libraries" : [
"ecere"
]
},
"Configurations" : [
{
"Name" : "Debug",
"Options" : {
"Debug" : true,
"Optimization" : "None",
"PreprocessorDefinitions" : [
"_DEBUG"
],
"FastMath" : false
}
},
{
"Name" : "Release",
"Options" : {
"Debug" : false,
"Optimization" : "Speed",
"FastMath" : true
}
}
],
"Files" : [
{
"Folder" : "autoLayout",
"Files" : [
"../autoLayout/autoLayout.ec",
"../autoLayout/wrapText.ec"
]
},
"test1.ec",
"test2.ec",
"test3.ec",
"test4.ec"
],
"ResourcesPath" : "",
"Resources" : [
]
}
| Ecere Projects | 2 | N-eil/ecere-sdk | autoLayout/tests/test.epj | [
"BSD-3-Clause"
] |
@forward "./index" as mdc-rtl-* hide mdc-rtl-rtl;
@forward "./index" as mdc-* show mdc-rtl;
| SCSS | 2 | panoschal/material-components-web | packages/mdc-rtl/_mixins.import.scss | [
"MIT"
] |
// RUN: %empty-directory(%t)
// RUN: %target-clangxx -c %S/Inputs/static-member-var.cpp -I %S/Inputs -o %t/static-member-var.o
// RUN: %target-build-swift %s -I %S/Inputs -o %t/statics %t/static-member-var.o -Xfrontend -enable-cxx-interop
// RUN: %target-codesign %t/statics
// RUN: %target-run %t/statics
//
// REQUIRES: executable_test
import StaticMemberVar
import StdlibUnittest
var ConstexprStaticMemberVarTestSuite = TestSuite("ConstexprStaticMemberVarTestSuite")
ConstexprStaticMemberVarTestSuite.test("constexpr-static-member") {
expectEqual(139, WithConstexprStaticMember.definedInline)
}
runAllTests()
| Swift | 4 | gandhi56/swift | test/Interop/Cxx/static/constexpr-static-member-var.swift | [
"Apache-2.0"
] |
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @format
* @flow
*/
import * as React from 'react';
import {View, Text, StyleSheet} from 'react-native';
type Props = $ReadOnly<{|
children?: React.Node,
title?: ?string,
note?: ?string,
ios?: ?boolean,
android?: ?boolean,
|}>;
export default function UseCase(props: Props): React.Node {
const children = React.Children.toArray(props.children).filter(
child => child !== ' ',
);
return (
<View style={styles.container}>
<Text>{props.title}</Text>
<Text>{props.note}</Text>
{children}
</View>
);
}
const styles = StyleSheet.create({
container: {
justifyContent: 'center',
alignItems: 'center',
},
});
| JavaScript | 4 | anaskhraza/react-native | packages/rn-tester/js/components/UseCase.js | [
"CC-BY-4.0",
"MIT"
] |
[Desktop Entry]
Encoding=UTF-8
Type=Application
Exec=webmirror
Icon=webmirror
Name=WebMirror
Name[nl]=WebSpiegel
| desktop | 3 | freedesktop-unofficial-mirror/xdg__xdg-utils | tests/xdg-desktop-menu/data/shinythings_example/webmirror.desktop | [
"MIT"
] |
module Test where
import Prelude
class TestCls a where
test :: a -> a
instance unitTestCls :: TestCls Unit where
test _ = unit
| PureScript | 3 | metaleap/purs-with-dump-coreimp | examples/passing/TransitiveImport/Test.purs | [
"BSD-3-Clause"
] |
exit(code int) void #Foreign("exit")
CStdlib {
:stdout pointer #Foreign("stdout")
fflush(fp pointer #As("FILE *")) int #Foreign("fflush")
}
Stdin {
readBytesAsString(numBytes int) {
if numBytes == 0 {
return ""
}
buffer := ::currentAllocator.alloc(numBytes)
read := CStdlib.fread(buffer, 1, checked_cast(numBytes, uint), CStdlib.stdin)
assert(read == cast(numBytes, uint))
return string.from(buffer, numBytes)
}
}
:logSocket TcpSocket #Mutable
:logFile pointer #Mutable
:logStderr bool #Mutable
:crashDumpPath string #Mutable
:newLine Maybe<string> #Mutable
debugMessage(s string) {
if logSocket != null {
logSocket.sendString(s)
}
if logFile != null {
CStdlib.fprintf(logFile, "%.*s", s.length, s.dataPtr)
CStdlib.fflush(logFile)
}
if logStderr {
Stderr.write(s)
CStdlib.fflush(CStdlib.stderr)
}
}
abandonHandler(code int) {
debugMessage("Abandoned\n")
DebugBreak()
exit(1)
}
Position struct {
line int
character int
fromJson(obj Map<string, JsonValue>) {
line := int.tryParse(obj.get("line").as(*JsonOtherValue)^.value).unwrap()
character := int.tryParse(obj.get("character").as(*JsonOtherValue)^.value).unwrap()
return Position { line: line, character: character }
}
}
Range struct {
start Position
end Position
fromJson(obj Map<string, JsonValue>) {
start := Position.fromJson(obj.get("start").as(Map<string, JsonValue>))
end := Position.fromJson(obj.get("end").as(Map<string, JsonValue>))
return Range { start: start, end: end }
}
toJson(this Range) {
return format("{{\"start\":{{\"line\":{},\"character\":{}}},\"end\":{{\"line\":{},\"character\":{}}}}}", this.start.line, this.start.character, this.end.line, this.end.character)
}
}
Document struct #RefType {
absPath string
path string
text List<char>
lineStart List<int>
unit CodeUnit
hasDiagnostics bool
}
Workspace struct #RefType {
documents List<Document>
compileArgs CompileArgs
latestComp Compilation
//latestCompMarker pointer
}
updateLineMap(doc Document) {
doc.lineStart.clear()
doc.lineStart.add(0)
i := 0
while i < doc.text.count {
ch := doc.text[i]
i += 1
if ch == '\n' {
doc.lineStart.add(i)
}
}
}
string {
trimRight(s string) {
index := s.length
while index > 0 {
ch := s[index - 1]
if !(ch == ' ' || ch == '\n' || ch == '\r' || ch == '\t') {
break
}
index -= 1
}
return s.slice(0, index)
}
}
List {
copyAsString(list List<char>) {
return string.alloc(list.dataPtr, list.count)
}
insertString(list List<char>, s string, index int) {
assert(s.length >= 0)
assert(0 <= index && index <= list.count)
newSize := CheckedMath.addPositiveInt(list.count, s.length)
list.reserve(newSize)
Memory.memmove(list.dataPtr + index + s.length, list.dataPtr + index, cast(list.count - index, uint))
Memory.memcpy(list.dataPtr + index, s.dataPtr, cast(s.length, uint))
list.count += s.length
}
removeSlice(list List<char>, from int, to int) {
assert(0 <= from && from <= to && to <= list.count)
Memory.memmove(list.dataPtr + from, list.dataPtr + to, cast(list.count - to, uint))
list.count -= (to - from)
}
setString(list List<char>, s string) {
list.count = 0
insertString(list, s, 0)
}
}
tryFindDocumentByAbsPath(docs List<Document>, absPath string) {
for d in docs {
if Path.equals(d.absPath, absPath) {
return d
}
}
return null
}
findDocumentByUnit(docs List<Document>, unit CodeUnit) {
for d in docs {
if d.unit == unit {
return d
}
}
abandon()
}
posToIndex(doc Document, line int, character int) {
return doc.lineStart[line] + character
}
indexToPos(doc Document, index int) {
line := 1
while line < doc.lineStart.count && index >= doc.lineStart[line] {
line += 1
}
return Position { line: line - 1, character: index - doc.lineStart[line - 1] }
}
compile(ws Workspace) {
prev := Memory.pushAllocator(::compilationAllocator.iAllocator_escaping())
::compilationAllocator.restoreState(::compilationAllocator.from)
comp := new Compilation { units: new List<CodeUnit>{}, errors: new List<Error>{} }
ws.latestComp = comp
for d, id in ws.documents {
unit := Parser.parse(d.text.copyAsString(), comp.errors)
unit.path = d.path
unit.id = id
comp.units.add(unit)
d.unit = unit
}
tcc := TypeCheckerFirstPass.createContext(comp)
if !TypeCheckerFirstPass.check(tcc) {
return
}
TypeChecker.check(tcc)
if !ws.compileArgs.noEntryPoint {
TypeChecker.checkHasEntryPoint(tcc)
}
Memory.restoreAllocator(prev)
debugMessage(format("Sources compiled: {}\n", ws.documents.count))
}
sendDiagnostics(ws Workspace) {
assert(ws.latestComp != null)
debugMessage(format("Sending diagnostics: {} errors\n", ws.latestComp.errors.count))
diags := Map.create<Document, List<string>>()
for e in ws.latestComp.errors {
doc := cast(null, Document)
range := Range{}
if e.unit != null {
doc = findDocumentByUnit(ws.documents, e.unit)
span := e.span
range = Range { start: indexToPos(doc, span.from), end: indexToPos(doc, span.to) }
} else {
doc = ws.documents[0]
range = Range{}
}
diag := format("{{\"range\": {}, \"message\": \"{}\", \"severity\": 1}}", range.toJson(), Json.escapeString(e.text))
list := diags.getOrDefault(doc)
if list == null {
list = new List<string>{}
diags.add(doc, list)
}
list.add(diag)
}
for e in diags {
doc := e.key
list := e.value
arr := ref list.slice(0, list.count)
doc.hasDiagnostics = true
notification := format("{{\"jsonrpc\":\"2.0\",\"method\":\"textDocument/publishDiagnostics\",\"params\":{{\"uri\":\"{}\",\"diagnostics\":[{}]}}}}", Path.toFileUri(doc.absPath), string.join(", ", arr))
sendMessage(notification)
}
for doc in ws.documents {
if doc.hasDiagnostics && diags.getOrDefault(doc) == null {
doc.hasDiagnostics = false
notification := format("{{\"jsonrpc\":\"2.0\",\"method\":\"textDocument/publishDiagnostics\",\"params\":{{\"uri\":\"{}\",\"diagnostics\":[]}}}}", Path.toFileUri(doc.absPath))
sendMessage(notification)
}
}
}
sendMessage(s string) {
msg := format("Content-Length: {}{}{}{}", s.length, newLine.unwrap(), newLine.unwrap(), s)
CStdlib.fprintf(CStdlib.stdout, "%.*s", msg.length, msg.dataPtr)
//fprintf(stderr, "%.*s", msg.length, msg.dataPtr)
assert(CStdlib.fflush(CStdlib.stdout) == 0)
}
ResolvePathContext struct {
rootPath string
}
resolvePath(path string, ctx *ResolvePathContext) {
if Path.isAbsolutePath(path) {
return Path.simplify(path)
}
return Path.simplify(Path.combine(ctx.rootPath, path))
}
handleInitialize(obj Map<string, JsonValue>, ws Workspace, args ServerArgs) {
id := int.tryParse(obj.get("id").as(*JsonOtherValue)^.value).unwrap()
params := obj.get("params").as(Map<string, JsonValue>)
prev := Memory.pushAllocator(::documentAllocator.iAllocator_escaping())
rootPath := ""
if args.rootPath != "" {
rootPath = args.rootPath
debugMessage(format("Root path (from command line): {}\n", rootPath))
} else {
rootUriNode := params.getOrDefault("rootUri")
rootPath = rootUriNode != null ? Path.fromFileUri(rootUriNode.as(*string)^) : params.get("rootPath").as(*string)^
debugMessage(format("Root path (from language client): {}\n", rootPath))
}
rootPath = Path.simplify(rootPath)
ctx := ResolvePathContext { rootPath: rootPath }
errors := new List<ArgsParserError>{}
compileArgs := ArgsParser.parseArgsFile(args.argsPath, errors, pointer_cast(resolvePath, fun<string, pointer, string>), pointer_cast(ref ctx, pointer))
if errors.count > 0 {
for e in errors {
debugMessage(format("{}\n", e.text))
}
abandon()
}
ws.compileArgs = compileArgs
ws.documents = new List<Document>{}
for si in compileArgs.sources {
text := new List<char>{}
text.insertString(si.source, 0)
text.add(transmute(0, char))
doc := new Document {
path: si.path,
absPath: resolvePath(si.path, ref ctx),
text: text,
lineStart: new List<int>{}
}
updateLineMap(doc)
ws.documents.add(doc)
}
Memory.restoreAllocator(prev)
compile(ws)
response := format("{{\"jsonrpc\":\"2.0\",\"id\":{},\"result\":{{\"capabilities\":{{\"textDocumentSync\":2,\"definitionProvider\": true,\"workspaceSymbolProvider\":true}}}}}}", id)
//response := "{\"jsonrpc\":\"2.0\",\"id\":0,\"error\":{\"code\":-32603,\"message\":\"internal server err\"}}"
sendMessage(response)
sendDiagnostics(ws)
}
handleDocumentOpen(obj Map<string, JsonValue>, ws Workspace) {
params := obj.get("params").as(Map<string, JsonValue>)
textDocument := params.get("textDocument").as(Map<string, JsonValue>)
uri := textDocument.get("uri").as(*string)^
path := Path.simplify(Path.fromFileUri(uri))
doc := tryFindDocumentByAbsPath(ws.documents, path)
if doc == null {
debugMessage(format("Ignoring document: {}\n", path))
return
}
newText := textDocument.get("text").as(*string)^
prev := Memory.pushAllocator(::documentAllocator.iAllocator_escaping())
doc.text.clear()
doc.text.insertString(newText, 0)
doc.text.add(transmute(0, char))
updateLineMap(doc)
Memory.restoreAllocator(prev)
debugMessage(format("Loaded document: {}\n", path))
compile(ws)
sendDiagnostics(ws)
}
handleDocumentChange(obj Map<string, JsonValue>, ws Workspace) {
params := obj.get("params").as(Map<string, JsonValue>)
textDocument := params.get("textDocument").as(Map<string, JsonValue>)
uri := textDocument.get("uri").as(*string)^
path := Path.simplify(Path.fromFileUri(uri))
doc := tryFindDocumentByAbsPath(ws.documents, path)
if doc == null {
return
}
contentChanges := params.get("contentChanges").as(List<JsonValue>)
prev := Memory.pushAllocator(::documentAllocator.iAllocator_escaping())
for ccval in contentChanges {
cc := ccval.as(Map<string, JsonValue>)
text := cc.get("text").as(*string)^
rangeNode := cc.getOrDefault("range")
if rangeNode != null {
range := Range.fromJson(rangeNode.as(Map<string, JsonValue>))
fromIndex := doc.lineStart[range.start.line] + range.start.character
toIndex := doc.lineStart[range.end.line] + range.end.character
doc.text.removeSlice(fromIndex, toIndex)
doc.text.insertString(text, fromIndex)
} else {
doc.text.setString(text)
doc.text.add(transmute(0, char))
}
}
updateLineMap(doc)
Memory.restoreAllocator(prev)
compile(ws)
sendDiagnostics(ws)
}
handleGoToDefinition(obj Map<string, JsonValue>, ws Workspace) {
id := int.tryParse(obj.get("id").as(*JsonOtherValue)^.value).unwrap()
params := obj.get("params").as(Map<string, JsonValue>)
textDocument := params.get("textDocument").as(Map<string, JsonValue>)
uri := textDocument.get("uri").as(*string)^
path := Path.simplify(Path.fromFileUri(uri))
doc := tryFindDocumentByAbsPath(ws.documents, path)
if doc == null {
return
}
pos := Position.fromJson(params.get("position").as(Map<string, JsonValue>))
index := posToIndex(doc, pos.line, pos.character)
ap := PathFinder.find(doc.unit, index)
debugMessage("-- Path --\n")
for seg in ap {
debugMessage(format("{}\n", AstDebugHelper.nodeToString(seg)))
}
def := CodeInfoHelper.findDefinition(ap)
if def.unit != null {
defDoc := findDocumentByUnit(ws.documents, def.unit)
defUri := Path.toFileUri(defDoc.absPath)
r0 := indexToPos(defDoc, def.span.from)
r1 := indexToPos(defDoc, def.span.to)
rangeJson := Range { start: r0, end: r1 }.toJson()
response := format("{{\"jsonrpc\":\"2.0\",\"id\":{},\"result\":{{\"uri\":\"{}\",\"range\":{}}}}}", id, defUri, rangeJson)
sendMessage(response)
} else {
response := format("{{\"jsonrpc\":\"2.0\",\"id\":{},\"result\":null}}", id)
sendMessage(response)
}
}
compareMatch(a Node, b Node) {
return string.compare_ignoreCase(CodeInfoHelper.getMemberName(a), CodeInfoHelper.getMemberName(b))
}
handleFindSymbol(obj Map<string, JsonValue>, ws Workspace) {
id := int.tryParse(obj.get("id").as(*JsonOtherValue)^.value).unwrap()
params := obj.get("params").as(Map<string, JsonValue>)
query := params.get("query").as(*string)^
comp := ws.latestComp
matches := CodeInfoHelper.findSymbols(comp, query)
matches.stableSort(compareMatch)
matches.setCountChecked(min(matches.count, 25))
out := List<string>{}
for m in matches {
name := CodeInfoHelper.getMemberName(m)
loc := CodeInfoHelper.getMemberLocation(m)
type := getMemberType(m)
fullNamespace := getFullNamespace(comp, getNamespace(m))
doc := findDocumentByUnit(ws.documents, loc.unit)
r0 := indexToPos(doc, loc.span.from)
r1 := indexToPos(doc, loc.span.to)
range := Range { start: r0, end: r1 }
location := format("{{\"uri\":\"{}\",\"range\":{}}}", Path.toFileUri(doc.absPath), range.toJson())
out.add(format("{{\"name\":\"{}\",\"kind\":{},\"location\":{},\"containerName\":\"{}\"}}", Json.escapeString(name), type, location, Json.escapeString(fullNamespace)))
}
response := format("{{\"jsonrpc\":\"2.0\",\"id\":{},\"result\":[{}]}}", id, string.join(",", ref out.slice(0, out.count)))
sendMessage(response)
}
handleShutdown(obj Map<string, JsonValue>) {
id := int.tryParse(obj.get("id").as(*JsonOtherValue)^.value).unwrap()
response := format("{{\"jsonrpc\":\"2.0\",\"id\":{},\"result\":null}}", id)
sendMessage(response)
}
getMemberType(mem Node) {
match mem {
FunctionDef: return 12
FieldDef: return 8
StaticFieldDef: {
if (mem.flags & StaticFieldFlags.isEnumOption) != 0 {
return 22
} else if (mem.flags & StaticFieldFlags.mutable) != 0 {
return 13
} else {
return 14
}
}
Namespace: {
if mem.kind == NamespaceKind.struct_ {
if (mem.flags & TypeFlags.refType) != 0 {
return 5
} else {
return 23
}
} else if mem.kind == NamespaceKind.enum_ {
return 10
} else if mem.kind == NamespaceKind.taggedPointerEnum {
return 23
} else {
return 3
}
}
}
}
getNamespace(mem Node) {
match mem {
FunctionDef: return mem.ns
FieldDef: return mem.ns
StaticFieldDef: return mem.ns
Namespace: return mem.parent
}
}
getFullNamespace(comp Compilation, ns Namespace) {
segments := List<Namespace>{}
while ns != comp.top {
segments.add(ns)
ns = ns.parent
}
rb := StringBuilder{}
for i := segments.count - 1; i >= 0; i -= 1 {
rb.write(segments[i].name)
if i > 0 {
rb.write(".")
}
}
return rb.toString()
}
ArenaAllocator {
debugInfo(a ArenaAllocator) {
capacity := cast(a.to.subtractSigned(a.from), long)
used := cast(a.current.subtractSigned(a.from), long)
return format("{}k ({}%)", used / 1024, used * 100 / capacity)
}
}
TrackingHeapAllocator struct #RefType {
bytesAllocated long
alloc(a TrackingHeapAllocator, numBytes ssize) {
a.bytesAllocated += numBytes
return Memory.heapAllocFn(null, numBytes)
}
realloc(a TrackingHeapAllocator, ptr pointer, newSizeInBytes ssize, prevSizeInBytes ssize, copySizeInBytes ssize) {
a.bytesAllocated += newSizeInBytes
a.bytesAllocated -= prevSizeInBytes
return Memory.heapReallocFn(null, ptr, newSizeInBytes, prevSizeInBytes, copySizeInBytes)
}
iAllocator_escaping(a TrackingHeapAllocator) {
return IAllocator {
data: pointer_cast(a, pointer),
allocFn: pointer_cast(TrackingHeapAllocator.alloc, fun<pointer, ssize, pointer>),
reallocFn: pointer_cast(TrackingHeapAllocator.realloc, fun<pointer, pointer, ssize, ssize, ssize, pointer>),
}
}
debugInfo(a TrackingHeapAllocator) {
return format("{}k", a.bytesAllocated / 1024)
}
}
:documentAllocator TrackingHeapAllocator #ThreadLocal #Mutable
:compilationAllocator ArenaAllocator #ThreadLocal #Mutable
main() {
::currentAllocator = Memory.heapAllocator()
tempAlloc := new ArenaAllocator(16 * 1024 * 1024)
::currentAllocator = tempAlloc.iAllocator_escaping()
::abandonFn = abandonHandler
enableCrashHandler()
Tag.static_init()
// Compatibility hack: if all args are passed as a single string, split into individual args first
commandLineArgs := Environment.getCommandLineArgs()
if commandLineArgs.count == 2 && commandLineArgs[1].startsWith("--args ") {
parsedCommandLineArgs := new commandLineArgs[1].split(' ')
newCommandLineArgs := new Array<string>(parsedCommandLineArgs.count + 1)
newCommandLineArgs[0] = commandLineArgs[0]
parsedCommandLineArgs.copySlice(0, parsedCommandLineArgs.count, newCommandLineArgs, 1)
commandLineArgs = newCommandLineArgs
}
errors := new List<CommandLineArgsParserError>{}
parser := new CommandLineArgsParser.from(commandLineArgs, errors)
args := parseArgs(parser)
if errors.count > 0 {
info := parser.getCommandLineInfo()
for errors {
Stderr.writeLine(CommandLineArgsParser.getErrorDesc(it, info))
}
return
}
if args.logPort != 0 {
TcpSocket.static_init()
::logSocket = new TcpSocket.localClient(checked_cast(args.logPort, ushort))
}
if args.logFile {
::logFile = CStdlib.fopen("muon_language_server.log", "w")
assert(::logFile != null)
}
::logStderr = args.logStderr
::crashDumpPath = args.crashDumpPath
debugMessage("============== Starting server ==============\n")
::currentAllocator = Memory.heapAllocator()
::documentAllocator = new TrackingHeapAllocator{}
::compilationAllocator = new ArenaAllocator(64 * 1024 * 1024)
::currentAllocator = tempAlloc.iAllocator_escaping()
isInitialized := false
isShutdown := false
ws := new Workspace{}
while true {
prev := tempAlloc.pushState()
maybeLine := Stdin.tryReadLine()
if maybeLine.error != 0 {
assert(maybeLine.error == Stdin.tryReadLine_eof)
break
}
line := maybeLine.unwrap()
if !newLine.hasValue {
newLine = Maybe.from(line[line.length - 1] == '\r' ? "\r\n" : "\n") // Static string, no allocations
}
line = line.trimRight()
prefix := "Content-Length: "
assert(line.startsWith(prefix))
contentLength := int.tryParse(line.slice(prefix.length, line.length)).unwrap()
assert(contentLength >= 0)
line = Stdin.tryReadLine().unwrap().trimRight()
assert(line == "")
msg := Stdin.readBytesAsString(contentLength)
obj := Json.parse(msg)
method := obj.get("method").as(*string)^
debugMessage(format("Got message: {}\n", method))
if method == "initialize" {
//debugMessage(format("Info: {}\n{}\n", method, msg))
assert(!isInitialized)
assert(!isShutdown)
handleInitialize(obj, ws, args)
isInitialized = true
} else if method == "shutdown" {
handleShutdown(obj)
isShutdown = true
} else if method == "exit" {
break
} else {
assert(isInitialized)
assert(!isShutdown)
if method == "textDocument/didOpen" {
handleDocumentOpen(obj, ws)
} else if method == "textDocument/didChange" {
handleDocumentChange(obj, ws)
} else if method == "textDocument/definition" {
handleGoToDefinition(obj, ws)
} else if method == "workspace/symbol" {
handleFindSymbol(obj, ws)
} else {
debugMessage(format("Unknown method: {}\n{}\n", method, msg))
}
}
debugMessage(format("DocAlloc: {}, CompAlloc: {}, TempAlloc: {}\n", ::documentAllocator.debugInfo(), ::compilationAllocator.debugInfo(), tempAlloc.debugInfo()))
tempAlloc.restoreState(prev)
}
debugMessage("Shutting down\n")
if ::logSocket != null {
::logSocket.close()
}
if ::logFile != null {
CStdlib.fclose(logFile)
}
}
| mupad | 5 | jturner/muon | language_server/language_server.mu | [
"MIT"
] |
############################################################
# build
############################################################
FROM registry.cn-hangzhou.aliyuncs.com/ossrs/srs:dev AS build
COPY . /tmp/signaling
RUN cd /tmp/signaling && make
RUN cp /tmp/signaling/objs/signaling /usr/local/bin/signaling
RUN cp -R /tmp/signaling/www /usr/local/
############################################################
# dist
############################################################
FROM centos:7 AS dist
# HTTP/1989
EXPOSE 1989
# SRS binary, config files and srs-console.
COPY --from=build /usr/local/bin/signaling /usr/local/bin/
COPY --from=build /usr/local/www /usr/local/www
# Default workdir and command.
WORKDIR /usr/local
CMD ["./bin/signaling"]
| Dockerfile | 4 | attenuation/srs | trunk/3rdparty/signaling/Dockerfile | [
"MIT"
] |
module top (
input clk,
input reset,
input ping,
input [1:0] cfg,
output reg pong
);
reg [2:0] cnt;
localparam integer maxdelay = 8;
always @(posedge clk) begin
if (reset) begin
cnt <= 0;
pong <= 0;
end else begin
cnt <= cnt - |cnt;
pong <= cnt == 1;
if (ping) cnt <= 4 + cfg;
end
end
assert property (
@(posedge clk)
disable iff (reset)
not (ping ##1 !pong [*maxdelay])
);
`ifndef FAIL
assume property (
@(posedge clk)
not (cnt && ping)
);
`endif
endmodule
| SystemVerilog | 3 | kallisti5/yosys | tests/sva/sva_not.sv | [
"ISC"
] |
$main-color = #F27474;
$header-height = 80px;
$code-font = 'Inconsolata', monospace;
$tablet-width = 1000px;
$phablet-width = 600px;
$mobile-width = 450px;
$small-width = 380px;
| Stylus | 3 | ritzanaa97/tugas18 | public/sweetalert-master/docs-src/assets/css/variables.styl | [
"MIT"
] |
require "object"
ifdef !disable_ox_libspicing below
-- Try-out of some variations
ext Any: itype() -> 'primitive(#class)
ext Any: i-type() -> 'primitive(#class)
ext Any: inst-type() -> 'primitive(#class)
ext Any: rtype() -> 'primitive(#class)
ext Any: r-type() -> 'primitive(#class)
ext Any: cur-type() -> 'primitive(#class)
ext Any: current-type() -> 'primitive(#class)
-- Some variations for "not-nil else throw" for try-out
ext Any: must!() -> this
ext Any: is!() -> this
ext Any: its!() -> this
ifdef release
-- Raises an exception. See `Any#must!`.
ext Nil: must!() -> raise "Run-time Nil assertion failed"
ext Nil: is!() -> raise "Run-time Nil assertion failed"
ext Nil: its!() -> raise "Run-time Nil assertion failed"
else
-- :nodoc: Raises an exception implicitly grabbing (file, line) params added
-- for *DEBUG* TEMP* *TODO* until traces are human friendlier
ext Nil: must!(file = __FILE__, line = __LINE__) ->
raise "Run-time Nil assertion failed at {file}:{line}"
ext Nil: is!(file = __FILE__, line = __LINE__) ->
raise "Run-time Nil assertion failed at {file}:{line}"
ext Nil: its!(file = __FILE__, line = __LINE__) ->
raise "Run-time Nil assertion failed at {file}:{line}"
end
ext Any: !~~(other) -> !(this ~~ other)
ext Any: !~(other) -> !(this ~~ other)
-- Bool comparison additions
ext Any: ~~(other Bool) -> other is true
-- to Nil - move
ext Nil: ~~(other Bool) -> other is false
-- to Bool itself - move
ext Bool: ~~(other Bool) -> other == this
| Ox | 3 | ozra/onyx-lang | src/onyx_object_additions.ox | [
"Apache-2.0"
] |
Anagrams New ii,file,longest,most,sorted,word
Set file="unixdict.txt"
Open file:"r" Use file
For Quit:$ZEOF DO
. New char,sort
. Read word Quit:word=""
. For ii=1:1:$Length(word) Do
. . Set char=$ASCII(word,ii)
. . If char>64,char<91 Set char=char+32
. . Set sort(char)=$Get(sort(char))+1
. . Quit
. Set (sorted,char)="" For Set char=$Order(sort(char)) Quit:char="" Do
. . For ii=1:1:sort(char) Set sorted=sorted_$Char(char)
. . Quit
. Set table(sorted,word)=1
. Quit
Close file
Set sorted="" For Set sorted=$Order(table(sorted)) Quit:sorted="" Do
. Set ii=0,word="" For Set word=$Order(table(sorted,word)) Quit:word="" Set ii=ii+1
. Quit:ii<2
. Set most(ii,sorted)=1
. Quit
Write !,"The anagrams with the most variations:"
Set ii=$Order(most(""),-1)
Set sorted="" For Set sorted=$Order(most(ii,sorted)) Quit:sorted="" Do
. Write ! Set word="" For Set word=$Order(table(sorted,word)) Quit:word="" Write " ",word
. Quit
Write !,"The longest anagrams:"
Set ii=$Order(longest(""),-1)
Set sorted="" For Set sorted=$Order(longest(ii,sorted)) Quit:sorted="" Do
. Write ! Set word="" For Set word=$Order(table(sorted,word)) Quit:word="" Write " ",word
. Quit
Quit
Do Anagrams
| M | 3 | LaudateCorpus1/RosettaCodeData | Task/Anagrams/MUMPS/anagrams.mumps | [
"Info-ZIP"
] |
create table `third` (id int primary key);
| SQL | 2 | imtbkcat/tidb-lightning | tests/black-white-list/data/seconddb.third-schema.sql | [
"Apache-2.0"
] |
(module
(memory $0 1)
(export "memory" (memory $0))
)
| WebAssembly | 3 | romdotdog/assemblyscript | tests/compiler/memorybase.optimized.wat | [
"Apache-2.0"
] |
var content = "<%= javascript_escape(render("show.html", assigns)) %>";
var original_comment = u(".js-comment[data-id='<%= hashid(@comment.id) %>']");
var original_content = original_comment.find(".comment-body")
var new_content = u(content).find(".comment-body");
original_comment.first().comment.closeEditForm();
original_content.replace(new_content);
| HTML+EEX | 3 | gustavoarmoa/changelog.com | lib/changelog_web/templates/news_item_comment/create_update.js.eex | [
"MIT"
] |
program_name='test_string'
#if_not_defined __NCL_LIB_TEST_STRING
#define __NCL_LIB_TEST_STRING
include 'string'
include 'io'
include 'test_utils'
define_constant
long TEST_STRING_ITERATIONS = 100 // number of times to execute each
// test for speed testing
define_function char test_string_get_between(char a[],
char left[], char right[])
{
stack_var long i
println("'Running string_get_between(',a, ',',left,', ',right,')'")
test_timer_start()
for (i = TEST_STRING_ITERATIONS; i; i--) {
string_get_between(a, left, right)
}
test_timer_stop(TEST_STRING_ITERATIONS)
return test_end();
}
define_function char test_string_ci_get_between(char a[],
char left[], char right[])
{
stack_var long i
println("'Running string_ci_get_between(',a, ',',left,', ',right,')'")
test_timer_start()
for (i = TEST_STRING_ITERATIONS; i; i--) {
string_ci_get_between(a, left, right)
}
test_timer_stop(TEST_STRING_ITERATIONS)
return test_end();
}
/**
* Test functionality of some string functions
*/
define_function test_string()
{
println("':::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::'")
println("'Running string library test suite.'")
println("' '")
test_string_get_between('http://site.com/', 'http://', '/');
test_string_ci_get_between('http://site.com/', 'HTTP://', '/');
}
#end_if | NetLinx | 4 | KimBurgess/netlinx-common-libraries | test/test_string.axi | [
"MIT"
] |
option now = () => 2020-02-22T18:00:00Z
@tableflux.h2o_temperature{location, state, bottom_degrees, time > -3h}
|> aggregate({min(bottom_degrees),
max(bottom_degrees), mean(bottom_degrees)}, by: ["state"])
| FLUX | 3 | RohanSreerama5/flux | colm/tableflux/query14.flux | [
"MIT"
] |
a { color: #11223345 } | CSS | 1 | mengxy/swc | crates/swc_css_parser/tests/fixture/esbuild/misc/fTZzFds73kLZoyY9Y2gZdQ/input.css | [
"Apache-2.0"
] |
const std = @import("std");
const expect = std.testing.expect;
const mem = std.mem;
const Tag = std.meta.Tag;
test "@tagName" {
try expect(mem.eql(u8, testEnumTagNameBare(BareNumber.Three), "Three"));
comptime try expect(mem.eql(u8, testEnumTagNameBare(BareNumber.Three), "Three"));
}
fn testEnumTagNameBare(n: anytype) []const u8 {
return @tagName(n);
}
const BareNumber = enum { One, Two, Three };
test "@tagName non-exhaustive enum" {
try expect(mem.eql(u8, testEnumTagNameBare(NonExhaustive.B), "B"));
comptime try expect(mem.eql(u8, testEnumTagNameBare(NonExhaustive.B), "B"));
}
const NonExhaustive = enum(u8) { A, B, _ };
test "@tagName is null-terminated" {
const S = struct {
fn doTheTest(n: BareNumber) !void {
try expect(@tagName(n)[3] == 0);
}
};
try S.doTheTest(.Two);
try comptime S.doTheTest(.Two);
}
test "tag name with assigned enum values" {
const LocalFoo = enum(u8) {
A = 1,
B = 0,
};
var b = LocalFoo.B;
try expect(mem.eql(u8, @tagName(b), "B"));
}
test "@tagName on enum literals" {
try expect(mem.eql(u8, @tagName(.FooBar), "FooBar"));
comptime try expect(mem.eql(u8, @tagName(.FooBar), "FooBar"));
}
const Bar = enum { A, B, C, D };
test "enum literal casting to optional" {
var bar: ?Bar = undefined;
bar = .B;
try expect(bar.? == Bar.B);
}
const A = enum(u3) { One, Two, Three, Four, One2, Two2, Three2, Four2 };
const B = enum(u3) { One3, Two3, Three3, Four3, One23, Two23, Three23, Four23 };
const C = enum(u2) { One4, Two4, Three4, Four4 };
const BitFieldOfEnums = packed struct {
a: A,
b: B,
c: C,
};
const bit_field_1 = BitFieldOfEnums{
.a = A.Two,
.b = B.Three3,
.c = C.Four4,
};
test "bit field access with enum fields" {
var data = bit_field_1;
try expect(getA(&data) == A.Two);
try expect(getB(&data) == B.Three3);
try expect(getC(&data) == C.Four4);
comptime try expect(@sizeOf(BitFieldOfEnums) == 1);
data.b = B.Four3;
try expect(data.b == B.Four3);
data.a = A.Three;
try expect(data.a == A.Three);
try expect(data.b == B.Four3);
}
fn getA(data: *const BitFieldOfEnums) A {
return data.a;
}
fn getB(data: *const BitFieldOfEnums) B {
return data.b;
}
fn getC(data: *const BitFieldOfEnums) C {
return data.c;
}
test "enum literal in array literal" {
const Items = enum { one, two };
const array = [_]Items{ .one, .two };
try expect(array[0] == .one);
try expect(array[1] == .two);
}
| Zig | 5 | mogud/zig | test/behavior/enum_llvm.zig | [
"MIT"
] |
// name: fau.ck
// desc: demo of Faust chugin in action!
// instantiate and connect faust => ck
Faust fck => dac;
// evaluate Faust code
fck.eval(`
freq=nentry("freq",440,50,2000,0.01);
process=os.sawtooth(freq) <: _,_;
`);
// time loop
while( true )
{
// set (will auto append /0x00/)
fck.v( "freq", Math.random2f(400,800) );
// print snapshot
fck.dump();
// advance time
100::ms => now;
}
| ChucK | 4 | ccdarabundit/chugins | Faust/examples/fau.ck | [
"MIT"
] |
package com.baeldung.springbootdatasourceconfig.application;
import com.baeldung.springbootdatasourceconfig.application.entities.User;
import com.baeldung.springbootdatasourceconfig.application.repositories.UserRepository;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
@Bean
public CommandLineRunner run(UserRepository userRepository) throws Exception {
return (String[] args) -> {
User user1 = new User("John", "[email protected]");
User user2 = new User("Julie", "[email protected]");
userRepository.save(user1);
userRepository.save(user2);
userRepository.findAll().forEach(user -> System.out.println(user.getName()));
};
}
}
| Java | 3 | DBatOWL/tutorials | persistence-modules/spring-boot-persistence/src/main/java/com/baeldung/springbootdatasourceconfig/application/Application.java | [
"MIT"
] |
/*
* Dijkstra's K-state mutual exclusion algorithm for a ring
*
* Original paper describing the algorithm:
* [1] E.W.Dijkstra, "Self-Stabilizing Systems in Spite of
* Distributed Control", Comm. ACM, vol. 17, no. 11, pp.
* 643-644, Nov. 1974
*
* Proof of algorithm's correctness:
* [2] E.W.Dijkstra, "A Belated Proof of Self-Stabilization",
* in Distributed Computing, vol. 1, no. 1, pp. 5-6, 1986
*
* SMV analysis of this algorithm is described in:
* [3] "Symbolic Model Checking for Self-Stabilizing Algorithms",
* by Tatsuhiro Tsuchiya, Shini'ichi Nagano, Rohayu Bt Paidi, and
* Tohru Kikuno, in IEEE Transactions on Parallel and Distributed
* Systems, vol. 12, no. 1, January 2001
*
* Description of algorithm (adapted from [3]):
*
* Consider a distributed system that consists of n processes
* connected in the form of a ring. We assume the state-reading
* model in which processes can directly read the state of their
* neighbors. We define _privilege_ of a process as its ability to
* change its current state. This ability is based on a Boolean
* predicate that consists of its current state and the state of
* one of its neighboring processes.
*
* We then define the legitimate states as those in which the
* following two properties hold: 1) exactly one process has a
* privilege, and 2) every process will eventually have a privilege.
* These properties correspond to a form of mutual exclusion, because
* the privileged process can be regarded as the only process that is
* allowed in its critical section.
*
* In the K-state algorithm, the state of each process is in
* {0,1,2,...,K-1}, where K is an integer larger than or equal to n.
* For any process p_i, we use the symbols S and L to denote its
* state and the state of its neighbor p_{i-1}, respectively, and
* process p_0 is treated differently from all other processes. The
* K-state algorithm is described below.
*
* process p_0: if (L=S) { S := (S+1) mod K; }
* process P_i(i=1,...,n-1): if (L!=S) { S:=L; }
*/
open util/ordering[Tick] as to
open util/graph[Process] as pg
open util/graph[Val] as vg
sig Process {
rightNeighbor: Process
}
sig Val {
nextVal : Val
}
fact MoreValThanProcess {
# Val > # Process
}
fact DefineRings {
pg/ring[rightNeighbor]
vg/ring[nextVal]
//Val$nextVal = Ord[Val].next + (Ord[Val].last -> Ord[Val].first)
}
sig Tick {
val: Process -> one Val,
runs: set Process, // processes scheduled to run on this tick
// for visualization
priv: set Process // the set of priviledged processes on this tick
}
{
priv = { p : Process | Privileged[p, this] }
}
one sig FirstProc extends Process {
}
fun FirstProcTrans[curVal, neighborVal : Val]: Val {
(curVal = neighborVal) => curVal.nextVal else curVal
}
fun RestProcTrans[curVal, neighborVal : Val]: Val {
(curVal != neighborVal) => neighborVal else curVal
}
fact LegalTrans {
all tp : Tick - to/last |
let tn = to/next[tp] | {
all p: Process |
let curVal = tp.val[p], neighborVal = tp.val[p.rightNeighbor], newVal = tn.val[p] | {
p !in tp.runs => newVal = curVal else {
p = FirstProc =>
newVal = FirstProcTrans[curVal, neighborVal]
else
newVal = RestProcTrans[curVal, neighborVal]
}
}
}
}
pred TickTrans[tp, tn : Tick] {
all p : Process |
let curVal = tp.val[p], neighborVal = tp.val[p.rightNeighbor], newVal = tn.val[p] | {
p = FirstProc =>
newVal = FirstProcTrans[curVal, neighborVal]
else
newVal = RestProcTrans[curVal, neighborVal]
}
}
/**
* whether this process can enter its critical section
* on this tick
*/
pred Privileged[p : Process, t : Tick] {
p = FirstProc =>
t.val[p] = t.val[p.rightNeighbor]
else
t.val[p] != t.val[p.rightNeighbor]
}
pred IsomorphicStates[val1, val2: Process -> one Val] {
some processMap: Process one -> one Process,
valMap: Val one -> one Val | {
FirstProc.processMap = FirstProc
all p: Process, v: Val | {
p->v in val1 iff (p.processMap) -> (v.valMap) in val2
}
all v1,v2: Val | v1->v2 in nextVal iff (v1.valMap) -> (v2.valMap) in nextVal
all p1,p2: Process | p1->p2 in rightNeighbor
iff (p1.processMap) -> (p2.processMap) in rightNeighbor
}
}
/**
* Find a trace that goes into a loop
* containing a bad tick, i.e. a tick
* at which two distinct processes
* try to run their critical sections
* simultaneously. In such a trace the
* algorithm never "stabilizes".
*/
pred BadSafetyTrace {
let lst = to/last |
some t : Tick - lst | {
//IsomorphicStates(ft.val, lst.val)
t.val = lst.val
Process in (to/nexts[t] + t - lst).runs
some badTick : to/nexts[t] + t |
BadTick[badTick]
}
}
/**
* Two different processes simultaneously
* try to run their critical sections at this tick
*/
pred BadTick[badTick : Tick] {
some p1 , p2 : Process | {
p1!=p2
Privileged[p1, badTick]
Privileged[p2, badTick]
}
}
assert Closure {
not BadTick[to/first] => (all t : Tick | not BadTick[t])
}
pred TwoPrivileged {
BadTick[to/first]
some p1, p2 : Process, t1, t2 : Tick - to/first | {
p1!=p2
Privileged[p1,t1]
Privileged[p2,t2]
}
}
pred TraceWithoutLoop {
all t1, t2 : Tick | t1!=t2 => t1.val != t2.val
}
pred TraceShorterThanMaxSimpleLoop {
to/first.val = to/last.val
all t : Tick - to/first - to/last |
!(t.val = to/first.val)
}
run TraceShorterThanMaxSimpleLoop for 7 but 2 Process, 3 Val expect 1
run TwoPrivileged for 5 but 3 Process, 4 Val expect 1
check Closure for 5 but 5 Process, 6 Val expect 0
//run BadSafetyTrace for 16 but 3 Process, 4 Val
//run TraceWithoutLoop for 21 but 4 Process, 5 Val
| Alloy | 5 | c-luu/alloy-specs | algorithms/mutex/dijkstra-K-state.als | [
"Apache-2.0"
] |
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head><!-- start favicons snippet, use https://realfavicongenerator.net/ --><link rel="apple-touch-icon" sizes="180x180" href="/assets/apple-touch-icon.png"><link rel="icon" type="image/png" sizes="32x32" href="/assets/favicon-32x32.png"><link rel="icon" type="image/png" sizes="16x16" href="/assets/favicon-16x16.png"><link rel="manifest" href="/assets/site.webmanifest"><link rel="mask-icon" href="/assets/safari-pinned-tab.svg" color="#fc4d50"><link rel="shortcut icon" href="/assets/favicon.ico"><meta name="msapplication-TileColor" content="#ffc40d"><meta name="msapplication-config" content="/assets/browserconfig.xml"><meta name="theme-color" content="#ffffff"><!-- end favicons snippet -->
<title>com.google.android.exoplayer2.source.chunk (ExoPlayer library)</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../jquery/jquery-ui.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip/dist/jszip.min.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
<!--[if IE]>
<script type="text/javascript" src="../../../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
<![endif]-->
<script type="text/javascript" src="../../../../../../jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="../../../../../../jquery/jquery-ui.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="com.google.android.exoplayer2.source.chunk (ExoPlayer library)";
}
}
catch(err) {
}
//-->
var pathtoroot = "../../../../../../";
var useModuleDirectories = false;
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<header role="banner">
<nav role="navigation">
<div class="fixedNav">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a id="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses.html">All Classes</a></li>
</ul>
<ul class="navListSearch">
<li><label for="search">SEARCH:</label>
<input type="text" id="search" value="search" disabled="disabled">
<input type="reset" id="reset" value="reset" disabled="disabled">
</li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<a id="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
</div>
<div class="navPadding"> </div>
<script type="text/javascript"><!--
$('.navPadding').css('padding-top', $('.fixedNav').css("height"));
//-->
</script>
</nav>
</header>
<main role="main">
<div class="header">
<h1 title="Package" class="title">Package com.google.android.exoplayer2.source.chunk</h1>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table class="typeSummary">
<caption><span>Interface Summary</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Interface</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="ChunkExtractor.html" title="interface in com.google.android.exoplayer2.source.chunk">ChunkExtractor</a></th>
<td class="colLast">
<div class="block">Extracts samples and track <a href="../../Format.html" title="class in com.google.android.exoplayer2"><code>Formats</code></a> from chunks.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="ChunkExtractor.Factory.html" title="interface in com.google.android.exoplayer2.source.chunk">ChunkExtractor.Factory</a></th>
<td class="colLast">
<div class="block">Creates <a href="ChunkExtractor.html" title="interface in com.google.android.exoplayer2.source.chunk"><code>ChunkExtractor</code></a> instances.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="ChunkExtractor.TrackOutputProvider.html" title="interface in com.google.android.exoplayer2.source.chunk">ChunkExtractor.TrackOutputProvider</a></th>
<td class="colLast">
<div class="block">Provides <a href="../../extractor/TrackOutput.html" title="interface in com.google.android.exoplayer2.extractor"><code>TrackOutput</code></a> instances to be written to during extraction.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="ChunkSampleStream.ReleaseCallback.html" title="interface in com.google.android.exoplayer2.source.chunk">ChunkSampleStream.ReleaseCallback</a><T extends <a href="ChunkSource.html" title="interface in com.google.android.exoplayer2.source.chunk">ChunkSource</a>></th>
<td class="colLast">
<div class="block">A callback to be notified when a sample stream has finished being released.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="ChunkSource.html" title="interface in com.google.android.exoplayer2.source.chunk">ChunkSource</a></th>
<td class="colLast">
<div class="block">A provider of <a href="Chunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>Chunk</code></a>s for a <a href="ChunkSampleStream.html" title="class in com.google.android.exoplayer2.source.chunk"><code>ChunkSampleStream</code></a> to load.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="MediaChunkIterator.html" title="interface in com.google.android.exoplayer2.source.chunk">MediaChunkIterator</a></th>
<td class="colLast">
<div class="block">Iterator for media chunk sequences.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<table class="typeSummary">
<caption><span>Class Summary</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Class</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="BaseMediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk">BaseMediaChunk</a></th>
<td class="colLast">
<div class="block">A base implementation of <a href="MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>MediaChunk</code></a> that outputs to a <a href="BaseMediaChunkOutput.html" title="class in com.google.android.exoplayer2.source.chunk"><code>BaseMediaChunkOutput</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="BaseMediaChunkIterator.html" title="class in com.google.android.exoplayer2.source.chunk">BaseMediaChunkIterator</a></th>
<td class="colLast">
<div class="block">Base class for <a href="MediaChunkIterator.html" title="interface in com.google.android.exoplayer2.source.chunk"><code>MediaChunkIterator</code></a>s.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="BaseMediaChunkOutput.html" title="class in com.google.android.exoplayer2.source.chunk">BaseMediaChunkOutput</a></th>
<td class="colLast">
<div class="block">A <a href="ChunkExtractor.TrackOutputProvider.html" title="interface in com.google.android.exoplayer2.source.chunk"><code>ChunkExtractor.TrackOutputProvider</code></a> that provides <a href="../../extractor/TrackOutput.html" title="interface in com.google.android.exoplayer2.extractor"><code>TrackOutputs</code></a> based on a
predefined mapping from track type to output.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="BundledChunkExtractor.html" title="class in com.google.android.exoplayer2.source.chunk">BundledChunkExtractor</a></th>
<td class="colLast">
<div class="block"><a href="ChunkExtractor.html" title="interface in com.google.android.exoplayer2.source.chunk"><code>ChunkExtractor</code></a> implementation that uses ExoPlayer app-bundled <a href="../../extractor/Extractor.html" title="interface in com.google.android.exoplayer2.extractor"><code>Extractors</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="Chunk.html" title="class in com.google.android.exoplayer2.source.chunk">Chunk</a></th>
<td class="colLast">
<div class="block">An abstract base class for <a href="../../upstream/Loader.Loadable.html" title="interface in com.google.android.exoplayer2.upstream"><code>Loader.Loadable</code></a> implementations that load chunks of data required for
the playback of streams.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="ChunkHolder.html" title="class in com.google.android.exoplayer2.source.chunk">ChunkHolder</a></th>
<td class="colLast">
<div class="block">Holds a chunk or an indication that the end of the stream has been reached.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="ChunkSampleStream.html" title="class in com.google.android.exoplayer2.source.chunk">ChunkSampleStream</a><T extends <a href="ChunkSource.html" title="interface in com.google.android.exoplayer2.source.chunk">ChunkSource</a>></th>
<td class="colLast">
<div class="block">A <a href="../SampleStream.html" title="interface in com.google.android.exoplayer2.source"><code>SampleStream</code></a> that loads media in <a href="Chunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>Chunk</code></a>s, obtained from a <a href="ChunkSource.html" title="interface in com.google.android.exoplayer2.source.chunk"><code>ChunkSource</code></a>.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="ContainerMediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk">ContainerMediaChunk</a></th>
<td class="colLast">
<div class="block">A <a href="BaseMediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>BaseMediaChunk</code></a> that uses an <a href="../../extractor/Extractor.html" title="interface in com.google.android.exoplayer2.extractor"><code>Extractor</code></a> to decode sample data.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="DataChunk.html" title="class in com.google.android.exoplayer2.source.chunk">DataChunk</a></th>
<td class="colLast">
<div class="block">A base class for <a href="Chunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>Chunk</code></a> implementations where the data should be loaded into a <code>
byte[]</code> before being consumed.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="InitializationChunk.html" title="class in com.google.android.exoplayer2.source.chunk">InitializationChunk</a></th>
<td class="colLast">
<div class="block">A <a href="Chunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>Chunk</code></a> that uses an <a href="../../extractor/Extractor.html" title="interface in com.google.android.exoplayer2.extractor"><code>Extractor</code></a> to decode initialization data for single track.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="MediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk">MediaChunk</a></th>
<td class="colLast">
<div class="block">An abstract base class for <a href="Chunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>Chunk</code></a>s that contain media samples.</div>
</td>
</tr>
<tr class="rowColor">
<th class="colFirst" scope="row"><a href="MediaParserChunkExtractor.html" title="class in com.google.android.exoplayer2.source.chunk">MediaParserChunkExtractor</a></th>
<td class="colLast">
<div class="block"><a href="ChunkExtractor.html" title="interface in com.google.android.exoplayer2.source.chunk"><code>ChunkExtractor</code></a> implemented on top of the platform's <a href="https://developer.android.com/reference/android/media/MediaParser.html" title="class or interface in android.media" class="externalLink" target="_top"><code>MediaParser</code></a>.</div>
</td>
</tr>
<tr class="altColor">
<th class="colFirst" scope="row"><a href="SingleSampleMediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk">SingleSampleMediaChunk</a></th>
<td class="colLast">
<div class="block">A <a href="BaseMediaChunk.html" title="class in com.google.android.exoplayer2.source.chunk"><code>BaseMediaChunk</code></a> for chunks consisting of a single raw sample.</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</div>
</main>
<footer role="contentinfo">
<nav role="navigation">
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a id="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a id="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../index.html">Overview</a></li>
<li class="navBarCell1Rev">Package</li>
<li>Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
</div>
<a id="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</nav>
</footer>
</body>
</html>
| HTML | 3 | UniiqTV/ExoPlayer | docs/doc/reference/com/google/android/exoplayer2/source/chunk/package-summary.html | [
"Apache-2.0"
] |
0"!dlroW ,olleH">:#,_@ | Befunge | 0 | SuprDewd/BefungeSimulator | befunge_code/hello_world_4.befunge | [
"MIT"
] |
@use 'sass:map';
@use '../../constants' as c;
@use '@angular/material' as mat;
@mixin theme($theme) {
$is-dark-theme: map.get($theme, is-dark);
aio-cookies-popup {
.cookies-popup {
background: if($is-dark-theme, map.get(mat.$grey-palette, 50), #252525);
color: if($is-dark-theme,
map.get(map.get(mat.$grey-palette, contrast), 50),
map.get(mat.$dark-theme-foreground-palette, secondary-text)
);
.actions {
.mat-button {
color: if($is-dark-theme, c.$blue, c.$lightblue);
.mat-button-focus-overlay {
background: if($is-dark-theme, c.$black, c.$white);
}
}
}
}
}
}
| SCSS | 4 | John-Cassidy/angular | aio/src/styles/2-modules/cookies-popup/_cookies-popup-theme.scss | [
"MIT"
] |
from os import environ
from functools import wraps
import platform
import sys
import pytest
from threadpoolctl import threadpool_limits
from _pytest.doctest import DoctestItem
from sklearn.utils import _IS_32BIT
from sklearn.utils._openmp_helpers import _openmp_effective_n_threads
from sklearn.externals import _pilutil
from sklearn._min_dependencies import PYTEST_MIN_VERSION
from sklearn.utils.fixes import np_version, parse_version
from sklearn.datasets import fetch_20newsgroups
from sklearn.datasets import fetch_20newsgroups_vectorized
from sklearn.datasets import fetch_california_housing
from sklearn.datasets import fetch_covtype
from sklearn.datasets import fetch_kddcup99
from sklearn.datasets import fetch_olivetti_faces
from sklearn.datasets import fetch_rcv1
if parse_version(pytest.__version__) < parse_version(PYTEST_MIN_VERSION):
raise ImportError(
"Your version of pytest is too old, you should have "
"at least pytest >= {} installed.".format(PYTEST_MIN_VERSION)
)
dataset_fetchers = {
"fetch_20newsgroups_fxt": fetch_20newsgroups,
"fetch_20newsgroups_vectorized_fxt": fetch_20newsgroups_vectorized,
"fetch_california_housing_fxt": fetch_california_housing,
"fetch_covtype_fxt": fetch_covtype,
"fetch_kddcup99_fxt": fetch_kddcup99,
"fetch_olivetti_faces_fxt": fetch_olivetti_faces,
"fetch_rcv1_fxt": fetch_rcv1,
}
def _fetch_fixture(f):
"""Fetch dataset (download if missing and requested by environment)."""
download_if_missing = environ.get("SKLEARN_SKIP_NETWORK_TESTS", "1") == "0"
@wraps(f)
def wrapped(*args, **kwargs):
kwargs["download_if_missing"] = download_if_missing
try:
return f(*args, **kwargs)
except IOError as e:
if str(e) != "Data not found and `download_if_missing` is False":
raise
pytest.skip("test is enabled when SKLEARN_SKIP_NETWORK_TESTS=0")
return pytest.fixture(lambda: wrapped)
# Adds fixtures for fetching data
fetch_20newsgroups_fxt = _fetch_fixture(fetch_20newsgroups)
fetch_20newsgroups_vectorized_fxt = _fetch_fixture(fetch_20newsgroups_vectorized)
fetch_california_housing_fxt = _fetch_fixture(fetch_california_housing)
fetch_covtype_fxt = _fetch_fixture(fetch_covtype)
fetch_kddcup99_fxt = _fetch_fixture(fetch_kddcup99)
fetch_olivetti_faces_fxt = _fetch_fixture(fetch_olivetti_faces)
fetch_rcv1_fxt = _fetch_fixture(fetch_rcv1)
def pytest_collection_modifyitems(config, items):
"""Called after collect is completed.
Parameters
----------
config : pytest config
items : list of collected items
"""
run_network_tests = environ.get("SKLEARN_SKIP_NETWORK_TESTS", "1") == "0"
skip_network = pytest.mark.skip(
reason="test is enabled when SKLEARN_SKIP_NETWORK_TESTS=0"
)
# download datasets during collection to avoid thread unsafe behavior
# when running pytest in parallel with pytest-xdist
dataset_features_set = set(dataset_fetchers)
datasets_to_download = set()
for item in items:
if not hasattr(item, "fixturenames"):
continue
item_fixtures = set(item.fixturenames)
dataset_to_fetch = item_fixtures & dataset_features_set
if not dataset_to_fetch:
continue
if run_network_tests:
datasets_to_download |= dataset_to_fetch
else:
# network tests are skipped
item.add_marker(skip_network)
# Only download datasets on the first worker spawned by pytest-xdist
# to avoid thread unsafe behavior. If pytest-xdist is not used, we still
# download before tests run.
worker_id = environ.get("PYTEST_XDIST_WORKER", "gw0")
if worker_id == "gw0" and run_network_tests:
for name in datasets_to_download:
dataset_fetchers[name]()
for item in items:
# FeatureHasher is not compatible with PyPy
if (
item.name.endswith(("_hash.FeatureHasher", "text.HashingVectorizer"))
and platform.python_implementation() == "PyPy"
):
marker = pytest.mark.skip(
reason="FeatureHasher is not compatible with PyPy"
)
item.add_marker(marker)
# Known failure on with GradientBoostingClassifier on ARM64
elif (
item.name.endswith("GradientBoostingClassifier")
and platform.machine() == "aarch64"
):
marker = pytest.mark.xfail(
reason=(
"know failure. See "
"https://github.com/scikit-learn/scikit-learn/issues/17797" # noqa
)
)
item.add_marker(marker)
# numpy changed the str/repr formatting of numpy arrays in 1.14. We want to
# run doctests only for numpy >= 1.14.
skip_doctests = False
try:
import matplotlib # noqa
except ImportError:
skip_doctests = True
reason = "matplotlib is required to run the doctests"
try:
if np_version < parse_version("1.14"):
reason = "doctests are only run for numpy >= 1.14"
skip_doctests = True
elif _IS_32BIT:
reason = "doctest are only run when the default numpy int is 64 bits."
skip_doctests = True
elif sys.platform.startswith("win32"):
reason = (
"doctests are not run for Windows because numpy arrays "
"repr is inconsistent across platforms."
)
skip_doctests = True
except ImportError:
pass
# Normally doctest has the entire module's scope. Here we set globs to an empty dict
# to remove the module's scope:
# https://docs.python.org/3/library/doctest.html#what-s-the-execution-context
for item in items:
if isinstance(item, DoctestItem):
item.dtest.globs = {}
if skip_doctests:
skip_marker = pytest.mark.skip(reason=reason)
for item in items:
if isinstance(item, DoctestItem):
# work-around an internal error with pytest if adding a skip
# mark to a doctest in a contextmanager, see
# https://github.com/pytest-dev/pytest/issues/8796 for more
# details.
if item.name != "sklearn._config.config_context":
item.add_marker(skip_marker)
elif not _pilutil.pillow_installed:
skip_marker = pytest.mark.skip(reason="pillow (or PIL) not installed!")
for item in items:
if item.name in [
"sklearn.feature_extraction.image.PatchExtractor",
"sklearn.feature_extraction.image.extract_patches_2d",
]:
item.add_marker(skip_marker)
@pytest.fixture(scope="function")
def pyplot():
"""Setup and teardown fixture for matplotlib.
This fixture checks if we can import matplotlib. If not, the tests will be
skipped. Otherwise, we close the figures before and after running the
functions.
Returns
-------
pyplot : module
The ``matplotlib.pyplot`` module.
"""
pyplot = pytest.importorskip("matplotlib.pyplot")
pyplot.close("all")
yield pyplot
pyplot.close("all")
def pytest_runtest_setup(item):
"""Set the number of openmp threads based on the number of workers
xdist is using to prevent oversubscription.
Parameters
----------
item : pytest item
item to be processed
"""
xdist_worker_count = environ.get("PYTEST_XDIST_WORKER_COUNT")
if xdist_worker_count is None:
# returns if pytest-xdist is not installed
return
else:
xdist_worker_count = int(xdist_worker_count)
openmp_threads = _openmp_effective_n_threads()
threads_per_worker = max(openmp_threads // xdist_worker_count, 1)
threadpool_limits(threads_per_worker, user_api="openmp")
def pytest_configure(config):
# Use matplotlib agg backend during the tests including doctests
try:
import matplotlib
matplotlib.use("agg")
except ImportError:
pass
| Python | 5 | MaiRajborirug/scikit-learn | sklearn/conftest.py | [
"BSD-3-Clause"
] |
BEGIN { a = -2; print 10^a }
| Awk | 2 | Crestwave/goawk | testdata/gawk/negexp.awk | [
"MIT"
] |
package com.airbnb.lottie.animation.keyframe;
import android.graphics.PointF;
import androidx.annotation.Nullable;
import com.airbnb.lottie.value.Keyframe;
import com.airbnb.lottie.value.LottieValueCallback;
import java.util.Collections;
public class SplitDimensionPathKeyframeAnimation extends BaseKeyframeAnimation<PointF, PointF> {
private final PointF point = new PointF();
private final PointF pointWithCallbackValues = new PointF();
private final BaseKeyframeAnimation<Float, Float> xAnimation;
private final BaseKeyframeAnimation<Float, Float> yAnimation;
@Nullable protected LottieValueCallback<Float> xValueCallback;
@Nullable protected LottieValueCallback<Float> yValueCallback;
public SplitDimensionPathKeyframeAnimation(
BaseKeyframeAnimation<Float, Float> xAnimation,
BaseKeyframeAnimation<Float, Float> yAnimation) {
super(Collections.<Keyframe<PointF>>emptyList());
this.xAnimation = xAnimation;
this.yAnimation = yAnimation;
// We need to call an initial setProgress so point gets set with the initial value.
setProgress(getProgress());
}
public void setXValueCallback(@Nullable LottieValueCallback<Float> xValueCallback) {
if (this.xValueCallback != null) {
this.xValueCallback.setAnimation(null);
}
this.xValueCallback = xValueCallback;
if (xValueCallback != null) {
xValueCallback.setAnimation(this);
}
}
public void setYValueCallback(@Nullable LottieValueCallback<Float> yValueCallback) {
if (this.yValueCallback != null) {
this.yValueCallback.setAnimation(null);
}
this.yValueCallback = yValueCallback;
if (yValueCallback != null) {
yValueCallback.setAnimation(this);
}
}
@Override public void setProgress(float progress) {
xAnimation.setProgress(progress);
yAnimation.setProgress(progress);
point.set(xAnimation.getValue(), yAnimation.getValue());
for (int i = 0; i < listeners.size(); i++) {
listeners.get(i).onValueChanged();
}
}
@Override public PointF getValue() {
return getValue(null, 0);
}
@Override PointF getValue(Keyframe<PointF> keyframe, float keyframeProgress) {
Float xCallbackValue = null;
Float yCallbackValue = null;
if (xValueCallback != null) {
Keyframe<Float> xKeyframe = xAnimation.getCurrentKeyframe();
if (xKeyframe != null) {
float progress = xAnimation.getInterpolatedCurrentKeyframeProgress();
Float endFrame = xKeyframe.endFrame;
xCallbackValue =
xValueCallback.getValueInternal(xKeyframe.startFrame, endFrame == null ? xKeyframe.startFrame : endFrame, xKeyframe.startValue,
xKeyframe.endValue, keyframeProgress, keyframeProgress, progress);
}
}
if (yValueCallback != null) {
Keyframe<Float> yKeyframe = yAnimation.getCurrentKeyframe();
if (yKeyframe != null) {
float progress = yAnimation.getInterpolatedCurrentKeyframeProgress();
Float endFrame = yKeyframe.endFrame;
yCallbackValue =
yValueCallback.getValueInternal(yKeyframe.startFrame, endFrame == null ? yKeyframe.startFrame : endFrame, yKeyframe.startValue,
yKeyframe.endValue, keyframeProgress, keyframeProgress, progress);
}
}
if (xCallbackValue == null) {
pointWithCallbackValues.set(point.x, 0f);
} else {
pointWithCallbackValues.set(xCallbackValue, 0f);
}
if (yCallbackValue == null) {
pointWithCallbackValues.set(pointWithCallbackValues.x, point.y);
} else {
pointWithCallbackValues.set(pointWithCallbackValues.x, yCallbackValue);
}
return pointWithCallbackValues;
}
}
| Java | 4 | headsvk/lottie-android | lottie/src/main/java/com/airbnb/lottie/animation/keyframe/SplitDimensionPathKeyframeAnimation.java | [
"Apache-2.0"
] |
{
"Version" : 0.2,
"ModuleName" : "documentor",
"Options" : {
"PreprocessorDefinitions" : [
"ECERE_DOCUMENTOR"
],
"TargetFileName" : "documentor",
"Libraries" : [
"ecere"
]
},
"Configurations" : [
{
"Name" : "Debug",
"Options" : {
"Warnings" : "All",
"Debug" : true,
"Optimization" : "None",
"PreprocessorDefinitions" : [
"_DEBUG"
],
"Console" : true,
"FastMath" : false
}
},
{
"Name" : "Release",
"Options" : {
"Warnings" : "None",
"NoLineNumbers" : true,
"Optimization" : "Speed",
"LibraryDirs" : [
"../obj/$(PLATFORM)/bin",
"../obj/$(PLATFORM)/lib"
],
"FastMath" : true,
"PostbuildCommands" : [
"$(call cp,$(TARGET),../obj/$(PLATFORM)/bin/)"
],
"InstallCommands" : [
"$(if $(WINDOWS_HOST),$(call cp,$(TARGET),\"$(BINDIR)/\"),install $(INSTALL_FLAGS) $(TARGET) $(BINDIR)/$(MODULE)$(E))"
]
}
},
{
"Name" : "MemoryGuard",
"Options" : {
"Debug" : true,
"MemoryGuard" : true,
"PreprocessorDefinitions" : [
"_DEBUG"
],
"Console" : true,
"FastMath" : false
}
}
],
"Files" : [
{
"Folder" : "extern",
"Files" : [
{
"Folder" : "htmlView",
"Files" : [
"../extras/html/htmlParser.ec",
"../extras/html/HTMLView.ec",
"../extras/html/lines.ec",
"../extras/html/tables.ec"
]
},
{
"Folder" : "ide",
"Files" : [
"../ide/src/IDESettings.ec",
"../ide/src/OldIDESettings.ec"
]
},
"../extras/gui/controls/StringsBox.ec"
]
},
{
"Folder" : "src",
"Files" : [
"Documentor.ec",
"SettingsDialog.ec"
]
},
"resources.rc"
],
"ResourcesPath" : "",
"Resources" : [
{
"Folder" : "locale",
"Files" : [
"es.mo",
"pt_BR.mo",
"zh_CN.mo"
]
},
{
"Folder" : "actions",
"Files" : [
"../ide/res/actions/docOpen.png"
]
},
"res/documentorIcon.png"
]
}
| Ecere Projects | 3 | N-eil/ecere-sdk | documentor/documentor.epj | [
"BSD-3-Clause"
] |
program_name='string'
#if_not_defined __NCL_LIB_STRING
#define __NCL_LIB_STRING
include 'io'
define_constant
STRING_RETURN_SIZE_LIMIT = 1024 // Maximum string return size
// for string manipulation functions.
/**
* Callback triggered when a funcion within this string processing library
* attempts to process anything that will result in a return size greater than
* that defined by STRING_RETURN_SIZE_LIMIT.
*
* Anything returned by this will be used as the return of the function that
* caused the error.
*
* @return An error string.
*/
define_function char[1] string_size_error()
{
// handle, alert, ignore etc here
println("'Maximum return size too small in String.axi'")
return ''
}
/**
* Concatenates elements of an array of strings into a single string with a
* delimiter string inserted between each item.
*
* @param strings the string array to implode
* @param delim the character string to insert between the imploded
elements
* @return the imploded string
*/
define_function char[STRING_RETURN_SIZE_LIMIT] implode(char strings[][],
char delim[])
{
stack_var char ret[STRING_RETURN_SIZE_LIMIT + 1]
stack_var integer i
stack_var integer len
len = length_array(strings)
ret = strings[1]
if (len > 1) {
for (i =len - 1; i; i--) {
ret = "ret, delim, strings[(len - i) + 1]"
}
}
if (length_string(ret) > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
}
return ret
}
/**
* Explodes a string with a char delimiter into an array of strings.
* The exploded data will be placed into ret[].
* Due to NetLinx bugs, you must specify the length of ret in ret_len if you
* want the returned array sanitized.
*
* @todo Don't make quoted strings necessary; explode based on a
string instead of a char
* @param delim the delimiter to use for the exploding
* @param a the string array to explode
* @param ret the returned exploded string array of string arrays
* @param ret_len the amount of entries in ret[][]; pass 0 if you don't
care about sanitizing ret[][]
* @return the amount of entries stuffed into ret[][]
*/
define_function integer explode(char delim, char a[], char ret[][],
integer ret_len)
{
return explode_quoted(delim, a, ret, ret_len, 0)
}
/**
* Explodes a string with a char delimiter into an array of strings.
* The exploded data will be placed into ret[].
* Honors quotes; a character passed as quote (such as double quotes) are
* treated as one segment.
* Due to NetLinx bugs, you must specify the length of ret in ret_len if you
* want the returned array sanitized.
*
* @todo Don't make quoted strings necessary; explode based on a
string instead of a char
* @param delim the delimiter to use for the exploding
* @param a the string array to explode
* @param ret the returned exploded string array of string arrays
* @param ret_len the amount of entries in ret[][]; pass 0 if you don't
care about sanitizing ret[][]
* @param quote character to use as a quote
* @return the amount of entries stuffed into ret[][]
*/
define_function integer explode_quoted(char delim, char a[], char ret[][],
integer ret_len, char quote)
{
stack_var integer i
stack_var integer start
stack_var integer end
start = 1
i = 1
while (start <= length_string(a)) {
if (quote) {
if (a[start] == quote) { // handle quotes
end = find_string(a, "quote", start + 1)
if (end) {
ret[i] = mid_string(a, start + 1, (end - start) - 1)
i++
start = end + 1
continue
}
}
}
end = find_string(a, "delim", start)// nothing else stopping us?
if (end) { // then seperate by delimiter
ret[i] = mid_string(a, start, (end - start))
i++
start = end + 1
} else {
ret[i] = mid_string(a, start, length_string(a))
start = length_string(a) + 1
}
}
for (start = i + 1; start <= ret_len; start++) {
ret[start] = ''
}
return i
}
/**
* Checks to see if the passed character is a printable ASCII character.
*
* @param a the character to check
* @return a boolean value specifying whether it is printable
*/
define_function char char_is_printable(char a)
{
return a > $20 && a <= $7E
}
/**
* Checks to see if the passed character is a whitespace character.
*
* @param a the character to check
* @return a boolean value specifying whether the character is
whitespace
*/
define_function char char_is_whitespace(char a)
{
return (a >= $09 && a <= $0D) || (a >= $1C && a <= $20)
}
/**
* Returns a copy of the string with the left whitespace removed. If no
* printable characters are found, an empty string will be returned.
*
* @param a a string to trim
* @return the original string with left whitespace removed
*/
define_function char[STRING_RETURN_SIZE_LIMIT] ltrim(char a[])
{
stack_var char ret[STRING_RETURN_SIZE_LIMIT + 1]
stack_var integer i
stack_var integer len
len = length_string(a)
for (i = 1; i <= len; i++) {
if (!char_is_whitespace(a[i])) {
ret = right_string(a, len - i + 1)
if (length_string(ret) > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
} else {
return ret
}
}
}
}
/**
* Returns a copy of the string with the right whitespace removed. If no
* printable characters are found, an empty string will be returned.
*
* @param a the string to trim
* @return the string with right whitespace removed
*/
define_function char[STRING_RETURN_SIZE_LIMIT] rtrim(char a[])
{
stack_var integer i
stack_var integer len
len = length_string(a)
for (i = len; i; i--) {
if (!char_is_whitespace(a[i])) {
if (i > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
} else {
return left_string(a, i)
}
}
}
}
/**
* Returns a copy of the string with the whitespace removed. If no printable
* characters are found, an empty string will be returned.
*
* @param a a string to trim
* @return the original string with whitespace removed
*/
define_function char[STRING_RETURN_SIZE_LIMIT] trim(char a[])
{
return ltrim(rtrim(a))
}
/**
* Converts a boolean value to its string equivalent of either a 'ON' or 'OFF'.
*
* @param a a boolean value to convert
* @return a string equivalent (as ON/OFF)
*/
define_function char[3] bool_to_string(char a)
{
if (a) {
return 'ON'
} else {
return 'OFF'
}
}
/**
* Converts common string representations of boolean values into their boolean
* value equivalents.
*
* @param a a string representing a boolean value
* @return a boolean value equivalent
*/
define_function char string_to_bool(char a[])
{
stack_var char tmp[8]
tmp = lower_string(trim(a))
if (tmp == 'on' ||
tmp == 'true' ||
tmp == 'yes' ||
tmp == 'y' ||
tmp == '1') {
return TRUE
} else {
return FALSE
}
}
/**
* Converts an integer array into a comma serperated string list of its values.
*
* @param ints an intger array of values to 'listify'
* @param delim a string array to insert between entries
* @return a string list of the values
*/
define_function char[STRING_RETURN_SIZE_LIMIT] int_array_to_string(
integer ints[], char delim[])
{
stack_var char list[STRING_RETURN_SIZE_LIMIT + 1]
stack_var integer i
stack_var integer len
stack_var integer item
len = length_array(ints)
list = itoa(ints[1])
if (len > 1) {
for (i = len - 1; i; i--) {
item = (len - i) + 1
list = "list, delim, itoa(ints[item])"
}
}
if (length_string(list) > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
}
return list
}
/**
* Gets an item from a string list. This can be used to grab word n within
* a string by passing 'space' as the delimiter.
*
* @param a a string to split
* @param delim the character string which divides the list entries
* @param item the item number to return
* @return a string array the requested list item
*/
define_function char[STRING_RETURN_SIZE_LIMIT] string_get_list_item(char a[],
char delim[], integer item)
{
stack_var integer ret
stack_var integer i
stack_var integer start
stack_var integer end
for (i = 1; i <= item; i++) {
start = end + 1
end = find_string(a, delim, start)
}
if (!end) {
end = length_string(a) + 1
}
ret = end - start
if (ret > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
}
return mid_string(a, start, ret)
}
/**
* Gets the key from a single key/value pair string with the specified
* delimiter.
*
* @param a a string containing a key/value pair
* @param delim the string which divides the key and value
* @return a string containing the key component
*/
define_function char[STRING_RETURN_SIZE_LIMIT] string_get_key(char a[],
char delim[])
{
stack_var integer pos
stack_var integer retlen
pos = find_string(a, delim, 1)
if (pos) {
retlen = pos - 1
} else {
retlen = length_string(a)
}
if (retlen > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
}
return left_string(a, retlen)
}
/**
* Gets the value from a key/value pair string with the specified delimiter.
*
* @param a a string containing a key/value pair
* @param delim the string which divides the key and value
* @return a string containing the value component
*/
define_function char[STRING_RETURN_SIZE_LIMIT] string_get_value(char a[],
char delim[])
{
stack_var integer pos
stack_var integer retlen
pos = find_string(a, delim, 1)
retlen = length_string(a) - (pos + length_string(delim) - 1)
if (retlen > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
}
return right_string(a, retlen)
}
/**
* Switches the day and month fields of a date string (for coverting between US
* and international standards). for example 05/28/2009 becomes 28/05/2009.
*
* @todo merge this into a time date lib with unixtime
* @param a a string representation of a date in the form xx/xx/xxxx
* @return a string representing the same date with the first two
* components reversed
*/
define_function char[10] string_date_invert(char a[])
{
stack_var integer idx
stack_var char comp[3][4]
for (idx = 3; idx; idx--) {
comp[idx] = string_get_list_item(a, "'/'", idx)
}
return "comp[2], '/', comp[1], '/', comp[3]"
}
/**
* Gets the first instance of a string contained within the bounds of two
* substrings case sensitive
*
* @param a a string to split
* @param left the character sequence marking the left bound
* @param right the character sequence marking the right bound
* @return a string contained within the boundary sequences
*/
define_function char[STRING_RETURN_SIZE_LIMIT] string_get_between(char a[],
char left[], char right[])
{
return string_get_between_ex(a, left, right, true)
}
/**
* Gets the first instance of a string contained within the bounds of two
* substrings case insensitive
*
* @param a a string to split, max size is 100 kilobytes
* @param left the character sequence marking the left bound
* @param right the character sequence marking the right bound
* @return a string contained within the boundary sequences
*/
define_function char[STRING_RETURN_SIZE_LIMIT] string_ci_get_between(char a[],
char left[], char right[])
{
return string_get_between_ex(a, left, right, false)
}
/**
* Gets the first instance of a string contained within the bounds of two
* substrings case sensitive
*
* @param a a string to split
* @param left the character sequence marking the left bound
* @param right the character sequence marking the right bound
* @param cs TRUE for case sensitive search
* @return a string contained within the boundary sequences
*/
define_function char[STRING_RETURN_SIZE_LIMIT] string_get_between_ex(char a[],
char left[], char right[], char cs)
{
stack_var integer start
stack_var integer end
stack_var integer retlen
if(true == cs) {
start = find_string(a, left, 1) + length_string(left)
end = find_string(a, right, start)
}
else {
start = find_string(lower_string(a), lower_string(left), 1) + length_string(left)
end = find_string(lower_string(a), lower_string(right), start)
}
retlen = end - start
if (retlen > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
}
return mid_string(a, start, retlen)
}
/**
* Returns a copy of a string with the first alpha character capitalized.
* Non alpha characters are not modified. Pass a LOWER_STRING()'d string
* to lowercase all other characters.
*
* @param a a string to capitalize first characters of
* @return a capitalized string
*/
define_function char[STRING_RETURN_SIZE_LIMIT] string_ucfirst(char a[])
{
if (length_string(a) > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
}
if (a[1] >= $61 && a[1] <= $7A) {
return "a[1] - $20, mid_string(a, 2, STRING_RETURN_SIZE_LIMIT)"
}
return a
}
/**
* Returns a copy of a string with the first alpha character in each word
* capitalized. Non alpha characters are not modified. Pass a
* lower_string()'d string to lowercase all other characters.
*
* @param a a string to capitalize first characters of
* @return a capitalized string
*/
define_function char[STRING_RETURN_SIZE_LIMIT] string_ucwords(char a[])
{
stack_var char ret[STRING_RETURN_SIZE_LIMIT]
stack_var integer i
if (length_string(a) > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
}
ret = a
for (i = 1; i < length_string(ret); i++) {
if (char_is_whitespace(ret[i])) {
if (ret[i + 1] >= $61 && ret[i + 1] <= $7a) {
ret[i + 1] = ret[i + 1] - $20
}
}
}
return ret
}
/**
* Returns a string prefixed with a specified value, up to a specified length.
* If the string is the same size or is larger than the specified length,
* returns the original string.
*
* @todo Possibly allow value to be a string?
* @param a the string to prefix
* @param value the value to prefix on the string
* @param len the requested length of the string
* @return a string prefixed to length len with value
*/
define_function char[STRING_RETURN_SIZE_LIMIT] string_prefix_to_length(
char a[], char value, integer len)
{
stack_var char ret[STRING_RETURN_SIZE_LIMIT]
stack_var integer i
if (len > STRING_RETURN_SIZE_LIMIT ||
length_string(a) > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
}
if (length_string(a) < len) {
for (i = length_string(a); i < len; i++) {
ret = "value, ret"
}
}
return "ret, a"
}
/**
* Returns a string suffixed with a specified value, up to a specified length.
* If the string is the same size or is larger than the specified length,
* returns the original string.
*
* @todo Possibly allow value to be a string?
* @param a the string to suffix
* @param value the value to suffix on the string
* @param len the requested length of the string
* @return a string suffixed to length len with value
*/
define_function char[STRING_RETURN_SIZE_LIMIT] string_suffix_to_length(
char a[], char value, integer len)
{
stack_var char ret[STRING_RETURN_SIZE_LIMIT]
stack_var integer i
if (len > STRING_RETURN_SIZE_LIMIT ||
length_string(a) > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
}
if (length_string(a) < len) {
for (i = length_string(a); i < len; i++) {
ret = "value, ret"
}
}
return "a, ret"
}
/**
* Returns a string truncated to a specific length. If the string is less than
* the length specified the original string is returned. If it is truncated an
* elipsis will be appended.
*
* @param a the string to truncate
* @param len the requested length of the string
* @return a string truncated to a maximum len characters
*/
define_function char[STRING_RETURN_SIZE_LIMIT] string_truncate(char a[],
integer len)
{
return string_truncate_ex(a, "$85", len)
}
/**
* Returns a string truncated to a specific length. If the string is less than
* the length specified the original string is return. If it is truncated to
* contents of value is appended to the truncated string.
*
* @param a the string to truncate
* @param value the value to suffix on the string if truncated
* @param len the requested length of the string
* @return a string truncated to a maximum len characters
*/
define_function char[STRING_RETURN_SIZE_LIMIT] string_truncate_ex(char a[],
char value[], integer len)
{
if (len > STRING_RETURN_SIZE_LIMIT ||
length_string(a) > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
}
if (length_string(a) > len) {
return "left_string(a, len - length_string(value)), value"
} else {
return a
}
}
/**
* Returns the left substring of a string up to the specified number of
* characters.
* WARNING: this is a destructive removal - the returned substring will be
* removed from string 'a'.
*
* @param a a string to remove the substring from
* @param len the number of characters to remove
* @return a string containing the first 'len' characters of 'a'
*/
define_function char[STRING_RETURN_SIZE_LIMIT] remove_string_by_length(
char a[], integer len)
{
if (len > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
}
return remove_string(a, left_string(a, len), 1)
}
/**
* Returns a url-encoded string according to RFC 1736 / RFC 2732.
*
* @todo finish this function - it is very incomplete
* @param a the string to urlencode
* @return a string urlencoded
*/
define_function char[STRING_RETURN_SIZE_LIMIT] urlencode(char a[])
{
stack_var char ret[STRING_RETURN_SIZE_LIMIT + 1]
stack_var integer i
for (i = 1; i <= length_string(a); i++) {
if ((a[i] >= $30 && a[i] <= $39) || // numerics
(a[i] >= $41 && a[i] <= $5a) || // uppercase
(a[i] >= $61 && a[i] <= $7a) || // lowercase
a[i] == '$' || a[i] == '-' || a[i] == '_' ||
a[i] == '.' || a[i] == '+' || a[i] == '!' ||
a[i] == '*' || a[i] == $27 || a[i] == '(' ||
a[i] == ')' || a[i] == ',' || a[i] == '[' || a[i] == ']') {
ret = "ret, a[i]"
} else {
ret = "ret, '%', string_prefix_to_length(itohex(a[i]), '0', 2)"
}
}
if (length_string(ret) > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
}
return ret
}
/**
* Search through a string for a match against a list of possible substrings
* and return the element index of the matched string
*
* @param haystack a string to search
* @param needle a list of substrings to match
* @param start the array element to begin searching from
* @return an integer containing the the element index of needles
* that was matched (0 if not found)
*/
define_function integer find_string_multi(char haystack[], char needles[][],
integer start)
{
stack_var integer i
stack_var integer len
len = length_array(needles)
for (i = start; i <= len; i++) {
if (find_string(haystack, needles[i], 1)) {
return i
}
}
return 0
}
/**
* Replace all occurances of a substring with another string.
*
* @param a the string to search
* @param search the substring to replace
* @param replace the replacement subtring
* @return 'a' with all occurances of 'search' replaced by the
* contents of 'replace'
*/
define_function char[STRING_RETURN_SIZE_LIMIT] string_replace(char a[],
char search[], char replace[])
{
stack_var integer start
stack_var integer end
stack_var char ret[STRING_RETURN_SIZE_LIMIT]
if (length_string(a) > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
}
start = 1
end = find_string(a, search, start)
while (end) {
ret = "ret, mid_string(a, start, end - start), replace"
start = end + length_string(search)
end = find_string(a, search, start)
}
ret = "ret, right_string(a, length_string(a) - start + 1)"
return ret
}
/**
* Reverse a string.
*
* @param a the string to reverse
* @return the contents of 'a' with the character order reversed
*/
define_function char[STRING_RETURN_SIZE_LIMIT] string_reverse(char a[])
{
stack_var integer i
stack_var integer len
stack_var char ret[STRING_RETURN_SIZE_LIMIT]
len = length_string(a)
if (len > STRING_RETURN_SIZE_LIMIT) {
return string_size_error()
}
for (i = len; i; i--) {
ret[(len - i) + 1] = a[i];
}
set_length_string(ret, len);
return ret
}
/**
* Check is a string starts with another string.
*
* @param a the string to check
* @param search the substring to search for
* @return a boolean, true if 'a' begins with 'search'
*/
define_function char string_starts_with(char a[], char search[])
{
return left_string(a, length_string(search)) == search;
}
/**
* Check is a string end with another string.
*
* @param a the string to check
* @param search the substring to search for
* @return a boolean, true if 'a' ends with 'search'
*/
define_function char string_ends_with(char a[], char search[])
{
return right_string(a, length_string(search)) == search;
}
/**
* Remove characters from the end of the string.
*
* @param a the input string
* @param count the number of characters to remove
* @return the contents of 'a' with the characters removed
*/
define_function char[STRING_RETURN_SIZE_LIMIT] strip_chars_right(char a[],
integer count)
{
return left_string(a, length_string(a) - count)
}
/**
* Wrapper method for mid_string to bring inline with other programming
* languages.
*
* @param a the input string
* @param start the start location of the substring
* @param count the number of characters to extract
*/
define_function char[STRING_RETURN_SIZE_LIMIT] substr(char a[], integer start,
integer count)
{
return mid_string(a, start, count);
}
/**
* Alternative to substr which allows an end location to be specified instead of
* a count
*
* @param a the input string
* @param start the start location of the substring
* @param end the end location of the substring
*/
define_function char[STRING_RETURN_SIZE_LIMIT] substring(char a[],
integer start, integer end)
{
return substr(a, start, end-start+1);
}
#end_if
| NetLinx | 5 | KimBurgess/netlinx-common-libraries | string.axi | [
"MIT"
] |
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
interface In<in T>
interface Out<out T>
typealias InAlias<T> = In<T>
typealias OutAlias<T> = Out<T>
typealias TestOutForIn<T> = In<<!CONFLICTING_PROJECTION!>out<!> T>
typealias TestInForOut<T> = Out<<!CONFLICTING_PROJECTION!>in<!> T>
typealias TestOutForInWithinAlias<T> = <!CONFLICTING_PROJECTION_IN_TYPEALIAS_EXPANSION!>InAlias<out T><!>
typealias TestInForOutWithinAlias<T> = <!CONFLICTING_PROJECTION_IN_TYPEALIAS_EXPANSION!>OutAlias<in T><!>
fun <T> testOutForInWithinResolvedType(x: <!CONFLICTING_PROJECTION_IN_TYPEALIAS_EXPANSION!>InAlias<out T><!>) {}
fun <T> testInForOutWithinResolvedType(x: <!CONFLICTING_PROJECTION_IN_TYPEALIAS_EXPANSION!>OutAlias<in T><!>) {}
| Kotlin | 3 | qussarah/declare | compiler/testData/diagnostics/tests/typealias/conflictingProjections.kt | [
"Apache-2.0"
] |
i 0001 00080800 00000800
i 0002 00480001 00420000
| Octave | 0 | x86128/pymesm | examples/leds.oct | [
"MIT"
] |
Makefile.self:
@:
deploy:
@pushd ../..; make deploy; popd
publish:
@:
| Self | 3 | MusicalPatterns/musical-patterns | Makefile.self | [
"MIT"
] |
<GameProjectFile>
<PropertyGroup Type="Node" Name="Setting" ID="7c120751-fcce-471f-86d5-f3d00aa7face" Version="2.0.0.0" />
<Content ctype="GameProjectContent">
<Content>
<Animation Duration="0" Speed="1" />
<ObjectData Name="Node" CanEdit="False" ctype="SingleNodeObjectData">
<Position X="0" Y="0" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint />
<CColor A="255" R="255" G="255" B="255" />
<Size X="0" Y="0" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<Children>
<NodeObjectData Name="Sprite_3" ActionTag="1073031541" Tag="7" ObjectIndex="3" ctype="SpriteObjectData">
<Position X="161.3044" Y="660.1436" />
<Scale ScaleX="150.0722" ScaleY="191.0718" />
<AnchorPoint ScaleY="1" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="2" Y="2" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<FileData Type="Normal" Path="Setting/PvPMsgBoard.png" />
</NodeObjectData>
<NodeObjectData Name="Image_119" ActionTag="1073031538" Tag="227" ObjectIndex="119" Scale9Enable="True" LeftEage="20" TopEage="16" Scale9OriginX="20" Scale9OriginY="16" Scale9Width="15" Scale9Height="19" ctype="ImageViewObjectData">
<Position X="228.14" Y="618.16" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint ScaleX="0.5" ScaleY="0.5" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="150" Y="100" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<FileData Type="Normal" Path="Setting/pvpangle05.png" />
</NodeObjectData>
<NodeObjectData Name="Sprite_1" ActionTag="1073031535" Tag="224" ObjectIndex="1" ctype="SpriteObjectData">
<Position X="162.8453" Y="641.9263" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint ScaleX="0.5" ScaleY="0.5" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="44" Y="52" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<FileData Type="Normal" Path="Setting/pvpangle03.png" />
</NodeObjectData>
<NodeObjectData Name="Image_119_Copy" ActionTag="1073031540" Tag="229" ObjectIndex="121" Scale9Enable="True" LeftEage="20" BottomEage="26" Scale9OriginX="20" Scale9Width="16" Scale9Height="10" ctype="ImageViewObjectData">
<Position X="152.9999" Y="567.999" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint ScaleY="1" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="150" Y="300" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<FileData Type="Normal" Path="Setting/pvpangle06.png" />
</NodeObjectData>
<NodeObjectData Name="Sprite_2" ActionTag="1073031536" Tag="225" ObjectIndex="2" ctype="SpriteObjectData">
<Position X="162.8453" Y="293.9994" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint ScaleX="0.5" ScaleY="0.5" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="44" Y="52" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<FileData Type="Normal" Path="Setting/pvpangle04.png" />
</NodeObjectData>
<NodeObjectData Name="Image_119_Copy_0" ActionTag="1073031543" Tag="9" ObjectIndex="123" FlipX="True" Scale9Enable="True" LeftEage="20" TopEage="16" Scale9OriginX="20" Scale9OriginY="16" Scale9Width="15" Scale9Height="19" ctype="ImageViewObjectData">
<Position X="387.89" Y="618.16" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint ScaleX="0.5" ScaleY="0.5" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="170" Y="100" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<FileData Type="Normal" Path="Setting/pvpangle05.png" />
</NodeObjectData>
<NodeObjectData Name="Sprite_1_Copy" ActionTag="1073031544" Tag="10" ObjectIndex="4" FlipX="True" ctype="SpriteObjectData">
<Position X="457.3771" Y="642.8821" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint ScaleX="0.5" ScaleY="0.5" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="44" Y="52" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<FileData Type="Normal" Path="Setting/pvpangle03.png" />
</NodeObjectData>
<NodeObjectData Name="Image_119_Copy_Copy" ActionTag="1073031545" Tag="11" ObjectIndex="124" FlipX="True" Scale9Enable="True" LeftEage="20" BottomEage="26" Scale9OriginX="20" Scale9Width="16" Scale9Height="10" ctype="ImageViewObjectData">
<Position X="388.0028" Y="267.9994" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint ScaleX="0.5" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="170" Y="300" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<FileData Type="Normal" Path="Setting/pvpangle06.png" />
</NodeObjectData>
<NodeObjectData Name="Sprite_2_Copy" ActionTag="1073031546" Tag="12" ObjectIndex="5" FlipX="True" ctype="SpriteObjectData">
<Position X="457.3771" Y="293.9994" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint ScaleX="0.5" ScaleY="0.5" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="44" Y="52" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<FileData Type="Normal" Path="Setting/pvpangle04.png" />
</NodeObjectData>
<NodeObjectData Name="Sprite_52" ActionTag="1073031621" Tag="1222" ObjectIndex="52" ctype="SpriteObjectData">
<Position X="312.5003" Y="665.4998" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint ScaleX="0.5" ScaleY="0.5" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="270" Y="94" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<FileData Type="Normal" Path="DifficultySelection/DS16.png" />
</NodeObjectData>
<NodeObjectData Name="Sprite_53" ActionTag="1073031622" Tag="1223" ObjectIndex="53" ctype="SpriteObjectData">
<Position X="310.0011" Y="672.4999" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint ScaleX="0.5" ScaleY="0.5" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="182" Y="59" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<FileData Type="Normal" Path="Setting/BaS07.png" />
</NodeObjectData>
<NodeObjectData Name="Slider_7" ActionTag="1073031662" Tag="21" ObjectIndex="7" TouchEnable="True" PercentInfo="50" ctype="SliderObjectData">
<Position X="309.9998" Y="393.4998" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint ScaleX="0.5" ScaleY="0.5" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="274" Y="18" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<BackGroundData Type="Normal" Path="Setting/DnE10.png" />
<BallNormalData Type="Normal" Path="Setting/Star026.png" />
<BallPressedData Type="Normal" Path="Setting/Star026_2.png" />
<BallDisabledData Type="Normal" Path="Setting/Star026_2.png" />
<ProgressBarData Type="Normal" Path="Setting/DnE15.png" />
</NodeObjectData>
<NodeObjectData Name="Slider_7_Copy" ActionTag="1073031663" Tag="22" ObjectIndex="8" TouchEnable="True" PercentInfo="50" ctype="SliderObjectData">
<Position X="310" Y="518.5" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint ScaleX="0.5" ScaleY="0.5" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="274" Y="18" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<BackGroundData Type="Normal" Path="Setting/DnE10.png" />
<BallNormalData Type="Normal" Path="Setting/Star026.png" />
<BallPressedData Type="Normal" Path="Setting/Star026_2.png" />
<BallDisabledData Type="Normal" Path="Setting/Star026_2.png" />
<ProgressBarData Type="Normal" Path="Setting/DnE15.png" />
</NodeObjectData>
<NodeObjectData Name="Button_9_Copy" ActionTag="1073031680" Tag="39" ObjectIndex="10" TouchEnable="True" FontSize="14" ButtonText="" Scale9Width="154" Scale9Height="59" ctype="ButtonObjectData">
<Position X="311.0008" Y="337.4994" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint ScaleX="0.5" ScaleY="0.5" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="154" Y="59" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<TextColor A="255" R="65" G="65" B="70" />
<DisabledFileData Type="Normal" Path="Setting/BaS10.png" />
<PressedFileData Type="Normal" Path="Setting/BaS09.png" />
<NormalFileData Type="Normal" Path="Setting/BaS08.png" />
</NodeObjectData>
<NodeObjectData Name="Sprite_55" ActionTag="1073032671" Tag="439" ObjectIndex="55" ctype="SpriteObjectData">
<Position X="310" Y="571.5" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint ScaleX="0.5" ScaleY="0.5" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="154" Y="59" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<FileData Type="Normal" Path="Setting/BaS11.png" />
</NodeObjectData>
<NodeObjectData Name="Sprite_56" ActionTag="1073032672" Tag="440" ObjectIndex="56" ctype="SpriteObjectData">
<Position X="310" Y="457.5" />
<Scale ScaleX="1" ScaleY="1" />
<AnchorPoint ScaleX="0.5" ScaleY="0.5" />
<CColor A="255" R="255" G="255" B="255" />
<Size X="154" Y="59" />
<PrePosition X="0" Y="0" />
<PreSize X="0" Y="0" />
<FileData Type="Normal" Path="Setting/BaS17.png" />
</NodeObjectData>
</Children>
</ObjectData>
</Content>
</Content>
</GameProjectFile> | Csound | 3 | chukong/CocosStudioSamples | DemoMicroCardGame/CocosStudioResources/cocosstudio/Setting.csd | [
"MIT"
] |
[Desktop Entry]
Version=1.0
Type=Application
Name=Tor Browser (REPL_LANGUAGE)
Exec=/usr/bin/REPL_NAME
Icon=REPL_NAME
Categories=Network;
Comment=REPL_COMMENT
| desktop | 2 | cyberqueen-meg/blackarch | packages/tor-browser-en/tor-browser-en.desktop | [
"BSD-3-Clause"
] |
! Copyright (C) 2012 Doug Coleman.
! See http://factorcode.org/license.txt for BSD license.
USING: help.markup help.syntax kernel math sequences ;
IN: sequences.windowed
HELP: <windowed-sequence>
{ $values
{ "sequence" sequence } { "n" sequence }
{ "windowed-sequence" windowed-sequence }
}
{ $description "Create a new windowed sequence of window size " { $snippet "n" } " over " { $snippet "sequence" } "." } ;
HELP: in-bound
{ $values
{ "n" integer } { "sequence" sequence }
{ "n'" integer }
}
{ $description "Clamps an integer from 0 to the sequence length." } ;
HELP: in-bounds
{ $values
{ "a" sequence } { "b" sequence } { "sequence" sequence }
{ "a'" sequence } { "b'" sequence }
}
{ $description "Clamps two integers from 0 to the sequence length. While not in bounds for calling " { $link nth } ", these integers are in bounds for calling " { $link <slice> } "." } ;
ARTICLE: "sequences.windowed" "Windowed sequences"
"The " { $vocab-link "sequences.windowed" } " vocabulary provides a read-only virtual sequence whose elements are slices of length " { $snippet "n" } " from the current element looking backwards, inclusive of the current element. Slices may be less than " { $snippet "n" } " elements in length, especially at the head of the sequence, where the first slice will be of length 1." $nl
"Windowed sequences support " { $link nth } " and " { $link length } " from the " { $link "sequence-protocol" } "." $nl
"Creating a windowed sequence:"
{ $subsections <windowed-sequence> }
"Helper words for creating bounds-checked slices:"
{ $subsections in-bound in-bounds } ;
ABOUT: "sequences.windowed"
| Factor | 5 | alex-ilin/factor | basis/sequences/windowed/windowed-docs.factor | [
"BSD-2-Clause"
] |
module bintree
import StdEnv
import GenEq,StdMaybe
:: BSTree a = Empty | Node a (BSTree a) (BSTree a)
:: KeyValue a b = KV a b
:: MapKV k v = M (BSTree (KeyValue k v))
instance < (KeyValue a b) | < a
where
< (KV a b) (KV c d) = a < c
BSTree_emptyInt :: (BSTree Int)
BSTree_emptyInt = Empty
BSTree_emptyKV :: BSTree (KeyValue Int Char)
BSTree_emptyKV = Empty
derive gEq BSTree,KeyValue,Maybe,MapKV
BSTree_insert :: (BSTree a) a -> (BSTree a) | < a
BSTree_insert Empty number = Node number Empty Empty
BSTree_insert (Node number1 left right) number2
| number2 < number1 = Node number1 (BSTree_insert left number2) right
| number2 > number1 = Node number1 left (BSTree_insert right number2)
= Node number1 left right
BSTree_lookup :: (BSTree a) a -> Maybe a | < a
BSTree_lookup Empty _ = Nothing
BSTree_lookup (Node number left right) numb
| numb < number = BSTree_lookup left numb
| number < numb = BSTree_lookup right numb
= Just number
BSTree_update :: (BSTree a) a -> (BSTree a) | < a
BSTree_update Empty _ = Empty
BSTree_update (Node a left right) key
| key < a = Node a (BSTree_update left key) right
| a < key = Node a left (BSTree_update right key)
= Node key left right
testIntBSTree =
(Node 1 (Node 0 Empty Empty)
(Node 21 (Node 4 (Node 2 Empty Empty)
(Node 6 Empty (Node 8 Empty Empty)))
(Node 63 Empty Empty)))
testKVBSTree =
(Node (KV 6 'a')
(Node (KV 4 'c')
(Node (KV 3 'l') Empty Empty)
(Node (KV 5 'y') Empty Empty))
(Node (KV 9 'r')
(Node (KV 7 's') Empty
(Node (KV 8 'q') Empty Empty))
(Node (KV 10 'p') Empty
(Node (KV 50 'o') Empty Empty))))
BSTree_depth :: (BSTree a) -> Int
BSTree_depth tree = helpMe tree 0
where
helpMe Empty a = a
helpMe (Node _ left right) a
| (helpMe left a) > (helpMe right a) = (helpMe left a) + 1
= (helpMe right a) + 1
BSTree_isBalanced :: (BSTree a) -> Bool
BSTree_isBalanced Empty = True
BSTree_isBalanced (Node _ left right) = (abs((BSTree_depth left)-(BSTree_depth right)) < 2) && (BSTree_isBalanced left) && (BSTree_isBalanced right)
instance toString (KeyValue a b) | toString a & toString b
where
toString (KV x y) = "key: " +++ toString x +++ ", value: " +++ toString y
class Traversable t where
inOrder :: (a b -> b) b (t a) -> b
preOrder :: (a b -> b) b (t a) -> b
postOrder :: (a b -> b) b (t a) -> b
instance Traversable BSTree where
inOrder f s Empty = s
inOrder f s (Node a left right) = inOrder f (f a (inOrder f s left)) right
preOrder f s Empty = s
preOrder f s (Node a left right) = preOrder f (preOrder f (f a s) left) right
postOrder f s Empty = s
postOrder f s (Node a left right) = f a (postOrder f (postOrder f s left) right)
sortBSTree :: (BSTree a) -> [a]
sortBSTree tree = inOrder (\x s -> s ++ [x] ) [] tree
getValue :: (KeyValue k v) -> v
getValue (KV k v) = v
MapKV_update :: (MapKV k v) k (v -> Maybe v) -> MapKV k v | < k
MapKV_update (M Empty) key maybe = M Empty
MapKV_update (M tree) key updateFunction = M (find tree (BSTree_lookup tree (KV key undef)))
where
find tree Nothing = tree
find tree (Just asd) = tmp tree (updateFunction (getValue asd))
where
tmp tree Nothing = tree
tmp tree (Just vv) = BSTree_update tree (KV key vv)
MapKV_lookup :: (MapKV k v) k -> Maybe (KeyValue k v) | < k
MapKV_lookup (M a) key = BSTree_lookup a (KV key undef)
MapKV_insert :: (MapKV k v) k v -> (MapKV k v) | < k
MapKV_insert (M a) key value =M (BSTree_insert a (KV key value))
Start = (and (flatten alltests), alltests)
alltests =
[ test_BSTRe_Empty
, test_BSTree_insert
, test_BSTree_lookup
, test_BSTree_depth
, test_BSTree_isBalanced
, test_Traversable
, test_sortBSTree
, test_MapKV_update
, test_MapKV_lookup
, test_MapKV_insert
]
test_BSTRe_Empty =
[ BSTree_emptyInt === Empty
, BSTree_emptyKV === Empty
]
test_BSTree_insert =
[ BSTree_insert BSTree_emptyInt 3 ===
Node 3 Empty Empty
, BSTree_insert (BSTree_insert BSTree_emptyInt 3) 5 ===
Node 3 Empty (Node 5 Empty Empty)
, BSTree_insert (BSTree_insert BSTree_emptyInt 3) 3 ===
Node 3 Empty Empty
, BSTree_insert (BSTree_insert BSTree_emptyInt 3) 1 ===
Node 3 (Node 1 Empty Empty) Empty
]
test_BSTree_lookup =
[ BSTree_lookup testIntBSTree 21 === Just 21
, map (BSTree_lookup testIntBSTree) [3, 7, 50, 100] === repeatn 4 Nothing
, BSTree_lookup Empty 'x' === Nothing
, BSTree_lookup testKVBSTree (KV 3 undef) === Just (KV 3 'l')
]
test_BSTree_depth =
[ BSTree_depth BSTree_emptyInt == 0
, BSTree_depth BSTree_emptyKV == 0
, BSTree_depth testIntBSTree == 5
, BSTree_depth testKVBSTree == 4
]
test_BSTree_isBalanced =
[ BSTree_isBalanced Empty == True
, BSTree_isBalanced testIntBSTree == False
, BSTree_isBalanced testKVBSTree == True
]
test_Traversable =
[ inOrder (\x s -> s +++ toString x +++ ", ") "" testKVBSTree ==
"key: 3, value: l, key: 4, value: c, key: 5, value: y, key: 6, "
+++"value: a, key: 7, value: s, key: 8, value: q, key: 9, value: r, "
+++"key: 10, value: p, key: 50, value: o, "
, preOrder (\x s -> s +++ toString x) "" testIntBSTree == "1021426863"
, postOrder (\x s -> s +++ toString x) "" testIntBSTree == "0286463211"
, inOrder (\x s -> s +++ toString x) "" BSTree_emptyInt == ""
, preOrder (\x s -> s +++ toString x) "" BSTree_emptyInt == ""
, postOrder (\x s -> s +++ toString x) "" BSTree_emptyInt == ""
]
test_sortBSTree =
[ sortBSTree BSTree_emptyInt == []
, map (\(KV k v) -> v) (sortBSTree testKVBSTree) == ['l','c','y','a','s','q','r','p','o']
, sortBSTree testIntBSTree == sort (sortBSTree testIntBSTree)
, length (sortBSTree testIntBSTree) == 8
]
test_MapKV_update =
[ MapKV_update (M BSTree_emptyKV) 4 (\_ -> Just 'a') === M BSTree_emptyKV
, MapKV_update (M (Node (KV 5 'a') (Node (KV 3 's') Empty (Node (KV 4 'r') Empty Empty)) Empty)) 5 (\_ -> Just 't') ===
M ((Node (KV 5 't') (Node (KV 3 's') Empty (Node (KV 4 'r') Empty Empty)) Empty))
, MapKV_update (M (Node (KV 5 'a') (Node (KV 3 's') Empty (Node (KV 4 'r') Empty Empty)) Empty)) 5 (\_ -> Nothing) ===
M ((Node (KV 5 'a') (Node (KV 3 's') Empty (Node (KV 4 'r') Empty Empty)) Empty))
]
test_MapKV_lookup =
[ MapKV_lookup (M BSTree_emptyKV) 3 === Nothing
, MapKV_lookup (M testKVBSTree) 7 === Just (KV 7 's')
]
test_MapKV_insert =
[ foldl (\x (k,v) -> MapKV_insert x k v) (M BSTree_emptyKV)
[(6,'a'),(4,'c'),(9,'r'),(5,'y'),(3,'l'),(7,'s'),(8,'q'),
(10,'p'),(50,'o')] === M testKVBSTree
, MapKV_insert (M BSTree_emptyKV) 4 'a' === M (Node (KV 4 'a') Empty Empty)
, MapKV_insert (MapKV_insert (M BSTree_emptyKV) 4 'a') 4 'b' ===
M (Node (KV 4 'a') Empty Empty)
] | Clean | 4 | ajnavarro/language-dataset | data/github.com/ordogfioka/Clean/48780cb5f4cdf539534e9405d903e6c94d19574f/zh2/bintree.icl | [
"MIT"
] |
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Feature engineering on NCAA data\n",
"\n",
"Domain knowledge is critical to getting the best out of data analysis and machine learning.\n",
"In the case of basketball, Dean Oliver identified four factors that are critical to success:\n",
"* Shooting\n",
"* Turnovers\n",
"* Rebounding\n",
"* Free Throws\n",
"\n",
"Of course, it is not enough to identify factors, you need a way to measure them.\n",
"\n",
"Read [this article](https://www.basketball-reference.com/about/factors.html) about the four factors and how they are measured. In this notebook, we will compute them from the box score data. The numbers are slightly different from that of the article because the article is about the NBA, but these numbers are Dean Oliver's variants for NCAA games."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Shooting efficiency\n",
"\n",
"Shooting is measured as the fraction of field goal attempts made, weighting 3 points higher:\n",
"\n",
"$(FG + 0.5 * 3P) / FGA$\n",
"\n",
"Let's compute the offensive and defensive shooting efficiency and see how correlated they are to winning teams.\n",
"\n",
"See [%%bigquery documentation](https://googleapis.github.io/google-cloud-python/latest/bigquery/magics.html) for how to use it."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>team_code</th>\n",
" <th>offensive_shooting_efficiency</th>\n",
" <th>opponents_shooting_efficiency</th>\n",
" <th>win_rate</th>\n",
" <th>num_games</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>272</td>\n",
" <td>0.506978</td>\n",
" <td>0.516485</td>\n",
" <td>0.426626</td>\n",
" <td>661</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>632</td>\n",
" <td>0.473055</td>\n",
" <td>0.504116</td>\n",
" <td>0.429664</td>\n",
" <td>654</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>178</td>\n",
" <td>0.469923</td>\n",
" <td>0.512281</td>\n",
" <td>0.320840</td>\n",
" <td>667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>504980</td>\n",
" <td>0.461662</td>\n",
" <td>0.567646</td>\n",
" <td>0.000000</td>\n",
" <td>25</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>183</td>\n",
" <td>0.544678</td>\n",
" <td>0.519526</td>\n",
" <td>0.476190</td>\n",
" <td>504</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>28</td>\n",
" <td>0.516613</td>\n",
" <td>0.503602</td>\n",
" <td>0.548433</td>\n",
" <td>702</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>483</td>\n",
" <td>0.504365</td>\n",
" <td>0.513276</td>\n",
" <td>0.443769</td>\n",
" <td>658</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>7</td>\n",
" <td>0.461051</td>\n",
" <td>0.500835</td>\n",
" <td>0.413445</td>\n",
" <td>595</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>664</td>\n",
" <td>0.500198</td>\n",
" <td>0.509669</td>\n",
" <td>0.520000</td>\n",
" <td>675</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>204</td>\n",
" <td>0.483567</td>\n",
" <td>0.473647</td>\n",
" <td>0.530864</td>\n",
" <td>729</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>229</td>\n",
" <td>0.479087</td>\n",
" <td>0.487914</td>\n",
" <td>0.382309</td>\n",
" <td>667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>158</td>\n",
" <td>0.513192</td>\n",
" <td>0.503893</td>\n",
" <td>0.467949</td>\n",
" <td>624</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>136</td>\n",
" <td>0.444162</td>\n",
" <td>0.542146</td>\n",
" <td>0.202683</td>\n",
" <td>671</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>141</td>\n",
" <td>0.506201</td>\n",
" <td>0.545918</td>\n",
" <td>0.337719</td>\n",
" <td>684</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>402</td>\n",
" <td>0.481683</td>\n",
" <td>0.508385</td>\n",
" <td>0.385321</td>\n",
" <td>654</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>676</td>\n",
" <td>0.527071</td>\n",
" <td>0.493973</td>\n",
" <td>0.748201</td>\n",
" <td>695</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>172</td>\n",
" <td>0.496961</td>\n",
" <td>0.518819</td>\n",
" <td>0.343154</td>\n",
" <td>577</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>2678</td>\n",
" <td>0.467513</td>\n",
" <td>0.508301</td>\n",
" <td>0.345312</td>\n",
" <td>640</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>231</td>\n",
" <td>0.495587</td>\n",
" <td>0.501348</td>\n",
" <td>0.417630</td>\n",
" <td>692</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>699</td>\n",
" <td>0.499126</td>\n",
" <td>0.502554</td>\n",
" <td>0.517974</td>\n",
" <td>612</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>471</td>\n",
" <td>0.506805</td>\n",
" <td>0.493353</td>\n",
" <td>0.513514</td>\n",
" <td>629</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>554</td>\n",
" <td>0.532023</td>\n",
" <td>0.486887</td>\n",
" <td>0.646865</td>\n",
" <td>606</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>288</td>\n",
" <td>0.512249</td>\n",
" <td>0.475227</td>\n",
" <td>0.633001</td>\n",
" <td>703</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>101</td>\n",
" <td>0.489015</td>\n",
" <td>0.517949</td>\n",
" <td>0.340989</td>\n",
" <td>566</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24</th>\n",
" <td>1334</td>\n",
" <td>0.430077</td>\n",
" <td>0.557402</td>\n",
" <td>0.069767</td>\n",
" <td>43</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25</th>\n",
" <td>572</td>\n",
" <td>0.493080</td>\n",
" <td>0.482184</td>\n",
" <td>0.572183</td>\n",
" <td>568</td>\n",
" </tr>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>742</td>\n",
" <td>0.524123</td>\n",
" <td>0.491863</td>\n",
" <td>0.552743</td>\n",
" <td>711</td>\n",
" </tr>\n",
" <tr>\n",
" <th>27</th>\n",
" <td>782</td>\n",
" <td>0.519189</td>\n",
" <td>0.464462</td>\n",
" <td>0.779202</td>\n",
" <td>702</td>\n",
" </tr>\n",
" <tr>\n",
" <th>28</th>\n",
" <td>721</td>\n",
" <td>0.513223</td>\n",
" <td>0.523255</td>\n",
" <td>0.417981</td>\n",
" <td>634</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29</th>\n",
" <td>697</td>\n",
" <td>0.501382</td>\n",
" <td>0.474652</td>\n",
" <td>0.580210</td>\n",
" <td>667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1134</th>\n",
" <td>30036</td>\n",
" <td>0.406250</td>\n",
" <td>0.690715</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1135</th>\n",
" <td>199</td>\n",
" <td>0.417882</td>\n",
" <td>0.612814</td>\n",
" <td>0.000000</td>\n",
" <td>6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1136</th>\n",
" <td>30232</td>\n",
" <td>0.344412</td>\n",
" <td>0.632807</td>\n",
" <td>0.000000</td>\n",
" <td>6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1137</th>\n",
" <td>8911</td>\n",
" <td>0.430807</td>\n",
" <td>0.608784</td>\n",
" <td>0.000000</td>\n",
" <td>6</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1138</th>\n",
" <td>119</td>\n",
" <td>0.443858</td>\n",
" <td>0.578475</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1139</th>\n",
" <td>506514</td>\n",
" <td>0.313492</td>\n",
" <td>0.606239</td>\n",
" <td>0.000000</td>\n",
" <td>9</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1140</th>\n",
" <td>1079</td>\n",
" <td>0.424555</td>\n",
" <td>0.525222</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1141</th>\n",
" <td>20</td>\n",
" <td>0.400667</td>\n",
" <td>0.480387</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1142</th>\n",
" <td>24400</td>\n",
" <td>0.435043</td>\n",
" <td>0.761804</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1143</th>\n",
" <td>30209</td>\n",
" <td>0.581699</td>\n",
" <td>0.611641</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1144</th>\n",
" <td>30222</td>\n",
" <td>0.420286</td>\n",
" <td>0.626385</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1145</th>\n",
" <td>506332</td>\n",
" <td>0.399307</td>\n",
" <td>0.433187</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1146</th>\n",
" <td>18422</td>\n",
" <td>0.376947</td>\n",
" <td>0.698700</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1147</th>\n",
" <td>503863</td>\n",
" <td>0.372083</td>\n",
" <td>0.679280</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1148</th>\n",
" <td>506495</td>\n",
" <td>0.365774</td>\n",
" <td>0.630245</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1149</th>\n",
" <td>30165</td>\n",
" <td>0.256732</td>\n",
" <td>0.514999</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1150</th>\n",
" <td>506534</td>\n",
" <td>0.403608</td>\n",
" <td>0.472195</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1151</th>\n",
" <td>803</td>\n",
" <td>0.301586</td>\n",
" <td>0.640208</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1152</th>\n",
" <td>16142</td>\n",
" <td>0.403827</td>\n",
" <td>0.681255</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1153</th>\n",
" <td>9684</td>\n",
" <td>0.353597</td>\n",
" <td>0.535714</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1154</th>\n",
" <td>506190</td>\n",
" <td>0.469890</td>\n",
" <td>0.771429</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1155</th>\n",
" <td>506063</td>\n",
" <td>0.453915</td>\n",
" <td>0.507163</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1156</th>\n",
" <td>681</td>\n",
" <td>0.395522</td>\n",
" <td>0.669123</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1157</th>\n",
" <td>506469</td>\n",
" <td>0.409970</td>\n",
" <td>0.614945</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1158</th>\n",
" <td>506232</td>\n",
" <td>0.318842</td>\n",
" <td>0.615385</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1159</th>\n",
" <td>504906</td>\n",
" <td>0.418800</td>\n",
" <td>0.576923</td>\n",
" <td>0.000000</td>\n",
" <td>3</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1160</th>\n",
" <td>507</td>\n",
" <td>0.558824</td>\n",
" <td>0.384615</td>\n",
" <td>1.000000</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1161</th>\n",
" <td>2814</td>\n",
" <td>0.491995</td>\n",
" <td>0.428956</td>\n",
" <td>1.000000</td>\n",
" <td>2</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1162</th>\n",
" <td>500615</td>\n",
" <td>0.500000</td>\n",
" <td>0.378571</td>\n",
" <td>1.000000</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1163</th>\n",
" <td>9013</td>\n",
" <td>0.453704</td>\n",
" <td>0.306818</td>\n",
" <td>1.000000</td>\n",
" <td>1</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>1164 rows × 5 columns</p>\n",
"</div>"
],
"text/plain": [
" team_code offensive_shooting_efficiency opponents_shooting_efficiency \\\n",
"0 272 0.506978 0.516485 \n",
"1 632 0.473055 0.504116 \n",
"2 178 0.469923 0.512281 \n",
"3 504980 0.461662 0.567646 \n",
"4 183 0.544678 0.519526 \n",
"5 28 0.516613 0.503602 \n",
"6 483 0.504365 0.513276 \n",
"7 7 0.461051 0.500835 \n",
"8 664 0.500198 0.509669 \n",
"9 204 0.483567 0.473647 \n",
"10 229 0.479087 0.487914 \n",
"11 158 0.513192 0.503893 \n",
"12 136 0.444162 0.542146 \n",
"13 141 0.506201 0.545918 \n",
"14 402 0.481683 0.508385 \n",
"15 676 0.527071 0.493973 \n",
"16 172 0.496961 0.518819 \n",
"17 2678 0.467513 0.508301 \n",
"18 231 0.495587 0.501348 \n",
"19 699 0.499126 0.502554 \n",
"20 471 0.506805 0.493353 \n",
"21 554 0.532023 0.486887 \n",
"22 288 0.512249 0.475227 \n",
"23 101 0.489015 0.517949 \n",
"24 1334 0.430077 0.557402 \n",
"25 572 0.493080 0.482184 \n",
"26 742 0.524123 0.491863 \n",
"27 782 0.519189 0.464462 \n",
"28 721 0.513223 0.523255 \n",
"29 697 0.501382 0.474652 \n",
"... ... ... ... \n",
"1134 30036 0.406250 0.690715 \n",
"1135 199 0.417882 0.612814 \n",
"1136 30232 0.344412 0.632807 \n",
"1137 8911 0.430807 0.608784 \n",
"1138 119 0.443858 0.578475 \n",
"1139 506514 0.313492 0.606239 \n",
"1140 1079 0.424555 0.525222 \n",
"1141 20 0.400667 0.480387 \n",
"1142 24400 0.435043 0.761804 \n",
"1143 30209 0.581699 0.611641 \n",
"1144 30222 0.420286 0.626385 \n",
"1145 506332 0.399307 0.433187 \n",
"1146 18422 0.376947 0.698700 \n",
"1147 503863 0.372083 0.679280 \n",
"1148 506495 0.365774 0.630245 \n",
"1149 30165 0.256732 0.514999 \n",
"1150 506534 0.403608 0.472195 \n",
"1151 803 0.301586 0.640208 \n",
"1152 16142 0.403827 0.681255 \n",
"1153 9684 0.353597 0.535714 \n",
"1154 506190 0.469890 0.771429 \n",
"1155 506063 0.453915 0.507163 \n",
"1156 681 0.395522 0.669123 \n",
"1157 506469 0.409970 0.614945 \n",
"1158 506232 0.318842 0.615385 \n",
"1159 504906 0.418800 0.576923 \n",
"1160 507 0.558824 0.384615 \n",
"1161 2814 0.491995 0.428956 \n",
"1162 500615 0.500000 0.378571 \n",
"1163 9013 0.453704 0.306818 \n",
"\n",
" win_rate num_games \n",
"0 0.426626 661 \n",
"1 0.429664 654 \n",
"2 0.320840 667 \n",
"3 0.000000 25 \n",
"4 0.476190 504 \n",
"5 0.548433 702 \n",
"6 0.443769 658 \n",
"7 0.413445 595 \n",
"8 0.520000 675 \n",
"9 0.530864 729 \n",
"10 0.382309 667 \n",
"11 0.467949 624 \n",
"12 0.202683 671 \n",
"13 0.337719 684 \n",
"14 0.385321 654 \n",
"15 0.748201 695 \n",
"16 0.343154 577 \n",
"17 0.345312 640 \n",
"18 0.417630 692 \n",
"19 0.517974 612 \n",
"20 0.513514 629 \n",
"21 0.646865 606 \n",
"22 0.633001 703 \n",
"23 0.340989 566 \n",
"24 0.069767 43 \n",
"25 0.572183 568 \n",
"26 0.552743 711 \n",
"27 0.779202 702 \n",
"28 0.417981 634 \n",
"29 0.580210 667 \n",
"... ... ... \n",
"1134 0.000000 3 \n",
"1135 0.000000 6 \n",
"1136 0.000000 6 \n",
"1137 0.000000 6 \n",
"1138 0.000000 3 \n",
"1139 0.000000 9 \n",
"1140 0.000000 3 \n",
"1141 0.000000 3 \n",
"1142 0.000000 3 \n",
"1143 0.000000 3 \n",
"1144 0.000000 3 \n",
"1145 0.000000 3 \n",
"1146 0.000000 3 \n",
"1147 0.000000 3 \n",
"1148 0.000000 3 \n",
"1149 0.000000 3 \n",
"1150 0.000000 3 \n",
"1151 0.000000 3 \n",
"1152 0.000000 3 \n",
"1153 0.000000 3 \n",
"1154 0.000000 3 \n",
"1155 0.000000 3 \n",
"1156 0.000000 3 \n",
"1157 0.000000 3 \n",
"1158 0.000000 3 \n",
"1159 0.000000 3 \n",
"1160 1.000000 1 \n",
"1161 1.000000 2 \n",
"1162 1.000000 1 \n",
"1163 1.000000 1 \n",
"\n",
"[1164 rows x 5 columns]"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%bigquery df1\n",
"SELECT \n",
" team_code,\n",
" AVG(SAFE_DIVIDE(fgm + 0.5 * fgm3,fga)) AS offensive_shooting_efficiency,\n",
" AVG(SAFE_DIVIDE(opp_fgm + 0.5 * opp_fgm3,opp_fga)) AS opponents_shooting_efficiency,\n",
" AVG(win) AS win_rate,\n",
" COUNT(win) AS num_games\n",
"FROM lab_dev.team_box\n",
"WHERE fga IS NOT NULL\n",
"GROUP BY team_code"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's remove the entries corresponding to teams that played fewer than 100 games, and then plot it."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"df1 = df1[df1['num_games'] > 100]"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAELCAYAAAAiIMZEAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJztnX2YHWWV4H+nO5ekE5AOknGwIaTXxSCZQGIaEGNYYJAwMsQMiEFgd3B3ZWdGVDKanbjDIwGZJWNkGHDYRWQdmNGBKDC9wWSMHwkrGw1DZ9IBE0CRj5CWdSKkQUhDOsnZP6qqU327vm/VvXVvn9/z9NO36tatet+qe8973vOeD1FVDMMwjNairdENMAzDMPLHhLthGEYLYsLdMAyjBTHhbhiG0YKYcDcMw2hBTLgbhmG0ICbcDcMwWhAT7oZhGC2ICXfDMIwWZEKjLnz00UfrjBkzGnV5wzCMpmTLli2/VtVpccc1TLjPmDGDvr6+Rl3eMAyjKRGRF5IcZ2YZwzCMFsSEu2EYRgtiwt0wDKMFaZjNPYjh4WF27drFm2++2eimNBWTJk3i2GOPpVKpNLophmGUhFIJ9127dnHEEUcwY8YMRKTRzWkKVJWXX36ZXbt20d3d3ejmGIZREkol3N98800T7CkREd7+9reze/fuRjfFMIyc6N06wKr1T/PLwSHe2dnBsoUzWTy3K9U5SiXcARPsGbB7ZhitQ+/WAT7/4BMMDR8AYGBwiM8/+ARAKgFvC6qGYRglYtX6p0cEu8fQ8AFWrX861XlMuBuGYZSIXw4OpdofRlML996tA8xfuYHu5WuZv3IDvVsHCr3ehz70IQYHBws7/8MPP8yPf/zjws5vGEb5eWdnR6r9YTStcPfsUgODQyiH7FJFCvh169bR2dlZ0zn2798f+p4Jd8Mwli2cSUelfdS+jko7yxbOTHWephXuedmlRp1z1Spuu+02AJYuXco555wDwIYNG7j88suZMWMGv/71r3n++ed5z3vewyc+8QlmzZrFeeedx9BQ+JTprLPO4pprrqGnp4dbb72Vhx56iNNPP525c+dy7rnn8qtf/Yrnn3+eO+64g1tuuYU5c+bwyCOPsHv3bi6++GJOPfVUTj31VDZt2pS5b4ZhNAeL53Zx00Wz6ersQICuzg5uumh283vLJCUvu5SfBQsWcPPNN/PpT3+avr4+3nrrLYaHh3nkkUc488wzRwnXn//859x777187Wtf46Mf/SgPPPAAV1xxRei59+3bN5Iobc+ePWzevBkR4a677uJLX/oSN998M3/0R3/E4Ycfzuc+9zkALrvsMpYuXcoHPvABdu7cycKFC3nyyScz988wjOZg8dyu1MK8mqYV7u/s7GAgQJCntUv5mTdvHlu2bOG1115j4sSJvPe976Wvr49HHnmE2267jZtuumnk2O7ububMmTPyueeffz7y3EuWLBl5vWvXLpYsWcJLL73Evn37QoOPfvCDH7Bjx46R7ddee43XX3+dww8/PHMfDcMYHzStWSYvu5SfSqVCd3c3d999N+9///tZsGABGzdu5JlnnuE973nPqGMnTpw48rq9vT3Slg4wZcqUkdef+tSnuPrqq3niiSf46le/Gppu4eDBg2zevJn+/n76+/sZGBgwwW4YRiKaVrjnZZeqZsGCBXz5y1/mzDPPZMGCBdxxxx3MnTs310ChV199la4up5333HPPyP4jjjiC3/zmNyPb5513Hl/5yldGtvv7+3Nrg2EYrU3TCndwBPym5efw3MoL2LT8nJoFOzjC/aWXXuKMM87gHe94B5MmTWLBggU5tPYQK1as4JJLLmHevHkcffTRI/svvPBC/vEf/3FkQfW2226jr6+Pk08+mZNOOok77rgj13YYhtG6iKo25MI9PT1aXYnpySefHGP+MJJh984wxgciskVVe+KOa9oFVcMwjFrJI0FXWTHhniOf/OQnx/iif+Yzn+HjH/94g1pkGOOHtII6rwRdZaV0wl1VmzbL4e23396Q6zbKtGY0B62snXp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8G/hpnAPzbFO00GoQJdyMOAbar6hkh73vpTQ/gfp9U9R9E5FHgAmCdiPwXVd3gfUBV3xSRh3GqIi3BqWjjXetTqro+rlGq+iMROdO9xt0i8leq+nfAsLoqpr9NBTCm3ykRnNlLkTVpBbhYVZ8etVPkdA61H2L6oKovisivROQcnPz+lxfRWCNfzOY+/ngEWCwik0VkCo6m+UjE8U8D00TkDBgpmD0r6gLiFPN4VlVvw9H4Tg44bDXwcZxZw3fdfeuBP3a1cUTk3W4bg65xPPArVf0aTt7suNzYPwYudV9fzqE+h+3/DU6e+zRswsnQiDsLmRpx7A+Bj4jIb7nHH+X2KSlPA8eIyKnu548QpxSin/XAp8RV50Vkbsw5NwNniki31ybfe3fhrMV8W8tROtKIwYT7OENV/wXHbvvPwKM49uKtEcfvw7Hx/qWIbAP6gffHXOajwE9FpB/HpPN3Acd8D/h3OHb6fe6+u3Dyxf+LiPwU+CrhGuVZwDYR2Yqj/d8a06ZPAR8XkceBfw98Jmb/fcAydyHyXTHn9rgeOM9t+yXA/8MZJMagqjuAa4Hvudf+PnBMwut4z2UJ8BX3uXwfx+zi54s4ayaPi5Oy+Ysx59yNs+7xoHvO1b631+Cs0ZhJpkkwV0jDyAl3DeGAOnm/zwD+p6rOaXS78kCcqly3qGrU+oxRIszmbhj5MR34ljg1afcBn2hwe3JBRJYDf4zZ2psK09yNUiMis3G8WPy8paqnN6I9aRGRt+PY16v5XVV9ud7tMcYPJtwNwzBaEFtQNQzDaEFMuBuGYbQgJtwNwzBaEBPuhmEYLYgJd8MwjBbk/wN0RvTszbtfpAAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df1.plot(x='offensive_shooting_efficiency', y='win_rate', style='o');"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAELCAYAAAAiIMZEAAAAB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2wkA2jTObXERjPo9+wGjno3j9WkwKnj+zDzHbTBuSBY/Mv/bP4uLAHzHHAuw0WyEYXz21xBRC4zvxH8EkFOoElI4rL5xLriwxmMV79kek+3/3cz8HfuORDTFsf8IjG5NY4UxCjOdBeBPYFifNwC40O3kzPx5IjobwKUAesjocuOUawTxfOejOAcBWMTM28dsNMYqCgjAVmY+V/G6dQ068n8PxizuAIAnLeUvpAux3OuD5wAsJKJmIpoIo/TocwDaiMj6sV8F4L9t71ls+/9L8/HzAK4wH19tHsOLtQD+gogOBwAiyhPR+33e8wcYdeJhvm8SM68BsATATNWbiOhEZv4VM98OYABj62w7+TWA/0NERxNRI4ArAfynx3YAKBJRzkd2O9sBfNCmnP2aQa8FcKPNX98e4FyA0QjiM7Z1kyNd5Gm1Pm8yGpjP0DjmX5HRKrF0TDZa5L0Bw/r/XkA5hSohlnsdwMy/IaJHYCgvwGgasAfGD/56InoYhsvin21vm0xEL8Cw6K40t90Io4zvUhgK9DM+532GiE4B8EtTZ+0DcA0M61DFIwAeIKIhGH7kfyeiCTAszy94vG8FEZ1k7vcLGLW1ZynkepOMqJP15v5PM/O/A6VolLLtMNYOXiCi3zDz1V7XbZ5jiIj+BsBPiehdjJb7VfFlAN8yz9EAo+b7n/qdx3a+nxLRLADdRHQQRqOYf7C9ftBcWL2PiCbB+O1/C8b6i4qHYLSOfIGIigC+C8AKLX0Uht/9JV0ZheoioZB1imlR/oSZP+Ty2k4Yi5pvVVmsmoKIDmfmfaY1fj+Al5n5nqTligIy8gd6mflfkpZFcEfcMoIQH58zFy+3wojY+Y7P/pmAiHoAnA5jEV5IKWK5C5mCiL4I4HLH5ieZ+StJyBMUIvoMgJscmzcw8/VJyCPULqLcBUEQahBxywiCINQgotwFQRBqEFHugiAINYgod0EQhBpElLsgCEIN8v8BRpQRlqiB7esAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df1.plot(x='opponents_shooting_efficiency', y='win_rate', style='o');"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Does the relationship make sense? Do you think offensive and defensive efficiency are good predictors of a team's performance?"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Turnover Percentage\n",
"\n",
"Turnover percentage is measured as:\n",
"\n",
"$TOV / (FGA + 0.475 * FTA + TOV - OREB)$\n",
"\n",
"As before, let's compute this, and see whether it is a good predictor. For simplicity, we will compute only offensive turnover percentage, although we should really compute both sides as we did for scoring efficiency."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>team_code</th>\n",
" <th>turnover_percent</th>\n",
" <th>win_rate</th>\n",
" <th>num_games</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>272</td>\n",
" <td>0.191072</td>\n",
" <td>0.426626</td>\n",
" <td>661</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>632</td>\n",
" <td>0.212263</td>\n",
" <td>0.429664</td>\n",
" <td>654</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>178</td>\n",
" <td>0.197997</td>\n",
" <td>0.320840</td>\n",
" <td>667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>183</td>\n",
" <td>0.196554</td>\n",
" <td>0.476190</td>\n",
" <td>504</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>28</td>\n",
" <td>0.174868</td>\n",
" <td>0.548433</td>\n",
" <td>702</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>483</td>\n",
" <td>0.202556</td>\n",
" <td>0.443769</td>\n",
" <td>658</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>7</td>\n",
" <td>0.202094</td>\n",
" <td>0.413445</td>\n",
" <td>595</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>664</td>\n",
" <td>0.183439</td>\n",
" <td>0.520000</td>\n",
" <td>675</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>204</td>\n",
" <td>0.185664</td>\n",
" <td>0.530864</td>\n",
" <td>729</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>229</td>\n",
" <td>0.186421</td>\n",
" <td>0.382309</td>\n",
" <td>667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>158</td>\n",
" <td>0.182368</td>\n",
" <td>0.467949</td>\n",
" <td>624</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>136</td>\n",
" <td>0.205889</td>\n",
" <td>0.202683</td>\n",
" <td>671</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>141</td>\n",
" <td>0.185401</td>\n",
" <td>0.337719</td>\n",
" <td>684</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>402</td>\n",
" <td>0.183679</td>\n",
" <td>0.385321</td>\n",
" <td>654</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>676</td>\n",
" <td>0.204146</td>\n",
" <td>0.748201</td>\n",
" <td>695</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>172</td>\n",
" <td>0.199702</td>\n",
" <td>0.343154</td>\n",
" <td>577</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>2678</td>\n",
" <td>0.229683</td>\n",
" <td>0.345312</td>\n",
" <td>640</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>231</td>\n",
" <td>0.194933</td>\n",
" <td>0.417630</td>\n",
" <td>692</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>699</td>\n",
" <td>0.192619</td>\n",
" <td>0.517974</td>\n",
" <td>612</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>471</td>\n",
" <td>0.190303</td>\n",
" <td>0.513514</td>\n",
" <td>629</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>554</td>\n",
" <td>0.174488</td>\n",
" <td>0.646865</td>\n",
" <td>606</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>288</td>\n",
" <td>0.175029</td>\n",
" <td>0.633001</td>\n",
" <td>703</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>101</td>\n",
" <td>0.188541</td>\n",
" <td>0.340989</td>\n",
" <td>566</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>572</td>\n",
" <td>0.182393</td>\n",
" <td>0.572183</td>\n",
" <td>568</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24</th>\n",
" <td>742</td>\n",
" <td>0.176804</td>\n",
" <td>0.552743</td>\n",
" <td>711</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25</th>\n",
" <td>782</td>\n",
" <td>0.166937</td>\n",
" <td>0.779202</td>\n",
" <td>702</td>\n",
" </tr>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>721</td>\n",
" <td>0.190736</td>\n",
" <td>0.417981</td>\n",
" <td>634</td>\n",
" </tr>\n",
" <tr>\n",
" <th>27</th>\n",
" <td>697</td>\n",
" <td>0.192820</td>\n",
" <td>0.580210</td>\n",
" <td>667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>28</th>\n",
" <td>725</td>\n",
" <td>0.190195</td>\n",
" <td>0.465774</td>\n",
" <td>672</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29</th>\n",
" <td>386</td>\n",
" <td>0.196228</td>\n",
" <td>0.285491</td>\n",
" <td>641</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>321</th>\n",
" <td>716</td>\n",
" <td>0.183046</td>\n",
" <td>0.424818</td>\n",
" <td>685</td>\n",
" </tr>\n",
" <tr>\n",
" <th>322</th>\n",
" <td>328</td>\n",
" <td>0.181668</td>\n",
" <td>0.813538</td>\n",
" <td>783</td>\n",
" </tr>\n",
" <tr>\n",
" <th>323</th>\n",
" <td>488</td>\n",
" <td>0.209874</td>\n",
" <td>0.356932</td>\n",
" <td>678</td>\n",
" </tr>\n",
" <tr>\n",
" <th>324</th>\n",
" <td>738</td>\n",
" <td>0.184885</td>\n",
" <td>0.704802</td>\n",
" <td>708</td>\n",
" </tr>\n",
" <tr>\n",
" <th>325</th>\n",
" <td>711</td>\n",
" <td>0.190054</td>\n",
" <td>0.492997</td>\n",
" <td>714</td>\n",
" </tr>\n",
" <tr>\n",
" <th>326</th>\n",
" <td>514</td>\n",
" <td>0.173974</td>\n",
" <td>0.564560</td>\n",
" <td>728</td>\n",
" </tr>\n",
" <tr>\n",
" <th>327</th>\n",
" <td>392</td>\n",
" <td>0.190724</td>\n",
" <td>0.680224</td>\n",
" <td>713</td>\n",
" </tr>\n",
" <tr>\n",
" <th>328</th>\n",
" <td>305</td>\n",
" <td>0.187948</td>\n",
" <td>0.502146</td>\n",
" <td>699</td>\n",
" </tr>\n",
" <tr>\n",
" <th>329</th>\n",
" <td>260</td>\n",
" <td>0.166279</td>\n",
" <td>0.859211</td>\n",
" <td>760</td>\n",
" </tr>\n",
" <tr>\n",
" <th>330</th>\n",
" <td>553</td>\n",
" <td>0.202890</td>\n",
" <td>0.385399</td>\n",
" <td>589</td>\n",
" </tr>\n",
" <tr>\n",
" <th>331</th>\n",
" <td>371</td>\n",
" <td>0.195883</td>\n",
" <td>0.562412</td>\n",
" <td>713</td>\n",
" </tr>\n",
" <tr>\n",
" <th>332</th>\n",
" <td>28600</td>\n",
" <td>0.193170</td>\n",
" <td>0.556492</td>\n",
" <td>593</td>\n",
" </tr>\n",
" <tr>\n",
" <th>333</th>\n",
" <td>472</td>\n",
" <td>0.194620</td>\n",
" <td>0.731973</td>\n",
" <td>735</td>\n",
" </tr>\n",
" <tr>\n",
" <th>334</th>\n",
" <td>457</td>\n",
" <td>0.169430</td>\n",
" <td>0.750968</td>\n",
" <td>775</td>\n",
" </tr>\n",
" <tr>\n",
" <th>335</th>\n",
" <td>355</td>\n",
" <td>0.195786</td>\n",
" <td>0.501408</td>\n",
" <td>710</td>\n",
" </tr>\n",
" <tr>\n",
" <th>336</th>\n",
" <td>416</td>\n",
" <td>0.187034</td>\n",
" <td>0.738622</td>\n",
" <td>769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>337</th>\n",
" <td>17</td>\n",
" <td>0.205061</td>\n",
" <td>0.355200</td>\n",
" <td>625</td>\n",
" </tr>\n",
" <tr>\n",
" <th>338</th>\n",
" <td>556</td>\n",
" <td>0.175228</td>\n",
" <td>0.593496</td>\n",
" <td>738</td>\n",
" </tr>\n",
" <tr>\n",
" <th>339</th>\n",
" <td>80</td>\n",
" <td>0.194060</td>\n",
" <td>0.397380</td>\n",
" <td>458</td>\n",
" </tr>\n",
" <tr>\n",
" <th>340</th>\n",
" <td>14927</td>\n",
" <td>0.186778</td>\n",
" <td>0.711409</td>\n",
" <td>596</td>\n",
" </tr>\n",
" <tr>\n",
" <th>341</th>\n",
" <td>741</td>\n",
" <td>0.180576</td>\n",
" <td>0.345576</td>\n",
" <td>599</td>\n",
" </tr>\n",
" <tr>\n",
" <th>342</th>\n",
" <td>650</td>\n",
" <td>0.168030</td>\n",
" <td>0.501916</td>\n",
" <td>522</td>\n",
" </tr>\n",
" <tr>\n",
" <th>343</th>\n",
" <td>334</td>\n",
" <td>0.171997</td>\n",
" <td>0.810710</td>\n",
" <td>803</td>\n",
" </tr>\n",
" <tr>\n",
" <th>344</th>\n",
" <td>688</td>\n",
" <td>0.177524</td>\n",
" <td>0.681392</td>\n",
" <td>747</td>\n",
" </tr>\n",
" <tr>\n",
" <th>345</th>\n",
" <td>1104</td>\n",
" <td>0.177548</td>\n",
" <td>0.647287</td>\n",
" <td>516</td>\n",
" </tr>\n",
" <tr>\n",
" <th>346</th>\n",
" <td>464</td>\n",
" <td>0.170675</td>\n",
" <td>0.481720</td>\n",
" <td>465</td>\n",
" </tr>\n",
" <tr>\n",
" <th>347</th>\n",
" <td>505</td>\n",
" <td>0.181377</td>\n",
" <td>0.538062</td>\n",
" <td>578</td>\n",
" </tr>\n",
" <tr>\n",
" <th>348</th>\n",
" <td>2</td>\n",
" <td>0.197957</td>\n",
" <td>0.462247</td>\n",
" <td>543</td>\n",
" </tr>\n",
" <tr>\n",
" <th>349</th>\n",
" <td>368</td>\n",
" <td>0.200837</td>\n",
" <td>0.409836</td>\n",
" <td>488</td>\n",
" </tr>\n",
" <tr>\n",
" <th>350</th>\n",
" <td>2743</td>\n",
" <td>0.193202</td>\n",
" <td>0.483301</td>\n",
" <td>509</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>351 rows × 4 columns</p>\n",
"</div>"
],
"text/plain": [
" team_code turnover_percent win_rate num_games\n",
"0 272 0.191072 0.426626 661\n",
"1 632 0.212263 0.429664 654\n",
"2 178 0.197997 0.320840 667\n",
"3 183 0.196554 0.476190 504\n",
"4 28 0.174868 0.548433 702\n",
"5 483 0.202556 0.443769 658\n",
"6 7 0.202094 0.413445 595\n",
"7 664 0.183439 0.520000 675\n",
"8 204 0.185664 0.530864 729\n",
"9 229 0.186421 0.382309 667\n",
"10 158 0.182368 0.467949 624\n",
"11 136 0.205889 0.202683 671\n",
"12 141 0.185401 0.337719 684\n",
"13 402 0.183679 0.385321 654\n",
"14 676 0.204146 0.748201 695\n",
"15 172 0.199702 0.343154 577\n",
"16 2678 0.229683 0.345312 640\n",
"17 231 0.194933 0.417630 692\n",
"18 699 0.192619 0.517974 612\n",
"19 471 0.190303 0.513514 629\n",
"20 554 0.174488 0.646865 606\n",
"21 288 0.175029 0.633001 703\n",
"22 101 0.188541 0.340989 566\n",
"23 572 0.182393 0.572183 568\n",
"24 742 0.176804 0.552743 711\n",
"25 782 0.166937 0.779202 702\n",
"26 721 0.190736 0.417981 634\n",
"27 697 0.192820 0.580210 667\n",
"28 725 0.190195 0.465774 672\n",
"29 386 0.196228 0.285491 641\n",
".. ... ... ... ...\n",
"321 716 0.183046 0.424818 685\n",
"322 328 0.181668 0.813538 783\n",
"323 488 0.209874 0.356932 678\n",
"324 738 0.184885 0.704802 708\n",
"325 711 0.190054 0.492997 714\n",
"326 514 0.173974 0.564560 728\n",
"327 392 0.190724 0.680224 713\n",
"328 305 0.187948 0.502146 699\n",
"329 260 0.166279 0.859211 760\n",
"330 553 0.202890 0.385399 589\n",
"331 371 0.195883 0.562412 713\n",
"332 28600 0.193170 0.556492 593\n",
"333 472 0.194620 0.731973 735\n",
"334 457 0.169430 0.750968 775\n",
"335 355 0.195786 0.501408 710\n",
"336 416 0.187034 0.738622 769\n",
"337 17 0.205061 0.355200 625\n",
"338 556 0.175228 0.593496 738\n",
"339 80 0.194060 0.397380 458\n",
"340 14927 0.186778 0.711409 596\n",
"341 741 0.180576 0.345576 599\n",
"342 650 0.168030 0.501916 522\n",
"343 334 0.171997 0.810710 803\n",
"344 688 0.177524 0.681392 747\n",
"345 1104 0.177548 0.647287 516\n",
"346 464 0.170675 0.481720 465\n",
"347 505 0.181377 0.538062 578\n",
"348 2 0.197957 0.462247 543\n",
"349 368 0.200837 0.409836 488\n",
"350 2743 0.193202 0.483301 509\n",
"\n",
"[351 rows x 4 columns]"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%bigquery df2\n",
"SELECT \n",
" team_code,\n",
" AVG(SAFE_DIVIDE(tov,fga+0.475*fta+tov-oreb)) AS turnover_percent,\n",
" AVG(win) AS win_rate,\n",
" COUNT(win) AS num_games\n",
"FROM lab_dev.team_box\n",
"WHERE fga IS NOT NULL\n",
"GROUP BY team_code\n",
"HAVING num_games > 100"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEKCAYAAADpfBXhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJztnX+UFOWZ77/PNA0zgHEwshsdGCFGRVkEZBQSQ1ZcBW+MyPoLf+2J2d1wsqsxouEunstR9GaP3LCu0az3usbrNbvxKvgjc0DcRbPgWa8JWYadQRYEgwo4E06WIKMRBuiZee4fVTVUV79v1VtdVd3V1c/nHA7T3dVVT1V3P+9Tz09iZgiCIAjZoqHaAgiCIAjxI8pdEAQhg4hyFwRByCCi3AVBEDKIKHdBEIQMIspdEAQhg4hyFwRByCCi3AVBEDKIKHdBEIQMMqxaBz711FN5woQJ1Tq8IAhCTbJly5bfMvPYoO2qptwnTJiAjo6Oah1eEAShJiGivSbbiVtGEAQhg4hyFwRByCCi3AVBEDJI1XzugiDUB4VCAd3d3Th69Gi1RakpGhsbMW7cOOTz+bLeL8pdEIRE6e7uxkknnYQJEyaAiKotTk3AzDh48CC6u7sxceLEsvYhyj2ltHf2YOX6Xfh1bx9Ob27CknnnYMH0lmqLJQihOXr0qCj2kBARPvvZz+LAgQNl70OUewpp7+zBvS9vQ19hAADQ09uHe1/eBgCi4IWaRBR7eKJeMwmoppCV63cNKXaHvsIAVq7fVSWJBEGoNcRyTyG/7u0L9bwgZAlxScaDWO4p5PTmplDPC0JWcFySPb19YJxwSbZ39iR63K9+9avo7e1NbP9vvPEGfv7znye2fxWi3FPIknnnoCmf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B11GoU2qpK6RQX6zyPH7Z/n8LrPYJAPBlAD8EAGbeSUR7YbVeXg2rz8v9sJS80wtkLoD5RPRd+3EjgFb779eZ+aMAmf6NrcZ1IKLn7OMfhaXs3yJrWNRwWB0ii86DiE4C0MLMP7XlPWo/P9eWq9PefjQspb4PwAfM3KU4b0EIRJS7UC36UXzn2Oh5/bDnsdOdbwAB31u2WkMftBt6LQTwLfslgmX97nJvT0QzFcdT7lrxmGAtDDdp3hO0XwLwEDP/vUemCThxzoB13uKCEYwRt4xQSX4H4CT7770AziOiEUTUDGvUWljeBHALABDR2bCscEdxrwLwXwGczNYkJcDqiPhtsk1suwNgGC6yOwo2wFo0/h+spmEXk9WDHrZf/2zvG5n5dwC6yR40Y5/3SFumP3X56VuI6PcC5HBfR0FQIspdqBjMfBCW++I/ANwJy33yH/b/nX7v1fA/ATQQ0TbYw1H4RP/tF2G1dF3t2v6/wxrZ9zYRbbcfh2EzgL+D1a3yA1j98A/Ayl55jojehuWSmaR5/58AuNPe7ucAPsfMrwH4vwB+YZ/HiwhW3M8AeEICqoIf0hVSEAwgoksAfJeZv1ZtWQTBBLHcBUEQMohY7oLggoimwJqR6eYYM8+shjyCUC6i3AVBEDKIuGUEQRAyiCh3QRCEDCLKXRAEIYOIchcEQcggotwFQRAyyP8HNLxwGeGtcssAAAAASUVORK5CYII=\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df2.plot(x='turnover_percent', y='win_rate', style='o');"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Rebounding\n",
"\n",
"Again, we'd have to measure both sides, but for simplicity, we'll do only the offensive rebounds.\n",
"\n",
"$ORB / (ORB + Opp DRB)$"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>team_code</th>\n",
" <th>rebounding</th>\n",
" <th>win_rate</th>\n",
" <th>num_games</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>272</td>\n",
" <td>0.241530</td>\n",
" <td>0.426626</td>\n",
" <td>661</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>632</td>\n",
" <td>0.293107</td>\n",
" <td>0.429664</td>\n",
" <td>654</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>178</td>\n",
" <td>0.297945</td>\n",
" <td>0.320840</td>\n",
" <td>667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>183</td>\n",
" <td>0.245612</td>\n",
" <td>0.476190</td>\n",
" <td>504</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>28</td>\n",
" <td>0.283190</td>\n",
" <td>0.548433</td>\n",
" <td>702</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>483</td>\n",
" <td>0.276217</td>\n",
" <td>0.443769</td>\n",
" <td>658</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>7</td>\n",
" <td>0.336807</td>\n",
" <td>0.413445</td>\n",
" <td>595</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>664</td>\n",
" <td>0.287098</td>\n",
" <td>0.520000</td>\n",
" <td>675</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>204</td>\n",
" <td>0.322037</td>\n",
" <td>0.530864</td>\n",
" <td>729</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>229</td>\n",
" <td>0.291606</td>\n",
" <td>0.382309</td>\n",
" <td>667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>158</td>\n",
" <td>0.289716</td>\n",
" <td>0.467949</td>\n",
" <td>624</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>136</td>\n",
" <td>0.282258</td>\n",
" <td>0.202683</td>\n",
" <td>671</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>141</td>\n",
" <td>0.283392</td>\n",
" <td>0.337719</td>\n",
" <td>684</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>402</td>\n",
" <td>0.314090</td>\n",
" <td>0.385321</td>\n",
" <td>654</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>676</td>\n",
" <td>0.352438</td>\n",
" <td>0.748201</td>\n",
" <td>695</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>172</td>\n",
" <td>0.287586</td>\n",
" <td>0.343154</td>\n",
" <td>577</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>2678</td>\n",
" <td>0.282616</td>\n",
" <td>0.345312</td>\n",
" <td>640</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>231</td>\n",
" <td>0.295516</td>\n",
" <td>0.417630</td>\n",
" <td>692</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>699</td>\n",
" <td>0.315440</td>\n",
" <td>0.517974</td>\n",
" <td>612</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>471</td>\n",
" <td>0.287515</td>\n",
" <td>0.513514</td>\n",
" <td>629</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>554</td>\n",
" <td>0.255758</td>\n",
" <td>0.646865</td>\n",
" <td>606</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>288</td>\n",
" <td>0.331052</td>\n",
" <td>0.633001</td>\n",
" <td>703</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>101</td>\n",
" <td>0.297901</td>\n",
" <td>0.340989</td>\n",
" <td>566</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>572</td>\n",
" <td>0.316834</td>\n",
" <td>0.572183</td>\n",
" <td>568</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24</th>\n",
" <td>742</td>\n",
" <td>0.278543</td>\n",
" <td>0.552743</td>\n",
" <td>711</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25</th>\n",
" <td>782</td>\n",
" <td>0.337313</td>\n",
" <td>0.779202</td>\n",
" <td>702</td>\n",
" </tr>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>721</td>\n",
" <td>0.253597</td>\n",
" <td>0.417981</td>\n",
" <td>634</td>\n",
" </tr>\n",
" <tr>\n",
" <th>27</th>\n",
" <td>697</td>\n",
" <td>0.333753</td>\n",
" <td>0.580210</td>\n",
" <td>667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>28</th>\n",
" <td>725</td>\n",
" <td>0.284064</td>\n",
" <td>0.465774</td>\n",
" <td>672</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29</th>\n",
" <td>386</td>\n",
" <td>0.245261</td>\n",
" <td>0.285491</td>\n",
" <td>641</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>321</th>\n",
" <td>716</td>\n",
" <td>0.303904</td>\n",
" <td>0.424818</td>\n",
" <td>685</td>\n",
" </tr>\n",
" <tr>\n",
" <th>322</th>\n",
" <td>328</td>\n",
" <td>0.332755</td>\n",
" <td>0.813538</td>\n",
" <td>783</td>\n",
" </tr>\n",
" <tr>\n",
" <th>323</th>\n",
" <td>488</td>\n",
" <td>0.303440</td>\n",
" <td>0.356932</td>\n",
" <td>678</td>\n",
" </tr>\n",
" <tr>\n",
" <th>324</th>\n",
" <td>738</td>\n",
" <td>0.299944</td>\n",
" <td>0.704802</td>\n",
" <td>708</td>\n",
" </tr>\n",
" <tr>\n",
" <th>325</th>\n",
" <td>711</td>\n",
" <td>0.364667</td>\n",
" <td>0.492997</td>\n",
" <td>714</td>\n",
" </tr>\n",
" <tr>\n",
" <th>326</th>\n",
" <td>514</td>\n",
" <td>0.294900</td>\n",
" <td>0.564560</td>\n",
" <td>728</td>\n",
" </tr>\n",
" <tr>\n",
" <th>327</th>\n",
" <td>392</td>\n",
" <td>0.316788</td>\n",
" <td>0.680224</td>\n",
" <td>713</td>\n",
" </tr>\n",
" <tr>\n",
" <th>328</th>\n",
" <td>305</td>\n",
" <td>0.263030</td>\n",
" <td>0.502146</td>\n",
" <td>699</td>\n",
" </tr>\n",
" <tr>\n",
" <th>329</th>\n",
" <td>260</td>\n",
" <td>0.320352</td>\n",
" <td>0.859211</td>\n",
" <td>760</td>\n",
" </tr>\n",
" <tr>\n",
" <th>330</th>\n",
" <td>553</td>\n",
" <td>0.303100</td>\n",
" <td>0.385399</td>\n",
" <td>589</td>\n",
" </tr>\n",
" <tr>\n",
" <th>331</th>\n",
" <td>371</td>\n",
" <td>0.252450</td>\n",
" <td>0.562412</td>\n",
" <td>713</td>\n",
" </tr>\n",
" <tr>\n",
" <th>332</th>\n",
" <td>28600</td>\n",
" <td>0.289313</td>\n",
" <td>0.556492</td>\n",
" <td>593</td>\n",
" </tr>\n",
" <tr>\n",
" <th>333</th>\n",
" <td>472</td>\n",
" <td>0.362197</td>\n",
" <td>0.731973</td>\n",
" <td>735</td>\n",
" </tr>\n",
" <tr>\n",
" <th>334</th>\n",
" <td>457</td>\n",
" <td>0.384203</td>\n",
" <td>0.750968</td>\n",
" <td>775</td>\n",
" </tr>\n",
" <tr>\n",
" <th>335</th>\n",
" <td>355</td>\n",
" <td>0.270435</td>\n",
" <td>0.501408</td>\n",
" <td>710</td>\n",
" </tr>\n",
" <tr>\n",
" <th>336</th>\n",
" <td>416</td>\n",
" <td>0.341266</td>\n",
" <td>0.738622</td>\n",
" <td>769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>337</th>\n",
" <td>17</td>\n",
" <td>0.302730</td>\n",
" <td>0.355200</td>\n",
" <td>625</td>\n",
" </tr>\n",
" <tr>\n",
" <th>338</th>\n",
" <td>556</td>\n",
" <td>0.325347</td>\n",
" <td>0.593496</td>\n",
" <td>738</td>\n",
" </tr>\n",
" <tr>\n",
" <th>339</th>\n",
" <td>80</td>\n",
" <td>0.276110</td>\n",
" <td>0.397380</td>\n",
" <td>458</td>\n",
" </tr>\n",
" <tr>\n",
" <th>340</th>\n",
" <td>14927</td>\n",
" <td>0.281573</td>\n",
" <td>0.711409</td>\n",
" <td>596</td>\n",
" </tr>\n",
" <tr>\n",
" <th>341</th>\n",
" <td>741</td>\n",
" <td>0.276466</td>\n",
" <td>0.345576</td>\n",
" <td>599</td>\n",
" </tr>\n",
" <tr>\n",
" <th>342</th>\n",
" <td>650</td>\n",
" <td>0.267929</td>\n",
" <td>0.501916</td>\n",
" <td>522</td>\n",
" </tr>\n",
" <tr>\n",
" <th>343</th>\n",
" <td>334</td>\n",
" <td>0.372246</td>\n",
" <td>0.810710</td>\n",
" <td>803</td>\n",
" </tr>\n",
" <tr>\n",
" <th>344</th>\n",
" <td>688</td>\n",
" <td>0.338079</td>\n",
" <td>0.681392</td>\n",
" <td>747</td>\n",
" </tr>\n",
" <tr>\n",
" <th>345</th>\n",
" <td>1104</td>\n",
" <td>0.295409</td>\n",
" <td>0.647287</td>\n",
" <td>516</td>\n",
" </tr>\n",
" <tr>\n",
" <th>346</th>\n",
" <td>464</td>\n",
" <td>0.272608</td>\n",
" <td>0.481720</td>\n",
" <td>465</td>\n",
" </tr>\n",
" <tr>\n",
" <th>347</th>\n",
" <td>505</td>\n",
" <td>0.292021</td>\n",
" <td>0.538062</td>\n",
" <td>578</td>\n",
" </tr>\n",
" <tr>\n",
" <th>348</th>\n",
" <td>2</td>\n",
" <td>0.270286</td>\n",
" <td>0.462247</td>\n",
" <td>543</td>\n",
" </tr>\n",
" <tr>\n",
" <th>349</th>\n",
" <td>368</td>\n",
" <td>0.255851</td>\n",
" <td>0.409836</td>\n",
" <td>488</td>\n",
" </tr>\n",
" <tr>\n",
" <th>350</th>\n",
" <td>2743</td>\n",
" <td>0.259266</td>\n",
" <td>0.483301</td>\n",
" <td>509</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>351 rows × 4 columns</p>\n",
"</div>"
],
"text/plain": [
" team_code rebounding win_rate num_games\n",
"0 272 0.241530 0.426626 661\n",
"1 632 0.293107 0.429664 654\n",
"2 178 0.297945 0.320840 667\n",
"3 183 0.245612 0.476190 504\n",
"4 28 0.283190 0.548433 702\n",
"5 483 0.276217 0.443769 658\n",
"6 7 0.336807 0.413445 595\n",
"7 664 0.287098 0.520000 675\n",
"8 204 0.322037 0.530864 729\n",
"9 229 0.291606 0.382309 667\n",
"10 158 0.289716 0.467949 624\n",
"11 136 0.282258 0.202683 671\n",
"12 141 0.283392 0.337719 684\n",
"13 402 0.314090 0.385321 654\n",
"14 676 0.352438 0.748201 695\n",
"15 172 0.287586 0.343154 577\n",
"16 2678 0.282616 0.345312 640\n",
"17 231 0.295516 0.417630 692\n",
"18 699 0.315440 0.517974 612\n",
"19 471 0.287515 0.513514 629\n",
"20 554 0.255758 0.646865 606\n",
"21 288 0.331052 0.633001 703\n",
"22 101 0.297901 0.340989 566\n",
"23 572 0.316834 0.572183 568\n",
"24 742 0.278543 0.552743 711\n",
"25 782 0.337313 0.779202 702\n",
"26 721 0.253597 0.417981 634\n",
"27 697 0.333753 0.580210 667\n",
"28 725 0.284064 0.465774 672\n",
"29 386 0.245261 0.285491 641\n",
".. ... ... ... ...\n",
"321 716 0.303904 0.424818 685\n",
"322 328 0.332755 0.813538 783\n",
"323 488 0.303440 0.356932 678\n",
"324 738 0.299944 0.704802 708\n",
"325 711 0.364667 0.492997 714\n",
"326 514 0.294900 0.564560 728\n",
"327 392 0.316788 0.680224 713\n",
"328 305 0.263030 0.502146 699\n",
"329 260 0.320352 0.859211 760\n",
"330 553 0.303100 0.385399 589\n",
"331 371 0.252450 0.562412 713\n",
"332 28600 0.289313 0.556492 593\n",
"333 472 0.362197 0.731973 735\n",
"334 457 0.384203 0.750968 775\n",
"335 355 0.270435 0.501408 710\n",
"336 416 0.341266 0.738622 769\n",
"337 17 0.302730 0.355200 625\n",
"338 556 0.325347 0.593496 738\n",
"339 80 0.276110 0.397380 458\n",
"340 14927 0.281573 0.711409 596\n",
"341 741 0.276466 0.345576 599\n",
"342 650 0.267929 0.501916 522\n",
"343 334 0.372246 0.810710 803\n",
"344 688 0.338079 0.681392 747\n",
"345 1104 0.295409 0.647287 516\n",
"346 464 0.272608 0.481720 465\n",
"347 505 0.292021 0.538062 578\n",
"348 2 0.270286 0.462247 543\n",
"349 368 0.255851 0.409836 488\n",
"350 2743 0.259266 0.483301 509\n",
"\n",
"[351 rows x 4 columns]"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%bigquery df3\n",
"SELECT \n",
" team_code,\n",
" AVG(SAFE_DIVIDE(oreb,oreb + opp_dreb)) AS rebounding,\n",
" AVG(win) AS win_rate,\n",
" COUNT(win) AS num_games\n",
"FROM lab_dev.team_box\n",
"WHERE fga IS NOT NULL\n",
"GROUP BY team_code\n",
"HAVING num_games > 100"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEKCAYAAADpfBXhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJztnX+YFOWV779nehqYAeMQJYkOIpMsEXFJmDD+SAiusEZMWJFHkiDq3k3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XkfgPca2z4O4Alj+3+iuHxdEEJHbO5CPfG28Z8A/Cszr1Lsx4rXTozCGOQQUROKyaJMrFksx+D/92I9PvL83YJgRUbuQj2yC0UTiWlPn0xEH7R8vtLy/6fG65+gmIoVAK4H8Izx+jCK5hWgWDIt63Ht/QBmWnLmqzoYFTsBrDBs7+9FMdGUIISOjNyFuoOZh4jocwAetVRquhXFTH4AMJWIfo7iyNlUvl9CsRLOWgBDAD5vbP8+gP9NRHsA/DNOzQ5U1z5BRKsBbCGiERQ7idN8iL8JwO8C2IdixZ+fATjm43hB0EKyQgpCzBDRFGY+TkRnoJiSeYFhfxeE0JCRuyDEzz8SURuK9v2/EMUuRIGM3AVBEFKIOFQFQRBSiCh3QRCEFCLKXRAEIYWIchcEQUghotwFQRBSiCh3QRCEFPL/ASHV/fYZkpTEAAAAAElFTkSuQmCC\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df3.plot(x='rebounding', y='win_rate', style='o');"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The relationship doesn't seem all that strong here. One way to measure the strength of the relationship is through the correlation. Numbers near 0 mean not correlated and numbers near +/- 1 indicate high correlation:"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"team_code 0.054005\n",
"rebounding 0.377354\n",
"win_rate 1.000000\n",
"num_games 0.464207\n",
"Name: win_rate, dtype: float64"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df3.corr()['win_rate']"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The correlation between rebounding and win_rate is 0.38. Compare that to the first data frame:"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"team_code 0.054005\n",
"offensive_shooting_efficiency 0.671579\n",
"opponents_shooting_efficiency -0.742178\n",
"win_rate 1.000000\n",
"num_games 0.464207\n",
"Name: win_rate, dtype: float64"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df1.corr()['win_rate']"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Notice that the offensive and opponents efficiency have correlation of 0.67 and -0.66, which are higher."
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"team_code 0.054005\n",
"turnover_percent -0.551083\n",
"win_rate 1.000000\n",
"num_games 0.464207\n",
"Name: win_rate, dtype: float64"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df2.corr()['win_rate']"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Free throw factor\n",
"\n",
"This is a measure of both how often a team gets to the line and how often they make them:\n",
"\n",
"$FT / FGA$\n"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>team_code</th>\n",
" <th>freethrows</th>\n",
" <th>win_rate</th>\n",
" <th>num_games</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>272</td>\n",
" <td>0.243652</td>\n",
" <td>0.426626</td>\n",
" <td>661</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>632</td>\n",
" <td>0.237715</td>\n",
" <td>0.429664</td>\n",
" <td>654</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>178</td>\n",
" <td>0.222857</td>\n",
" <td>0.320840</td>\n",
" <td>667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>183</td>\n",
" <td>0.254770</td>\n",
" <td>0.476190</td>\n",
" <td>504</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>28</td>\n",
" <td>0.288545</td>\n",
" <td>0.548433</td>\n",
" <td>702</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>483</td>\n",
" <td>0.274948</td>\n",
" <td>0.443769</td>\n",
" <td>658</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>7</td>\n",
" <td>0.248667</td>\n",
" <td>0.413445</td>\n",
" <td>595</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>664</td>\n",
" <td>0.261282</td>\n",
" <td>0.520000</td>\n",
" <td>675</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>204</td>\n",
" <td>0.272575</td>\n",
" <td>0.530864</td>\n",
" <td>729</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>229</td>\n",
" <td>0.231934</td>\n",
" <td>0.382309</td>\n",
" <td>667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>158</td>\n",
" <td>0.248947</td>\n",
" <td>0.467949</td>\n",
" <td>624</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>136</td>\n",
" <td>0.221863</td>\n",
" <td>0.202683</td>\n",
" <td>671</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>141</td>\n",
" <td>0.257229</td>\n",
" <td>0.337719</td>\n",
" <td>684</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>402</td>\n",
" <td>0.253590</td>\n",
" <td>0.385321</td>\n",
" <td>654</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>676</td>\n",
" <td>0.289181</td>\n",
" <td>0.748201</td>\n",
" <td>695</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>172</td>\n",
" <td>0.243333</td>\n",
" <td>0.343154</td>\n",
" <td>577</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>2678</td>\n",
" <td>0.252833</td>\n",
" <td>0.345312</td>\n",
" <td>640</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>231</td>\n",
" <td>0.266086</td>\n",
" <td>0.417630</td>\n",
" <td>692</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>699</td>\n",
" <td>0.310747</td>\n",
" <td>0.517974</td>\n",
" <td>612</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>471</td>\n",
" <td>0.264406</td>\n",
" <td>0.513514</td>\n",
" <td>629</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>554</td>\n",
" <td>0.267905</td>\n",
" <td>0.646865</td>\n",
" <td>606</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>288</td>\n",
" <td>0.249748</td>\n",
" <td>0.633001</td>\n",
" <td>703</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>101</td>\n",
" <td>0.303917</td>\n",
" <td>0.340989</td>\n",
" <td>566</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>572</td>\n",
" <td>0.272403</td>\n",
" <td>0.572183</td>\n",
" <td>568</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24</th>\n",
" <td>742</td>\n",
" <td>0.283348</td>\n",
" <td>0.552743</td>\n",
" <td>711</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25</th>\n",
" <td>782</td>\n",
" <td>0.280968</td>\n",
" <td>0.779202</td>\n",
" <td>702</td>\n",
" </tr>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>721</td>\n",
" <td>0.249609</td>\n",
" <td>0.417981</td>\n",
" <td>634</td>\n",
" </tr>\n",
" <tr>\n",
" <th>27</th>\n",
" <td>697</td>\n",
" <td>0.252731</td>\n",
" <td>0.580210</td>\n",
" <td>667</td>\n",
" </tr>\n",
" <tr>\n",
" <th>28</th>\n",
" <td>725</td>\n",
" <td>0.220399</td>\n",
" <td>0.465774</td>\n",
" <td>672</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29</th>\n",
" <td>386</td>\n",
" <td>0.283397</td>\n",
" <td>0.285491</td>\n",
" <td>641</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>321</th>\n",
" <td>716</td>\n",
" <td>0.264069</td>\n",
" <td>0.424818</td>\n",
" <td>685</td>\n",
" </tr>\n",
" <tr>\n",
" <th>322</th>\n",
" <td>328</td>\n",
" <td>0.294445</td>\n",
" <td>0.813538</td>\n",
" <td>783</td>\n",
" </tr>\n",
" <tr>\n",
" <th>323</th>\n",
" <td>488</td>\n",
" <td>0.288288</td>\n",
" <td>0.356932</td>\n",
" <td>678</td>\n",
" </tr>\n",
" <tr>\n",
" <th>324</th>\n",
" <td>738</td>\n",
" <td>0.298986</td>\n",
" <td>0.704802</td>\n",
" <td>708</td>\n",
" </tr>\n",
" <tr>\n",
" <th>325</th>\n",
" <td>711</td>\n",
" <td>0.315352</td>\n",
" <td>0.492997</td>\n",
" <td>714</td>\n",
" </tr>\n",
" <tr>\n",
" <th>326</th>\n",
" <td>514</td>\n",
" <td>0.301645</td>\n",
" <td>0.564560</td>\n",
" <td>728</td>\n",
" </tr>\n",
" <tr>\n",
" <th>327</th>\n",
" <td>392</td>\n",
" <td>0.298517</td>\n",
" <td>0.680224</td>\n",
" <td>713</td>\n",
" </tr>\n",
" <tr>\n",
" <th>328</th>\n",
" <td>305</td>\n",
" <td>0.294915</td>\n",
" <td>0.502146</td>\n",
" <td>699</td>\n",
" </tr>\n",
" <tr>\n",
" <th>329</th>\n",
" <td>260</td>\n",
" <td>0.285509</td>\n",
" <td>0.859211</td>\n",
" <td>760</td>\n",
" </tr>\n",
" <tr>\n",
" <th>330</th>\n",
" <td>553</td>\n",
" <td>0.246203</td>\n",
" <td>0.385399</td>\n",
" <td>589</td>\n",
" </tr>\n",
" <tr>\n",
" <th>331</th>\n",
" <td>371</td>\n",
" <td>0.257085</td>\n",
" <td>0.562412</td>\n",
" <td>713</td>\n",
" </tr>\n",
" <tr>\n",
" <th>332</th>\n",
" <td>28600</td>\n",
" <td>0.302776</td>\n",
" <td>0.556492</td>\n",
" <td>593</td>\n",
" </tr>\n",
" <tr>\n",
" <th>333</th>\n",
" <td>472</td>\n",
" <td>0.299636</td>\n",
" <td>0.731973</td>\n",
" <td>735</td>\n",
" </tr>\n",
" <tr>\n",
" <th>334</th>\n",
" <td>457</td>\n",
" <td>0.248660</td>\n",
" <td>0.750968</td>\n",
" <td>775</td>\n",
" </tr>\n",
" <tr>\n",
" <th>335</th>\n",
" <td>355</td>\n",
" <td>0.269752</td>\n",
" <td>0.501408</td>\n",
" <td>710</td>\n",
" </tr>\n",
" <tr>\n",
" <th>336</th>\n",
" <td>416</td>\n",
" <td>0.259399</td>\n",
" <td>0.738622</td>\n",
" <td>769</td>\n",
" </tr>\n",
" <tr>\n",
" <th>337</th>\n",
" <td>17</td>\n",
" <td>0.260396</td>\n",
" <td>0.355200</td>\n",
" <td>625</td>\n",
" </tr>\n",
" <tr>\n",
" <th>338</th>\n",
" <td>556</td>\n",
" <td>0.303351</td>\n",
" <td>0.593496</td>\n",
" <td>738</td>\n",
" </tr>\n",
" <tr>\n",
" <th>339</th>\n",
" <td>80</td>\n",
" <td>0.277944</td>\n",
" <td>0.397380</td>\n",
" <td>458</td>\n",
" </tr>\n",
" <tr>\n",
" <th>340</th>\n",
" <td>14927</td>\n",
" <td>0.249898</td>\n",
" <td>0.711409</td>\n",
" <td>596</td>\n",
" </tr>\n",
" <tr>\n",
" <th>341</th>\n",
" <td>741</td>\n",
" <td>0.226334</td>\n",
" <td>0.345576</td>\n",
" <td>599</td>\n",
" </tr>\n",
" <tr>\n",
" <th>342</th>\n",
" <td>650</td>\n",
" <td>0.270419</td>\n",
" <td>0.501916</td>\n",
" <td>522</td>\n",
" </tr>\n",
" <tr>\n",
" <th>343</th>\n",
" <td>334</td>\n",
" <td>0.318962</td>\n",
" <td>0.810710</td>\n",
" <td>803</td>\n",
" </tr>\n",
" <tr>\n",
" <th>344</th>\n",
" <td>688</td>\n",
" <td>0.276128</td>\n",
" <td>0.681392</td>\n",
" <td>747</td>\n",
" </tr>\n",
" <tr>\n",
" <th>345</th>\n",
" <td>1104</td>\n",
" <td>0.306530</td>\n",
" <td>0.647287</td>\n",
" <td>516</td>\n",
" </tr>\n",
" <tr>\n",
" <th>346</th>\n",
" <td>464</td>\n",
" <td>0.273508</td>\n",
" <td>0.481720</td>\n",
" <td>465</td>\n",
" </tr>\n",
" <tr>\n",
" <th>347</th>\n",
" <td>505</td>\n",
" <td>0.246932</td>\n",
" <td>0.538062</td>\n",
" <td>578</td>\n",
" </tr>\n",
" <tr>\n",
" <th>348</th>\n",
" <td>2</td>\n",
" <td>0.258238</td>\n",
" <td>0.462247</td>\n",
" <td>543</td>\n",
" </tr>\n",
" <tr>\n",
" <th>349</th>\n",
" <td>368</td>\n",
" <td>0.263038</td>\n",
" <td>0.409836</td>\n",
" <td>488</td>\n",
" </tr>\n",
" <tr>\n",
" <th>350</th>\n",
" <td>2743</td>\n",
" <td>0.325863</td>\n",
" <td>0.483301</td>\n",
" <td>509</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>351 rows × 4 columns</p>\n",
"</div>"
],
"text/plain": [
" team_code freethrows win_rate num_games\n",
"0 272 0.243652 0.426626 661\n",
"1 632 0.237715 0.429664 654\n",
"2 178 0.222857 0.320840 667\n",
"3 183 0.254770 0.476190 504\n",
"4 28 0.288545 0.548433 702\n",
"5 483 0.274948 0.443769 658\n",
"6 7 0.248667 0.413445 595\n",
"7 664 0.261282 0.520000 675\n",
"8 204 0.272575 0.530864 729\n",
"9 229 0.231934 0.382309 667\n",
"10 158 0.248947 0.467949 624\n",
"11 136 0.221863 0.202683 671\n",
"12 141 0.257229 0.337719 684\n",
"13 402 0.253590 0.385321 654\n",
"14 676 0.289181 0.748201 695\n",
"15 172 0.243333 0.343154 577\n",
"16 2678 0.252833 0.345312 640\n",
"17 231 0.266086 0.417630 692\n",
"18 699 0.310747 0.517974 612\n",
"19 471 0.264406 0.513514 629\n",
"20 554 0.267905 0.646865 606\n",
"21 288 0.249748 0.633001 703\n",
"22 101 0.303917 0.340989 566\n",
"23 572 0.272403 0.572183 568\n",
"24 742 0.283348 0.552743 711\n",
"25 782 0.280968 0.779202 702\n",
"26 721 0.249609 0.417981 634\n",
"27 697 0.252731 0.580210 667\n",
"28 725 0.220399 0.465774 672\n",
"29 386 0.283397 0.285491 641\n",
".. ... ... ... ...\n",
"321 716 0.264069 0.424818 685\n",
"322 328 0.294445 0.813538 783\n",
"323 488 0.288288 0.356932 678\n",
"324 738 0.298986 0.704802 708\n",
"325 711 0.315352 0.492997 714\n",
"326 514 0.301645 0.564560 728\n",
"327 392 0.298517 0.680224 713\n",
"328 305 0.294915 0.502146 699\n",
"329 260 0.285509 0.859211 760\n",
"330 553 0.246203 0.385399 589\n",
"331 371 0.257085 0.562412 713\n",
"332 28600 0.302776 0.556492 593\n",
"333 472 0.299636 0.731973 735\n",
"334 457 0.248660 0.750968 775\n",
"335 355 0.269752 0.501408 710\n",
"336 416 0.259399 0.738622 769\n",
"337 17 0.260396 0.355200 625\n",
"338 556 0.303351 0.593496 738\n",
"339 80 0.277944 0.397380 458\n",
"340 14927 0.249898 0.711409 596\n",
"341 741 0.226334 0.345576 599\n",
"342 650 0.270419 0.501916 522\n",
"343 334 0.318962 0.810710 803\n",
"344 688 0.276128 0.681392 747\n",
"345 1104 0.306530 0.647287 516\n",
"346 464 0.273508 0.481720 465\n",
"347 505 0.246932 0.538062 578\n",
"348 2 0.258238 0.462247 543\n",
"349 368 0.263038 0.409836 488\n",
"350 2743 0.325863 0.483301 509\n",
"\n",
"[351 rows x 4 columns]"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%bigquery df3\n",
"SELECT \n",
" team_code,\n",
" AVG(SAFE_DIVIDE(ftm,fga)) AS freethrows,\n",
" AVG(win) AS win_rate,\n",
" COUNT(win) AS num_games\n",
"FROM lab_dev.team_box\n",
"WHERE fga IS NOT NULL\n",
"GROUP BY team_code\n",
"HAVING num_games > 100"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAXcAAAEKCAYAAADpfBXhAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADl0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uIDMuMC4zLCBodHRwOi8vbWF0cGxvdGxpYi5vcmcvnQurowAAIABJREFUeJztnX+UFdWV77+bywUaNTaJJBMbW/o5RJRg6NCKicEnvCgkLrCfjOKveZPMTJhMJIkkYU274lJ0nJGEcRzNuMYYX55ZiU8xkvTDgRkyGcmMIcFHMzRh+JXgL+irL+kojRFa6G72++Peaqqr61Sd+n2q7v6s1Wv1rVu36pxTp/bZZ+999iFmhiAIglAsxmRdAEEQBCF+RLgLgiAUEBHugiAIBUSEuyAIQgER4S4IglBARLgLgiAUEBHugiAIBUSEuyAIQgER4S4IglBAxmZ147POOounTp2a1e0FQRByyfbt23/LzJP9zstMuE+dOhVdXV1Z3V4QBCGXENGrOueJWUYQBKGAiHAXBEEoICLcBUEQCkhmNndBEOqDgYEB9PT04J133sm6KLliwoQJmDJlCsrlcqjfi3AXBCFRenp6cMYZZ2Dq1KkgoqyLkwuYGW+88QZ6enrQ0tIS6hoi3AUhAzp3VLBm03681tePsxsbsHLB+Whvbcq6WInwzjvviGAPCBHhPe95D3p7e0NfQ4S7IKRM544Kbv/BLvQPDAEAKn39uP0HuwCgsAJeBHtworaZO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0QBKGAiHAXBEEoICLchVxBRF+oZVt8IuJ1GmuLxqzPVxDRP0YvoSCYgQh3IW98DtXMkjdbB4gozErrxtq1AmFwPhxBGIEIdyE3ENEjqOak+SciOkJE3yWiLQC+S0SlWjKybbUc639m+91K2/G7a4dXAzivlr/byn9zOhE9Q0T7iOgJKw87Eb1CRF8jov8AcB1V9xnYWrveD4loEhG9l4i2187/EBExETXXPr9IRBOJ6Doi+k8i2klE/55Sswl1Shq5ZQQhFpj5s0S0ENVc6stRXSb+MWbuJ6JlAI4w88W1lKxbiOhHAKbV/i4BQADWE9HlADoAfJCZZwFVswyqKQVmAHgN1ZzslwH4ae32bzDzh2vn/gLA55n534joHgB3MfNtRDShlgtpLoAuVPMF/RTAb5j5GBHdCWABM1eIqDHZ1hLqHRHuQp5Zz8z9tf+vAnAREf1B7fOZqAr1q2p/O2rHT68dP+hyvf/LtcycRNQNYCpOCfe1teNnorphzL/Vjn8HwPdr//8M1QHhcgB/DWAhqgOKlTRsC4DHiehpAD8IV2VB0EOEu5Bnjtr+J1S16U32E2rbv93HzN90HJ/qcj17nu4hjHw/jsKff0dVaz8XwP9BNXUso5rV1Jp5zAFwNYDtRDSbmd/QuK4gBEZs7kJR2ATgz4moDABE9AEiOq12/I+J6PTa8SYiei+A3wE4I+hNmPkIgMO2HO1/CMDS4p9HNdndr7i678CbqCas+mnt3ucx8wvMfCeAXoxMQysIsSKau1AUHkPVjPIfNUdoL4B2Zv4REV0A4Oc1/+jbAG5h5heJaAsR/SequyhtCHCvPwLwCBFNRDWV7KcBgJlfqd3bcpb+FMAUZj5c+7yGiKahOsv4V1RTyQpCIkhWSEEQhAIiZhlBEIQCIsJdEAShgIhwFwRBKCAi3AVBEAqICHdBEIQCIsJdEAShgIhwFwRBKCAi3AVBEArI/wdXhSjEe+NbBwAAAABJRU5ErkJggg==\n",
"text/plain": [
"<Figure size 432x288 with 1 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"df3.plot(x='freethrows', y='win_rate', style='o');"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"team_code 0.054005\n",
"freethrows 0.353668\n",
"win_rate 1.000000\n",
"num_games 0.464207\n",
"Name: win_rate, dtype: float64"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"df3.corr()['win_rate']"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Machine Learning\n",
"\n",
"Let's use these factors to create a simple ML model"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>team_code</th>\n",
" <th>is_home</th>\n",
" <th>offensive_shooting_efficiency</th>\n",
" <th>opponents_shooting_efficiency</th>\n",
" <th>turnover_percent</th>\n",
" <th>opponents_turnover_percent</th>\n",
" <th>rebounding</th>\n",
" <th>opponents_rebounding</th>\n",
" <th>freethrows</th>\n",
" <th>opponents_freethrows</th>\n",
" <th>win</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>272</td>\n",
" <td>0</td>\n",
" <td>0.396226</td>\n",
" <td>0.645161</td>\n",
" <td>0.099875</td>\n",
" <td>0.291845</td>\n",
" <td>0.189189</td>\n",
" <td>0.235294</td>\n",
" <td>0.188679</td>\n",
" <td>0.774194</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>632</td>\n",
" <td>0</td>\n",
" <td>0.360000</td>\n",
" <td>0.532258</td>\n",
" <td>0.219873</td>\n",
" <td>0.358905</td>\n",
" <td>0.305556</td>\n",
" <td>0.434783</td>\n",
" <td>0.200000</td>\n",
" <td>0.774194</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>178</td>\n",
" <td>0</td>\n",
" <td>0.520000</td>\n",
" <td>0.651515</td>\n",
" <td>0.191388</td>\n",
" <td>0.290089</td>\n",
" <td>0.185185</td>\n",
" <td>0.350000</td>\n",
" <td>0.200000</td>\n",
" <td>0.878788</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>504980</td>\n",
" <td>0</td>\n",
" <td>0.463636</td>\n",
" <td>0.727273</td>\n",
" <td>0.198777</td>\n",
" <td>0.247966</td>\n",
" <td>0.378378</td>\n",
" <td>0.176471</td>\n",
" <td>0.254545</td>\n",
" <td>0.787879</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>183</td>\n",
" <td>0</td>\n",
" <td>0.405172</td>\n",
" <td>0.632353</td>\n",
" <td>0.140242</td>\n",
" <td>0.275638</td>\n",
" <td>0.214286</td>\n",
" <td>0.227273</td>\n",
" <td>0.172414</td>\n",
" <td>0.764706</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>28</td>\n",
" <td>0</td>\n",
" <td>0.526786</td>\n",
" <td>0.785714</td>\n",
" <td>0.098928</td>\n",
" <td>0.236088</td>\n",
" <td>0.266667</td>\n",
" <td>0.166667</td>\n",
" <td>0.196429</td>\n",
" <td>0.485714</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>183</td>\n",
" <td>0</td>\n",
" <td>0.608108</td>\n",
" <td>0.614286</td>\n",
" <td>0.383212</td>\n",
" <td>0.332564</td>\n",
" <td>0.350000</td>\n",
" <td>0.315789</td>\n",
" <td>0.189189</td>\n",
" <td>0.314286</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>183</td>\n",
" <td>0</td>\n",
" <td>0.397959</td>\n",
" <td>0.600000</td>\n",
" <td>0.207502</td>\n",
" <td>0.302775</td>\n",
" <td>0.176471</td>\n",
" <td>0.210526</td>\n",
" <td>0.204082</td>\n",
" <td>0.371429</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>183</td>\n",
" <td>0</td>\n",
" <td>0.559524</td>\n",
" <td>0.542857</td>\n",
" <td>0.317726</td>\n",
" <td>0.282158</td>\n",
" <td>0.208333</td>\n",
" <td>0.315789</td>\n",
" <td>0.142857</td>\n",
" <td>0.742857</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>183</td>\n",
" <td>0</td>\n",
" <td>0.597561</td>\n",
" <td>0.541667</td>\n",
" <td>0.201465</td>\n",
" <td>0.163339</td>\n",
" <td>0.200000</td>\n",
" <td>0.304348</td>\n",
" <td>0.243902</td>\n",
" <td>0.694444</td>\n",
" <td>0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" team_code is_home offensive_shooting_efficiency \\\n",
"0 272 0 0.396226 \n",
"1 632 0 0.360000 \n",
"2 178 0 0.520000 \n",
"3 504980 0 0.463636 \n",
"4 183 0 0.405172 \n",
"5 28 0 0.526786 \n",
"6 183 0 0.608108 \n",
"7 183 0 0.397959 \n",
"8 183 0 0.559524 \n",
"9 183 0 0.597561 \n",
"\n",
" opponents_shooting_efficiency turnover_percent \\\n",
"0 0.645161 0.099875 \n",
"1 0.532258 0.219873 \n",
"2 0.651515 0.191388 \n",
"3 0.727273 0.198777 \n",
"4 0.632353 0.140242 \n",
"5 0.785714 0.098928 \n",
"6 0.614286 0.383212 \n",
"7 0.600000 0.207502 \n",
"8 0.542857 0.317726 \n",
"9 0.541667 0.201465 \n",
"\n",
" opponents_turnover_percent rebounding opponents_rebounding freethrows \\\n",
"0 0.291845 0.189189 0.235294 0.188679 \n",
"1 0.358905 0.305556 0.434783 0.200000 \n",
"2 0.290089 0.185185 0.350000 0.200000 \n",
"3 0.247966 0.378378 0.176471 0.254545 \n",
"4 0.275638 0.214286 0.227273 0.172414 \n",
"5 0.236088 0.266667 0.166667 0.196429 \n",
"6 0.332564 0.350000 0.315789 0.189189 \n",
"7 0.302775 0.176471 0.210526 0.204082 \n",
"8 0.282158 0.208333 0.315789 0.142857 \n",
"9 0.163339 0.200000 0.304348 0.243902 \n",
"\n",
" opponents_freethrows win \n",
"0 0.774194 0 \n",
"1 0.774194 0 \n",
"2 0.878788 0 \n",
"3 0.787879 0 \n",
"4 0.764706 0 \n",
"5 0.485714 0 \n",
"6 0.314286 0 \n",
"7 0.371429 0 \n",
"8 0.742857 0 \n",
"9 0.694444 0 "
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%bigquery\n",
"SELECT \n",
" team_code,\n",
" is_home,\n",
" SAFE_DIVIDE(fgm + 0.5 * fgm3,fga) AS offensive_shooting_efficiency,\n",
" SAFE_DIVIDE(opp_fgm + 0.5 * opp_fgm3,opp_fga) AS opponents_shooting_efficiency,\n",
" SAFE_DIVIDE(tov,fga+0.475*fta+tov-oreb) AS turnover_percent,\n",
" SAFE_DIVIDE(opp_tov,opp_fga+0.475*opp_fta+opp_tov-opp_oreb) AS opponents_turnover_percent,\n",
" SAFE_DIVIDE(oreb,oreb + opp_dreb) AS rebounding,\n",
" SAFE_DIVIDE(opp_oreb,opp_oreb + dreb) AS opponents_rebounding,\n",
" SAFE_DIVIDE(ftm,fga) AS freethrows,\n",
" SAFE_DIVIDE(opp_ftm,opp_fga) AS opponents_freethrows,\n",
" win\n",
"FROM lab_dev.team_box\n",
"WHERE fga IS NOT NULL and win IS NOT NULL\n",
"LIMIT 10"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"Empty DataFrame\n",
"Columns: []\n",
"Index: []"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%bigquery\n",
"CREATE OR REPLACE MODEL lab_dev.four_factors_model\n",
"OPTIONS(model_type='logistic_reg', input_label_cols=['win'])\n",
"AS\n",
"\n",
"SELECT \n",
" team_code,\n",
" is_home,\n",
" SAFE_DIVIDE(fgm + 0.5 * fgm3,fga) AS offensive_shooting_efficiency,\n",
" SAFE_DIVIDE(opp_fgm + 0.5 * opp_fgm3,opp_fga) AS opponents_shooting_efficiency,\n",
" SAFE_DIVIDE(tov,fga+0.475*fta+tov-oreb) AS turnover_percent,\n",
" SAFE_DIVIDE(opp_tov,opp_fga+0.475*opp_fta+opp_tov-opp_oreb) AS opponents_turnover_percent,\n",
" SAFE_DIVIDE(oreb,oreb + opp_dreb) AS rebounding,\n",
" SAFE_DIVIDE(opp_oreb,opp_oreb + dreb) AS opponents_rebounding,\n",
" SAFE_DIVIDE(ftm,fga) AS freethrows,\n",
" SAFE_DIVIDE(opp_ftm,opp_fga) AS opponents_freethrows,\n",
" win\n",
"FROM lab_dev.team_box\n",
"WHERE fga IS NOT NULL and win IS NOT NULL"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>precision</th>\n",
" <th>recall</th>\n",
" <th>accuracy</th>\n",
" <th>f1_score</th>\n",
" <th>log_loss</th>\n",
" <th>roc_auc</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0.869986</td>\n",
" <td>0.872272</td>\n",
" <td>0.871723</td>\n",
" <td>0.871127</td>\n",
" <td>0.326231</td>\n",
" <td>0.93667</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" precision recall accuracy f1_score log_loss roc_auc\n",
"0 0.869986 0.872272 0.871723 0.871127 0.326231 0.93667"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%bigquery\n",
"SELECT * FROM ML.EVALUATE(MODEL lab_dev.four_factors_model)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"87% isn't bad, but ... there is a *huge* problem with the above approach.\n",
"How are we supposed to know Team A's free throw shooting percentage against Team B before the game is played?\n",
"\n",
"What we could do is to get the free throw shooting percentage of Team A in the 3 games prior to this one and use that. This requires analytic functions in SQL. If you are not familar with these, make a copy of the select statement and modify it in stages until you grasp what is happening."
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
"Empty DataFrame\n",
"Columns: []\n",
"Index: []"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%bigquery\n",
"CREATE OR REPLACE MODEL lab_dev.four_factors_model\n",
"OPTIONS(model_type='logistic_reg', input_label_cols=['win'])\n",
"AS\n",
"\n",
"WITH all_games AS (\n",
"SELECT \n",
" game_date,\n",
" team_code,\n",
" is_home,\n",
" SAFE_DIVIDE(fgm + 0.5 * fgm3,fga) AS offensive_shooting_efficiency,\n",
" SAFE_DIVIDE(opp_fgm + 0.5 * opp_fgm3,opp_fga) AS opponents_shooting_efficiency,\n",
" SAFE_DIVIDE(tov,fga+0.475*fta+tov-oreb) AS turnover_percent,\n",
" SAFE_DIVIDE(opp_tov,opp_fga+0.475*opp_fta+opp_tov-opp_oreb) AS opponents_turnover_percent,\n",
" SAFE_DIVIDE(oreb,oreb + opp_dreb) AS rebounding,\n",
" SAFE_DIVIDE(opp_oreb,opp_oreb + dreb) AS opponents_rebounding,\n",
" SAFE_DIVIDE(ftm,fga) AS freethrows,\n",
" SAFE_DIVIDE(opp_ftm,opp_fga) AS opponents_freethrows,\n",
" win\n",
"FROM lab_dev.team_box\n",
"WHERE fga IS NOT NULL and win IS NOT NULL\n",
")\n",
"\n",
", prevgames AS (\n",
"SELECT \n",
" is_home,\n",
" AVG(offensive_shooting_efficiency) \n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING) AS offensive_shooting_efficiency,\n",
" AVG(opponents_shooting_efficiency) \n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING)AS opponents_shooting_efficiency,\n",
" AVG(turnover_percent)\n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING) AS turnover_percent,\n",
" AVG(opponents_turnover_percent)\n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING) AS opponents_turnover_percent,\n",
" AVG(rebounding)\n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING) AS rebounding,\n",
" AVG(opponents_rebounding) \n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING) AS opponents_rebounding,\n",
" AVG(freethrows) \n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING) AS freethrows,\n",
" AVG(opponents_freethrows) \n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING) AS oppponents_freethrows,\n",
" win\n",
"FROM all_games\n",
")\n",
"\n",
"SELECT * FROM prevgames\n",
"WHERE offensive_shooting_efficiency IS NOT NULL"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>precision</th>\n",
" <th>recall</th>\n",
" <th>accuracy</th>\n",
" <th>f1_score</th>\n",
" <th>log_loss</th>\n",
" <th>roc_auc</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0.694751</td>\n",
" <td>0.697642</td>\n",
" <td>0.693924</td>\n",
" <td>0.696194</td>\n",
" <td>0.578669</td>\n",
" <td>0.764541</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"</div>"
],
"text/plain": [
" precision recall accuracy f1_score log_loss roc_auc\n",
"0 0.694751 0.697642 0.693924 0.696194 0.578669 0.764541"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%bigquery \n",
"SELECT * FROM ML.EVALUATE(MODEL lab_dev.four_factors_model)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Based on just the teams' performance coming in, we can predict the outcome of games with a 69.4% accuracy."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## More complex ML model\n",
"\n",
"We can write a more complex ML model using Keras and a deep neural network.\n",
"The code is not that hard but you'll have to do a lot more work (scaling, hyperparameter tuning)\n",
"to get better performance than you did with the BigQuery ML model."
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<div>\n",
"<style scoped>\n",
" .dataframe tbody tr th:only-of-type {\n",
" vertical-align: middle;\n",
" }\n",
"\n",
" .dataframe tbody tr th {\n",
" vertical-align: top;\n",
" }\n",
"\n",
" .dataframe thead th {\n",
" text-align: right;\n",
" }\n",
"</style>\n",
"<table border=\"1\" class=\"dataframe\">\n",
" <thead>\n",
" <tr style=\"text-align: right;\">\n",
" <th></th>\n",
" <th>is_home</th>\n",
" <th>offensive_shooting_efficiency</th>\n",
" <th>opponents_shooting_efficiency</th>\n",
" <th>turnover_percent</th>\n",
" <th>opponents_turnover_percent</th>\n",
" <th>rebounding</th>\n",
" <th>opponents_rebounding</th>\n",
" <th>freethrows</th>\n",
" <th>oppponents_freethrows</th>\n",
" <th>win</th>\n",
" </tr>\n",
" </thead>\n",
" <tbody>\n",
" <tr>\n",
" <th>0</th>\n",
" <td>0</td>\n",
" <td>0.404762</td>\n",
" <td>0.577586</td>\n",
" <td>0.129534</td>\n",
" <td>0.132319</td>\n",
" <td>0.255814</td>\n",
" <td>0.312500</td>\n",
" <td>0.380952</td>\n",
" <td>0.465517</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>1</th>\n",
" <td>0</td>\n",
" <td>0.485714</td>\n",
" <td>0.564655</td>\n",
" <td>0.117888</td>\n",
" <td>0.135268</td>\n",
" <td>0.221657</td>\n",
" <td>0.267361</td>\n",
" <td>0.390476</td>\n",
" <td>0.370690</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>2</th>\n",
" <td>0</td>\n",
" <td>0.409668</td>\n",
" <td>0.577586</td>\n",
" <td>0.129161</td>\n",
" <td>0.132480</td>\n",
" <td>0.246537</td>\n",
" <td>0.321098</td>\n",
" <td>0.381530</td>\n",
" <td>0.465517</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>3</th>\n",
" <td>0</td>\n",
" <td>0.407251</td>\n",
" <td>0.549261</td>\n",
" <td>0.172692</td>\n",
" <td>0.135533</td>\n",
" <td>0.268236</td>\n",
" <td>0.369395</td>\n",
" <td>0.379897</td>\n",
" <td>0.451817</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>4</th>\n",
" <td>0</td>\n",
" <td>0.396338</td>\n",
" <td>0.529865</td>\n",
" <td>0.198496</td>\n",
" <td>0.102454</td>\n",
" <td>0.245949</td>\n",
" <td>0.396533</td>\n",
" <td>0.409659</td>\n",
" <td>0.403619</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>5</th>\n",
" <td>0</td>\n",
" <td>0.362626</td>\n",
" <td>0.495194</td>\n",
" <td>0.265873</td>\n",
" <td>0.139328</td>\n",
" <td>0.332407</td>\n",
" <td>0.497227</td>\n",
" <td>0.377841</td>\n",
" <td>0.486827</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>6</th>\n",
" <td>0</td>\n",
" <td>0.371149</td>\n",
" <td>0.473499</td>\n",
" <td>0.311279</td>\n",
" <td>0.147634</td>\n",
" <td>0.291667</td>\n",
" <td>0.508506</td>\n",
" <td>0.286932</td>\n",
" <td>0.381368</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>7</th>\n",
" <td>0</td>\n",
" <td>0.396149</td>\n",
" <td>0.493297</td>\n",
" <td>0.275781</td>\n",
" <td>0.202785</td>\n",
" <td>0.263889</td>\n",
" <td>0.484101</td>\n",
" <td>0.193182</td>\n",
" <td>0.322167</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>8</th>\n",
" <td>0</td>\n",
" <td>0.407723</td>\n",
" <td>0.500373</td>\n",
" <td>0.280093</td>\n",
" <td>0.269113</td>\n",
" <td>0.267677</td>\n",
" <td>0.491741</td>\n",
" <td>0.068182</td>\n",
" <td>0.305872</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>9</th>\n",
" <td>0</td>\n",
" <td>0.376692</td>\n",
" <td>0.547112</td>\n",
" <td>0.243627</td>\n",
" <td>0.218389</td>\n",
" <td>0.171843</td>\n",
" <td>0.371205</td>\n",
" <td>0.057692</td>\n",
" <td>0.237032</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>10</th>\n",
" <td>0</td>\n",
" <td>0.370739</td>\n",
" <td>0.615526</td>\n",
" <td>0.241415</td>\n",
" <td>0.192551</td>\n",
" <td>0.221843</td>\n",
" <td>0.320966</td>\n",
" <td>0.093407</td>\n",
" <td>0.243215</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>11</th>\n",
" <td>0</td>\n",
" <td>0.317498</td>\n",
" <td>0.653836</td>\n",
" <td>0.270233</td>\n",
" <td>0.118722</td>\n",
" <td>0.227263</td>\n",
" <td>0.266799</td>\n",
" <td>0.139703</td>\n",
" <td>0.273507</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>12</th>\n",
" <td>0</td>\n",
" <td>0.321416</td>\n",
" <td>0.657631</td>\n",
" <td>0.253746</td>\n",
" <td>0.068291</td>\n",
" <td>0.273914</td>\n",
" <td>0.220563</td>\n",
" <td>0.264703</td>\n",
" <td>0.373794</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>13</th>\n",
" <td>0</td>\n",
" <td>0.361993</td>\n",
" <td>0.630026</td>\n",
" <td>0.247155</td>\n",
" <td>0.071182</td>\n",
" <td>0.312803</td>\n",
" <td>0.243672</td>\n",
" <td>0.292011</td>\n",
" <td>0.415461</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>14</th>\n",
" <td>0</td>\n",
" <td>0.425237</td>\n",
" <td>0.542446</td>\n",
" <td>0.221989</td>\n",
" <td>0.088116</td>\n",
" <td>0.288293</td>\n",
" <td>0.228122</td>\n",
" <td>0.297963</td>\n",
" <td>0.450944</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>15</th>\n",
" <td>0</td>\n",
" <td>0.466282</td>\n",
" <td>0.462653</td>\n",
" <td>0.236614</td>\n",
" <td>0.124585</td>\n",
" <td>0.361246</td>\n",
" <td>0.229592</td>\n",
" <td>0.404106</td>\n",
" <td>0.412888</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>16</th>\n",
" <td>0</td>\n",
" <td>0.476893</td>\n",
" <td>0.421784</td>\n",
" <td>0.258220</td>\n",
" <td>0.178508</td>\n",
" <td>0.381641</td>\n",
" <td>0.246259</td>\n",
" <td>0.330830</td>\n",
" <td>0.310714</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>17</th>\n",
" <td>0</td>\n",
" <td>0.495422</td>\n",
" <td>0.409388</td>\n",
" <td>0.269521</td>\n",
" <td>0.232157</td>\n",
" <td>0.384199</td>\n",
" <td>0.237436</td>\n",
" <td>0.304653</td>\n",
" <td>0.285714</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>18</th>\n",
" <td>0</td>\n",
" <td>0.492198</td>\n",
" <td>0.401888</td>\n",
" <td>0.278082</td>\n",
" <td>0.275053</td>\n",
" <td>0.421530</td>\n",
" <td>0.251877</td>\n",
" <td>0.318542</td>\n",
" <td>0.260714</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>19</th>\n",
" <td>0</td>\n",
" <td>0.509110</td>\n",
" <td>0.465395</td>\n",
" <td>0.234967</td>\n",
" <td>0.251346</td>\n",
" <td>0.311039</td>\n",
" <td>0.318054</td>\n",
" <td>0.213273</td>\n",
" <td>0.317105</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>20</th>\n",
" <td>0</td>\n",
" <td>0.522538</td>\n",
" <td>0.516946</td>\n",
" <td>0.199711</td>\n",
" <td>0.205544</td>\n",
" <td>0.215205</td>\n",
" <td>0.328470</td>\n",
" <td>0.200010</td>\n",
" <td>0.310209</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>21</th>\n",
" <td>1</td>\n",
" <td>0.516138</td>\n",
" <td>0.576589</td>\n",
" <td>0.185148</td>\n",
" <td>0.164143</td>\n",
" <td>0.165670</td>\n",
" <td>0.417359</td>\n",
" <td>0.196742</td>\n",
" <td>0.353066</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>22</th>\n",
" <td>1</td>\n",
" <td>0.498529</td>\n",
" <td>0.627498</td>\n",
" <td>0.154878</td>\n",
" <td>0.132432</td>\n",
" <td>0.169516</td>\n",
" <td>0.425286</td>\n",
" <td>0.234937</td>\n",
" <td>0.493975</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>23</th>\n",
" <td>1</td>\n",
" <td>0.499494</td>\n",
" <td>0.573770</td>\n",
" <td>0.158281</td>\n",
" <td>0.150213</td>\n",
" <td>0.163936</td>\n",
" <td>0.374306</td>\n",
" <td>0.233222</td>\n",
" <td>0.516453</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>24</th>\n",
" <td>0</td>\n",
" <td>0.487742</td>\n",
" <td>0.554936</td>\n",
" <td>0.164454</td>\n",
" <td>0.171188</td>\n",
" <td>0.217782</td>\n",
" <td>0.350556</td>\n",
" <td>0.268834</td>\n",
" <td>0.636393</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>25</th>\n",
" <td>0</td>\n",
" <td>0.445234</td>\n",
" <td>0.572793</td>\n",
" <td>0.154771</td>\n",
" <td>0.186478</td>\n",
" <td>0.256552</td>\n",
" <td>0.261667</td>\n",
" <td>0.228430</td>\n",
" <td>0.597703</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>26</th>\n",
" <td>0</td>\n",
" <td>0.426768</td>\n",
" <td>0.550336</td>\n",
" <td>0.140307</td>\n",
" <td>0.210642</td>\n",
" <td>0.203427</td>\n",
" <td>0.300303</td>\n",
" <td>0.202862</td>\n",
" <td>0.453222</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>27</th>\n",
" <td>1</td>\n",
" <td>0.384722</td>\n",
" <td>0.607281</td>\n",
" <td>0.126310</td>\n",
" <td>0.220407</td>\n",
" <td>0.244780</td>\n",
" <td>0.316970</td>\n",
" <td>0.193771</td>\n",
" <td>0.427528</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>28</th>\n",
" <td>1</td>\n",
" <td>0.406818</td>\n",
" <td>0.586706</td>\n",
" <td>0.126736</td>\n",
" <td>0.238385</td>\n",
" <td>0.299267</td>\n",
" <td>0.299601</td>\n",
" <td>0.195455</td>\n",
" <td>0.344841</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>29</th>\n",
" <td>1</td>\n",
" <td>0.466436</td>\n",
" <td>0.484733</td>\n",
" <td>0.130789</td>\n",
" <td>0.257743</td>\n",
" <td>0.339194</td>\n",
" <td>0.309125</td>\n",
" <td>0.223781</td>\n",
" <td>0.302078</td>\n",
" <td>1</td>\n",
" </tr>\n",
" <tr>\n",
" <th>...</th>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" <td>...</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242570</th>\n",
" <td>0</td>\n",
" <td>0.494877</td>\n",
" <td>0.636939</td>\n",
" <td>0.250341</td>\n",
" <td>0.106176</td>\n",
" <td>0.212605</td>\n",
" <td>0.447520</td>\n",
" <td>0.063715</td>\n",
" <td>0.154970</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242571</th>\n",
" <td>0</td>\n",
" <td>0.401742</td>\n",
" <td>0.596582</td>\n",
" <td>0.222527</td>\n",
" <td>0.114765</td>\n",
" <td>0.187473</td>\n",
" <td>0.438682</td>\n",
" <td>0.118210</td>\n",
" <td>0.144701</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242572</th>\n",
" <td>0</td>\n",
" <td>0.406288</td>\n",
" <td>0.565718</td>\n",
" <td>0.183735</td>\n",
" <td>0.121739</td>\n",
" <td>0.156888</td>\n",
" <td>0.462093</td>\n",
" <td>0.135634</td>\n",
" <td>0.160133</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242573</th>\n",
" <td>0</td>\n",
" <td>0.410285</td>\n",
" <td>0.573655</td>\n",
" <td>0.187710</td>\n",
" <td>0.151244</td>\n",
" <td>0.180989</td>\n",
" <td>0.465588</td>\n",
" <td>0.180486</td>\n",
" <td>0.199094</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242574</th>\n",
" <td>0</td>\n",
" <td>0.360669</td>\n",
" <td>0.601036</td>\n",
" <td>0.267922</td>\n",
" <td>0.165863</td>\n",
" <td>0.247436</td>\n",
" <td>0.426325</td>\n",
" <td>0.222152</td>\n",
" <td>0.197406</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242575</th>\n",
" <td>0</td>\n",
" <td>0.462424</td>\n",
" <td>0.642155</td>\n",
" <td>0.274116</td>\n",
" <td>0.190360</td>\n",
" <td>0.304081</td>\n",
" <td>0.441699</td>\n",
" <td>0.228002</td>\n",
" <td>0.257028</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242576</th>\n",
" <td>0</td>\n",
" <td>0.459701</td>\n",
" <td>0.713249</td>\n",
" <td>0.281827</td>\n",
" <td>0.231361</td>\n",
" <td>0.283530</td>\n",
" <td>0.433245</td>\n",
" <td>0.217349</td>\n",
" <td>0.248300</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242577</th>\n",
" <td>0</td>\n",
" <td>0.423924</td>\n",
" <td>0.731165</td>\n",
" <td>0.263945</td>\n",
" <td>0.227899</td>\n",
" <td>0.217062</td>\n",
" <td>0.421066</td>\n",
" <td>0.172498</td>\n",
" <td>0.199260</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242578</th>\n",
" <td>0</td>\n",
" <td>0.285714</td>\n",
" <td>0.600000</td>\n",
" <td>0.284775</td>\n",
" <td>0.131291</td>\n",
" <td>0.083333</td>\n",
" <td>0.458333</td>\n",
" <td>0.321429</td>\n",
" <td>0.177778</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242579</th>\n",
" <td>0</td>\n",
" <td>0.318913</td>\n",
" <td>0.583333</td>\n",
" <td>0.241916</td>\n",
" <td>0.128292</td>\n",
" <td>0.089744</td>\n",
" <td>0.437500</td>\n",
" <td>0.259306</td>\n",
" <td>0.216667</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242580</th>\n",
" <td>0</td>\n",
" <td>0.306250</td>\n",
" <td>0.542683</td>\n",
" <td>0.277932</td>\n",
" <td>0.173348</td>\n",
" <td>0.271186</td>\n",
" <td>0.395833</td>\n",
" <td>0.025000</td>\n",
" <td>0.231707</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242581</th>\n",
" <td>0</td>\n",
" <td>0.300561</td>\n",
" <td>0.551829</td>\n",
" <td>0.281994</td>\n",
" <td>0.142076</td>\n",
" <td>0.308007</td>\n",
" <td>0.371830</td>\n",
" <td>0.038141</td>\n",
" <td>0.250000</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242582</th>\n",
" <td>0</td>\n",
" <td>0.306065</td>\n",
" <td>0.542683</td>\n",
" <td>0.278273</td>\n",
" <td>0.172442</td>\n",
" <td>0.272005</td>\n",
" <td>0.394553</td>\n",
" <td>0.025427</td>\n",
" <td>0.231707</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242583</th>\n",
" <td>0</td>\n",
" <td>0.324143</td>\n",
" <td>0.556318</td>\n",
" <td>0.272739</td>\n",
" <td>0.181963</td>\n",
" <td>0.252080</td>\n",
" <td>0.386824</td>\n",
" <td>0.039341</td>\n",
" <td>0.250169</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242584</th>\n",
" <td>0</td>\n",
" <td>0.326806</td>\n",
" <td>0.565868</td>\n",
" <td>0.263222</td>\n",
" <td>0.190830</td>\n",
" <td>0.244469</td>\n",
" <td>0.379329</td>\n",
" <td>0.075344</td>\n",
" <td>0.258419</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242585</th>\n",
" <td>0</td>\n",
" <td>0.315588</td>\n",
" <td>0.566249</td>\n",
" <td>0.246991</td>\n",
" <td>0.214809</td>\n",
" <td>0.229691</td>\n",
" <td>0.384478</td>\n",
" <td>0.128700</td>\n",
" <td>0.246033</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242586</th>\n",
" <td>0</td>\n",
" <td>0.316448</td>\n",
" <td>0.610151</td>\n",
" <td>0.229092</td>\n",
" <td>0.191450</td>\n",
" <td>0.237726</td>\n",
" <td>0.338994</td>\n",
" <td>0.144726</td>\n",
" <td>0.254396</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242587</th>\n",
" <td>0</td>\n",
" <td>0.292800</td>\n",
" <td>0.623346</td>\n",
" <td>0.227558</td>\n",
" <td>0.182843</td>\n",
" <td>0.252149</td>\n",
" <td>0.283799</td>\n",
" <td>0.124456</td>\n",
" <td>0.244673</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242588</th>\n",
" <td>0</td>\n",
" <td>0.353846</td>\n",
" <td>0.657534</td>\n",
" <td>0.142626</td>\n",
" <td>0.163419</td>\n",
" <td>0.125000</td>\n",
" <td>0.375000</td>\n",
" <td>0.107692</td>\n",
" <td>0.109589</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242589</th>\n",
" <td>0</td>\n",
" <td>0.392440</td>\n",
" <td>0.639578</td>\n",
" <td>0.099742</td>\n",
" <td>0.135365</td>\n",
" <td>0.110119</td>\n",
" <td>0.369318</td>\n",
" <td>0.174536</td>\n",
" <td>0.081822</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242590</th>\n",
" <td>0</td>\n",
" <td>0.358849</td>\n",
" <td>0.657867</td>\n",
" <td>0.138008</td>\n",
" <td>0.161207</td>\n",
" <td>0.122795</td>\n",
" <td>0.375842</td>\n",
" <td>0.116357</td>\n",
" <td>0.110103</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242591</th>\n",
" <td>0</td>\n",
" <td>0.355675</td>\n",
" <td>0.653556</td>\n",
" <td>0.159511</td>\n",
" <td>0.163903</td>\n",
" <td>0.103460</td>\n",
" <td>0.353310</td>\n",
" <td>0.173806</td>\n",
" <td>0.176327</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242592</th>\n",
" <td>0</td>\n",
" <td>0.381499</td>\n",
" <td>0.633404</td>\n",
" <td>0.188832</td>\n",
" <td>0.161908</td>\n",
" <td>0.151756</td>\n",
" <td>0.426227</td>\n",
" <td>0.146883</td>\n",
" <td>0.206622</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242593</th>\n",
" <td>0</td>\n",
" <td>0.404762</td>\n",
" <td>0.471831</td>\n",
" <td>0.311025</td>\n",
" <td>0.247678</td>\n",
" <td>0.227273</td>\n",
" <td>0.369565</td>\n",
" <td>0.190476</td>\n",
" <td>0.295775</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242594</th>\n",
" <td>0</td>\n",
" <td>0.422078</td>\n",
" <td>0.465645</td>\n",
" <td>0.282698</td>\n",
" <td>0.275601</td>\n",
" <td>0.196970</td>\n",
" <td>0.424783</td>\n",
" <td>0.216450</td>\n",
" <td>0.296536</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242595</th>\n",
" <td>0</td>\n",
" <td>0.372340</td>\n",
" <td>0.475806</td>\n",
" <td>0.302001</td>\n",
" <td>0.200215</td>\n",
" <td>0.176471</td>\n",
" <td>0.459459</td>\n",
" <td>0.170213</td>\n",
" <td>0.258065</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242596</th>\n",
" <td>0</td>\n",
" <td>0.356625</td>\n",
" <td>0.429080</td>\n",
" <td>0.323144</td>\n",
" <td>0.186438</td>\n",
" <td>0.147059</td>\n",
" <td>0.457002</td>\n",
" <td>0.085106</td>\n",
" <td>0.246679</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242597</th>\n",
" <td>0</td>\n",
" <td>0.371083</td>\n",
" <td>0.482482</td>\n",
" <td>0.302957</td>\n",
" <td>0.200104</td>\n",
" <td>0.176471</td>\n",
" <td>0.460224</td>\n",
" <td>0.163404</td>\n",
" <td>0.259691</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242598</th>\n",
" <td>0</td>\n",
" <td>0.367255</td>\n",
" <td>0.518111</td>\n",
" <td>0.286675</td>\n",
" <td>0.187142</td>\n",
" <td>0.165248</td>\n",
" <td>0.446730</td>\n",
" <td>0.136976</td>\n",
" <td>0.253102</td>\n",
" <td>0</td>\n",
" </tr>\n",
" <tr>\n",
" <th>242599</th>\n",
" <td>0</td>\n",
" <td>0.362133</td>\n",
" <td>0.554332</td>\n",
" <td>0.263531</td>\n",
" <td>0.172676</td>\n",
" <td>0.146130</td>\n",
" <td>0.439008</td>\n",
" <td>0.103682</td>\n",
" <td>0.283413</td>\n",
" <td>0</td>\n",
" </tr>\n",
" </tbody>\n",
"</table>\n",
"<p>242600 rows × 10 columns</p>\n",
"</div>"
],
"text/plain": [
" is_home offensive_shooting_efficiency opponents_shooting_efficiency \\\n",
"0 0 0.404762 0.577586 \n",
"1 0 0.485714 0.564655 \n",
"2 0 0.409668 0.577586 \n",
"3 0 0.407251 0.549261 \n",
"4 0 0.396338 0.529865 \n",
"5 0 0.362626 0.495194 \n",
"6 0 0.371149 0.473499 \n",
"7 0 0.396149 0.493297 \n",
"8 0 0.407723 0.500373 \n",
"9 0 0.376692 0.547112 \n",
"10 0 0.370739 0.615526 \n",
"11 0 0.317498 0.653836 \n",
"12 0 0.321416 0.657631 \n",
"13 0 0.361993 0.630026 \n",
"14 0 0.425237 0.542446 \n",
"15 0 0.466282 0.462653 \n",
"16 0 0.476893 0.421784 \n",
"17 0 0.495422 0.409388 \n",
"18 0 0.492198 0.401888 \n",
"19 0 0.509110 0.465395 \n",
"20 0 0.522538 0.516946 \n",
"21 1 0.516138 0.576589 \n",
"22 1 0.498529 0.627498 \n",
"23 1 0.499494 0.573770 \n",
"24 0 0.487742 0.554936 \n",
"25 0 0.445234 0.572793 \n",
"26 0 0.426768 0.550336 \n",
"27 1 0.384722 0.607281 \n",
"28 1 0.406818 0.586706 \n",
"29 1 0.466436 0.484733 \n",
"... ... ... ... \n",
"242570 0 0.494877 0.636939 \n",
"242571 0 0.401742 0.596582 \n",
"242572 0 0.406288 0.565718 \n",
"242573 0 0.410285 0.573655 \n",
"242574 0 0.360669 0.601036 \n",
"242575 0 0.462424 0.642155 \n",
"242576 0 0.459701 0.713249 \n",
"242577 0 0.423924 0.731165 \n",
"242578 0 0.285714 0.600000 \n",
"242579 0 0.318913 0.583333 \n",
"242580 0 0.306250 0.542683 \n",
"242581 0 0.300561 0.551829 \n",
"242582 0 0.306065 0.542683 \n",
"242583 0 0.324143 0.556318 \n",
"242584 0 0.326806 0.565868 \n",
"242585 0 0.315588 0.566249 \n",
"242586 0 0.316448 0.610151 \n",
"242587 0 0.292800 0.623346 \n",
"242588 0 0.353846 0.657534 \n",
"242589 0 0.392440 0.639578 \n",
"242590 0 0.358849 0.657867 \n",
"242591 0 0.355675 0.653556 \n",
"242592 0 0.381499 0.633404 \n",
"242593 0 0.404762 0.471831 \n",
"242594 0 0.422078 0.465645 \n",
"242595 0 0.372340 0.475806 \n",
"242596 0 0.356625 0.429080 \n",
"242597 0 0.371083 0.482482 \n",
"242598 0 0.367255 0.518111 \n",
"242599 0 0.362133 0.554332 \n",
"\n",
" turnover_percent opponents_turnover_percent rebounding \\\n",
"0 0.129534 0.132319 0.255814 \n",
"1 0.117888 0.135268 0.221657 \n",
"2 0.129161 0.132480 0.246537 \n",
"3 0.172692 0.135533 0.268236 \n",
"4 0.198496 0.102454 0.245949 \n",
"5 0.265873 0.139328 0.332407 \n",
"6 0.311279 0.147634 0.291667 \n",
"7 0.275781 0.202785 0.263889 \n",
"8 0.280093 0.269113 0.267677 \n",
"9 0.243627 0.218389 0.171843 \n",
"10 0.241415 0.192551 0.221843 \n",
"11 0.270233 0.118722 0.227263 \n",
"12 0.253746 0.068291 0.273914 \n",
"13 0.247155 0.071182 0.312803 \n",
"14 0.221989 0.088116 0.288293 \n",
"15 0.236614 0.124585 0.361246 \n",
"16 0.258220 0.178508 0.381641 \n",
"17 0.269521 0.232157 0.384199 \n",
"18 0.278082 0.275053 0.421530 \n",
"19 0.234967 0.251346 0.311039 \n",
"20 0.199711 0.205544 0.215205 \n",
"21 0.185148 0.164143 0.165670 \n",
"22 0.154878 0.132432 0.169516 \n",
"23 0.158281 0.150213 0.163936 \n",
"24 0.164454 0.171188 0.217782 \n",
"25 0.154771 0.186478 0.256552 \n",
"26 0.140307 0.210642 0.203427 \n",
"27 0.126310 0.220407 0.244780 \n",
"28 0.126736 0.238385 0.299267 \n",
"29 0.130789 0.257743 0.339194 \n",
"... ... ... ... \n",
"242570 0.250341 0.106176 0.212605 \n",
"242571 0.222527 0.114765 0.187473 \n",
"242572 0.183735 0.121739 0.156888 \n",
"242573 0.187710 0.151244 0.180989 \n",
"242574 0.267922 0.165863 0.247436 \n",
"242575 0.274116 0.190360 0.304081 \n",
"242576 0.281827 0.231361 0.283530 \n",
"242577 0.263945 0.227899 0.217062 \n",
"242578 0.284775 0.131291 0.083333 \n",
"242579 0.241916 0.128292 0.089744 \n",
"242580 0.277932 0.173348 0.271186 \n",
"242581 0.281994 0.142076 0.308007 \n",
"242582 0.278273 0.172442 0.272005 \n",
"242583 0.272739 0.181963 0.252080 \n",
"242584 0.263222 0.190830 0.244469 \n",
"242585 0.246991 0.214809 0.229691 \n",
"242586 0.229092 0.191450 0.237726 \n",
"242587 0.227558 0.182843 0.252149 \n",
"242588 0.142626 0.163419 0.125000 \n",
"242589 0.099742 0.135365 0.110119 \n",
"242590 0.138008 0.161207 0.122795 \n",
"242591 0.159511 0.163903 0.103460 \n",
"242592 0.188832 0.161908 0.151756 \n",
"242593 0.311025 0.247678 0.227273 \n",
"242594 0.282698 0.275601 0.196970 \n",
"242595 0.302001 0.200215 0.176471 \n",
"242596 0.323144 0.186438 0.147059 \n",
"242597 0.302957 0.200104 0.176471 \n",
"242598 0.286675 0.187142 0.165248 \n",
"242599 0.263531 0.172676 0.146130 \n",
"\n",
" opponents_rebounding freethrows oppponents_freethrows win \n",
"0 0.312500 0.380952 0.465517 0 \n",
"1 0.267361 0.390476 0.370690 0 \n",
"2 0.321098 0.381530 0.465517 0 \n",
"3 0.369395 0.379897 0.451817 0 \n",
"4 0.396533 0.409659 0.403619 0 \n",
"5 0.497227 0.377841 0.486827 0 \n",
"6 0.508506 0.286932 0.381368 0 \n",
"7 0.484101 0.193182 0.322167 0 \n",
"8 0.491741 0.068182 0.305872 0 \n",
"9 0.371205 0.057692 0.237032 0 \n",
"10 0.320966 0.093407 0.243215 0 \n",
"11 0.266799 0.139703 0.273507 0 \n",
"12 0.220563 0.264703 0.373794 0 \n",
"13 0.243672 0.292011 0.415461 0 \n",
"14 0.228122 0.297963 0.450944 1 \n",
"15 0.229592 0.404106 0.412888 1 \n",
"16 0.246259 0.330830 0.310714 1 \n",
"17 0.237436 0.304653 0.285714 1 \n",
"18 0.251877 0.318542 0.260714 0 \n",
"19 0.318054 0.213273 0.317105 0 \n",
"20 0.328470 0.200010 0.310209 0 \n",
"21 0.417359 0.196742 0.353066 0 \n",
"22 0.425286 0.234937 0.493975 0 \n",
"23 0.374306 0.233222 0.516453 0 \n",
"24 0.350556 0.268834 0.636393 0 \n",
"25 0.261667 0.228430 0.597703 0 \n",
"26 0.300303 0.202862 0.453222 0 \n",
"27 0.316970 0.193771 0.427528 1 \n",
"28 0.299601 0.195455 0.344841 1 \n",
"29 0.309125 0.223781 0.302078 1 \n",
"... ... ... ... ... \n",
"242570 0.447520 0.063715 0.154970 0 \n",
"242571 0.438682 0.118210 0.144701 0 \n",
"242572 0.462093 0.135634 0.160133 0 \n",
"242573 0.465588 0.180486 0.199094 0 \n",
"242574 0.426325 0.222152 0.197406 0 \n",
"242575 0.441699 0.228002 0.257028 0 \n",
"242576 0.433245 0.217349 0.248300 0 \n",
"242577 0.421066 0.172498 0.199260 0 \n",
"242578 0.458333 0.321429 0.177778 0 \n",
"242579 0.437500 0.259306 0.216667 0 \n",
"242580 0.395833 0.025000 0.231707 0 \n",
"242581 0.371830 0.038141 0.250000 0 \n",
"242582 0.394553 0.025427 0.231707 0 \n",
"242583 0.386824 0.039341 0.250169 0 \n",
"242584 0.379329 0.075344 0.258419 0 \n",
"242585 0.384478 0.128700 0.246033 0 \n",
"242586 0.338994 0.144726 0.254396 0 \n",
"242587 0.283799 0.124456 0.244673 0 \n",
"242588 0.375000 0.107692 0.109589 0 \n",
"242589 0.369318 0.174536 0.081822 0 \n",
"242590 0.375842 0.116357 0.110103 0 \n",
"242591 0.353310 0.173806 0.176327 0 \n",
"242592 0.426227 0.146883 0.206622 0 \n",
"242593 0.369565 0.190476 0.295775 0 \n",
"242594 0.424783 0.216450 0.296536 0 \n",
"242595 0.459459 0.170213 0.258065 0 \n",
"242596 0.457002 0.085106 0.246679 0 \n",
"242597 0.460224 0.163404 0.259691 0 \n",
"242598 0.446730 0.136976 0.253102 0 \n",
"242599 0.439008 0.103682 0.283413 0 \n",
"\n",
"[242600 rows x 10 columns]"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%bigquery games\n",
"WITH all_games AS (\n",
"SELECT \n",
" game_date,\n",
" team_code,\n",
" is_home,\n",
" SAFE_DIVIDE(fgm + 0.5 * fgm3,fga) AS offensive_shooting_efficiency,\n",
" SAFE_DIVIDE(opp_fgm + 0.5 * opp_fgm3,opp_fga) AS opponents_shooting_efficiency,\n",
" SAFE_DIVIDE(tov,fga+0.475*fta+tov-oreb) AS turnover_percent,\n",
" SAFE_DIVIDE(opp_tov,opp_fga+0.475*opp_fta+opp_tov-opp_oreb) AS opponents_turnover_percent,\n",
" SAFE_DIVIDE(oreb,oreb + opp_dreb) AS rebounding,\n",
" SAFE_DIVIDE(opp_oreb,opp_oreb + dreb) AS opponents_rebounding,\n",
" SAFE_DIVIDE(ftm,fga) AS freethrows,\n",
" SAFE_DIVIDE(opp_ftm,opp_fga) AS opponents_freethrows,\n",
" win\n",
"FROM lab_dev.team_box\n",
"WHERE fga IS NOT NULL and win IS NOT NULL\n",
")\n",
"\n",
", prevgames AS (\n",
"SELECT \n",
" is_home,\n",
" AVG(offensive_shooting_efficiency) \n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING) AS offensive_shooting_efficiency,\n",
" AVG(opponents_shooting_efficiency) \n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING)AS opponents_shooting_efficiency,\n",
" AVG(turnover_percent)\n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING) AS turnover_percent,\n",
" AVG(opponents_turnover_percent)\n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING) AS opponents_turnover_percent,\n",
" AVG(rebounding)\n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING) AS rebounding,\n",
" AVG(opponents_rebounding) \n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING) AS opponents_rebounding,\n",
" AVG(freethrows) \n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING) AS freethrows,\n",
" AVG(opponents_freethrows) \n",
" OVER(PARTITION BY team_code ORDER BY game_date ASC ROWS BETWEEN 4 PRECEDING AND 1 PRECEDING) AS oppponents_freethrows,\n",
" win\n",
"FROM all_games\n",
")\n",
"\n",
"SELECT * FROM prevgames\n",
"WHERE offensive_shooting_efficiency IS NOT NULL"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [],
"source": [
"import tensorflow as tf\n",
"import tensorflow.keras as keras"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"242600 10 169820\n"
]
}
],
"source": [
"nrows = len(games)\n",
"ncols = len(games.iloc[0])\n",
"ntrain = (nrows * 7) // 10\n",
"print(nrows, ncols, ntrain)"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [],
"source": [
"# 0:ntrain are the training data; remaining rows are testing\n",
"# last col is the label\n",
"train_x = games.iloc[:ntrain, 0:(ncols-1)]\n",
"train_y = games.iloc[:ntrain, ncols-1]\n",
"test_x = games.iloc[ntrain:, 0:(ncols-1)]\n",
"test_y = games.iloc[ntrain:, ncols-1]"
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/resource_variable_ops.py:435: colocate_with (from tensorflow.python.framework.ops) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Colocations handled automatically by placer.\n"
]
}
],
"source": [
"model = keras.models.Sequential()\n",
"model.add(keras.layers.Dense(5, input_dim=ncols-1, activation='relu'))\n",
"model.add(keras.layers.Dense(1, activation='sigmoid'))\n",
"model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"WARNING:tensorflow:From /usr/local/lib/python3.5/dist-packages/tensorflow/python/ops/math_ops.py:3066: to_int32 (from tensorflow.python.ops.math_ops) is deprecated and will be removed in a future version.\n",
"Instructions for updating:\n",
"Use tf.cast instead.\n",
"Epoch 1/5\n",
"169820/169820 [==============================] - 11s 65us/sample - loss: 0.6281 - acc: 0.6539\n",
"Epoch 2/5\n",
"169820/169820 [==============================] - 9s 53us/sample - loss: 0.5976 - acc: 0.6771\n",
"Epoch 3/5\n",
"169820/169820 [==============================] - 10s 56us/sample - loss: 0.5907 - acc: 0.6841\n",
"Epoch 4/5\n",
"169820/169820 [==============================] - 10s 58us/sample - loss: 0.5886 - acc: 0.6861\n",
"Epoch 5/5\n",
"169820/169820 [==============================] - 9s 52us/sample - loss: 0.5877 - acc: 0.6860\n",
"72780/72780 [==============================] - 0s 4us/sample - loss: 0.5494 - acc: 0.7151\n",
"[0.5493521325746779, 0.71512777]\n"
]
}
],
"source": [
"history = model.fit(train_x, train_y, epochs=5, batch_size=32)\n",
"score = model.evaluate(test_x, test_y, batch_size=512)\n",
"print(score)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"With a deep neural network, we are able to get 71.5% accuracy using the four factors model."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Copyright 2019 Google Inc. All Rights Reserved.\n",
"#\n",
"# Licensed under the Apache License, Version 2.0 (the \"License\");\n",
"# you may not use this file except in compliance with the License.\n",
"# You may obtain a copy of the License at\n",
"#\n",
"# http://www.apache.org/licenses/LICENSE-2.0\n",
"#\n",
"# Unless required by applicable law or agreed to in writing, software\n",
"# distributed under the License is distributed on an \"AS IS\" BASIS,\n",
"# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n",
"# See the License for the specific language governing permissions and\n",
"# limitations under the License."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.5.3"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
| Jupyter Notebook | 5 | laurenzberger/training-data-analyst | blogs/ncaa/ncaa_feateng_solution.ipynb | [
"Apache-2.0"
] |
{
outPath: './audio-volume.mp4',
width: 200, height: 200,
clips: [
{ duration: 2, layers: [{ type: 'title-background', text: 'Audio output volume' }] },
],
audioTracks: [
{ path: './assets/High [NCS Release] - JPB (No Copyright Music)-R8ZRCXy5vhA.m4a', cutFrom: 18 },
],
outputVolume: '-10dB',
} | JSON5 | 2 | aaverty/editly | examples/audio-volume.json5 | [
"MIT"
] |
= Rel : Properties of Relations
> module Rel
>
\todo[inline]{Add hyperlinks}
This short (and optional) chapter develops some basic definitions and a few
theorems about binary relations in Idris. The key definitions are repeated where
they are actually used (in the `Smallstep` chapter), so readers who are already
comfortable with these ideas can safely skim or skip this chapter. However,
relations are also a good source of exercises for developing facility with
Idris's basic reasoning facilities, so it may be useful to look at this material
just after the `IndProp` chapter.
> import Logic
> import IndProp
>
A binary _relation_ on a set \idr{t} is a family of propositions parameterized
by two elements of \idr{t} — i.e., a proposition about pairs of elements of
\idr{t}.
> Relation : Type -> Type
> Relation t = t -> t -> Type
\todo[inline]{Edit, there's n-relation \idr{Data.Rel} in \idr{contrib}, but no
\idr{Relation}}
Confusingly, the Idris standard library hijacks the generic term "relation" for
this specific instance of the idea. To maintain consistency with the library, we
will do the same. So, henceforth the Idris identifier `relation` will always
refer to a binary relation between some set and itself, whereas the English word
"relation" can refer either to the specific Idris concept or the more general
concept of a relation between any number of possibly different sets. The context
of the discussion should always make clear which is meant.
\todo[inline]{There's a similar concept called \idr{LTE} in \idr{Prelude.Nat},
but it's defined by induction from zero}
An example relation on \idr{Nat} is \idr{Le}, the less-than-or-equal-to
relation, which we usually write \idr{n1 <= n2}.
```idris
λΠ> the (Relation Nat) Le
Le : Nat -> Nat -> Type
```
\todo[inline]{Edit to show it (probably) doesn't matter in Idris}
(Why did we write it this way instead of starting with \idr{data Le : Relation
Nat ...}? Because we wanted to put the first \idr{Nat} to the left of the
\idr{:}, which makes Idris generate a somewhat nicer induction principle for
reasoning about \idr{<='}.)
== Basic Properties
As anyone knows who has taken an undergraduate discrete math course, there is a
lot to be said about relations in general, including ways of classifying
relations (as reflexive, transitive, etc.), theorems that can be proved
generically about certain sorts of relations, constructions that build one
relation from another, etc. For example...
=== Partial Functions
A relation \idr{r} on a set \idr{t} is a _partial function_ if, for every
\idr{x}, there is at most one \idr{y} such that \idr{r x y} — i.e., \idr{r x y1}
and \idr{r x y2} together imply \idr{y1 = y2}.
> Partial_function : (r : Relation t) -> Type
> Partial_function {t} r = (x, y1, y2 : t) -> r x y1 -> r x y2 -> y1 = y2
\todo[inline]{"Earlier" = in \idr{IndProp}, add hyperlink?}
For example, the \idr{Next_nat} relation defined earlier is a partial function.
```idris
λΠ> the (Relation Nat) Next_nat
Next_nat : Nat -> Nat -> Type
```
> next_nat_partial_function : Partial_function Next_nat
> next_nat_partial_function x (S x) (S x) Nn Nn = Refl
However, the \idr{<='} relation on numbers is not a partial function. (Assume,
for a contradiction, that \idr{<='} is a partial function. But then, since
\idr{0 <=' 0} and \idr{0 <=' 1}, it follows that \idr{0 = 1}. This is nonsense,
so our assumption was contradictory.)
> le_not_a_partial_function : Not (Partial_function Le)
> le_not_a_partial_function f = absurd $ f 0 0 1 Le_n (Le_S Le_n)
==== Exercise: 2 stars, optional
\ \todo[inline]{Again, "earlier" = \idr{IndProp}}
Show that the \idr{Total_relation} defined in earlier is not a partial function.
> -- FILL IN HERE
$\square$
==== Exercise: 2 stars, optional
Show that the \idr{Empty_relation} that we defined earlier is a partial
function.
> --FILL IN HERE
$\square$
=== Reflexive Relations
A _reflexive_ relation on a set \idr{t} is one for which every element of
\idr{t} is related to itself.
> Reflexive : (r : Relation t) -> Type
> Reflexive {t} r = (a : t) -> r a a
> le_reflexive : Reflexive Le
> le_reflexive n = Le_n {n}
=== Transitive Relations
A relation \idr{r} is _transitive_ if \idr{r a c} holds whenever \idr{r a b} and
\idr{r b c} do.
> Transitive : (r : Relation t) -> Type
> Transitive {t} r = (a, b, c : t) -> r a b -> r b c -> r a c
> le_trans : Transitive Le
> le_trans _ _ _ lab Le_n = lab
> le_trans a b (S c) lab (Le_S lbc) = Le_S $ le_trans a b c lab lbc
> lt_trans : Transitive Lt
> lt_trans a b c lab lbc = le_trans (S a) (S b) c (Le_S lab) lbc
==== Exercise: 2 stars, optional
We can also prove \idr{lt_trans} more laboriously by induction, without using
\idr{le_trans}. Do this.
> lt_trans' : Transitive Lt
> -- Prove this by induction on evidence that a is less than c.
> lt_trans' a b c lab lbc = ?lt_trans__rhs
$\square$
==== Exercise: 2 stars, optional
\ \todo[inline]{Not sure how is this different from \idr{lt_trans'}?}
Prove the same thing again by induction on \idr{c}.
> lt_trans'' : Transitive Lt
> lt_trans'' a b c lab lbc = ?lt_trans___rhs
$\square$
The transitivity of \idr{Le}, in turn, can be used to prove some facts that will
be useful later (e.g., for the proof of antisymmetry below)...
> le_Sn_le : ((S n) <=' m) -> (n <=' m)
> le_Sn_le {n} {m} = le_trans n (S n) m (Le_S Le_n)
==== Exercise: 1 star, optional
> le_S_n : ((S n) <=' (S m)) -> (n <=' m)
> le_S_n less = ?le_S_n_rhs
$\square$
==== Exercise: 2 stars, optional (le_Sn_n_inf)
Provide an informal proof of the following theorem:
Theorem: For every \idr{n}, \idr{Not ((S n) <=' n)}
A formal proof of this is an optional exercise below, but try writing an
informal proof without doing the formal proof first.
Proof:
> -- FILL IN HERE
$\square$
==== Exercise: 1 star, optional
> le_Sn_n : Not ((S n) <=' n)
> le_Sn_n = ?le_Sn_n_rhs
$\square$
Reflexivity and transitivity are the main concepts we'll need for later
chapters, but, for a bit of additional practice working with relations in Idris,
let's look at a few other common ones...
=== Symmetric and Antisymmetric Relations
A relation \idr{r} is _symmetric_ if \idr{r a b} implies \idr{r b a}.
> Symmetric : (r : Relation t) -> Type
> Symmetric {t} r = (a, b : t) -> r a b -> r b a
==== Exercise: 2 stars, optional
> le_not_symmetric : Not (Symmetric Le)
> le_not_symmetric = ?le_not_symmetric_rhs
$\square$
A relation \idr{r} is _antisymmetric_ if \idr{r a b} and \idr{r b a} together
imply \idr{a = b} — that is, if the only "cycles" in \idr{r} are trivial ones.
> Antisymmetric : (r : Relation t) -> Type
> Antisymmetric {t} r = (a, b : t) -> r a b -> r b a -> a = b
==== Exercise: 2 stars, optional
> le_antisymmetric : Antisymmetric Le
> le_antisymmetric = ?le_antisymmetric_rhs
$\square$
==== Exercise: 2 stars, optional
> le_step : (n <' m) -> (m <=' (S p)) -> (n <=' p)
> le_step ltnm lemsp = ?le_step_rhs
$\square$
=== Equivalence Relations
A relation is an _equivalence_ if it's reflexive, symmetric, and transitive.
> Equivalence : (r : Relation t) -> Type
> Equivalence r = (Reflexive r, Symmetric r, Transitive r)
=== Partial Orders and Preorders
\ \todo[inline]{Edit}
A relation is a _partial order_ when it's reflexive, _anti_-symmetric, and
transitive. In the Idris standard library it's called just "order" for short.
> Order : (r : Relation t) -> Type
> Order r = (Reflexive r, Antisymmetric r, Transitive r)
A preorder is almost like a partial order, but doesn't have to be antisymmetric.
> Preorder : (r : Relation t) -> Type
> Preorder r = (Reflexive r, Transitive r)
> le_order : Order Le
> le_order = (le_reflexive, le_antisymmetric, le_trans)
== Reflexive, Transitive Closure
\ \todo[inline]{Edit}
The _reflexive, transitive closure_ of a relation \idr{r} is the smallest
relation that contains \idr{r} and that is both reflexive and transitive.
Formally, it is defined like this in the Relations module of the Idris standard
library:
> data Clos_refl_trans : (r : Relation t) -> Relation t where
> Rt_step : r x y -> Clos_refl_trans r x y
> Rt_refl : Clos_refl_trans r x x
> Rt_trans : Clos_refl_trans r x y -> Clos_refl_trans r y z ->
> Clos_refl_trans r x z
For example, the reflexive and transitive closure of the \idr{Next_nat} relation
coincides with the \idr{Le} relation.
> next_nat_closure_is_le : (n <=' m) <-> (Clos_refl_trans Next_nat n m)
> next_nat_closure_is_le = (to, fro)
> where
> to : Le n m -> Clos_refl_trans Next_nat n m
> to Le_n = Rt_refl
> to (Le_S {m} le) = Rt_trans {y=m} (to le) (Rt_step Nn)
> fro : Clos_refl_trans Next_nat n m -> Le n m
> fro (Rt_step Nn) = Le_S Le_n
> fro Rt_refl = Le_n
> fro (Rt_trans {x=n} {y} {z=m} ny ym) =
> le_trans n y m (fro ny) (fro ym)
The above definition of reflexive, transitive closure is natural: it says,
explicitly, that the reflexive and transitive closure of \idr{r} is the least
relation that includes \idr{r} and that is closed under rules of reflexivity and
transitivity. But it turns out that this definition is not very convenient for
doing proofs, since the "nondeterminism" of the \idr{Rt_trans} rule can
sometimes lead to tricky inductions. Here is a more useful definition:
> data Clos_refl_trans_1n : (r : Relation t) -> (x : t) -> t -> Type where
> Rt1n_refl : Clos_refl_trans_1n r x x
> Rt1n_trans : r x y -> Clos_refl_trans_1n r y z -> Clos_refl_trans_1n r x z
\todo[inline]{Edit}
Our new definition of reflexive, transitive closure "bundles" the \idr{Rt_step}
and \idr{Rt_trans} rules into the single rule step. The left-hand premise of
this step is a single use of \idr{r}, leading to a much simpler induction
principle.
Before we go on, we should check that the two definitions do indeed define the
same relation...
First, we prove two lemmas showing that \idr{Clos_refl_trans_1n} mimics the
behavior of the two "missing" \idr{Clos_refl_trans} constructors.
> rsc_R : r x y -> Clos_refl_trans_1n r x y
> rsc_R rxy = Rt1n_trans rxy Rt1n_refl
==== Exercise: 2 stars, optional (rsc_trans)
> rsc_trans : Clos_refl_trans_1n r x y -> Clos_refl_trans_1n r y z ->
> Clos_refl_trans_1n r x z
> rsc_trans crxy cryz = ?rsc_trans_rhs
$\square$
Then we use these facts to prove that the two definitions of reflexive,
transitive closure do indeed define the same relation.
==== Exercise: 3 stars, optional (rtc_rsc_coincide)
> rtc_rsc_coincide : (Clos_refl_trans r x y) <-> (Clos_refl_trans_1n r x y)
> rtc_rsc_coincide = ?rtc_rsc_coincide_rhs
$\square$
| Idris | 5 | diseraluca/software-foundations | src/Rel.lidr | [
"MIT"
] |
// rustfmt-group_imports: One
// rustfmt-reorder_imports: false
use chrono::Utc;
use super::update::convert_publish_payload;
use juniper::{FieldError, FieldResult};
use uuid::Uuid;
use alloc::alloc::Layout;
use std::sync::Arc;
use broker::database::PooledConnection;
use super::schema::{Context, Payload};
use core::f32;
use crate::models::Event;
| Rust | 2 | ohno418/rust | src/tools/rustfmt/tests/target/configs/group_imports/One-no_reorder.rs | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
NB. SICP 2.1.4 - Interval Arithmetic in J
NB. Implemented at http://www.meetup.com/Toronto-Code-Retreat/events/148531162/
NB. All verbs have explicit rank 1 so that they can be
NB. easily applied to N-dimentional case.
center =: (+/ % 2:) " 1
width =: (-/ @ |. % 2:) " 1
NB. Couple helper verbs
cross =: (* |.) " 1 1
minmax =: (<./ , >./) " 1
add =: + " 1 1
sub =: (- |.) " 1 1
prod =: (minmax @ (* , cross)) " 1 1
div =: (([ % 0:) ` (prod %) @. (0: < */ @ ])) " 1 1
NB. TESTS
NB. N-dimentional cube is represented by its diagonal.
NB. The diagonal is implemented as a pair of points in R^N space (two N-tuples).
NB. Here is an example of two 3D cubes
A =: i.3 2
NB. 0 1
NB. 2 3
NB. 4 5
B =: 2 + i.3 2
NB. 2 3
NB. 4 5
NB. 6 7
A add B
NB. 2 4
NB. 6 8
NB. 10 12
A sub B
NB. _3 _1
NB. _3 _1
NB. _3 _1
A prod B
NB. 0 3
NB. 8 15
NB. 24 35
A div B
NB. 0 0.5
NB. 0.4 0.75
NB. 0.571429 0.833333
NB. The original 1D example from SICP is just a special case
1 2 add 3 4 NB. = 4 6
1 2 sub 3 4 NB. = _3 _1
1 2 prod 3 4 NB. = 3 8
1 2 div 3 4 NB. = 0.25 0.666667
NB. One thing to note is a division by zero in J
1 2 div _3 4 NB. = _ _
_1 2 div _3 4 NB. = __ _
_1 0 div _3 4 NB. = __ 0
0 1 div _3 4 NB. = 0 _
| J | 5 | CompSciCabal/SMRTYPRTY | sicp/v1/chapter-2.1/ndpar-2.1.4.ijs | [
"Unlicense"
] |
CREATE TABLE IF NOT EXISTS CLIENTS
(
`id` int AUTO_INCREMENT NOT NULL,
`first_name` varchar(100) NOT NULL,
`last_name` varchar(100) NOT NULL,
PRIMARY KEY (`id`)
);
CREATE TABLE IF NOT EXISTS ITEMS
(
`id` int AUTO_INCREMENT NOT NULL,
`title` varchar(100) NOT NULL,
`produced` date,
`price` float,
PRIMARY KEY (`id`)
);
CREATE TABLE IF NOT EXISTS PURCHASES
(
`id` int NOT NULL AUTO_INCREMENT,
`id_user` int NOT NULL,
`id_item` int NOT NULL,
`total_price` float NOT NULL,
`quantity` int(11) NOT NULL,
PRIMARY KEY (`id`),
FOREIGN KEY (`id_user`) REFERENCES CLIENTS (`id`) ON DELETE CASCADE,
FOREIGN KEY (`id_item`) REFERENCES ITEMS (`id`) ON DELETE CASCADE ON UPDATE CASCADE
);
| SQL | 4 | DBatOWL/tutorials | libraries-testing/src/test/resources/dbunit/schema.sql | [
"MIT"
] |
# This file is a part of Julia. License is MIT: https://julialang.org/license
module SubFoo2
thissub = "Foo1.SubFoo2"
end
| Julia | 1 | TimoLarson/julia | test/project/deps/Foo1/src/subdir/SubFoo2.jl | [
"Zlib"
] |
pub main
coginit(0, @entry, 0)
dat
org 0
entry
_get257
mov result1, #257
_get257_ret
ret
_get1
mov result1, #1
_get1_ret
ret
result1
long 0
COG_BSS_START
fit 496
org COG_BSS_START
fit 496
| Parrot Assembly | 3 | dMajoIT/spin2cpp | Test/Expect/stest166.pasm | [
"MIT"
] |
package {
public overclass Debug {
//public static var oInst : Debug;
/*
public static var bPipe : Bool = false;
public static var bPrefix : Bool = true;
public static var sMsgFuncMissing: String = " not implemented";
public function Debug():Void {
Debug.oInst = this;
}
*/
pure function fConsole(_sValue:String):Void { //Pure function Cannot be overplaced
<cpp>
GZ_printf("\n");
_sValue.fPrint();
</cpp>
}
function fTrace(_sValue:String):Void {
Debug.fConsole(_sValue);
}
function fPass(_sValue:String):Void {
Debug.fConsole(_sValue);
}
function fWarning(_sValue:String):Void {
Debug.fConsole(_sValue);
}
function fError(_sValue:String):Void {
Debug.fConsole(_sValue);
}
function fFatal(_sValue:String):Void {
Debug.fConsole(_sValue);
}
function fInfo(_sValue:String):Void {
Debug.fConsole(_sValue);
}
/*
public function Debug(_nWidth : Int, _nHeight : Int, _nPosX : Int = 0, _nPosY : Int = 0):Void{
Debug.oInst = this;
}*/
/*
macro function fConsole(_sValue:String):Void;
macro function fTrace(_sValue:String):Void;
macro function fTrace2(_sValue:String):Void;
macro function fTrace3(_sValue:String):Void;
macro function fError(_sValue:String):Void;
*/
/*
static function fTrace(_sValue:String):Void {
// fConsole(_sValue);
// oInst.fTrace(_sValue);
}
static function fTrace2(_sValue:String):Void {
//oInst.fTrace2(_sValue);
}
static function fTrace3(_sValue:String):Void {
// oInst.fTrace3(_sValue);
}
*/
/*
public function fTrace(_sValue:String):Void;
public function fTrace2(_sValue:String):Void;
public function fTrace3(_sValue:String):Void;
public function fWarning(_sValue:String):Void;
public function fError(_sValue:String):Void;
public function fPass(_sValue:String):Void;
public function fFatal(_sValue:String):Void;
*/
}
}
| Redcode | 3 | VLiance/GZE | src/Lib_GZ/Debug/Debug.cw | [
"Apache-2.0"
] |
using Uno.Threading;
using Uno;
using Uno.UX;
using Uno.Compiler.ExportTargetInterop;
namespace Fuse.Audio
{
[Require("Source.Include", "Apple/AudioHelper.h")]
[Set("FileExtension", "mm")]
internal extern(iOS) class SoundPlayer
{
public static void PlaySoundFromBundle(BundleFileSource file)
{
PlaySoundFromUrl("data/" + file.BundleFile.BundlePath);
}
[Foreign(Language.ObjC)]
static void PlaySoundFromUrl(string url)
@{
NSURL* uri = [NSURL fileURLWithPath:[[NSBundle bundleForClass:[StrongUnoObject class]] pathForResource:url ofType:nil]];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[[AudioHelper getInstance] playSoundFromFile:uri];
});
@}
public static void PlaySoundFromByteArray(byte[] byteArray)
@{
uArray* arr = $0;
NSData* data = [NSData dataWithBytes:arr->Ptr() length:arr->Length()];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
[[AudioHelper getInstance] playSound:data];
});
@}
}
}
| Uno | 4 | helilabs/fuselibs | Source/Fuse.Audio/Apple/AppleAudio.uno | [
"MIT"
] |
// This should never be allowed -- since `x` is not `mut`, so `x.0`
// cannot be assigned twice.
fn var_then_field() {
let x: (u32, u32);
x = (22, 44);
x.0 = 1; //~ ERROR
}
fn same_field_twice() {
let x: (u32, u32);
x.0 = 1; //~ ERROR
x.0 = 22;
x.1 = 44;
}
fn main() { }
| Rust | 4 | Eric-Arellano/rust | src/test/ui/borrowck/reassignment_immutable_fields_twice.rs | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] |
#pragma once
#include <unistd.h>
#include <algorithm>
#include <csignal>
#include <list>
#include "source/common/common/non_copyable.h"
#include "source/common/signal/fatal_error_handler.h"
#include "source/server/backtrace.h"
namespace Envoy {
/**
* This class installs signal handlers for fatal signal types.
*
* These signals are handled:
* SIGABRT
* SIGBUS
* SIGFPE
* SIGILL
* SIGSEGV
*
* Upon intercepting the signal the following actions are taken:
*
* A Backtrace is printed from the address the signal was encountered at, if
* it is possible to retrieve.
*
* The signal handler is reset to the default handler (which is expected to
* terminate the process).
*
* The signal is raised again (which ultimately kills the process)
*
* The signal handler must run on an alternative stack so that we can do the
* stack unwind on the original stack. Memory is allocated for this purpose when
* this object is constructed. When this object goes out of scope the memory
* used for the alternate signal stack is destroyed and the previous signal handler
* and alt stack if previously used are restored.
*
* Note that we do NOT restore the previously saved sigaction and alt stack in
* the signal handler itself. This is fraught with complexity and has little
* benefit. The inner most scope SignalAction will terminate the process by
* re-raising the fatal signal with default handler.
*
* It is recommended that this object be instantiated at the highest possible
* scope, e.g., in main(). This enables fatal signal handling for almost all code
* executed. Because of the save-and-restore behavior it is possible for
* SignalAction to be used at both wider and tighter scopes without issue.
*/
class SignalAction : NonCopyable {
public:
SignalAction()
: guard_size_(sysconf(_SC_PAGE_SIZE)),
altstack_size_(std::max(guard_size_ * 4, static_cast<size_t>(MINSIGSTKSZ))) {
mapAndProtectStackMemory();
installSigHandlers();
}
~SignalAction() {
removeSigHandlers();
unmapStackMemory();
}
/**
* Helpers for testing guarded stack memory
*/
void doGoodAccessForTest();
void tryEvilAccessForTest(bool end);
/**
* The actual signal handler function with prototype matching signal.h
*
* Public so that we can exercise it directly from a test.
*/
static void sigHandler(int sig, siginfo_t* info, void* context);
private:
/**
* Allocate this many bytes on each side of the area used for alt stack.
*
* Set to system page size.
*
* The memory will be protected from read and write.
*/
const size_t guard_size_;
/**
* Use this many bytes for the alternate signal handling stack.
*
* Initialized as a multiple of page size (although signalstack will
* do alignment as needed).
*
* Additionally, two guard pages will be allocated to bookend the usable area.
*/
const size_t altstack_size_;
/**
* This constant array defines the signals we will insert handlers for.
*
* Essentially this is the list of signals that would cause a core dump.
* The object will contain an array of struct sigactions with the same number
* of elements that are in this array.
*/
static constexpr int FATAL_SIGS[] = {SIGABRT, SIGBUS, SIGFPE, SIGILL, SIGSEGV};
/**
* Return the memory size we actually map including two guard pages.
*/
size_t mapSizeWithGuards() const { return altstack_size_ + guard_size_ * 2; }
/**
* Install all signal handlers and setup signal handling stack.
*/
void installSigHandlers();
/**
* Remove all signal handlers.
*
* Must be executed before the alt stack memory goes away.
*
* Signal handlers will be reset to the default, NOT back to any signal
* handler existing before InstallSigHandlers().
*/
void removeSigHandlers();
/**
* Use mmap to map anonymous memory for the alternative stack.
*
* GUARD_SIZE on either end of the memory will be marked PROT_NONE, protected
* from all access.
*/
void mapAndProtectStackMemory();
/**
* Unmap alternative stack memory.
*/
void unmapStackMemory();
char* altstack_{};
std::array<struct sigaction, sizeof(FATAL_SIGS) / sizeof(int)> previous_handlers_;
// sigaltstack and backtrace() are incompatible on Apple platforms
// https://reviews.llvm.org/D28265
#if !defined(__APPLE__)
stack_t previous_altstack_;
#endif
};
} // namespace Envoy
| C | 4 | dcillera/envoy | source/common/signal/signal_action.h | [
"Apache-2.0"
] |
enum color { red=1, green=2, blue=3 };
{
var r = color.red..color.blue;
var r2 = r: range(int);
writeln(r2);
}
| Chapel | 2 | jhh67/chapel | test/types/range/enum/castEnumRange.chpl | [
"ECL-2.0",
"Apache-2.0"
] |
open tactic
set_option pp.binder_types true
set_option pp.implicit true
set_option pp.notation false
example (a : nat) : true :=
by do
mk_const `has_add.add >>= head_eta_expand >>= trace,
mk_const `nat.succ >>= head_eta_expand >>= trace,
to_expr ```(has_add.add a) >>= head_eta_expand >>= trace,
to_expr ``(λ x : nat, has_add.add x) >>= head_eta_expand >>= trace,
to_expr ``(λ x : nat, has_add.add x) >>= head_eta >>= trace,
to_expr ```(has_add.add a) >>= head_eta_expand >>= head_eta >>= trace,
constructor
| Lean | 3 | JLimperg/lean | tests/lean/eta_tac.lean | [
"Apache-2.0"
] |
BoutputJ | PureBasic | 0 | pchandrasekaran1595/onnx | onnx/backend/test/data/node/test_optional_has_element/test_data_set_0/output_0.pb | [
"Apache-2.0"
] |