repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
umuzungu/zipline | zipline/examples/buyapple.py | 4 | 1562 | #!/usr/bin/env python
#
# Copyright 2014 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | 4,482,768,199,834,304,000 | 27.925926 | 78 | 0.690781 | false | 3.440529 | false | false | false |
sophacles/todo-scripts | todo.py | 1 | 5207 | import re
import subprocess
from datetime import datetime as DT, date
CONFIG_FILE="~/.todo.cfg"
_tagTest = re.compile(r'.+:.+')
_prioTest = re.compile(r'\([A-Z]\)$')
_validPrio = re.compile(r'[A-Z]')
def _makeDate(word):
if word is None: return None
if isinstance(word, date): return word
return DT.strpti... | mit | 2,225,535,076,095,501,300 | 26.696809 | 89 | 0.528519 | false | 3.831494 | false | false | false |
diminishedprime/dotfiles | i3/i3-pretty-mode/i3-pretty-mode.py | 1 | 2125 | #!/usr/bin/env python3
import i3ipc
import Tkinter
import sys
import re
from functools import reduce
def parse_entry(acc, entry):
key, value = entry.split("=")
acc[key] = value
return acc
def parse_args(args):
rest = args[1:]
arg_map = reduce(parse_entry, rest, {})
return arg_map
args = parse... | mit | -1,267,126,929,088,295,700 | 26.960526 | 81 | 0.616471 | false | 3.244275 | false | false | false |
Narfinger/confical | confical.py | 1 | 6200 | #!/usr/bin/python
from bs4 import BeautifulSoup
from datetime import date
import datetime
from icalendar import Calendar, Event
import pytz
import string
import urllib.request, urllib.error, urllib.parse
import re
DEBUG = False
start_index_conf_shortnames = 2
if DEBUG:
OUTFILE = '/tmp/conferences.ics'
else:
... | gpl-3.0 | 8,544,279,651,468,598,000 | 32.513514 | 108 | 0.555 | false | 3.606748 | false | false | false |
enjaz/enjaz | activities/migrations/0001_initial.py | 2 | 12700 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('clubs', '0001_initial'),
migrations.swappable_dependency(settings.A... | agpl-3.0 | 2,666,880,227,767,831,000 | 88.43662 | 434 | 0.660709 | false | 2.553277 | false | false | false |
houssemFat/MeeM-Dev | teacher/apps/courses/quizzes/views.py | 1 | 1279 |
from django.http import Http404
import json
from django.contrib.auth.decorators import login_required
from django.views.decorators.http import require_http_methods
from core.apps.decorators import require_request_attributes
from core.apps.tools.common import dump_and_render_json
from . import helper
quizzes_fields... | mit | 21,473,460,907,099,270 | 28.744186 | 61 | 0.63878 | false | 3.675287 | false | false | false |
LeZuse/psd-tools | src/psd_tools/decoder/tagged_blocks.py | 1 | 5964 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals, print_function
import warnings
import collections
import io
from psd_tools.constants import TaggedBlock, SectionDivider
from psd_tools.decoder.actions import decode_descriptor, UnknownOSType
from psd_tools.utils import read_fmt, read_uni... | mit | -2,801,926,272,393,216,500 | 35.814815 | 138 | 0.666164 | false | 3.506173 | false | false | false |
amirgeva/coide | gen/templates.py | 1 | 3555 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'uis/templates.ui'
#
#
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding =... | gpl-2.0 | 5,748,713,276,356,304,000 | 46.4 | 103 | 0.699859 | false | 3.954394 | false | false | false |
npdoty/bigbang | bigbang/entity_resolution.py | 3 | 1925 | import pandas as pd
import numpy as np
import re
namesID = dict();
emailsID = dict();
allID = dict();
nameRegex = re.compile("(\(.*\))")
currID = 1;
def getID(name, email):
global currID;
global emailsID
global namesID
nameID = False;
emailID = False;
if name is not None:
if name in nam... | agpl-3.0 | 3,706,484,465,789,909,000 | 24.342105 | 64 | 0.575584 | false | 3.40708 | false | false | false |
ellisztamas/faps | faps/pr_transition.py | 1 | 2865 | import numpy as np
def pr_transition(offspring_diploid, maternal_diploid, male_diploid, offspring_genotype, maternal_genotype, male_genotype, mu):
"""
Calculate the transition probability for a trio of putative diploid
genotypes.
Transition probabilities are then weight by the probability that the tru... | mit | 5,825,343,204,856,742,000 | 46.75 | 127 | 0.631763 | false | 3.455971 | false | false | false |
firedrakeproject/firedrake-fluids | firedrake_fluids/expression.py | 1 | 3412 | # Copyright (C) 2014 Imperial College London.
# This file is part of Firedrake-Fluids.
#
# Firedrake-Fluids 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
#... | gpl-3.0 | -1,841,821,523,388,323,600 | 35.688172 | 98 | 0.575322 | false | 4.140777 | false | false | false |
dalemyers/xcrun | isim/base_types.py | 1 | 3475 | """Base types for `xcrun simctl`."""
import enum
import json
from typing import Any, Dict
import subprocess
class ErrorCodes(enum.Enum):
"""Simple lookup for all known error codes."""
# Tried to access a file or directory (such as by searching for an app
# container) that doesn't exist
#no_such_file... | mit | -4,084,051,533,225,033,700 | 33.75 | 125 | 0.647482 | false | 3.904494 | false | false | false |
carloderamo/mushroom | mushroom_rl/algorithms/actor_critic/deep_actor_critic/deep_actor_critic.py | 1 | 2771 | from mushroom_rl.algorithms import Agent
from mushroom_rl.utils.torch import update_optimizer_parameters
class DeepAC(Agent):
"""
Base class for algorithms that uses the reparametrization trick, such as
SAC, DDPG and TD3.
"""
def __init__(self, mdp_info, policy, actor_optimizer, parameters):
... | mit | -6,520,832,054,038,720,000 | 30.134831 | 80 | 0.575965 | false | 4.520392 | false | false | false |
timo/zasim | zasim/cagen/jvn.py | 1 | 19821 | """
"""
# This file is part of zasim. zasim is licensed under the BSD 3-clause license.
# See LICENSE.txt for details.
# Copyright (c) 2011, Felix Bondarenko
import numpy as np
## A map from states according to the bitmask to
# pygame blittable states ( between 0 and 28 )
displayableStateDict = {
0: 0, # U
... | bsd-3-clause | 5,987,590,987,266,482,000 | 32.368687 | 98 | 0.401796 | false | 2.84172 | false | false | false |
nick-youngblut/SIPSim | SIPSim/Commands/KDE_plot.py | 1 | 3536 | #!/usr/bin/env python
"""
KDE_plot: make plots of each KDE (1D or 2D)
Usage:
KDE_plot [options] <kde>
KDE_plot -h | --help
KDE_plot --version
Options:
<kde> Pickled KDE object
('-' if input from STDIN)
-o=<o> Output file name.
[Default: KDE.png]
-n=<n> ... | mit | 8,313,887,363,895,623,000 | 33 | 70 | 0.451357 | false | 3.664249 | false | false | false |
fandrefh/AnjoMeu | anjo/core/forms.py | 2 | 1138 | #coding: utf-8
from django import forms
from localflavor.br.br_states import STATE_CHOICES
from django.contrib.auth.models import User
from .models import UserProfile, Testimonials, UserBank, Banks
class TestimonialsForm(forms.ModelForm):
class Meta:
model = Testimonials
exclude = ('active',)
class UserForm(for... | gpl-2.0 | 428,124,541,730,074,940 | 28.179487 | 115 | 0.729991 | false | 3.211864 | false | false | false |
pvagner/orca | src/orca/liveregions.py | 2 | 21474 | import bisect
import copy
import pyatspi
import time
from gi.repository import GLib
from . import cmdnames
from . import chnames
from . import keybindings
from . import messages
from . import input_event
from . import orca_state
from . import settings_manager
_settingsManager = settings_manager.getManager()
# define... | lgpl-2.1 | 1,968,413,401,298,374,400 | 38.043636 | 88 | 0.605476 | false | 4.356665 | false | false | false |
SeanDS/pygeosolve | pygeosolve/problem.py | 1 | 6569 | from __future__ import division
import numpy as np
import scipy.optimize as opt
import imp
import geometry
import plot
"""Problem classes"""
class Problem(object):
params = []
"""Parameters associated with this problem."""
constraints = []
"""Constraints associated with this problem."""
error_... | gpl-3.0 | -8,406,412,917,677,966,000 | 29.696262 | 79 | 0.619577 | false | 4.665483 | false | false | false |
KarrLab/kinetic_datanator | tests/elasticsearch_kl/test_batch_load.py | 1 | 2253 | import unittest
from datanator.elasticsearch_kl import batch_load
from datanator_query_python.config import config
import tempfile
import shutil
import requests
class TestMongoToES(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.cache_dir = tempfile.mkdtemp()
cls.src = batch_load.Mon... | mit | -4,733,256,728,715,654,000 | 42.346154 | 120 | 0.620506 | false | 3.730132 | true | false | false |
BeyondTheClouds/rome | lib/rome/core/expression/expression.py | 1 | 15467 | __author__ = 'jonathan'
import datetime
import pytz
from lib.rome.core.dataformat import get_decoder
import re
import uuid
from sqlalchemy.sql.expression import BinaryExpression
from lib.rome.core.rows.rows import get_attribute, has_attribute
from lib.rome.core.utils import DATE_FORMAT, datetime_to_int
def uncapital... | mit | 6,101,530,661,296,925,000 | 43.576369 | 143 | 0.527446 | false | 4.480591 | false | false | false |
baloo/shinken | test/test_bad_timeperiods.py | 1 | 1428 | #!/usr/bin/env python2.6
#Copyright (C) 2009-2010 :
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
#
#This file is part of Shinken.
#
#Shinken is free software: you can redistribute it and/or modify
#it under the terms of the GNU Affero General Public License as published by
#the Fr... | agpl-3.0 | 3,856,600,961,667,422,000 | 28.75 | 76 | 0.696078 | false | 3.561097 | true | false | false |
zv1n/pycmef | pycmef/pygaze_eyetracker.py | 1 | 1322 |
import sys, os, random, constants
from pycmef.event_handler import returns_string, returns_dictionary
from pygaze import libscreen
from pygaze import libtime
from pygaze import liblog
from pygaze import libinput
from pygaze import eyetracker
class PygazeEyetracker:
def __init__(self):
# create display object... | bsd-2-clause | 1,446,169,945,404,340,200 | 22.607143 | 70 | 0.705749 | false | 3.42487 | false | false | false |
shellphish/rex | rex/exploit/chess/control.py | 1 | 1294 | import os
from ...enums import CrashInputType
from .chess_exploit import CHESSExploit
class CHESSExploitControl(CHESSExploit):
"""
An exploit that crashes with a controlled instruction pointer and register
"""
def __init__(self, *args, registers=None, **kwargs):
if registers is None:
... | bsd-2-clause | 3,315,967,754,982,694,400 | 28.409091 | 97 | 0.620556 | false | 3.564738 | false | false | false |
chadwangcn/control_app | unit_test/udp_monitor_ut.py | 1 | 2355 | '''
Created on Aug 4, 2014
@author: lijun
'''
import unittest
import threading
import time
from socket import *
from engine import *
from engine.DataCenter import *
from engine.LogAdapter import *
from data_source.UdpMonitor import *
class udp_send(threading.Thread):
def __init__(self,_strIP,_nPort):
sel... | lgpl-3.0 | 216,481,319,521,117,400 | 23.8 | 69 | 0.498938 | false | 4.032534 | true | false | false |
jbarlow83/OCRmyPDF | src/ocrmypdf/__main__.py | 1 | 2173 | #!/usr/bin/env python3
# © 2015-19 James R. Barlow: github.com/jbarlow83
#
# 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/.
import logging
import os
import signal
impor... | gpl-3.0 | -3,380,931,195,360,879,000 | 26.846154 | 76 | 0.683702 | false | 3.62 | false | false | false |
dladd/pyFormex | pyformex/examples/Diamatic.py | 1 | 2859 | # $Id$
##
## This file is part of pyFormex 0.8.9 (Fri Nov 9 10:49:51 CET 2012)
## pyFormex is a tool for generating, manipulating and transforming 3D
## geometrical models by sequences of mathematical operations.
## Home page: http://pyformex.org
## Project page: http://savannah.nongnu.org/projects/pyformex/
##... | gpl-3.0 | -2,082,022,288,859,585,300 | 25.971698 | 90 | 0.607555 | false | 2.594374 | false | false | false |
pymedusa/Medusa | ext/trans.py | 6 | 11206 | # coding: utf8
u""" This module translates national characters into similar
sounding latin characters (transliteration).
At the moment, Czech, Greek, Latvian, Polish, Turkish, Russian, Ukrainian
and Kazakh alphabets are supported (it covers 99% of needs).
Python 3:
>>> from trans import trans
>>> trans('Привет,... | gpl-3.0 | 8,545,537,031,901,760,000 | 38.681319 | 94 | 0.442075 | false | 1.966419 | false | false | false |
nasfarley88/bslbot | convert_video_to_gif.py | 1 | 2119 | #/usr/bin/env python
from subprocess import call
from moviepy.editor import (
VideoFileClip,
CompositeVideoClip,
TextClip,
ImageClip,
concatenate
)
from numpy.testing import assert_approx_equal
from os import listdir
from os.path import expanduser, isfile, getsize
def process_video(filename, vide... | mit | 1,198,612,975,229,369,600 | 32.109375 | 189 | 0.650779 | false | 3.176912 | false | false | false |
pirate/bookmark-archiver | archivebox/cli/archivebox_oneshot.py | 1 | 2092 | #!/usr/bin/env python3
__package__ = 'archivebox.cli'
__command__ = 'archivebox oneshot'
import sys
import argparse
from pathlib import Path
from typing import List, Optional, IO
from ..main import oneshot
from ..util import docstring
from ..config import OUTPUT_DIR
from ..logging_util import SmartFormatter, accept... | mit | -7,624,070,805,743,249,000 | 27.657534 | 112 | 0.58652 | false | 3.683099 | false | false | false |
maxalbert/Pytess | pytess/__init__.py | 1 | 1265 | """
# Pytess
Pure Python tessellation of points into polygons, including
Delauney/Thiessin, and Voronoi polygons. Built as a
convenient user interface for Bill Simons/Carson Farmer python port of
Steven Fortune C++ version of a Delauney triangulator.
## Platforms
Tested on Python version 2.x.
## Dependencies
Pu... | mit | -9,201,779,272,006,112,000 | 17.071429 | 76 | 0.7083 | false | 2.955607 | false | false | false |
zeehio/META-SHARE | misc/tools/multitest/init_data/node_settings.py | 3 | 2472 | # Node specific local settings
DEBUG = True
TEMPLATE_DEBUG = DEBUG
# The URL for this META-SHARE node django application
DJANGO_URL = 'http://localhost:{0}/metashare'.format(%%DJANGO_PORT%%)
DJANGO_BASE = 'metashare/'
SECRET_KEY = 'fdklsc)dscdus8f7odc$slacud%%8so7cwp2fsFDASFWR/REFEsfjskdcjsdl3W'
#STORAGE_PATH = RO... | bsd-3-clause | 4,710,058,495,416,672,000 | 42.368421 | 87 | 0.635113 | false | 3.684054 | false | false | false |
johnny-die-tulpe/illuminati | sauron/metrics/SphinxMetric.py | 1 | 2481 | #! /usr/bin/env python
#
# Copyright (c) 2011 SEOmoz
#
# 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, m... | mit | -2,778,664,131,293,459,500 | 33.943662 | 77 | 0.681983 | false | 3.956938 | false | false | false |
peastman/deepchem | deepchem/models/tests/test_mpnn.py | 2 | 3320 | import pytest
import tempfile
import numpy as np
import deepchem as dc
from deepchem.feat import MolGraphConvFeaturizer
from deepchem.models.tests.test_graph_models import get_dataset
try:
import dgl
import dgllife
import torch
from deepchem.models.torch_models import MPNNModel
has_torch_and_dgl = True
exc... | mit | -7,588,067,651,061,039,000 | 26.666667 | 77 | 0.700602 | false | 3.223301 | true | false | false |
rlucio/cinder-violin-driver-havana | cinder/volume/drivers/violin/vxg/vshare/vshare.py | 1 | 3295 | #!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Violin Memory, 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
#
# ... | apache-2.0 | -2,200,932,792,427,783,000 | 29.509259 | 78 | 0.63308 | false | 3.535408 | false | false | false |
Shu-A/pybot | src/pybot/adapters/shell.py | 1 | 2120 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
import os, sys
from pybot.adapter import Adapter
from pybot.message import TextMessage
if os.environ.get('HUBOT_SHELL_HISTSIZE'):
history_size = int(os.environ.get('HUBOT_SHELL_HISTSIZE'))
else:
history_size = 1024
class Shell(Adapter):
def send(self, envelo... | mit | -3,812,921,751,053,811,000 | 27.648649 | 78 | 0.526415 | false | 3.752212 | false | false | false |
wingtk/icbuild | icbuild/environment.py | 1 | 1743 | # icbuild - a tool to ease building collections of source packages
# Copyright (C) 2001-2006 James Henstridge
# Copyright (C) 2007-2008 Frederic Peters
# Copyright (C) 2014 Canonical Limited
# Copyright (C) 2015 Ignacio Casal Quinteiro
#
# environment.py: environment variable setup
#
# This program is free software... | gpl-2.0 | 2,001,456,193,785,049,000 | 31.886792 | 75 | 0.702238 | false | 3.700637 | false | false | false |
TetraAsh/baruwa2 | baruwa/lib/cluster.py | 1 | 2097 | # -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4
# Baruwa - Web 2.0 MailScanner front-end.
# Copyright (C) 2010-2012 Andrew Colin Kissa <andrew@topdog.za.net>
#
# 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 S... | gpl-3.0 | 5,157,463,058,498,966,000 | 31.276923 | 71 | 0.680019 | false | 3.926966 | false | false | false |
klbostee/spaws | spaws/spark_ec2.py | 1 | 45854 | #!/usr/bin/env python
# -*- 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 Lice... | apache-2.0 | -5,960,206,326,444,945,000 | 38.907746 | 106 | 0.568129 | false | 3.801525 | false | false | false |
xuzetan/gemini | gemini/tests/test_inheritance.py | 2 | 14866 | """
Create a setup so we can easily define families. Input is a ped file to define
the pedigree and a vector indicating the genotype.
>>> fam = TestFamily(\"\"\"
... #family_id sample_id paternal_id maternal_id sex phenotype
... 1 dad 0 0 1 1
... 1 mom 0 0 2 1
... 1 kid dad mom 1 2
... 1 ... | mit | 2,982,564,929,376,766,000 | 30.362869 | 157 | 0.545406 | false | 2.824625 | true | false | false |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/mca/status/cmd/performance/errors.py | 1 | 1265 | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: errors.py
import mcl.status
ERR_SUCCESS = mcl.status.MCL_SUCCESS
ERR_INVALID_PARAM = mcl.status.framework.ERR_START
ERR_NOT_IMPLEMENTED = mcl.status.... | unlicense | 8,984,621,947,516,781,000 | 47.692308 | 67 | 0.750988 | false | 3.070388 | false | true | false |
timlau/dnf-apiex | base.py | 1 | 4671 | from __future__ import print_function
from __future__ import absolute_import
from time import time
import dnf
import dnf.yum
import dnf.const
import dnf.conf
import dnf.subject
class Packages:
'''
Get access to packages in the dnf (hawkey) sack in an easy way
'''
def __init__(self, base):
s... | gpl-3.0 | -300,041,233,186,839,550 | 27.309091 | 85 | 0.574395 | false | 4.119048 | false | false | false |
mcgoddard/HALON | models.py | 1 | 2698 | from sqlalchemy import Column, Integer, String, DateTime, Boolean, ForeignKey
from database import Base
import datetime
from sqlalchemy.orm import relationship, backref
from sqlalchemy.ext.declarative import declarative_base
class User(Base):
__tablename__ = 'users'
id = Column(Integer, primary_key=True)
u... | mit | -275,747,491,084,480,480 | 31.902439 | 87 | 0.642328 | false | 3.789326 | false | false | false |
pankajnits/vyked | vyked/bus.py | 1 | 12115 | import asyncio
from collections import defaultdict
from functools import partial
import json
import logging
import random
import uuid
from again.utils import unique_hex
from retrial.retrial import retry
import aiohttp
from .services import TCPServiceClient, HTTPServiceClient
from .pubsub import PubSub
from .packet i... | mit | 537,956,476,833,558,800 | 39.654362 | 119 | 0.613372 | false | 4.070901 | false | false | false |
CalebBell/thermo | thermo/flash/flash_utils.py | 1 | 161519 | # -*- coding: utf-8 -*-
'''Chemical Engineering Design Library (ChEDL). Utilities for process modeling.
Copyright (C) 2019, 2020 Caleb Bell <Caleb.Andrew.Bell@gmail.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to... | mit | 2,218,052,274,649,085,200 | 36.456169 | 227 | 0.514281 | false | 3.045998 | false | false | false |
google-research/sound-separation | models/train/train_with_estimator.py | 2 | 2729 | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 7,421,683,461,617,904,000 | 36.383562 | 78 | 0.696592 | false | 3.790278 | false | false | false |
lampwins/netbox | netbox/dcim/migrations/0052_virtual_chassis.py | 2 | 1701 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-11-27 17:27
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('dcim', '0051_rackreservation_tenant'),
]
operations = [
... | apache-2.0 | 352,704,305,173,732,540 | 39.5 | 155 | 0.611405 | false | 4.169118 | false | false | false |
Mester/demo-day-vikings | music_app/utils.py | 1 | 2858 | import re
import os
try:
import urllib.parse as urlparse
except ImportError:
import urlparse
try:
import collections.abc as collections
except ImportError:
import collections
from music_app.settings import DATABASE_NAME
from tinydb import TinyDB, Query
def parse_listing(data):
"""Method to parse th... | unlicense | -3,554,098,026,968,036,400 | 35.641026 | 117 | 0.555983 | false | 3.986053 | false | false | false |
pacificclimate/climate-explorer-netcdf-tests | util/grids.py | 1 | 1158 | import datetime
# Approximate representation of PRISM 400m grid
bc_400m = {'lon': {'start': -140, 'step': 0.008333333, 'count': 1680 },
'lat': {'start': 48, 'step': 0.008333333, 'count': 3241 } }
# Approximate representation of BCSD/BCCAQ grid
canada_5k = {'lon': {'start': -141, 'step': 0.08333333, 'count'... | gpl-3.0 | -8,089,446,457,915,485,000 | 45.36 | 85 | 0.594991 | false | 2.909548 | false | true | false |
codl/forget | migrations/versions/7afc95e24778_init.py | 1 | 4244 | """init
Revision ID: 7afc95e24778
Revises:
Create Date: 2017-08-03 11:51:08.190298
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '7afc95e24778'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
op.create_table('accounts',
s... | isc | -6,913,526,836,987,514,000 | 50.756098 | 155 | 0.674599 | false | 3.425343 | false | false | false |
assafnativ/NativDebugging | src/Win32/BreakPoint.py | 1 | 1475 | #
# BreakPoint.py
#
# https://github.com/assafnativ/NativDebugging.git
# Nativ.Assaf@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
# the Free Software Foundation, either version 3 of the License, or... | gpl-3.0 | 8,445,425,550,363,102,000 | 37.864865 | 74 | 0.568136 | false | 4.074586 | false | false | false |
vhazali/cs5331 | assignment3/verifier/scapy-2.3.1/scapy/arch/unix.py | 15 | 5795 | ## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Philippe Biondi <phil@secdev.org>
## This program is published under a GPLv2 license
"""
Common customizations for all Unix-like operating systems other than Linux
"""
import sys,os,struct,socket,time
from... | mit | 750,118,604,424,448,800 | 27.268293 | 105 | 0.497325 | false | 3.453516 | false | false | false |
barisser/Swift | main.py | 1 | 15798 | import ecdsa
import ecdsa.der
import ecdsa.util
import hashlib
import os
import re
import struct
import requests
import json
import math
import time
from bitcoin import *
try:
import cPickle as pickle
except:
import pickle
b58 = '123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz'
master_address='1GgwA7... | apache-2.0 | -3,476,511,744,232,896,500 | 24.604538 | 148 | 0.580833 | false | 3.266749 | false | false | false |
fooelisa/pyiosxr | pyIOSXR/exceptions.py | 1 | 2670 | #!/usr/bin/env python
# coding=utf-8
"""Exceptions for pyiosxr, a module to interact with Cisco devices running IOS-XR."""
# Copyright 2015 Netflix. All rights reserved.
# Copyright 2016 BigWaveIT. All rights reserved.
#
# The contents of this file are licensed under the Apache License, Version 2.0
# (the "License"); ... | apache-2.0 | 247,740,485,529,006,500 | 22.839286 | 85 | 0.675655 | false | 3.997006 | false | false | false |
meteoswiss-mdr/monti-pytroll | scripts/plot_odyssey.py | 1 | 10098 | from __future__ import division
from __future__ import print_function
#!/usr/bin/python
import datetime
import logging
from mpop.satellites import GeostationaryFactory
from mpop.projector import get_area_def
from mpop.utils import debug_on
from pyresample import plot
import numpy as np
from pydecorate import Decorat... | lgpl-3.0 | 3,182,971,709,990,367,700 | 29.786585 | 154 | 0.647059 | false | 2.885967 | false | false | false |
Tinkerforge/brickv | src/brickv/plugin_system/plugins/current25/current25.py | 1 | 3393 | # -*- coding: utf-8 -*-
"""
Current25 Plugin
Copyright (C) 2011-2012 Olaf Lüke <olaf@tinkerforge.com>
Copyright (C) 2014-2016 Matthias Bolte <matthias@tinkerforge.com>
current25.py: Current25 Plugin Implementation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Gener... | gpl-2.0 | 8,338,593,412,160,102,000 | 33.262626 | 116 | 0.666863 | false | 3.939605 | false | false | false |
trobanga/pifidelity | mp3database.py | 1 | 7571 | import json
import os
import mutagen
import mutagen.mp3
import mutagen.oggvorbis
import mutagen.flac
from mutagen.easyid3 import EasyID3
import itertools
class db_structure(object):
data_fields = ['artist', 'title', 'album', 'tracknumber']
def __init__(self,
path,
artist,
... | mit | 1,349,341,664,177,360,000 | 28.344961 | 77 | 0.434157 | false | 4.378832 | false | false | false |
pentestfail/TA-FireEye_TAP | bin/ta_fireeye_tap/solnlib/packages/schematics/contrib/mongo.py | 4 | 1248 | """This module contains fields that depend on importing `bson`. `bson` is
a part of the pymongo distribution.
"""
from __future__ import unicode_literals, absolute_import
import bson
from ..common import * # pylint: disable=redefined-builtin
from ..types import BaseType
from ..exceptions import ConversionError
cla... | mit | 6,206,104,877,321,113,000 | 29.439024 | 79 | 0.668269 | false | 4.025806 | false | false | false |
rgreinho/craigomatic | craigomatic/apps/craigmine/models.py | 1 | 1322 | from django.db import models
from django.utils.html import format_html
# Create your models here.
class Search(models.Model):
"""
http://austin.craigslist.org/search/bia?sort=date&hasPic=1&minAsk=10&maxAsk=250&query=fixed
"""
server = models.CharField(max_length=200)
category = models.CharField(ma... | mit | 7,252,995,492,067,824,000 | 32.05 | 95 | 0.69062 | false | 3.544236 | false | false | false |
blakerouse/python-libmaas | maas/client/utils/multipart.py | 3 | 6112 | # Copyright 2016-2017 Canonical Ltd.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | agpl-3.0 | -3,004,474,281,309,078,000 | 36.728395 | 84 | 0.680465 | false | 4.099262 | false | false | false |
tejaskhot/deep-learning | test/nnet/optimize.py | 8 | 2575 | """Optimization method
Supported method:
+ Stochastic gradient descent
"""
from collections import OrderedDict;
import theano.tensor as T;
def gd_updates(cost,
params,
updates=None,
max_norm=5.0,
learning_rate=0.1,
eps=1e-6,
... | gpl-2.0 | -6,390,088,161,485,654,000 | 19.943089 | 64 | 0.553786 | false | 4.447323 | false | false | false |
valuehack/scholarium.at | Scholien/migrations/0007_markdownartikel.py | 1 | 1076 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-12-11 13:57
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Scholien', '0006_artikel_prioritaet'),
]
operations = [
migrations.CreateMo... | mit | 8,424,974,101,967,312,000 | 33.709677 | 114 | 0.556691 | false | 4.10687 | false | false | false |
NERSC/QENESAP | PP/tools/sum_states.py | 19 | 8217 | #! /usr/bin/python
###### SUM STATES #######
# Python script for summing and ploting the data from the Density Of States
# files obtained from projwfc.x. It can sum also k-solved dos, and make a plot
# with mathplotlib (if not available, gnuplot, if not avaible, print to file)
# if there is not X11 forwarding, plots ... | gpl-2.0 | 1,317,896,384,210,962,000 | 32.538776 | 159 | 0.638433 | false | 2.883158 | false | false | false |
StanfordBioinformatics/xppf | client/loomengine/auth.py | 2 | 2574 | #!/usr/bin/env python
import argparse
import os
from getpass import getpass
from loomengine import verify_has_connection_settings, \
verify_server_is_running, get_server_url, \
save_token, delete_token, get_token
from loomengine_utils.connection import Connection
from requests.exceptions import HTTPError
cla... | agpl-3.0 | -1,499,549,989,239,108,000 | 26.677419 | 65 | 0.607615 | false | 4.15832 | false | false | false |
davesteele/pygsear-debian | pygsear/Widget.py | 1 | 43275 | # pygsear
# Copyright (C) 2003 Lee Harr
#
#
# This file is part of pygsear.
#
# pygsear is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.... | gpl-2.0 | 7,833,039,730,303,193,000 | 29.604668 | 119 | 0.534674 | false | 3.960373 | false | false | false |
openstack/vitrage | tools/datasource-scaffold/sample/transformer.py | 1 | 2558 | # Copyright 2018 - Vitrage team
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | apache-2.0 | -8,240,631,817,514,356,000 | 36.072464 | 75 | 0.710321 | false | 3.953632 | false | false | false |
belokop/indico_bare | indico/modules/events/requests/base.py | 2 | 7396 | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico 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 (a... | gpl-3.0 | 1,224,264,384,494,363,000 | 36.353535 | 116 | 0.663467 | false | 4.302501 | false | false | false |
kusha/dialog | dialog/returns.py | 1 | 1993 | #!/usr/bin/env python3
"""
Return answers implementation.
"""
__author__ = "Mark Birger"
__date__ = "20 Jan 2015"
import multiprocessing
class Returns:
"""
Class manages routines.
"""
def __init__(self):
self.routines = []
self.processes = {}
def new_return(self, answers):
... | mit | -4,341,747,657,530,639,400 | 30.634921 | 95 | 0.539388 | false | 4.419069 | false | false | false |
INTI-CMNB-FPGA/fpga_helpers | fpgahelpers/fpga_prog.py | 1 | 2865 | #!/usr/bin/python
#
# FPGA Prog, transfers a BitStream to a device
# Copyright (C) 2015-2019 INTI
# Copyright (C) 2015-2019 Rodrigo A. Melo
#
# 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, eith... | gpl-3.0 | -7,260,991,947,493,755,000 | 37.2 | 120 | 0.611518 | false | 3.725618 | false | false | false |
bobcolner/pgrap | pgrap/pgrap.py | 1 | 2914 | import psycopg2
import os
_logger = logging.getLogger(__name__)
def query(conn, sql, results='namedtuple'):
"Issue SQL query that returns a result set."
return execute(conn, sql, results=results)
def execute(conn, sql, data=None, results=False):
"Issue a general SQL statment. Optinally specify results cur... | mit | 3,699,232,167,538,300,400 | 41.852941 | 93 | 0.635553 | false | 3.69797 | false | false | false |
manashmndl/bluebrain | src/python/examples/deprecated/xboxjoypad/xboxjoypad.py | 1 | 2251 | import time
import pygame
from time import sleep
from cannybots.radio import BLE
from cannybots.clients.joypad import SimpleJoypadClient
pygame.init()
def main():
xAxis=0
yAxis=0
lastUpdateTime = time.time()
joysticks = []
clock = pygame.time.Clock()
keepPlaying = True
ble = BLE()... | mit | -6,557,765,234,474,229,000 | 37.152542 | 102 | 0.569969 | false | 3.678105 | false | false | false |
taynaud/sparkit-learn | splearn/decomposition/tests/test_truncated_svd.py | 1 | 3718 | import numpy as np
import scipy.linalg as ln
from sklearn.decomposition import TruncatedSVD
from splearn.decomposition import SparkTruncatedSVD
from splearn.decomposition.truncated_svd import svd, svd_em
from splearn.utils.testing import (SplearnTestCase, assert_array_almost_equal,
as... | apache-2.0 | 795,953,697,992,878,100 | 36.18 | 78 | 0.562399 | false | 3.116513 | true | false | false |
parkouss/treeherder | treeherder/perf/models.py | 1 | 6070 | from django.core.validators import MinLengthValidator
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from jsonfield import JSONField
from treeherder.model.models import (MachinePlatform,
OptionCollection,
... | mpl-2.0 | 6,666,924,374,772,804,000 | 38.16129 | 122 | 0.642175 | false | 4.56391 | false | false | false |
ketanmukadam/StockData | stockdata/SDxls.py | 1 | 6832 | from openpyxl import load_workbook
from openpyxl import Workbook
from openpyxl.utils import column_index_from_string
from copy import copy
import re
key_map = {
'Cash and Equivalents':'Cash And Cash Equivalents',
'Accounts Receivable, Net':'Trade Receivables',
'Inventory':'Inventories'... | gpl-3.0 | -2,751,520,717,131,465,700 | 49.985075 | 255 | 0.578893 | false | 3.69497 | false | false | false |
jameshicks/pydigree | pydigree/io/genomesimla.py | 1 | 1171 | "Read GenomeSIMLA formatted chromosome templates"
import pydigree
from pydigree.io.smartopen import smartopen
def read_gs_chromosome_template(templatef):
"""
Reads a genomeSIMLA format chromosome template file
:param templatef: The filename of the template file
:type templatef: string
:rtyp... | apache-2.0 | 6,838,976,471,412,323,000 | 33.441176 | 74 | 0.617421 | false | 3.969492 | false | false | false |
VirusTotal/vt-py | examples/upload_files.py | 1 | 2284 | # Copyright © 2019 The vt-py 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 applicable l... | apache-2.0 | -5,028,977,853,249,549,000 | 30.273973 | 80 | 0.68813 | false | 3.682258 | false | false | false |
spudmind/undertheinfluence | scrapers/meetings/scrape_meetings.py | 1 | 6792 | # -*- coding: utf-8 -*-
import calendar
from datetime import datetime
import logging
import os.path
import re
import webbrowser
from utils import mongo, fuzzy_dates, unicode_csv
class ScrapeMeetings:
def __init__(self, **kwargs):
# fetch the logger
self._logger = logging.getLogger("spud")
... | mit | -2,568,683,875,341,646,000 | 38.719298 | 133 | 0.553592 | false | 3.958042 | false | false | false |
carljm/django-model-utils | tests/test_fields/test_urlsafe_token_field.py | 1 | 2105 | from unittest.mock import Mock
from django.db.models import NOT_PROVIDED
from django.test import TestCase
from model_utils.fields import UrlsafeTokenField
class UrlsaftTokenFieldTests(TestCase):
def test_editable_default(self):
field = UrlsafeTokenField()
self.assertFalse(field.editable)
de... | bsd-3-clause | -7,383,633,666,099,288,000 | 31.890625 | 63 | 0.671259 | false | 3.73227 | true | false | false |
olivierdalang/stdm | security/authorization.py | 1 | 3515 | """
/***************************************************************************
Name : Auhtorization Service
Description : Checks whether the logged in user has permissions to
access the particular content item
Date : 2/June/2013
copyright ... | gpl-2.0 | -3,874,758,017,087,749,600 | 34.257732 | 79 | 0.462304 | false | 5.466563 | false | false | false |
nolze/ms-offcrypto-tool | msoffcrypto/__init__.py | 1 | 2006 | import olefile
import zipfile
__version__ = "4.11.0"
def OfficeFile(file):
'''Return an office file object based on the format of given file.
Args:
file (:obj:`_io.BufferedReader`): Input file.
Returns:
BaseOfficeFile object.
Examples:
>>> with open("tests/inputs/example_p... | mit | 7,344,676,869,608,963,000 | 34.821429 | 112 | 0.665005 | false | 3.452668 | false | false | false |
CTSNE/NodeDefender | NodeDefender/db/node.py | 1 | 2543 | from NodeDefender.db.sql import SQL, GroupModel, NodeModel, LocationModel, UserModel
import NodeDefender
from geopy.geocoders import Nominatim
def get_sql(name):
return NodeModel.query.filter_by(name = name).first()
def update_sql(original_name, **kwargs):
node = get_sql(original_name)
if node is None:
... | mit | 5,579,770,979,561,890,000 | 24.178218 | 84 | 0.646087 | false | 3.427224 | false | false | false |
eshoyfer/dwc_network_server_emulator | master_server.py | 3 | 2304 | # DWC Network Server Emulator
# Copyright (C) 2014 polaris-
# Copyright (C) 2014 ToadKing
# Copyright (C) 2014 AdmiralCurtiss
# Copyright (C) 2014 msoucy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | agpl-3.0 | -4,606,263,240,929,476,000 | 36.770492 | 112 | 0.74566 | false | 4.006957 | false | false | false |
daniel-thompson/tintamp | tools/tube_transfer.py | 1 | 12222 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2009, 2010 Hermann Meyer, James Warden, Andreas Degert
# Copyright (C) 2011 Pete Shorthose
#
# 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 vers... | lgpl-2.1 | 6,777,996,124,714,815,000 | 36.490798 | 107 | 0.448208 | false | 2.926023 | false | false | false |
ipfs/py-ipfs-api | docs/publish.py | 2 | 1473 | #!/usr/bin/python3
import os
import sys
__dir__ = os.path.dirname(__file__)
sys.path.insert(0, os.path.join(__dir__, ".."))
import sphinx.cmd.build
import ipfshttpclient
# Ensure working directory is script directory
os.chdir(__dir__)
def main(argv=sys.argv[1:], program=sys.argv[0]):
if len(argv) != 1:
print("Usa... | mit | -3,829,902,737,229,777,400 | 29.625 | 96 | 0.663036 | false | 2.857977 | false | false | false |
autrimpo/rlite | tests/perftests.py | 2 | 5765 | #!/usr/bin/env python
#
# Author: Vincenzo Maffione <v.maffione@gmail.com>
#
import multiprocessing
import subprocess
import statistics
import argparse
import time
import re
import os
def has_outliers(tuples):
for t in range(len(tuples[0])):
avg = statistics.mean([x[t] for x in tuples])
stdev = ... | lgpl-2.1 | 422,188,228,162,067,700 | 31.570621 | 93 | 0.505117 | false | 3.468712 | true | false | false |
rsmoorthy/docker | tally/typekeys.py | 1 | 2917 | # Type keys and specify shift key up/down
import subprocess
import sys
import argparse
import time
import os
class TypeKeys:
def __init__(self, *args, **kwargs):
self.shift = False
self.name = 'Tally.ERP 9'
self.window = 0
if 'WID' in os.environ:
self.window = os.enviro... | mit | -6,232,246,684,279,853,000 | 34.573171 | 129 | 0.502571 | false | 3.399767 | false | false | false |
F5Networks/f5-common-python | f5/bigip/tm/sys/test/functional/test_hardware.py | 1 | 1360 | # Copyright 2018 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 | 7,374,813,908,562,533,000 | 35.756757 | 85 | 0.689706 | false | 3.597884 | false | false | false |
dwhickox/NCHS-Programming-1-Python-Programs | Chap 2/ch2-debug-a.py | 1 | 1245 | # This program computes the final value of an invested
# amount using the compound interest formula:
# amount = principle * (1 + rate / num) ** (num * term)
# Variables:
# amount ........... Final value of investment
# principle ........ Amount invested
# rate ............. Rate of interest as ... | mit | -3,296,714,930,589,738,500 | 31.648649 | 75 | 0.624096 | false | 3.392371 | false | true | false |
akkana/scripts | censusdata.py | 1 | 6357 | #!/usr/bin/env python3
# Download Census data files for the 2000 Decadal Summary File 1:
# https://www2.census.gov/census_2000/datasets/Summary_File_1/STATENAME
# If you look for documentation, you'll see pointers to the 730-page
# PDF sf1.pdf. Don't bother: it's completely wrong and must be for
# some earlier datase... | gpl-2.0 | -6,318,665,787,852,739,000 | 31.106061 | 78 | 0.575901 | false | 3.543478 | false | false | false |
lytex/multisplt | multisplt.py | 1 | 2762 | #!/usr/bin/python
# coding=UTF-8
import sys
import re
import os
import math
# Time formats
# mm:ss with mm > 59, mm > 99
# hh:mm:ss with mm <= 59, ss <= 59
# Arguments format
# 01 52nd Street Theme 00:11 02 A Night in Tunisia 05:03
# 03 All The Things You Are 08:07 04 Embraceable You 15:21
# 00:00:00 01 Serenade G... | gpl-3.0 | -3,314,878,754,560,369,000 | 23.22807 | 113 | 0.634685 | false | 2.673766 | false | false | false |
motech/perf | activemq-intercepter/client/stats.py | 1 | 1696 | from influxdb import client as influxdb
import json
from stompy.stomp import Stomp
import threading
import time
def listener():
# Connect to activemq and subscribe to the stats queue
stomp = Stomp("localhost")
stomp.connect()
stomp.subscribe({'destination':'/queue/stats', 'ack':'client'})
# Connec... | bsd-3-clause | -6,311,227,152,657,556,000 | 24.313433 | 76 | 0.510613 | false | 3.907834 | false | false | false |
lc525/cmake-project | docs/ext/breathe-1.0.0/breathe/directives.py | 1 | 36150 |
from docutils import nodes
from docutils.parsers.rst.directives import unchanged_required, unchanged, flag
import os
import sys
import copy
import fnmatch
import re
import textwrap
import collections
from docutils.parsers import rst
from docutils.statemachine import ViewList
from sphinx.domains.cpp import Definition... | bsd-2-clause | -5,710,829,884,436,303,000 | 33.527221 | 139 | 0.602379 | false | 4.328823 | false | false | false |
qqalexqq/monkeys | test/test_views.py | 1 | 8060 | from hamcrest import *
from models import Monkey as M
from test_models import create_monkeys
def test_view_monkey_list(client, session):
monkey_ginger, monkey_john, monkey_melissa = create_monkeys(session)
monkey_john.add_friend(monkey_melissa)
session.commit()
request = client.get('/')
assert... | mit | 575,900,874,263,612,540 | 28.962825 | 79 | 0.663151 | false | 3.34024 | true | false | false |
google-code-export/django-hotclub | libs/external_libs/gdata.py-1.0.13/src/gdata/docs/service.py | 10 | 10786 | #!/usr/bin/python
#
# Copyright (C) 2006 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | mit | 4,083,827,386,476,407,000 | 35.938356 | 79 | 0.683479 | false | 4.418681 | false | false | false |
ahealy19/F-IDE-2016 | benchexec/tools/cpachecker.py | 1 | 7896 | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
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
... | apache-2.0 | 7,328,689,529,093,601,000 | 41.451613 | 157 | 0.596631 | false | 4.435955 | false | false | false |
natea/django-lfc | lfc/utils/__init__.py | 1 | 8891 | # python imports
import datetime
import urllib
import sys
# django settings
from django.conf import settings
from django.contrib.auth import SESSION_KEY
from django.contrib.auth import BACKEND_SESSION_KEY
from django.contrib.auth import load_backend
from django.contrib.auth.models import AnonymousUser
from django.core... | bsd-3-clause | -1,566,837,927,116,174,600 | 29.556701 | 102 | 0.647734 | false | 3.967425 | false | false | false |
Juzley/typingdefense | typingdefense/menu.py | 1 | 3132 | import ctypes
import numpy
import OpenGL.GL as GL
class MenuItem(object):
pass
class TextButtonItem(MenuItem):
def __init__(self, x, y, h, text):
self.x, self.y, self.h = (x, y, h)
self.text = text
self.selected = False
def draw(self):
pass
class MenuScreen(object):
... | mit | 1,557,668,990,168,349,700 | 27.472727 | 78 | 0.523308 | false | 3.805589 | false | false | false |
phil0522/anote | anote-web/anoteweb/util/mjson.py | 1 | 3073 | """
Converts a model to and from json string.
"""
import google.appengine.ext.ndb as ndb
import json
import logging
from anoteweb.util.time_util import from_epoch, to_epoch
from datetime import datetime
def _json_to_model(model_class, json_obj):
"""json to model string."""
_result = {}
url_safe_key = None
for... | mit | -5,546,565,122,223,178,000 | 28.548077 | 78 | 0.653759 | false | 3.286631 | false | false | false |
peo3/cgroup-utils | setup.py | 1 | 1691 | #!/usr/bin/python
from setuptools import setup, Extension
from cgutils.version import VERSION
mod_linux = Extension('linux', sources=['cgutils/linux.c'])
classifiers = [
'Development Status :: 4 - Beta',
'Environment :: Console',
'Intended Audience :: System Administrators',
'License :: OSI Approved ... | gpl-2.0 | -8,136,616,997,294,508,000 | 32.156863 | 74 | 0.613838 | false | 4.055156 | false | false | false |
mrakitin/sirepo | sirepo/sim_data/flash.py | 1 | 1110 | # -*- coding: utf-8 -*-
u"""simulation data operations
:copyright: Copyright (c) 2019 RadiaSoft LLC. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
import sirepo.sim_data
class SimData(sirepo.sim_data.SimDataBase):
... | apache-2.0 | -3,410,153,178,655,896,600 | 29.833333 | 67 | 0.59009 | false | 3.284024 | false | false | false |
martinmoene/svn-churn | svn-churn.py | 1 | 5938 | #
# svn-churn.py - determine file churn and fix count for Subversion repository.
#
# Example: python svn-churn.py |sort -n -t , +2 | tail -n 50 |sort -r -n -t , +2
#
# Runs with Python 2.7, 3.3
#
# License: MIT, see accompanying LICENSE.txt
#
# ------------------------------------------------------------------------
#... | mit | 4,805,279,237,556,647,000 | 29.295918 | 103 | 0.518862 | false | 3.74401 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.