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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
df71fa9bfc17373d41a19fa97cbd77687725d81b | 60,395 | py | Python | abstract/tools/address_parser.py | dchaplinsky/ragoogle | dccb3d29334c3220ea12c46c725c443c8bd725c0 | [
"MIT"
] | 3 | 2018-06-10T21:20:56.000Z | 2021-04-04T11:21:06.000Z | abstract/tools/address_parser.py | dchaplinsky/ragoogle | dccb3d29334c3220ea12c46c725c443c8bd725c0 | [
"MIT"
] | 7 | 2018-08-14T20:54:49.000Z | 2020-06-05T18:17:30.000Z | abstract/tools/address_parser.py | dchaplinsky/ragoogle | dccb3d29334c3220ea12c46c725c443c8bd725c0 | [
"MIT"
] | 3 | 2018-06-27T12:53:13.000Z | 2020-09-25T19:41:46.000Z | __all__ = ['addressProcessor']
# (c) Kyrylo Zakharov (@Amice13), 2019
# Don't look below, you will not understand this Python code :) I don't.
from js2py.pyjs import *
# setting scope
var = Scope( JS_BUILTINS )
set_global_object(var)
# Code follows:
var.registers(['mixedCyrillicLatinPattern', 'spaceAfterPunctuation... | 74.195332 | 3,721 | 0.651875 |
bfd9222c32e39746b0b3b1ff268b4dad09f4d637 | 6,851 | py | Python | cifar/l1-norm-pruning/vggprune.py | dukebw/rethinking-network-pruning | 5486af65530f61e6688e542f1f2f13dbebf88e69 | [
"MIT"
] | 1,410 | 2018-10-15T01:47:00.000Z | 2022-03-31T07:21:13.000Z | cifar/l1-norm-pruning/vggprune.py | dukebw/rethinking-network-pruning | 5486af65530f61e6688e542f1f2f13dbebf88e69 | [
"MIT"
] | 50 | 2018-10-15T17:15:52.000Z | 2021-12-23T21:40:00.000Z | cifar/l1-norm-pruning/vggprune.py | dukebw/rethinking-network-pruning | 5486af65530f61e6688e542f1f2f13dbebf88e69 | [
"MIT"
] | 336 | 2018-10-15T11:54:35.000Z | 2022-03-28T09:22:57.000Z | import argparse
import numpy as np
import os
import torch
import torch.nn as nn
from torch.autograd import Variable
from torchvision import datasets, transforms
from models import *
# Prune settings
parser = argparse.ArgumentParser(description='PyTorch Slimming CIFAR prune')
parser.add_argument('--dataset', type=st... | 41.521212 | 104 | 0.620493 |
9eb6ce364d336e78abb6d20947f94847a7e7647b | 902 | py | Python | filemonitor/migrations/0002_auto_20170523_1140.py | imsilence/shadow-hostmonitor | faa28d7f5bb85212d5a64a60f742b807cf8644f7 | [
"Apache-2.0"
] | 1 | 2019-11-02T14:25:29.000Z | 2019-11-02T14:25:29.000Z | filemonitor/migrations/0002_auto_20170523_1140.py | imsilence/shadow-hostmonitor | faa28d7f5bb85212d5a64a60f742b807cf8644f7 | [
"Apache-2.0"
] | null | null | null | filemonitor/migrations/0002_auto_20170523_1140.py | imsilence/shadow-hostmonitor | faa28d7f5bb85212d5a64a60f742b807cf8644f7 | [
"Apache-2.0"
] | 1 | 2019-11-02T14:25:19.000Z | 2019-11-02T14:25:19.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-23 03:40
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('filemonitor', '0001_initial'),
]
operations = [
migrations.Cr... | 30.066667 | 115 | 0.547672 |
4157b9343eddb28feb975c51a8d64c8ee3aa8619 | 343 | py | Python | shards/manager.py | ReigenAraka/milvus | b2f19ace0e1dcd431a512141f42b748581d4b92d | [
"Apache-2.0"
] | 4 | 2020-07-29T02:59:53.000Z | 2021-11-16T11:07:51.000Z | shards/manager.py | liangwlw/milvus | 7e7f626b9c7288c1c82f5dafed87d33897f4b64e | [
"Apache-2.0"
] | 2 | 2020-08-20T07:17:50.000Z | 2020-08-21T04:21:34.000Z | shards/manager.py | liangwlw/milvus | 7e7f626b9c7288c1c82f5dafed87d33897f4b64e | [
"Apache-2.0"
] | 2 | 2021-06-09T23:50:48.000Z | 2021-06-17T06:24:29.000Z | import fire
from mishards import db, settings
class DBHandler:
@classmethod
def create_all(cls):
db.create_all()
@classmethod
def drop_all(cls):
db.drop_all()
if __name__ == '__main__':
db.init_db(settings.DefaultConfig.SQLALCHEMY_DATABASE_URI)
from mishards import models
... | 18.052632 | 62 | 0.693878 |
c0c62074a3f934ca8226452c3a0871b149e68c78 | 2,729 | py | Python | domain_hole.py | Blue-Giant/COVID_DNN | 39c62a25dc78b9feb418ee0474cb06503003d2b4 | [
"MIT"
] | 1 | 2020-11-13T11:42:36.000Z | 2020-11-13T11:42:36.000Z | domain_hole.py | Blue-Giant/COVID_DNN | 39c62a25dc78b9feb418ee0474cb06503003d2b4 | [
"MIT"
] | null | null | null | domain_hole.py | Blue-Giant/COVID_DNN | 39c62a25dc78b9feb418ee0474cb06503003d2b4 | [
"MIT"
] | null | null | null | ###################################
# coding=utf-8
# !/usr/bin/env python
# __author__ = 'LXA'
# ctime 2020.10.15
# 矩形区域内绘制椭圆和圆形
###################################
from matplotlib.patches import Ellipse, Circle, Rectangle
import matplotlib.patches as patches
import matplotlib.pyplot as plt
import n... | 36.878378 | 108 | 0.621473 |
2e210339337dea827c94c513ca3893a77d7cbd15 | 10,843 | py | Python | venv/lib/python2.7/site-packages/tinydb/queries.py | betisb/WebProgrammin_I | 6e2e4525c8d7766d65785e30bb43234cd7d829ef | [
"MIT"
] | 1 | 2019-04-15T10:28:42.000Z | 2019-04-15T10:28:42.000Z | venv/lib/python2.7/site-packages/tinydb/queries.py | betisb/WebProgrammin_I | 6e2e4525c8d7766d65785e30bb43234cd7d829ef | [
"MIT"
] | null | null | null | venv/lib/python2.7/site-packages/tinydb/queries.py | betisb/WebProgrammin_I | 6e2e4525c8d7766d65785e30bb43234cd7d829ef | [
"MIT"
] | null | null | null | """
Contains the querying interface.
Starting with :class:`~tinydb.queries.Query` you can construct complex
queries:
>>> ((where('f1') == 5) & (where('f2') != 2)) | where('s').matches(r'^\w+$')
(('f1' == 5) and ('f2' != 2)) or ('s' ~= ^\w+$ )
Queries are executed by using the ``__call__``:
>>> q = where('val') == 5... | 27.731458 | 79 | 0.53048 |
f8c191809f76425783dab1bc5ede182bdd46ba5e | 9,345 | py | Python | yt/data_objects/tests/test_sph_data_objects.py | cgyurgyik/yt | 9251e7bff9112e0f54c9b24f6a8bbba66869bb9d | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/data_objects/tests/test_sph_data_objects.py | cgyurgyik/yt | 9251e7bff9112e0f54c9b24f6a8bbba66869bb9d | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/data_objects/tests/test_sph_data_objects.py | cgyurgyik/yt | 9251e7bff9112e0f54c9b24f6a8bbba66869bb9d | [
"BSD-3-Clause-Clear"
] | null | null | null | import numpy as np
from yt import SlicePlot
from yt.testing import assert_equal, fake_sph_grid_ds, fake_sph_orientation_ds
def test_point():
ds = fake_sph_orientation_ds()
field_data = ds.stream_handler.fields["stream_file"]
ppos = [field_data["io", "particle_position_%s" % d] for d in "xyz"]
ppos = ... | 27.895522 | 83 | 0.530337 |
7b1b223af3866568b86ac96175cd05323bd92273 | 8,486 | py | Python | bm/base/tf_model.py | carolinscholl/boltzmann-machines | c6d3f9051b1cb12eca7a9c6ad540e58ee36f7501 | [
"MIT"
] | 1 | 2018-05-28T12:32:16.000Z | 2018-05-28T12:32:16.000Z | bm/base/tf_model.py | carolinscholl/boltzmann-machines | c6d3f9051b1cb12eca7a9c6ad540e58ee36f7501 | [
"MIT"
] | null | null | null | bm/base/tf_model.py | carolinscholl/boltzmann-machines | c6d3f9051b1cb12eca7a9c6ad540e58ee36f7501 | [
"MIT"
] | null | null | null | import os
import json
import tensorflow as tf
from functools import wraps
from bm.base import (BaseModel, DtypeMixin,
is_param_name)
def run_in_tf_session(check_initialized=True, update_seed=False):
"""Decorator function that takes care to load appropriate graph/session,
depending on whe... | 40.602871 | 108 | 0.624087 |
684cfc87bf64fb552ca1caa74a46163ac556af7d | 2,093 | py | Python | tfx/tools/cli/labels.py | johnPertoft/tfx | c6335684a54651adbcbe50aa52918b9b9948326e | [
"Apache-2.0"
] | null | null | null | tfx/tools/cli/labels.py | johnPertoft/tfx | c6335684a54651adbcbe50aa52918b9b9948326e | [
"Apache-2.0"
] | null | null | null | tfx/tools/cli/labels.py | johnPertoft/tfx | c6335684a54651adbcbe50aa52918b9b9948326e | [
"Apache-2.0"
] | null | null | null | # Lint as: python2, python3
# Copyright 2019 Google LLC. 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 req... | 34.311475 | 74 | 0.77592 |
11d28f7be1ad33687f8a7b72261ffd946a0fc5f2 | 429 | py | Python | drf_admin/apps/cmdb/admin.py | guohaihan/myproject | 0ec105d0bd48477faddf93bd62a8ede800419ae6 | [
"MIT"
] | 228 | 2020-06-20T10:07:03.000Z | 2022-03-29T07:11:01.000Z | drf_admin/apps/cmdb/admin.py | guohaihan/myproject | 0ec105d0bd48477faddf93bd62a8ede800419ae6 | [
"MIT"
] | 25 | 2020-07-16T12:29:04.000Z | 2022-02-16T06:31:06.000Z | drf_admin/apps/cmdb/admin.py | guohaihan/myproject | 0ec105d0bd48477faddf93bd62a8ede800419ae6 | [
"MIT"
] | 82 | 2020-10-26T07:14:15.000Z | 2022-03-29T07:53:23.000Z | from django.contrib import admin
from cmdb.models import Assets, Servers, SecurityDevices, StorageDevices, NetworkDevices, IDC, Cabinets, Accounts
# Register your models here.
admin.site.register(Assets)
admin.site.register(Servers)
admin.site.register(SecurityDevices)
admin.site.register(StorageDevices)
admin.site.r... | 30.642857 | 113 | 0.829837 |
16faee1d432c27fee91223052bc1fe526a35bc9f | 617 | py | Python | tutorial-01/pySimpleGui-0101.py | lungen/pySimpleGui | 31c10e481d90a60a82b4036b187d56fe008a96f1 | [
"MIT"
] | null | null | null | tutorial-01/pySimpleGui-0101.py | lungen/pySimpleGui | 31c10e481d90a60a82b4036b187d56fe008a96f1 | [
"MIT"
] | null | null | null | tutorial-01/pySimpleGui-0101.py | lungen/pySimpleGui | 31c10e481d90a60a82b4036b187d56fe008a96f1 | [
"MIT"
] | null | null | null | import PySimpleGUI as sg
sg.theme("DarkAmber") # Add a touch of color
# All the stuff inside your window.
layout = [
[sg.Text("Some text on Row 1")],
[sg.Text("Enter something on Row 2"), sg.InputText()],
[sg.Button("Ok"), sg.Button("Cancel")],
]
# Create the Window
window = sg.Window("Window Title", lay... | 25.708333 | 67 | 0.640194 |
46d56896e86b1d6e826d61c8876888e02c85994a | 2,113 | py | Python | experiments/exp_20170719_01/main.py | charliezon/deep_stock | bbc7e6ea8498c50459b8e42eeff42d8578b6491d | [
"MIT"
] | 7 | 2017-08-01T04:13:32.000Z | 2021-08-17T02:19:51.000Z | experiments/exp_20170719_01/main.py | urantialife/deep_stock | bbc7e6ea8498c50459b8e42eeff42d8578b6491d | [
"MIT"
] | 1 | 2018-01-24T12:02:30.000Z | 2018-01-24T12:02:30.000Z | experiments/exp_20170719_01/main.py | urantialife/deep_stock | bbc7e6ea8498c50459b8e42eeff42d8578b6491d | [
"MIT"
] | 3 | 2018-10-03T18:05:16.000Z | 2020-07-23T15:55:58.000Z | import sys
sys.path.append('../../')
import pandas as pd
import numpy as np
from keras.models import Sequential
from keras.models import load_model
from keras.layers import Dense, Dropout
from keras.optimizers import SGD
from keras.layers.advanced_activations import LeakyReLU
import matplotlib.pyplot as plt
import h5p... | 28.554054 | 116 | 0.733554 |
bf8d5df5ea0d13739a01f2fba7f1d9f7a34deefb | 4,588 | py | Python | mistos-backend/src/app/api/classes/experiment_result.py | Maddonix/mistos_2 | 4bd9f45ad9e49f4178c0b8bb1a177d7db5349c34 | [
"MIT"
] | 1 | 2021-03-22T10:57:01.000Z | 2021-03-22T10:57:01.000Z | mistos-backend/src/app/api/classes/experiment_result.py | Maddonix/mistos_2 | 4bd9f45ad9e49f4178c0b8bb1a177d7db5349c34 | [
"MIT"
] | 44 | 2021-02-17T15:07:17.000Z | 2021-04-05T07:07:09.000Z | mistos-backend/src/app/api/classes/experiment_result.py | Maddonix/mistos_2 | 4bd9f45ad9e49f4178c0b8bb1a177d7db5349c34 | [
"MIT"
] | null | null | null | from pathlib import Path
from typing import Optional, Any
from app import crud
from app import fileserver_requests as fsr
from app.api.classes_com import ComExperimentResult
from app.api.dependencies import check_sess
from pandas import DataFrame
from pydantic import BaseModel, constr
from app.api import cfg_classes
... | 34.496241 | 159 | 0.67524 |
0be9c3a6bfe058f259246d3b6626b22816a515c7 | 8,070 | py | Python | src/oci/data_labeling_service/models/work_request_resource.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | 249 | 2017-09-11T22:06:05.000Z | 2022-03-04T17:09:29.000Z | src/oci/data_labeling_service/models/work_request_resource.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | 228 | 2017-09-11T23:07:26.000Z | 2022-03-23T10:58:50.000Z | src/oci/data_labeling_service/models/work_request_resource.py | ezequielramos/oci-python-sdk | cc4235cf217beaf9feed75760e9ce82610222762 | [
"Apache-2.0",
"BSD-3-Clause"
] | 224 | 2017-09-27T07:32:43.000Z | 2022-03-25T16:55:42.000Z | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 34.635193 | 245 | 0.658612 |
e8bb54d83b3a3a5750f9c927125f84c91e66e0f0 | 524 | py | Python | hello-world/python/send.py | jeffryang24/rabbitmq-learning | f014695f02da46557ae82b237ad4b3c600315b2e | [
"MIT"
] | 1 | 2020-09-02T08:32:02.000Z | 2020-09-02T08:32:02.000Z | hello-world/python/send.py | jeffryang24/rabbitmq-learning | f014695f02da46557ae82b237ad4b3c600315b2e | [
"MIT"
] | null | null | null | hello-world/python/send.py | jeffryang24/rabbitmq-learning | f014695f02da46557ae82b237ad4b3c600315b2e | [
"MIT"
] | 1 | 2020-04-30T07:03:15.000Z | 2020-04-30T07:03:15.000Z | #!/usr/bin/env python
import pika
# Create connection to rabbitmq server
connection = pika.BlockingConnection(pika.ConnectionParameters(host='localhost'))
channel = connection.channel()
# Create queue unless rabbit will drop our message
channel.queue_declare(queue='hello')
# Use default exchanger (no name) for first... | 23.818182 | 81 | 0.748092 |
e4818892b3ae982b36464634ff3f30a3328c96b2 | 6,886 | py | Python | vkbottle/types/methods/likes.py | LouisPython217/vkbottle | 3541bbdb66f32c2d3567b0047c36b706ac72bb3b | [
"MIT"
] | null | null | null | vkbottle/types/methods/likes.py | LouisPython217/vkbottle | 3541bbdb66f32c2d3567b0047c36b706ac72bb3b | [
"MIT"
] | null | null | null | vkbottle/types/methods/likes.py | LouisPython217/vkbottle | 3541bbdb66f32c2d3567b0047c36b706ac72bb3b | [
"MIT"
] | null | null | null | # Generated with love
from vkbottle.types import responses
from .access import APIAccessibility
from .method import BaseMethod
class LikesAdd(BaseMethod):
access_token_type: APIAccessibility = [APIAccessibility.USER]
async def __call__(
self, type: str, item_id: int, owner_id: int = None, access_key:... | 52.564885 | 386 | 0.64711 |
69f968483f8b2c42344bf00434e73216f9906040 | 8,461 | py | Python | maskprop/MiVOS/model/fusion_model.py | qinliuliuqin/iSegFormer | 67b634588cc0a1e09fb3e092966eae997eb209fa | [
"MIT"
] | 14 | 2021-12-09T08:33:23.000Z | 2022-03-26T13:11:01.000Z | maskprop/MiVOS/model/fusion_model.py | qinliuliuqin/iSegFormer | 67b634588cc0a1e09fb3e092966eae997eb209fa | [
"MIT"
] | null | null | null | maskprop/MiVOS/model/fusion_model.py | qinliuliuqin/iSegFormer | 67b634588cc0a1e09fb3e092966eae997eb209fa | [
"MIT"
] | null | null | null | import os
from os import path
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import time
from model.fusion_net import FusionNet
from model.attn_network import AttentionReadNetwork
from model.aggregate import aggregate_wbg_channel
from model.losses import LossComputer, io... | 37.109649 | 126 | 0.58161 |
a8d8b8f28400d3f10ace1d2e32d86aa10c18f93c | 7,571 | py | Python | openmdao.util/src/openmdao/util/test/test_parsephoenix.py | MrShoks/OpenMDAO-Framework | 412f34ffe31a95631fbe55ca7d75b84669ae8f8c | [
"Apache-2.0"
] | 1 | 2020-06-28T20:38:56.000Z | 2020-06-28T20:38:56.000Z | openmdao.util/src/openmdao/util/test/test_parsephoenix.py | MrShoks/OpenMDAO-Framework | 412f34ffe31a95631fbe55ca7d75b84669ae8f8c | [
"Apache-2.0"
] | null | null | null | openmdao.util/src/openmdao/util/test/test_parsephoenix.py | MrShoks/OpenMDAO-Framework | 412f34ffe31a95631fbe55ca7d75b84669ae8f8c | [
"Apache-2.0"
] | null | null | null | """
Testing the ParsePhoenixWrapper utility.
"""
import unittest, os
from openmdao.util.parse_phoenixwrapper import parse_phoenixwrapper
class TestCase(unittest.TestCase):
""" Test namelist writer functions. """
def setUp(self):
self.infile = 'phx_text_input.txt'
self.outfile = 'phx_text_ou... | 50.812081 | 199 | 0.616167 |
90ffd93b49b3af4b0b93691554b504a3ed0aff8d | 2,407 | py | Python | pygpu/basic.py | nondejus/libgpuarray | 01909c2f7b99f574e73ab8d0ab4211ea8deb61d2 | [
"0BSD"
] | 204 | 2015-02-01T13:59:25.000Z | 2021-12-17T14:27:09.000Z | pygpu/basic.py | nondejus/libgpuarray | 01909c2f7b99f574e73ab8d0ab4211ea8deb61d2 | [
"0BSD"
] | 464 | 2015-01-16T22:02:20.000Z | 2022-01-11T16:47:40.000Z | pygpu/basic.py | nondejus/libgpuarray | 01909c2f7b99f574e73ab8d0ab4211ea8deb61d2 | [
"0BSD"
] | 110 | 2015-01-14T02:26:26.000Z | 2022-03-21T19:13:33.000Z | from string import Template
from .gpuarray import GpuArray, GpuKernel, SIZE, dtype_to_ctype
import numpy
def _generate_kernel(ctx, cols, dtype, upper=True):
tmpl = Template("""
#include "cluda.h"
KERNEL void extract_tri(GLOBAL_MEM ${ctype} *a, ga_size a_off, ga_uint N) {
a = (GLOBAL_MEM ${ctype} *)... | 30.858974 | 79 | 0.582883 |
a5b734f8d2a38d176b9a08f07e5f44c01b6a8de8 | 263 | py | Python | script/model/sklearn_like_model/NetModule/InceptionSructure/Inception_ResnetV2Structure.py | demetoir/MLtools | 8c42fcd4cc71728333d9c116ade639fe57d50d37 | [
"MIT"
] | null | null | null | script/model/sklearn_like_model/NetModule/InceptionSructure/Inception_ResnetV2Structure.py | demetoir/MLtools | 8c42fcd4cc71728333d9c116ade639fe57d50d37 | [
"MIT"
] | null | null | null | script/model/sklearn_like_model/NetModule/InceptionSructure/Inception_ResnetV2Structure.py | demetoir/MLtools | 8c42fcd4cc71728333d9c116ade639fe57d50d37 | [
"MIT"
] | null | null | null | from script.model.sklearn_like_model.NetModule.InceptionSructure.BaseInceptionNetModule import \
BaseInceptionNetModule
class Inception_ResnetV2NetModule(BaseInceptionNetModule):
def build(self):
# TODO
raise NotImplementedError
| 29.222222 | 97 | 0.771863 |
17862c9185d624b4272e7d8063c1a8fe28c2dabd | 4,168 | py | Python | neutron/tests/unit/sriovnicagent/test_pci_lib.py | gampel/neutron | 51a6260266dc59c066072ca890ad9c40b1aad6cf | [
"Apache-2.0"
] | 10 | 2015-09-22T10:22:53.000Z | 2016-02-25T06:12:05.000Z | neutron/tests/unit/sriovnicagent/test_pci_lib.py | gampel/neutron | 51a6260266dc59c066072ca890ad9c40b1aad6cf | [
"Apache-2.0"
] | 12 | 2015-01-08T18:30:45.000Z | 2015-03-13T21:04:15.000Z | neutron/tests/unit/sriovnicagent/test_pci_lib.py | gampel/neutron | 51a6260266dc59c066072ca890ad9c40b1aad6cf | [
"Apache-2.0"
] | 7 | 2015-02-05T10:23:52.000Z | 2019-05-18T17:11:19.000Z | # Copyright 2014 Mellanox Technologies, 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 t... | 41.267327 | 74 | 0.605086 |
b5627c7766d52807108a811a712e84b1e9050ec1 | 66,249 | py | Python | notsobot/notsobot.py | fixator10/Trusty-cogs | 3d47a63f562cb64eb44da6bb53cfe9f8324026e7 | [
"MIT"
] | null | null | null | notsobot/notsobot.py | fixator10/Trusty-cogs | 3d47a63f562cb64eb44da6bb53cfe9f8324026e7 | [
"MIT"
] | null | null | null | notsobot/notsobot.py | fixator10/Trusty-cogs | 3d47a63f562cb64eb44da6bb53cfe9f8324026e7 | [
"MIT"
] | null | null | null | # https://github.com/NotSoSuper/NotSoBot
import asyncio
import logging
import random
import re
import sys
import textwrap
import uuid
from io import BytesIO
from typing import List, Optional, Tuple, Union
from urllib.parse import quote
import aiohttp
import discord
import jpglitch
import numpy as np
import PIL
import... | 40.321972 | 128 | 0.514529 |
0447f4da666c2bbe4f03d070932dc204637c1bfb | 1,024 | py | Python | pilgram/maven.py | akiomik/pilgram | c585ca4f7f08549842befdcd05dd7d9972f7b0a2 | [
"Apache-2.0"
] | 46 | 2019-03-21T21:41:36.000Z | 2022-01-19T16:01:03.000Z | pilgram/maven.py | akiomik/pilgram | c585ca4f7f08549842befdcd05dd7d9972f7b0a2 | [
"Apache-2.0"
] | 102 | 2019-03-21T21:41:05.000Z | 2022-03-21T19:04:22.000Z | pilgram/maven.py | akiomik/pilgram | c585ca4f7f08549842befdcd05dd7d9972f7b0a2 | [
"Apache-2.0"
] | 5 | 2019-05-28T02:40:38.000Z | 2020-10-30T22:22:01.000Z | # Copyright 2019 Akiomi Kamakura
#
# 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 writi... | 25.6 | 74 | 0.678711 |
26ee601a4c29ebd60f92b84e793e26b54ec15ab8 | 6,080 | py | Python | align-dlib.py | 4Dager/4DFace | aa9dd0d8d028b7ddb77212bc8488984377bb1fdc | [
"Apache-2.0"
] | null | null | null | align-dlib.py | 4Dager/4DFace | aa9dd0d8d028b7ddb77212bc8488984377bb1fdc | [
"Apache-2.0"
] | null | null | null | align-dlib.py | 4Dager/4DFace | aa9dd0d8d028b7ddb77212bc8488984377bb1fdc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python2
import argparse
import cv2
import numpy as np
import os
import random
import shutil
import errno
import facelib
from facelib.data import iterImgs
fileDir = os.path.dirname(os.path.realpath(__file__))
modelDir = os.path.join(fileDir, '..', 'models')
dlibModelDir = os.path.join(modelDir, 'dlib')
... | 35.976331 | 135 | 0.573684 |
51bab872e320c798ae7f372c1ac1ef8e419f882e | 970 | py | Python | metriq/config.py | unitaryfund/metriq-client | 7d8831d5015baa490ec77a04ea704d2e9aa9d8d0 | [
"Apache-2.0"
] | null | null | null | metriq/config.py | unitaryfund/metriq-client | 7d8831d5015baa490ec77a04ea704d2e9aa9d8d0 | [
"Apache-2.0"
] | null | null | null | metriq/config.py | unitaryfund/metriq-client | 7d8831d5015baa490ec77a04ea704d2e9aa9d8d0 | [
"Apache-2.0"
] | null | null | null | from pathlib import Path
from tea_client.config import TeaClientConfig
from tea_console.config import TeaConsoleConfig, ConfigField
class Config(TeaConsoleConfig, TeaClientConfig):
ENTRIES = {
**TeaConsoleConfig.ENTRIES,
"server_url": ConfigField(section="server", option="url"),
"api_vers... | 30.3125 | 77 | 0.635052 |
315e7f422e1c1f2b118225794bf59cea653deb4f | 510 | py | Python | test/test_utils.py | vishoo7/TwitterAutoReply | 268c7da6176381714a0676602513af1dbaa22078 | [
"MIT"
] | 2 | 2016-10-29T14:44:31.000Z | 2018-09-10T05:31:04.000Z | test/test_utils.py | vishoo7/TwitterAutoReply | 268c7da6176381714a0676602513af1dbaa22078 | [
"MIT"
] | 1 | 2016-10-17T19:16:38.000Z | 2016-10-17T19:16:38.000Z | test/test_utils.py | vishoo7/TwitterAutoReply | 268c7da6176381714a0676602513af1dbaa22078 | [
"MIT"
] | null | null | null | from utils import gen_hashtags
class TestUtils:
def test_gen_hashtags(self):
single_hashtag = gen_hashtags(['test'])
single_hashtag2 = gen_hashtags(['123'])
multiple_hashtags = gen_hashtags(['foo', 'bar', 'baz'])
multiple_hashtags2 = gen_hashtags(['quux', '123', 'war&peace'])
... | 39.230769 | 71 | 0.641176 |
0db82ed617c8d7e0af4e09499898c04187c71cfa | 445 | py | Python | gui/app.py | ManojG13/OS-Simulator | 0a7dc42ffbdf4db6182e6988059b2e9207fac3f4 | [
"MIT"
] | null | null | null | gui/app.py | ManojG13/OS-Simulator | 0a7dc42ffbdf4db6182e6988059b2e9207fac3f4 | [
"MIT"
] | null | null | null | gui/app.py | ManojG13/OS-Simulator | 0a7dc42ffbdf4db6182e6988059b2e9207fac3f4 | [
"MIT"
] | null | null | null | from flask import Flask , jsonify, render_template, request
import json
app = Flask(__name__)
@app.route('/')
@app.route('/index')
def index():
print ("Here")
return render_template('data.html')
@app.route('/api/gateway',methods=['POST'])
def gateway():
print("Ha")
data = json.loads(request.form['data'])
print(... | 21.190476 | 59 | 0.698876 |
ce3642c5cfe21f0713409f704477e83f3ddccad2 | 41,768 | py | Python | scikit-learn-weighted_kde/sklearn/ensemble/tests/test_forest.py | RTHMaK/git-squash-master | 76c4c8437dd18114968e69a698f4581927fcdabf | [
"BSD-2-Clause"
] | 1 | 2016-10-24T13:36:23.000Z | 2016-10-24T13:36:23.000Z | scikit-learn-weighted_kde/sklearn/ensemble/tests/test_forest.py | RTHMaK/git-squash-master | 76c4c8437dd18114968e69a698f4581927fcdabf | [
"BSD-2-Clause"
] | null | null | null | scikit-learn-weighted_kde/sklearn/ensemble/tests/test_forest.py | RTHMaK/git-squash-master | 76c4c8437dd18114968e69a698f4581927fcdabf | [
"BSD-2-Clause"
] | null | null | null | """
Testing for the forest module (sklearn.ensemble.forest).
"""
# Authors: Gilles Louppe,
# Brian Holt,
# Andreas Mueller,
# Arnaud Joly
# License: BSD 3 clause
import pickle
from collections import defaultdict
from itertools import combinations
from itertools import product
import numpy ... | 35.247257 | 83 | 0.655909 |
efd4fa057c5592bdd043422d383a7d0dc566a2bf | 818 | py | Python | ifttt-youtubedl.py | pathakamit88/scripts | 21f19203eff85c2ee244e48219f761617306280a | [
"MIT"
] | null | null | null | ifttt-youtubedl.py | pathakamit88/scripts | 21f19203eff85c2ee244e48219f761617306280a | [
"MIT"
] | null | null | null | ifttt-youtubedl.py | pathakamit88/scripts | 21f19203eff85c2ee244e48219f761617306280a | [
"MIT"
] | null | null | null | """
Script to download all the liked youtube videos.
This script works in combination with IFTTT applet
'if-new-liked-video-then-append-to-a-text-file-in-dropbox'
"""
import os
import subprocess
def main():
filepath = os.path.expanduser('~/Dropbox/IFTTT/YouTube/youtubelikes.txt')
output_path = os.path.expandus... | 23.371429 | 76 | 0.671149 |
2128e9e1e9fb1715c5198a6a70dcd5facdfd46b9 | 2,560 | py | Python | process.py | PAULUAPAUL/MasterThesis_AssociationRulesBiodiversity | 0855abc5ec4835a28be4aa305e5e45e73297b389 | [
"MIT"
] | null | null | null | process.py | PAULUAPAUL/MasterThesis_AssociationRulesBiodiversity | 0855abc5ec4835a28be4aa305e5e45e73297b389 | [
"MIT"
] | null | null | null | process.py | PAULUAPAUL/MasterThesis_AssociationRulesBiodiversity | 0855abc5ec4835a28be4aa305e5e45e73297b389 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
from preprocess import *
import time
import sys
def ProcessData (minSup = 0.3,minConf = 0.5,minInt = 0.1,write_csv= True):
print('Minimum Support: ', minSup)
print('Minimum Confidence: ', minConf)
print('Minimum Interest: ', minInt)
print("FP-Growth"... | 44.137931 | 185 | 0.687109 |
f08393ef0817bef46002709c8ee770010800d787 | 66 | py | Python | python/11_built-ins/2_input().py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | null | null | null | python/11_built-ins/2_input().py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | null | null | null | python/11_built-ins/2_input().py | jaimiles23/hacker_rank | 0580eac82e5d0989afabb5c2e66faf09713f891b | [
"Apache-2.0"
] | 3 | 2021-09-22T11:06:58.000Z | 2022-01-25T09:29:24.000Z | Solution to [Input()](https://www.hackerrank.com/challenges/input) | 66 | 66 | 0.772727 |
3b857406627357515a3ff877809f987017228228 | 18 | py | Python | hhh.py | zhuoya123/Python | 64d3ffd39b197dbc35ba025b1b5709fbf6939ef2 | [
"Apache-2.0"
] | null | null | null | hhh.py | zhuoya123/Python | 64d3ffd39b197dbc35ba025b1b5709fbf6939ef2 | [
"Apache-2.0"
] | null | null | null | hhh.py | zhuoya123/Python | 64d3ffd39b197dbc35ba025b1b5709fbf6939ef2 | [
"Apache-2.0"
] | null | null | null | print ('hello Gi') | 18 | 18 | 0.666667 |
f387e7690b349e8e1b07ec21afd965b3c1178260 | 1,749 | py | Python | task_interface.py | kwoodham/sublime | ed3dcd7b0a22938d1d7de2d55db3cc2960ed117f | [
"CC-BY-4.0"
] | 1 | 2015-08-04T11:43:34.000Z | 2015-08-04T11:43:34.000Z | task_interface.py | kwoodham/sublime | ed3dcd7b0a22938d1d7de2d55db3cc2960ed117f | [
"CC-BY-4.0"
] | null | null | null | task_interface.py | kwoodham/sublime | ed3dcd7b0a22938d1d7de2d55db3cc2960ed117f | [
"CC-BY-4.0"
] | null | null | null | import sublime_plugin
import sublime
# 20171211 - read in states via settings file - also use settings to define which states
# are considered to be active - so that only those states are displayed for "All Active"
# 20171106 - added in capability to choose all (including done) and all-active (not done).
# See corre... | 38.866667 | 97 | 0.638651 |
2d64d44c841b9011b233eb180eb8fc3dc202bf6e | 25,180 | py | Python | ocs_ci/ocs/resources/storage_cluster.py | deepshikhaaa/ocs-ci | 5477ee85c395e808589ba45e3db34d4efe54fc97 | [
"MIT"
] | null | null | null | ocs_ci/ocs/resources/storage_cluster.py | deepshikhaaa/ocs-ci | 5477ee85c395e808589ba45e3db34d4efe54fc97 | [
"MIT"
] | null | null | null | ocs_ci/ocs/resources/storage_cluster.py | deepshikhaaa/ocs-ci | 5477ee85c395e808589ba45e3db34d4efe54fc97 | [
"MIT"
] | null | null | null | """
StorageCluster related functionalities
"""
import re
import logging
import tempfile
from jsonschema import validate
from ocs_ci.framework import config
from ocs_ci.ocs import constants, defaults, ocp
from ocs_ci.ocs.exceptions import ResourceNotFoundError, UnsupportedFeatureError
from ocs_ci.ocs.ocp import get_im... | 38.151515 | 102 | 0.647855 |
316409bcca978335e1f22705d2342e5f34efb493 | 15,200 | py | Python | pylsp_rope/plugin.py | python-rope/pylsp-rope | 431415560779881b57048dc563802705f7556bca | [
"MIT"
] | 16 | 2021-10-03T07:18:20.000Z | 2022-03-28T00:11:53.000Z | pylsp_rope/plugin.py | python-rope/pylsp-rope | 431415560779881b57048dc563802705f7556bca | [
"MIT"
] | 7 | 2021-10-03T06:37:42.000Z | 2021-11-02T17:13:27.000Z | pylsp_rope/plugin.py | python-rope/pylsp-rope | 431415560779881b57048dc563802705f7556bca | [
"MIT"
] | null | null | null | import ast
import logging
from typing import List
from pylsp import hookimpl
from pylsp.lsp import MessageType
from rope.refactor import (
extract,
inline,
method_object,
usefunction,
localtofield,
importutils,
introduce_parameter,
)
from pylsp_rope import typing, commands
from pylsp_rope.... | 30.831643 | 96 | 0.605329 |
c648a2a434cbf85b73bf9caa38aa515a7eb985c0 | 6,509 | py | Python | test/test_template_rbac.py | 1995chen/python-common-libs | dcf36376ae244426fb8da5b76b96fe8e0c3911af | [
"MIT"
] | null | null | null | test/test_template_rbac.py | 1995chen/python-common-libs | dcf36376ae244426fb8da5b76b96fe8e0c3911af | [
"MIT"
] | null | null | null | test/test_template_rbac.py | 1995chen/python-common-libs | dcf36376ae244426fb8da5b76b96fe8e0c3911af | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
import os
import unittest
import inject
import template_logging
from template_rbac import OAuth2SSO
from flask import Flask, make_response
# 创建日志目录
os.makedirs('./logs/', exist_ok=True)
template_logging.init_logger()
logger = template_logging.getLogger(__name__)
class TestTemplateRbacMetho... | 47.860294 | 118 | 0.727762 |
175e04698f1d310ba1e2e71266c45c0f85f270cc | 1,637 | py | Python | SWE573/pulse/helpers/sentiment_helper.py | umutseven92/SWE573 | 04aaf665fb2bbc54de632bbea9aa0fc93685fe67 | [
"MIT"
] | null | null | null | SWE573/pulse/helpers/sentiment_helper.py | umutseven92/SWE573 | 04aaf665fb2bbc54de632bbea9aa0fc93685fe67 | [
"MIT"
] | 21 | 2018-02-12T18:56:14.000Z | 2018-04-22T14:59:39.000Z | SWE573/pulse/helpers/sentiment_helper.py | umutseven92/Sentweet | 04aaf665fb2bbc54de632bbea9aa0fc93685fe67 | [
"MIT"
] | 2 | 2018-03-25T15:20:52.000Z | 2018-06-01T14:17:51.000Z | from nltk.sentiment.vader import SentimentIntensityAnalyzer
def get_sentiment_scores(body):
sid = SentimentIntensityAnalyzer()
ss = sid.polarity_scores(body)
return ss
def get_sentiment_info(tweets):
daily_positive, daily_negative, daily_neutral, daily_compound = 0, 0, 0, 0
neg_tweet_count, pos... | 29.763636 | 119 | 0.643861 |
8a740cfbc64f320a41cc67d9beb28eb5bcde7a39 | 6,062 | py | Python | dashboard/dashboard/auto_bisect.py | PLSV/catapult | 88e5b1f40c89c4b80d3dd56a722936d07f222a55 | [
"BSD-3-Clause"
] | null | null | null | dashboard/dashboard/auto_bisect.py | PLSV/catapult | 88e5b1f40c89c4b80d3dd56a722936d07f222a55 | [
"BSD-3-Clause"
] | null | null | null | dashboard/dashboard/auto_bisect.py | PLSV/catapult | 88e5b1f40c89c4b80d3dd56a722936d07f222a55 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""URL endpoint for a cron job to automatically run bisects."""
from __future__ import print_function
from __future__ import division
from __future__ import ... | 32.417112 | 80 | 0.743979 |
2270d1e7ac5e5f60c4218227b768c90026398ceb | 6,904 | py | Python | submodular_optimization/algorithms/scaled_single_threshold_greedy.py | smnikolakaki/submodular-linear-cost-maximization | 98be3e79c11e4a36c253ed9a4800e6976b4aa3bf | [
"MIT"
] | null | null | null | submodular_optimization/algorithms/scaled_single_threshold_greedy.py | smnikolakaki/submodular-linear-cost-maximization | 98be3e79c11e4a36c253ed9a4800e6976b4aa3bf | [
"MIT"
] | null | null | null | submodular_optimization/algorithms/scaled_single_threshold_greedy.py | smnikolakaki/submodular-linear-cost-maximization | 98be3e79c11e4a36c253ed9a4800e6976b4aa3bf | [
"MIT"
] | null | null | null | """
This class implements the scaled single-threshold Greedy algorithm
1/2(3 - sqrt(5)) approximation
"""
import logging
import numpy as np
import collections
import operator
import sys
class ScaledSingleThresholdGreedy(object):
"""
Scaled single-threshold Greedy algorithm implementation
"""
def __init... | 32.413146 | 102 | 0.566338 |
4089b6d5816eaebb48b531389c15005db4d9c707 | 405 | py | Python | __init__.py | YorkSu/deepgo | 2f22ad50d2958a4f1c7dfc0af6fcd448f5e7e18d | [
"Apache-2.0"
] | null | null | null | __init__.py | YorkSu/deepgo | 2f22ad50d2958a4f1c7dfc0af6fcd448f5e7e18d | [
"Apache-2.0"
] | null | null | null | __init__.py | YorkSu/deepgo | 2f22ad50d2958a4f1c7dfc0af6fcd448f5e7e18d | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""Deep Go
======
An framework for Deep Learning
Version:
Aiur 0.1.0
Author:
York Su
"""
__author__ = "York Su"
__version__ = "0.1.0"
__codename__ = "Aiur"
__release_date__ = "2020-08-16"
import os as _os
import sys as _sys
this_dir = _os.path.dirname(_os.path.abspath(... | 14.464286 | 55 | 0.654321 |
300360d08510daa4752fa2ca27ace2295469c7c2 | 5,843 | py | Python | pytorch_lightning/strategies/dp.py | HabanaAI/pytorch-lightning | 07b4452b71dc7397fefb35477f922eff096752ad | [
"Apache-2.0"
] | 15,666 | 2020-01-14T07:16:15.000Z | 2022-03-31T23:22:26.000Z | pytorch_lightning/strategies/dp.py | HabanaAI/pytorch-lightning | 07b4452b71dc7397fefb35477f922eff096752ad | [
"Apache-2.0"
] | 9,140 | 2020-01-14T03:10:42.000Z | 2022-03-31T19:57:09.000Z | pytorch_lightning/strategies/dp.py | HabanaAI/pytorch-lightning | 07b4452b71dc7397fefb35477f922eff096752ad | [
"Apache-2.0"
] | 2,340 | 2020-01-14T06:45:32.000Z | 2022-03-31T22:57:07.000Z | # Copyright The PyTorch Lightning team.
#
# 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 i... | 36.291925 | 113 | 0.683553 |
eb8f924fbfc6afd66b0d7f71527fd6bd71626165 | 8,780 | py | Python | ext/raith21/functionsim.py | edgerun/faas-sim | fe35e70bc0500bc8b7d94e65b9faf478011edebf | [
"MIT"
] | 19 | 2021-03-07T06:24:40.000Z | 2022-03-25T11:43:08.000Z | ext/raith21/functionsim.py | edgerun/faas-sim | fe35e70bc0500bc8b7d94e65b9faf478011edebf | [
"MIT"
] | 8 | 2020-11-13T13:21:05.000Z | 2021-05-28T19:45:35.000Z | ext/raith21/functionsim.py | edgerun/faas-sim | fe35e70bc0500bc8b7d94e65b9faf478011edebf | [
"MIT"
] | 6 | 2020-09-03T08:58:11.000Z | 2022-03-13T00:36:29.000Z | import logging
from typing import Callable, Optional, Dict
from simpy import Resource
from sim.core import Environment
from sim.docker import pull as docker_pull
from sim.faas import FunctionSimulator, FunctionRequest, FunctionReplica, SimulatorFactory, simulate_data_download, \
simulate_data_upload, FunctionChar... | 41.611374 | 117 | 0.661845 |
e2b1d5196d38654ddbd2a0aee053068505b359f7 | 2,694 | py | Python | video_behavior_tracking/track_behavior.py | droumis/video_behavior_tracking | 98b031a4a8dda1c0112f823b661ebad2feeaa43e | [
"MIT"
] | 1 | 2018-10-01T23:33:44.000Z | 2018-10-01T23:33:44.000Z | video_behavior_tracking/track_behavior.py | droumis/video_behavior_tracking | 98b031a4a8dda1c0112f823b661ebad2feeaa43e | [
"MIT"
] | 1 | 2020-01-07T01:55:30.000Z | 2020-01-07T01:55:30.000Z | video_behavior_tracking/track_behavior.py | droumis/video_behavior_tracking | 98b031a4a8dda1c0112f823b661ebad2feeaa43e | [
"MIT"
] | 2 | 2018-11-15T00:14:35.000Z | 2020-11-16T07:50:09.000Z | import glob
import json
from argparse import ArgumentParser
from logging import getLogger
from video_behavior_tracking import (convert_to_loren_frank_data_format,
detect_LEDs, extract_position_data,
make_video, position_dataframe,
... | 44.9 | 75 | 0.629176 |
9c0ec0508501394467f3f067338f5029b07116ab | 11,688 | py | Python | train.py | FrankCAN/GAPointNet | 9fb9fd4577950b29f996baa5135927e13df45408 | [
"MIT"
] | 29 | 2019-10-27T07:23:58.000Z | 2022-03-12T02:31:32.000Z | train.py | jtpils/ShufflePointNet | 30cb1ab1e43ef042b8fbe3d9b6f82312320dd967 | [
"MIT"
] | 8 | 2019-10-28T07:02:09.000Z | 2021-04-06T04:06:33.000Z | train.py | jtpils/ShufflePointNet | 30cb1ab1e43ef042b8fbe3d9b6f82312320dd967 | [
"MIT"
] | 4 | 2019-11-12T15:28:58.000Z | 2021-03-17T10:42:12.000Z | import argparse
import math
import h5py
import numpy as np
import tensorflow as tf
import socket
import importlib
import os
import sys
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
sys.path.append(BASE_DIR)
sys.path.append(os.path.join(BASE_DIR, 'models'))
sys.path.append(os.path.join(BASE_DIR, 'utils'))
import... | 42.043165 | 125 | 0.629363 |
e3bd827aed69bcbde357b51a8c78960d12ef4ce8 | 1,059 | py | Python | facedetectr.py | vijanipiyawardana/kidsplaymate | 5821eb0c6c63661de80a0348aba17d99e5b992f5 | [
"MIT"
] | null | null | null | facedetectr.py | vijanipiyawardana/kidsplaymate | 5821eb0c6c63661de80a0348aba17d99e5b992f5 | [
"MIT"
] | null | null | null | facedetectr.py | vijanipiyawardana/kidsplaymate | 5821eb0c6c63661de80a0348aba17d99e5b992f5 | [
"MIT"
] | null | null | null | import cv2
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_alt2.xml')
# Defining a function that will do the detections
def detect(gray, frame):
gray1 = None
faces = face_cascade.detectMultiScale(gray, 1.3, 5)
for (x, y, w, h) in faces:
cv2.rectangle(frame, (x, y), (x+w, y+h), (255, ... | 27.868421 | 86 | 0.621341 |
8666c531d61415e8488993d4b92ddd3aa1a73dde | 435 | py | Python | py/guess-number-higher-or-lower-ii.py | ckclark/leetcode | 844c6f18d06dcb397db76436e5f4b8ddcb1beddc | [
"Apache-2.0"
] | null | null | null | py/guess-number-higher-or-lower-ii.py | ckclark/leetcode | 844c6f18d06dcb397db76436e5f4b8ddcb1beddc | [
"Apache-2.0"
] | null | null | null | py/guess-number-higher-or-lower-ii.py | ckclark/leetcode | 844c6f18d06dcb397db76436e5f4b8ddcb1beddc | [
"Apache-2.0"
] | null | null | null | class Solution(object):
def getMoneyAmount(self, n, table=dict()):
"""
:type n: int
:rtype: int
"""
def dp(L, U):
if (L, U) not in table:
if L + 1 >= U:
table[L, U] = 0
else:
table[L, U] = min... | 29 | 92 | 0.37931 |
181e90a23883297619da8c5bf92fa5f3988bd2e7 | 6,355 | py | Python | utils/data_generator.py | SaverioVad/HAD_Net | 67b2dfb6bae5b971c86b42d747975684d96e36b1 | [
"Net-SNMP",
"Xnet"
] | 13 | 2021-04-01T10:42:21.000Z | 2022-03-17T07:47:29.000Z | utils/data_generator.py | SaverioVad/HAD_Net | 67b2dfb6bae5b971c86b42d747975684d96e36b1 | [
"Net-SNMP",
"Xnet"
] | 2 | 2021-07-08T00:49:50.000Z | 2021-11-26T00:02:17.000Z | utils/data_generator.py | SaverioVad/HAD_Net | 67b2dfb6bae5b971c86b42d747975684d96e36b1 | [
"Net-SNMP",
"Xnet"
] | 1 | 2021-09-08T13:32:38.000Z | 2021-09-08T13:32:38.000Z | from torch.utils.data import Dataset, DataLoader
import torch
import os
import numpy as np
# Data generator class
class data_generator(Dataset):
def __init__(self, list_ids, root_path, semantics):
# Store important information.
self.list_ids = list_ids
self.root_path = root_path
... | 41.266234 | 130 | 0.521951 |
d9d3c7ddb7f04067a59f2832d3be81864f43b6e7 | 1,790 | py | Python | awesome-python/projects/python-auto-login/core.py | fadhilsaheer/projects | 976e4c175bd81563ec82b8445e9735c82146641c | [
"MIT"
] | 3 | 2021-02-08T09:45:54.000Z | 2021-09-30T13:33:50.000Z | awesome-python/projects/python-auto-login/core.py | fadhilsaheer/projects | 976e4c175bd81563ec82b8445e9735c82146641c | [
"MIT"
] | null | null | null | awesome-python/projects/python-auto-login/core.py | fadhilsaheer/projects | 976e4c175bd81563ec82b8445e9735c82146641c | [
"MIT"
] | 1 | 2021-05-15T09:25:52.000Z | 2021-05-15T09:25:52.000Z |
#importing module
import pyfiglet
#home page
def home_page():
home = pyfiglet.figlet_format("AUTOMATE")
print(home)
#option page
def option_page():
print("")
print("Gmail Login : a \n")
print("Facebook Login : b\n")
print("Instagram Login : c\n")
print("Twitter Login : d \n")
print("... | 20.340909 | 49 | 0.585475 |
05bfb490cb8a38d8a0b57e33371036d872227ada | 14,641 | py | Python | homeassistant/components/google/__init__.py | sebr/home-assistant | 88ed2f3b3ed5a52ad5c94e170d981520940e977e | [
"Apache-2.0"
] | null | null | null | homeassistant/components/google/__init__.py | sebr/home-assistant | 88ed2f3b3ed5a52ad5c94e170d981520940e977e | [
"Apache-2.0"
] | 5 | 2022-03-01T06:32:33.000Z | 2022-03-31T07:06:35.000Z | homeassistant/components/google/__init__.py | sebr/home-assistant | 88ed2f3b3ed5a52ad5c94e170d981520940e977e | [
"Apache-2.0"
] | null | null | null | """Support for Google - Calendar Event Devices."""
from datetime import datetime, timedelta, timezone
from enum import Enum
import logging
import os
from googleapiclient import discovery as google_discovery
import httplib2
from oauth2client.client import (
FlowExchangeError,
OAuth2DeviceCodeError,
OAuth2We... | 32.753915 | 127 | 0.64777 |
9992fa1e7570a42484e4ceaad027811944f110bf | 1,856 | py | Python | eth/vm/forks/berlin/computation.py | Peppece/py-evm | db9ae3c1aa617e28525344db159db2a312a03033 | [
"MIT"
] | null | null | null | eth/vm/forks/berlin/computation.py | Peppece/py-evm | db9ae3c1aa617e28525344db159db2a312a03033 | [
"MIT"
] | null | null | null | eth/vm/forks/berlin/computation.py | Peppece/py-evm | db9ae3c1aa617e28525344db159db2a312a03033 | [
"MIT"
] | null | null | null | import math
from eth_utils.toolz import (
merge,
)
from eth.precompiles.modexp import (
compute_adjusted_exponent_length,
extract_lengths,
modexp,
)
from eth._utils.address import (
force_bytes_to_address,
)
from eth._utils.padding import (
zpad_right,
)
from eth.vm.forks.berlin import consta... | 26.898551 | 97 | 0.757004 |
a881c6404aa021f00ec38597cc814c4787412315 | 294 | py | Python | easy/693.py | oneTaken/leetcode | f9357d839ac8fa6333b0d7eeb2028ba28a63764c | [
"Apache-2.0"
] | null | null | null | easy/693.py | oneTaken/leetcode | f9357d839ac8fa6333b0d7eeb2028ba28a63764c | [
"Apache-2.0"
] | null | null | null | easy/693.py | oneTaken/leetcode | f9357d839ac8fa6333b0d7eeb2028ba28a63764c | [
"Apache-2.0"
] | null | null | null | class Solution:
def hasAlternatingBits(self, n):
"""
:type n: int
:rtype: bool
"""
num = bin(n)[2:]
start = '10'
if len(num) % 2 == 1:
start = '01'
num = '0' + num
return start * (len(num) // 2) == num | 22.615385 | 45 | 0.394558 |
ca07175b8d5f683d30ea2ad530077ffc50fa9649 | 1,118 | py | Python | danceschool/financial/migrations/0013_auto_20181219_2044.py | benjwrdill/django-danceschool | 9ecb2754502e62d0f49aa23d08ca6de6cae3c99a | [
"BSD-3-Clause"
] | 32 | 2017-09-12T04:25:25.000Z | 2022-03-21T10:48:07.000Z | danceschool/financial/migrations/0013_auto_20181219_2044.py | benjwrdill/django-danceschool | 9ecb2754502e62d0f49aa23d08ca6de6cae3c99a | [
"BSD-3-Clause"
] | 97 | 2017-09-01T02:43:08.000Z | 2022-01-03T18:20:34.000Z | danceschool/financial/migrations/0013_auto_20181219_2044.py | benjwrdill/django-danceschool | 9ecb2754502e62d0f49aa23d08ca6de6cae3c99a | [
"BSD-3-Clause"
] | 19 | 2017-09-26T13:34:46.000Z | 2022-03-21T10:48:10.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-12-20 01:44
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('financial', '0012_auto_20181216_1615'),
]
operations = [
migrations.RemoveField(
... | 25.409091 | 49 | 0.563506 |
6f9420d6cf4273b8e0fd7374782585bc16e694d9 | 924 | py | Python | networks/base.py | Jarvis73/DeepCNN | e52723e8d607c8cbf49080ea040bf7c3718c6326 | [
"MIT"
] | 2 | 2019-08-21T03:03:07.000Z | 2019-08-30T02:50:09.000Z | networks/base.py | Jarvis73/DeepCNN | e52723e8d607c8cbf49080ea040bf7c3718c6326 | [
"MIT"
] | null | null | null | networks/base.py | Jarvis73/DeepCNN | e52723e8d607c8cbf49080ea040bf7c3718c6326 | [
"MIT"
] | 1 | 2019-08-30T03:53:53.000Z | 2019-08-30T03:53:53.000Z | # Copyright 2019 Jianwei Zhang All Right Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 34.222222 | 83 | 0.646104 |
994e89e4a4da3efc5679e141a7294aa95d156b02 | 1,026 | py | Python | backend/app/router/auth.py | kentayamada-dev/mercari-clone | 37cfa97876ebd4a003c4ca339cb4cdc5e012d502 | [
"MIT"
] | 6 | 2022-01-21T06:17:05.000Z | 2022-03-27T05:45:23.000Z | backend/app/router/auth.py | kentayamada-dev/mercari-clone | 37cfa97876ebd4a003c4ca339cb4cdc5e012d502 | [
"MIT"
] | null | null | null | backend/app/router/auth.py | kentayamada-dev/mercari-clone | 37cfa97876ebd4a003c4ca339cb4cdc5e012d502 | [
"MIT"
] | 1 | 2022-03-27T05:45:31.000Z | 2022-03-27T05:45:31.000Z | from app.core.schema.jwt import Secret
from app.core.schema.message import Message
from app.core.utils.auth import auth
from app.crud.seller import authenticate_seller
from app.db.database import get_db
from fastapi import APIRouter, Depends, HTTPException, status
from fastapi.security import OAuth2PasswordRequestForm
... | 33.096774 | 74 | 0.727096 |
adc7e813298c8320c34e8b3a2461bab897f6c38f | 602 | py | Python | questions/q317_non_repeating_numbers/code.py | aadhityasw/Competitive-Programs | 901a48d35f024a3a87c32a45b7f4531e8004a203 | [
"MIT"
] | null | null | null | questions/q317_non_repeating_numbers/code.py | aadhityasw/Competitive-Programs | 901a48d35f024a3a87c32a45b7f4531e8004a203 | [
"MIT"
] | 1 | 2021-05-15T07:56:51.000Z | 2021-05-15T07:56:51.000Z | questions/q317_non_repeating_numbers/code.py | aadhityasw/Competitive-Programs | 901a48d35f024a3a87c32a45b7f4531e8004a203 | [
"MIT"
] | null | null | null | class Solution:
def singleNumber(self, nums):
xor = 0
for n in nums :
xor = xor ^ n
first = 0
second = 0
# Find the two's complement of the overall xor
val = xor & (- xor)
for n in nums :
if n & val :
first = first ^ n
else :
second = second ^ n
ans = [first, second]
ans.sort()... | 18.242424 | 48 | 0.513289 |
0e780ea8a125a31824e00c422a3e6c5c9b4a20ab | 891 | py | Python | h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2oimport_sql_table.py | My-Technical-Architect/h2o-3 | d383802fb7f9c3ec9c72b7869fe636059a333d88 | [
"Apache-2.0"
] | 1 | 2017-03-28T09:10:12.000Z | 2017-03-28T09:10:12.000Z | h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2oimport_sql_table.py | My-Technical-Architect/h2o-3 | d383802fb7f9c3ec9c72b7869fe636059a333d88 | [
"Apache-2.0"
] | null | null | null | h2o-py/tests/testdir_apis/H2O_Module/pyunit_h2oimport_sql_table.py | My-Technical-Architect/h2o-3 | d383802fb7f9c3ec9c72b7869fe636059a333d88 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import sys, os
sys.path.insert(1,"../../../")
from tests import pyunit_utils
import h2o
import inspect
def h2oimport_sql_table():
"""
Python API test: h2o.import_sql_table(connection_url, table, username, password, columns=None, optimize=True)
Not a real test, just mak... | 34.269231 | 115 | 0.712682 |
a65bec2e39e006d2df3ecaac41a96a8bba78a253 | 9,775 | py | Python | diplomacy_research/proto/tensorflow_serving/apis/classification_pb2.py | wwongkamjan/dipnet_press | 787263c1b9484698904f525c8d78d0e333e1c0d9 | [
"MIT"
] | 39 | 2019-09-06T13:42:24.000Z | 2022-03-18T18:38:43.000Z | diplomacy_research/proto/tensorflow_serving/apis/classification_pb2.py | wwongkamjan/dipnet_press | 787263c1b9484698904f525c8d78d0e333e1c0d9 | [
"MIT"
] | 9 | 2019-09-19T22:35:32.000Z | 2022-02-24T18:04:57.000Z | diplomacy_research/proto/tensorflow_serving/apis/classification_pb2.py | wwongkamjan/dipnet_press | 787263c1b9484698904f525c8d78d0e333e1c0d9 | [
"MIT"
] | 8 | 2019-10-16T21:09:14.000Z | 2022-02-23T05:20:37.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: tensorflow_serving/apis/classification.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.proto... | 38.035019 | 887 | 0.778312 |
6afcb7e7336e38c7a77be68995f715883c901e56 | 13,533 | py | Python | boardfarm/lib/bft_logging.py | nickberry17/boardfarm | 80f24fc97eff9a987250a6334b76eff08e001189 | [
"BSD-3-Clause-Clear"
] | 17 | 2018-04-19T08:35:47.000Z | 2021-11-01T01:38:33.000Z | boardfarm/lib/bft_logging.py | nickberry17/boardfarm | 80f24fc97eff9a987250a6334b76eff08e001189 | [
"BSD-3-Clause-Clear"
] | 190 | 2018-04-19T07:00:18.000Z | 2022-02-11T01:42:51.000Z | boardfarm/lib/bft_logging.py | nickberry17/boardfarm | 80f24fc97eff9a987250a6334b76eff08e001189 | [
"BSD-3-Clause-Clear"
] | 30 | 2018-04-12T01:49:21.000Z | 2022-02-11T14:53:19.000Z | """Global functions related to logging messages."""
# Copyright (c) 2015
#
# All rights reserved.
#
# This file is distributed under the Clear BSD license.
# The full text can be found in LICENSE in the root directory.
import inspect
import logging
import os
import re
import sys
import time
import types
from functools... | 35.613158 | 111 | 0.532624 |
73b0bd3cfaf7edd518616d936627b95c93b563bb | 1,551 | py | Python | data_prep/01_billtags/tag_extraction.py | LegibleLegislation/CongressChallenge | 43ce79cbbba42208f7062eb95435444de750214d | [
"CC0-1.0"
] | null | null | null | data_prep/01_billtags/tag_extraction.py | LegibleLegislation/CongressChallenge | 43ce79cbbba42208f7062eb95435444de750214d | [
"CC0-1.0"
] | null | null | null | data_prep/01_billtags/tag_extraction.py | LegibleLegislation/CongressChallenge | 43ce79cbbba42208f7062eb95435444de750214d | [
"CC0-1.0"
] | null | null | null |
import json
import sqlalchemy
import requests
import os
# Connect to local PostgreSQL
user = 'ubuntu'
password = ''
dbname = 'congress'
host = 'localhost'
local_port = '5432'
es = "postgresql+psycopg2://"+user+":"+password+"@/"+dbname+"?host="+host+"&port="+local_port
engine = sqlalchemy.create_engine(es)
print(engi... | 25.42623 | 122 | 0.568665 |
9af869489c8c736c52ee5f961357df47b20078d7 | 839 | py | Python | core/security_interface.py | alpha19/StockAnalysis | 011b8392c1623c61233db6d08a2ff72010c51bb9 | [
"MIT"
] | 2 | 2020-05-11T02:04:02.000Z | 2020-05-11T02:04:08.000Z | core/security_interface.py | Spich9215/StockAnalysis | 5679415cd4bc306b7ef7d06c3cccd18842a29f09 | [
"MIT"
] | 9 | 2019-06-01T23:29:08.000Z | 2021-12-13T20:49:46.000Z | core/security_interface.py | Spich9215/StockAnalysis | 5679415cd4bc306b7ef7d06c3cccd18842a29f09 | [
"MIT"
] | 1 | 2019-12-26T18:53:57.000Z | 2019-12-26T18:53:57.000Z | from abc import ABCMeta, abstractmethod
import time
__author__ = 'kdedow'
class SecurityInterface(object):
"""
Interface for different types of securities
"""
__metaclass__ = ABCMeta
@abstractmethod
def __init__(self, secTarget=""):
"""
:param secTarget:
:return:
... | 19.511628 | 71 | 0.567342 |
58c52a655be763974cfdfe23b0b277212b677cda | 372 | py | Python | den/helpers/color.py | MonliH/Den | 9c2e69744dcf26ae01154eac32aa4ea8ff2adee3 | [
"MIT"
] | null | null | null | den/helpers/color.py | MonliH/Den | 9c2e69744dcf26ae01154eac32aa4ea8ff2adee3 | [
"MIT"
] | null | null | null | den/helpers/color.py | MonliH/Den | 9c2e69744dcf26ae01154eac32aa4ea8ff2adee3 | [
"MIT"
] | null | null | null | def init_color():
import os, sys
if sys.platform.lower() == "win32":
os.system("color")
class Color:
BLACK = "\033[30m"
BOLD = "\033[1m"
RED = "\033[31m"
GREEN = "\033[32m"
YELLOW = "\033[33m"
BLUE = "\033[34m"
MAGENTA = "\033[35m"
CYAN = "\033[36m"
WHITE = "\033[3... | 18.6 | 39 | 0.510753 |
454eef314ede3e47c98335fb76e79d440918f047 | 8,619 | py | Python | src/python/pants/backend/project_info/tasks/idea_plugin_gen.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | src/python/pants/backend/project_info/tasks/idea_plugin_gen.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | 1 | 2018-09-04T17:37:34.000Z | 2018-09-04T19:42:58.000Z | src/python/pants/backend/project_info/tasks/idea_plugin_gen.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import json
import logging
import os
import pkgutil
import re
import shutil
import subprocess
from pants.backend.jvm.targets.jvm_target import JvmTarget
from pants.backend.python.targets.... | 43.751269 | 153 | 0.69138 |
6033e4992f526791f441fc59f0ec335f4e4343e2 | 2,485 | py | Python | tests/configs/realview64-switcheroo-full.py | mandaltj/gem5_chips | b9c0c602241ffda7851c1afb32fa01f295bb98fd | [
"BSD-3-Clause"
] | 30 | 2019-07-12T02:35:33.000Z | 2022-02-22T03:34:35.000Z | tests/configs/realview64-switcheroo-full.py | mandaltj/gem5_chips | b9c0c602241ffda7851c1afb32fa01f295bb98fd | [
"BSD-3-Clause"
] | 8 | 2020-02-05T17:47:10.000Z | 2021-09-06T03:58:56.000Z | tests/configs/realview64-switcheroo-full.py | mandaltj/gem5_chips | b9c0c602241ffda7851c1afb32fa01f295bb98fd | [
"BSD-3-Clause"
] | 25 | 2017-12-02T00:46:04.000Z | 2022-02-18T19:28:53.000Z | # Copyright (c) 2012 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functionality ... | 48.72549 | 72 | 0.794769 |
dc575b2da59f73be75f86c4d83f82021c85633c4 | 369 | py | Python | Cartwheel/lib/Python26/Lib/site-packages/OpenGL/GL/MESA/pack_invert.py | MontyThibault/centre-of-mass-awareness | 58778f148e65749e1dfc443043e9fc054ca3ff4d | [
"MIT"
] | null | null | null | Cartwheel/lib/Python26/Lib/site-packages/OpenGL/GL/MESA/pack_invert.py | MontyThibault/centre-of-mass-awareness | 58778f148e65749e1dfc443043e9fc054ca3ff4d | [
"MIT"
] | null | null | null | Cartwheel/lib/Python26/Lib/site-packages/OpenGL/GL/MESA/pack_invert.py | MontyThibault/centre-of-mass-awareness | 58778f148e65749e1dfc443043e9fc054ca3ff4d | [
"MIT"
] | null | null | null | '''OpenGL extension MESA.pack_invert
This module customises the behaviour of the
OpenGL.raw.GL.MESA.pack_invert to provide a more
Python-friendly API
'''
from OpenGL import platform, constants, constant, arrays
from OpenGL import extensions, wrapper
from OpenGL.GL import glget
import ctypes
from OpenGL.raw.GL.MESA.p... | 30.75 | 56 | 0.807588 |
120317bb5bebfa3d7a949e8e8b445d3db4e63bf1 | 6,936 | py | Python | autotest/osr/osr_metacrs.py | Esri/gdal | 8d9af5086ddb96f707ed281786a1cd278066a7f2 | [
"MIT"
] | 9 | 2019-05-30T17:01:56.000Z | 2021-01-30T01:06:41.000Z | autotest/osr/osr_metacrs.py | Esri/gdal | 8d9af5086ddb96f707ed281786a1cd278066a7f2 | [
"MIT"
] | 4 | 2018-10-23T18:43:35.000Z | 2019-07-01T19:29:49.000Z | autotest/osr/osr_metacrs.py | Esri/gdal | 8d9af5086ddb96f707ed281786a1cd278066a7f2 | [
"MIT"
] | 6 | 2019-02-03T14:19:32.000Z | 2021-12-19T06:36:49.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# $Id$
#
# Project: GDAL/OGR Test Suite
# Purpose: Test with MetaCRS TestSuite
# Author: Frank Warmerdam, warmerdam@pobox.com
#
##############################################################... | 37.901639 | 111 | 0.531574 |
1d446032e39cabfb02a069ce376b6a0a0fe79e4a | 3,776 | py | Python | GSF2App/GSF2App_data.py | rmca16/GSF2App | 171a4a388e1f0e59cc11a709c2774826317a6f62 | [
"MIT"
] | null | null | null | GSF2App/GSF2App_data.py | rmca16/GSF2App | 171a4a388e1f0e59cc11a709c2774826317a6f62 | [
"MIT"
] | null | null | null | GSF2App/GSF2App_data.py | rmca16/GSF2App | 171a4a388e1f0e59cc11a709c2774826317a6f62 | [
"MIT"
] | null | null | null | ###################################################################################
# Author: Ricardo Pereira
# Date: 06-06-2021
# Last Modified data: 10-09-2021
# Abstract: GSF2App: Dataset management file
###################################################################################
import numpy as np
i... | 30.95082 | 92 | 0.626324 |
848a57fc25a23118245585d7ad15faa4c36b3262 | 6,457 | py | Python | controllers/contacts_helper.py | qwc-services/sogis-agdi | f278612c42f648da07448905f2b8021b279e66bc | [
"MIT"
] | null | null | null | controllers/contacts_helper.py | qwc-services/sogis-agdi | f278612c42f648da07448905f2b8021b279e66bc | [
"MIT"
] | null | null | null | controllers/contacts_helper.py | qwc-services/sogis-agdi | f278612c42f648da07448905f2b8021b279e66bc | [
"MIT"
] | null | null | null | from sqlalchemy.orm import joinedload
class ContactsHelper:
"""Helper class for querying contacts"""
ROLE_RESPONSIBLE = "Verantwortlicher"
ROLE_DATA_OWNER = "Datenherr"
ROLE_SUPPLIER = "Lieferant"
def __init__(self, config_models, logger):
"""Constructor
:param ConfigModels conf... | 33.984211 | 80 | 0.599659 |
0491101ed10e2ff22c342edfa26e81e7ca17547b | 1,852 | py | Python | tests/sklearn/test_SklearnTfidfVectorizerConverter.py | yuhonghong66/onnxmltools | a7cab9fe950fece6fcc1a84d1a60f3f99a68c22c | [
"MIT"
] | null | null | null | tests/sklearn/test_SklearnTfidfVectorizerConverter.py | yuhonghong66/onnxmltools | a7cab9fe950fece6fcc1a84d1a60f3f99a68c22c | [
"MIT"
] | null | null | null | tests/sklearn/test_SklearnTfidfVectorizerConverter.py | yuhonghong66/onnxmltools | a7cab9fe950fece6fcc1a84d1a60f3f99a68c22c | [
"MIT"
] | null | null | null | """
Tests scikit-learn's binarizer converter.
"""
import unittest
import numpy
from sklearn.feature_extraction.text import TfidfVectorizer
from onnxmltools import convert_sklearn
from onnxmltools.convert.common.data_types import StringTensorType
from onnxmltools.utils import dump_data_and_model
class TestSklearnTfidf... | 39.404255 | 114 | 0.655508 |
3906ad6156ef40bfe5aa32808ab9c479332bbbf7 | 3,610 | py | Python | cms/forms/utils.py | jinktv/django-cms | d8c689957f0d098a106829e896e0c91d0c1abd86 | [
"BSD-3-Clause"
] | 1 | 2015-09-28T10:07:38.000Z | 2015-09-28T10:07:38.000Z | cms/forms/utils.py | jinktv/django-cms | d8c689957f0d098a106829e896e0c91d0c1abd86 | [
"BSD-3-Clause"
] | 1 | 2021-03-19T15:46:42.000Z | 2021-03-19T15:46:42.000Z | cms/forms/utils.py | jinktv/django-cms | d8c689957f0d098a106829e896e0c91d0c1abd86 | [
"BSD-3-Clause"
] | 1 | 2016-11-07T01:42:14.000Z | 2016-11-07T01:42:14.000Z | # -*- coding: utf-8 -*-
from cms.models import Page
from cms.models.titlemodels import Title
from cms.utils import i18n
from collections import defaultdict
from cms.utils.conf import get_cms_setting
from django.conf import settings
from django.contrib.sites.models import Site
from django.core.cache import cache
from dj... | 36.464646 | 76 | 0.701385 |
b065f3be95cae0c74446d0d180ef9ba1431f24ad | 3,957 | py | Python | keymint_keymake/authorities.py | keymint/keymint_keymake | adc38e07ce5f16d6ba4b36294d7d2e8a361153f0 | [
"Apache-2.0"
] | null | null | null | keymint_keymake/authorities.py | keymint/keymint_keymake | adc38e07ce5f16d6ba4b36294d7d2e8a361153f0 | [
"Apache-2.0"
] | null | null | null | keymint_keymake/authorities.py | keymint/keymint_keymake | adc38e07ce5f16d6ba4b36294d7d2e8a361153f0 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 33.533898 | 92 | 0.718979 |
37ee61417eeab3011f317c865efb982d6b6e214b | 72,020 | py | Python | pandas/tests/computation/test_eval.py | HQDragon/pandas | 8713f2d1237a471a4f42f3fb547887bc022a5b94 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2022-02-02T02:05:28.000Z | 2022-02-02T02:09:37.000Z | pandas/tests/computation/test_eval.py | HQDragon/pandas | 8713f2d1237a471a4f42f3fb547887bc022a5b94 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 2 | 2021-02-16T06:43:48.000Z | 2021-03-19T00:07:02.000Z | pandas/tests/computation/test_eval.py | HQDragon/pandas | 8713f2d1237a471a4f42f3fb547887bc022a5b94 | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause-No-Nuclear-License-2014",
"MIT",
"MIT-0",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2020-10-28T03:32:40.000Z | 2020-10-28T03:32:40.000Z | from distutils.version import LooseVersion
from functools import reduce
from itertools import product
import operator
from typing import Dict, List, Type
import warnings
import numpy as np
import pytest
from pandas.compat import is_platform_windows, np_version_under1p17
from pandas.errors import PerformanceWarning
im... | 34.978145 | 88 | 0.574285 |
7d3642b524c3a214c44cd18481d0dd5cb11e9ca5 | 23,593 | py | Python | vmtp/sshutils.py | schoksey/vmtp | 5c2a5187c20953fd055cd7e56e72bcc342780153 | [
"Apache-2.0"
] | null | null | null | vmtp/sshutils.py | schoksey/vmtp | 5c2a5187c20953fd055cd7e56e72bcc342780153 | [
"Apache-2.0"
] | null | null | null | vmtp/sshutils.py | schoksey/vmtp | 5c2a5187c20953fd055cd7e56e72bcc342780153 | [
"Apache-2.0"
] | null | null | null | # Copyright 2013: Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 34.442336 | 97 | 0.554698 |
583a186a132ddb239cb45e6b268c36d1d4633f9c | 361 | py | Python | receivers.py | HectorTa1989/MIMO-PHY-security-with-Eavesdropper | 8a0b248f5e1324d1055ead6ed0a4ea38fc2df011 | [
"MIT"
] | 1 | 2021-10-30T23:55:55.000Z | 2021-10-30T23:55:55.000Z | receivers.py | HectorTa1989/MIMO-PHY-security-with-Eavesdropper | 8a0b248f5e1324d1055ead6ed0a4ea38fc2df011 | [
"MIT"
] | 1 | 2021-10-30T15:00:26.000Z | 2021-10-30T15:00:26.000Z | receivers.py | HectorTa1989/MIMO-PHY-security-analysis-with-Eavesdropper | 8a0b248f5e1324d1055ead6ed0a4ea38fc2df011 | [
"MIT"
] | null | null | null | import numpy as np
class Receiver:
def receive(self):
pass
class MMRC(Receiver):
def __init__(self, nr, channel):
self.Channel = channel
self.ChannelMatrix = channel.getChannel()
def receive(self, x):
self.s = np.multiply(x,np.conj(self.ChannelMatrix))
self.ssu... | 22.5625 | 59 | 0.617729 |
9063b110b91abce7864f14e325fd50d0330b515f | 219 | py | Python | flaskio.py | ricklon/audioplayer | 407bc3858676ac638603fe941b946b91480a60b2 | [
"Apache-2.0"
] | null | null | null | flaskio.py | ricklon/audioplayer | 407bc3858676ac638603fe941b946b91480a60b2 | [
"Apache-2.0"
] | null | null | null | flaskio.py | ricklon/audioplayer | 407bc3858676ac638603fe941b946b91480a60b2 | [
"Apache-2.0"
] | null | null | null | from flask import Flask, render_template
from flask_socketio import SocketIO
app = Flask(__name__)
app.config['SECRET_KEY'] = 'secret!'
socketio = SocketIO(app)
if __name__ == '__main__':
socketio.run(app)
| 16.846154 | 40 | 0.726027 |
3236f4093e1953cf7e9ea0dc7b8d31fa75069d99 | 21,138 | py | Python | commands/iam_report.py | andrewkrug/cloudmapper | 79a7d526331ed40c8eac43fb285cee03b3b94fbe | [
"BSD-3-Clause"
] | null | null | null | commands/iam_report.py | andrewkrug/cloudmapper | 79a7d526331ed40c8eac43fb285cee03b3b94fbe | [
"BSD-3-Clause"
] | null | null | null | commands/iam_report.py | andrewkrug/cloudmapper | 79a7d526331ed40c8eac43fb285cee03b3b94fbe | [
"BSD-3-Clause"
] | null | null | null | from __future__ import print_function
import argparse
import json
import datetime
import os.path
from abc import ABCMeta
from six import add_metaclass
from jinja2 import Template
from enum import Enum
from policyuniverse.policy import Policy
from shared.common import parse_arguments, get_regions
from shared.query impo... | 32.027273 | 101 | 0.584587 |
d196ee5724ce9ff0230d58f26569b5b29f807d32 | 430 | py | Python | Components/Component.py | RuoxiQin/Unmanned-Aerial-Vehicle-Tracking | 49a0a32abcce42fc6bf9e71f5b098ec708373153 | [
"Apache-2.0"
] | 13 | 2018-06-16T12:52:18.000Z | 2021-08-14T02:43:24.000Z | Components/Component.py | RuoxiQin/Unmanned-Aerial-Vehicle-Tracking | 49a0a32abcce42fc6bf9e71f5b098ec708373153 | [
"Apache-2.0"
] | null | null | null | Components/Component.py | RuoxiQin/Unmanned-Aerial-Vehicle-Tracking | 49a0a32abcce42fc6bf9e71f5b098ec708373153 | [
"Apache-2.0"
] | 6 | 2019-06-20T21:06:01.000Z | 2021-08-14T02:43:28.000Z | #!/usr/bin/python
#-*-coding:utf-8-*-
class Component(object):
'''This is the component in the game.'''
_name = 'Component'
def __init__(self,position,num,region_size):
self.position = position
self.num = num
self._region_size = region_size
return super(Component, self).__in... | 30.714286 | 79 | 0.637209 |
70bf5d5135bfa9ea0752360374ef61b675b581a3 | 21,619 | py | Python | tests/integration/shell/test_call.py | ContextLogic/salt | f98839c72df2294cdd1670835d10904b12089622 | [
"Apache-2.0"
] | null | null | null | tests/integration/shell/test_call.py | ContextLogic/salt | f98839c72df2294cdd1670835d10904b12089622 | [
"Apache-2.0"
] | null | null | null | tests/integration/shell/test_call.py | ContextLogic/salt | f98839c72df2294cdd1670835d10904b12089622 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
:codeauthor: Pedro Algarvio (pedro@algarvio.me)
tests.integration.shell.call
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'''
# Import python libs
from __future__ import absolute_import
import os
import sys
import re
import shutil
from datetime import datetime
import logging
# Import Salt Te... | 37.209983 | 139 | 0.548915 |
26ae75649b4bb25740b65f3df177015e217bdf68 | 884 | py | Python | venv/lib/python3.6/site-packages/django_otp/plugins/otp_static/lib.py | ostar0816/mc-crypto | 80ad9896aed1dc952f819a404a458ccfad207d8e | [
"MIT"
] | 4 | 2018-10-19T04:36:20.000Z | 2020-02-13T16:14:09.000Z | venv/lib/python3.6/site-packages/django_otp/plugins/otp_static/lib.py | ostar0816/mc-crypto | 80ad9896aed1dc952f819a404a458ccfad207d8e | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/django_otp/plugins/otp_static/lib.py | ostar0816/mc-crypto | 80ad9896aed1dc952f819a404a458ccfad207d8e | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
try:
from django.contrib.auth import get_user_model
except ImportError:
from django.contrib.auth.models import User
get_user_model = lambda: User
from .models import StaticDevice, StaticToken
def add_static_token(username... | 29.466667 | 82 | 0.742081 |
8b679c9f87635974f180b2c84c93dc6d1ead216d | 1,860 | py | Python | src/models/text_pipeline.py | Honeyfy/semi-supervised-text-classification | b3f5b29be9fec4dc19807bc394be7251bbbee18c | [
"BSD-3-Clause"
] | null | null | null | src/models/text_pipeline.py | Honeyfy/semi-supervised-text-classification | b3f5b29be9fec4dc19807bc394be7251bbbee18c | [
"BSD-3-Clause"
] | null | null | null | src/models/text_pipeline.py | Honeyfy/semi-supervised-text-classification | b3f5b29be9fec4dc19807bc394be7251bbbee18c | [
"BSD-3-Clause"
] | null | null | null | import dill
from src.models.processing_functions import proc_name_mapping
class TextPipeline:
def __init__(self,
pipeline,
language_processor=None):
self.language_processor = language_processor
# processing functions to apply for feature creation
self.pip... | 29.52381 | 68 | 0.594086 |
4e7ed4095bddcf178926ce64489d50523aae7ba5 | 114 | py | Python | Codewars/Even_or _Odd - (7 kyu) .py | maxcohen31/A-bored-math-student | 007beb4dabf7b4406f48e9a3a967c29d032eab89 | [
"MIT"
] | null | null | null | Codewars/Even_or _Odd - (7 kyu) .py | maxcohen31/A-bored-math-student | 007beb4dabf7b4406f48e9a3a967c29d032eab89 | [
"MIT"
] | null | null | null | Codewars/Even_or _Odd - (7 kyu) .py | maxcohen31/A-bored-math-student | 007beb4dabf7b4406f48e9a3a967c29d032eab89 | [
"MIT"
] | null | null | null | def even_or_odd(n):
if n % 2 == 0:
return 'Even'
else:
return 'Odd'
print(even_or_odd(7)) | 16.285714 | 21 | 0.526316 |
e65c8ade0cfc8dc4760f9ebc75cb582341c46586 | 2,122 | py | Python | scripts/cross_validate/hd_cnn.py | ysenarath/hate-detection-icsc-2020 | 9bd802209c7df982d63179e53628a89b14915446 | [
"MIT"
] | 2 | 2020-06-25T05:13:22.000Z | 2020-06-25T05:54:10.000Z | scripts/cross_validate/hd_cnn.py | ysenarath/hate-detection-icsc-2020 | 9bd802209c7df982d63179e53628a89b14915446 | [
"MIT"
] | null | null | null | scripts/cross_validate/hd_cnn.py | ysenarath/hate-detection-icsc-2020 | 9bd802209c7df982d63179e53628a89b14915446 | [
"MIT"
] | null | null | null | # CNN CrossValidator
import numpy as np
from nltk import TweetTokenizer
from scripts.utils import scratch_path
from tklearn.datasets import load_fdcl18, load_dwmw17
from tklearn.model_selection import CrossValidator
from tklearn.neural_network import NeuralNetClassifier
from tklearn.neural_network.model import TextCN... | 34.786885 | 100 | 0.666352 |
8ff5ddc49c13e0e16b9bcf18d0c4b7f24aaf6dc8 | 604 | py | Python | app/config/urls.py | MMartynamajchrzak/recipe-restAPI | 54ca39f7e7ff19f8cba902895ce69504a2fcaf99 | [
"MIT"
] | 1 | 2021-12-10T08:43:54.000Z | 2021-12-10T08:43:54.000Z | app/config/urls.py | MMartynamajchrzak/recipe-restAPI | 54ca39f7e7ff19f8cba902895ce69504a2fcaf99 | [
"MIT"
] | null | null | null | app/config/urls.py | MMartynamajchrzak/recipe-restAPI | 54ca39f7e7ff19f8cba902895ce69504a2fcaf99 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.urls import path, include
from drf_spectacular.views import SpectacularAPIView, SpectacularSwaggerView
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
path('admin/', admin.site.urls),
path('api/user/', include('apps.user.u... | 43.142857 | 86 | 0.75 |
dbcb66ff3d94c4eaef6fa48345344bea7c94f3c3 | 4,950 | py | Python | tclambda/function.py | trustcruit/tclambda | 4413944243257d36088805d8e2f97b0d8b56b87d | [
"MIT"
] | null | null | null | tclambda/function.py | trustcruit/tclambda | 4413944243257d36088805d8e2f97b0d8b56b87d | [
"MIT"
] | 613 | 2019-06-05T10:49:01.000Z | 2021-08-03T03:23:18.000Z | tclambda/function.py | trustcruit/tclambda | 4413944243257d36088805d8e2f97b0d8b56b87d | [
"MIT"
] | null | null | null | # https://docs.aws.amazon.com/lambda/latest/dg/python-context-object.html
from __future__ import annotations
import asyncio
import json
import logging
import os
import time
from dataclasses import dataclass
from datetime import datetime
from uuid import uuid4
import boto3
from botocore.exceptions import ClientError
... | 31.935484 | 97 | 0.622626 |
3d441009ff32914387b2b57e4f4a012260b91d70 | 8,338 | py | Python | utils/converters.py | zomatree/yert | bde7fb3db4501da9849bf4a11b611b5090cfca3b | [
"MIT"
] | null | null | null | utils/converters.py | zomatree/yert | bde7fb3db4501da9849bf4a11b611b5090cfca3b | [
"MIT"
] | null | null | null | utils/converters.py | zomatree/yert | bde7fb3db4501da9849bf4a11b611b5090cfca3b | [
"MIT"
] | null | null | null | """
MIT License
Copyright (c) 2020 - µYert
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distr... | 88.702128 | 4,709 | 0.726313 |
541b4a601e160393635d10142dcf2df5d7e90ce3 | 987 | py | Python | scripts/generate_test_ship_file.py | Oasixer/drive-and-survive | 134ca725efed16fdd31df0bb76c520cd15d7b1ed | [
"MIT"
] | 1 | 2019-02-24T23:37:34.000Z | 2019-02-24T23:37:34.000Z | scripts/generate_test_ship_file.py | Oasixer/drive-and-survive | 134ca725efed16fdd31df0bb76c520cd15d7b1ed | [
"MIT"
] | null | null | null | scripts/generate_test_ship_file.py | Oasixer/drive-and-survive | 134ca725efed16fdd31df0bb76c520cd15d7b1ed | [
"MIT"
] | null | null | null | import sys, os
# ok this is a little janky but I couldnt get it to import this shit because its not technically in a package.
# should probably just make this whole game into a package but im too lazy today
# someone remind me to do that <3
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'src'))
from ent... | 35.25 | 110 | 0.716312 |
152d6511712d6c4fa3a23b0ec22780349b575d0a | 40,308 | py | Python | sdk/python/kfp/v2/compiler/pipeline_spec_builder.py | rahulsmehta/pipelines | a0a8f1da8cb7ca53cde7717aa78e666b634fec75 | [
"Apache-2.0"
] | 1 | 2022-01-28T23:27:52.000Z | 2022-01-28T23:27:52.000Z | sdk/python/kfp/v2/compiler/pipeline_spec_builder.py | rahulsmehta/pipelines | a0a8f1da8cb7ca53cde7717aa78e666b634fec75 | [
"Apache-2.0"
] | null | null | null | sdk/python/kfp/v2/compiler/pipeline_spec_builder.py | rahulsmehta/pipelines | a0a8f1da8cb7ca53cde7717aa78e666b634fec75 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 The Kubeflow 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... | 45.597285 | 97 | 0.65838 |
ca52f03b6db804092857015ac60e10e14d83ba92 | 3,559 | py | Python | lib/wx/ogllib.py | tacaswell/pyepics | de865c9cbdfdaf9826165de2b5ba9f45d0939355 | [
"OML"
] | null | null | null | lib/wx/ogllib.py | tacaswell/pyepics | de865c9cbdfdaf9826165de2b5ba9f45d0939355 | [
"OML"
] | null | null | null | lib/wx/ogllib.py | tacaswell/pyepics | de865c9cbdfdaf9826165de2b5ba9f45d0939355 | [
"OML"
] | null | null | null | """
wx OGL (2d graphics library) utility functions for Epics and wxPython
interaction
OGL is a (somewhat old-fashioned) 2D drawing library included with wxPython.
There are probably newer/better drawing libraries, but OGL works quite well
for drawing simple shapes or bitmaps.
"""
import wx.lib.ogl as ogl
from wxlib i... | 31.776786 | 100 | 0.64934 |
1a3137073d8f07d24e2551a07bd100679fdf6451 | 2,103 | py | Python | Eager/github-scraper/python/ghanalysis.py | UCSB-CS-RACELab/eager-appscale | d58fe64bb867ef58af19c1d84a5e1ec68ecddd3d | [
"Apache-2.0"
] | 3 | 2016-06-12T01:18:49.000Z | 2018-07-16T18:20:23.000Z | Eager/github-scraper/python/ghanalysis.py | UCSB-CS-RACELab/eager-appscale | d58fe64bb867ef58af19c1d84a5e1ec68ecddd3d | [
"Apache-2.0"
] | null | null | null | Eager/github-scraper/python/ghanalysis.py | UCSB-CS-RACELab/eager-appscale | d58fe64bb867ef58af19c1d84a5e1ec68ecddd3d | [
"Apache-2.0"
] | 1 | 2020-05-25T02:59:15.000Z | 2020-05-25T02:59:15.000Z | from time import sleep
import datetime
import getpass
import keyring
import traceback
from github import Github
DEBUG = False
earliest = datetime.datetime(2012,1,1)
def getAERepos(username):
count = 0
try:
g = Github(username, getGithubPassword(username))
for repo in g.legacy_search_repos('app engine'):
... | 26.2875 | 77 | 0.681883 |
a6df70ee0b1530dad9e21d21e1f79cdd1911e91d | 2,100 | py | Python | datalad/core/local/repo.py | ypid/datalad | d50e6135a35edca9406faa44953a7c8ba61ee8c0 | [
"MIT"
] | 298 | 2015-01-25T17:36:29.000Z | 2022-03-20T03:38:47.000Z | datalad/core/local/repo.py | ypid/datalad | d50e6135a35edca9406faa44953a7c8ba61ee8c0 | [
"MIT"
] | 6,387 | 2015-01-02T18:15:01.000Z | 2022-03-31T20:58:58.000Z | datalad/core/local/repo.py | ypid/datalad | d50e6135a35edca9406faa44953a7c8ba61ee8c0 | [
"MIT"
] | 109 | 2015-01-25T17:49:40.000Z | 2022-03-06T06:54:54.000Z | # emacs: -*- mode: python; py-indent-offset: 4; tab-width: 4; indent-tabs-mode: nil -*-
# ex: set sts=4 ts=4 sw=4 noet:
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ##
#
# See COPYING file distributed along with the datalad package for the
# copyright and license terms.
#
# ## ### ##... | 28.378378 | 87 | 0.565238 |
b5e892caf0a0e81c866a6a3c22893dd0a4da1e19 | 2,138 | gyp | Python | common_video/common_video_unittests.gyp | mostynb/webrtc | 24a16656da7249c0d836247bc77dbc475f71f0af | [
"DOC",
"BSD-3-Clause"
] | 27 | 2016-04-27T01:02:03.000Z | 2021-12-13T08:53:19.000Z | common_video/common_video_unittests.gyp | mostynb/webrtc | 24a16656da7249c0d836247bc77dbc475f71f0af | [
"DOC",
"BSD-3-Clause"
] | 2 | 2017-03-09T09:00:50.000Z | 2017-09-21T15:48:20.000Z | common_video/common_video_unittests.gyp | mostynb/webrtc | 24a16656da7249c0d836247bc77dbc475f71f0af | [
"DOC",
"BSD-3-Clause"
] | 17 | 2016-04-27T02:06:39.000Z | 2019-12-18T08:07:00.000Z | # Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project au... | 29.694444 | 79 | 0.561272 |
d36c7b83a5d28c23c66e10d2f59a8d5356d5d313 | 1,003 | py | Python | tests/Python/OWASP_a1/cwe_78/safe/cwe_78__I_hardcoded_string_input__F_no_filtering__S_ls__1-4.7_File1.py | usnistgov/VTSG | f4477a78ec19f7e9757da0321cb5a69428e358cf | [
"MIT"
] | null | null | null | tests/Python/OWASP_a1/cwe_78/safe/cwe_78__I_hardcoded_string_input__F_no_filtering__S_ls__1-4.7_File1.py | usnistgov/VTSG | f4477a78ec19f7e9757da0321cb5a69428e358cf | [
"MIT"
] | 1 | 2022-01-31T22:22:55.000Z | 2022-01-31T22:22:55.000Z | tests/Python/OWASP_a1/cwe_78/safe/cwe_78__I_hardcoded_string_input__F_no_filtering__S_ls__1-4.7_File1.py | usnistgov/VTSG | f4477a78ec19f7e9757da0321cb5a69428e358cf | [
"MIT"
] | null | null | null |
'''
Hardcoded string input
no filtering
sink: run ls in a dir
'''
'''
Created by Paul E. Black and William Mentzer 2020
This software was developed at the National Institute of Standards and Technology
by employees of the Federal Government in the course of their official duties.
Pursuant to title 17 Section 105 of t... | 21.804348 | 81 | 0.656032 |
fd062110b6d9e963b2ad5e616c732b8751442b18 | 3,966 | py | Python | 2/src/ParamLearner.py | Trinkle23897/dip2018 | c8a29f1d6dcc165906165caebd41389e1be23062 | [
"MIT"
] | 4 | 2018-04-20T11:35:39.000Z | 2019-04-10T02:43:18.000Z | 2/src/ParamLearner.py | Trinkle23897/dip2018 | c8a29f1d6dcc165906165caebd41389e1be23062 | [
"MIT"
] | null | null | null | 2/src/ParamLearner.py | Trinkle23897/dip2018 | c8a29f1d6dcc165906165caebd41389e1be23062 | [
"MIT"
] | 3 | 2019-04-16T05:11:33.000Z | 2019-05-01T13:22:52.000Z | #!/usr/bin/env python
import torch
import torch.nn as nn
import torch.optim as optim
from torch.optim import lr_scheduler
import numpy as np
import torchvision
from torchvision import datasets, models, transforms
import torch.utils.model_zoo as model_zoo
import random
model_urls = {
'alexnet': 'https://download.p... | 30.507692 | 117 | 0.587242 |
cc3031827fcd72aaf5fb21ef42f173f9701de4b2 | 194 | py | Python | scripts/item/consume_2435456.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 54 | 2019-04-16T23:24:48.000Z | 2021-12-18T11:41:50.000Z | scripts/item/consume_2435456.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 3 | 2019-05-19T15:19:41.000Z | 2020-04-27T16:29:16.000Z | scripts/item/consume_2435456.py | G00dBye/YYMS | 1de816fc842b6598d5b4b7896b6ab0ee8f7cdcfb | [
"MIT"
] | 49 | 2020-11-25T23:29:16.000Z | 2022-03-26T16:20:24.000Z | # Lovely Damage Skin
success = sm.addDamageSkin(2435456)
if success:
sm.chat("The Lovely Damage Skin has been added to your account's damage skin collection.")
# sm.consumeItem(2435456)
| 32.333333 | 94 | 0.747423 |
6debe17b2778038801a630bc60e22f357f5769be | 140,286 | py | Python | isi_sdk_8_2_1/isi_sdk_8_2_1/models/target_report.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_1/isi_sdk_8_2_1/models/target_report.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_1/isi_sdk_8_2_1/models/target_report.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 8
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
from isi_sdk_8_2_1.models.sync_jo... | 44.862808 | 2,233 | 0.673667 |
3cf8b38a4f7f92e3858644586f8a992ef9769cfc | 9,847 | py | Python | tests/app/celery/test_contact_information_tasks.py | department-of-veterans-affairs/notification-api | 698bc98d8e78a13a0b2cfc432cfc718ff1016b06 | [
"MIT"
] | 10 | 2020-05-04T14:11:06.000Z | 2022-02-22T19:06:36.000Z | tests/app/celery/test_contact_information_tasks.py | department-of-veterans-affairs/notification-api | 698bc98d8e78a13a0b2cfc432cfc718ff1016b06 | [
"MIT"
] | 554 | 2020-05-07T21:56:24.000Z | 2022-03-31T23:04:51.000Z | tests/app/celery/test_contact_information_tasks.py | department-of-veterans-affairs/notification-api | 698bc98d8e78a13a0b2cfc432cfc718ff1016b06 | [
"MIT"
] | 4 | 2020-08-27T16:43:29.000Z | 2021-02-17T22:17:27.000Z | import uuid
import pytest
from app.celery.contact_information_tasks import lookup_contact_info
from app.exceptions import NotificationTechnicalFailureException, NotificationPermanentFailureException
from app.models import Notification, RecipientIdentifier, NOTIFICATION_TECHNICAL_FAILURE, \
NOTIFICATION_PERMANENT_... | 35.807273 | 116 | 0.774855 |
ca3207fb330836415b01e5759bdfa6fe9bfc96e5 | 3,924 | py | Python | opennre/dataset/preprocess_dataset.py | igorvlnascimento/DeepREF | 0fed8120571e44e12ee3d1861289bc101c0a275f | [
"MIT"
] | null | null | null | opennre/dataset/preprocess_dataset.py | igorvlnascimento/DeepREF | 0fed8120571e44e12ee3d1861289bc101c0a275f | [
"MIT"
] | null | null | null | opennre/dataset/preprocess_dataset.py | igorvlnascimento/DeepREF | 0fed8120571e44e12ee3d1861289bc101c0a275f | [
"MIT"
] | null | null | null | import os
import json
import argparse
import subprocess
from opennre import config
from opennre.dataset.preprocess import Preprocess
class PreprocessDataset():
def __init__(self, dataset_name, preprocessing_type):
self.dataset_name = dataset_name
self.preprocessing_type = []
if len(preproc... | 44.089888 | 144 | 0.649847 |
ce8add9288ce475f24d8c47e019be1390a85bfee | 512 | py | Python | vsch/helpers/handling.py | msmukowski/vision-system-counting-holes | 9e154f50e5bc9d8df6d4a3cacdb84db218a9b522 | [
"MIT"
] | null | null | null | vsch/helpers/handling.py | msmukowski/vision-system-counting-holes | 9e154f50e5bc9d8df6d4a3cacdb84db218a9b522 | [
"MIT"
] | null | null | null | vsch/helpers/handling.py | msmukowski/vision-system-counting-holes | 9e154f50e5bc9d8df6d4a3cacdb84db218a9b522 | [
"MIT"
] | null | null | null | import json
def loadData(path):
data = {}
image_list = []
with open(path,"r") as read_file:
data = json.load(read_file)
for scene, frame in enumerate(data):
image_list.append(frame)
return data, image_list
def saveData(path,data):
with open(path, 'w', encoding='utf8') a... | 30.117647 | 69 | 0.558594 |
90dbb0ce15224bdc7aa19a76effd887eca8cb8ae | 15,871 | py | Python | tests/test_build_epub.py | danieleades/sphinx | 1c98aea126919b218766371e1fdf308a1167e95f | [
"BSD-2-Clause"
] | null | null | null | tests/test_build_epub.py | danieleades/sphinx | 1c98aea126919b218766371e1fdf308a1167e95f | [
"BSD-2-Clause"
] | 1,662 | 2015-01-02T11:45:27.000Z | 2015-01-03T12:21:29.000Z | tests/test_build_epub.py | danieleades/sphinx | 1c98aea126919b218766371e1fdf308a1167e95f | [
"BSD-2-Clause"
] | null | null | null | """Test the HTML builder and check output against XPath."""
import os
import subprocess
from subprocess import PIPE, CalledProcessError
from xml.etree import ElementTree
import pytest
# check given command is runnable
def runnable(command):
try:
subprocess.run(command, stdout=PIPE, stderr=PIPE, check=Tr... | 41.223377 | 95 | 0.617289 |
4a2ebacd83ba003a299b2c453488a92ea04ff5e4 | 11,846 | py | Python | moronbot.py | Heufneutje/PyMoronBot | 055abf0e685f3d2fc02863517952dc7fad9050f3 | [
"MIT"
] | null | null | null | moronbot.py | Heufneutje/PyMoronBot | 055abf0e685f3d2fc02863517952dc7fad9050f3 | [
"MIT"
] | null | null | null | moronbot.py | Heufneutje/PyMoronBot | 055abf0e685f3d2fc02863517952dc7fad9050f3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
import shelve
import sys
import platform
import datetime
import argparse
from twisted.words.protocols import irc
from twisted.internet import reactor, protocol
from IRCMessage import IRCMessage, IRCChannel, IRCUser
from IRCResponse import IRCResponse
import ModuleHandler
import Global... | 36.561728 | 129 | 0.592183 |
40f1739a246d3458fc5d84495830dd0b0006f590 | 3,750 | py | Python | oteapi/strategies/parse/application_vnd_sqlite.py | EMMC-ASBL/oteapi-core | 5a034c7610c300b21e585f563debb43383375af0 | [
"MIT"
] | 3 | 2022-01-24T15:18:08.000Z | 2022-03-16T14:01:51.000Z | oteapi/strategies/parse/application_vnd_sqlite.py | EMMC-ASBL/oteapi-core | 5a034c7610c300b21e585f563debb43383375af0 | [
"MIT"
] | 117 | 2022-01-13T17:26:38.000Z | 2022-03-30T16:12:06.000Z | oteapi/strategies/parse/application_vnd_sqlite.py | EMMC-ASBL/oteapi-core | 5a034c7610c300b21e585f563debb43383375af0 | [
"MIT"
] | 3 | 2022-01-17T20:57:57.000Z | 2022-01-25T08:16:14.000Z | """Strategy class for application/vnd.sqlite3."""
# pylint: disable=unused-argument
import sqlite3
from pathlib import Path
from typing import TYPE_CHECKING, Optional
from pydantic import Field
from pydantic.dataclasses import dataclass
from oteapi.datacache import DataCache
from oteapi.models import AttrDict, DataCa... | 32.894737 | 99 | 0.6968 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.