This file contains hidden or 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
| // Object.prototype YMMV | |
| const ColorOperation = { | |
| XOR: 'XOR', | |
| DIFF: 'DIFF', | |
| ADD: 'ADD', | |
| SUB: 'SUB', | |
| MAX: 'MAX', | |
| AVG: 'AVG' | |
| }; |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>BioTarot Reading</title> | |
| <style> | |
| body { | |
| font-family: Arial, sans-serif; | |
| background-color: #b8a8c2; |
This file contains hidden or 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
| Python | |
| def safety_guidelines(): | |
| """ | |
| Ensures that the response is safe, ethical, and appropriate. | |
| Returns: | |
| A boolean value indicating whether the response is safe. | |
| """ |
This file contains hidden or 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
| #Question: Write a simple feature-complete snake game written in python using pygame. | |
| #""" | |
| # 1. Overview and imports | |
| # Import pygame for the game | |
| import pygame | |
| pygame.init() |
This file contains hidden or 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
| #in my case on windows I had to | |
| New-Item -ItemType SymbolicLink -Path "C:\Python311\bin" -Target "C:\Python311" | |
| #as admin | |
| #I also did not have f2py.exe in my python so I kinda welded it in from a similar one... | |
| #by just dumping the copies in scripts and praying. | |
| #also needed to | |
| Get-ChildItem -Path 'C:\Python311' -Directory | Where-Object { $_.Name -ne 'bin' } | Get-ChildItem -Recurse | Where-Object { $_.PSIsContainer -or $_.Extension -eq '.exe' } | ForEach-Object { icacls $_.FullName /grant "YourUserNameHere:(OI)(CI)F" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from IPython.display import HTML, display | |
| def set_css(): | |
| display(HTML(''' | |
| <style> | |
| pre { | |
| white-space: pre-wrap; | |
| } | |
| </style> | |
| ''')) |
This file contains hidden or 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
| lscpu | |
| Architecture: x86_64 | |
| CPU op-mode(s): 32-bit, 64-bit | |
| Address sizes: 46 bits physical, 48 bits virtual | |
| Byte Order: Little Endian | |
| CPU(s): 2 | |
| On-line CPU(s) list: 0,1 | |
| Vendor ID: GenuineIntel | |
| Model name: Intel(R) Xeon(R) CPU @ 2.20GHz | |
| CPU family: 6 |
This file contains hidden or 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
| ..\lscpu.ps1 (file is posted in gist, rough approximation of lscpu of windows) | |
| Processor Information | |
| --------------------- | |
| Architecture: 9 | |
| CPU op-mode(s): 1 | |
| Byte Order: Little Endian | |
| Address sizes: 64 bits physical, 64 bits virtual | |
| CPU(s): 4 | |
| On-line CPU(s) list: CPU0 | |
| Thread(s) per core: 1 |
This file contains hidden or 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
| param( | |
| [int]$loops = 3, | |
| [string[]]$models = 'stories15M.bin', | |
| [string[]]$compilers = 'run.exe' | |
| ) | |
| $randomModels = $models | Get-Random -Count $models.Length | |
| $randomCompilers = $compilers | Get-Random -Count $compilers.Length | |
| $env:OMP_NUM_THREADS = [System.Environment]::ProcessorCount |
This file contains hidden or 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
| #Usage: | |
| # powershell '.\sample.ps1' 1 | |
| # | |
| # powershell '.\sample_15_110.ps1' -loops 3 -compilers 'runmingw', 'runmsvc' | |
| # | |
| # powershell '.\sample_15_110.ps1' 3 'runmingw', 'runmsvc' | |
| # | |
| # any combination of model is okay in the naming After | |
| # you run create_sampling_hardlinks | |
| # |