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 python3 """ URL: http://docs.graphene-python.org/en/latest/types/enums/ """ import graphene class Episode(graphene.Enum): NEWHOPE = 4 EMPIRE = 5 JEDI = 6 @property def description(self): if self == Episode.NEWHOPE: return 'New Hope Episode' return 'Oth...
garciparedes/python-examples
web/django/graphene/graphene-quickstart/lesson-02-enums.py
Python
mpl-2.0
332
0
# # Copyright (C) 2013-2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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...
KaiSzuttor/espresso
samples/p3m.py
Python
gpl-3.0
5,654
0.000531
"""autogenerated by genpy from hrl_lib/Pose3DOF.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct import std_msgs.msg class Pose3DOF(genpy.Message): _md5sum = "646ead44a0e6fecf4e14ca116f12b08b" _type = "hrl_lib/Pose3DOF" _has_header = True #flag ...
HailStorm32/Q.bo_stacks
qbo_stereo_anaglyph/hrl_lib/src/hrl_lib/msg/_Pose3DOF.py
Python
lgpl-2.1
5,992
0.019526
import pytest from collections import OrderedDict from insights.parsers import (calc_offset, keyword_search, optlist_to_dict, parse_delimited_table, parse_fixed_table, split_kv_pairs, unsplit_lines, ParseException, SkipException) SPLIT_TEST_1 = """ # Comment line keyword1 = value1 #...
RedHatInsights/insights-core
insights/parsers/tests/test_parsers_module.py
Python
apache-2.0
24,552
0.002403
"""Screen database.""" import redis_client import control import re from twisted.internet import defer class ScreenDB(object): """A screen database.""" def __init__(self): """Default constructor.""" pass def set_mode(self, screen, mode): redis_client.connection.set('screen:{0}:mod...
prophile/compd
src/screen_db.py
Python
mit
2,580
0.005039
from django.core.urlresolvers import reverse, reverse_lazy from django.shortcuts import render, redirect from django.views import generic from common.models import Discipline, Performance # renders index / home page def index(request): return redirect(reverse('tournaments.main')) # renders todo page def proces...
saechtner/turn-events
Turnauswertung-py3/common/views.py
Python
mit
2,597
0.004621
"""Import an Irish NaPTAN XML file, obtainable from https://data.dublinked.ie/dataset/national-public-transport-nodes/resource/6d997756-4dba-40d8-8526-7385735dc345 """ import warnings import zipfile import xml.etree.cElementTree as ET from django.contrib.gis.geos import Point from django.core.management.base import Ba...
stev-0/bustimes.org.uk
busstops/management/commands/import_ie_naptan_xml.py
Python
mpl-2.0
4,087
0.003181
# This file is part of Indico. # Copyright (C) 2002 - 2021 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from indico.core.db import db from indico.modules.events.contributions.models.fields import ContributionFi...
pferreir/indico
indico/modules/events/abstracts/models/fields.py
Python
mit
1,096
0.002737
""" Infobip Client API Libraries OpenAPI Specification OpenAPI specification containing public endpoints supported in client API libraries. # noqa: E501 The version of the OpenAPI document: 1.0.172 Contact: [email protected] Generated by: https://openapi-generator.tech """ import re # noqa: ...
infobip/infobip-api-python-client
infobip_api_client/model/sms_destination.py
Python
apache-2.0
6,770
0.000295
import pytest sa = pytest.importorskip("sqlalchemy") import os import responses import flask from flask_sqlalchemy import SQLAlchemy from sqlalchemy import event from flask_caching import Cache from flask_login import LoginManager, UserMixin, current_user, login_user, logout_user from flask_dance.consumer import OAut...
singingwolfboy/flask-dance
tests/consumer/storage/test_sqla.py
Python
mit
24,167
0.001407
#!/usr/bin/python2 # # Copyright 2012 Abid Hasan Mujtaba # # 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 la...
abid-mujtaba/fetchheaders
fetchheaders.py
Python
apache-2.0
20,367
0.022193
# coding=UTF-8 from django.shortcuts import redirect from bellum.common.alliance import isAllied from bellum.common.session.login import must_be_logged from bellum.common.session import getAccount, getRace from bellum.common.session.mother import getCurrentMother from djangomako.shortcuts import render_to_response, ren...
piotrmaslanka/bellum
space/views/planetview.py
Python
agpl-3.0
4,242
0.009194
# # gPrime - A web-based genealogy program # # Copyright (C) 2008 Brian G. Matherly # Copyright (C) 2012 Paul Franklin # # 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 versio...
sam-m888/gprime
gprime/plug/_docgenplugin.py
Python
gpl-2.0
4,499
0.000222
import traceback from PyQt5 import QtCore import androguard.session as session from androguard.core import androconf import logging log = logging.getLogger("androguard.gui") class FileLoadingThread(QtCore.QThread): file_loaded = QtCore.pyqtSignal(bool) def __init__(self, parent=None): QtCore.QThre...
shuxin/androguard
androguard/gui/fileloading.py
Python
apache-2.0
1,625
0
from django.contrib import admin from puzzle_captcha.models import Puzzle, PuzzlePiece class PuzzlePieceInline(admin.StackedInline): model = PuzzlePiece readonly_fields = ('key', 'image', 'order') can_delete = False extra = 0 class PuzzleAdmin(admin.ModelAdmin): list_display = ('key', 'rows', 'col...
MegaMark16/django-puzzle-captcha
puzzle_captcha/admin.py
Python
bsd-3-clause
505
0.011881
""" 02-read-from-disk-2.py - Catching the `end-of-file` signal from the SfPlayer object. This example demonstrates how to use the `end-of-file` signal of the SfPlayer object to trigger another playback (possibly with another sound, another speed, etc.). When a SfPlayer reaches the end of the file, it sends a trigger ...
belangeo/pyo
pyo/examples/04-soundfiles/02-read-from-disk-2.py
Python
lgpl-3.0
1,308
0.002294
# Copyright The Cloud Custodian Authors. # SPDX-License-Identifier: Apache-2.0 from common_openstack import OpenStackTest class ServerTest(OpenStackTest): def test_server_query(self): factory = self.replay_flight_data() p = self.load_policy({ 'name': 'all-servers', 'resour...
thisisshi/cloud-custodian
tools/c7n_openstack/tests/test_server.py
Python
apache-2.0
2,461
0
# This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either...
finaldie/final_httpd_mock
.ycm_extra_conf.py
Python
mit
6,141
0.021821
#!/usr/bin/python2.7 -u import os.path if os.path.isdir('/dev/null'): print '/dev/null' if os.path.isdir('/dev'): print '/dev'
Knln/COMP2041
examples/4/filetest2.py
Python
mit
135
0
import ast import logging import time import unittest from malcolm.profiler import Profiler # https://github.com/bdarnell/plop/blob/master/plop/test/collector_test.py class ProfilerTest(unittest.TestCase): def filter_stacks(self, results): # Kind of hacky, but this is the simplest way to keep the tests ...
dls-controls/pymalcolm
tests/test_profiler.py
Python
apache-2.0
2,778
0.00108
# coding=utf-8 #! /usr/bin/python import matplotlib.pyplot as plt import numpy as np import mlpy import sys import math from config import loc_store_path, times_day class LocTrain(object): """ """ def __init__(self, file_name , flag): if flag == "ridge": self.l...
fuxiang90/speed-prediction
script/loc_train.py
Python
bsd-3-clause
1,847
0.02653
# -*- coding: utf-8 -*- # # Copyright 2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should hav...
Katello/katello-cli
src/katello/client/api/package.py
Python
gpl-2.0
1,296
0.000772
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: [email protected] Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
onshape-public/onshape-clients
python/onshape_client/oas/models/btp_expression_operator244.py
Python
mit
12,168
0.000164
from __future__ import absolute_import, unicode_literals from .api.psd_image import PSDImage from .composer import compose __all__ = ['PSDImage', 'compose']
psd-tools/psd-tools
src/psd_tools/__init__.py
Python
mit
158
0
# Copyright 2009-2010 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). __metaclass__ = type __all__ = [ 'BranchRevision', ] from storm.locals import ( Int, Reference, Storm, ) from zope.interface import implements from l...
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/code/model/branchrevision.py
Python
agpl-3.0
984
0
#!/usr/bin/python import os import sys import getopt import shutil import string # Globals quiet = 0 test = 0 comments = 0 sysfsprefix = "/sys/devices/system/rttest/rttest" statusfile = "/status" commandfile = "/command" # Command opcodes cmd_opcodes = { "schedother" : "1", "schedfifo" : "2", "loc...
luckasfb/OT_903D-kernel-2.6.35.7
kernel/scripts/rt-tester/rt-tester.py
Python
gpl-2.0
5,104
0.021552
# -*- coding: utf-8; -*- # # @file urls.py # @brief collgate # @author Frédéric SCHERMA (INRA UMR1095) # @date 2018-09-20 # @copyright Copyright (c) 2018 INRA/CIRAD # @license MIT (see LICENSE file) # @details coll-gate printer module url entry point. from django.conf.urls import include, url urlpatterns = [ ]
coll-gate/collgate
server/printer/urls.py
Python
mit
317
0.003175
from base import ChoicesEnum from _version import __version__
tcwang817/django-choices-enum
django_choices_enum/__init__.py
Python
mit
62
0
import warnings from django.conf import settings from django.contrib.auth.models import User, Group, Permission, AnonymousUser from django.contrib.contenttypes.models import ContentType from django.test import TestCase class BackendTest(TestCase): backend = 'django.contrib.auth.backends.ModelBackend' def s...
towerjoo/mindsbook
django/contrib/auth/tests/auth_backends.py
Python
bsd-3-clause
9,952
0.003014
"""Interfaces with iAlarm control panels.""" from homeassistant.components.alarm_control_panel import AlarmControlPanelEntity from homeassistant.components.alarm_control_panel.const import ( SUPPORT_ALARM_ARM_AWAY, SUPPORT_ALARM_ARM_HOME, ) from homeassistant.helpers.entity import DeviceInfo from homeassistant....
jawilson/home-assistant
homeassistant/components/ialarm/alarm_control_panel.py
Python
apache-2.0
1,923
0.00052
# -*- coding: utf-8 -*- # Copyright (c) 2009 Las Cumbres Observatory (www.lcogt.net) # Copyright (c) 2010 Jan Dittberner # # 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,...
dgoldin/snakebite
snakebite/channel.py
Python
apache-2.0
26,513
0.002565
# Copyright 2022 The T5 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 writi...
google-research/text-to-text-transfer-transformer
t5/models/mesh_transformer.py
Python
apache-2.0
12,873
0.00536
""" This module contains the global configurations of the framework """ #: This name suppose to be used for general meta decoration for functions, #: methods or even classes meta_field = '_pyrsmeta'
palankai/pyrs
pyrs/conf.py
Python
mit
200
0
import feedparser import logging from rss import sources from util import date, dict_tool, tags log = logging.getLogger('app') def parse_feed_by_name(name): feed_params = sources.get_source(name) if not feed_params: raise ValueError('There is no feed with name %s' % name) source_name = feed_par...
andre487/news487
collector/rss/reader.py
Python
mit
2,757
0.001451
#!/usr/bin/python3 """ Merges raw data from geneteka into larger json files. """ from collections import defaultdict import html import json import os import re INPUT_DIR = 'data_raw' OUTPUT_DIR = 'data' def extractNotes(value): match = re.search(r'i.png" title="([^"]*)"', value) if match: return (value.s...
PeWu/python-geneteka
merge.py
Python
apache-2.0
4,704
0.013818
#----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- from pygments.lexers import PythonLexer, BashLexer from pygments.lexer import bygroups, using from pygments.token import Keyword, Operator, Name, Text ...
Carreau/gistpynb
nbconvert/lexers.py
Python
apache-2.0
904
0.006637
# j4cDAC test code # # Copyright 2011 Jacob Potter # # 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, version 3. # # This program is distributed in the hope that it will be useful, # but WITHOUT ...
lightengine/lightstream
lightstream/oldlib/dac.py
Python
bsd-2-clause
5,679
0.035217
from django.conf import settings from django.http import HttpRequest, HttpResponse from django.shortcuts import redirect from django.utils.translation import gettext as _ from zerver.decorator import require_realm_admin from zerver.lib.actions import do_change_icon_source from zerver.lib.exceptions import JsonableErro...
eeshangarg/zulip
zerver/views/realm_icon.py
Python
apache-2.0
2,456
0.00285
# coding: utf-8 from app.api_client.error import HTTPError from app.helpers.login_helpers import generate_buyer_creation_token from dmapiclient.audit import AuditTypes from dmutils.email import generate_token, EmailError from dmutils.forms import FakeCsrf from ...helpers import BaseApplicationTest from lxml import htm...
AusDTO/dto-digitalmarketplace-buyer-frontend
tests/app/views/test_login.py
Python
mit
14,240
0.001545
''' AxelProxy XBMC Addon Copyright (C) 2013 Eldorado 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 vers...
JamesLinEngineer/RKMC
addons/script.module.axel.downloader/lib/standalone_server.py
Python
gpl-2.0
1,470
0.010204
# 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, erpnext import frappe.defaults from frappe import msgprint, _ from frappe.utils import cstr, flt, cint from erpnext.stock.stock_ledger im...
patilsangram/erpnext
erpnext/stock/doctype/stock_reconciliation/stock_reconciliation.py
Python
gpl-3.0
11,573
0.02575
"""Imports for Python API. This file is MACHINE GENERATED! Do not edit. Generated by: tensorflow/tools/api/generator/create_python_api.py script. """ from tensorflow.tools.api.generator.api.keras.preprocessing import image from tensorflow.tools.api.generator.api.keras.preprocessing import sequence from tensorflow.tool...
ryfeus/lambda-packs
Keras_tensorflow_nightly/source2.7/tensorflow/tools/api/generator/api/keras/preprocessing/__init__.py
Python
mit
371
0.002695
''' Swap counting Status: Accepted ''' ############################################################################### def inversions(constants, variables): """Number of swaps""" if variables: pow2 = pow(2, variables - 1, 1_000_000_007) return pow2 * (constants * 2 + variables) return co...
ivanlyon/exercises
kattis/k_sequences.py
Python
mit
969
0.003096
import copy import json import os import warnings from enum import Enum from typing import Any, Callable, Dict, List, Optional, Tuple import gevent import structlog from eth_utils import ( decode_hex, encode_hex, is_checksum_address, remove_0x_prefix, to_canonical_address, to_checksum_address, ...
hackaugusto/raiden
raiden/network/rpc/client.py
Python
mit
34,000
0.002441
# -*- coding: utf-8 -*- """Installer script for Pywikibot 3.0 framework.""" # # (C) Pywikibot team, 2009-2017 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, print_function, unicode_literals import itertools import os import sys try: # Work around a traceback on Pytho...
npdoty/pywikibot
setup.py
Python
mit
8,699
0.000345
__author__ = 'http://www.python-course.eu/python3_inheritance.php' class Person: def __init__(self, first, last): self.firstname = first self.lastname = last def Name(self): return self.firstname + " " + self.lastname class Employee(Person): def __init__(self, first, last, staf...
MarketShareData/Internal
code/test1/inheritanceTest.py
Python
mit
600
0.006667
from functools import partial from typing import Any, Callable, Dict, Generator, List, Optional from django.http import HttpRequest, HttpResponse from zerver.decorator import webhook_view from zerver.lib.exceptions import UnsupportedWebhookEventType from zerver.lib.request import REQ, has_request_variables from zerve...
rht/zulip
zerver/webhooks/clubhouse/view.py
Python
apache-2.0
27,498
0.002655
import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1.inset_locator import inset_axes fig, (ax1, ax2) = plt.subplots(1, 2, figsize=[6, 3]) axins1 = inset_axes(ax1, width="50%", # width = 10% of parent_bbox width height="5%", # height : 50% loc=1) im...
cactusbin/nyt
matplotlib/examples/axes_grid/demo_colorbar_with_inset_locator.py
Python
unlicense
1,052
0.013308
import os import string import random import logging from thug.ActiveX.modules import WScriptShell from thug.ActiveX.modules import TextStream from thug.ActiveX.modules import File from thug.ActiveX.modules import Folder from thug.OS.Windows import win32_files from thug.OS.Windows import win32_folders log = logging....
buffer/thug
thug/ActiveX/modules/ScriptingFileSystemObject.py
Python
gpl-2.0
5,185
0.010222
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2015 clowwindy # # 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...
meowlab/shadowsocks-comment
shadowsocks/lru_cache.py
Python
apache-2.0
4,886
0.003684
# -*- coding: utf-8 -*- from __future__ import unicode_literals from blinker import Namespace namespace = Namespace() #: Trigerred when a dataset is published on_dataset_published = namespace.signal('on-dataset-published')
jphnoel/udata
udata/core/dataset/signals.py
Python
agpl-3.0
226
0
# AnalogClock's font selector for setup dialog # E. A. Tacao <e.a.tacao |at| estadao.com.br> # http://j.domaindlx.com/elements28/wxpython/ # 15 Fev 2006, 22:00 GMT-03:00 # Distributed under the wxWidgets license. import wx from wx.lib.newevent import NewEvent from wx.lib.buttons import GenButton #----...
ktan2020/legacy-automation
win/Lib/site-packages/wx-3.0-msw/wx/lib/analogclock/lib_setup/fontselect.py
Python
mit
1,713
0.005838
import binascii from cryptography.hazmat.primitives import hmac from cryptography.hazmat.primitives.hashes import SHA1 from cryptography.hazmat.primitives.constant_time import bytes_eq import cryptography.hazmat.backends from django.conf import settings from django.core.mail import send_mail from django.http import Htt...
weargoggles/jwt-oauth-test
project/hooks/views.py
Python
gpl-3.0
995
0.00201
# # spyne - Copyright (C) Spyne contributors. # # 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; either # version 2.1 of the License, or (at your option) any later version. # # This libra...
arskom/spyne
spyne/util/tdict.py
Python
lgpl-2.1
2,861
0.00035
#!/usr/bin/python # # Copyright 2008 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 app...
kdlucas/pyrering
lib/baserunner_test.py
Python
apache-2.0
10,873
0.003219
# coding: utf-8 # 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"...
ptrendx/mxnet
python/mxnet/optimizer/optimizer.py
Python
apache-2.0
66,906
0.002735
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'qhangups/qhangupsbrowser.ui' # # Created by: PyQt5 UI code generator 5.7 # # WARNING! All changes made in this file will be lost! from PyQt5 import QtCore, QtGui, QtWidgets class Ui_QHangupsBrowser(object): def setupUi(self, QHangupsBr...
xmikos/qhangups
qhangups/ui_qhangupsbrowser.py
Python
gpl-3.0
1,146
0.004363
'''Test cases for QLayout handling of child widgets references''' import unittest from sys import getrefcount from PySide.QtGui import QHBoxLayout, QVBoxLayout, QGridLayout, QWidget from PySide.QtGui import QStackedLayout, QFormLayout from PySide.QtGui import QApplication, QPushButton, QLabel from helper import Use...
M4rtinK/pyside-android
tests/QtGui/qlayout_ref_test.py
Python
lgpl-2.1
4,597
0.003481
# Copyright (c) by it's authors. # Some rights reserved. See LICENSE, AUTHORS. from peer import * from viewer import Viewer from editor import Editor class SearchDocument(Peer): #Receiving pillows: Search = Pillow.In Sending = [ Viewer.In.Document ] Routings = [ (Editor.Out.Fi...
FreshXOpenSource/wallaby-base
wallaby/pf/peer/searchDocument.py
Python
bsd-2-clause
1,556
0.005141
def countup(n): if n >= 10: print "Blastoff!" else: print n countup(n+1) def main(): countup(1) main() def countdown_from_to(start,stop): if start == stop: print "Blastoff!" elif start <= stop: print "Invalid pair" else: print start countdown_from_to(start - 1,stop) def main(): countdown_...
tonsom1592-cmis/tonsom1592-cmis-cs2
recursion.py
Python
cc0-1.0
624
0.0625
#!/usr/bin/env python """zip source directory tree""" import argparse import fnmatch import logging import os import re import subprocess import zipfile def get_version(): command = ['git', 'describe', '--tags', '--dirty', '--always'] return subprocess.check_output(command).decode('utf-8') def source_walk(r...
nsubiron/configure-pyz
setup.py
Python
gpl-3.0
1,666
0.006002
# -*- coding: utf-8 -*- # File: enemy.py # Author: Casey Jones # # Created on July 20, 2009, 4:48 PM # # This file is part of Alpha Beta Gamma (abg). # # ABG 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, ...
jcnix/abg
enemies.py
Python
gpl-3.0
2,843
0.008442
## # Copyright 2011-2019 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gppezzi/easybuild-framework
easybuild/tools/module_naming_scheme/mns.py
Python
gpl-2.0
7,666
0.004696
#!/usr/bin/env python # Copyright 2018, 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 o...
grpc/grpc-ios
native_src/third_party/googletest/googletest/test/googletest-json-outfiles-test.py
Python
apache-2.0
5,705
0.003155
######################################## # Automatically generated, do not edit. ######################################## from pyvisdk.thirdparty import Enum ProfileNumericComparator = Enum( 'equal', 'greaterThan', 'greaterThanEqual', 'lessThan', 'lessThanEqual', 'notEqual', )
xuru/pyvisdk
pyvisdk/enums/profile_numeric_comparator.py
Python
mit
307
0
__author__ = 'saeedamen' # # Copyright 2015 Thalesians Ltd. - http//www.thalesians.com / @thalesians # # 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 ...
poeticcapybara/pythalesians
pythalesians-examples/marketliquidity_examples.py
Python
apache-2.0
758
0.006596
# NamoInstaller ActiveX Control 1.x - 3.x # CVE-NOMATCH import logging log = logging.getLogger("Thug") def Install(self, arg): if len(arg) > 1024: log.ThugLogging.log_exploit_event(self._window.url, "NamoInstaller ActiveX", ...
pdelsante/thug
thug/ActiveX/modules/NamoInstaller.py
Python
gpl-2.0
1,217
0.008217
#!/usr/bin/env python #Alberto from __future__ import print_function, division import os import glob import argparse from subprocess import Popen, PIPE from argparse import RawTextHelpFormatter import sys import re from textwrap import dedent from subprocess import call def warn(*objs): print(*objs, file=sys.stder...
chemalot/chemalot
bin/gOpt.py
Python
apache-2.0
7,487
0.024709
# !!!!!!!!!!! Add a header to the documentation, that starts with something # like "uncertainties.UFloat-compatible version of...", for all functions. """ Implementation of umath.py, with internals. """ # This module exists so as to define __all__, which in turn defines # which functions are visible to the user in um...
EternityForest/KaithemAutomation
kaithem/src/thirdparty/uncertainties/umath_core.py
Python
gpl-3.0
14,767
0.001761
#forces : A fast customized optimization solver. # #Copyright (C) 2013-2016 EMBOTECH GMBH [[email protected]]. All rights reserved. # # #This software is intended for simulation and testing purposes only. #Use of this software for any commercial purpose is prohibited. # #This program is distributed in the hope that it...
embotech/forcesnlp-examples
robot/acado/export_MPC/forces/interface/forces_build.py
Python
mit
2,126
0.031044
# -*- coding: utf-8 -*- """ Module for making calls to EPO-OPS REST-API. This module contain classes and functions to get data from [EPO-OPS API](http://www.epo.org/searching-for-patents/technical/espacenet/ops.html) """ import logging import re import time from base64 import b64encode from collections import namedtup...
clicumu/epo_utils
epo_utils/api.py
Python
mit
20,708
0.000145
import os import re import sys import json import shlex import logging import inspect import functools import importlib from pprint import pformat from collections import namedtuple from traceback import format_tb from requests.exceptions import RequestException import strutil from cachely.loader import Loader from ....
dakrauth/snarf
snagit/core.py
Python
mit
7,965
0.000126
import unittest import os from sqltxt.table import Table from sqltxt.column import Column, ColumnName, AmbiguousColumnNameError from sqltxt.expression import Expression class TableTest(unittest.TestCase): def setUp(self): self.data_path = os.path.join(os.path.dirname(__file__), '../data') table...
shahin/sqltxt
tests/unit/table_test.py
Python
mit
5,179
0.013516
__author__ = 'mramire8' from collections import defaultdict import copy import numpy as np from sklearn.linear_model import LogisticRegression from baselearner import BaseLearner from sklearn.feature_extraction.text import CountVectorizer from datautil.textutils import StemTokenizer show_utilitly = False class Ra...
mramire8/active
strategy/randomsampling.py
Python
apache-2.0
21,847
0.006454
#!/usr/bin/env python # # Copyright 2010 Google 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...
rolepoint/appengine-mapreduce
python/test/mapreduce/control_test.py
Python
apache-2.0
10,366
0.00328
# -*- coding: utf-8 -*- # # This file is part of Linux Show Player # # Copyright 2012-2016 Francesco Ceruti <[email protected]> # # Linux Show Player 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 ...
FrancescoCeruti/linux-show-player
lisp/modules/midi/midi_output.py
Python
gpl-3.0
1,339
0
# ! /usr/bin/env python # _*_ coding:utf-8 _*_ """ @author = lucas.wang @create_time = 2018-01-12 """ from xml.etree import ElementTree as ET import fnmatch class change_xml(object): """ xml main function """ names = ['iConn.CreateXmlTools.vshost.exe', 'AutoUpdater.dll', 'NewTonsoft.Json.dll', ...
Lucas-Wong/ToolsProject
CodeReview/Change_Xml.py
Python
gpl-3.0
1,695
0.00767
from builtins import str from builtins import object from django.db import models from django.db.utils import OperationalError, ProgrammingError from django.core import checks from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models impor...
fiduswriter/fiduswriter
fiduswriter/document/models.py
Python
agpl-3.0
11,689
0
"""=========================== Geneset analysis =========================== :Author: Andreas Heger :Release: $Id$ :Date: |today| :Tags: Python Overview ======== This pipeline performs gene set analysis of one or more genesets. Input data are two collections of files, genelists and pathways. Genelists are tabular d...
CGATOxford/CGATPipelines
obsolete/pipeline_genesets.py
Python
mit
12,292
0.000163
import dns import requests import socket from recursortests import RecursorTest class RootNXTrustRecursorTest(RecursorTest): def getOutgoingQueriesCount(self): headers = {'x-api-key': self._apiKey} url = 'http://127.0.0.1:' + str(self._wsPort) + '/api/v1/servers/localhost/statistics' r = r...
cyclops1982/pdns
regression-tests.recursor-dnssec/test_RootNXTrust.py
Python
gpl-2.0
3,474
0.002303
# -*- coding: utf-8 -*- import json def json_pre_process_hook(action, request, *args, **kwargs): json_data = request.body if not json_data: action.ret('002').msg('json_params_required') return False try: param_dict = json.loads(json_data) except ValueError: action.ret...
Alexoner/health-care-demo
careHealth/earth/action/hooks.py
Python
gpl-2.0
1,374
0
#!/usr/bin/python # ***************************************************************************** # # Copyright (c) 2016, EPAM 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 # #...
epam/DLab
infrastructure-provisioning/src/general/scripts/aws/jupyter_configure.py
Python
apache-2.0
15,517
0.004705
# -*- coding:utf8 -*- # Author: [email protected] # github: https://github.com/imndszy from flask import Blueprint admin = Blueprint('admin', __name__) from . import views
imndszy/voluntary
app/admin/__init__.py
Python
mit
178
0.005618
#!/usr/bin/env python import sys from setuptools import setup if sys.hexversion < 0x030200a1: print ("LightSweeper requires python 3.2 or higher.") print("Exiting...") sys.exit(1) setup(name='LightSweeper', version='0.6b', description='The LightSweeper API', author='The LightSweeper Team', ...
lightsweeper/lightsweeper-api
setup.py
Python
mit
528
0.020833
from megaera import local, json from oauth import signed_url from google.appengine.api import urlfetch __TWITTER_API__ = "http://api.twitter.com/1" def tweet(status, **credentials): if not credentials: # shortcut for no-credentials case credentials = local.config_get('twitter') if not credentials: ...
tantalor/emend
app/emend/twitter.py
Python
mit
1,161
0.014643
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-06 11:13 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='NewsIt...
nmunro/azathoth
news/migrations/0001_initial.py
Python
agpl-3.0
603
0.001658
import unittest import logging logging.getLogger().setLevel(logging.DEBUG) from ...auction.worker import Worker from ...database import Database from ...rc import sql class TestCase(unittest.TestCase): def setUp(self): self.db = Database.pymysql(**sql) self.ob = Worker(self.db, fail=True) def...
LegionXI/pydarkstar
pydarkstar/tests/auction/test_worker.py
Python
mit
350
0.014286
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.db.models import Q from django.conf import settings from django.http import HttpResponse from django.test import TestCase, override_settings from django.utils import timezone from zerver.lib import bugdown from zerver.decorator import JsonableEr...
Juanvulcano/zulip
zerver/tests/test_messages.py
Python
apache-2.0
72,787
0.001924
# # Copyright (c) 2009--2010 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
colloquium/spacewalk
backend/satellite_tools/rhn_ssl_dbstore.py
Python
gpl-2.0
4,252
0.005174
# -*- coding: utf-8 -*- # +---------------------------------------------------------------------------+ # | 01001110 01100101 01110100 01111010 01101111 01100010 | # | | # | Netzob : Inferring communication prot...
dasbruns/netzob
src/netzob/Common/Models/Types/Raw.py
Python
gpl-3.0
7,876
0.001398
import unittest import maya.cmds as mc import vrayformayaUtils as vfm class TestMeshAttributes(unittest.TestCase): """ This is a generic TestCase for most v-ray mesh attributes. Note that it doesn't test every single case of changes, but it should capture overall changes of the code. """ d...
BigRoy/vrayformayaUtils
tests/attributes_tests.py
Python
gpl-2.0
5,376
0.006696
# -*- coding: utf-8 -*- ############################################################################## # # Post-installation configuration helpers # Copyright (C) 2015 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 P...
OpusVL/odoo-confutil
confutil/account_setup.py
Python
agpl-3.0
4,594
0.00566
import cherrypy, json from bottle import request, get from ring_api.server.api import ring, user class Root(object): def __init__(self, dring): self.dring = dring self.user = user.User(dring) @cherrypy.expose def index(self): return 'todo' @cherrypy.expose def routes(sel...
Bl4ckb0ne/ring-api
ring_api/extra/servers/cherrypy/api/root.py
Python
gpl-3.0
347
0.008646
import os import shutil usage = {} usage['import'] = """catmap import <mkm-file> Open a *.mkm project file and work with it interactively. """ def get_options(args=None, get_parser=False): import optparse import os from glob import glob import catmap parser = optparse.OptionParser( ...
charlietsai/catmap
catmap/cli.py
Python
gpl-3.0
2,874
0.000348
# Copyright (c) weykent <[email protected]> # See COPYING for details. import pytest import runit_sv as _runit_sv_module SETTABLE_MASK = _runit_sv_module.SETTABLE_MASK idempotent = pytest.mark.idempotent def pytest_generate_tests(metafunc): if 'idempotency_state' not in metafunc.fixturenames: return ...
weykent/ansible-runit-sv
tests/test_runit_sv.py
Python
isc
14,619
0
""" Parse string to create Regex object. TODO: - Support \: \001, \x00, \0, \ \[, \(, \{, etc. - Support Python extensions: (?:...), (?P<name>...), etc. - Support \<, \>, \s, \S, \w, \W, \Z <=> $, \d, \D, \A <=> ^, \b, \B, [[:space:]], etc. """ from hachoir_regex import (RegexString, RegexEmpty, RegexRepeat, R...
foreni-packages/hachoir-regex
hachoir_regex/parser.py
Python
gpl-2.0
6,130
0.006199
from gpu import * LAMP_TYPES = [ GPU_DYNAMIC_LAMP_DYNVEC, GPU_DYNAMIC_LAMP_DYNCO, GPU_DYNAMIC_LAMP_DYNIMAT, GPU_DYNAMIC_LAMP_DYNPERSMAT, GPU_DYNAMIC_LAMP_DYNENERGY, GPU_DYNAMIC_LAMP_DYNENERGY, GPU_DYNAMIC_LAMP_DYNCOL, GPU_DYNAMIC_LAMP_DISTANCE, GPU_DYNAMIC_LAMP_ATT1, GPU_DYNAMIC...
lukesanantonio/blendergltf
gpu_luts.py
Python
apache-2.0
3,110
0.018328
import os.path from tornado import ioloop, httpserver, web, websocket, template from config import GameConfig OS = os.path.dirname(__file__) def server_path(uri): return os.path.join(OS, uri) def static_path(uri): return { "path": server_path("static/" + uri) } level_1 = GameConfig() class TarmHandler(web.Reques...
msartintarm/site
server.py
Python
mit
1,592
0.029523
# 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 may ...
Azure/azure-sdk-for-python
sdk/policyinsights/azure-mgmt-policyinsights/azure/mgmt/policyinsights/operations/__init__.py
Python
mit
1,234
0.002431
import hashlib import mock import uuid from django.test import TestCase from ..models import Commander class CommanderTestCase(TestCase): def test_generate_token(self): with mock.patch.object(uuid, 'uuid4', return_value='a_test'): cmdr = Commander( name='Branch' )...
toastdriven/eliteracing
cmdrs/tests/test_models.py
Python
bsd-3-clause
666
0