text
string
size
int64
token_count
int64
# --------------------------------------------------------------------- # Vendor: Cisco # OS: SCOS # --------------------------------------------------------------------- # Copyright (C) 2007-2012 The NOC Project # See LICENSE for details # --------------------------------------------------------------------- # NO...
1,398
432
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
4,825
1,579
__version__ = "0.1.0" from tle_download.main import get_tles, write_tles
74
32
import numpy as np import random def align(pair,sequences,scoring_matrix,penalties,aa_dict): seq1, seq2 = sequences[pair[0]], sequences[pair[1]] #Create matrix F (containing maximum scores up to cell F(i,j)) and tracking matrix P (containing the tracking flag describing whether the step into the cell was a match or...
4,125
1,822
"""Support for the Netatmo climate schedule selector.""" from __future__ import annotations import logging from homeassistant.components.select import SelectEntity from homeassistant.config_entries import ConfigEntry from homeassistant.core import HomeAssistant, callback from homeassistant.helpers.dispatcher import a...
4,346
1,330
# Ivan Carvalho # Solution to https://www.urionlinejudge.com.br/judge/problems/view/1943 #!/usr/bin/env python2.7 # encoding : utf-8 e = int(raw_input()) if e == 1: print "Top 1" elif e <= 3: print "Top 3" elif e <= 5: print "Top 5" elif e <= 10: print "Top 10" elif e <= 25: print "Top 25" elif e <= 50: print "To...
349
174
from dataclasses import dataclass, field from typing import Optional __NAMESPACE__ = "sdformat/v1.5/physics.xsd" @dataclass class Physics: """ The physics tag specifies the type and properties of the dynamics engine. Parameters ---------- max_step_size: Maximum time step size at which every syst...
21,889
5,498
# -*- coding: utf-8 -*- # # Copyright 2013 Google Inc. All Rights Reserved. # # 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 requir...
4,826
1,348
from .main import main as run # noqa: F401 __version__ = '0.0.3'
66
30
# Copyright (c) OpenMMLab. All rights reserved. from .darts_backbone import DartsBackbone from .searchable_mobilenet import SearchableMobileNet from .searchable_shufflenet_v2 import SearchableShuffleNetV2 __all__ = ['DartsBackbone', 'SearchableShuffleNetV2', 'SearchableMobileNet']
283
93
#!/usr/bin/env python # Copyright 2018-present Facebook, Inc. # # 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 applica...
2,013
762
from lxml import html from d_parser.d_spider_common import DSpiderCommon from d_parser.helpers.re_set import Ree from helpers.url_generator import UrlGenerator from d_parser.helpers.stat_counter import StatCounter as SC VERSION = 29 # Warn: Don't remove task argument even if not use it (it's break grab and spider ...
5,639
1,593
from tkinter import Label, GROOVE from willsmith.gui_display_controller import GUIDisplayController class MCTSDisplay(GUIDisplayController): """ The display controller for MCTSAgent. Creates a Tkinter GUI that displays some stats about the agent's latest moves. """ WINDOW_TITLE = "MCTS Age...
2,007
691
#!/usr/bin/python3 import logging import argparse from time import time import toml from data.io.knowledge_graph import KnowledgeGraph from data.io.tarball import Tarball from data.io.tsv import TSV from data.utils import is_readable, is_writable from embeddings import graph_structure from tasks.node_classification ...
9,461
2,844
import argparse, time, os, cv2, shutil, datetime, math, subprocess, pickle, multiprocessing from actn import * ap = argparse.ArgumentParser() # for help -> python alpha.py --help ap.add_argument("-f", "--file", required=True, help="name of the file") ap.add_argument("-o", "--output", required=True, ...
9,343
3,068
from dcim.choices import DeviceStatusChoices from dcim.models import Device from extras.reports import Report class DeviceIPReport(Report): description = ( "Check that every device has either an IPv4 or IPv6 primary address assigned" ) def test_primary_ip4(self): for device in Device.obje...
2,168
514
import socket import random import os import requests import re import github import minecraft import string import sys HOST = "xeroxirc.net" PORT = 6667 NICK = "ak_sus" #PASSWORD = os.getenv("PASSWORD") CHANNEL = "#BlockySurvival" SERVER = "" readbuffer = "" def send(message): s.send(message) print(message) s ...
3,940
1,495
""" The file defines the evaluate process on target dataset. @Author: Yang Lu @Github: https://github.com/luyanger1799 @Project: https://github.com/luyanger1799/amazing-semantic-segmentation """ from sklearn.metrics import multilabel_confusion_matrix from amazingutils.helpers import * from amazingutils.utils import l...
3,456
1,133
from pso.GPSO import GPSO import numpy as np import time import pandas as pd np.random.seed(42) # f1 完成 def Sphere(p): # Sphere函数 out_put = 0 for i in p: out_put += i ** 2 return out_put # f2 完成 def Sch222(x): out_put = 0 out_put01 = 1 for i in x: out_put += abs(i) ...
6,524
3,202
# # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # from setuptools import setup import setuptools setup( name='contrail-server-manager', version='0.1dev', packages=setuptools.find_packages(exclude=["*.pyc"]), zip_safe=False, long_description="Server Manager package", )
310
106
# Test restoring a scene with multiple lists with different number # of fiducials # first fiducial list displayNode1 = slicer.vtkMRMLMarkupsDisplayNode() slicer.mrmlScene.AddNode(displayNode1) fidNode1 = slicer.vtkMRMLMarkupsFiducialNode() fidNode1.SetName("FidNode1") slicer.mrmlScene.AddNode(fidNode1) fidNode1.Set...
6,272
2,299
# -*- coding:utf-8 -*- # @Time : 2019/7/21 12:35 PM # @Author : __wutonghe__ # docs https://channels.readthedocs.io/en/latest/tutorial/part_3.html#rewrite-the-consumer-to-be-asynchronous from channels.generic.websocket import AsyncWebsocketConsumer import json class MessageConsumer(AsyncWebsocketConsumer): "...
1,013
413
import eagerpy as ep import numpy as np from scipy.interpolate import RegularGridInterpolator import hypney tl = ep.numpy def test_regular_grid_interpolator(): """Adapted from https://github.com/sbarratt/torch_interpolations/blob/master/tests/test_grid_interpolator.py """ points = [tl.arange(-0.5, 2...
2,618
1,100
#!/usr/bin/python3 ########################################## # Routino database access from Python. # # Part of the Routino routing software. ########################################## # This file Copyright 2018 Andrew M. Bishop # # This program is free software: you can redistribute it and/or modify # it under the te...
8,451
2,696
import io from .. import util def test_parsing_pkg_info_file(mocker): open_mock = mocker.patch('vcsver.util.open') open_mock.return_value = io.StringIO( 'Name: name\n' 'Version: 1.0\n' ) pkg_info_data = util.parse_pkg_info_file(mocker.sentinel.path) open_mock = open_mock.assert_...
475
186
def determinant(matA): dimA = [] # find dimensions of arrA a = matA while type(a) == list: dimA.append(len(a)) a = a[0] #is it square if dimA[0] != dimA[1]: raise Exception("Matrix is not square") #find determinant total = 0 if dimA[0] == 2: total = ma...
820
306
# # PySNMP MIB module BAY-STACK-MIB (http://snmplabs.com/pysmi) # ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/BAY-STACK-MIB # Produced by pysmi-0.3.4 at Mon Apr 29 17:19:06 2019 # On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4 # Using Python version 3.7.3 (default, Mar 27 201...
5,498
2,149
#!/usr/bin/env python # This "flattens" a LaTeX document by replacing all # \input{X} lines w/ the text actually contained in X. See # associated README.md for details. # Use as a python module in a python script by saying import flatex then flatex.main(in file, out file) import os import re import sys de...
2,184
738
from .encrypt import register
30
8
import datetime import os import pandas from polygon.rest.client import RESTClient def ts_to_datetime(ts) -> str: return datetime.datetime.fromtimestamp(ts / 1000.0).strftime('%Y-%m-%d %H:%M') def pull_day(Symbol, from_): POLYGON_API_KEY = os.environ.get('POLYGON_API_KEY') enddate = dateti...
1,600
597
from random import choice, randint from re import sub, split, findall from string import ascii_letters from subprocess import PIPE, Popen from sys import argv, executable, stderr from .responses import pronouns, reactions, remarks def owoify(text): if type(text) == bytes: text = str(text)[2:-1].replace("...
1,595
545
import os from fabric.api import env, run, sudo, execute, local, settings, \ hide, open_shell, parallel, serial, put from fabric.decorators import hosts from fabric.contrib.console import confirm import fabric.colors as fab_col import paramiko import getpass from tabulate import tabulate file_hosts = "hosts.txt" ...
6,966
2,104
objects = {} def instantiate(): # This function is called once during server startup. Modify the global 'objects' dict with of instantiated # shared objects that you wish to store in the parent process and have access to from child request handler # processes. Each object must support being shared via...
781
214
# Copyright 2017 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json from google.appengine.ext import ndb from google.protobuf import json_format from google.protobuf import struct_pb2 from protorpc import message...
10,398
3,539
""" This package implements random variables. Random variables are the primary in- and outputs of probabilistic numerical methods. A generic signature of such methods looks like this: .. highlight:: python .. code-block:: python randvar_out, info = probnum_method(problem, randvar_in, **kwargs) """ from ._dirac ...
1,606
474
from app import App import requests import json import polling2 from behave import step from openshift import Openshift from util import substitute_scenario_id from string import Template class GenericTestApp(App): deployment_name_pattern = "{name}" def __init__(self, name, namespace, app_image="ghcr.io/mul...
6,147
1,878
import json import logging from math import sqrt, floor, ceil, log10 from copy import deepcopy logger = logging.getLogger(__name__) def limit_pairs(pairs): # Hack to limit aspect ratios when there are a lot of choices if len(pairs) > 12: new_pairs = [] log10_aspect_ratios = [-0.3, 0, 0.3] ...
8,033
2,595
from rest_framework.throttling import SimpleRateThrottle class ForcedPhotRateThrottle(SimpleRateThrottle): """ Limits the rate of API calls by different amounts for various parts of the API. Any view that has the `throttle_scope` property set will be throttled. The unique cache key will be generated...
1,804
497
# encoding: utf-8 from test.vim_test_case import VimTestCase as _VimTest from test.constant import * from test.util import running_on_windows class SnippetOptions_OnlyExpandWhenWSInFront_Expand(_VimTest): snippets = ("test", "Expand me!", "", "b") keys = "test" + EX wanted = "Expand me!" class SnippetOp...
9,206
3,486
from scipy.optimize import minimize class Solver(object): # initialize the object def __init__(self, servers, alpha, teta, lambda_s): self.c_prime = 0 self.teta = teta self.alpha = alpha self.lambda_s = lambda_s # fill servers specification in arrays for solver use ...
3,119
910
# This code is licensed under the MIT License (see LICENSE file for details) import threading import time from ..util import smart_serial from ..util import property_device from ..util import state_stack from ..config import scope_configuration from . import iotool def _make_dac_bytes(IIC_Addr, bit): dac_bytes =...
9,444
3,066
"""Performance testing utility.""" from ._format_perf_counter import format_perf_counter from ._multi_case_timer import MultiCaseTimer from ._util import plot_run, to_dataframe from ._wrappers import run_multivariate_test __all__ = [ "MultiCaseTimer", "run_multivariate_test", "format_perf_counter", "p...
352
121
import numpy as np import torch from sklearn.metrics import roc_auc_score from sklearn.metrics import average_precision_score def test(model, features, adj, sparse, adj_sparse, test_edges, test_edges_false): eps = 1e-4 embeds, _,_, S= model.embed(features, adj, sparse, None, 100) embs = embeds[0, :] ...
1,951
755
import email import logging import re from imapclient import IMAPClient class IMAPError(IOError): pass class ImapWrapper: """A wrapper around imaplib, since that's a bit lower-level than I'd prefer to work with.""" #This regex is: # list of flags in parens # quoted delimiter # possible-q...
3,143
980
VERSION = '2.11.2'
19
14
import logging import os import pandas as pd from .example_filetype_format import FileTypeFormat from . import process_functions logger = logging.getLogger(__name__) class seg(FileTypeFormat): _fileType = "seg" _process_kwargs = ["newPath", "databaseSynId"] def _validateFilename(self, filePath): ...
2,527
860
import sys from . import app sys.path.append(str(app.config['LIB_PATH'])) from musicautobot.music_transformer import * from musicautobot.config import * from flask import Response, send_from_directory, send_file, request, jsonify from .save import to_s3 import torch import traceback torch.set_num_threads(4) data = ...
3,150
1,182
from __future__ import absolute_import, division, print_function from tests.core import mock from trakt import Trakt from httmock import HTTMock import pytest def test_likes(): with HTTMock(mock.fixtures, mock.unknown): with Trakt.configuration.auth('mock', 'mock'): likes = Trakt['users'].li...
1,086
372
import sys import PyQt5.QtWidgets as qtw import PyQt5.QtCore as qtc from Image import Image from main_layout import Ui_MainWindow import logging import os logger = logging.getLogger(__name__) logger.setLevel(logging.INFO) formatter = logging.Formatter('%(levelname)s:%(name)s:%(asctime)s - %(message)s') file_handler ...
12,983
4,034
from django import forms # Form for create sales class FormSales(forms.Form): # Atributes for form # NOTE: date_creation and total fields, it will be created dynamically name = forms.CharField(label="Nombre", max_length=50, required=True, ...
1,029
264
# -*- coding: utf-8 -*- """Pipeline for VarGenPath""" from typing import Optional from .constants import LINKSET_PATH, FILE_TYPES from .utils import ( get_cytoscape_connection, get_associated_genes, var_genes_network, extend_vargen_network, save_session, save_image, save_network ) def get_vargenpath_network...
2,159
689
# coding=utf-8 # Copyright 2021 Google 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 applicable law or agreed ...
1,485
538
from models import shoe_box def createHBjsons() -> None: for i in range(4): # increment on shoebox dimensions _width = 4.0 + i*0.5 _height = 3.5 + i*0.1 _depth = 4.0 + i*0.5 # init shoe_box sb = shoe_box.Shoebox(width=_width , height=_height , depth=_...
699
254
from reikna.core.signature import Type, Annotation, Parameter, Signature from reikna.core.computation import Computation from reikna.core.transformation import Transformation, Indices
184
50
from sqlalchemy import engine_from_config from sqlalchemy.ext.declarative import declarative_base from sqlalchemy.orm import sessionmaker from sqlalchemy.schema import MetaData import zope.sqlalchemy from .node import Node NAMING_CONVENTION = { "ix": 'ix_%(column_0_label)s', "uq": "uq_%(table_name)s_%(column_0...
1,234
436
from __future__ import absolute_import from __future__ import print_function from __future__ import division def Shape(visitor, node): input = visitor.visit(node.input[0]) shape = input.shape if (input.get_layout() is not None and input.get_onnx_layout() is not None and input.get_layout() !=...
458
149
import typing from typing import ( Any, Callable, Dict, Iterable, List, Literal, Optional, Set, Tuple, Union, ) from ncadquery import Workplane from OCP.Quantity import Quantity_NameOfColor from OCP.TCollection import TCollection_ExtendedString from OCP.TDataStd import TDataStd_...
17,072
5,083
from flyingObject import FlyingObject from bullet import Bullet import random class Hero(FlyingObject): """英雄机""" index = 2 # 标志位 def __init__(self, screen, images): # self.screen = screen self.images = images # 英雄级图片数组,为Surface实例 # image = pygame.image.load(images[0]) i...
5,134
1,832
import sys import pygame as pg import numpy as np import random import time pic = np.zeros(shape=(128,64)) width = 128 height = 64 refresh_rate = 60 interval = 1 / refresh_rate bootrom_file = "bootrom0" rom_file = "rom" # rom_file = "hello_world" debug = False pg.display.init() display = pg.display.set_mode((width*4...
21,118
9,462
from __future__ import print_function import json import os class Data(): shared_state = {} def __init__(self): self.__dict__ = self.shared_state self.set_checklist(None) self.set_issues() def set_checklist(self, file_name): is_empty = file_name is None if is_empt...
1,423
438
# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTests.test_write -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Main program for the child process run by L{twisted.test.test_stdio.StandardInputOutputTests.test_write} to test that ITransport.write() works for process tr...
851
269
# calculate the load on each org import threading # cannot use from wpad_dispatch here, have to import whole module, # because of circular dependency import wpad_dispatch from wpad_utils import * from wlcg_wpad import getiporg orgcleanminutes = 5 orgcleantime = 0 # Minute records keep track of the number of requ...
4,133
1,157
import requests from datetime import datetime import time headers = { 'Content-Type': 'application/json' } with open('test/logs.txt', 'r') as f: logs = f.read().split('\n') levels = ['INFO', 'WARN', 'DEBUG', 'ERROR', 'TRACE'] messages = [] for i in range(0, len(logs)): if i % 100 == 0: print('{...
865
295
import os import sys sys.path.append(os.path.abspath('')) # Raises linting error because not at top of file # Not sure how to resolve this with the pathing from src import uploadJson # noqa: E402 import src.config as config # noqa: E402 # Taking out of commission until new geojson format requested developed # def te...
1,282
419
#!/usr/bin/env python """ Code is personal property of the owner.Rights reserved by the user only. Codes on https://github.com/kt97679/tetris Attempt to spread the open source knowledge :) """ import sys import select import tty import termios import random import os import time import fcntl if (sys.hexversion >> 16) ...
12,939
4,673
import time import json def export_users(ucm_axl): """ retrieve users from ucm """ try: user_list = ucm_axl.get_users( tagfilter={ "userid": "", "firstName": "", "lastName": "", "directoryUri": "", "tel...
11,471
3,130
host = "localhost" port = 9999 dboptions = { "host": "194.67.198.163", "user": "postgres", "password": "werdwerd2012", "database": "zno_bot", 'migrate': True } API_PATH = '/api/' API_VERSION = 'v1' API_URL = API_PATH + API_VERSION
256
119
import pandas as pd import numpy as np from sklearn.datasets import load_iris from sklearn.naive_bayes import GaussianNB import pickle def train_iris_nb(): """Train a GaussianNB model on iris dataset.""" X, y_train = load_iris(return_X_y=True, as_frame=True) colnames = X.columns X_train = X.values ...
829
283
# -*- coding: utf-8 -*- from .parserules import parseAll class UfoscrapyPipeline(object): def process_item(self, item, spider): """ Parsitaan regexin ja datetimen avulla kentät oikeaan muotoon. """ try: item['loc'] = item['loc'][0] except: item['...
746
227
# ***************************************************************************** # precompressed/context_processors.py # ***************************************************************************** """ A set of request processors that return dictionaries to be merged into a template context. Each function takes the re...
1,028
243
#Import modules import os import pandas as pd import numpy as np from pandas import DatetimeIndex import dask import scipy import time import glob import torch import torch.nn as nn from live_plotter import live_plotter import matplotlib.pyplot as plt from mpl_toolkits import mplot3d from functools impo...
6,612
2,111
import numpy as np import tensorflow as tf from tensorflow import keras import warnings warnings.filterwarnings('ignore') mnist = tf.keras.datasets.mnist (X_train, y_train), (X_test, y_test) = mnist.load_data() X_train, X_test = X_train / 255.0, X_test / 255.0 X_train.shape = (60000, 28, 28) model = tf.keras.Sequen...
911
380
__version__ = "2.1.0.dev0" from pyquil.quil import Program from pyquil.api import list_quantum_computers, get_qc
114
47
#!/bin/env python3.5 import math def test_func(x): return x*x*x+1.1*x*x+0.9*x-1.4 def df_test_func(x): return 3*x*x+2.2*x+0.9 # binary seperation def binary_seperation(func, x, ap=0.001): list(x).sort() x2 = x.pop() x1 = x.pop() y1 = func(x1) y2 = func(x2) if y1 == 0: re...
1,546
665
import unittest from rdflib import Graph def buildQueryArgs(q): return dict(select="", where="", optional="") class SPARQLParserTest(unittest.TestCase): known_issue = True def setUp(self): self.graph = Graph() pass def tearDown(self): pass tests = [ ("basic", """\ ...
3,428
1,335
class Frequency: def __init__(self): self.frequency = 0 def increment(self, i): self.frequency = self.frequency + i def decrement(self, i): self.frequency = self.frequency - i def __str__(self): return str(self.frequency) def __repr__(self): return str(self.fr...
1,228
435
#!/usr/bin/env python3 # -*- coding: future_fstrings -*- from db_sync_tool.utility import mode, system, output, helper from db_sync_tool.remote import client as remote_client from file_sync_tool.transfer import utility def transfer_files(): """ Transfering configured files between clients :return: ""...
5,122
1,587
# coding: utf-8 # # Training Set Analysis # The purpose of this notebook is to compute the kernel density estimate of the PDF between the judgement and each feature in a training set, in order to estimate how each feature is performing. # # # TODO # Modify features to use custom function score queries, and use ML to...
5,635
1,911
from operator import attrgetter, itemgetter from typing import ( Sequence, Any, Tuple, Union, List, Iterable, Dict, Callable, NamedTuple, ) SortSpec = NamedTuple("SortSpec", [("sort_key", Union[str, int]), ("reversed", bool)]) def optional_collection(argument, collection_factory)...
3,623
1,158
from django.contrib import admin from models import Location, ItemTemplate, Log, Inventory, Supplier class ItemTemplateAdmin(admin.ModelAdmin): filter_horizontal = ('supplies', 'suppliers') admin.site.register(Location) admin.site.register(ItemTemplate, ItemTemplateAdmin) admin.site.register(Log) admin.site.reg...
368
106
from typing import Dict, Type from injector import Module, Binder from core_get.actions.action import Action from core_get.actions.init.init import Init from core_get.actions.init.init_options import InitOptions from core_get.actions.install.install import Install from core_get.actions.install.install_options import ...
1,557
408
from panda3d.core import * # Leave these imports in, they may be used by ptf files. from panda3d.physics import * from . import Particles from . import ForceGroup from direct.directnotify import DirectNotifyGlobal class ParticleEffect(NodePath): notify = DirectNotifyGlobal.directNotify.newCategory('ParticleEff...
8,773
2,542
from django.core.exceptions import ValidationError from django.db import models from django.utils.functional import cached_property from django.utils.translation import ugettext_lazy as _ from jsonfield import JSONField from orchestra.models.fields import PrivateFileField from orchestra.models.queryset import group_by...
7,566
2,325
# -*- coding: utf-8 -*- ########## # IMPORT # ########## import plotly.offline as py import plotly.tools as tls tls.set_credentials_file(username='ducktypers', api_key='fd81wnx3lh') ######## # MAIN # ######## def draw_map(lon, lat, text, titre='NO TITLE'): """ Take 3 list as input, and the title of the ma...
1,264
439
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: acp.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection from google.protobuf im...
89,313
36,201
''' Uses HPI [[https://github.com/karlicoss/HPI/blob/master/doc/MODULES.org#myreddit][reddit]] module ''' from itertools import chain from typing import Set, Optional from ..common import Visit, Loc, extract_urls, Results, logger def index(*, render_markdown: bool = False, renderer: Optional['RedditRenderer'] = Non...
5,632
1,598
import optparse import sys from sys import getsizeof import logging from signal import signal, SIGINT import time import requests # MIT License # # Copyright (c) 2022 SaicharanKandukuri # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation file...
8,992
2,576
""" sphinx-simulink.application ~~~~~~~~~~~~~~~~~~~~~~~ Embed Simulink diagrams on your documentation. :copyright: Copyright 2016 by Dennis Edward Kalinowski <dekalinowski@gmail.com>. :license: MIT, see LICENSE for details. """ import matlab.engine import os from sphinx.errors import S...
2,974
907
from ._internal.frameworks.pytorch_lightning import load from ._internal.frameworks.pytorch_lightning import save from ._internal.frameworks.pytorch_lightning import load_runner __all__ = ["load", "load_runner", "save"]
221
71
from django import template from django.conf import settings register = template.Library() @register.simple_tag def settings_value(name): """ This Tag allows to access values from the configuration file in the templates. """ try: return settings.__getattr__(name) except AttributeError: ...
335
83
""" Author: Konstantinos Angelopoulos Date: 04/02/2020 All rights reserved. Feel free to use and modify and if you like it give it a star. Import the Robot's Step Files and Color/Scale/Assemble them using the instructions in /RoboDK/KUKA/KUKA LWR IV+ Description (for Original=kuka_lwr_model_description.json, for custo...
13,195
4,310
import unittest from context import parser class TVShowFileParserTests(unittest.TestCase): def setUp(self): self.filename = parser.Parser("test.2018.S01E01E02.mkv") def tearDown(self): self.filename = None def testisSubtitleFileSRT(self): self.assertFalse(self.filename.isSubs) ...
368
131
# -*- coding: utf-8 -*- # This file is part of Archdiffer and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ Created on Sat May 12 20:39:46 2018 @author: Pavla Kratochvilova <pavla.kratochvilova@gmail.com> """ from random import choice from datetime import datetime from ...
10,668
3,228
from urllib.parse import quote from django import template register = template.Library() @register.filter def urlify(value): return quote(value)
150
41
# Generated by Django 2.0.6 on 2018-06-11 23:50 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('producto', '0003_auto_20180611_2248'), ] operations = [ migrations.RenameModel( old_name='Venta', new_name='Ventas', ...
330
130
from datetime import datetime from pydantic import BaseModel from typing import Optional, List from fastapi import Query class Service(BaseModel): """ A class for single service """ id: str ptvId: Optional[str] = None type: Optional[str] = None subtype: Optional[str] = None organizati...
4,173
1,248
# IBM_PROLOG_BEGIN_TAG # This is an automatically generated prolog. # # $Source: src/test/testcases/testPSUReadSbeMem.py $ # # OpenPOWER sbe Project # # Contributors Listed Below - COPYRIGHT 2017,2019 # [+] International Business Machines Corp. # # # Licensed under the Apache License, Version 2.0 (the "License"); # you...
6,481
2,017
#!/usr/bin/env python3 """Module containing the ClusteringPredict class and the command line interface.""" import argparse import pandas as pd import joblib from biobb_common.generic.biobb_object import BiobbObject from sklearn.preprocessing import StandardScaler from biobb_common.configuration import settings from b...
9,780
2,846
from sprake import treeviz # we don't actually have any meaningful tests that we can do, but at least # we can do this
121
39
import sys tmpl = """ #include "yabs_mx_calc_table.h" #include <kernel/matrixnet/mn_sse.h> #include <library/archive/yarchive.h> #include <util/memory/blob.h> #include <util/generic/hash.h> #include <util/generic/ptr.h> #include <util/generic/singleton.h> using namespace NMatrixnet; extern "C" { extern const ...
1,926
771