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
from __future__ import unicode_literals, division, absolute_import from builtins import * # noqa pylint: disable=unused-import, redefined-builtin import collections import logging import os import sys import tempfile from flexget import plugin from flexget.event import event log = logging.getLogger('subtitles') tr...
LynxyssCZ/Flexget
flexget/plugins/output/subtitles_subliminal.py
Python
mit
12,114
# -*- test-case-name: txweb2.test.test_httpauth -*- ## # Copyright (c) 2006-2009 Twisted Matrix Laboratories. # Copyright (c) 2010-2014 Apple Inc. All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"),...
trevor/calendarserver
txweb2/auth/digest.py
Python
apache-2.0
4,438
# pylint: disable=F0401 import os import sys from setuptools import setup, find_packages here = os.path.dirname(os.path.realpath(__file__)) sys.path.insert(0, os.path.normpath(os.path.join(here, 'src', 'openmdao', ...
DailyActie/Surrogate-Model
01-codes/OpenMDAO-Framework-dev/openmdao.lib/setup.py
Python
mit
9,371
# from pytigon_js.tools import history_push_state, correct_href, remove_element, process_resize # from pytigon_js.ajax_region import mount_html class Page: def __init__(self, id, page): self.id = id self.page = page def set_href(self, href): self.page.attr("_href", href) def get_...
Splawik/pytigon
pytigon/static_src/pytigon_js/tabmenu.py
Python
lgpl-3.0
5,498
#!/usr/bin/python3 """ f24.occurences ~~~~~~~~~~~~~~ This module contains the class handling air transport occurences. """ from data_suppliers.avherald import Avherald from flight_list import FlightList class Occurences: def __init__(self): avh = Avherald() occurence = {} occurence = a...
MatthieuMichon/f24
src/v1/occurences.py
Python
gpl-2.0
505
#!/usr/bin/env python import os if __name__ == "__main__": positive_pssm_dir = "/Users/clclcocoro/work/lipid_bindResPred/work/pssm/positive" positive_bindres_dir = "/Users/clclcocoro/work/lipid_bindResPred/work/bindres/positive" positive_secondary_structure_dir = "/Users/clclcoc...
clclcocoro/LipidPrediction
module/create_data_path_file.py
Python
mit
2,428
#Copyright (c) 2019 Ultimaker B.V. #Cura is released under the terms of the LGPLv3 or higher. from typing import cast from Charon.VirtualFile import VirtualFile #To open UFP files. from Charon.OpenMode import OpenMode #To indicate that we want to write to UFP files. from io import StringIO #For converting g-code to b...
thopiekar/Cura
plugins/UFPWriter/UFPWriter.py
Python
lgpl-3.0
6,116
# stdlib import ConfigParser from cStringIO import StringIO import glob import imp import inspect import itertools import logging import logging.config import logging.handlers from optparse import OptionParser, Values import os import platform import re from socket import gaierror, gethostbyname import string import sy...
lookout/dd-agent
config.py
Python
bsd-3-clause
41,147
# -*- coding: utf-8 -*- import ujson from typing import Any, Mapping, List from django.core.exceptions import ValidationError from zerver.lib.actions import recipient_for_user_ids from zerver.lib.test_helpers import tornado_redirected_to_list, get_display_recipient from zerver.lib.test_classes import ( ZulipTest...
jackrzhang/zulip
zerver/tests/test_typing.py
Python
apache-2.0
11,772
import antlr3 import testbase import unittest class t003lexer(testbase.ANTLRTest): def setUp(self): self.compileGrammar() def lexerClass(self, base): class TLexer(base): def emitErrorMessage(self, msg): # report errors to /dev/null p...
sshrdp/mclab
lib/antlr-3.0.1/runtime/Python/tests/t003lexer.py
Python
apache-2.0
1,350
# Copyright 2016 Osvaldo Santana Neto # # 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 ...
osantana/correios
tests/vcr.py
Python
apache-2.0
1,315
from __future__ import unicode_literals, division, absolute_import import sys from argparse import ArgumentTypeError, ArgumentParser from builtins import * # noqa pylint: disable=unused-import, redefined-builtin from colorclass.toggles import disable_all_colors from sqlalchemy.orm.exc import NoResultFound from flex...
gazpachoking/Flexget
flexget/components/pending_approval/cli.py
Python
mit
5,168
# -*- coding: utf-8 -*- # # gPodder - A media aggregator and podcast client # Copyright (c) 2005-2018 The gPodder Team # # gPodder 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 Licens...
gpodder/gpodder
src/gpodder/syncui.py
Python
gpl-3.0
15,788
# -*- coding: utf-8 -*- import datetime import json import ddt import mock from mock import patch, Mock from nose.plugins.attrib import attr from pytz import UTC from django.utils.timezone import UTC as django_utc from django.core.urlresolvers import reverse from django.test import TestCase, RequestFactory from edxmak...
itsjeyd/edx-platform
lms/djangoapps/django_comment_client/tests/test_utils.py
Python
agpl-3.0
60,467
# -*- coding: utf-8 -*- """ The module's functions operate on message bodies trying to extract original messages (without quoted messages) """ import regex as re import logging from copy import deepcopy from lxml import html, etree import html2text from claw.constants import RE_DELIMITER from claw.utils import rand...
ad-m/claw
claw/quotations.py
Python
apache-2.0
13,506
# coding: utf-8 import sys import codecs sys.path.append('/project/nakamura-lab01/Work/yusuke-o/python') from data.reader import dlmread def main(): if len(sys.argv) != 4: print('USAGE: python3 predicttosplit.py \\') print(' <in-file: LIBLINEAR prediction> \\') print(' <in-file: i...
ahclab/greedyseg
predicttosplit.py
Python
gpl-2.0
934
# Copyright 2022 The Magenta 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 ...
magenta/magenta
magenta/tensor2tensor/problems.py
Python
apache-2.0
807
#application manager APP_MANAGER_FABRIC = "fabric"
Orpheus11/nile
nile/common/const.py
Python
apache-2.0
50
import numpy as np from ..inp import data_IO from . import max_mag_cut, obs_clust_prepare, ptemcee_algor from ..synth_clust import synth_clust_gen from .mcmc_convergence import convergenceVals from .bf_common import r2Dist, modeKDE, fillParams # thinChain def main(npd, pd, clp): """ Perform a best fitting p...
asteca/ASteCA
packages/best_fit/best_fit_synth_cl.py
Python
gpl-3.0
7,129
# Copyright (c) 2012 Web Notes Technologies Pvt Ltd (http://erpnext.com) # # MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without restriction, including without lim...
gangadhar-kadam/mic-wnframework
core/doctype/event/event.py
Python
mit
2,043
from numpy.testing import assert_ from statsmodels.base.optimizer import (_fit_newton, _fit_nm, _fit_bfgs, _fit_cg, _fit_ncg, _fit_powell, _fit_lbfgs, _fit_basinhopping) fit_funcs = { 'newton': _...
hlin117/statsmodels
statsmodels/base/tests/test_optimize.py
Python
bsd-3-clause
2,309
import model import sys usage = """Imports a list of bitcoin addresses from a file. Example: $ python import_btcaddrs.py file.txt """ if len(sys.argv) != 1: print usage sys.exit(1) l = open(sys.argv[1], "r").readlines() l = [a[:-1] for a in l] for a in l: model.DB.get().add_btc_addr(a)
benediktkr/lokun-record
record/import_btcaddrs.py
Python
agpl-3.0
305
# -*- coding:utf-8 -*- import json f = file("/usr/local/shadowsocksr/mudb.json"); json = json.load(f); print "用户名\t端口\t加密方式\t密码" for x in json: print "%s\t%s\t%s\t%s" %(x[u"user"],x[u"port"],x[u"method"],x[u"passwd"]) f.close();
iGeekQu/SSR-Bash-Python
user/show_all_user_info.py
Python
gpl-3.0
260
"""Support for switch sensor using I2C MCP23017 chip.""" from adafruit_mcp230xx.mcp23017 import MCP23017 import board import busio import digitalio import voluptuous as vol from homeassistant.components.switch import PLATFORM_SCHEMA from homeassistant.const import DEVICE_DEFAULT_NAME import homeassistant.helpers.confi...
jawilson/home-assistant
homeassistant/components/mcp23017/switch.py
Python
apache-2.0
2,642
import time, resource from sqlalchemy import * from sqlalchemy.orm import * from sqlalchemy.testing.util import gc_collect from sqlalchemy.testing import profiling db = create_engine('sqlite://') metadata = MetaData(db) Person_table = Table('Person', metadata, Column('id', Integer, primary_key=Tru...
rclmenezes/sqlalchemy
test/perf/objselectspeed.py
Python
mit
4,203
# -*- coding: utf-8 -*- ############################################################################### # # RecordActivity # Records a newly-completed background activity, or begins recording an activity still in progress. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache ...
jordanemedlock/psychtruths
temboo/core/Library/RunKeeper/BackgroundActivities/RecordActivity.py
Python
apache-2.0
3,629
# Copyright 2020 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/tpu
models/official/detection/projects/fashionpedia/configs/model_config.py
Python
apache-2.0
6,337
# -*- test-case-name: twisted.conch.test.test_scripts -*- # Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. # # $Id: tkconch.py,v 1.6 2003/02/22 08:10:15 z3p Exp $ """ Implementation module for the `tkconch` command. """ from __future__ import nested_scopes import Tkinter, tkFileDial...
eunchong/build
third_party/twisted_10_2/twisted/conch/scripts/tkconch.py
Python
bsd-3-clause
23,274
from setuptools import setup """ https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html python setup.py register sdist upload python setup.py sdist \ pip install dist/FgczMaxQuantWrapper*z """ def readme(): with open('README.rst') as f: return f.read() setup(name='maxquant_wrap...
fgcz/maxquant_wrapper
setup.py
Python
gpl-3.0
1,751
from models import BaseModel class RegistryModel(BaseModel): table = "registrys" db = "console" fields={ "registry_id":True, "container_id":True, "user_name":True, "user_id":True, "inspect_container":True, "run_host":True, "status":True, ...
liuhong1happy/DockerConsoleApp
models/registry.py
Python
apache-2.0
393
from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.utils.decorators import method_decorator from django.utils.translation import ugettext_noop from corehq import toggles from corehq.apps.domain.views import DomainViewMixin, LoginAndDomainMixin from corehq.apps.hqwebap...
SEL-Columbia/commcare-hq
corehq/apps/dashboard/views.py
Python
bsd-3-clause
1,502
#!/usr/bin/env python import shutil import sys acl_fmtstr=""" acl {aclname} path_beg {externalroute} """ use_backend_fmtstr=""" use_backend {backendname} if {aclname} """ cfg_frontend_fmtstr="""\ frontend proxylite_frontend option httplog bind *:{port} mode http acl acl_root_redirect path / {a...
tobilg/dcos-commons
frameworks/proxylite/src/main/docker/files/configure.py
Python
apache-2.0
6,089
# Copyright (c) LinkedIn Corporation. All rights reserved. Licensed under the BSD-2 Clause license. # See LICENSE in the project root for license information. """Tests for iris.""" import falcon.testing import iris.cache from iris.api import ReqBodyMiddleware, AuthMiddleware, Healthcheck import time import hmac import...
dwang159/iris-api
test/test_irisapi.py
Python
bsd-2-clause
6,268
from django.db.models import Count from rest_framework import parsers from rest_framework import renderers from rest_framework import viewsets from rest_framework.decorators import detail_route from rest_framework.exceptions import PermissionDenied from rest_framework.response import Response from rest_framework.views...
omriabnd/UCCA-App
Server/uccaApp/views/AnnotatorTasksViewSet.py
Python
gpl-3.0
1,822
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
iModels/ffci
github/tests/GitCommit.py
Python
mit
3,242
import unittest from testlib import testutil, PygrTestProgram import ConfigParser import os import string import sys from pygr.mapping import Collection import pygr.Data try: import hashlib except ImportError: import md5 as hashlib config = ConfigParser.ConfigParser({'testOutputBaseDir': '.', ...
cjlee112/pygr
tests/annotation_hg18_megatest.py
Python
bsd-3-clause
63,613
# Copyright (c) 2016 EasyStack Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
openstack/oslo.utils
oslo_utils/dictutils.py
Python
apache-2.0
1,194
## p7.py - parallel processing microframework ## (c) 2017 by mobarski (at) gmail (dot) com ## licence: MIT ## version: ex4 (simple fan-in of subprocess outputs) from __future__ import print_function # CONFIG ################################################################################### HEAD_LEN_IN = 2 HEAD_LEN_...
mobarski/sandbox
parallel/p7ex4.py
Python
mit
2,120
# -*- coding: utf-8 -*- from __future__ import absolute_import import re import unittest import os import sys from copy import copy, deepcopy from lark.utils import isascii from lark import Token, Transformer_NonRecursive, LexError try: from cStringIO import StringIO as cStringIO except ImportError: # Avail...
lark-parser/lark
tests/test_parser.py
Python
mit
91,687
from django.conf.urls import url from .views import ( getNewResult, getSessionAndsemester, showSemesterResult, showSubjectMarks, studentSemesterResult, contactUs, reportError, reportBug, ) urlpatterns=[ url(r'^$',getSessionAndsemester,name='home'), url(r'^addnewrollno/$',getNewResult,name='newResult'), ur...
rpsingh21/resultanalysis
resultAnalysis/result/urls.py
Python
mit
912
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-06-06 19:50 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('crm', '0001_initial'), ] operations = [ migrations.AlterField( m...
asterix135/infonex_crm
crm/migrations/0002_auto_20160606_1550.py
Python
mit
598
from devito.core.cpu import (Cpu64AdvCOperator, Cpu64AdvOmpOperator, Cpu64FsgCOperator, Cpu64FsgOmpOperator) __all__ = ['Intel64AdvCOperator', 'Intel64AdvOmpOperator', 'Intel64FsgCOperator', 'Intel64FsgOmpOperator'] Intel64AdvCOperator = Cpu64AdvCOperator Intel64AdvOmpOperator...
opesci/devito
devito/core/intel.py
Python
mit
427
#!/usr/bin/env python3 ## coding=utf-8 from pynq.board import Register from threading import Lock import argparse import flask import re import os SECURE = False SUPPORTED_ERROR_CODES = {428, 429, 400, 401, 403, 404, 405, 406, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 422, 431, 50...
AEW2015/PYNQ_PR_Overlay
Pynq-Z1/notebooks/Video_PR/webserver/webserver.py
Python
bsd-3-clause
5,535
from pygame import sprite, image colNumber = {"a": 0, "b": 1, "c": 2, "d": 3, "e": 4, "f": 5, "g": 6, "h": 7} #gives the character, as a string, corresponding to the column num def colStr(num): num = int(num) num = num%8 #deals with negative numbers if num == 0: return 'a' elif num == 1: ...
crockct/Colleens_Chess
ChessPieces.py
Python
mit
18,042
# -*- coding: utf-8 -*- """ *************************************************************************** SpatialIndex.py --------------------- Date : January 2016 Copyright : (C) 2016 by Alexander Bruy Email : alexander dot bruy at gmail dot com ************...
wonder-sk/QGIS
python/plugins/processing/algs/qgis/SpatialIndex.py
Python
gpl-2.0
2,679
from setuptools import setup setup(name='pcap_to_ditg', version='0.1.1', description='Generate DITG script files from a pcap file', url='http://github.com/devenbansod/pcapToDITG', author='Deven Bansod', author_email='devenbansod.bits@gmail.com', license='LICENSE', packages=['p...
prabodh1194/pcap_to_ditg
setup.py
Python
gpl-3.0
409
# Copyright 2011 OpenStack Foundation # # 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 ...
phenoxim/nova
nova/api/openstack/compute/scheduler_hints.py
Python
apache-2.0
1,358
# -*- coding: utf-8 -*- from configs import SCREEN_WIDTH, SCREEN_HEIGHT from cocos.layer import Layer from pyglet.gl import glPushMatrix, glPopMatrix from resources import Resource import random class BackgroundLayer(Layer): BACKGROUNDS = ['level1-bg.jpg', 'level2-bg.jpg'] def __init__(self): super(B...
msfernandes/stealth
src/layers.py
Python
mit
1,138
from . import models def retrieve(dico_ingredients): b = list(models.Ingredient.objects.all()) #retriev ingredient names only a = [ing.ingredient_id for ing in b] for key, value in dico_ingredients.items(): print(key) if key not in a: ingredient_object = models.Ingredient.obj...
BecquerelRecipe/Trunk
becquerel_django/ratatouille/retrieve_ingredients.py
Python
apache-2.0
518
# -*- coding: utf-8 -*- from datetime import datetime from django.contrib.auth.models import User from hvad.test_utils.data import D1, D3, D2 from testproject.app.models import Normal, Date, Standard class Fixture(object): def create_fixtures(self): pass class OneSingleTranslatedNormalMixin(Fixture): ...
ojii/django-nani
hvad/test_utils/fixtures.py
Python
bsd-3-clause
2,734
# -*- coding: utf-8 -*- import rough_calculations.ng_min_dim_of_abutment_support __author__= "Luis C. Pérez Tato (LCPT) and Ana Ortega (AOO)" __copyright__= "Copyright 2015, LCPT and AOO" __license__= "GPL" __version__= "3.0" __email__= "l.pereztato@gmail.com" b2= rough_calculations.ng_min_dim_of_abutment_support.get...
lcpt/xc
verif/tests/rough_calculations/test_min_dim_abut_support.py
Python
gpl-3.0
827
############################################################################### # # NutAlert object class # ############################################################################### __doc__ = """ NutAlert NutAlert is a component of a SerialConsoleDevice $id: $""" __version__ = "$Revision: 1.1 $"[11:-2] from ...
zenoss/ZenPacks.Opengear.ConsoleServer
ZenPacks/Opengear/ConsoleServer/NutAlert.py
Python
gpl-2.0
2,838
# # 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/minimal-charged-particles.py
Python
gpl-3.0
3,404
import numpy as np # Needed to compute advanced products from inlinino.instruments import Instrument from time import time, sleep class DATAQ(Instrument): """ slist for model DI-1100 0x0000 = Analog channel 0, ±10 V range 0x0001 = Analog channel 1, ±10 V range 0x0002 = Analog channel 2, ±10 V ran...
OceanOptics/Inlinino
inlinino/instruments/dataq.py
Python
gpl-3.0
5,321
# Authors: # Pavel Zuna <pzuna@redhat.com> # # Copyright (C) 2009 Red Hat # see file 'COPYING' for use and warranty information # # 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...
ofayans/freeipa
ipaserver/plugins/hbacrule.py
Python
gpl-3.0
19,549
# 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 applicab...
jiaphuan/models
research/ptn/model_ptn.py
Python
apache-2.0
8,287
from requests import HTTPError from pajbot.apiwrappers.base import BaseAPI from pajbot.apiwrappers.response_cache import ListSerializer from pajbot.models.emote import Emote class FFZAPI(BaseAPI): def __init__(self, redis): super().__init__(base_url="https://api.frankerfacez.com/v1/", redis=redis) @...
pajlada/pajbot
pajbot/apiwrappers/ffz.py
Python
mit
2,545
#!/usr/bin/env python3 # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ A clone of 'ps -aux' on UNIX. $ python scripts/ps.py ... """ import datetime import os import time import psutil PROC_STAT...
HongxuChen/dotfiles
_bin/psutils/ps.py
Python
mit
3,217
#!/usr/bin/env python3 # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
google/fruit
tests/test_class_destruction.py
Python
apache-2.0
6,811
from pyramid.config import Configurator def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ config = Configurator(settings=settings) config.scan() return config.make_wsgi_app()
lovelysystems/lovely.pyrest
testing/examples/main.py
Python
apache-2.0
242
from os.path import abspath import wptools from mycroft.messagebus.message import Message from mycroft.skills.LILACS_knowledge.services import KnowledgeBackend from mycroft.util.log import getLogger __author__ = 'jarbas' logger = getLogger(abspath(__file__).split('/')[-2]) class WikidataService(KnowledgeBackend):...
ElliotTheRobot/LILACS-mycroft-core
mycroft/skills/LILACS_knowledge/services/wikidata/__init__.py
Python
gpl-3.0
2,400
# import the basic python packages we need import os import sys import tempfile import pprint import traceback # disable python from generating a .pyc file sys.dont_write_bytecode = True # change me to the path of pytan if this script is not running from EXAMPLES/PYTAN_API pytan_loc = "~/gh/pytan" pytan_static_path =...
tanium/pytan
BUILD/doc/source/examples/invalid_ask_parsed_question_no_picker_code.py
Python
mit
2,371
#!/usr/bin/env python3 def which_sue(part=1): sues = [] for line in open("day_16.txt").read().strip().split("\n"): parts = line.split(" ") sues.append({parts[2][:-1]: int(parts[3][:-1]), parts[4][:-1]: int(parts[5][:-1]), parts[6][:-1]: int(parts[7])})...
Tigge/advent-of-code-2015
day_16.py
Python
mit
1,117
try: from PyQt5.QtCore import * from PyQt5.QtGui import * from PyQt5.QtWidgets import (QWidget, QLCDNumber, QSlider,QVBoxLayout, QApplication, QPushButton, QLabel) except ImportError: from PyQt4.QtCore import * from PyQt4.QtGui import * try: import _pickle as cPickle import urllib.request a...
tsstss123/CGZZT
wind.py
Python
gpl-3.0
4,082
# -*- coding: utf-8 -*- from django.core.mail.backends.base import BaseEmailBackend from django.core.mail.message import sanitize_address from django.conf import settings import requests import logging logger = logging.getLogger(__name__) class Newsletter2GoEmailBackend(BaseEmailBackend): n2g_api_endpoint = '...
lukasklein/django-newsletter2go
newsletter2go/backends.py
Python
bsd-3-clause
1,590
#!/usr/bin/env python # -*- coding: utf-8 -*- # __init__.py # # Copyright 2011 Daniel Francis <santiago.danielfrancis@gmail.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 # t...
Daksh/file-manager
filemanager/__init__.py
Python
gpl-3.0
1,016
server = 'http://www.weather.gov/forecasts/xml/SOAP_server/ndfdXMLclient.php' params = [ 'maxt', 'temp', 'mint', 'pop12', 'sky', 'wspd', 'appt', 'qpf', 'snow', 'wx', 'wgust', 'icons', 'rh' ] def xml(latitude, longitude): import urllib, xml.parsers.expat param_strs = [] for param in para...
jonstjohn/pysky
pysky/noaa_ws.py
Python
mit
1,091
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('qualifications', '0009_auto_20141028_1053'), ] operations = [ migrations.AddField( model_name='position', ...
gdebure/cream
qualifications/migrations/0010_position_comment.py
Python
gpl-3.0
453
# DER decoder from pyasn1.codec.cer import decoder tagMap = decoder.tagMap typeMap = decoder.typeMap Decoder = decoder.Decoder decode = Decoder(tagMap, typeMap)
geofft/pyasn1
pyasn1/codec/der/decoder.py
Python
bsd-2-clause
163
# Copyright (c) 2019 UAVCAN Consortium # This software is distributed under the terms of the MIT License. # Author: Pavel Kirienko <pavel@uavcan.org> import typing import logging import numpy import pytest import pyuavcan.dsdl _logger = logging.getLogger(__name__) def _unittest_slow_manual_assignment(compiled: t...
UAVCAN/pyuavcan
tests/dsdl/_manual.py
Python
mit
8,264
#coding=utf-8 from read_conf import config import jieba import re import os import sys reload(sys) sys.setdefaultencoding('utf-8') t_path = config('../conf/dp.conf') def get_stop_list(path): stop_list = [] with open(path,'rb') as infile: lines = infile.readlines() line_num = 1 for lin...
CharLLCH/work-for-py
nlp-train/old/get_gram.py
Python
gpl-2.0
2,980
#!python """Script for building mutational trajectory directed graphs. Using the mutational paths file written by ``mutpath_get_paths.py``, this script builds a directed graph through sequence space showing the mutational trajectory. This path can be visualized using GraphViz. Written by Jesse Bloom. """ import r...
jbloom/mutpath
scripts/mutpath_make_digraph.py
Python
gpl-3.0
4,633
#!/usr/bin/python ''' Git pre commit hook: write latest commit's datetime This script writes the date and time of the pending commit into the source file `doc/index.rst` for the documentation and the file `__init__.py` of pytrajectory such that it is obvious to which current code version they belong. If changed, th...
akunze3/pytrajectory
.pre-commit.py
Python
bsd-3-clause
2,385
from __future__ import print_function, division, absolute_import import numpy as np from dateutil.parser import parse as dateparse from datetime import datetime, date from .dispatch import dispatch from time import strptime from .coretypes import (int32, int64, float64, bool_, complex128, datetime_, ...
aterrel/datashape
datashape/discovery.py
Python
bsd-2-clause
5,634
# encoding: utf-8 from __future__ import unicode_literals import pytest from marrow.mongo import Document class FieldExam(object): __args__ = tuple() __kwargs__ = dict() @pytest.fixture() def Sample(self, request): class Sample(Document): field = self.__field__(*self.__args__, **self.__kwargs__) re...
marrow/mongo
test/field/common.py
Python
mit
332
from django.shortcuts import render_to_response, get_object_or_404 from django.http import HttpResponseBadRequest, HttpResponse from django.contrib.auth.decorators import login_required from django.template import RequestContext from django.core.urlresolvers import reverse #from django.utils.translation import ugettext...
naveenu/Adlibre-TMS-master
adlibre_tms/apps/tms/views.py
Python
bsd-3-clause
8,103
from flask_wtf import Form, RecaptchaField from wtforms import HiddenField class RecaptchaForm(Form): recaptcha = RecaptchaField() redirect = HiddenField('redirect')
nickofbh/kort2
app/utility/forms.py
Python
mit
170
from django.http import HttpRequest from django.shortcuts import render # Create your views here. def overview(request: HttpRequest): return render(request, 'sensors/overview.html')
KSG-IT/ksg-nett
sensors/views.py
Python
gpl-3.0
187
import Vector import VS import debug import quest import quest_explore import unit import universe import vsrandom class quest_teleport (quest.quest): def __init__ (self): self.sysfile = VS.getSystemFile() self.timer = VS.GetGameTime() self.explorequest = quest_explore.quest_explore_factor...
ermo/privateer_wcu
modules/quests/quest_teleport.py
Python
gpl-2.0
2,595
from django.db import models from django.core.validators import MaxValueValidator, MinValueValidator from django.contrib.auth.models import User from sorl.thumbnail import ImageField from category.models import Category RATING_DISPLAY = ('Horrible', 'Bad', 'Fair', 'Good', 'Fantastic') class Product(models.Model): ...
sorz/isi
store/product/models.py
Python
mit
4,466
"""adding timestamps to all tables Revision ID: c0a714ade734 Revises: 1a886e694fca Create Date: 2016-04-20 14:46:06.407765 """ # revision identifiers, used by Alembic. revision = 'c0a714ade734' down_revision = '1a886e694fca' branch_labels = None depends_on = None from alembic import op import sqlalchemy as sa def ...
fedspendingtransparency/data-act-validator
dataactvalidator/migrations/versions/c0a714ade734_adding_timestamps_to_all_tables.py
Python
cc0-1.0
3,174
import subprocess import os import datetime def ifu_drp_version(): try: cwd = os.getcwd() home = os.environ["HOME"] os.chdir(home+"/kpy/SEDMr") ver = subprocess.check_output(["git", "describe", "--always"]).strip() os.chdir(cwd) except: ver = "%s" % datetime.dat...
scizen9/kpy
SEDMr/Version.py
Python
gpl-2.0
353
from keyword_list import terms_list class Url_builder(object): @staticmethod def url_builder(page_range, terms): base_url = 'http://www.amazon.com/s/rh=%2Ck%3A' page = '&page=' plus = '+' search_terms = plus.join(terms.split()) return [base_url + search_terms + page + s...
gabelev/MISMI
url_function.py
Python
mit
2,035
"""There are no models in this app."""
ironfroggy/django-better-cache
bettercache/models.py
Python
mit
39
from disco.test import TestCase, TestJob class RawJob(TestJob): @staticmethod def map(e, params): yield 'raw://{0}'.format(e), '' class RawTestCase(TestCase): def runTest(self): input = ['raw://eeny', 'raw://meeny', 'raw://miny', 'raw://moe'] self.job = RawJob().run(input=input) ...
discoproject/disco
tests/test_raw.py
Python
bsd-3-clause
433
#! /usr/bin/env python from __future__ import print_function import openturns as ot levels = [4] * 2 myPlane = ot.Box(levels) print('myPlane = ', myPlane) sample = myPlane.generate() print('sample = ', repr(sample)) myPlane = ot.Box(levels, ot.Interval([7.0, 8.0], [9.0, 16.0])) print('myPlane = ', myPlane) sample = ...
aurelieladier/openturns
python/test/t_Box_std.py
Python
lgpl-3.0
372
from rpython.annotator import model as annmodel from rpython.rtyper import rmodel from rpython.rtyper.lltypesystem import lltype class __extend__(annmodel.SomeDict): def get_dict_repr(self): from rpython.rtyper.lltypesystem.rdict import DictRepr return DictRepr def rtyper_makerepr(self, rtyp...
oblique-labs/pyVM
rpython/rtyper/rdict.py
Python
mit
6,253
#!/usr/bin/env python # -*- coding:utf-8 -*- # # @name: Wascan - Web Application Scanner # @repo: https://github.com/m4ll0k/Wascan # @author: Momo Outaadi (M4ll0k) # @license: See the file 'LICENSE.txt from re import search,I def jiasule(headers,content): _ = False for header in headers.items(): _ |= sea...
m4ll0k/Spaghetti
plugins/fingerprint/waf/jiasule.py
Python
gpl-3.0
587
# Generated by Django 2.2.8 on 2019-12-19 08:13 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('import_export_celery', '0005_auto_20191128_1114'), ] operations = [ migrations.AlterField( model_name='importjob', n...
auto-mat/klub
local_migrations/migrations_import_export_celery/0006_auto_20191219_0913.py
Python
gpl-3.0
615
# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
timm/timmnix
pypy3-v5.5.0-linux64/lib-python/3/logging/config.py
Python
mit
35,556
# Copyright (c) 2018 PaddlePaddle 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 app...
PaddlePaddle/Paddle
python/paddle/fluid/nets.py
Python
apache-2.0
27,095
# -*- coding: utf-8 -*- __author__ = """Chris Tabor (dxdstudio@gmail.com)""" if __name__ == '__main__': from os import getcwd from os import sys sys.path.append(getcwd()) from MOAL.helpers.display import Section from pprint import pprint as ppr class AbstractGraphList(object): def __init__(self): ...
christabor/MoAL
MOAL/data_structures/graphs/adjacency_list.py
Python
apache-2.0
1,637
"""Extensions to the 'distutils' for large or complex distributions""" from setuptools.extension import Extension, Library from setuptools.dist import Distribution, Feature, _get_unpatched import distutils.core, setuptools.command from setuptools.depends import Require from distutils.core import Command as _Command fro...
dbbhattacharya/kitsune
vendor/packages/setuptools/setuptools/__init__.py
Python
bsd-3-clause
2,816
# Copyright 2016 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...
npuichigo/ttsflow
third_party/tensorflow/tensorflow/python/kernel_tests/base64_ops_test.py
Python
apache-2.0
5,658
"""Strategies for interpreting user input as filter operand values. Copyright (C) 2014 A. Samuel Pottinger ("Sam Pottinger", gleap.org) 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...
Samnsparky/cdibase
prog_code/util/oper_interp.py
Python
gpl-3.0
8,691
# -*- coding:utf-8 -*- import unicodedata import sys import re from dlmp3 import config, session from searcher import Search, Download class Color(object): """ Class for holding colour code values. """ white = "\x1b[%sm" % 0 underline = "\x1b[%sm" * 3 % (2, 4, 33) cols = ["\x1b[%sm" % n for n in rang...
Vezpi/dlmp3
dlmp3/terminal.py
Python
gpl-3.0
8,828
# -*- coding: utf-8 -*- # Generated by Django 1.11.5 on 2017-09-27 05:53 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('remote', '0001_initial'), ] operations = [ migrations.AddField( ...
ArdAmb/campamento_base
base/remote/migrations/0002_remotechat_items_per_page.py
Python
gpl-3.0
449
#!/usr/bin/env python # Author: Sawood Alam <ibnesayeed@gmail.com> # # This scripts instantiate two Profile objects, populates one or both from a JSON profile(s), merges them, and serializes merged profile in JSON. import os import sys import pprint import json import time import requests import ConfigParser from pr...
oduwsdl/archive_profiler
profile_merger.py
Python
mit
2,162
# encoding: utf-8 ''' Created on 27 août 2015 @author: Bertrand Verdu ''' from twisted.logger import Logger from twisted.internet import reactor, endpoints from twisted.application.internet import StreamServerEndpointService from twisted.web import server, static log = Logger() class Local_server(StreamServerEndpoi...
bverdu/onDemand
onDemand/protocols/webserver.py
Python
agpl-3.0
1,595
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-04 18:48 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('content', '0042_auto_20170304_1832'), ] operations = [ migrations.AlterFiel...
RachellCalhoun/lightandleadership
content/migrations/0043_auto_20170304_1848.py
Python
apache-2.0
509