index
int64
repo_name
string
branch_name
string
path
string
content
string
import_graph
string
44,331
fraunhoferfokus/ckanext-govdatade
refs/heads/master
/ckanext/govdatade/harvesters/jsonharvester.py
#!/usr/bin/python # -*- coding: utf8 -*- from ckanext.harvest.model import HarvestObject from ckanext.govdatade.harvesters.translator import translate_groups from ckanext.govdatade.harvesters.ckanharvester import GovDataHarvester import json import logging import uuid import zipfile import StringIO import...
{"/ckanext/govdatade/tests/test_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py", "/ckanext/govdatade/harvesters/jsonharvester.py"], "/ckanext/govdatade/tests/test_datahub_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py"], "/ckanext/govdatade/harvesters/translator.py": ["/ckanext/govdata...
44,332
fraunhoferfokus/ckanext-govdatade
refs/heads/master
/ckanext/govdatade/commands/schema_checker.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from ckan import model from ckan.model import Session from ckan.lib.cli import CkanCommand from ckan.logic import get_action, NotFound from ckan.logic.schema import default_package_schema from ckanext.govdatade.config import CONFIG from ckanext.govdatade.util import norma...
{"/ckanext/govdatade/tests/test_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py", "/ckanext/govdatade/harvesters/jsonharvester.py"], "/ckanext/govdatade/tests/test_datahub_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py"], "/ckanext/govdatade/harvesters/translator.py": ["/ckanext/govdata...
44,333
fraunhoferfokus/ckanext-govdatade
refs/heads/master
/ckanext/govdatade/harvesters/translator.py
#!/bin/env python from ckanext.govdatade.config import CONFIG import json import urllib2 def translate_groups(groups, source_name): url = 'https://raw.github.com/fraunhoferfokus/ogd-metadata/master/kategorien/' + source_name + '2deutschland.json' json_string = urllib2.urlopen(url).read() group_dict = jso...
{"/ckanext/govdatade/tests/test_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py", "/ckanext/govdatade/harvesters/jsonharvester.py"], "/ckanext/govdatade/tests/test_datahub_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py"], "/ckanext/govdatade/harvesters/translator.py": ["/ckanext/govdata...
44,334
fraunhoferfokus/ckanext-govdatade
refs/heads/master
/ckanext/govdatade/config.py
import ConfigParser import os # Make configuration file globally accessible CONFIG = ConfigParser.ConfigParser() config_file = os.path.dirname(__file__) config_file = os.path.join(config_file, '../..', 'config.ini') config_file = os.path.abspath(config_file) CONFIG.read(config_file)
{"/ckanext/govdatade/tests/test_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py", "/ckanext/govdatade/harvesters/jsonharvester.py"], "/ckanext/govdatade/tests/test_datahub_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py"], "/ckanext/govdatade/harvesters/translator.py": ["/ckanext/govdata...
44,335
fraunhoferfokus/ckanext-govdatade
refs/heads/master
/ckanext/govdatade/tests/test_validation.py
#!/usr/bin/python # -*- coding: utf8 -*- from jsonschema import validate, ValidationError from nose.tools import raises import json import urllib2 class TestValidation: SCHEMA_URL = 'https://raw.github.com/fraunhoferfokus/ogd-metadata/master/OGPD_JSON_Schema.json' # NOQA def setup(self): self.sch...
{"/ckanext/govdatade/tests/test_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py", "/ckanext/govdatade/harvesters/jsonharvester.py"], "/ckanext/govdatade/tests/test_datahub_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py"], "/ckanext/govdatade/harvesters/translator.py": ["/ckanext/govdata...
44,336
fraunhoferfokus/ckanext-govdatade
refs/heads/master
/ckanext/govdatade/commands/report.py
#!/usr/bin/env python # -*- coding: utf8 -*- from collections import defaultdict from ckan.lib.cli import CkanCommand from ckanext.govdatade.config import CONFIG from ckanext.govdatade.util import copy_report_vendor_files from ckanext.govdatade.util import copy_report_asset_files from ckanext.govdatade.util import g...
{"/ckanext/govdatade/tests/test_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py", "/ckanext/govdatade/harvesters/jsonharvester.py"], "/ckanext/govdatade/tests/test_datahub_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py"], "/ckanext/govdatade/harvesters/translator.py": ["/ckanext/govdata...
44,337
fraunhoferfokus/ckanext-govdatade
refs/heads/master
/ckanext/govdatade/validators/schema_checker.py
import json import urllib2 from jsonschema.validators import Draft3Validator from jsonschema import FormatChecker import redis class SchemaChecker: SCHEMA_URL = 'https://raw.github.com/fraunhoferfokus/ogd-metadata/master/OGPD_JSON_Schema.json' # NOQA def __init__(self, db='production'): redis_db_d...
{"/ckanext/govdatade/tests/test_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py", "/ckanext/govdatade/harvesters/jsonharvester.py"], "/ckanext/govdatade/tests/test_datahub_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py"], "/ckanext/govdatade/harvesters/translator.py": ["/ckanext/govdata...
44,338
fraunhoferfokus/ckanext-govdatade
refs/heads/master
/ckanext/govdatade/validators/link_checker.py
from datetime import datetime import socket import logging import urllib2 import time import redis import requests import codecs log = logging.getLogger(__name__) my_path="/tmp/measurement_linkchecker.log" def logme(logText, path="/opt/linkChecker.log"): with codecs.open(path, "a", "utf-8") as f: f.wri...
{"/ckanext/govdatade/tests/test_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py", "/ckanext/govdatade/harvesters/jsonharvester.py"], "/ckanext/govdatade/tests/test_datahub_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py"], "/ckanext/govdatade/harvesters/translator.py": ["/ckanext/govdata...
44,339
fraunhoferfokus/ckanext-govdatade
refs/heads/master
/ckanext/govdatade/tests/test_normalize_extras.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from ckanext.govdatade.util import normalize_extras import json def test_simple_json_object(): source = json.dumps({'a': '1', 'b': '2', 'c': '3'}) assert normalize_extras(source) == {'a': '1', 'b': '2', 'c': '3'} def test_nested_json_object(): source = jso...
{"/ckanext/govdatade/tests/test_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py", "/ckanext/govdatade/harvesters/jsonharvester.py"], "/ckanext/govdatade/tests/test_datahub_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py"], "/ckanext/govdatade/harvesters/translator.py": ["/ckanext/govdata...
44,340
fraunhoferfokus/ckanext-govdatade
refs/heads/master
/ckanext/govdatade/commands/link_checker.py
#!/usr/bin/env python # -*- coding: utf8 -*- import os from jinja2 import Environment, FileSystemLoader from ckan import model from ckan.model import Session from ckan.lib.cli import CkanCommand from ckan.logic import get_action from ckan.logic.schema import default_package_schema from ckanext.govdatade.util import n...
{"/ckanext/govdatade/tests/test_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py", "/ckanext/govdatade/harvesters/jsonharvester.py"], "/ckanext/govdatade/tests/test_datahub_harvester.py": ["/ckanext/govdatade/harvesters/ckanharvester.py"], "/ckanext/govdatade/harvesters/translator.py": ["/ckanext/govdata...
44,419
abeillebuzz/learning_to_test_code
refs/heads/master
/employee.py
class Employee(): """Collect employee data and give info about salary.""" def __init__(self, first_name, last_name, salary): """Store employee info.""" self.first_name = first_name self.last_name = last_name self.salary = salary def give_raise(self, increas...
{"/test_employee.py": ["/employee.py"]}
44,420
abeillebuzz/learning_to_test_code
refs/heads/master
/test_employee.py
import unittest from employee import Employee class TestEmployee(unittest.TestCase): """Tests for the class Employee.""" def setUp(self): """ Create an employee and salary for use in all test methods. """ first_name = 'tiffany' last_name = 'gay' ...
{"/test_employee.py": ["/employee.py"]}
44,431
hfeeki/tsuru-dev-dashboard
refs/heads/master
/metrics/admin.py
from django.contrib import admin from metrics.models import Metric, Data admin.site.register(Metric) admin.site.register(Data)
{"/metrics/admin.py": ["/metrics/models.py"], "/metrics/management/commands/fetch.py": ["/metrics/models.py"], "/metrics/views.py": ["/metrics/models.py"], "/metrics/tests/test_metric_model.py": ["/metrics/models.py"]}
44,432
hfeeki/tsuru-dev-dashboard
refs/heads/master
/metrics/management/commands/fetch.py
# -*- coding: utf-8 -*- from django.core.management.base import NoArgsCommand from metrics.models import Metric class Command(NoArgsCommand): can_import_settings = True def handle_noargs(self, **options): for metric in Metric.objects.all(): metric.fetch() return u"ok!"
{"/metrics/admin.py": ["/metrics/models.py"], "/metrics/management/commands/fetch.py": ["/metrics/models.py"], "/metrics/views.py": ["/metrics/models.py"], "/metrics/tests/test_metric_model.py": ["/metrics/models.py"]}
44,433
hfeeki/tsuru-dev-dashboard
refs/heads/master
/metrics/tests/test_index_view.py
from django.test import TestCase class IndexViewTestCase(TestCase): def test_should_have_metrics_on_context(self): response = self.client.get("/") self.assertIn("object_list", response.context)
{"/metrics/admin.py": ["/metrics/models.py"], "/metrics/management/commands/fetch.py": ["/metrics/models.py"], "/metrics/views.py": ["/metrics/models.py"], "/metrics/tests/test_metric_model.py": ["/metrics/models.py"]}
44,434
hfeeki/tsuru-dev-dashboard
refs/heads/master
/metrics/views.py
from django.views.generic import ListView from metrics.models import Metric class Index(ListView): model = Metric
{"/metrics/admin.py": ["/metrics/models.py"], "/metrics/management/commands/fetch.py": ["/metrics/models.py"], "/metrics/views.py": ["/metrics/models.py"], "/metrics/tests/test_metric_model.py": ["/metrics/models.py"]}
44,435
hfeeki/tsuru-dev-dashboard
refs/heads/master
/metrics/tests/test_metric_model.py
from django.test import TestCase from metrics.models import Metric import mock class MetricModelTestCase(TestCase): def test_should_have_name_field(self): fields = Metric._meta.get_all_field_names() self.assertIn("name", fields) def test_should_have_url_field(self): fields = Metric....
{"/metrics/admin.py": ["/metrics/models.py"], "/metrics/management/commands/fetch.py": ["/metrics/models.py"], "/metrics/views.py": ["/metrics/models.py"], "/metrics/tests/test_metric_model.py": ["/metrics/models.py"]}
44,436
hfeeki/tsuru-dev-dashboard
refs/heads/master
/metrics/models.py
from django.db import models from datetime import datetime import requests class Metric(models.Model): name = models.CharField(max_length=255) url = models.URLField() def fetch(self): result = requests.get(self.url) Data.objects.create( metric=self, count=result....
{"/metrics/admin.py": ["/metrics/models.py"], "/metrics/management/commands/fetch.py": ["/metrics/models.py"], "/metrics/views.py": ["/metrics/models.py"], "/metrics/tests/test_metric_model.py": ["/metrics/models.py"]}
44,437
Timfts/opencv-exercises
refs/heads/master
/cv_proj/main.py
from .chapters.one import display_img, use_webcam # chapter one # display_img() use_webcam()
{"/cv_proj/main.py": ["/cv_proj/chapters/one/__init__.py"]}
44,438
Timfts/opencv-exercises
refs/heads/master
/cv_proj/chapters/one/__init__.py
import cv2 def display_img(): img = cv2.imread("resources/paint.jpg") cv2.imshow("output", img) cv2.waitKey(0) def use_webcam(): cap = cv2.VideoCapture(0) cap.set(3, 640) cap.set(4, 480) cap.set(10, 100) while True: success, img = cap.read() cv2.imshow("Video", img) ...
{"/cv_proj/main.py": ["/cv_proj/chapters/one/__init__.py"]}
44,465
CadQuery/cadquery
refs/heads/master
/cadquery/hull.py
from typing import List, Tuple, Union, Iterable, Set from math import pi, sin, cos, atan2, sqrt, inf, degrees from numpy import lexsort, argmin, argmax from .occ_impl.shapes import Edge, Wire from .occ_impl.geom import Vector """ Convex hull for line segments and circular arcs based on Yue, Y., Murray, J. L., Corney...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,466
CadQuery/cadquery
refs/heads/master
/examples/Ex017_Shelling_to_Create_Thin_Features.py
import cadquery as cq # Create a hollow box that's open on both ends with a thin wall. # 1. Establishes a workplane that an object can be built on. # 1a. Uses the named plane orientation "front" to define the workplane, meaning # that the positive Z direction is "up", and the negative Z direction # is "down"....
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,467
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/exporters/threemf.py
from datetime import datetime from os import PathLike import xml.etree.cElementTree as ET from typing import IO, List, Literal, Tuple, Union from zipfile import ZipFile, ZIP_DEFLATED, ZIP_STORED from ...cq import Compound, Shape, Vector class CONTENT_TYPES(object): MODEL = "application/vnd.ms-package.3dmanufactu...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,468
CadQuery/cadquery
refs/heads/master
/tests/test_sketch.py
import os from cadquery.sketch import Sketch, Vector, Location from cadquery.selectors import LengthNthSelector from pytest import approx, raises from math import pi, sqrt testdataDir = os.path.join(os.path.dirname(__file__), "testdata") def test_face_interface(): s1 = Sketch().rect(1, 2, 45) assert s1._...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,469
CadQuery/cadquery
refs/heads/master
/cadquery/__init__.py
from importlib.metadata import version, PackageNotFoundError try: __version__ = version("cadquery") except PackageNotFoundError: # package is not installed __version__ = "2.4-dev" # these items point to the OCC implementation from .occ_impl.geom import Plane, BoundBox, Vector, Matrix, Location from .occ_i...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,470
CadQuery/cadquery
refs/heads/master
/cadquery/sketch.py
from typing import ( Union, Optional, List, Dict, Callable, Tuple, Iterable, Iterator, Any, Sequence, TypeVar, cast as tcast, ) from typing_extensions import Literal from math import tan, sin, cos, pi, radians, remainder from itertools import product, chain from multimeth...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,471
CadQuery/cadquery
refs/heads/master
/examples/Ex004_Extruded_Cylindrical_Plate.py
import cadquery as cq # These can be modified rather than hardcoding values for each dimension. circle_radius = 50.0 # Radius of the plate thickness = 13.0 # Thickness of the plate rectangle_width = 13.0 # Width of rectangular hole in cylindrical plate rectangle_length = 19.0 # Length of rectangular hole in cylind...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,472
CadQuery/cadquery
refs/heads/master
/cadquery/cq_directive.py
""" A special directive for including a cq object. """ import traceback from json import dumps from cadquery import exporters, Assembly, Compound, Color, Sketch from cadquery import cqgi from cadquery.occ_impl.assembly import toJSON from cadquery.occ_impl.jupyter_tools import DEFAULT_COLOR from docutils.parsers.rst...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,473
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/solver.py
from typing import ( List, Tuple, Union, Any, Callable, Optional, Dict, Literal, cast as tcast, Type, ) from math import radians, pi from typish import instance_of, get_type import casadi as ca from OCP.gp import ( gp_Vec, gp_Pln, gp_Dir, gp_Pnt, gp_Trsf, ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,474
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/exporters/utils.py
from ...cq import Workplane from ..shapes import Compound, Shape def toCompound(shape: Workplane) -> Compound: return Compound.makeCompound(val for val in shape.vals() if isinstance(val, Shape))
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,475
CadQuery/cadquery
refs/heads/master
/examples/Ex025_Swept_Helix.py
import cadquery as cq r = 0.5 # Radius of the helix p = 0.4 # Pitch of the helix - vertical distance between loops h = 2.4 # Height of the helix - total height # Helix wire = cq.Wire.makeHelix(pitch=p, height=h, radius=r) helix = cq.Workplane(obj=wire) # Final result: A 2D shape swept along a helix. result = ( ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,476
CadQuery/cadquery
refs/heads/master
/cadquery/assembly.py
from functools import reduce from typing import ( Union, Optional, List, Dict, Any, overload, Tuple, Iterator, cast, get_args, ) from typing_extensions import Literal from typish import instance_of from uuid import uuid1 as uuid from .cq import Workplane from .occ_impl.shapes im...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,477
CadQuery/cadquery
refs/heads/master
/tests/test_workplanes.py
""" Tests basic workplane functionality """ # core modules # my modules from cadquery import * from tests import BaseTest, toTuple xAxis_ = Vector(1, 0, 0) yAxis_ = Vector(0, 1, 0) zAxis_ = Vector(0, 0, 1) xInvAxis_ = Vector(-1, 0, 0) yInvAxis_ = Vector(0, -1, 0) zInvAxis_ = Vector(0, 0, -1) class TestWorkplane...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,478
CadQuery/cadquery
refs/heads/master
/examples/Ex100_Lego_Brick.py
# This script can create any regular rectangular Lego(TM) Brick import cadquery as cq ##### # Inputs ###### lbumps = 1 # number of bumps long wbumps = 1 # number of bumps wide thin = True # True for thin, False for thick # # Lego Brick Constants-- these make a lego brick a lego :) # pitch = 8.0 clearance = 0.1 bum...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,479
CadQuery/cadquery
refs/heads/master
/examples/Ex012_Creating_Workplanes_on_Faces.py
import cadquery as cq # 1. Establishes a workplane that an object can be built on. # 1a. Uses the named plane orientation "front" to define the workplane, meaning # that the positive Z direction is "up", and the negative Z direction # is "down". # 2. Creates a 3D box that will have a hole placed in it later....
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,480
CadQuery/cadquery
refs/heads/master
/examples/Ex002_Block_With_Bored_Center_Hole.py
import cadquery as cq # These can be modified rather than hardcoding values for each dimension. length = 80.0 # Length of the block height = 60.0 # Height of the block thickness = 10.0 # Thickness of the block center_hole_dia = 22.0 # Diameter of center hole in block # Create a block based on the dimensions above...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,481
CadQuery/cadquery
refs/heads/master
/doc/ext/sphinx_autodoc_multimethod.py
from types import ModuleType from typing import Any, List, Tuple, ValuesView from multimethod import multimethod import re from sphinx.ext.autosummary import Autosummary from sphinx.ext.autosummary import ( get_import_prefixes_from_env, ImportExceptionGroup, mangle_signature, extract_summary, ) from do...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,482
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/exporters/vtk.py
from vtkmodules.vtkIOXML import vtkXMLPolyDataWriter from ..shapes import Shape def exportVTP( shape: Shape, fname: str, tolerance: float = 0.1, angularTolerance: float = 0.1 ): writer = vtkXMLPolyDataWriter() writer.SetFileName(fname) writer.SetInputData(shape.toVtkPolyData(tolerance, angularToleran...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,483
CadQuery/cadquery
refs/heads/master
/examples/Ex005_Extruded_Lines_and_Arcs.py
import cadquery as cq # These can be modified rather than hardcoding values for each dimension. width = 2.0 # Overall width of the plate thickness = 0.25 # Thickness of the plate # Extrude a plate outline made of lines and an arc # 1. Establishes a workplane that an object can be built on. # 1a. Uses the named pla...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,484
CadQuery/cadquery
refs/heads/master
/tests/test_cadquery.py
""" This module tests cadquery creation and manipulation functions """ # system modules import math, os.path, time, tempfile from random import random from random import randrange from itertools import product from pytest import approx, raises # my modules from cadquery import * from cadquery import occ_impl fr...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,485
CadQuery/cadquery
refs/heads/master
/tests/test_cqgi.py
""" Tests CQGI functionality Currently, this includes: Parsing a script, and detecting its available variables Altering the values at runtime defining a build_object function to return results """ from cadquery import cqgi from tests import BaseTest import textwrap TESTSCRIPT = textwrap....
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,486
CadQuery/cadquery
refs/heads/master
/tests/test_utils.py
from cadquery.utils import cqmultimethod as multimethod from pytest import raises def test_multimethod(): class A: @multimethod def f(self, a: int, c: str = "s"): return 1 @f.register def f(self, a: int, b: int, c: str = "b"): return 2 assert A().f(0,...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,487
CadQuery/cadquery
refs/heads/master
/examples/Ex001_Simple_Block.py
import cadquery as cq # These can be modified rather than hardcoding values for each dimension. length = 80.0 # Length of the block height = 60.0 # Height of the block thickness = 10.0 # Thickness of the block # Create a 3D block based on the dimension variables above. # 1. Establishes a workplane that an object ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,488
CadQuery/cadquery
refs/heads/master
/doc/gen_colors.py
""" A script to generate RST (HTML only) for displaying all the colours supported by OCP. Used in the file assy.rst. """ from OCP import Quantity import cadquery as cq from typing import Dict from itertools import chain OCP_COLOR_LEADER, SEP = "Quantity_NOC", "_" TEMPLATE = """\ <div style="background-color:r...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,489
CadQuery/cadquery
refs/heads/master
/tests/test_hull.py
import pytest import cadquery as cq from cadquery import hull def test_hull(): c1 = cq.Edge.makeCircle(0.5, (-1.5, 0.5, 0)) c2 = cq.Edge.makeCircle(0.5, (1.9, 0.0, 0)) c3 = cq.Edge.makeCircle(0.2, (0.3, 1.5, 0)) c4 = cq.Edge.makeCircle(0.2, (1.0, 1.5, 0)) c5 = cq.Edge.makeCircle(0.1, (0.0, 0.0, ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,490
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/exporters/__init__.py
import tempfile import os import io as StringIO from typing import IO, Optional, Union, cast, Dict, Any from typing_extensions import Literal from OCP.VrmlAPI import VrmlAPI from ...cq import Workplane from ...utils import deprecate from ..shapes import Shape from .svg import getSVG from .json import JsonMesh from ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,491
CadQuery/cadquery
refs/heads/master
/examples/Ex026_Case_Seam_Lip.py
import cadquery as cq from cadquery.selectors import AreaNthSelector case_bottom = ( cq.Workplane("XY") .rect(20, 20) .extrude(10) # solid 20x20x10 box .edges("|Z or <Z") .fillet(2) # rounding all edges except 4 edges of the top face .faces(">Z") .shell(2) # shell of thickness 2 with top...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,492
CadQuery/cadquery
refs/heads/master
/tests/__init__.py
from cadquery import * from OCP.gp import gp_Vec import unittest import sys import os def readFileAsString(fileName): f = open(fileName, "r") s = f.read() f.close() return s def writeStringToFile(strToWrite, fileName): f = open(fileName, "w") f.write(strToWrite) f.close() def makeUnitS...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,493
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/jupyter_tools.py
from typing import Dict, Any, List from json import dumps from IPython.display import Javascript from .exporters.vtk import toString from .shapes import Shape from ..assembly import Assembly from .assembly import toJSON DEFAULT_COLOR = [1, 0.8, 0, 1] TEMPLATE_RENDER = """ function render(data, parent_element, rat...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,494
CadQuery/cadquery
refs/heads/master
/examples/Ex015_Rotated_Workplanes.py
import cadquery as cq # 1. Establishes a workplane that an object can be built on. # 1a. Uses the named plane orientation "front" to define the workplane, meaning # that the positive Z direction is "up", and the negative Z direction # is "down". # 2. Creates a plain box to base future geometry on with the bo...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,495
CadQuery/cadquery
refs/heads/master
/examples/Ex003_Pillow_Block_With_Counterbored_Holes.py
import cadquery as cq # These can be modified rather than hardcoding values for each dimension. length = 80.0 # Length of the block width = 100.0 # Width of the block thickness = 10.0 # Thickness of the block center_hole_dia = 22.0 # Diameter of center hole in block cbore_hole_diameter = 2.4 # Bolt shank/threads ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,496
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/importers/dxf.py
from collections import OrderedDict from math import pi from typing import List from ... import cq from ..geom import Vector from ..shapes import Shape, Edge, Face, sortWiresByBuildOrder import ezdxf from OCP.ShapeAnalysis import ShapeAnalysis_FreeBounds from OCP.TopTools import TopTools_HSequenceOfShape from OCP.gp...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,497
CadQuery/cadquery
refs/heads/master
/cadquery/units.py
from math import pi RAD2DEG = 180 / pi DEG2RAD = pi / 180
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,498
CadQuery/cadquery
refs/heads/master
/examples/Ex009_Polylines.py
import cadquery as cq # These can be modified rather than hardcoding values for each dimension. # Define up our Length, Height, Width, and thickness of the beam (L, H, W, t) = (100.0, 20.0, 20.0, 1.0) # Define the points that the polyline will be drawn to/thru pts = [ (0, H / 2.0), (W / 2.0, H / 2.0), (W ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,499
CadQuery/cadquery
refs/heads/master
/setup.py
# Copyright 2015 Parametric Products Intellectual Holdings, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,500
CadQuery/cadquery
refs/heads/master
/cadquery/types.py
from typing import Union Real = Union[int, float]
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,501
CadQuery/cadquery
refs/heads/master
/examples/Ex007_Using_Point_Lists.py
import cadquery as cq # These can be modified rather than hardcoding values for each dimension. plate_radius = 2.0 # The radius of the plate that will be extruded hole_pattern_radius = 0.25 # Radius of circle where the holes will be placed thickness = 0.125 # The thickness of the plate that will be extruded # Make...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,502
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/exporters/dxf.py
"""DXF export utilities.""" from typing import Any, Dict, List, Literal, Optional, Tuple, Union import ezdxf from ezdxf import units, zoom from ezdxf.entities import factory from OCP.GeomConvert import GeomConvert from OCP.gp import gp_Dir from OCP.GC import GC_MakeArcOfEllipse from typing_extensions import Self fro...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,503
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/sketch_solver.py
from typing import Tuple, Union, Any, Callable, List, Optional, Iterable, Dict, Sequence from typing_extensions import Literal from nptyping import NDArray as Array from nptyping import Float from itertools import accumulate, chain from math import sin, cos, radians from numpy import array, full, inf, sign from numpy....
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,504
CadQuery/cadquery
refs/heads/master
/tests/test_jupyter.py
from tests import BaseTest import cadquery as cq from cadquery.occ_impl.jupyter_tools import display class TestJupyter(BaseTest): def test_repr_javascript(self): cube = cq.Workplane("XY").box(1, 1, 1) assy = cq.Assembly().add(cube) shape = cube.val() self.assertIsInstance(shape, ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,505
CadQuery/cadquery
refs/heads/master
/tests/test_examples.py
import pytest from glob import glob from itertools import chain, count from path import Path from docutils.parsers.rst import directives from docutils.core import publish_doctree from docutils.utils import Reporter import cadquery as cq from cadquery import cqgi from cadquery.cq_directive import cq_directive def ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,506
CadQuery/cadquery
refs/heads/master
/examples/Ex014_Offset_Workplanes.py
import cadquery as cq # 1. Establishes a workplane that an object can be built on. # 1a. Uses the named plane orientation "front" to define the workplane, meaning # that the positive Z direction is "up", and the negative Z direction # is "down". # 2. Creates a 3D box that will have geometry based off it late...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,507
CadQuery/cadquery
refs/heads/master
/tests/test_importers.py
""" Tests file importers such as STEP """ # core modules import tempfile import os from cadquery import importers, Workplane from tests import BaseTest from pytest import approx, raises # where unit test output will be saved OUTDIR = tempfile.gettempdir() # test data directory testdataDir = os.path.join(os.path....
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,508
CadQuery/cadquery
refs/heads/master
/examples/Ex101_InterpPlate.py
from math import sin, cos, pi, sqrt import cadquery as cq # TEST_1 # example from PythonOCC core_geometry_geomplate.py, use of thickness = 0 returns 2D surface. thickness = 0 edge_points = [(0.0, 0.0, 0.0), (0.0, 10.0, 0.0), (0.0, 10.0, 10.0), (0.0, 0.0, 10.0)] surface_points = [(5.0, 5.0, 5.0)] plate_0 = cq.Workplane...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,509
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/exporters/assembly.py
import os.path import uuid from tempfile import TemporaryDirectory from shutil import make_archive from itertools import chain from typing_extensions import Literal from vtkmodules.vtkIOExport import vtkJSONSceneExporter, vtkVRMLExporter from vtkmodules.vtkRenderingCore import vtkRenderer, vtkRenderWindow from OCP.X...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,510
CadQuery/cadquery
refs/heads/master
/examples/Ex020_Rounding_Corners_with_Fillets.py
import cadquery as cq # Create a plate with 4 rounded corners in the Z-axis. # 1. Establishes a workplane that an object can be built on. # 1a. Uses the X and Y origins to define the workplane, meaning that the # positive Z direction is "up", and the negative Z direction is "down". # 2. Creates a plain box to ba...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,511
CadQuery/cadquery
refs/heads/master
/conda/web-installer/build.py
import sys import os import subprocess from jinja2 import Environment, select_autoescape, FileSystemLoader def usage(): print("Web installer build script") print("build.py <installer version> <tag version>") print( "The installer verison is the version number used within the conda constructor scri...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,512
CadQuery/cadquery
refs/heads/master
/examples/Ex008_Polygon_Creation.py
import cadquery as cq # These can be modified rather than hardcoding values for each dimension. width = 3.0 # The width of the plate height = 4.0 # The height of the plate thickness = 0.25 # The thickness of the plate polygon_sides = 6 # The number of sides that the polygonal holes should have polygon_dia = 1.0 #...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,513
CadQuery/cadquery
refs/heads/master
/tests/test_vis.py
from cadquery import Workplane, Assembly, Sketch from cadquery.vis import show, show_object import cadquery.occ_impl.exporters.assembly as assembly import cadquery.vis as vis from vtkmodules.vtkRenderingCore import vtkRenderWindow, vtkRenderWindowInteractor from pytest import fixture, raises @fixture def wp(): ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,514
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/exporters/json.py
""" Objects that represent three.js JSON object notation https://github.com/mrdoob/three.js/wiki/JSON-Model-format-3.0 """ JSON_TEMPLATE = """\ { "metadata" : { "formatVersion" : 3, "generatedBy" : "ParametricParts", "vertices" : %(nVertices)d, "faces" ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,515
CadQuery/cadquery
refs/heads/master
/examples/Ex023_Sweep.py
import cadquery as cq # Points we will use to create spline and polyline paths to sweep over pts = [(0, 1), (1, 2), (2, 4)] # Spline path generated from our list of points (tuples) path = cq.Workplane("XZ").spline(pts) # Sweep a circle with a diameter of 1.0 units along the spline path we just created defaultSweep =...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,516
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/exporters/amf.py
import xml.etree.cElementTree as ET class AmfWriter(object): def __init__(self, tessellation): self.units = "mm" self.tessellation = tessellation def writeAmf(self, outFile): amf = ET.Element("amf", units=self.units) # TODO: if result is a compound, we need to loop through th...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,517
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/geom.py
import math from typing import overload, Sequence, Union, Tuple, Type, Optional from OCP.gp import ( gp_Vec, gp_Ax1, gp_Ax3, gp_Pnt, gp_Dir, gp_Pln, gp_Trsf, gp_GTrsf, gp_XYZ, gp_EulerSequence, gp, ) from OCP.Bnd import Bnd_Box from OCP.BRepBndLib import BRepBndLib from OCP...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,518
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/shapes.py
from typing import ( Optional, Tuple, Union, Iterable, List, Sequence, Iterator, Dict, Any, overload, TypeVar, cast as tcast, ) from typing_extensions import Literal, Protocol from io import BytesIO from vtkmodules.vtkCommonDataModel import vtkPolyData from vtkmodules.v...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,519
CadQuery/cadquery
refs/heads/master
/examples/Ex010_Defining_an_Edge_with_a_Spline.py
import cadquery as cq # 1. Establishes a workplane to create the spline on to extrude. # 1a. Uses the X and Y origins to define the workplane, meaning that the # positive Z direction is "up", and the negative Z direction is "down". s = cq.Workplane("XY") # The points that the spline will pass through sPnts = [ (...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,520
CadQuery/cadquery
refs/heads/master
/cadquery/vis.py
from . import Shape, Workplane, Assembly, Sketch, Compound, Color from .occ_impl.exporters.assembly import _vtkRenderWindow from .occ_impl.jupyter_tools import DEFAULT_COLOR from typing import Union from OCP.TopoDS import TopoDS_Shape from vtkmodules.vtkInteractionWidgets import vtkOrientationMarkerWidget from vtkmo...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,521
CadQuery/cadquery
refs/heads/master
/cadquery/utils.py
from functools import wraps from inspect import signature from typing import TypeVar, Callable, cast from warnings import warn from multimethod import multimethod, DispatchError TCallable = TypeVar("TCallable", bound=Callable) class deprecate_kwarg: def __init__(self, name, new_value): self.name = name...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,522
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/exporters/svg.py
import io as StringIO from ..shapes import Shape, Compound, TOLERANCE from ..geom import BoundBox from OCP.gp import gp_Ax2, gp_Pnt, gp_Dir from OCP.BRepLib import BRepLib from OCP.HLRBRep import HLRBRep_Algo, HLRBRep_HLRToShape from OCP.HLRAlgo import HLRAlgo_Projector from OCP.GCPnts import GCPnts_QuasiUniformDefl...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,523
CadQuery/cadquery
refs/heads/master
/tests/test_exporters.py
""" Tests exporters """ # core modules import os import io from pathlib import Path import re import sys import math import pytest import ezdxf from pytest import approx # my modules from cadquery import ( exporters, importers, Sketch, Workplane, Edge, Vertex, Assembly, Plane, ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,524
CadQuery/cadquery
refs/heads/master
/tests/test_assembly.py
import pytest import os from itertools import product from math import degrees import copy from pathlib import Path, PurePath import re import cadquery as cq from cadquery.occ_impl.exporters.assembly import ( exportAssembly, exportCAF, exportVTKJS, exportVRML, ) from cadquery.occ_impl.assembly import t...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,525
CadQuery/cadquery
refs/heads/master
/tests/test_selectors.py
__author__ = "dcowden" """ Tests for CadQuery Selectors These tests do not construct any solids, they test only selectors that query an existing solid """ import math import unittest import sys import os.path # my modules from tests import BaseTest, makeUnitCube, makeUnitSquareWire from cadquery import...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,526
CadQuery/cadquery
refs/heads/master
/examples/Ex022_Revolution.py
import cadquery as cq # The dimensions of the model. These can be modified rather than changing the # shape's code directly. rectangle_width = 10.0 rectangle_length = 10.0 angle_degrees = 360.0 # Revolve a cylinder from a rectangle # Switch comments around in this section to try the revolve operation with different p...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,527
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/importers/__init__.py
from math import pi from typing import List, Literal import OCP.IFSelect from OCP.STEPControl import STEPControl_Reader from ... import cq from ..shapes import Shape from .dxf import _importDXF RAD2DEG = 360.0 / (2 * pi) class ImportTypes: STEP = "STEP" DXF = "DXF" class UNITS: MM = "mm" IN = "in...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,528
CadQuery/cadquery
refs/heads/master
/examples/Ex024_Sweep_With_Multiple_Sections.py
import cadquery as cq # X axis line length 20.0 path = cq.Workplane("XZ").moveTo(-10, 0).lineTo(10, 0) # Sweep a circle from diameter 2.0 to diameter 1.0 to diameter 2.0 along X axis length 10.0 + 10.0 defaultSweep = ( cq.Workplane("YZ") .workplane(offset=-10.0) .circle(2.0) .workplane(offset=10.0) ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,529
CadQuery/cadquery
refs/heads/master
/examples/Ex006_Moving_the_Current_Working_Point.py
import cadquery as cq # These can be modified rather than hardcoding values for each dimension. circle_radius = 3.0 # The outside radius of the plate thickness = 0.25 # The thickness of the plate # Make a plate with two cutouts in it by moving the workplane center point # 1. Establishes a workplane that an object ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,530
CadQuery/cadquery
refs/heads/master
/cadquery/cqgi.py
""" The CadQuery Gateway Interface. Provides classes and tools for executing CadQuery scripts """ import ast import traceback import time import cadquery CQSCRIPT = "<cqscript>" def parse(script_source): """ Parses the script as a model, and returns a model. If you would prefer to access the underlying ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,531
CadQuery/cadquery
refs/heads/master
/cadquery/occ_impl/assembly.py
from typing import ( Union, Iterable, Iterator, Tuple, Dict, overload, Optional, Any, List, cast, ) from typing_extensions import Protocol from math import degrees from OCP.TDocStd import TDocStd_Document from OCP.TCollection import TCollection_ExtendedString from OCP.XCAFDoc im...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,532
CadQuery/cadquery
refs/heads/master
/examples/Ex011_Mirroring_Symmetric_Geometry.py
import cadquery as cq # 1. Establishes a workplane that an object can be built on. # 1a. Uses the named plane orientation "front" to define the workplane, meaning # that the positive Z direction is "up", and the negative Z direction # is "down". # 2. A horizontal line is drawn on the workplane with the hLine...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,533
CadQuery/cadquery
refs/heads/master
/examples/Ex018_Making_Lofts.py
import cadquery as cq # Create a lofted section between a rectangle and a circular section. # 1. Establishes a workplane that an object can be built on. # 1a. Uses the named plane orientation "front" to define the workplane, meaning # that the positive Z direction is "up", and the negative Z direction # is "d...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,534
CadQuery/cadquery
refs/heads/master
/examples/Ex019_Counter_Sunk_Holes.py
import cadquery as cq # Create a plate with 4 counter-sunk holes in it. # 1. Establishes a workplane using an XY object instead of a named plane. # 2. Creates a plain box to base future geometry on with the box() function. # 3. Selects the top-most face of the box and established a workplane on that. # 4. Draws a ...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,535
CadQuery/cadquery
refs/heads/master
/cadquery/selectors.py
""" Copyright (C) 2011-2015 Parametric Products Intellectual Holdings, LLC This file is part of CadQuery. CadQuery is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,536
CadQuery/cadquery
refs/heads/master
/examples/Ex021_Splitting_an_Object.py
import cadquery as cq # Create a simple block with a hole through it that we can split. # 1. Establishes a workplane that an object can be built on. # 1a. Uses the X and Y origins to define the workplane, meaning that the # positive Z direction is "up", and the negative Z direction is "down". # 2. Creates a plai...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,537
CadQuery/cadquery
refs/heads/master
/cadquery/cq.py
""" Copyright (C) 2011-2015 Parametric Products Intellectual Holdings, LLC This file is part of CadQuery. CadQuery is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,538
CadQuery/cadquery
refs/heads/master
/tests/test_cad_objects.py
# system modules import math import pytest import unittest from tests import BaseTest from OCP.gp import gp_Vec, gp_Pnt, gp_Ax2, gp_Circ, gp_Elips, gp, gp_XYZ, gp_Trsf from OCP.BRepBuilderAPI import BRepBuilderAPI_MakeEdge from cadquery import * DEG2RAD = math.pi / 180 RAD2DEG = 180 / math.pi class TestCadObjects(B...
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,539
CadQuery/cadquery
refs/heads/master
/examples/Ex013_Locating_a_Workplane_on_a_Vertex.py
import cadquery as cq # 1. Establishes a workplane that an object can be built on. # 1a. Uses the named plane orientation "front" to define the workplane, meaning # that the positive Z direction is "up", and the negative Z direction # is "down". # 2. Creates a 3D box that will have a hole placed in it later....
{"/cadquery/hull.py": ["/cadquery/occ_impl/shapes.py", "/cadquery/occ_impl/geom.py"], "/examples/Ex017_Shelling_to_Create_Thin_Features.py": ["/cadquery/__init__.py"], "/cadquery/occ_impl/exporters/threemf.py": ["/cadquery/cq.py"], "/tests/test_sketch.py": ["/cadquery/sketch.py", "/cadquery/selectors.py"], "/cadquery/_...
44,552
AlysonBasilio/Alfred
refs/heads/master
/app/run.py
import flask import psycopg2 import flask_login from app.models.User import User app = flask.Flask(__name__, static_url_path='') app.secret_key = 'comp18' login_manager = flask_login.LoginManager() login_manager.init_app(app) con = psycopg2.connect(port="5432", host="localhost", user="alyson", password="123456", ...
{"/app/run.py": ["/app/models/User.py"]}
44,553
AlysonBasilio/Alfred
refs/heads/master
/app/models/User.py
import psycopg2 class User: def __init__(self,username): self.username = username self.auth = False self.active = False def authenticate(self,password): con = psycopg2.connect(port="5432", host="localhost", user="alyson", password="123456", dbname...
{"/app/run.py": ["/app/models/User.py"]}
44,554
shellydeforte/deconstruct_lc
refs/heads/master
/deconstruct_lc/drosophila/run_drosophila.py
import os import pandas as pd from deconstruct_lc import read_config from deconstruct_lc import tools_fasta from deconstruct_lc.scores.norm_score import NormScore class Drosophila(object): def __init__(self): config = read_config.read_config() data_dp = os.path.join(config['fps']['data_dp']) ...
{"/deconstruct_lc/drosophila/run_drosophila.py": ["/deconstruct_lc/scores/norm_score.py"], "/deconstruct_lc/experiment/write_marcotte_scores.py": ["/deconstruct_lc/scores/norm_score.py"], "/deconstruct_lc/experiment/hexandiol.py": ["/deconstruct_lc/scores/norm_score.py"], "/deconstruct_lc/data_pdb/run.py": ["/deconstru...
44,555
shellydeforte/deconstruct_lc
refs/heads/master
/deconstruct_lc/experiment/write_marcotte_scores.py
import os import pandas as pd from deconstruct_lc import read_config from deconstruct_lc import tools_fasta from deconstruct_lc.scores.norm_score import NormScore class MarcotteScores(object): def __init__(self): config = read_config.read_config() data_dp = os.path.join(config['fps']['data_dp']) ...
{"/deconstruct_lc/drosophila/run_drosophila.py": ["/deconstruct_lc/scores/norm_score.py"], "/deconstruct_lc/experiment/write_marcotte_scores.py": ["/deconstruct_lc/scores/norm_score.py"], "/deconstruct_lc/experiment/hexandiol.py": ["/deconstruct_lc/scores/norm_score.py"], "/deconstruct_lc/data_pdb/run.py": ["/deconstru...
44,556
shellydeforte/deconstruct_lc
refs/heads/master
/deconstruct_lc/experiment/hexandiol.py
import os import pandas as pd import numpy as np import matplotlib.pyplot as plt from Bio.SeqUtils.ProtParam import ProteinAnalysis from sklearn.ensemble import RandomForestClassifier from sklearn.model_selection import cross_val_score from deconstruct_lc import read_config from deconstruct_lc import tools_fasta from ...
{"/deconstruct_lc/drosophila/run_drosophila.py": ["/deconstruct_lc/scores/norm_score.py"], "/deconstruct_lc/experiment/write_marcotte_scores.py": ["/deconstruct_lc/scores/norm_score.py"], "/deconstruct_lc/experiment/hexandiol.py": ["/deconstruct_lc/scores/norm_score.py"], "/deconstruct_lc/data_pdb/run.py": ["/deconstru...