repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | 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 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
Szkered/BC_2402 | sydb/stocks/forms.py | 1 | 5392 | from django import forms
from stocks.models import *
from django.forms.models import modelformset_factory, inlineformset_factory, BaseInlineFormSet
from django.forms.formsets import formset_factory, BaseFormSet
import re
import datetime
class DonorForm(forms.ModelForm):
class Meta:
model = Donor
c... | apache-2.0 | 5,637,425,769,789,692,000 | 30.905325 | 95 | 0.648368 | false |
GoogleCloudPlatform/training-data-analyst | quests/dataflow_python/8b_Stream_Testing_Pipeline/solution/taxi_streaming_pipeline_test.py | 1 | 4004 | import logging
import json
import unittest
import sys
import apache_beam as beam
from taxi_streaming_pipeline import *
from apache_beam.testing.test_pipeline import TestPipeline
from apache_beam.testing.util import BeamAssertException
from apache_beam.testing.util import assert_that, equal_to_per_window
from apache_b... | apache-2.0 | -12,612,812,322,786,736 | 41.606383 | 109 | 0.564685 | false |
rtucker/recentpostr | recentpostr.py | 1 | 10922 | #!/usr/bin/python
# Spits out a Javascript embeddable list o' recent RSS stuff.
# Ryan Tucker, August 21 2009, <rtucker@gmail.com>
checkevery = 30*60 # check every ~30 minutes
displaymax = 5
import cgi
import feedparser
import logging
import logging.handlers
import operator
import robotparser
import sqlite3
impo... | mit | 1,412,064,997,997,759,200 | 33.238245 | 142 | 0.557865 | false |
runt18/mojo | mojo/public/tools/bindings/pylib/mojom/generate/mojom_translator_unittest.py | 1 | 37435 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
import module
try:
import mojom_translator
from generated import mojom_files_mojom
from generated import mojom_types_mojom
bindings_... | bsd-3-clause | -3,401,171,679,738,615,300 | 38.824468 | 80 | 0.682543 | false |
ganeti/ganeti | test/py/ganeti.client.gnt_cluster_unittest.py | 1 | 17028 | #!/usr/bin/python3
#
# 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:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list o... | bsd-2-clause | -322,381,317,060,913,200 | 34.773109 | 80 | 0.617865 | false |
kklmn/xrt | tests/raycing/info_opencl.py | 1 | 1670 | import pyopencl as cl # Import the OpenCL GPU computing API
print('\n' + '=' * 60 + '\nOpenCL Platforms and Devices')
for platform in cl.get_platforms(): # Print each platform on this computer
print('=' * 60)
print('Platform - Name: ' + platform.name)
print('Platform - Vendor: ' + platform.vendor)
... | mit | 7,744,002,980,101,567,000 | 42.947368 | 75 | 0.601796 | false |
GoogleCloudPlatform/professional-services | tools/ml-auto-eda/ml_eda/job_config_util/job_config.py | 1 | 7563 | # Copyright 2019 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | 5,269,896,557,410,128,000 | 33.852535 | 80 | 0.685707 | false |
root-mirror/root | bindings/jupyroot/python/JupyROOT/helpers/cppcompleter.py | 19 | 6732 | # -*- coding:utf-8 -*-
#-----------------------------------------------------------------------------
# Author: Danilo Piparo <Danilo.Piparo@cern.ch> CERN
# Author: Enric Tejedor <enric.tejedor.saavedra@cern.ch> CERN
#-----------------------------------------------------------------------------
####################... | lgpl-2.1 | 678,121,358,243,730,700 | 37.25 | 113 | 0.581402 | false |
PythonProgramming/PyOpenGL-series | VideoPyOpenGL7.py | 1 | 3973 | import pygame
from pygame.locals import *
from OpenGL.GL import *
from OpenGL.GLU import *
import random
vertices = (
(1, -1, -1),
(1, 1, -1),
(-1, 1, -1),
(-1, -1, -1),
(1, -1, 1),
(1, 1, 1),
(-1, -1, 1),
(-1, 1, 1)
)
edges = (
(0,1),
(0,3),
(0,4),
(2,1),
(2,... | mit | 5,736,841,369,609,479,000 | 15.834746 | 77 | 0.445507 | false |
skirpichev/omg | diofant/integrals/deltafunctions.py | 1 | 5793 | from ..core import Mul
from ..core.compatibility import default_sort_key
from ..functions import DiracDelta, Heaviside
def change_mul(node, x):
"""change_mul(node, x)
Rearranges the operands of a product, bringing to front any simple
DiracDelta expression.
If no simple DiracDelta expression was foun... | bsd-3-clause | -5,038,044,230,527,641,000 | 33.278107 | 79 | 0.583463 | false |
cotonne/arduino | lcd/Adafruit_CharLCD.py | 1 | 20507 | # Copyright (c) 2014 Adafruit Industries
# Author: Tony DiCola
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, m... | lgpl-3.0 | -2,129,930,900,372,531,500 | 42.081933 | 111 | 0.596674 | false |
proycon/foliatools | foliatools/foliasetdefinition.py | 1 | 4178 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
#---------------------------------------------------------------
# FoLiA Set Definition tool
# by Maarten van Gompel
# Centre for Language Studies
# Radboud University Nijmegen
# proycon AT anaproy DOT nl
#
# Licensed under GPLv3
#----------------------------------... | gpl-3.0 | -3,355,404,610,841,344,000 | 44.413043 | 182 | 0.641216 | false |
recap/pumpkin | examples/tweeter/filters-cat3/filterhasa.py | 1 | 1595 | __author__ = 'reggie'
###START-CONF
##{
##"object_name": "filterhasa",
##"object_poi": "qpwo-2345",
##"parameters": [
## {
## "name": "tweet",
## "description": "english tweets",
## "required": true,
## "type": "TweetS... | mit | -1,975,949,327,162,892,500 | 21.8 | 116 | 0.37931 | false |
s390guy/SATK | xforth/forth_words.py | 1 | 12643 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
this_module="forth_words.py"
definitions="""\
\ vim:ft=forth
\
\ Forth core language definitions.
\
\ Thanks to Richard W.M. Jones <rich@annexia.org> http://annexia.org/forth
\ Most parts of this file are based on his jonesforth, which is licensed as
\ public domain.
: 2... | gpl-3.0 | 5,702,980,280,763,613,000 | 35.862974 | 99 | 0.58396 | false |
ValvePython/vpk | setup.py | 1 | 1446 | #!/usr/bin/env python
from setuptools import setup
from codecs import open
from os import path
import vpk
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='vpk',
version=vpk.__version__,
description='L... | mit | -4,161,693,860,461,095,000 | 31.133333 | 71 | 0.60166 | false |
rbarrois/mpdlcd | mpdlcd/utils.py | 1 | 3005 | # -*- coding: utf-8 -*-
# Copyright (c) 2011-2013 Raphaël Barrois
import functools
import logging
import socket
import time
class AutoRetryConfig(object):
"""Hold the auto-retry configuration.
Attributes:
retry_attempts (int): Maximum number of connection retries
retry_wait (int): The initia... | mit | 1,361,603,677,624,080,100 | 28.165049 | 76 | 0.596538 | false |
googleapis/python-apigee-connect | google/cloud/apigeeconnect_v1/types/tether.py | 1 | 7720 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -2,795,002,658,291,813,400 | 31.711864 | 82 | 0.631995 | false |
AGMMGA/EM_scripts | EM_scripts/junk/e2rawdata_silence_errors.py | 1 | 9718 | #!/Xsoftware64/EM/EMAN2/extlib/bin/python
#
# Author: John Flanagan (jfflanag@bcm.edu)
# Copyright (c) 2000-2011 Baylor College of Medicine
# This software is issued under a joint BSD/GNU license. You may use the
# source code in this file under either license. However, note that the
# complete EMAN2 and SPARX softwa... | gpl-2.0 | -7,468,594,814,304,820,000 | 50.417989 | 307 | 0.71311 | false |
google/skia-buildbot | ct/py/csv-django-settings.py | 1 | 1281 | #!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [
... | bsd-3-clause | 8,169,559,527,647,430,000 | 34.583333 | 74 | 0.593286 | false |
micgro42/ReceiptEval | receipteval/tests/test_collection_collecting.py | 1 | 4092 | # encoding: utf-8
'''
@author: Michael Große <mic.grosse@posteo.de>
@repository: https://github.com/micgro42/ReceiptEval
'''
import pytest
from receipteval.receipt_collection import ReceiptCollection
from receipteval.purchase import Purchase
@pytest.fixture() # Registering this function as a fixture.
def purchase_l... | gpl-3.0 | 8,633,513,128,408,846,000 | 42.425532 | 79 | 0.570064 | false |
z0rr0/licdb | main/key/migrations/0002_auto__add_field_key_net.py | 1 | 4773 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Key.net'
db.add_column('key_key', 'net', self.gf('django.db.models.fields.BooleanField')(d... | gpl-3.0 | 2,877,677,137,838,317,000 | 65.291667 | 137 | 0.538655 | false |
paktor132/phoenix_pipeline | pipeline.py | 1 | 6171 | from __future__ import print_function
from __future__ import unicode_literals
import sys
import logging
import datetime
import dateutil
import uploader
import utilities
import formatter
import postprocess
import oneaday_filter
import result_formatter
import scraper_connection
import to_mongo
from petrarch import petrar... | mit | -7,422,046,759,884,744,000 | 40.416107 | 140 | 0.609626 | false |
przybys/poker-planning | poker/models.py | 1 | 9099 | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
import json
import datetime
from jinja2.utils import urlize
from google.appengine.ext import db
from poker.firebase import send_firebase_message
__all__ = [
'Game',
'Participant',
'Story',
'Round',
'Estimate',
]
class Game(db.Model):
DECK_CHOICE... | mit | 1,969,652,898,089,457,400 | 29.533557 | 95 | 0.544455 | false |
chris48s/UK-Polling-Stations | polling_stations/apps/uk_geo_utils/management/commands/import_onspd.py | 1 | 2103 | import os
import glob
from django.db import connection
from django.core.management.base import BaseCommand
from uk_geo_utils.helpers import get_onspd_model
class Command(BaseCommand):
"""
To import ONSPD, grab the latest release:
https://ons.maps.arcgis.com/home/search.html?t=content&q=ONS%20Postcode%20Di... | bsd-3-clause | 7,411,854,068,189,791,000 | 36.553571 | 87 | 0.566809 | false |
karstenw/nodebox-pyobjc | examples/Extended Application/matplotlib/examples/subplots_axes_and_figures/custom_figure_class.py | 1 | 1517 | """
===================
Custom Figure Class
===================
You can pass a custom Figure constructor to figure if you want to derive from
the default Figure. This simple example creates a figure with a figure title.
"""
import matplotlib.pyplot as plt #import figure, show
from matplotlib.figure import Figure
# n... | mit | 8,111,102,881,483,984,000 | 24.711864 | 82 | 0.58998 | false |
hanteng/babel | scripts/geoname_cldr.py | 1 | 2479 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#歧視無邊,回頭是岸。鍵起鍵落,情真情幻。
# url_target="https://raw.githubusercontent.com/datasets/country-codes/master/data/country-codes.csv"
import csv
import pandas as pd
import codecs
def export_to_csv(df, ex_filename, sep=','):
if sep==',':
df.to_csv(ex_filename, sep=sep, q... | bsd-3-clause | 7,863,930,118,899,022,000 | 34.347826 | 162 | 0.613366 | false |
kaushik94/sympy | sympy/benchmarks/bench_symbench.py | 1 | 2832 | #!/usr/bin/env python
from __future__ import print_function, division
from sympy.core.compatibility import range
from random import random
from sympy import factor, I, Integer, pi, simplify, sin, sqrt, Symbol, sympify
from sympy.abc import x, y, z
from timeit import default_timer as clock
def bench_R1():
"real(f... | bsd-3-clause | -4,173,381,737,773,035,500 | 20.618321 | 78 | 0.46822 | false |
HewlettPackard/oneview-ansible | library/oneview_appliance_device_read_community_facts.py | 1 | 2333 | #!/usr/bin/python
# -*- coding: utf-8 -*-
###
# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
#
# 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/licen... | apache-2.0 | 3,321,506,982,458,706,400 | 29.697368 | 104 | 0.712816 | false |
gonadarian/kagen | kagen/youtube.py | 1 | 2932 | import os
import csv
import json
import pymongo
from kagen import utils
from kagen.utils import config
from datetime import datetime
logger = utils.get_logger("youtube")
def work():
dtf = "%Y-%m-%dT%H:%M:%S.%fZ"
yt_key = config["keys"]["youtube_key"]
yt_user = config["run"]["youtube_user"]
youtube =... | mit | 4,931,035,741,735,050,000 | 33.093023 | 99 | 0.601978 | false |
lebrice/SimpleParsing | test/nesting/example_use_cases.py | 1 | 4329 |
from dataclasses import dataclass, field
from typing import *
from . import TestSetup
__all__ = [
"HParams",
"RunConfig",
"TrainConfig",
"TaskHyperParameters",
"HyperParameters",
]
@dataclass
class HParams(TestSetup):
"""
Model Hyper-parameters
"""
# Number of examples per batch
... | mit | -6,797,513,807,726,035,000 | 27.287582 | 100 | 0.644871 | false |
tombstone/models | research/object_detection/core/freezable_batch_norm.py | 1 | 2992 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 968,853,710,624,408,300 | 43 | 80 | 0.726604 | false |
racemidev/RegAdminForLinux | python/rregadmin/hive/cell_wrapper.py | 1 | 11246 | # generated by 'xml2py'
# flags '-c -d -v -k defst -lrregadmin -m rregadmin.util.glib_wrapper -m rregadmin.util.icu_wrapper -m rregadmin.util.path_wrapper -m rregadmin.util.icu_wrapper -m rregadmin.util.path_info_wrapper -m rregadmin.util.ustring_wrapper -m rregadmin.util.offset_wrapper -m rregadmin.util.value_wrapper ... | gpl-2.0 | 1,746,740,988,433,074,000 | 39.746377 | 455 | 0.674551 | false |
bshp/xtrabackup | python/setup.py | 1 | 1595 | from setuptools import setup, find_packages
import os
package_root = os.path.dirname(__file__)
about = {}
with open("xtrabackup/__about__.py") as fp:
exec(fp.read(), about)
# Error-handling here is to allow package to be built w/o README.rst included
try:
long_description = open(os.path.join(package_root, 'R... | gpl-3.0 | -8,797,729,788,662,614,000 | 25.583333 | 77 | 0.603135 | false |
GeoffreyFrogeye/syncthing-gtk | syncthing_gtk/foldereditor.py | 1 | 8413 | #!/usr/bin/env python2
"""
Syncthing-GTK - FolderEditorDialog
Universal dialog handler for all Syncthing settings and editing
"""
from __future__ import unicode_literals
from gi.repository import Gtk, Gdk
from syncthing_gtk.tools import check_device_id
from syncthing_gtk.editordialog import EditorDialog, strip_v
from... | gpl-2.0 | 3,870,237,024,728,849,400 | 32.517928 | 107 | 0.658624 | false |
Zaneh-/bearded-tribble-back | tests/integration/test_stats.py | 1 | 4190 | import pytest
from django.conf import settings
from django.core.urlresolvers import reverse
from .. import factories as f
from tests.utils import disconnect_signals, reconnect_signals
pytestmark = pytest.mark.django_db
def setup_module(module):
disconnect_signals()
def teardown_module(module):
reconnect_... | agpl-3.0 | 7,031,326,740,203,970,000 | 37.440367 | 80 | 0.626014 | false |
votervoice/openstates | openstates/ny/events.py | 1 | 4556 | import re
import datetime as dt
import pytz
from pupa.scrape import Scraper, Event
from openstates.utils import LXMLMixin
url = "http://assembly.state.ny.us/leg/?sh=hear"
class NYEventScraper(Scraper, LXMLMixin):
_tz = pytz.timezone('US/Eastern')
def lower_parse_page(self, url):
page = self.lxmliz... | gpl-3.0 | 7,908,856,798,909,407,000 | 31.084507 | 84 | 0.449737 | false |
proger/offlineimap | offlineimap/folder/Maildir.py | 1 | 12082 | # Maildir folder support
# Copyright (C) 2002 - 2007 John Goerzen
# <jgoerzen@complete.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 Free Software Foundation; either version 2 of the License, or
# (a... | gpl-2.0 | -8,432,343,763,043,916,000 | 36.874608 | 93 | 0.569442 | false |
flgiordano/netcash | +/google-cloud-sdk/lib/surface/init.py | 1 | 17437 | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | bsd-3-clause | 2,195,455,491,288,916,000 | 37.577434 | 80 | 0.625681 | false |
atantet/ergoPack | example/numericalFP/numericalFP_Hopf.py | 1 | 5115 | import numpy as np
import pylibconfig2
from scipy import sparse
from scipy.sparse import linalg
import matplotlib.pyplot as plt
from matplotlib import cm
from ergoNumAna import ChangCooper
readEigVal = False
#readEigVal = True
def hopf(x, mu, omega):
f = np.empty((2,))
f[0] = x[0] * (mu - (x[0]**2 + x[1]**2))... | gpl-3.0 | -2,602,404,210,002,750,500 | 26.5 | 93 | 0.564223 | false |
Yukarumya/Yukarum-Redfoxes | testing/mozbase/mozdevice/tests/sut_movetree.py | 1 | 2795 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import mozdevice
import logging
import unittest
import mozunit
from sut... | mpl-2.0 | 8,198,250,175,775,828,000 | 40.102941 | 86 | 0.532379 | false |
ardi69/pyload-0.4.10 | pyload/plugin/addon/WindowsPhoneNotify.py | 1 | 4278 | # -*- coding: utf-8 -*-
import httplib
import time
from pyload.plugin.Addon import Addon, Expose
class WindowsPhoneNotify(Addon):
__name = "WindowsPhoneNotify"
__type = "addon"
__version = "0.10"
__config = [("push-id" , "str" , "Push ID" , "" ),
... | gpl-3.0 | -8,406,304,048,525,787,000 | 32.162791 | 102 | 0.538569 | false |
xhochy/arrow | python/pyarrow/tests/test_hdfs.py | 1 | 13325 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -1,749,521,619,231,526,100 | 29.284091 | 77 | 0.59227 | false |
moonlet/fuli | src/fuli_spiders/fuli_spiders/spiders/youdianying.py | 1 | 1705 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
from scrapy import Request
from scrapy.selector import Selector
from datetime import datetime
from base import BaseSpider
import db
class YouDianYin(BaseSpider):
name = 'youdianying'
ch_name = u'有点硬'
start_urls = ['https://youdian.in/']
def parse(self, ... | mit | 5,278,915,593,901,573,000 | 43.526316 | 133 | 0.562057 | false |
copperwire/SIMS | file_handling/file_handler.py | 1 | 5910 | import sys
import os
import numpy as np
class file_handler:
"""
Public methods:
__init__
file_iteration
data_conversion
runtime
Class to get data from the SIMS output files.
The data is collected in groups by the delimiters in the data file, e.g. **** DATA START*** contains all numerical data.
Operatio... | cc0-1.0 | -7,246,006,517,227,118,000 | 30.945946 | 141 | 0.674619 | false |
walter-weinmann/wwe-euler | problems/solved/029_Solution.py | 1 | 1344 | '''
Created on 19.08.2013
@author: Walter
Consider all integer combinations of a^b for 2 ≤ a ≤ 5 and 2 ≤ b ≤ 5:
2^2=4, 2^3=8, 2^4=16, 2^5=32
3^2=9, 3^3=27, 3^4=81, 3^5=243
4^2=16, 4^3=64, 4^4=256, 4^5=1024
5^2=25, 5^3=125, 5^4=625, 5^5=3125
If they are then placed in numerical order, with an... | apache-2.0 | 3,219,445,063,219,351,600 | 24.538462 | 79 | 0.454819 | false |
ASU-CodeDevils/DemonHacks2017 | gameFiles/Python/helpers.py | 1 | 7120 | from __future__ import print_function
from __future__ import division
import numpy as np
from datetime import datetime
from scipy.stats import norm
from scipy.optimize import minimize
def acq_max(ac, gp, y_max, bounds, random_state):
"""
A function to find the maximum of the acquisition function
It uses ... | mit | 4,082,479,898,961,499,600 | 30.091703 | 81 | 0.505618 | false |
Tan0/ironic | ironic/tests/api/test_base.py | 1 | 3304 | # 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 | -2,916,717,131,872,390,000 | 34.913043 | 78 | 0.618947 | false |
stephanpieterse/pyblend-animidi | blenderfunc/blender_funcIncludes.py | 1 | 16560 | # we need this to scale actions and keyframing right
def get_relative_action_scale(obj_s, obj_e, note_s, note_e):
action_frames = obj_e - obj_s # 10 - 5 = 5
note_frames = note_e - note_s # 1050 - 1025 = 25
if action_frames <= 0:
action_frames = 1
relative_scale = note_frames / float(action_frames)... | gpl-3.0 | 3,051,098,367,651,859,000 | 52.941368 | 152 | 0.640519 | false |
muLAn-project/muLAn | muLAn/instruments.py | 1 | 5376 | # -*-coding:Utf-8 -*
# ====================================================================
# Packages
# ====================================================================
import configparser as cp
import copy
import glob
import muLAn
import muLAn.packages.general_tools as gtools
import muLAn.packages.algebra as alge... | mit | -1,610,295,176,745,053,400 | 31 | 91 | 0.564546 | false |
dokterbob/python-postnl-checkout | tests/test_django.py | 1 | 13320 | import datetime
import decimal
from django.test import TestCase
from django.core.cache import cache
from httmock import HTTMock
from django_dynamic_fixture import G, N
from postnl_checkout.contrib.django_postnl_checkout.models import Order
from .base import PostNLTestMixin
class OrderTests(PostNLTestMixin, TestC... | agpl-3.0 | -5,406,795,193,126,462,000 | 30.866029 | 79 | 0.426652 | false |
ccook5/open-av-controller | testing/cli.py | 1 | 4678 | import argparse
from ConfigParser import (
NoSectionError,
SafeConfigParser as ConfigParser
)
from getpass import getpass
from os import path
from socket import socket
import sys
import appdirs
from pjlink import Projector
from pjlink import projector
from pjlink.cliutils import make_command
def cmd_power(p,... | gpl-2.0 | -4,972,172,547,642,636,000 | 26.040462 | 80 | 0.588072 | false |
FeiSun/BERT4Rec | util.py | 1 | 1031 | from __future__ import print_function
import sys
import copy
import random
import numpy as np
from collections import defaultdict
def data_partition(fname):
usernum = 0
itemnum = 0
User = defaultdict(list)
user_train = {}
user_valid = {}
user_test = {}
# assume user/item index starting fro... | apache-2.0 | 9,132,715,667,523,385,000 | 25.435897 | 64 | 0.543162 | false |
AutorestCI/azure-sdk-for-python | azure-batch/azure/batch/models/job_get_options.py | 1 | 3278 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 4,880,764,553,219,390,000 | 47.925373 | 217 | 0.687614 | false |
lowdev/alfred | robot/stt/watson/stt_watson/SttWatson.py | 1 | 1865 | import os
import signal
import threading
from ..config.Config import Config
from ..recording.Record import Record
from ..stt_watson.SttWatsonAbstractListener import SttWatsonAbstractListener
from ..utils.SignalHandler import SignalHandler
from ..watson_client.Client import Client
class SttWatson:
default_config =... | gpl-3.0 | -7,645,826,309,077,861,000 | 29.080645 | 99 | 0.636461 | false |
Williams224/davinci-scripts | lbpketa/DNTupleMaker.py | 1 | 15414 | from Gaudi.Configuration import *
from Configurables import DaVinci
from Configurables import GaudiSequencer
simulation=False
stream='Bhadron'
line='StrippingB2XEtaLb2pKeta3piLine'
from Configurables import DecayTreeTuple
from DecayTreeTuple.Configuration import *
tuple=DecayTreeTuple()
tuple.Decay="[Lambda_b0 -> ^p... | mit | 3,344,568,689,875,149,000 | 42.789773 | 111 | 0.627222 | false |
torchbox/colourlens | colourlens/views.py | 1 | 5200 | import urllib
from django.db.models import Avg, Sum, Count
from django import forms
from django.forms.widgets import Input
from django.shortcuts import render
from colourlens.models import Artwork, Colour
PROM_ATTRS = {'min': '0', 'max': '100', 'step': '5'}
DIST_ATTRS = {'min': '0', 'max': '50', 'step': '1'}
class R... | mit | 9,175,406,315,224,728,000 | 33.210526 | 97 | 0.641731 | false |
bovenyan/hsa | hsa-python/net_plumbing/net_plumber.py | 1 | 22912 | '''
Created on Jun 25, 2012
@author: Peyman Kazemian
'''
from headerspace.hs import headerspace
from net_plumbing.net_plumber_nodes import RuleNode, SourceNode, SinkNode,\
ProbeNode,SourceReachabilityProbeNode
from net_plumbing.net_plumber_process import *
from multiprocessing import cpu_count, Event, JoinableQueue as... | gpl-2.0 | 2,319,341,807,518,203,000 | 35.310618 | 93 | 0.573019 | false |
ThunderGemios10/The-Super-Duper-Script-Editor | script_file.py | 1 | 4412 | ################################################################################
### Copyright © 2012-2013 BlackDragonHunt
###
### This file is part of the Super Duper Script Editor.
###
### The Super Duper Script Editor is free software: you can redistribute it
### and/or modify it under the terms of the GNU Genera... | gpl-3.0 | 2,786,544,307,136,137,000 | 30.956522 | 121 | 0.562259 | false |
codilime/cloudify-system-tests | cosmo_tester/framework/cfy_helper.py | 1 | 13909 | ########
# Copyright (c) 2014 GigaSpaces Technologies Ltd. All rights reserved
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | apache-2.0 | -3,246,946,880,898,750,500 | 34.940568 | 79 | 0.543892 | false |
google/loaner | loaner/web_app/backend/handlers/cron/run_reminder_events.py | 1 | 5071 | # Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | -2,524,230,247,139,262,500 | 38.929134 | 78 | 0.667324 | false |
nvlbg/gepify | gepify/providers/playlists.py | 1 | 6438 | """
gepify.providers.playlists
~~~~~~~~~~~~~~~~~~~~~~~~~~
Provides information about downloaded playlists
as well as functionality to download playlists.
"""
from werkzeug.contrib.cache import RedisCache
from gepify.celery import celery_app
from . import songs, PLAYLISTS_DIRECTORY
from .songs import S... | mit | -8,243,888,045,755,013,000 | 28.668203 | 87 | 0.614011 | false |
aamalev/aiohttp_apiset | tests/test_schema_file.py | 1 | 3140 | from collections import OrderedDict
from pathlib import Path
import pytest
from aiohttp_apiset.swagger.loader import (
AllOf,
DictLoader,
ExtendedSchemaFile,
FileLoader,
Loader,
SchemaFile,
yaml,
)
def test_load():
p = Path(__file__).parent / 'data/schema01.yaml'
f = SchemaFile(p... | apache-2.0 | 2,994,473,244,152,776,000 | 23.341085 | 79 | 0.581847 | false |
EclipseXuLu/DataHouse | DataHouse/jobcn/jobcn_spider.py | 1 | 6201 | import os
import time
import shutil
import requests
from lxml import etree
from openpyxl import Workbook
JOBCN_DATA_DIR = '../../DataSet/jobcn/'
base_url = 'http://www.jobcn.com/search/listalljob_servlet.ujson'
user_agent = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.... | mit | -219,106,271,899,237,340 | 36.128049 | 123 | 0.563804 | false |
Axelrod-Python/Axelrod-fingerprint | update_fingerprints.py | 1 | 8815 | """
A script to obtain the Ashlock Fingerprints of all strategies in the Axelrod
library.
This writes a hash of the source code of each strategy to file: db.csv.
If the source code of a strategy changes **or** a new strategy is introduced
then the fingerprint is regenerated for that strategy.
"""
import inspect
impo... | mit | 3,406,321,965,420,544,500 | 26.720126 | 195 | 0.630062 | false |
hwp-kiel/opencali | src/ui/mplwidget.py | 1 | 1403 | # Python Qt4 bindings for GUI objects
from PyQt4 import QtGui
# import the Qt4Agg FigureCanvas object, that binds Figure to
# Qt4Agg backend. It also inherits from QWidget
from matplotlib.backends.backend_qt4agg \
import FigureCanvasQTAgg as FigureCanvas
# Matplotlib Figure object
from matplotlib.figure import Figure
... | gpl-2.0 | 3,067,225,847,199,053,300 | 35 | 61 | 0.679971 | false |
aosingh/lexpy | lexpy/tests/test_trie.py | 1 | 10452 | import unittest
import os
from lexpy.trie import Trie
from lexpy.utils import build_trie_from_file
from lexpy.exceptions import InvalidWildCardExpressionError
HERE = os.path.dirname(__file__)
large_dataset = os.path.join(HERE, 'data/words.txt')
small_dataset = os.path.join(HERE, 'data/words2.txt')
class TestWordC... | gpl-3.0 | -8,322,138,378,117,097,000 | 46.949541 | 138 | 0.646575 | false |
harry-7/addons-server | src/olympia/constants/reviewers.py | 1 | 6664 | from django.utils.translation import ugettext_lazy as _
# Reviewer Tools
REVIEWER_VIEWING_INTERVAL = 8 # How often we ping for "who's watching?"
REVIEWER_REVIEW_LOCK_LIMIT = 3 # How many pages can a reviewer "watch"
# Types of Canned Responses for reviewer tools.
CANNED_RESPONSE_ADDON = 1
CANNED_RESPONSE_THEME = 2... | bsd-3-clause | 1,205,564,029,379,759,400 | 33.174359 | 79 | 0.686224 | false |
trailofbits/iverify-oss | vendor/iphone-dataprotection/python_scripts/crypto/aeswrap.py | 1 | 3161 | import struct
from Crypto.Cipher import AES
"""
http://www.ietf.org/rfc/rfc3394.txt
quick'n'dirty AES wrap implementation
used by iOS 4 KeyStore kernel extension for wrapping/unwrapping encryption keys
"""
def unpack64bit(s):
return struct.unpack(">Q",s)[0]
def pack64bit(s):
return struc... | bsd-2-clause | -9,087,806,445,580,642,000 | 43.157143 | 259 | 0.636191 | false |
mmagnus/rna-pdb-tools | rna_tools/tools/ClashCalc/ClashCalc.py | 1 | 2343 | #!/usr/bin/python
from Bio.PDB import NeighborSearch, PDBParser, Selection, Atom
from numpy import array
def check_clash(str_name, v=True):
"""check_clash, fract of clashes!
if zero contacts then error -> fix ->
Problem, contacts, str_name: 311 505 na-prot_13536.pdb
Sterical clashes ... | gpl-3.0 | 4,982,397,807,123,278,000 | 33.455882 | 93 | 0.502774 | false |
YannThorimbert/ThorPy-1.4.3 | thorpy/elements/clickable.py | 1 | 1761 | from pygame.event import post, Event
from thorpy.elements.pressable import Pressable
from thorpy.elements.hoverable import Hoverable
from thorpy.miscgui.constants import STATE_NORMAL, STATE_PRESSED, EVENT_PRESS, THORPY_EVENT
class Clickable(Pressable, Hoverable):
"""Clickable Element (Pressable and hoverable)"""... | mit | 2,201,228,198,744,322,300 | 32.226415 | 91 | 0.578648 | false |
ddurieux/alignak | test/test_bad_sat_realm_conf.py | 1 | 2145 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors
#
# This file is part of Alignak.
#
# Alignak is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free So... | agpl-3.0 | 7,821,338,763,417,088,000 | 33.031746 | 78 | 0.730877 | false |
SpaceGroupUCL/qgisSpaceSyntaxToolkit | esstoolkit/external/networkx/algorithms/hierarchy.py | 4 | 1511 | """
Flow Hierarchy.
"""
import networkx as nx
__all__ = ["flow_hierarchy"]
def flow_hierarchy(G, weight=None):
"""Returns the flow hierarchy of a directed network.
Flow hierarchy is defined as the fraction of edges not participating
in cycles in a directed graph [1]_.
Parameters
----------
... | gpl-3.0 | -9,176,417,389,095,951,000 | 31.148936 | 94 | 0.668432 | false |
asavonic/traftrack | traftrack/yamaps.py | 1 | 2009 | import image
import logging
import tempfile
from os import path
DEBUG = False
def make_map_url(ty, coord, area_size, zoom):
return \
('https://static-maps.yandex.ru/1.x/?lang=ru_RU'
'&ll={lat}%2C{lon}'
'&z={zoom}&l={ty}&size={size_x},{size_y}'
).format(
ty=ty,
... | mit | -6,032,079,998,426,408,000 | 25.090909 | 77 | 0.561473 | false |
seraphlnWu/observer | observer/node/controller.py | 1 | 13942 | # coding=utf8
'''
controller 节点
controller 节点负责字节点注册,数据任务分发
'''
import socket
import time
from uuid import uuid4
from collections import deque
from twisted.spread import pb
from twisted.internet.defer import (
inlineCallbacks,
returnValue,
Deferred,
succeed,
)
from twisted.internet import rea... | gpl-2.0 | -4,159,788,212,689,429,500 | 29.253275 | 102 | 0.556221 | false |
Evensgn/MNIST-learning | mnist_svm.py | 1 | 1201 | import numpy as np
import matplotlib.pyplot as plt
GRAY_SCALE_RANGE = 255
import pickle
data_filename = 'data_deskewed.pkl'
print('Loading data from file \'' + data_filename + '\' ...')
with open(data_filename, 'rb') as f:
train_labels = pickle.load(f)
train_images = pickle.load(f)
test_labels = pickle.l... | mit | 2,050,780,318,703,645,700 | 29.05 | 82 | 0.720233 | false |
Parnassos/Eupheme | eupheme/config.py | 1 | 3763 | """Configuration module.
This module deals with the config object used by the Application class to
make some parts of the application's behaviour configurable.
"""
import yaml
import eupheme.mime as mime
class Config:
"""Config class.
A slightly neater way of accessing the yaml config file instead of
... | bsd-3-clause | -2,609,194,535,855,000,000 | 24.425676 | 73 | 0.62211 | false |
catalpainternational/OIPA | OIPA/geodata/migrations/0001_initial.py | 1 | 10087 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.contrib.gis.db.models.fields
class Migration(migrations.Migration):
dependencies = [
('iati', '0001_initial'),
]
operations = [
migrations.CreateModel(
name... | agpl-3.0 | 8,997,692,114,947,381,000 | 55.668539 | 123 | 0.564885 | false |
OCA/stock-logistics-barcode | stock_scanner/models/scanner_scenario_transition.py | 1 | 3439 | # © 2011 Sylvain Garancher <sylvain.garancher@syleam.fr>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
import sys
import traceback
from odoo import models, api, fields, exceptions
from odoo import _
import logging
logger = logging.getLogger('stock_scanner')
class ScannerScenarioTransition(mod... | agpl-3.0 | 3,440,874,921,048,147,000 | 31.130841 | 81 | 0.528505 | false |
rckclmbr/pyportify | pyportify/pkcs1/keys.py | 1 | 5665 | import fractions
from . import primitives
from . import exceptions
from .defaults import default_crypto_random
from .primes import get_prime, DEFAULT_ITERATION
class RsaPublicKey(object):
__slots__ = ('n', 'e', 'bit_size', 'byte_size')
def __init__(self, n, e):
self.n = n
self.e = e
... | apache-2.0 | -4,043,512,826,432,681,500 | 31.745665 | 79 | 0.538394 | false |
SimonSapin/tinycss | tinycss/decoding.py | 2 | 9175 | # coding: utf-8
"""
tinycss.decoding
----------------
Decoding stylesheets from bytes to Unicode.
http://www.w3.org/TR/CSS21/syndata.html#charset
:copyright: (c) 2012 by Simon Sapin.
:license: BSD, see LICENSE for more details.
"""
from __future__ import unicode_literals
import operator
impo... | bsd-3-clause | 8,937,828,354,006,947,000 | 35.256917 | 78 | 0.539736 | false |
kasmith/cbmm-project-christmas | SimulationModels/get_sim_data_v2.py | 1 | 5112 | from __future__ import division, print_function
from physicsTable import *
from physicsTable.constants import *
from physicsTable.models import PointSimulation
import os, json, glob
KAP_V_NORM = 20 # simulation for conditions with motion (small noise in velocity)
KAP_V_NOMOT = 1e-10 # simulation for no motion conditio... | mit | -7,143,892,807,414,389,000 | 38.022901 | 149 | 0.530516 | false |
rmrector/script.artwork.beef | lib/advancedsettings.py | 1 | 4861 | import xbmc
import xbmcgui
import xbmcvfs
import xml.etree.ElementTree as ET
from contextlib import closing
from lib.libs.pykodi import log, localize as L
FILENAME = 'special://userdata/advancedsettings.xml'
FILENAME_BAK = FILENAME + '.beef.bak'
ROOT_TAG = 'advancedsettings'
VIDEO_TAG = 'videolibrary'
MUSIC_TAG = 'm... | mit | 9,046,435,007,444,909,000 | 35.276119 | 103 | 0.637112 | false |
haf/puppet-dak | daklib/config.py | 1 | 4474 | #!/usr/bin/env python
"""
Config access class
@contact: Debian FTPMaster <ftpmaster@debian.org>
@copyright: 2008 Mark Hymers <mhy@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 Pub... | gpl-2.0 | 216,816,975,558,764,000 | 31.897059 | 125 | 0.583371 | false |
dr-jpk/saltefficiency | weekly/weekly_summary_plots.py | 1 | 8536 | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 9 10:06:20 2015
@author: jpk
ToDo: automate the subsystems check. A query that checks all the subsystems in
case things change in the future should prevent issues with the pis chart
colours
"""
import sys
import os
import pandas as pd
import pandas.io.sql as psql
impor... | bsd-3-clause | -7,651,931,648,000,412,000 | 34.566667 | 137 | 0.526828 | false |
googlefonts/ufo2ft | Lib/ufo2ft/filters/base.py | 1 | 7630 | import logging
from types import SimpleNamespace
from fontTools.misc.loggingTools import Timer
from ufo2ft.util import _GlyphSet, _LazyFontName
logger = logging.getLogger(__name__)
class BaseFilter:
# tuple of strings listing the names of required positional arguments
# which will be set as attributes of ... | mit | 3,577,641,209,452,104,700 | 35.859903 | 88 | 0.553342 | false |
apanda/modeling | tests/examples/ContentCacheTest.py | 1 | 1667 | import components
def ContentCacheTest ():
"""Learning firewall test"""
ctx = components.Context (['a', 'b', 'c', 'd', 'cc'],\
['ip_a', 'ip_b', 'ip_c', 'ip_d', 'ip_cc'])
net = components.Network (ctx)
a = components.EndHost(ctx.a, net, ctx)
b = components.EndHost(ctx.b... | bsd-3-clause | -5,992,749,475,282,901,000 | 39.658537 | 72 | 0.472705 | false |
HyperloopTeam/FullOpenMDAO | cantera-2.0.2/interfaces/python/Cantera/stoich.py | 1 | 1370 | from Cantera import exceptions
from Cantera.num import array
from Cantera.elements import elementMoles
def det3(A):
"""Determinant of a 3x3 matrix."""
return (A[0,0]*(A[1,1]*A[2,2] - A[1,2]*A[2,1])
- A[0,1]*(A[1,0]*A[2,2] - A[1,2]*A[2,0])
+ A[0,2]*(A[1,0]*A[2,1] - A[2,0]*A[1,1]))
def s... | gpl-2.0 | -2,443,989,361,483,333,000 | 29.444444 | 91 | 0.584672 | false |
goedzo/PokemonGo-Bot | pokemongo_bot/inventory.py | 1 | 52151 | from __future__ import print_function
import json
import logging
import os
from collections import OrderedDict
from pokemongo_bot.base_dir import _base_dir
from pokemongo_bot.services.item_recycle_worker import ItemRecycler
'''
Helper class for updating/retrieving Inventory data
Interesting info and formulas:
https:... | mit | 5,517,166,461,981,990,000 | 31.553683 | 173 | 0.602769 | false |
zappyk-github/zappyk-python | lib/lib_external/postgresql/test/test_lib.py | 2 | 4170 | ##
# .test.test_lib - test the .lib package
##
import sys
import os
import unittest
import tempfile
from .. import exceptions as pg_exc
from .. import lib as pg_lib
from .. import sys as pg_sys
from ..temporal import pg_tmp
ilf = """
preface
[sym]
select 1
[sym_ref]
*[sym]
[sym_ref_trail]
*[sym] WHERE FALSE
[sym_fir... | gpl-2.0 | 6,338,807,228,543,037,000 | 23.529412 | 112 | 0.654916 | false |
popara/jonny-api | matching/tests.py | 1 | 6443 | from fixures import *
from freezegun import freeze_time
from datetime import datetime
from time import sleep
from django.core import mail
from django.conf import settings
from funcy import is_list, all, str_join
from . import tasks as T
import fixures
from .models import JobStatus, job_status, get_questions, get_anon, ... | mit | -7,788,216,686,586,730,000 | 24.669323 | 103 | 0.601273 | false |
openstack/heat | heat/engine/parameters.py | 1 | 20706 | #
# 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
# ... | apache-2.0 | 5,806,063,626,160,475,000 | 33.858586 | 79 | 0.585772 | false |
dhalleine/tensorflow | tensorflow/examples/skflow/iris.py | 1 | 1465 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | apache-2.0 | -4,256,267,123,883,611,000 | 35.625 | 75 | 0.730375 | false |
marshallmcdonnell/interactive_plotting | TraitsUI/examples/FileEditor_demo.py | 1 | 1168 | #!/usr/bin/env python
# Copyright (c) 2007, Enthought, Inc.
# License: BSD Style.
"""
Implementation of a FileEditor demo plugin for Traits UI demo program.
This demo shows each of the four styles of the FileEditor
"""
# Imports:
from traits.api \
import HasTraits, File
from traitsui.api \
import Item, G... | mit | -8,845,989,099,445,362,000 | 21.461538 | 70 | 0.607877 | false |
EdinburghGenomics/clarity_scripts | scripts/generate_hamilton_input_uct.py | 1 | 2391 | #!/usr/bin/env python
from EPPs.common import GenerateHamiltonInputEPP, InvalidStepError
class GenerateHamiltonInputUCT(GenerateHamiltonInputEPP):
""""Generate a CSV containing the necessary information for the KAPA make libraries method"""
_use_load_config = False # prevent the loading of the config
cs... | mit | 5,375,435,361,011,427,000 | 45.882353 | 121 | 0.637808 | false |
OCA/l10n-brazil | l10n_br_nfe/models/product_product.py | 1 | 2017 | # Copyright 2020 Akretion (Raphaël Valyi <raphael.valyi@akretion.com>)
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
# The generateDS prod mixin (prod XML tag) cannot be injected in
# the product.product object because the tag includes attributes from the
# Odoo fiscal document line. So a part of the ... | agpl-3.0 | 2,735,946,614,346,512,400 | 35.654545 | 85 | 0.550099 | false |
gurneyalex/odoo | addons/mail/models/mail_activity.py | 4 | 44705 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from collections import defaultdict
from datetime import date, datetime
from dateutil.relativedelta import relativedelta
import logging
import pytz
from odoo import api, exceptions, fields, models, _
from odoo.tools.mi... | agpl-3.0 | -903,450,253,741,445,000 | 48.617092 | 188 | 0.616441 | false |
nullzero/wpcgi | wpcgi/tools/wikitranslator/form.py | 1 | 1097 | #!/data/project/nullzerobot/python/bin/python
from flask.ext.wtf import Form
import wtforms.validators as v
from wtforms import TextField, TextAreaField, HiddenField, SubmitField
from messages import msg
class WikiTranslatorForm(Form):
pass
def getForm():
FormCl = WikiTranslatorForm
FormCl.title = TextFi... | mit | -4,713,215,222,985,740,000 | 42.92 | 78 | 0.614403 | false |
endlessm/chromium-browser | third_party/angle/third_party/VK-GL-CTS/src/scripts/verify/message.py | 7 | 1372 | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------
# Vulkan CTS
# ----------
#
# Copyright (c) 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy ... | bsd-3-clause | 2,389,402,020,114,998,300 | 31.666667 | 82 | 0.642128 | false |
yeyanchao/calibre | src/calibre/gui2/preferences/emailp.py | 1 | 7877 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
__license__ = 'GPL v3'
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import textwrap
from PyQt4.Qt import QAbstractTableModel, QVariant, QFont, Qt
from calibre.gui2.preferences import Confi... | gpl-3.0 | -4,766,216,360,129,009,000 | 35.637209 | 95 | 0.59477 | false |
OCA/stock-logistics-workflow | stock_change_price_at_date/tests/test_change_price_at_date.py | 1 | 9189 | # Copyright 2018 ACSONE SA/NV
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from datetime import timedelta
from odoo.tests import common
from odoo import fields
from odoo.osv import expression
from odoo.exceptions import ValidationError
class TestChangePriceAtDate(common.TransactionCase):
def ... | agpl-3.0 | 9,129,164,995,711,200,000 | 33.159851 | 77 | 0.558385 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.