repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
flavour/tldrmp | modules/s3db/survey.py | 1 | 135539 | # -*- coding: utf-8 -*-
""" Sahana Eden Survey Tool
@copyright: 2011-2013 (c) Sahana Software Foundation
@license: MIT
ADAT - Assessment Data Analysis Tool
For more details see the blueprint at:
http://eden.sahanafoundation.org/wiki/BluePrint/SurveyTool/ADAT
Permission is hereby granted, fr... | mit | 4,581,564,324,637,390,300 | 38.911366 | 195 | 0.471481 | false | 4.893635 | false | false | false |
AIFDR/inasafe-django | django_project/realtime/migrations/0050_reporttemplate.py | 2 | 1641 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('realtime', '0049_auto_20180320_0406'),
]
operations = [
migrations.CreateModel(
name='ReportTemplate',
... | bsd-2-clause | -3,155,160,990,121,272,300 | 53.7 | 176 | 0.622182 | false | 4.229381 | false | false | false |
supernifty/mgsa | mgsa/analyze_bam.py | 1 | 2071 |
import argparse
import collections
import numpy
import sys
import bio
import config
parser = argparse.ArgumentParser(description='Analyze BAM')
parser.add_argument('bam', metavar='bam', help='bam file to analyze')
parser.add_argument('--buckets', metavar='buckets', type=int, default=10, help='number of buckets')
par... | mit | 6,292,994,006,158,052,000 | 45.022222 | 123 | 0.649445 | false | 3.059084 | false | false | false |
minlexx/pyevemon | esi_client/models/get_characters_character_id_mail_labels_forbidden.py | 1 | 3097 | # coding: utf-8
"""
EVE Swagger Interface
An OpenAPI for EVE Online
OpenAPI spec version: 0.4.6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class GetCharactersCharacterIdMailLabelsForbidden(object):
"... | gpl-3.0 | -9,000,179,383,787,860,000 | 25.470085 | 84 | 0.539554 | false | 4.636228 | false | false | false |
dafrito/trac-mirror | trac/ticket/default_workflow.py | 1 | 21721 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2006-2009 Edgewall Software
# Copyright (C) 2006 Alec Thomas
# Copyright (C) 2007 Eli Carter
# Copyright (C) 2007 Christian Boos <cboos@edgewall.org>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part ... | bsd-3-clause | -5,058,617,368,730,896,000 | 42.268924 | 79 | 0.569173 | false | 4.506432 | true | false | false |
cs207-project/TimeSeries | procs/_corr.py | 1 | 4794 | import numpy.fft as nfft
import numpy as np
import timeseries as ts
from scipy.stats import norm
# import pyfftw
import sys
#sys.path.append("/Users/yuhantang/CS207/TimeSeries/procs")
from .interface import *
def createfromlist(l):
d = new_darray(len(l))
for i in range(0,len(l)):
darray_set(d,i,l[i])
... | mit | 2,104,750,453,322,507,300 | 29.929032 | 103 | 0.623905 | false | 2.495575 | false | false | false |
antiface/ThinkBayes2 | code/cookie3.py | 1 | 1095 | """This file contains code for use with "Think Bayes",
by Allen B. Downey, available from greenteapress.com
Copyright 2014 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
from __future__ import print_function, division
import thinkbayes2
class Cookie(thinkbayes2.Suite):
"""A map fro... | gpl-2.0 | 7,652,526,682,298,288,000 | 23.333333 | 60 | 0.628311 | false | 3.220588 | false | false | false |
dvro/scikit-protopy | protopy/base.py | 1 | 4528 | """Base and mixin classes for instance reduction techniques"""
# Author: Dayvid Victor <dvro@cin.ufpe.br>
# License: BSD Style
import warnings
from abc import ABCMeta, abstractmethod
from sklearn.base import BaseEstimator, ClassifierMixin
from sklearn.neighbors.classification import KNeighborsClassifier
from sklearn... | bsd-2-clause | -6,141,545,886,733,990,000 | 28.38961 | 79 | 0.607601 | false | 4.548744 | false | false | false |
vguzmanp/cloud-in-one | main_crypto.py | 1 | 1392 | #!/usr/bin/env python3
import getpass
import argparse
import shutil
from core.databaseManager import DatabaseManager
from core.securityModule import SecurityModule
def processFile(file_in_name, file_out_name, encrypt_flag):
user = input("CLOUD-IN-ONE Username: ")
password = getpass.getpass()
databaseMa... | mit | 120,298,394,218,790,240 | 28 | 75 | 0.666667 | false | 3.712 | false | false | false |
PaesslerAG/django-performance-testing | settings.py | 1 | 1267 | # Django settings for autodata project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
# Insert your TEMPLATE_CONTEXT_PR... | bsd-3-clause | 3,754,765,840,320,147,000 | 27.155556 | 78 | 0.598264 | false | 3.874618 | false | false | false |
owlabs/incubator-airflow | airflow/models/taskreschedule.py | 1 | 3374 | # -*- 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
#... | apache-2.0 | -3,710,862,593,287,448,000 | 38.694118 | 83 | 0.648785 | false | 4.026253 | false | false | false |
cykerway/wmwm | setup.py | 1 | 7315 | #!/usr/bin/env python3
'''
setuptools based setup module;
see <https://packaging.python.org/en/latest/distributing.html>;
'''
from os import path
from setuptools import find_packages
from setuptools import setup
here = path.abspath(path.dirname(__file__))
## get long description from readme file;
with open(path.j... | gpl-3.0 | -8,959,277,930,186,001,000 | 30.530172 | 136 | 0.579357 | false | 3.930682 | true | false | false |
nicko96/Chrome-Infra | glyco/glucose/install.py | 1 | 8024 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import hashlib
import httplib2
import logging
import os
import sys
import urllib
from glucose import util
LOGGER = logging.getLogger(__name__)
DEFAULT_CAC... | bsd-3-clause | 3,545,463,092,387,777,500 | 32.157025 | 80 | 0.61154 | false | 4.056623 | false | false | false |
laumann/servo | components/script/dom/bindings/codegen/CodegenRust.py | 1 | 243619 | # 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/.
# Common codegen classes.
from collections import defaultdict
import operator
import re
import string
import textwrap
... | mpl-2.0 | 7,539,845,005,135,834,000 | 38.54212 | 119 | 0.575087 | false | 4.216175 | false | false | false |
rwl/puddle | puddle/resource/action/properties_action.py | 1 | 3749 | #------------------------------------------------------------------------------
# Copyright (C) 2009 Richard W. Lincoln
#
# 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 restrictio... | mit | -6,371,690,640,377,739,000 | 41.123596 | 79 | 0.51107 | false | 5.236034 | false | false | false |
endlessm/endless-ndn | eos_data_distribution/parallel.py | 1 | 2456 | # -*- Mode:python; coding: utf-8; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
#
# Copyright (C) 2016 Endless Mobile, Inc.
# Author: Niv Sardi <xaiki@endlessm.com>
#
# 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
# ... | lgpl-3.0 | -2,895,144,727,426,026,000 | 32.643836 | 81 | 0.65513 | false | 3.8375 | false | false | false |
SP2RC-Coding-Club/Codes | 13_07_2017/3D_slab_modes.py | 1 | 35096 |
#import pdb # pause code for debugging at pdb.set_trace()
import numpy as np
import toolbox as tool
import slab_functions as sf
from pysac.plot.mayavi_seed_streamlines import SeedStreamline
import matplotlib.pyplot as plt
from mayavi import mlab
import gc
#import move_seed_points as msp
import mayavi_plotting_function... | mit | 2,062,885,535,254,290,400 | 48.086713 | 208 | 0.498518 | false | 3.590384 | false | false | false |
bundgus/python-playground | ssh-playground/demo_sftp.py | 1 | 2786 | #!/usr/bin/env python
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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.... | mit | 2,605,952,891,896,653,000 | 30.303371 | 81 | 0.684135 | false | 3.44802 | false | false | false |
cmjatai/cmj | cmj/cerimonial/models.py | 1 | 27858 |
from django.contrib.auth.models import Group
from django.db import models
from django.db.models.deletion import SET_NULL, PROTECT, CASCADE
from django.utils.translation import ugettext_lazy as _
from cmj.core.models import CmjModelMixin, Trecho, Distrito, RegiaoMunicipal,\
CmjAuditoriaModelMixin, CmjSearchMixin, ... | gpl-3.0 | 2,557,580,451,169,322,000 | 31.736718 | 79 | 0.601089 | false | 3.564468 | false | false | false |
rajalokan/nova | nova/tests/functional/notification_sample_tests/test_instance.py | 1 | 34922 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 | 4,255,457,280,156,007,400 | 39.988263 | 79 | 0.566777 | false | 4.220181 | true | false | false |
stchepanhagn/domain-learning | plan_learning.py | 1 | 2767 | """ plan_learning.py
- This module contain the procedure used for learning plans from experience.
Copyright (C) 2016 Stephan Chang
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 ... | gpl-3.0 | 8,032,233,054,267,307,000 | 29.744444 | 89 | 0.647271 | false | 3.87535 | false | false | false |
dcy/epush | examples/rabbitmq/xiaomi.py | 1 | 1181 | #!/usr/bin/env python
#coding:utf-8
import pika
import json
HOST = 'localhost'
USERNAME = 'hisir'
PASSWORD = 'hisir123'
class Xiaomi():
def __init__(self):
credentials = pika.PlainCredentials(USERNAME, PASSWORD)
self.connection = pika.BlockingConnection(pika.ConnectionParameters(host=HOST, crede... | bsd-3-clause | -3,308,385,428,919,708,000 | 23.4375 | 112 | 0.57971 | false | 3.34188 | false | false | false |
iw3hxn/LibrERP | account_payment_term_month/models/inherit_account_invoice.py | 1 | 3307 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Micronaet SRL (<http://www.micronaet.it>).
# Copyright (C) 2014 Agile Business Group sagl
# (<http://www.agilebg.com>)
#
# This pro... | agpl-3.0 | 286,080,595,633,511,650 | 40.3375 | 110 | 0.586332 | false | 3.881455 | false | false | false |
lablup/sorna-agent | src/ai/backend/kernel/vendor/aws_polly/__init__.py | 1 | 3171 | import asyncio
import ctypes
import logging
import os
import threading
import janus
from ... import BaseRunner
from .inproc import PollyInprocRunner
log = logging.getLogger()
class Runner(BaseRunner):
log_prefix = 'vendor.aws_polly-kernel'
def __init__(self, *args, **kwargs):
super().__init__(*ar... | lgpl-3.0 | -6,937,433,989,262,053,000 | 31.690722 | 73 | 0.584358 | false | 4.081081 | false | false | false |
zetaops/ulakbus | ulakbus/views/reports/base.py | 1 | 6017 | # -*- coding: utf-8 -*-
"""
"""
# Copyright (C) 2015 ZetaOps Inc.
#
# This file is licensed under the GNU General Public License v3
# (GPLv3). See LICENSE.txt for details.
from io import BytesIO
from zengine.lib.translation import gettext as _, gettext_lazy
import six
from zengine.forms import JsonForm
from zengine.... | gpl-3.0 | -235,994,614,447,476,320 | 29.467005 | 99 | 0.530157 | false | 3.758297 | false | false | false |
pombredanne/nTLP | examples/gridworlds/gw_bm_analysis.py | 1 | 4888 | # Copyright (c) 2011, 2012 by California Institute of Technology
# All rights reserved.
#
# 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... | bsd-3-clause | 3,587,470,938,751,121,400 | 40.07563 | 128 | 0.653642 | false | 3.131326 | false | false | false |
mathiasertl/django-ca | ca/django_ca/deprecation.py | 1 | 1194 | # This file is part of django-ca (https://github.com/mathiasertl/django-ca).
#
# django-ca is free software: you can redistribute it and/or modify it under the terms of the GNU
# General Public License as published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version... | gpl-3.0 | 4,251,496,230,839,164,400 | 40.172414 | 98 | 0.767169 | false | 4.174825 | false | false | false |
DataDog/integrations-core | couchbase/tests/test_unit.py | 1 | 3050 | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from copy import deepcopy
import mock
import pytest
from datadog_checks.couchbase import Couchbase
def test_camel_case_to_joined_lower(instance):
couchbase = Couchbase('couchbase', {}, [instance])
... | bsd-3-clause | -6,643,786,405,936,923,000 | 34.057471 | 120 | 0.623279 | false | 3.419283 | true | false | false |
roshchupkin/hase | tools/VCF2hdf5.py | 1 | 4024 |
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from config import PYTHON_PATH
if PYTHON_PATH is not None:
for i in PYTHON_PATH: sys.path.insert(0,i)
import argparse
import h5py
import pandas as pd
import numpy as np
from hdgwas.tools import Timer
import tables
import... | gpl-3.0 | 3,613,012,578,314,009,000 | 36.962264 | 158 | 0.696571 | false | 2.691639 | false | false | false |
joanayma/pyautorunalize | pyautorunanalize.py | 1 | 5119 | #! /bin/env python
"""
PyAutorunalizer 0.1
Python script for autorunalize: http://sysinternals.com/autoruns.com listing autoruns Windows
items. Version 11.6 or greater needed.
http://Virutotal.com externa database of viruses.
original idea: http://trustedsignal.blogspot.com.es/2012/02/finding-evil-automating-aut... | gpl-2.0 | -8,408,628,864,717,367,000 | 33.355705 | 116 | 0.62942 | false | 3.229653 | false | false | false |
bilke/OpenSG-1.8 | SConsLocal/scons-local-0.96.1/SCons/Tool/__init__.py | 2 | 13279 | """SCons.Tool
SCons tool selection.
This looks for modules that define a callable object that can modify
a construction environment as appropriate for a given tool (or tool
chain).
Note that because this subsystem just *selects* a callable that can
modify a construction environment, it's possible for people to defin... | lgpl-2.1 | 5,232,730,326,358,949,000 | 37.827485 | 125 | 0.540252 | false | 4.141921 | false | false | false |
brennie/reviewboard | reviewboard/oauth/forms.py | 1 | 11912 | """Forms for OAuth2 applications."""
from __future__ import unicode_literals
from django import forms
from django.core.exceptions import ValidationError
from django.forms import widgets
from django.utils.translation import ugettext, ugettext_lazy as _
from djblets.forms.widgets import CopyableTextInput, ListEditWidge... | mit | 8,614,490,914,715,181,000 | 33.034286 | 79 | 0.561702 | false | 5.028282 | false | false | false |
Aloomaio/googleads-python-lib | examples/ad_manager/v201808/creative_template_service/get_system_defined_creative_templates.py | 1 | 2005 | #!/usr/bin/env python
#
# 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... | apache-2.0 | -8,350,638,428,948,109,000 | 37.557692 | 75 | 0.715711 | false | 4.177083 | false | false | false |
praekelt/nurseconnect | nurseconnect/tests/test_utils.py | 1 | 4506 | from freezegun import freeze_time
from django.test import TestCase
from django.test.client import Client
from django.contrib.auth.models import User
from molo.core.tests.base import MoloTestCaseMixin
from molo.core.models import SiteLanguageRelation, Languages, Main
from molo.surveys.models import MoloSurveyPage, Mo... | bsd-2-clause | -6,023,230,630,583,244,000 | 29.04 | 68 | 0.517976 | false | 3.977052 | true | false | false |
Patreon/cartographer | cartographer/field_types/schema_relationship.py | 1 | 4047 | from cartographer.resources import get_resource_registry
from cartographer.resources.resource_registry import ResourceRegistryKeys
class SchemaRelationship(object):
"""
`SchemaRelationship` describes how to translate related resources to and from JSON API and our Python models.
`SchemaRelationship` is ha... | apache-2.0 | 8,312,230,826,271,928,000 | 50.227848 | 122 | 0.679763 | false | 4.812128 | false | false | false |
ArseniyK/Sunflower | application/operation.py | 1 | 48288 | import os
import gtk
import gobject
import fnmatch
from threading import Thread, Event
from gui.input_dialog import OverwriteFileDialog, OverwriteDirectoryDialog, OperationError, QuestionOperationError
from gui.operation_dialog import CopyDialog, MoveDialog, DeleteDialog, RenameDialog
from gui.error_list import ErrorL... | gpl-3.0 | -8,770,339,951,091,888,000 | 29.236694 | 114 | 0.676711 | false | 3.389583 | false | false | false |
sujithshankar/anaconda | pyanaconda/constants.py | 1 | 6817 | #
# constants.py: anaconda constants
#
# Copyright (C) 2001 Red Hat, Inc. All rights reserved.
#
# 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 ... | gpl-2.0 | 920,207,107,352,325,500 | 35.068783 | 173 | 0.74945 | false | 3.260163 | false | false | false |
mwclient/mwclient | mwclient/page.py | 1 | 20723 | import six
from six import text_type
import time
from mwclient.util import parse_timestamp
import mwclient.listing
import mwclient.errors
class Page(object):
def __init__(self, site, name, info=None, extra_properties=None):
if type(name) is type(self):
self.__dict__.update(name.__dict__)
... | mit | 138,916,023,745,932,510 | 37.304991 | 90 | 0.564059 | false | 4.30742 | false | false | false |
dmittov/AlcoBot | bot.py | 1 | 2312 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is dist... | gpl-3.0 | 4,792,354,141,523,781,000 | 30.243243 | 71 | 0.62154 | false | 4.077601 | false | false | false |
nullzero/wprobot | wp/ltime.py | 1 | 1990 | # -*- coding: utf-8 -*-
"""
Library to manage everything about date and time.
"""
__version__ = "1.0.2"
__author__ = "Sorawee Porncharoenwase"
import datetime
import time
def wrapMonth(m):
"""Convert zero-based month number to zero-based month number."""
m -= 1
if m < 0:
m += 12
if m >= 12:
... | mit | 5,983,318,943,164,025,000 | 27.440678 | 79 | 0.51907 | false | 1.707019 | false | false | false |
Gr8z/Legend-Cogs | profanity/profanity.py | 1 | 2085 | import discord
from discord.ext import commands
from .utils.dataIO import dataIO, fileIO
import os
import asyncio
BOTCOMMANDER_ROLES = ["Family Representative", "Clan Manager", "Clan Deputy", "Co-Leader", "Hub Officer", "admin"]
class profanity:
"""profanity!"""
def __init__(self, bot):
self.bot = b... | mit | 7,216,413,436,609,016,000 | 31.092308 | 135 | 0.61295 | false | 3.619792 | false | false | false |
samuelfekete/Pythonometer | tests/test_questions.py | 1 | 1786 | """Test all questions."""
import os
import sys
import unittest
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
from pythonometer.quiz import all_questions
from pythonometer.questions.base import WrongAnswer
class TestQuestions(unittest.TestCase):
"""Test the questions.
A... | mit | 8,631,838,962,788,521,000 | 32.074074 | 82 | 0.68645 | false | 4.409877 | true | false | false |
iocast/poiservice | lib/FilterEncodingWizard.py | 1 | 2742 | '''
Created on May 16, 2011
@author: michel
'''
import json
class FilterEncodingWizard(object):
comparision = [{
'value' : 'PropertyIsEqualTo',
'display' : '=',
'xml' : '<PropertyIsEqualTo><PropertyName>${value}</PropertyName><Literal>${literal}</Literal></PropertyIsEqu... | mit | -6,222,942,528,908,910,000 | 39.338235 | 155 | 0.522611 | false | 4.098655 | false | false | false |
cardmaster/makeclub | controlers/activity.py | 1 | 10024 | '''Copyright(C): Leaf Johnson 2011
This file is part of makeclub.
makeclub 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 versi... | agpl-3.0 | -6,981,099,863,504,542,000 | 34.048951 | 142 | 0.680467 | false | 3.03023 | false | false | false |
pedrogazquez/appBares | rango/forms.py | 1 | 3240 | from django import forms
from django.contrib.auth.models import User
from rango.models import Tapa, Bar, UserProfile
class BarForm(forms.ModelForm):
name = forms.CharField(max_length=128, help_text="Por favor introduzca el nombre del bar")
views = forms.IntegerField(widget=forms.HiddenInput(), initial=0)... | gpl-3.0 | 233,954,924,696,194,240 | 41.810811 | 113 | 0.659877 | false | 3.941606 | false | false | false |
google-research/disentanglement_lib | disentanglement_lib/data/ground_truth/cars3d.py | 1 | 4067 | # coding=utf-8
# Copyright 2018 The DisentanglementLib 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
#
# Un... | apache-2.0 | 5,423,659,911,183,028,000 | 35.3125 | 79 | 0.687239 | false | 3.380715 | false | false | false |
JudoWill/ResearchNotebooks | GA-PhredProcessing.py | 1 | 1153 | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <codecell>
import os, os.path
import shutil
import glob
import sys
from subprocess import check_call, check_output
os.chdir('/home/will/Dropbox/PhredDirectory/')
staden_path = '/home/will/staden-2.0.0b9.x86_64/bin/'
sys.path.append('/home/will/PySeqUtils/')
# <co... | mit | 8,730,449,133,413,499,000 | 18.87931 | 81 | 0.679965 | false | 2.656682 | false | false | false |
intel-hpdd/intel-manager-for-lustre | chroma_core/services/job_scheduler/job_scheduler_client.py | 1 | 10557 | # Copyright (c) 2020 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
"""
The service `job_scheduler` handles both RPCs (JobSchedulerRpc) and a queue (NotificationQueue).
The RPCs are used for explicit requests to modify the system or run ... | mit | -5,882,066,424,023,178,000 | 36.703571 | 133 | 0.666856 | false | 4.030928 | true | false | false |
fsmMLK/inkscapeMadeEasy | examples/iME_Draw_lineStyle_and_markers.py | 1 | 4006 | #!/usr/bin/python
import inkex
import inkscapeMadeEasy_Base as inkBase
import inkscapeMadeEasy_Draw as inkDraw
import math
class myExtension(inkBase.inkscapeMadeEasy):
def __init__(self):
inkex.Effect.__init__(self)
self.OptionParser.add_option("--myColorPicker", action="store", type="string", de... | gpl-3.0 | -872,509,245,772,700,800 | 53.876712 | 148 | 0.496006 | false | 4.927429 | false | false | false |
wetek-enigma/enigma2 | lib/python/Screens/ButtonSetup.py | 1 | 29746 | from GlobalActions import globalActionMap
from Components.ActionMap import ActionMap, HelpableActionMap
from Components.Button import Button
from Components.ChoiceList import ChoiceList, ChoiceEntryComponent
from Components.SystemInfo import SystemInfo
from Components.config import config, ConfigSubsection, ConfigText,... | gpl-2.0 | 6,284,683,870,160,974,000 | 45.917981 | 266 | 0.686042 | false | 3.254486 | true | false | false |
googleapis/googleapis-gen | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/errors/types/feed_attribute_reference_error.py | 1 | 1293 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -425,834,407,816,632,600 | 30.536585 | 74 | 0.702243 | false | 4.13099 | false | false | false |
examachine/pisi | pisi/exml/xmlfilepiks.py | 1 | 2519 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2005, TUBITAK/UEKAE
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation; either version 3 of the License, or (at your option)
# any later version.
#
# Plea... | gpl-3.0 | -4,301,337,258,087,709,000 | 27.303371 | 86 | 0.628821 | false | 3.645441 | false | false | false |
csm0042/rpihome_v3 | rpihome_v3/schedule_service/service_main.py | 1 | 6835 | #!/usr/bin/python3
""" service_main.py:
"""
# Import Required Libraries (Standard, Third Party, Local) ********************
import asyncio
import datetime
import logging
if __name__ == "__main__":
import os
import sys
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__)... | gpl-3.0 | -8,828,960,547,473,434,000 | 42.814103 | 97 | 0.501244 | false | 4.353503 | false | false | false |
Ledoux/ShareYourSystem | Pythonlogy/ShareYourSystem/Standards/Classors/Switcher/Drafts/__init__ copy.py | 1 | 8024 | #<ImportSpecificModules>
import operator
,Doer,Representer
from ShareYourSystem.Functers import Functer,Triggerer,Hooker
BaseModuleStr="ShareYourSystem.Functers.Functer"
DecorationModuleStr="ShareYourSystem.Standards.Classors.Classer")
#</ImportSpecificModules>
#<DefineLocals>
SYS.setSubModule(globals())
SwitchingBef... | mit | 331,411,898,130,539,900 | 28.284672 | 112 | 0.692672 | false | 3.575758 | false | false | false |
bokeh-cookbook/bokeh-cookbook | plugins/ipynb/markup.py | 1 | 5935 | from __future__ import absolute_import, print_function, division
import os
import json
try:
# Py3k
from html.parser import HTMLParser
except ImportError:
# Py2.7
from HTMLParser import HTMLParser
from pelican import signals
from pelican.readers import MarkdownReader, HTMLReader, BaseReader
from .ipy... | agpl-3.0 | -8,813,531,780,843,853,000 | 34.969697 | 175 | 0.609436 | false | 3.975218 | false | false | false |
mtlynch/ndt-e2e-clientworker | client_wrapper/install_selenium_extensions.py | 1 | 3193 | import argparse
import os
import platform
import urllib
import tempfile
import names
driver_urls = {
'chrome_os_x': {
'url':
'http://chromedriver.storage.googleapis.com/2.21/chromedriver_mac32.zip',
'file_name': 'chromedriver_mac32.zip'
},
'chrome_ubuntu': {
'url':
... | apache-2.0 | 7,890,214,524,247,196,000 | 31.917526 | 116 | 0.634826 | false | 3.524283 | false | false | false |
cwacek/python-jsonschema-objects | test/test_regression_126.py | 1 | 1829 | import pytest
import python_jsonschema_objects as pjs
import collections
@pytest.fixture
def schema():
return {
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Test",
"definitions": {
"MyEnum1": {"type": "string", "enum": ["E_A", "E_B"]},
"MyEnum2": ... | mit | -1,888,342,341,075,785,700 | 30.534483 | 86 | 0.42865 | false | 3.362132 | false | false | false |
Krakn/learning | src/python/advent_of_code/2017/05/a_maze_of_twisty_trampolines_all_alike.py | 1 | 3322 | #!/usr/bin/env python3
'''
--- Day 5: A Maze of Twisty Trampolines, All Alike ---
'''
def load_input(filename):
'''
Parse input file, returning an array of maze offsets.
'''
maze = list()
with open(filename, 'r') as file_input:
for line in file_input.readlines():
maze.append(i... | isc | -1,629,784,482,675,308,500 | 33.604167 | 79 | 0.609573 | false | 3.805269 | false | false | false |
winterbird-code/adbb | adbb/__init__.py | 1 | 2124 | #!/usr/bin/env python
#
# This file is part of adbb.
#
# adbb is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# adbb is distributed i... | gpl-3.0 | -7,247,581,232,844,061,000 | 25.222222 | 83 | 0.663842 | false | 3.50495 | false | false | false |
jcfr/mystic | examples/TEST_ffitPP2_b.py | 1 | 1429 | #!/usr/bin/env python
#
# Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
# Copyright (c) 1997-2015 California Institute of Technology.
# License: 3-clause BSD. The full license text is available at:
# - http://trac.mystic.cacr.caltech.edu/project/mystic/browser/mystic/LICENSE
"""
Testing the polynomial fi... | bsd-3-clause | 4,351,184,427,107,404,300 | 27.58 | 82 | 0.687194 | false | 3.277523 | false | false | false |
Aloomaio/googleads-python-lib | examples/ad_manager/v201805/creative_service/create_creative_from_template.py | 1 | 3666 | #!/usr/bin/env python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | 1,060,630,061,611,670,300 | 32.027027 | 80 | 0.638298 | false | 3.887593 | false | false | false |
eduble/panteda | operators/map/heatmap.py | 1 | 4193 | #!/usr/bin/env python3
import numpy as np
import numpy.random
from time import time
# web mercator projection functions
# ---------------------------------
def linear_lat(lat, atanh = np.arctanh, sin = np.sin, radians = np.radians):
return atanh(sin(radians(lat)))
def inv_linear_lat(ll, asin = np.arcsin, tanh = n... | gpl-3.0 | -2,101,006,383,756,166,100 | 41.785714 | 102 | 0.577152 | false | 3.494167 | false | false | false |
mohitreddy1996/Gender-Detection-from-Signature | src/train_test/random_forests.py | 1 | 1140 | from sklearn.metrics import precision_recall_fscore_support
import pandas as pd
import numpy as np
from sklearn.ensemble import RandomForestClassifier
from sklearn.preprocessing import MinMaxScaler, normalize
df = pd.read_csv('../../Dataset/dataset.csv', delimiter='\t')
dataset = df.values
mask = np.random.rand(len... | mit | 5,244,072,690,348,756,000 | 20.923077 | 72 | 0.711404 | false | 2.961039 | true | true | false |
aquaya/ivrhub | ivrhub/models.py | 1 | 3129 | ''' mongoengine models
'''
from mongoengine import *
class User(Document):
''' some are admins some are not
'''
admin_rights = BooleanField(required=True)
api_id = StringField()
api_key = StringField()
email = EmailField(required=True, unique=True, max_length=254)
email_confirmation_code =... | mit | 7,868,206,963,524,489,000 | 31.59375 | 66 | 0.686801 | false | 4.298077 | false | false | false |
tzangms/PyConTW | pycon_project/biblion/views.py | 1 | 3501 | from datetime import datetime
from django.core.urlresolvers import reverse
from django.http import HttpResponse, Http404
from django.shortcuts import render_to_response, get_object_or_404
from django.template import RequestContext
from django.template.loader import render_to_string
from django.utils import simplejson ... | bsd-3-clause | -8,178,591,767,137,141,000 | 29.181034 | 86 | 0.623536 | false | 3.822052 | false | false | false |
jseabold/statsmodels | statsmodels/sandbox/distributions/sppatch.py | 5 | 24020 | '''patching scipy to fit distributions and expect method
This adds new methods to estimate continuous distribution parameters with some
fixed/frozen parameters. It also contains functions that calculate the expected
value of a function for any continuous or discrete distribution
It temporarily also contains Bootstrap... | bsd-3-clause | -3,253,983,564,312,369,000 | 32.03989 | 91 | 0.617527 | false | 3.827888 | false | false | false |
codefisher/mozbutton_sdk | builder/restartless_button.py | 1 | 28578 | import os
import re
import json
import codecs
import lxml.etree as ET
from copy import deepcopy
from collections import namedtuple, defaultdict
try:
from PIL import Image
except ImportError:
pass
from builder.ext_button import Button, Option, ChromeString, ChromeFile
try:
basestring
except NameError:
... | mit | 4,315,887,822,240,294,400 | 52.217877 | 288 | 0.549689 | false | 3.762243 | false | false | false |
soybean217/lora-python | UServer/admin_server/admin_http_api/api/api_group.py | 1 | 3730 | import json
from wtforms import ValidationError
from userver.object.application import Application
from . import api, root
from flask import request, Response
from userver.object.group import Group
from binascii import hexlify
from utils.errors import KeyDuplicateError, PatchError
from .decorators import group_filter_... | mit | -6,227,232,879,890,345,000 | 43.404762 | 172 | 0.574263 | false | 3.718843 | false | false | false |
spino327/sdr_testbed | DistributedTestbed/SlaveRX.py | 1 | 6293 | '''
Copyright (c) 2011, Universidad Industrial de Santander, Colombia
University of Delaware
All rights reserved.
@author: Sergio Pino
@author: Henry Arguello
Website: http://www.eecis.udel.edu/
emails : sergiop@udel.edu - henarfu@udel.edu
Date : Feb, 2011
'''
import socket
import time
import sys
from receiver.RXA... | apache-2.0 | -2,031,581,930,941,409,300 | 29.259615 | 113 | 0.482918 | false | 4.301435 | false | false | false |
alanc10n/py-rau | pyrau/rau.py | 1 | 1747 | import argparse
from redis import StrictRedis
from pyrau.commands import Command
def delete(args, command):
""" Execute the delete command """
command.delete(args.pattern)
def keys(args, command):
""" Execute the keys command """
details = args.details | args.sorted
command.keys(args.pattern, de... | mit | -40,468,994,944,548,810 | 31.962264 | 76 | 0.606754 | false | 3.943567 | false | false | false |
TerryRen/TrPython | NetLib/SuperCaptcha.py | 1 | 9743 | #python 2.7
#coding=utf-8
__author__ = "Terry.Ren"
#try:
# import Image
#except ImportError:
# from PIL import Image
from PIL import Image
from PIL import ImageDraw
import ImageEnhance
import os
import urllib
import StringIO
import uuid
import pytesseract #open source
class Captcha(object):
def __init... | apache-2.0 | 4,605,390,416,347,193,000 | 29.600629 | 132 | 0.550098 | false | 3.510462 | true | false | false |
weggert/calendar_sync | calendar_sync.py | 1 | 6753 | #!/usr/bin/python
import fileinput
import os
class CalendarManager:
def __init__(self, calendar_name, dry_run, include_descriptions):
self.calendar_name = calendar_name
self.dry_run = dry_run
self.include_descriptions = include_descriptions
def clear_calendar(self):
command =... | apache-2.0 | -4,109,685,570,745,103,000 | 34.925532 | 115 | 0.577077 | false | 4.085299 | false | false | false |
allenai/allennlp | allennlp/modules/text_field_embedders/basic_text_field_embedder.py | 1 | 5232 | from typing import Dict
import inspect
import torch
from overrides import overrides
from allennlp.common.checks import ConfigurationError
from allennlp.data import TextFieldTensors
from allennlp.modules.text_field_embedders.text_field_embedder import TextFieldEmbedder
from allennlp.modules.time_distributed import Tim... | apache-2.0 | 8,035,300,947,094,428,000 | 47.444444 | 114 | 0.640673 | false | 4.253659 | false | false | false |
perlygatekeeper/glowing-robot | google_test/free_the_bunny_prisoners/solution_5_fails.py | 1 | 1090 | import itertools
def solution(bunnies,keys_required):
answer = []
for i in range(bunnies):
answer.append([])
# if keys_required > bunnies:
# return None
if keys_required == 0:
return [[0]]
elif keys_required == 1:
key = 0
for group in range(bunnies):
... | artistic-2.0 | -8,434,445,743,401,300,000 | 28.459459 | 88 | 0.538532 | false | 3.449367 | false | false | false |
mrjmad/nagademon_2014 | nagademon2014/maingame/models/history_elements.py | 1 | 6460 | # -*- coding: utf-8 -*-
from __future__ import (print_function, division, absolute_import, unicode_literals)
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.db import models
USER_MODEL = settings.AUTH_U... | mit | 5,791,698,670,006,022,000 | 43.551724 | 117 | 0.645201 | false | 3.875225 | false | false | false |
vitale232/ves | ves/VESinverse_vectorized.py | 1 | 12839 | # -*- coding: utf-8 -*-
"""
Created on Thu Jan 28 16:32:48 2016
@author: jclark
this code uses the Ghosh method to determine the apparent resistivities
for a layered earth model. Either schlumberger or Wenner configurations
can be used
"""
import numpy as np
import random
import matplotlib
matplotlib... | lgpl-3.0 | -1,006,991,285,408,766,500 | 31.442708 | 120 | 0.53283 | false | 2.705225 | false | false | false |
mikoim/funstuff | null/crawler/tt2db.py | 1 | 1709 | # -*- coding: utf-8 -*-
import urllib.request
import time
import pymongo
import http.client
import re
def httpWrapper(url):
try:
data_raw = urllib.request.urlopen(url).read().decode('utf-8')
except:
return "NULL"
return data_raw
def getGirlName(data_raw):
matches = re.findall('名前[ ]+... | mit | -7,780,927,202,663,628,000 | 26.606557 | 102 | 0.562686 | false | 2.978761 | false | false | false |
digifant/eMonitor | tools/update-osm-data.py | 1 | 10402 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import logging
import logging.handlers
import traceback
import os
import time
from optparse import OptionParser
import MySQLdb
import codecs
import requests
import sys
import pdb
import argparse
from pprint import pprint
def osmWebUrl (lat,lng):
return "http://www.openstr... | bsd-3-clause | -7,600,303,221,806,536,000 | 45.424107 | 250 | 0.544379 | false | 3.781455 | false | false | false |
suma12/asterix | asterix/APDU.py | 1 | 31348 | """ asterix/APDU.py
__author__ = "Petr Tobiska"
Author: Petr Tobiska, mailto:petr.tobiska@gmail.com
This file is part of asterix, a framework for communication with smartcards
based on pyscard. This file implements handfull APDU commands.
asterix is free software; you can redistribute it and/or modify
it under th... | lgpl-2.1 | -262,022,843,162,776,060 | 35.621495 | 115 | 0.571711 | false | 2.991507 | false | false | false |
xerond/lucia | ledEditor/cfilegen.py | 1 | 2560 | from effectgroup import EffectGroup
from effectdescriptions import EffectDescriptions
from myutils import Utils
def generateFile(fileName,ledCount,effectGroups):
f = open(fileName,'w')
f.write("#ifndef H_SONG_INSTRUCTIONS\n#define H_SONG_INSTRUCTIONS\n#include \"avr/pgmspace.h\"\n#include \"song_instructions.h\"\nco... | mit | 6,627,170,382,357,033,000 | 34.068493 | 175 | 0.74375 | false | 3.073229 | false | false | false |
notepadqq/NotepadqqApi_Python | notepadqq_api/notepadqq_api.py | 1 | 3531 | import asyncio
import sys
from notepadqq_api.message_channel import MessageChannel
from notepadqq_api.message_interpreter import MessageInterpreter
from notepadqq_api.stubs import Stubs
class NotepadqqApi():
"""Provides access to the Notepadqq Api."""
_NQQ_STUB_ID = 1
def __init__(self, socket_path=None... | mit | -2,928,871,828,242,222,600 | 37.380435 | 88 | 0.632965 | false | 4.37005 | false | false | false |
rackerlabs/deuce-valere | deucevalere/common/validation.py | 1 | 1337 | """
Deuce Valere - Common - Validation
"""
import datetime
from deuceclient.api import *
from deuceclient.auth.base import AuthenticationBase
from deuceclient.client.deuce import DeuceClient
from deuceclient.common.validation import *
from deuceclient.common.validation_instance import *
from stoplight import Rule, Val... | apache-2.0 | -5,001,324,934,594,096,000 | 30.093023 | 79 | 0.743455 | false | 3.841954 | false | false | false |
hemebond/kapua | courses/views.py | 1 | 4832 | # Copyright 2011 James O'Neill
#
# This file is part of Kapua.
#
# Kapua is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Kapua is d... | gpl-3.0 | 8,351,613,602,219,685,000 | 25.549451 | 74 | 0.710472 | false | 3.264865 | false | false | false |
Pikl/PiklBot | cogs/pikl.py | 1 | 1281 | import discord
from discord.ext import commands
class Pikl:
"""Super pikly commands."""
def __init__(self, bot):
self.bot = bot
@commands.command(hidden=False)
async def helloworld(self):
"""Hello, world!"""
await self.bot.say("Hello, world!")
@commands.command(hidden=False)
async def postraidembed(sel... | gpl-3.0 | -9,634,640,449,993,438 | 40.354839 | 191 | 0.737705 | false | 2.691176 | false | false | false |
jtwaleson/decrypt | decrypt/decrypt.py | 1 | 1745 | #!/usr/bin/env python
import curses
import time
import fileinput
import random
import string
screen = curses.initscr()
lines = []
chance = 0.1
confirmed_per_line = []
def main():
curses.noecho()
try:
curses.curs_set(0)
except:
pass
screen.keypad(1)
try:
for line in fileinp... | mit | 3,421,878,440,241,431,600 | 23.928571 | 72 | 0.514613 | false | 4.05814 | false | false | false |
vdrhtc/Measurement-automation | drivers/pyspcm.py | 1 | 7735 | import os
import platform
import sys
from ctypes import *
# load registers for easier access
from drivers.py_header.regs import *
# load registers for easier access
from drivers.py_header.spcerr import *
SPCM_DIR_PCTOCARD = 0
SPCM_DIR_CARDTOPC = 1
SPCM_BUF_DATA = 1000 # main data buffer for acquired or genera... | gpl-3.0 | 5,788,646,918,922,448,000 | 33.225664 | 99 | 0.68287 | false | 2.709282 | false | false | false |
Dev-Cloud-Platform/Dev-Cloud | dev_cloud/web_service/urls/user/environment.py | 1 | 5340 | # -*- coding: utf-8 -*-
# @COPYRIGHT_begin
#
# Copyright [2015] Michał Szczygieł, M4GiK Software
#
# 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... | apache-2.0 | -6,435,118,396,431,205,000 | 70.173333 | 132 | 0.566317 | false | 4.357551 | false | false | false |
vertexproject/synapse | synapse/tests/test_tools_csvtool.py | 1 | 6295 | import csv
from unittest import mock
import synapse.common as s_common
import synapse.telepath as s_telepath
import synapse.tests.utils as s_t_utils
import synapse.tools.csvtool as s_csvtool
csvfile = b'''ipv4,fqdn,notes
1.2.3.4,vertex.link,malware
8.8.8.8,google.com,whitelist
'''
csvstorm = b'''
for ($ipv4, $... | apache-2.0 | 5,403,740,842,168,833,000 | 31.448454 | 107 | 0.554408 | false | 3.362714 | true | false | false |
Jumpscale/jumpscale_core8 | lib/JumpScale/tools/issuemanager/models/repoCollection.py | 1 | 2535 | from JumpScale import j
base = j.data.capnp.getModelBaseClassCollection()
class RepoCollection(base):
"""
This class represent a collection of Issues
"""
def list(self, owner=0, name='', id=0, source="", returnIndex=False):
"""
List all keys of repo model with specified params.
... | apache-2.0 | 7,284,187,035,742,835,000 | 32.8 | 118 | 0.523077 | false | 4.21797 | false | false | false |
fzza/rdio-sock | src/rdiosock/metadata.py | 1 | 3693 | from rdiosock.exceptions import RdioApiError
from rdiosock.objects.collection import RdioList
class SEARCH_TYPES:
"""Metadata search types"""
NONE = 0
ARTIST = 1
ALBUM = 2
TRACK = 4
PLAYLIST = 8
USER = 16
LABEL = 32
ALL = (
A... | gpl-3.0 | 9,067,494,512,009,808,000 | 22.08125 | 123 | 0.516382 | false | 3.681954 | false | false | false |
Hiestaa/3D-Lsystem | lsystem/Tree7.py | 1 | 1145 | from lsystem.LSystem import LSystem
import math
class Tree7(LSystem):
"""Fractale en forme d'arbre v7"""
def defineParams(self):
self.LSName = "Tree7"
self.LSAngle = math.pi / 4
self.LSSegment = 100
self.LSSteps = 9
self.LSStartingString = "T(x)"
self.LSStochastic = False
self.LSStochRange = 0.2
de... | mit | -4,130,226,436,172,089,000 | 20.603774 | 69 | 0.558952 | false | 2.136194 | false | false | false |
sagiss/sardana | src/sardana/taurus/qt/qtgui/extra_hkl/hklscan.py | 1 | 15114 | #!/usr/bin/env python
##############################################################################
##
## This file is part of Sardana
##
## http://www.sardana-controls.org/
##
## Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
## Sardana is free software: you can redistribute it and/or modify
## it und... | lgpl-3.0 | 5,986,230,292,049,450,000 | 37.070529 | 119 | 0.596335 | false | 3.596003 | false | false | false |
josephxsxn/alchemists_notepad | Tests.py | 1 | 6304 | #List all ENUMS
from Object.Ingredient import Ingredient
for i in Ingredient:
print(i)
from Object.PotionColor import PotionColor
for r in PotionColor:
print(r)
from Object.PotionSign import PotionSign
for r in PotionSign:
print(r)
#//TODO
#NEED TO ADD ALCHEMICAL ENUMS HERE
#Make a Potion and Fetch its values
fr... | apache-2.0 | -8,223,180,517,559,525,000 | 39.410256 | 121 | 0.740641 | false | 2.636554 | false | false | false |
domain51/d51.django.apps.logger | d51/django/apps/logger/tests/views.py | 1 | 1154 | import datetime
from django.test import TestCase
from django.test.client import Client
from ..models import Hit
from .utils import build_hit_url, random_url
class TestOfHitView(TestCase):
def test_logs_hit(self):
url = random_url()
c = Client()
response = c.get(build_hit_url(url))
... | gpl-3.0 | -987,452,888,625,049,100 | 36.225806 | 97 | 0.652513 | false | 3.796053 | true | false | false |
roam/machete | machete/endpoints.py | 1 | 25618 | # -*- coding: utf-8 -*-
from __future__ import (unicode_literals, print_function, division,
absolute_import)
import sys
import hashlib
from contextlib import contextmanager
from django.views.decorators.csrf import csrf_exempt
from django.db import transaction, models
from django.views.generic ... | bsd-2-clause | 7,528,123,250,925,826,000 | 35.183616 | 121 | 0.61851 | false | 4.340563 | false | false | false |
Zhang-O/small | tensor__cpu/http/spyser_liyou.py | 1 | 5473 | import urllib.request
from bs4 import BeautifulSoup
import re
import urllib.parse
import xlsxwriter
import pandas as pd
import numpy as np
from urllib import request, parse
from urllib.error import URLError
import json
import multiprocessing
import time
# 详情页面的 地址 存放在这里面
urls_of_detail = []
total_pages = 0
# 要爬取的内容 ... | mit | -3,506,324,734,389,136,400 | 22.686916 | 115 | 0.533241 | false | 2.440539 | false | false | false |
Nik0las1984/mudpyl | mudpyl/net/nvt.py | 1 | 5604 | """This module contains tools for emulating a network virtual terminal. See
RFC 854 for details of the NVT commands, and VT100 documentation for the
colour codes.
"""
from mudpyl.metaline import Metaline, RunLengthList
from mudpyl.colours import NORMAL_CODES, fg_code, bg_code, WHITE, BLACK
import re
ALL_RESET = '0'
B... | gpl-2.0 | -6,692,970,020,253,625,000 | 35.868421 | 77 | 0.526588 | false | 4.26484 | false | false | false |
RCAD/ringling-render-tools | src/rrt/maya/ui/submit.py | 1 | 13088 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '.\src\rrt\maya\ui\submit.ui'
#
# Created: Wed Oct 24 16:19:16 2012
# by: PyQt4 UI code generator 4.7.7
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUt... | mit | 7,755,343,654,843,894,000 | 66.117949 | 157 | 0.737164 | false | 3.985384 | false | false | false |
kunalarya/simple-sat-solver | satsolver/solver.py | 1 | 9011 | from __future__ import print_function
import argparse
import logging
from collections import namedtuple
import satsolver.parser as parser
from satsolver.util import Success, Failure
from satsolver.state import Instance
class Node(object):
def __init__(self, lit, asg, level):
assert lit > 0
self.... | apache-2.0 | -7,440,824,354,011,734,000 | 29.545763 | 84 | 0.52669 | false | 4.246466 | false | false | false |
luyijun/evennia_worldloader | worldloader/example_tutorial_world/worlddata/migrations/0001_initial.py | 1 | 5070 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='personal_objects',
fields=[
('key', models.Char... | bsd-3-clause | 3,046,071,758,788,312,000 | 44.675676 | 93 | 0.522288 | false | 4.522748 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.