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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tatsy/bssrdf-estimate | bssrdf_estimate/interface/control_widget.py | 1 | 2883 | # -*- coding: utf-8 -*-
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
class ParameterWidget(QWidget):
def __init__(self, parent=None):
super(ParameterWidget, self).__init__(parent)
self.formLayout = QFormLayout()
self.widthLineEdit = QLineEdit()
self.widthLineEdit.setT... | mit | 1,971,967,807,924,753,700 | 29.670213 | 63 | 0.674298 | false | 3.844 | false | false | false |
Darkdadaah/pywikibot-core | tests/wikidataquery_tests.py | 1 | 9750 | # -*- coding: utf-8 -*-
"""Test cases for the WikidataQuery query syntax and API."""
#
# (C) Pywikibot team, 2014
#
# Distributed under the terms of the MIT license.
#
from __future__ import absolute_import, unicode_literals
import os
import time
import pywikibot
import pywikibot.data.wikidataquery as query
from py... | mit | -838,298,079,280,254,500 | 32.62069 | 98 | 0.591897 | false | 3.325375 | true | false | false |
sixty-north/cosmic-ray | src/cosmic_ray/operators/number_replacer.py | 1 | 1175 | """Implementation of the NumberReplacer operator.
"""
import parso
from ..ast import is_number
from .operator import Operator
# List of offsets that we apply to numbers in the AST. Each index into the list
# corresponds to single mutation.
OFFSETS = [
+1,
-1,
]
class NumberReplacer(Operator):
"""An ope... | mit | 266,275,105,423,719,900 | 26.325581 | 79 | 0.550638 | false | 3.476331 | false | false | false |
nico-izo/kobato | kobato/commands/config.py | 1 | 2869 | from kobato.plugin import KobatoBasePlugin, kobato_plugin_register
import sys
class KobatoConfig(KobatoBasePlugin):
def prepare(self, parser):
subparsers = parser.add_subparsers(help='sub-command help')
set_ = subparsers.add_parser('set', help='Set config values')
set_.add_argument('name... | gpl-3.0 | -7,846,888,021,279,062,000 | 27.127451 | 92 | 0.53015 | false | 4.040845 | true | false | false |
samcaulfield/PML_IDE | Test/kbdShortcutToSave.py | 2 | 2599 | # -*- coding: utf-8 -*-
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
from selenium.common.exceptions import NoAlertPresentException... | mit | 5,959,334,172,456,122,000 | 37.791045 | 141 | 0.672566 | false | 3.44695 | false | false | false |
RadioRevolt/SlackBot | plugins/dab.py | 1 | 5676 | from urllib.request import urlopen
from json import loads
from rtmbot.core import Plugin
def get_elements(studio):
valid_studio_values = ['studio', 'teknikerrom']
studio = studio.strip().lower()
if studio not in valid_studio_values:
return False
elements_url = urlopen('http://pappagorg.rad... | mit | -2,632,871,222,282,662,000 | 39.177305 | 120 | 0.590468 | false | 3.756631 | false | false | false |
radio-astro-tools/spectral-cube | spectral_cube/stokes_spectral_cube.py | 5 | 5517 | from __future__ import print_function, absolute_import, division
import six
import numpy as np
from astropy.io.registry import UnifiedReadWriteMethod
from .io.core import StokesSpectralCubeRead, StokesSpectralCubeWrite
from .spectral_cube import SpectralCube, BaseSpectralCube
from . import wcs_utils
from .masks impor... | bsd-3-clause | -5,200,881,096,275,218,000 | 33.917722 | 93 | 0.591988 | false | 4.157498 | false | false | false |
cs-au-dk/Artemis | WebKit/Tools/Scripts/webkitpy/layout_tests/port/gtk_unittest.py | 2 | 3757 | # Copyright (C) 2011 Google Inc. 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 code must retain the above copyright
# notice, this list of conditions and the f... | gpl-3.0 | -4,762,748,133,023,776,000 | 44.817073 | 140 | 0.733032 | false | 3.877193 | true | false | false |
pajaco/spaces | spaces_config/config.py | 1 | 4045 | """
Regular ini rules, except:
special settings:
_use: those will be marked as dependencies of the current section
_provider: the python provider that creates shell commands
keys can have no value
values can be lists (whitespace is separator)
values can contain references to other secti... | mit | 3,264,266,853,195,560,400 | 31.36 | 79 | 0.56267 | false | 4.127551 | true | false | false |
digris/openbroadcast.org | website/apps/statistics/label_statistics.py | 2 | 2149 | # -*- coding: utf-8 -*-
import datetime
import logging
from django.utils import timezone
from atracker.models import EventType
from .utils.queries import get_media_for_label
from .utils.xls_output_label import label_statistics_as_xls
TITLE_MAP = {
"playout": "Airplay statistics",
"download": "Download statis... | gpl-3.0 | 7,539,881,283,366,182,000 | 28.847222 | 88 | 0.67194 | false | 3.394945 | false | false | false |
sagiss/txrm2nexus | txm2nexuslib/scripts/manynorm.py | 1 | 3458 | #!/usr/bin/python
"""
(C) Copyright 2018 ALBA-CELLS
Authors: Marc Rosanes, Carlos Falcon, Zbigniew Reszela, Carlos Pascual
The program is distributed under the terms of the
GNU General Public License (or the Lesser GPL).
This program is free software: you can redistribute it and/or modify
it under the terms of the GN... | gpl-3.0 | -2,847,785,818,340,875,300 | 38.747126 | 79 | 0.569115 | false | 4.456186 | false | false | false |
Julioocz/SIMNAV | simnav/gui/base/resultadosTorre.py | 1 | 1492 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/home/julio/Desktop/SIMNAV/simnav/gui/base/ui/resultadosTorre.ui'
#
# Created by: PyQt5 UI code generator 5.7.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
... | mit | 1,173,775,051,875,866,600 | 38.236842 | 119 | 0.685446 | false | 3.681481 | false | false | false |
mathstuf/bodhi | bodhi/mail.py | 1 | 15521 | # 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 distributed in the hope that it will be useful,
# bu... | gpl-2.0 | 5,604,852,034,062,969,000 | 31.134576 | 80 | 0.54481 | false | 3.818204 | true | false | false |
bacaldwell/ironic | ironic/drivers/modules/iscsi_deploy.py | 1 | 23264 | # Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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... | apache-2.0 | -4,818,179,978,091,737,000 | 38.430508 | 79 | 0.649716 | false | 4.15058 | true | false | false |
SunDwarf/taciturn | taciturn/processing.py | 1 | 1207 | import logging
from celery import group
from app import app, celery, client
from taciturn import registry
logger = logging.getLogger("taciturn")
from celery.utils.log import get_task_logger
task_logger = get_task_logger(__name__)
# Synchronous tasks.
def verify(request):
"""
Verifies a request against the... | mit | -6,951,728,969,206,534,000 | 22.666667 | 91 | 0.645402 | false | 3.81962 | false | false | false |
pombredanne/grr | lib/timeseries_test.py | 1 | 3727 | #!/usr/bin/env python
"""Tests for grr.lib.timeseries."""
from grr.lib import flags
from grr.lib import test_lib
from grr.lib import timeseries
class TimeseriesTest(test_lib.GRRBaseTest):
def makeSeries(self):
s = timeseries.Timeseries()
for i in range(1, 101):
s.Append(i, (i+5) * 10000)
return... | apache-2.0 | -4,190,545,593,282,263,600 | 28.117188 | 73 | 0.61524 | false | 2.918559 | true | false | false |
rafaelmartins/distpatch | distpatch/helpers.py | 1 | 2633 | # -*- coding: utf-8 -*-
"""
distpatch.helpers
~~~~~~~~~~~~~~~~~
Helper functions for distpatch.
:copyright: (c) 2011 by Rafael Goncalves Martins
:license: GPL-2, see LICENSE for more details.
"""
import atexit
import os
import shutil
import tempfile
from subprocess import call
def tempdir(*arg... | gpl-2.0 | 7,718,130,299,848,889,000 | 27.010638 | 81 | 0.597797 | false | 3.478203 | false | false | false |
unioslo/cerebrum | contrib/no/Indigo/create_users.py | 1 | 3492 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2006 University of Oslo, Norway
#
# This file is part of Cerebrum.
#
# Cerebrum 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 t... | gpl-2.0 | 8,037,125,126,642,669,000 | 31.036697 | 75 | 0.632302 | false | 3.799782 | false | false | false |
pajlada/tyggbot | pajbot/modules/basic/permaban.py | 2 | 4621 | import logging
from pajbot.managers.adminlog import AdminLogManager
from pajbot.managers.db import DBManager
from pajbot.models.command import Command
from pajbot.models.command import CommandExample
from pajbot.models.user import User
from pajbot.modules import BaseModule
from pajbot.modules import ModuleType
from pa... | mit | -5,795,660,723,985,454,000 | 34.274809 | 129 | 0.567842 | false | 4.208561 | false | false | false |
Freeseer/freeseer | src/freeseer/frontend/configtool/GeneralWidget.py | 1 | 4557 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
freeseer - vga/presentation capture software
Copyright (C) 2011 Free and Open Source Software Learning Centre
http://fosslc.org
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the ... | gpl-3.0 | -8,458,313,585,973,517,000 | 34.88189 | 102 | 0.692122 | false | 3.868421 | false | false | false |
plq/spyne | examples/queue.py | 2 | 7848 | #!/usr/bin/env python
# encoding: utf8
#
# Copyright © Burak Arslan <burak at arskom dot com dot tr>,
# Arskom Ltd. http://www.arskom.com.tr
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | lgpl-2.1 | -899,054,871,729,292,200 | 32.969697 | 82 | 0.636804 | false | 4.162865 | false | false | false |
mapzen/vector-datasource | vectordatasource/transform.py | 1 | 293983 | # -*- encoding: utf-8 -*-
# transformation functions to apply to features
from collections import defaultdict, namedtuple
from math import ceil
from numbers import Number
from shapely.geometry.collection import GeometryCollection
from shapely.geometry import box as Box
from shapely.geometry import LinearRing
from shap... | mit | 5,696,704,580,245,091 | 30.690366 | 540 | 0.609424 | false | 3.759654 | false | false | false |
openstack/blazar | blazar/enforcement/filters/base_filter.py | 1 | 1225 | # Copyright (c) 2020 University of Chicago.
#
# 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 t... | apache-2.0 | -5,319,428,991,090,619,000 | 27.488372 | 76 | 0.690612 | false | 3.977273 | false | false | false |
albapa/glosim | libmatch/structures.py | 1 | 12323 | #!/usr/bin/env python
# Computes the matrix of similarities between structures in a xyz file
# by first getting SOAP descriptors for all environments, finding the best
# match between environments using the Hungarian algorithm, and finally
# summing up the environment distances.
# Supports periodic systems, matching be... | mit | 6,443,952,005,650,613,000 | 35.13783 | 310 | 0.574373 | false | 3.350462 | false | false | false |
why2pac/dp-tornado | dp_tornado/helper/io/image/driver/wand.py | 1 | 1274 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from dp_tornado.engine.helper import Helper as dpHelper
try:
from wand.image import Image
except ImportError:
Image = None
class WandHelper(dpHelper):
@property
def Image(self):
return Image
def load(self, src):
ret... | mit | -7,070,461,348,547,270,000 | 22.163636 | 56 | 0.605965 | false | 4.057325 | false | false | false |
jinzekid/codehub | python/py3_6venv/spider_jd_phone/spider_jd_phone/spiders/jd_phone.py | 1 | 3028 | # -*- coding: utf-8 -*-
import scrapy
import re
import urllib.request
from scrapy.http import Request
from spider_jd_phone.items import SpiderJdPhoneItem
class JdPhoneSpider(scrapy.Spider):
name = 'jd_phone'
allowed_domains = ['jd.com']
str_keyword = '手机京东自营'
encode_keyword = urllib.request.quote(str_... | gpl-3.0 | -3,422,459,829,960,525,300 | 39.760563 | 173 | 0.49689 | false | 2.911469 | false | false | false |
CDSherrill/psi4 | samples/psi4numpy/rhf/input.py | 30 | 3412 | #! A simple Psi 4 input script to compute a SCF reference using Psi4's libJK
import time
import numpy as np
import psi4
psi4.set_output_file("output.dat", False)
# Benzene
mol = psi4.geometry("""
0 1
O
H 1 1.1
H 1 1.1 2 104
symmetry c1
""")
psi4.set_options({"basis": "aug-cc-pVDZ",
"scf_t... | lgpl-3.0 | -9,054,888,747,358,620,000 | 23.724638 | 91 | 0.62925 | false | 2.430199 | false | false | false |
txtbits/daw-python | pygame/pong/pong [full]/info.py | 1 | 7158 | # -*- coding: utf-8 -*-
'''
Created on 10/01/2012
@author: lm / @fsalamero
'''
import pygame
import sys
import time
from pygame.locals import *
#------------------------------------------------------------------#
# Inicialización de Pygame
#------------------------------------------------------------------#
#pygam... | mit | 7,379,330,731,885,000,000 | 34.231527 | 70 | 0.495036 | false | 3.241614 | false | false | false |
brunogamacatao/portalsaladeaula | django/contrib/sitemaps/tests/basic.py | 1 | 5379 | from datetime import date
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.sitemaps import Sitemap
from django.contrib.sites.models import Site
from django.core.exceptions import ImproperlyConfigured
from django.test import TestCase
from django.utils.unittest import skipU... | bsd-3-clause | -7,294,728,011,007,091,000 | 41.690476 | 125 | 0.661089 | false | 3.981495 | true | false | false |
Kitware/tonic-data-generator | python/tonic/vtk/__init__.py | 1 | 1767 | from vtk import *
from tonic import camera as tc
def update_camera(renderer, cameraData):
camera = renderer.GetActiveCamera()
camera.SetPosition(cameraData['position'])
camera.SetFocalPoint(cameraData['focalPoint'])
camera.SetViewUp(cameraData['viewUp'])
def create_spherical_camera(renderer, dataHan... | bsd-3-clause | -4,538,920,584,704,970,000 | 41.071429 | 140 | 0.711941 | false | 4.043478 | false | false | false |
robbiet480/home-assistant | tests/components/deconz/test_deconz_event.py | 6 | 3213 | """Test deCONZ remote events."""
from copy import deepcopy
from homeassistant.components.deconz.deconz_event import CONF_DECONZ_EVENT
from .test_gateway import DECONZ_WEB_REQUEST, setup_deconz_integration
from tests.common import async_capture_events
SENSORS = {
"1": {
"id": "Switch 1 id",
"name... | apache-2.0 | 3,113,315,831,892,946,400 | 29.028037 | 77 | 0.580454 | false | 3.10735 | false | false | false |
skarlekar/chehara | process_events.py | 1 | 3180 | import os
import json
import boto3 as boto
from slackclient import SlackClient
import requests
from datetime import datetime
def printJson(jsonObject, label):
"""Pretty print JSON document with indentation."""
systime = str(datetime.now())
print("********************************* {} **********************... | mit | -7,964,160,720,100,211,000 | 37.780488 | 107 | 0.593711 | false | 4.040661 | false | false | false |
SublimeText/Pywin32 | lib/x64/win32comext/adsi/demos/search.py | 10 | 4265 | from win32com.adsi import adsi
from win32com.adsi.adsicon import *
from win32com.adsi import adsicon
import pythoncom, pywintypes, win32security
options = None # set to optparse options object
ADsTypeNameMap = {}
def getADsTypeName(type_val):
# convert integer type to the 'typename' as known in the headerfiles.
... | bsd-3-clause | 5,202,562,121,101,393,000 | 31.310606 | 95 | 0.568347 | false | 3.818263 | false | false | false |
ncgmp09/ncgmp09-online | models.py | 1 | 14732 | from django.contrib.gis.db import models
from django.contrib.gis.gdal import DataSource
from django.core.exceptions import ValidationError
from geomaps.validation import GdbValidator
from geomaps.dataloader import GdbLoader
from geomaps.postprocess import StandardLithologyProcessor, GeologicEventProcessor
from gsconfig... | bsd-3-clause | 6,808,687,042,689,924,000 | 40.736544 | 172 | 0.694271 | false | 3.859576 | false | false | false |
lorensen/VTKExamples | src/Python/Geovis/GeoGraticle.py | 1 | 1839 | #!/usr/bin/env python
import vtk
def main():
colors = vtk.vtkNamedColors()
geoGraticle = vtk.vtkGeoGraticule()
transformProjection = vtk.vtkGeoTransform()
destinationProjection = vtk.vtkGeoProjection()
sourceProjection = vtk.vtkGeoProjection()
transformGraticle = vtk.vtkTransformFilter()
... | apache-2.0 | -1,957,190,375,992,868,900 | 35.78 | 74 | 0.741707 | false | 4.006536 | false | false | false |
ThatGeoGuy/ENGO629-ROBPCA | engo629/robust_pca.py | 1 | 9853 | #!/usr/bin/env python3
# This file is a part of ENGO629-ROBPCA
# Copyright (c) 2015 Jeremy Steward
# License: http://www.gnu.org/licenses/gpl-3.0-standalone.html GPL v3+
"""
Defines a class which computes the ROBPCA method as defined by Mia Hubert,
Peter J. Rousseeuw and Karlien Vandem Branden (2005)
"""
import sys
i... | gpl-3.0 | -38,017,735,330,801,064 | 34.315412 | 98 | 0.547447 | false | 3.642514 | false | false | false |
mfatihaktas/q_sim | multiq_sim.py | 1 | 13223 | import sys, pprint, math, numpy, simpy, getopt, itertools, operator
from rvs import *
from arepeat_models import *
from arepeat_sim import *
# ************************ Multiple Qs for Jobs with multiple Tasks **************************** #
class Job(object):
def __init__(self, _id, k, tsize, n=0):
self._id = ... | mit | 783,390,319,104,076,200 | 29.189498 | 115 | 0.534901 | false | 2.673474 | false | false | false |
hachreak/invenio-pidstore | invenio_pidstore/providers/recordid.py | 1 | 2596 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014, 2015, 2016 CERN.
#
# Invenio 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 optio... | gpl-2.0 | 1,027,690,269,467,489,400 | 35.56338 | 76 | 0.70416 | false | 4.214286 | false | false | false |
eicher31/compassion-switzerland | sms_939/models/recurring_contract.py | 3 | 1427 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2018 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __manifest__.py... | agpl-3.0 | -4,034,868,219,426,647,000 | 36.552632 | 78 | 0.53609 | false | 4.272455 | false | false | false |
CWSL/access-cm-tools | config/smooth_mom_bathymetry.py | 1 | 3434 | #!/usr/bin/env python
import sys
import argparse
import shutil
import numpy as np
import netCDF4 as nc
from scipy import signal
"""
Smooth out bathymetry by applying a gaussian blur.
See: http://wiki.scipy.org/Cookbook/SignalSmooth
Convolving a noisy image with a gaussian kernel (or any bell-shaped curve)
blurs th... | apache-2.0 | -1,449,171,919,763,620,600 | 34.040816 | 93 | 0.65696 | false | 3.373281 | false | false | false |
makemytrip/dataShark | plugins/output/out_csv.py | 1 | 2209 | # Copyright 2016 MakeMyTrip (Kunal Aggarwal)
#
# This file is part of dataShark.
#
# dataShark 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 v... | gpl-3.0 | 6,888,654,487,208,212,000 | 35.816667 | 155 | 0.649163 | false | 3.331825 | false | false | false |
tfeldmann/tryagain | setup.py | 1 | 1224 | from setuptools import setup
with open('README.rst') as f:
readme = f.read()
setup(
name="tryagain",
version=__import__('tryagain').__version__,
license='MIT',
description="A lightweight and pythonic retry helper",
long_description=readme,
author="Thomas Feldmann",
author_email="mail@t... | mit | 4,477,936,880,400,505,000 | 35 | 78 | 0.60866 | false | 4.163265 | false | true | false |
minixalpha/WatchTips | app/controllers/user.py | 1 | 2095 | #coding:utf-8
# User Management
import web
import auth
from app.views import wrapper as views
from app.models import wtdata
import config
class register:
def GET(self):
return views.layout.register(info='')
def POST(self):
"""
Posted data has three keys:
'username', 'ema... | bsd-3-clause | 6,929,546,341,971,897,000 | 25.858974 | 75 | 0.58043 | false | 3.98289 | false | false | false |
Kefkius/electrum-frc-server | setup.py | 1 | 1062 | from setuptools import setup
setup(
name="electrum-frc-server",
version="0.9",
scripts=['run_electrum_frc_server','electrum-frc-server'],
install_requires=['plyvel','jsonrpclib', 'irc>=11'],
package_dir={
'electrumfrcserver':'src'
},
py_modules=[
'electrumfrcserver.__ini... | agpl-3.0 | -3,910,920,785,936,369,700 | 31.181818 | 82 | 0.65725 | false | 3.587838 | false | false | false |
makyo/honeycomb | tags/templatetags/tag_extras.py | 2 | 1999 | from django import template
from django.conf import settings
from django.db.models import (
Count,
Max,
Min,
)
register = template.Library()
TAG_MAX = getattr(settings, 'TAGCLOUD_MAX', 5.0)
TAG_MIN = getattr(settings, 'TAGCLOUD_MIN', 1.0)
def get_weight_closure(tag_min, tag_max, count_min, count_max):
... | mit | -7,846,668,506,608,236,000 | 29.753846 | 76 | 0.637819 | false | 3.674632 | false | false | false |
sanjioh/django-header-filter | src/header_filter/matchers.py | 1 | 6373 | """Composable matchers for HTTP headers."""
import re
RE_TYPE = type(re.compile(r''))
class BaseMatcher:
"""Matcher base class."""
def match(self, request):
"""
Check HTTP request headers against some criteria.
This method checks whether the request headers satisfy some
crit... | mit | -2,473,228,337,462,693,000 | 27.578475 | 94 | 0.594069 | false | 4.371056 | false | false | false |
benvermaercke/klustakwik2 | klustakwik2/numerics/cylib/m_step.py | 2 | 2918 | from .m_step_cy import *
from six.moves import range
__all__ = ['compute_cluster_mean', 'compute_covariance_matrix']
def get_diagonal(x):
'''
Return a writeable view of the diagonal of x
'''
return x.reshape(-1)[::x.shape[0]+1]
def compute_cluster_mean(kk, cluster):
data = kk.data
num_cluste... | bsd-3-clause | 8,040,446,234,502,489,000 | 34.156627 | 108 | 0.611035 | false | 3.511432 | false | false | false |
SasView/sasmodels | sesansdemo.py | 1 | 3163 | # Example of conversion of scattering cross section from SANS in absolute
# units into SESANS using a Hankel transformation
# everything is in units of metres except specified otherwise
# Wim Bouwman (w.g.bouwman@tudelft.nl), June 2013
from __future__ import division
from pylab import *
from scipy.special import jv a... | bsd-3-clause | 8,877,363,310,400,501,000 | 29.413462 | 97 | 0.649383 | false | 2.514308 | false | false | false |
bobbyxuy/flask_web | app/models.py | 1 | 1281 | from werkzeug.security import generate_password_hash, check_password_hash
from . import db
from . import login_manager
from flask_login import UserMixin
class Role(db.Model):
__tablename__ = 'roles'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64), unique=True)
users = db.re... | mit | 1,768,659,366,592,258,800 | 27.466667 | 73 | 0.67057 | false | 3.519231 | false | false | false |
sibirrer/astrofunc | astrofunc/LensingProfiles/sersic.py | 1 | 2561 | __author__ = 'sibirrer'
#this file contains a class to make a gaussian
import numpy as np
import astrofunc.util as util
from astrofunc.LensingProfiles.sersic_utils import SersicUtil
import astrofunc.LensingProfiles.calc_util as calc_util
class Sersic(SersicUtil):
"""
this class contains functions to evalua... | mit | -3,187,150,951,711,086,000 | 36.115942 | 111 | 0.522452 | false | 2.486408 | false | false | false |
YoQuieroSaber/votainteligente-portal-electoral | elections/urls.py | 2 | 4564 | from django.conf import settings
from django.conf.urls import patterns, url
from haystack.views import SearchView
from elections.forms import ElectionForm
from elections.views import ElectionsSearchByTagView, HomeView, ElectionDetailView,\
CandidateDetailView, SoulMateDetailView, FaceToFaceView, AreaDetailView, \
... | gpl-3.0 | -4,919,388,031,415,043,000 | 50.280899 | 129 | 0.668273 | false | 3.297688 | false | false | false |
javachengwc/hue | desktop/core/ext-py/python-ldap-2.3.13/Demo/schema_tree.py | 40 | 2375 | """
Outputs the object class tree read from LDAPv3 schema
of a given server
Usage: schema_oc_tree.py [--html] [LDAP URL]
"""
import sys,getopt,ldap,ldap.schema
ldap.trace_level = 1
def PrintSchemaTree(schema,se_class,se_tree,se_oid,level):
"""ASCII text output for console"""
se_obj = schema.get_obj(se_class,se... | apache-2.0 | 7,142,333,691,781,884,000 | 22.75 | 81 | 0.641263 | false | 2.729885 | false | false | false |
madmath/sous-chef | src/delivery/views.py | 1 | 24247 | import datetime
import types
import json
import collections
import textwrap
import os
from django.conf import settings
from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render
from django.views import generic
from django.http import HttpResponseRedirect, HttpResponse, Http404
from djang... | agpl-3.0 | -7,782,200,366,459,179,000 | 37.184252 | 79 | 0.577226 | false | 3.95611 | false | false | false |
eroicaleo/LearningPython | Algorithm/DepthFirstDirectedPaths.py | 1 | 1499 | #!/usr/bin/env python3
from Digraph import Digraph
class DepthFirstDirectedPaths:
def __init__(self, G, s):
self.marked = [0]*G.V
self.edgeTo = [0]*G.V
self.s = s
self.validateVertex(s)
self.dfs(G, s)
def dfs(self, G, v):
self.marked[v] = 1
for w in G.g... | mit | 6,723,031,972,839,636,000 | 25.767857 | 69 | 0.531688 | false | 3.034413 | false | false | false |
wxwilcke/MINOS | directives/pakbonLD_B3.py | 1 | 7661 | #!/usr/bin/python3
import logging
from operator import itemgetter
from timeit import default_timer as timer
import rdflib
from .abstract_instruction_set import AbstractInstructionSet
from readers import rdf
from writers import rule_set, pickler
from samplers import by_definition as sampler
from algorithms.semantic_rul... | gpl-3.0 | -5,489,121,447,361,127,000 | 45.713415 | 110 | 0.571857 | false | 3.461817 | false | false | false |
thedrow/invoke | invoke/cli.py | 1 | 8712 | from functools import partial
import sys
import textwrap
from .vendor import six
from .context import Context
from .loader import Loader
from .parser import Parser, Context as ParserContext, Argument
from .executor import Executor
from .exceptions import Failure, CollectionNotFound, ParseError
from .util import debug... | bsd-2-clause | -5,722,951,377,510,803,000 | 32.125475 | 92 | 0.572429 | false | 4.186449 | false | false | false |
xzturn/caffe2 | caffe2/python/operator_test/pack_ops_test.py | 1 | 8544 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from caffe2.python import core, workspace
import caffe2.python.hypothesis_test_util as hu
from hypothesis import given
from hypothesis import strategies as st
import num... | apache-2.0 | 273,140,610,715,093,660 | 32.245136 | 80 | 0.494733 | false | 3.700303 | true | false | false |
Thump/peuchre | euchreplayer.py | 1 | 64890 | # This class implements an interface for a single player to the euchred
# server. This class expects to be used as a base class for an actual
# player class that can be used with the peuchre program. The real
# player class is expected to be called Player, it needs to sub-class
# EuchrePlayer, and needs to implement ... | lgpl-2.1 | 2,412,021,947,534,853,000 | 35.661017 | 116 | 0.518015 | false | 3.989058 | false | false | false |
Pl-M/zim-icontags-plugin | 0.67/icontags/tagsmanager.py | 1 | 9763 | # -*- coding: utf-8 -*-
# Copyright 2016-2017 Pavel_M <plprgt@gmail.com>,
# released under the GNU GPL version 3.
# This is a plugin for Zim-wiki program (zim-wiki.org) by Jaap Karssenberg.
import gtk
import pango
from zim.notebook import Path
from zim.gui.widgets import ScrolledWindow, Dialog, SingleClickTreeView
... | gpl-3.0 | 2,850,075,525,323,281,000 | 36.988327 | 109 | 0.596128 | false | 3.662041 | false | false | false |
cloudbase/coriolis | coriolis/api/v1/views/endpoint_options_view.py | 1 | 1168 | # Copyright 2020 Cloudbase Solutions Srl
# All Rights Reserved.
import itertools
def _format_opt(req, option, keys=None):
def transform(key, value):
if keys and key not in keys:
return
yield (key, value)
return dict(itertools.chain.from_iterable(
transform(k, v) for k, v ... | agpl-3.0 | 4,883,837,704,224,303,000 | 29.736842 | 78 | 0.691781 | false | 3.707937 | false | false | false |
kells1986/Betfair-Finktank-Tool | bft/bfpy/bfwsdl/bfglobal.py | 4 | 132938 | #!/usr/bin/env python
# -*- coding: latin-1; py-indent-offset:4 -*-
################################################################################
#
# This file is part of BfPy
#
# BfPy is a Python library to communicate with the Betfair Betting Exchange
# Copyright (C) 2010 Daniel Rodriguez (aka Daniel Rodriksson)
... | mit | 5,771,604,429,762,916,000 | 44.386821 | 459 | 0.635334 | false | 3.808348 | false | false | false |
MartinSoto/Seamless | src/machine/cmds.py | 1 | 4144 | # Seamless DVD Player
# Copyright (C) 2004-2005 Martin Soto <martinsoto@users.sourceforge.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 Software Foundation; either version 2 of the
# License, or (at your op... | gpl-2.0 | 2,746,791,735,604,076,000 | 30.876923 | 73 | 0.694015 | false | 4.13986 | false | false | false |
drjod/tUNIX | qb/qbItem.py | 1 | 3929 | #!/usr/bin/python
########
#
# qb class item by JOD
# level 3
#
class item: # level3
def __init__(self, local_ndx):
self._local_ndx = local_ndx
# file stream
def write(self, file):
for i in range (0, len(self._nodesNumber)):
file.write(" " + str(self._nodesNu... | gpl-3.0 | 4,477,364,799,453,593,000 | 35.719626 | 71 | 0.480784 | false | 3.70311 | false | false | false |
blancltd/blanc-contentfiles | tests/test_storage.py | 1 | 3514 | import datetime
from unittest import mock
from urllib import parse
from django.test import TestCase, override_settings
from contentfiles.storage import MediaStorage, RemotePrivateStorage
class TestMediaStorage(TestCase):
def test_url(self):
storage = MediaStorage()
url = storage.url("test.txt")... | bsd-3-clause | -8,740,605,519,531,256,000 | 34.13 | 99 | 0.628807 | false | 3.58104 | true | false | false |
RosemaryAntimony/detweeter | detweet.py | 1 | 3040 | """Make a detweet module."""
import imaginations as imags
import markovify
import tweepy
import tweet_reader as tr
def detweet(tweeter):
"""Detweet at someone."""
keys = tr.key_access()
auth = tweepy.OAuthHandler(keys['consumer_key'], keys['consumer_secret'])
auth.set_access_token(keys['access_token']... | gpl-3.0 | 6,931,932,395,870,149,000 | 35.190476 | 78 | 0.590789 | false | 3.258307 | false | false | false |
julython/julython.org | july/people/badges.py | 1 | 8355 | """
---------------
Julython Badges
---------------
This is where all the logic that drives the awarding of badges.
Badges consist of a counter, metric and a badge meta info. The
badge meta data defines the look of the badge the color, text,
icon and popup text to display.
The counters and badge awards are stored in... | mit | -798,118,022,166,656,500 | 22.535211 | 77 | 0.589707 | false | 3.516414 | false | false | false |
spamwax/goimports-sublime-text-3 | GoImports.py | 1 | 3071 | """
Sublime Text 3 plugin to update list of packages imported
in a Go (golang) source file (scope: source.go) using 'goimports'
(http://github.com/bradfitz/goimports)
Author: Hamid Ghadyani
URL: https://github.com/spamwax/goimports-sublime-text-3
"""
import sublime
import sublime_plugin
import os
... | mit | 3,636,342,935,638,052,000 | 30.020202 | 106 | 0.617714 | false | 3.686675 | false | false | false |
kawadia/estrangement | EstrangementDemo.py | 1 | 4689 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Script demonstrating the use of the estrangement library to detect and
visualize temporal communities.
"""
__author__ = """\n""".join(['Vikas Kawadia (vkawadia@bbn.com)',
'Sameet Sreenivasan <sreens@rpi.edu>',
'Steph... | bsd-3-clause | -4,231,162,085,789,204,000 | 39.076923 | 108 | 0.648113 | false | 3.846596 | false | false | false |
devlights/try-python | trypython/extlib/forwindows/pyautogui01.py | 1 | 1229 | # coding: utf-8
"""
pyautogui モジュールのサンプルです。
マウスの移動について
"""
import pyautogui as autogui
from trypython.common.commoncls import SampleBase
class Sample(SampleBase):
def exec(self):
# ---------------------------------------------------------------------
# pyautogui モジュールは、GUIオートメーションをpythonで行うためのモジュ... | mit | 8,430,466,980,223,815,000 | 32.903226 | 79 | 0.469077 | false | 3.028818 | false | false | false |
airtonix/django-server-status | server_status/contrib/filesystem/status_report.py | 1 | 2437 | from time import sleep
from datetime import datetime, timedelta
from django.utils.translation import ugettext_lazy as _
from django.contrib.webdesign import lorem_ipsum
from server_status.conf import settings
from server_status.base import BaseServerStatusPlugin
from server_status.registry import plugins
from server_... | mit | 3,975,088,700,019,809,300 | 32.383562 | 82 | 0.601559 | false | 4.741245 | false | false | false |
CristianCantoro/thes2loc | thes2lcsh.py | 1 | 1836 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Autore: Cristian Consonni <kikkocristian@gmail.com>
# Inspired by this gist by atomotic:
# https://gist.github.com/atomotic/7229203
#
# The code is released with an MIT license
# please see the LICENSE file for details.
import sys
import csv
import requests
import url... | mit | -3,876,432,197,401,447,400 | 23.157895 | 72 | 0.635076 | false | 3.024712 | false | false | false |
uwescience/myria | python/MyriaPythonWorker.py | 1 | 6820 | from __future__ import print_function
import os
import sys
import socket
import traceback
import struct
import cPickle
import base64
class SpecialLengths(object):
PYTHON_EXCEPTION_THROWN = -3
END_OF_STREAM = -4
NULL = -5
class DataType(object):
INT = 1
LONG = 2
FLOAT = 3
DOUBLE = 4
B... | bsd-3-clause | 5,339,379,725,559,334,000 | 29.311111 | 87 | 0.569208 | false | 4.059524 | false | false | false |
GAIA-GMU/PAR | actions/Wag.py | 1 | 1196 | #wag.v.01
#Body_movement
#This frame contains words for motions or actions an Agent p
#erforms using some part of his/her body. A number of word
#s in this frame occur as blends with Communication, in whic
#h the action has an Addressee. For example, 'Pat nodded
#at Kim.' These examples differ from Communication... | apache-2.0 | 8,410,052,050,833,781,000 | 37.580645 | 77 | 0.743311 | false | 3.232432 | false | false | false |
H7DE/PervasiveComputingCW1 | grid_analytics.py | 1 | 1360 | from test import *
import matplotlib.pyplot as plt
resultsTable = [] #Table of number of nodes and packet transmitted(%)
#Generate a frequency table of (number of node in simulation, percentage of packets transmitted)
with sqlite3.connect("sample_db/grid.db") as conn:
cursor = conn.cursor()
exprRootName="grid... | mit | -1,322,628,626,651,396,000 | 37.857143 | 110 | 0.690441 | false | 3.514212 | false | false | false |
dwhswenson/contact_map | contact_map/version.py | 4 | 4347 | # This file vendored from Autorelease
import os
import subprocess
try:
from configparser import ConfigParser, NoSectionError, NoOptionError
except ImportError:
# py2
from ConfigParser import ConfigParser, NoSectionError, NoOptionError
try:
from ._installed_version import _installed_version
from ._... | lgpl-2.1 | -7,850,998,979,511,318,000 | 29.829787 | 78 | 0.599954 | false | 3.78 | false | false | false |
sehoonha/optskills | optskills/problems/gp_bow.py | 1 | 3696 | import numpy as np
from numpy.linalg import norm
from sim_problem import SimProblem, PDController, STR
class GPBow(SimProblem):
def __init__(self):
super(GPBow, self).__init__('urdf/BioloidGP/BioloidGP.URDF')
self.__init__simulation__()
desc = []
desc.append([('l_thigh', 1.0), ('r... | mit | -1,646,535,759,857,623,600 | 32.6 | 77 | 0.491613 | false | 3.205551 | false | false | false |
markpasc/makerbase | makerbase/forms.py | 1 | 2776 | # coding=utf-8
from datetime import datetime
from itertools import chain
from wtforms import Form, DateTimeField, FieldList, FormField, HiddenField, TextField, validators
class MonthField(DateTimeField):
def __init__(self, label=None, validators=None, format='%Y-%m', **kwargs):
super(MonthField, self).... | mit | 4,444,932,073,110,923,300 | 38.485714 | 133 | 0.658828 | false | 3.765668 | false | false | false |
adrienbrault/home-assistant | tests/components/androidtv/test_media_player.py | 5 | 43441 | """The tests for the androidtv platform."""
import base64
import copy
import logging
from unittest.mock import patch
from androidtv.constants import APPS as ANDROIDTV_APPS
from androidtv.exceptions import LockNotAcquiredException
import pytest
from homeassistant.components.androidtv.media_player import (
ANDROIDT... | mit | -7,712,628,284,357,007,000 | 33.669593 | 155 | 0.638982 | false | 3.58365 | true | false | false |
joristork/milovision | admin_modules/argparse.py | 1 | 2145 | #
# Milovision: A camera pose estimation programme
#
# Copyright (C) 2013 Joris Stork
# See LICENSE.txt
#
# argparse.py
"""
:synopsis: Parses command line arguments using the optparse library.
Note that we use the now deprecated optparse library to maintain
compatibility with the pydc1394 libr... | mit | 8,910,487,035,085,457,000 | 35.982759 | 173 | 0.629837 | false | 3.9 | false | false | false |
bsmedberg/socorro | socorro/cron/jobs/laglog.py | 2 | 2297 | # 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/.
"""an app to monitor and report on replication lag in PG databases"""
from crontabber.base import BaseCronApp
from soco... | mpl-2.0 | 204,953,890,628,145,500 | 34.338462 | 79 | 0.511537 | false | 4.375238 | false | false | false |
dufferzafar/critiquebrainz | critiquebrainz/frontend/artist/views_test.py | 1 | 1298 | from critiquebrainz.frontend.testing import FrontendTestCase
class ArtistViewsTestCase(FrontendTestCase):
def test_artist_page(self):
# Basic artist page should be available.
response = self.client.get("/artist/aef06569-098f-4218-a577-b413944d9493")
self.assert200(response)
self.a... | gpl-2.0 | -5,407,329,594,796,540,000 | 38.333333 | 105 | 0.684129 | false | 3.253133 | false | false | false |
app-registry/appr-cli | cnrclient/commands/show.py | 1 | 1334 | from cnrclient.display import print_package_info
from cnrclient.commands.command_base import CommandBase
class ShowCmd(CommandBase):
name = 'show'
help_message = "print the package manifest"
def __init__(self, options):
super(ShowCmd, self).__init__(options)
self.package = options.package... | apache-2.0 | 4,840,114,590,102,224,000 | 36.055556 | 92 | 0.636432 | false | 3.970238 | false | false | false |
harshays/southwest | southwest/multiple_check_ins.py | 1 | 1642 | import sched
import csv
from southwest import SouthwestCheckIn
import time
class MultipleSouthwestCheckIns(object):
"""
parses csv file and
schedules multiple check-ins
@params fname - user information csv filename
@info - CSV File Headers:
first name, last name, code, mm/... | mit | -3,050,364,477,025,062,000 | 23.507463 | 82 | 0.550548 | false | 4.074442 | false | false | false |
PinkInk/upylib | rfb/rfb/clientmsgs.py | 1 | 3839 | # TODO: consider using u/struct
from rfb.utils import bytes_to_int
def dispatch_msgs(self, msg):
# handle multiple messages
ptr = 0
while ptr < len(msg):
# ClientSetPixelFormat(self, bpp, depth, big, true, masks, shifts)
if msg[ptr] == 0:
# if ClientSetPixelFormat i... | mit | -2,182,950,824,678,368,800 | 34.913462 | 77 | 0.44647 | false | 4.105882 | false | false | false |
essamjoubori/girder | girder/utility/gridfs_assetstore_adapter.py | 1 | 10578 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright 2013 Kitware 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 cop... | apache-2.0 | 3,210,352,515,292,480,000 | 34.736486 | 79 | 0.563528 | false | 4.615183 | false | false | false |
rwightman/pytorch-image-models | timm/data/dataset.py | 1 | 4546 | """ Quick n Simple Image Folder, Tarfile based DataSet
Hacked together by / Copyright 2020 Ross Wightman
"""
import torch.utils.data as data
import os
import torch
import logging
from PIL import Image
from .parsers import create_parser
_logger = logging.getLogger(__name__)
_ERROR_RETRY = 50
class ImageDataset(d... | apache-2.0 | 6,783,638,191,954,104,000 | 30.136986 | 112 | 0.592609 | false | 4.110307 | false | false | false |
chainer/chainercv | chainercv/links/model/vgg/vgg16.py | 3 | 6078 | from __future__ import division
import numpy as np
import chainer
from chainer.functions import dropout
from chainer.functions import max_pooling_2d
from chainer.functions import relu
from chainer.functions import softmax
from chainer.initializers import constant
from chainer.initializers import normal
from chainer.... | mit | 8,276,762,520,706,792,000 | 39.251656 | 76 | 0.611056 | false | 3.641702 | false | false | false |
tinloaf/home-assistant | homeassistant/components/switch/verisure.py | 5 | 2402 | """
Support for Verisure Smartplugs.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/switch.verisure/
"""
import logging
from time import time
from homeassistant.components.verisure import HUB as hub
from homeassistant.components.verisure import CONF_SMA... | apache-2.0 | 796,525,481,526,199,900 | 29.794872 | 74 | 0.622398 | false | 3.837061 | false | false | false |
rc0r/afl-utils | db_connectors/con_sqlite.py | 1 | 5158 | """
Copyright 2015-2016 @_rc0r <hlt99@blinkenshell.org>
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 t... | apache-2.0 | 3,754,788,818,714,356,700 | 41.278689 | 121 | 0.621171 | false | 4.245267 | false | false | false |
GoogleCloudPlatform/tensorflow-without-a-phd | tensorflow-planespotting/trainer/datagen/pickle32.py | 1 | 1074 | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | 7,241,288,575,465,329,000 | 29.714286 | 74 | 0.693669 | false | 3.78169 | false | false | false |
blesscat/flux_line_bot | fluxclient/upnp/task.py | 1 | 7567 |
import logging
from fluxclient.utils.version import StrictVersion
from fluxclient.upnp.discover import UpnpDiscover
from .abstract_backend import UpnpError, UpnpException, NotSupportError
from .udp1_backend import UpnpUdp1Backend
from .ssl1_backend import UpnpSSL1Backend
__all__ = ["UpnpTask", "UpnpError", "UpnpExce... | agpl-3.0 | -7,426,698,394,104,833,000 | 35.033333 | 145 | 0.636051 | false | 4.275141 | false | false | false |
xgds/xgds_notes2 | xgds_notes2/views.py | 1 | 27274 | #__BEGIN_LICENSE__
# Copyright (c) 2015, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All rights reserved.
#
# The xGDS platform is licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance ... | apache-2.0 | -4,331,591,429,205,203,000 | 37.522599 | 150 | 0.585393 | false | 3.993265 | false | false | false |
kawie/pybikes | extractors/domoblue.py | 3 | 5629 | # -*- coding: utf-8 -*-
# Copyright (C) 2010-2012, eskerda <eskerda@gmail.com>
# Distributed under the AGPL license, see LICENSE.txt
import os
import sys
import time
import json
import argparse
from collections import namedtuple
import re
from lxml import etree
from googlegeocoder import GoogleGeocoder
from slugify ... | lgpl-3.0 | 1,773,835,244,100,720,400 | 30.623596 | 118 | 0.609167 | false | 3.504981 | false | false | false |
itkovian/vsc-ldap | lib/vsc/ldap/timestamp.py | 1 | 3108 | #!/usr/bin/env python
# -*- coding: latin-1 -*-
##
# Copyright 2009-2012 Ghent University
#
# This file is part of vsc-ldap
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscen... | gpl-2.0 | -4,553,595,259,723,494,000 | 33.153846 | 110 | 0.710425 | false | 3.88015 | false | false | false |
morelab/appcomposer | appcomposer/i18n.py | 3 | 1189 | import traceback
try:
USE_BABELEX = True
if USE_BABELEX:
# Use regular Babelex instead of Babel
from flask_babelex import Babel as Babel_ex, gettext as gettext_ex, lazy_gettext as lazy_gettext_ex, ngettext as ngettext_ex, get_domain as get_domain
gettext = gettext_ex
ngettext ... | bsd-2-clause | -2,346,879,147,747,376,600 | 28 | 160 | 0.647603 | false | 3.963333 | false | false | false |
punitvanjani/test1 | api/common.py | 1 | 21972 | import socket
import fcntl
import struct
import requests
from requests.auth import HTTPBasicAuth
import os
import time
from flask import current_app, g, jsonify
from models import db, Hub, Endpoint, User, EndpointTypes, SectionTypes, EndpointGroup, Schedule, Properties, EndpointSchema, HubSchema
from datetime ... | mit | 3,501,948,730,950,021,000 | 39.149813 | 630 | 0.617513 | false | 3.658951 | false | false | false |
proversity-org/edx-platform | openedx/core/djangoapps/user_api/management/commands/migrate_user_profile_langs.py | 15 | 3863 | """
Migrates user preferences from one language code to another in batches. Dark lang preferences are not affected.
"""
from __future__ import print_function
import logging
from time import sleep
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.db import t... | agpl-3.0 | -8,263,227,351,948,027,000 | 37.247525 | 121 | 0.577789 | false | 4.399772 | false | false | false |
kaltura/play-server | poc/tracker/ffmpegTSParams.py | 2 | 6872 | import commands
MEDIAINFO_BIN = 'mediainfo'
class MediaInfoParsers:
@staticmethod
def parseValue(value):
value = value.split(' / ')[0] # support 'Sampling rate : 44.1 KHz / 22.05 KHz'
splittedValue = value.split(' ')
value = ''.join(splittedValue[:-1])
try:
if value.endswith('.0'):
value = int(value... | agpl-3.0 | -2,543,118,354,289,121,000 | 32.359223 | 244 | 0.68408 | false | 2.983934 | false | false | false |
Lightmatter/django-inlineformfield | .tox/py27/lib/python2.7/site-packages/IPython/extensions/rmagic.py | 5 | 22605 | # -*- coding: utf-8 -*-
"""
======
Rmagic
======
Magic command interface for interactive work with R via rpy2
.. note::
The ``rpy2`` package needs to be installed separately. It
can be obtained using ``easy_install`` or ``pip``.
You will also need a working copy of R.
Usage
=====
To enable the magics below,... | mit | 3,299,383,235,358,065,000 | 31.478448 | 211 | 0.54019 | false | 3.871382 | false | false | false |
JohnKendrick/PDielec | Examples/SizeEffects/BaTiO3/script.py | 1 | 2272 | #
# SettingsTab
#
tab = self.notebook.settingsTab
tab.settings['Eckart flag'] = False
tab.settings['Neutral Born charges'] = False
tab.settings['Sigma value'] = 5
tab.settings['Mass definition'] = 'average'
#
# 0th Scenario tabs
#
tab = self.notebook.scenarios[0]
tab.settings['Matrix'] = 'ptfe'
tab.settings['Mass or vo... | mit | -4,286,127,456,843,243,500 | 34.5 | 98 | 0.632042 | false | 3.302326 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.