hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
eb1a82d84415cd7f52c037a27cea65ca59f4abfd | 1,373 | py | Python | cacreader/swig-4.0.2/Examples/test-suite/python/extend_template_method_runme.py | kyletanyag/LL-Smartcard | 02abea9de5a13f8bae4d7832ab34cb7f0d9514c9 | [
"BSD-3-Clause"
] | 1,031 | 2015-01-02T14:08:47.000Z | 2022-03-29T02:25:27.000Z | cacreader/swig-4.0.2/Examples/test-suite/python/extend_template_method_runme.py | kyletanyag/LL-Smartcard | 02abea9de5a13f8bae4d7832ab34cb7f0d9514c9 | [
"BSD-3-Clause"
] | 240 | 2015-01-11T04:27:19.000Z | 2022-03-30T00:35:57.000Z | cacreader/swig-4.0.2/Examples/test-suite/python/extend_template_method_runme.py | kyletanyag/LL-Smartcard | 02abea9de5a13f8bae4d7832ab34cb7f0d9514c9 | [
"BSD-3-Clause"
] | 224 | 2015-01-05T06:13:54.000Z | 2022-02-25T14:39:51.000Z | from extend_template_method import *
em = ExtendMe()
ret_double = em.do_stuff_double(1, 1.1)
if ret_double != 1.1:
raise RuntimeError("double failed " + ret_double)
ret_string = em.do_stuff_string(1, "hello there")
if ret_string != "hello there":
raise RuntimeError("string failed " + ret_string)
ret_double ... | 29.847826 | 59 | 0.744355 |
9cf22dc84b46282c751265958c1eccd85b5233ab | 603 | py | Python | backend/api/__init__.py | justinac0/LibraryDB | bcdc61251e8f9b30598ab51649c8581843733d25 | [
"MIT"
] | null | null | null | backend/api/__init__.py | justinac0/LibraryDB | bcdc61251e8f9b30598ab51649c8581843733d25 | [
"MIT"
] | null | null | null | backend/api/__init__.py | justinac0/LibraryDB | bcdc61251e8f9b30598ab51649c8581843733d25 | [
"MIT"
] | null | null | null | import os
from flask import Flask
from flask_cors import CORS
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
def create_app(config=None):
app = Flask(__name__)
app.config.from_mapping(config)
app.config["SQLALCHEMY_DATABASE_URI"] = "mariadb+mariadbconnector://root:example@db/librarydb"
a... | 20.1 | 98 | 0.689884 |
6edc3b1b70b453af0fd9316d539b730cc2b17b96 | 2,310 | py | Python | src/pretix/control/__init__.py | fakegit/pretix | b6e9e64ff967f7b4f91fe88694f4157d8a0787b4 | [
"Apache-2.0"
] | null | null | null | src/pretix/control/__init__.py | fakegit/pretix | b6e9e64ff967f7b4f91fe88694f4157d8a0787b4 | [
"Apache-2.0"
] | 56 | 2020-05-07T07:54:17.000Z | 2021-04-19T12:14:14.000Z | src/pretix/control/__init__.py | fakegit/pretix | b6e9e64ff967f7b4f91fe88694f4157d8a0787b4 | [
"Apache-2.0"
] | null | null | null | #
# This file is part of pretix (Community Edition).
#
# Copyright (C) 2014-2020 Raphael Michel and contributors
# Copyright (C) 2020-2021 rami.io GmbH and contributors
#
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General
# Public License as published by ... | 48.125 | 118 | 0.771429 |
57553f4397c80e16eb5c9ff26b5f638a646a7cce | 8,429 | py | Python | kubernetes/client/models/v2beta1_container_resource_metric_status.py | sthagen/kubernetes-client-python | 3a183048d7d568ba5ea418bcfb8f61713908d3ea | [
"Apache-2.0"
] | null | null | null | kubernetes/client/models/v2beta1_container_resource_metric_status.py | sthagen/kubernetes-client-python | 3a183048d7d568ba5ea418bcfb8f61713908d3ea | [
"Apache-2.0"
] | 3 | 2021-11-30T03:11:13.000Z | 2022-02-09T03:39:41.000Z | kubernetes/client/models/v2beta1_container_resource_metric_status.py | sthagen/kubernetes-client-python | 3a183048d7d568ba5ea418bcfb8f61713908d3ea | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.24
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | 40.138095 | 313 | 0.673983 |
78478fc3d6c768a46db4a5bdf9082e14f89beee2 | 579 | py | Python | tarefa013/09/registros_medio.py | MateSilver/cs-2021-1 | eedb924508ecf47297ceeda3812039401bd325a4 | [
"MIT"
] | null | null | null | tarefa013/09/registros_medio.py | MateSilver/cs-2021-1 | eedb924508ecf47297ceeda3812039401bd325a4 | [
"MIT"
] | 1 | 2022-01-22T17:41:56.000Z | 2022-01-22T17:41:56.000Z | tarefa013/10/registros_medio.py | MateSilver/cs-2021-1 | eedb924508ecf47297ceeda3812039401bd325a4 | [
"MIT"
] | null | null | null | import registros_basico
class registro_medio(registros_basico.registro_basico):
"""registro basico herdado de registro"""
def __init__(self, nome, id, escola, escola_medio, cargo):
super().__init__(self,nome,id,escola)
self._escola_medio = escola_medio
self._saldo *= 1.5
if car... | 32.166667 | 62 | 0.604491 |
b9804d106457e5aceace82bc71944a2e32562feb | 5,378 | py | Python | pyfmodex/geometry.py | CDanSantana/pyfmodex | d820712a9a5203e2e2a2547e29f9e9a02f404282 | [
"MIT"
] | null | null | null | pyfmodex/geometry.py | CDanSantana/pyfmodex | d820712a9a5203e2e2a2547e29f9e9a02f404282 | [
"MIT"
] | null | null | null | pyfmodex/geometry.py | CDanSantana/pyfmodex | d820712a9a5203e2e2a2547e29f9e9a02f404282 | [
"MIT"
] | null | null | null | from ctypes import *
from .fmodobject import FmodObject
from .globalvars import dll as _dll
from .structures import VECTOR
from .utils import ckresult
class PolygonAttributes(object):
def __init__(self, gptr, index):
self._gptr = gptr
self.index = index
self._directocclusion = c_f... | 34.037975 | 168 | 0.646151 |
8ad474a55456ebf29c5dd9bd7ce380bdb26b33de | 955 | py | Python | src/sendkeyboardinput/pw2.py | mbcrump/mbcrump-twitch | 2932c9aefbc5e6a490441ea1caaca0fca8378647 | [
"MIT"
] | 3 | 2020-11-25T19:49:09.000Z | 2021-02-14T12:58:12.000Z | src/sendkeyboardinput/pw2.py | mbcrump/mbcrump-twitch | 2932c9aefbc5e6a490441ea1caaca0fca8378647 | [
"MIT"
] | null | null | null | src/sendkeyboardinput/pw2.py | mbcrump/mbcrump-twitch | 2932c9aefbc5e6a490441ea1caaca0fca8378647 | [
"MIT"
] | 4 | 2021-01-06T13:09:03.000Z | 2021-11-18T13:25:45.000Z | #!/usr/bin/env python3
## be able to quickly find password using alpha characters
## no password file
## build engine to do it ourselves
import random
import time
chars = 'abcdefghijklmnopqrstuvwxyz0123456789'
chars_list = list(chars)
password = input("What is your pw?") ##kiradeveloper
guess_password = ""
i = 0
na... | 32.931034 | 93 | 0.66178 |
44f35fd24ebecdf59254c4c86c331c278adedd63 | 19,450 | py | Python | python101/code/color_list.py | nirmeshk/mase | c31fb41f39bb7a333f6fd33aa43fa0b23531030a | [
"Unlicense"
] | 9 | 2015-08-23T01:46:56.000Z | 2019-04-25T00:48:21.000Z | python101/code/color_list.py | sadiaTab/mase | 95339dbb045c0613b40d69de9774368c0a2eb5ae | [
"Unlicense"
] | 20 | 2015-08-08T03:39:25.000Z | 2015-11-03T22:22:56.000Z | python101/code/color_list.py | sadiaTab/mase | 95339dbb045c0613b40d69de9774368c0a2eb5ae | [
"Unlicense"
] | 43 | 2015-05-08T05:55:41.000Z | 2020-04-27T14:13:26.000Z | """Code for handling color names and RGB codes.
This module is part of Swampy, and used in Think Python and
Think Complexity, by Allen Downey.
http://greenteapress.com
Copyright 2013 Allen B. Downey.
Distributed under the GNU General Public License at gnu.org/licenses/gpl.html.
"""
import re
# the following is the... | 23.072361 | 78 | 0.708483 |
052484f2072edcdf0fe9853389816fcaa6269b53 | 3,974 | py | Python | tests/test_manager.py | YohannL/KataMarkovChain | b4383791b5cdf5b58fc30ce5b347e008dfbb7bf6 | [
"Apache-2.0"
] | null | null | null | tests/test_manager.py | YohannL/KataMarkovChain | b4383791b5cdf5b58fc30ce5b347e008dfbb7bf6 | [
"Apache-2.0"
] | null | null | null | tests/test_manager.py | YohannL/KataMarkovChain | b4383791b5cdf5b58fc30ce5b347e008dfbb7bf6 | [
"Apache-2.0"
] | null | null | null | """
Project: katamarkovchain
Module: tests
file: test_manager.py
Class: TestManager
"""
from katamarkovchain.core.manager import Manager
from katamarkovchain.core.markovchain import MarkovChain
class TestManager:
"""
pytest class with all tests
"""
@staticmethod
def test_create_new_mv():
... | 29.879699 | 73 | 0.630599 |
37f992c3ed89483e54990af0f9c30d56f1d3edee | 758 | py | Python | Topological Material/SSH model/codes/SSH-band-PBC.py | Hiloxik/Quantum-World | 00d3407cf3810252880af044e5954a30dc35db38 | [
"MIT"
] | null | null | null | Topological Material/SSH model/codes/SSH-band-PBC.py | Hiloxik/Quantum-World | 00d3407cf3810252880af044e5954a30dc35db38 | [
"MIT"
] | null | null | null | Topological Material/SSH model/codes/SSH-band-PBC.py | Hiloxik/Quantum-World | 00d3407cf3810252880af044e5954a30dc35db38 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import cmath
v=1 #intercell hopping
w=0.2 #betweencell hopping
N=8 #number of unit cells
#build the OBC Hamiltonian
hamiltonian = np.zeros((2*N,2*N))
for i in range(0,2*N,2):
hamiltonian[i,i+1] = v
hamiltonian[i+1,i] = v
for i in range(1,2*N-1,... | 24.451613 | 54 | 0.655673 |
f9f62eae97dc913a9ecc49367a285142bb2fb440 | 15,067 | py | Python | BestMVarMASTER.py | jdegene/BioStar | 9473c1a403abbe5caf49ed2277d278c6cce47dca | [
"MIT"
] | null | null | null | BestMVarMASTER.py | jdegene/BioStar | 9473c1a403abbe5caf49ed2277d278c6cce47dca | [
"MIT"
] | null | null | null | BestMVarMASTER.py | jdegene/BioStar | 9473c1a403abbe5caf49ed2277d278c6cce47dca | [
"MIT"
] | null | null | null |
#MASTER
#Ruft MVarSlave auf, laesst hiervon 4 Instanzen auf einmal rechnen
#Das Programm rechnet fuer jede Flaeche alle moeglichen Kombinationen (ohne reihenfolge zu beachten)
#von 11 unabhaengigen Eingangsvariablen die Koeffizienten einer linearen multivariaten Regression
#Fuer das beste Modell gibt das Prog die FL_N... | 30.561866 | 119 | 0.498175 |
a1b1f7cd73bda907479459969ad2127f2876f38b | 467 | py | Python | metaopt/objective/integer/slow/explicit/f.py | cigroup-ol/metaopt | 6dfd5105d3c6eaf00f96670175cae16021069514 | [
"BSD-3-Clause"
] | 8 | 2015-02-02T21:42:23.000Z | 2019-06-30T18:12:43.000Z | metaopt/objective/integer/slow/explicit/f.py | cigroup-ol/metaopt | 6dfd5105d3c6eaf00f96670175cae16021069514 | [
"BSD-3-Clause"
] | 4 | 2015-09-24T14:12:38.000Z | 2021-12-08T22:42:52.000Z | metaopt/objective/integer/slow/explicit/f.py | cigroup-ol/metaopt | 6dfd5105d3c6eaf00f96670175cae16021069514 | [
"BSD-3-Clause"
] | 6 | 2015-02-27T12:35:33.000Z | 2020-10-15T21:04:02.000Z | # -*- coding: utf-8 -*-
"""
Hanging function with integer parameters and explicit maximization.
"""
# Future
from __future__ import absolute_import, division, print_function, \
unicode_literals, with_statement
# Standard Library
from time import sleep
# First Party
from metaopt.core.paramspec.util import param
fr... | 21.227273 | 67 | 0.738758 |
d01f4b109067e97b2c32f71f39d65a8fe557d47f | 1,335 | py | Python | midgard_client/test/test_specification_api.py | hoodieonwho/thorchain-python-client | fccfd66552e16bdab1dbb90b68022475c7a9693d | [
"MIT"
] | null | null | null | midgard_client/test/test_specification_api.py | hoodieonwho/thorchain-python-client | fccfd66552e16bdab1dbb90b68022475c7a9693d | [
"MIT"
] | null | null | null | midgard_client/test/test_specification_api.py | hoodieonwho/thorchain-python-client | fccfd66552e16bdab1dbb90b68022475c7a9693d | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Midgard Public API
The Midgard Public API queries THORChain and any chains linked via the Bifröst and prepares information about the network to be readily available for public users. The API parses transaction event data from THORChain and stores them in a time-series database to make time... | 27.8125 | 435 | 0.71161 |
f436be7b736705fdf8f1bd31e94ca23b8faee38e | 44,256 | py | Python | models/progress.py | osrf/cloudsim-ed-web | f26da401d36544ceb48032bb7e8f8c326201e11f | [
"Apache-2.0"
] | 1 | 2015-04-15T08:38:08.000Z | 2015-04-15T08:38:08.000Z | models/progress.py | osrf/cloudsim-ed-web | f26da401d36544ceb48032bb7e8f8c326201e11f | [
"Apache-2.0"
] | 1 | 2021-06-08T09:49:12.000Z | 2021-06-08T09:49:12.000Z | models/progress.py | osrf/cloudsim-ed-web | f26da401d36544ceb48032bb7e8f8c326201e11f | [
"Apache-2.0"
] | 3 | 2015-10-25T12:39:07.000Z | 2021-06-08T09:47:34.000Z | # Copyright 2012 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 ... | 42.229008 | 80 | 0.592033 |
e50bb01212ca1ed2277bb8a2c81ef2ccca11a570 | 448 | py | Python | train_tracker.py | Aurangazeeb/qwiktools | b9ddaf3cac6ba2a3e26259901de0b1f6dff4410c | [
"Apache-2.0"
] | null | null | null | train_tracker.py | Aurangazeeb/qwiktools | b9ddaf3cac6ba2a3e26259901de0b1f6dff4410c | [
"Apache-2.0"
] | null | null | null | train_tracker.py | Aurangazeeb/qwiktools | b9ddaf3cac6ba2a3e26259901de0b1f6dff4410c | [
"Apache-2.0"
] | null | null | null | def track_error(history, track_metric = 'error'):
# keep a global variable to keep track referring to the same name
global tracking_df
train_err = history[track_metric]
val_err = history['val_' + track_metric]
row = dict(train_error = train_err, val_error = val_err)
row_df = pd.DataFrame(row, index = [0])
... | 44.8 | 67 | 0.736607 |
2e96029ecbeb46cd91cc4e031339aa62b585a229 | 943 | py | Python | murali_recv.py | nmkgm/Cisco_Training_Network_Automation | d188814061c9f648fa8b7485c01c4499bcfa6193 | [
"Apache-2.0"
] | null | null | null | murali_recv.py | nmkgm/Cisco_Training_Network_Automation | d188814061c9f648fa8b7485c01c4499bcfa6193 | [
"Apache-2.0"
] | null | null | null | murali_recv.py | nmkgm/Cisco_Training_Network_Automation | d188814061c9f648fa8b7485c01c4499bcfa6193 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import socket, time
# Checking for functions related to socket
print ([i for i in dir(socket) if 'socket' in i])
# creation of UDP socket
# IPv4 socket will be IPv4 + 2 bytes port
# IPv6 socket will be IPv6 + 2 bytes port
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
# Fo... | 24.179487 | 67 | 0.673383 |
3dfda5cb9566369a666a82445ed88e002b491a59 | 75,770 | py | Python | Lib/test/test_types.py | lostbeta/cpython | e9898bf153d26059261ffef11f7643ae991e2a4c | [
"0BSD"
] | 52,316 | 2015-01-01T15:56:25.000Z | 2022-03-31T23:19:01.000Z | Lib/test/test_types.py | lostbeta/cpython | e9898bf153d26059261ffef11f7643ae991e2a4c | [
"0BSD"
] | 25,286 | 2015-03-03T23:18:02.000Z | 2022-03-31T23:17:27.000Z | Lib/test/test_types.py | lostbeta/cpython | e9898bf153d26059261ffef11f7643ae991e2a4c | [
"0BSD"
] | 31,623 | 2015-01-01T13:29:37.000Z | 2022-03-31T19:55:06.000Z | # Python test set -- part 6, built-in types
from test.support import run_with_locale, cpython_only
import collections.abc
from collections import namedtuple
import copy
import gc
import inspect
import pickle
import locale
import sys
import types
import unittest.mock
import weakref
import typing
T = typing.TypeVar("T... | 36.639265 | 113 | 0.551947 |
eead65a75bc6f311a0870e42a8afca6f7c08a687 | 369 | py | Python | yatube/posts/migrations/0003_auto_20220129_1523.py | VladimirRu1975/hw02_community | 2288eae66afab06e5b8402d2287457feb0712984 | [
"BSD-3-Clause"
] | null | null | null | yatube/posts/migrations/0003_auto_20220129_1523.py | VladimirRu1975/hw02_community | 2288eae66afab06e5b8402d2287457feb0712984 | [
"BSD-3-Clause"
] | null | null | null | yatube/posts/migrations/0003_auto_20220129_1523.py | VladimirRu1975/hw02_community | 2288eae66afab06e5b8402d2287457feb0712984 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.2.19 on 2022-01-29 12:23
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('posts', '0002_auto_20220128_1830'),
]
operations = [
migrations.AlterField(
model_name='group',
name='slug',
... | 19.421053 | 48 | 0.582656 |
f4bcaab3e2ea850bef8544542cb129f222dcb1eb | 1,389 | py | Python | netmiko/watchguard/fireware_ssh.py | mtuska/netmiko | 90ae69a7c251c13e483f7c52629dbbe4356e7a6d | [
"MIT"
] | 2,833 | 2015-01-04T20:04:10.000Z | 2022-03-31T13:03:17.000Z | netmiko/watchguard/fireware_ssh.py | mtuska/netmiko | 90ae69a7c251c13e483f7c52629dbbe4356e7a6d | [
"MIT"
] | 2,137 | 2015-01-28T17:33:41.000Z | 2022-03-31T18:41:21.000Z | netmiko/watchguard/fireware_ssh.py | georgesnow/netmiko | 185f51ca5c24ea2977d6ca31db1ae263aa72cc12 | [
"MIT"
] | 1,367 | 2015-01-04T20:04:10.000Z | 2022-03-31T19:13:28.000Z | import time
from typing import Any
from netmiko.base_connection import BaseConnection
class WatchguardFirewareSSH(BaseConnection):
"""
Implements methods for communicating with Watchguard Firebox firewalls.
"""
def session_preparation(self) -> None:
"""
Prepare the session after the ... | 32.302326 | 88 | 0.643629 |
6c4db15207a7d9326a3a7ccec7a49ed6951f3908 | 2,220 | py | Python | imgproc.py | xuannianz/CRAFT-pytorch | 7a34ae2518f3e94dbfafe6a6128e0e9e4a2f8426 | [
"MIT"
] | null | null | null | imgproc.py | xuannianz/CRAFT-pytorch | 7a34ae2518f3e94dbfafe6a6128e0e9e4a2f8426 | [
"MIT"
] | null | null | null | imgproc.py | xuannianz/CRAFT-pytorch | 7a34ae2518f3e94dbfafe6a6128e0e9e4a2f8426 | [
"MIT"
] | null | null | null | """
Copyright (c) 2019-present NAVER Corp.
MIT License
"""
# -*- coding: utf-8 -*-
import numpy as np
from skimage import io
import cv2
def loadImage(img_file):
img = io.imread(img_file) # RGB order
if img.shape[0] == 2:
img = img[0]
if len(img.shape) == 2:
img = cv2.cvtColor(... | 28.461538 | 102 | 0.630631 |
e33a3db8c21c74dc9859e8cd23843a4c2050aefb | 3,757 | py | Python | tests/integration/cattletest/core/test_ha.py | pranavs18/cattle | db64d9ffc782d82bbbc44709fb23e63b43c3c549 | [
"Apache-2.0"
] | null | null | null | tests/integration/cattletest/core/test_ha.py | pranavs18/cattle | db64d9ffc782d82bbbc44709fb23e63b43c3c549 | [
"Apache-2.0"
] | null | null | null | tests/integration/cattletest/core/test_ha.py | pranavs18/cattle | db64d9ffc782d82bbbc44709fb23e63b43c3c549 | [
"Apache-2.0"
] | null | null | null | from common_fixtures import * # NOQA
def _process_names(processes):
return set([x.processName for x in processes])
def test_container_ha_default(admin_client, sim_context):
c = admin_client.create_container(imageUuid=sim_context['imageUuid'],
data={'simForgetImmediatel... | 36.475728 | 74 | 0.570934 |
c355df45aa4b60543f2b6b996f3bcb1210d92753 | 1,634 | py | Python | oo/pessoa.py | Marcio-Souza/pythonbirds | 4a86e28e4a91a5f33bd17094e334e58d17ef630b | [
"MIT"
] | null | null | null | oo/pessoa.py | Marcio-Souza/pythonbirds | 4a86e28e4a91a5f33bd17094e334e58d17ef630b | [
"MIT"
] | null | null | null | oo/pessoa.py | Marcio-Souza/pythonbirds | 4a86e28e4a91a5f33bd17094e334e58d17ef630b | [
"MIT"
] | null | null | null | class Pessoa:
olhos = 2
def __init__(self, *filhos, nome=None, idade=35):
self.idade = idade
self.nome = nome
self.filhos = list(filhos)
def cumprimentar(self):
return f'Olá, meu nome é {self.nome}'
@staticmethod
def metodo_estatico():
return 42
@class... | 26.786885 | 84 | 0.667075 |
463a35ba621a0e645661a747732f4813670c8a66 | 7,225 | py | Python | notebooks/Instaseis-Syngine/Instaseis_Tutorial_04_finite_source_solution.py | krischer/seismo_live_build | e4e8e59d9bf1b020e13ac91c0707eb907b05b34f | [
"CC-BY-3.0"
] | 3 | 2020-07-11T10:01:39.000Z | 2020-12-16T14:26:03.000Z | notebooks/Instaseis-Syngine/Instaseis_Tutorial_04_finite_source_solution.py | krischer/seismo_live_build | e4e8e59d9bf1b020e13ac91c0707eb907b05b34f | [
"CC-BY-3.0"
] | null | null | null | notebooks/Instaseis-Syngine/Instaseis_Tutorial_04_finite_source_solution.py | krischer/seismo_live_build | e4e8e59d9bf1b020e13ac91c0707eb907b05b34f | [
"CC-BY-3.0"
] | 3 | 2020-11-11T05:05:41.000Z | 2022-03-12T09:36:24.000Z | # ---
# jupyter:
# jupytext:
# text_representation:
# extension: .py
# format_name: light
# format_version: '1.4'
# jupytext_version: 1.2.4
# kernelspec:
# display_name: Python 3
# language: python
# name: python3
# ---
# <div style='background-image: url("../share/images/he... | 44.325153 | 533 | 0.740484 |
58496c5dc7dd24e5e1b00a7b2a61bc1b683a3806 | 3,602 | py | Python | airflow/ti_deps/deps/prev_dagrun_dep.py | IGIT-CN/airflow | a6e5bcd59198afe5716813e84ebc4c59eade532c | [
"Apache-2.0"
] | 8 | 2017-04-20T16:15:44.000Z | 2020-10-11T13:44:10.000Z | airflow/ti_deps/deps/prev_dagrun_dep.py | IGIT-CN/airflow | a6e5bcd59198afe5716813e84ebc4c59eade532c | [
"Apache-2.0"
] | 219 | 2017-03-15T18:40:16.000Z | 2022-02-28T22:52:43.000Z | airflow/ti_deps/deps/prev_dagrun_dep.py | IGIT-CN/airflow | a6e5bcd59198afe5716813e84ebc4c59eade532c | [
"Apache-2.0"
] | 3 | 2016-07-14T21:51:10.000Z | 2020-10-12T13:26:36.000Z | #
# 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... | 41.883721 | 90 | 0.640478 |
4e3c5bd1f295508606e60299794f1d3b2c3d9d4f | 5,785 | py | Python | smokey/test/test_hdfs_api.py | godatadriven/hdp-smokey | b60c6941d77b66b4f84747d5fe10c972db88f7f7 | [
"Apache-2.0"
] | 1 | 2018-02-11T14:05:06.000Z | 2018-02-11T14:05:06.000Z | smokey/test/test_hdfs_api.py | godatadriven/hdp-smokey | b60c6941d77b66b4f84747d5fe10c972db88f7f7 | [
"Apache-2.0"
] | null | null | null | smokey/test/test_hdfs_api.py | godatadriven/hdp-smokey | b60c6941d77b66b4f84747d5fe10c972db88f7f7 | [
"Apache-2.0"
] | 1 | 2021-01-29T18:08:53.000Z | 2021-01-29T18:08:53.000Z | # flake8: noqa
import unittest
from unittest.mock import Mock, patch
import hdfs.hdfs_api as api
class TestHdfsApi(unittest.TestCase):
def setUp(self):
self.hdfs = api.HdfsApi(request_timeout=2)
self.correct_output = """
"FSCK started by tester (auth:KERBEROS_SSL) from /192.168.0.489 for path /us... | 61.542553 | 236 | 0.747969 |
3c96be284b08338dd3935f89e00bb090ff43ccbe | 2,467 | py | Python | django_matplotlib/views.py | shelldweller/django-matplotlib | f2d7ecb2a263b8b01f7c6c0db63223e5d8c5b0d2 | [
"MIT",
"Unlicense"
] | 2 | 2018-07-13T03:35:04.000Z | 2020-03-18T18:06:32.000Z | django_matplotlib/views.py | shelldweller/django-matplotlib | f2d7ecb2a263b8b01f7c6c0db63223e5d8c5b0d2 | [
"MIT",
"Unlicense"
] | null | null | null | django_matplotlib/views.py | shelldweller/django-matplotlib | f2d7ecb2a263b8b01f7c6c0db63223e5d8c5b0d2 | [
"MIT",
"Unlicense"
] | null | null | null | import django_matplotlib.settings as mpl_settings
from django_matplotlib.mapping import extract_kwargs, KNOWN_CHART_LIST, str2num, str2bool
import matplotlib
from django.http import HttpResponse, HttpResponseNotFound
matplotlib.use(mpl_settings.BACKEND)
from matplotlib import pyplot
def plot_view(request, plot_typ... | 35.753623 | 89 | 0.675719 |
f7622a47090f6e6a819c495ef27a4a1e1d020d7b | 145,923 | py | Python | src/config/api-server/vnc_cfg_api_server.py | sagarc-contrail/contrail-controller | 834302367f3ff81f1ce93f4036b6b3788dfd6994 | [
"Apache-2.0"
] | null | null | null | src/config/api-server/vnc_cfg_api_server.py | sagarc-contrail/contrail-controller | 834302367f3ff81f1ce93f4036b6b3788dfd6994 | [
"Apache-2.0"
] | null | null | null | src/config/api-server/vnc_cfg_api_server.py | sagarc-contrail/contrail-controller | 834302367f3ff81f1ce93f4036b6b3788dfd6994 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
"""
This is the main module in vnc_cfg_api_server package. It manages interaction
between http/rest, address management, authentication and database interfaces.
"""
from gevent import monkey
monkey.patch_all()
from gevent import hub
# from neutron p... | 41.209545 | 136 | 0.587961 |
6e5170c0adeac0389353dfd652ac174e98f9ba8b | 744 | py | Python | manage.py | omukankurunziza/Blog-app | aca53cd0321c3a81afbb3f14085c5b48515d04c3 | [
"MIT"
] | null | null | null | manage.py | omukankurunziza/Blog-app | aca53cd0321c3a81afbb3f14085c5b48515d04c3 | [
"MIT"
] | null | null | null | manage.py | omukankurunziza/Blog-app | aca53cd0321c3a81afbb3f14085c5b48515d04c3 | [
"MIT"
] | null | null | null | from app import create_app,db
from flask_script import Manager,Server
from app.models import User,Post,Comment,Email
from flask_migrate import Migrate, MigrateCommand
# Creating app instance
app = create_app('production')
app = create_app('test')
manager = Manager(app)
manager.add_command('server',Server)
migrate ... | 25.655172 | 93 | 0.737903 |
6512049d8dec3c9e51df263271c2589d77c003a7 | 3,142 | py | Python | utils/transform.py | posm/osm-export-tool2 | 5a1f4096f1afbe7420363376e6e1e8d42e47e1d1 | [
"BSD-3-Clause"
] | 2 | 2018-08-31T18:30:28.000Z | 2018-11-27T01:50:06.000Z | utils/transform.py | posm/osm-export-tool2 | 5a1f4096f1afbe7420363376e6e1e8d42e47e1d1 | [
"BSD-3-Clause"
] | null | null | null | utils/transform.py | posm/osm-export-tool2 | 5a1f4096f1afbe7420363376e6e1e8d42e47e1d1 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import argparse
import logging
import os
import subprocess
from string import Template
from osgeo import gdal, ogr, osr
logger = logging.getLogger(__name__)
class TransformSQlite(object):
"""
Applies a schema transformation to a sqlite database.
NOT IMPLEMENTED YET
"""
... | 36.114943 | 125 | 0.617123 |
59087db67b664a98d6a194bbf830c6c8fa83c4e9 | 1,633 | py | Python | absen/hadir/forms.py | petr0max/absensi | 79eb2d9ad9ff76eb59a1353d5d9d44a4822a7b92 | [
"MIT"
] | null | null | null | absen/hadir/forms.py | petr0max/absensi | 79eb2d9ad9ff76eb59a1353d5d9d44a4822a7b92 | [
"MIT"
] | null | null | null | absen/hadir/forms.py | petr0max/absensi | 79eb2d9ad9ff76eb59a1353d5d9d44a4822a7b92 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import (StringField, SubmitField, DateField, DateTimeField,
IntegerField, TimeField, BooleanField)
from wtforms.validators import DataRequired, Length, Optional
class PermitForm(FlaskForm):
long_date = IntegerField('Izin Berapa Hari', validators=[D... | 39.829268 | 77 | 0.63319 |
23ea70c77eec5725e9b351011e9b728445aaa4ae | 2,115 | py | Python | yt_dlp/extractor/vupload.py | nxtreaming/yt-dlp | 385ffb467b2285e85a2a5495b90314ba1f8e0700 | [
"Unlicense"
] | 11 | 2022-01-06T22:09:50.000Z | 2022-03-12T22:26:22.000Z | yt_dlp/extractor/vupload.py | nxtreaming/yt-dlp | 385ffb467b2285e85a2a5495b90314ba1f8e0700 | [
"Unlicense"
] | 4 | 2022-02-25T08:20:18.000Z | 2022-03-17T16:16:20.000Z | yt_dlp/extractor/vupload.py | nxtreaming/yt-dlp | 385ffb467b2285e85a2a5495b90314ba1f8e0700 | [
"Unlicense"
] | 3 | 2022-02-19T08:59:13.000Z | 2022-03-06T16:11:21.000Z | from .common import InfoExtractor
from ..utils import (
parse_duration,
parse_filesize,
extract_attributes,
int_or_none,
js_to_json
)
class VuploadIE(InfoExtractor):
_VALID_URL = r'https://vupload\.com/v/(?P<id>[a-z0-9]+)'
_TESTS = [{
'url': 'https://vupload.com/v/u28d0pl2tphy',
... | 39.90566 | 142 | 0.594326 |
f1da70106066c1ea8dc3d5d257318418bc219030 | 3,716 | py | Python | aliyun-python-sdk-dcdn/aliyunsdkdcdn/request/v20180115/DescribeDcdnUserDomainsRequest.py | leafcoder/aliyun-openapi-python-sdk | 26b441ab37a5cda804de475fd5284bab699443f1 | [
"Apache-2.0"
] | 1 | 2020-12-05T03:03:46.000Z | 2020-12-05T03:03:46.000Z | aliyun-python-sdk-dcdn/aliyunsdkdcdn/request/v20180115/DescribeDcdnUserDomainsRequest.py | leafcoder/aliyun-openapi-python-sdk | 26b441ab37a5cda804de475fd5284bab699443f1 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-dcdn/aliyunsdkdcdn/request/v20180115/DescribeDcdnUserDomainsRequest.py | leafcoder/aliyun-openapi-python-sdk | 26b441ab37a5cda804de475fd5284bab699443f1 | [
"Apache-2.0"
] | null | null | null | # 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... | 34.407407 | 89 | 0.757804 |
afa3b49c0c86bb9d044ade6dda42f635d8e95e8c | 6,561 | py | Python | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/chebyshev.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2019-07-29T02:53:51.000Z | 2019-07-29T02:53:51.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/chebyshev.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 1 | 2021-09-11T14:30:32.000Z | 2021-09-11T14:30:32.000Z | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/pygsl/chebyshev.py | poojavade/Genomics_Docker | 829b5094bba18bbe03ae97daf925fee40a8476e8 | [
"Apache-2.0"
] | 2 | 2016-12-19T02:27:46.000Z | 2019-07-29T02:53:54.000Z | #!/usr/bin/env python
# Author : Pierre Schnizer
"""
This module describes routines for computing Chebyshev
approximations to univariate functions. A Chebyshev approximation is a
truncation of the series \M{f(x) = S{sum} c_n T_n(x)}, where the Chebyshev
polynomials \M{T_n(x) = cos(n \arccos x)} provide an orthogonal ... | 28.903084 | 79 | 0.607072 |
4f6aad09ac14ae9cf1203089653f96e5eaaf0fd1 | 1,253 | py | Python | setup.py | xiaomo123zk/MapMatching4GMNS-v0.2.2-master | 82d22bc0a51c8a84bfb4782a7a39a13cc9972814 | [
"Apache-2.0"
] | 1 | 2021-04-12T08:04:55.000Z | 2021-04-12T08:04:55.000Z | setup.py | xiaomo123zk/trace2route | 82d22bc0a51c8a84bfb4782a7a39a13cc9972814 | [
"Apache-2.0"
] | null | null | null | setup.py | xiaomo123zk/trace2route | 82d22bc0a51c8a84bfb4782a7a39a13cc9972814 | [
"Apache-2.0"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="MapMatching4GMNS",
version="0.2.2",
author="Xuesong (Simon) Zhou, Kai (Frank) Zhang, Jiawei Lu",
author_email="xzhou74@asu.edu, zhangk2019@seu.edu.cn, jiaweil9@asu.edu",
... | 44.75 | 106 | 0.671189 |
7f1445ec068657ef4cccc13bb930ddbbaf9c1265 | 3,384 | py | Python | horovod/runner/common/util/settings.py | dalian-ai/horovod | 7707267a4bef79e09a9df1d41b0652feb61b76c7 | [
"Apache-2.0"
] | 5,089 | 2017-08-10T20:44:50.000Z | 2019-02-12T00:45:34.000Z | horovod/runner/common/util/settings.py | dalian-ai/horovod | 7707267a4bef79e09a9df1d41b0652feb61b76c7 | [
"Apache-2.0"
] | 669 | 2017-08-11T21:33:41.000Z | 2019-02-12T01:02:17.000Z | horovod/runner/common/util/settings.py | dalian-ai/horovod | 7707267a4bef79e09a9df1d41b0652feb61b76c7 | [
"Apache-2.0"
] | 706 | 2017-08-11T00:30:43.000Z | 2019-02-11T12:00:34.000Z | # Copyright 2019 Uber Technologies, 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 applica... | 45.12 | 108 | 0.675236 |
5080b9b4f1a32e00b2322db6f758d933ea9337d3 | 11,750 | py | Python | notebooks/archive/phoenix/phoenix/scrapers/wb_metadata_scraper.py | worldbank/wb-nlp-apps | c2537c6d1f0716c5f8edc3e69dd15732b3ee3d71 | [
"MIT"
] | 6 | 2021-06-30T03:41:30.000Z | 2022-03-05T22:57:44.000Z | notebooks/archive/phoenix/phoenix/scrapers/wb_metadata_scraper.py | worldbank/wb-nlp-apps | c2537c6d1f0716c5f8edc3e69dd15732b3ee3d71 | [
"MIT"
] | null | null | null | notebooks/archive/phoenix/phoenix/scrapers/wb_metadata_scraper.py | worldbank/wb-nlp-apps | c2537c6d1f0716c5f8edc3e69dd15732b3ee3d71 | [
"MIT"
] | 3 | 2021-08-20T04:29:10.000Z | 2021-10-04T18:58:49.000Z | import requests
import json
import os
import time
import glob
import pandas as pd
import re
from joblib import Parallel, delayed
from phoenix.path_manager import get_corpus_path
from phoenix.dataset.document import DocumentDB
from phoenix.scrapers.utils import (
download_with_retry,
normalize_str_col,
coll... | 38.273616 | 842 | 0.668 |
542481b3077ee7228f266fe40b4649943070b234 | 1,170 | py | Python | script/spider_launcher.py | 915288938lx/Personae-master-01 | 0885c37956bd3f9157c66109e09755a51ad5d3a1 | [
"MIT"
] | null | null | null | script/spider_launcher.py | 915288938lx/Personae-master-01 | 0885c37956bd3f9157c66109e09755a51ad5d3a1 | [
"MIT"
] | null | null | null | script/spider_launcher.py | 915288938lx/Personae-master-01 | 0885c37956bd3f9157c66109e09755a51ad5d3a1 | [
"MIT"
] | null | null | null | import paramiko
import sys
from helper.args_parser import stock_codes, future_codes
def launch_model():
# Spider name.
spider_name = 'stock'
# Codes.
# codes = stock_codes
codes = ['sh']
# Start date.
start = "2008-01-01"
# End date.
end = "2019-07-19"
# Mounted dir.
moun... | 22.5 | 91 | 0.617094 |
bed8c30ede7c161001cb0ce5b4248c8a74cb188e | 57 | py | Python | superset/models/__init__.py | Prepsmith/incubator-superset | 834dbab3304d3e71dc53f298658ed51eb55956d7 | [
"Apache-2.0"
] | 2 | 2018-12-04T07:47:02.000Z | 2021-08-12T01:43:34.000Z | superset/models/__init__.py | Prepsmith/incubator-superset | 834dbab3304d3e71dc53f298658ed51eb55956d7 | [
"Apache-2.0"
] | 3 | 2021-09-08T21:26:28.000Z | 2022-03-29T22:28:44.000Z | superset/models/__init__.py | Prepsmith/incubator-superset | 834dbab3304d3e71dc53f298658ed51eb55956d7 | [
"Apache-2.0"
] | 4 | 2017-04-28T07:52:00.000Z | 2017-05-03T12:34:41.000Z | from . import core # noqa
from . import sql_lab # noqa
| 19 | 29 | 0.684211 |
a69b1eeca6fc017c3118d3b545f07dacaa100c1f | 2,907 | py | Python | dockstream/utils/entry_point_functions/write_out.py | niladell/DockStream | 75f06d24a95699cdc06fe1ea021e213e1d9fa5b3 | [
"Apache-2.0"
] | 34 | 2021-08-05T06:28:30.000Z | 2022-03-17T02:42:49.000Z | dockstream/utils/entry_point_functions/write_out.py | niladell/DockStream | 75f06d24a95699cdc06fe1ea021e213e1d9fa5b3 | [
"Apache-2.0"
] | 9 | 2021-08-31T10:35:51.000Z | 2022-02-03T08:57:58.000Z | dockstream/utils/entry_point_functions/write_out.py | niladell/DockStream | 75f06d24a95699cdc06fe1ea021e213e1d9fa5b3 | [
"Apache-2.0"
] | 10 | 2021-08-12T02:32:11.000Z | 2022-01-19T11:51:33.000Z | from dockstream.utils.enums.docking_enum import DockingConfigurationEnum, ResultKeywordsEnum
from dockstream.utils.enums.ligand_preparation_enum import LigandPreparationEnum
from dockstream.utils.enums.logging_enums import LoggingConfigEnum
from dockstream.utils.general_utils import *
def handle_poses_writeout(docki... | 48.45 | 105 | 0.684899 |
c6a2d3f7977b4f9d0dcb5bce811c7d7d8e05f6da | 877 | py | Python | py/models.py | redmanatee/field-promotion | bba3fc1ffcd77587a10e85bbfb5820f86242649c | [
"MIT"
] | null | null | null | py/models.py | redmanatee/field-promotion | bba3fc1ffcd77587a10e85bbfb5820f86242649c | [
"MIT"
] | null | null | null | py/models.py | redmanatee/field-promotion | bba3fc1ffcd77587a10e85bbfb5820f86242649c | [
"MIT"
] | null | null | null | from google.appengine.ext import ndb
from google.appengine.api import memcache
class Game(ndb.Model):
date = ndb.DateProperty(required=True)
created_at = ndb.DateTimeProperty()
player_faction = ndb.StringProperty(required=True)
player_warcaster = ndb.StringProperty(required=True)
opponent_name = ndb.StringPropert... | 32.481481 | 55 | 0.786773 |
6b41b211f7c09cafb0e04a27ec306bec1b61c377 | 136 | py | Python | configs/end2end/eqlv2_r50_8x2_1x.py | tztztztztz/eqlv2.mmdet | 907fad905b0cac6372f7ec4035f48ef3d0801098 | [
"Apache-2.0"
] | 95 | 2020-12-17T10:09:36.000Z | 2022-03-31T13:44:44.000Z | configs/end2end/eqlv2_r50_8x2_1x.py | tztztztztz/eqlv2.mmdet | 907fad905b0cac6372f7ec4035f48ef3d0801098 | [
"Apache-2.0"
] | 19 | 2021-03-20T00:58:47.000Z | 2022-03-30T12:02:11.000Z | configs/end2end/eqlv2_r50_8x2_1x.py | tztztztztz/eqlv2.mmdet | 907fad905b0cac6372f7ec4035f48ef3d0801098 | [
"Apache-2.0"
] | 14 | 2021-03-19T13:03:06.000Z | 2022-02-26T23:50:55.000Z | _base_ = ['./mask_rcnn_r50_8x2_1x.py']
model = dict(roi_head=dict(bbox_head=dict(loss_cls=dict(type="EQLv2"))))
work_dir = 'eqlv2_1x'
| 22.666667 | 72 | 0.727941 |
58135fd4d939d08aaa9181635bc78a4e441397b2 | 489 | py | Python | tests/test_system.py | i4s-pserrano/python-nomad | 0f8dd9dfa1d448465be490f0acf9f5df96cd893f | [
"MIT"
] | 109 | 2016-06-06T09:18:02.000Z | 2022-03-17T17:41:20.000Z | tests/test_system.py | i4s-pserrano/python-nomad | 0f8dd9dfa1d448465be490f0acf9f5df96cd893f | [
"MIT"
] | 104 | 2016-06-04T23:06:06.000Z | 2021-12-08T04:49:43.000Z | tests/test_system.py | i4s-pserrano/python-nomad | 0f8dd9dfa1d448465be490f0acf9f5df96cd893f | [
"MIT"
] | 80 | 2016-06-05T00:33:23.000Z | 2021-11-20T15:17:38.000Z | import pytest
# integration tests requires nomad Vagrant VM or Binary running
def test_initiate_garbage_collection(nomad_setup):
nomad_setup.system.initiate_garbage_collection()
def test_dunder_str(nomad_setup):
assert isinstance(str(nomad_setup.system), str)
def test_dunder_repr(nomad_setup):
assert ... | 23.285714 | 63 | 0.793456 |
7cf865b8bea089b1bf20927c563734957876afab | 698 | py | Python | run_tests.py | littleblackfish/gimmemotifs | 913a6e5db378493155273e2c0f8ab0dc11ab219e | [
"MIT"
] | null | null | null | run_tests.py | littleblackfish/gimmemotifs | 913a6e5db378493155273e2c0f8ab0dc11ab219e | [
"MIT"
] | null | null | null | run_tests.py | littleblackfish/gimmemotifs | 913a6e5db378493155273e2c0f8ab0dc11ab219e | [
"MIT"
] | null | null | null | import os
import re
import sys
import unittest
from glob import glob
if __name__ == "__main__":
def get_tests():
start_dir = os.path.join(os.path.dirname(__file__), "test")
return unittest.TestLoader().discover(start_dir, pattern="test_*.py")
libdirs = glob('build/lib.*')
if len(libdirs) >... | 25.851852 | 77 | 0.630372 |
02c7d1e047e25547a5a7f79b873e2ecb67b05aec | 1,924 | py | Python | bingads/v13/bulk/entities/audiences/bulk_in_market_audience.py | pawelulita/BingAds-Python-SDK | e7b5a618e87a43d0a5e2c79d9aa4626e208797bd | [
"MIT"
] | 86 | 2016-02-29T03:24:28.000Z | 2022-03-29T09:30:21.000Z | bingads/v13/bulk/entities/audiences/bulk_in_market_audience.py | pawelulita/BingAds-Python-SDK | e7b5a618e87a43d0a5e2c79d9aa4626e208797bd | [
"MIT"
] | 135 | 2016-04-12T13:31:28.000Z | 2022-03-29T02:18:51.000Z | bingads/v13/bulk/entities/audiences/bulk_in_market_audience.py | pawelulita/BingAds-Python-SDK | e7b5a618e87a43d0a5e2c79d9aa4626e208797bd | [
"MIT"
] | 154 | 2016-04-08T04:11:27.000Z | 2022-03-29T21:21:07.000Z | from bingads.v13.bulk.entities import *
from bingads.service_client import _CAMPAIGN_OBJECT_FACTORY_V13
from bingads.v13.internal.bulk.entities.single_record_bulk_entity import _SingleRecordBulkEntity
from bingads.v13.internal.bulk.mappings import _SimpleBulkMapping
from bingads.v13.internal.bulk.string_table import _S... | 40.93617 | 108 | 0.759875 |
6ecab4136ece9d264078558acebcf347164b541b | 680 | py | Python | backend/apps/sampleapp/migrations/0001_initial.py | domasx2/django-angular-docker-seed | 5c1ad6d62d179c9cb5cdbf7b1254576efa63b2fb | [
"Unlicense"
] | 32 | 2015-04-27T02:01:59.000Z | 2021-04-06T10:19:42.000Z | backend/apps/sampleapp/migrations/0001_initial.py | domasx2/django-angular-docker-seed | 5c1ad6d62d179c9cb5cdbf7b1254576efa63b2fb | [
"Unlicense"
] | 14 | 2015-03-21T08:20:34.000Z | 2016-02-15T07:07:39.000Z | backend/apps/sampleapp/migrations/0001_initial.py | domasx2/django-angular-docker-seed | 5c1ad6d62d179c9cb5cdbf7b1254576efa63b2fb | [
"Unlicense"
] | 21 | 2015-03-18T18:40:12.000Z | 2021-03-16T22:12:44.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Task',
fields=[
('id', models.AutoField(auto_cr... | 26.153846 | 114 | 0.55 |
e558ad01971fad5b1afc1bf0923826e851311d62 | 279 | py | Python | app/__init__.py | ednoguera/python-rpg-game-api | 4e3ee988a5175c46e0e2503e028167fa910ee8e8 | [
"MIT"
] | null | null | null | app/__init__.py | ednoguera/python-rpg-game-api | 4e3ee988a5175c46e0e2503e028167fa910ee8e8 | [
"MIT"
] | 1 | 2020-11-26T14:12:11.000Z | 2020-11-26T14:12:11.000Z | app/__init__.py | ednoguera/python-rpg-game-api | 4e3ee988a5175c46e0e2503e028167fa910ee8e8 | [
"MIT"
] | 1 | 2022-03-03T23:59:44.000Z | 2022-03-03T23:59:44.000Z | from flask import Flask
from app.views.index_view import bp as index_bp
from app.views.create_character_view import bp as character_bp
def create_app():
app = Flask(__name__)
app.register_blueprint(index_bp)
app.register_blueprint(character_bp)
return app | 23.25 | 62 | 0.770609 |
4626ab5fdb7231cb5c54bd191e0110aec2a94a75 | 10,433 | py | Python | chempy/util/table.py | matecsaj/chempy | 2c93f185e4547739331193c06d77282206621517 | [
"BSD-2-Clause"
] | null | null | null | chempy/util/table.py | matecsaj/chempy | 2c93f185e4547739331193c06d77282206621517 | [
"BSD-2-Clause"
] | null | null | null | chempy/util/table.py | matecsaj/chempy | 2c93f185e4547739331193c06d77282206621517 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Convenience functions for presenting reaction systems in tables.
"""
from __future__ import (absolute_import, division, print_function)
import os
import shutil
import subprocess
import tempfile
from ..printing import latex
from ..kinetics.rates import RadiolyticBase
from ..units import to... | 31.905199 | 89 | 0.570689 |
ff06e0c511fe9cf00eabaa07a9c888c19c85c63e | 3,466 | py | Python | data_managers/data_manager_kallisto_index_builder/data_manager/kallisto_index_builder.py | supernord/tools-iuc | 9a0c41967765d120a8fc519c0c7f09cbe3a6efbe | [
"MIT"
] | 142 | 2015-03-13T18:08:34.000Z | 2022-03-30T23:52:34.000Z | data_managers/data_manager_kallisto_index_builder/data_manager/kallisto_index_builder.py | mtekman/tools-iuc | 95f1ae4ed1cdd56114df76d215f9e1ed549aa4c5 | [
"MIT"
] | 3,402 | 2015-01-05T18:04:20.000Z | 2022-03-30T22:09:36.000Z | data_managers/data_manager_kallisto_index_builder/data_manager/kallisto_index_builder.py | willemdek11/tools-iuc | dc0a0cf275168c2a88ee3dc47652dd7ca1137871 | [
"MIT"
] | 438 | 2015-01-07T20:33:59.000Z | 2022-03-30T04:39:18.000Z | #!/usr/bin/env python
# Based heavily on the Bowtie 2 data manager wrapper script by Dan Blankenberg
from __future__ import print_function
import argparse
import json
import os
import subprocess
import sys
DEFAULT_DATA_TABLE_NAME = "kallisto_indexes"
def get_id_name(params, dbkey, fasta_description=None):
# TOD... | 40.776471 | 124 | 0.7412 |
70a055369d2e29b7d8ed993d47c0e9d0955c3bb4 | 420 | py | Python | DataStructAndAlgo/SStack.py | ggwhsd/PythonPractice | 58248be9bb5700bc9a1914f8e41c30931fad8b82 | [
"MIT"
] | null | null | null | DataStructAndAlgo/SStack.py | ggwhsd/PythonPractice | 58248be9bb5700bc9a1914f8e41c30931fad8b82 | [
"MIT"
] | null | null | null | DataStructAndAlgo/SStack.py | ggwhsd/PythonPractice | 58248be9bb5700bc9a1914f8e41c30931fad8b82 | [
"MIT"
] | null | null | null | class StackUnderflow(ValueError):
pass
class SStack():
def __init__(self):
self._elems = []
def is_empty(self):
return self._elems == []
def top(self):
if self._elems == []:
raise StackUnderflow("in SStack.top()")
return self._elems[-1]
def push(self,elem):
self._elems.append(elem)
def pop(self)... | 17.5 | 44 | 0.654762 |
d4266f110be784b8c182618deb7c2bed7089ca13 | 2,942 | py | Python | coopeV3/templatetags/vip.py | nanoy42/coope | 3f970fe199f4ad8672cbb3a3200b0c4d110c9847 | [
"MIT"
] | 3 | 2019-06-27T21:08:41.000Z | 2019-09-07T17:20:39.000Z | coopeV3/templatetags/vip.py | nanoy42/coope | 3f970fe199f4ad8672cbb3a3200b0c4d110c9847 | [
"MIT"
] | 21 | 2019-06-09T10:56:53.000Z | 2021-06-10T21:35:12.000Z | coopeV3/templatetags/vip.py | nanoy42/coope | 3f970fe199f4ad8672cbb3a3200b0c4d110c9847 | [
"MIT"
] | null | null | null | from django import template
import random
from preferences.models import GeneralPreferences
register = template.Library()
@register.simple_tag
def president():
"""
A tag which returns :attr:`preferences.models.GeneralPreferences.president`.
"""
gp,_ = GeneralPreferences.objects.get_or_create(pk=1)
... | 29.42 | 109 | 0.682189 |
bfaa86dccfebcc665040bc82643a9a0db783e87d | 2,174 | py | Python | chainercv/links/model/pixelwise_softmax_classifier.py | iory/chainercv | ecb1953f78c526dfd38308d68a4094c9f4df3a8d | [
"MIT"
] | 1 | 2018-08-24T02:28:31.000Z | 2018-08-24T02:28:31.000Z | chainercv/links/model/pixelwise_softmax_classifier.py | iory/chainercv | ecb1953f78c526dfd38308d68a4094c9f4df3a8d | [
"MIT"
] | null | null | null | chainercv/links/model/pixelwise_softmax_classifier.py | iory/chainercv | ecb1953f78c526dfd38308d68a4094c9f4df3a8d | [
"MIT"
] | 2 | 2019-12-16T02:20:26.000Z | 2022-01-17T02:00:49.000Z | import chainer
from chainer.backends import cuda
import chainer.functions as F
from chainer import reporter
import numpy as np
class PixelwiseSoftmaxClassifier(chainer.Chain):
"""A pixel-wise classifier.
It computes the loss based on a given input/label pair for
semantic segmentation.
Args:
... | 32.939394 | 75 | 0.649494 |
6028378a36889501280b602ea6d96c50da7ac963 | 2,669 | py | Python | rlkit/torch/bc/bc.py | yifan-you-37/rl_swiss | 8b0ee7caa5c1fa93860916004cf4fd970667764f | [
"MIT"
] | 56 | 2019-10-20T03:09:02.000Z | 2022-03-25T09:21:40.000Z | rlkit/torch/bc/bc.py | yifan-you-37/rl_swiss | 8b0ee7caa5c1fa93860916004cf4fd970667764f | [
"MIT"
] | 3 | 2020-10-01T07:33:51.000Z | 2021-05-12T03:40:57.000Z | rlkit/torch/bc/bc.py | yifan-you-37/rl_swiss | 8b0ee7caa5c1fa93860916004cf4fd970667764f | [
"MIT"
] | 10 | 2019-11-04T16:56:09.000Z | 2022-03-25T09:21:41.000Z | import numpy as np
from collections import OrderedDict
import torch
import torch.optim as optim
import rlkit.torch.pytorch_util as ptu
from rlkit.torch.core import np_to_pytorch_batch
from rlkit.torch.torch_base_algorithm import TorchBaseAlgorithm
class BC(TorchBaseAlgorithm):
def __init__(
self,
... | 29.01087 | 81 | 0.61746 |
e724d43731f4e7a591067985809c84d78861cfab | 2,015 | py | Python | pyscripts/all_swaps.py | dlabrie/shakescripts-python | 1ac2d17b50754f2fad91df5715c99f023a42ccb2 | [
"MIT"
] | 1 | 2021-07-23T09:15:36.000Z | 2021-07-23T09:15:36.000Z | pyscripts/all_swaps.py | dlabrie/shakescripts-python | 1ac2d17b50754f2fad91df5715c99f023a42ccb2 | [
"MIT"
] | null | null | null | pyscripts/all_swaps.py | dlabrie/shakescripts-python | 1ac2d17b50754f2fad91df5715c99f023a42ccb2 | [
"MIT"
] | null | null | null | from modules.shakepay import *
updateTransactions()
print("\nProcessing...")
swaps = all_swaps()
swapsSummary = {}
for swapper in swaps:
if swaps[swapper] != 0:
transactions = swapperTransactions(swapper)
lastTransaction = list(transactions.keys())[0]
swapsSummary[lastTransaction] = {"cre... | 54.459459 | 335 | 0.683871 |
06fe062182a648205186fcfd2ff878f9d9414b42 | 77,749 | py | Python | pacu.py | aaronrea/pacu | b345370df18ed4148bf2d2184192c773d7d832e0 | [
"BSD-3-Clause"
] | 1 | 2021-11-20T21:27:50.000Z | 2021-11-20T21:27:50.000Z | pacu.py | aaronrea/pacu | b345370df18ed4148bf2d2184192c773d7d832e0 | [
"BSD-3-Clause"
] | 1 | 2021-06-02T02:39:40.000Z | 2021-06-02T02:39:40.000Z | pacu.py | aaronrea/pacu | b345370df18ed4148bf2d2184192c773d7d832e0 | [
"BSD-3-Clause"
] | 1 | 2021-09-14T01:14:50.000Z | 2021-09-14T01:14:50.000Z | #!/usr/bin/env python3
import copy
import importlib
import json
import os
import random
import re
import shlex
import subprocess
import datetime
import sys
import time
import traceback
import argparse
try:
import requests
import boto3
import botocore
import urllib.parse
import configure_settings
... | 47.523839 | 423 | 0.55876 |
2658d72fa7002d87460ef9013e14045b7581e4a9 | 3,428 | py | Python | sdk/python/pulumi_azure_native/documentdb/v20210301preview/list_notebook_workspace_connection_info.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20210301preview/list_notebook_workspace_connection_info.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/documentdb/v20210301preview/list_notebook_workspace_connection_info.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | 41.804878 | 189 | 0.712369 |
27b23d6e4cc910fbbad493964f76b738dfc09d0e | 11,582 | py | Python | code/python/QuotesAPIforDigitalPortals/v2/fds/sdk/QuotesAPIforDigitalPortals/model/basic_value_unit_currency_main_list_data.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 6 | 2022-02-07T16:34:18.000Z | 2022-03-30T08:04:57.000Z | code/python/QuotesAPIforDigitalPortals/v2/fds/sdk/QuotesAPIforDigitalPortals/model/basic_value_unit_currency_main_list_data.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | 2 | 2022-02-07T05:25:57.000Z | 2022-03-07T14:18:04.000Z | code/python/QuotesAPIforDigitalPortals/v2/fds/sdk/QuotesAPIforDigitalPortals/model/basic_value_unit_currency_main_list_data.py | factset/enterprise-sdk | 3fd4d1360756c515c9737a0c9a992c7451d7de7e | [
"Apache-2.0"
] | null | null | null | """
Prime Developer Trial
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1
Generated by: https://openapi-generator.tech
"""
import re # noqa: F401
import sys # noqa: F401
from fds.sdk.Q... | 44.206107 | 145 | 0.584528 |
5a38c5df2e435cba821016fa344f12b82ba6626b | 21,209 | py | Python | lisa/executable.py | anirudhrb/lisa | fe009802577c81e45ca2ff5a34d353878caa725d | [
"MIT"
] | 48 | 2018-05-19T17:46:34.000Z | 2020-09-28T21:09:06.000Z | lisa/executable.py | anirudhrb/lisa | fe009802577c81e45ca2ff5a34d353878caa725d | [
"MIT"
] | 1,261 | 2018-05-17T04:32:22.000Z | 2020-11-23T17:29:13.000Z | lisa/executable.py | anirudhrb/lisa | fe009802577c81e45ca2ff5a34d353878caa725d | [
"MIT"
] | 133 | 2018-05-15T23:12:14.000Z | 2020-11-13T10:37:49.000Z | # Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.
from __future__ import annotations
import pathlib
from hashlib import sha256
from typing import (
TYPE_CHECKING,
Any,
Dict,
List,
Optional,
Tuple,
Type,
TypeVar,
Union,
cast,
)
from lisa.util import Initi... | 34.430195 | 88 | 0.585318 |
1041c2cf95520d29c180c84549d2a48b6112522d | 1,355 | py | Python | code/models/tree_path_model.py | sourcery-ai-bot/csn | e96d72865e1d5765566165579c6ffc80230b544a | [
"MIT"
] | null | null | null | code/models/tree_path_model.py | sourcery-ai-bot/csn | e96d72865e1d5765566165579c6ffc80230b544a | [
"MIT"
] | null | null | null | code/models/tree_path_model.py | sourcery-ai-bot/csn | e96d72865e1d5765566165579c6ffc80230b544a | [
"MIT"
] | null | null | null | from typing import Any, Dict, Optional
from encoders import NBoWEncoder, TreePathEncoder
from models import Model
class TreePathModel(Model):
@classmethod
def get_default_hyperparameters(cls) -> Dict[str, Any]:
hypers = {}
label = 'code'
hypers.update({f'{label}_{key}': value
... | 34.74359 | 96 | 0.591882 |
da372c1922d19767031e2c57a9d35d7d7e7f4d74 | 1,371 | py | Python | preprocessing.py | pk0912/threat_text_classification | c0286e8f15a105d495ff395573070acefe5efd8f | [
"MIT"
] | null | null | null | preprocessing.py | pk0912/threat_text_classification | c0286e8f15a105d495ff395573070acefe5efd8f | [
"MIT"
] | null | null | null | preprocessing.py | pk0912/threat_text_classification | c0286e8f15a105d495ff395573070acefe5efd8f | [
"MIT"
] | null | null | null | """
Python script for data pre-processing
"""
import re
import utils.text_processing as tp
from utils.helpers import logger
def remove_referenced_name(text):
pattern = r"@[^\s\.\?,;:!]*"
return re.sub(pattern, " ", text).strip()
def simple_processing(text):
text = tp.unicode_normalize(text)
text =... | 27.42 | 71 | 0.657185 |
6792d586035579a089c9685f4510f9981aec0c79 | 815 | py | Python | src/semu.robotics.ros2_bridge/compile_extension.py | Toni-SM/omni.add_on.ros2_bridge | 9c5e47153d51da3a401d7f4ce679b773b32beffc | [
"MIT"
] | null | null | null | src/semu.robotics.ros2_bridge/compile_extension.py | Toni-SM/omni.add_on.ros2_bridge | 9c5e47153d51da3a401d7f4ce679b773b32beffc | [
"MIT"
] | null | null | null | src/semu.robotics.ros2_bridge/compile_extension.py | Toni-SM/omni.add_on.ros2_bridge | 9c5e47153d51da3a401d7f4ce679b773b32beffc | [
"MIT"
] | null | null | null | import os
import sys
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
# OV python (kit\python\include)
if sys.platform == 'win32':
raise Exception('Windows is not supported')
exit(1)
elif sys.platform == 'linux':
python_library_dir = os.path... | 28.103448 | 91 | 0.70184 |
6e9e4c11aa5bb1aa04a4b06a73ba022b7b2694ce | 433 | py | Python | customer/migrations/0002_alter_dccustomer_email.py | hasmeed/democrance_backend | 27d3bafd3ae1d241aa13b211769903b2051192c0 | [
"Unlicense"
] | null | null | null | customer/migrations/0002_alter_dccustomer_email.py | hasmeed/democrance_backend | 27d3bafd3ae1d241aa13b211769903b2051192c0 | [
"Unlicense"
] | null | null | null | customer/migrations/0002_alter_dccustomer_email.py | hasmeed/democrance_backend | 27d3bafd3ae1d241aa13b211769903b2051192c0 | [
"Unlicense"
] | null | null | null | # Generated by Django 3.2 on 2022-02-02 21:55
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('customer', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='dccustomer',
name='email',
... | 22.789474 | 106 | 0.616628 |
74c5e63fb215423a81f2c2931c76a5194a6221ef | 4,268 | py | Python | modules/dbnd-airflow/test_dbnd_airflow/utils.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | null | null | null | modules/dbnd-airflow/test_dbnd_airflow/utils.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | null | null | null | modules/dbnd-airflow/test_dbnd_airflow/utils.py | ipattarapong/dbnd | 7bd65621c46c73e078eb628f994127ad4c7dbd1a | [
"Apache-2.0"
] | null | null | null | import functools
import json
import logging
from typing import Any
import pytest
from airflow.settings import Session
from flask import url_for
from flask_appbuilder.security.sqla.models import User as ab_user
from pytest import fixture
from six.moves.urllib.parse import quote_plus
from targets import target
logg... | 28.453333 | 88 | 0.631209 |
5254f253867c3f8ff2630a3c482a2ec37c483efb | 1,295 | py | Python | symtmm/backing.py | Matael/symtmm | 7156172259c77b3fa48df322f3456313c1031fcd | [
"MIT"
] | 1 | 2021-02-24T01:53:57.000Z | 2021-02-24T01:53:57.000Z | symtmm/backing.py | Matael/symtmm | 7156172259c77b3fa48df322f3456313c1031fcd | [
"MIT"
] | null | null | null | symtmm/backing.py | Matael/symtmm | 7156172259c77b3fa48df322f3456313c1031fcd | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding:utf8 -*-
#
# backing.py
#
# This file is part of symtmm, a software distributed under the MIT license.
# For any question, please contact the author below.
#
# Copyright (c) 2017 Mathieu Gaborit <gaborit@kth.se>
#
# Permission is hereby granted, free of charge, to any person obtainin... | 31.585366 | 80 | 0.63861 |
ca2bdf07a3fdbaace365587f12e74335001316f4 | 1,085 | py | Python | examples/views/counter.py | nextcord-ext/nextcord | 7b3022ae19299e1f40f5f34da33b80ae491aa06a | [
"MIT"
] | null | null | null | examples/views/counter.py | nextcord-ext/nextcord | 7b3022ae19299e1f40f5f34da33b80ae491aa06a | [
"MIT"
] | null | null | null | examples/views/counter.py | nextcord-ext/nextcord | 7b3022ae19299e1f40f5f34da33b80ae491aa06a | [
"MIT"
] | null | null | null | import nextcord
from nextcord.ext import commands
# Define a simple View that gives us a counter button
class Counter(nextcord.ui.View):
# Define the actual button
# When pressed, this increments the number displayed until it hits 5.
# When it hits 5, the counter button is disabled and it turns green.
... | 29.324324 | 75 | 0.680184 |
f7b290d88ef35dfdabd9ab8a762327f67e603674 | 8,185 | py | Python | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_mediasvr_linux_oper.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 177 | 2016-03-15T17:03:51.000Z | 2022-03-18T16:48:44.000Z | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_mediasvr_linux_oper.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 18 | 2016-03-30T10:45:22.000Z | 2020-07-14T16:28:13.000Z | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_mediasvr_linux_oper.py | CiscoDevNet/ydk-py | 073731fea50694d0bc6cd8ebf10fec308dcc0aa9 | [
"ECL-2.0",
"Apache-2.0"
] | 85 | 2016-03-16T20:38:57.000Z | 2022-02-22T04:26:02.000Z | """ Cisco_IOS_XR_mediasvr_linux_oper
This module contains a collection of YANG definitions
for Cisco IOS\-XR mediasvr\-linux package operational data.
This module contains definitions
for the following management objects\:
media\-svr\: Media server CLI operations
Copyright (c) 2013\-2018 by Cisco Systems, Inc.
Al... | 33.962656 | 172 | 0.594746 |
aeb238f0e35645fc2cc8bba6e840d4466e05c802 | 479 | py | Python | mmdet/models/detectors/yolov3.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | mmdet/models/detectors/yolov3.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | mmdet/models/detectors/yolov3.py | mrsempress/mmdetection | cb650560c97a2fe56a9b369a1abc8ec17e06583a | [
"Apache-2.0"
] | null | null | null | from .single_stage import SingleStageDetector
from ..registry import DETECTORS
@DETECTORS.register_module
class YOLOv3(SingleStageDetector):
def __init__(self,
backbone,
neck,
bbox_head,
train_cfg=None,
test_cfg=None,
... | 28.176471 | 74 | 0.559499 |
8435b178cdaaf8a499654dd5bab2f0067e2ca98c | 955 | py | Python | appinit_backend/app/lib/jobs/notify.py | app-init/backend | 02bfc059aaa3ba34cb31c2c0cec92391f08826d9 | [
"MIT"
] | 1 | 2020-09-11T01:20:07.000Z | 2020-09-11T01:20:07.000Z | appinit_backend/app/lib/jobs/notify.py | app-init/backend | 02bfc059aaa3ba34cb31c2c0cec92391f08826d9 | [
"MIT"
] | null | null | null | appinit_backend/app/lib/jobs/notify.py | app-init/backend | 02bfc059aaa3ba34cb31c2c0cec92391f08826d9 | [
"MIT"
] | null | null | null | from appinit_backend.lib.imports import *
from appinit_backend.lib.notifications import email as email_notifications
def call(action, job=None):
manager = Manager()
users = set()
title = None
body = None
if action == "stopped":
title = "Jobs-Scheduler has stopped"
# groups.add("jobs.schedul... | 35.37037 | 145 | 0.624084 |
5485749fccb598851d777efd6fc93c68f2d2e5a5 | 5,697 | py | Python | ultracart/models/user_response.py | UltraCart/rest_api_v2_sdk_python | d734ea13fabc7a57872ff68bac06861edb8fd882 | [
"Apache-2.0"
] | 1 | 2018-03-15T16:56:23.000Z | 2018-03-15T16:56:23.000Z | ultracart/models/user_response.py | UltraCart/rest_api_v2_sdk_python | d734ea13fabc7a57872ff68bac06861edb8fd882 | [
"Apache-2.0"
] | null | null | null | ultracart/models/user_response.py | UltraCart/rest_api_v2_sdk_python | d734ea13fabc7a57872ff68bac06861edb8fd882 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
UltraCart Rest API V2
UltraCart REST API Version 2 # noqa: E501
OpenAPI spec version: 2.0.0
Contact: support@ultracart.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class UserResponse(object):
... | 25.662162 | 103 | 0.556258 |
ff8ce6003a83f36de6a833c7e86a4478fe1b56a7 | 909 | py | Python | python/problem-073.py | mbuhot/mbuhot-euler-solutions | 30066543cfd2d84976beb0605839750b64f4b8ef | [
"MIT"
] | 1 | 2015-12-18T13:25:41.000Z | 2015-12-18T13:25:41.000Z | python/problem-073.py | mbuhot/mbuhot-euler-solutions | 30066543cfd2d84976beb0605839750b64f4b8ef | [
"MIT"
] | null | null | null | python/problem-073.py | mbuhot/mbuhot-euler-solutions | 30066543cfd2d84976beb0605839750b64f4b8ef | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
import sys
sys.setrecursionlimit(20000)
description = '''
Counting fractions in a range
Problem 73
Consider the fraction, n/d, where n and d are positive integers. If n<d and HCF(n,d)=1, it is called a reduced proper fraction.
If we list the set of reduced proper fractions for d ≤ 8 in ascend... | 30.3 | 127 | 0.669967 |
19326dd3d843f6f124c4978f55f387a22a931506 | 244 | py | Python | confoo-2012/unittest_example/doctest_example.py | andymckay/presentations | 19e485f0ad5ca5e56779475659f31b6682e8016e | [
"CC-BY-3.0"
] | 3 | 2015-08-05T23:04:10.000Z | 2022-01-24T20:01:33.000Z | confoo-2012/unittest_example/doctest_example.py | andymckay/presentations | 19e485f0ad5ca5e56779475659f31b6682e8016e | [
"CC-BY-3.0"
] | null | null | null | confoo-2012/unittest_example/doctest_example.py | andymckay/presentations | 19e485f0ad5ca5e56779475659f31b6682e8016e | [
"CC-BY-3.0"
] | 4 | 2015-06-28T19:02:49.000Z | 2021-10-29T19:28:39.000Z | def minus(numbers):
"""
Subtract a list of numbers.
>>> minus([3, 1])
2
>>> minus([3, 2, 4])
-3
"""
return reduce(lambda x, y: x - y, numbers)
if __name__ == '__main__':
import doctest
doctest.testmod()
| 17.428571 | 46 | 0.52459 |
211655b9f4f39dae5a03b97d5ca6daed6f70dde3 | 570 | py | Python | scanner/model/scanover.py | WaIdo/InfoCollectTOOL | 8bc0d8e9436535d8947946a9c6cbf753045a4d5a | [
"MIT"
] | 8 | 2019-07-15T09:23:04.000Z | 2021-08-16T14:41:00.000Z | scanner/model/scanover.py | WaIdo/InfoCollectTOOL | 8bc0d8e9436535d8947946a9c6cbf753045a4d5a | [
"MIT"
] | null | null | null | scanner/model/scanover.py | WaIdo/InfoCollectTOOL | 8bc0d8e9436535d8947946a9c6cbf753045a4d5a | [
"MIT"
] | 8 | 2019-07-15T01:13:20.000Z | 2022-01-25T01:58:30.000Z | from ..orm import Base
from sqlalchemy import Column,Integer,String
from base64 import b64encode
import hashlib
class Scanover(Base):
__tablename__ = 'scan'
id = Column(Integer, primary_key=True)
url = Column(String(100), unique=True)
token = Column(String(50),unique=True)
result = Column(String(3... | 28.5 | 81 | 0.65614 |
b15227091680aa50ab88006ebcf6d123edd23077 | 66,214 | py | Python | third_party/flatbuffers/tests/py_test.py | EricWang1hitsz/osrm-backend | ff1af413d6c78f8e454584fe978d5468d984d74a | [
"BSD-2-Clause"
] | 4,526 | 2015-01-01T15:31:00.000Z | 2022-03-31T17:33:49.000Z | third_party/flatbuffers/tests/py_test.py | wsx9527/osrm-backend | 1e70b645e480946dad313b67f6a7d331baecfe3c | [
"BSD-2-Clause"
] | 4,497 | 2015-01-01T15:29:12.000Z | 2022-03-31T19:19:35.000Z | third_party/flatbuffers/tests/py_test.py | wsx9527/osrm-backend | 1e70b645e480946dad313b67f6a7d331baecfe3c | [
"BSD-2-Clause"
] | 3,023 | 2015-01-01T18:40:53.000Z | 2022-03-30T13:30:46.000Z | # coding=utf-8
# 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 appl... | 36.421342 | 123 | 0.577431 |
7d578dae474b80e788927c83be4b92da4f525a7d | 768 | py | Python | tests/fixtures/proto_plus_fixture.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | 285 | 2018-10-05T16:47:58.000Z | 2022-03-31T00:58:39.000Z | tests/fixtures/proto_plus_fixture.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | 425 | 2018-09-10T13:32:41.000Z | 2022-03-31T14:50:05.000Z | tests/fixtures/proto_plus_fixture.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | 369 | 2018-11-28T07:01:00.000Z | 2022-03-28T09:53:22.000Z | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 33.391304 | 74 | 0.751302 |
62888055fdf251945f8ea1d05928d5dea38ee804 | 8,916 | py | Python | sdk/python/pulumi_azure_nextgen/storagesync/v20190601/cloud_endpoint.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/storagesync/v20190601/cloud_endpoint.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_nextgen/storagesync/v20190601/cloud_endpoint.py | test-wiz-sec/pulumi-azure-nextgen | 20a695af0d020b34b0f1c336e1b69702755174cc | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union
from ... import _utilities, _tables
__a... | 43.921182 | 787 | 0.662517 |
1e24fca53965bbbe61bd96f99be436177cf4c19d | 3,376 | py | Python | mrfd/diff-ROI-3DCAE_train.py | ivineetm007/Fall-detection | d18ac5f1e26a04ed8492b2e215a91c51b55f32dd | [
"MIT"
] | 13 | 2020-11-14T06:26:04.000Z | 2022-03-30T10:46:22.000Z | mrfd/diff-ROI-3DCAE_train.py | ivineetm007/Fall-detection | d18ac5f1e26a04ed8492b2e215a91c51b55f32dd | [
"MIT"
] | 5 | 2020-11-14T06:27:10.000Z | 2021-03-11T23:20:14.000Z | mrfd/diff-ROI-3DCAE_train.py | ivineetm007/Fall-detection | d18ac5f1e26a04ed8492b2e215a91c51b55f32dd | [
"MIT"
] | 4 | 2020-09-06T20:56:23.000Z | 2021-11-25T05:46:59.000Z |
import sys
import numpy as np
import os
from data_management import load_videos
import config
# import tensorflow as tf
# tf.config.experimental_run_functions_eagerly(True)
from models import diff_ROI_C3D_AE_no_pool,C3D_no_pool
from trainer.diffroigan import Params,Diff_ROI_3DCAE_GAN3D
from trainer.util import create... | 37.098901 | 228 | 0.781991 |
7615639bf7ef6fdb90e854e6344a9326f7df0614 | 2,580 | py | Python | script/from_rss.py | radjan/newspac | 30c0c197f3d64e1810dd5f92fb05c9ca51e41c0e | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2015-11-06T06:55:02.000Z | 2018-03-14T03:18:51.000Z | script/from_rss.py | radjan/newspac | 30c0c197f3d64e1810dd5f92fb05c9ca51e41c0e | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | script/from_rss.py | radjan/newspac | 30c0c197f3d64e1810dd5f92fb05c9ca51e41c0e | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | # -*- encoding: utf-8 -*-
import common
common.DB_PATH = common.DB_DIR + '/newspacks2.db'
import simplejson as json
import database as db
db.THREAD_LOCAL = True
from importlib import import_module
def _feed_dict(feed_url, source, handler, catalog=None):
return dict(feed_url=feed_url,
source=source,... | 41.612903 | 124 | 0.657752 |
9bf5d429f465cce9c4eaed71d8419eb57087331e | 9,592 | py | Python | parlai/tasks/task_list.py | shagunsodhani/ParlAI | 5b634b844807372adfb0f6d6e5c42341ac8138f0 | [
"BSD-3-Clause"
] | 1 | 2017-06-26T07:46:33.000Z | 2017-06-26T07:46:33.000Z | parlai/tasks/task_list.py | shagunsodhani/ParlAI | 5b634b844807372adfb0f6d6e5c42341ac8138f0 | [
"BSD-3-Clause"
] | null | null | null | parlai/tasks/task_list.py | shagunsodhani/ParlAI | 5b634b844807372adfb0f6d6e5c42341ac8138f0 | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
"""This file contains a lis... | 47.251232 | 317 | 0.590179 |
254edbb5e3800caf8d8190b5fb6835a271ca7fc2 | 1,429 | py | Python | examples/gaussians.py | paulorauber/thesne | fc87fb89b1bd9e82c82fe7de18f8afc3e6203d4a | [
"MIT"
] | 67 | 2016-06-08T20:14:58.000Z | 2022-03-11T14:16:52.000Z | examples/gaussians.py | paulorauber/thesne | fc87fb89b1bd9e82c82fe7de18f8afc3e6203d4a | [
"MIT"
] | 2 | 2019-12-05T02:35:33.000Z | 2021-06-15T12:01:02.000Z | examples/gaussians.py | paulorauber/thesne | fc87fb89b1bd9e82c82fe7de18f8afc3e6203d4a | [
"MIT"
] | 23 | 2016-06-01T03:06:35.000Z | 2021-12-23T16:15:24.000Z | import numpy as np
from sklearn.utils import check_random_state
from thesne.model.dynamic_tsne import dynamic_tsne
from thesne.examples import plot
def create_blobs(classes=10, dims=100, class_size=100, variance=0.1, steps=4,
advection_ratio=0.5, random_state=None):
random_state = check_random_... | 26.962264 | 79 | 0.60042 |
7b05bb48136e7f2f73d00bb45becc179311fa7dc | 2,574 | py | Python | tests/unit/resources/networking/test_fabrics.py | PragadeeswaranS/oneview-python | 3acc113b8dd30029beb7c228c3bc2bbe67d3485b | [
"Apache-2.0"
] | null | null | null | tests/unit/resources/networking/test_fabrics.py | PragadeeswaranS/oneview-python | 3acc113b8dd30029beb7c228c3bc2bbe67d3485b | [
"Apache-2.0"
] | null | null | null | tests/unit/resources/networking/test_fabrics.py | PragadeeswaranS/oneview-python | 3acc113b8dd30029beb7c228c3bc2bbe67d3485b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
###
# (C) Copyright [2019] 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/licenses/LICENSE-2.0
#... | 33 | 78 | 0.700078 |
edfe616553fde07c10a0a382b04bd2c053cb8e8f | 12,323 | py | Python | allennlp_beaker/__main__.py | allenai/allennlp-beaker | 6890ed300e08024c4738f937faebf31cd850003e | [
"Apache-2.0"
] | 1 | 2021-07-08T03:09:18.000Z | 2021-07-08T03:09:18.000Z | allennlp_beaker/__main__.py | allenai/allennlp-beaker | 6890ed300e08024c4738f937faebf31cd850003e | [
"Apache-2.0"
] | null | null | null | allennlp_beaker/__main__.py | allenai/allennlp-beaker | 6890ed300e08024c4738f937faebf31cd850003e | [
"Apache-2.0"
] | null | null | null | from collections import deque
from datetime import date
import os
import shutil
import subprocess
from tempfile import TemporaryDirectory
from typing import Any, Dict, List, Iterable, Optional, Tuple
import uuid
from allennlp.common.file_utils import cached_path
from allennlp.common.params import Params
import click
i... | 30.962312 | 87 | 0.587519 |
4377696ce83f2def968224acdabc6e8ebdd355c8 | 64,575 | py | Python | cogs/settings.py | TAG-Epic/bot | bbcb7dab126bd79ee1e03056f32ec8d01a303ff1 | [
"MIT"
] | null | null | null | cogs/settings.py | TAG-Epic/bot | bbcb7dab126bd79ee1e03056f32ec8d01a303ff1 | [
"MIT"
] | null | null | null | cogs/settings.py | TAG-Epic/bot | bbcb7dab126bd79ee1e03056f32ec8d01a303ff1 | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2020 GamingGeek
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
and associated documentation files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge, publis... | 50.331255 | 338 | 0.693318 |
c22b70cc937c28f82b4dfe641530adda4d0f9ac3 | 973 | py | Python | migrations/versions/ae4fe43054dd_.py | jurayev/garbage-collector | a08b4876e5fe75bc94a59657d966df82efb1fa33 | [
"MIT"
] | null | null | null | migrations/versions/ae4fe43054dd_.py | jurayev/garbage-collector | a08b4876e5fe75bc94a59657d966df82efb1fa33 | [
"MIT"
] | null | null | null | migrations/versions/ae4fe43054dd_.py | jurayev/garbage-collector | a08b4876e5fe75bc94a59657d966df82efb1fa33 | [
"MIT"
] | null | null | null | """empty message
Revision ID: ae4fe43054dd
Revises:
Create Date: 2020-08-01 23:11:19.853119
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'ae4fe43054dd'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | 26.297297 | 77 | 0.672148 |
2420fa4b348f1f80210b70a565b8b44a4ae2ce2e | 4,443 | py | Python | LSTM_models.py | W0lgast/RumourEval | 270680c6c6f17a2b209f2f0dfb67f1ec92f39566 | [
"CC-BY-4.0"
] | null | null | null | LSTM_models.py | W0lgast/RumourEval | 270680c6c6f17a2b209f2f0dfb67f1ec92f39566 | [
"CC-BY-4.0"
] | null | null | null | LSTM_models.py | W0lgast/RumourEval | 270680c6c6f17a2b209f2f0dfb67f1ec92f39566 | [
"CC-BY-4.0"
] | null | null | null | """
Contains function that defines model's architecture
"""
import numpy as np
from keras.models import Sequential
from keras.layers import Dense, Dropout, LSTM
from keras.layers import TimeDistributed, Masking
from keras import optimizers
from keras import regularizers
#from keras.models import load_model
import json
... | 43.990099 | 78 | 0.682647 |
590bcd6c627bee9d3e8368336c0f9e7dc91ab663 | 6,197 | py | Python | models/wideres_shiftadd_se.py | poppin-mice/ShiftAddNet | a17369a50da5bba6250fdeac7c065bd00f293f3c | [
"MIT"
] | 55 | 2020-10-04T17:17:46.000Z | 2022-03-31T02:56:51.000Z | models/wideres_shiftadd_se.py | poppin-mice/ShiftAddNet | a17369a50da5bba6250fdeac7c065bd00f293f3c | [
"MIT"
] | 8 | 2020-12-07T03:37:48.000Z | 2021-07-21T09:26:45.000Z | models/wideres_shiftadd_se.py | poppin-mice/ShiftAddNet | a17369a50da5bba6250fdeac7c065bd00f293f3c | [
"MIT"
] | 14 | 2020-10-29T16:51:41.000Z | 2021-11-16T01:36:43.000Z | import torch
import torch.nn as nn
import torch.nn.init as init
import torch.nn.functional as F
from torch.autograd import Variable
import sys
import numpy as np
from adder import adder
from se_shift import SEConv2d, SELinear
__all__ = ['wideres_shiftadd_se']
def init_conv3x3(in_planes, out_planes, stride=1):
re... | 49.18254 | 224 | 0.695014 |
8ccb41da393d39bec02f3ba207dd1dd73f435d95 | 1,480 | py | Python | emsapi/models/adi_ems_web_api_v2_dto_upload_upload_status_py3.py | ge-flight-analytics/emsapi-python | 2e3a53529758f1bd7a2a850119b1cc1b5ac552e3 | [
"MIT"
] | null | null | null | emsapi/models/adi_ems_web_api_v2_dto_upload_upload_status_py3.py | ge-flight-analytics/emsapi-python | 2e3a53529758f1bd7a2a850119b1cc1b5ac552e3 | [
"MIT"
] | 2 | 2020-01-16T00:04:35.000Z | 2021-05-26T21:04:06.000Z | emsapi/models/adi_ems_web_api_v2_dto_upload_upload_status_py3.py | ge-flight-analytics/emsapi-python | 2e3a53529758f1bd7a2a850119b1cc1b5ac552e3 | [
"MIT"
] | 1 | 2021-02-23T08:25:12.000Z | 2021-02-23T08:25:12.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from ... | 40 | 100 | 0.613514 |
0a5b44135d26271e8f92d792ac287e5edbe71b03 | 6,840 | py | Python | model/seg_network_initial.py | gbc-sid/MTMFI-VOS | b26dbfad515ebf61b4f6316d166f11735b5dcb9a | [
"MIT"
] | 3 | 2021-04-20T02:31:28.000Z | 2021-12-31T03:20:16.000Z | model/seg_network_initial.py | gbc-sid/MTMFI-VOS | b26dbfad515ebf61b4f6316d166f11735b5dcb9a | [
"MIT"
] | null | null | null | model/seg_network_initial.py | gbc-sid/MTMFI-VOS | b26dbfad515ebf61b4f6316d166f11735b5dcb9a | [
"MIT"
] | 1 | 2021-04-20T02:36:03.000Z | 2021-04-20T02:36:03.000Z | import torch
from torch import nn as nn
from torch.nn import functional as F
from lib.utils import conv, relu, interpolate, adaptive_cat
class TSE(nn.Module):
def __init__(self, fc, ic, oc):
super().__init__()
nc = ic + oc
# ResNet用1*1的卷积来降通道的维度
self.reduce = nn.Sequential(conv(f... | 33.043478 | 113 | 0.562427 |
3b1152541b705a9c0f2c9fd176303ab0dfb59dcf | 464 | py | Python | server/baseball/migrations/0012_auto_20190308_2256.py | louisliv/baseball | 1148785a6f2c03ced6ebcfcd209e45b901da26a3 | [
"MIT"
] | null | null | null | server/baseball/migrations/0012_auto_20190308_2256.py | louisliv/baseball | 1148785a6f2c03ced6ebcfcd209e45b901da26a3 | [
"MIT"
] | null | null | null | server/baseball/migrations/0012_auto_20190308_2256.py | louisliv/baseball | 1148785a6f2c03ced6ebcfcd209e45b901da26a3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2019-03-08 22:56
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('baseball', '0011_auto_20190308_2256'),
]
operations = [
migrations.AlterFie... | 22.095238 | 58 | 0.62069 |
5435aadf11944dff2e48d5bda5705b3dafafb97b | 2,220 | py | Python | src/dirbs/api/v1/schemas/__init__.py | a-wakeel/DIRBS-Core | a80563c6dee0695f6be62c37abdcb702f174b717 | [
"PostgreSQL",
"Unlicense"
] | 19 | 2018-09-16T10:59:23.000Z | 2022-01-12T09:37:41.000Z | src/dirbs/api/v1/schemas/__init__.py | dirbs/DIRBS-Core | a80563c6dee0695f6be62c37abdcb702f174b717 | [
"PostgreSQL",
"Unlicense"
] | 5 | 2020-03-25T14:12:24.000Z | 2021-06-22T06:35:19.000Z | src/dirbs/api/v1/schemas/__init__.py | a-wakeel/DIRBS-Core | a80563c6dee0695f6be62c37abdcb702f174b717 | [
"PostgreSQL",
"Unlicense"
] | 19 | 2018-10-11T06:29:53.000Z | 2021-11-18T05:44:42.000Z | """
DIRBS REST-ful API-V1 schemas package.
Copyright (c) 2018-2021 Qualcomm Technologies, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the
limitations in the disclaimer below) provided that the following conditions are met:
- Re... | 67.272727 | 118 | 0.806757 |
072fa1914c0ad3a61787c05c8f98c853ff8bb6dc | 6,615 | py | Python | Flaskshop/taobao/forms.py | GinkgoTeam/2019YJTZB | 7acb23f145ff70e09baade92e6b5a65856b36a1e | [
"MIT"
] | 41 | 2019-05-13T14:22:58.000Z | 2021-11-12T03:30:10.000Z | Flaskshop/taobao/forms.py | GinkgoTeam/2019YJTZB | 7acb23f145ff70e09baade92e6b5a65856b36a1e | [
"MIT"
] | null | null | null | Flaskshop/taobao/forms.py | GinkgoTeam/2019YJTZB | 7acb23f145ff70e09baade92e6b5a65856b36a1e | [
"MIT"
] | 10 | 2019-05-13T22:49:22.000Z | 2021-02-16T20:33:32.000Z | # -*- coding: utf-8 -*-
from flask_wtf import FlaskForm
from wtforms import StringField,PasswordField,SubmitField,BooleanField,SelectField,TextAreaField,FloatField,IntegerField
from wtforms.validators import DataRequired,EqualTo,ValidationError,Length,Email,InputRequired
from taobao.models import Customer,Crew,Supplier... | 37.372881 | 120 | 0.62842 |
3dda0b30ac7ddd9f96d1e45c798b9e5c54699e84 | 3,391 | py | Python | nordlys/core/retrieval/__init__.py | ageron/nordlys | 0b25d68ab129314e88af4cfe51daf6e1c262927a | [
"BSD-4-Clause"
] | 2 | 2019-03-30T02:12:48.000Z | 2021-03-08T18:58:43.000Z | nordlys/core/retrieval/__init__.py | ageron/nordlys | 0b25d68ab129314e88af4cfe51daf6e1c262927a | [
"BSD-4-Clause"
] | null | null | null | nordlys/core/retrieval/__init__.py | ageron/nordlys | 0b25d68ab129314e88af4cfe51daf6e1c262927a | [
"BSD-4-Clause"
] | null | null | null | """
This package provides basic indexing and scoring functionality based on Elasticsearch. It can be used both for documents and for entities (as the latter are represented as fielded documents).
Indexing
--------
.. todo:: Explain indexing (representing entities as fielded documents, mongo to elasticsearch)
The :mo... | 55.590164 | 304 | 0.769979 |
ce60345fce4a7f42cc88838844dc798a56a4fcb1 | 2,800 | py | Python | everyday/20180511-0531/markov_reference.py | gotraveltoworld/python-everyday-practice | deb8fbbe21a73dcb25d66e9ad8d598f16a85db15 | [
"MIT"
] | 1 | 2020-01-27T13:45:52.000Z | 2020-01-27T13:45:52.000Z | everyday/20180511-0531/markov_reference.py | gotraveltoworld/python-everyday-practice | deb8fbbe21a73dcb25d66e9ad8d598f16a85db15 | [
"MIT"
] | null | null | null | everyday/20180511-0531/markov_reference.py | gotraveltoworld/python-everyday-practice | deb8fbbe21a73dcb25d66e9ad8d598f16a85db15 | [
"MIT"
] | null | null | null | """This module contains a code example related to
Think Python, 2nd Edition
by Allen Downey
http://thinkpython2.com
Copyright 2015 Allen Downey
License: http://creativecommons.org/licenses/by/4.0/
"""
from __future__ import print_function, division
import sys
import string
import random
# global variables
suffix_... | 22.95082 | 74 | 0.627857 |
d222b1db309963a2703c15c6ad67ab73bcd267e4 | 379 | py | Python | main.py | clean-code-craft-tcq-1/modular-python-AkshayUHegde | 16bef3e625d3100c84ab3c487a7a2e41bd98a7e8 | [
"MIT"
] | null | null | null | main.py | clean-code-craft-tcq-1/modular-python-AkshayUHegde | 16bef3e625d3100c84ab3c487a7a2e41bd98a7e8 | [
"MIT"
] | null | null | null | main.py | clean-code-craft-tcq-1/modular-python-AkshayUHegde | 16bef3e625d3100c84ab3c487a7a2e41bd98a7e8 | [
"MIT"
] | null | null | null | import test
if __name__ == '__main__':
test.test_color_pair_from_pair_number(4, 'White', 'Brown')
test.test_color_pair_from_pair_number(5, 'White', 'Slate')
test.test_pair_number_from_color_pair('Black', 'Orange', 12)
test.test_pair_number_from_color_pair('Violet', 'Slate', 25)
test.test_pair_numbe... | 37.9 | 64 | 0.725594 |
c84d652bdad990acb2270426925799537bca7561 | 50,859 | py | Python | license_protected_downloads/tests/test_views.py | NexellCorp/infrastructure_server_fileserver | b2d0cd30b7658735f914c29e401a670d9bb42f92 | [
"Net-SNMP",
"Xnet",
"Info-ZIP",
"OML"
] | null | null | null | license_protected_downloads/tests/test_views.py | NexellCorp/infrastructure_server_fileserver | b2d0cd30b7658735f914c29e401a670d9bb42f92 | [
"Net-SNMP",
"Xnet",
"Info-ZIP",
"OML"
] | null | null | null | license_protected_downloads/tests/test_views.py | NexellCorp/infrastructure_server_fileserver | b2d0cd30b7658735f914c29e401a670d9bb42f92 | [
"Net-SNMP",
"Xnet",
"Info-ZIP",
"OML"
] | null | null | null | __author__ = 'dooferlad'
import hashlib
import os
import tempfile
import unittest
import urllib2
import urlparse
import json
import random
import shutil
import mock
from django.conf import settings
from django.test import Client, TestCase
from django.http import HttpResponse
from license_protected_downloads.buildin... | 41.756158 | 79 | 0.632887 |
4ed172a675bffba2b8999657bdd7bc228cf24575 | 16,912 | py | Python | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2018_04_01/operations/_virtual_machine_scale_set_rolling_upgrades_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # 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 ... | 43.587629 | 220 | 0.686436 |
bf224aacfc18681a0989da3e48653de93b00c36c | 19,128 | py | Python | nflgame/__init__.py | front9tech/nflgame | 41fa436d2b6e9f4465adad2e9a536979e10853cc | [
"Unlicense"
] | 1 | 2016-01-12T11:14:42.000Z | 2016-01-12T11:14:42.000Z | nflgame/__init__.py | front9tech/nflgame | 41fa436d2b6e9f4465adad2e9a536979e10853cc | [
"Unlicense"
] | null | null | null | nflgame/__init__.py | front9tech/nflgame | 41fa436d2b6e9f4465adad2e9a536979e10853cc | [
"Unlicense"
] | null | null | null | """
nflgame is an API to retrieve and read NFL Game Center JSON data.
It can work with real-time data, which can be used for fantasy football.
nflgame works by parsing the same JSON data that powers NFL.com's live
GameCenter. Therefore, nflgame can be used to report game statistics while
a game is being played.
The p... | 42.696429 | 166 | 0.687892 |
d906ad5a14ebad6c16c3fec584e762acfa3d55ef | 31,003 | py | Python | scripts/reflinks.py | sauravsrijan/pywikibot | 3d42e7c4de7ee96cda7d6dd9f95fe7c6d3c37484 | [
"MIT"
] | null | null | null | scripts/reflinks.py | sauravsrijan/pywikibot | 3d42e7c4de7ee96cda7d6dd9f95fe7c6d3c37484 | [
"MIT"
] | null | null | null | scripts/reflinks.py | sauravsrijan/pywikibot | 3d42e7c4de7ee96cda7d6dd9f95fe7c6d3c37484 | [
"MIT"
] | 1 | 2020-04-14T14:52:24.000Z | 2020-04-14T14:52:24.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Fetch and add titles for bare links in references.
This bot will search for references which are only made of a link without title
(i.e. <ref>[https://www.google.fr/]</ref> or <ref>https://www.google.fr/</ref>)
and will fetch the html title from the link to use it as the t... | 37.488513 | 79 | 0.491759 |
9d7594197185df4d4e93f737fd14b000f3897a96 | 1,749 | py | Python | youtube/youtube.py | NeuroAssassin/aikaterna-cogs | 6a914fa60658f3853f914af97f1a8c7bf274c313 | [
"MIT"
] | null | null | null | youtube/youtube.py | NeuroAssassin/aikaterna-cogs | 6a914fa60658f3853f914af97f1a8c7bf274c313 | [
"MIT"
] | null | null | null | youtube/youtube.py | NeuroAssassin/aikaterna-cogs | 6a914fa60658f3853f914af97f1a8c7bf274c313 | [
"MIT"
] | null | null | null | import aiohttp
import re
from redbot.core import commands
from redbot.core.utils.menus import menu, DEFAULT_CONTROLS
class YouTube(commands.Cog):
"""Search YouTube for videos."""
def __init__(self, bot):
self.bot = bot
self.session = aiohttp.ClientSession()
async def _youtube_results(sel... | 32.388889 | 90 | 0.582047 |
3281f72880fb760027bc402beef3acd14ac6496b | 7,662 | py | Python | tests/mfem_engines_bps/postprocess-plot-4.py | nbeams/benchmarks | fdd742fb2ca22c0282c0ccb85832f471bf22f23a | [
"BSD-2-Clause"
] | 6 | 2017-08-25T19:44:54.000Z | 2021-11-01T20:33:18.000Z | tests/mfem_engines_bps/postprocess-plot-4.py | nbeams/benchmarks | fdd742fb2ca22c0282c0ccb85832f471bf22f23a | [
"BSD-2-Clause"
] | 7 | 2018-05-08T13:53:44.000Z | 2021-02-11T04:26:30.000Z | tests/mfem_engines_bps/postprocess-plot-4.py | nbeams/benchmarks | fdd742fb2ca22c0282c0ccb85832f471bf22f23a | [
"BSD-2-Clause"
] | 5 | 2017-08-11T21:54:29.000Z | 2020-09-03T16:48:46.000Z | # Copyright (c) 2017, Lawrence Livermore National Security, LLC. Produced at
# the Lawrence Livermore National Laboratory. LLNL-CODE-734707. All Rights
# reserved. See files LICENSE and NOTICE for details.
#
# This file is part of CEED, a collection of benchmarks, miniapps, software
# libraries and APIs for efficient h... | 33.313043 | 77 | 0.600757 |
536c2d81d83da554e1a9bb3bb0c290cd032d874f | 1,990 | py | Python | apps/todo/density_matrix_diag_plt.py | nikwitt/cdmft | ebca66c760e0f6618a0b475eeeb5ace3cd229a2c | [
"MIT"
] | 7 | 2019-05-02T13:19:33.000Z | 2021-11-17T14:06:55.000Z | apps/todo/density_matrix_diag_plt.py | nikwitt/cdmft | ebca66c760e0f6618a0b475eeeb5ace3cd229a2c | [
"MIT"
] | null | null | null | apps/todo/density_matrix_diag_plt.py | nikwitt/cdmft | ebca66c760e0f6618a0b475eeeb5ace3cd229a2c | [
"MIT"
] | 1 | 2021-04-14T15:05:50.000Z | 2021-04-14T15:05:50.000Z | import numpy as np, sys
from cdmft.evaluation.common import Evaluation
from cdmft.h5interface import Storage
from cdmft.plot.cfg import plt, ax
n_bins = 800
omega_max = .8
log = False
offdiag_rows = []
plot_atomic = False
atomic_loop = -1
degeneracy_labels = True
atomic_beta = 1
labels = ["$\\rho_{ii}$"]
for nr in o... | 32.096774 | 111 | 0.622111 |
d76340391455e1f463b02f3e71a0cc1cb3c47fe0 | 3,556 | py | Python | db/db.py | yasinasama/guime | 00caac105becf6df4d873fdbba4542711307e383 | [
"MIT"
] | null | null | null | db/db.py | yasinasama/guime | 00caac105becf6df4d873fdbba4542711307e383 | [
"MIT"
] | null | null | null | db/db.py | yasinasama/guime | 00caac105becf6df4d873fdbba4542711307e383 | [
"MIT"
] | null | null | null | import sqlite3
import os
class DB:
def __init__(self,dbpath):
self.db_path = dbpath
self._conn = None
self._cur = None
self._connect()
def _connect(self):
if not self._conn:
self._conn = sqlite3.connect(self.db_path)
self._cur = self._conn.curso... | 26.340741 | 168 | 0.540776 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.