This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ClearAll[getPatternSymbols, getDeclaredSymbols]; | |
SetAttributes[{getPatternSymbols, getDeclaredSymbols}, HoldAll]; | |
getPatternSymbols[expr_] := | |
Cases[Unevaluated[expr], | |
Verbatim[Pattern][ss_, _] :> HoldComplete[ss], {0, Infinity}, | |
Heads -> True]; | |
getDeclaredSymbols[{decs___}] := | |
Thread@Replace[HoldComplete[{decs}], | |
HoldPattern[a_ = rhs_] :> a, {2}]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BeginPackage["LazyTuples`"] | |
LazyTuples::usage = "LazyTuples[lists, opts] create a LazyList of the specified chunk size (\"ChunkSize\" option), containing tuples of the original lists"; | |
TuplesFunction::usage = | |
"TuplesFunction[lists][parts: _Integer | {__Integer} | _Span] generates a tuple or a set of tuples \ | |
found at specific positions indicated, in the full list of tuples, as given by Tuples"; | |
Begin["`Private`"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ClearAll[LazyListSelect]; | |
LazyListSelect[l:Streaming`LazyList`$PLazyList, crit_, fullSelect_:None]:= | |
Module[{selFun, chunkSizeF, mappedF, result, id = Streaming`Common`StreamingUUID[]}, | |
selFun = If[fullSelect =!= None && crit === None, | |
fullSelect, | |
Function[chunkData, Select[chunkData, crit]] | |
]; | |
chunkSizeF = | |
Function[index, | |
With[{chunk = Streaming`Components`RandomAccessList`ListPart[Streaming`LazyList`LazyListData[result], index]}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Copyright (c) 2012 Leonid Shifrin | |
This project is licensed under the MIT license, | |
http://opensource.org/licenses/MIT | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BeginPackage["Unflatten`"] | |
Unflatten::usage = "Unflatten[h[elems], posints, heads] creates a nested structure by wrapping | |
the elements in positions intervals posints in heads heads"; | |
UnflattenNested::usage = "UnflattenNested[expr, {startposlist, endposlist}, head] wraps elements | |
of expr at positions starting at startposlist_i and ending at endposlist_i in head head"; | |
Begin["`Private`"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BeginPackage["LazyTuples`"] | |
LazyTuples::usage = "LazyTuples[lists, opts] create a LazyList of the specified chunk size (\"ChunkSize\" option), containing tuples of the original lists"; | |
Begin["`Private`"] | |
Needs["Streaming`"]; | |
ClearAll[next]; | |
next[{left_, _}, dim_] := |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RegistrationForm(forms.Form): | |
username = forms.CharField( | |
label='Имя пользователя', | |
max_length=30, | |
widget=forms.TextInput(attrs={'class':'uname-reg'})) | |
email = forms.EmailField( | |
label='Email', | |
widget=forms.EmailInput( attrs={'class' : 'email-reg'}) | |
) | |
password1 = forms.CharField( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Mathematica Package *) | |
BeginPackage["GithubGistClient`"] | |
(* Exported symbols added here with SymbolName::usage *) | |
(* TODO: | |
1. Make this OO | |
2. Get rid of curl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* ::Package:: *) | |
BeginPackage["SimpleJavaReloader`", {"JLink`"}]; | |
JCompileLoad::usage = | |
"JCompileLoad[javacode_,addToClassPath_] attempts to compile a Java \ | |
class defined by a string javacode, optionally adding to Java compiler classpath \ | |
files and folders from addToClassPath, and load the resulting class into \ | |
Mathematica"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$sqlKeywords = { | |
"ABSOLUTE","ACTION","ADD","AFTER","ALL","ALLOCATE","ALTER","AND","ANY","ARE","ARRAY","AS", | |
"ASC","ASENSITIVE","ASSERTION","ASYMMETRIC","AT","ATOMIC","AUTHORIZATION","AVG","BEFORE", | |
"BEGIN","BETWEEN","BIGINT","BINARY","BIT","BIT_LENGTH","BLOB","BOOLEAN","BOTH","BREADTH", | |
"BY","CALL","CALLED","CASCADE","CASCADED","CASE","CAST","CATALOG","CHAR","CHARACTER", | |
"CHARACTER_LENGTH","CHAR_LENGTH","CHECK","CLOB","CLOSE","COALESCE","COLLATE","COLLATION", | |
"COLUMN","COMMIT","CONDITION","CONNECT","CONNECTION","CONSTRAINT","CONSTRAINTS","CONSTRUCTOR", | |
"CONTAINS","CONTINUE","CONVERT","CORRESPONDING","COUNT","CREATE","CROSS","CUBE","CURRENT", | |
"CURRENT_DATE","CURRENT_DEFAULT_TRANSFORM_GROUP","CURRENT_PATH","CURRENT_ROLE","CURRENT_TIME", | |
"CURRENT_TIMESTAMP","CURRENT_TRANSFORM_GROUP_FOR_TYPE","CURRENT_USER","CURSOR","CYCLE","DATA", |
NewerOlder