hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | 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 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | 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 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
8a50b328decdc9f345c171a8999d1aa6757ea4e7 | 381 | py | Python | Shop_platform/shops/migrations/0005_auto_20200512_2301.py | Tozman99/Shop_platform | c49a7724882b2f5468877806494319dcd8bd0314 | [
"MIT"
] | 1 | 2021-11-07T08:52:16.000Z | 2021-11-07T08:52:16.000Z | Shop_platform/shops/migrations/0005_auto_20200512_2301.py | Tozman99/shop_platform | c49a7724882b2f5468877806494319dcd8bd0314 | [
"MIT"
] | 18 | 2021-03-19T08:51:38.000Z | 2022-03-12T00:38:18.000Z | Shop_platform/shops/migrations/0005_auto_20200512_2301.py | Tozman99/Shop_platform | c49a7724882b2f5468877806494319dcd8bd0314 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.3 on 2020-05-12 23:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shops', '0004_product_quantity'),
]
operations = [
migrations.AlterField(
model_name='product',
name='image',
... | 20.052632 | 49 | 0.593176 |
f015f5678ec8bd16528c817082c06579eb23c4a8 | 754 | py | Python | emgapi/apps.py | EBI-Metagenomics/ebi-metagenomics-api | 1f028902fe493583c5c8191dd5dae92cca9e15a9 | [
"Apache-2.0"
] | 6 | 2018-11-20T10:38:56.000Z | 2022-03-08T19:39:11.000Z | emgapi/apps.py | EBI-Metagenomics/ebi-metagenomics-api | 1f028902fe493583c5c8191dd5dae92cca9e15a9 | [
"Apache-2.0"
] | 33 | 2017-10-19T14:07:31.000Z | 2022-03-28T16:02:50.000Z | emgapi/apps.py | EBI-Metagenomics/ebi-metagenomics-api | 1f028902fe493583c5c8191dd5dae92cca9e15a9 | [
"Apache-2.0"
] | 2 | 2017-10-18T19:34:46.000Z | 2019-06-14T22:08:51.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2017 EMBL - European Bioinformatics Institute
#
# 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/LICEN... | 31.416667 | 74 | 0.745358 |
a6c40763cfc79d7b103721162a9ff0e4cde89275 | 18,468 | py | Python | platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/ocelot/profiles/Profile_Mbus.py | lmnotran/gecko_sdk | 2e82050dc8823c9fe0e8908c1b2666fb83056230 | [
"Zlib"
] | 69 | 2021-12-16T01:34:09.000Z | 2022-03-31T08:27:39.000Z | platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/ocelot/profiles/Profile_Mbus.py | lmnotran/gecko_sdk | 2e82050dc8823c9fe0e8908c1b2666fb83056230 | [
"Zlib"
] | 6 | 2022-01-12T18:22:08.000Z | 2022-03-25T10:19:27.000Z | platform/radio/efr32_multiphy_configurator/pyradioconfig/parts/ocelot/profiles/Profile_Mbus.py | lmnotran/gecko_sdk | 2e82050dc8823c9fe0e8908c1b2666fb83056230 | [
"Zlib"
] | 21 | 2021-12-20T09:05:45.000Z | 2022-03-28T02:52:28.000Z | from pyradioconfig.parts.common.profiles.ocelot_regs import *
from pyradioconfig.parts.common.profiles.profile_common import *
from pyradioconfig.calculator_model_framework.interfaces.iprofile import IProfile
from pyradioconfig.parts.common.utils.units_multiplier import UnitsMultiplier
from pyradioconfig.parts.ocelot.... | 58.075472 | 168 | 0.695311 |
5068d6f08f67d2d232cce457c09cb4c70b2e426a | 2,785 | py | Python | mozillians/phonebook/validators.py | justinpotts/mozillians | efa5cbdfe4992d2ba1c1d85bfbb5b09b2215cc44 | [
"BSD-3-Clause"
] | null | null | null | mozillians/phonebook/validators.py | justinpotts/mozillians | efa5cbdfe4992d2ba1c1d85bfbb5b09b2215cc44 | [
"BSD-3-Clause"
] | null | null | null | mozillians/phonebook/validators.py | justinpotts/mozillians | efa5cbdfe4992d2ba1c1d85bfbb5b09b2215cc44 | [
"BSD-3-Clause"
] | null | null | null | import re
from django.core.validators import EmailValidator, URLValidator
from django.db.models.loading import get_model
from django.forms import ValidationError
from tower import ugettext as _
def validate_twitter(username):
"""Return a twitter username given '@' or http(s) strings."""
if username:
... | 29.010417 | 94 | 0.656732 |
13b16a860666812b40ab1982f95d6b09c011d6ac | 4,451 | py | Python | main.py | floydhub/regression | aecc20cdae4edfbd6235bac67c1f309942fd5170 | [
"BSD-3-Clause"
] | 9 | 2017-10-23T13:39:20.000Z | 2022-02-18T21:08:41.000Z | main.py | ReDeiPirati/regression | aecc20cdae4edfbd6235bac67c1f309942fd5170 | [
"BSD-3-Clause"
] | null | null | null | main.py | ReDeiPirati/regression | aecc20cdae4edfbd6235bac67c1f309942fd5170 | [
"BSD-3-Clause"
] | 4 | 2018-01-04T06:35:10.000Z | 2021-11-12T06:47:23.000Z | #!/usr/bin/env python
from __future__ import print_function
from itertools import count
import os
import numpy as np
import argparse
import torch
import torch.autograd
import torch.nn.functional as F
from torch.autograd import Variable
parser = argparse.ArgumentParser(description='Pytorch Linear Regression')
parser.ad... | 30.278912 | 100 | 0.631543 |
d3e533b1fb7c73987e65d43d4fac589d3dfcd9e1 | 3,390 | py | Python | rc/smallplayer.py | tarasfrompir/MajordomoHome | 673474450720eb96d523bc9ea71dcf8cad86d7b1 | [
"MIT"
] | null | null | null | rc/smallplayer.py | tarasfrompir/MajordomoHome | 673474450720eb96d523bc9ea71dcf8cad86d7b1 | [
"MIT"
] | 4 | 2017-08-11T19:27:42.000Z | 2017-12-07T08:45:11.000Z | rc/smallplayer.py | tarasfrompir/MajordomoHome | 673474450720eb96d523bc9ea71dcf8cad86d7b1 | [
"MIT"
] | 1 | 2021-02-24T21:55:28.000Z | 2021-02-24T21:55:28.000Z | # -*- coding: utf-8 -*-
#from __future__ import print_function, unicode_literals
#import time
#https://github.com/jonisb/AudioEndpointControl
import AudioEndpointControl
from AudioEndpointControl import Render, Capture, All
from AudioEndpointControl import Console, Multimedia, Communications
from AudioEndpoin... | 35.684211 | 142 | 0.673156 |
2b43b940dc920b7d94d32861686fa0d8767a8221 | 31,624 | py | Python | pyqtgraph/imageview/ImageView.py | pbmanis/pyqtgraph | 3558216be2b50d6b0069c82e51e5a048dad34c73 | [
"MIT"
] | 150 | 2018-03-27T16:45:37.000Z | 2022-03-30T03:47:56.000Z | pyqtgraph/imageview/ImageView.py | Jhongesell/pyqtgraph | 229f650adfd04053213fe6567d6308a4751a349b | [
"MIT"
] | 34 | 2018-09-28T00:01:59.000Z | 2022-03-21T15:40:02.000Z | pyqtgraph/imageview/ImageView.py | Jhongesell/pyqtgraph | 229f650adfd04053213fe6567d6308a4751a349b | [
"MIT"
] | 40 | 2018-04-06T19:42:21.000Z | 2022-01-11T00:34:17.000Z | # -*- coding: utf-8 -*-
"""
ImageView.py - Widget for basic image dispay and analysis
Copyright 2010 Luke Campagnola
Distributed under MIT/X11 license. See license.txt for more infomation.
Widget used for displaying 2D or 3D data. Features:
- float or int (including 16-bit int) image display via ImageItem
- zoom... | 38.055355 | 176 | 0.54759 |
eb76e284e27d1024b609e1c25cbb88d515e6b2e0 | 31,816 | py | Python | lumen/sources/base.py | holoviz/monitor | db04d037c17101b9e126973a21e77f940f6cf83c | [
"BSD-3-Clause"
] | 1 | 2020-09-25T20:21:59.000Z | 2020-09-25T20:21:59.000Z | lumen/sources/base.py | holoviz/monitor | db04d037c17101b9e126973a21e77f940f6cf83c | [
"BSD-3-Clause"
] | 3 | 2020-09-24T16:59:03.000Z | 2020-10-01T12:32:49.000Z | lumen/sources/base.py | holoviz/monitor | db04d037c17101b9e126973a21e77f940f6cf83c | [
"BSD-3-Clause"
] | null | null | null | import hashlib
import json
import os
import pathlib
import re
import shutil
import sys
from concurrent import futures
from functools import wraps
from itertools import product
from pathlib import Path
from urllib.parse import quote
import numpy as np
import pandas as pd
import panel as pn
import param
import requests... | 34.4329 | 95 | 0.544349 |
0fcd3205ba1b957d72152bffe86ea29ae65d990d | 6,576 | bzl | Python | go/private/sdk.bzl | dims/rules_go | 076ffb3636a94bc136b94b9215d7eefe1ed0399b | [
"Apache-2.0"
] | null | null | null | go/private/sdk.bzl | dims/rules_go | 076ffb3636a94bc136b94b9215d7eefe1ed0399b | [
"Apache-2.0"
] | null | null | null | go/private/sdk.bzl | dims/rules_go | 076ffb3636a94bc136b94b9215d7eefe1ed0399b | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 30.873239 | 100 | 0.614811 |
cef6dd68987fc6587c0950c45cde440329e0086e | 38,023 | py | Python | instances/passenger_demand/pas-20210421-2109-int18e/86.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int18e/86.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null | instances/passenger_demand/pas-20210421-2109-int18e/86.py | LHcau/scheduling-shared-passenger-and-freight-transport-on-a-fixed-infrastructure | bba1e6af5bc8d9deaa2dc3b83f6fe9ddf15d2a11 | [
"BSD-3-Clause"
] | null | null | null |
"""
PASSENGERS
"""
numPassengers = 4177
passenger_arriving = (
(5, 5, 6, 5, 2, 0, 10, 15, 7, 3, 5, 0), # 0
(7, 9, 6, 8, 2, 0, 9, 14, 7, 4, 4, 0), # 1
(5, 8, 8, 5, 0, 0, 16, 9, 11, 8, 0, 0), # 2
(4, 12, 13, 4, 3, 0, 8, 13, 2, 4, 0, 0), # 3
(2, 13, 12, 6, 2, 0, 9, 2, 6, 2, 1, 0), # 4
(6, 9, 15, 6, 2, 0, 10,... | 113.501493 | 213 | 0.730058 |
b2234199fd5d082c018c29d0a4fa4d12770535d2 | 21,551 | py | Python | msticpy/datamodel/entities/entity.py | lucky-luk3/msticpy | 623f726f15fa35dafae7e1e65df91b7601456002 | [
"MIT"
] | 820 | 2019-05-16T07:24:34.000Z | 2022-03-31T09:18:10.000Z | msticpy/datamodel/entities/entity.py | lucky-luk3/msticpy | 623f726f15fa35dafae7e1e65df91b7601456002 | [
"MIT"
] | 205 | 2019-06-24T19:24:19.000Z | 2022-03-30T23:13:46.000Z | msticpy/datamodel/entities/entity.py | lucky-luk3/msticpy | 623f726f15fa35dafae7e1e65df91b7601456002 | [
"MIT"
] | 171 | 2019-06-23T13:53:12.000Z | 2022-03-29T18:22:46.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
"""Entity ... | 30.831187 | 87 | 0.556494 |
dd4228481d32444fb9aeebd9817f081feb53fbe5 | 4,680 | py | Python | secret/config/defaults.py | LunarShen/SECRET | 0f652e63ce760ece8690cbad013f0d9bdb341e84 | [
"MIT"
] | null | null | null | secret/config/defaults.py | LunarShen/SECRET | 0f652e63ce760ece8690cbad013f0d9bdb341e84 | [
"MIT"
] | null | null | null | secret/config/defaults.py | LunarShen/SECRET | 0f652e63ce760ece8690cbad013f0d9bdb341e84 | [
"MIT"
] | null | null | null | from .config import CfgNode as CN
# -----------------------------------------------------------------------------
# Convention about Training / Test specific parameters
# -----------------------------------------------------------------------------
# Whenever an argument can be either used for training or for testing,... | 29.068323 | 80 | 0.47906 |
b5c9f395228b388766bda6dde97586c44b7fd251 | 346 | py | Python | languages/__init__.py | bastion-gaming/GG-Server | 6b0e6054581e5e50223f45977d1ee52dcb90899b | [
"MIT"
] | 2 | 2020-02-06T10:49:28.000Z | 2020-04-24T09:31:23.000Z | languages/__init__.py | bastion-gaming/GG-Server | 6b0e6054581e5e50223f45977d1ee52dcb90899b | [
"MIT"
] | null | null | null | languages/__init__.py | bastion-gaming/GG-Server | 6b0e6054581e5e50223f45977d1ee52dcb90899b | [
"MIT"
] | null | null | null | from os import listdir
import json
general_dict_lang = dict()
for file in listdir("languages"):
if ".json" in file:
langname = file.replace(".json", "")
path = "languages/"+file
with open(path, encoding='utf-8') as json_file:
data = json.load(json_file)
general_d... | 28.833333 | 55 | 0.612717 |
a423f98d91e5bd52fc27c6d6d8bb6c5735def8a4 | 774 | py | Python | src/products/admin.py | jayesh96/ecommerce2 | f33e4eac54d2710f48a94f7042565d36e4924c08 | [
"MIT"
] | null | null | null | src/products/admin.py | jayesh96/ecommerce2 | f33e4eac54d2710f48a94f7042565d36e4924c08 | [
"MIT"
] | null | null | null | src/products/admin.py | jayesh96/ecommerce2 | f33e4eac54d2710f48a94f7042565d36e4924c08 | [
"MIT"
] | null | null | null | from django.contrib import admin
# Register your models here.
from .models import Product,Variation,ProductImage,Category
class ProductImageInline(admin.TabularInline):
model = ProductImage
extra = 0
class VariationInline(admin.TabularInline):
model = Variation
extra = 0
class VariationAdmin(admin.ModelAdmin):
... | 23.454545 | 90 | 0.775194 |
93232f1bfbbdb615733340151eb8a30888ef4fea | 13,012 | py | Python | src/_pytest/compat.py | ctb/pytest | 49827adcb9256c9c9c06a25729421dcc3c385edc | [
"MIT"
] | null | null | null | src/_pytest/compat.py | ctb/pytest | 49827adcb9256c9c9c06a25729421dcc3c385edc | [
"MIT"
] | null | null | null | src/_pytest/compat.py | ctb/pytest | 49827adcb9256c9c9c06a25729421dcc3c385edc | [
"MIT"
] | null | null | null | """Python version compatibility code."""
import enum
import functools
import inspect
import os
import re
import sys
from contextlib import contextmanager
from inspect import Parameter
from inspect import signature
from typing import Any
from typing import Callable
from typing import Generic
from typing import Optional
... | 29.844037 | 102 | 0.666769 |
6127262dfb6a5d9b0739ea822cf658adda3c57b6 | 617 | py | Python | conv_layer.py | motokimura/CapsNet-Pytorch | 76befdaeb166b381870fa92a44800e16c4bf215f | [
"MIT"
] | 16 | 2018-09-05T16:38:21.000Z | 2021-07-20T08:17:01.000Z | conv_layer.py | motokimura/CapsNet-Pytorch | 76befdaeb166b381870fa92a44800e16c4bf215f | [
"MIT"
] | 1 | 2018-06-08T15:49:27.000Z | 2018-06-08T15:49:27.000Z | conv_layer.py | motokimura/CapsNet-Pytorch | 76befdaeb166b381870fa92a44800e16c4bf215f | [
"MIT"
] | 8 | 2019-05-21T08:43:50.000Z | 2021-02-25T05:12:16.000Z | #
# Dynamic Routing Between Capsules
# https://arxiv.org/pdf/1710.09829.pdf
#
import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable
from torchvision import datasets, transforms
import torch.nn.functional as F
class Conv1(nn.Module):
def __init__(self):
super(Conv1, sel... | 17.628571 | 44 | 0.693679 |
f9ea7a50a56903c30f126ba4245f8a2f83f82e41 | 3,150 | py | Python | multilanetrafficsim.py | benjithedalilama/traffic-simulation | 2c1e524207ea7531cee0af7ceca03ce7489899d6 | [
"MIT"
] | null | null | null | multilanetrafficsim.py | benjithedalilama/traffic-simulation | 2c1e524207ea7531cee0af7ceca03ce7489899d6 | [
"MIT"
] | null | null | null | multilanetrafficsim.py | benjithedalilama/traffic-simulation | 2c1e524207ea7531cee0af7ceca03ce7489899d6 | [
"MIT"
] | null | null | null | from singlelanetrafficsim import SingleLaneTrafficSimulation
from trafficsim import TrafficSimulation
from copy import deepcopy
import random
class MultiLaneTrafficSimulation(TrafficSimulation):
def __init__(self, road_length, traffic_density, v_max, p_slow, l, l_o, l_o_back, p_change=0.5, left_lane=[], right_lan... | 37.951807 | 168 | 0.614286 |
682aa1357b1be972637bd26203f90b626405d53f | 2,199 | py | Python | src/toil/utils/toilSshCluster.py | thiagogenez/toil | b25e7d0616fef3aa9085a7d7d7ae6bdc257f2d92 | [
"Apache-2.0"
] | null | null | null | src/toil/utils/toilSshCluster.py | thiagogenez/toil | b25e7d0616fef3aa9085a7d7d7ae6bdc257f2d92 | [
"Apache-2.0"
] | null | null | null | src/toil/utils/toilSshCluster.py | thiagogenez/toil | b25e7d0616fef3aa9085a7d7d7ae6bdc257f2d92 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2015-2021 Regents of the University of California
#
# 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 app... | 45.8125 | 99 | 0.704411 |
a5c792c0e1e8b34fdb10aef92cfa9358afb9de0f | 1,522 | py | Python | python/fate_client/flow_client/flow_cli/utils/detect_utils.py | rubenlozanoaht3m/DataDogm | cd605e8072cca31e8418830c3300657ae2fa5b16 | [
"Apache-2.0"
] | 715 | 2019-01-24T10:52:03.000Z | 2019-10-31T12:19:22.000Z | python/fate_client/flow_client/flow_cli/utils/detect_utils.py | rubenlozanoaht3m/DataDogm | cd605e8072cca31e8418830c3300657ae2fa5b16 | [
"Apache-2.0"
] | 270 | 2019-02-11T02:57:36.000Z | 2019-08-29T11:22:33.000Z | python/fate_client/flow_client/flow_cli/utils/detect_utils.py | rubenlozanoaht3m/DataDogm | cd605e8072cca31e8418830c3300657ae2fa5b16 | [
"Apache-2.0"
] | 200 | 2019-01-26T14:21:35.000Z | 2019-11-01T01:14:36.000Z | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 43.485714 | 101 | 0.691196 |
be8f503597ecf35a1344d8975dc797ef29b27f73 | 1,564 | py | Python | virtman/drivers/iscsi.py | vmthunder/virtman | af81ee1eeab96094b716253ad93bda8630bc219d | [
"Apache-2.0"
] | 6 | 2015-02-09T23:39:58.000Z | 2021-05-17T22:18:57.000Z | virtman/drivers/iscsi.py | vmthunder/virtman | af81ee1eeab96094b716253ad93bda8630bc219d | [
"Apache-2.0"
] | 1 | 2015-05-04T03:41:49.000Z | 2015-05-04T03:41:49.000Z | virtman/drivers/iscsi.py | vmthunder/virtman | af81ee1eeab96094b716253ad93bda8630bc219d | [
"Apache-2.0"
] | 1 | 2016-08-12T07:00:01.000Z | 2016-08-12T07:00:01.000Z |
from brick.iscsi.iscsi import TgtAdm
from virtman.utils import rootwrap
from virtman.utils import singleton
from virtman.openstack.common import processutils as putils
class TgtExecutor(TgtAdm):
def __init__(self, root_helper='', volumes_dir='/etc/tgt/stack.d'):
TgtAdm.__init__(self, root_helper, volum... | 31.28 | 78 | 0.526854 |
680a5358804bc8ee91a4a1b65cb5c8bc9fcb491d | 387 | py | Python | pybaiduphoto/contribution.py | HengyueLi/baiduphoto | a65dcb5a92931298ed561e6cea48fb1d816a06f3 | [
"MIT"
] | 1 | 2022-03-28T08:56:24.000Z | 2022-03-28T08:56:24.000Z | pybaiduphoto/contribution.py | HengyueLi/baiduphoto | a65dcb5a92931298ed561e6cea48fb1d816a06f3 | [
"MIT"
] | null | null | null | pybaiduphoto/contribution.py | HengyueLi/baiduphoto | a65dcb5a92931298ed561e6cea48fb1d816a06f3 | [
"MIT"
] | null | null | null | class downLoader:
def __init__(self, req):
self.req = req
def getDownloadZip(self, url, dirPath, fileName):
# 通过url下载文件<fileName>,文件存储到路径<dirPath>下
# 希望这是一个支持断点续传功能的(还不确定支持不支持)
# 希望这是一个带进度条的 (推荐使用rich,https://pypi.org/project/rich/)
# 网路参数请从self.req中取出,最好直接用self.req。可以参考... | 32.25 | 63 | 0.653747 |
df584775d2b9bd07acb8473f6aabe6ed85b5e540 | 1,597 | py | Python | old_and_simple_and_deprecated/check_for_files_from_list.py | mcjczapiewski/work | 2540afa6b18bf6ff92a7c07b16695035785c0dd8 | [
"MIT"
] | null | null | null | old_and_simple_and_deprecated/check_for_files_from_list.py | mcjczapiewski/work | 2540afa6b18bf6ff92a7c07b16695035785c0dd8 | [
"MIT"
] | null | null | null | old_and_simple_and_deprecated/check_for_files_from_list.py | mcjczapiewski/work | 2540afa6b18bf6ff92a7c07b16695035785c0dd8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import datetime
# import ctypes
from pathlib import Path
# aktualna data i godzina
czasstart = datetime.datetime.now()
print("~~~~~~START~~~~~~\t" + str(czasstart).split(".")[0])
print(
"\nPodaj ścieżkę, w której znajduje się \
plik sprawdzaj.txt (format ANSI) :"
)
plik_... | 23.835821 | 63 | 0.63181 |
3ab9d5d349cd7b8eb24a2d2dd77a1f98070183f0 | 4,477 | py | Python | braid/postgres.py | twisted-infra/braid | deffb8ea7eaeac31fcbfe1135a326ad0e7712d61 | [
"MIT"
] | 8 | 2015-10-18T11:02:54.000Z | 2019-03-29T18:33:18.000Z | braid/postgres.py | twisted-infra/braid | deffb8ea7eaeac31fcbfe1135a326ad0e7712d61 | [
"MIT"
] | 214 | 2015-01-19T06:58:36.000Z | 2022-02-10T10:22:30.000Z | braid/postgres.py | twisted-infra/braid | deffb8ea7eaeac31fcbfe1135a326ad0e7712d61 | [
"MIT"
] | 12 | 2015-02-08T17:32:13.000Z | 2020-10-25T22:22:59.000Z | from fabric.api import sudo, hide, task, env, run, settings
from braid import package, utils
from pipes import quote
def install():
package.install(['postgresql-12'])
def _runQuery(query, database=None):
with hide('running', 'output'):
database = '--dbname={}'.format(database) if database else ''
... | 30.04698 | 87 | 0.625419 |
404f72285d3345346628df9a4c8ae28746dd2bc3 | 1,596 | py | Python | env_user.py | gve-sw/MerakiCaptivePortal | e88b5716ade2c5b6faaee1ab0842577e49e510a1 | [
"BSD-Source-Code"
] | null | null | null | env_user.py | gve-sw/MerakiCaptivePortal | e88b5716ade2c5b6faaee1ab0842577e49e510a1 | [
"BSD-Source-Code"
] | null | null | null | env_user.py | gve-sw/MerakiCaptivePortal | e88b5716ade2c5b6faaee1ab0842577e49e510a1 | [
"BSD-Source-Code"
] | null | null | null | """Set your Environment Information once, not many times.
The provided sample code in this repository will reference this file to get the
needed information about you and your context to complete the labs. You
provide this info here once and the scripts in this repository will access it
as needed by the lab.
TODO: T... | 38 | 79 | 0.7901 |
03858f284e93476342209078550ced917fd6286e | 8,296 | py | Python | setup.py | Smasher-z/UniverseNet | 794e7d3d2c7a8f2f6601a60b67366d93a3f30a1f | [
"Apache-2.0"
] | 2 | 2022-02-21T06:56:20.000Z | 2022-02-21T06:57:02.000Z | setup.py | Smasher-z/UniverseNet | 794e7d3d2c7a8f2f6601a60b67366d93a3f30a1f | [
"Apache-2.0"
] | null | null | null | setup.py | Smasher-z/UniverseNet | 794e7d3d2c7a8f2f6601a60b67366d93a3f30a1f | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) OpenMMLab. All rights reserved.
import os
import os.path as osp
import platform
import shutil
import sys
import warnings
from setuptools import find_packages, setup
import torch
from torch.utils.cpp_extension import (BuildExtension, CppExtension,
... | 35.758621 | 125 | 0.559185 |
8c35536a8144a4f38a337263211a855bf0fcf497 | 5,844 | py | Python | machine-learning/logisticRegression.py | SupratimH/learning-data-science | 005f2f87b01b36b53179d1c1641b8a6c876358e1 | [
"MIT"
] | 3 | 2019-11-03T05:18:28.000Z | 2021-06-09T03:03:34.000Z | machine-learning/logisticRegression.py | SupratimH/learning-data-science | 005f2f87b01b36b53179d1c1641b8a6c876358e1 | [
"MIT"
] | null | null | null | machine-learning/logisticRegression.py | SupratimH/learning-data-science | 005f2f87b01b36b53179d1c1641b8a6c876358e1 | [
"MIT"
] | 1 | 2020-04-02T21:14:57.000Z | 2020-04-02T21:14:57.000Z | """
Created on Tue Sep 14 2018
@author: Supratim Haldar
@Description: My implementation of logistic regression (classifier) algorithm
"""
import numpy as np
from scipy import optimize
# =============================================================================
# Function to calculate value Sigmoid Function of any v... | 38.701987 | 98 | 0.53371 |
de4877a45488929ba0afebaf1b7c163d4730b6f8 | 1,615 | py | Python | website/addons/dataverse/views/widget.py | lbanner/osf.io | 1898ef0ff8bd91713e94c60e7463b5f81ac62caa | [
"Apache-2.0"
] | null | null | null | website/addons/dataverse/views/widget.py | lbanner/osf.io | 1898ef0ff8bd91713e94c60e7463b5f81ac62caa | [
"Apache-2.0"
] | null | null | null | website/addons/dataverse/views/widget.py | lbanner/osf.io | 1898ef0ff8bd91713e94c60e7463b5f81ac62caa | [
"Apache-2.0"
] | null | null | null | import httplib as http
from website.addons.dataverse.client import connect_from_settings_or_403, \
get_dataverse, get_study
from website.addons.dataverse.settings import HOST
from website.project.decorators import must_be_contributor_or_public, \
must_have_addon
@must_be_contributor_or_public
@must_have_addo... | 27.372881 | 75 | 0.69226 |
e0823675445faff7cb450db658d6a60ff86260b0 | 267 | py | Python | client.py | Alwaysproblem/Socket-receive-timeout | d5c3ea25a2b5f4d88870204c1c47bac950c0c887 | [
"Apache-2.0"
] | 1 | 2019-03-06T03:47:00.000Z | 2019-03-06T03:47:00.000Z | client.py | Alwaysproblem/Socket-receive-timeout | d5c3ea25a2b5f4d88870204c1c47bac950c0c887 | [
"Apache-2.0"
] | null | null | null | client.py | Alwaysproblem/Socket-receive-timeout | d5c3ea25a2b5f4d88870204c1c47bac950c0c887 | [
"Apache-2.0"
] | null | null | null | import socket
address = ('127.0.0.1', 31500)
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
while True:
msg = input("please input message:")
if not msg:
break
s.sendto(msg.encode('utf-8'), address)
s.close() | 22.25 | 55 | 0.573034 |
aeb44a19027a9efc9eeaa2359b72f4b382c58092 | 7,709 | py | Python | src/spring-cloud/azext_spring_cloud/commands.py | bgrainger/azure-cli-extensions | 86680f7a592c659456feb605104809efa5fae353 | [
"MIT"
] | 1 | 2021-12-17T01:27:06.000Z | 2021-12-17T01:27:06.000Z | src/spring-cloud/azext_spring_cloud/commands.py | bgrainger/azure-cli-extensions | 86680f7a592c659456feb605104809efa5fae353 | [
"MIT"
] | null | null | null | src/spring-cloud/azext_spring_cloud/commands.py | bgrainger/azure-cli-extensions | 86680f7a592c659456feb605104809efa5fae353 | [
"MIT"
] | 1 | 2021-12-19T09:17:31.000Z | 2021-12-19T09:17:31.000Z | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 60.226563 | 118 | 0.67298 |
af16627923ca06288d140694e66b5719e623b37b | 5,329 | py | Python | onlinecourse/models.py | Igorsvr/final-cloud-app-with-database | 5bde2da641f7704c4a78b9d59737e639dff876c8 | [
"Apache-2.0"
] | null | null | null | onlinecourse/models.py | Igorsvr/final-cloud-app-with-database | 5bde2da641f7704c4a78b9d59737e639dff876c8 | [
"Apache-2.0"
] | null | null | null | onlinecourse/models.py | Igorsvr/final-cloud-app-with-database | 5bde2da641f7704c4a78b9d59737e639dff876c8 | [
"Apache-2.0"
] | null | null | null | import sys
from django.utils.timezone import now
try:
from django.db import models
except Exception:
print("There was an error loading django modules. Do you have django installed?")
sys.exit()
from django.conf import settings
import uuid
# Instructor model
class Instructor(models.Model):
user = model... | 33.942675 | 104 | 0.703509 |
5fb5177e66abc544ab1a03cd9f8f86b0c063a238 | 1,371 | py | Python | main.py | nfernandezsanz/BSCScan-DiscordBOT | b05faa7518291e918cee853e8941975c34a3e20e | [
"MIT"
] | 2 | 2021-12-09T18:48:20.000Z | 2021-12-31T06:05:23.000Z | main.py | nfernandezsanz/BSCScan-DiscordBOT | b05faa7518291e918cee853e8941975c34a3e20e | [
"MIT"
] | null | null | null | main.py | nfernandezsanz/BSCScan-DiscordBOT | b05faa7518291e918cee853e8941975c34a3e20e | [
"MIT"
] | 1 | 2021-11-17T04:03:54.000Z | 2021-11-17T04:03:54.000Z | import asyncio
import discord
from discord.ext import commands
from bscscan import *
from config import *
async def update_task(bot, contract):
counter = 0
while(True):
data = token_info(contract)
await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.playin... | 27.979592 | 127 | 0.655726 |
64f44c17d473f6a671b7ecd97016cdec4fdcd1b6 | 2,188 | py | Python | hanged.py | JasanHdz/basic_exercises | e64b331d630161d317b7eaa34d04bad4b7a66aa2 | [
"MIT"
] | 1 | 2020-01-26T03:01:03.000Z | 2020-01-26T03:01:03.000Z | hanged.py | JasanHdz/basic_exercises | e64b331d630161d317b7eaa34d04bad4b7a66aa2 | [
"MIT"
] | null | null | null | hanged.py | JasanHdz/basic_exercises | e64b331d630161d317b7eaa34d04bad4b7a66aa2 | [
"MIT"
] | null | null | null | # -*- conding: utf-8 -*-
import random
IMAGES = ['''
+---+
| |
|
|
|
|
=========''','''
+---+
| |
0 |
|
|
|
=========''','''
+---+
| |
0 |
| |
|
|
=========''','''
+---+
... | 18.082645 | 71 | 0.334552 |
f3f8c171466b7d420a086e8cf4441abbd54afddd | 203 | py | Python | app/gws/ext/layer/postgres/__init__.py | ewie/gbd-websuite | 6f2814c7bb64d11cb5a0deec712df751718fb3e1 | [
"Apache-2.0"
] | null | null | null | app/gws/ext/layer/postgres/__init__.py | ewie/gbd-websuite | 6f2814c7bb64d11cb5a0deec712df751718fb3e1 | [
"Apache-2.0"
] | null | null | null | app/gws/ext/layer/postgres/__init__.py | ewie/gbd-websuite | 6f2814c7bb64d11cb5a0deec712df751718fb3e1 | [
"Apache-2.0"
] | null | null | null | import gws.ext.db.provider.postgres.layer
class Config(gws.ext.db.provider.postgres.layer.Config):
"""Postgres layer"""
pass
class Object(gws.ext.db.provider.postgres.layer.Object):
pass
| 18.454545 | 56 | 0.729064 |
632d7556ff6d7cb7f4cbc4c26182c239743d4796 | 6,141 | py | Python | rfcn/core/metric.py | CharlesTousignant/Deep-Feature-Flow | b89678d5957d5d1ecafd4ca0d540d001b3b4cbbf | [
"MIT"
] | 1,378 | 2017-05-11T15:23:44.000Z | 2022-03-30T01:50:34.000Z | rfcn/core/metric.py | CharlesTousignant/Deep-Feature-Flow | b89678d5957d5d1ecafd4ca0d540d001b3b4cbbf | [
"MIT"
] | 91 | 2017-05-12T11:44:43.000Z | 2022-02-01T07:33:52.000Z | rfcn/core/metric.py | CharlesTousignant/Deep-Feature-Flow | b89678d5957d5d1ecafd4ca0d540d001b3b4cbbf | [
"MIT"
] | 348 | 2017-05-11T15:27:37.000Z | 2022-01-19T13:33:01.000Z | # --------------------------------------------------------
# Deep Feature Flow
# Copyright (c) 2017 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Modified by Yuwen Xiong
# --------------------------------------------------------
# Based on:
# MX-RCNN
# Copyright (c) 2016 by Contributors
# Licen... | 33.741758 | 94 | 0.599251 |
14e90e2552061fcb638082382b1572d5421bb760 | 1,427 | py | Python | .github/scripts/ensure_actions_will_cancel.py | kuronekodaisuki/pytorch | 459270ac01f1bfcbeaffb20f1c94622561af94e0 | [
"Intel"
] | 7 | 2021-05-29T16:31:51.000Z | 2022-02-21T18:52:25.000Z | .github/scripts/ensure_actions_will_cancel.py | kuronekodaisuki/pytorch | 459270ac01f1bfcbeaffb20f1c94622561af94e0 | [
"Intel"
] | 1 | 2021-05-31T02:20:29.000Z | 2021-05-31T02:20:29.000Z | .github/scripts/ensure_actions_will_cancel.py | kuronekodaisuki/pytorch | 459270ac01f1bfcbeaffb20f1c94622561af94e0 | [
"Intel"
] | null | null | null | #!/usr/bin/env python3
import argparse
import sys
import yaml
from pathlib import Path
REPO_ROOT = Path(__file__).resolve().parent.parent.parent
WORKFLOWS = REPO_ROOT / ".github" / "workflows"
def concurrency_key(filename):
workflow_name = filename.with_suffix("").name.replace("_", "-")
return f"{workflow... | 25.945455 | 106 | 0.615978 |
ccdfa6ac9991d857d1935930027ad40df26e9da4 | 11,708 | py | Python | payment_lib_examples/alipay-sdk-python/virtual_environment/lib/python3.4/site-packages/alipay/aop/api/domain/AntMerchantExpandIndirectModifyModel.py | cuhk-mobitec/S3KVetter | 9ae79a242afbe6edae27c17065a88feca2896cf6 | [
"Apache-2.0"
] | 32 | 2018-05-24T08:40:15.000Z | 2019-04-04T20:54:55.000Z | payment_lib_examples/alipay-sdk-python/virtual_environment/lib/python3.4/site-packages/alipay/aop/api/domain/AntMerchantExpandIndirectModifyModel.py | cuhk-mobitec/S3KVetter | 9ae79a242afbe6edae27c17065a88feca2896cf6 | [
"Apache-2.0"
] | 7 | 2018-05-24T08:42:59.000Z | 2020-09-06T23:18:46.000Z | payment_lib_examples/alipay-sdk-python/virtual_environment/lib/python3.4/site-packages/alipay/aop/api/domain/AntMerchantExpandIndirectModifyModel.py | cuhk-mobitec/S3KVetter | 9ae79a242afbe6edae27c17065a88feca2896cf6 | [
"Apache-2.0"
] | 13 | 2018-04-25T11:27:58.000Z | 2021-03-15T12:22:21.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AddressInfo import AddressInfo
from alipay.aop.api.domain.BankCardInfo import BankCardInfo
from alipay.aop.api.domain.ContactInfo import ContactInfo
class AntMerchantExpandIndirec... | 35.159159 | 93 | 0.579945 |
ee0cdd7298b7119b956761eb06c54c6c476cd5d7 | 6,683 | py | Python | ionoscloud/models/image.py | ionos-cloud/sdk-python | bb22b5b93505b25de6aebae97c523a6c2242ec2e | [
"Apache-2.0"
] | null | null | null | ionoscloud/models/image.py | ionos-cloud/sdk-python | bb22b5b93505b25de6aebae97c523a6c2242ec2e | [
"Apache-2.0"
] | 6 | 2021-11-26T16:18:51.000Z | 2022-02-18T10:08:49.000Z | ionoscloud/models/image.py | ionos-cloud/sdk-python | bb22b5b93505b25de6aebae97c523a6c2242ec2e | [
"Apache-2.0"
] | 1 | 2021-04-20T09:29:17.000Z | 2021-04-20T09:29:17.000Z | # coding: utf-8
"""
CLOUD API
An enterprise-grade Infrastructure is provided as a Service (IaaS) solution that can be managed through a browser-based \"Data Center Designer\" (DCD) tool or via an easy to use API. The API allows you to perform a variety of management tasks such as spinning up additional serv... | 27.615702 | 568 | 0.579979 |
6b775e3c4f7d4bb3fe490ae8a06075c67701a36a | 3,211 | py | Python | examples/mpm3d.py | JYLeeLYJ/taichi | c4c057ff68ca0fd0ce68cba665c1f65c95a08cdc | [
"MIT"
] | null | null | null | examples/mpm3d.py | JYLeeLYJ/taichi | c4c057ff68ca0fd0ce68cba665c1f65c95a08cdc | [
"MIT"
] | 3 | 2020-08-24T09:07:15.000Z | 2020-08-24T09:18:29.000Z | examples/mpm3d.py | JYLeeLYJ/taichi | c4c057ff68ca0fd0ce68cba665c1f65c95a08cdc | [
"MIT"
] | null | null | null | export_file = '/tmp/mpm3d.ply'
import taichi as ti
import numpy as np
ti.init(arch=ti.opengl)
dim = 3
n_grid = 32
n_particles = n_grid**dim // 2**(dim - 1)
dx = 1 / n_grid
dt = 4e-4
p_rho = 1
p_vol = (dx * 0.5)**2
p_mass = p_vol * p_rho
gravity = 9.8
bound = 3
E = 400
x = ti.Vector.field(dim, float, n_particles)
v... | 28.415929 | 77 | 0.510433 |
01054c0434891bc47b9357f2013b5ddfb16ddb8a | 1,243 | py | Python | SmileScanner/main.py | Ctalk3r/NotTowerDefence | c3b7cf890fdd07482a5fb47768033f1a9739ab53 | [
"MIT"
] | null | null | null | SmileScanner/main.py | Ctalk3r/NotTowerDefence | c3b7cf890fdd07482a5fb47768033f1a9739ab53 | [
"MIT"
] | null | null | null | SmileScanner/main.py | Ctalk3r/NotTowerDefence | c3b7cf890fdd07482a5fb47768033f1a9739ab53 | [
"MIT"
] | 1 | 2019-05-07T00:41:48.000Z | 2019-05-07T00:41:48.000Z | import cv2
class Smile:
def __init__(self):
self.activated = True
self.faceCascade = cv2.CascadeClassifier('SmileScanner/Cascades/haarcascade_frontalface_default.xml')
self.smileCascade = cv2.CascadeClassifier('SmileScanner/Cascades/haarcascade_smile.xml')
self.cap = cv2.VideoCap... | 30.317073 | 109 | 0.540628 |
4a0220b9e920197af0cb4a90b5c4983898f5736c | 618 | py | Python | experiments/test_trafficAssignment.py | salomonw/mixed-traffic-amod-route-rebalance | 7f1edeb195a7bfab835e596ad84deead2957943e | [
"MIT"
] | 1 | 2022-03-07T16:15:56.000Z | 2022-03-07T16:15:56.000Z | experiments/test_trafficAssignment.py | salomonw/mixed-traffic-amod-route-rebalance | 7f1edeb195a7bfab835e596ad84deead2957943e | [
"MIT"
] | null | null | null | experiments/test_trafficAssignment.py | salomonw/mixed-traffic-amod-route-rebalance | 7f1edeb195a7bfab835e596ad84deead2957943e | [
"MIT"
] | null | null | null | import src.tnet as tnet
import src.CARS as cars
netFile, gFile, fcoeffs = tnet.get_network_parameters('Braess1')
tNet = tnet.tNet(netFile=netFile, gFile=gFile, fcoeffs=fcoeffs)
tNet.solveMSA()
print([(i,j, tNet.G[i][j]['flow']) for i,j in tNet.G.edges()])
tNet.build_supergraph()
tNet = cars.solve_CARS_noRebalancin... | 29.428571 | 80 | 0.755663 |
fc9d5f6b92324862c3c95d7546df67e501447223 | 3,777 | py | Python | imaging/ml/toolkit/hcls_imaging_ml_toolkit/pubsub_format_test.py | rczhang/healthcare | 0e66c5b70dd81b9449f2f603959e2cb4095b3eb9 | [
"Apache-2.0"
] | 310 | 2018-02-23T01:40:01.000Z | 2022-03-30T12:25:56.000Z | imaging/ml/toolkit/hcls_imaging_ml_toolkit/pubsub_format_test.py | rczhang/healthcare | 0e66c5b70dd81b9449f2f603959e2cb4095b3eb9 | [
"Apache-2.0"
] | 189 | 2018-06-19T15:32:10.000Z | 2022-03-11T23:48:14.000Z | imaging/ml/toolkit/hcls_imaging_ml_toolkit/pubsub_format_test.py | animesh/healthcare | 7d3d4dc9deb3d31eab99035780ccb9a44f00b687 | [
"Apache-2.0"
] | 165 | 2018-03-06T19:29:18.000Z | 2022-03-21T10:53:45.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, ... | 43.918605 | 80 | 0.715118 |
bfc5730ee171d79bfc6425edde05fb130102f2e1 | 1,927 | py | Python | checkov/kubernetes/checks/resource/base_spec_check.py | cevoaustralia/checkov | 07b8d2c97fedaeb5db95f1688177246f49107e7c | [
"Apache-2.0"
] | 1 | 2021-02-13T15:24:42.000Z | 2021-02-13T15:24:42.000Z | checkov/kubernetes/checks/resource/base_spec_check.py | cevoaustralia/checkov | 07b8d2c97fedaeb5db95f1688177246f49107e7c | [
"Apache-2.0"
] | 7 | 2021-04-12T06:54:07.000Z | 2022-03-21T14:04:14.000Z | checkov/kubernetes/checks/resource/base_spec_check.py | metahertz/checkov | 3a179c5a2fda97c55e932a8cf72d69bd5ffdd711 | [
"Apache-2.0"
] | 1 | 2021-12-16T03:09:55.000Z | 2021-12-16T03:09:55.000Z | from abc import abstractmethod
from collections.abc import Iterable
from typing import Dict, Any, Optional, List
from checkov.common.checks.base_check import BaseCheck
from checkov.common.models.enums import CheckCategories, CheckResult
from checkov.common.multi_signature import multi_signature
from checkov.kubernetes... | 34.410714 | 96 | 0.659574 |
1d18d99bb96b05a3aec41a1cda4386051555921c | 4,101 | py | Python | datawinners/messageprovider/errors_translation_processor.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | 1 | 2015-11-02T09:11:12.000Z | 2015-11-02T09:11:12.000Z | datawinners/messageprovider/errors_translation_processor.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | datawinners/messageprovider/errors_translation_processor.py | ICT4H/dcs-web | fb0f53fad4401cfac1c1789ff28b9d5bda40c975 | [
"Apache-2.0"
] | null | null | null | from collections import OrderedDict
import mangrove.errors.MangroveException as ex
from django.utils.translation import get_language, ugettext, activate
def data_object_not_found_formatter(exception, message):
return message % (exception.data[0].capitalize(), ugettext(exception.data[1]), exception.data[2])
def ... | 58.585714 | 170 | 0.719093 |
46ae4700823358c863c0a3162d11364e31ec2544 | 7,956 | py | Python | docs/conf.py | benwhalley/pytest-bdd | f878209f36cf8988336220dc7da3e561e6c871aa | [
"MIT"
] | 4 | 2021-03-26T07:56:05.000Z | 2022-03-17T07:45:52.000Z | docs/conf.py | benwhalley/pytest-bdd | f878209f36cf8988336220dc7da3e561e6c871aa | [
"MIT"
] | 3 | 2020-04-29T13:31:28.000Z | 2020-05-10T08:57:12.000Z | docs/conf.py | benwhalley/pytest-bdd | f878209f36cf8988336220dc7da3e561e6c871aa | [
"MIT"
] | 2 | 2020-01-23T22:24:42.000Z | 2020-05-25T10:16:05.000Z | # -*- coding: utf-8 -*-
#
# Pytest-BDD documentation build configuration file, created by
# sphinx-quickstart on Sun Apr 7 21:07:56 2013.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | 32.606557 | 105 | 0.707139 |
b1d93caa3f925f7c9b1330079384ca5a3c921591 | 1,080 | py | Python | oscar_ecomenv/Scripts/viewer.py | PamilerinId/Ecommerce-Boiler | 1d706f88c8c828e86309793cb33ea102f385bf2f | [
"Apache-2.0"
] | null | null | null | oscar_ecomenv/Scripts/viewer.py | PamilerinId/Ecommerce-Boiler | 1d706f88c8c828e86309793cb33ea102f385bf2f | [
"Apache-2.0"
] | null | null | null | oscar_ecomenv/Scripts/viewer.py | PamilerinId/Ecommerce-Boiler | 1d706f88c8c828e86309793cb33ea102f385bf2f | [
"Apache-2.0"
] | null | null | null | #!c:\users\pi\documents\batcave\web\ecommerce\oscar_ecomenv\scripts\python.exe
#
# The Python Imaging Library
# $Id$
#
from __future__ import print_function
import sys
if sys.version_info[0] > 2:
import tkinter
else:
import Tkinter as tkinter
from PIL import Image, ImageTk
#
# an image viewer
class UI(tk... | 19.285714 | 78 | 0.606481 |
8795afdb734ca6e58b38557bb2403f37e7a24369 | 2,882 | py | Python | examples/cuda_mpi.py | gdementen/numba | 78486e86ff9fbd343cac3dadbc63ec3bc66c75aa | [
"BSD-2-Clause"
] | null | null | null | examples/cuda_mpi.py | gdementen/numba | 78486e86ff9fbd343cac3dadbc63ec3bc66c75aa | [
"BSD-2-Clause"
] | null | null | null | examples/cuda_mpi.py | gdementen/numba | 78486e86ff9fbd343cac3dadbc63ec3bc66c75aa | [
"BSD-2-Clause"
] | null | null | null | # Demonstration of using MPI and Numba CUDA to perform parallel computation
# using GPUs in multiple nodes. This example requires MPI4py to be installed.
#
# The root process creates an input data array that is scattered to all nodes.
# Each node calls a CUDA jitted function on its portion of the input data.
# Output d... | 30.336842 | 80 | 0.725538 |
0837c0bceb43bb65d6deaa3b7f48befe10a77211 | 941 | py | Python | recipes/plog/all/conanfile.py | rockandsalt/conan-center-index | d739adcec3e4dd4c250eff559ceb738e420673dd | [
"MIT"
] | 562 | 2019-09-04T12:23:43.000Z | 2022-03-29T16:41:43.000Z | recipes/plog/all/conanfile.py | rockandsalt/conan-center-index | d739adcec3e4dd4c250eff559ceb738e420673dd | [
"MIT"
] | 9,799 | 2019-09-04T12:02:11.000Z | 2022-03-31T23:55:45.000Z | recipes/plog/all/conanfile.py | rockandsalt/conan-center-index | d739adcec3e4dd4c250eff559ceb738e420673dd | [
"MIT"
] | 1,126 | 2019-09-04T11:57:46.000Z | 2022-03-31T16:43:38.000Z | import os
from conans import ConanFile, tools
class PlogConan(ConanFile):
name = "plog"
description = "Pretty powerful logging library in about 1000 lines of code"
homepage = "https://github.com/SergiusTheBest/plog"
url = "https://github.com/conan-io/conan-center-index"
license = "MPL-2.0"
top... | 32.448276 | 106 | 0.668438 |
05f84d4920634242e08c53748ea8e1192b282ebc | 333 | py | Python | Workflows/BenchmarkReader/analysis.py | HiveTracker/bonsai-interface | 1f4a1300727347c1f207022899070f319ea2be2b | [
"MIT"
] | null | null | null | Workflows/BenchmarkReader/analysis.py | HiveTracker/bonsai-interface | 1f4a1300727347c1f207022899070f319ea2be2b | [
"MIT"
] | null | null | null | Workflows/BenchmarkReader/analysis.py | HiveTracker/bonsai-interface | 1f4a1300727347c1f207022899070f319ea2be2b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat May 19 15:56:18 2018
@author: gonca
"""
import numpy as np
import matplotlib.pyplot as plt
fname = r'C:/Users/gonca/Documents/Projects/github/hivetracker/bonsai-interface/BinaryReader/base0Axis0.bin'
data = np.fromfile(fname,dtype=np.float32)
data = data.reshape((-1,4))
pl... | 20.8125 | 108 | 0.726727 |
3778083c86219923b0683c5d7e7532daaa21e2a4 | 9,595 | py | Python | can4python/configuration.py | uincore/can4python | 4177bcf4368fd8484ec080e2d926cb999b14c6a5 | [
"BSD-3-Clause"
] | 36 | 2015-11-16T17:27:43.000Z | 2021-09-16T15:14:55.000Z | can4python/configuration.py | hexkDotCom/can4python | 4177bcf4368fd8484ec080e2d926cb999b14c6a5 | [
"BSD-3-Clause"
] | 6 | 2015-12-04T09:07:55.000Z | 2018-04-24T16:39:15.000Z | can4python/configuration.py | hexkDotCom/can4python | 4177bcf4368fd8484ec080e2d926cb999b14c6a5 | [
"BSD-3-Clause"
] | 17 | 2015-11-26T16:24:35.000Z | 2021-01-23T14:21:41.000Z | # -*- coding: utf-8 -*-
#
# Author: Jonas Berg
# Copyright (c) 2015, Semcon Sweden AB
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted
# provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copy... | 44.21659 | 146 | 0.675039 |
f998e9a09d704349b996e20600a76f3d53c3aec9 | 1,079 | py | Python | ds.py | Taruni-Anand/Past-Air-Future | e796c86266c3a4ac452f96e5381a9ef43d84a3f5 | [
"CC0-1.0"
] | null | null | null | ds.py | Taruni-Anand/Past-Air-Future | e796c86266c3a4ac452f96e5381a9ef43d84a3f5 | [
"CC0-1.0"
] | 3 | 2019-12-31T07:09:08.000Z | 2022-03-25T18:44:14.000Z | ds.py | Taruni-Anand/Past-Air-Future | e796c86266c3a4ac452f96e5381a9ef43d84a3f5 | [
"CC0-1.0"
] | null | null | null | import openaq
import pandas as pd
from pandas.io.json import json_normalize
import statistics
api = openaq.OpenAQ()
status, resp = api.cities()
df = json_normalize(resp)
def get_lat_long(Input_City):
data = api.locations(df=True,parameters='pm25',city=Input_City)
data.drop_duplicates(subset=['city'],keep=Fal... | 26.317073 | 76 | 0.627433 |
f0aaa14c1c7f866d45f840fb4f8a35230a9cb990 | 205 | py | Python | user-config.py | PArangSae/pywikibot | caf1401e71a81d11e681a6d6adfdea907aa33b94 | [
"MIT"
] | null | null | null | user-config.py | PArangSae/pywikibot | caf1401e71a81d11e681a6d6adfdea907aa33b94 | [
"MIT"
] | null | null | null | user-config.py | PArangSae/pywikibot | caf1401e71a81d11e681a6d6adfdea907aa33b94 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# This is a sample file. You should use generate_user_files.py
# to create your user-config.py file.
mylang = 'ko'
family = 'wikipedia'
usernames['wikipedia']['ko'] = 'PArangSae'
| 22.777778 | 62 | 0.682927 |
f4147ba0fdaade7c9cca9e8048e56cfd516710cd | 633 | py | Python | backend/manage.py | crowdbotics-apps/wesands-33463 | b53cd4c61132598de0380d3c718c4f0774180827 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/wesands-33463 | b53cd4c61132598de0380d3c718c4f0774180827 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/manage.py | crowdbotics-apps/wesands-33463 | b53cd4c61132598de0380d3c718c4f0774180827 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'wesands_33463.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ... | 28.772727 | 77 | 0.685624 |
80024659c3d6b623bf79367790fedbf7aa6b4aaa | 9,199 | py | Python | cloudmesh/piazza/piazza_extractor.py | cloudmesh/piazza | aa603643fb8dd39cda6fc96fc3f13658aabe486e | [
"Apache-2.0"
] | 6 | 2017-04-21T20:20:08.000Z | 2021-01-12T16:59:54.000Z | cloudmesh/piazza/piazza_extractor.py | cloudmesh/piazza | aa603643fb8dd39cda6fc96fc3f13658aabe486e | [
"Apache-2.0"
] | null | null | null | cloudmesh/piazza/piazza_extractor.py | cloudmesh/piazza | aa603643fb8dd39cda6fc96fc3f13658aabe486e | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import getpass
import json
import sys
import time
import config
import grequests
import requests
from cloudmesh.piazza.piazza_mongo import PiazzaMongo
class PiazzaExtractor:
"""Piazza API interface for Piazza Miner
"""
api_url = 'https://piazza.com/logic/api'
... | 31.503425 | 109 | 0.470486 |
69ce6dc3f34397b15f11a56f60ba53fbe05d6e15 | 721 | py | Python | LightUpAlarm/__main__.py | Mitender-Arya/ArduBlocky | 4604f257328b3768add68c82c644fbc816756952 | [
"MIT"
] | 37 | 2015-03-30T19:32:47.000Z | 2022-02-03T20:10:10.000Z | LightUpAlarm/__main__.py | Mitender-Arya/ArduBlocky | 4604f257328b3768add68c82c644fbc816756952 | [
"MIT"
] | 6 | 2016-04-14T22:46:07.000Z | 2020-05-18T19:42:40.000Z | LightUpAlarm/__main__.py | Mitender-Arya/ArduBlocky | 4604f257328b3768add68c82c644fbc816756952 | [
"MIT"
] | 14 | 2015-06-29T06:33:00.000Z | 2022-03-28T00:24:10.000Z | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# Entry point for the LightUpAlarm package.
#
# Copyright (c) 2015 carlosperate http://carlosperate.github.io
#
# Licensed under The MIT License (MIT), a copy can be found in the LICENSE file
#
# Creates an instance of the AlarmCli class and runs it.
#
from __future__ im... | 24.033333 | 79 | 0.693481 |
80a9d5d40e275fce664ef52e5d5413930432d683 | 269,665 | py | Python | tensorflow/python/feature_column/feature_column_v2_test.py | elielhojman/tensorflow | 163aae337c875efce2518c3cd0fecb61968fe408 | [
"Apache-2.0"
] | 8 | 2017-03-20T12:04:21.000Z | 2021-06-24T20:34:30.000Z | tensorflow/python/feature_column/feature_column_v2_test.py | AKIRA-MIYAKE/tensorflow | 89e06304aad35bfb019a8c10f39fc1ead83e0f99 | [
"Apache-2.0"
] | 4 | 2019-08-14T22:32:51.000Z | 2020-03-09T14:59:18.000Z | tensorflow/python/feature_column/feature_column_v2_test.py | AKIRA-MIYAKE/tensorflow | 89e06304aad35bfb019a8c10f39fc1ead83e0f99 | [
"Apache-2.0"
] | 4 | 2019-11-11T13:46:27.000Z | 2020-03-14T05:36:53.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 40.957625 | 123 | 0.632919 |
dc877209e8d4fa89e4273fbd63d7662c2657b1d1 | 55,488 | py | Python | python/testData/MockSdk3.7/python_stubs/_io.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 52 | 2019-01-11T22:51:59.000Z | 2021-12-12T13:28:21.000Z | python/testData/MockSdk3.7/python_stubs/_io.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 417 | 2019-01-11T19:02:48.000Z | 2022-03-28T14:52:04.000Z | python/testData/MockSdk3.7/python_stubs/_io.py | truthiswill/intellij-community | fff88cfb0dc168eea18ecb745d3e5b93f57b0b95 | [
"Apache-2.0"
] | 10 | 2019-05-17T08:10:52.000Z | 2021-07-26T18:20:03.000Z | # encoding: utf-8
# module _io calls itself io
# from (built-in)
# by generator 1.145
"""
The io module provides the Python interfaces to stream handling. The
builtin open function is defined in this module.
At the top of the I/O hierarchy is the abstract base class IOBase. It
defines the basic interface to a stream. ... | 34.379182 | 104 | 0.633434 |
cd2844bb361ee1f8720c29542d1e7d9b1595b420 | 4,824 | py | Python | astroML/plotting/tools.py | arjunsavel/astroML | 361cadc56360ca35c760405a341e35ecab6dd585 | [
"BSD-2-Clause"
] | 1 | 2020-10-28T14:45:48.000Z | 2020-10-28T14:45:48.000Z | astroML/plotting/tools.py | awesomemachinelearning/astroML | d378ca41565d1aa39997191d13d46d09d104ff1d | [
"BSD-2-Clause"
] | 1 | 2018-05-18T19:32:15.000Z | 2018-05-18T19:32:15.000Z | astroML/plotting/tools.py | DinoBektesevic/astroML | b4e699bf45a65e233b40d60323c05eafa1d4955e | [
"BSD-2-Clause"
] | 1 | 2019-06-13T00:19:11.000Z | 2019-06-13T00:19:11.000Z | import numpy as np
from io import BytesIO
from matplotlib import pyplot as plt
from scipy import interpolate
from matplotlib import image
from matplotlib.colors import LinearSegmentedColormap
from matplotlib.transforms import Bbox
from matplotlib.patches import Ellipse
def devectorize_axes(ax=None, dpi=None, transpa... | 28.376471 | 75 | 0.593284 |
b1fb062319ad2bf5755079d03df9894f8ec4d067 | 393 | py | Python | 11numoccur.py | arunkumarang/python | 1960e285dfe2ef54d2e3ab37584bfef8b24ecca9 | [
"Apache-2.0"
] | null | null | null | 11numoccur.py | arunkumarang/python | 1960e285dfe2ef54d2e3ab37584bfef8b24ecca9 | [
"Apache-2.0"
] | null | null | null | 11numoccur.py | arunkumarang/python | 1960e285dfe2ef54d2e3ab37584bfef8b24ecca9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
import sys
import math
def main():
print('enter the line: ')
line = str(input())
words = line.split()
wordcnt = dict()
for word in words:
if word in wordcnt:
wordcnt[word] = wordcnt[word] + 1
else:
wordcnt[word] = 0
print(wordcnt[w... | 15.72 | 45 | 0.531807 |
e546e25fa8e0d16be1363cd4de92b69a418a5c40 | 2,550 | py | Python | docs/doxygen/doxyxml/__init__.py | vt-gs/gr-vcc | 8f29e6448ad6d5e37789fadca96fa8c46edd8f7d | [
"MIT"
] | 1 | 2021-04-28T03:52:20.000Z | 2021-04-28T03:52:20.000Z | docs/doxygen/doxyxml/__init__.py | vt-gs/gr-vcc | 8f29e6448ad6d5e37789fadca96fa8c46edd8f7d | [
"MIT"
] | null | null | null | docs/doxygen/doxyxml/__init__.py | vt-gs/gr-vcc | 8f29e6448ad6d5e37789fadca96fa8c46edd8f7d | [
"MIT"
] | null | null | null | #
# Copyright 2010 Free Software Foundation, Inc.
#
# This file was generated by gr_modtool, a tool from the GNU Radio framework
# This file is a part of gr-vcc
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softwar... | 30.357143 | 126 | 0.728627 |
5e5657655bed13b60c710a46eb4d7bdaeb6b3f37 | 6,791 | py | Python | script/json/BlueEgg/blueegg/model/auth.py | Zex/Starter | 40196fe2ef93301a889d40217b92355e51bf2f5d | [
"MIT"
] | null | null | null | script/json/BlueEgg/blueegg/model/auth.py | Zex/Starter | 40196fe2ef93301a889d40217b92355e51bf2f5d | [
"MIT"
] | null | null | null | script/json/BlueEgg/blueegg/model/auth.py | Zex/Starter | 40196fe2ef93301a889d40217b92355e51bf2f5d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Auth* related model.
This is where the models used by :mod:`repoze.who` and :mod:`repoze.what` are
defined.
It's perfectly fine to re-use this definition in the BlueEgg application,
though.
"""
import os
from datetime import datetime
import sys
try:
from hashlib import sha1
except Imp... | 29.145923 | 78 | 0.641143 |
a64387f9176b43bac205224261f0c212c4fb6a82 | 3,911 | py | Python | huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/list_hooks_request.py | githubmilesma/huaweicloud-sdk-python-v3 | 9d9449ed68a609ca65f0aa50b5b2a1c28445bf03 | [
"Apache-2.0"
] | 1 | 2021-04-16T07:59:28.000Z | 2021-04-16T07:59:28.000Z | huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/list_hooks_request.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-servicestage/huaweicloudsdkservicestage/v2/model/list_hooks_request.py | Lencof/huaweicloud-sdk-python-v3 | d13dc4e2830a83e295be6e4de021999b3376e34e | [
"Apache-2.0"
] | 1 | 2022-01-17T02:24:18.000Z | 2022-01-17T02:24:18.000Z | # coding: utf-8
import pprint
import re
import six
class ListHooksRequest:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value i... | 25.070513 | 74 | 0.555612 |
dbbc760b300b14469efa722586d46c1ce9450ef5 | 8,874 | py | Python | mkt/developers/urls.py | acidburn0zzz/zamboni | 780fbeb99e240a569a72a1c15410f49b76b3807c | [
"BSD-3-Clause"
] | 1 | 2017-07-14T19:22:39.000Z | 2017-07-14T19:22:39.000Z | mkt/developers/urls.py | Acidburn0zzz/zamboni | 780fbeb99e240a569a72a1c15410f49b76b3807c | [
"BSD-3-Clause"
] | 6 | 2021-02-02T23:08:48.000Z | 2021-09-08T02:47:17.000Z | mkt/developers/urls.py | Acidburn0zzz/zamboni | 780fbeb99e240a569a72a1c15410f49b76b3807c | [
"BSD-3-Clause"
] | null | null | null | from django import http
from django.conf.urls import include, patterns, url
from rest_framework.routers import SimpleRouter
from lib.misc.urlconf_decorator import decorate
import amo
from amo.decorators import write
from amo.urlresolvers import reverse
from mkt.api.base import SubRouter
from mkt.developers.api impo... | 41.858491 | 78 | 0.676133 |
b4bffc9607b9a0d8830f1969394cb51d47d0760f | 1,247 | py | Python | kds.py | wangzishuo111/bk_zhangdan | 30be7d92c53de4f18d90c00aba1ee73073f47029 | [
"MIT"
] | null | null | null | kds.py | wangzishuo111/bk_zhangdan | 30be7d92c53de4f18d90c00aba1ee73073f47029 | [
"MIT"
] | null | null | null | kds.py | wangzishuo111/bk_zhangdan | 30be7d92c53de4f18d90c00aba1ee73073f47029 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
from base.log import logger
import base.opt as opt
from base.timer import Timer
import hbase_util_thrift as hbase_util
import kds_rowkey
import params
def get_table_name():
env = opt.option().env
return 'kds_data_' + env
def kds_save(batch, data):
rowkey = kds_r... | 23.980769 | 68 | 0.646351 |
0987bdf7055b487b90a9a91751cb9f5d118ce510 | 10,512 | py | Python | make_planes/make_planes.py | qianyeqiang/AVOD-testing | aa4e2903f52f3a9d15b9b607a08c3bf8504919be | [
"MIT"
] | 3 | 2018-12-18T08:19:40.000Z | 2020-05-18T15:48:43.000Z | make_planes/make_planes.py | qianyeqiang/AVOD-testing | aa4e2903f52f3a9d15b9b607a08c3bf8504919be | [
"MIT"
] | 2 | 2019-03-05T01:50:08.000Z | 2020-06-03T08:42:57.000Z | make_planes/make_planes.py | qianyeqiang/AVOD-testing | aa4e2903f52f3a9d15b9b607a08c3bf8504919be | [
"MIT"
] | 1 | 2020-05-19T10:47:31.000Z | 2020-05-19T10:47:31.000Z | from pyntcloud import PyntCloud
import numpy as np
import os
import time
import scipy.linalg
import matplotlib.pyplot as plt
path_in = "/home/jackqian/avod/make_planes/"
path_kitti_training = "/home/jackqian/KITTI/training/velodyne/"
path_kitti_testing = "/home/jackqian/KITTI/testing/velodyne/"
path_save = "/media/ja... | 30.206897 | 132 | 0.582382 |
f35685b50bd05b4e65265fa9ceab149f402107ea | 584 | py | Python | tut1-mainwindow/ex1-mainWindow.py | JeffHoogland/qtdesigner-pyside-tutorial | c212a4f96ea8a0032b0b302e100ee222e68ce187 | [
"BSD-3-Clause"
] | 5 | 2015-03-14T11:20:40.000Z | 2020-09-15T19:33:00.000Z | tut1-mainwindow/ex1-mainWindow.py | JeffHoogland/qtdesigner-pyside-tutorial | c212a4f96ea8a0032b0b302e100ee222e68ce187 | [
"BSD-3-Clause"
] | null | null | null | tut1-mainwindow/ex1-mainWindow.py | JeffHoogland/qtdesigner-pyside-tutorial | c212a4f96ea8a0032b0b302e100ee222e68ce187 | [
"BSD-3-Clause"
] | 4 | 2015-03-14T11:20:22.000Z | 2020-03-07T17:40:12.000Z | import sys
from PySide.QtGui import *
from PySide.QtCore import *
from ui_mainWindow import Ui_mainWindow
class MainWindow(QMainWindow, Ui_mainWindow):
def __init__(self):
super(MainWindow, self).__init__()
self.setupUi(self)
self.assignWidgets()
self.show()
def assignWidge... | 24.333333 | 52 | 0.65411 |
f878a70cf50c78e2edd52e00c76c000ebd7cdf23 | 1,588 | py | Python | read_from_pdf.py | neha-duggirala/DataScience-Interview-Preparation-Bot | 41757cd193b15b0651b1b6ebf580fe86cec1ee35 | [
"MIT"
] | null | null | null | read_from_pdf.py | neha-duggirala/DataScience-Interview-Preparation-Bot | 41757cd193b15b0651b1b6ebf580fe86cec1ee35 | [
"MIT"
] | null | null | null | read_from_pdf.py | neha-duggirala/DataScience-Interview-Preparation-Bot | 41757cd193b15b0651b1b6ebf580fe86cec1ee35 | [
"MIT"
] | null | null | null | """Downloads PDF as a text file
Source: https://stackoverflow.com/questions/11087795/whitespace-gone-from-pdf-extraction-and-strange-word-interpretation
"""
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfmin... | 38.731707 | 130 | 0.688917 |
d7990c83388aa959790a7f41bacd3f56883ab7f0 | 1,023 | py | Python | assets/templatetags/assets.py | stewardshiptools/stewardshiptools | ee5d27e7b0d5d4947f34ad02bdf63a06ad0a5c3e | [
"MIT"
] | null | null | null | assets/templatetags/assets.py | stewardshiptools/stewardshiptools | ee5d27e7b0d5d4947f34ad02bdf63a06ad0a5c3e | [
"MIT"
] | 11 | 2020-03-24T15:29:46.000Z | 2022-03-11T23:14:48.000Z | assets/templatetags/assets.py | stewardshiptools/stewardshiptools | ee5d27e7b0d5d4947f34ad02bdf63a06ad0a5c3e | [
"MIT"
] | null | null | null | from django import template
register = template.Library()
@register.inclusion_tag('assets/metadocument_inline_form.html', takes_context=True)
def include_metadocument_inline_form(context, **kwargs):
response = {'context': context}
for k in kwargs.keys():
response[k] = kwargs[k]
return response
... | 29.228571 | 85 | 0.731183 |
95ab9d08949692a32e42f979dddadc71f945672e | 9,486 | py | Python | PSENet/dataset/psenet/psenet_synth.py | PaddleEdu/OCR-models-PaddlePaddle | 1a62dcf4b647310b505fa5e4a18bbd8d27c39dfd | [
"Apache-2.0"
] | 12 | 2021-05-10T13:47:32.000Z | 2021-07-30T08:59:53.000Z | PSENet/dataset/psenet/psenet_synth.py | maxpark/OCR-models-PaddlePaddle | 1a62dcf4b647310b505fa5e4a18bbd8d27c39dfd | [
"Apache-2.0"
] | 4 | 2021-05-16T11:28:32.000Z | 2021-07-23T07:41:44.000Z | PSENet/dataset/psenet/psenet_synth.py | maxpark/OCR-models-PaddlePaddle | 1a62dcf4b647310b505fa5e4a18bbd8d27c39dfd | [
"Apache-2.0"
] | 4 | 2021-05-12T16:32:03.000Z | 2021-11-17T23:18:39.000Z | import numpy as np
from PIL import Image
import cv2
import random
import paddle
from paddle.io import Dataset
import paddle.vision.transforms as transforms
import pyclipper
import Polygon as plg
import math
import string
import scipy.io as scio
synth_root_dir = './data/SynthText/'
synth_train_data_dir = synth_root_dir... | 32.375427 | 115 | 0.564938 |
fba0862a8d0def6affa9616148dbc847e17527dd | 164 | py | Python | apps/shop/forms.py | Zomba4okk/DjangoOnlinerLikeShop | 6f2bc8ca8072c6b3c69a79c33e448aa6c5be0f81 | [
"MIT"
] | null | null | null | apps/shop/forms.py | Zomba4okk/DjangoOnlinerLikeShop | 6f2bc8ca8072c6b3c69a79c33e448aa6c5be0f81 | [
"MIT"
] | 7 | 2021-02-20T13:17:16.000Z | 2021-04-17T18:43:25.000Z | apps/shop/forms.py | Zomba4okk/DjangoOnlinerLikeShop | 6f2bc8ca8072c6b3c69a79c33e448aa6c5be0f81 | [
"MIT"
] | null | null | null | from django import forms
from .models import Order
class OrderForm(forms.ModelForm):
class Meta:
model = Order
fields = ('user', 'products')
| 16.4 | 37 | 0.652439 |
9ee2d2b70ab48a0a3ed65ce7377bf919d8cd88c4 | 259 | py | Python | twisted/web/_version.py | linxuping/twisted | f0ca2e1844da1fe524d7bac66f371c1235ce7201 | [
"Unlicense",
"MIT"
] | 3 | 2018-11-25T01:09:55.000Z | 2021-08-24T01:56:36.000Z | twisted/web/_version.py | linxuping/twisted | f0ca2e1844da1fe524d7bac66f371c1235ce7201 | [
"Unlicense",
"MIT"
] | null | null | null | twisted/web/_version.py | linxuping/twisted | f0ca2e1844da1fe524d7bac66f371c1235ce7201 | [
"Unlicense",
"MIT"
] | 3 | 2018-11-09T03:38:09.000Z | 2020-02-24T06:26:10.000Z | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
# This is an auto-generated file. Do not edit it.
"""
Provides Twisted version information.
"""
from twisted.python import versions
version = versions.Version('twisted.web', 15, 0, 0)
| 21.583333 | 51 | 0.737452 |
481f95f63263090e0416ede4b8631d0aa0af4315 | 2,462 | py | Python | TD/q_learning/simple_q_learning.py | hadleyhzy34/reinforcement_learning | 14371756c2ff8225dc800d146452b7956875410c | [
"MIT"
] | null | null | null | TD/q_learning/simple_q_learning.py | hadleyhzy34/reinforcement_learning | 14371756c2ff8225dc800d146452b7956875410c | [
"MIT"
] | null | null | null | TD/q_learning/simple_q_learning.py | hadleyhzy34/reinforcement_learning | 14371756c2ff8225dc800d146452b7956875410c | [
"MIT"
] | null | null | null | #http://mnemstudio.org/path-finding-q-learning-tutorial.htm
#provide two different criterion for q-learning
import numpy as np
#initialize q function
q = np.matrix(np.zeros([6,6]))
# r is the tabular representation for rewards
r = np.matrix([[-1,-1,-1,-1,0,-1],
[-1,-1,-1,0,-1,100],
[-1,-... | 29.309524 | 112 | 0.557271 |
6010e271ecbccb4b8c9660028d88a499c9da2ef4 | 156 | py | Python | lab3project/street/apps/dictionaries/apps.py | danylott/labs_oop_2course | 7ebfd4ff5bd4604bf1cc7fce7046d7506fa8aa3f | [
"Apache-2.0"
] | null | null | null | lab3project/street/apps/dictionaries/apps.py | danylott/labs_oop_2course | 7ebfd4ff5bd4604bf1cc7fce7046d7506fa8aa3f | [
"Apache-2.0"
] | 13 | 2021-03-19T04:13:54.000Z | 2022-03-12T00:19:34.000Z | lab3project/street/apps/dictionaries/apps.py | Neknu/labs_oop_2course | 7ebfd4ff5bd4604bf1cc7fce7046d7506fa8aa3f | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class DictionariesConfig(AppConfig):
name = 'dictionaries'
verbose_name = 'Довідники типів вулиць та сегментів'
| 22.285714 | 56 | 0.769231 |
36aead21a1f2f82a3bfae280f71df2da572f5c87 | 520 | py | Python | snake_block.py | Phaugt/PyGame-Snake | e91e63e5fa0067fba03691dba9e08a5abb8cd249 | [
"MIT"
] | null | null | null | snake_block.py | Phaugt/PyGame-Snake | e91e63e5fa0067fba03691dba9e08a5abb8cd249 | [
"MIT"
] | null | null | null | snake_block.py | Phaugt/PyGame-Snake | e91e63e5fa0067fba03691dba9e08a5abb8cd249 | [
"MIT"
] | null | null | null | import pygame
pygame.init()
white = (255, 255, 255)
game_y = 500
game_x = 500
playboard = pygame.display.set_mode((game_x, game_y))
pygame.display.set_caption('Snake by pythonexplainedto.me')
game_over = False
x1 = game_x/2
y1 = game_y/2
snake_block=10
while not game_over:
for event in pygame.event.ge... | 16.774194 | 74 | 0.678846 |
6b089a0bd996982df5323f49c9a8bfca397b1d77 | 7,787 | py | Python | fetcher/utils.py | COVID19Tracking/covid19-datafetcher | d7e35a977149d8c06ed340b20a17479cdab0b76b | [
"Apache-2.0"
] | 31 | 2020-06-17T11:16:47.000Z | 2022-01-11T17:24:52.000Z | fetcher/utils.py | pablocaviglia-baires/covid19-datafetcher | d7e35a977149d8c06ed340b20a17479cdab0b76b | [
"Apache-2.0"
] | 24 | 2020-06-18T20:09:40.000Z | 2021-03-30T18:34:33.000Z | fetcher/utils.py | space-buzzer/covid19-datafetcher | b974583937bcb7dee2685b1b9b36e4a90042e056 | [
"Apache-2.0"
] | 15 | 2020-06-25T20:30:22.000Z | 2021-09-20T04:31:10.000Z | """
This is the utils module that handles the tasks of making a request and parsing
a request. Utils methods are used both by the main library and by state specific
extras module
"""
from datetime import datetime
from enum import Enum
from io import StringIO
import csv
import json
import logging
import ssl
import typi... | 30.778656 | 100 | 0.663157 |
807630ea4cf13a0914a523656f3ae30e300c3031 | 1,441 | py | Python | pushpluck/color.py | ejconlon/pushpluck | 4e5b8bcff6fe3955e8f25638268569f901815b5a | [
"MIT"
] | null | null | null | pushpluck/color.py | ejconlon/pushpluck | 4e5b8bcff6fe3955e8f25638268569f901815b5a | [
"MIT"
] | 2 | 2021-04-02T03:54:12.000Z | 2021-04-23T18:23:03.000Z | pushpluck/color.py | ejconlon/pushpluck | 4e5b8bcff6fe3955e8f25638268569f901815b5a | [
"MIT"
] | null | null | null | from dataclasses import dataclass
from typing import Dict, Generator
@dataclass(frozen=True)
class Color:
red: int
green: int
blue: int
def __iter__(self) -> Generator[int, None, None]:
yield self.red
yield self.green
yield self.blue
def to_code(self) -> str:
nums... | 28.82 | 53 | 0.59195 |
9295f31efd2561c0972500db46b597a92e0ae767 | 3,631 | py | Python | magnum/conductor/api.py | mail2nsrajesh/magnum | 2e7e5a77967028c961337177ce577eb936c3845c | [
"Apache-2.0"
] | null | null | null | magnum/conductor/api.py | mail2nsrajesh/magnum | 2e7e5a77967028c961337177ce577eb936c3845c | [
"Apache-2.0"
] | null | null | null | magnum/conductor/api.py | mail2nsrajesh/magnum | 2e7e5a77967028c961337177ce577eb936c3845c | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# di... | 38.62766 | 79 | 0.675021 |
880198db928ce16cee4f265c646d79d8fc3c0f7e | 14,178 | py | Python | tentacle/dnn3.py | splendor-kill/ml-five | 4da5c192bbdc9175542833a86f5ec65fc955dc10 | [
"MIT"
] | 72 | 2016-10-20T13:01:30.000Z | 2021-12-16T09:17:32.000Z | tentacle/dnn3.py | splendor-kill/ml-five | 4da5c192bbdc9175542833a86f5ec65fc955dc10 | [
"MIT"
] | null | null | null | tentacle/dnn3.py | splendor-kill/ml-five | 4da5c192bbdc9175542833a86f5ec65fc955dc10 | [
"MIT"
] | 16 | 2016-11-25T10:43:59.000Z | 2018-07-12T16:12:03.000Z | from builtins import (super)
from datetime import datetime
import os
import time
import numpy as np
import tensorflow as tf
from tentacle.board import Board
from tentacle.config import cfg
from tentacle.dnn import Pre
class DCNN3(Pre):
def __init__(self, is_train=True, is_revive=False, is_rl=False):
supe... | 45.442308 | 149 | 0.570955 |
62d6ca0ed70a1981e4ebf0ac47f56435e563d7b0 | 11,999 | py | Python | octavia/network/drivers/noop_driver/driver.py | BeaconFramework/Distributor | c9f8737063263ca69365679c8b76331766d63191 | [
"Apache-2.0"
] | 1 | 2019-01-11T06:20:25.000Z | 2019-01-11T06:20:25.000Z | octavia/network/drivers/noop_driver/driver.py | BeaconFramework/Distributor | c9f8737063263ca69365679c8b76331766d63191 | [
"Apache-2.0"
] | null | null | null | octavia/network/drivers/noop_driver/driver.py | BeaconFramework/Distributor | c9f8737063263ca69365679c8b76331766d63191 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Hewlett-Packard Development Company, L.P.
# Copyright 2016 IBM Corp.
#
# 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... | 44.113971 | 79 | 0.625135 |
23c01a86de38bcce38fc6331cb45380399485775 | 12,740 | py | Python | bbp/utils/batch/build_xml.py | kevinmilner/bbp | d9ba291b123be4e85f76317ef23600a339b2354d | [
"Apache-2.0"
] | 28 | 2017-10-31T09:16:30.000Z | 2022-02-28T23:44:29.000Z | bbp/utils/batch/build_xml.py | kevinmilner/bbp | d9ba291b123be4e85f76317ef23600a339b2354d | [
"Apache-2.0"
] | 37 | 2017-05-23T15:15:35.000Z | 2022-02-05T09:13:18.000Z | bbp/utils/batch/build_xml.py | kevinmilner/bbp | d9ba291b123be4e85f76317ef23600a339b2354d | [
"Apache-2.0"
] | 26 | 2017-09-21T17:43:33.000Z | 2021-11-29T06:34:30.000Z | #!/usr/bin/env python
#build_xml.py
#v1.1, 20110817
#Generate XML files formatted for BBP
#Input: Run description files (txt)
#Output: BBP XML file
#Sample input run description file:
#m6.00_d20_r90_z0_0100.txt
#RUN_TAG = 0010100
#VALIDATION_RUN = n
#SOURCE_DESCRIPTION_FILE = /home/scec-00/rgraves/NgaW2/FwHw/FaultInf... | 39.2 | 119 | 0.526452 |
f0e94f3a9363f449e882e2e4a037bec5497a4af2 | 5,717 | py | Python | resources/lib/state.py | ghostface/hyperion.kodi | 2b38eb121ab9099ac7ca04007d32d9c42f136e09 | [
"MIT"
] | null | null | null | resources/lib/state.py | ghostface/hyperion.kodi | 2b38eb121ab9099ac7ca04007d32d9c42f136e09 | [
"MIT"
] | null | null | null | resources/lib/state.py | ghostface/hyperion.kodi | 2b38eb121ab9099ac7ca04007d32d9c42f136e09 | [
"MIT"
] | null | null | null | import math
import xbmc
import xbmcaddon
import binascii
from hyperion.Hyperion import Hyperion
from misc import log
from misc import notify
class DisconnectedState:
'''
Default state class when disconnected from the Hyperion server
'''
def __init__(self, settings):
'''Constructor
-... | 32.299435 | 156 | 0.587196 |
526ff59ab9db93e0ef7cd23da922d61e15f36fe9 | 1,499 | py | Python | kapitan/errors.py | gruzewski/kapitan | f9cb7f90cc4f6e5065ed1e2eb965953004c6d54f | [
"Apache-2.0"
] | null | null | null | kapitan/errors.py | gruzewski/kapitan | f9cb7f90cc4f6e5065ed1e2eb965953004c6d54f | [
"Apache-2.0"
] | null | null | null | kapitan/errors.py | gruzewski/kapitan | f9cb7f90cc4f6e5065ed1e2eb965953004c6d54f | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 The Kapitan 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 ... | 21.112676 | 74 | 0.719146 |
f1da9bc2d9a1c4d1658299deeb916540b9eb5d29 | 8,371 | py | Python | tools/plain_train_net.py | JaninaMattes/detectron2_dla | da9b0925eb280a208e7837986f7cf79779d3ca61 | [
"Apache-2.0"
] | null | null | null | tools/plain_train_net.py | JaninaMattes/detectron2_dla | da9b0925eb280a208e7837986f7cf79779d3ca61 | [
"Apache-2.0"
] | null | null | null | tools/plain_train_net.py | JaninaMattes/detectron2_dla | da9b0925eb280a208e7837986f7cf79779d3ca61 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
"""
Detectron2 training script with a plain training loop.
This scripts reads a given config file and runs the training or evaluation.
It is an entry point that is able to train standard models in detectron2.
In order to let one script supp... | 36.238095 | 100 | 0.660853 |
75d3039c211943120cff97d08ed4e838a6501fd0 | 2,806 | py | Python | test/graph_definitions/star_ring_4_unbalanced.py | seth586/lndmanage | 64ac11fa5c24ce5793e894ea181b5d0a8e9ef78d | [
"MIT"
] | 166 | 2019-04-10T17:20:44.000Z | 2022-03-22T18:21:04.000Z | test/graph_definitions/star_ring_4_unbalanced.py | seth586/lndmanage | 64ac11fa5c24ce5793e894ea181b5d0a8e9ef78d | [
"MIT"
] | 67 | 2019-04-12T04:44:58.000Z | 2022-03-16T06:40:34.000Z | test/graph_definitions/star_ring_4_unbalanced.py | seth586/lndmanage | 64ac11fa5c24ce5793e894ea181b5d0a8e9ef78d | [
"MIT"
] | 19 | 2019-04-13T11:01:37.000Z | 2022-03-01T08:02:14.000Z | """
Implements a complete graph, where the master node A can be thought of
being surrounded by four nodes, which share a liquid network of channels.
The master node has unbalanced total inbound to outbound ratio.
"""
nodes = {
'A': {
'grpc_port': 11009,
'rest_port': 8080,
'port': 9735,
... | 24.831858 | 73 | 0.349964 |
e8b466d6b16c7f4d6d8b2938cd6adcc616e07872 | 9,294 | py | Python | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/list_backups_result.py | Adek06/huaweicloud-sdk-python-v3 | 3d13b27d089e04a1ae567cd649b3c5509e0391d2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/list_backups_result.py | Adek06/huaweicloud-sdk-python-v3 | 3d13b27d089e04a1ae567cd649b3c5509e0391d2 | [
"Apache-2.0"
] | null | null | null | huaweicloud-sdk-dds/huaweicloudsdkdds/v3/model/list_backups_result.py | Adek06/huaweicloud-sdk-python-v3 | 3d13b27d089e04a1ae567cd649b3c5509e0391d2 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import pprint
import re
import six
class ListBackupsResult:
"""
Attributes:
openapi_types (dict): The key is attribute name
and the value is attribute type.
attribute_map (dict): The key is attribute name
and the value ... | 25.255435 | 182 | 0.570476 |
2b140b24376c9f0fd9d11a6bdae35547a8578c37 | 10,797 | py | Python | spark_fhir_schemas/r4/complex_types/riskevidencesynthesis_samplesize.py | icanbwell/SparkFhirSchemas | 8c828313c39850b65f8676e67f526ee92b7d624e | [
"Apache-2.0"
] | null | null | null | spark_fhir_schemas/r4/complex_types/riskevidencesynthesis_samplesize.py | icanbwell/SparkFhirSchemas | 8c828313c39850b65f8676e67f526ee92b7d624e | [
"Apache-2.0"
] | null | null | null | spark_fhir_schemas/r4/complex_types/riskevidencesynthesis_samplesize.py | icanbwell/SparkFhirSchemas | 8c828313c39850b65f8676e67f526ee92b7d624e | [
"Apache-2.0"
] | null | null | null | from typing import Union, List, Optional
from pyspark.sql.types import StructType, StructField, StringType, ArrayType, DataType
# This file is auto-generated by generate_schema so do not edit it manually
# noinspection PyPep8Naming
class RiskEvidenceSynthesis_SampleSizeSchema:
"""
The RiskEvidenceSynthesis r... | 49.30137 | 104 | 0.57942 |
26fd7a01a82527291b20196d3ffbf5f4f4b5d6d3 | 5,329 | py | Python | projections/deep_eq.py | ricardog/raster-project | 37d508ca329d31d4b1d21614371596f4c1bca526 | [
"Apache-2.0"
] | 1 | 2018-02-23T14:26:17.000Z | 2018-02-23T14:26:17.000Z | projections/deep_eq.py | NaturalHistoryMuseum/raster-project | 319a0f633de8cf2317eba5d82396036f01ce5262 | [
"Apache-2.0"
] | null | null | null | projections/deep_eq.py | NaturalHistoryMuseum/raster-project | 319a0f633de8cf2317eba5d82396036f01ce5262 | [
"Apache-2.0"
] | 1 | 2017-10-11T15:49:18.000Z | 2017-10-11T15:49:18.000Z | # https://gist.github.com/samuraisam/901117
#Copyright (c) 2010-2013 Samuel Sutch [samuel.sutch@gmail.com]
#
#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 withou... | 36.006757 | 80 | 0.59636 |
411a25bb7f8bd4ec03909a3a76e47775ff6729d4 | 801 | py | Python | minigame5/HighScore.py | Tdallau/HRO_project2_minigames | 7fdecaa942d1a05d2cd451fd7f5d47e51c571c42 | [
"MIT"
] | null | null | null | minigame5/HighScore.py | Tdallau/HRO_project2_minigames | 7fdecaa942d1a05d2cd451fd7f5d47e51c571c42 | [
"MIT"
] | null | null | null | minigame5/HighScore.py | Tdallau/HRO_project2_minigames | 7fdecaa942d1a05d2cd451fd7f5d47e51c571c42 | [
"MIT"
] | null | null | null | from os import path
class HighScore:
def __init__(self, amound):
self.amound = self.getHighscore("highscore.txt")
self.dir = ''
def checkForHighScore(self, amound):
if int(self.amound) == 0 or int(self.amound) > int(amound):
print(str(self.amound) + "||||"+str(amound))
... | 28.607143 | 77 | 0.548065 |
a1fb6b96bd72e3e102fbb14ffc2d3485642db31f | 4,554 | py | Python | rollbar/lib/traverse.py | uploadcare/pyrollbar | 1c5e25ebc261dfbddb009465ac994a75b9cb01a9 | [
"MIT"
] | null | null | null | rollbar/lib/traverse.py | uploadcare/pyrollbar | 1c5e25ebc261dfbddb009465ac994a75b9cb01a9 | [
"MIT"
] | null | null | null | rollbar/lib/traverse.py | uploadcare/pyrollbar | 1c5e25ebc261dfbddb009465ac994a75b9cb01a9 | [
"MIT"
] | null | null | null | import logging
try:
# Python 3
from collections.abc import Mapping
from collections.abc import Sequence
except ImportError:
# Python 2.7
from collections import Mapping
from collections import Sequence
from rollbar.lib import binary_type, iteritems, string_types, circular_reference_label
from ... | 27.433735 | 147 | 0.653491 |
cfbc7080b6b982235771b4c6a731d9edb192f206 | 13,914 | py | Python | pysigdig/pysigdig.py | m-yuhas/pysigdig | 57275e14ea520f6ea9728830b55a2e38e9b851b0 | [
"MIT"
] | null | null | null | pysigdig/pysigdig.py | m-yuhas/pysigdig | 57275e14ea520f6ea9728830b55a2e38e9b851b0 | [
"MIT"
] | null | null | null | pysigdig/pysigdig.py | m-yuhas/pysigdig | 57275e14ea520f6ea9728830b55a2e38e9b851b0 | [
"MIT"
] | null | null | null | """Module to do arithmetic operations with significant digits."""
from typing import Union
import math
import re
class Number:
"""Class representing a number with information about significant figures
and tolerance."""
def __init__(self, value: Union[int, float, str], **kwargs) -> None:
self._t... | 35.494898 | 78 | 0.528604 |
eeb72a7b66e6acb422edd60e89935fdc651d0f7d | 622 | py | Python | manage.py | thewolfcommander/yappapoo-teamTanay-project-1 | 38712d7e88c5fc49e9216b5d05ebfa47f9d6fbcd | [
"Apache-2.0"
] | null | null | null | manage.py | thewolfcommander/yappapoo-teamTanay-project-1 | 38712d7e88c5fc49e9216b5d05ebfa47f9d6fbcd | [
"Apache-2.0"
] | 6 | 2021-03-19T02:18:53.000Z | 2021-09-22T18:55:17.000Z | manage.py | thewolfcommander/yappapoo-teamTanay-project-1 | 38712d7e88c5fc49e9216b5d05ebfa47f9d6fbcd | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'yp.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError... | 28.272727 | 73 | 0.680064 |
faa373dc4256341108bc7a7b2ae3d13389b787ab | 80,616 | py | Python | electrum/lnworker.py | multibit2016/electrum | 91fa62bdf2000d3909fd4a9fa7042c540bb52f88 | [
"MIT"
] | null | null | null | electrum/lnworker.py | multibit2016/electrum | 91fa62bdf2000d3909fd4a9fa7042c540bb52f88 | [
"MIT"
] | null | null | null | electrum/lnworker.py | multibit2016/electrum | 91fa62bdf2000d3909fd4a9fa7042c540bb52f88 | [
"MIT"
] | null | null | null | # Copyright (C) 2018 The Electrum developers
# Distributed under the MIT software license, see the accompanying
# file LICENCE or http://www.opensource.org/licenses/mit-license.php
import asyncio
import os
from decimal import Decimal
import random
import time
from typing import Optional, Sequence, Tuple, List, Set, Di... | 47.871734 | 263 | 0.647899 |
45c5562de980ab3003127899366b50b823c848bf | 20,103 | py | Python | tf2/objective.py | ilia10000/simclr | f0312afbedc7b9890236d70640e4e0a880f417ec | [
"Apache-2.0"
] | null | null | null | tf2/objective.py | ilia10000/simclr | f0312afbedc7b9890236d70640e4e0a880f417ec | [
"Apache-2.0"
] | null | null | null | tf2/objective.py | ilia10000/simclr | f0312afbedc7b9890236d70640e4e0a880f417ec | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The SimCLR 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... | 45.792711 | 137 | 0.692136 |
cdd6dd31946db9a1968bfdcbf89369182cba8c09 | 358 | py | Python | plenum/test/ledger/test_ledger_reset_uncommitted.py | andkononykhin/plenum | 28dc1719f4b7e80d31dafbadb38cfec4da949886 | [
"Apache-2.0"
] | 148 | 2017-07-11T19:05:25.000Z | 2022-03-16T21:31:20.000Z | plenum/test/ledger/test_ledger_reset_uncommitted.py | andkononykhin/plenum | 28dc1719f4b7e80d31dafbadb38cfec4da949886 | [
"Apache-2.0"
] | 561 | 2017-06-29T17:59:56.000Z | 2022-03-09T15:47:14.000Z | plenum/test/ledger/test_ledger_reset_uncommitted.py | andkononykhin/plenum | 28dc1719f4b7e80d31dafbadb38cfec4da949886 | [
"Apache-2.0"
] | 378 | 2017-06-29T17:45:27.000Z | 2022-03-26T07:27:59.000Z | def test_reset_uncommitted(ledger_with_batches_appended, inital_size, inital_root_hash):
ledger = ledger_with_batches_appended
ledger.reset_uncommitted()
assert ledger.uncommitted_size == inital_size
assert ledger.uncommittedRootHash is None
assert ledger.uncommitted_root_hash == inital_root_hash
... | 44.75 | 88 | 0.807263 |
0149a53c2435331334ccf9cac5e7cf1248089003 | 76 | py | Python | plugins/uniq/komand_uniq/actions/uniq_string_array/__init__.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 46 | 2019-06-05T20:47:58.000Z | 2022-03-29T10:18:01.000Z | plugins/uniq/komand_uniq/actions/uniq_string_array/__init__.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 386 | 2019-06-07T20:20:39.000Z | 2022-03-30T17:35:01.000Z | plugins/uniq/komand_uniq/actions/uniq_string_array/__init__.py | lukaszlaszuk/insightconnect-plugins | 8c6ce323bfbb12c55f8b5a9c08975d25eb9f8892 | [
"MIT"
] | 43 | 2019-07-09T14:13:58.000Z | 2022-03-28T12:04:46.000Z | # GENERATED BY KOMAND SDK - DO NOT EDIT
from .action import UniqStringArray
| 25.333333 | 39 | 0.789474 |
f2f929df2b215d6276b6772359961014d5534a8e | 189 | py | Python | project/warehouse/filters.py | hlystovea/resource_planner | 5ddbef31004a7e50201e1d414152a8090d1b0caf | [
"MIT"
] | null | null | null | project/warehouse/filters.py | hlystovea/resource_planner | 5ddbef31004a7e50201e1d414152a8090d1b0caf | [
"MIT"
] | null | null | null | project/warehouse/filters.py | hlystovea/resource_planner | 5ddbef31004a7e50201e1d414152a8090d1b0caf | [
"MIT"
] | null | null | null | import django_filters
from warehouse.models import Material
class MaterialFilter(django_filters.FilterSet):
class Meta:
model = Material
fields = ['amount__storage']
| 18.9 | 47 | 0.730159 |
3071a4c39c4a5919e181090a16bfbabb7166c556 | 4,962 | py | Python | services/ASG.py | asurion/Hibernate | b95c68ba8dba6a43baea288ade231944d1719988 | [
"Apache-2.0"
] | 9 | 2017-06-06T17:47:57.000Z | 2021-08-06T18:30:11.000Z | services/ASG.py | asurion/Hibernate | b95c68ba8dba6a43baea288ade231944d1719988 | [
"Apache-2.0"
] | null | null | null | services/ASG.py | asurion/Hibernate | b95c68ba8dba6a43baea288ade231944d1719988 | [
"Apache-2.0"
] | null | null | null | from asyncProducerUtil.utils.connect import Connect
class ASG(Connect):
api_name = 'autoscaling'
def __init__(self, account, region, asg_name):
self.asg_name = asg_name
Connect.__init__(self, account, region)
self.client = Connect.client_connect(self, self.api_name)
self.ec2... | 26.677419 | 131 | 0.568722 |
c84f1fee5976de1ba99eb152ac74fe09484116a3 | 5,317 | py | Python | application/flicket/forms/forms_main.py | juanvmarquezl/flicket | 0ed68d38b1f12e105436d8c51af163476b60a982 | [
"MIT"
] | 95 | 2017-10-31T21:25:11.000Z | 2022-03-07T05:46:12.000Z | application/flicket/forms/forms_main.py | juanvmarquezl/flicket | 0ed68d38b1f12e105436d8c51af163476b60a982 | [
"MIT"
] | 47 | 2017-05-15T10:52:23.000Z | 2021-12-13T09:30:52.000Z | application/flicket/forms/forms_main.py | juanvmarquezl/flicket | 0ed68d38b1f12e105436d8c51af163476b60a982 | [
"MIT"
] | 54 | 2017-07-13T03:38:47.000Z | 2022-02-12T20:10:02.000Z | #! usr/bin/python3
# -*- coding: utf-8 -*-
#
# Flicket - copyright Paul Bourne: evereux@gmail.com
import bcrypt
from flask import g
from flask_wtf import FlaskForm
from flask_babel import lazy_gettext
from wtforms import (PasswordField,
StringField,
FileField,
... | 34.980263 | 112 | 0.583788 |
27cb54cc900560cadcba77e17ee593b5f0749a37 | 1,157 | py | Python | result/migrations/tab/0056_auto_20191019_0451.py | Uqhs-1/uqhs | 1c7199d8c23a9d9eb3f75b1e36633a145fd2cd40 | [
"MIT"
] | 3 | 2020-06-16T20:03:31.000Z | 2021-01-17T20:45:51.000Z | result/migrations/tab/0056_auto_20191019_0451.py | Uqhs-1/uqhs | 1c7199d8c23a9d9eb3f75b1e36633a145fd2cd40 | [
"MIT"
] | 8 | 2020-02-08T09:04:08.000Z | 2021-06-09T18:31:03.000Z | result/migrations/tab/0056_auto_20191019_0451.py | Uqhs-1/uqhs | 1c7199d8c23a9d9eb3f75b1e36633a145fd2cd40 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.3 on 2019-10-18 15:51
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('result', '0055_auto_20191019_0449'),
]
operations = [
migrations.AlterField(
model_name='tutor_... | 38.566667 | 187 | 0.649092 |
0a0ea27d4bd43980b67cc30f51ff71c53153e091 | 3,310 | py | Python | ETL/ETL_mapper.py | nerokapa/RBDA_Project | aa99be3df326d2eff5dd9f495470cd24accf67f8 | [
"Apache-2.0"
] | 1 | 2018-12-11T22:31:15.000Z | 2018-12-11T22:31:15.000Z | ETL/ETL_mapper.py | nerokapa/RBDA_Project | aa99be3df326d2eff5dd9f495470cd24accf67f8 | [
"Apache-2.0"
] | null | null | null | ETL/ETL_mapper.py | nerokapa/RBDA_Project | aa99be3df326d2eff5dd9f495470cd24accf67f8 | [
"Apache-2.0"
] | null | null | null | # -*- coiding: utf-8 -*-
import csv,json,sys
MOVIE_DATASET = "/Users/huodahaha/Documents/BigData/hw9/tmdb_5000_movies.csv"
TEST_DATASET = "/Users/huodahaha/Documents/BigData/hw9/head.csv"
COL_CNT = 20
PROCESS_OK = 0
BAD_COL_CNT = 100
PARSE_FAILURE = 200
DAMAGED_RECORD = 300
recorded_genres = {'Mystery': 14, 'Romanc... | 31.52381 | 296 | 0.536556 |
c1a2eea4cc70fccc349dbc178fdf9ab1420f715f | 733 | py | Python | Vetores/11.py | HugoLeda/EstruturaDeDados | ed3b2489b7b1421ca8f8adf580aabaa967cf4a25 | [
"MIT"
] | null | null | null | Vetores/11.py | HugoLeda/EstruturaDeDados | ed3b2489b7b1421ca8f8adf580aabaa967cf4a25 | [
"MIT"
] | null | null | null | Vetores/11.py | HugoLeda/EstruturaDeDados | ed3b2489b7b1421ca8f8adf580aabaa967cf4a25 | [
"MIT"
] | null | null | null | # Escrever um algoritmo que lê um vetor X(20) e o escreve. Escreva, a seguir, cada um dos valores distintos que aparecem em X dizendo quantas vezes cada valor aparece em X.
def ocorrencias(v: list):
vldistintos = []
for i in v:
if (not i in vldistintos):
vldistintos.append(i)
qtd = [0] * len(vldi... | 25.275862 | 172 | 0.649386 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.