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
from __future__ import absolute_import import logging from requests.exceptions import RequestException from sentry import options from sentry.http import Session from sentry.lang.native.utils import sdk_info_to_sdk_id MAX_ATTEMPTS = 3 logger = logging.getLogger(__name__) def lookup_system_symbols(symbols, sdk_in...
looker/sentry
src/sentry/lang/native/systemsymbols.py
Python
bsd-3-clause
1,526
0.000655
# ./_qdt.py # -*- coding: utf-8 -*- # PyXB bindings for NM:763e66503f6e9797a3b5522270417bad82c9c82c # Generated 2015-02-11 21:35:49.975995 by PyXB version 1.2.4 using Python 2.6.9.final.0 # Namespace urn:oasis:names:specification:ubl:schema:xsd:QualifiedDataTypes-2 [xmlns:qdt] from __future__ import unicode_literals i...
getodacu/eSENS-eDocument
profiles/e_confirmation/xb_request/_qdt.py
Python
mit
3,119
0.003847
import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) def lambda_handler(event, context): logger.info("RECEIVED EVENT: %s"%( str( event )) ) params = event['params'] sid = params['MessageSid'] from_number = params['From'] to_number = params['To'] body = params['B...
sswaner/twilio-aws
resources/lambda_functions/sms_message_handler.py
Python
gpl-3.0
671
0.011923
from django.contrib import admin # Register your models here. from .models import Uploader admin.site.register(Uploader)
paihu/moebox
admin.py
Python
mit
124
0
artifact = u"Artifact" creature = u"Creature" enchantment = u"Enchantment" land = u"Land" planeswalker = u"Planeswalker" instant = u"Instant" sorcery = u"Sorcery" permanents = frozenset({artifact, creature, enchantment, land, planeswalker}) nonpermanents = frozenset({instant, sorcery}) all = permanents | nonpermanen...
Julian/cardboard
cardboard/types.py
Python
mit
4,144
0.001689
import urllib2 import base64 import simplejson as json import logging from urllib import urlencode from functools import partial log = logging.getLogger(__name__) log_formatter = logging.Formatter('%(name)s - %(message)s') log_handler = logging.StreamHandler() log_handler.setFormatter(log_formatter) log.addHandler(lo...
rozap/arb
src/api/campbx.py
Python
mit
3,615
0.00083
#This script is made by cotax #cotax is blenderartists.org user's nickname. #1. Place a lamp in the scene and put its energy to 0.0 #2. Connect this script to the lamp, always(true)- python #- Add a property: energy(float) to the lamp #- Add a property: distance(integer) to the lamp #Set the energy and dist...
adriansnetlis/bgmc16minosaur
bgmc16minosaur/Assets/Scripts/LightLOD.py
Python
gpl-2.0
659
0.018209
import matplotlib.pyplot as plt from collections import defaultdict from itertools import combinations from pprint import pprint from scipy import stats import random from itertools import chain import results def choose_points(qr_list): return [d.total_response() - getattr(d, 'median', 0) for d in qr_list] de...
PaulMcMillan/2014_defcon_timing
hue/vis6.py
Python
bsd-2-clause
1,918
0.001564
#!/usr/bin/env python """ EvoLife Cellular Automaton implementation using CUDA. Rules are: - Each living cell has its own birth/sustain ruleset and an energy level; - Cell is loosing all energy if number of neighbours is not in its sustain rule; - Cell is born with max energy if there are exactly N neighbours with N i...
a5kin/evolife
evolife.py
Python
mit
16,479
0.006554
# python # This file is generated by a program (mib2py). import HP_SN_IGMP_MIB OIDMAP = { '1.3.6.1.4.1.11.2.3.7.11.12.2.6.1': HP_SN_IGMP_MIB.snIgmpMIBObjects, '1.3.6.1.4.1.11.2.3.7.11.12.2.6.1.1': HP_SN_IGMP_MIB.snIgmpQueryInterval, '1.3.6.1.4.1.11.2.3.7.11.12.2.6.1.2': HP_SN_IGMP_MIB.snIgmpGroupMembershipTime, '1.3...
xiangke/pycopia
mibs/pycopia/mibs/HP_SN_IGMP_MIB_OID.py
Python
lgpl-2.1
626
0.01278
from django.contrib import admin from models import Page, TPage, Content, TContent class PageAdmin(admin.ModelAdmin): exclude = ['posted'] #fields = ['posted', 'title'] list_display = ('title', 'posted', 'slug') prepopulated_fields = {'slug': ('title',)} class TPageAdmin(admin.ModelAdmin): list_di...
vollov/isda.ca
isda_backend/page/admin.py
Python
mit
962
0.011435
from setuptools import setup, find_packages from codecs import open from os import path here = path.abspath(path.dirname(__file__)) def readfile(fn): """Read fn and return the contents.""" with open(path.join(here, fn), "r", encoding="utf-8") as f: return f.read() setup( name="usfm2osis", ...
chrislit/usfm2osis
setup.py
Python
gpl-3.0
1,809
0
import heapq import os import numpy from smqtk.algorithms.nn_index.hash_index import HashIndex from smqtk.utils.bit_utils import ( bit_vector_to_int_large, int_to_bit_vector_large, ) from smqtk.utils.metrics import hamming_distance __author__ = "paul.tunison@kitware.com" class LinearHashIndex (HashIndex):...
Purg/SMQTK
python/smqtk/algorithms/nn_index/hash_index/linear.py
Python
bsd-3-clause
3,373
0
from django.conf.urls import patterns, url from django.contrib.auth import views as auth_views urlpatterns = patterns('', url(r'^login/$', auth_views.login, {'template_name': 'authstrap/login.html'}, name='auth_login'), url(r'^logout/$', auth_views.logo...
alixedi/django_authstrap
authstrap/urls.py
Python
bsd-3-clause
1,659
0.002411
from __future__ import absolute_import from .base import * # NOQA from .registry import RuleRegistry # NOQA def init_registry(): from sentry.constants import _SENTRY_RULES from sentry.plugins.base import plugins from sentry.utils.imports import import_string from sentry.utils.safe import safe_execu...
beeftornado/sentry
src/sentry/rules/__init__.py
Python
bsd-3-clause
646
0.001548
class Solution(object): def merge(self, nums1, m, nums2, n): """ :type nums1: List[int] :type m: int :type nums2: List[int] :type n: int :rtype: void Do not return anything, modify nums1 in-place instead. """ last,i,j = m+n-1,m-1,n-1 while i >=...
hufeiya/leetcode
python/88_Merge_Sorted_Array.py
Python
gpl-2.0
628
0.015924
#=========================================================================== # mjpegger.py # # Runs a MJPG stream on provided port. # # 2016-07-25 # Carter Nelson #=========================================================================== import threading import SimpleHTTPServer import SocketServer import io keepStre...
caternuson/rpi-laser
mjpegger.py
Python
mit
2,603
0.011909
from test.classes.ball_detector.BallDetector import BallDetector from test.classes.ball_detector.BounceCalculator import BounceCalculator from test.classes.ball_detector.Extrapolator import Extrapolator from test.classes.utils.Ball import Ball from test.classes.utils.BallHistory import BallHistory VERTICAL_THRESHOLD ...
Centre-Alt-Rendiment-Esportiu/att
src/python/test/classes/BallTracker.py
Python
gpl-3.0
2,078
0.001444
#!/usr/bin/python3 # vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79: from typing import Dict, Union, TypeVar, Iterable, Callable, Tuple,\ Optional from math import log, ceil import gdb import crash from crash.util import find_member_variant from crash.util.symbols import Types, Symvals...
jeffmahoney/crash-python
crash/types/page.py
Python
gpl-2.0
10,946
0.001827
"""Tests for tensorflow.ops.tf.Cholesky.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import tensorflow.python.platform import numpy as np from six.moves import xrange # pylint: disable=redefined-builtin import tensorflow as tf class CholeskyOpTest...
arunhotra/tensorflow
tensorflow/python/kernel_tests/cholesky_op_test.py
Python
apache-2.0
2,904
0.006543
# html2PraatMan - Version 1.0 - October 16, 2013 # Batch html-to-ManPages converter for Praat documentation # Copyright (C) 2013 Charalampos Karypidis # Email: ch.karypidis@gmail.com # http://addictiveknowledge.blogspot.com/ ############################## ############################## # This program is free software...
chkarypidis/html2PraatMan
html2PraatMan.py
Python
gpl-3.0
7,854
0.026993
from unittest import skip from ion.services.dm.test.dm_test_case import DMTestCase from pyon.public import PRED, OT, RT from pyon.util.log import log from ion.services.dm.test.test_dm_end_2_end import DatasetMonitor from ion.services.dm.utility.granule import RecordDictionaryTool from nose.plugins.attrib import attr...
ooici/coi-services
ion/services/dm/test/test_site_data_products.py
Python
bsd-2-clause
20,250
0.007407
#!/usr/bin/env python # -*- coding: utf-8 -*- ## @copyright # Software License Agreement (BSD License) # # Copyright (c) 2017, Jorge De La Cruz, Carmen Castano. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the followi...
jdelacruz26/misccode
cad2xls.py
Python
bsd-3-clause
2,955
0.004061
# -*- coding: utf-8 -*- """ user Add the employee relation ship to nereid user :copyright: (c) 2012-2014 by Openlabs Technologies & Consulting (P) Limited :license: GPLv3, see LICENSE for more details. """ from datetime import datetime from nereid import request, jsonify, login_required, route from t...
sharoonthomas/nereid-project
user.py
Python
gpl-3.0
2,674
0
# This Python file uses the following encoding: utf-8 """autogenerated by genpy from nasa_r2_common_msgs/ResetTableSceneRequest.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class ResetTableSceneRequest(genpy.Message): _md5sum = "ba4b0b221fb425ac...
mkhuthir/catkin_ws
src/chessbot/devel/lib/python2.7/dist-packages/nasa_r2_common_msgs/srv/_ResetTableScene.py
Python
gpl-3.0
6,933
0.016443
# -*- encoding: utf-8 -*- """Test class for Foreman Discovery :Requirement: Discoveredhost :CaseAutomation: Automated :CaseLevel: Acceptance :CaseComponent: UI :TestType: Functional :CaseImportance: High :Upstream: No """ import subprocess import time from fauxfactory import gen_string from nailgun import entit...
sghai/robottelo
tests/foreman/ui/test_discoveredhost.py
Python
gpl-3.0
56,249
0.000018
import sys from beaker.container import NamespaceManager, Container from beaker.exceptions import InvalidCacheBackendError, MissingCacheParameter from beaker.synchronization import _threading, Synchronizer from beaker.util import verify_directory, SyncDict try: import cmemcache as memcache except ImportError: ...
appcelerator/entourage
components/services/appengine/stub/beaker/ext/memcached.py
Python
apache-2.0
4,037
0.006688
""" Forms for use with User objects """ from django import forms from django.contrib.auth.models import User class UserForm(forms.ModelForm): """ Form for django.contrib.auth.models.User """ class Meta: """ Meta data for User Form """ model = User fields = ('us...
Gimpneek/jobseek
jobseekr/cv/forms/user.py
Python
agpl-3.0
1,096
0
from django import forms from django.contrib.auth.models import User from .models import Message from tinymce.widgets import TinyMCE class MessageForm(forms.Form): recipient = forms.CharField(widget=forms.TextInput(attrs={'class':'form-control'})) subject = forms.CharField(widget=forms.TextInput(attrs={'class...
j-windsor/cs3240-f15-team21-v2
post/forms.py
Python
mit
640
0.015625
#!/usr/bin/env python2.7 import os import sys this_dir = os.path.dirname(os.path.abspath(__file__)) trunk_dir = os.path.split(this_dir)[0] sys.path.insert(0,trunk_dir) from ikol.dbregister import DataBase from ikol import var if os.path.exists(var.DB_PATH): os.remove(var.DB_PATH) DB = DataBase(var.DB_PATH) ...
lokiteitor/ikol
test/DBtest.py
Python
gpl-2.0
589
0.018676
# encoding: utf-8 # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this file, # You can obtain one at http://mozilla.org/MPL/2.0/. # # Author: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import unicode_literals from __f...
klahnakoski/MySQL-to-S3
vendor/pyLibrary/env/pulse.py
Python
mpl-2.0
7,554
0.00331
# -*- coding: UTF-8 -*- # /* # * Copyright (C) 2013 Libor Zoubek + jondas # * # * # * 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, or (at your option) # * ...
zbyna/plugin.video.sosac.ph
default.py
Python
gpl-2.0
2,056
0.000486
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Getting Things GNOME! - a personal organizer for the GNOME desktop # Copyright (c) 2008-2013 - Lionel Dricot & Bertrand Rousseau # # This program is free software: you can redistribute it and/or modify it under # t...
partp/gtg-services
GTG/gtk/backends_dialog/parameters_ui/passwordui.py
Python
gpl-3.0
3,286
0
''' Copyright 2013 Cosnita Radu Viorel Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute...
rcosnita/fantastico
fantastico/samples/simple_component/simple_urls.py
Python
mit
1,965
0.006107
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Intangible() result.template = "object/intangible/pet/shared_3po_protocol_droid_silver.iff" result.attribute_temp...
anhstudios/swganh
data/scripts/templates/object/intangible/pet/shared_3po_protocol_droid_silver.py
Python
mit
438
0.047945
""" Write a program that will help you play poker by telling you what kind of hand you have. Input: The first line of input contains the number of test cases (no more than 20). Each test case consists of one line - five space separated cards. Each card is represented by a two-letter (or digit) word. The first characte...
DayGitH/Python-Challenges
DailyProgrammer/20120330B.py
Python
mit
3,384
0.001773
#!/usr/bin/env python import os import shutil # def main(src, dst, symlinks=False, ignore=None): # """Main entry point for the script.""" # copytree(src, dst, symlinks=False, ignore=None) def copytree(src, dst, symlinks=False, ignore=None): for item in os.listdir(src): s = os.path.join(src, item) ...
joelfiddes/toposubv2
topoMAPP/utils/copytree.py
Python
gpl-3.0
724
0.002762
import os import re import sys import logging from coalib.collecting.Collectors import ( collect_all_bears_from_sections, filter_section_bears_by_languages) from coalib.misc import Constants from coalib.output.ConfWriter import ConfWriter from coalib.output.printers.LOG_LEVEL import LOG_LEVEL from coalib.parsing.C...
damngamerz/coala
coalib/settings/ConfigurationGathering.py
Python
agpl-3.0
17,309
0.000116
import elasticsearch import migrates from .test_utils import callmigrates, iterate_test_data, remove_test_data document_count = 1000 def insert_test_data(connection): with migrates.Batch(connection, migrates.Logger()) as batch: for i in range(0, document_count): batch.add({ ...
pineapplemachine/migrates
test/test_reindex.py
Python
gpl-3.0
1,758
0.006826
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/ship/crafted/droid_interface/shared_base_droid_interface_subcomponen...
anhstudios/swganh
data/scripts/templates/object/tangible/ship/crafted/droid_interface/shared_base_droid_interface_subcomponent_mk3.py
Python
mit
523
0.042065
DB_CONFIG = "postgresql://user:password@localhost/db" ROOT_DIR = "/path/to/project" ADMIN_USER = "username" ADMIN_PW = "password"
miketung168/survey-dashboard
example_config.py
Python
mit
130
0
############################################################################## # 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...
lgarren/spack
var/spack/repos/builtin/packages/lua-luafilesystem/package.py
Python
lgpl-2.1
2,512
0.000398
#!/usr/bin/env python """interpret a comapct grid specification using regex""" import re # use a compact regular expression with nested OR expressions, # and hence many groups, but name the outer (main) groups: real_short1 = \ r'\s*(?P<lower>-?(\d+(\.\d*)?|\d*\.\d+)([eE][+\-]?\d+)?)\s*' real_short2 = \ r'\s*(?P<uppe...
sniemi/SamPy
sandbox/src1/TCSE3-3rd-examples/src/py/regex/fdmgrid.py
Python
bsd-2-clause
2,941
0.00136
#!/usr/bin/python # -*- coding: utf-8 -*- # ----------------------------------------------- # ----> Computer Aided Optical Analysis <---- # ----------------------------------------------- # (c) 2015 by Swissatest Testmaterialien AG # http://www.swissatest.ch # ----------------------------------------------- # Devel...
rrmelcer/swissatest-analysis
gui/qt4/credits.py
Python
apache-2.0
19,884
0.004024
# # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # from uitest.framework import UITestCase import time class tdf92611(UITestCase): def test_launch_and_close_bibl...
beppec56/core
uitest/writer_tests/tdf92611.py
Python
gpl-3.0
647
0.003091
""" pip.vendor is for vendoring dependencies of pip to prevent needing pip to depend on something external. Files inside of pip.vendor should be considered immutable and should only be updated to versions from upstream. """ from __future__ import absolute_import
piyush82/icclab-rcb-web
virtualenv/lib/python2.7/site-packages/pip/vendor/__init__.py
Python
apache-2.0
264
0
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import uuid import socket import time __appname__ = "pymessage" __author__ = "Marco Sirabella, Owen Davies" __copyright__ = "" __credits__ = "Marco Sirabella, Owen Davies" __license__ = "new BSD 3-Clause" __version__ = "0.0.3" __maintainers__ = "Ma...
mjsir911/pymessage
client.py
Python
bsd-3-clause
1,124
0.010676
#!/usr/bin/python # This file is part of tcollector. # Copyright (C) 2011 The tcollector Authors. # # This program 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 License, or (a...
HubSpot/tcollector
collectors/0/netstat.py
Python
gpl-3.0
17,157
0.001224
#ue.exec('pip2.py') import subprocess import sys import os import unreal_engine as ue import _thread as thread #ue.log(sys.path) _problemPaths = [''] def NormalizePaths(): problemPaths = _problemPaths #replace '/' to '\\' for i in range(len(sys.path)): currentPath = sys.path[i] sys.path[i] = currentPath.repl...
getnamo/UnrealEnginePython
Content/Scripts/upycmd.py
Python
mit
2,925
0.037949
class Node: def __init__(self, value): self.value = value self.next = None self.prev = None class OldestUnique: def __init__(self): self.uniq = {} self.seen = set() self.head = None self.tail = None def feed(self, value): if value in self.un...
frasertweedale/drill
py/oldest_unique.py
Python
mit
1,106
0
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2018-08-31 12:06 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('basicviz', '0073_auto_20180831_1203'), ] operations = [ migrations.AddField...
sdrogers/ms2ldaviz
ms2ldaviz/basicviz/migrations/0074_auto_20180831_1206.py
Python
mit
670
0
""" Goal: set the environment for tests Docs: https://pythonhosted.org/Flask-SQLAlchemy/quickstart.html The only things you need to know compared to plain SQLAlchemy are: SQLAlchemy gives you access to the following things: - all the functions and classes from sqlalchemy and sqlalchemy.orm - a preconfigured scope...
indera/barebones-flask-app
tests/base_test.py
Python
bsd-3-clause
1,403
0.000713
from .lconfiguration import LocalConfiguration from .printing import Printing from .word import Word from xml.etree import ElementTree class LinearisationRule: @classmethod def deserialise(cls, grammars, def_rule_etree): probability = float(def_rule_etree.get('p')) head_node_etree = def_rule_...
m5w/matxin-lineariser
matxin_lineariser/utlgrammars/lrule.py
Python
gpl-3.0
2,392
0.000836
# # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of GNUHAWK. # # GNUHAWK is free software: you can redistribute it and/or modify is under the # terms of the GNU General Public License as published by the Free Software # F...
RedhawkSDR/integration-gnuhawk
qa/gnuradio/gr/top_block.py
Python
gpl-3.0
4,399
0.006365
#!/usr/bin/env python3 """ DNSSEC Single-Type Signing Scheme, RFC 6781 """ from dnstest.utils import * from dnstest.test import Test t = Test() knot = t.server("knot") zones = t.zone_rnd(5, dnssec=False, records=10) t.link(zones, knot) t.start() # one KSK knot.gen_key(zones[0], ksk=True, zsk=True, alg="ECDSAP256SHA2...
CZ-NIC/knot
tests-extra/tests/dnssec/single_type_signing/test.py
Python
gpl-3.0
1,348
0.003709
# -*- coding: utf-8 -*- from __future__ import unicode_literals, division from django.shortcuts import redirect, get_object_or_404 from django.db import transaction from xue.common.decorators import quickview, limit_role from xue.tutor.forms import StudentApplicationForm, ProjectSelectionForm from xue.tutor.models ...
team-xue/xue
xue/tutor/studentviews.py
Python
bsd-3-clause
2,757
0
# -*- coding: utf-8 -*- # MORFEO Project # http://morfeo-project.org # # Component: EzForge # # (C) Copyright 2004 Telefónica Investigación y Desarrollo # S.A.Unipersonal (Telefónica I+D) # # Info about members and contributors of the MORFEO project # is available at: # # http://morfeo-project.org/ # ...
kgblll/libresoft-gymkhana
commons/utils.py
Python
gpl-2.0
3,773
0.015119
######################################################################## # File name: __init__.py # This file is part of: aioxmpp # # LICENSE # # This program 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 Foundat...
horazont/aioxmpp
tests/__init__.py
Python
lgpl-3.0
1,184
0
import datetime import os import shutil import time from files_by_date.utils.logging_wrapper import get_logger, log_message from files_by_date.validators.argument_validator import ArgumentValidator logger = get_logger(name='files_service') class FilesService: def __init__(self): raise NotImplementedErro...
DEV3L/python-files-by-date
files_by_date/service/files_service.py
Python
mit
4,825
0.003731
"""Python interface to GenoLogics LIMS via its REST API. Entities and their descriptors for the LIMS interface. Per Kraulis, Science for Life Laboratory, Stockholm, Sweden. Copyright (C) 2012 Per Kraulis """ from genologics.constants import nsmap try: from urllib.parse import urlsplit, urlparse, parse_qs, urlun...
BigelowLab/genologics
genologics/descriptors.py
Python
mit
18,060
0.000388
from allauth.account.signals import email_confirmed, email_changed, email_added, email_removed, user_signed_up, user_logged_in from django.contrib.auth.models import User, Group, Permission from django.db.models import Q from django.dispatch import receiver """intercept signals from allauth""" @receiver(email_confir...
scotartt/commentarius
decommentariis/decommentariis/signals.py
Python
gpl-2.0
1,210
0.015702
from django.contrib import admin from .models import Message admin.site.register(Message)
Pylvax/django
project/starter_app/admin.py
Python
mit
92
0.01087
#!/usr/bin/env python """macro_tests.py: Some macro tests""" from __future__ import absolute_import, division, print_function, unicode_literals __author__ = "Fabien Cromieres" __license__ = "undecided" __version__ = "1.0" __email__ = "fabien.cromieres@gmail.com" __status__ = "Development" # import nmt_chainer.make_dat...
fabiencro/knmt
tests/suite1/training_management_test.py
Python
gpl-3.0
3,928
0.001527
import wx import re import os import time import inspect cmdFolder = os.path.realpath(os.path.abspath(os.path.split(inspect.getfile( inspect.currentframe() ))[0])) gcRegex = re.compile("[-]?\d+[.]?\d*") from cnc import CNC from reprapenums import RepRapEventEnum from gcframe import GcFrame from properties import Pr...
jbernardis/repraptoolbox
src/Printer/printmon.py
Python
gpl-3.0
26,866
0.039902
"""empty message Revision ID: 8e7f7864cb60 Revises: ('80a704b880db', 'adf34c11b0df') Create Date: 2016-06-19 15:43:23.027000 """ # revision identifiers, used by Alembic. revision = '8e7f7864cb60' down_revision = ('80a704b880db', 'adf34c11b0df') from alembic import op import sqlalchemy as sa import sqlalchemy_utils ...
Achint08/open-event-orga-server
migrations/versions/8e7f7864cb60_.py
Python
gpl-3.0
374
0.008021
# -*- coding: utf-8 -*- ''' FanFilm Add-on Copyright (C) 2016 mrknow This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any ...
mrknow/filmkodi
plugin.video.fanfilm/resources/lib/sources/segos_mv.py
Python
apache-2.0
5,195
0.009438
# -*- coding: utf-8 -*- """ *************************************************************************** FindProjection.py ----------------- Date : February 2017 Copyright : (C) 2017 by Nyall Dawson Email : nyall dot dawson at gmail dot com *****************...
SrNetoChan/QGIS
python/plugins/processing/algs/qgis/FindProjection.py
Python
gpl-2.0
6,023
0.00249
""" This page is in the table of contents. Temperature is a script to set the temperature for the object and raft. ==Operation== The default 'Activate Temperature' checkbox is on. When it is on, the functions described below will work, when it is off, the functions will not be called. ==Settings== ===Rate=== The def...
makerbot/ReplicatorG
skein_engines/skeinforge-35/skeinforge_application/skeinforge_plugins/craft_plugins/temperature.py
Python
gpl-2.0
9,647
0.017829
#PyInterstate by @pygeek import urllib2 import json class InterstateError(Exception): """Base class for Interstate App Exceptions.""" pass class AuthError(InterstateError): """Exception raised upon authentication errors.""" pass class IdError(InterstateError): """Raised when an operatio...
pygeek/PyInterstate
PyInterstate.py
Python
gpl-3.0
6,996
0.008719
from yum.plugins import PluginYumExit, TYPE_CORE, TYPE_INTERACTIVE try: import json except ImportError: import simplejson as json requires_api_version = '2.5' plugin_type = (TYPE_INTERACTIVE,) def config_hook(conduit): parser = conduit.getOptParser() parser.add_option('', '--json', dest='json', acti...
deanwilson/yum-transaction-json
transaction-json.py
Python
gpl-3.0
1,282
0
# Log into the site with your browser, obtain the "Cookie" header, # and put it here cookie = ''
jonmsawyer/site-tools
flgetpics/cookie.py
Python
mit
97
0
from django.forms import * from django.forms.formsets import BaseFormSet from django.utils.translation import ugettext_lazy as _ from django.contrib.sites.models import Site from tradeschool.models import * class DefaultBranchForm(Form): def __init__(self, user, redirect_to, *args, **kwargs): super(Defaul...
orzubalsky/tradeschool
ts/apps/tradeschool/forms.py
Python
gpl-3.0
7,844
0.000382
# Copyright (C) 2008-2011 Dejan Muhamedagic <dmuhamedagic@suse.de> # Copyright (C) 2013 Kristoffer Gronlund <kgronlund@suse.com> # See COPYING for license information. from . import command from . import completers as compl from . import utils from . import ra from . import constants from . import options def comple...
aspiers/crmsh
modules/ui_ra.py
Python
gpl-2.0
3,190
0.000627
"""SCons.Tool.bcc32 XXX """ # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, ...
datalogics/scons
src/engine/SCons/Tool/bcc32.py
Python
mit
2,993
0.005012
# Copyright 2011 Andrew Bogott for the Wikimedia 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-...
Metaswitch/calico-nova
nova/tests/unit/api/openstack/compute/contrib/test_flavor_manage.py
Python
apache-2.0
17,379
0.000173
# coding=utf-8 import os import subprocess import sys import pytest import virtual_environments from diff_test_tools import expected_messages, SCRIPT from service_messages import ServiceMessage, assert_service_messages, match from test_util import run_command @pytest.fixture(scope='module') def venv(request): "...
throwable-one/teamcity-messages
tests/integration-tests/unittest_integration_test.py
Python
apache-2.0
27,766
0.00544
from Queue import Queue, Empty import contextlib from logging import getLogger import random import time from gevent.monkey import saved LOG = getLogger(__name__) if bool(saved): LOG.info('using zmq.green...') import zmq.green as zmq else: import zmq class ZMQConnection(object): def __init__(self...
Livefyre/protobuf-rpc
python/protobuf_rpc/connection.py
Python
mit
3,673
0.001089
import pandas as pd import numpy as np import re from gensim import corpora, models, similarities from gensim.parsing.preprocessing import STOPWORDS def split(text): ''' Split the input text into words/tokens; ignoring stopwords and empty strings ''' delimiters = ".", ",", ";", ":", "-", "(", ")", " ", "\t" ...
CSC591ADBI-TeamProjects/Product-Search-Relevance
build_tfidf.py
Python
mit
1,752
0.021119
# -*- coding: utf-8 -*- import pytest from lupin.validators import Equal from lupin.errors import ValidationError @pytest.fixture def invalid(): return Equal("sernine") @pytest.fixture def valid(): return Equal("lupin") class TestAnd(object): def test_returns_an_and_combination(self, valid, invalid): ...
holinnn/lupin
tests/lupin/validators/test_validator.py
Python
mit
601
0
from sandbox.dalz.data import ArticleCommentCountFileData, ArticlePublicationDateFileData, ArticleAuthorFileData, \ ArticleWordCountFileData, CommentAuthorCommentCountFilesDatas, AuthorArticleCountFilesData, \ AuthorArticlesCommentsCountAverageFilesData, AuthorArticlesWordsCountAverageFilesData, \ ArticlePu...
buxx/TextDataExtractor
sandbox/dalz/implode.py
Python
gpl-2.0
1,003
0.002991
# pylint: disable=missing-docstring # pylint: disable=wildcard-import from .test_mocks import * from .cpython.testmock import * from .cpython.testwith import *
nivbend/mock-open
src/mock_open/test/__init__.py
Python
mit
161
0
from project_cron.utils import processutil def open(app_name): script = ''' if application "%s" is not running then tell application "%s" to activate end if ''' % (app_name, app_name) processutil.call(['/usr/bin/osascript', '-e', script]) def close(app_name): script ...
ecleya/project_cron
project_cron/utils/apputil.py
Python
mit
424
0
#!/usr/bin/env python # A python script to take targets from a google spreadsheet and run a # Nessus vulnerability scan. import json import gspread from oauth2client.service_account import ServiceAccountCredentials from nessrest import ness6rest import getpass # Login with your Google account's API key scopes = ['ht...
mokuso/scan-gspread-targets
scan-gspread-targets.py
Python
mit
1,952
0.000512
# -*- coding: utf-8 -*- # Copyright 2007-2021 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
erh3cq/hyperspy
hyperspy/tests/test_non-uniform_not-implemented.py
Python
gpl-3.0
4,442
0.001576
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..compat import compat_str class TF1IE(InfoExtractor): """TF1 uses the wat.tv player.""" _VALID_URL = r'https?://(?:(?:videos|www|lci)\.tf1|(?:www\.)?(?:tfou|ushuaiatv|histoire|tvbreizh))\.fr/(?:[^/]+/)*(?P<id>[^/?...
vinegret/youtube-dl
youtube_dl/extractor/tf1.py
Python
unlicense
3,611
0.002777
import argparse import datetime import pathlib import numpy as np import torch import torch.nn as nn import torch.optim as optim import torch.nn.functional as F from mushroom_rl.algorithms.value import AveragedDQN, CategoricalDQN, DQN,\ DoubleDQN, MaxminDQN, DuelingDQN, NoisyDQN, Rainbow from mushroom_rl.approxim...
carloderamo/mushroom
examples/atari_dqn.py
Python
mit
19,062
0.00063
import asyncio import logging import re import threading from os import PathLike from typing import Optional, Set, Union from uqbar.objects import new import supriya.exceptions from supriya.commands import ( # type: ignore FailResponse, GroupNewRequest, GroupQueryTreeRequest, NotifyRequest, QuitR...
josiah-wolf-oberholtzer/supriya
supriya/realtime/servers.py
Python
mit
35,554
0.001041
# Copyright (C) 2012 Balazs Ankes (bank@inf.u-szeged.hu) University of Szeged # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this lis...
hujiajie/chromium-crosswalk
third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/png_unittest.py
Python
bsd-3-clause
3,001
0.001666
import os from sublime import active_window from sublime import find_resources from sublime import load_settings from sublime import save_settings import sublime_plugin def _load_preferences(): return load_settings('Preferences.sublime-settings') def _save_preferences(): return save_settings('Preferences....
gerardroche/sublime-polyfill
ui.py
Python
bsd-3-clause
8,584
0.000349
from django.conf.urls import url from api.applications import views app_name = 'osf' urlpatterns = [ url(r'^$', views.ApplicationList.as_view(), name=views.ApplicationList.view_name), url(r'^(?P<client_id>\w+)/$', views.ApplicationDetail.as_view(), name=views.ApplicationDetail.view_name), url(r'^(?P<clie...
icereval/osf.io
api/applications/urls.py
Python
apache-2.0
417
0.007194
#encoding:utf-8 subreddit = 'ikeahacks' t_channel = '@r_IKEAhacks' def send_post(submission, r2t): return r2t.send_simple(submission)
Fillll/reddit2telegram
reddit2telegram/channels/~inactive/r_ikeahacks/app.py
Python
mit
141
0.007092
from datetime import datetime class Schedule(object): WEEK_ONE = datetime(2014, 9, 2, 9) def week(self): time_difference = datetime.now() - self.WEEK_ONE return (time_difference.days/7)+1 def season_year(self): return 2014
FenrirUnbound/greg-ball
libraries/schedule.py
Python
gpl-2.0
262
0.003817
"File-based cache backend" import glob import hashlib import os import pickle import random import tempfile import time import zlib from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache from django.core.files.move import file_move_safe from django.utils.encoding import force_bytes class FileBasedCac...
auready/django
django/core/cache/backends/filebased.py
Python
bsd-3-clause
4,845
0.000413
#!/usr/bin/python # # This is a free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This Ansible library is distributed in the hope that i...
andreaso/ansible
lib/ansible/modules/cloud/amazon/ec2_vpc_subnet.py
Python
gpl-3.0
8,929
0.001568
# Generated by the pRPC protocol buffer compiler plugin. DO NOT EDIT! # source: service.proto import base64 import zlib from google.protobuf import descriptor_pb2 # Includes description of the service.proto and all of its transitive # dependencies. Includes source code info. FILE_DESCRIPTOR_SET = descriptor_pb2.Fil...
luci/luci-py
appengine/components/components/prpc/discovery/service_prpc_pb2.py
Python
apache-2.0
29,794
0.012016
#!/usr/bin/env python import roslib; roslib.load_manifest('master_monitor') import rospy from rosgraph_msgs.msg import Log from syscall import runCmd, runCmdOutput from move_base_msgs.msg import MoveBaseGoal, MoveBaseAction from geometry_msgs.msg import PoseStamped import actionlib import numpy as np class ControlMod...
aslab/rct
higgs/trunk/code/ROS/metacontrol/master_monitor/src/master_monitor.py
Python
gpl-3.0
3,374
0.039123
# This file is part of eventmq. # # eventmq 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. # # eventmq is distributed in the ...
com4/eventmq
eventmq/client/__init__.py
Python
lgpl-2.1
933
0
#!/usr/bin/env python # -*- coding: utf-8 -*- """Tests lesson 04 task 05.""" # Import Python libs import unittest import mock import random class Lesson04Task05TestCase(unittest.TestCase): """ Test cases for lesson 04 task 05. """ def test_blood_pressure_status(self): """ Tests that...
Logan213/is210-week-04-warmup
tests/test_task_05.py
Python
mpl-2.0
1,085
0.000922
#!/usr/bin/python2.7 # Copyright 2010 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 requi...
bshaffer/google-api-php-client-services
generator/src/googleapis/codegen/api.py
Python
apache-2.0
37,026
0.005888
import collections from supriya.enums import CalculationRate from supriya.synthdefs import MultiOutUGen class XFadeRotate(MultiOutUGen): """ :: >>> source = supriya.ugens.In.ar(bus=0) >>> xfade_rotate = supriya.ugens.XFadeRotate.ar( ... n=0, ... source=source, ...
josiah-wolf-oberholtzer/supriya
dev/etc/pending_ugens/XFadeRotate.py
Python
mit
3,541
0.001977