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 |
|---|---|---|---|---|---|---|---|---|---|---|
ralbayaty/KaggleRetina | testing/censureHistCalc.py | 1 | 4517 | from skimage.feature import CENSURE
from skimage.color import rgb2gray
import matplotlib.pyplot as plt
import numpy as np
import cv2
import sys
from PIL import Image, ImageDraw
def draw_keypoints(img, kp, scale):
draw = ImageDraw.Draw(img)
# Draw a maximum of 300 keypoints
for i in range(min(len(scale),300... | gpl-2.0 | 159,560,390,159,278,880 | 36.032787 | 102 | 0.629179 | false |
qiou/Dev | python/edf.py | 1 | 4511 | #=========================================================================
# Dependencies / Libraries
#=========================================================================
import time
import serial
import MySQLdb
import subprocess
from time import sleep
import datetime
#============================================... | gpl-2.0 | 3,979,199,428,035,871,000 | 35.379032 | 265 | 0.441809 | false |
rithms/hearthstone | xml_to_json.py | 1 | 4835 | #!/usr/bin/env python
from bs4 import BeautifulSoup
import glob
import json
#############################################
# Convert Hearthstone card data XML to JSON #
#############################################
__author__ = "Taylor Caldwell - http://github.com/rithms"
__copyright__ = "Copyright 2015, Taylor Caldw... | mit | 7,331,306,430,884,571,000 | 20.20614 | 67 | 0.588211 | false |
bodedev/prospera | plataforma/management/commands/atualizar_saldos.py | 1 | 2085 | # -*- coding: utf-8 -*-
from django.conf import settings
from django.core.management.base import BaseCommand
from plataforma.constants import ETHER_DIVISOR
from plataforma.models import Saldo
import requests
def buscar_saldo(carteira):
try:
r = requests.get("https://api.etherscan.io/api?module=account&a... | mit | -6,934,085,334,793,678,000 | 44.326087 | 226 | 0.632134 | false |
iocoop/beancount | etc/find-missing-tests.py | 1 | 2218 | #!/usr/bin/env python3
"""
Find missing test coverage in our source code.
This program find source code and warns us if associated tests are
missing or incomplete. This is used to track progress in test coverage
and to ensure that the entire software suite is covered by appropriate
testing code.
"""
import os
from os ... | gpl-2.0 | 8,152,978,246,822,283,000 | 32.606061 | 76 | 0.638864 | false |
jas0n1ee/SonyCameraAPI | takePicture.py | 1 | 1212 | #!/usr/bin/env python
from sonyAPI2 import API2
import cv2
import urllib2
import numpy as np
import time
import struct
api = API2()
api.update_api_list()
try:
result = api.do('getAvailableCameraFunction')
current = result['result'][0]
availavle = result['result'][1]
if current != "Remote Shooting":
... | apache-2.0 | 5,010,609,995,021,559,000 | 23.734694 | 59 | 0.640264 | false |
depboy/p2pool-depboy | p2pool/bitcoin/networks/digibyteSkein.py | 1 | 1236 | import os
import platform
from twisted.internet import defer
from .. import data, helper
from p2pool.util import pack
P2P_PREFIX = 'fac3b6da'.decode('hex') #pchmessagestart
P2P_PORT = 12024
ADDRESS_VERSION = 30 #pubkey_address
RPC_PORT = 14022
RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue(
... | gpl-3.0 | -307,123,748,108,533,950 | 43.142857 | 276 | 0.716828 | false |
junhe/chopper | src/MWpyFS/Monitor.py | 1 | 44187 | # Chopper is a diagnostic tool that explores file systems for unexpected
# behaviors. For more details, see paper Reducing File System Tail
# Latencies With Chopper (http://research.cs.wisc.edu/adsl/Publications/).
#
# Please send bug reports and questions to jhe@cs.wisc.edu.
#
# Written by Jun He at University of Wis... | gpl-2.0 | 4,359,682,231,986,908,700 | 33.280062 | 95 | 0.512707 | false |
SanketDG/coala-bears | tests/LocalBearTestHelper.py | 1 | 8822 | import collections
import queue
import unittest
from contextlib import contextmanager
import pytest
from tests.BearTestHelper import generate_skip_decorator
from coalib.bears.LocalBear import LocalBear
from coalib.misc.ContextManagers import prepare_file
from coalib.settings.Section import Section
from coalib.setting... | agpl-3.0 | 7,346,078,234,706,954,000 | 43.781726 | 79 | 0.530605 | false |
commentedit/commented.it | isso/tests/test_db.py | 1 | 3708 | # -*- encoding: utf-8 -*-
try:
import unittest2 as unittest
except ImportError:
import unittest
import os
import sqlite3
import tempfile
from isso import config
from isso.db import SQLite3
from isso.compat import iteritems
class TestDBMigration(unittest.TestCase):
def setUp(self):
fd, self.pa... | mpl-2.0 | -1,949,383,929,266,403,300 | 29.146341 | 91 | 0.472762 | false |
LettError/filibuster | Lib/filibuster/titlecase.py | 1 | 9269 | # -*- coding: UTF-8 -*-
"""
titlecase.py v0.2
Original Perl version by: John Gruber http://daringfireball.net/ 10 May 2008
Python version by Stuart Colville http://muffinresearch.co.uk
License: http://www.opensource.org/licenses/mit-license.php
"""
import unittest
import sys
import re
SMALL = 'a|an|and|as|at|but|by... | mit | 5,829,125,291,178,365,000 | 35.752988 | 101 | 0.590786 | false |
isaachenrion/jets | src/proteins/train/validation.py | 1 | 1461 | import logging
import time
import torch
from src.data_ops.wrapping import unwrap
from ..loss import loss
def half_and_half(a,b):
a = torch.stack([torch.triu(x) for x in a], 0)
b = torch.stack([torch.tril(x, diagonal=-1) for x in b], 0)
return a + b
def validation(model, data_loader):
t_valid = time... | bsd-3-clause | -3,322,496,645,558,040,600 | 23.762712 | 94 | 0.578371 | false |
byteface/sing | core/PyPal.py | 1 | 16532 | """
PyPal.py
@author: byteface
"""
class PyPal(object):
"""
PyPal is the heart for all pypals :)
"""
# TODO - tell command to pass messages to other pypals. non conflicting. saves having to quit out of current one
# TODO - list commands
# TODO - learn from. quick command to copy commands between ... | gpl-2.0 | 2,327,574,827,839,849,000 | 27.259829 | 163 | 0.67578 | false |
Aioxas/ax-cogs | horoscope/horoscope.py | 1 | 11258 | from discord.ext import commands
from .utils.chat_formatting import box
import aiohttp
import html
import os
import re
try:
from PIL import Image, ImageDraw, ImageFont
PIL = True
except:
PIL = False
class Horoscope:
def __init__(self, bot):
self.bot = bot
self.session = aiohttp.Clien... | mit | 6,268,701,126,173,950,000 | 45.908333 | 124 | 0.505596 | false |
gfyoung/numpy | numpy/lib/twodim_base.py | 2 | 27180 | """ Basic functions for manipulating 2d arrays
"""
from __future__ import division, absolute_import, print_function
import functools
from numpy.core.numeric import (
absolute, asanyarray, arange, zeros, greater_equal, multiply, ones,
asarray, where, int8, int16, int32, int64, empty, promote_types, diagonal,
... | bsd-3-clause | -2,810,006,162,861,620,700 | 26.289157 | 79 | 0.551214 | false |
deepmind/open_spiel | open_spiel/python/egt/alpharank_visualizer_test.py | 1 | 2447 | # Copyright 2019 DeepMind 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 required by appl... | apache-2.0 | 1,702,298,411,478,422,000 | 32.520548 | 74 | 0.698406 | false |
zlorenz/synergy | synergy/config/urls.py | 1 | 1532 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
from django.contrib import a... | bsd-3-clause | -5,642,518,087,429,554,000 | 32.304348 | 71 | 0.657311 | false |
ge0rgi/cinder | cinder/tests/unit/objects/test_cluster.py | 1 | 6662 | # Copyright (c) 2016 Red Hat, 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 require... | apache-2.0 | 2,093,792,070,328,452,900 | 43.119205 | 78 | 0.616632 | false |
qbeenslee/Nepenthes-Server | config/setting.py | 1 | 1657 | # coding:utf-8
'''
设置
Author : qbeenslee
Created : 2014/10/9
'''
import os
# 是否开启测试
DEBUG = False
BASE_PATH = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))
# 数据库设置
# if DEBUG:
# DB_CONFIG = {
# "host": '127.0.0.1',
# "db": 'nepenthes',
# "port": '3140',
# "user": '... | gpl-3.0 | 9,091,684,605,637,006,000 | 18.246753 | 116 | 0.560616 | false |
greyshell/Pen-Test | leetcode/factorial.py | 1 | 1129 | #!/usr/bin/python
# author: greyshell
"""
[+] problem description
=======================
find the factorial of a number
1) recursive two_sum
2) tail recursive two_sum
[+] reference
=============
TBD
"""
def tail_recursion_driver(n):
"""
tail recursive two_sum
:param n: int
:return: int
"""
... | mit | 5,056,837,605,008,551,000 | 18.135593 | 111 | 0.581045 | false |
timothyclemansinsea/smc | src/k8s/smc-hub/control.py | 1 | 9152 | #!/usr/bin/env python3
"""
Hub management script
"""
import os, shutil, sys, tempfile
join = os.path.join
# Boilerplate to ensure we are in the directory fo this path and make the util module available.
SCRIPT_PATH = os.path.split(os.path.realpath(__file__))[0]
sys.path.insert(0, os.path.abspath(os.path.join(SCRIPT_... | gpl-3.0 | -8,445,299,926,647,956,000 | 46.419689 | 275 | 0.633086 | false |
Anaphory/libpgm | libpgm/pgmlearner.py | 1 | 45576 | # Copyright (c) 2012, CyberPoint International, LLC
# 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 lis... | bsd-3-clause | 6,197,193,214,556,969,000 | 45.985567 | 849 | 0.545177 | false |
Yuecai/com-yuecai-dream | src/nodelay/forms.py | 1 | 9690 | # coding=utf-8
#########################################################################
# File Name: forms.py
# Original Author: 段凯强
# Mail: duankq@ios.ac.cn
# Created Time: 2013-12-26
# Update:
#########################################################################
################################################... | bsd-3-clause | 8,940,460,477,779,460,000 | 33.025362 | 105 | 0.577787 | false |
quantopian/zipline | zipline/data/in_memory_daily_bars.py | 1 | 5363 | from six import iteritems
import numpy as np
import pandas as pd
from pandas import NaT
from trading_calendars import TradingCalendar
from zipline.data.bar_reader import OHLCV, NoDataOnDate, NoDataForSid
from zipline.data.session_bars import CurrencyAwareSessionBarReader
from zipline.utils.input_validation import ex... | apache-2.0 | -1,749,134,559,772,530,400 | 30.547059 | 78 | 0.611039 | false |
suizokukan/dchars-fe | kshortcuts.py | 1 | 2929 | #!./python_link
# -*- coding: utf-8 -*-
################################################################################
# DChars-FE Copyright (C) 2008 Xavier Faure
# Contact: faure dot epistulam dot mihi dot scripsisti at orange dot fr
#
# This file is part of DChars-FE.
# DChars-FE is free software: you c... | gpl-3.0 | -7,099,916,806,350,500,000 | 38.527027 | 82 | 0.454701 | false |
akniffe1/fsf | fsf-server/daemon.py | 1 | 3798 | #!/usr/bin/env python
#
# All credit for this class goes to Sander Marechal, 2009-05-31
# Reference: http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
#
#
import sys, os, time, atexit
from signal import SIGTERM
class Daemon:
"""
A generic daemon class.
Usage: subclass the Daemon... | apache-2.0 | 6,438,743,217,424,489,000 | 27.343284 | 110 | 0.511848 | false |
immanetize/nikola | nikola/filters.py | 1 | 7187 | # -*- coding: utf-8 -*-
# Copyright © 2012-2015 Roberto Alsina and others.
# 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 t... | mit | -9,010,117,883,076,772,000 | 31.369369 | 198 | 0.660868 | false |
Arzaroth/python_rapidxml | tests/test_basic.py | 1 | 5638 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# File: simple.py
# by Arzaroth Lekva
# arzaroth@arzaroth.com
#
import os
import rapidxml
def test_unparse(init_rapidxml):
assert init_rapidxml.unparse() == ('<root><test attr1="one" attr2="two" attr3="three"/>'
'<test2><node i... | mit | 6,300,679,868,644,704,000 | 44.104 | 108 | 0.595956 | false |
henrysher/duplicity | setup.py | 1 | 7472 | #!/usr/bin/env python2
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright 2002 Ben Escoto <ben@emerose.org>
# Copyright 2007 Kenneth Loafman <kenneth@loafman.com>
#
# This file is part of duplicity.
#
# Duplicity is free software; you can redistribute it and/or modify it
# under the terms of the GNU... | gpl-2.0 | 734,994,695,471,197,000 | 34.751196 | 77 | 0.578292 | false |
OpenNetworkingFoundation/PIF-Open-Intermediate-Representation | pif_ir/bir/tests/test_common.py | 1 | 1166 | # single BIRStruct description
yaml_eth_struct_dict = {
'type' : 'struct',
'fields' : [
{'dst' : 48},
{'src' : 48},
{'type_' : 16}
]
}
yaml_udp_struct_dict = {
'type' : 'struct',
'fields' : [
{'sport' : 16},
{'dport' : 16},
{'len' : 16},
{'c... | apache-2.0 | -2,003,529,813,339,534,800 | 17.21875 | 37 | 0.465695 | false |
specter119/custodian | custodian/feff/handlers.py | 1 | 4398 | # coding: utf-8
from __future__ import unicode_literals, division
from custodian.custodian import ErrorHandler
import re
from custodian.utils import backup
from pymatgen.io.feff.sets import FEFFDictSet
from custodian.feff.interpreter import FeffModder
import logging
""" This module implements specific error handler f... | mit | -3,734,159,296,317,997,000 | 35.65 | 99 | 0.555707 | false |
ActiveState/code | recipes/Python/271607_fiber_scheduler/recipe-271607.py | 1 | 5269 | import sys, select, time, socket, traceback
class SEND:
def __init__( self, sock, timeout ):
self.fileno = sock.fileno()
self.expire = time.time() + timeout
def __str__( self ):
return 'SEND(%i,%s)' % ( self.fileno, time.strftime( '%H:%M:%S', time.localtime( self.expire ) ) )
class RECV:
def ... | mit | -389,809,782,214,965,100 | 23.281106 | 132 | 0.571076 | false |
DeanThompson/pyelong | pyelong/request.py | 1 | 6017 | # -*- coding: utf-8 -*-
import hashlib
import json
import time
import urllib
import requests
from requests import RequestException, ConnectionError, Timeout
from tornado import gen
from tornado.httpclient import AsyncHTTPClient
from .api import ApiSpec
from .exceptions import ElongException, ElongAPIError, \
Ret... | mit | -2,665,918,147,271,490,000 | 35.466667 | 78 | 0.553266 | false |
lordmos/blink | Source/bindings/scripts/unstable/idl_compiler.py | 1 | 5668 | #!/usr/bin/python
# Copyright (C) 2013 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 c... | mit | 4,028,016,241,521,882,600 | 42.937984 | 163 | 0.728652 | false |
zhlinh/leetcode | 0173.Binary Search Tree Iterator/test.py | 1 | 1230 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from solution import TreeNode
from solution import BSTIterator
def constructOne(s):
s = s.strip()
if s == '#':
return None
else:
return TreeNode(int(s))
def createTree(tree):
q = []
tree = tree.split(",")
root = constructOne(tree[0... | apache-2.0 | -6,259,950,088,596,226,000 | 20.206897 | 43 | 0.523577 | false |
spl0k/supysonic | tests/base/test_cache.py | 1 | 8007 | # This file is part of Supysonic.
# Supysonic is a Python implementation of the Subsonic server API.
#
# Copyright (C) 2018 Alban 'spl0k' Féron
# 2018-2019 Carey 'pR0Ps' Metcalfe
#
# Distributed under terms of the GNU AGPLv3 license.
import os
import unittest
import shutil
import time
import tempfile
fr... | agpl-3.0 | 539,294,049,317,192,400 | 28.112727 | 67 | 0.569323 | false |
lxml/lxml | src/lxml/tests/test_xslt.py | 1 | 69992 | # -*- coding: utf-8 -*-
"""
Test cases related to XSLT processing
"""
from __future__ import absolute_import
import io
import sys
import copy
import gzip
import os.path
import unittest
import contextlib
from textwrap import dedent
from tempfile import NamedTemporaryFile, mkdtemp
is_python3 = sys.version_info[0] >= ... | bsd-3-clause | 9,071,935,211,363,453,000 | 32.440994 | 128 | 0.557464 | false |
cpn18/track-chart | desktop/gps_smoothing.py | 1 | 1313 | import sys
import json
import math
THRESHOLD = 10
data = []
with open(sys.argv[1], "r") as f:
used = count = 0
for line in f:
if line[0] == "#":
continue
items = line.split()
if items[1] == "TPV":
obj = json.loads(" ".join(items[2:-1]))
obj['used'] =... | gpl-3.0 | -8,348,637,999,380,964,000 | 29.534884 | 150 | 0.476009 | false |
kgori/treeCl | treeCl/parutils.py | 1 | 9550 | from abc import ABCMeta, abstractmethod
from .constants import PARALLEL_PROFILE
from .utils import setup_progressbar, grouper, flatten_list
import logging
import multiprocessing
import sys
logger = logging.getLogger(__name__)
__author__ = 'kgori'
"""
Introduced this workaround for a bug in multiprocessing where
error... | mit | 559,474,478,483,958,140 | 32.745583 | 118 | 0.638325 | false |
anbangr/trusted-juju | juju/unit/tests/test_charm.py | 1 | 5922 | from functools import partial
import os
import shutil
from twisted.internet.defer import inlineCallbacks, returnValue, succeed, fail
from twisted.web.error import Error
from twisted.web.client import downloadPage
from juju.charm import get_charm_from_path
from juju.charm.bundle import CharmBundle
from juju.charm.publ... | agpl-3.0 | -8,211,216,513,305,947,000 | 34.461078 | 78 | 0.651807 | false |
bcantoni/ccm | ccmlib/dse_node.py | 1 | 22234 | # ccm node
from __future__ import absolute_import, with_statement
import os
import re
import shutil
import signal
import stat
import subprocess
import time
import yaml
from six import iteritems, print_
from ccmlib import common, extension, repository
from ccmlib.node import (Node, NodeError, ToolError,
... | apache-2.0 | -8,702,722,111,606,709,000 | 46.105932 | 232 | 0.580777 | false |
Microvellum/Fluid-Designer | win64-vc/2.78/Python/bin/2.78/scripts/addons_contrib/mesh_extra_tools/pkhg_faces.py | 1 | 32230 | bl_info = {
"name": "PKHG faces",
"author": " PKHG ",
"version": (0, 0, 5),
"blender": (2, 7, 1),
"location": "View3D > Tools > PKHG (tab)",
"description": "Faces selected will become added faces of different style",
"warning": "not yet finished",
"wiki_url": "",
"category": "Mesh",
... | gpl-3.0 | -9,101,845,059,198,115,000 | 42.85034 | 278 | 0.57403 | false |
ArcherSys/ArcherSys | Lib/test/test_socket.py | 1 | 585437 | <<<<<<< HEAD
<<<<<<< HEAD
import unittest
from test import support
import errno
import io
import itertools
import socket
import select
import tempfile
import time
import traceback
import queue
import sys
import os
import array
import platform
import contextlib
from weakref import proxy
import signal
import math
import... | mit | -5,195,542,381,641,820,000 | 36.720407 | 117 | 0.615957 | false |
laissezfarrell/rl-bitcurator-scripts | python/accession-reporter.py | 1 | 3754 | #!/usr/bin/env python3
#Script (in progress) to report high-level folder information for offices transferring records to the University Archives.
#Dependencies: argparse, pathlib, python3.6 or above, csv, datetime
#Assumptions:
# 1.
import argparse, csv, datetime
from pathlib import Path, PurePath
from datetime imp... | gpl-3.0 | -5,533,678,024,818,261,000 | 43.690476 | 368 | 0.660629 | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_01_01/operations/_subnets_operations.py | 1 | 21762 | # 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 may ... | mit | -452,068,598,390,759,740 | 48.124153 | 220 | 0.636752 | false |
alirizakeles/zato | code/zato-server/src/zato/server/service/internal/security/openstack.py | 1 | 6547 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2013 Dariusz Suchojad <dsuch at zato.io>
Licensed under LGPLv3, see LICENSE.txt for terms and conditions.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
# stdlib
from contextlib import closing
from traceback import format_exc
from uui... | gpl-3.0 | -7,917,064,679,736,714,000 | 36.626437 | 116 | 0.607148 | false |
10239847509238470925387z/tmp123 | app.py | 1 | 2195 | #!/usr/bin/env python
import urllib
import json
import os
import constants
import accounts
from flask import Flask
from flask import request
from flask import make_response
# Flask app should start in global layout
app = Flask(__name__)
PERSON = constants.TEST_1
@app.route('/webhook', methods=['POST'])
def webhook... | apache-2.0 | -4,790,441,292,185,734,000 | 26.098765 | 144 | 0.625513 | false |
Lind-Project/native_client | src/trusted/validator_arm/validation-report.py | 1 | 3575 | #!/usr/bin/python2
#
# Copyright (c) 2012 The Native Client 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 sys
import textwrap
from subprocess import Popen, PIPE
_OBJDUMP = 'arm-linux-gnueabi-objdump'
def _objdump(binary, ... | bsd-3-clause | 2,495,468,691,190,867,000 | 36.631579 | 80 | 0.59021 | false |
core-code/LibVT | Dependencies/Core3D/Preprocessing/generateOctreeFromObj.py | 1 | 10849 | #!/usr/bin/env python
#
# generateOctreeFromObj.py
# Core3D
#
# Created by Julian Mayer on 16.11.07.
# Copyright (c) 2010 A. Julian Mayer
#
# 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 wit... | mit | 7,716,171,793,022,086,000 | 49.696262 | 462 | 0.660337 | false |
Effective-Quadratures/Effective-Quadratures | equadratures/scalers.py | 1 | 7167 | """
Classes to scale data.
Some of these classes are called internally by other modules, but they can also be used independently as a pre-processing stage.
Scalers can fit to one set of data, and used to transform other data sets with the same number of dimensions.
Examples
--------
Fitting scaler implicitly during... | lgpl-2.1 | 3,159,541,299,082,102,300 | 31.425339 | 128 | 0.571588 | false |
cloudconductor/cloud_conductor_gui | gui_app/views/applicationDeployViews.py | 1 | 8093 | # -*- coding: utf-8 -*-
from django.shortcuts import render, redirect, render_to_response
import ast
from ..forms import selecttForm
from ..forms import applicationForm
from ..utils import ApplicationUtil
from ..utils import ApplicationHistoryUtil
from ..utils import EnvironmentUtil
from ..utils import StringUtil
from ... | apache-2.0 | 7,722,206,676,188,103,000 | 34.034632 | 78 | 0.561596 | false |
hackerkid/zulip | zerver/openapi/python_examples.py | 1 | 46543 | # Zulip's OpenAPI-based API documentation system is documented at
# https://zulip.readthedocs.io/en/latest/documentation/api.html
#
# This file defines the Python code examples that appears in Zulip's
# REST API documentation, and also contains a system for running the
# example code as part of the `tools/test-api` t... | apache-2.0 | -7,320,417,508,209,486,000 | 30.090848 | 100 | 0.64362 | false |
CloudI/CloudI | src/service_api/python/jsonrpclib/tests/test_server.py | 1 | 1597 | #!/usr/bin/python
# -- Content-Encoding: UTF-8 --
"""
Tests the pooled server
:license: Apache License 2.0
"""
# JSON-RPC library
from jsonrpclib import ServerProxy
from jsonrpclib.SimpleJSONRPCServer import PooledJSONRPCServer
from jsonrpclib.threadpool import ThreadPool
# Standard library
import random
import thre... | mit | -3,816,758,300,949,687,000 | 23.19697 | 80 | 0.579837 | false |
dan-cristian/haiot | gpio/io_common/__init__.py | 1 | 3453 | from common import Constant
from storage.model import m
from main.logger_helper import L
import abc
from common import utils
# update in db (without propagatting the change by default)
def update_custom_relay(pin_code, pin_value, notify=False, ignore_missing=False):
relay = m.ZoneCustomRelay.find_one({m.ZoneCust... | gpl-2.0 | 1,524,281,052,770,179,800 | 25.775194 | 99 | 0.609036 | false |
pimoroni/unicorn-hat-hd | examples/show-png.py | 1 | 1382 | #!/usr/bin/env python
import time
from sys import exit
try:
from PIL import Image
except ImportError:
exit('This script requires the pillow module\nInstall with: sudo pip install pillow')
import unicornhathd
print("""Unicorn HAT HD: Show a PNG image!
This basic example shows use of the Python Pillow libra... | mit | -8,984,369,968,961,083,000 | 24.592593 | 89 | 0.583213 | false |
stuartlangridge/raspi-recorder | listener_daemon.py | 1 | 2508 | import threading, time, subprocess
from bluetooth import *
server_sock=BluetoothSocket( RFCOMM )
server_sock.bind(("",PORT_ANY))
server_sock.listen(1)
port = server_sock.getsockname()[1]
uuid = "c3091f5f-7e2f-4908-b628-18231dfb5034"
advertise_service( server_sock, "PiRecorder",
service_id = uuid,
... | mit | 294,923,898,243,346,560 | 33.356164 | 88 | 0.570175 | false |
Azure/azure-sdk-for-python | sdk/communication/azure-communication-sms/azure/communication/sms/_models/_models.py | 1 | 2064 | # 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 may ... | mit | 8,139,079,774,969,169,000 | 37.943396 | 94 | 0.593508 | false |
JoelEager/pyTanks.Server | start.py | 1 | 2083 | """
Startup script for the pyTanks server
Requirements:
Python 3.5 or newer
websockets 7.0 (pip install websockets==7.0)
Usage:
python start.py
The pyTanks server uses the settings found in config.py to control how the server works. Those values can be
changed directly or be overridden by appendi... | mit | 3,182,180,769,446,605,000 | 29.188406 | 112 | 0.583293 | false |
nullzero/wprobot | scripts/userfixes.py | 1 | 4673 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Fix misspelled words
"""
import init
import wp
import pywikibot
from wp import lre
def glob():
global subst
subst = lre.Subst()
subst.append(u"กฏหมาย", u"กฎหมาย")
subst.append(u"กรกฏาคม", u"กรกฎาคม")
subst.append(u"กษัตรย์", u"กษัตริย์")
subst.appe... | mit | 5,976,263,289,708,200,000 | 36.345238 | 119 | 0.52598 | false |
twoolie/ProjectNarwhal | narwhal/core/profile/admin.py | 1 | 1124 | # -*- coding: utf-8 -*-
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from sorl.thumbnail.admin import AdminImageMixin
from treebeard.admin import TreeAdmin
from models import Profile
class ProfileAdmin(AdminImageMixin, admin.ModelAdmin):
search_fields = ('user__userna... | gpl-3.0 | 3,874,579,077,347,851,300 | 31.114286 | 65 | 0.508007 | false |
cappatar/knesset-data-pipelines | datapackage_pipelines_knesset/members/processors/load_members.py | 1 | 1419 | from datapackage_pipelines_knesset.common.base_processors.add_resource import AddResourceBaseProcessor
# only loads members with the following positionId:
SUPPORTED_POSITION_IDS = [43, 61]
class Processor(AddResourceBaseProcessor):
def _get_schema(self, resource_descriptor):
return resource_descriptor.ge... | mit | -2,604,610,188,792,806,400 | 40.735294 | 102 | 0.613813 | false |
warriorframework/warriorframework | warrior/WarriorCore/iterative_parallel_kw_driver.py | 1 | 4275 | '''
Copyright 2017, Fujitsu Network Communications, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in w... | apache-2.0 | 7,122,337,398,566,753,000 | 44.478723 | 154 | 0.643743 | false |
valentinmetraux/hierophis | hierophis/maths/statistics/basic.py | 1 | 2080 | #!/usr/bin/env python
# -*- coding: utf 8 -*-
"""
Utility functions.
:copyright: 2015 Agile Geoscience
:license: Apache 2.0
"""
import numpy as np
import scipy.signal
def rms(a):
"""
Calculates the RMS of an array.
:param a: An array.
:returns: The RMS of the array.
"""
return np.sqrt(np.s... | apache-2.0 | -7,067,858,668,146,052,000 | 23.77381 | 68 | 0.533173 | false |
all-of-us/raw-data-repository | tests/api_tests/test_ppi_data_check_api.py | 1 | 2788 | from rdr_service.model.code import CodeType
from tests.helpers.unittest_base import BaseTestCase
class CheckPpiDataApiTest(BaseTestCase):
def setUp(self):
super(CheckPpiDataApiTest, self).setUp(with_consent_codes=True)
self.participant_summary = self.data_generator.create_database_participant_sum... | bsd-3-clause | -8,436,569,744,233,131,000 | 45.466667 | 116 | 0.638451 | false |
wooga/airflow | airflow/example_dags/example_nested_branch_dag.py | 1 | 2019 | #
# 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... | apache-2.0 | -1,070,214,598,085,398,900 | 47.071429 | 104 | 0.740961 | false |
mojolab/LivingData | lib/livdatops.py | 1 | 1153 | import pandas
def getColRenameDict(mergersheet,sheet):
colrenamedict={}
originalcolnames=mergersheet[sheet].fillna("NA")
newcolnames=mergersheet[mergersheet.columns[0]]
for i in range(0,len(originalcolnames)):
colrenamedict[originalcolnames[i]]=newcolnames[i]
# if originalcolnames[i]!="NA":
# colrenamedict[... | apache-2.0 | -1,906,478,291,639,418,000 | 30.162162 | 55 | 0.774501 | false |
CSC-IT-Center-for-Science/pouta-blueprints | pebbles/views/authorize_instances.py | 1 | 3153 | from flask import abort, request, Response, Blueprint
import datetime
import logging
import re
from pebbles.models import InstanceToken
from pebbles.server import restful
authorize_instances = Blueprint('authorize_instances', __name__)
class AuthorizeInstancesView(restful.Resource):
def get(self):
toke... | mit | 2,302,791,649,978,159,000 | 49.047619 | 161 | 0.64732 | false |
weiqiangdragonite/blog_tmp | python/baidu/myip.py | 1 | 1085 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# http://ip.taobao.com/instructions.php
import socket
#
common_headers = \
"Host: ip.taobao.com\r\n" + \
"Connection: Keep-Alive\r\n" + \
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n" + \
"User-Agent: Mozilla/5.0 (X11; Lin... | gpl-2.0 | -721,930,583,678,637,200 | 21.93617 | 133 | 0.563603 | false |
dhanababum/accessdb | accessdb/utils.py | 1 | 8395 | # -*- coding: utf-8 -*-
# Copyright 2017 Dhana Babu
#
# 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 | 6,640,736,085,775,844,000 | 31.921569 | 79 | 0.534485 | false |
jimsize/PySolFC | pysollib/games/harp.py | 1 | 13061 | #!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
# ---------------------------------------------------------------------------##
#
# Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
# Copyright (C) 2003 Mt. Hood Playing Card Co.
# Copyright (C) 2005-2009 Skomoroh
#
# This program is free softwa... | gpl-3.0 | 6,819,752,331,048,072,000 | 34.3 | 79 | 0.537861 | false |
iafan/zing | tests/forms/project.py | 1 | 1228 | # -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
# Copyright (C) Zing contributors.
#
# This file is a part of the Zing project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
import pyte... | gpl-3.0 | -8,058,345,137,155,454,000 | 28.238095 | 75 | 0.663681 | false |
etherkit/OpenBeacon2 | client/linux-arm/venv/lib/python3.6/site-packages/PyInstaller/hooks/hook-gi.repository.GdkPixbuf.py | 1 | 6760 | #-----------------------------------------------------------------------------
# Copyright (c) 2005-2020, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt... | gpl-3.0 | -3,919,858,749,350,087,700 | 39.969697 | 79 | 0.569822 | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/72365b7c0037_add_gender_identity_enums.py | 1 | 1232 | """add gender identity enums
Revision ID: 72365b7c0037
Revises: 9c957ce496bf
Create Date: 2019-06-05 08:56:34.278852
"""
import model.utils
import sqlalchemy as sa
from alembic import op
from rdr_service.participant_enums import GenderIdentity
# revision identifiers, used by Alembic.
revision = "72365b7c0037"
down_... | bsd-3-clause | 7,862,067,207,526,346,000 | 23.64 | 119 | 0.685065 | false |
gunny26/datalogger | datalogger/Test_DataLogger.py | 1 | 4699 | #!/usr/bin/python2
from __future__ import print_function
import unittest
import logging
logging.basicConfig(level=logging.INFO)
import datetime
import gzip
import json
import os
# own modules
from DataLogger import DataLogger as DataLogger
from Timeseries import Timeseries as Timeseries
from TimeseriesArray import Time... | apache-2.0 | -5,105,882,383,725,770,000 | 32.091549 | 77 | 0.602256 | false |
vtraag/leidenalg | tests/test_VertexPartition.py | 1 | 8491 | import unittest
import igraph as ig
import leidenalg
import random
from copy import deepcopy
from ddt import ddt, data, unpack
#%%
def name_object(obj, name):
obj.__name__ = name
return obj
graphs = [
###########################################################################
# Zachary karate network
... | gpl-3.0 | 685,149,790,798,385,900 | 36.570796 | 143 | 0.611824 | false |
joshfriend/memegen | tests/test_routes_templates.py | 1 | 2217 | # pylint: disable=unused-variable
# pylint: disable=misplaced-comparison-constant
from .conftest import load
def describe_get():
def when_default_text(client):
response = client.get("/templates/iw")
assert 200 == response.status_code
assert dict(
name="Insanity Wolf",
... | mit | -5,729,464,290,669,171,000 | 31.602941 | 99 | 0.626071 | false |
JIC-CSB/dtoolcore | docs/source/conf.py | 1 | 5148 | # -*- coding: utf-8 -*-
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# If extensi... | mit | 835,693,816,536,538,400 | 30.012048 | 79 | 0.673271 | false |
praekelt/vumi-go | go/billing/migrations/0009_auto__chg_field_messagecost_tag_pool__add_index_messagecost_message_di.py | 1 | 10898 | # -*- coding: 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):
# Changing field 'MessageCost.tag_pool'
db.alter_column(u'billing_messagecost', 'tag_pool_id', self.gf('dja... | bsd-3-clause | -5,296,161,936,349,393,000 | 75.216783 | 188 | 0.569279 | false |
Sabayon/entropy | lib/tests/spm.py | 1 | 13331 | # -*- coding: utf-8 -*-
import sys
import os
sys.path.insert(0, '.')
sys.path.insert(0, '../')
import unittest
import shutil
import entropy.tools as et
from entropy.const import const_mkdtemp
from entropy.client.interfaces import Client
from entropy.spm.plugins.interfaces.portage_plugin import \
PortageEntropyDep... | gpl-2.0 | 3,206,684,940,896,305,700 | 34.174142 | 170 | 0.569125 | false |
cajone/pychess | lib/pychess/System/TaskQueue.py | 1 | 2187 | # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475160
# Was accepted into Python 2.5, but earlier versions still have
# to do stuff manually
import threading
from pychess.compat import Queue
def TaskQueue():
if hasattr(Queue, "task_done"):
return Queue()
return _TaskQueue()
class _TaskQu... | gpl-3.0 | 3,400,890,274,600,280,000 | 33.171875 | 79 | 0.622771 | false |
akesandgren/easybuild-framework | test/framework/config.py | 1 | 32361 | # #
# Copyright 2013-2021 Ghent University
#
# This file is part of EasyBuild,
# 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://www.vscentrum.be),
# Flemish Research Foundation (... | gpl-2.0 | -2,618,774,525,449,291,300 | 46.450147 | 120 | 0.636754 | false |
deter-project/magi | magi/messaging/transportTCP.py | 1 | 2821 |
import socket
import logging
import time
from asyncore import dispatcher
from transport import Transport
import transportStream
from magimessage import DefaultCodec
log = logging.getLogger(__name__)
class TCPServer(Transport):
""" Simple TCP Server that returns new TCP clients as 'messages' """
def __init__(self,... | gpl-2.0 | -4,412,502,271,619,851,000 | 25.613208 | 95 | 0.698688 | false |
hastexo/edx-platform | pavelib/paver_tests/test_assets.py | 1 | 7878 | """Unit tests for the Paver asset tasks."""
import os
from unittest import TestCase
import ddt
from mock import patch
from paver.easy import call_task, path
from watchdog.observers import Observer
from pavelib.assets import COLLECTSTATIC_LOG_DIR_ARG, collect_assets
from ..utils.envs import Env
from .utils import Pa... | agpl-3.0 | 6,135,130,765,977,636,000 | 38.19403 | 99 | 0.588982 | false |
drtuxwang/system-config | bin/battery.py | 1 | 3916 | #!/usr/bin/env python3
"""
Monitor laptop battery
"""
import argparse
import signal
import sys
from typing import List
import power_mod
class Options:
"""
Options class
"""
def __init__(self) -> None:
self._args: argparse.Namespace = None
self.parse(sys.argv)
def get_summary_fl... | gpl-2.0 | -5,714,600,251,821,818,000 | 26.384615 | 79 | 0.470123 | false |
karllessard/tensorflow | tensorflow/python/keras/layers/preprocessing/text_vectorization.py | 1 | 29394 | # Copyright 2019 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 | 7,755,867,636,308,005,000 | 44.082822 | 101 | 0.666667 | false |
entropyx/callme | callme/proxy.py | 1 | 9608 | # Copyright (c) 2009-2014, Christian Haintz
# 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 ... | bsd-3-clause | 4,423,005,917,173,876,700 | 38.216327 | 128 | 0.600125 | false |
etamponi/resilient-protocol | resilient/ensemble.py | 1 | 6786 | import hashlib
import numpy
from sklearn.base import BaseEstimator, ClassifierMixin, clone
from sklearn.tree.tree import DecisionTreeClassifier
from sklearn.utils.fixes import unique
from sklearn import preprocessing
from sklearn.utils.random import check_random_state
from resilient.logger import Logger
from resilien... | gpl-2.0 | 4,599,996,119,543,902,700 | 37.338983 | 77 | 0.600796 | false |
andrewschaaf/pj-closure | js/goog/array.py | 1 | 3829 | #<pre>Copyright 2006 The Closure Library 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 ... | apache-2.0 | -2,837,759,687,464,881,000 | 25.226027 | 76 | 0.628362 | false |
ilastik/ilastik-0.5 | ilastik/modules/unsupervised_decomposition/core/unsupervisedMgr.py | 1 | 7290 | from ilastik.core.baseModuleMgr import BaseModuleDataItemMgr, BaseModuleMgr
import numpy
import traceback, sys
from ilastik.core import jobMachine
from PyQt4 import QtCore
import os
import algorithms
from ilastik.core.volume import DataAccessor
from ilastik.core.overlayMgr import OverlayItem
""" Import all algorithm ... | bsd-2-clause | -7,100,022,085,646,028,000 | 48.598639 | 213 | 0.610288 | false |
Jason-Gew/Python_modules | authenticate.py | 1 | 2754 | #!/usr/bin/env python
#
# authenticate.py module is create by Jason/Ge Wu
# Purpose to fast set up and verify username & password
# for system or software access.
from getpass import getpass # Disable password display on console
import base64 # If necessary, use more advanced encryption such as AES, MD5
e... | gpl-3.0 | 333,663,628,608,991,300 | 28.94382 | 84 | 0.603849 | false |
petervanderdoes/wger | wger/utils/fields.py | 1 | 1559 | # This file is part of wger Workout Manager.
#
# wger Workout Manager 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 Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# wger W... | agpl-3.0 | -8,020,619,199,044,156,000 | 26.839286 | 78 | 0.699808 | false |
uclouvain/osis | base/migrations/0054_scoresencoding.py | 1 | 2269 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-05-02 15:06
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('base', '0053_auto_20160529_2355'),
]
operations = [
migrations.RunSQL(
"""... | agpl-3.0 | 3,287,373,462,270,548,000 | 39.517857 | 172 | 0.654473 | false |
314r/joliebulle | joliebulle/view/base.py | 1 | 1815 | #joliebulle 3.6
#Copyright (C) 2010-2016 Pierre Tavares
#Copyright (C) 2012-2015 joliebulle's authors
#See AUTHORS file.
#This program is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version 3
#of the Li... | gpl-3.0 | 553,826,155,992,883,500 | 32.018182 | 76 | 0.770799 | false |
shawncaojob/LC | QUESTIONS/44_wildcard_matching.py | 1 | 1859 | # 44. Wildcard Matching My Submissions QuestionEditorial Solution
# Total Accepted: 59032 Total Submissions: 333961 Difficulty: Hard
# Implement wildcard pattern matching with support for '?' and '*'.
#
# '?' Matches any single character.
# '*' Matches any sequence of characters (including the empty sequence).
#
# Th... | gpl-3.0 | -199,543,660,837,520,030 | 30.508475 | 94 | 0.507262 | false |
caioariede/pyq | sizzle/match.py | 1 | 3323 | from .selector import Selector
class MatchEngine(object):
pseudo_fns = {}
selector_class = Selector
def __init__(self):
self.register_pseudo('not', self.pseudo_not)
self.register_pseudo('has', self.pseudo_has)
def register_pseudo(self, name, fn):
self.pseudo_fns[name] = fn
... | mit | 5,607,412,709,546,960,000 | 30.951923 | 79 | 0.563948 | false |
beyoungwoo/C_glibc_Sample | _Algorithm/ProjectEuler_python/euler_42.py | 1 | 2038 | #!/usr/bin/python -Wall
# -*- coding: utf-8 -*-
"""
<div id="content">
<div style="text-align:center;" class="print"><img src="images/print_page_logo.png" alt="projecteuler.net" style="border:none;" /></div>
<h2>Coded triangle numbers</h2><div id="problem_info" class="info"><h3>Problem 42</h3><span>Published on Friday,... | gpl-3.0 | -5,037,118,179,064,823,000 | 37.45283 | 309 | 0.626104 | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_02_01/aio/operations/_hub_virtual_network_connections_operations.py | 1 | 8982 | # 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 may ... | mit | -270,808,405,234,510,460 | 48.9 | 215 | 0.656647 | false |
Squishymedia/feedingdb | src/feeddb/feed/migrations/0058_muscleowl_emg_sono.py | 1 | 40048 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'SonoSensor.muscle'
db.add_column(u'feed_sonosensor', 'mus... | gpl-3.0 | -4,522,338,344,012,879,000 | 81.40535 | 195 | 0.546519 | false |
alphagov/notifications-api | migrations/versions/0321_drop_postage_constraints.py | 1 | 2423 | """
Revision ID: 0321_drop_postage_constraints
Revises: 0320_optimise_notifications
Create Date: 2020-06-08 11:48:53.315768
"""
import os
from alembic import op
revision = '0321_drop_postage_constraints'
down_revision = '0320_optimise_notifications'
environment = os.environ['NOTIFY_ENVIRONMENT']
def upgrade():
... | mit | 3,433,414,074,737,906,700 | 34.115942 | 118 | 0.574907 | false |
jayc0b0/Projects | Python/Security/caesarCypher.py | 1 | 1545 | # Jacob Orner (jayc0b0)
# Caesar Cypher script
def main():
# Declare variables and take input
global alphabet
alphabet = ['a', 'b', 'c', 'd', 'e', 'f',
'g', 'h', 'i', 'j', 'k', 'l',
'm', 'n', 'o', 'p', 'q', 'r',
's', 't', 'u', 'v', 'w', 'x',
... | mit | 5,803,349,331,164,338,000 | 26.105263 | 81 | 0.552104 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.