code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
import logging import unittest from tests.antivirus.common import GenericEicar from modules.antivirus.comodo.cavl import ComodoCAVL # ============ # Test Cases # ============ class ComodoCAVLEicar(GenericEicar, unittest.TestCase): expected_results = { 'eicar-passwd.zip': None, 'eicar.arj': 'Ap...
hirokihamasaki/irma
probe/tests/antivirus/test_comodo_cavl.py
Python
apache-2.0
1,835
import csv import re from collections import defaultdict, OrderedDict from datetime import datetime import argparse import matplotlib.pyplot as plt from matplotlib.backends.backend_pdf import PdfPages from matplotlib.dates import date2num, HourLocator, DateFormatter MAX_TIME = 999999999999 SELECTIONS_COUNT_INDEX = 3...
StoneRam/nbu_tools
bpdbjobs_delay_report.py
Python
mit
10,048
# -*- coding: utf-8 -*- # Mathmaker creates automatically maths exercises sheets # with their answers # Copyright 2006-2018 Nicolas Hainaux <nh.techn@gmail.com> # This file is part of Mathmaker. # Mathmaker is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License...
nicolashainaux/mathmaker
tests/integration/mental_calculation/04_yellow1/test_04_yellow1_W04d.py
Python
gpl-3.0
1,241
import json from django.contrib.auth.models import User from udj.models import Player, PlayerLocation, PlayerPassword, DefaultLibrary, OwnedLibrary, AssociatedLibrary, PlayerPermission from udj.testhelpers.tests06.testclasses import YunYoungTestCase from udj.headers import MISSING_RESOURCE_HEADER from udj.views.views06...
klnusbaum/UDJ-Server
udjserver/udj/tests/tests06/player_creation.py
Python
gpl-2.0
5,694
from iosfu.plugin.base import BasePlugin from iosfu.plugin.library import Library plugin_library = Library() @plugin_library.register class DeviceInfoPlugin(BasePlugin): category = 'Base' name = 'Device info' description = 'Basic information about the device/backup' requires = { 'files': ['...
fmartingr/iosfu
iosfu/plugin/device_info/plugin.py
Python
mit
1,770
# -*- coding: utf-8 -*- from gi.repository import Gtk,GdkPixbuf,GObject import os.path import sudoku, saver, sudoku_maker import sudoku_thumber from gettext import gettext as _ from gettext import ngettext import time import defaults from simple_debug import simple_debug from colors import color_hex_to_float def color...
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/pyshared/gnome_sudoku/game_selector.py
Python
gpl-3.0
11,667
from django.utils.translation import ugettext_lazy as _ from django.template.defaultfilters import timesince, floatformat from horizon import tables from horizon.templatetags.sizeformat import mbformat class CSVSummary(tables.LinkAction): name = "csv_summary" verbose_name = _("Download CSV Summary") clas...
xhorn/xchorizon
horizon/usage/tables.py
Python
apache-2.0
2,032
# -*- coding: cp1252 -*- from math import * from exceptions import * #from numpy import * #from numpy import zeros, identity #from numpy.linalg import solve, LinAlgError from libarray import * from libarray import zeros, identity from linalg import solve, norm, LinAlgError, det class LevMarError(Excepti...
raphaelvalentin/qtlayout
syntax/levmar/liblevmar.py
Python
gpl-2.0
10,387
#!/usr/bin/python # (c) 2016, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
thaim/ansible
lib/ansible/modules/storage/netapp/netapp_e_facts.py
Python
mit
27,049
#!/usr/bin/python # -*- coding: utf-8 -*- from PyQt5 import QtCore class SignalDB(QtCore.QObject): count_sin = QtCore.pyqtSignal(int) def __init__(self): super(SignalDB, self).__init__() signal_DB = SignalDB()
dragondjf/CloudSetuper
setuper desktop app/dataBase/signalDB.py
Python
mit
232
from django.conf.urls import include, url from sapl.materia.views import (AcompanhamentoConfirmarView, AcompanhamentoExcluirView, AcompanhamentoMateriaView, AnexadaCrud, AssuntoMateriaCrud, AutoriaCrud, ...
interlegis/sapl
sapl/materia/urls.py
Python
gpl-3.0
8,844
import os import re import string import logging import tempfile import importlib import subprocess import requests import boto.s3.key from billy.scrape.utils import convert_pdf from billy.core import settings, s3bucket _log = logging.getLogger('billy.utils.fulltext') def pdfdata_to_text(data): with tempfile....
openstates/billy
billy/utils/fulltext.py
Python
bsd-3-clause
3,225
# encoding: utf-8 # module gtk.gdk # from /usr/lib/python2.7/dist-packages/gtk-2.0/pynotify/_pynotify.so # by generator 1.135 # no doc # imports from exceptions import Warning import gio as __gio import gobject as __gobject import gobject._gobject as __gobject__gobject import pango as __pango import pangocairo as __p...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/gtk/gdk/__init__/PixbufSimpleAnimIter.py
Python
gpl-2.0
664
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under...
jmesteve/saas3
openerp/addons_extra/account_financial_report_webkit_xls/report/partner_ledger_xls.py
Python
agpl-3.0
20,345
# Copyright 2015 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 required by applicable law or agreed ...
googledatalab/pydatalab
datalab/bigquery/commands/_bigquery.py
Python
apache-2.0
43,171
import os.path import cherrypy from cherrypy.process import wspbus, plugins from sqlalchemy import create_engine from sqlalchemy.orm import scoped_session, sessionmaker from sqlalchemy.ext.declarative import declarative_base # http://www.defuze.org/archives/222-integrating-sqlalchemy-into-a-cherrypy-application.html...
r4mp/mete_python_cherrypy_jinja2
mete/db.py
Python
agpl-3.0
2,808
#!/usr/bin/python2 # -*- coding: utf-8 -*- """Client GUI to control youBot robot.""" import Tkinter as tk import ttk import tkMessageBox import rospyoubot from math import radians, degrees class MainApplication(ttk.Frame): u"""Основное окно приложения.""" def __init__(self, parent, *args, **kwargs): ...
kirillmorozov/youbot_control
scripts/client_gui.py
Python
bsd-2-clause
32,532
# -*- coding:utf-8 -*- class Solution: # @param A a list of integers # @param m an integer, length of A # @param B a list of integers # @param n an integer, length of B # @return nothing def merge(self, A, m, B, n): la = m - 1 lb = n - 1 index = m + n - 1 whil...
Fity/2code
leetcode/MergeSortedArray/solution.py
Python
mit
623
import mcpi.minecraft as minecraft import mcpi.block as block import random import time mc = minecraft.Minecraft.create() #mc.postToChat("Heat Vision!") pos = mc.player.getTilePos() #mc.postToChat(pos) #rot = mc.player.getRotation() #pitch = mc.player.getPitch() #direct = mc.player.getDirection() #mc.postToChat(ro...
joadavis/rpi-coding
minecraft/oliverboom.py
Python
mit
907
import numpy as np from rdkit import Chem import os.path as osp from mastic.selection import CoordArray, IndexedSelection, Selection, \ GenericSelection from mastic.molecule import Bond, Molecule, Atom, \ MoleculeType, AtomType, BondType from mastic.interfaces.rdkit import RDKitMoleculeWrapper import mastic....
salotz/mast
prototypes/molecule_example.py
Python
mit
5,003
# # 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...
wooga/airflow
tests/test_core.py
Python
apache-2.0
18,408
# 2013 derrick.snowden@noaa.gov: initial version of python script for creating # IOOS glider NetCDF template. # 2013-07-19 kerfoot@marine.rutgers.edu: modified script to adhere to most # recent version of CDL template: # - creation of variables and addition of recommended variable attributes # - variable at...
acrosby/glidertraj
ioos_glider.py
Python
gpl-3.0
56,531
# -*- coding: utf-8 -*- # Some utils import hashlib import uuid def get_hash(data): """Returns hashed string""" return hashlib.sha256(data).hexdigest() def get_token(): return str(uuid.uuid4())
aluminiumgeek/organic
utils.py
Python
lgpl-3.0
212
#!/usr/bin/env python2 # Copyright (c) 2015 The Bitcoin Core developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # from test_framework.test_framework import ComparisonTestFramework from test_framework.util import * from...
kleetus/bitcoin
qa/rpc-tests/invalidblockrequest.py
Python
mit
4,242
#Copyright ReportLab Europe Ltd. 2000-2012 #see license.txt for license details __version__='''$Id$''' import reportlab.pdfgen.canvas from reportlab.lib import colors from reportlab.lib.units import inch def run(): c = reportlab.pdfgen.canvas.Canvas('colortest.pdf') #do a test of CMYK interspersed with RGB ...
malexandre/python-xhtml2pdf-demo
reportlab/demos/colors/colortest.py
Python
mit
2,731
# -*- coding: utf-8 -*- import random import re import time import urlparse, urllib,urllib2,cookielib from base64 import b64encode import xbmc import xbmcgui,xbmcaddon,os __scriptID__ = 'script.module.liveresolver' __addon__ = xbmcaddon.Addon(__scriptID__) class cInputWindow(xbmcgui.WindowDialog): ...
rootsradics/castback
resources/lib/modules/unCaptcha.py
Python
gpl-3.0
15,271
{ "name": "custom theme", "description": "A custom theme", "version": "0.1", "category": "Theme/Backend", "data": [ "views/assets.xml", "views/menu_icons.xml", "views/web.xml", "data/parameters.xml", "views/custom_views.xml" ], "depends": [ "we...
Comunitea/CMNT_004_15
project-addons/custom_theme/__manifest__.py
Python
agpl-3.0
596
# -*- coding: utf-8 -*- # Writer (c) 2017, dandy # Rev. 1.0.0 # Licence: GPL v.3: http://www.gnu.org/copyleft/gpl.html import sys, os import urllib import xbmc import xbmcaddon import xbmcplugin import xbmcgui import re import time import Translit as translit import XbmcHelpers common = XbmcHelpers translit = transli...
dandygithub/kodi
addons/context.dandy.strm.generator/default.py
Python
gpl-3.0
10,070
#!/usr/bin/python import pygame import random import math from lib.GameObjects import Player, Enemy from lib.Globals import Vars, FixPath, UnitType, TileImage from lib.Pathing import MovementPath from lib.EventHandler import JoyHandler, KeyHandler from lib.Effects import Explosion from lib.Menu import * from lib.Logge...
zorchenhimer/NoudaEngine
lib/Level.py
Python
mit
9,721
import smtplib from celery import Celery from email.mime.text import MIMEText from KerbalStuff.config import _cfg, _cfgi app = Celery("tasks", broker="redis://localhost:6379/0") def chunks(l, n): """ Yield successive n-sized chunks from l. """ for i in range(0, len(l), n): yield l[i:i+n] @app.tas...
toadicus/KerbalStuff
KerbalStuff/celery.py
Python
mit
1,002
# This file is a part of MediaDrop (http://www.mediadrop.net), # Copyright 2009-2014 MediaDrop contributors # For the exact contribution history, see the git revision log. # The source code contained in this file is licensed under the GPLv3 or # (at your option) any later version. # See LICENSE.txt in the main project ...
kgao/MediaDrop
mediadrop/lib/auth/util.py
Python
gpl-3.0
666
#import math #from math import pi,sin,cos,atan,atan2 import clr import time import System from System import Byte clr.AddReference("MissionPlanner") import MissionPlanner clr.AddReference("MissionPlanner.Utilities") #includes the Utilities class from MissionPlanner.Utilities import Locationwp clr.AddReference("MAV...
marylandSUAS/Path_Planning
MissionPlanner/live_data.py
Python
gpl-3.0
1,355
__version__ = "0.12.2"
JostCrow/django-forms-builder
forms_builder/__init__.py
Python
bsd-2-clause
23
from proteus import * from proteus.default_n import * from pressureInitial_p import * triangleOptions = triangleOptions femSpaces = {0:pbasis} stepController=FixedStep #numericalFluxType = NumericalFlux.ConstantAdvection_Diffusion_SIPG_exterior #weak boundary conditions (upwind ?) matrix = LinearAlgebraTools.Spars...
erdc/proteus
proteus/tests/cylinder2D/sbm_3Dmesh/pressureInitial_n.py
Python
mit
1,224
from django.shortcuts import render import datetime def home(request): now = datetime.datetime.now() return render(request, 'home.html', {'current_date': now}) def about(request): return render(request, 'about.html', {})
MoriTanosuke/pythonproxy
pythonproxy/views.py
Python
gpl-2.0
226
""" KeystoneClient class encapsulates the work with the keystone service interface """ import requests from DIRAC import S_OK, S_ERROR, gLogger from DIRAC.Core.Utilities.Time import fromString, dateTime class KeystoneClient(object): def __init__(self, url, parameters): self.log = gLogger.getSubLogger("Ke...
DIRACGrid/DIRAC
src/DIRAC/Resources/Cloud/KeystoneClient.py
Python
gpl-3.0
10,059
# coding=utf-8 from __future__ import unicode_literals from .. import Provider as InternetProvider class Provider(InternetProvider): free_email_domains = ( 'gmail.com', 'yahoo.com', 'hotmail.com', 'yahoo.com.au', 'hotmail.com.au', ) tlds = ('com', 'com.au', 'org',...
deanishe/alfred-fakeum
src/libs/faker/providers/internet/en_AU/__init__.py
Python
mit
392
# Copyright (c) 2014 by Ecreall under licence AGPL terms # available on http://www.gnu.org/licenses/agpl.html # licence: AGPL # author: Amen Souissi from dace.processdefinition.processdef import ProcessDefinition from dace.processdefinition.activitydef import ActivityDefinition from dace.processdefinition.gatewaydef ...
ecreall/lagendacommun
lac/content/processes/user_management/definition.py
Python
agpl-3.0
12,142
from __future__ import division from builtins import range from past.utils import old_div import collections import astropy.io.fits as fits import numpy as np import os import warnings import six from threeML.io.progress_bar import progress_bar from threeML.utils.OGIP.response import OGIPResponse, InstrumentResponse...
giacomov/3ML
threeML/utils/spectrum/pha_spectrum.py
Python
bsd-3-clause
34,989
from django.core.management.base import BaseCommand from django.db import connection from django.utils.translation import ugettext_lazy class Command(BaseCommand): help = ugettext_lazy("Remove from logger and viewer apps") option_list = BaseCommand.option_list def handle(self, *args, **kwargs): ...
jomolinare/kobocat
onadata/apps/main/management/commands/remove_odk_prefix.py
Python
bsd-2-clause
633
# -*- coding: utf-8 -*- ############################################################################## # # Compute taxes on sale order line # Copyright (C) 2016 OpusVL (<http://opusvl.com/>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
OpusVL/odoo-sale-extras
sale_order_line_compute_taxes/models/sale.py
Python
agpl-3.0
2,022
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt # ERPNext - web based ERP (http://erpnext.com) # For license information, please see license.txt from __future__ import unicode_literals import frappe, unittest from frappe.utils import flt, ...
manqala/erpnext
erpnext/stock/doctype/stock_reconciliation/test_stock_reconciliation.py
Python
gpl-3.0
4,815
from collections import OrderedDict import pickle import numpy as np import torch import torch.optim as optim from torch import nn as nn import torch.nn.functional as F import copy import rlkit.torch.pytorch_util as ptu from rlkit.core.eval_util import create_stats_ordered_dict from rlkit.torch.torch_rl_algorithm impor...
vitchyr/rlkit
rlkit/demos/source/dict_to_mdp_path_loader.py
Python
mit
5,726
# Copyright 2018 The TensorFlow Authors. 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 required by applica...
tensorflow/estimator
tensorflow_estimator/python/estimator/tpu/error_handling.py
Python
apache-2.0
5,327
"""Support for Matrix notifications.""" import logging import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.notify import (ATTR_TARGET, PLATFORM_SCHEMA, BaseNotificationService, ...
MartinHjelmare/home-assistant
homeassistant/components/matrix/notify.py
Python
apache-2.0
1,319
# -*- coding: utf-8 -*- u"""Hellweg dump parser. :copyright: Copyright (c) 2017 RadiaSoft LLC. All Rights Reserved. :license: http://www.apache.org/licenses/LICENSE-2.0.html """ from __future__ import absolute_import, division, print_function import ctypes import math _LIVE_PARTICLE = 0 _LOSS_VALUES = ['live', 'rad...
radiasoft/sirepo
sirepo/template/hellweg_dump_reader.py
Python
apache-2.0
9,587
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import pytest import yaml class TestInputRSS(object): config = """ tasks: _: rss: &rss url: rss.xml silent: ...
sean797/Flexget
flexget/tests/test_rss.py
Python
mit
7,135
import os import xlrd import time from wtforms import ValidationError from flask import request, Response, send_file from binascii import unhexlify, hexlify import json from sqlalchemy.exc import IntegrityError from datetime import datetime from http_api.api.decorators import device_belong_to_user, device_filter_vali...
soybean217/lora-python
UServer/http_api/api/api_device.py
Python
mit
12,783
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Chat admin bot to open and close the chatroom. Run via cron. SleekXMPP: The Sleek XMPP Library Copyright (C) 2010 Nathanael C. Fritz This file is part of SleekXMPP. See the file LICENSE for copying permission. """ import sys import logging import g...
Kvoti/ditto
ditto/scripts/chat_bot.py
Python
bsd-3-clause
6,263
# -*- coding: utf-8 -*- # Akvo RSR is covered by the GNU Affero General Public License. # See more details in the license.txt file located at the root folder of the Akvo RSR module. # For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >. import logging from datetime import dat...
akvo/akvo-rsr
akvo/rsr/tests/base.py
Python
agpl-3.0
6,365
from pandas import read_csv class Dataset: def __init__(self, name): self.data_folder = 'mclearn/tests/data/' if name == 'glass': self.feature_cols = ['ri', 'na', 'mg', 'ai', 'si', 'k', 'ca' , 'ba', 'fe'] self.target_col = 'type' elif name == 'sdss_tiny': ...
alasdairtran/mclearn
mclearn/tests/datasets.py
Python
bsd-3-clause
1,149
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 ''' IMPORTS ''' import pytz ''' GLOBAL VARIABLES ''' args = demisto.args() ''' Helper Code ''' def determine_correct_format(time, fmt): time = datetime.strptime(time, fmt) return time def convert_UTC_Timezone(tim...
VirusTotal/content
Packs/ConvertTimezoneFromUTC/Scripts/ConvertTimezoneFromUTC/ConvertTimezoneFromUTC.py
Python
mit
1,188
import numpy as np import pandas as pd from pandas import ( DataFrame, Index, ) import pandas._testing as tm from pandas.core.api import Int64Index def test_pipe(): # Test the pipe method of DataFrameGroupBy. # Issue #17871 random_state = np.random.RandomState(1234567890) df = DataFrame( ...
rs2/pandas
pandas/tests/groupby/test_pipe.py
Python
bsd-3-clause
2,118
from .request import Request from .response import Response PING_XID = -2 class PingRequest(Request): """ """ opcode = 11 special_xid = PING_XID parts = () class PingResponse(Response): """ """ opcode = 11 parts = ()
tipsi/aiozk
aiozk/protocol/ping.py
Python
mit
261
def function(input): return input iclass = "PythonTranslator"
nesaro/pydsl
pydsl/contrib/translator/echo.py
Python
gpl-3.0
68
#!/usr/bin/env python # -*- coding: utf-8 -*- # dnacurve.py # Copyright (c) 1994-2014, Christoph Gohlke # 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 r...
moritz-wundke/Concurrent
concurrent/framework/samples/dnacurve/dnacurve.py
Python
mit
42,519
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
GFDRR/geonode
geonode/api/authorization.py
Python
gpl-3.0
3,828
#!/usr/bin/python # encoding: utf-8 # # Copyright (C) 2015 Ian McLeod <imcleod@redhat.com> # # This library 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; # version 2.1 of the License. # # This library...
giuseppe/rpm-ostree-toolbox
src/py/rpmostreecompose/pyazure.py
Python
lgpl-2.1
8,776
from flask.ext.admin.babel import gettext from flask.ext.admin.model import filters from .tools import parse_like_term class BasePeeweeFilter(filters.BaseFilter): """ Base Peewee filter. """ def __init__(self, column, name, options=None, data_type=None): """ Constructor. ...
Jumpscale/web
pythonlib/flask_admin/contrib/peewee/filters.py
Python
apache-2.0
3,301
"""Mixin class that provides cleanliness attribute for models.""" import copy from sqlalchemy import Column, Integer, Float, Boolean from messages.timestamp import TimeStamp class CleanlinessMixin(object): """Provide cleanliness attribute for models.""" cleanliness = Column(Float) cleanliness_date = Co...
nihlaeth/HorseLife
support/cleanlinessmixin.py
Python
gpl-2.0
2,437
from .exceptions import BaseError, ValidationError, ModelConversionError from .transforms import import_loop def validate(cls, instance_or_dict, partial=False, strict=False, context=None): """ Validate some untrusted data using a model. Trusted data can be passed in the `context` parameter. :param cl...
eatfirst/schematics
schematics/validate.py
Python
bsd-3-clause
3,655
from urllib import urlencode from urllib2 import urlopen from django.shortcuts import render from django.http import HttpResponse, Http404 from cms.utils.html import clean_html def index(request): url = "http://results.influenzanet.info/results.php?" + urlencode(request.GET) try: content = urlopen(ur...
chispita/epiwork
apps/sander/views.py
Python
agpl-3.0
486
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'hue-gui.ui' # # Created by: PyQt5 UI code generator 5.8.2 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_MainWindow(object): def setupUi(self, MainWindow): MainWindo...
kusti8/hue-plus
hue_plus/hue_gui.py
Python
gpl-3.0
45,771
# Object Oriented version of the Library program (practical 5) # James Cowgill # class AvailabilityError(Exception): '''Error raised if an item is unavailable or borrowed by another member''' pass class Item: '''Abstract class representing an item in the library''' def __init__(self, item_id, titl...
jcowgill/cs-work
tpop/python/prac10/library_oop.py
Python
gpl-3.0
6,968
#!/usr/bin/env python3 import numpy as np import sys import tensorflow as tf from tensorflow.python.ops.rnn_cell import LSTMCell sys.path.extend(['..']) import dataset from tf_ext.bricks import linear, embedding, rnn, dense_to_one_hot, rnn_decoder flags = tf.app.flags FLAGS = flags.FLAGS flags.DEFINE_integer('ma...
jurcicek/tensorflow-testing
s2s/s2s.py
Python
apache-2.0
5,375
# Enthought library imports. from traits.api import HasTraits, Instance from traitsui.api import UI # Local imports. from editor import Editor class TraitsEditor(Editor): """ An Editor that displays a Traits UI View. """ #### TraitsEditor interface ############################################### # ...
pankajp/pyface
pyface/tasks/traits_editor.py
Python
bsd-3-clause
1,575
# -*- coding: utf-8 -*- # # Copyright (C) 2011-2016 Red Hat, Inc. # # Authors: # Thomas Woerner <twoerner@redhat.com> # # 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 Li...
t-woerner/firewalld
src/firewall/core/io/icmptype.py
Python
gpl-2.0
6,731
#!/usr/bin/python import pyaudio import time import wave FORMAT = pyaudio.paInt16 CHANNELS = 2 RATE = 44100 CHUNK = 1024 RECORD_SECONDS = 5 WAVE_OUTPUT_FILENAME = "file.wav" audio = pyaudio.PyAudio() class Recorder: fname = "_" def __init__(self, instrument): self.fname = instrument + "_" + time.strftime("%Y-...
NicholasColotouros/RaspiCorder
RaspiCorder/Recorder.py
Python
gpl-2.0
933
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. # # This progra...
0vercl0k/rp
src/third_party/beaengine/tests/0fd4.py
Python
mit
4,010
#!/usr/bin/python # Copyright 2017 Dhvani Patel # # This file is part of UnnaturalCode. # # UnnaturalCode 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...
naturalness/unnaturalcode
unnaturalcode/check_eslint_syntax.py
Python
agpl-3.0
2,488
# -*- coding: utf-8 -*- ''' リスト4.8 セット名称を取り出す ''' import scrapy class BricksetSpider(scrapy.Spider): name = "brickset2" allowed_domains = ["brickset.com"] start_urls = ['https://brickset.com/sets/year-2016'] def parse(self, response): for brickset in response.css('article.set'): ...
takanory/pymook-samplecode
4_scraping/lego_scraper/lego_scraper/spiders/brickset2.py
Python
mit
416
from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import tensorflow as tf import numpy as np import time import os from tensorflow.examples.tutorials.mnist import input_data from tensorflow.examples.tutorials.mnist import mnist FLAGS = None I...
firstprayer/tensorflow-scripts-misc
resnet.py
Python
mit
5,065
from tests.common.utils import apiurl PING_URL = apiurl('/api2/ping/') TOKEN_URL = apiurl('/api2/auth-token/') AUTH_PING_URL = apiurl('/api2/auth/ping/') ACCOUNTS_URL = apiurl('/api2/accounts/') AVATAR_BASE_URL = apiurl('/api2/avatars/') REPOS_URL = apiurl('/api2/repos/') GET_REPO_TOKENS_URL = apiurl('/api2/repo-tok...
miurahr/seahub
tests/api/urls.py
Python
apache-2.0
870
#!/usr/bin/env python # encoding: utf-8 import logging from modules.payload_builder import PayloadBuilder import shutil import os from modules.obfuscate_names import ObfuscateNames from modules.obfuscate_form import ObfuscateForm from modules.obfuscate_strings import ObfuscateStrings from modules.uac_bypass import UAC...
sevagas/macro_pack
src/modules/vba_gen.py
Python
apache-2.0
4,627
# Copyright 2017 The TensorFlow Authors. 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 required by applica...
theflofly/tensorflow
tensorflow/python/autograph/impl/conversion_test.py
Python
apache-2.0
7,771
from components.base.ecu.software.ecu_software import ECUSoftware from components.base.ecu.types.impl_ecu_simple import SimpleECU from tools.ecu_logging import ECULogger as L from components.security.ecu.software.impl_comm_module_tesla import TeslaCommModule from components.security.ecu.software.impl_app_layer_tesla im...
PhilippMundhenk/IVNS
ECUSimulation/components/security/ecu/types/impl_ecu_tesla.py
Python
mit
17,761
import os from base import Output class Dolphin (Output): """Supports dolphin products.""" name = 'Dolphin' lib32 = 'dolapi.dll' def speak(self, text, interrupt=0): if interrupt: self.silence() #If we don't call this, the API won't let us speak. if self.is_active(): self.lib.DolAccess_Command(unicod...
codeofdusk/ProjectMagenta
src/accessible_output2/outputs/dolphin.py
Python
gpl-2.0
537
# -*- coding: utf-8 -*- #driwall.py """ Driwall Server =========== Socks5 Proxy Backend It uses Websocket API to receive datas with a chat app mask """ import os import logging import gevent import socket import json import struct import thread from time import sleep from flask import Flask from flask_sockets import...
Driwall/DriWall-Heroku
driwall.py
Python
mit
1,995
from pytriqs.gf.local import * from pytriqs.operators import * from pytriqs.applications.impurity_solvers.alps_cthyb import Solver from pytriqs.archive import HDFArchive import pytriqs.utility.mpi as mpi # Parameters D, V, U = 1.0, 0.2, 4.0 e_f, beta = -U/2.0, 50 # Construct the impurity solver with the inverse tempe...
shinaoka/triqs_interface
samples/aim_alps.py
Python
gpl-3.0
953
#!/usr/bin/python3 # -*- coding: utf-8 -*- """Test file for the FFmpeg worker""" import os import logging import unittest from toolbox2.worker.ffmpeg import FFmpegWorker from toolbox2.action.extract.avinfo_extract import AVInfo class FfmpegWorkerTestCase(unittest.TestCase): """Test functions from the toolbox2....
SmartJog/python-toolbox2
tests/ffmpeg_worker_test.py
Python
lgpl-2.1
1,559
# 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 is distributed in the hope that it will be useful, # bu...
mathstuf/bodhi
bodhi/services/overrides.py
Python
gpl-2.0
7,264
from django.conf.urls import url from django.conf import settings from django.template import RequestContext from django.template.loader import render_to_string from upy.contrib.tree.models import Node, UrlAjax from datetime import date def getUrlList(): """ This function get the Page List from the DB and ret...
20tab/upy
upy/contrib/tree/utility.py
Python
bsd-3-clause
4,544
#!/usr/bin/env python import vpn.Host as Host import vpn.Cryptography as Cryptography class Client(Host.Host): def __init__(self, ipAddr = "127.0.0.1", portNum = 32694, sharedSecret="iloveildar", padding=" ", verbose = False): while len(sharedSecret) < Cryptography.SYMMETRIC_KEY_KEY_SIZE: ...
dchanman/vpn
Client.py
Python
apache-2.0
5,992
def extractFalinmer(item): """ """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol or frag) or 'preview' in item['title'].lower(): return None match = re.search('(\\d+)\\-(\\d+)', item['title']) if not vol and match: vol = match.group(1) chp = match.group(2) if...
fake-name/ReadableWebProxy
WebMirror/management/rss_parser_funcs/feed_parse_extractFalinmer.py
Python
bsd-3-clause
518
''' Created on Nov 29, 2012 @author: Stephen O'Hara Module with plotting code ''' import pylab as pl import cPickle import os import math def loadRes_varyingTrees(datadir=".", fn="SIFT_10K_5trials_VaryingTrees.p"): ''' Loads pickle files which store the trial details for the varyingNumTrees() experiment. ...
svohara/proximityforest
evaluation/WACV2013/plotResults.py
Python
gpl-3.0
2,576
import json import os import requests from reporting import ErrorObject, Output import generate_apitoken from config import WorkerSetup from global_vars import * from validate import ValidateVideo """Disable insecure warning for requests lib""" requests.packages.urllib3.disable_warnings() """ Abstractions / A simp...
yro/veda_worker
veda_worker/abstractions.py
Python
gpl-3.0
7,624
#!/usr/bin/env python import logging import os import requests import sys import time from argparse import ArgumentParser import ConfigParser ## previously was needed to inject support for more recent TLS versions # from requests.packages.urllib3.contrib import pyopenssl # pyopenssl.inject_into_urllib3 from requests...
azavea/azavea-hunchlab-examples
eventdata/upload.py
Python
apache-2.0
5,076
from collections import defaultdict from sys import maxint def find_anagrams(words): """ Question 13.1: Take in set of words and returns list of these words grouped into anagrams """ anagrams = defaultdict(set) for word in words: sorted_word = ''.join(sorted(word)) anagrams[so...
jakubtuchol/epi
src/hashtables.py
Python
mit
3,509
# Author: Idan Gutman # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickGear. # # SickGear 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 o...
ressu/SickGear
sickbeard/providers/torrentleech.py
Python
gpl-3.0
10,817
#!/usr/bin/env python # 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 # "Li...
lavjain/incubator-hawq
tools/bin/gppylib/commands/unix.py
Python
apache-2.0
30,901
# Copyright 2017 Mycroft AI 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 agreed to in writin...
aatchison/mycroft-core
mycroft/messagebus/message.py
Python
apache-2.0
4,566
# -*- coding: utf-8 -*- import os import sys import textwrap import _pytest._code import pytest from _pytest.main import EXIT_NOTESTSCOLLECTED from _pytest.nodes import Collector class TestModule(object): def test_failing_import(self, testdir): modcol = testdir.getmodulecol("import alksdjalskdjalkjals") ...
davidszotten/pytest
testing/python/collect.py
Python
mit
53,106
from elasticsearch import Elasticsearch from elasticsearch import helpers import json class ESDocIndexer: """ This class contains methods for uploading documents into ElasticSearch """ CONFIG_ES_ADDRESS = "es_address" CONFIG_ES_INDEX = "es_index" CONFIG_ES_MAPPING = "es_mapping_name_prefix" ...
ybotkiller/ybotkiller
elastic_api/es_doc_indexer.py
Python
apache-2.0
5,463
# Copyright 2013 NEC Corporation # # 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...
mrunge/openstack_horizon
openstack_horizon/dashboards/project/networks/subnets/workflows.py
Python
apache-2.0
8,409
#!/usr/bin/env python # Copyright 2015-2017, Damian Johnson and The Tor Project # See LICENSE for licensing information """ Caches tor's latest manual content. Run this to pick new man page changes. """ import re import sys import stem.manual import stem.util.system try: # account for urllib's change between pyth...
ewongbb/stem
cache_manual.py
Python
lgpl-3.0
2,075
__author__ = 'Călin Sălăgean' from events.repositories.event import EventRepository from events.repositories.person import PersonRepository from datetime import datetime class PersonEvent(): def __init__(self, person_id = None, event_id = None, date = None): ''' PersonEvent constructor :pa...
dooma/Events
events/models/person_event.py
Python
mit
2,731
# Copyright (c) 2008 Princeton University # Copyright (c) 2009 Advanced Micro Devices, 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 c...
pombredanne/http-repo.gem5.org-gem5-
src/mem/ruby/network/garnet/fixed-pipeline/GarnetLink_d.py
Python
bsd-3-clause
3,937
from database import session_scope import os import sections from models import Article from topics import to_corpus, to_text import argparse def main(args): path = os.path.join(args.folder, args.name) if os.path.isdir(path): print('corpus ' + path + ' already exists') return _sections = s...
latorrefabian/gapmaps
gapmaps/to_corpus.py
Python
mit
1,261
# Copyright (c) by it's authors. # Some rights reserved. See LICENSE, AUTHORS. from peer import * from wallaby.pf.peer.database import Database from wallaby.pf.peer.viewer import Viewer from wallaby.pf.peer.editor import Editor from wallaby.pf.pillow import Pillow from wallaby.common.pathHelper import * from twisted...
FreshXOpenSource/wallaby-base
wallaby/pf/peer/documentChanger.py
Python
bsd-2-clause
11,423
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-11-10 09:01 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('silo', '0036_auto_20171025_1225'), ] operations = ...
toladata/TolaTables
silo/migrations/0037_auto_20171110_0101.py
Python
gpl-2.0
985