From http://finalcutbasix.com/2013/05/23/delete-fcpx-preferences/:
HOW TO DELETE FCPX PREFERENCES
• May 23rd, 2013 • Connor Crosby
TUTORIAL DETAILS
• Difficulty: Easy • Minimum Requirements: Final Cut Pro 10.0.0 Does Final Cut Pro X keep crashing or are you getting weird bugs you haven’t run into before? Deleting the preferences may help fix it. USING FINDER To delete the FCPX preferences using Finder, go to User > Library > Preferences > com.apple.FinalCut.plist and delete that file. Also go to User > Library > Preferences > com.apple.FinalCut.LSShardFileList.plist and delete that too.
USING PREFERENCE MANAGER
If you aren’t in the mood to fish through Finder, you can also use a free program called Preference Manager by Digital Rebellion.
Open Preference Manager and select Final Cut Pro X.
Now press the “Trash” button. This will delete those files above for you. Preference Manager also enables you to back up your preferences in case you ever need to delete them. Using either Finder or Preference Manager will hopefully take care of the issue and you can get back to editing.


The Akan population of Ghana frequently name their children after the day of the week they were born and the order in which they were born.
These names are derived from the Ghananian culture.
These is an application that will calculate the day of the week that someone was born depending on their date of birth and give them an akan name based on their gender.
GENDER
MaleBIRTH DETAILS


{% extends "base.html" %} {% block title %} CSV Form {% endblock %} {% block main %}
All shipments will originate from {{ from_address.street1 }}, {{ from_address.city }} {{from_address.state }} {{ from_address.zip }}
Please make sure that there are no commas in your files other than those used to separate fields.
Format: Company/Organization, Name, Address 1, Address 2, City, State, ZIP, Phone, Email
Format: Date, Shipment #, Company/Organization, Length, Width, Height, Weight, Dry Ice Weight, Custom Line 1


Notebooks
Story: Names of |han≠kass'o's relations
Names of |han≠kass'o's relations
Title
Names of |han≠kass'o's relations
Collection
Summary
The names of some Bushmen. (L VIII.-13. 7195 rev.). Names of some of |han≠kass'o's relations.
Comments
1) This story is largely untranslated, but it seems to be a list of names of people related to the narrator, 2) This story is found in Book VIII-13
Contributors
|han≠kass'o (Klein Jantje) (VIII)
Date
July 1878
Categories
Keywords
names (of |han≠kass'o's relations) , genealogy (|han≠kass'o's) , |han≠kass'o (his personal history) , |han≠kass'o (the names of his relations) , |han≠kass'o (his genealogy) , personal history (the names of some of |han≠kass'o's relations)
Story Pages
7195v


The account to create this resource under.
Name of the resource.
Short URL-friendly identifier (auto-generated from the name).


The STM codes are a suite of application codes and AVS modules is available to display both the geometric structure and electronic properties. Electronic and structural information is obtained from either Density Functional Theory (DFT) or Schrödinger Theory, using a variety of computational or experimental approaches.
Electron densities are obtained from Density Functional Theory (DFT) via the Kohn-Sham (KS) orbital-density equations:
Electron densities are obtained from wave function functional via the Schrödinger equation;
Some of the molecular electronic properties are
STM is designed to read GAUSSIAN cube output, GAUSSIAN chkpnt files (next release) and specialized GAMESS output files for electronic information. For more information on the visualization modules see the description of the AVS/Express STM modules.


--- layout: single title: "Iconic Tv Shows" date: 2019-10-31 tags: - Sentiment Analysis - R - Project - Web Scraping ---
Beginning with Howdy Doody and the Ed Sullivan Show to gripping dramas such as Game of Thrones and Breaking Bad, television shows have become an integral part of modern-day existence. What draws us to the couch for an hour or two a night. What makes theses television shows timeless and iconic? Quite simply, what are the ingredients for a successful tv program? To answer the purposed question, this analysis will use three techniques: one, web scrapping to acquire the data; two, descriptive statistics to understand what factors influence the popularity of movies; and three, sentiment analysis to understand people's emotional connections to the shows they watch.
The following paragraphs will be a quick overview of the results from the Iconic Tv Project. For a more detailed analysis and code examples please click on the link below.
The graph to the left reveals how gener affects a Tv show's rating while the graph to the right reveals which geners receive the most aculades.
The graph below shows how negative words tend to be associated with good Tv. These negative sentiments could reveal people's inclinations towards the dramatic.


Coverage report for
Generated at 30.11.2022 22:06:19 by DelphiCodeCoverage - an open source tool for Delphi Code Coverage.
Statistics for ..\..\Source\DECRandom.pas
| Number of lines covered | 91 | |
| Number of lines with code gen | 94 | |
| Line coverage | 96.8 % |
| 1 | {***************************************************************************** |
| 2 | The DEC team (see file NOTICE.txt) licenses this file |
| 3 | to you under the Apache License, Version 2.0 (the |
| 4 | "License"); you may not use this file except in compliance |
| 5 | with the License. A copy of this licence is found in the root directory |
| 6 | of this project in the file LICENCE.txt or alternatively at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, |
| 11 | software distributed under the License is distributed on an |
| 12 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 13 | KIND, either express or implied. See the License for the |
| 14 | specific language governing permissions and limitations |
| 15 | under the License. |
| 16 | *****************************************************************************} |
| 17 | |
| 18 | /// <summary> |
| 19 | /// Secure Pseudo Random Number Generator based on Yarrow. If used without |
| 20 | /// doing anything special for initialization a repeatable generator will be |
| 21 | /// initialized always using the same start value. |
| 22 | /// </summary> |
| 23 | unit DECRandom; |
| 24 | |
| 25 | interface |
| 26 | |
| 27 | {$INCLUDE DECOptions.inc} |
| 28 | |
| 29 | uses |
| 30 | {$IFDEF FPC} |
| 31 | SysUtils, |
| 32 | {$ELSE} |
| 33 | System.SysUtils, |
| 34 | {$ENDIF} |
| 35 | DECHashBase, DECHash; |
| 36 | |
| 37 | /// <summary> |
| 38 | /// Create a seed for the random number generator from system time and |
| 39 | /// PerformanceCounter. |
| 40 | /// </summary> |
| 41 | /// <remarks> |
| 42 | /// Avoid initializing the seed using this fuction if you can as it is not |
| 43 | /// really secure. Use RandomBuffer instead and provide user generated input |
| 44 | /// as Buffer value but ensure that this is not uniform e.g. not a buffer only |
| 45 | /// containing $00 all over or something like this. |
| 46 | /// </remarks> |
| 47 | /// <returns> |
| 48 | /// Created seed value |
| 49 | /// </returns> |
| 50 | function RandomSystemTime: Int64; |
| 51 | |
| 52 | /// <summary> |
| 53 | /// Fills the provided buffer with random values. If the DoRandomBuffer |
| 54 | /// variable is assigned (which is usually the case because DoBuffer is |
| 55 | /// assigned to it in initialization of this unit) the hash based algorithm |
| 56 | /// in DoBuffer will be used, otherwise the weaker one in DoRndBuffer. |
| 57 | /// </summary> |
| 58 | /// <param name="Buffer"> |
| 59 | /// Buffer to be filled with random values |
| 60 | /// </param> |
| 61 | /// <param name="Size"> |
| 62 | /// Size of the buffer in byte |
| 63 | /// </param> |
| 64 | procedure RandomBuffer(out Buffer; Size: Integer); |
| 65 | |
| 66 | /// <summary> |
| 67 | /// Creates a buffer of the specified size filled with random bytes |
| 68 | /// </summary> |
| 69 | /// <param name="Size"> |
| 70 | /// Size of the buffer to be created in bytes |
| 71 | /// </param> |
| 72 | /// <returns> |
| 73 | /// Buffer of the specified size in bytes filled with random data |
| 74 | /// </returns> |
| 75 | function RandomBytes(Size: Integer): TBytes; |
| 76 | /// <summary> |
| 77 | /// Creates a RawByteString of the specified length filled with random bytes. |
| 78 | /// </summary> |
| 79 | /// <remarks> |
| 80 | /// This function is deprecated. Better use RandomBytes where ever possible! |
| 81 | /// </remarks> |
| 82 | /// <param name="Size"> |
| 83 | /// Length of the string to be created in bytes |
| 84 | /// </param> |
| 85 | /// <returns> |
| 86 | /// String of the specified length in bytes filled with random data |
| 87 | /// </returns> |
| 88 | function RandomRawByteString(Size: Integer): RawByteString; deprecated 'please use RandomBytes now'; |
| 89 | /// <summary> |
| 90 | /// Creates a random UInt32 value |
| 91 | /// </summary> |
| 92 | /// <returns> |
| 93 | /// Random value |
| 94 | /// </returns> |
| 95 | function RandomLong: UInt32; |
| 96 | |
| 97 | /// <summary> |
| 98 | /// If the default value of the global DoRandomSeed variable is kept, this |
| 99 | /// procedure initializes a repeatable or a non repeatable seed, |
| 100 | /// depending on the parameters specified. Otherwise the alternative DoRandomSeed |
| 101 | /// implementation is called. The FRndSeed variable is initialized with the |
| 102 | /// seed value generated. |
| 103 | /// </summary> |
| 104 | /// <param name="Buffer"> |
| 105 | /// If a repeatable seed is to be initialized, the contents of this buffer is |
| 106 | /// a parameter to the seed generation and a buffer containing at least Size |
| 107 | /// bytes needs to be passed. |
| 108 | /// </param> |
| 109 | /// <param name="Size"> |
| 110 | /// If Size is > 0 a repeatable seed is initialized. If Size is 0 the |
| 111 | /// internal seed variable FRndSeed is initialized with 0. If Size is |
| 112 | /// less than 0 the internal FRndSeed variable is initialized with |
| 113 | /// a value derrived from current system time/performance counter using |
| 114 | /// RandomSystemTime. |
| 115 | /// </param> |
| 116 | procedure RandomSeed(const Buffer; Size: Integer); overload; |
| 117 | /// <summary> |
| 118 | /// Creates a seed (starting) value for the random number generator. If the |
| 119 | /// default value of the global DoRandomSeed variable is kept, a non repeatable |
| 120 | /// seed based on RandomSystemTime (based on system time and potentially |
| 121 | /// QueryPerformanceCounter) is created and assigned to the internal FRndSeed |
| 122 | /// variable. |
| 123 | /// </summary> |
| 124 | procedure RandomSeed; overload; |
| 125 | |
| 126 | type |
| 127 | /// <summary> |
| 128 | /// Type for the random buffer generation |
| 129 | /// </summary> |
| 130 | /// <param name="Buffer"> |
| 131 | /// Buffer in which the random bytes shall be written. The buffer needs to |
| 132 | /// exist and must be of at least Size bytes length. |
| 133 | /// </param> |
| 134 | /// <param name="Size"> |
| 135 | /// Length of the buffer to be filled in Byte. |
| 136 | /// </param> |
| 137 | TRandomBufferProc = procedure(out Buffer; Size: Integer) register; |
| 138 | |
| 139 | /// <summary> |
| 140 | /// Type for an initialization procedure for a seed |
| 141 | /// </summary> |
| 142 | /// <param name="Buffer"> |
| 143 | /// Buffer from which the random bytes shall be taken. The buffer needs to |
| 144 | /// exist and must be of at least Size bytes length. |
| 145 | /// </param> |
| 146 | /// <param name="Size"> |
| 147 | /// Length of the buffer in Byte. |
| 148 | /// </param> |
| 149 | TRandomSeedProc = procedure(const Buffer; Size: Integer); register; |
| 150 | |
| 151 | var |
| 152 | // secure PRNG initialized by this unit |
| 153 | |
| 154 | /// <summary> |
| 155 | /// This variable allows overriding the random number generation procedure |
| 156 | /// used for data buffers. By default it is initialized to point to DoBuffer, |
| 157 | /// which is a DECRandom internal procedure. |
| 158 | /// </summary> |
| 159 | /// <param name="Buffer"> |
| 160 | /// Buffer in which the random bytes shall be written. The buffer needs to |
| 161 | /// exist and must be of at least Size bytes length. |
| 162 | /// </param> |
| 163 | /// <param name="Size"> |
| 164 | /// Length of the buffer to be filled in Byte. |
| 165 | /// </param> |
| 166 | DoRandomBuffer: TRandomBufferProc = nil; |
| 167 | |
| 168 | /// <summary> |
| 169 | /// This variable allows overriding the seed value generation procedure. |
| 170 | /// By default it is initialized with the DECRandom internal procedure DoSeed. |
| 171 | /// </summary> |
| 172 | DoRandomSeed: TRandomSeedProc = nil; |
| 173 | /// <summary> |
| 174 | /// Defines the hash-algorithm used for generatin seed values or hashed buffers |
| 175 | /// </summary> |
| 176 | RandomClass: TDECHashClass = THash_SHA256; |
| 177 | |
| 178 | implementation |
| 179 | |
| 180 | uses |
| 181 | {$IFDEF DELPHI_2010_UP} |
| 182 | System.Diagnostics |
| 183 | {$ELSE} |
| 184 | {$IFDEF FPC} |
| 185 | {$IFDEF MSWINDOWS} |
| 186 | Windows |
| 187 | {$ELSE} |
| 188 | LclIntf |
| 189 | {$ENDIF} |
| 190 | {$ELSE} |
| 191 | Winapi.Windows |
| 192 | {$ENDIF} |
| 193 | {$ENDIF} |
| 194 | ; |
| 195 | |
| 196 | {$IFOPT Q+}{$DEFINE RESTORE_OVERFLOWCHECKS}{$Q-}{$ENDIF} |
| 197 | {$IFOPT R+}{$DEFINE RESTORE_RANGECHECKS}{$R-}{$ENDIF} |
| 198 | |
| 199 | var |
| 200 | /// <summary> |
| 201 | /// A sequence of values which over time will be random by replacing each |
| 202 | /// value with a derived value generated by applying the hash algorithm. |
| 203 | /// </summary> |
| 204 | FRegister: array[0..127] of Byte; |
| 205 | /// <summary> |
| 206 | /// The hash used to generate derived values stored in FRegister is calculated |
| 207 | /// using this counter as input and this counter additionaly defines the index |
| 208 | /// in FRegister where the value will be stored. The counter can assume higher |
| 209 | /// values than the lngth of FRegister. The index calculation takes this into |
| 210 | /// account. |
| 211 | /// </summary> |
| 212 | FCounter: Cardinal; |
| 213 | /// <summary> |
| 214 | /// Object instance for the hash generation algorithm used. The object is |
| 215 | /// created the first time it is needed and freed in finalization of this unit. |
| 216 | /// </summary> |
| 217 | FHash: TDECHash = nil; |
| 218 | |
| 219 | /// <summary> |
| 220 | /// Seed value, stores the last generated random number as start value for |
| 221 | /// the next randum number generation |
| 222 | /// </summary> |
| 223 | FRndSeed: Cardinal = 0; |
| 224 | |
| 225 | function RandomSystemTime: Int64; |
| 226 | type |
| 227 | TInt64Rec = packed record |
| 228 | Lo, Hi: UInt32; |
| 229 | end; |
| 230 | var |
| 231 | {$IF defined(MSWINDOWS) and not defined(DELPHI_2010_UP)} |
| 232 | SysTime: TSystemTime; |
| 233 | {$ELSE} |
| 234 | Hour, Minute, Second, Milliseconds: Word; |
| 235 | {$IFEND} |
| 236 | Counter: TInt64Rec; |
| 237 | Time: Cardinal; |
| 238 | begin |
| 239 | {$IF defined(MSWINDOWS) and not defined(DELPHI_2010_UP)} |
| 240 | GetSystemTime(SysTime); |
| 241 | Time := ((Cardinal(SysTime.wHour) * 60 + SysTime.wMinute) * 60 + SysTime.wSecond) * 1000 + SysTime.wMilliseconds; |
| 242 | QueryPerformanceCounter(Int64(Counter)); |
| 243 | {$ELSE} |
| 244 | DecodeTime(Now, Hour, Minute, Second, Milliseconds); |
| 245 | Time := ((Cardinal(Hour) * 60 + Minute) * 60 + Second) * 1000 + Milliseconds; |
| 246 | {$IFDEF DELPHI_2010_UP} |
| 247 | Int64(Counter) := TStopWatch.GetTimeStamp; // uses System.Diagnostics |
| 248 | {$ELSE} |
| 249 | {$IFDEF FPC} |
| 250 | Int64(Counter) := LclIntf.GetTickCount * 10000 {TicksPerMillisecond}; // uses LclIntf |
| 251 | {$ENDIF} |
| 252 | {$ENDIF} |
| 253 | {$IFEND} |
| 254 | |
| 255 | Result := Time + Counter.Hi; |
| 256 | Inc(Result, Ord(Result < Time)); // add "carry flag" |
| 257 | Inc(Result, Counter.Lo); |
| 258 | end; |
| 259 | |
| 260 | /// <summary> |
| 261 | /// Simplistic algorithm for filling a buffer with random numbers. This |
| 262 | /// algorithm is directly dependant on the seed passed, which by internal use |
| 263 | /// will normally be FRndSeed. |
| 264 | /// </summary> |
| 265 | /// <param name="Seed"> |
| 266 | /// Seed value as starting value |
| 267 | /// </param> |
| 268 | /// <param name="Buffer"> |
| 269 | /// Buffer which shall be filled with random bytes |
| 270 | /// </param> |
| 271 | /// <param name="Size"> |
| 272 | /// Size of the buffer in byte |
| 273 | /// </param> |
| 274 | /// <returns> |
| 275 | /// New seed value after calculating the random number for the last byte in |
| 276 | /// the buffer. |
| 277 | /// </returns> |
| 278 | function DoRndBuffer(Seed: Cardinal; out Buffer; Size: Integer): Cardinal; |
| 279 | // comparable to Delphi Random() function |
| 280 | var |
| 281 | P: PByte; |
| 282 | begin |
| 283 | Result := Seed; |
| 284 | P := @Buffer; |
| 285 | if P <> nil then |
| 286 | begin |
| 287 | while Size > 0 do |
| 288 | begin |
| 289 | Result := Result * $08088405 + 1; |
| 290 | P^ := Byte(Result shr 24); |
| 291 | Inc(P); |
| 292 | Dec(Size); |
| 293 | end; |
| 294 | end; |
| 295 | end; |
| 296 | |
| 297 | procedure RandomBuffer(out Buffer; Size: Integer); |
| 298 | begin |
| 299 | if Assigned(DoRandomBuffer) then |
| 300 | DoRandomBuffer(Buffer, Size) |
| 301 | else |
| 302 | FRndSeed := DoRndBuffer(FRndSeed, Buffer, Size); |
| 303 | end; |
| 304 | |
| 305 | function RandomBytes(Size: Integer): TBytes; |
| 306 | begin |
| 307 | SetLength(Result, Size); |
| 308 | RandomBuffer(Result[0], Size); |
| 309 | end; |
| 310 | |
| 311 | function RandomRawByteString(Size: Integer): RawByteString; |
| 312 | begin |
| 313 | SetLength(Result, Size); |
| 314 | {$IF CompilerVersion >= 24.0} |
| 315 | RandomBuffer(Result[Low(Result)], Size); |
| 316 | {$ELSE} |
| 317 | RandomBuffer(Result[1], Size); |
| 318 | {$IFEND} |
| 319 | end; |
| 320 | |
| 321 | function RandomLong: UInt32; |
| 322 | begin |
| 323 | RandomBuffer(Result, SizeOf(Result)); |
| 324 | end; |
| 325 | |
| 326 | procedure RandomSeed(const Buffer; Size: Integer); |
| 327 | begin |
| 328 | if Assigned(DoRandomSeed) then |
| 329 | DoRandomSeed(Buffer, Size) |
| 330 | else |
| 331 | begin |
| 332 | if Size >= 0 then |
| 333 | begin |
| 334 | FRndSeed := 0; |
| 335 | while Size > 0 do |
| 336 | begin |
| 337 | Dec(Size); |
| 338 | FRndSeed := (FRndSeed shl 8 + FRndSeed shr 24) xor TByteArray(Buffer)[Size] |
| 339 | end; |
| 340 | end |
| 341 | else |
| 342 | FRndSeed := RandomSystemTime; |
| 343 | end; |
| 344 | end; |
| 345 | |
| 346 | procedure RandomSeed; |
| 347 | begin |
| 348 | RandomSeed('', -1); |
| 349 | end; |
| 350 | |
| 351 | /// <summary> |
| 352 | /// Generate one random byte and modify FCounter and FRegister |
| 353 | /// </summary> |
| 354 | function DoGenerateRandomByte: Byte; |
| 355 | begin |
| 356 | if FHash = nil then |
| 357 | FHash := RandomClass.Create; |
| 358 | |
| 359 | FHash.Init; |
| 360 | FHash.Calc(FCounter, SizeOf(FCounter)); |
| 361 | FHash.Calc(FRegister, SizeOf(FRegister)); |
| 362 | FHash.Done; |
| 363 | |
| 364 | FRegister[FCounter mod SizeOf(FRegister)] := FRegister[FCounter mod SizeOf(FRegister)] xor FHash.DigestAsBytes[0]; |
| 365 | Inc(FCounter); |
| 366 | |
| 367 | Result := FHash.DigestAsBytes[1]; // no real predictable dependency to above FHash.Digest[0] ! |
| 368 | end; |
| 369 | |
| 370 | procedure DoBuffer(out Buffer; Size: Integer); |
| 371 | var |
| 372 | i: Integer; |
| 373 | begin |
| 374 | for i := 0 to Size - 1 do |
| 375 | TByteArray(Buffer)[i] := DoGenerateRandomByte; |
| 376 | end; |
| 377 | |
| 378 | /// <summary> |
| 379 | /// Initializes a repeatable or a non repeatable seed, depending on the |
| 380 | /// parameters specified |
| 381 | /// </summary> |
| 382 | /// <param name="Buffer"> |
| 383 | /// If a repeatable seed is to be initialized, the contents of this buffer is |
| 384 | /// a parameter to the seed generation and a buffer containing at least Size |
| 385 | /// bytes needs to be passed. |
| 386 | /// </param> |
| 387 | /// <param name="Size"> |
| 388 | /// If Size is >= 0 a repeatable seed is initialized, otherwise a non repeatable |
| 389 | /// based on system time |
| 390 | /// </param> |
| 391 | procedure DoSeed(const Buffer; Size: Integer); |
| 392 | var |
| 393 | i: Integer; |
| 394 | t: Cardinal; |
| 395 | begin |
| 396 | if Size >= 0 then |
| 397 | begin |
| 398 | // initalize a repeatable Seed |
| 399 | FillChar(FRegister, SizeOf(FRegister), 0); |
| 400 | FCounter := 0; |
| 401 | for i := 0 to Size - 1 do |
| 402 | FRegister[i mod SizeOf(FRegister)] := FRegister[i mod SizeOf(FRegister)] xor TByteArray(Buffer)[i]; |
| 403 | end |
| 404 | else |
| 405 | begin |
| 406 | // ! ATTENTION ! |
| 407 | // Initalizes a non-repeatable Seed based on Timers, which is not secure |
| 408 | // and inpredictable. The user should call RandomSeed(Data, SizeOf(Data)) |
| 409 | // instead, where Date contains i.e. user generated (Human) input. |
| 410 | t := RandomSystemTime; |
| 411 | for i := Low(FRegister) to High(FRegister) do |
| 412 | begin |
| 413 | FRegister[i] := FRegister[i] xor Byte(t); |
| 414 | t := t shl 1 or t shr 31; |
| 415 | end; |
| 416 | end; |
| 417 | for i := Low(FRegister) to High(FRegister) do |
| 418 | DoGenerateRandomByte; |
| 419 | FCounter := 0; |
| 420 | end; |
| 421 | |
| 422 | procedure DoInit; |
| 423 | begin |
| 424 | DoRandomBuffer := DoBuffer; |
| 425 | DoRandomSeed := DoSeed; |
| 426 | DoSeed('', 0); |
| 427 | end; |
| 428 | |
| 429 | procedure DoDone; |
| 430 | begin |
| 431 | try |
| 432 | if FHash <> nil then |
| 433 | FHash.Free; |
| 434 | except |
| 435 | end; |
| 436 | FHash := nil; |
| 437 | |
| 438 | FreeAndNil(FHash); |
| 439 | FillChar(FRegister, SizeOf(FRegister), 0); |
| 440 | FCounter := 0; |
| 441 | end; |
| 442 | |
| 443 | {$IFDEF RESTORE_RANGECHECKS}{$R+}{$ENDIF} |
| 444 | {$IFDEF RESTORE_OVERFLOWCHECKS}{$Q+}{$ENDIF} |
| 445 | |
| 446 | initialization |
| 447 | {$DEFINE AUTO_PRNG} |
| 448 | |
| 449 | DoInit; |
| 450 | |
| 451 | {$IFDEF AUTO_PRNG} // see DECOptions.inc |
| 452 | RandomSeed; |
| 453 | {$ENDIF AUTO_PRNG} |
| 454 | |
| 455 | finalization |
| 456 | DoDone; |
| 457 | |
| 458 | end. |


THE LAST SEDUCTION A film review by James Berardinelli Copyright 1994 James Berardinelli
Rating (0 to 10): 7.4
Date Released: varies Running Length: 1:50 Rated: R (Sex, language, nudity, violence, mature themes)
Starring: Linda Fiorentino, Peter Berg, Bill Pullman, Bill Nunn, J. T. Walsh Director: John Dahl Producer: Jonathan Shestack Screenplay: Steve Barancik Cinematography: Jeffrey Jur Music: Joseph Vitarelli Released by October Films
"[THE LAST SEDUCTION] is a roller coaster of twists and turns. It is the classic film noir thriller, but it turns everything on its head. Just when you think you know what's going to happen, it does a twist into the unexpected. I'm a fan of the [noir] genre. I like atmosphere and I'm fascinated by the psychology of the characters--the deceit, the betrayal and the desperation." - John Dahl, director of THE LAST SEDUCTION
Linda Fiorentino's Bridget Gregory does things to men that most of us wouldn't consider for what we scrape off the sidewalk. Using the word "bad" to describe her is as mammoth an understatement as calling the Sistine Chapel "nice" or the Grand Canyon "big." It has been decades since someone the likes of Bridget has graced the screen (Barbara Stanwyck in DOUBLE INDEMNITY comes to mind, although her language was never this colorful), and who knows how long it will be until our next opportunity?
Director John Dahl has fun with this material, filming the modern- day noir potboiler with such gusto that it's impossible not to fall under its spell, nor under the influence of its sultry, completely conscienceless leading lady. Dahl, the man behind the twisty RED ROCK WEST, saturates this picture with atmosphere. Every time Bridget takes another pull on her cigarette, we're reminded of a time when 98% of new releases where in black-and-white.
Sap #1 is Bridget's husband, Clay (Bill Pullman). At her prompting, he gets involved in a drug deal that nets him $700,000. He thinks that he and his wife are going to use this to feather their nest egg, but Bridget has other plans--why split what she can have all to herself? No sooner has Bill gone into the shower than she grabs the money and runs, heading for the small upstate New York town of Beston, where people always say "hello," "please," and "thank you," and no one locks their doors at night.
Sap #2 is Mike Swale (Peter Berg), a Beston native who thinks the town is too small for him--until Bridget arrives. To her, he's a means to an end, something to use up and throw away. To him, she's the love of his life, and he means to make her love him in return, regardless of the cost. Big mistake.
THE LAST SEDUCTION's dialogue, scripted by Steve Barancik and spoken by the likes of Fiorentino, Pullman, Berg, and J. T. Walsh, is scintillating, often hilarious, and occasionally insightful. The best lines are about Bridget--"Anyone check you for a heartbeat lately?" and "I love you ...
THE LAST SEDUCTION is an entertaining motion picture to immerse oneself in--significant chunks of the plot fall apart on close examination, but it holds up well enough during the watching, and nothing can dispel the power of Fiorentino's performance. It's great to see a woman getting this sort of plum role, and it proves that you don't have to go way over-the-top like Lena Olin in ROMEO IS BLEEDING to ooze nastiness--or, in Bridget's case, to spew it.
- James Berardinelli<EMAIL_ADDRESS>.
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


STEFANIE TAM
INFORMATION
06.2017; 11"x17"2017-2018 calendar design for UCLA's Design Media Arts graduate students.
UCLA ARTS: DESIGN | MEDIA ARTS GRAD CALENDAR< >


A Teaspoon Of Sugar - Site Map
A Teaspoon of Sugar
Home
About
Our Story
Contact Us
FAQ
Afternoon Tea
Spring Tea Menu
Reservations
Products
Teas
Pastry
Cakes
Gift Cards
Gallery
Gallery
Site Map created using:
SlickMap CSS.


Primark is selling LOL flashing trainers for £12
Price should make shoppers smile - and maybe even laugh out loud
by Paul HironsParents are going wild for LOL's flashing trainers, now sold in Primark stores.
With mums and dads clamouring for Christmas present ideas, the LOL trainers - based on the popular doll brand - have hit shops and cost only £12 per pair.
An eagle-eyed member of the Extreme Couponing And Bargaining UK Facebook group first spotted them.
She uploaded a snap of the pink trainers with flashing lights to Facebook and commented: "LOL fans only £12 in Primark. Flashing trainers."
Read more: Dunelm is selling a hot water bottle that wraps around your neck for £7
It wasn't long before the post got over 2,000 comments, with parents eager to snap up with bargain for their own kids for Christmas.
"Selling fast in Blackpool I work in Primark," said one group member.
Another said: "OMG we need to go have a look!"
Read more: Glow in the dark Christmas bedding is available to buy for less than £13
"They are definitely going on the Christmas list for the girls," a third wrote.
Amazon also sells a pair of flashing LOL trainers - but for over £30, making Primark's bargain price stand out.
Primark also has good news for Disney-loving customers on the hunt for Christmas presents: it's selling not only furry Mickey Mouse rugs, but also matching Mickey bedding.
The company also featured the products on its Instagram feed, captioning the image: "Just what your clubhouse has been calling out for."
Head to our Facebook page @EntertainmentDailyFix and let us know what you think of our story.


{{producers?.name}}
{{producers?.emailId}}
{{producers?.age}}
{{producers?.gender}}
{{producers?.mobileNo}}


{% extends 'multiplicity/base.html' %} {% load static %} {% block title %}{{ info.name }} | {{ info.country }}{% endblock %} {% block container %}stretch-bg-head{% endblock %} {% block content %} {% if tips %}
Infrastructure
Upload now
Material flow
Material stock
Journal article
Thesis
Academic publication
Report
Video
Photo
Podcast
Presentation
Sector info
Organization
Population
Profile
Legislation
Summary
System Boundaries
Micro-territorial units
Maps


Lists display data in a consistent, flexible way.
Specifies a set of filters to apply to list data. These filters create a filter summary when the list includes the sky-list-filter-summary component. This property accepts an array ListFilterModel properties.
Specifies the data to display. The list component requires this property or the dataProvider property. For checklist or multiselect grids, each row requires an id property to manage selected items with the selectedIds input property and the selectedIdsChange event. If you do not provide an id, the list automatically generates one. This property accepts Observable Array or Array values. (To update data in your view outside of a dataProvider, you must use an observable instead of a static array.)
Specifies a data provider to obtain the data to display. The list component requires this property or the data property. Acceptable values: extends ListDataProvider. To extend ListDataProvider, provide a get function that accepts a ListDataRequestModel as an argument and returns an Observable ListDataResponseModel, and a count function that returns an Observable number that indicates how many total records are in the list. For lists that use dataProvider instead of data, consumers are responsible for managing all ListDataRequestModel properties. For examples of custom searching, filters, and paging, see the demo code.
Specifies the total number of items for the initial data set when initialized. When used in conjunction with data and dataProvider, it allows an initial data to be set with the need to call the dataProvider.
Specifies a function to apply as a global sort on the list. Acceptable value: (searchText: string) => Observable Array or Promise Array.
Specifies a set of IDs for the items to select in a checklist or multiselect grid. The IDs match the id properties of the data objects. Items with IDs that are not included are de-selected in the checklist or multiselect grid. This property accepts an observable array of strings or array of strings.
Specifies a set of fields to sort by. If array of fields then sorted by order of array. Acceptable values: ListFieldSelectorModel, Observable ListFieldSelectorModel, Array of ListFieldSelectorModel, or Observable Array of ListFieldSelectorModel. Where ListFieldSelectorModel is an object with the fieldSelector property (a string that specifies the property of the data that is actively being sorted upon) and the descending property (a boolean that indicates the active sort is descending).
The list emits this event with a Array of ListFilterModel with the new filters applied to the list.
When using a list view that supports item selection, the list emits this event with a Map string, boolean object that indicates which data entries are selected.
Specifies a function to determine whether items are filtered. This property is required when using an in-memory data provider. This property accepts an array of ListFilterModel objects.
Indicates whether to disable the search bar and filter button. This property accepts boolean values.
Specifies the current page number. This property accepts number values.
Specifies the number of items to display per page. This property accepts number values.
Specifies a function to dynamically manage the data source when users change the text in the list field. The search function must return an array or a promise of an array. The search property is particularly useful when the data source does not live in the source code. This property accepts a ListSearchModel value.
Specifies a set of fields to sort by. This property accepts ListSortModel value.
Specifies the default value of the filter. When users do not set the default value, the filter does not affect the list. This property accepts any values.
Indicates whether users can dismiss the filter's summary item. This property accepts boolean values.
Specifies a function to determine whether items are filtered. This property is required when using an in-memory data provider. This property accepts a function of type (item: ListItemModel, filter: any) => boolean.
Specifies a label for the filter's summary item. The label defaults to the value of the filter. This property accepts string values.
Specifies the name of the filter. This property accepts string values.
Specifies the current value of the filter. This property accepts any values.
Specifies the columns to search. The columns correspond to field values that you specify with the list component's data property. This property accepts an array of string values.
Specifies an array of functions that returns a boolean value of true when the search is successful. This property accepts a function of type (data: any, searchText: string) => boolean>.
Specifies the text to search. This property accepts string values.
These properties are a work in progress, and we do not recommend using them.
Indicates whether to sort in descending order. This property accepts boolean values.
Specifies the fields to sort. This property accepts string values.
These properties are a work in progress, and we do not recommend using them.
Specifies the label type. This property accepts string values.
Specifies the fields to sort. This property accepts string values.
Indicates whether to sort all fields. This property accepts boolean values.
Indicates whether to sort in descending order. This property accepts boolean values.
Specifies the text for the label. This property accepts string values.
Specifies the list of available views to sort. This property accepts an array of ListSortLabelModel objects.
Specifies the fields to sort. This property accepts an array of ListSortFieldSelectorModel objects.
Specifies whether the sort applies to all list views. This property accepts an array of ListSortLabelModel objects.
List with grid
List with custom data provider


Preparation time
less than 30 mins
Cooking time
10 to 30 mins
Serves
Serves 4
Crisp filo pastry cases filled with mackerel in an oyster mayonnaise. Try them as a sophisticated starter or canapé.
Equipment and preparation: for this recipe you will need baking beans, four 5x3cm/2x1½in tartlet moulds (or a bun tin) and a pastry brush.
For the pastry cases, preheat the oven to 180C/350F/Gas 4.
Lay one sheet of filo on a clean work surface and brush with melted clarified butter. Lay another sheet of filo on top (ensuring there are no creases) and brush with more clarified butter. Repeat until you have four layers of filo pastry.
Cut out circles using a 10cm/4in pastry cutter. Gently press the circles into the tartlet moulds (or bun tin). Add a layer of heat proof cling film or parchment paper over the pastry and fill with baking beans. Cook for 15 minutes, or until light golden-brown, to blind bake.
For the filling, in a food processor combine the oysters, egg yolk, Dijon mustard, salt, pepper, a squeeze of lime juice and vegetable oil. Blend to the consistency of mayonnaise (if needed, add some juice from the oysters to loosen the mixture). Transfer to the fridge to chill until ready to use.
Dice the mackerel fillets and put in a bowl. Add the chopped shallots, capers, ginger, soy sauce, a squeeze of lime juice and 1-2 tablespoons of the oyster mayonnaise. Add the chopped chives and season with salt and freshly ground black pepper.
For the pickled cucumber, in a pan bring the vinegar, sugar, chilli and ginger to a boil. Use a vegetable peeler to slice the cucumber into 7cm/3in long strips. Cool the vinegar mixture, then add to the cucumber.
To serve, fill the tartlets with the oyster mayonnaise and top with the pickled cucumber and some samphire if you like.


There are no messages for you at this moment.
{{ message.message }}
Sender: {{ message.sender.fullName }}
Date: 12 March, 2016
{{ camp.title }}


Origin is requesting information:
Connected agent:
In order to share a credential with the requesting party:
Veramo Agent URL: API KEY:


Il tool Konvid-19 è stato realizzato sulla base delle indicazioni fornite dalle seguenti pubblicazioni:
Transmission of SARS-CoV-2: implications for infection prevention precautions
Physical distancing, face masks, and eye protection to prevent person-to-person transmission of SARS-CoV-2 and COVID-19: a systematic review and meta-analysis
Temporal dynamics in viral shedding and transmissibility of COVID-19
SARS-CoV-2 detection, viral load and infectivity over the course of an infection
Modeling the role of respiratory droplets in Covid-19 type pandemics
La montagna
Il riccio esponenziale


4 Things You Need to Know About the Future of Marketing
Article - May 2017
Inside Google Marketing: Testing a Media Plan That Leads With YouTube Bumper Ads
Interview - May 2017
The Consumer Behaviors Shaping the Next Generation of Mobile Experiences
Perspective - May 2017
The Rise of Online Video on the TV Screen
Infographic - May 2017
Travel Planning and Purchasing Has Evolved on Mobile
Article - May 2017
Gen Z: A Look Inside Its Mobile-First Mindset
Report - Apr 2017


{% extends "layout.html" %} {% block title %}Home{% endblock %} {% block content %}
Please select the library of your choice below, then choose which associated table you would like to see.
Or, use the query feature to perform custom searches.
Loading ...


| Because of a technical defect an American bomber team mistakenly orders the destruction of Moscow. The President of the United States has but little time to prevent an atomic catastrophe from occurring. Director Sidney Lumet gives an atmospheric vision of the future with a Cold War backdrop. | |
| Genres: | Drama, Thriller |
| Director: | Sidney Lumet |
| Writer: | Walter Bernstein, Eugene Burdick, Harvey Wheeler, Peter George |
Cast: | General Black - Dan O'Herlihy Groeteschele - Walter Matthau General Bogan - Frank Overton Colonel Grady - Edward Binns Colonel Cascio - Fritz Weaver The President - Henry Fonda Buck - Larry Hagman Secretary Swenson - William Hansen General Stark - Russell Hardie Knapp - Russell Collins Congressman Raskob - Sorrell Booke Ilsa Wolfe - Nancy Berg Thomas - John Connell Sullivan - Frank Simpson Betty Black - Hildy Parks Mrs. Grady - Janet Ward Sgt. Collins - Dom DeLuise Foster - Dana Elcar Mr. Cascio - Stewart Germain Mrs. Cascio - Louise Larabee Jennie - Frieda Altman Go-go Dancer - Geri Miller Jet Fighter Pilot - Charles Tyner |


Authors: Jaikiran Pai, Mike Musgrove Level: Intermediate Technologies: EJB Summary: Shows how to access an EJB from a remote Java client program using JNDI Target Product: EAP
This example shows how to access an EJB from a remote Java client application. It demonstrates the use of EJB 3.1 and JNDI in JBoss Enterprise Application Platform 6 or JBoss AS 7.
There are two components to this example:
A server side component:
The server component is comprised of a stateful EJB and a stateless EJB. It provides both an EJB JAR that is deployed to the server and a JAR file containing the remote business interfaces required by the remote client application.
A remote client application that accesses the server component.
The remote client application depends on the remote business interfaces from the server component. This application looks up the stateless and stateful beans via JNDI and invokes a number of methods on them.
Each component is defined in its own standalone Maven module. The quickstart provides a top level Maven module to simplify the packaging of the artifacts.
All you need to build this project is Java 6.0 (Java SDK 1.6) or better, Maven 3.0 or better.
The application this project produces is designed to be run on JBoss Enterprise Application Platform 6 or JBoss AS 7.
If you have not yet done so, you must Configure Maven before testing the quickstarts.
The following shows the command line to start the server with the web profile:
For Linux: JBOSS_HOME/bin/standalone.sh
For Windows: JBOSS_HOME\bin\standalone.bat
Since this quickstart builds two separate components, you can not use the standard Build and Deploy commands used by most of the other quickstarts. You must follow these steps to build, deploy, and run this quickstart.
Build and install the server side component:
Navigate to the server-side subdirectory:
cd server-side
Build the EJB and client interfaces JARs and install them in your local Maven repository.
For JBoss Enterprise Application Platform 6 (Maven user settings NOT configured):
mvn clean install -s PATH_TO_QUICKSTARTS/example-settings.xml
For JBoss AS 7 or JBoss Enterprise Application Platform 6 (Maven user settings configured):
mvn clean install
Deploy the EJB JAR to your server. This maven goal will deploy server-side/target/jboss-as-ejb-remote-app.jar
. You can check the JBoss server console to see information messages regarding the deployment.
mvn jboss-as:deploy
Build and run the client application
Navigate to the server-side subdirectory:
cd ../client
Compile the client code
For JBoss Enterprise Application Platform 6 (Maven user settings NOT configured):
mvn clean compile -s PATH_TO_QUICKSTARTS/example-settings.xml
For JBoss AS 7 or JBoss Enterprise Application Platform 6 (Maven user settings configured):
mvn clean compile
Execute the client application within Maven
mvn exec:exec
When the client application runs, it performs the following steps:
The output in the terminal window will look like the following:
Obtained a remote stateless calculator for invocation
Adding 204 and 340 via the remote stateless calculator deployed on the server
Remote calculator returned sum = 544
Subtracting 2332 from 3434 via the remote stateless calculator deployed on the server
Remote calculator returned difference = 1102
Obtained a remote stateful counter for invocation
Counter will now be incremented 5 times
Incrementing counter
Count after increment is 1
Incrementing counter
Count after increment is 2
Incrementing counter
Count after increment is 3
Incrementing counter
Count after increment is 4
Incrementing counter
Count after increment is 5
Counter will now be decremented 5 times
Decrementing counter
Count after decrement is 4
Decrementing counter
Count after decrement is 3
Decrementing counter
Count after decrement is 2
Decrementing counter
Count after decrement is 1
Decrementing counter
Count after decrement is 0
Logging statements have been removed from this output here to make it clearer.
The remote client application can also be built as a standalone executable JAR with all of its dependencies.
Open a command line and navigate to the ejb-remote/client quickstart directory
cd client
Type the following in the command line:
mvn clean assembly:assembly
You can then run the executable JAR using java -jar
:
java -jar target/jboss-as-quickstarts-ejb-remote-client-7.0.2-SNAPSHOT-jar-with-dependencies.jar
To undeploy the server side component from the JBoss server:
Navigate to the server-side subdirectory:
cd ../server-side
Type the following command:
mvn jboss-as:undeploy
You can also start the server and deploy the quickstarts from Eclipse using JBoss tools. For more information, see Use JBoss Developer Studio or Eclipse to Run the Quickstarts
If you want to debug the source code or look at the Javadocs of any library in the project, run either of the following commands to pull them into your local repository. The IDE should then detect them.
mvn dependency:sources
mvn dependency:resolve -Dclassifier=javadoc


Church of Ireland Archbishop Dr Richard Clarke to retire next February
by By Press AssociationArchbishop of Armagh Dr Richard Clarke will step down from the role on February 2, 2020.
The Church of Ireland Archbishop of Armagh has announced his intention to retire.
Dr Richard Clarke will step down from the role on February 2, 2020, he told an audience in Armagh on Saturday.
The 70-year-old, who is originally from Dublin, has served as archbishop since 2012.
Archbishop Clarke made the announcement during his presidential address to the Armagh Diocesan Synod in the Crozier Hall, at St Mark’s Parish Church, Armagh.
“When I became Archbishop of Armagh at the close of 2012, I made a quiet agreement with my family, a few close friends, and myself that I would try to work on as Primate for five years, assuming of course that ill-health or mortality itself did not intervene,” he said.
“Coming towards the end of that five-year period, I would then review the situation with my family and, if all seemed to be working out reasonably well and I felt that I was still ‘up for it’, I would continue on for a further two years, but would not go on beyond that point. This latter moment in time has now arrived.”
Archbishop Clarke will carry out his duties until February 2, 2020 after which the Church of Ireland House of Bishops will consider the selection of a successor.
READ MORE
Brother of one of last missing Disappeared in North renews appeal for information


Grave Robber Leader Kanemika:
Hey, look here...even if you think grave robbers are animals -- heh heh -- don't we still have a right to live?
Please! Please help save my poor followers!
"This is none of my business. You're on your own."
"I guess you're right. I'll help you."


Scott Doyle /<EMAIL_ADDRESS>Due date: Tuesday, Feb. 25
Goal: Choose a dataset and perform some preliminary, exploratory analysis of the data.
Use either public datasets or your own research data (with permission of your PI).
Things you should look for:
Datasets of unlabeled data (e.g. text corpora and raw images) should be avoided.
PDF versions of the previous lectures are up on UBLearns.
These lectures may not look as well-formatted as the website, but they should be understandable.
A link to the lecture page has been added to scottdoy.com.
Simple, Common Model Parametric Model
The normal or Gaussian density is a good model for a lot of phenomena, so we will discuss it in some length.
The normal distribution:
$ p(x) = \frac{1}{\sqrt{2\pi}\sigma}\exp{\left[-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^{2}\right]}$
This is a parameterized distribution.
What does that mean?
Parameters are places in a function where you can plug in different numbers and get different “versions” of the distribution.
The set of parameters $\boldsymbol{\theta}$ are all you need to replicate a parametric function.
The normal density is parameterized by the mean and standard deviation:
$ p(x) \sim N(\mu,\sigma^{2}) $
The mean, $\mu$, is defined as the expected value of $x$:
$ \mu \equiv \mathcal{E}\left[x\right]=\int_{-\infty}^{\infty}xp(x)dx $
The variance (standard deviation squared) is:
$\sigma^{2} \equiv \mathcal{E}\left[(x-\mu)^{2}\right] = \int_{-\infty}^{\infty} (x-\mu)^{2} p(x)dx$
Why is the normal in particular so useful? According to Wikipedia:
Of all probability distributions over the reals with a specified mean $\mu$ and variance $\sigma^{2}$, the normal distribution $N(\mu, \sigma^{2})$ is the one with maximum entropy.
Okay… so then what does maximum entropy mean?
Entropy is a measure of randomness in a sequence.
If our random variable $x$ can take on one of $m$ values, $\{v_{1},v_{2},\ldots,v_{m}\}$, and value $v_{i}$ has an associated probability $P_{i}$, then the measure of randomness is given as:
$ H = -\sum_{i=1}^{m}P_{i}\log_{2}P_{i} $
In this discrete case, entropy is measured in bits using the base 2 logarithm.
In the continuous case, entropy is measured in nats using the natural logarithm, and would be calculated using an integral instead of a sum.
Example: Let’s say $x\in\{0,1,\ldots,7\}$, and each value is equally likely.
There are eight digits, so the probability of any individual value appearing, $p_{i}$, is $\frac{1}{8}$.
In this case, the entropy is calculated as:
$ H=-\sum_{i=0}^{7}\frac{1}{8}\log_{2}\left[\frac{1}{8}\right] = \log_{2}\left[2^{3}\right] = 3 \textrm{ bits} $
Indeed, in base 2 (binary) we need a minimum of 3 bits to encode all possible values:
$ \underbrace{000}_{0} \quad \underbrace{001}_{1}\quad\underbrace{010}_{2}\quad\underbrace{011}_{3}\quad\underbrace{100}_{4}\quad\underbrace{101}_{5}\quad\underbrace{110}_{6}\quad\underbrace{111}_{7} $
If each of our values $\{v_{1},v_{2},\ldots,v_{m}\}$ is equally likely to appear, they are said to be drawn from a uniform distribution.
Since each observation holds no information about the next, the uniform distribution has the maximum entropy of all distributions with a given mean and variance.
There are a lot of mathy ways to say this, but the reason we want a probability distribution with maximum entropy is that it means we are making as few assumptions as possible about the data.
For example: If I know that the average nuclei radius is $10\mu m$, it’s reasonable to assume that an $8\mu m$ nucleus is just as likely as a $12\mu m$ one.
Recall the Central Limit Theorem:
If a random variable is observed a large number of times, and the variable has a known mean and standard deviation, the average of the observations will approximate a normal distribution.
In many cases, we can safely assume that feature values are drawn from a uniform distribution.
The Central Limit Theorem tells us that because of this, the probability distribution over a large number of samples can be modeled as a normal distribution.
So all of this means that $p(x|\omega_{j})$ takes the form:
$ p(x|\omega_{j}) = \frac{1}{\sqrt{2\pi}\sigma}\exp{\left[-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^{2}\right]}$
So far, we have been talking about a single variable or feature, $x$. But what if we have multiple features?
If we have a $d$-dimensional feature vector $\mathbf{x}=(x_{1},x_{2},\ldots,x_{d})^{T}$, and each component is statistically independent, then the probability of observing $\mathbf{x}$ is the product of the probabilities of observing each individual event:
$ p(\mathbf{x}) = \prod_{i=1}^{d}p(x_{i}) $
Since each component of $\mathbf{x}$ can be modeled as a normally-distributed random variable, then $p(\mathbf{x})$ is the product of $d$ Gaussians:
$ p(\mathbf{x}) = \prod_{i=1}^{d}\frac{1}{\sqrt{2\pi}\sigma_{i}}\exp{\left[-\frac{1}{2}\left(\frac{x_{i}-\mu_{i}}{\sigma_{i}}\right)^{2}\right]} $
We can simplify this by distributing the product inside:
$ p(\mathbf{x}) = \frac{1}{(2\pi)^{\frac{d}{2}} \prod_{i=1}^{d} \sigma_{i}} \exp{\left[-\frac{1}{2} \sum_{i=1}^{d} \left(\frac{x_{i}-\mu_{i}}{\sigma_{i}}\right)^{2} \right]}$
$ p(\mathbf{x}) = \frac{1}{(2\pi)^{\frac{d}{2}} \prod_{i=1}^{d} \sigma_{i}} \exp{\left[-\frac{1}{2} \sum_{i=1}^{d} \left(\frac{x_{i}-\mu_{i}}{\sigma_{i}}\right)^{2} \right]}$
We can simplify even further by replacing the red components with the covariance matrix $\boldsymbol{\Sigma}$ and mean vector $\boldsymbol{\mu}$.
Remember: for two random variables $x_{i}$ and $x_{j}$, we can calculate the covariance or “cross-moment” to measure statistical independence:
$ \sigma_{ij} = \mathcal{E}\left[(x_{i}-\mu_{i})(x_{j}-\mu_{j})\right] $
“Covariance” is a measure of how much two random variables change together. If the covariance is zero, i.e. $\sigma_{ij}=0$, then the two variables do not change together and they are uncorrelated.
When $i=j$, the “co”-variance is just the variance (how much the variable changes from the mean), which we’ve defined as:
$ \sigma_{ii} = \mathcal{E}\left[(x_{i}-\mu_{i})(x_{i}-\mu_{i})\right] = \mathcal{E}\left[(x_{i}-\mu_{i})^{2}\right] $
The covariance matrix $\boldsymbol{\Sigma}$ just collects each of the covariances. It is a square matrix whose $ij$-th element is $\sigma_{ij}$:
$ \boldsymbol{\Sigma} = \begin{bmatrix} \sigma_{11} & \sigma_{12} & \cdots & \sigma_{1d} \\ \sigma_{21} & \sigma_{22} & \cdots & \sigma_{2d} \\ \vdots & \vdots & \ddots & \vdots \\ \sigma_{d1} & \sigma_{d2} & \cdots & \sigma_{dd} \end{bmatrix}$
If we assume each dimension in $\mathbf{x}$ is uncorrelated, then $\sigma_{ij}=0$ for all $i\neq j$, so the matrix becomes a diagonal matrix:
$ \boldsymbol{\Sigma} = \begin{bmatrix} \sigma_{11} & 0 & \cdots & 0 \\ 0 & \sigma_{22} & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \sigma_{dd} \end{bmatrix} $
The inverse of a matrix $\mathbf{M}$ is one where $\mathbf{MM}^{-1} = \mathbf{I}$ (the identity matrix).
Hence, we can easily calculate $\boldsymbol{\Sigma}^{-1}$ as:
$ \boldsymbol{\Sigma}^{-1} = \begin{bmatrix} \frac{1}{\sigma_{11}} & 0 & \cdots & 0 \\ 0 & \frac{1}{\sigma_{22}} & \cdots & 0 \\ \vdots & \vdots & \ddots & \vdots \\ 0 & 0 & \cdots & \frac{1}{\sigma_{dd}} \end{bmatrix} $
Note: The inverse of a matrix is not usually just 1 divided by each element. It just works out because $\boldsymbol{\Sigma}$ is diagonal, in the case where all dimensions are uncorrelated.
Finally, the determinant of $\boldsymbol{\Sigma}$ is the product of the variances:
$ |\boldsymbol{\Sigma}| = \sigma_{11}\sigma_{22}\cdots\sigma_{dd} $
The rest of the terms disappear because they all contain zeroes.
Thus we can rewrite this:
$ p(\mathbf{x}) = \frac{1}{(2\pi)^{\frac{d}{2}} \prod_{i=1}^{d} \sigma_{i}} \exp{\left[-\frac{1}{2} \sum_{i=1}^{d} \left(\frac{x_{i}-\mu_{i}}{\sigma_{i}}\right)^{2} \right]} $
… like this:
$ p(\mathbf{x}) = \frac{1}{(2\pi)^{\frac{d}{2}} |\boldsymbol{\Sigma}|^{\frac{1}{2}}} \exp{\left[-\frac{1}{2} (\mathbf{x}-\boldsymbol{\mu})^{T} \boldsymbol{\Sigma}^{-1} (\mathbf{x}-\boldsymbol{\mu}) \right]} $
$ p(\mathbf{x}) = \frac{1}{(2\pi)^{\frac{d}{2}} |\boldsymbol{\Sigma}|^{\frac{1}{2}}} \exp{\left[-\frac{1}{2} (\mathbf{x}-\boldsymbol{\mu})^{T} \boldsymbol{\Sigma}^{-1} (\mathbf{x}-\boldsymbol{\mu}) \right]} $
This function combines multiple normally-distributed random variables (components of $\mathbf{x}$), each of which has its own mean and variance.
In terms of expected values, the mean and covariance can be written as:
$ \boldsymbol{\mu} \equiv \mathcal{E}\left[\mathbf{x}\right] = \int\mathbf{x}p(\mathbf{x})d\mathbf{x} $
$ \boldsymbol{\Sigma} \equiv \mathcal{E}\left[(\mathbf{x}-\boldsymbol{\mu})(\mathbf{x}-\boldsymbol{\mu})^{T}\right] = \int (\mathbf{x}-\boldsymbol{\mu})(\mathbf{x}-\boldsymbol{\mu})^{T}p(\mathbf{x})d\mathbf{x} $
$ p(\mathbf{x}) = \frac{1}{(2\pi)^{\frac{d}{2}} |\boldsymbol{\Sigma}|^{\frac{1}{2}}} \exp{\left[-\frac{1}{2} (\mathbf{x}-\boldsymbol{\mu})^{T} \boldsymbol{\Sigma}^{-1} (\mathbf{x}-\boldsymbol{\mu}) \right]} $
How many components does $\boldsymbol{\mu}$ have?
$d$, which is the same as $\mathbf{x}$
What are the values of these components?
$\mu_{i} = \mathcal{E}\left[x_{i}\right]$
What is the dimensionality of $\boldsymbol{\Sigma}$?
Linear transforms of normal distribuion are also normally distributed.
If $\mathbf{A}$ is a $d$-by-$k$ transformation matrix and $\mathbf{y}=\mathbf{A}^{T}\mathbf{x}$ is a $k$-component vector, then:
$ p(\mathbf{y}) \sim N(\mathbf{A}^{T} \boldsymbol{\mu},\mathbf{A}^{T} \boldsymbol{\Sigma}\mathbf{A}) $
This results in another normal distribution.
If $k=1$, then $\mathbf{A}$ is a unit-length vector $\mathbf{a}$, and so $y=\mathbf{a}^{T}\mathbf{x}$ is a scalar (dot product!) that represents the projection of $\mathbf{x}$ onto the line represented by $\mathbf{a}$.
Now $p(y)$ is a univariate normal distribution with a mean of $\mathbf{a}^{T}\boldsymbol{\mu}$ and a variance of a $\mathbf{a}^{T}\boldsymbol{\Sigma}\mathbf{a}$.
The “whitening” transform, $\mathbf{A}_{w}$ is a special projection that makes an arbitrary distribution $p(\mathbf{x})$ into a spherical one (i.e. its covariance matrix is the identiy matrix).
Define $\boldsymbol{\Phi}$ as the matrix whose columns are the eigenvectors of $\boldsymbol{\Sigma}$, and $\boldsymbol{\Lambda}$ is a diagonal matrix of corresponding eigenvalues.
$ \mathbf{A}_{w} = \boldsymbol{\Phi}\boldsymbol{\Lambda}^{\frac{1}{2}} $
The resulting distribution $p(\mathbf{w})$ has a covariance equal to 1 along each component.
Why would we do this?
Feature scaling: It can help to get all features into a similar arrangement such as a spherical multivariate distribution.
Remember how we created a bunch of forms of the discriminant function?
The idea is that as long as the equation gives us higher values for the desired class, the form can be anything we want.
One of the forms was a natural log of the probabilities:
$ g_{i}(\mathbf{x}) = \ln{p(\mathbf{x}|\omega_{i})} + \ln{P(\omega_{i})} $
$ g_{i}(\mathbf{x}) = \ln{p(\mathbf{x}|\omega_{i})} + \ln{P(\omega_{i})} $
If we assume that $p(\mathbf{x}|\omega_{i}) \sim N(\boldsymbol{\mu}_{i},\boldsymbol{\Sigma}_{i})$, then we can plug the multivariate normal distribution function into the above equation:
$ g_{i}(\mathbf{x}) = \ln{\left[\frac{1}{ (2\pi)^{\frac{d}{2}} |\boldsymbol{\Sigma}|^{\frac{1}{2}} }\exp{\left[-\frac{1}{2}(\mathbf{x}-\boldsymbol{\mu})^{T} \boldsymbol{\Sigma}^{-1} (\mathbf{x}-\boldsymbol{\mu}) \right]}\right]} + \ln{P(\omega_{i})} $
$ g_{i}(\mathbf{x}) = -\frac{1}{2}(\mathbf{x}-\boldsymbol{\mu}_{i})^{T} \boldsymbol{\Sigma}_{i}^{-1} (\mathbf{x}-\boldsymbol{\mu}_{i}) - \frac{d}{2}\ln{2\pi} - \frac{1}{2}\ln{|\boldsymbol{\Sigma}|} + \ln{P(\omega_{i})} $
Let’s examine our discriminant functions under two conditions:
In the first case, we can make some simplifying assumptions to help us draw decision boundaries.
In the second, we cannot assume anything about the form of the discriminant functions.
In the equal variances case, components of $\mathbf{x}$ are independent and have the same variance, $\sigma^{2}$.
Each class falls into a hypersphere in $d$ dimensions, and each class is clustered around the corresponding mean vector $\boldsymbol{\mu}_{i}$.
(Think of each class as a perfectly round blob in $d$-dimensional space.)
Here’s our discriminant function again:
$ g_{i}(\mathbf{x}) = -\frac{1}{2}(\mathbf{x}-\boldsymbol{\mu}_{i})^{T} \boldsymbol{\Sigma}_{i}^{-1}(\mathbf{x}-\boldsymbol{\mu}_{i})-\frac{d}{2}\ln{2\pi}-\frac{1}{2}\ln{|\boldsymbol{\Sigma}|}+\ln{P(\omega_{i})} $
Since $\boldsymbol{\Sigma}_{i}=\sigma^{2}\mathbf{I}$, the determinant is just $|\boldsymbol{\Sigma}_{i}|=\sigma^{2d}$ and the inverse is $\boldsymbol{\Sigma}_{i}^{-1}=(\frac{1}{\sigma^{2}})\mathbf{I}$.
$ g_{i}(\mathbf{x}) = -\frac{(\mathbf{x}-\boldsymbol{\mu}_{i})^{T} (\mathbf{x}-\boldsymbol{\mu}_{i})}{2\sigma^{2}}-\frac{d}{2}\ln{2\pi}-\frac{1}{2}\ln{|\boldsymbol{\Sigma}|}+\ln{P(\omega_{i})} $
$ g_{i}(\mathbf{x}) = -\frac{(\mathbf{x}-\boldsymbol{\mu}_{i})^{T} (\mathbf{x}-\boldsymbol{\mu}_{i})}{2\sigma^{2}}-\frac{d}{2}\ln{2\pi}-\frac{1}{2}\ln{|\boldsymbol{\Sigma}|}+\ln{P(\omega_{i})} $
Terms independent of $i$ can be dropped, so the discriminant function reduces to:
$ g_{i}(\mathbf{x}) = -\frac{(\mathbf{x}-\boldsymbol{\mu}_{i})^{T} (\mathbf{x}-\boldsymbol{\mu}_{i})}{2\sigma^{2}} +\ln{P(\omega_{i})} $
Expanding $(\mathbf{x}-\boldsymbol{\mu}_{i})^{T} (\mathbf{x}-\boldsymbol{\mu}_{i})$ gives:
$ g_{i}(\mathbf{x}) = - \frac{1}{2\sigma^{2}} \left[\mathbf{x}^{T}\mathbf{x} -2\boldsymbol{\mu}_{i}^{T} \mathbf{x} +\boldsymbol{\mu}_{i}^{T} \boldsymbol{\mu}_{i}\right] + \ln{P(\omega_{i})} $
$ g_{i}(\mathbf{x}) = -\frac{1}{2\sigma^{2}}\left[\mathbf{x}^{T}\mathbf{x} -2\boldsymbol{\mu}_{i}^{T}\mathbf{x} +\boldsymbol{\mu}_{i}^{T}\boldsymbol{\mu}_{i}\right] + \ln{P(\omega_{i})} $
We can ignore $\mathbf{x}^{T}\mathbf{x}$ since it doesn’t change with $i$, so we can rewrite the above as:
$ g_{i}(\mathbf{x}) = \frac{1}{2\sigma^{2}}\left[2\boldsymbol{\mu}_{i}^{T}\mathbf{x} -\boldsymbol{\mu}_{i}^{T}\boldsymbol{\mu}_{i}\right] + \ln{P(\omega_{i})} $
With a change of variables, we can simplify further:
$ g_{i}(\mathbf{x}) = \mathbf{w}_{i}^{T} \mathbf{x} + w_{i0}$, where
$ \mathbf{w}_{i} = \frac{1}{\sigma^{2}}\boldsymbol{\mu}_{i} $
$ w_{i0} = -\frac{1}{2\sigma^{2}}\boldsymbol{\mu}_{i}^{T} \boldsymbol{\mu}_{i} +\ln{P(\omega_{i})} $
We call $w_{i0}$ the bias or threshold for the $i$-th category.
What do these functions look like?
The decision hyperplane is where:
$g_{i}(\mathbf{x})=g_{j}(\mathbf{x})$
$ \mathbf{w}_{i}^{T} \mathbf{x} + w_{i0} = \mathbf{w}_{j}^{T} \mathbf{x} + w_{j0}$
$ \frac{1}{2\sigma^{2}} \left[2\boldsymbol{\mu}_{i}^{T} \mathbf{x} -\boldsymbol{\mu}_{i}^{T}\boldsymbol{\mu}_{i}\right] + \ln{P(\omega_{i})} = \frac{1}{2\sigma^{2}} \left[2\boldsymbol{\mu}_{j}^{T} \mathbf{x} -\boldsymbol{\mu}_{j}^{T} \boldsymbol{\mu}_{j}\right] + \ln{P(\omega_{j})}$
We want to find the point, $\mathbf{x}_{0}$, where this is true.
By rearranging the equation, we get:
$ \mathbf{x}_{0} = \frac{1}{2}(\boldsymbol{\mu}_{i} + \boldsymbol{\mu}_{j}) - \frac{\sigma^{2}}{||\boldsymbol{\mu}_{i}-\boldsymbol{\mu}_{j}||^{2}} \ln{\frac{P(\omega_{i})}{P(\omega_{j})}}(\boldsymbol{\mu}_{i}-\boldsymbol{\mu}_{j}) $
$ \mathbf{x}_{0} = \frac{1}{2}(\boldsymbol{\mu}_{i} + \boldsymbol{\mu}_{j}) - \frac{\sigma^{2}}{||\boldsymbol{\mu}_{i}-\boldsymbol{\mu}_{j}||^{2}} \ln{\frac{P(\omega_{i})}{P(\omega_{j})}}(\boldsymbol{\mu}_{i}-\boldsymbol{\mu}_{j}) $
If $P(\omega_{i})=P(\omega_{j})$, then $\ln{\frac{P(\omega_{i})}{P(\omega_{j})}}=0$ and $\mathbf{x}_{0}=\frac{1}{2}(\boldsymbol{\mu}_{i}+\boldsymbol{\mu}_{j})$; in other words, it is located halfway between the means.
If $P(\omega_{i})\neq P(\omega_{j})$, then the decision boundary shifts towards the mean with the lower prior.
Why does this happen?
If the covariance matrices for the classes are different and arbitrary, then we can only drop one term from the general discriminant function:
$ g_{i}(\mathbf{x}) = \mathbf{x}^{T} \mathbf{W}_{i}\mathbf{x} + \mathbf{w}_{i}^{T} \mathbf{x} + w_{i0} $
$ \mathbf{W}_{i} = -\frac{1}{2}\boldsymbol{\Sigma}_{i}^{-1} $
$ \mathbf{w}_{i} = \boldsymbol{\Sigma}_{i}^{-1}\boldsymbol{\mu}_{i} $
$ w_{i0} = -\frac{1}{2}\boldsymbol{\mu}_{i}^{T}\boldsymbol{\Sigma}_{i}^{-1}\boldsymbol{\mu}_{i}-\frac{1}{2}\ln{|\boldsymbol{\Sigma}_{i}|}+\ln{P(\omega_{i})} $
In this case, decision surfaces are hyperquadratic and can take on all kinds of crazy shapes.
They don’t even need to be continuous regions.
The theory holds when you extend to additional classes, although the decision boundaries can get fairly complex.
Note: If you have these kinds of problems, you must be sure your training set is very good (lots of samples, good fit between samples and model, etc.)
Always remember the tradeoff of generalization vs. complexity!
Bayes forms the basis for a lot of “ideal” classifier problems.
Use this when the following conditions are met:
Bayes gives you a very good statistical understanding of classifier performance.
If you get errors, look at your PDFs and associated feature values!
You can easily troubleshoot your system by checking your PDFs.
What happens when our features are not numbers, but attribute-value pairs like “color” or “taste”?
These are not “metrics”, meaning you can’t put them in a specific order or calculate a meaningful distance between them
There’s no such thing as a distance value between “chocolate” and “vanilla”.
We can address this problem using Non-Metric methods like Decision Trees.
Tree-building methods: CART, ID3, C4.5


WebAuthn4J Spring Security Sample MPA
Login
Please authenticate with your authenticator
Retry
Back to login page


Ethiopia’s ruling coalition unites to form single party
Ethiopia’s ruling ethnic-based coalition has merged into a single party, Prime Minister Abiy Ahmed said, but a key faction boycotted the vote.
Three out of four members of the Ethiopian People’s Revolutionary Democratic Front (EPRDF) agreed on Thursday to form a single party ahead of general elections in May.
The new party is called the Prosperity Party.
But the Tigrayan People’s Liberation Front (TPLF) — the once dominant party of the late strongman Meles Zenawi — refused to take part in the vote.
Related Articles
Ethiopia shock Ivory Coast and six-goal Madagascar hammer…
Nov 20, 2019 9,473 0
‘Killing without any reason’: Deaths in rural…
Oct 16, 2019 9,483 0
Ethiopia turns former palace, torture site into tourist draw
Oct 11, 2019 16,722 0
Ethiopian politician’s goats ‘taken…
Aug 30, 2019 11,022 0
The vote to unify passed without objection from the three other parties.
“The unanimous decision passed today (Thursday) to merge the party is a crucial step in harnessing our energy to work toward a shared vision,” Abiy said in a statement.
“Prosperity Party is committed to strengthening and applying a true federal system, which recognises the diversity and contributions of all Ethiopians.”
The former EPRDF was created in the late 1980s by rebels who came to power after toppling the dictatorship of Mengistu Haile Mariam in 1991.
– Ethnic divisions –
Though composed of four ethno-regional parties, the coalition was dominated by TPLF. This was despite the fact that Tigrayans make up only six percent of Ethiopia’s population of more than 100 million people.
Anti-government protests beginning in late 2015 and led by the Oromos and Amharas — Ethiopia´s two largest ethnic groups — swept Abiy to office in April 2018.
Under Abiy, the TPLF has been stripped of much of its power, and analysts have long said that enmity between the TPLF and Abiy’s government means the coalition exists in name only.
In an October statement, the TPLF warned that a decision to quickly move forward with the merger risked tearing the country apart.
“The TPLF has no intention of participating in a merged EPRDF which will put Ethiopia on the road to disintegration,” the statement said.
But Abiy has stood firmly by the merger plan. In remarks to lawmakers on October 22, he dismissed the possibility that the merger would fuel instability.
“The notion that if the EPRDF is divided Ethiopia will be in disorder is a very wrong assumption,” he said. “Ethiopia is the father of the EPRDF, not the other way around.”
– Rebranding –
Abiy is likely gambling that a rebranding of the EPRDF could help its members perform better in elections currently scheduled for May, said Abel Abate, an Ethiopian political analyst.
As the situation currently stands, the coalition’s parties in both Oromia and Amhara (the Oromo Democratic Party and the Amhara Democratic Party) “will have difficulty winning the majority of seats in their regions,” Abel said.
“Abiy wants to rebrand the party in such a way so that these parties have a better chance of success.”
The merger could also potentially tamp down ethnic violence that has been a recurring feature of Abiy’s rule.
“They see it as a way of defeating ethnic tension in the country that has been created by ‘ethno-nationalist’ parties in the respective regions,” Abel said.
“It could foster national unity and ethnic harmony among Ethiopia´s divided polity,” said Abebe Aynete, from the Ethiopian Foreign Relations Strategic Studies Institute, a state-linked think tank.
“If the Prosperity Party project fails, it could lead to the continuation of even more political confusion and uncertainty,” he added. AFP


Hi there,
Hope you are enjoying the course so far!
Not so long ago Hadelin and I did an interview on the SDS Podcast. This is the best place to start if you would like to learn more about his background... and a bit about me too if this is your first course with me :)
Link:
http://www.superdatascience.com/2
Some of the things you will learn in this podcast:- What is Machine Learning
- Mastering Data Science through online courses
- What are Recommender Systems
- Million dollar question: R vs Python (vs Julia)
- What Grand project Hadelin and I are currently working on
- Plus you will get an overview of:
- Regressions
- Classifications
- Clustering
- Association rule learning
- Reinforcement learning
- Deep learning
See you in class!
Sincerely,
Kirill Eremenko


class: center, middle # Pipes or Spaghetti? ## A look at modern software through old lenses ??? Hi, my name is Gabe Albacarys. This is my first talk at anything resembling a "public" forum so buckle in, because it's going to be a bit of an adventure.  But before I start any of that, "Pipes or spaghetti", why did I choose that name? --- background-image: url("https://www.google.com/about/datacenters/gallery/images/_3000/IDI_014.jpg") ??? Now we've all seen pictures like this: this is one of Google's datacenters in Georgia. Clearly this is an *incredibly* complex system filled with all sorts of crazy things going on at any given hour of the day, but it's organized. --- background-image: url("https://www.google.com/about/datacenters/gallery/images/_3000/PRY_20.jpg") ??? Every cable, every wire, every box, every rack is meticulously labeled. The design of each individual system is complex in its own right, but together they are far greater than the sum of their parts. All the pipes lead somewhere, and even though there are a lot, we know where they go and why they exist. --- background-image: url("https://i.imgur.com/oZ7aG8x.jpg") ??? Now, this is your system. Notice how it's...slightly...messier than the previous shots, and yet at way smaller scale! This is the hell most of us work in day in, day out. Conveniently, these ethernet cables are also the same color as spaghetti, which makes this terrible analogy work. Unlike the pipes in the previous example, I'd be willing to bet that the guy that originally built this couldn't point to one of those cables and tell you what it does. Untangling this system and determining how it works would be a herculean task. --- ??? The truth us, we really, really suck at building systems as software engineers, and it shows in our work. Think back to those datacenters: thousands of racks, each with dozens of machines, all built from commodity, standards-driven parts, designed to fit together to within thousandths of an inch, are assembled in an organized, predetermined fashion to build an effective means of housing, running, cooling, and storing all our shitty work. (This is where I'm going to start insulting you all) It doesn't matter how big or small your company is, it doesn't matter how smart you or your staff are... --- class: middle, center # YOUR SOFTWARE SUCKS. ???  This is a known reality, and is probably the least controversial statement in this entire talk. It wasn't always this way though, and it doesn't have to be this way. I want to take a trip with y'all down the cobblestone-paved pathways of computing history and show you some good software. --- ![](http://doc.cat-v.org/unix/pipes/pipe.png) ??? This is the document that one of my tech idols, Jessie Frazelle (go check her out, she rocks!) referenced in an article a couple of months ago. It was written by Doug McIlroy, an early (and oft-forgotten) pioneer in the development of UNIX. He says here, "We should have some ways of coupling programs like garden hose-screw in another segment when it becomes necessary to massage data in another way. This is the way of IO also." This is an incredible insight, and it manifests itself many years later in the advent of the single most important invention in the creation of the modern computer: the pipe. --- class: middle, center # `|` ??? Now for those of you that aren't super into shell scripting, let me show you the ABSOLUTE POWER of the pipe. # cat /var/log/apt/history.log | grep install | cut -d':' -f 2 | figlet --- class: middle count: false ``` 💩-> cat /var/log/apt/history.log Start-Date: 2018-08-13 05:25:49 Commandline: apt-get -y install dialog ifupdown isc-dhcp-client locales netbase net-tools openssh-client vim Install: libxdmcp6:amd64 (1:1.1.2-3, automatic), libdns-export162:amd64 (1:9.10.3.dfsg.P4-12.3+deb9u4, automatic), libkrb5-3:amd64 (1.15-1+deb9u1, automatic), libgssapi-krb5-2:amd64 (1.15-1+deb9u1, automatic), dialog:amd64 (1.3-20160828-2), ifupdown:amd64 (0.8.19), vim-common:amd64 (2:8.0.0197-4+deb9u1, automatic), libelf1:amd64 (0.168-1, automatic), libbsd0:amd64 (0.8.3-1, automatic), libncurses5:amd64 (6.0+20161126-1+deb9u2, automatic), [...] ``` ??? This command shows us a history of every event that's happened with the package manager on my system. --- class: middle count: false ``` 💩-> cat /var/log/apt/history.log | grep install Commandline: apt-get -y install dialog ifupdown isc-dhcp-client net-tools openssh-clie Commandline: apt-get install iproute2 init -y Commandline: apt-get -q -y install apt-transport-https Commandline: apt-get -q -y --no-install-recommends install cros-unattended-upgrades Commandline: apt-get -q -y install cros-guest-tools Commandline: apt install kicad Commandline: apt-get install google-cloud-sdk Commandline: apt install figlet ``` ??? GREP searches for a word in lines of text, and wouldn't you know it? The output we had before has now been trimmed down into a set of lines that contain the word "install"! So obviously the first question here would be, how does this happen? and the answer is pretty simple.


RSA_set_method(3)
RSA_set_default_method, RSA_get_default_method, RSA_set_method,
RSA_get_method, RSA_PKCS1_SSLeay, RSA_null_method, RSA_flags,
RSA_new_method - select RSA method
#include <openssl/rsa.h>
void RSA_set_default_method(const RSA_METHOD *meth);
RSA_METHOD *RSA_get_default_method(void);
int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
RSA_METHOD *RSA_get_method(const RSA *rsa);
RSA_METHOD *RSA_PKCS1_SSLeay(void);
RSA_METHOD *RSA_null_method(void);
int RSA_flags(const RSA *rsa);
RSA *RSA_new_method(RSA_METHOD *method);
An RSA_METHOD specifies the functions that OpenSSL uses for RSA operations. By modifying
the method, alternative implementations such as hardware accelerators may
be used. IMPORTANT: See the NOTES section for important information about
how these RSA API functions are affected by the use of ENGINE API calls.
Initially, the default RSA_METHOD is the OpenSSL internal implementation,
as returned by RSA_PKCS1_SSLeay().
RSA_set_default_method() makes meth the default method for all RSA structures created later. NB: This is true only whilst no ENGINE has been set as a default for RSA, so
this function is no longer recommended.
RSA_get_default_method() returns a pointer to the current
default RSA_METHOD. However, the meaningfulness of this result is dependent
on whether the ENGINE API is being used, so this function is no longer
recommended.
RSA_set_method() selects meth to perform all operations using the key
rsa. This will replace the RSA_METHOD used by the RSA key and if the previous
method was supplied by an ENGINE, the handle to that ENGINE will be
released during the change. It is possible to have RSA keys that only work
with certain RSA_METHOD implementations (eg. from an ENGINE module that
supports embedded hardware-protected keys), and in such cases attempting to
change the RSA_METHOD for the key can have unexpected results.
RSA_get_method() returns a pointer to the RSA_METHOD being
used by rsa. This method may or may not be supplied by an ENGINE implementation, but
if it is, the return value can only be guaranteed to be valid as long as
the RSA key itself is valid and does not have its implementation changed by
RSA_set_method().
RSA_flags() returns the flags that are set for rsa's current RSA_METHOD. See the BUGS section.
RSA_new_method() allocates and initializes an RSA structure so
that
engine will be used for the RSA operations. If engine is NULL, the default ENGINE for RSA operations is used, and if no default
ENGINE is set, the RSA_METHOD controlled by
RSA_set_default_method() is used.
RSA_flags() returns the flags that are set for rsa's current method.
RSA_new_method() allocates and initializes an RSA structure so that
method will be used for the RSA operations. If method is NULL, the default method is used.
typedef struct rsa_meth_st
{
/* name of the implementation */
const char *name;
/* encrypt */
int (*rsa_pub_enc)(int flen, unsigned char *from,
unsigned char *to, RSA *rsa, int padding);
/* verify arbitrary data */
int (*rsa_pub_dec)(int flen, unsigned char *from,
unsigned char *to, RSA *rsa, int padding);
/* sign arbitrary data */
int (*rsa_priv_enc)(int flen, unsigned char *from,
unsigned char *to, RSA *rsa, int padding);
/* decrypt */
int (*rsa_priv_dec)(int flen, unsigned char *from,
unsigned char *to, RSA *rsa, int padding);
/* compute r0 = r0 ^ I mod rsa->n (May be NULL for some
implementations) */
int (*rsa_mod_exp)(BIGNUM *r0, BIGNUM *I, RSA *rsa);
/* compute r = a ^ p mod m (May be NULL for some implementations) */
int (*bn_mod_exp)(BIGNUM *r, BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx);
/* called at RSA_new */
int (*init)(RSA *rsa);
/* called at RSA_free */
int (*finish)(RSA *rsa);
/* RSA_FLAG_EXT_PKEY - rsa_mod_exp is called for private key
* operations, even if p,q,dmp1,dmq1,iqmp
* are NULL
* RSA_FLAG_SIGN_VER - enable rsa_sign and rsa_verify
* RSA_METHOD_FLAG_NO_CHECK - don't check pub/private match
*/
int flags;
char *app_data; /* ?? */
/* sign. For backward compatibility, this is used only
* if (flags & RSA_FLAG_SIGN_VER)
*/
int (*rsa_sign)(int type,
const unsigned char *m, unsigned int m_length,
unsigned char *sigret, unsigned int *siglen, const RSA *rsa);
/* verify. For backward compatibility, this is used only
* if (flags & RSA_FLAG_SIGN_VER)
*/
int (*rsa_verify)(int dtype,
const unsigned char *m, unsigned int m_length,
const unsigned char *sigbuf, unsigned int siglen,
const RSA *rsa);
/* keygen. If NULL builtin RSA key generation will be used */
int (*rsa_keygen)(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
} RSA_METHOD;
RSA_PKCS1_SSLeay(), RSA_PKCS1_null_method(),
RSA_get_default_method() and RSA_get_method()
return pointers to the respective RSA_METHODs.
RSA_set_default_method() returns no value.
RSA_set_method() returns a pointer to the old RSA_METHOD
implementation that was replaced. However, this return value should
probably be ignored because if it was supplied by an ENGINE, the pointer
could be invalidated at any time if the ENGINE is unloaded (in fact it
could be unloaded as a result of the RSA_set_method() function
releasing its handle to the ENGINE). For this reason, the return type may
be replaced with a void
declaration in a future release.
RSA_new_method() returns NULL and sets an error code that can
be obtained by ERR_get_error(3) if the allocation fails. Otherwise it returns a pointer to the newly
allocated structure.
As of version 0.9.7, RSA_METHOD implementations are grouped together with
other algorithmic APIs (eg. DSA_METHOD, EVP_CIPHER, etc) into ENGINE
modules. If a default ENGINE is specified for RSA functionality using an
ENGINE API function, that will override any RSA defaults set using the RSA
API (ie. RSA_set_default_method()). For this reason, the
ENGINE API is the recommended way to control default implementations for
use in RSA and other cryptographic algorithms.
The behaviour of RSA_flags() is a mis-feature that is left
as-is for now to avoid creating compatibility problems. RSA functionality,
such as the encryption functions, are controlled by the flags value in the RSA key itself, not by the flags value in the RSA_METHOD attached to the RSA key (which is what this
function returns). If the flags element of an RSA key is changed, the
changes will be honoured by RSA functionality but will not be reflected in
the return value of the RSA_flags() function - in effect
RSA_flags() behaves more like an
RSA_default_flags() function (which does not currently exist).
rsa(3), RSA_new(3)
RSA_new_method() and RSA_set_default_method()
appeared in SSLeay 0.8. RSA_get_default_method(),
RSA_set_method() and RSA_get_method() as well as
the rsa_sign and rsa_verify components of RSA_METHOD were added in OpenSSL
0.9.4.
RSA_set_default_openssl_method() and
RSA_get_default_openssl_method() replaced
RSA_set_default_method() and
RSA_get_default_method() respectively, and
RSA_set_method() and RSA_new_method() were
altered to use
ENGINEs rather than RSA_METHODs during development of the engine version of OpenSSL 0.9.6. For 0.9.7, the
handling of defaults in the ENGINE API was restructured so that this change
was reversed, and behaviour of the other functions resembled more closely
the previous behaviour. The behaviour of defaults in the ENGINE API now
transparently overrides the behaviour of defaults in the RSA API without
requiring changing these function prototypes.
|