text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
#!/usr/bin/env python """ Copyright (c) 2006-2014 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ from lib.core.exception import SqlmapUnsupportedFeatureException from plugins.generic.filesystem import Filesystem as GenericFilesystem class Filesystem(GenericFilesystem): ...
goofwear/raspberry_pwn
src/pentest/sqlmap/plugins/dbms/oracle/filesystem.py
Python
gpl-3.0
792
0.001263
import smtplib from email.mime.text import MIMEText from email.mime.multipart import MIMEMultipart from datetime import datetime from django.http import HttpResponse from GarageWarden import status, settingHelper, settingView, config, settings as gw_settings import RPi.GPIO as GPIO settings = None settings_loaded = Fa...
narcolepticsnowman/GarageWarden
GarageWarden/notify.py
Python
mit
3,025
0.002314
#!/bin/env python # Automatically translated python version of # OpenSceneGraph example program "osglight" # !!! This program will need manual tuning before it will work. !!! import sys from osgpypp import osg from osgpypp import osgDB from osgpypp import osgUtil from osgpypp import osgViewer # Translated from fi...
JaneliaSciComp/osgpyplusplus
examples/rough_translated1/osglight.py
Python
bsd-3-clause
10,059
0.015409
# GeneaCrystal Copyright (C) 2012-2013 # Christian Jaeckel, <christian.doe@gmail.com> # Frederic Kerber, <fkerber@gmail.com> # Pascal Lessel, <maverickthe6@gmail.com> # Michael Mauderer, <mail@michaelmauderer.de> # # GeneaCrystal is free software: you can redistribute it and/or modify # it under the ...
MichaelMauderer/GeneaCrystal
geneacrystal/nodes.py
Python
gpl-3.0
10,098
0.008418
# Copyright 2017 Cisco Systems, 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 o...
noironetworks/networking-cisco
networking_cisco/db/migration/alembic_migrations/versions/mitaka/expand/73c84db9f299_update_ha_group_primary_key.py
Python
apache-2.0
2,956
0
from fancypages.templatetags.fp_container_tags import *
tangentlabs/django-oscar-fancypages
oscar_fancypages/fancypages/templatetags/fp_container_tags.py
Python
bsd-3-clause
56
0
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2015-12-23 15:08 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('django_ca', '0001_initial'), ] operations = [ migrations.AlterField( ...
fsinf/certificate-authority
ca/django_ca/migrations/0002_auto_20151223_1508.py
Python
gpl-3.0
1,224
0.001634
# Copyright (c) 2017 Civic Knowledge. This file is licensed under the terms of the # MIT, included in this distribution as LICENSE """ """ from rowgenerators.appurl.file.file import FileUrl from rowgenerators.exceptions import AppUrlError class ZipUrlError(AppUrlError): pass class ZipUrl(FileUrl): """Zip ...
CivicKnowledge/rowgenerators
rowgenerators/appurl/archive/zip.py
Python
mit
6,923
0.004911
""" This module is used to select features or proposals """ def select_preceding(features, k): """ select preceding k features or proposals for each image :param k: preceding k features or proposals for each image are selected :type k: integer :return: selected features or proposals :rtype: li...
zhitiancheng/cliff
cliff/selection.py
Python
gpl-2.0
593
0
__version__ = "1.4.3" import sys import os # verify that pygame is on the machine try: import pygame except Exception: print("Pygame doesn't seem to be installed on this machine.") # add thorpy folder to Windows and Python search paths THORPY_PATH = os.path.abspath(os.path.dirname(__file__)) try: os.env...
YannThorimbert/ThorPy-1.4.3
thorpy/__init__.py
Python
mit
3,614
0.017432
# Copyright (C) 2008 One Laptop Per Child # # 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 distribu...
ajaygarg84/sugar
src/jarabe/journal/palettes.py
Python
gpl-2.0
15,839
0.000126
#coding=utf-8 import argparse import json import os from smartqq import start_qq, list_messages, create_db def load_pluginconfig(configjson): config = None if configjson is not None: if os.path.isfile(configjson): with open(configjson, "r") as f: config = json.load(f) ...
zhongjingjogy/SmartQQBot
smartqq/main.py
Python
gpl-2.0
2,757
0.002176
import uuid import os import time import tempfile import pandas as pd import pytest from synapseclient.core.exceptions import SynapseHTTPError from synapseclient import Entity, File, Folder, Link, Project, Schema import synapseclient.core.utils as utils import synapseutils from tests.integration import QUERY_TIMEOUT...
thomasyu888/synapsePythonClient
tests/integration/synapseutils/test_synapseutils_sync.py
Python
apache-2.0
11,189
0.003582
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, division from future.utils import with_metaclass import numpy as np import scipy as sp from abc import ABCMeta, abstractmethod from scipy import integrate import scipy.interpolate as interpolate from . import core from . import refstate _...
aswolf/xmeos
xmeos/models/gamma.py
Python
mit
11,700
0.005215
# -*- coding: utf-8 -*- """ Created on Fri Dec 23 15:22:48 2011 @author: moritz """ __all__ = ["bslip"]
MMaus/mutils
cmodels/__init__.py
Python
gpl-2.0
106
0
""" Utilities for testing trajectories. """ # Copyright (C) 2009-2011 University of Edinburgh # # This file is part of IMUSim. # # IMUSim 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...
alfkjartan/nvgimu
nvg/testing/trajectories.py
Python
gpl-3.0
2,671
0.002995
from tests.base import ApiDBTestCase from zou.app.models.entity import Entity class BreakdownTestCase(ApiDBTestCase): def setUp(self): super(BreakdownTestCase, self).setUp() self.generate_fixture_project_status() self.generate_fixture_project() self.generate_fixture_asset_type() ...
cgwire/zou
tests/shots/test_breakdown.py
Python
agpl-3.0
4,949
0
# Copyright (c) 2014 Alex Meade. All rights reserved. # Copyright (c) 2014 Clinton Knight. All rights reserved. # Copyright (c) 2015 Tom Barron. 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 ob...
dims/cinder
cinder/volume/drivers/netapp/dataontap/client/client_base.py
Python
apache-2.0
15,903
0
# -*- coding: utf-8 -*- from module.plugins.internal.SimpleCrypter import SimpleCrypter class NosvideoCom(SimpleCrypter): __name__ = "NosvideoCom" __type__ = "crypter" __version__ = "0.07" __status__ = "testing" __pattern__ = r'http://(?:www\.)?nosvideo\.com/\?v=\w+' __config__ = [("activate...
rlindner81/pyload
module/plugins/crypter/NosvideoCom.py
Python
gpl-3.0
917
0.002181
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
TheTimmy/spack
var/spack/repos/builtin/packages/r-modelmetrics/package.py
Python
lgpl-2.1
1,657
0.001207
import sys # --- ROBOT DYNAMIC SIMULATION ------------------------------------------------- from dynamic_graph.sot.hrp2_14.robot import Robot robot = Robot( 'robot' ) # --- LINK ROBOT VIEWER ------------------------------------------------------- from dynamic_graph.sot.core.utils.viewer_helper import addRobotViewer ad...
stack-of-tasks/sot-stabilizer
python/scripts/robotViewerLauncher.py
Python
lgpl-3.0
1,912
0.028766
''' IAM2 Vid Attribute Checker. ''' import zstackwoodpecker.test_util as test_util import zstackwoodpecker.header.checker as checker_header import zstackwoodpecker.operations.iam2_operations as iam2_ops import zstackwoodpecker.operations.resource_operations as res_ops import zstackwoodpecker.operations.vm_operations a...
zstackio/zstack-woodpecker
zstackwoodpecker/zstackwoodpecker/zstack_test/vid_checker/zstack_vid_checker.py
Python
apache-2.0
135,498
0.006295
from .base_reader import BaseReader, InvalidDataDirectory # noqa from .object_detection import ObjectDetectionReader # noqa from .object_detection import ( COCOReader, CSVReader, FlatReader, ImageNetReader, OpenImagesReader, PascalVOCReader, TaggerineReader ) READERS = { 'coco': COCOReader, 'csv': CS...
tryolabs/luminoth
luminoth/tools/dataset/readers/__init__.py
Python
bsd-3-clause
670
0
# Copyright (c) 2015, Nordic Semiconductor # 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 notice, this # list of conditions ...
strobo-inc/pc-nrfutil
nordicsemi/utility/__init__.py
Python
bsd-3-clause
1,580
0.000633
# Copyright 2015 gRPC authors. # # 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 writing...
endlessm/chromium-browser
third_party/grpc/src/src/python/grpcio_tests/tests/protoc_plugin/beta_python_plugin_test.py
Python
bsd-3-clause
26,919
0.000186
id_mappings = { "EX1_097": "Abomination", "CS2_188": "Abusive Sergeant", "EX1_007": "Acolyte of Pain", "NEW1_010": "Al'Akir the Windlord", "EX1_006": "Alarm-o-Bot", "EX1_382": "Aldor Peacekeeper", "EX1_561": "Alexstrasza", "EX1_393": "Amani Berserker", "CS2_038": "Ancestral Spirit", ...
slaymaker1907/hearthbreaker
tests/card_tests/id_mapping.py
Python
mit
23,324
0
import re from iota import * import praw import sqlite3 import random import string from iota.adapter.wrappers import RoutingWrapper import config import urllib.request from urllib.error import HTTPError import json import math node_address = config.node_address class api: def __init__(self,seed,prod=True): ...
normpad/iotatipbot
test/bot_api.py
Python
gpl-3.0
13,535
0.012412
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
TheTimmy/spack
var/spack/repos/builtin/packages/llvm-lld/package.py
Python
lgpl-2.1
1,980
0.000505
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # 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) an...
pheanex/ansible
lib/ansible/playbook/base.py
Python
gpl-3.0
18,228
0.002524
# Copyright 2018 - TODAY Serpent Consulting Services Pvt. Ltd. # (<http://www.serpentcs.com>) # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html). { 'name': 'Search Partner Phone/Mobile/Email', 'version': '11.0.1.0.1', 'category': 'Extra Tools', 'summary': 'Partner Search by Phone/Mo...
brain-tec/partner-contact
partner_phone_search/__manifest__.py
Python
agpl-3.0
616
0
import tensorflow as tf import numpy as np import scipy.io vgg_layers = [ 'conv1_1', 'relu1_1', 'conv1_2', 'relu1_2', 'pool1', 'conv2_1', 'relu2_1', 'conv2_2', 'relu2_2', 'pool2', 'conv3_1', 'relu3_1', 'conv3_2', 'relu3_2', 'conv3_3', 'relu3_3', 'conv3_4', 'relu3_4', 'pool3', 'conv4_1', 'relu4_1', 'con...
everfor/Neural_Artistic_Style
vgg.py
Python
mit
2,235
0.008501
''' primepalCodeEval.py - Solution to Problem Prime Palindrome (Category - Easy) Copyright (C) 2013, Shubham Verma 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 th...
shubhamVerma/code-eval
Category - Easy/primePalindromeCodeEval.py
Python
gpl-3.0
1,290
0.020155
#!/usr/bin/python -tt """Helper functions.""" from dns import resolver # Exceptions class CouldNotResolv(Exception): """Exception for unresolvable hostname.""" pass def resolv(hostname): """Select and query DNS servers. Args: hostname: string, hostname Returns: ips: list, list of IPs """ ip...
MaxIV-KitsControls/netspot
netspot/lib/spotmax/helpers.py
Python
mit
1,004
0.025896
import sys import time from entrypoint2 import entrypoint import pyscreenshot from pyscreenshot.plugins.gnome_dbus import GnomeDBusWrapper from pyscreenshot.plugins.gnome_screenshot import GnomeScreenshotWrapper from pyscreenshot.plugins.kwin_dbus import KwinDBusWrapper from pyscreenshot.util import run_mod_as_subpro...
ponty/pyscreenshot
pyscreenshot/check/speedtest.py
Python
bsd-2-clause
3,228
0.002169
""" models ~~~~~~ Module containing all of our models that are typically accessed in a CRUD like manner. """ from ..models.base import Model as BaseModel from ..models.default_schema import Model as DefaultSchemaModel from ..models.login import Model as LoginModel MODELS = [ BaseModel, Defau...
sassoo/goldman
goldman/models/__init__.py
Python
mit
353
0
from mpf.tests.MpfGameTestCase import MpfGameTestCase class TestPlayerVars(MpfGameTestCase): def get_config_file(self): return 'player_vars.yaml' def get_machine_path(self): return 'tests/machine_files/player_vars/' def test_initial_values(self): self.fill_troughs() self...
missionpinball/mpf
mpf/tests/test_PlayerVars.py
Python
mit
2,380
0.006303
#!/home/tom/ab/android/python-for-android/build/python-install/bin/python2.7 """An RFC 2821 smtp proxy. Usage: %(program)s [options] [localhost:localport [remotehost:remoteport]] Options: --nosetuid -n This program generally tries to setuid `nobody', unless this flag is set. The setuid call ...
duducosmos/pgs4a
python-install/bin/smtpd.py
Python
lgpl-2.1
18,597
0.00043
""" Google's clitable.py is inherently integrated to Linux: This is a workaround for that (basically include modified clitable code without anything that is Linux-specific). _clitable.py is identical to Google's as of 2017-12-17 _texttable.py is identical to Google's as of 2017-12-17 _terminal.py is a highly stripped...
fooelisa/netmiko
netmiko/_textfsm/_clitable.py
Python
mit
12,990
0.007467
from coc_war_planner.api.permissions import CreateNotAllowed from coc_war_planner.api.permissions import IsChiefOrReadOnly from coc_war_planner.api.permissions import IsUserOrReadOnly from coc_war_planner.api.permissions import IsOwnerOrReadOnly from coc_war_planner.api.permissions import IsNotPartOfClanOrCreateNotAllo...
arthurio/coc_war_planner
coc_war_planner/api/views.py
Python
mit
3,228
0.002478
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013 Agile Business Group sagl # (<http://www.agilebg.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public ...
andrius-preimantas/purchase-workflow
purchase_order_force_number/__openerp__.py
Python
agpl-3.0
1,589
0
#!/usr/bin/python # -*- coding: utf-8 -*- # Software License Agreement (BSD License) # # Copyright (c) 2012, Willow Garage, 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: # # * Redistrib...
Aramist/Self-Driving-Car
ros/install/_setup_util.py
Python
mit
12,461
0.002568
#!/usr/bin/python """ Small web application to retrieve genes from the tomato genome annotation involved to a specified pathways. """ import flask from flaskext.wtf import Form, TextField import ConfigParser import datetime import json import os import rdflib import urllib CONFIG = ConfigParser.ConfigParser() CON...
PBR/path2gene
path2gene.py
Python
bsd-3-clause
8,068
0.005949
# Copyright (C) 2011 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 # notice, this list of conditions and the f...
scheib/chromium
third_party/blink/tools/blinkpy/tool/mock_tool.py
Python
bsd-3-clause
1,739
0
""" URLs for the Enrollment API """ from django.conf import settings from django.conf.urls import url from .views import ( CourseEnrollmentsApiListView, EnrollmentCourseDetailView, EnrollmentListView, EnrollmentUserRolesView, EnrollmentView, UnenrollmentView ) urlpatterns = [ url(r'^enr...
stvstnfrd/edx-platform
openedx/core/djangoapps/enrollments/urls.py
Python
agpl-3.0
1,148
0.002613
def getitem(v,d): "Returns the value of entry d in v" assert d in v.D return v.f[d] if d in v.f else 0 def setitem(v,d,val): "Set the element of v with label d to be val" assert d in v.D v.f[d] = val def equal(u,v): "Returns true iff u is equal to v" assert u.D == v.D union = set(u...
tri2sing/LinearAlgebraPython
vec.py
Python
apache-2.0
3,573
0.012315
# # Copyright 2014 Quantopian, 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 wr...
enigmampc/catalyst
tests/utils/test_argcheck.py
Python
apache-2.0
7,116
0
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """Tests for the analysis mediator.""" from __future__ import unicode_literals import unittest from dfvfs.lib import definitions as dfvfs_definitions from dfvfs.path import factory as path_spec_factory from plaso.analysis import mediator from plaso.containers import se...
rgayon/plaso
tests/analysis/mediator.py
Python
apache-2.0
1,743
0.004016
""" This module describes the unlogged state of the default game. The setting STATE_UNLOGGED should be set to the python path of the state instance in this module. """ from evennia.commands.cmdset import CmdSet from evennia.commands.default import unloggedin class UnloggedinCmdSet(CmdSet): """ Sets up the unl...
MarsZone/DreamLand
evennia/evennia/commands/default/cmdset_unloggedin.py
Python
bsd-3-clause
821
0
#!/usr/bin/env python3 #This extracts data from xml plists # #########################COPYRIGHT INFORMATION############################ #Copyright (C) 2013 dougkoster@hotmail.com # #This program is free software: you can redistribute it and/or modify # #it under the terms of the GNU General Public License as...
mantarayforensics/mantaray
Tools/Python/get_system_version.py
Python
gpl-3.0
3,323
0.020163
# -*- coding: utf-8 -*- from typing import Text from zerver.lib.test_classes import WebhookTestCase class HelloSignHookTests(WebhookTestCase): STREAM_NAME = 'hellosign' URL_TEMPLATE = "/api/v1/external/hellosign?stream={stream}&api_key={api_key}" FIXTURE_DIR_NAME = 'hellosign' def test_signatures_mess...
sonali0901/zulip
zerver/webhooks/hellosign/tests.py
Python
apache-2.0
884
0.005656
#!/usr/bin/env python # -*- coding: utf-8 -*- # tifffile.py # Copyright (c) 2008-2014, Christoph Gohlke # Copyright (c) 2008-2014, The Regents of the University of California # Produced at the Laboratory for Fluorescence Dynamics # All rights reserved. # # Redistribution and use in source and binary forms, with or w...
to266/hyperspy
hyperspy/external/tifffile.py
Python
gpl-3.0
172,696
0.000029
#!/usr/bin/env python3 # Copyright (c) 2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. from segwit import send_to_witness from test_framework.test_framework import BitcoinTestFramework from test_fr...
svost/bitcoin
qa/rpc-tests/bumpfee.py
Python
mit
14,241
0.002036
from __future__ import unicode_literals from django.apps import AppConfig class DirtyDriveConfig(AppConfig): name = 'DirtyDrive'
Superchicken1/DirtyDrive
DirtyDrive/apps.py
Python
apache-2.0
136
0
# epydoc.py: manpage-style text output # Edward Loper # # Created [01/30/01 05:18 PM] # $Id: man.py,v 1.6 2003/07/18 15:46:19 edloper Exp $ # """ Documentation formatter that produces man-style documentation. @note: This module is under development. It generates incomplete documentation pages, and is not yet incorpe...
dabodev/dabodoc
api/epydoc/man.py
Python
mit
8,842
0.005881
# -*- coding: utf-8 -*- # Copyright 2022 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...
googleapis/python-aiplatform
google/cloud/aiplatform_v1/services/index_endpoint_service/transports/grpc_asyncio.py
Python
apache-2.0
21,535
0.002136
#!/usr/bin/env python from pylab import * t,x,y,u,v,ax,ay = loadtxt('trajectory.dat',unpack=True) r = sqrt(x**2+y**2) k = u**2+v**2 s = '.' if t.size < 100 else '' figure('Trajectory',figsize=(5,4)) subplot(111,aspect=1) plot(x,y,'b%s-'%s,lw=1) xl,xh = (x.min(),x.max()) xb = 0.1*(xh-xl) xlim(xl-xb,xh+xb) yl,yh = (...
yorzh86/Step1
scripts/post.py
Python
gpl-2.0
1,575
0.040635
#!/usr/bin/env python3 import os import sys import json import boto3 import platform import traceback import subprocess from datetime import datetime config = {} with open(os.path.expanduser('~/.ddns.conf')) as conf: config.update(json.load(conf)) ZONE_ID = config['zone_id'] ROOT = config['root'] HOST = config.ge...
ryansb/workstation
roles/unbound/files/ddns.py
Python
mit
1,890
0.005291
class BASIC_MOVE: ID = 0 Name = 1 Type = 2 PW = 3 Duration = 4 NRG = 5 NRGPS = 6 DPS = 7 # Adapted from the GAME_MASTER_FILE Json Output at: # https://github.com/pokemongo-dev-contrib/pokemongo-game-master/ # https://raw.githubusercontent.com/pokemongo-dev-contrib/pokemongo-game-master/...
darkshark007/PoGoCollection
Data/moves.py
Python
gpl-3.0
11,221
0.111755
# # # # # # MOVE THE NEWLY DOWNLOADED TAS / PR CMIP5 data from work desktop to /Shared # # # # # def move_new_dir( fn, output_dir ): dirname, basename = os.path.split( fn ) elems = basename.split('.')[0].split( '_' ) variable, cmor_table, model, scenario, experiment, years = elems new_dir = os.path.join( output_...
ua-snap/downscale
snap_scripts/epscor_sc/move_raw_cmip5_tas_pr.py
Python
mit
1,039
0.052936
from datetime import timedelta import numpy as np import pytest import pandas as pd from pandas import ( Float64Index, Index, Int64Index, NaT, Timedelta, TimedeltaIndex, timedelta_range) import pandas.util.testing as tm class TestTimedeltaIndex(object): def test_astype_object(self): idx = timede...
GuessWhoSamFoo/pandas
pandas/tests/indexes/timedeltas/test_astype.py
Python
bsd-3-clause
4,066
0
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import add_days, cint, cstr, flt, getdate, nowdate, rounded from frappe.model.naming import make_autoname from frappe ...
meisterkleister/erpnext
erpnext/hr/doctype/salary_slip/salary_slip.py
Python
agpl-3.0
7,265
0.025327
from django.conf import settings from django.conf.urls import patterns, url from django.contrib.auth.views import login, logout import views urlpatterns = patterns( 'gauth', url(r'^login/$', login, {'template_name': 'login.html'}, name='login'), url(r'^login/$', logout, {'template_name': 'logout.html'}, ...
Fl0r14n/django_googleapi
gdrive/urls.py
Python
mit
560
0
# # Copyright (c) 2011 OpenStack Foundation # 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 # # Unles...
openstack/heat
heat/common/policy.py
Python
apache-2.0
7,615
0
import time import logging import struct import socket from mesos.interface.mesos_pb2 import TASK_LOST, MasterInfo from .messages_pb2 import ( RegisterFrameworkMessage, ReregisterFrameworkMessage, DeactivateFrameworkMessage, UnregisterFrameworkMessage, ResourceRequestMessage, ReviveOffersMessage, LaunchTa...
sdgdsffdsfff/pymesos
pymesos/scheduler.py
Python
bsd-3-clause
8,630
0.003708
# -*- coding: utf-8 -*- # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration values have a default; values that are commented out # serve to show the default. import sys, os...
xapple/pyrotrfid
doc/conf.py
Python
gpl-3.0
7,241
0.005662
# Copyright 2016: Mirantis 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 b...
seecloud/ceagle
ceagle/api/v1/regions.py
Python
apache-2.0
1,652
0
"""Support for BMW car locks with BMW ConnectedDrive.""" import logging from homeassistant.components.bmw_connected_drive import DOMAIN as BMW_DOMAIN from homeassistant.components.lock import LockDevice from homeassistant.const import STATE_LOCKED, STATE_UNLOCKED DEPENDENCIES = ['bmw_connected_drive'] _LOGGER = logg...
nugget/home-assistant
homeassistant/components/bmw_connected_drive/lock.py
Python
apache-2.0
3,775
0
# -*- coding: utf-8 -*- ## This file is part of Invenio. ## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 CERN. ## ## Invenio 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...
MSusik/invenio
invenio/legacy/websearch_external_collections/__init__.py
Python
gpl-2.0
21,464
0.00601
from openerp import tools from openerp.osv import osv, fields from openerp.tools.translate import _ import openerp.addons.decimal_precision as dp class product_category(osv.osv): _inherit='product.category' _columns = { 'sale_price' : fields.float('Sale Price',digits_compute=dp.get_precision('...
manishpatell/erpcustomizationssaiimpex123qwe
addons/product_stone_search_ept/py/product/product_category.py
Python
agpl-3.0
912
0.024123
#!/usr/bin/python3 import gpxpy import datetime import time import os import gpxpy.gpx import sqlite3 import pl import re DATE_FORMAT = '%Y-%m-%dT%H:%M:%SZ' filebase = os.environ["XDG_DATA_HOME"]+"/"+os.environ["APP_ID"].split('_')[0] def create_gpx(): # Creating a new file: # -------------------- gpx = g...
VictorThompson/ActivityTracker
py/geepeeex.py
Python
gpl-3.0
5,539
0.017873
# Copyright 2021 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). { "name": "Mozaik Website Event Track", "summary": """ This module allows to see the event menu configuration even without activated debug mode""", "version": "14.0.1.0.0", "license": "AGPL-3",...
mozaik-association/mozaik
mozaik_website_event_track/__manifest__.py
Python
agpl-3.0
525
0
import cPickle as pkl import pdb import datetime import time import numpy as np import pylab as pl import scipy.stats import scipy.special from scipy.special import gamma from scipy.misc import factorial import gnumpy as gp import data_helper class RBM(object): ''' Restricted Boltzmann Machine (RBM) using...
ebattenberg/crbm-drum-patterns
crbm.py
Python
gpl-3.0
63,541
0.013047
#!/usr/bin/python # coding: UTF-8 # Driver for testing pydPiper display # Uses the curses system to emulate a display # Written by: Ron Ritchey import time, curses import lcd_display_driver class lcd_curses(lcd_display_driver.lcd_display_driver): def __init__(self, rows=2, cols=16 ): self.FONTS_SUPPORTED = Fa...
dhrone/pydKeg
displays/lcd_curses.py
Python
mit
1,770
0.039542
# -*- coding: utf-8 -*- # # English Language RTD & Sphinx config file # # Uses ../conf_common.py for most non-language-specific settings. # Importing conf_common adds all the non-language-specific # parts to this conf module try: from conf_common import * # noqa: F403,F401 except ImportError: import os im...
espressif/esp-idf
docs/zh_CN/conf.py
Python
apache-2.0
789
0
#!/usr/bin/env python3 # -*- coding:UTF-8 -*- #Copyright (c) 1986 Nick Wong. #Copyright (c) 2016-2026 TP-NEW Corp. # License: TP-NEW (www.tp-new.com) __author__ = "Nick Wong" """ 用asyncio提供的@asyncio.coroutine可以把一个generator标记为coroutine类型,然后在coroutine内部用yield from调用另一个coroutine实现异步操作 从Python 3.5开始引入了新的语法async和await,可以...
nick-huang-cc/GraffitiSpaceTT
UnderstandStudyPython/IO_coroutine_stu1.py
Python
agpl-3.0
1,188
0.011752
#!/usr/bin/env python # -*- coding: utf-8 -*- # Pasos para transformar proy a geod/proy/GK y exportar a DXF from geod_proy import * from toDXF import * # # 1) Configurar Proyecciones usadas # # 1.1) Proyección Mercator Transversal cualquiera. lat_orig = gms2gyf(-33,52) merid_c = gms2gyf(-61,14) pserapio = config_p...
quijot/agrimpy-package
agrimpy/test.py
Python
mit
1,621
0.001858
import os import sys import codecs from fnmatch import fnmatchcase from distutils.util import convert_path from setuptools import setup, find_packages def read(fname): return codecs.open(os.path.join(os.path.dirname(__file__), fname)).read() # Provided as an attribute, so you can append to these instead # of repl...
johncosta/django-like-button
setup.py
Python
bsd-3-clause
4,721
0.003601
from datetime import datetime import os import pytz class PrintingLogObserver(object): def __init__(self, fp): self.fp = fp def __call__(self, event): if event.get('log_format', None): message = event['log_format'].format(**event) else: message = event.get('me...
MD-Studio/MDStudio
mdstudio/mdstudio/logging/impl/printing_observer.py
Python
apache-2.0
805
0.003727
#!/usr/bin/env python # # HPFeeds.py # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; w...
amohanta/thug
src/Logging/modules/HPFeeds.py
Python
gpl-2.0
6,225
0.008193
#This is a function containing an algorithmic model of the Scribner log rule, # board-foot log volume tables. It outputs the Scribner log volume for an # input log length and top diameter. # # Annotation: [v]=logvolume(L,TD) # v = Scribner log volume # L = log length # ...
dhazel/buck
bucking/logvolume_2.py
Python
gpl-2.0
2,031
0.031019
__author__ = 'Cjsheaf' import csv from threading import Lock class ResultsWriter: """ This class is designed to take out-of-order result data from multiple threads and write them to an organized csv-format file. All data is written to disk at the very end via the "write_results" method, since th...
Cjsheaf/Variation-Discovery-Pipeline
Pipeline_Core/Results_Writer.py
Python
gpl-2.0
3,199
0.003439
total = 0 n = 0 stop = 0 nextMark = input('Type in a mark: ') while stop == 0: nextMark = eval(nextMark) total = total+nextMark n = n + 1 nextMark = input('Hit enter to stop, or type in a mark: ') if nextMark == "": stop = 1 print("You entered", n, 'marks. The average is:',to...
MrColwell/PythonProfessionalLearning
PythonForTeachers/studentExercises/8_2_average.py
Python
mit
339
0.0059
#!/usr/bin/env python import subprocess as sp from runtest import TestBase XDIR='xxx' YDIR='yyy' class TestCase(TestBase): def __init__(self): TestBase.__init__(self, 'diff', """ # # uftrace diff # [0] base: xxx (from uftrace record -d yyy -F main tests/t-diff 1 ) # [1] diff: yyy (from uftrace rec...
namhyung/uftrace
tests/t159_report_diff_policy2.py
Python
gpl-2.0
2,877
0.004866
""" Initializer Initialize application data. Created by Lahiru Pathirage @ Mooniak<lpsandaruwan@gmail.com> on 19/12/2016 """ from session import Base from session import mysql_con_string from sqlalchemy import create_engine from utility import DBManager def initialize(): engine = create_engine( mysql...
fontman/fontman-server
utility/Initializer.py
Python
gpl-3.0
428
0
#!/usr/bin/env python # coding=utf-8 import commands import sys from docopt import docopt #from handler import LogFileClient from sdutil.log_util import getLogger from sdutil.date_util import * reload(sys) sys.setdefaultencoding('utf-8') from elasticsearch import Elasticsearch from pdb import * import requests import ...
zhaochl/python-utils
es/elasticsearch_util.py
Python
apache-2.0
4,771
0.032907
from __future__ import with_statement from alembic import context from sqlalchemy import engine_from_config, pool from logging.config import fileConfig from ocfnet.database import Model from ocfnet.media.models import * from ocfnet.user.models import * try: from config import DATABASE_URL except: from configd...
oregoncountryfair/ocfnet
ocfnet/migrations/env.py
Python
mit
2,236
0.001342
from sys import stdin, stdout n = int(stdin.read()) if n == 1: res = "14" elif n == 2: res = "155" else: res = "1575" + ("0" * (n - 3)) stdout.write(res + "\n")
FireFry/online-judge-solutions
acm.timus.ru/1385.py
Python
gpl-2.0
166
0.024096
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Chatham Financial <oss@chathamfinancial.com> # # 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...
andsens/ansible-modules-extras
messaging/rabbitmq_user.py
Python
gpl-3.0
7,797
0.001411
""" Test plugin for Artifactor """ import time from artifactor import ArtifactorBasePlugin class Test(ArtifactorBasePlugin): def plugin_initialize(self): self.register_plugin_hook("start_test", self.start_test) self.register_plugin_hook("finish_test", self.finish_test) def start_test(self, ...
anurag03/integration_tests
artifactor/plugins/test.py
Python
gpl-2.0
705
0
#!/usr/bin/env python # -*- coding: utf-8 -*- # acertmgr - various support functions # Copyright (c) Markus Hauschild & David Klaftenegger, 2016. # Copyright (c) Rudolf Mayerhofer, 2019. # available under the ISC license, see LICENSE import base64 import datetime import io import os import re import stat import sys i...
moepman/acertmgr
acertmgr/tools.py
Python
isc
18,467
0.003466
#!/usr/bin/env python # Copyright 2014 Hewlett-Packard Development Company, L.P. # # 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 # # Unles...
wikimedia/integration-zuul
tests/test_daemon.py
Python
apache-2.0
2,085
0
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel 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 require...
trustedanalytics/spark-tk
python/sparktk/frame/pyframe.py
Python
apache-2.0
926
0.001179
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals, print_function VERSION = (1, 0, 8, 'final') __version__ = VERSION def get_version(): version = '{}.{}'.format(VERSION[0], VERSION[1]) if VERSION[2]: version = '{}.{}'.format(version, VERSION[2]) if VERSION[3:] == ('...
quiqueporta/django-admin-dialog
django_admin_dialog/__init__.py
Python
gpl-2.0
502
0
from flask import Flask app = Flask(__name__) import views
miqueiaspenha/gerenciadordeprovas
quiz/__init__.py
Python
gpl-2.0
60
0.05
from django.db import models class SpectralTemplate(models.Model): name = models.CharField(max_length=10) path = models.CharField(max_length=100) def __str__(self): return self.name class PhotometricFilter(models.Model): name = models.CharField(max_length=10) path = models.CharField(max...
sergiopasra/django-megaraetc
etc/models.py
Python
gpl-3.0
1,005
0.002985
game_type = 'input_output' parameter_list = [['$x1','string'], ['$y0','string']] tuple_list = [ ['KnR_1-10_',[None,None]] ] global_code_template = '''\ d #include &lt;stdio.h> x #include <stdio.h> dx #define MAXLINE 1000 /* maximum input line length */ dx dx int max; /* maximum length seen so far ...
stryder199/RyarkAssignments
Assignment2/ttt/archive/_old/KnR/KnR_1-10.py
Python
mit
1,389
0.009359
import json import pytest from yelp_beans.logic.secret import get_secret def test_get_secret_file(tmpdir, database): with tmpdir.as_cwd(): expected = 'password' with open(tmpdir.join('client_secrets.json').strpath, 'w') as secrets: secret = {'secret': expected} secrets.wri...
Yelp/beans
api/tests/logic/secret_test.py
Python
mit
573
0
# Copyright (c) 2013-2014 Lingpeng Kong # All Rights Reserved. # # This file is part of TweeboParser 1.0. # # TweeboParser 1.0 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...
ikekonglp/TweeboParser
scripts/AugumentBrownClusteringFeature46.py
Python
gpl-3.0
2,802
0.003212
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('postcode_api', '0010_auto_20150601_1513'), ] operations = [ migrations.AlterIndexTogether( name='address', ...
ministryofjustice/postcodeinfo
postcodeinfo/apps/postcode_api/migrations/0011_auto_20150702_1812.py
Python
mit
394
0
import sys import os.path import logging import ply.yacc from rightarrow.annotations import * from rightarrow.lexer import Lexer logger = logging.getLogger(__name__) class Parser(object): tokens = Lexer.tokens def __init__(self, debug=False, lexer_class=None): self.debug = debug self.lexer_...
kennknowles/python-rightarrow
rightarrow/parser.py
Python
apache-2.0
6,194
0.008072