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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
df2cdb6f60e837148375c0bec8f53cc8f85f40e3 | 2,130 | py | Python | analysis/gene_expression.py | armell/RNASEqTool | 88ee1011cd2597a04f5f7bfc811649ed17d40752 | [
"MIT"
] | 2 | 2019-03-26T16:32:59.000Z | 2019-11-19T09:46:14.000Z | analysis/gene_expression.py | armell/RNASEqTool | 88ee1011cd2597a04f5f7bfc811649ed17d40752 | [
"MIT"
] | 1 | 2021-12-13T20:22:47.000Z | 2021-12-13T20:22:47.000Z | analysis/gene_expression.py | armell/RNASEqTool | 88ee1011cd2597a04f5f7bfc811649ed17d40752 | [
"MIT"
] | null | null | null | from pandas import *
import matplotlib.pyplot as plt
from mining import outliers as out
from entities import datasets_rep as dr
from config import APP_CONFIG
#TODO exons are slightly different
def load_dataframe(dataset):
return read_csv(dataset.intern_location, sep='\t', index_col=0)
def save_chart_to_file(c... | 25.662651 | 134 | 0.723944 |
ba83a44bcee16a0ade51074ab7087cedf4efce7e | 14,017 | py | Python | preprocess2.py | stereoboy/object_detection | 002445d083da54e7b3c6e158e2d66d3c57a05f31 | [
"MIT"
] | null | null | null | preprocess2.py | stereoboy/object_detection | 002445d083da54e7b3c6e158e2d66d3c57a05f31 | [
"MIT"
] | null | null | null | preprocess2.py | stereoboy/object_detection | 002445d083da54e7b3c6e158e2d66d3c57a05f31 | [
"MIT"
] | null | null | null | import tensorflow as tf
import numpy as np
import glob
import os
import xmltodict
import json
from datetime import datetime, date, time
import cv2
import sys
import signal
import getopt
import pickle
import voc
import common
import multiprocessing
from tqdm import tqdm
FLAGS = tf.flags.FLAGS
tf.flags.DEFINE_integer("b... | 33.37381 | 118 | 0.683099 |
7a477316da090f123728377c227906b116dfee5a | 42,424 | py | Python | awx/settings/defaults.py | andrei-at-luther/awx | fa53cdf3298ab9fa8362c6b033d43d4179ed361d | [
"Apache-2.0"
] | null | null | null | awx/settings/defaults.py | andrei-at-luther/awx | fa53cdf3298ab9fa8362c6b033d43d4179ed361d | [
"Apache-2.0"
] | null | null | null | awx/settings/defaults.py | andrei-at-luther/awx | fa53cdf3298ab9fa8362c6b033d43d4179ed361d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2015 Ansible, Inc.
# All Rights Reserved.
import os
import re # noqa
import sys
from datetime import timedelta
# global settings
from django.conf import global_settings
# ugettext lazy
from django.utils.translation import ugettext_lazy as _
# Update this module's local settings from the global setti... | 33.99359 | 97 | 0.672402 |
5a730f4098d4c221ba0306c64e3f2d4b0d4bd2ee | 3,867 | py | Python | section2_change_pars_for_strong_hurricanes/Source_code_for_extracting_data/source_code_change_Clz/1_Calculate_z0_time_series_at_eyewall.py | Sunnyfred/Atlantic_Hurricane_Simulations | ee5d6d0f975876a01c4a21bebd3089bf3bbb843a | [
"MIT"
] | null | null | null | section2_change_pars_for_strong_hurricanes/Source_code_for_extracting_data/source_code_change_Clz/1_Calculate_z0_time_series_at_eyewall.py | Sunnyfred/Atlantic_Hurricane_Simulations | ee5d6d0f975876a01c4a21bebd3089bf3bbb843a | [
"MIT"
] | null | null | null | section2_change_pars_for_strong_hurricanes/Source_code_for_extracting_data/source_code_change_Clz/1_Calculate_z0_time_series_at_eyewall.py | Sunnyfred/Atlantic_Hurricane_Simulations | ee5d6d0f975876a01c4a21bebd3089bf3bbb843a | [
"MIT"
] | 1 | 2021-11-05T18:14:09.000Z | 2021-11-05T18:14:09.000Z | import os
import math
import numpy as np
import matplotlib as matplot
import matplotlib.pyplot as plt
from netCDF4 import Dataset
import csv
from wrf import (to_np, getvar, smooth2d, get_cartopy, cartopy_xlim,
cartopy_ylim, latlon_coords)
# List the colors that will be used for tracing the track.
co... | 36.481132 | 175 | 0.580812 |
a9d4157acf28470373fcd4c88271d21ff3772a95 | 9,457 | py | Python | doc/source/conf.py | mail2nsrajesh/microversion-parse | 1f6eac7c3df048679663919f75c2bcecd3e183a2 | [
"Apache-2.0"
] | null | null | null | doc/source/conf.py | mail2nsrajesh/microversion-parse | 1f6eac7c3df048679663919f75c2bcecd3e183a2 | [
"Apache-2.0"
] | null | null | null | doc/source/conf.py | mail2nsrajesh/microversion-parse | 1f6eac7c3df048679663919f75c2bcecd3e183a2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# microversion-parse documentation build configuration file, created by
# sphinx-quickstart on Thu Mar 31 11:40:03 2016.
#
# 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 ... | 32.386986 | 79 | 0.720102 |
55cb1c434fa2c0276bf4f95ec64cea1739ae104a | 7,527 | py | Python | nototools/lint_cmap_reqs.py | andycanderson/nototools | 5ad53e32b33ceac477085b85858164778e2c7d17 | [
"Apache-2.0"
] | null | null | null | nototools/lint_cmap_reqs.py | andycanderson/nototools | 5ad53e32b33ceac477085b85858164778e2c7d17 | [
"Apache-2.0"
] | null | null | null | nototools/lint_cmap_reqs.py | andycanderson/nototools | 5ad53e32b33ceac477085b85858164778e2c7d17 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
# Copyright 2016 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 require... | 33.905405 | 79 | 0.711306 |
041138c7e425ce4acf1e907f8f1ea2333efcf6e1 | 388 | py | Python | flask_rebar/swagger_generation/swagger_generator/__init__.py | l-vincent-l/flask-rebar | b44488e4ddab52883aa3b10e28d24136f36866ca | [
"MIT"
] | null | null | null | flask_rebar/swagger_generation/swagger_generator/__init__.py | l-vincent-l/flask-rebar | b44488e4ddab52883aa3b10e28d24136f36866ca | [
"MIT"
] | 1 | 2020-12-15T14:48:26.000Z | 2020-12-15T15:22:48.000Z | flask_rebar/swagger_generation/swagger_generator/__init__.py | l-vincent-l/flask-rebar | b44488e4ddab52883aa3b10e28d24136f36866ca | [
"MIT"
] | 1 | 2020-12-15T14:43:46.000Z | 2020-12-15T14:43:46.000Z | # hack to reintroduce backward-compatibility as SwaggerV2Generator used to live in swagger_generator.py
from flask_rebar.swagger_generation.swagger_generator_base import SwaggerGenerator
from flask_rebar.swagger_generation.swagger_generator_v2 import (
SwaggerV2Generator,
) # noqa
from flask_rebar.swagger_generat... | 38.8 | 103 | 0.845361 |
eadd311f3bf3baf82f5c3e5d72dce94774c083f7 | 414 | py | Python | FluencyEvaluation.py | dcn01/AndroidDropFrameAnalysis | 630d75dc999a8d1e4eec71edc0a1220334166d0a | [
"MIT"
] | 2 | 2018-12-10T03:49:03.000Z | 2018-12-10T13:43:26.000Z | FluencyEvaluation.py | dcn01/AndroidDropFrameAnalysis | 630d75dc999a8d1e4eec71edc0a1220334166d0a | [
"MIT"
] | null | null | null | FluencyEvaluation.py | dcn01/AndroidDropFrameAnalysis | 630d75dc999a8d1e4eec71edc0a1220334166d0a | [
"MIT"
] | null | null | null | #!/bin/env python
# coding:utf-8
import A_PhotoSlide
import B_ClickLargeImage
import C_SlideLargeImage
def testAll():
print("A_PhotoSlide_ startTest")
A_PhotoSlide.startTest()
print("\n")
print("B_ClickLargeImage_ startTest")
B_ClickLargeImage.startTest()
print("\n")
print("C_SlideLargeI... | 25.875 | 43 | 0.717391 |
464e02719c54103e970d5f0509476d7fed62819a | 1,334 | py | Python | World/Object/Unit/Spell/Handlers/SpellResult.py | sergio-ivanuzzo/idewave-core | 31b2b2ec4ac222e02af57d8b2d7a3277e4a444ae | [
"Apache-2.0"
] | 10 | 2019-06-29T19:24:52.000Z | 2021-02-21T22:45:57.000Z | World/Object/Unit/Spell/Handlers/SpellResult.py | sergio-ivanuzzo/wowcore | 31b2b2ec4ac222e02af57d8b2d7a3277e4a444ae | [
"Apache-2.0"
] | 4 | 2019-08-15T07:03:36.000Z | 2021-06-02T13:01:25.000Z | World/Object/Unit/Spell/Handlers/SpellResult.py | sergio-ivanuzzo/idewave-core | 31b2b2ec4ac222e02af57d8b2d7a3277e4a444ae | [
"Apache-2.0"
] | 8 | 2019-06-30T22:47:48.000Z | 2021-02-20T19:21:30.000Z | from World.WorldPacket.Constants.WorldOpCode import WorldOpCode
from Server.Connection.Connection import Connection
class SpellResult(object):
def __init__(self, **kwargs):
self.data = kwargs.pop('data', bytes())
self.connection: Connection = kwargs.pop('connection')
async def process(self) ... | 95.285714 | 945 | 0.736132 |
dc75d8cd5145cd8483f2d4466d5a701d886d16ed | 948 | py | Python | thefeck/rules/gradle_no_task.py | eoinjordan/thefeck | e04f50409ba3069ec6a9f7c0aab39ca835a41b68 | [
"MIT"
] | null | null | null | thefeck/rules/gradle_no_task.py | eoinjordan/thefeck | e04f50409ba3069ec6a9f7c0aab39ca835a41b68 | [
"MIT"
] | null | null | null | thefeck/rules/gradle_no_task.py | eoinjordan/thefeck | e04f50409ba3069ec6a9f7c0aab39ca835a41b68 | [
"MIT"
] | null | null | null | import re
from subprocess import Popen, PIPE
from thefeck.utils import for_app, eager, replace_command
regex = re.compile(r"Task '(.*)' (is ambiguous|not found)")
@for_app('gradle', './gradlew')
def match(command):
return regex.findall(command.output)
@eager
def _get_all_tasks(gradle):
proc = Popen([gradle... | 27.085714 | 88 | 0.657173 |
bc49fa34d613fed721dfaad5afdee111b03d38a7 | 18,221 | py | Python | mmtbx/regression/tst_flip_symmetric.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | 2 | 2021-03-18T12:31:57.000Z | 2022-03-14T06:27:06.000Z | mmtbx/regression/tst_flip_symmetric.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | null | null | null | mmtbx/regression/tst_flip_symmetric.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | 1 | 2020-02-04T15:39:06.000Z | 2020-02-04T15:39:06.000Z | from __future__ import absolute_import, division, print_function
import sys
from six.moves import cStringIO as StringIO
from libtbx import easy_run
import iotbx.pdb
pdbs = {
"ASP" : """
ATOM 1 N ASP L 1 55.410 -0.618 -1.595 1.00 33.13 N
ATOM 2 CA ASP L 1 55.727 -2.042 -1.6... | 51.471751 | 80 | 0.482465 |
d8185cb1d524d63a92b8b696a24915aaa7bffccd | 5,394 | py | Python | homework/hw03/hw03.py | QinJiaHao1994/cs61a-sp20-solutions | 71a481bef5ce73a4c6ff746455ccc51dc65453ea | [
"MIT"
] | 8 | 2020-07-28T11:10:49.000Z | 2021-05-29T15:27:17.000Z | homework/hw03/hw03.py | QinJiaHao1994/cs61a-sp20-solutions | 71a481bef5ce73a4c6ff746455ccc51dc65453ea | [
"MIT"
] | null | null | null | homework/hw03/hw03.py | QinJiaHao1994/cs61a-sp20-solutions | 71a481bef5ce73a4c6ff746455ccc51dc65453ea | [
"MIT"
] | 1 | 2020-10-23T08:15:08.000Z | 2020-10-23T08:15:08.000Z | HW_SOURCE_FILE = 'hw03.py'
#############
# Questions #
#############
def num_sevens(x):
"""Returns the number of times 7 appears as a digit of x.
>>> num_sevens(3)
0
>>> num_sevens(7)
1
>>> num_sevens(7777777)
7
>>> num_sevens(2637)
1
>>> num_sevens(76370)
2
>>> num_se... | 26.312195 | 110 | 0.568039 |
ec19b1c459f929c68a3ebe7229cfeaee0369023c | 10,898 | py | Python | saleor/graphql/product/types/channels.py | tinulica/saleor | 63dea36f43f5cc75b3d78144de4a40dbcaf45a79 | [
"CC-BY-4.0"
] | null | null | null | saleor/graphql/product/types/channels.py | tinulica/saleor | 63dea36f43f5cc75b3d78144de4a40dbcaf45a79 | [
"CC-BY-4.0"
] | 57 | 2021-09-13T04:27:48.000Z | 2022-03-28T04:50:19.000Z | saleor/graphql/product/types/channels.py | tinulica/saleor | 63dea36f43f5cc75b3d78144de4a40dbcaf45a79 | [
"CC-BY-4.0"
] | 1 | 2022-01-17T07:03:22.000Z | 2022-01-17T07:03:22.000Z | from dataclasses import asdict
import graphene
from django_countries.fields import Country
from ....core.permissions import ProductPermissions
from ....core.tracing import traced_resolver
from ....core.utils import get_currency_for_country
from ....graphql.core.types import Money, MoneyRange
from ....product import m... | 40.816479 | 87 | 0.601578 |
b98a750ee5532554304e2d8782d9400f97124537 | 7,919 | py | Python | tests/test_dicerecord.py | eric-s-s/share-with-z | 60a4c9788085ba55c6214114447e1c16bc49f7ce | [
"MIT"
] | 5 | 2016-07-29T18:28:04.000Z | 2019-06-17T19:49:11.000Z | tests/test_dicerecord.py | eric-s-s/dice-tables | 60a4c9788085ba55c6214114447e1c16bc49f7ce | [
"MIT"
] | 16 | 2015-11-12T02:13:30.000Z | 2020-12-05T21:35:00.000Z | tests/test_dicerecord.py | eric-s-s/dice-tables | 60a4c9788085ba55c6214114447e1c16bc49f7ce | [
"MIT"
] | null | null | null | # pylint: disable=missing-docstring, invalid-name, too-many-public-methods
import unittest
from dicetables.dicerecord import DiceRecord
from dicetables.dieevents import Die
from dicetables.eventsbases.eventerrors import DiceRecordError
class TestDiceRecord(unittest.TestCase):
def assert_my_regex(self, error_t... | 43.751381 | 114 | 0.67458 |
358e13c02f12fab5ee1e4f656fb6035e2503166a | 25 | py | Python | inkpy/js/__init__.py | facelesspanda/inkpy | f21949b856f19f0b4781fa878760a7d1a03d3623 | [
"MIT"
] | null | null | null | inkpy/js/__init__.py | facelesspanda/inkpy | f21949b856f19f0b4781fa878760a7d1a03d3623 | [
"MIT"
] | null | null | null | inkpy/js/__init__.py | facelesspanda/inkpy | f21949b856f19f0b4781fa878760a7d1a03d3623 | [
"MIT"
] | null | null | null | __all__ = ["dec", "enc"]
| 12.5 | 24 | 0.52 |
7a0258d086466753cc2d021ab976b8eaf4d2c2ae | 22,141 | py | Python | tests/unit/states/test_boto_lambda.py | casselt/salt | d8a2ef4e0cd544656489d23d161928879b1fc1c0 | [
"Apache-2.0"
] | 2 | 2018-11-08T02:59:24.000Z | 2021-01-04T00:30:50.000Z | tests/unit/states/test_boto_lambda.py | casselt/salt | d8a2ef4e0cd544656489d23d161928879b1fc1c0 | [
"Apache-2.0"
] | 4 | 2020-09-04T10:19:34.000Z | 2020-11-09T12:55:59.000Z | tests/unit/states/test_boto_lambda.py | casselt/salt | d8a2ef4e0cd544656489d23d161928879b1fc1c0 | [
"Apache-2.0"
] | 5 | 2017-06-16T23:48:13.000Z | 2021-04-08T17:43:48.000Z | # -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import, print_function, unicode_literals
import logging
import random
import string
# Import Salt Testing libs
from tests.support.mixins import LoaderModuleMockMixin
from tests.support.unit import skipIf, TestCase
from tests.support.mock imp... | 45.002033 | 118 | 0.616865 |
620e09c1df2b70b24c7e604e0e3b30c1f7c77ff7 | 1,214 | bzl | Python | xls/build_rules/xls_config_rules.bzl | felixzhuologist/xls | b6a4ec7190049002be1c0829d52b1d7767c88204 | [
"Apache-2.0"
] | 687 | 2020-08-20T21:24:09.000Z | 2022-03-24T11:58:16.000Z | xls/build_rules/xls_config_rules.bzl | felixzhuologist/xls | b6a4ec7190049002be1c0829d52b1d7767c88204 | [
"Apache-2.0"
] | 472 | 2020-08-20T20:59:38.000Z | 2022-03-31T15:25:47.000Z | xls/build_rules/xls_config_rules.bzl | felixzhuologist/xls | b6a4ec7190049002be1c0829d52b1d7767c88204 | [
"Apache-2.0"
] | 92 | 2020-08-24T20:32:46.000Z | 2022-03-27T21:42:17.000Z | # Copyright 2021 The XLS Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 36.787879 | 76 | 0.783361 |
454f6684090bc8bccc2c9db68f1fb639a63ce90f | 3,350 | py | Python | sdk/python/pulumi_aws_native/cloudfront/get_origin_request_policy.py | pulumi/pulumi-aws-native | 1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3 | [
"Apache-2.0"
] | 29 | 2021-09-30T19:32:07.000Z | 2022-03-22T21:06:08.000Z | sdk/python/pulumi_aws_native/cloudfront/get_origin_request_policy.py | pulumi/pulumi-aws-native | 1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3 | [
"Apache-2.0"
] | 232 | 2021-09-30T19:26:26.000Z | 2022-03-31T23:22:06.000Z | sdk/python/pulumi_aws_native/cloudfront/get_origin_request_policy.py | pulumi/pulumi-aws-native | 1ae4a4d9c2256b2a79ca536f8d8497b28d10e4c3 | [
"Apache-2.0"
] | 4 | 2021-11-10T19:42:01.000Z | 2022-02-05T10:15:49.000Z | # 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
from... | 39.411765 | 144 | 0.718806 |
0b5f9926188498a600a501869c888f6319c32541 | 1,448 | py | Python | setup.py | DEV3L/python-files-by-date | b1acb7481dcd7f106f2f4976dc9a4776ea13cce7 | [
"MIT"
] | null | null | null | setup.py | DEV3L/python-files-by-date | b1acb7481dcd7f106f2f4976dc9a4776ea13cce7 | [
"MIT"
] | null | null | null | setup.py | DEV3L/python-files-by-date | b1acb7481dcd7f106f2f4976dc9a4776ea13cce7 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
from files_by_date.utils.version import get_version
setup(
name='files-by-date',
packages=find_packages(),
version=get_version(),
description='Moves files from one directory into another grouping by created month',
author='Justin Beall',
author_email... | 36.2 | 113 | 0.614641 |
109d4ae98e362c605e8d390993d47e2e179c7565 | 2,433 | py | Python | lib/net/transformer.py | reinforcementdriving/WS3D | 9714c3141891cbbc866b9b0eaee46d74eedf8472 | [
"MIT"
] | 100 | 2020-07-09T13:26:47.000Z | 2022-03-20T05:36:47.000Z | lib/net/transformer.py | reinforcementdriving/WS3D | 9714c3141891cbbc866b9b0eaee46d74eedf8472 | [
"MIT"
] | 9 | 2020-07-31T11:28:18.000Z | 2021-11-17T10:41:11.000Z | lib/net/transformer.py | reinforcementdriving/WS3D | 9714c3141891cbbc866b9b0eaee46d74eedf8472 | [
"MIT"
] | 9 | 2020-08-12T15:06:23.000Z | 2022-03-01T03:08:26.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.autograd as grad
##-----------------------------------------------------------------------------
# Class for Transformer. Subclasses PyTorch's own "nn" module
#
# Computes a KxK affine transform from the input data to transform inputs
# t... | 29.670732 | 79 | 0.552815 |
181b8c2f719954a52e502a644c73e14e712d66f9 | 9,880 | py | Python | sahara/tests/unit/plugins/mapr/versions/test_base_cluster_configurer.py | citrix-openstack-build/sahara | 17e4f4dac5bb321ef4d5a55664cca0857127d7e6 | [
"Apache-2.0"
] | null | null | null | sahara/tests/unit/plugins/mapr/versions/test_base_cluster_configurer.py | citrix-openstack-build/sahara | 17e4f4dac5bb321ef4d5a55664cca0857127d7e6 | [
"Apache-2.0"
] | null | null | null | sahara/tests/unit/plugins/mapr/versions/test_base_cluster_configurer.py | citrix-openstack-build/sahara | 17e4f4dac5bb321ef4d5a55664cca0857127d7e6 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014, MapR Technologies
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | 48.669951 | 76 | 0.504656 |
a1772fcc2541ed38d1c5ca900878dee2abf5f0f8 | 283 | py | Python | solution/practice/data-structures/arrays/crush/solution.py | satyam857/HackerRank | b6c0c199a5e320b1b59fdedafda2630258314b76 | [
"MIT"
] | 158 | 2017-03-17T19:43:14.000Z | 2022-03-23T04:10:33.000Z | solution/practice/data-structures/arrays/crush/solution.py | skatsd/HackerRank | 74918aa46144150f4da0986c27d6762afe7c4ef3 | [
"MIT"
] | 2 | 2018-06-13T02:41:19.000Z | 2020-06-03T19:43:58.000Z | solution/practice/data-structures/arrays/crush/solution.py | skatsd/HackerRank | 74918aa46144150f4da0986c27d6762afe7c4ef3 | [
"MIT"
] | 67 | 2017-08-03T02:52:24.000Z | 2022-03-25T03:22:01.000Z | # See http://stackoverflow.com/a/18410273 for explanation
# for this awesome O(N+M) solution.
N, M = map(int, input().split())
A = [0] * (N + 1)
for i in range(M):
a, b, k = map(int, input().split())
A[a - 1] += k
A[b] -= k
for i in range(N):
A[i + 1] += A[i]
print(max(A))
| 21.769231 | 57 | 0.55477 |
b554136cb7f488f5044c612de4c96f093bfd7dcc | 661 | py | Python | django backend/rajasthan_studios_app/models.py | Vicky-Rathod/rajasthan_studio_project | 8cee5ec613d33503a00fdaead5fad09eedcb2e2b | [
"MIT"
] | null | null | null | django backend/rajasthan_studios_app/models.py | Vicky-Rathod/rajasthan_studio_project | 8cee5ec613d33503a00fdaead5fad09eedcb2e2b | [
"MIT"
] | null | null | null | django backend/rajasthan_studios_app/models.py | Vicky-Rathod/rajasthan_studio_project | 8cee5ec613d33503a00fdaead5fad09eedcb2e2b | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class Coaches(models.Model):
name = models.CharField(max_length=100)
time_z = models.CharField(max_length=100)
day = models.CharField(max_length=100)
available_at = models.CharField(max_length=100)
... | 33.05 | 59 | 0.765507 |
9ab2ed36a99f4ce63e73be1efa988ab474190cc5 | 12,941 | py | Python | app.py | danielrmt/dash-br-options | 48b26991af1bdbc9e17d50c2aba6e3ad33bc10b2 | [
"MIT"
] | 1 | 2020-07-06T04:05:04.000Z | 2020-07-06T04:05:04.000Z | app.py | danielrmt/dash-br-options | 48b26991af1bdbc9e17d50c2aba6e3ad33bc10b2 | [
"MIT"
] | 1 | 2021-03-31T19:43:38.000Z | 2021-03-31T19:43:38.000Z | app.py | danielrmt/dash-br-options | 48b26991af1bdbc9e17d50c2aba6e3ad33bc10b2 | [
"MIT"
] | null | null | null |
import numpy as np
import pandas as pd
from datetime import date
import dash
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_components as dbc
from dash.dependencies import Input, Output, ALL
import dash_table
from dash_table.Format import Format, Scheme, Sign
import plo... | 37.080229 | 87 | 0.597326 |
13bf10405340a3511f85c6e2c3a3d263a17e8ef8 | 4,636 | py | Python | discord/types/guild.py | typpo/pycord | 24223e24012d7cdef56d6832522b8e6bd343cbd6 | [
"MIT"
] | null | null | null | discord/types/guild.py | typpo/pycord | 24223e24012d7cdef56d6832522b8e6bd343cbd6 | [
"MIT"
] | 5 | 2021-11-11T00:45:01.000Z | 2022-03-28T00:59:03.000Z | discord/types/guild.py | typpo/pycord | 24223e24012d7cdef56d6832522b8e6bd343cbd6 | [
"MIT"
] | null | null | null | """
The MIT License (MIT)
Copyright (c) 2015-2021 Rapptz
Copyright (c) 2021-present Pycord Development
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 limit... | 27.270588 | 75 | 0.756903 |
5a066f54abf5c3ed226563dfd8dd82f1ac85841b | 645 | py | Python | SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Aerodynamics/Airfoil_Panel_Method/__init__.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Aerodynamics/Airfoil_Panel_Method/__init__.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | SUAVE/SUAVE-2.5.0/trunk/SUAVE/Methods/Aerodynamics/Airfoil_Panel_Method/__init__.py | Vinicius-Tanigawa/Undergraduate-Research-Project | e92372f07882484b127d7affe305eeec2238b8a9 | [
"MIT"
] | null | null | null | ## @defgroup Methods-Aerodynamics-Airfoil_Panel_Method Airfoil_Panel_Method
# @ingroup Methods-Aerodynamics
from .aero_coeff import aero_coeff
from .airfoil_analysis import airfoil_analysis
from .heads_method import heads_method
from .hess_smi... | 58.636364 | 76 | 0.603101 |
dde1cfcc189afa7316862ab19cb09db775b1f7f4 | 8,354 | py | Python | allennlp/commands/predict.py | threefoldo/allennlp | 983db284cb46fd18c898dd3b0e04eed6cb932768 | [
"Apache-2.0"
] | 6 | 2019-03-19T02:05:35.000Z | 2019-09-25T07:24:52.000Z | allennlp/commands/predict.py | alisdairv/allennlp | 9fcc79566cc148cce9f967a7962ac03bc300f011 | [
"Apache-2.0"
] | 1 | 2020-05-13T14:52:21.000Z | 2020-05-13T20:35:41.000Z | allennlp/commands/predict.py | alisdairv/allennlp | 9fcc79566cc148cce9f967a7962ac03bc300f011 | [
"Apache-2.0"
] | 1 | 2020-03-12T06:53:53.000Z | 2020-03-12T06:53:53.000Z | """
The ``predict`` subcommand allows you to make bulk JSON-to-JSON
or dataset to JSON predictions using a trained model and its
:class:`~allennlp.service.predictors.predictor.Predictor` wrapper.
.. code-block:: bash
$ allennlp predict -h
usage: allennlp predict [-h] [--output-file OUTPUT_FILE]
... | 43.284974 | 113 | 0.613119 |
dc32d93de43321418729f81382b8aec8ff97cd26 | 2,860 | py | Python | day23.py | mxr/advent-of-code-2020 | 37bf4b9e87dc7ac4f36bce74121d38b7eaa7a0a7 | [
"MIT"
] | null | null | null | day23.py | mxr/advent-of-code-2020 | 37bf4b9e87dc7ac4f36bce74121d38b7eaa7a0a7 | [
"MIT"
] | null | null | null | day23.py | mxr/advent-of-code-2020 | 37bf4b9e87dc7ac4f36bce74121d38b7eaa7a0a7 | [
"MIT"
] | null | null | null | from __future__ import annotations
from dataclasses import dataclass
from itertools import chain
from typing import Generator
from typing import Iterable
@dataclass
class Node:
n: int
nn: Node | None = None
@staticmethod
def from_nums(nums: Iterable[int]) -> Node:
f, *r = nums
h = No... | 19.861111 | 75 | 0.493357 |
e35e120f02625cc251b46d83fc05c167f6feaae8 | 6,976 | py | Python | docs/source/conf.py | OpenSourceEconomics/econsa | bb591c1382c97f65d557513c5cfb3febff0e0821 | [
"MIT"
] | 3 | 2020-07-17T15:05:52.000Z | 2020-10-23T06:21:13.000Z | docs/source/conf.py | OpenSourceEconomics/econsa | bb591c1382c97f65d557513c5cfb3febff0e0821 | [
"MIT"
] | 65 | 2020-05-14T13:36:12.000Z | 2021-06-22T15:45:15.000Z | docs/source/conf.py | OpenSourceEconomics/econsa | bb591c1382c97f65d557513c5cfb3febff0e0821 | [
"MIT"
] | 4 | 2020-07-15T13:51:52.000Z | 2021-08-31T06:58:33.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | 29.685106 | 138 | 0.660264 |
d272f441e78e02d77cbc45cda69ecf5a908ec76c | 3,085 | py | Python | xblock/reference/user_service.py | ffedoroff/XBlock | ce5a02aff444bb2c3134ae03853f5b7add0ba308 | [
"Apache-2.0"
] | null | null | null | xblock/reference/user_service.py | ffedoroff/XBlock | ce5a02aff444bb2c3134ae03853f5b7add0ba308 | [
"Apache-2.0"
] | null | null | null | xblock/reference/user_service.py | ffedoroff/XBlock | ce5a02aff444bb2c3134ae03853f5b7add0ba308 | [
"Apache-2.0"
] | null | null | null | """
This file supports the XBlock service that returns data about users.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
from xblock.reference.plugins import Service
class UserService(Service):
"""
UserService returns information about users. Initially only data about... | 49.758065 | 120 | 0.722528 |
e9d223fca17ba87c48111bfb6b96a1dc4c65a84a | 3,384 | py | Python | tests/core/aggregate_test.py | ddrightnow/blurr | a8745101d4a8a85ccf1efc608dba8486d3cebb49 | [
"Apache-2.0"
] | null | null | null | tests/core/aggregate_test.py | ddrightnow/blurr | a8745101d4a8a85ccf1efc608dba8486d3cebb49 | [
"Apache-2.0"
] | 7 | 2019-12-16T20:58:29.000Z | 2022-02-09T23:57:32.000Z | tests/core/aggregate_test.py | ddrightnow/blurr | a8745101d4a8a85ccf1efc608dba8486d3cebb49 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime, timezone
from typing import Dict, Any
from pytest import fixture
from blurr.core.aggregate import AggregateSchema, Aggregate
from blurr.core.evaluation import EvaluationContext
from blurr.core.field import Field
from blurr.core.schema_loader import SchemaLoader
from blurr.core.store_key... | 31.626168 | 86 | 0.741726 |
aff0a55fdf0a6f8dd633ced79162c6b6edb47333 | 114 | py | Python | python/buzz.py | valdirsjr/learning.data | a4b72dfd27f55f2f04120644b73232bf343f71e3 | [
"MIT"
] | null | null | null | python/buzz.py | valdirsjr/learning.data | a4b72dfd27f55f2f04120644b73232bf343f71e3 | [
"MIT"
] | null | null | null | python/buzz.py | valdirsjr/learning.data | a4b72dfd27f55f2f04120644b73232bf343f71e3 | [
"MIT"
] | null | null | null | numero = int(input("Digite um número: "))
if ((numero % 5) == 0):
print("Buzz")
else:
print(numero)
| 19 | 41 | 0.54386 |
600b1c2a0969ac4b3858a8004c8882dc24825507 | 1,335 | py | Python | solnml/components/models/img_classification/densenet190_32.py | zhengjian2322/soln-ml | ceff6c432921df9809f9552aaa1b0bd5a1b7e8d2 | [
"MIT"
] | null | null | null | solnml/components/models/img_classification/densenet190_32.py | zhengjian2322/soln-ml | ceff6c432921df9809f9552aaa1b0bd5a1b7e8d2 | [
"MIT"
] | null | null | null | solnml/components/models/img_classification/densenet190_32.py | zhengjian2322/soln-ml | ceff6c432921df9809f9552aaa1b0bd5a1b7e8d2 | [
"MIT"
] | null | null | null | from solnml.components.models.base_nn import BaseImgClassificationNeuralNetwork
from solnml.components.utils.constants import DENSE, SPARSE, UNSIGNED_DATA, PREDICTIONS
class DenseNet190_32Classifier(BaseImgClassificationNeuralNetwork):
def fit(self, dataset, **kwargs):
from .nn_utils.densenet_32 import d... | 41.71875 | 87 | 0.659925 |
8def205a06ef8d8565b0e7a63f5eb9b6805e1c6f | 996 | py | Python | kubernetes/test/test_v1_load_balancer_status.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | 1 | 2019-02-17T15:28:39.000Z | 2019-02-17T15:28:39.000Z | kubernetes/test/test_v1_load_balancer_status.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_load_balancer_status.py | iamneha/python | 5b208a1a49a8d6f8bbab28bcc226b9ef793bcbd0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.13.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 22.133333 | 105 | 0.718876 |
5494a0019058fb28b2ee9baea429659c7027db52 | 144 | py | Python | apps/employee/urls.py | Vitoriano/hrms-system | cdddb33338903065fb901e6a8d061cf3a7b013a4 | [
"MIT"
] | null | null | null | apps/employee/urls.py | Vitoriano/hrms-system | cdddb33338903065fb901e6a8d061cf3a7b013a4 | [
"MIT"
] | null | null | null | apps/employee/urls.py | Vitoriano/hrms-system | cdddb33338903065fb901e6a8d061cf3a7b013a4 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import EmployeeList
urlpatterns = [
path('list', EmployeeList.as_view(), name="employee_list"),
]
| 20.571429 | 63 | 0.736111 |
26d2104a822dc2e80b65f20c7b54e39b24fd263d | 4,093 | py | Python | src/irsender/irsender.py | mpsamurai/ir-transceiver | 7083e8c68df94c48c68d384508c0c3918df353fb | [
"MIT"
] | 1 | 2019-04-27T08:40:12.000Z | 2019-04-27T08:40:12.000Z | src/irsender/irsender.py | mpsamurai/ir-transceiver | 7083e8c68df94c48c68d384508c0c3918df353fb | [
"MIT"
] | 2 | 2019-04-27T05:13:04.000Z | 2019-05-01T09:55:00.000Z | src/irsender/irsender.py | mpsamurai/ir-transceiver | 7083e8c68df94c48c68d384508c0c3918df353fb | [
"MIT"
] | 1 | 2019-04-27T08:49:27.000Z | 2019-04-27T08:49:27.000Z | import redis
import pigpio
import json
import time
from neochi.core.dataflow.data.ir_sender import State
from neochi.core.dataflow.notifications import ir_sender as notification
from . import logger_config
from logging import getLogger
# irrp.py from http://abyz.me.uk/rpi/pigpio/examples.html#Python%20code
logger = ... | 28.227586 | 74 | 0.543855 |
6663858624dd071d3ad59108015b313095fd8e86 | 28,098 | py | Python | main.py | JamieMenard/pymesh_microwebsrv2_chat | 415cbc1f891e700c7bfc9ffa02bf3712cd14cf95 | [
"MIT"
] | null | null | null | main.py | JamieMenard/pymesh_microwebsrv2_chat | 415cbc1f891e700c7bfc9ffa02bf3712cd14cf95 | [
"MIT"
] | null | null | null | main.py | JamieMenard/pymesh_microwebsrv2_chat | 415cbc1f891e700c7bfc9ffa02bf3712cd14cf95 | [
"MIT"
] | null | null | null | import chat_msg_funcs as cmf
import file_ops
import gc
import lte_funcs as ltef
import pycom
import socket
import _thread
import time
import utime
from MicroWebSrv2 import *
from network import WLAN
from time import sleep
from _thread import allocate_lock
from pymesh import Pymesh
from pym... | 35.567089 | 173 | 0.502313 |
972e0621247b8c01968f0683f45275c0a9fa9e41 | 86 | py | Python | apps/manga/forms/__init__.py | eliezer-borde-globant/lemanga | 57c799804754f6a91fd214faac84d9cd017fc0c4 | [
"MIT"
] | 1 | 2015-07-24T03:21:13.000Z | 2015-07-24T03:21:13.000Z | apps/manga/forms/__init__.py | eliezer-borde-globant/lemanga | 57c799804754f6a91fd214faac84d9cd017fc0c4 | [
"MIT"
] | null | null | null | apps/manga/forms/__init__.py | eliezer-borde-globant/lemanga | 57c799804754f6a91fd214faac84d9cd017fc0c4 | [
"MIT"
] | 3 | 2020-12-17T21:43:57.000Z | 2021-01-07T22:29:58.000Z | from .manga import MangaForm
from .chapter import ChapterForm, ChapterPrictureFormSet
| 28.666667 | 56 | 0.860465 |
db04f1ccf34c9a2585e92fdf971efd3ce9938f2c | 2,574 | py | Python | redhawk/test/sample_last.py | ncoghlan/Redhawk | 5b58b866dae2ba6b8018795b17e6f40abb39e438 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | redhawk/test/sample_last.py | ncoghlan/Redhawk | 5b58b866dae2ba6b8018795b17e6f40abb39e438 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | redhawk/test/sample_last.py | ncoghlan/Redhawk | 5b58b866dae2ba6b8018795b17e6f40abb39e438 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-12-18T10:09:13.000Z | 2020-12-18T10:09:13.000Z | #!/usr/bin/env python
import redhawk.common.node as N
import redhawk.common.tree_converter as T
"""
This module creates a test tree for us to run our code on.
Function Fact(n):
Compound:
if
n == 1
Compound
return 1
Compound
return n * Fact(n-1)
When printed it represents:
(d... | 21.45 | 58 | 0.501943 |
6874c1f1e93b1043861e9e5aac7d18d8f36940c7 | 2,158 | py | Python | Gathered CTF writeups/2020-02-23-BSidesSF/haystack/chaffing.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | 1 | 2022-03-27T06:00:41.000Z | 2022-03-27T06:00:41.000Z | Gathered CTF writeups/2020-02-23-BSidesSF/haystack/chaffing.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | null | null | null | Gathered CTF writeups/2020-02-23-BSidesSF/haystack/chaffing.py | mihaid-b/CyberSakura | f60e6b6bfd6898c69b84424b080090ae98f8076c | [
"MIT"
] | 1 | 2022-03-27T06:01:42.000Z | 2022-03-27T06:01:42.000Z | import binascii
import hashlib
import hmac
import random
import struct
from collections import Counter
CHAFF_SIZE = 32
SIG_SIZE = 16
ALL_BYTES = set((c for c in range(256)))
KEY = binascii.unhexlify('af5f76f605a700ae8c0895c3e6175909')
KEY = b'af5f76f605a700ae8c0895c3e6175909'
def byte(v):
return bytes([v])
def... | 25.093023 | 82 | 0.6038 |
4a60469e13e31441117d1884d282d40a086652a8 | 71 | py | Python | src/__init__.py | zhz961101/pyRSA | f0372c6ee9432e7c54f0435e22172267dc41171f | [
"MIT"
] | null | null | null | src/__init__.py | zhz961101/pyRSA | f0372c6ee9432e7c54f0435e22172267dc41171f | [
"MIT"
] | null | null | null | src/__init__.py | zhz961101/pyRSA | f0372c6ee9432e7c54f0435e22172267dc41171f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from .main import main
| 14.2 | 23 | 0.619718 |
985830ec3fbf9b33f263bff8de61e5d0b4ab40b4 | 474 | gyp | Python | Dependencies/gyp-master/test/mac/archs/test-no-archs.gyp | knight666/exlibris | b21b46e0c84e5c4f81f8048022cda88e7bb3dca2 | [
"MIT"
] | null | null | null | Dependencies/gyp-master/test/mac/archs/test-no-archs.gyp | knight666/exlibris | b21b46e0c84e5c4f81f8048022cda88e7bb3dca2 | [
"MIT"
] | null | null | null | Dependencies/gyp-master/test/mac/archs/test-no-archs.gyp | knight666/exlibris | b21b46e0c84e5c4f81f8048022cda88e7bb3dca2 | [
"MIT"
] | null | null | null | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'targets': [
{
'target_name': 'lib',
'product_name': 'Test',
'type': 'static_library',
'sources': [ 'my_file.cc' ],
},
{
'targ... | 21.545455 | 73 | 0.565401 |
c86fac59000118cab4b6d1b26c7e4aa5bfdda6d8 | 3,579 | py | Python | scripts/make-cz2013.py | geary/election-maps.it2013 | c01a48efe8f022764dba58524d6817ea4e9f05a0 | [
"Unlicense"
] | null | null | null | scripts/make-cz2013.py | geary/election-maps.it2013 | c01a48efe8f022764dba58524d6817ea4e9f05a0 | [
"Unlicense"
] | null | null | null | scripts/make-cz2013.py | geary/election-maps.it2013 | c01a48efe8f022764dba58524d6817ea4e9f05a0 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
import pg, private
#import cProfile
database = 'cz2013'
schema = 'cz'
geom = 'goog_geom'
boxGeom = geom
continentLevel = '97'
def loadContinents( db ):
continentTable = schema + '.continent' + continentLevel
srcfile = 'continents-%s' % continentLevel
filename = '../shapes/shp/%s/%s.shp' ... | 22.229814 | 81 | 0.65102 |
d08d80e4dc0d044b1d31d3a308d0d85aea5a413d | 61,949 | py | Python | src/sentry/south_migrations/0231_auto__add_field_savedsearch_is_default.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 1 | 2019-05-28T06:18:03.000Z | 2019-05-28T06:18:03.000Z | src/sentry/south_migrations/0231_auto__add_field_savedsearch_is_default.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 6 | 2018-10-19T10:04:23.000Z | 2019-12-09T20:29:12.000Z | src/sentry/south_migrations/0231_auto__add_field_savedsearch_is_default.py | AlexWayfer/sentry | ef935cda2b2e960bd602fda590540882d1b0712d | [
"BSD-3-Clause"
] | 2 | 2021-01-26T09:53:39.000Z | 2022-03-22T09:01:47.000Z | # -*- 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 'SavedSearch.is_default'
db.add_column(
'sentry... | 36.333724 | 93 | 0.395729 |
b52e46be218787afcb1540a61a603774e1ade3f7 | 2,888 | py | Python | azure-cognitiveservices-knowledge-qnamaker/setup.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-cognitiveservices-knowledge-qnamaker/setup.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-cognitiveservices-knowledge-qnamaker/setup.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 32.818182 | 91 | 0.608033 |
c6b438d5b5595b296ba35278969045c09a9ab543 | 8,114 | py | Python | jax/dtypes.py | aldragan0/jax | 3ddd3905a4c8f59480c43c24bb1f9374238bb2a0 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-07-08T16:58:56.000Z | 2021-07-08T16:58:56.000Z | jax/dtypes.py | aldragan0/jax | 3ddd3905a4c8f59480c43c24bb1f9374238bb2a0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | jax/dtypes.py | aldragan0/jax | 3ddd3905a4c8f59480c43c24bb1f9374238bb2a0 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-08-02T22:05:44.000Z | 2021-08-02T22:05:44.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, ... | 30.276119 | 80 | 0.663668 |
b3ac40b2929a100092e9d8094fcbcddbe47481f8 | 319 | py | Python | Jython/ejemplojy1.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | Jython/ejemplojy1.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | Jython/ejemplojy1.py | txtbits/daw-python | 5dde1207e2791e90aa5e9ce2b6afc4116129efab | [
"MIT"
] | null | null | null | from javax.swing import JButton, JFrame
frame = JFrame("Hola, Jython",
defaultCloseOperation = JFrame.EXIT_ON_CLOSE,
size = (300,300))
def cambiar_texto(evento):
print "pulsado"
boton = JButton("Pulsame!", actionPerformed = cambiar_texto)
frame.add(boton)
frame.setVisible(True) | 22.785714 | 61 | 0.680251 |
292b0682ffc195b2686c297af03d1220c2309b17 | 158 | py | Python | Symbol Patterns/symbolpattern10.py | Daksh777/Python-PatternHouse | ab801631c2e1f5ed3cc12a26c959d41a5e51273d | [
"MIT"
] | 8 | 2021-03-20T11:26:35.000Z | 2022-01-05T02:39:15.000Z | Symbol Patterns/symbolpattern10.py | Daksh777/Python-PatternHouse | ab801631c2e1f5ed3cc12a26c959d41a5e51273d | [
"MIT"
] | 851 | 2021-04-02T09:08:15.000Z | 2022-01-12T11:26:57.000Z | Symbol Patterns/symbolpattern10.py | Daksh777/Python-PatternHouse | ab801631c2e1f5ed3cc12a26c959d41a5e51273d | [
"MIT"
] | 15 | 2021-04-13T06:10:17.000Z | 2022-01-08T05:07:21.000Z | n = 4
for i in range(n+1):
print("* "*i)
for i in range(n-1, 0, -1):
print("* "*i)
"""
OUTPUT:
*
* *
* * *
* * * *
* * *
* *
*
""" | 9.294118 | 28 | 0.303797 |
f1216a39a94c1eac39ad2883e771327185b05deb | 205 | py | Python | 08-visualization/basic_series_plot.py | johnehunt/PythonDataScienceIntro | 73dc6938c65c6b64486d3e6c6f968fa99976d90a | [
"Apache-2.0"
] | 1 | 2021-09-20T11:22:53.000Z | 2021-09-20T11:22:53.000Z | 08-visualization/basic_series_plot.py | johnehunt/PythonDataScienceIntro | 73dc6938c65c6b64486d3e6c6f968fa99976d90a | [
"Apache-2.0"
] | null | null | null | 08-visualization/basic_series_plot.py | johnehunt/PythonDataScienceIntro | 73dc6938c65c6b64486d3e6c6f968fa99976d90a | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import numpy.random as random
import matplotlib.pyplot as pyplot
ts = pd.Series(random.randn(72), index=pd.date_range('1/1/2015', periods=72))
ts = ts.cumsum()
ts.plot()
pyplot.show()
| 22.777778 | 77 | 0.741463 |
0a4440a698303a38c611ae24eb679763a2c51d12 | 2,697 | py | Python | bot/venv/lib/python3.7/site-packages/pyglet/gl/lib_agl.py | manaccac/sc2_bot | 3aa8b3711378b71fd0a44662cdd7148846e39530 | [
"MIT"
] | 2 | 2021-05-16T07:39:38.000Z | 2021-05-30T22:04:42.000Z | bot/venv/lib/python3.7/site-packages/pyglet/gl/lib_agl.py | manaccac/sc2_bot | 3aa8b3711378b71fd0a44662cdd7148846e39530 | [
"MIT"
] | null | null | null | bot/venv/lib/python3.7/site-packages/pyglet/gl/lib_agl.py | manaccac/sc2_bot | 3aa8b3711378b71fd0a44662cdd7148846e39530 | [
"MIT"
] | 1 | 2022-03-24T23:22:04.000Z | 2022-03-24T23:22:04.000Z | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# Copyright (c) 2008-2020 pyglet contributors
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the follo... | 38.528571 | 78 | 0.70152 |
e2557b3926dd20eab1f5b5a9c192c74ae7dcc757 | 1,494 | py | Python | ivi/agilent/agilentE4423B.py | edupo/python-ivi | 8105d8064503725dde781f0378d75db58defaecb | [
"MIT"
] | null | null | null | ivi/agilent/agilentE4423B.py | edupo/python-ivi | 8105d8064503725dde781f0378d75db58defaecb | [
"MIT"
] | null | null | null | ivi/agilent/agilentE4423B.py | edupo/python-ivi | 8105d8064503725dde781f0378d75db58defaecb | [
"MIT"
] | null | null | null | """
Python Interchangeable Virtual Instrument Library
Copyright (c) 2014-2016 Alex Forencich
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... | 36.439024 | 77 | 0.774431 |
35df9bea511fe3600cc866b9a74c77358311bc06 | 604 | py | Python | lib/max_subarray.py | LaurenCovington/dynamic-programming | 8e55768751449dde54cb479223bb7c92615fc989 | [
"MIT"
] | null | null | null | lib/max_subarray.py | LaurenCovington/dynamic-programming | 8e55768751449dde54cb479223bb7c92615fc989 | [
"MIT"
] | null | null | null | lib/max_subarray.py | LaurenCovington/dynamic-programming | 8e55768751449dde54cb479223bb7c92615fc989 | [
"MIT"
] | null | null | null |
def max_sub_array(nums):
""" Returns the max subarray of the given list of numbers.
Returns 0 if nums is None or an empty list.
Time Complexity: O(n)
Space Complexity: O(1)
"""
if nums == None:
return 0
if len(nums) == 0:
return 0
if max(nums) < 0:
... | 21.571429 | 62 | 0.566225 |
0f2a30bfaf50c1fff049add9ea78e1d3fe0e0be2 | 1,653 | py | Python | ImageNetTools/__init__.py | AaltoRSE/ImageNetTools | 1ed8b8c38bd14eb47fc6167bf194f327a2696bf1 | [
"BSD-3-Clause"
] | 1 | 2021-11-15T11:21:55.000Z | 2021-11-15T11:21:55.000Z | ImageNetTools/__init__.py | AaltoRSE/ImageNetTools | 1ed8b8c38bd14eb47fc6167bf194f327a2696bf1 | [
"BSD-3-Clause"
] | null | null | null | ImageNetTools/__init__.py | AaltoRSE/ImageNetTools | 1ed8b8c38bd14eb47fc6167bf194f327a2696bf1 | [
"BSD-3-Clause"
] | null | null | null | '''
Created on Sep 28, 2021
@author: Thomas Pfau
'''
from .imageNetMapper import ImageNetMapper
from .IOTesters import benchmarkReader
from .IOTesters import pureWDSRead
from .IOTesters import copyAndLoad
from .imageNetTransformations import image_transformations as default_transformations
def buildShardsForFolder... | 53.322581 | 240 | 0.791289 |
7c848f281282867eff1ad9e55544c8f10d86ae82 | 17,036 | py | Python | tests/tensorflow/test_sanity_sample.py | SueHeck/nncf | f2623177f3723176042a79cb7dc075b011a70a38 | [
"Apache-2.0"
] | 1 | 2021-12-30T05:49:10.000Z | 2021-12-30T05:49:10.000Z | tests/tensorflow/test_sanity_sample.py | SueHeck/nncf | f2623177f3723176042a79cb7dc075b011a70a38 | [
"Apache-2.0"
] | null | null | null | tests/tensorflow/test_sanity_sample.py | SueHeck/nncf | f2623177f3723176042a79cb7dc075b011a70a38 | [
"Apache-2.0"
] | null | null | null | """
Copyright (c) 2020 Intel Corporation
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 writin... | 36.636559 | 118 | 0.688072 |
f8242655e26f8f9cfec65b49a977cdcc74e11837 | 1,414 | py | Python | app/models/exercise_entry.py | SeanBE/logs-api | ccaea79bca61b6376eef562ba5c231a3d089ddc1 | [
"MIT"
] | null | null | null | app/models/exercise_entry.py | SeanBE/logs-api | ccaea79bca61b6376eef562ba5c231a3d089ddc1 | [
"MIT"
] | null | null | null | app/models/exercise_entry.py | SeanBE/logs-api | ccaea79bca61b6376eef562ba5c231a3d089ddc1 | [
"MIT"
] | null | null | null | from marshmallow import Schema, fields, post_load
from .base import Base
from app.extensions import db
from app.models.exercise import ExerciseSchema, Exercise
from app.models.set_entry import SetEntrySchema
class ExerciseEntry(Base):
__table__name = 'exercise_entry'
__table_args__ = (db.UniqueConstraint('ex... | 32.883721 | 79 | 0.645686 |
0b24a41610453ed3caa4e1cad2f82cce3875b9b6 | 894 | py | Python | docker/1.2.0/py3/mms-entrypoint.py | mikesterlingw/sagemaker-pytorch-inference-toolkit | d3fd2f33028a223d836de3f97f7ff429b6d74d00 | [
"Apache-2.0"
] | 44 | 2020-06-25T22:15:07.000Z | 2022-03-29T19:52:40.000Z | docker/1.2.0/py3/mms-entrypoint.py | mikesterlingw/sagemaker-pytorch-inference-toolkit | d3fd2f33028a223d836de3f97f7ff429b6d74d00 | [
"Apache-2.0"
] | 76 | 2019-08-08T15:49:42.000Z | 2020-05-27T17:30:26.000Z | docker/1.2.0/py3/mms-entrypoint.py | mikesterlingw/sagemaker-pytorch-inference-toolkit | d3fd2f33028a223d836de3f97f7ff429b6d74d00 | [
"Apache-2.0"
] | 34 | 2020-07-06T16:22:09.000Z | 2022-03-25T19:42:20.000Z | # Copyright 2019-2020 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" fil... | 30.827586 | 78 | 0.746085 |
55bd139c5edc11490793d583e3e4b86732b69d86 | 925 | py | Python | cyberdog_interaction/cyberdog_wireless/wifirssi/launch/wifirssi.launch.py | gitter-badger/cyberdog_ros2 | f995b3cbf5773a47cd2d7293b0622d91fb409cdc | [
"Apache-2.0"
] | 284 | 2021-09-15T12:31:22.000Z | 2022-03-31T01:16:13.000Z | cyberdog_interaction/cyberdog_wireless/wifirssi/launch/wifirssi.launch.py | gitter-badger/cyberdog_ros2 | f995b3cbf5773a47cd2d7293b0622d91fb409cdc | [
"Apache-2.0"
] | 85 | 2021-09-18T03:44:26.000Z | 2022-03-23T12:32:55.000Z | cyberdog_interaction/cyberdog_wireless/wifirssi/launch/wifirssi.launch.py | gitter-badger/cyberdog_ros2 | f995b3cbf5773a47cd2d7293b0622d91fb409cdc | [
"Apache-2.0"
] | 94 | 2021-09-15T14:40:14.000Z | 2022-03-30T06:50:11.000Z | #!/usr/bin/python3
#
# Copyright (c) 2021 Beijing Xiaomi Mobile Software Co., 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/... | 31.896552 | 82 | 0.718919 |
ec803730e441f8b16fb67b33c43dde1be2ad80e1 | 1,448 | py | Python | net_retrain_manager.py | rcalfredson/objects_counting_dmap | 5194306d60f987741c4ec0f22eff990422fbd405 | [
"Apache-2.0"
] | null | null | null | net_retrain_manager.py | rcalfredson/objects_counting_dmap | 5194306d60f987741c4ec0f22eff990422fbd405 | [
"Apache-2.0"
] | null | null | null | net_retrain_manager.py | rcalfredson/objects_counting_dmap | 5194306d60f987741c4ec0f22eff990422fbd405 | [
"Apache-2.0"
] | null | null | null | import glob
import json
import os
import random
class NetRetrainManager:
def __init__(self, nets_dir):
self.nets_dir = nets_dir
self.tracker_filename = os.path.join(self.nets_dir, "retrain_tracker.json")
self.net_retrain_statuses = {
os.path.basename(n): False
for n... | 30.808511 | 83 | 0.629834 |
212f852d43a78a0c08768ef2bec52f121b4f2f1e | 614 | py | Python | module1-web-application-development-with-flask/app-demo/web_app/services/stocks_services.py | CodingDuckmx/DS-Unit-3-Sprint-3-Productization-and-Cloud | ec4a65261aa8908c70953caaebf85664cf6ca76a | [
"MIT"
] | null | null | null | module1-web-application-development-with-flask/app-demo/web_app/services/stocks_services.py | CodingDuckmx/DS-Unit-3-Sprint-3-Productization-and-Cloud | ec4a65261aa8908c70953caaebf85664cf6ca76a | [
"MIT"
] | null | null | null | module1-web-application-development-with-flask/app-demo/web_app/services/stocks_services.py | CodingDuckmx/DS-Unit-3-Sprint-3-Productization-and-Cloud | ec4a65261aa8908c70953caaebf85664cf6ca76a | [
"MIT"
] | null | null | null |
import os
import requests
from dotenv import load_dotenv
import json
load_dotenv()
API_KEY = os.getenv{'ALPHADVANTAGE_API_KEY'}
request_url = 'https://www.alphavantage.co/query?function=TIME_SERIES_DAILY&symbol=TSLA&apikey={API_KEY}'
print(request_url)
response = requests.get(request_url)
print(type(response))
pr... | 24.56 | 105 | 0.765472 |
8e008141363ccc1777bcca2f8d0217fdaae29d07 | 229 | py | Python | #008 - Message Box/messagebox.py | araujo0608/tkinter | 781a763d54f610293a854b599092360c1871044c | [
"MIT"
] | null | null | null | #008 - Message Box/messagebox.py | araujo0608/tkinter | 781a763d54f610293a854b599092360c1871044c | [
"MIT"
] | null | null | null | #008 - Message Box/messagebox.py | araujo0608/tkinter | 781a763d54f610293a854b599092360c1871044c | [
"MIT"
] | null | null | null | from tkinter import *
from tkinter import messagebox as msgbox
root = Tk()
root.title('Message Box')
r = msgbox.askquestion("Error", "Hey, you want delete c:/System32 path?")
lblR = Label(root, text=r).pack()
root.mainloop() | 19.083333 | 73 | 0.71179 |
f6971296b59e776fd341c6d1cb83fea6973c2f39 | 1,968 | py | Python | client_code/reports/widgets/widget_utilities/gen_chart_params/__init__.py | Alcampopiano/OpenQuestion | 8576ec3372eca3b3b51661ad7f5c615fe8193946 | [
"BSD-3-Clause"
] | 4 | 2021-01-27T15:36:21.000Z | 2021-06-04T17:43:27.000Z | client_code/reports/widgets/widget_utilities/gen_chart_params/__init__.py | Alcampopiano/OpenQuestion | 8576ec3372eca3b3b51661ad7f5c615fe8193946 | [
"BSD-3-Clause"
] | 1 | 2021-02-04T20:24:38.000Z | 2021-02-05T13:47:41.000Z | client_code/reports/widgets/widget_utilities/gen_chart_params/__init__.py | Alcampopiano/OpenQuestion | 8576ec3372eca3b3b51661ad7f5c615fe8193946 | [
"BSD-3-Clause"
] | 2 | 2021-01-27T15:36:30.000Z | 2021-02-02T06:11:35.000Z | from ._anvil_designer import gen_chart_paramsTemplate
from anvil import *
import anvil.server
import anvil.facebook.auth
import anvil.google.auth, anvil.google.drive
from anvil.google.drive import app_files
import anvil.microsoft.auth
import anvil.users
import anvil.tables as tables
import anvil.tables.query as q
from ... | 30.276923 | 86 | 0.722561 |
58b30514ac2a3bcc769ad8b4630e8a32d102f611 | 2,936 | py | Python | lambda-powertools-feature-flags/app/tests/unit/test_feature_flags.py | walawe/talk-dev-to-me-twitch | 79369c4b191bb960cef3b01aa3a29ba209909f20 | [
"MIT-0"
] | 69 | 2021-07-29T15:14:55.000Z | 2022-03-28T02:38:01.000Z | lambda-powertools-feature-flags/app/tests/unit/test_feature_flags.py | walawe/talk-dev-to-me-twitch | 79369c4b191bb960cef3b01aa3a29ba209909f20 | [
"MIT-0"
] | 142 | 2022-01-27T17:12:24.000Z | 2022-03-30T07:39:49.000Z | lambda-powertools-feature-flags/app/tests/unit/test_feature_flags.py | walawe/talk-dev-to-me-twitch | 79369c4b191bb960cef3b01aa3a29ba209909f20 | [
"MIT-0"
] | 34 | 2021-07-29T14:40:31.000Z | 2022-03-25T21:11:04.000Z | from aws_lambda_powertools.utilities.feature_flags import RuleAction, FeatureFlags, AppConfigStore
def init_feature_flags(mocker, mock_schema, envelope="") -> FeatureFlags:
"""Mock AppConfig Store get_configuration method to use mock schema instead"""
method_to_mock = "aws_lambda_powertools.utilities.feature... | 31.234043 | 101 | 0.570845 |
d8e92f96290250b4622e7f6b466cf4b4739a18ad | 734 | py | Python | aslam_offline_calibration/kalibr/python/kalibr_imu_camera_calibration/testBSplineIO.py | JzHuai0108/kalibr | 32d095162408c90ebf0c49522d27732ffec8f35f | [
"BSD-4-Clause"
] | 10 | 2021-08-20T21:12:22.000Z | 2022-03-18T03:20:25.000Z | aslam_offline_calibration/kalibr/python/kalibr_imu_camera_calibration/testBSplineIO.py | JzHuai0108/kalibr | 32d095162408c90ebf0c49522d27732ffec8f35f | [
"BSD-4-Clause"
] | null | null | null | aslam_offline_calibration/kalibr/python/kalibr_imu_camera_calibration/testBSplineIO.py | JzHuai0108/kalibr | 32d095162408c90ebf0c49522d27732ffec8f35f | [
"BSD-4-Clause"
] | 4 | 2021-08-17T12:16:25.000Z | 2021-11-06T02:52:35.000Z | import numpy as np
from . import BSplineIO
def testSerializePoses():
timeList, smTList = BSplineIO.generateRandomPoses()
testFile = "testPoses.txt"
BSplineIO.savePoses(timeList, smTList, testFile)
newTimeList, newsmTList = BSplineIO.loadPoses(testFile)
assert len(timeList) == len(newTimeList)
... | 33.363636 | 69 | 0.690736 |
f9bf6d38257c3aca11248226121f654b46ab725b | 2,656 | py | Python | week4/task2_2.py | mcv-m6-video/mcv-m6-2018-team1 | ec56c61e7e178fe28cc9fc276b7a57d0ba5a65d8 | [
"MIT"
] | null | null | null | week4/task2_2.py | mcv-m6-video/mcv-m6-2018-team1 | ec56c61e7e178fe28cc9fc276b7a57d0ba5a65d8 | [
"MIT"
] | null | null | null | week4/task2_2.py | mcv-m6-video/mcv-m6-2018-team1 | ec56c61e7e178fe28cc9fc276b7a57d0ba5a65d8 | [
"MIT"
] | 3 | 2018-04-19T07:59:13.000Z | 2020-03-13T07:02:30.000Z | import cv2
import numpy
import os
def task2_2():
matstack = numpy.identity(3)
matlog = []
p = '../datasets/traffic/'
inp = ['input/' + x for x in os.listdir(p + 'input/')]
inp.sort()
gth = ['groundtruth/' + x for x in os.listdir(p + 'groundtruth/')]
gth.sort()
phv = '../datasets/highway... | 34.051282 | 107 | 0.539533 |
ed9b84f5e229315a491366867852736b7932906e | 775 | py | Python | 2015/01/main.py | mxw7265/Advent-Of-Code-Archive | 70b70ebb326fbbf09fe1bfefa1199675882d3a5b | [
"MIT"
] | null | null | null | 2015/01/main.py | mxw7265/Advent-Of-Code-Archive | 70b70ebb326fbbf09fe1bfefa1199675882d3a5b | [
"MIT"
] | null | null | null | 2015/01/main.py | mxw7265/Advent-Of-Code-Archive | 70b70ebb326fbbf09fe1bfefa1199675882d3a5b | [
"MIT"
] | null | null | null | FILENAME = "input.txt"
def get_input() -> str:
with open(FILENAME) as f:
return f.readline().strip()
def part_1():
input = get_input()
result = 0
for ch in input:
if ch == "(":
result += 1
else:
result -= 1
print(f"The instructions take Santa to... | 16.847826 | 72 | 0.48129 |
7c1635a4e0d48be34413f730a6e98be08888d33b | 3,845 | py | Python | purity_fb/purity_fb_1dot9/models/_fixed_reference.py | mabdelhafez/purity_fb_python_client | a9856875b3df43b4302a2e4addd1a6b71f51f5ce | [
"Apache-2.0"
] | null | null | null | purity_fb/purity_fb_1dot9/models/_fixed_reference.py | mabdelhafez/purity_fb_python_client | a9856875b3df43b4302a2e4addd1a6b71f51f5ce | [
"Apache-2.0"
] | null | null | null | purity_fb/purity_fb_1dot9/models/_fixed_reference.py | mabdelhafez/purity_fb_python_client | a9856875b3df43b4302a2e4addd1a6b71f51f5ce | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Pure Storage FlashBlade REST 1.9 Python SDK
Pure Storage FlashBlade REST 1.9 Python SDK, developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/).
OpenAPI spec version: 1.9
Contact: i... | 25.633333 | 204 | 0.557087 |
6fb95f9ac1080cfee23bf3d36df9fbbd38cfcef0 | 7,946 | py | Python | official/cv/vgg16/src/dataset.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 77 | 2021-10-15T08:32:37.000Z | 2022-03-30T13:09:11.000Z | official/cv/vgg16/src/dataset.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 3 | 2021-10-30T14:44:57.000Z | 2022-02-14T06:57:57.000Z | official/cv/vgg16/src/dataset.py | mindspore-ai/models | 9127b128e2961fd698977e918861dadfad00a44c | [
"Apache-2.0"
] | 24 | 2021-10-15T08:32:45.000Z | 2022-03-24T18:45:20.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... | 41.602094 | 117 | 0.630506 |
4515a0fc6faec16898e3adb871eab1223d8fd066 | 3,889 | py | Python | config.py | devinaarvind/tensorflow-efe | 7b3001ca6f885d6c94b198d24560e2004bbd356e | [
"MIT"
] | 13 | 2017-07-28T17:30:04.000Z | 2021-03-13T01:43:18.000Z | config.py | devinaarvind/tensorflow-efe | 7b3001ca6f885d6c94b198d24560e2004bbd356e | [
"MIT"
] | 3 | 2017-12-05T14:52:59.000Z | 2018-03-02T09:56:14.000Z | config.py | devinaarvind/tensorflow-efe | 7b3001ca6f885d6c94b198d24560e2004bbd356e | [
"MIT"
] | 7 | 2018-05-27T02:55:13.000Z | 2019-07-16T11:12:59.000Z | # ----------------------- PATH ------------------------
ROOT_PATH = "."
DATA_PATH = "%s/data" % ROOT_PATH
WN18_DATA_PATH = "%s/wn18" % DATA_PATH
WN18RR_DATA_PATH = "%s/wn18rr" % DATA_PATH
FB15K_DATA_PATH = "%s/fb15k" % DATA_PATH
FB15K237_DATA_PATH = "%s/fb15k-237" % DATA_PATH
FB3M_DATA_PATH = "%s/fb3m" % DATA_PATH
LO... | 32.140496 | 62 | 0.688352 |
337e342fa6ea4f3f06f64a903bd3063ebd5779af | 3,202 | py | Python | lib/contacts.py | cmatomic/electrum-cesc | 8e32dee4ff13cbc07646de632d49272636f936c0 | [
"MIT"
] | null | null | null | lib/contacts.py | cmatomic/electrum-cesc | 8e32dee4ff13cbc07646de632d49272636f936c0 | [
"MIT"
] | 2 | 2015-09-13T19:53:35.000Z | 2020-01-26T23:48:04.000Z | lib/contacts.py | cmatomic/electrum-cesc | 8e32dee4ff13cbc07646de632d49272636f936c0 | [
"MIT"
] | 4 | 2016-10-07T17:21:11.000Z | 2021-12-20T05:21:24.000Z | # Electrum - Lightweight Bitcoin Client
# Copyright (c) 2015 Thomas Voegtlin
#
# 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... | 34.430108 | 86 | 0.601811 |
a09e158199d4438908b90cbe5d320a284736d14e | 6,791 | py | Python | tools/oid_to_pascal_voc_xml.py | pratyan/Helmet_detaction_Using_YOLO-V3 | 3d52670c1014e66997bf59795135125cf4fa309c | [
"MIT"
] | null | null | null | tools/oid_to_pascal_voc_xml.py | pratyan/Helmet_detaction_Using_YOLO-V3 | 3d52670c1014e66997bf59795135125cf4fa309c | [
"MIT"
] | null | null | null | tools/oid_to_pascal_voc_xml.py | pratyan/Helmet_detaction_Using_YOLO-V3 | 3d52670c1014e66997bf59795135125cf4fa309c | [
"MIT"
] | null | null | null |
import os
from tqdm import tqdm
from sys import exit
import argparse
import cv2
from textwrap import dedent
from lxml import etree
foldername = os.path.basename(os.getcwd())
if foldername == "tools": os.chdir("..")
Dataset_path = "OIDv4_ToolKit/OID/Dataset"
def convert_to_xml():
current_path = os... | 40.664671 | 120 | 0.378442 |
95670edfd0462a8df5c910c6df211fe9e1d2c654 | 70,078 | py | Python | copyparty/up2k.py | 9001/copyparty | e4ca4260bbed7ba4c043e838473ed8a04a450839 | [
"MIT"
] | 47 | 2020-06-24T19:00:40.000Z | 2022-03-23T03:57:40.000Z | copyparty/up2k.py | 9001/copyparty | e4ca4260bbed7ba4c043e838473ed8a04a450839 | [
"MIT"
] | 7 | 2021-02-21T03:11:28.000Z | 2021-12-03T01:09:56.000Z | copyparty/up2k.py | 9001/copyparty | e4ca4260bbed7ba4c043e838473ed8a04a450839 | [
"MIT"
] | 5 | 2021-06-30T17:42:40.000Z | 2022-01-24T04:59:07.000Z | # coding: utf-8
from __future__ import print_function, unicode_literals
import re
import os
import time
import math
import json
import gzip
import stat
import shutil
import base64
import hashlib
import threading
import traceback
import subprocess as sp
from copy import deepcopy
from .__init__ import WINDOWS, ANYWIN, ... | 33.546194 | 118 | 0.460073 |
a872a12f3c60aba033b96bec3d804ebaa779b826 | 7,292 | py | Python | src/nanora.py | TypeDefinition/NanoraBot | 8e1103c6eec4d293ad12c62874407af13c9e3345 | [
"MIT"
] | null | null | null | src/nanora.py | TypeDefinition/NanoraBot | 8e1103c6eec4d293ad12c62874407af13c9e3345 | [
"MIT"
] | null | null | null | src/nanora.py | TypeDefinition/NanoraBot | 8e1103c6eec4d293ad12c62874407af13c9e3345 | [
"MIT"
] | null | null | null | import better_profanity
import random
import regex
# Constants
BOT_NAME = "NanoraBot"
TRIGGER_LUNA_POST = "luna"
TRIGGER_LUNA_POST_JP = "ルーナ"
TRIGGER_NANORA = "!nanora"
TRIGGER_GOOD_BOT = "good bot"
TRIGGER_CUTE_BOT = "cute bot"
TRIGGER_NTF = "!ntf"
LUNA_SUBMISSION_MESSAGES = ["Luna is adult sexy wonderful beautiful... | 47.660131 | 174 | 0.654279 |
049ae3e3dc99a1810163fce004eb23dcba93ad7b | 3,974 | py | Python | contrib/linearize/linearize-hashes.py | faceeran/QAnoncoin-14.0.2 | b3e4019682c9f3c5432245b88cefacce165afbc9 | [
"MIT"
] | null | null | null | contrib/linearize/linearize-hashes.py | faceeran/QAnoncoin-14.0.2 | b3e4019682c9f3c5432245b88cefacce165afbc9 | [
"MIT"
] | 1 | 2021-10-06T13:16:44.000Z | 2021-10-06T13:16:44.000Z | contrib/linearize/linearize-hashes.py | faceeran/QAnoncoin-14.0.2 | b3e4019682c9f3c5432245b88cefacce165afbc9 | [
"MIT"
] | 2 | 2021-09-25T16:34:51.000Z | 2021-12-23T00:51:38.000Z | #!/usr/bin/env python3
#
# linearize-hashes.py: List blocks in a linear, no-fork version of the chain.
#
# Copyright (c) 2013-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
from __future__ impo... | 29.007299 | 90 | 0.684952 |
70c753a566beba90b46e43efa7783caa61a04b97 | 1,652 | py | Python | djangox/lib/python3.8/site-packages/allauth/socialaccount/providers/bitbucket_oauth2/views.py | DemarcusL/django_wiki_lab | 3b7cf18af7e0f89c94d10eb953ca018a150a2f55 | [
"MIT"
] | 6,342 | 2015-01-01T07:40:30.000Z | 2022-03-31T04:18:30.000Z | djangox/lib/python3.8/site-packages/allauth/socialaccount/providers/bitbucket_oauth2/views.py | DemarcusL/django_wiki_lab | 3b7cf18af7e0f89c94d10eb953ca018a150a2f55 | [
"MIT"
] | 2,198 | 2015-01-02T15:17:45.000Z | 2022-03-28T10:20:43.000Z | djangox/lib/python3.8/site-packages/allauth/socialaccount/providers/bitbucket_oauth2/views.py | DemarcusL/django_wiki_lab | 3b7cf18af7e0f89c94d10eb953ca018a150a2f55 | [
"MIT"
] | 2,928 | 2015-01-01T10:44:13.000Z | 2022-03-31T03:20:16.000Z | import requests
from allauth.socialaccount import app_settings
from allauth.socialaccount.providers.oauth2.views import (
OAuth2Adapter,
OAuth2CallbackView,
OAuth2LoginView,
)
from .provider import BitbucketOAuth2Provider
class BitbucketOAuth2Adapter(OAuth2Adapter):
provider_id = BitbucketOAuth2Prov... | 37.545455 | 83 | 0.691889 |
c66f5a45959c128ddb2258bb073cf7d49949e88b | 844 | py | Python | archive/dags/dag_marketing_pipeline.py | kavisek/airflow-dags | 25ed00e5013b016570c81c1681704df137c9630b | [
"MIT"
] | 1 | 2021-05-20T12:52:56.000Z | 2021-05-20T12:52:56.000Z | archive/dags/dag_marketing_pipeline.py | kavisek/airflow-dags | 25ed00e5013b016570c81c1681704df137c9630b | [
"MIT"
] | 3 | 2021-08-30T16:30:50.000Z | 2022-03-01T23:15:44.000Z | archive/dags/dag_marketing_pipeline.py | kavisek/airflow-dags | 25ed00e5013b016570c81c1681704df137c9630b | [
"MIT"
] | 3 | 2021-05-21T21:26:34.000Z | 2021-10-05T16:57:57.000Z | import datetime as dt
from airflow.operators.bash_operator import BashOperator
from airflow.models import DAG
default_args = {
'owner': 'kavi',
'depends_on_past': False,
'start_date': dt.datetime(2019, 9, 1),
'email': ['kavi@donotemail.com'],
'email_on_failure': True,
'email_on_retry': True,
... | 29.103448 | 90 | 0.659953 |
8cbd9f8a55818b53285c4153add7f4f8ab650b8c | 939 | py | Python | off365/config.py | klorenz/python-off365 | cc6204b5b612ab011cb531aa6eeabc6711e2e5ec | [
"MIT"
] | null | null | null | off365/config.py | klorenz/python-off365 | cc6204b5b612ab011cb531aa6eeabc6711e2e5ec | [
"MIT"
] | null | null | null | off365/config.py | klorenz/python-off365 | cc6204b5b612ab011cb531aa6eeabc6711e2e5ec | [
"MIT"
] | null | null | null | from os import chmod, makedirs
from os.path import exists, dirname, expanduser
import pyaml
import yaml
from .msgraph_api import MSGraphApi
def read_config_file():
config_file = expanduser("~/.config/off365/config")
try:
with open(config_file, 'r') as f:
result = yaml.load(f)
if re... | 22.357143 | 75 | 0.647497 |
95cd6f1eb20d85cacd2c138532fb540131fbc17a | 938 | py | Python | hood/urls.py | p-koskey/mtaani | 56b28123349ba51f10a3c2a25545d581815160a9 | [
"Unlicense",
"MIT"
] | null | null | null | hood/urls.py | p-koskey/mtaani | 56b28123349ba51f10a3c2a25545d581815160a9 | [
"Unlicense",
"MIT"
] | null | null | null | hood/urls.py | p-koskey/mtaani | 56b28123349ba51f10a3c2a25545d581815160a9 | [
"Unlicense",
"MIT"
] | null | null | null | from django.urls import path
from django.contrib.auth.views import LogoutView
from . import views
urlpatterns=[
path('',views.index,name = 'index'),
path('register/', views.register, name='register'),
path("logout/", LogoutView.as_view(), name="logout"),
path('profile/<username>/', views.profile, name=... | 46.9 | 72 | 0.66951 |
add849ad5c660ebfa59996123b60584e73615655 | 6,678 | py | Python | src/config.py | tengyangxie/RepBM | e11babd2bdf40fc58581adc581cc6233658338d1 | [
"MIT"
] | 9 | 2019-01-23T12:13:18.000Z | 2021-04-29T02:08:13.000Z | src/config.py | StanfordAI4HI/RepBM | e11babd2bdf40fc58581adc581cc6233658338d1 | [
"MIT"
] | null | null | null | src/config.py | StanfordAI4HI/RepBM | e11babd2bdf40fc58581adc581cc6233658338d1 | [
"MIT"
] | 7 | 2018-12-03T17:23:53.000Z | 2020-07-02T14:51:53.000Z | class cartpole_config():
# domain parameters
state_dim = 4
action_size = 2
gamma = 1.0
n_win_ticks = 195
max_length = 200
oracle_reward = 1
rescale = [[1, 1, 1, 1]]
# q training parameters
dqn_batch_size = 64
dqn_hidden_dims = [24,48]
dqn_num_episodes = 2000
buffer_c... | 22.869863 | 73 | 0.651842 |
df4a0d1e8de6551ea507150f742c3b745f2397c7 | 6,559 | py | Python | utils/utils_st.py | Curli-quan/oneshot-medical-landmark | 572926077fffbe9832aa16baa98bd046ec326700 | [
"Apache-2.0"
] | 7 | 2021-12-18T17:08:15.000Z | 2022-03-02T14:08:12.000Z | utils/utils_st.py | Curli-quan/oneshot-medical-landmark | 572926077fffbe9832aa16baa98bd046ec326700 | [
"Apache-2.0"
] | 2 | 2021-12-19T20:28:22.000Z | 2021-12-28T05:17:47.000Z | utils/utils_st.py | Curli-quan/oneshot-medical-landmark | 572926077fffbe9832aa16baa98bd046ec326700 | [
"Apache-2.0"
] | 1 | 2022-03-19T15:08:16.000Z | 2022-03-19T15:08:16.000Z | import numpy as np
import torch
import time
from pathlib import Path
from multiprocessing import Process, Queue
from PIL import Image
from torchvision.transforms import ToPILImage
from PIL import Image, ImageDraw, ImageFont
to_PIL = ToPILImage()
def pred2gt(pred):
if len(pred) != 2:
ret... | 35.263441 | 85 | 0.575545 |
ea1e9f50105ee6a092cef7004b15ed278c3fdb1c | 182 | py | Python | examples/one_way_yuv/common.py | cmusatyalab/gabriel | 5761fa61d7fa1a17b4af1a9b4dd5faca8ffe6c3c | [
"Apache-2.0"
] | 50 | 2015-02-03T21:48:33.000Z | 2021-09-26T22:50:52.000Z | examples/one_way_yuv/common.py | cmusatyalab/gabriel | 5761fa61d7fa1a17b4af1a9b4dd5faca8ffe6c3c | [
"Apache-2.0"
] | 13 | 2017-01-18T13:47:41.000Z | 2020-06-22T23:34:17.000Z | examples/one_way_yuv/common.py | cmusatyalab/gabriel | 5761fa61d7fa1a17b4af1a9b4dd5faca8ffe6c3c | [
"Apache-2.0"
] | 33 | 2015-05-30T21:30:29.000Z | 2021-09-26T23:14:41.000Z | import logging
WEBSOCKET_PORT = 9099
DEFAULT_SOURCE_NAME = 'camera_yuv'
def configure_logging():
logging.basicConfig(format="%(levelname)s: %(message)s", level=logging.INFO)
| 18.2 | 80 | 0.758242 |
aa617fdfd698f663f864d65f1258a433a490886a | 9,489 | py | Python | sphinxcontrib/needs/filter_common.py | gregegg/sphinxcontrib-needs | b0c10a44756bb8f16313dcf52e17fd87cf47e780 | [
"MIT"
] | 1 | 2021-12-31T03:55:12.000Z | 2021-12-31T03:55:12.000Z | sphinxcontrib/needs/filter_common.py | gregegg/sphinxcontrib-needs | b0c10a44756bb8f16313dcf52e17fd87cf47e780 | [
"MIT"
] | null | null | null | sphinxcontrib/needs/filter_common.py | gregegg/sphinxcontrib-needs | b0c10a44756bb8f16313dcf52e17fd87cf47e780 | [
"MIT"
] | 1 | 2021-12-31T03:55:44.000Z | 2021-12-31T03:55:44.000Z | """
filter_base is used to provide common filter functionality for directives
like needtable, needlist and needflow.
"""
import re
import sys
import urllib
import copy
from docutils.parsers.rst import Directive
from docutils.parsers.rst import directives
from sphinxcontrib.needs.utils import status_sorter, merge_two... | 35.406716 | 119 | 0.63073 |
076a921f37d81477326e2d2c646b7cccbb76b276 | 3,082 | py | Python | ci/collect_test_results.py | EvilMcJerkface/registry | 15d9cd901e7d0bca2f4e2f8c6ac53d615a303d1e | [
"Apache-2.0"
] | 226 | 2016-12-24T02:27:52.000Z | 2022-03-02T12:42:36.000Z | ci/collect_test_results.py | EvilMcJerkface/registry | 15d9cd901e7d0bca2f4e2f8c6ac53d615a303d1e | [
"Apache-2.0"
] | 570 | 2016-12-27T21:31:31.000Z | 2022-02-07T02:42:49.000Z | ci/collect_test_results.py | EvilMcJerkface/registry | 15d9cd901e7d0bca2f4e2f8c6ac53d615a303d1e | [
"Apache-2.0"
] | 179 | 2016-12-17T02:25:22.000Z | 2022-03-04T03:35:50.000Z | #!/usr/bin/env python
import fnmatch
import os
import xml.etree.ElementTree as ET
print('<results>')
reports_dirs = ['/target/surefire-reports', '/target/failsafe-reports']
for root, directories, filenames in os.walk('.'):
matching_reports_dirs = list(filter(lambda x: root.endswith(x), reports_dirs))
test_xmls = ... | 38.049383 | 105 | 0.582414 |
359c8c0ac96475a93e6a09d02866ebffcb2dd597 | 12,124 | py | Python | news_tls/data.py | OpenSUM/TimeSum | e94d8d170426a68a96380cfc59a0409c071f8606 | [
"MIT"
] | 27 | 2020-05-21T10:44:34.000Z | 2021-11-09T01:36:50.000Z | news_tls/data.py | OpenSUM/TimeSum | e94d8d170426a68a96380cfc59a0409c071f8606 | [
"MIT"
] | 6 | 2021-04-06T18:22:56.000Z | 2022-03-12T00:52:25.000Z | news_tls/data.py | OpenSUM/TimeSum | e94d8d170426a68a96380cfc59a0409c071f8606 | [
"MIT"
] | 9 | 2020-07-06T12:41:26.000Z | 2021-05-25T19:07:45.000Z | import os
import pathlib
import arrow
import datetime
import string
from spacy.lang.en.stop_words import STOP_WORDS
from collections import defaultdict
from tilse.data.timelines import Timeline as TilseTimeline
from news_tls import utils
from pprint import pprint
PUNCT_SET = set(string.punctuation)
def load_dataset(... | 28.460094 | 84 | 0.560459 |
2ad21d117a6ac959daf3fbf9c236045170fae967 | 6,518 | py | Python | tests/test_app2.py | basavyr/python-multi-modules | 7f0847b832629bdc41b23f130941f5d8b591a1c4 | [
"MIT"
] | null | null | null | tests/test_app2.py | basavyr/python-multi-modules | 7f0847b832629bdc41b23f130941f5d8b591a1c4 | [
"MIT"
] | null | null | null | tests/test_app2.py | basavyr/python-multi-modules | 7f0847b832629bdc41b23f130941f5d8b591a1c4 | [
"MIT"
] | null | null | null | from datetime import datetime
import sys
import os
import time
app = 'App-2'
try:
sys.path.insert(1, '')
from src.app2.package2 import module1 as module1_p2
from src.app2.package2 import module2 as module2_p2
from src.app2.package1 import module1 as module1_p1
from src.app2.package1 import module2... | 31.487923 | 104 | 0.595888 |
9fefd3365b9b20e6feca6ad4861619db51b37754 | 2,108 | py | Python | selfdrive/dragonpilot/dragonconf/__init__.py | eFiniLan/openpilot | 1d06129485f2893d594a0d46c45cf989e834b75b | [
"MIT"
] | 4 | 2019-02-12T03:06:31.000Z | 2020-07-17T03:54:46.000Z | selfdrive/dragonpilot/dragonconf/__init__.py | eFiniLan/openpilot | 1d06129485f2893d594a0d46c45cf989e834b75b | [
"MIT"
] | 1 | 2020-07-22T04:46:11.000Z | 2020-07-22T04:46:11.000Z | selfdrive/dragonpilot/dragonconf/__init__.py | eFiniLan/openpilot | 1d06129485f2893d594a0d46c45cf989e834b75b | [
"MIT"
] | 4 | 2019-05-21T19:02:46.000Z | 2020-03-24T14:27:45.000Z | #!/usr/bin/env python2.7
from common.params import Params
default_conf = {
'DragonEnableDashcam': '1',
'DragonDisableDriverSafetyCheck': '0', # deprecated
'DragonEnableDriverSafetyCheck': '1',
'DragonAutoShutdownAt': '30', # in minute
'DragonTempDisableSteerOnSignal': '0', # deprecated
'DragonEnableSteerin... | 30.550725 | 81 | 0.694497 |
b88ad2492b4160d16b0cd3f687161b73cd10f821 | 833 | py | Python | scripts/labtainer-instructor/assess_bin/evalExpress.py | jakuta-tech/Labtainers | f674204022ad5d13ad6bccaf02a14a283470d23f | [
"Apache-2.0"
] | null | null | null | scripts/labtainer-instructor/assess_bin/evalExpress.py | jakuta-tech/Labtainers | f674204022ad5d13ad6bccaf02a14a283470d23f | [
"Apache-2.0"
] | null | null | null | scripts/labtainer-instructor/assess_bin/evalExpress.py | jakuta-tech/Labtainers | f674204022ad5d13ad6bccaf02a14a283470d23f | [
"Apache-2.0"
] | null | null | null | import ast
import operator as op
# supported operators
operators = {ast.Add: op.add, ast.Sub: op.sub, ast.Mult: op.mul,
ast.Div: op.truediv, ast.Pow: op.pow, ast.BitXor: op.xor,
ast.USub: op.neg}
def eval_expr(expr):
"""
>>> eval_expr('2^6')
4
>>> eval_expr('2**6')
64
... | 29.75 | 76 | 0.587035 |
44c21dcb41f40921ade27312a04b5060c9462318 | 590 | py | Python | spark/streamrdd.py | yorix2009/pdmtool | d58d43c5b58f09e7f112c547b555ae7f74ec909c | [
"Unlicense"
] | 1 | 2018-03-28T01:56:43.000Z | 2018-03-28T01:56:43.000Z | spark/streamrdd.py | yorix2009/pysample | 917a19376b4fbd4663bf1468fa9284ea6424ff76 | [
"Unlicense"
] | null | null | null | spark/streamrdd.py | yorix2009/pysample | 917a19376b4fbd4663bf1468fa9284ea6424ff76 | [
"Unlicense"
] | null | null | null | # coding: UTF-8
from pyspark.sql import SparkSession
from pyspark.sql.functions import explode
from pyspark.sql.functions import split
spark = SparkSession.builder.appName("StructuredNetworkWordCount").getOrCreate()
lines = spark.readStream.format("socket") \
.option("host", "localhost").option("port", 9999).load(... | 32.777778 | 90 | 0.732203 |
fcdea122d0fcbcfbdb473d26095c807957f87608 | 3,783 | py | Python | Fluid dynamics/comparison.py | zwang586/MICNN | 3d27a7f624ed03502fd500628b8e5136cb3f0730 | [
"MIT"
] | null | null | null | Fluid dynamics/comparison.py | zwang586/MICNN | 3d27a7f624ed03502fd500628b8e5136cb3f0730 | [
"MIT"
] | null | null | null | Fluid dynamics/comparison.py | zwang586/MICNN | 3d27a7f624ed03502fd500628b8e5136cb3f0730 | [
"MIT"
] | null | null | null | # -*- coding: utf-8
###Compare the testing results of yNet and conventional MICNN at a random testing point
import numpy as np
import matplotlib.pyplot as plt
from model import *
from tensorflow.keras.models import *
n = 30 #number of Re sampling points
nframe = 160 #frames of each simulation
nx = 25... | 36.728155 | 174 | 0.645784 |
006cf5bb37c341dfece812738dde3f4fadfdf824 | 5,757 | py | Python | cora/foreground/poisson.py | radiocosmology/cora | 7d34e502c8536adc2d68b6a5d703ce8bbc6afcca | [
"MIT"
] | 14 | 2015-11-11T03:11:33.000Z | 2021-04-12T21:37:11.000Z | cora/foreground/poisson.py | radiocosmology/cora | 7d34e502c8536adc2d68b6a5d703ce8bbc6afcca | [
"MIT"
] | 21 | 2017-02-18T02:57:25.000Z | 2022-03-16T15:31:10.000Z | cora/foreground/poisson.py | radiocosmology/cora | 7d34e502c8536adc2d68b6a5d703ce8bbc6afcca | [
"MIT"
] | 15 | 2015-04-24T17:14:33.000Z | 2021-04-09T06:24:15.000Z | import numpy as np
import numpy.random as rnd
from scipy.optimize import fminbound
from scipy.integrate import quad, cumtrapz
from cora.util import cubicspline as cs
def homogeneous_process(t, rate):
r"""Generate a realisation of a Possion process.
Parameters
----------
t : scalar
The time ... | 27.677885 | 84 | 0.633663 |
fa10e67ba03954b0a9cbee88c30cfa97ac11a32e | 323 | py | Python | beike/xiaoqu.py | shibing624/spider-in-action | ddbb8da70c58a5d55cfd0171753cdaf54d43c2fd | [
"Apache-2.0"
] | 6 | 2017-03-30T09:22:50.000Z | 2022-01-07T16:22:42.000Z | beike/xiaoqu.py | shibing624/spider-in-action | ddbb8da70c58a5d55cfd0171753cdaf54d43c2fd | [
"Apache-2.0"
] | null | null | null | beike/xiaoqu.py | shibing624/spider-in-action | ddbb8da70c58a5d55cfd0171753cdaf54d43c2fd | [
"Apache-2.0"
] | 3 | 2017-07-06T12:02:00.000Z | 2020-05-18T23:30:02.000Z | # coding=utf-8
# 获得指定城市的小区数据
# 这些数据包括:
# 日期,所属区县,板块名,小区名,挂牌均价,挂牌数
# 20180221,浦东,川沙,恒纬家苑,32176元/m2,3套在售二手房
import sys
sys.path.append("../")
from beike.core.xiaoqu_spider import XiaoQuBaseSpider
from beike.config import SPIDER_NAME
if __name__ == "__main__":
spider = XiaoQuBaseSpider(SPIDER_NAME)
spider.start... | 20.1875 | 53 | 0.74613 |
ebe6af5223b35faba84536aba5141a74d84cf734 | 2,372 | py | Python | tests/operators_test.py | LeastAuthority/Chia-Network-clvm | 1d9bee225d06d72bcb680a1ef22caa1db9ffb55d | [
"Apache-2.0"
] | null | null | null | tests/operators_test.py | LeastAuthority/Chia-Network-clvm | 1d9bee225d06d72bcb680a1ef22caa1db9ffb55d | [
"Apache-2.0"
] | null | null | null | tests/operators_test.py | LeastAuthority/Chia-Network-clvm | 1d9bee225d06d72bcb680a1ef22caa1db9ffb55d | [
"Apache-2.0"
] | null | null | null | import unittest
from clvm.operators import (OPERATOR_LOOKUP, KEYWORD_TO_ATOM, default_unknown_op, OperatorDict)
from clvm.EvalError import EvalError
from clvm import SExp
class OperatorsTest(unittest.TestCase):
def setUp(self):
self.handler_called = False
def unknown_handler(self, name, args):
... | 40.20339 | 114 | 0.652192 |
70af841cd0ba1edda33a60b39e7ec5a67b1ec2a2 | 31,133 | py | Python | flytekit/models/task.py | bimtauer/flytekit | 3cfbb71779c44cf33866b45b22f71ffc2d607d92 | [
"Apache-2.0"
] | null | null | null | flytekit/models/task.py | bimtauer/flytekit | 3cfbb71779c44cf33866b45b22f71ffc2d607d92 | [
"Apache-2.0"
] | null | null | null | flytekit/models/task.py | bimtauer/flytekit | 3cfbb71779c44cf33866b45b22f71ffc2d607d92 | [
"Apache-2.0"
] | null | null | null | import json as _json
import typing
from flyteidl.admin import task_pb2 as _admin_task
from flyteidl.core import compiler_pb2 as _compiler
from flyteidl.core import literals_pb2 as _literals_pb2
from flyteidl.core import tasks_pb2 as _core_task
from google.protobuf import json_format as _json_format
from google.protobu... | 34.553829 | 144 | 0.641988 |
aa80b2c9bd42813fe00f2d70ff94832332070cbf | 5,826 | py | Python | src/gov/ondemand_userspace_power_PID.py | MarkBlanco/userland_dvfs_gov | d26e1e2e24163370d5815fa0bb23e30636b806aa | [
"BSD-3-Clause"
] | null | null | null | src/gov/ondemand_userspace_power_PID.py | MarkBlanco/userland_dvfs_gov | d26e1e2e24163370d5815fa0bb23e30636b806aa | [
"BSD-3-Clause"
] | null | null | null | src/gov/ondemand_userspace_power_PID.py | MarkBlanco/userland_dvfs_gov | d26e1e2e24163370d5815fa0bb23e30636b806aa | [
"BSD-3-Clause"
] | 1 | 2019-01-18T22:50:26.000Z | 2019-01-18T22:50:26.000Z | '''
Modified Ondemand frequency governor with power limit.
When power limit is tripped, reduce frequency aggressively.
Otherwise, engage a proportional model to scale the frequency up
based on the remaining power budget.
'''
import sys
sys.path.append("..")
import cpu_usage as sysfs_utils
import time
import os
import ... | 34.886228 | 105 | 0.699966 |
6834111ac13a9d2dc323b4701c84c480af088488 | 4,486 | py | Python | kubernetes_asyncio/client/models/v1_token_review_spec.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_token_review_spec.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_token_review_spec.py | aK0nshin/kubernetes_asyncio | aef9edcc1f8671a5b1bba9f4684bde890176b19c | [
"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
OpenAPI spec version: v1.14.7
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
class V1TokenRev... | 31.370629 | 350 | 0.601872 |
cd7b5e477fbc2f6f1e86b3ce7f5a7e385fa7d860 | 6,192 | py | Python | tests/server/api/v1/test_movecopy.py | KakeruMizuno/RDM-waterbutler | 58ecd801385a7572d1ed56568a31f701291c4e3e | [
"Apache-2.0"
] | 1 | 2019-05-08T02:32:17.000Z | 2019-05-08T02:32:17.000Z | tests/server/api/v1/test_movecopy.py | KakeruMizuno/RDM-waterbutler | 58ecd801385a7572d1ed56568a31f701291c4e3e | [
"Apache-2.0"
] | null | null | null | tests/server/api/v1/test_movecopy.py | KakeruMizuno/RDM-waterbutler | 58ecd801385a7572d1ed56568a31f701291c4e3e | [
"Apache-2.0"
] | null | null | null | import pytest
from waterbutler.core import exceptions
from tests.server.api.v1.fixtures import (http_request, handler, move_copy_args, handler_auth,
patch_auth_handler, serialized_request,
serialized_metadata, celery_src_copy_params,
... | 46.208955 | 100 | 0.571059 |
5dc469853d5903f1f979cbce51e871b03b4b12b5 | 7,549 | py | Python | workflows/launcher/launch_qha_vasp_mp.py | abelcarreras/aiida_extensions | cce3fe537d041fdae87c5a60ce433e6de3fc30cf | [
"MIT"
] | null | null | null | workflows/launcher/launch_qha_vasp_mp.py | abelcarreras/aiida_extensions | cce3fe537d041fdae87c5a60ce433e6de3fc30cf | [
"MIT"
] | null | null | null | workflows/launcher/launch_qha_vasp_mp.py | abelcarreras/aiida_extensions | cce3fe537d041fdae87c5a60ce433e6de3fc30cf | [
"MIT"
] | null | null | null | from aiida import load_dbenv
load_dbenv()
from aiida.orm import Code, DataFactory, WorkflowFactory
StructureData = DataFactory('structure')
ParameterData = DataFactory('parameter')
import numpy as np
import os
import pymatgen
import pymatgen.symmetry.analyzer
##########################
structure_id = 'mp-2176' #MgO... | 29.603922 | 110 | 0.61028 |
cd902bdbbef0033d413424838214d9f970af8f63 | 6,944 | py | Python | gcpdiag/queries/logs.py | eyalzek/gcpdiag | 0378898dc407271741de33fb56f59aebf905292b | [
"Apache-2.0"
] | null | null | null | gcpdiag/queries/logs.py | eyalzek/gcpdiag | 0378898dc407271741de33fb56f59aebf905292b | [
"Apache-2.0"
] | null | null | null | gcpdiag/queries/logs.py | eyalzek/gcpdiag | 0378898dc407271741de33fb56f59aebf905292b | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 35.979275 | 82 | 0.699741 |
e832db6f53f65aee7be19c5c9a4a1c79beaacf24 | 5,692 | py | Python | game.py | Rafael705/pong-game | cd54148eb320109a7f4e54202761107d8a8a1405 | [
"MIT"
] | null | null | null | game.py | Rafael705/pong-game | cd54148eb320109a7f4e54202761107d8a8a1405 | [
"MIT"
] | null | null | null | game.py | Rafael705/pong-game | cd54148eb320109a7f4e54202761107d8a8a1405 | [
"MIT"
] | null | null | null | import pygame, sys, random
# -------
# CLASSES
# -------
class Paddle:
def __init__(self, screen, color, posX, posY, width, height):
self.screen = screen
self.color = color
self.posX = posX
self.posY = posY
self.width = width
self.height = height
self.state = 'stopped'
self.draw()
def draw(self):
p... | 21.642586 | 94 | 0.653022 |
f3a8f24ba888e8b80a73e85043306987121ebcbd | 718 | py | Python | schema_org_web_scanner/src/d1_schema_scan/manage.py | DataONEorg/d1_ncei_adapter | 34dd4ed9d581d259a70d7c9a884f520226dd2691 | [
"Apache-2.0"
] | 1 | 2019-06-19T02:41:02.000Z | 2019-06-19T02:41:02.000Z | schema_org_web_scanner/src/d1_schema_scan/manage.py | DataONEorg/d1_ncei_adapter | 34dd4ed9d581d259a70d7c9a884f520226dd2691 | [
"Apache-2.0"
] | 7 | 2019-06-24T20:21:51.000Z | 2022-01-07T13:06:07.000Z | schema_org_web_scanner/src/d1_schema_scan/manage.py | DataONEorg/d1_ncei_adapter | 34dd4ed9d581d259a70d7c9a884f520226dd2691 | [
"Apache-2.0"
] | 3 | 2017-04-17T13:24:20.000Z | 2019-05-28T18:32:27.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "d1_schema_scan.settings")
os.environ.setdefault("ASGI_APPLICATION", "d1_schema_scan.routing.application")
try:
from django.core.mana... | 31.217391 | 83 | 0.699164 |
ba4f2b68b25297c14cab14cc2cefb220ce12b5c2 | 10,143 | py | Python | sdk/python/pulumi_azure/compute/get_shared_image_version.py | pulumi/pulumi-azure | c62b6c1828de1facfd0d92425b72e22e229b0afc | [
"ECL-2.0",
"Apache-2.0"
] | 109 | 2018-06-18T00:19:44.000Z | 2022-02-20T05:32:57.000Z | sdk/python/pulumi_azure/compute/get_shared_image_version.py | pulumi/pulumi-azure | c62b6c1828de1facfd0d92425b72e22e229b0afc | [
"ECL-2.0",
"Apache-2.0"
] | 663 | 2018-06-18T21:08:46.000Z | 2022-03-31T20:10:11.000Z | sdk/python/pulumi_azure/compute/get_shared_image_version.py | pulumi/pulumi-azure | c62b6c1828de1facfd0d92425b72e22e229b0afc | [
"ECL-2.0",
"Apache-2.0"
] | 41 | 2018-07-19T22:37:38.000Z | 2022-03-14T10:56:26.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** 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... | 40.572 | 259 | 0.671399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.