src
stringlengths
721
1.04M
from http.server import HTTPServer, BaseHTTPRequestHandler import socket from urllib.parse import parse_qs class handler(BaseHTTPRequestHandler): def do_GET(self): self.server.received = parse_qs(self.path.split('?',1)[1]) self.send_response(200) self.end_headers() self.wfile.write(...
# -*- coding: utf-8 -*- from .client import RaspiWsClient from .core import RaspiBaseMsg, RaspiAckMsg __all__ = ['I2C', 'I2CDevice' 'I2CRead', 'I2CWrite'] class I2CRead(RaspiBaseMsg): READ, IOCTL = 0, 1 _handle = 'read' _properties = {'addr', 'size', 'type'} def __init__(self, **kwargs): kwar...
#!/usr/bin/env python # Copyright (C) 2013 Hogeschool van Amsterdam # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. #...
import boto3 from pprint import pprint from datetime import datetime import time def make_tag_dict(ec2_object): """Given an tagable ec2_object, return dictionary of existing tags.""" tag_dict = {} if ec2_object.tags is None: return tag_dict for tag in ec2_object.tags: tag_dict[tag['Key']] = tag...
from live_portal import views from views import * from django.conf.urls import patterns, include, url from django.contrib.auth.decorators import login_required from registration.backends.simple.views import RegistrationView from forms import * from django.contrib import admin admin.autodiscover() urlpatterns = patte...
""" Backend for extracting information about system calls from Linux guests. """ import logging import re from ctypes import sizeof, c_void_p from libvmi import LibvmiError from nitro.syscall import Syscall from nitro.event import SyscallDirection from nitro.backends.linux.process import LinuxProcess from nitro.back...
import urllib.parse import time import warnings import pprint from openid.message import Message, OPENID_NS, OPENID2_NS, IDENTIFIER_SELECT, \ OPENID1_NS, BARE_NS from openid import cryptutil, oidutil, kvform from openid.store.nonce import mkNonce, split as splitNonce from openid.consumer.discover import OpenIDSer...
###################################################################### # A benchmark script which assigns same probabilities to each test set member. # Probabilities are determined by the relative fraction of a category of # crime to the total number of crimes in the training set. ######################################...
import json import re from flask import Flask from bugsnag.flask import handle_exceptions import bugsnag.event from bugsnag.breadcrumbs import BreadcrumbType from tests.utils import IntegrationTest class SentinelError(RuntimeError): pass class TestFlask(IntegrationTest): def setUp(self): super(Test...
import collections from supriya import CalculationRate from supriya.synthdefs import PseudoUGen, UGen from .delay import DelayN class Amplitude(UGen): """ An amplitude follower. :: >>> source = supriya.ugens.In.ar(0) >>> amplitude = supriya.ugens.Amplitude.kr( ... attack_ti...
# -*- coding: utf-8 -*- # Copyright 2020 Green Valley Belgium NV # # 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 appl...
#!/usr/bin/env python # cgr_imp.py # # Impedance measurement with the cgr-101 USB oscilloscope import time # For making pauses import os # For basic file I/O import ConfigParser # For reading and writing the configuration file import sys # For sys.exit() from math import sin # For generating sine waves from...
#@author dposch import os import paramiko import ssh_lib as ssh import node_parser as np import logging import apps as ap from igraph import * from allPaths import * from start_apps import * from apps import * import time import copy PI_CONFIG_HZ = 100 LATENCY = 100 #queue length of tbf in ms def getNextFibHops(path...
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' ***************************************** Author: zhlinh Email: zhlinhng@gmail.com Version: 0.0.1 Created Time: 2016-02-17 Last_modify: 2016-02-17 ****************************************** ''' ''' The count-and-say sequence is the sequence...
from django.http import Http404 from django.utils.functional import update_wrapper from django.utils.translation import ugettext_lazy as _ from django.contrib.admin.util import unquote from django.utils.encoding import force_unicode class ExtendibleModelAdminMixin(object): def _getobj(self, request, object_id):...
# Copyright 2019 DeepMind Technologies Limited. # # 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 agr...
from collections import OrderedDict import warnings import numpy as np from common import AbstractWritableDataStore import xray from xray.conventions import encode_cf_variable from xray.utils import FrozenOrderedDict, NDArrayMixin, as_array_or_item from xray import indexing class NetCDF4ArrayWrapper(NDArrayMixin): ...
from Screen import Screen from Screens.DefaultWizard import DefaultWizard from ServiceScan import ServiceScan from Components.config import config, ConfigSubsection, ConfigSelection, ConfigYesNo, ConfigInteger, getConfigListEntry, ConfigSlider, ConfigEnableDisable from Components.ActionMap import NumberActionMap, Actio...
from django.db import transaction from django.utils.translation import check_for_language from django.utils.translation import ugettext_lazy as _ from rest_framework import serializers from kolibri.core.auth.constants.facility_presets import choices from kolibri.core.auth.constants.facility_presets import mappings fro...
#!/usr/bin/env python # # Copyright (c) 2008, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # not...
''' Created on May 2, 2015 @author: pekzeki ''' from pymongo import MongoClient import networkx as nx from networkx.algorithms import bipartite from network_analysis import graph_analysis as GA def biparted_graph(): B = nx.Graph() for user in user_collection.find(): B.add_node(user.get("_id"), u...
import numpy as np from cross_section import Plane from mapping_3d_to_2d import * def test_initialise_mapping_3d_to_2d_simple(): """ Check that for a plane orthogonal to the x-axis the transformation simply drops the constant x-coordinate. """ plane1 = Plane([50, 0, 0], n=[1, 0, 0]) f1 = Mappi...
import xbmcaddon import thread, threading import urllib, urllib2 import datetime, time import xbmc import logging from bs4 import BeautifulSoup import requests import html5lib class Item: def __init__(self, link, title, img): self.link = link self.title = title self.img = img def getListVideos(url): r = reques...
from __future__ import print_function from pprint import pprint try: import paramiko except ImportError: print("SSH library Paramiko missing, needed for remote plugins") class MuninRunner: def __init__(self): pass class HostRunner: def __init__(self): pass def main(): content = ...
"""Maya Capture Playblasting with independent viewport, camera and display options """ import re import sys import contextlib from maya import cmds version_info = (1, 1, 0) __version__ = "%s.%s.%s" % version_info __license__ = "MIT" def capture(camera=None, width=None, height=None, ...
#!/usr/bin/env python import rospy from chat_server.msg import Message import sys def select_mode(): mode = sys.argv[sys.argv.__len__()-1] if mode == 'read': read_client() if mode == 'send': run_client() if mode != 'read': if mode != 'send': print("Usage: use \"rea...
#!/usr/bin/env python3 import asyncio import sys import logging import argparse from nlu import NLU from client_communication import VAClientHandler from module_communication import VAModuleHandler class VirtualAssistant(object): ''' ''' def __init__(self): parser = argparse.ArgumentParser( ...
import os import json import logging from typing import List from collections import Counter import numpy as np import baseline from copy import deepcopy from baseline.reporting import create_reporting from eight_mile.progress import SET_DEFAULT_PROGRESS_BAR from baseline.utils import ( exporter, get_version, ...
from flask import Flask, jsonify import datetime import time import atexit import RPi.GPIO as GPIO app = Flask(__name__) ##################################################### # Initialise GPIO Board and setup all pins # ##################################################### # Green LED at Pin 7 LED_GREEN = 7 ...
# Copyright 2021 Northern.tech AS # # 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 ag...
# pylint: disable=C0103,C0111,W0613 import json import shlex import subprocess from bumblebee.output import Widget def assertWidgetAttributes(test, widget): test.assertTrue(isinstance(widget, Widget)) test.assertTrue(hasattr(widget, "full_text")) def assertPopen(output, cmd): res = shlex.split(cmd) ...
# Forecast: The weather effect that will be applied at the end of a turn, which causes fires to spread. # DO NOT MODIFY THIS FILE # Never try to directly create an instance of this class, or modify its member variables. # Instead, you should only be reading its variables and calling its functions. from games.anarchy....
import os import logging import requests import json class Zomat(object): """ Fetch data using the Zomato API """ def __init__(self): logging.basicConfig(level=logging.INFO) self.logger = logging.getLogger("Zomat") self.userKey = os.environ.get("USER_KEY") self.headers...
#!/usr/bin/env python # # @BEGIN LICENSE # # Psi4: an open-source quantum chemistry software package # # Copyright (c) 2007-2016 The Psi4 Developers. # # The copyrights for code used from other parties are included in # the corresponding files. # # This program is free software; you can redistribute it and/or modify #...
import json import pymongo from pymongo import MongoClient client = MongoClient('mongodb://107.170.244.164/', 27017) db = client.mars_db game_coll = db.game_data sensor_coll = db.sensor_data log_coll = db.log_data db2 = client.mars_db2 game_coll2 = db2.game_data sensor_coll2 = db2.sensor_data log_coll2 = db2.log_dat...
#!flask/bin/python __version__ = '0.2' import os import argparse import datetime from dateutil.tz import tzutc import libtaxii as t import libtaxii.messages as tm import libtaxii.clients as tc try: import simplejson as json except ImportError: import json PID_FILE = '/tmp/taxii_client.pid' PROXY_ENABLED = Fal...
# -*- coding: utf-8 -*- # # This file is part of Glances. # # Copyright (C) 2015 Nicolargo <nicolas@nicolargo.com> # # Glances 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 3 of the Lic...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import json from django.http import HttpResponse, HttpResponseRedirect from django.shortcuts import render from django.contrib import messages from django.contrib.auth.decorators import permission_required from django.contrib.admin.views.decorators impor...
#!/usr/bin/python # -*- coding: utf-8 -*- """Tests for the Windows recycler parsers.""" import unittest from plaso.formatters import recycler # pylint: disable=unused-import from plaso.lib import eventdata from plaso.lib import timelib from plaso.parsers import recycler from tests import test_lib as shared_test_lib...
#!/usr/bin/python # # Copyright (C) 2011 Google Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program...
# -*- coding: utf-8 -*- """ Created on Wed Apr 16 10:56:40 2014 @author: deokwoo """ from __future__ import division # To forace float point division import numpy as np import datetime as dt import shlex, subprocess import mytool as mt import time import retrieve_weather as rw #######################################...
# -*- coding: utf-8 -*- # Copyright (c) 2015 Ben Ockmore # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify,...
# -*- coding: utf-8 -*- from datetime import datetime, timedelta from dateutil.parser import parse as parse_dt import re from urlparse import urlparse from django.conf import settings from django.core.cache import cache from django.test.utils import override_settings from django.utils import http as urllib from jingo...
# -*- coding: utf-8 -*- """ test ~~~~ Flask-CORS is a simple extension to Flask allowing you to support cross origin resource sharing (CORS) using a simple decorator. :copyright: (c) 2014 by Cory Dolphin. :license: MIT, see LICENSE for more details. """ from tests.base_test import FlaskCorsTe...
from datetime import datetime from pytest import fixture, mark from libearth.feed import Feed, Link, Person, Text from libearth.stage import Stage from libearth.subscribe import Body, Category, Subscription, SubscriptionList from libearth.schema import read from libearth.tz import utc from .stage_test import fx_repo, ...
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_urllib_request, ) class StreamcloudIE(InfoExtractor): IE_NAME = 'streamcloud.eu' _VALID_URL = r'https?://streamcloud\.eu/(?P<id>[a-zA-Z0-9_-]+)(?:/(?...
# -*- coding: utf-8 -*- # 179. Largest Number # Given a list of non negative integers, # arrange them such that they form the largest number. # # For example, given [3, 30, 34, 5, 9], the largest formed number is 9534330. # # Note: The result may be very large, # so you need to return a string instead of an integer. # ...
# -*- coding: utf-8 -*- # @COPYRIGHT_begin # # Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland # # 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.apac...
# -*- coding: utf-8 -*- # Copyright (C) 2010-2012 Bastian Kleineidam # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. #...
# #-*- coding:utf-8 -*- """ Gentoo-keys - actionbase.py Base api interface module @copyright: 2012-2015 by Brian Dolbec <dol-sen@gentoo.org> @license: GNU GPL2, see COPYING for details. """ from __future__ import print_function import os import sys if sys.version_info[0] >= 3: _unicode = str e...
import scipy import scipy.cluster.hierarchy as sch import matplotlib.pylab as plt import matplotlib.axes import scipy.io as scio import os import numpy import sklearn.metrics.pairwise import scipy.spatial.distance import sys def cluster(network, subjects_or_features, gt_append , method_name): os.chdir('/Volumes/TITAN...
#!/usr/bin/env python # Create some test images we need command += oiiotool ("--create 320x240 3 -d uint8 -o black.tif") command += oiiotool ("--pattern constant:color=0.5,0.5,0.5 128x128 3 -d half -o grey128.exr") command += oiiotool ("--pattern constant:color=0.5,0.5,0.5 64x64 3 -d half -o grey64.exr") command += o...
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # # Copyright (C) 2013-2017 GEM Foundation # # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
# -*- coding: utf-8 -*- # © 2016 KMEE INFORMATICA LTDA (https://www.kmee.com.br) # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from openerp import models, api from openerp.tools.safe_eval import safe_eval class AccountInvoiceLineAgent(models.Model): _inherit = 'account.invoice.line.agent' ...
# Copyright 2016 Hewlett Packard Enterprise Development LP # # 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 requi...
import time import argparse import numpy as np import math import matplotlib.pyplot as plt import sklearn import sklearn.preprocessing import functools import cPickle import random from sklearn import cross_validation from sklearn import datasets from sklearn import svm from sklearn.cross_validation import StratifiedK...
import newrelic.api.web_transaction import newrelic.api.out_function import newrelic.api.name_transaction import newrelic.api.error_trace import newrelic.api.function_trace def instrument(module): version = map(int, module.__version__.split('.')) def out_Bottle_match(result): callback, args = result ...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
import os import shutil from tempfile import mkdtemp from psychopy.experiment import getAllComponents, Experiment from psychopy.tests.utils import compareTextFiles, TESTS_DATA_PATH from psychopy.scripts import psyexpCompile class TestComponentCompilerPython(object): """A class for testing the Python code compiler...
#!/usr/bin/env python2.7 # https://gist.github.com/nevesnunes/84b2eb7a2cf63cdecd170c139327f0d6 """ Extract title from PDF file. Dependencies: pip install --user unidecode pyPDF PDFMiner Usage: find . -name "*.pdf" | xargs -I{} pdftitle -d tmp --rename {} Limitations: - No processing of CID keyed fonts. ...
__author__ = 'smuthunoori' import kivy kivy.require('1.7.0') from kivy.uix.boxlayout import BoxLayout from kivy.properties import ListProperty class GeneralOptions(BoxLayout): group_mode = False translation = ListProperty(None) def clear(self, instance): self.drawing_space.clear_widgets() ...
"""The commutator: [A,B] = A*B - B*A.""" from __future__ import print_function, division from sympy import S, Expr, Mul, Add from sympy.core.compatibility import u from sympy.integrals.integrals import Integral from sympy.printing.pretty.stringpict import prettyForm from sympsi.dagger import Dagger from sympsi.opera...
from waldur_core.core import executors as core_executors from waldur_core.core import tasks as core_tasks from waldur_core.core import utils as core_utils from waldur_core.structure import executors as structure_executors from waldur_mastermind.packages.serializers import _get_template_quotas from waldur_openstack.open...
from charms.reactive import ( hook, when, only_once, is_state ) import os.path as path from charmhelpers.core import hookenv from charmhelpers.core.host import service_restart from charmhelpers.core.templating import render from subprocess import call from charms.layer import nginx, dokuwiki, php conf...
#!/usr/bin/env python """ _feeds_ Iterator support for consuming changes-like feeds """ import json class Feed(object): """ _Feed_ Acts as an infinite iterator for consuming database feeds such as _changes, suitable for feeding a daemon. :params: """ def __init__(self, session, url, ...
# 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 use ...
#!/usr/bin/python # open a I2P stream destination # then open another stream that connects to the destination created by samForward.py or samIn.py # then send bytes through the stream # usage : # ./samOut.py [ silent [ sessionName ] ] # # silent : should the first incoming after the connection reques...
#!/usr/bin/env python3 """K. Miernik 2012 k.a.miernik@gmail.com Distributed under GNU General Public Licence v3 Gaussian peak fitting class """ import math import numpy import os import sys import time from lmfit import minimize, Parameters, report_errors from Pyspectr.exceptions import GeneralError as General...
# Copyright 2017 Google Inc. and Skytruth 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 applicable law or agr...
class summing_list: layers = [[0]] size = 0 def __init__(self, iter=None): if iter != None: for i in iter: self.append(i) def _sum(self, i): t = 0 for r in self.layers: if i % 2: t += r[i - 1] i >>= 1 r...
from azure.mgmt.compute.models import StorageAccountTypes from cloudshell.cp.core.models import VmDetailsProperty, VmDetailsData, VmDetailsNetworkInterface from cloudshell.cp.azure.domain.vm_management.operations.deploy_operation import get_ip_from_interface_name class VmDetailsProvider(object): def __init__(sel...
#!/usr/bin/env python3 import sys from os import listdir, chdir from os.path import isfile, abspath UNTIL = '/build/' REPLACE_WITH = '/b/f/w' def bangchange(file_path): script = File(file_path) if script.flist[0].find("#!") == 0: if script.flist[0].find(UNTIL) > 0: print("\033[92m" + "[M...
# -*- coding: utf-8 -*- # Copyright 2020 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...
#!/usr/bin/python from __future__ import print_function import sys, os, time try: import liblo USE_LIBLO=True except: import socket import struct USE_LIBLO=False # use socket for replay since mac's have issues installing liblo if len(sys.argv) < 3: print("usage: ", sys.argv[0], " <file> <o...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of Pynder. Pynder is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any ...
import unittest from pyxt.tests.utils import SystemBusTestable from pyxt.ppi import * class PPITests(unittest.TestCase): def setUp(self): self.ppi = ProgrammablePeripheralInterface(0x060) self.ppi.write_diag_port = self.diag_port_hook self.ppi.signal_keyboard_reset = self.signal_reset_hook...
# Copyright 2021 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. """Model for storing information to look up CAS from RBE. A CASReference instance contains metadata that allows us to use RBE-CAS digests when starting Swarm...
from distutils.core import setup, Extension from glob import glob from os.path import join version = "0.4.1" bindir = "bin" docdir = join ("share", "doc", "plife-" + version) setup ( name = "plife-python", version = version, description = "Pattern construction tool for Conway's Game of Life", long_description = ...
# -*- coding: utf-8 -*- # Generated by Django 1.10 on 2017-01-15 23:21 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('users', '0006_auto_20160822_0840'), ] operations = [ migrations.AddField( ...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # touchpad-indicator.py # # Copyright (C) 2010,2011 # Lorenzo Carbonell Cerezo <lorenzo.carbonell.cerezo@gmail.com> # Miguel Angel Santamaría Rogado <leibag@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
"""Unit tests of cataloging queries.""" import pytest from ..utilities.general import is_never_authz, is_no_authz, uses_cataloging, uses_filesystem_only from dlkit.abstract_osid.osid import errors from dlkit.primordium.id.primitives import Id from dlkit.primordium.type.primitives import Type from dlkit.runtime impo...
__author__ = "William Batista Aguiar Motta" __email__ = "william.b.motta@aluno.unb.br" __license__ = "GPL" import matricula_web_web_crawler as MT import sys if len(sys.argv)>1: for a in sys.argv[1:]: # print('\n') D = MT.Disciplina(a) print(D.codigo) print(D.nome) print(...
""" Copyright (c) 2012-2013 RockStor, Inc. <http://rockstor.com> This file is part of RockStor. RockStor is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any la...
""" Pushetta platform for notify component. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/notify.pushetta/ """ import logging from homeassistant.components.notify import ( ATTR_TITLE, DOMAIN, BaseNotificationService) from homeassistant.const import...
# sqlalchemy/schema.py # Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """The schema module provides the building blocks for database metadata. Each el...
from datetime import datetime from django.core.urlresolvers import reverse from django.http import HttpResponse, Http404 from django.shortcuts import render_to_response, get_object_or_404 from django.template import RequestContext from django.template.loader import render_to_string from django.utils import simplejson ...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import _, api, fields, models class FleetVehicleModel(models.Model): _name = 'fleet.vehicle.model' _description = 'Model of a vehicle' _order = 'name asc' name = fields.Char('Model name', req...
############## # Setup File # ############## """ python-elf - A python library to manipulate ELF format Copyright (C) 2008 Tomasz Bursztyka This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software F...
# Main function for black box learning #Damir Jajetic, 2015 from sklearn.externals import joblib from sklearn import linear_model, naive_bayes, neighbors, cross_validation, feature_selection from sklearn import metrics, ensemble, decomposition, preprocessing, svm, manifold, mixture, neural_network from sklearn import c...
#!/usr/bin/python #----------------------------------------------------------------------------- # Library for handling GPX files # # Usage: # #----------------------------------------------------------------------------- # Copyright 2007, Oliver White # # This program is free software: you can redistribute it and/or m...
""" Django-multilingual: a QuerySet subclass for models with translatable fields. This file contains the implementation for QSRF Django. """ import datetime from django.core.exceptions import FieldError from django.db import connection from django.db.models.fields import FieldDoesNotExist from django.db.models.query...
import gevent import uuid import kombu import lymph from lymph.events.kombu import KombuEventSystem from lymph.discovery.static import StaticServiceRegistryHub from lymph.testing import LymphIntegrationTestCase, AsyncTestsMixin class TestInterface(lymph.Interface): def __init__(self, *args, **kwargs): s...
from six.moves import zip import numpy as np from numpy import zeros, unique from pyNastran.bdf.field_writer_8 import print_card_8 from pyNastran.bdf.field_writer_16 import print_card_16 from pyNastran.bdf.bdf_interface.assign_type import (integer, integer_or_blank, double, double_or_blank) from pyNastran.bdf.dev...
#!/usr/bin/env python # Author : Pierre Schnizer import types import tempfile import pygsl import pygsl._numobj as nummodule from pygsl import vector, ArrayType from pygsl import matrix_pierre matrix = matrix_pierre from pygsl import _block, get_typecode from array_check import myord, myorda, array_check import unit...
# Copyright 2021. ThingsBoard # # 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 ...
from django.contrib import admin from django.contrib.auth.admin import UserAdmin from django.utils.translation import gettext_lazy as _ from .models import User, CocRecord from .forms import AdminUserChangeForm, UserCreationForm @admin.register(User) class UserAdmin(UserAdmin): fieldsets = ( ( ...
#!/usr/bin/env python3 # # 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 # ...
# PyShow - a slide show IDE and scripting language. # # Copyright (C) 2017 Raimond Frentrop # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
from secret import DISCORD_BOTS_TOKEN from db.models import objects, Configuration from datetime import datetime, timedelta from secret import MIXPANEL_SECRET import asyncio import base64 import discord import json import util class Config: def __init__(self, bot): self.bot = bot self.prune_serve...