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
| import numpy as np | |
| import math | |
| import random | |
| import time | |
| def gcd_of_list(lst): | |
| """Returns GCD of a list of numbers, ignoring zeros.""" | |
| filtered_lst = [num for num in lst if num != 0] # Ignore zeros | |
| if not filtered_lst: | |
| return 0 # If all are zeros, return 0 |
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
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |
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
| /* chrome fix render svg first */ | |
| @media screen and (-webkit-min-device-pixel-ratio:0) { | |
| @font-face { | |
| font-family: 'LarsseitBold'; | |
| src: url('../font/good/larsseit-bold.svg') format('svg'); | |
| } | |
| @font-face { | |
| font-family: 'LarsseitExtraBold'; | |
| src: url('../font/good/larsseit-extrabold.svg') format('svg'); | |
| } |
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
| <?php | |
| //Load WorsPress quick and dirty into something not WordPress. This is horrible I know, | |
| //But the database queries they are so low, and it's just so dirty | |
| //install WordPress in a dir like /lib or something and stick classPageLoader.php in there, ha! | |
| //Example use for a index.php or whatever, no autoloading here! | |
| ####################################################### | |
| require('lib/classPageLoader.php'); | |
| $content = new LoadWpContent(); |
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
| <?php | |
| //get all ze hooks | |
| $Directory = new RecursiveDirectoryIterator( 'WordPress\3.7' ); | |
| $Iterator = new RecursiveIteratorIterator( $Directory ); | |
| $regex = new RegexIterator( $Iterator, '/^.+\.php$/i', RecursiveRegexIterator::GET_MATCH ); | |
| foreach ( $regex as $filename=>$file ) { |
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
| <?php | |
| /** | |
| * @package WordPress | |
| * @subpackage WP-Skeleton | |
| */ | |
| // REMOVE SOME HEADER OUTPUT | |
| function Wps_remove_header_info() { | |
| remove_action('wp_head', 'rsd_link'); |
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
| { | |
| "auto_complete_selector": "source, text", | |
| "bold_folder_labels": true, | |
| "caret_style": "phase", | |
| "color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme", | |
| "drag_text": false, | |
| "font_face": "Consolas", | |
| "font_size": 13, | |
| "highlight_line": true, | |
| "highlight_modified_tabs": true, |
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
| <form id="wp-link" tabindex="-1" class="ui-dialog-content ui-widget-content" style="width: auto; min-height: 125px; max-height: none; height: auto;" _lpchecked="1"> | |
| <input type="hidden" id="_ajax_linking_nonce" name="_ajax_linking_nonce" value="ab2ba583a6"> <div id="link-selector"> | |
| <div id="link-options"> | |
| <p class="howto">Enter the destination URL</p> | |
| <div> | |
| <label><span>URL</span><input id="url-field" type="text" name="href"></label> | |
| </div> | |
| <div> | |
| <label><span>Title</span><input id="link-title-field" type="text" name="linktitle"></label> | |
| </div> |
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
| <?php | |
| //just load it the way WP does | |
| include dirname(__FILE__) . '/wp-blog-header.php'; | |
| require_once(ABSPATH . 'wp-admin/includes/admin.php'); | |
| $functions = get_defined_functions(); | |
| $i = 0; //count them | |
| // set to user, we don't want internal functions |
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
| <?php | |
| $post_types= get_post_types('','names'); | |
| $posts_separated = implode(",", $post_types); | |
| $screens = array( 'post', 'page', $posts_separated); | |
| foreach ($screens as $screen) { | |
| add_meta_box( 'styles', 'hello', 'callback_func', $screen, 'advanced', 'high'); | |
| } |
NewerOlder