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
/* compile osx | |
* gcc -bundle -fPIC -O3 -o popcount.dylib popcount.c | |
* */ | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdint.h> | |
#include <sqlite3ext.h> | |
SQLITE_EXTENSION_INIT1 |
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
.text | |
.global main | |
main: | |
ldr r0, =value | |
ldr r0, [r0] | |
vmov.32 d0[0], r0 | |
vcnt.8 d0, d0 | |
vmov.32 r0, d0[0] | |
add r0, r0, r0, lsr #16 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.security.Key; | |
import javax.crypto.Cipher; | |
import javax.crypto.KeyGenerator; | |
public class AESexample { | |
private String keySize; | |
private Key aesKey; | |
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
def sha256(data): | |
bytes = "" | |
h0 = 0x6a09e667 | |
h1 = 0xbb67ae85 | |
h2 = 0x3c6ef372 | |
h3 = 0xa54ff53a | |
h4 = 0x510e527f | |
h5 = 0x9b05688c | |
h6 = 0x1f83d9ab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, math, pygame | |
class Point3D(): | |
def __init__(self, x=0, y=0, z=0): | |
self.x, self.y, self.z = float(x), float(y), float(z) | |
def rotateX(self, angle): | |
""" Rotates the point around the X axis by the given angle in degrees. """ | |
rad = angle * math.pi / 180 |
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
# | |
# By Kyle Kersey | |
# 2014 | |
# | |
import praw | |
import sqlite3 | |
import sys | |
database_path = "reddit_comments.db" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import difflib | |
# output | |
# the(insert " fast and") quick brown (replace "fox" with "duck") jumped over the lazy (replace "dog" with "cat") | |
s1 = 'the quick brown fox jumped over the lazy dog' | |
s2 = 'the fast and quick brown duck jumped over the lazy cat' | |
def show_diff(seqm): |
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
with GNAT.Sockets; | |
with Ada.Text_IO; | |
with Ada.Strings.Unbounded; | |
with Ada.Streams; use Ada.Streams; | |
procedure Redis_Client is | |
package TIO renames Ada.Text_IO; | |
package UBS renames Ada.Strings.Unbounded; | |
Host : constant String := "127.0.0.1"; |
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
diff --cc app/views/landing_page/index.html.erb | |
index 049ff5f,4f1c60f..0000000 | |
--- a/app/views/landing_page/index.html.erb | |
+++ b/app/views/landing_page/index.html.erb | |
@@@ -9,7 -9,72 +9,77 @@@ | |
</div> | |
</div> | |
--> | |
- | |
<div class="main-landing-content"> |
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
# -*- coding: utf-8 -*- | |
import pygments | |
from pygments import highlight | |
from pygments.lexers import get_lexer_by_name | |
from pygments.formatters import HtmlFormatter | |
from pygments.lexers import guess_lexer, get_lexer_for_filename | |
from os import listdir, mkdir | |
from os.path import isfile, join, getsize, getctime, isdir, dirname, abspath | |
from time import ctime | |
import glob |
NewerOlder