Compare commits
No commits in common. "1ed7fb7d3330cb7894f5c378c8fb2c70eaeb83be" and "9d36627e87272cddb0fe22363a5ccdc95409fb32" have entirely different histories.
1ed7fb7d33
...
9d36627e87
@ -625,16 +625,3 @@ def traverse_neighborly_node(
|
|||||||
continue
|
continue
|
||||||
|
|
||||||
yield from traverse_neighborly_node(neighbor, memo)
|
yield from traverse_neighborly_node(neighbor, memo)
|
||||||
|
|
||||||
|
|
||||||
def find_min_in_rotated_array(nums: list[int]) -> int:
|
|
||||||
if nums[0] <= nums[-1]:
|
|
||||||
return nums[0]
|
|
||||||
|
|
||||||
if len(nums) <= 3:
|
|
||||||
return min(nums)
|
|
||||||
|
|
||||||
if nums[len(nums) // 2] > nums[-1]:
|
|
||||||
return find_min_in_rotated_array(nums[len(nums) // 2 :])
|
|
||||||
|
|
||||||
return find_min_in_rotated_array(nums[: (len(nums) // 2) + 1])
|
|
||||||
|
@ -491,15 +491,3 @@ def test_copy_neighborly_node(inlist):
|
|||||||
assert id(orig) != id(copied)
|
assert id(orig) != id(copied)
|
||||||
assert orig == copied
|
assert orig == copied
|
||||||
assert stuff.neighborly_node_to_list(orig) == stuff.neighborly_node_to_list(copied)
|
assert stuff.neighborly_node_to_list(orig) == stuff.neighborly_node_to_list(copied)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize(
|
|
||||||
("nums", "expected"),
|
|
||||||
[
|
|
||||||
([3, 4, 5, 1, 2], 1),
|
|
||||||
([4, 5, 6, 7, 0, 1, 2], 0),
|
|
||||||
([11, 13, 15, 17], 11),
|
|
||||||
],
|
|
||||||
)
|
|
||||||
def test_find_min_in_rotated_array(nums: list[int], expected: int):
|
|
||||||
assert stuff.find_min_in_rotated_array(nums) == expected
|
|
||||||
|
1
personal-home-page/.gitignore
vendored
1
personal-home-page/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
/vendor/
|
|
@ -1,11 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
require_once 'vendor/autoload.php';
|
|
||||||
|
|
||||||
$hello_cmd = new Commando\Command();
|
|
||||||
|
|
||||||
$hello_cmd->option()->require()->describedAs('A person\'s name');
|
|
||||||
|
|
||||||
$name = $hello_cmd[0];
|
|
||||||
|
|
||||||
echo "Hello, $name", PHP_EOL;
|
|
@ -1,14 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "meatballhat/personal-home-page",
|
|
||||||
"type": "library",
|
|
||||||
"require": {
|
|
||||||
"nategood/commando": "^0.4.0"
|
|
||||||
},
|
|
||||||
"license": "MIT",
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Dan Buch",
|
|
||||||
"email": "dan@meatballhat.com"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
124
personal-home-page/composer.lock
generated
124
personal-home-page/composer.lock
generated
@ -1,124 +0,0 @@
|
|||||||
{
|
|
||||||
"_readme": [
|
|
||||||
"This file locks the dependencies of your project to a known state",
|
|
||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
|
||||||
"This file is @generated automatically"
|
|
||||||
],
|
|
||||||
"content-hash": "4aa26239cdb17b13a548c56ac84b5749",
|
|
||||||
"packages": [
|
|
||||||
{
|
|
||||||
"name": "kevinlebrun/colors.php",
|
|
||||||
"version": "0.4.1",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/kevinlebrun/colors.php.git",
|
|
||||||
"reference": "d132f36d06e48ea080855af19b4bcb1fb615224a"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/kevinlebrun/colors.php/zipball/d132f36d06e48ea080855af19b4bcb1fb615224a",
|
|
||||||
"reference": "d132f36d06e48ea080855af19b4bcb1fb615224a",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"php": ">=5.3.0"
|
|
||||||
},
|
|
||||||
"require-dev": {
|
|
||||||
"phpunit/phpunit": "3.7.*",
|
|
||||||
"satooshi/php-coveralls": "dev-master",
|
|
||||||
"squizlabs/php_codesniffer": "1.*"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"psr-0": {
|
|
||||||
"Colors": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Kevin Le Brun",
|
|
||||||
"email": "lebrun.k@gmail.com",
|
|
||||||
"homepage": "http://kevinlebrun.fr",
|
|
||||||
"role": "developer"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "Colors for PHP CLI scripts",
|
|
||||||
"homepage": "https://github.com/kevinlebrun/colors.php",
|
|
||||||
"keywords": [
|
|
||||||
"cli",
|
|
||||||
"color",
|
|
||||||
"colors",
|
|
||||||
"console",
|
|
||||||
"shell"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/kevinlebrun/colors.php/issues",
|
|
||||||
"source": "https://github.com/kevinlebrun/colors.php/tree/0.4.1"
|
|
||||||
},
|
|
||||||
"time": "2014-12-23T01:23:37+00:00"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"name": "nategood/commando",
|
|
||||||
"version": "0.4.0",
|
|
||||||
"source": {
|
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/nategood/commando.git",
|
|
||||||
"reference": "8fedd49fcb694faf60d87d5c2c4defdffa298fa0"
|
|
||||||
},
|
|
||||||
"dist": {
|
|
||||||
"type": "zip",
|
|
||||||
"url": "https://api.github.com/repos/nategood/commando/zipball/8fedd49fcb694faf60d87d5c2c4defdffa298fa0",
|
|
||||||
"reference": "8fedd49fcb694faf60d87d5c2c4defdffa298fa0",
|
|
||||||
"shasum": ""
|
|
||||||
},
|
|
||||||
"require": {
|
|
||||||
"kevinlebrun/colors.php": "~0.2",
|
|
||||||
"php": ">=5.6"
|
|
||||||
},
|
|
||||||
"type": "library",
|
|
||||||
"autoload": {
|
|
||||||
"psr-0": {
|
|
||||||
"Commando": "src/"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"notification-url": "https://packagist.org/downloads/",
|
|
||||||
"license": [
|
|
||||||
"MIT"
|
|
||||||
],
|
|
||||||
"authors": [
|
|
||||||
{
|
|
||||||
"name": "Nate Good",
|
|
||||||
"email": "me@nategood.com"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"description": "PHP CLI Commando Style",
|
|
||||||
"homepage": "http://github.com/nategood/commando",
|
|
||||||
"keywords": [
|
|
||||||
"automation",
|
|
||||||
"cli",
|
|
||||||
"command",
|
|
||||||
"command line",
|
|
||||||
"command line interface",
|
|
||||||
"scripting"
|
|
||||||
],
|
|
||||||
"support": {
|
|
||||||
"issues": "https://github.com/nategood/commando/issues",
|
|
||||||
"source": "https://github.com/nategood/commando/tree/v0.4.0"
|
|
||||||
},
|
|
||||||
"time": "2019-07-10T02:37:11+00:00"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"packages-dev": [],
|
|
||||||
"aliases": [],
|
|
||||||
"minimum-stability": "stable",
|
|
||||||
"stability-flags": [],
|
|
||||||
"prefer-stable": false,
|
|
||||||
"prefer-lowest": false,
|
|
||||||
"platform": [],
|
|
||||||
"platform-dev": [],
|
|
||||||
"plugin-api-version": "2.6.0"
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<title>Example</title>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<?php
|
|
||||||
echo "<h3>Hi, I'm a PHP script!</h3>";
|
|
||||||
?>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
@ -1,35 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
$name = 'Flavio';
|
|
||||||
|
|
||||||
var_dump($name);
|
|
||||||
|
|
||||||
$age = 20;
|
|
||||||
|
|
||||||
var_dump($age);
|
|
||||||
|
|
||||||
$base = 20;
|
|
||||||
$height = 10;
|
|
||||||
|
|
||||||
$area = $base * $height;
|
|
||||||
|
|
||||||
$test = 'an example';
|
|
||||||
|
|
||||||
$example = "This is $test";
|
|
||||||
|
|
||||||
print $example . "\n";
|
|
||||||
|
|
||||||
$firstName = 'Flavio';
|
|
||||||
$lastName = 'Copes';
|
|
||||||
|
|
||||||
$fullName = $firstName . ' ' . $lastName;
|
|
||||||
|
|
||||||
print '$fullName = ' . $fullName . "\n";
|
|
||||||
|
|
||||||
print strlen($fullName) . "\n";
|
|
||||||
|
|
||||||
$weirdName = str_replace('avio', 'ower', $fullName);
|
|
||||||
|
|
||||||
print '$weirdName = ' . $weirdName . "\n";
|
|
||||||
|
|
||||||
print 'exploded $weirdName = ' . var_dump(explode(' ', $weirdName)) . "\n";
|
|
@ -1 +0,0 @@
|
|||||||
<?php phpinfo(); ?>
|
|
@ -1,6 +0,0 @@
|
|||||||
<pre>
|
|
||||||
<?php
|
|
||||||
echo $_SERVER['HTTP_USER_AGENT'], PHP_EOL;
|
|
||||||
var_dump($_SERVER);
|
|
||||||
?>
|
|
||||||
</pre>
|
|
1
umn-kauffman/.gitignore
vendored
1
umn-kauffman/.gitignore
vendored
@ -1 +0,0 @@
|
|||||||
*.s
|
|
@ -1,7 +0,0 @@
|
|||||||
long
|
|
||||||
exchange(long *xp, long y)
|
|
||||||
{
|
|
||||||
long x = *xp;
|
|
||||||
*xp = y;
|
|
||||||
return x;
|
|
||||||
}
|
|
@ -1,11 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
for (int i = argc; i > -1; i--) {
|
|
||||||
printf("(%d): %s\n", i, argv[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
@ -1,8 +0,0 @@
|
|||||||
#include <unistd.h>
|
|
||||||
|
|
||||||
int
|
|
||||||
main(int argc, char *argv[])
|
|
||||||
{
|
|
||||||
char * buf = "hello\n";
|
|
||||||
write(1, buf, 6);
|
|
||||||
}
|
|
@ -1,9 +0,0 @@
|
|||||||
long
|
|
||||||
mult2(long a, long b);
|
|
||||||
|
|
||||||
void
|
|
||||||
multstore(long x, long y, long *dest)
|
|
||||||
{
|
|
||||||
long t = mult2(x, y);
|
|
||||||
*dest = t;
|
|
||||||
}
|
|
Loading…
x
Reference in New Issue
Block a user