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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
guegue/forocacao | forocacao/users/views.py | 1 | 3882 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import base64
from PIL import Image, ImageDraw, ImageFont
from django.core.urlresolvers import reverse
from django.http import HttpResponse
from django.views.generic import DetailView, ListView, RedirectView, UpdateView
from braces.view... | bsd-3-clause | -8,969,089,653,582,079,000 | 34.290909 | 119 | 0.61154 | false | 4.16971 | false | false | false |
icgood/pymap | pymap/parsing/specials/options.py | 1 | 5476 |
from __future__ import annotations
import re
from collections.abc import Iterable, Mapping
from typing import Optional
from . import AString, SequenceSet
from .. import Params, Parseable
from ..exceptions import NotParseable
from ..primitives import Number, List
from ...bytes import BytesFormat, rev
__all__ = ['Ext... | mit | 3,286,872,938,212,346,000 | 29.422222 | 76 | 0.56355 | false | 3.976761 | false | false | false |
squirrelo/qiita | qiita_ware/dispatchable.py | 1 | 8731 | # -----------------------------------------------------------------------------
# Copyright (c) 2014--, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | bsd-3-clause | 4,269,830,663,802,809,300 | 28.59661 | 79 | 0.590654 | false | 4.171524 | false | false | false |
bepatient-fr/itools | itools/pkg/build_gulp.py | 1 | 4272 | # -*- coding: UTF-8 -*-
# Copyright (C) 2016 Sylvain Taverne <taverne.sylvain@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
# (at your option) ... | gpl-3.0 | 1,900,275,981,483,111,000 | 34.6 | 91 | 0.526919 | false | 4.111646 | false | false | false |
lnls-fac/sirius | pymodels/TS_V03_03/lattice.py | 1 | 10721 | """Lattice module.
In this module the lattice of the corresponding accelerator is defined.
"""
import math as _math
import numpy as _np
from pyaccel import lattice as _pyacc_lat, elements as _pyacc_ele, \
accelerator as _pyacc_acc, optics as _pyacc_opt
energy = 0.15e9 # [eV]
default_optics_mode = 'M1'
class ... | mit | -4,336,585,749,294,970,400 | 33.583871 | 78 | 0.544819 | false | 2.336239 | false | false | false |
toshka/torrt | torrt/notifiers/telegram.py | 1 | 1820 | import logging
import requests
from requests import RequestException
from torrt.base_notifier import BaseNotifier
from torrt.utils import NotifierClassesRegistry
LOGGER = logging.getLogger(__name__)
class TelegramNotifier(BaseNotifier):
"""Telegram bot notifier. See instructions how to create bot at https://cor... | bsd-3-clause | -1,036,498,508,307,981,600 | 34 | 105 | 0.593407 | false | 3.947939 | false | false | false |
alpine9000/amiga_examples | tools/external/amitools/amitools/fs/validate/DirScan.py | 1 | 6864 | from BlockScan import BlockScan
from amitools.fs.FSString import FSString
from amitools.fs.FileName import FileName
from amitools.fs.validate.Log import Log
import amitools.fs.DosType as DosType
class DirChainEntry:
"""entry of the hash chain"""
def __init__(self, blk_info):
self.blk_info = blk_info
self.p... | bsd-2-clause | -732,434,269,223,529,100 | 28.333333 | 147 | 0.60169 | false | 3.150069 | false | false | false |
oaubert/advene | setup.py | 1 | 6968 | #! /usr/bin/env python3
import logging
logger = logging.getLogger(__name__)
import os
from setuptools import setup, find_packages
import sys
# We define the main script name here (file in bin), since we have to change it for MacOS X
SCRIPTNAME='advene'
def check_changelog(maindir, version):
"""Check that the ch... | gpl-2.0 | 829,313,294,184,711,600 | 37.076503 | 159 | 0.65729 | false | 3.862528 | false | false | false |
willcassella/SinGE | Tools/SinGED/types.py | 1 | 12310 | # types.py
import bpy
from bpy.types import PropertyGroup
from bpy.props import BoolProperty, IntProperty, FloatProperty, StringProperty, PointerProperty, EnumProperty, FloatVectorProperty
from functools import partial
def get_unused_component_types(scene=None, context=None):
# Unused arguments
del scene, co... | mit | -3,868,031,757,075,581,000 | 39.89701 | 167 | 0.670106 | false | 3.507123 | false | false | false |
Seattle-Meal-Maps/seattle-meal-maps-api | meal_api/meal_api/urls.py | 1 | 1205 | """meal_api URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | mit | -6,016,341,527,609,289,000 | 32.472222 | 82 | 0.703734 | false | 3.37535 | false | false | false |
ZeitOnline/z3c.celery | src/z3c/celery/session.py | 1 | 1860 | import threading
import transaction
import zope.interface
import transaction.interfaces
class CelerySession(threading.local):
"""Thread local session of data to be sent to Celery."""
def __init__(self):
self.tasks = []
self._needs_to_join = True
def add_call(self, method, *args, **kw):
... | bsd-3-clause | -8,065,323,295,136,975,000 | 23.473684 | 74 | 0.601075 | false | 3.982869 | false | false | false |
bnoi/scikit-tracker | sktracker/tracker/cost_function/tests/test_abstract_cost_functions.py | 1 | 1500 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from nose.tools import assert_raises
import sys
import pandas as pd
import numpy as np
from sktracker.tracker.cost_function import AbstractCostF... | bsd-3-clause | 8,376,291,811,204,249,000 | 26.777778 | 75 | 0.64 | false | 3.440367 | true | false | false |
chubbymaggie/idalink | idalink/memory.py | 1 | 10682 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2013- Yan Shoshitaishvili aka. zardus
# Ruoyu Wang aka. fish
# Andrew Dutcher aka. rhelmot
# Kevin Borgolte aka. cao
#
# This program is free software; you can redistribute it and/or modify
# it un... | gpl-3.0 | -4,595,868,428,126,769,700 | 30.791667 | 80 | 0.586407 | false | 3.812277 | false | false | false |
sdpp/python-keystoneclient | keystoneclient/tests/unit/v2_0/test_service_catalog.py | 1 | 9165 | # 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,503,097,674,112,767,500 | 43.926471 | 79 | 0.602728 | false | 3.950431 | true | false | false |
jantman/biweeklybudget | biweeklybudget/interest.py | 1 | 37651 | """
The latest version of this package is available at:
<http://github.com/jantman/biweeklybudget>
################################################################################
Copyright 2016 Jason Antman <jason@jasonantman.com> <http://www.jasonantman.com>
This file is part of biweeklybudget, also known as bi... | agpl-3.0 | -4,902,928,390,450,669,000 | 34.319887 | 80 | 0.587235 | false | 4.281929 | false | false | false |
rouge8/20questions | admin.py | 1 | 2796 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
'''
admin.py
Andy Freeland and Dan Levy
5 June 2010
Provides administrative functions, such as retraining characters and deleting
objects and characters. Accessed at the /admin url. Laughably insecure.
'''
import web
import config, model
imp... | mit | 3,521,186,683,873,155,000 | 31.511628 | 110 | 0.609084 | false | 4.111765 | false | false | false |
gunny26/webstorage | bin/filename_to_checksum_dict.py | 1 | 6212 | #!/usr/bin/python3
# pylint: disable=line-too-long
# disable=locally-disabled, multiple-statements, fixme, line-too-long
"""
command line program to create/restore/test WebStorageArchives
"""
import os
import hashlib
import datetime
import dateutil.parser
import time
import sys
import socket
import argparse
import stat... | gpl-2.0 | 6,207,287,639,097,450,000 | 40.139073 | 114 | 0.61027 | false | 3.715311 | false | false | false |
ionux/bitforge | bitforge/utils/encoding.py | 1 | 10832 | # -*- coding: utf-8 -*-
"""
Various utilities useful for converting one Bitcoin format to another, including some
the human-transcribable format hashed_base58.
The MIT License (MIT)
Copyright (c) 2013 by Richard Kiss
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and a... | mit | -1,994,404,400,331,621,600 | 34.631579 | 108 | 0.681961 | false | 3.545663 | false | false | false |
DedMemez/ODS-August-2017 | dna/DNAVisGroup.py | 1 | 2344 | # Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.dna.DNAVisGroup
from panda3d.core import LVector3, LVector3f
import DNAGroup
import DNABattleCell
import DNAUtil
class DNAVisGroup(DNAGroup.DNAGroup):
COMPONENT_CODE = 2
def __init__(self, name):
DNAGroup.DNAGroup.__init__(s... | apache-2.0 | 3,608,324,131,246,925,300 | 26.962963 | 85 | 0.611348 | false | 3.397101 | false | false | false |
CopyChat/Plotting | Python/PythonNetCDF.py | 1 | 10821 | '''
NAME
NetCDF with Python
PURPOSE
To demonstrate how to read and write data with NetCDF files using
a NetCDF file from the NCEP/NCAR Reanalysis.
Plotting using Matplotlib and Basemap is also shown.
PROGRAMMER(S)
Chris Slocum
REVISION HISTORY
20140320 -- Initial version created and posted onlin... | gpl-3.0 | 2,362,746,802,840,747,500 | 42.633065 | 81 | 0.641253 | false | 3.204323 | false | false | false |
tek/amino | amino/tree.py | 1 | 14049 | import abc
from typing import Callable, TypeVar, Generic, Union, cast, Any
from amino.logging import Logging
from amino import LazyList, Boolean, __, _, Either, Right, Maybe, Left, L, Map, curried
from amino.boolean import false, true
from amino.tc.base import Implicits
from amino.tc.flat_map import FlatMap
from amino... | mit | -5,395,947,376,289,710,000 | 25.76 | 110 | 0.55947 | false | 3.380414 | false | false | false |
KyleJamesWalker/ansible-modules-core | cloud/amazon/ec2_asg.py | 1 | 34388 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distributed... | gpl-3.0 | -6,694,148,389,157,273,000 | 40.331731 | 232 | 0.645022 | false | 3.857319 | true | false | false |
sireliah/poniat | menu.py | 1 | 2882 | #-*- coding: utf-8 -*-
import sys
import pygame
from pygame.locals import *
from utils import *
from initial import LoadMenuTextures
class MainMenu(LoadMenuTextures):
def __init__(self, modes, win_w, win_h):
self.showmain = True
self.submenu = False
self.click = False
self.mod... | gpl-3.0 | 1,126,106,222,080,723,800 | 27.514851 | 83 | 0.498958 | false | 3.829787 | false | false | false |
FeodorM/some_code | some_nice_python_things/weather.py | 1 | 2096 | #! /usr/bin/env python3
import pyowm
import datetime
owm = pyowm.OWM('2642ecf7132b8918b8f073910006483c', language='ru')
now = pyowm.timeutils.now().date()
tomorrow = pyowm.timeutils.tomorrow().date()
def to_human_time(unix):
return datetime.datetime.fromtimestamp(unix)
def weather_date(weather):
return t... | mit | 2,245,925,329,467,947,500 | 23.797619 | 84 | 0.572732 | false | 3.194785 | false | false | false |
jeremiedecock/snippets | python/tkinter/python3/cairo_with_pil.py | 1 | 3643 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org)
# 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 witho... | mit | 2,852,471,698,596,769,000 | 34.676471 | 110 | 0.732344 | false | 3.332418 | false | false | false |
ostinelli/pyopenspime | lib/dns/rdataset.py | 1 | 11607 | # Copyright (C) 2001-2007 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND ... | gpl-3.0 | 7,146,983,658,648,308,000 | 34.279635 | 78 | 0.591023 | false | 4.012098 | false | false | false |
killbill/killbill-client-python | killbill/api/account_api.py | 1 | 210059 | # coding: utf-8
#
# Copyright 2010-2014 Ning, Inc.
# Copyright 2014-2020 Groupon, Inc
# Copyright 2020-2021 Equinix, Inc
# Copyright 2014-2021 The Billing Project, LLC
#
# The Billing Project, LLC licenses this file to you under the Apache License, version 2.0
# (the "License"); you may not use this file except in com... | apache-2.0 | 8,223,314,462,339,926,000 | 42.553597 | 207 | 0.58277 | false | 4.037577 | false | false | false |
nmarley/dash | contrib/zmq/zmq_sub.py | 1 | 5988 | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
ZMQ example using python3's asyncio
Dash should be started with the command line arguments:
... | mit | 356,747,117,795,739,300 | 43.686567 | 107 | 0.629092 | false | 3.532743 | false | false | false |
mpoullet/audio-tools | KissFFT/kiss_fft130/test/testkiss.py | 1 | 3565 | #!/usr/bin/env python
import math
import sys
import os
import random
import struct
import popen2
import getopt
import numpy
pi=math.pi
e=math.e
j=complex(0,1)
doreal=0
datatype = os.environ.get('DATATYPE','float')
util = '../tools/fft_' + datatype
minsnr=90
if datatype == 'double':
fmt='d'
elif datatype=='int1... | mit | -8,352,119,809,851,959,000 | 21.006173 | 72 | 0.555961 | false | 2.861156 | true | false | false |
chrissorchard/malucrawl | malware_crawl/tasks.py | 1 | 2599 | from celery import task, chord
from .scan import scanners, heavy_scanners
from .search import search_engines
from .source import sources
from datetime import datetime
from dateutil.tz import tzutc
from models import TopicSet
# validator = jsonschema.Draft3Validator(json.loads(pkgutil.get_data("malware_cr... | mit | -8,517,734,512,202,998,000 | 22.518868 | 120 | 0.560215 | false | 4.086478 | false | false | false |
atvKumar/TheWatcher | mkEmail.py | 1 | 5302 | from smtplib import SMTP, SMTP_SSL
from smtplib import SMTPException
from mimetypes import guess_type
from os.path import basename
from email.utils import COMMASPACE
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email.encoders import encode... | apache-2.0 | -3,787,192,903,398,085,000 | 35.068027 | 77 | 0.557714 | false | 4.184688 | false | false | false |
thinkle/gourmet | gourmet/plugins/duplicate_finder/recipeMerger.py | 1 | 25533 | """recipeMerger.py
This module contains code for handling the 'merging' of duplicate
recipes.
"""
import os.path
import time
from typing import Union
from gettext import gettext as _
from gi.repository import Gtk, Pango
from gourmet import convert, gglobals, recipeIdentifier, recipeManager
from gourmet.gtk_extras im... | gpl-2.0 | 6,182,747,767,306,343,000 | 39.464342 | 180 | 0.567932 | false | 3.686011 | true | false | false |
JoseBlanca/seq_crumbs | test/seq/test_seqio.py | 1 | 10372 | # Copyright 2012 Jose Blanca, Peio Ziarsolo, COMAV-Univ. Politecnica Valencia
# This file is part of seq_crumbs.
# seq_crumbs 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, ... | gpl-3.0 | -4,225,053,976,801,928,000 | 38.139623 | 78 | 0.58253 | false | 3.237203 | true | false | false |
ishanatmuz/HangmanMinimalist | hangman.py | 1 | 4431 | import random
import string
import os
import platform
# Defining the text file containing the list of words
WORDLIST_FILENAME = "words.txt"
MAX_GUESSES = 8
def loadWords():
# Returns a list of valid words. Words are taken from the file words.txt
print "Loading word list from file..."
# Open file for ... | mit | 7,097,529,540,876,522,000 | 36.880342 | 118 | 0.61995 | false | 4.314508 | false | false | false |
mirestrepo/voxels-at-lems | registration_eval/results/compute_trans_geo_accuracy.py | 1 | 13935 | #!/usr/bin/env python
# encoding: utf-8
"""
compute_transformation_error.py
Created by Maria Isabel Restrepo on 2012-09-24.
Copyright (c) 2012 . All rights reserved.
This script computes the distances betweeen an estimated similarity transformation and its ground truth
The transformation is used to transform a "source... | bsd-2-clause | 5,998,700,725,163,091,000 | 37.924581 | 150 | 0.568497 | false | 3.043241 | false | false | false |
denizs/torchUp | torchup/logging/logger.py | 1 | 1865 | import tensorflow as tf
import numpy as np
import scipy.misc
from tensorboardX.src.summary_pb2 import Summary
from tensorboardX import SummaryWriter
try:
from StringIO import StringIO
except ImportError:
from io import BytesIO
class Logger(object):
def __init__(self, log_dir):
'''
Create... | bsd-2-clause | -5,471,846,208,124,120,000 | 28.140625 | 83 | 0.604826 | false | 3.813906 | false | false | false |
HXLStandard/libhxl-python | hxl/model.py | 1 | 48776 | """Main data-model classes for the Humanitarian Exchange Language (HXL).
This module defines the basic classes for working with HXL data. Other
modules have classes derived from these (e.g. in
[hxl.filters](filters.html) or [hxl.io](io.html)). The core class is
[Dataset](#hxl.model.Dataset), which defines the operatio... | unlicense | -8,416,026,671,488,264,000 | 38.114675 | 143 | 0.603247 | false | 4.380029 | false | false | false |
KDD-OpenSource/geox-young-academy | day-3/Kalman-filter_Mark.py | 1 | 1494 | # -*- coding: utf-8 -*-
"""
Created on Wed Oct 11 10:10:24 2017
@author: Mark
"""
import numpy as np
import matplotlib.pyplot as plt
#Define functions
def model(state_0,A,B):
state_1 = A*state_0 + np.random.normal(0,B)
return state_1
state_null=np.random.normal(0,0.4)
def observation_functi... | mit | 167,307,088,535,886,000 | 21.34375 | 76 | 0.613788 | false | 2.270517 | false | false | false |
Brazelton-Lab/lab_scripts | edit-esom-class-file.py | 1 | 1891 | #! /usr/bin/env python
"""
edit user-provided ESOM class file with new assignments in user-provided file
each line of user-provided file of new assignments should contain a data point number and a class number, separated by tabs
usage:
python edit-esom-class-file.py esom.cls new-assignments.tsv new-class-filename.cl... | gpl-2.0 | -7,825,894,047,534,338,000 | 31.603448 | 131 | 0.710206 | false | 3.501852 | false | false | false |
xhqu1981/custodian | custodian/qchem/handlers.py | 1 | 25246 | # coding: utf-8
from __future__ import unicode_literals, division
import shutil
import time
"""
This module implements error handlers for QChem runs. Currently tested only
for B3LYP DFT jobs.
"""
import copy
import glob
import json
import logging
import os
import re
import tarfile
from pymatgen.core.structure impor... | mit | -107,415,132,109,779,500 | 44.735507 | 90 | 0.528202 | false | 3.812443 | false | false | false |
sergeneren/anima | anima/env/mayaEnv/plugins/closestPointOnCurve.py | 1 | 8872 | # -*- coding: utf-8 -*-
# Copyright (c) 2012-2015, Anima Istanbul
#
# This module is part of anima-tools and is released under the BSD 2
# License: http://www.opensource.org/licenses/BSD-2-Clause
import sys
import maya.OpenMaya as OpenMaya
import maya.OpenMayaMPx as OpenMayaMPx
kPluginNodeTypeName = "spClosestPointO... | bsd-2-clause | -1,998,576,980,713,366,500 | 32.228464 | 93 | 0.679554 | false | 3.486051 | false | false | false |
appknox/vendor | ak_vendor/report_sample.py | 1 | 1164 | import json
from os.path import dirname, abspath
from django import template
from django.conf import settings
from django.template import Template, Context
from django.template.engine import Engine
from django.core.wsgi import get_wsgi_application
from ak_vendor.report import Report
settings.configure()
application = ... | mit | 2,017,626,688,635,430,700 | 28.1 | 75 | 0.664089 | false | 3.742765 | false | false | false |
pajlada/pajbot | pajbot/modules/chat_alerts/cheeralert.py | 1 | 12111 | import logging
import math
from pajbot.managers.handler import HandlerManager
from pajbot.modules import BaseModule
from pajbot.modules import ModuleSetting
from pajbot.modules.chat_alerts import ChatAlertModule
log = logging.getLogger(__name__)
class CheerAlertModule(BaseModule):
ID = __name__.split(".")[-1]
... | mit | -5,770,239,708,818,410,000 | 43.690037 | 219 | 0.546033 | false | 4.222803 | false | false | false |
artemharutyunyan/copilot | src/copilot-dashboard/copilot_dashboard/dashboard/views.py | 1 | 3545 | import httplib2
import datetime
from urllib import urlencode
from random import random
from django.http import HttpRequest, HttpResponse
from django.core.serializers.json import DjangoJSONEncoder
from django.utils import simplejson
from django.conf import settings
import bson.json_util
from bson.objectid import Object... | bsd-3-clause | 345,892,791,650,336,500 | 25.856061 | 108 | 0.667137 | false | 3.643371 | false | false | false |
petr-devaikin/dancee | helpers/extractor.py | 1 | 5790 | # Cut the experiment session in small fragments
# Input: ../bin/data/records/{session}/body.csv and skeletok.csv
# Output: fragments/{fragment_number}.json and fragments/log.csv
import os
import numpy
import json
DELAY = 15
LENGTH = 30
OVERLAP = 0.719999
FREQUENCY = 60
MARGIN = 5
FREQUENCY = 60
CUTOFF_FREQUENCY = 1... | gpl-3.0 | -8,201,075,262,819,803,000 | 25.199095 | 141 | 0.580656 | false | 2.549538 | false | false | false |
quantumgraph/qgprofiler | qgprofiler/qg_profile_aggregator.py | 1 | 4240 | from node import Node, NodeList
from .qg_profiler import QGProfiler
from .helper import get_real_file_path, get_file_type, xml_scanner, read_attributes_from_xml, merge_attributes
import glob
import json
class QGProfileAggregator(object):
def __init__(self, in_file_path, out_file_path):
self.root_node = Nod... | mit | 7,139,093,304,680,659,000 | 43.631579 | 129 | 0.556132 | false | 3.617747 | false | false | false |
macmanes-lab/MCBS913 | code/Junhong Chen/generateProtineSeq.py | 1 | 4902 | """
Author: Junhong Chen
"""
from Bio.Alphabet import IUPAC
from Bio.Seq import Seq
from Bio import SeqIO
from sys import argv
import os
path = argv[1]
class CDS:
def __init__(self,gff):
self.data = dict()
self.fname = gff
def parse(self):
file = open(sel... | mit | -7,779,518,581,467,217,000 | 20.5 | 90 | 0.467768 | false | 3.617712 | false | false | false |
openre/openre | openre/agent/domain/__init__.py | 1 | 1623 | # -*- coding: utf-8 -*-
"""
Домен. Создает один процесс для одного домена openre. Получает и передает
спайки (pub), получает команды от сервера (req-rep) и пересылает результат
выполнения команды.
"""
from openre.agent.decorators import daemonize
from openre.agent.helpers import daemon_stop
import logging
import signal... | mit | -6,384,374,142,818,930,000 | 24.413793 | 74 | 0.580054 | false | 3.096639 | false | false | false |
ttm/pingosom | pingosom2.py | 1 | 50613 | #-*- coding: utf-8 -*-
import numpy as n, random, os, sys, time
from scipy.io import wavfile as w
tfoo=time.time()
H=n.hstack
V=n.vstack
f_a = 44100. # Hz, frequência de amostragem
############## 2.2.1 Tabela de busca (LUT)
Lambda_tilde=Lt=1024.*16
# Senoide
fooXY=n.linspace(0,2*n.pi,Lt,endpoint=False)
S_i=n.sin(foo... | unlicense | 4,547,374,845,288,080,000 | 45.390826 | 216 | 0.425859 | false | 1.993063 | false | false | false |
AkihikoITOH/capybara | capybara/capybara.py | 1 | 1091 | #!/bin/python
# -*- coding: utf-8 -*-
import os
from amazon_wrapper import AmazonWrapper
from rakuten_wrapper import RakutenWrapper
class Capybara:
def __init__(self, config_dir=None, tokens_dir=None):
self.wrappers = {}
self.wrappers['amazon'] = AmazonWrapper()
self.wrappers['rakuten'] = ... | mit | -303,462,010,463,526,900 | 33.09375 | 98 | 0.613199 | false | 3.855124 | true | false | false |
eoinof/stem | test/unit/exit_policy/rule.py | 1 | 10901 | """
Unit tests for the stem.exit_policy.ExitPolicyRule class.
"""
import unittest
from stem.exit_policy import AddressType, ExitPolicyRule
class TestExitPolicyRule(unittest.TestCase):
def test_accept_or_reject(self):
self.assertTrue(ExitPolicyRule("accept *:*").is_accept)
self.assertFalse(ExitPolicyRule("r... | lgpl-3.0 | 8,623,108,772,148,325,000 | 32.336391 | 86 | 0.566278 | false | 2.887682 | true | false | false |
mskwark/PconsC3 | extra/arne/MSA/find-intradom.py | 1 | 1381 | #!/usr/bin/env perl
# Find all contacts beween domains..
import sys, os, re, string
import argparse
from os.path import expanduser
home = expanduser("~")
sys.path.append(home + '/bioinfo-toolbox/parsing')
sys.path.append(home + '/git/bioinfo-toolbox/parsing')
import parse_contacts
import numpy as np
import matplotl... | gpl-2.0 | -7,908,435,588,187,494,000 | 26.078431 | 81 | 0.631427 | false | 3.204176 | false | false | false |
soroushmehr/sampleRNN_ICLR2017 | models/three_tier/three_tier.py | 1 | 35718 | """
RNN Audio Generation Model
Three-tier model, Quantized input
For more info:
$ python three_tier.py -h
How-to-run example:
sampleRNN$ pwd
/u/mehris/sampleRNN
sampleRNN$ \
THEANO_FLAGS=mode=FAST_RUN,device=gpu,floatX=float32 python -u \
models/three_tier/three_tier.py --exp AXIS1 --seq_len 512 --big_frame_size 8 ... | mit | -2,786,688,481,508,566,500 | 37.406452 | 148 | 0.59379 | false | 3.416029 | true | false | false |
RosesTheN00b/BudgetButlerWeb | butler_offline/views/einzelbuchungen/uebersicht_monat.py | 1 | 8451 | from butler_offline.viewcore.state import persisted_state
from butler_offline.core import time
from butler_offline.viewcore import request_handler
from butler_offline.viewcore import viewcore
from butler_offline.core.report import ReportGenerator
from butler_offline.viewcore.converter import datum_to_string
def _hand... | agpl-3.0 | -3,474,251,232,784,731,600 | 41.437186 | 108 | 0.665483 | false | 2.730359 | false | false | false |
schmodd/forecast.py | forecast.py | 1 | 4251 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# todo: add alerts, colors
import requests
import json
import datetime
import argparse
import sys
from prettytable import PrettyTable
# surf to https://developer.forecast.io/ for an api key
# use http://dbsgeo.com/latlon/ to get coordinates for your location
API_KEY=''
L... | mit | -898,684,992,294,098,300 | 40.676471 | 117 | 0.605034 | false | 3.352524 | false | false | false |
repotvsupertuga/tvsupertuga.repository | script.module.python.koding.aio/lib/koding/tutorials.py | 1 | 7420 | # -*- coding: utf-8 -*-
# script.module.python.koding.aio
# Python Koding AIO (c) by TOTALREVOLUTION LTD (support@trmc.freshdesk.com)
# Python Koding AIO is licensed under a
# Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.
# You should have received a copy of the license along w... | gpl-2.0 | -4,688,523,344,214,192,000 | 42.893491 | 216 | 0.588434 | false | 3.776986 | false | false | false |
juliushaertl/i3pystatus | i3pystatus/updates/__init__.py | 1 | 3829 | import threading
from i3pystatus import SettingsBase, Module, formatp
from i3pystatus.core.util import internet, require
class Backend(SettingsBase):
settings = ()
updates = 0
class Updates(Module):
"""
Generic update checker.
To use select appropriate backend(s) for your system.
For list o... | mit | 3,242,534,360,093,105,000 | 30.628099 | 107 | 0.597857 | false | 4.348864 | false | false | false |
git-pedro-77/PROYECTOFINALPYTHON | proyectoITSAE/ec/edu/itsae/dao/ventaDao.py | 1 | 2654 | # coding:utf-8
'''
Created on 27/1/2015
@author: Programacion
'''
from ec.edu.itsae.conn import DBcon
#from flask import redirect, url_for
import json
class VentaDao(DBcon.DBcon):#heredando
'''
classdocs
'''
def __init__(self):
'''
Constructor
'''
... | gpl-2.0 | -8,052,328,900,098,061,000 | 32.051282 | 187 | 0.558779 | false | 3.451235 | false | false | false |
erfannoury/capgen-lasagne | another no-ft-ln-hs-largelr.py | 1 | 13876 | from __future__ import division, print_function
import logging
import numpy as np
import scipy as sc
import skimage
from skimage import transform
import theano
import theano.tensor as T
import lasagne
import sys
import cPickle as pickle
from datetime import datetime
from collections import OrderedDict
from mscoco_threa... | mit | 2,184,633,508,584,648,400 | 55.868852 | 179 | 0.652061 | false | 3.374514 | false | false | false |
goulu/Goulib | Goulib/plot.py | 1 | 4898 | """
plotable rich object display on IPython/Jupyter notebooks
"""
__author__ = "Philippe Guglielmetti"
__copyright__ = "Copyright 2015, Philippe Guglielmetti"
__credits__ = []
__license__ = "LGPL"
# import matplotlib and set backend once for all
from . import itertools2
import os
import io
import sys
i... | lgpl-3.0 | 139,288,707,879,006,940 | 29.6 | 161 | 0.611066 | false | 3.799845 | false | false | false |
nuxeh/morph | morphlib/plugins/deploy_plugin.py | 1 | 29928 | # Copyright (C) 2013-2015 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but... | gpl-2.0 | -7,916,551,351,011,835,000 | 42.882698 | 79 | 0.57351 | false | 4.669683 | true | false | false |
pravsripad/jumeg | examples/connectivity/plot_grouped_connectivity_circle.py | 2 | 1374 | #!/usr/bin/env python
'''
Example showing how to read grouped aparc labels from yaml file and plot
grouped connectivity circle with these labels.
Author: Praveen Sripad <pravsripad@gmail.com>
'''
import numpy as np
from jumeg import get_jumeg_path
from jumeg.connectivity import plot_grouped_connectivity_circle
impor... | bsd-3-clause | -3,088,841,760,635,333,600 | 35.157895 | 80 | 0.624454 | false | 3.202797 | false | false | false |
buckets1337/UOMUMM | src/Renderer.py | 1 | 5959 | # Renderer.py
# Various ways to format text output to players
class Renderer():
'''
A renderer component just contains methods for formatting text output in various ways
'''
def __init__(self, server):
self.owner = server
def formatMessage(self, message, width):
'''
splits a <message> string into lines th... | apache-2.0 | -8,190,471,305,137,985,000 | 28.8 | 161 | 0.52492 | false | 2.802916 | false | false | false |
tdlong/YeastRobot | UserPrograms/ASE/Rearray_day3_pilot_1.py | 1 | 1439 | import sys
# where RobotControl.py, etc lives
sys.path.append('/home/pi/Desktop/ADL/YeastRobot/PythonLibrary')
from RobotControl import *
#################################
### Define Deck Layout
#################################
deck="""\
DW96W SW96P SW96P SW96P SW96P SW96P SW96P BLANK
BLANK BLANK BLANK B... | gpl-3.0 | -2,579,611,862,031,048,700 | 27.215686 | 84 | 0.603892 | false | 2.699812 | false | false | false |
cchristelis/watchkeeper | django_project/healthsites/utils.py | 1 | 1525 | __author__ = 'Irwan Fathurrahman <irwan@kartoza.com>'
__date__ = '25/04/16'
__license__ = "GPL"
__copyright__ = 'kartoza.com'
import os
import json
from django.conf import settings
from django.core.serializers.json import DjangoJSONEncoder
from healthsites.map_clustering import cluster, parse_bbox
from healthsites.mod... | bsd-2-clause | -7,391,638,456,330,655,000 | 34.465116 | 84 | 0.64 | false | 3.84131 | false | false | false |
kmerenkov/clitter | setup.py | 1 | 1981 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2008, Konstantin Merenkov <kmerenkov@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source cod... | bsd-3-clause | 7,848,016,887,700,294,000 | 52.540541 | 91 | 0.745583 | false | 4.084536 | false | false | false |
Debian/dak | daklib/termcolor.py | 1 | 1725 | # vim:set et sw=4:
"""
TermColor utils for dak
@contact: Debian FTP Master <ftpmaster@debian.org>
@copyright: 2019 Mo Zhou <lumin@debian.org>
@license: GNU General Public License version 2 or later
"""
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Publi... | gpl-2.0 | -1,461,835,152,391,277,600 | 36.5 | 79 | 0.624928 | false | 3.938356 | false | false | false |
alissonpintor/stoky | app/basemodel.py | 1 | 1966 | from flask_sqlalchemy import Model
from sqlalchemy import exc as core_exc
from sqlalchemy.orm import exc
class Result(object):
"""
Classe que recebe o resultado
"""
def __init__(self, status, message):
self.status = status
self.message = message
class BaseModel(Model):
"""
... | gpl-3.0 | -4,292,930,550,900,183,600 | 24.842105 | 96 | 0.545593 | false | 4.248918 | false | false | false |
brigittebigi/proceed | proceed/src/wxgui/sp_icons.py | 1 | 2562 | import os.path
from sp_glob import ICONS_PATH
# Frames
APP_ICON = os.path.join(ICONS_PATH, "app.ico")
APP_CHECK_ICON = os.path.join(ICONS_PATH, "appcheck.ico")
APP_EXPORT_PDF_ICON = os.path.join(ICONS_PATH, "appexport-pdf.ico")
# For the toolbar of the main frame
EXIT_ICON = os.path.join(IC... | gpl-3.0 | 8,382,389,665,049,526,000 | 46.444444 | 67 | 0.639344 | false | 2.660436 | false | false | false |
bdang2012/taiga-back-casting | taiga/external_apps/serializers.py | 1 | 2126 | # Copyright (C) 2014-2015 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014-2015 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2015 David Barragán <bameda@dbarragan.com>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | agpl-3.0 | -6,451,691,023,716,321,000 | 36.928571 | 83 | 0.733992 | false | 3.827027 | false | false | false |
9wfox/mvc | utility.py | 1 | 6713 | # -*- coding:utf-8 -*-
"""
工具
历史:
2011-08-03 + 重构 get_pys_members。
2011-08-15 * 修改 con_mongo_object,支持 objectid。
2011-08-20 + 增加 template_path, static_path。
2011-08-25 * 将参数检查函数从 loigc 转移过来。
2011-08-27 * 重构 get_pys_members,改名 get_members。
"""
from dat... | mit | 6,438,945,186,189,151,000 | 24.227273 | 142 | 0.507799 | false | 3.233316 | false | false | false |
leanix/leanix-sdk-python | src/leanix/DocumentsApi.py | 1 | 11645 | #!/usr/bin/env python
"""
The MIT License (MIT)
Copyright (c) 2017 LeanIX GmbH
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,... | mit | -3,196,921,589,828,660,000 | 30.136364 | 162 | 0.575784 | false | 4.722222 | false | false | false |
mvaled/sentry | src/sentry/south_migrations/0480_incidentactivity.py | 1 | 136910 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
# Flag to indicate if this migration is too risky
# to run online and needs to be coordinated for offline
... | bsd-3-clause | 6,805,013,253,530,824,000 | 94.341226 | 234 | 0.580177 | false | 3.845138 | false | false | false |
AlphaSmartDog/DeepLearningNotes | Note-6 A3CNet/Note-6.4 HS300指数增强/agent/agent.py | 1 | 6362 | import numpy as np
import tensorflow as tf
from agent.forward import ActorCriticNet
from params import *
def batch_choice(a, p):
action_list = [np.random.choice(a, p=i) for i in p]
return np.array(action_list)
# local network for advantage actor-critic which are also know as A2C
class Agent(object):
def... | mit | -5,111,055,656,513,035,000 | 37.095808 | 83 | 0.568375 | false | 3.709621 | false | false | false |
saghul/shline | segments/hg.py | 1 | 1578 |
def add_hg_segment():
import os
import subprocess
env = {"LANG": "C", "HOME": os.getenv("HOME")}
def get_hg_status():
has_modified_files = False
has_untracked_files = False
has_missing_files = False
try:
output = subprocess.check_output(['hg', 'status'], e... | mit | -5,181,100,140,301,123,000 | 29.346154 | 80 | 0.529151 | false | 3.954887 | false | false | false |
tpflueger/CSCI4900 | scripts/main.py | 1 | 1140 | # SPDX-License-Identifier: MIT
'''Usage:
{0} scan (FILE)
{0} dependencies (JARNAME)
{0} (--help | --version)
Arguments:
scan Scan pom file for dependencies
dependencies Show dependency tree for jarFile
'''
import shutil
import sys
import os
from dependency_reader import DependencyReader
from doco... | mit | -7,091,659,358,233,557,000 | 27.5 | 63 | 0.670175 | false | 4.05694 | false | false | false |
NoBodyCam/TftpPxeBootBareMetal | nova/api/openstack/compute/contrib/floating_ip_dns.py | 1 | 10842 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Andrew Bogott for the Wikimedia Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache... | apache-2.0 | 3,639,136,114,536,705,000 | 34.547541 | 78 | 0.590481 | false | 4.19582 | false | false | false |
tensorflow/datasets | tensorflow_datasets/structured/movielens.py | 1 | 17907 | # coding=utf-8
# Copyright 2021 The TensorFlow Datasets Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | apache-2.0 | 1,772,383,642,943,722,500 | 37.592672 | 80 | 0.612833 | false | 3.964357 | true | false | false |
brianwc/juriscraper | opinions/united_states/state/cal.py | 1 | 1498 | from juriscraper.OpinionSite import OpinionSite
import re
import time
from datetime import date
class Site(OpinionSite):
def __init__(self):
super(Site, self).__init__()
self.url = 'http://www.courtinfo.ca.gov/cgi-bin/opinions-blank.cgi?Courts=S'
self.court_id = self.__module__
def _g... | bsd-2-clause | 7,258,131,139,515,015,000 | 34.666667 | 91 | 0.548732 | false | 3.314159 | false | false | false |
openstack/horizon | openstack_dashboard/dashboards/project/volumes/tests.py | 1 | 96001 | # Copyright 2012 Nebula, 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 agree... | apache-2.0 | 5,897,069,910,118,493,000 | 44.455019 | 79 | 0.577588 | false | 4.073708 | true | false | false |
efimlosev/corpcolo | noc-ps/add_server.py | 1 | 2912 | from json_p_n import sendRecieve
import pexpect,argparse
from sys import path
import subprocess
path.append('/home/efim/Dropbox')
from ipcalc_flask import calculateSubnet as calc
def Main():
parser = argparse.ArgumentParser()
parser.add_argument('subnet', help='Give me a subnet', type=str) #optinal argument
... | gpl-2.0 | -1,418,926,991,163,073,500 | 40.6 | 127 | 0.650755 | false | 3.228381 | false | false | false |
Dylan-halls/Network-Exploitation-Toolkit | PacketBlocker/ARP_UDP.py | 1 | 2931 | import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
import threading
from termcolor import colored
os.system("clear")
print("""
____ ___________ __________
| | \______ ______ )
| | /| | \| ___)
... | mit | -8,585,580,230,848,259,000 | 26.92381 | 118 | 0.493347 | false | 3.293258 | false | false | false |
rgayon/plaso | plaso/parsers/czip.py | 1 | 2615 | # -*- coding: utf-8 -*-
"""This file contains a parser for compound ZIP files."""
from __future__ import unicode_literals
import struct
import zipfile
from plaso.lib import errors
from plaso.parsers import interface
from plaso.parsers import logger
from plaso.parsers import manager
class CompoundZIPParser(interfac... | apache-2.0 | 3,504,794,705,852,098,000 | 33.407895 | 80 | 0.690631 | false | 3.926426 | false | false | false |
DolphinDream/sverchok | nodes/generators_extended/spiral_mk2.py | 1 | 22191 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | gpl-3.0 | -9,002,781,532,965,027,000 | 32.879389 | 111 | 0.567437 | false | 3.223094 | false | false | false |
EBI-Metagenomics/emgapi | emgapi/migrations/0028_auto_20200706_1823.py | 1 | 1069 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.25 on 2020-06-16 12:02
from __future__ import unicode_literals
from django.db import migrations
def add_checksum_algorithms(apps, schema_editor):
"""
Add hash algorithms:
- SHA1
- SHA256
- MD5
"""
ChecksumAlgorithms = apps.get_model("emga... | apache-2.0 | 3,405,595,739,773,955,600 | 24.452381 | 94 | 0.637979 | false | 3.587248 | false | false | false |
itoijala/pyfeyner | examples/pyfeyn-test3.py | 1 | 2416 | #!/usr/bin/env python2
#
# pyfeyner - a simple Python interface for making Feynman diagrams.
# Copyright (C) 2005-2010 Andy Buckley, Georg von Hippel
# Copyright (C) 2013 Ismo Toijala
#
# pyfeyner is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publishe... | gpl-2.0 | 8,639,295,022,185,520,000 | 36.75 | 99 | 0.678394 | false | 2.511435 | false | false | false |
johnloucaides/chipsec | chipsec/module_common.py | 1 | 3593 | #!/usr/bin/python
#CHIPSEC: Platform Security Assessment Framework
#Copyright (c) 2010-2015, Intel Corporation
#
#This program is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; Version 2.
#
#This program is distr... | gpl-2.0 | 2,244,424,559,796,795,000 | 27.515873 | 101 | 0.629001 | false | 4.069083 | false | false | false |
mbollmann/perceptron | mmb_perceptron/feature_extractor/generator/generative_extractor.py | 1 | 3342 | # -*- coding: utf-8 -*-
import numpy as np
from .. import FeatureExtractor
class GenerativeExtractor(FeatureExtractor):
"""Abstract base class for a generative feature extractor.
Compared to simple feature extractors, generators perform the additional
task of generating class label candidates. This mean... | mit | -3,316,705,741,891,611,600 | 44.162162 | 88 | 0.666966 | false | 4.479893 | false | false | false |
openstack/cliff | cliff/help.py | 1 | 4846 | # 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
# distributed u... | apache-2.0 | -4,748,475,090,079,885,000 | 37.768 | 79 | 0.554065 | false | 4.326786 | false | false | false |
ApproxEng/approxeng.input | src/python/approxeng/input/selectbinder.py | 1 | 6065 | from functools import reduce
from select import select
from threading import Thread
import approxeng.input.sys as sys
from approxeng.input.controllers import *
EV_KEY = 1
EV_REL = 2
EV_ABS = 3
class ControllerResource:
"""
General resource which binds one or more controllers on entry and unbinds the event l... | apache-2.0 | -2,654,246,842,321,006,600 | 40.541096 | 118 | 0.591096 | false | 5.131134 | false | false | false |
akshmakov/Dolfin-Fijee-Fork | test/unit/book/python/chapter_1_files/stationary/poisson/d2_p2D.py | 1 | 1457 | """
FEniCS tutorial demo program: Poisson equation with Dirichlet conditions.
As d1_p2D.py, but chosing linear solver and preconditioner is demonstrated.
-Laplace(u) = f on the unit square.
u = u0 on the boundary.
u0 = u = 1 + x^2 + 2y^2, f = -6.
"""
from dolfin import *
# Create mesh and define function space
mesh ... | gpl-3.0 | -481,046,481,958,258,050 | 22.885246 | 75 | 0.663693 | false | 2.840156 | false | false | false |
danielfaust/AutobahnPython | autobahn/autobahn/websocket.py | 1 | 140218 | ###############################################################################
##
## Copyright 2011,2012 Tavendo GmbH
##
## 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 | 1,140,141,229,421,386,400 | 36.960267 | 212 | 0.603311 | false | 4.30817 | false | false | false |
bruno-briner/plugin.video.brplay | resources/lib/hlsproxy/decrypter.py | 1 | 16632 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Simple AES cipher implementation in pure Python following PEP-272 API
Based on: https://bitbucket.org/intgr/pyaes/ to compatible with PEP-8.
The goal of this module is to be as fast as reasonable in Python while still
being Pythonic and readable/understandable. It is ... | gpl-3.0 | -5,658,260,328,799,054,000 | 31.6778 | 79 | 0.61045 | false | 3.159574 | false | false | false |
SaTa999/pyPanair | pyPanair/postprocess/agps_converter.py | 1 | 10619 | #!/usr/bin/env python
import numpy as np
import os
def read_column(file, firstline):
"""read a column from first line (e.g. n01c001) to *eof"""
column = list()
line = firstline
# register methods for faster evaluation
f_readline = file.readline
column_append = column.append
# r... | mit | 7,905,887,637,318,669,000 | 41.880165 | 104 | 0.512289 | false | 3.272419 | false | false | false |
jarod-w/ocsetup | ocsetup/plugins/storage_tab.py | 1 | 2968 | #!/usr/bin/python
# storage_tab.py - Copyright (C) 2012 CloudTimes, Inc.
# Written by Jarod.W <work.iec23801@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; version 2 of the License... | gpl-2.0 | -7,529,631,513,802,328,000 | 33.114943 | 78 | 0.627695 | false | 4.082531 | false | false | false |
cqychen/quants | quants/loaddata/skyeye_ods_invest_refer_sh_margins_detail.py | 1 | 2670 | #coding=utf8
import tushare as ts;
import pymysql;
import time as dt
from datashape.coretypes import string
from pandas.io.sql import SQLDatabase
import sqlalchemy
import datetime
from sqlalchemy import create_engine
from pandas.io import sql
import threading
import pandas as pd;
import sys
sys.path.append('../') #添加配... | epl-1.0 | -4,613,820,654,172,870,000 | 34.217391 | 98 | 0.577778 | false | 2.825581 | false | false | false |
pfjel7/housing-insights | python/housinginsights/sources/cama.py | 1 | 8713 | # Script is deprecated, as of September 18, 2017.
# zoneUnitCount now calculated with LoadData's _get_residential_units()
#
from pprint import pprint
import os
import sys
import requests
from collections import OrderedDict
import csv
import datetime
PYTHON_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__)... | mit | -8,037,650,862,094,938,000 | 38.425339 | 177 | 0.553655 | false | 4.050674 | false | false | false |
pmalczuk/python_scripts | disk.py | 1 | 7360 | #!/usr/bin/python2
import os, sys
import getopt, datetime
import platform
#automatyczne przeliczenie wartosci od Bajtow w gore
def GetHumanReadable(size,precision=2):
suffixes=['B','KB','MB','GB','TB']
suffixIndex = 0
while size > 1024 and suffixIndex < 3:
suffixIndex += 1 #increment the index of ... | gpl-3.0 | -220,261,891,489,609,950 | 37.736842 | 170 | 0.56019 | false | 3.44086 | false | false | false |
tokatikato/OIPA | OIPA/api/v3/resources/activity_view_resources.py | 1 | 12434 | # Tastypie specific
from tastypie import fields
from tastypie.constants import ALL, ALL_WITH_RELATIONS
from tastypie.resources import ModelResource
# Data specific
from api.cache import NoTransformCache
from iati.models import ContactInfo, Activity, Organisation, AidType, FlowType, Sector, CollaborationType, \
Tie... | agpl-3.0 | 9,049,514,736,130,169,000 | 43.24911 | 162 | 0.687309 | false | 4.066056 | false | false | false |
PyGotham/pygotham | pygotham/manage/events.py | 1 | 1920 | """Event-related management commands."""
import sys
import arrow
from flask import current_app
from flask_script import Command, prompt, prompt_bool
from werkzeug.datastructures import MultiDict
from pygotham.core import db
from pygotham.forms import EventForm
from pygotham.models import Event
class CreateEvent(Co... | bsd-3-clause | -2,552,559,807,039,151,000 | 28.538462 | 78 | 0.578125 | false | 4.201313 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.