Skip to content

Instantly share code, notes, and snippets.

View codeadict's full-sized avatar
🕸️
λ: f(f(state)) = f(state)

Dairon M. codeadict

🕸️
λ: f(f(state)) = f(state)
View GitHub Profile
@codeadict
codeadict / public_ipv6.sh
Created September 3, 2024 20:43
What's my public ipv6?
curl -s https://ipv6.ipparrot.net
@codeadict
codeadict / public_ipv4.sh
Created September 3, 2024 20:42
What's my public ipv4 address?
curl -s https://ipv4.ipparrot.net

Keybase proof

I hereby claim:

  • I am codeadict on github.
  • I am dairon (https://keybase.io/dairon) on keybase.
  • I have a public key ASAd7-ISbwuLfULnqKiOb6NvPej3BINo8CRAzLEf6K2yzwo

To claim this, I am signing this object:

@codeadict
codeadict / faker_seed.py
Created February 26, 2018 01:47
Generating verifiable fake data with faker
from faker import Faker
fake = Faker()
fake.random.seed(1234)
print(fake.name())
@codeadict
codeadict / planet_test.py
Created February 26, 2018 01:39
Testing faker planet generator
from faker import Faker
from planet_provider import PlanetProvider
fake = Faker()
fake = Faker()
fake.add_provider(PlanetProvider)
print(fake.planet())
@codeadict
codeadict / planet_provider.py
Last active October 14, 2022 03:34
Planet provider for faker
from faker.providers import BaseProvider
class PlanetProvider(BaseProvider):
__provider__ = 'planet'
__lang___ = 'en_US'
planets = ['Neptune', 'Mars', 'Mercury', 'Venus', 'Earth', 'Jupiter', 'Saturn', 'Uranus']
@codeadict
codeadict / faker_es.py
Created February 26, 2018 01:16
Faker in Spanish
from faker import Faker
fake = Faker('es_ES')
print(fake.name())
print(fake.address())
print(fake.phone_number())
@codeadict
codeadict / test.py
Created February 26, 2018 01:09
Unit tests
import unittest
from faker import Faker
from customer import Customer
class TestCustomer(unittest.TestCase):
def setUp(self):
@codeadict
codeadict / customer.py
Created February 25, 2018 23:57
Customer object
class Customer:
def __init__(self, name, address, state, zipcode, contact_name,
phone_number, email, notes):
self.name = name
self.address = address
self.state = state
self.zipcode = zipcode
self.contact_name = contact_name
self.phone_number = phone_number
{
"_meta": {
"hash": {
"sha256": "b802fff146f9ce84e1e9281ab16181a877ecd5981ecca9e462dcac13099e5b7e"
},
"host-environment-markers": {
"implementation_name": "cpython",
"implementation_version": "3.6.3",
"os_name": "posix",
"platform_machine": "x86_64",