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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
75a987c5360234a08542c4c096ae81174a85b5c5 | 29,833 | py | Python | plotly/graph_objs/layout/_updatemenu.py | paulamool/plotly.py | 6121ac1f324e247e4e4b2964d65d7393377777c0 | [
"MIT"
] | 2 | 2020-03-24T11:41:14.000Z | 2021-01-14T07:59:43.000Z | plotly/graph_objs/layout/_updatemenu.py | paulamool/plotly.py | 6121ac1f324e247e4e4b2964d65d7393377777c0 | [
"MIT"
] | 1 | 2020-12-15T16:56:11.000Z | 2020-12-15T16:56:11.000Z | plotly/graph_objs/layout/_updatemenu.py | skeptycal/plotly.py | 2e5bf6e2f7c213295c405ece3e859f4d3f8030d1 | [
"MIT"
] | 4 | 2019-06-03T14:49:12.000Z | 2022-01-06T01:05:12.000Z | from plotly.basedatatypes import BaseLayoutHierarchyType
import copy
class Updatemenu(BaseLayoutHierarchyType):
# active
# ------
@property
def active(self):
"""
Determines which button (by index starting from 0) is
considered active.
The 'active' property is a in... | 36.337393 | 86 | 0.56233 |
0432546c4baefb8c14598dd3f7f52d79b8212584 | 740 | py | Python | displayMenu.py | s18mbbustorff/AI_Hanabi_Assignment | 651699bdd77f10e72b49cdb2c62faeca585bdfa3 | [
"CNRI-Python"
] | null | null | null | displayMenu.py | s18mbbustorff/AI_Hanabi_Assignment | 651699bdd77f10e72b49cdb2c62faeca585bdfa3 | [
"CNRI-Python"
] | null | null | null | displayMenu.py | s18mbbustorff/AI_Hanabi_Assignment | 651699bdd77f10e72b49cdb2c62faeca585bdfa3 | [
"CNRI-Python"
] | null | null | null | def displayMenu(options):
'''
DISPLAYMENU Displays a menu of options, ask the user to choose an item
and returns the number of the menu item chosen.
* Input arguments: Menu options (array of strings)
* Output arguments: Chosen option (integer)
* Author: Mikkel N. Sch... | 30.833333 | 76 | 0.601351 |
011e61b0464c986e5c77dd8886e8c6ac770566a5 | 222 | py | Python | restauration_policies.py | ThePernalonga/python-simple-anycast-wdm-simulator | 874a5aaa31ab14949144a88d47c0aa0aeb7547d1 | [
"MIT"
] | null | null | null | restauration_policies.py | ThePernalonga/python-simple-anycast-wdm-simulator | 874a5aaa31ab14949144a88d47c0aa0aeb7547d1 | [
"MIT"
] | null | null | null | restauration_policies.py | ThePernalonga/python-simple-anycast-wdm-simulator | 874a5aaa31ab14949144a88d47c0aa0aeb7547d1 | [
"MIT"
] | null | null | null | import abc
import numpy as np
import logging
class RoutingPolicy(abc.ABC):
def __init__(self):
self.env = None
self.name = None
@abc.abstractmethod
def restore(self, service):
pass
| 13.875 | 31 | 0.635135 |
3476ae1a06cd6022552dd64d76647ccd7498a122 | 580 | py | Python | dictionaries/bonus_scoring_system.py | MaggieIllustrations/softuni-github-programming | f5695cb14602f3d2974359f6d8734332acc650d3 | [
"MIT"
] | null | null | null | dictionaries/bonus_scoring_system.py | MaggieIllustrations/softuni-github-programming | f5695cb14602f3d2974359f6d8734332acc650d3 | [
"MIT"
] | null | null | null | dictionaries/bonus_scoring_system.py | MaggieIllustrations/softuni-github-programming | f5695cb14602f3d2974359f6d8734332acc650d3 | [
"MIT"
] | 1 | 2022-01-14T17:12:44.000Z | 2022-01-14T17:12:44.000Z | import math
students_count = int(input())
lectures_count = int(input())
additional_bonus = int(input())
max_bonus = 0
max_bonus_attendances = 0
if lectures_count > 0 and students_count > 0:
for student in range(students_count):
attendances = int(input())
total_bonus = attendances / lectures_count ... | 32.222222 | 75 | 0.705172 |
dea5d0e08be5d43fa23667d9b0d439f30f199b99 | 18,989 | py | Python | syn/base/b/base.py | mbodenhamer/syn | aeaa3ad8a49bac8f50cf89b6f1fe97ad43d1d258 | [
"MIT"
] | 1 | 2021-07-15T08:55:12.000Z | 2021-07-15T08:55:12.000Z | syn/base/b/base.py | mbodenhamer/syn | aeaa3ad8a49bac8f50cf89b6f1fe97ad43d1d258 | [
"MIT"
] | 7 | 2021-01-07T23:51:57.000Z | 2021-12-13T19:50:57.000Z | syn/base/b/base.py | mbodenhamer/syn | aeaa3ad8a49bac8f50cf89b6f1fe97ad43d1d258 | [
"MIT"
] | 2 | 2016-07-11T08:46:31.000Z | 2017-12-13T13:30:51.000Z | import os
import six
from copy import copy
from jinja2 import Template
from operator import itemgetter
from collections import Mapping
from .meta import Attr, Attrs, Meta, create_hook, preserve_attr_data, \
pre_create_hook
from syn.base_utils import AttrDict, ReflexiveDict, message, get_mod, \
get_typename, Seq... | 32.7962 | 120 | 0.531834 |
76a685b18c17d08d081f6853edd8523afe98e2c3 | 2,295 | py | Python | tests/load/test_load_hpo.py | Clinical-Genomics/scout | 1ec4daa76093c2ffa4655612b63d325970253f58 | [
"BSD-3-Clause"
] | 111 | 2015-01-15T11:53:20.000Z | 2022-03-26T19:55:24.000Z | tests/load/test_load_hpo.py | Clinical-Genomics/scout | 1ec4daa76093c2ffa4655612b63d325970253f58 | [
"BSD-3-Clause"
] | 2,995 | 2015-01-15T16:14:20.000Z | 2022-03-31T13:36:32.000Z | tests/load/test_load_hpo.py | Clinical-Genomics/scout | 1ec4daa76093c2ffa4655612b63d325970253f58 | [
"BSD-3-Clause"
] | 55 | 2015-05-31T19:09:49.000Z | 2021-11-01T10:50:31.000Z | from scout.load.hpo import load_disease_terms, load_hpo, load_hpo_terms
from scout.utils.handle import get_file_handle
def test_load_disease_terms(gene_database, genemap_file, hpo_disease_handle):
adapter = gene_database
alias_genes = adapter.genes_by_alias()
# GIVEN a populated database with genes and n... | 31.013514 | 77 | 0.71939 |
ae9ec21575d8f94ca48199a08adae33513d98910 | 22,916 | py | Python | tests_async/system/requests/test_download.py | renovate-bot/google-resumable-media-python | 1f01b88d0ce05ca561359de1ad89b47c6c60c9b7 | [
"Apache-2.0"
] | null | null | null | tests_async/system/requests/test_download.py | renovate-bot/google-resumable-media-python | 1f01b88d0ce05ca561359de1ad89b47c6c60c9b7 | [
"Apache-2.0"
] | null | null | null | tests_async/system/requests/test_download.py | renovate-bot/google-resumable-media-python | 1f01b88d0ce05ca561359de1ad89b47c6c60c9b7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 37.6289 | 88 | 0.664514 |
629c9023a6506d24487046dcab2a098ca7fc54fa | 23,986 | py | Python | plugins/ledger/ledger.py | MrSlosh/Electrum-NYC | 9b83efafc5313246804ead462ff6266ee5d50b60 | [
"MIT"
] | 1 | 2018-02-27T23:40:07.000Z | 2018-02-27T23:40:07.000Z | plugins/ledger/ledger.py | MrSlosh/Electrum-NYC | 9b83efafc5313246804ead462ff6266ee5d50b60 | [
"MIT"
] | null | null | null | plugins/ledger/ledger.py | MrSlosh/Electrum-NYC | 9b83efafc5313246804ead462ff6266ee5d50b60 | [
"MIT"
] | null | null | null | from struct import pack, unpack
import hashlib
import sys
import traceback
from electrum_nyc import bitcoin
from electrum_nyc.bitcoin import TYPE_ADDRESS, int_to_hex, var_int
from electrum_nyc.i18n import _
from electrum_nyc.plugins import BasePlugin
from electrum_nyc.keystore import Hardware_KeyStore
from electrum_ny... | 42.832143 | 242 | 0.588093 |
39406ab24188220857c9be319363b88478c15ce1 | 243 | py | Python | behaviors/vigir_behavior_walk_to_template/setup.py | team-vigir/vigir_behaviors | 6696e7b7aadb24bb5495475065cc7b10d80b7db4 | [
"BSD-3-Clause"
] | 5 | 2015-08-25T18:47:52.000Z | 2019-12-04T21:40:28.000Z | behaviors/vigir_behavior_walk_to_template/setup.py | team-vigir/vigir_behaviors | 6696e7b7aadb24bb5495475065cc7b10d80b7db4 | [
"BSD-3-Clause"
] | 2 | 2017-08-16T16:09:47.000Z | 2020-08-18T17:25:22.000Z | behaviors/vigir_behavior_walk_to_template/setup.py | team-vigir/vigir_behaviors | 6696e7b7aadb24bb5495475065cc7b10d80b7db4 | [
"BSD-3-Clause"
] | 5 | 2015-11-06T21:57:37.000Z | 2022-03-30T10:15:57.000Z | #!/usr/bin/env python
from distutils.core import setup
from catkin_pkg.python_setup import generate_distutils_setup
d = generate_distutils_setup(
packages = ['vigir_behavior_walk_to_template'],
package_dir = {'': 'src'}
)
setup(**d) | 22.090909 | 60 | 0.753086 |
624ff9aeb8f3147cdc6de4c1e0d5744fc995a01e | 679 | py | Python | reply_engine.py | RITct/Lisa | f355f76ad2c802af4c8cbc0f6bdf72543e5399ac | [
"MIT"
] | null | null | null | reply_engine.py | RITct/Lisa | f355f76ad2c802af4c8cbc0f6bdf72543e5399ac | [
"MIT"
] | null | null | null | reply_engine.py | RITct/Lisa | f355f76ad2c802af4c8cbc0f6bdf72543e5399ac | [
"MIT"
] | null | null | null | from chatterbot import ChatBot
class reply_engine :
bot = None
def init(self):
self.bot = ChatBot("Lisa",
storage_adapter="chatterbot.adapters.storage.JsonDatabaseAdapter",
logic_adapter="chatterbot.adapters.logic.ClosestMatchAdapter",
io_adapter="chatterbot.adapters.io.NoOutputAdapter",
... | 21.903226 | 72 | 0.706922 |
79406056abb80590dc0ab387cab25bc8240864a5 | 668 | py | Python | startup.py | ruthogunnnaike/SeeSec---IoT-Vulnerablity-Scanner | d2186421607af0ef3351b7d95c2478c4ac307931 | [
"MIT"
] | 7 | 2017-09-09T06:16:16.000Z | 2020-12-23T09:00:23.000Z | startup.py | eshcrow/SeeSec---IoT-Vulnerablity-Scanner | d2186421607af0ef3351b7d95c2478c4ac307931 | [
"MIT"
] | null | null | null | startup.py | eshcrow/SeeSec---IoT-Vulnerablity-Scanner | d2186421607af0ef3351b7d95c2478c4ac307931 | [
"MIT"
] | 6 | 2018-05-12T10:07:42.000Z | 2021-12-06T15:24:17.000Z |
def launch():
def launch():
from pox.log.level import launch
launch(DEBUG=True)
from pox.misc.firewall import launch
launch()
from pox.openflow.keepalive import launch
launch(interval=300)
from pox.forwarding.l3_learning import launch
launch()
... | 20.875 | 56 | 0.615269 |
bbe3ccf099d4fb1dedbc0ee4d1dfbffc8e519d44 | 310 | py | Python | autocomplete_light/example_apps/non_admin_add_another/admin.py | bburan/django-autocomplete-light | 064676061b101d5d47655e8598b21cbaf7716ae8 | [
"MIT"
] | 1 | 2015-10-12T21:42:05.000Z | 2015-10-12T21:42:05.000Z | autocomplete_light/example_apps/non_admin_add_another/admin.py | bburan/django-autocomplete-light | 064676061b101d5d47655e8598b21cbaf7716ae8 | [
"MIT"
] | null | null | null | autocomplete_light/example_apps/non_admin_add_another/admin.py | bburan/django-autocomplete-light | 064676061b101d5d47655e8598b21cbaf7716ae8 | [
"MIT"
] | null | null | null | from django.contrib import admin
import autocomplete_light
from .models import NonAdminAddAnotherModel
class NonAdminAddAnotherModelAdmin(admin.ModelAdmin):
form = autocomplete_light.modelform_factory(NonAdminAddAnotherModel)
admin.site.register(NonAdminAddAnotherModel, NonAdminAddAnotherModelAdmin)
| 25.833333 | 74 | 0.867742 |
0f64b8b334c18fc2124a2e14ca24b02da448c33a | 3,689 | py | Python | scripts/anim.py | qguv/binjgb-1 | 00b917c57cf177e101e6ee31887d5d87cc4afbda | [
"MIT"
] | null | null | null | scripts/anim.py | qguv/binjgb-1 | 00b917c57cf177e101e6ee31887d5d87cc4afbda | [
"MIT"
] | null | null | null | scripts/anim.py | qguv/binjgb-1 | 00b917c57cf177e101e6ee31887d5d87cc4afbda | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Copyright (C) 2016 Ben Smith
#
# This software may be modified and distributed under the terms
# of the MIT license. See the LICENSE file for details.
#
from __future__ import print_function
import argparse
import multiprocessing
import os
import shutil
import sys
import tempfile
import time
... | 27.736842 | 79 | 0.641637 |
b90f6c7146a94bc400065daf31a83dca7975e93b | 44,237 | py | Python | ambari-server/src/test/python/stacks/2.6/ZEPPELIN/interpreter_json_generated.py | zyclove/ambari | 1032f0f54cb7b312b9a3b37570cd840f4e1e89d4 | [
"Apache-2.0"
] | null | null | null | ambari-server/src/test/python/stacks/2.6/ZEPPELIN/interpreter_json_generated.py | zyclove/ambari | 1032f0f54cb7b312b9a3b37570cd840f4e1e89d4 | [
"Apache-2.0"
] | null | null | null | ambari-server/src/test/python/stacks/2.6/ZEPPELIN/interpreter_json_generated.py | zyclove/ambari | 1032f0f54cb7b312b9a3b37570cd840f4e1e89d4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python2
"""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); yo... | 1,638.407407 | 15,625 | 0.503086 |
bd152f9a1abf41fccab518aea9751f4edf1ce6d9 | 2,232 | py | Python | tests/test_builtins.py | ybastide/cst-test | 8499188c91e07b6df9196119ad70bab2f072ca0a | [
"MIT"
] | null | null | null | tests/test_builtins.py | ybastide/cst-test | 8499188c91e07b6df9196119ad70bab2f072ca0a | [
"MIT"
] | 1 | 2020-03-12T20:15:11.000Z | 2020-03-12T20:15:11.000Z | tests/test_builtins.py | ybastide/cst-test | 8499188c91e07b6df9196119ad70bab2f072ca0a | [
"MIT"
] | null | null | null | import os
import sys
from tests.check import check_result
sys.path.append(os.path.join(os.path.dirname(__file__), ".."))
def test_map_01():
source = """
def foo():
results = [1, 2, 3]
return map(lambda i: i * 2, results)
"""
expected = """
from builtins import map
def foo():
results = [1, 2, 3... | 15.5 | 62 | 0.596774 |
6bcc4121b2aeff419542726ad86826c3f91613a5 | 44,543 | py | Python | haystack/retriever/dense.py | mcschmitz/haystack | 14195bfb09bdf1ddbd4b20a1fb18dc23f61f61b6 | [
"Apache-2.0"
] | null | null | null | haystack/retriever/dense.py | mcschmitz/haystack | 14195bfb09bdf1ddbd4b20a1fb18dc23f61f61b6 | [
"Apache-2.0"
] | null | null | null | haystack/retriever/dense.py | mcschmitz/haystack | 14195bfb09bdf1ddbd4b20a1fb18dc23f61f61b6 | [
"Apache-2.0"
] | null | null | null | import logging
from abc import abstractmethod
from typing import List, Union, Optional
import torch
import numpy as np
from pathlib import Path
from farm.utils import initialize_device_settings
from tqdm.auto import tqdm
from transformers import AutoTokenizer, AutoModel
from torch import nn
from haystack.document_sto... | 52.964328 | 171 | 0.618391 |
aaaa134f7b13eed9ccce107e8818099de6c7d49d | 520 | py | Python | main.py | chahatraj/VehicleTracker | cfea1d4a148be87eab024dd6fd92525397afa5b7 | [
"MIT"
] | null | null | null | main.py | chahatraj/VehicleTracker | cfea1d4a148be87eab024dd6fd92525397afa5b7 | [
"MIT"
] | null | null | null | main.py | chahatraj/VehicleTracker | cfea1d4a148be87eab024dd6fd92525397afa5b7 | [
"MIT"
] | null | null | null | import ultrasonic)
import accelerometer
import camera
import time
import gsm
velocity,speed = ultrasonic.ultrasonic()
if(speed>40):
print ‘Rule Break : Out of speed’
x,y,z=accelerometer. accelerometer()
str=time.time() + ‘.jpg’
no_plate=camera.camera(str)
gsm.gsm(no_plate)
opt=input( ‘Do you want to se... | 24.761905 | 66 | 0.688462 |
7b2617953741fe24eb7a0a83d474fe03b2365bbe | 4,937 | py | Python | tests/extensions/test_pluck.py | open-contracting/kingfisher-collect | 2fbbd6361a0ec959e0603343a4b363f97fae3815 | [
"BSD-3-Clause"
] | 7 | 2020-07-24T13:15:37.000Z | 2021-12-11T22:40:07.000Z | tests/extensions/test_pluck.py | open-contracting/kingfisher-collect | 2fbbd6361a0ec959e0603343a4b363f97fae3815 | [
"BSD-3-Clause"
] | 418 | 2020-04-27T22:15:27.000Z | 2022-03-31T23:49:34.000Z | tests/extensions/test_pluck.py | open-contracting/kingfisher-collect | 2fbbd6361a0ec959e0603343a4b363f97fae3815 | [
"BSD-3-Clause"
] | 6 | 2020-05-28T16:06:53.000Z | 2021-03-16T02:54:15.000Z | import os
from glob import glob
from tempfile import TemporaryDirectory
import pytest
from scrapy import Request
from scrapy.exceptions import StopDownload
from kingfisher_scrapy.base_spider import BaseSpider, CompressedFileSpider
from kingfisher_scrapy.extensions import Pluck
from kingfisher_scrapy.items import Pluc... | 42.930435 | 118 | 0.686044 |
e2b5fca93baff01385457bec8f1b901c021aca0a | 4,508 | py | Python | face.py | Lysovenko/bpc | bd396c40e09f38adedec0de27d0ee178fa056888 | [
"Apache-2.0"
] | null | null | null | face.py | Lysovenko/bpc | bd396c40e09f38adedec0de27d0ee178fa056888 | [
"Apache-2.0"
] | null | null | null | face.py | Lysovenko/bpc | bd396c40e09f38adedec0de27d0ee178fa056888 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Serhiy Lysovenko
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 31.971631 | 77 | 0.609583 |
e33552e0c85386bc849235ddd212c1a3f9fe7aef | 6,396 | py | Python | tensorflow_examples/lite/model_maker/core/task/audio_classifier_test.py | tansaku/examples | cc121d3354ff7f9814b6eee881dce6e6c55d0e68 | [
"Apache-2.0"
] | null | null | null | tensorflow_examples/lite/model_maker/core/task/audio_classifier_test.py | tansaku/examples | cc121d3354ff7f9814b6eee881dce6e6c55d0e68 | [
"Apache-2.0"
] | null | null | null | tensorflow_examples/lite/model_maker/core/task/audio_classifier_test.py | tansaku/examples | cc121d3354ff7f9814b6eee881dce6e6c55d0e68 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 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... | 36.135593 | 80 | 0.685897 |
74c293a8c32a82861444be732ece9da493e5e4b1 | 11,543 | py | Python | Botnets/App/App Web/PDG-env/lib/python3.6/site-packages/pip/__init__.py | i2tResearch/Ciberseguridad_web | ac3dd934a60628532e3538369cb145d9a8f33e4f | [
"MIT"
] | 9 | 2021-10-01T22:02:58.000Z | 2021-11-09T17:48:45.000Z | Botnets/App/App Web/PDG-env/lib/python3.6/site-packages/pip/__init__.py | i2tResearch/Ciberseguridad_web | ac3dd934a60628532e3538369cb145d9a8f33e4f | [
"MIT"
] | null | null | null | Botnets/App/App Web/PDG-env/lib/python3.6/site-packages/pip/__init__.py | i2tResearch/Ciberseguridad_web | ac3dd934a60628532e3538369cb145d9a8f33e4f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
from __future__ import absolute_import
import locale
import logging
import os
import optparse
import warnings
import sys
import re
# 2016-06-17 barry@debian.org: urllib3 1.14 added optional support for socks,
# but if invoked (i.e. imported), it will issue a warning to stderr if socks
# isn't a... | 34.050147 | 80 | 0.601923 |
96ed85674c803b839b1d7dee04cac436916d844a | 59,962 | py | Python | src/oci/ocvp/sddc_client.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/ocvp/sddc_client.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | src/oci/ocvp/sddc_client.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | # 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... | 47.325967 | 267 | 0.641823 |
7c30fa8381d8ea6cfd04719d9e99b071408dfef5 | 721 | py | Python | app/common/forms.py | MalisPierre/django_docker | 9cbd413b898f88fc0a91908a1ba255b197cae249 | [
"MIT"
] | null | null | null | app/common/forms.py | MalisPierre/django_docker | 9cbd413b898f88fc0a91908a1ba255b197cae249 | [
"MIT"
] | null | null | null | app/common/forms.py | MalisPierre/django_docker | 9cbd413b898f88fc0a91908a1ba255b197cae249 | [
"MIT"
] | null | null | null | from django import forms
from django.contrib.auth.models import User
class UserConnectionForm(forms.Form):
pseudo = forms.CharField(label='Nom du compte')
password = forms.CharField(widget=forms.PasswordInput())
class UserCreationForm(forms.Form):
email = forms.CharField(label='email')
pseudo = forms.... | 31.347826 | 60 | 0.736477 |
f10edbf72d06600f6ed53dd193bcad3066bba48f | 3,898 | py | Python | setup.py | JWDebelius/qiita | 3378e0fabe40a846691600e5de4fb72a3db70dd1 | [
"BSD-3-Clause"
] | null | null | null | setup.py | JWDebelius/qiita | 3378e0fabe40a846691600e5de4fb72a3db70dd1 | [
"BSD-3-Clause"
] | null | null | null | setup.py | JWDebelius/qiita | 3378e0fabe40a846691600e5de4fb72a3db70dd1 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -----------------------------------------------------------------------------
# Copyright (c) 2013, The Qiita Development Team.
#
# Distributed under the terms of the BSD 3-clause License.
#
# The full license is in the file LICENSE, distributed with this software.
# ---------------------------... | 44.804598 | 79 | 0.502309 |
21f554b7431f4960095c54accf38a0772caee45e | 2,411 | py | Python | openpyxlzip/worksheet/tests/test_protection.py | ankitJoshi03/openpyxlzip | f3b8aa2f80f9d8bc31ce5fcf05c822d88d2ff647 | [
"MIT"
] | null | null | null | openpyxlzip/worksheet/tests/test_protection.py | ankitJoshi03/openpyxlzip | f3b8aa2f80f9d8bc31ce5fcf05c822d88d2ff647 | [
"MIT"
] | null | null | null | openpyxlzip/worksheet/tests/test_protection.py | ankitJoshi03/openpyxlzip | f3b8aa2f80f9d8bc31ce5fcf05c822d88d2ff647 | [
"MIT"
] | null | null | null | # Copyright (c) 2010-2020 openpyxlzip
import pytest
from openpyxlzip.tests.helper import compare_xml
from openpyxlzip.xml.functions import tostring, fromstring
@pytest.fixture
def SheetProtection():
from ..protection import SheetProtection
return SheetProtection
class TestSheetProtection:
def test_ct... | 34.442857 | 117 | 0.647864 |
4697e932fabfda31167bdf81b3896aabbdb6af68 | 53 | py | Python | atlas/testing/acceptance/mixins/run_process.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 296 | 2020-03-16T19:55:00.000Z | 2022-01-10T19:46:05.000Z | atlas/testing/acceptance/mixins/run_process.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 57 | 2020-03-17T11:15:57.000Z | 2021-07-10T14:42:27.000Z | atlas/testing/acceptance/mixins/run_process.py | DeepLearnI/atlas | 8aca652d7e647b4e88530b93e265b536de7055ed | [
"Apache-2.0"
] | 38 | 2020-03-17T21:06:05.000Z | 2022-02-08T03:19:34.000Z |
from foundations_spec.extensions import run_process | 17.666667 | 51 | 0.886792 |
005be7063523ffbb4907ee081acec486b57bf09b | 8,367 | py | Python | google/cloud/dialogflowcx_v3/services/experiments/transports/base.py | galz10/python-dialogflow-cx | e24bdfd499952199dfbdaa5634061653da8ae1db | [
"Apache-2.0"
] | null | null | null | google/cloud/dialogflowcx_v3/services/experiments/transports/base.py | galz10/python-dialogflow-cx | e24bdfd499952199dfbdaa5634061653da8ae1db | [
"Apache-2.0"
] | null | null | null | google/cloud/dialogflowcx_v3/services/experiments/transports/base.py | galz10/python-dialogflow-cx | e24bdfd499952199dfbdaa5634061653da8ae1db | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 36.537118 | 101 | 0.657225 |
305b46b49e1bd63c70736f60b2c4f5924c497d72 | 679 | py | Python | punchline/music/forms.py | ychab/punchline | 0054fd1a0c588173c9963714477b012579c13051 | [
"MIT"
] | null | null | null | punchline/music/forms.py | ychab/punchline | 0054fd1a0c588173c9963714477b012579c13051 | [
"MIT"
] | null | null | null | punchline/music/forms.py | ychab/punchline | 0054fd1a0c588173c9963714477b012579c13051 | [
"MIT"
] | null | null | null | from django import forms
from dal import autocomplete
from .models import Punchline, Song
class SongAdminForm(forms.ModelForm):
class Meta:
model = Song
fields = '__all__'
widgets = {
'album': autocomplete.ModelSelect2(url='admin:album-autocomplete'),
}
class Punch... | 22.633333 | 81 | 0.589102 |
d40e8235dcca93ae965ddfe6ca8a2306db1cb7db | 288 | py | Python | neuralnetwork/code/simulations/__init__.py | realwsq/MuscleSpindleCircuitsModel | 4418b180559ea1464ee6139161af7e6bf3762c50 | [
"MIT"
] | 5 | 2018-11-13T15:22:14.000Z | 2022-03-23T17:00:38.000Z | neuralnetwork/code/simulations/__init__.py | realwsq/MuscleSpindleCircuitsModel | 4418b180559ea1464ee6139161af7e6bf3762c50 | [
"MIT"
] | null | null | null | neuralnetwork/code/simulations/__init__.py | realwsq/MuscleSpindleCircuitsModel | 4418b180559ea1464ee6139161af7e6bf3762c50 | [
"MIT"
] | 1 | 2020-05-28T15:40:11.000Z | 2020-05-28T15:40:11.000Z | from Simulation import Simulation
from CellsRecording import CellsRecording
from ForwardSimulation import ForwardSimulation
from ForSimMuscleSpindles import ForSimMuscleSpindles
from ForSimSpinalModulation import ForSimSpinalModulation
from CollisionEesNatural import CollisionEesNatural
| 41.142857 | 57 | 0.916667 |
182aa18308fa2a5527008e23a16ed5629d2b4c72 | 3,405 | py | Python | fboss/py/fboss/thrift_clients.py | fakeNetflix/facebook-repo-fboss | b4b64540c779022bcbeff72376549d0addf3f7e7 | [
"BSD-3-Clause"
] | null | null | null | fboss/py/fboss/thrift_clients.py | fakeNetflix/facebook-repo-fboss | b4b64540c779022bcbeff72376549d0addf3f7e7 | [
"BSD-3-Clause"
] | null | null | null | fboss/py/fboss/thrift_clients.py | fakeNetflix/facebook-repo-fboss | b4b64540c779022bcbeff72376549d0addf3f7e7 | [
"BSD-3-Clause"
] | null | null | null | #
# Copyright (c) 2004-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree. An additional grant
# of patent rights can be found in the PATENTS file in the same directory.
#
from __future__ ... | 32.740385 | 78 | 0.703377 |
066f7a4ce791cf844d6e0124085c72aa0bfb6d1b | 2,085 | py | Python | ppdet/modeling/architectures/deepsort.py | leakyH/PaddleDetection | aa15eb945711baf248177a02d4d3dd3bd3abc4e8 | [
"Apache-2.0"
] | 7,782 | 2019-10-25T09:39:37.000Z | 2022-03-31T13:44:14.000Z | ppdet/modeling/architectures/deepsort.py | leakyH/PaddleDetection | aa15eb945711baf248177a02d4d3dd3bd3abc4e8 | [
"Apache-2.0"
] | 3,499 | 2019-10-29T12:37:40.000Z | 2022-03-31T14:51:56.000Z | ppdet/modeling/architectures/deepsort.py | leakyH/PaddleDetection | aa15eb945711baf248177a02d4d3dd3bd3abc4e8 | [
"Apache-2.0"
] | 1,874 | 2019-10-28T04:21:58.000Z | 2022-03-31T05:41:21.000Z | # Copyright (c) 2021 PaddlePaddle 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
#
# Unle... | 29.785714 | 81 | 0.644604 |
650271b415616a2a73af7e25a82b003a2c3203c0 | 4,977 | py | Python | cuppy_sensors_actuators/sensors/Sensors.py | adinaborta/Cuppy | e6099e345e8b3fa4d25fde1e5a6485c6558922e5 | [
"Unlicense"
] | null | null | null | cuppy_sensors_actuators/sensors/Sensors.py | adinaborta/Cuppy | e6099e345e8b3fa4d25fde1e5a6485c6558922e5 | [
"Unlicense"
] | null | null | null | cuppy_sensors_actuators/sensors/Sensors.py | adinaborta/Cuppy | e6099e345e8b3fa4d25fde1e5a6485c6558922e5 | [
"Unlicense"
] | null | null | null | import time
import os
import uuid
from cuppy.settings import MQTT_PORT, MQTT_BROKER_URL, DEBUG, BASE_DIR, MQTT_DEBUG_PRINTS
from cuppy.cuppy.models import MQTTSensorActuatorClient, MQTTCentralClient
from background_task import background
"""Background tasks.
The sensors and actuators and everythign related to mqtt, n... | 34.089041 | 115 | 0.609001 |
7e29c0cc2e31f83354af9d3052d2653538febf4f | 334 | py | Python | code-everyday-challenge/n69_money_change.py | ved93/deliberate-practice-challenges | 2fccdbb9d2baaa16f888055c081a8d04804c0045 | [
"MIT"
] | null | null | null | code-everyday-challenge/n69_money_change.py | ved93/deliberate-practice-challenges | 2fccdbb9d2baaa16f888055c081a8d04804c0045 | [
"MIT"
] | null | null | null | code-everyday-challenge/n69_money_change.py | ved93/deliberate-practice-challenges | 2fccdbb9d2baaa16f888055c081a8d04804c0045 | [
"MIT"
] | null | null | null |
#the min coins with denom 1,5, 10 that changes m
def main(m,coins):
result = []
while m > 0:
max_coins=max(c for c in coins if c <= m)
m-=max_coins
result.append(max_coins)
return '+'.join(map(str, result))
if __name__ == "__main__":
coins = [1,5,10]
m = 28
print(m... | 18.555556 | 49 | 0.562874 |
ac1685a4d3588bab1d4d83deadc07d0f4d21d78f | 1,973 | py | Python | gui_app/utils/BaseimageUtil.py | cloudconductor/cloud_conductor_gui | 8929815adfc6442daed5d320bfb7942d6917c3ea | [
"Apache-2.0"
] | null | null | null | gui_app/utils/BaseimageUtil.py | cloudconductor/cloud_conductor_gui | 8929815adfc6442daed5d320bfb7942d6917c3ea | [
"Apache-2.0"
] | null | null | null | gui_app/utils/BaseimageUtil.py | cloudconductor/cloud_conductor_gui | 8929815adfc6442daed5d320bfb7942d6917c3ea | [
"Apache-2.0"
] | null | null | null | from ..utils import ApiUtil
from ..utils import StringUtil
from ..utils.ApiUtil import Url
def get_baseimege_list(code, token, id=None):
if StringUtil.isEmpty(code):
return None
if StringUtil.isEmpty(token):
return None
url = Url.baseImageList
data = {
'auth_token': token,
... | 21.215054 | 60 | 0.613786 |
8f1e33768defc5587a34945e15bb9e0cfeaeaab2 | 34,549 | py | Python | benchmark/common.py | Semanti1/smarts_baseline | 77dbc350f37ae7735c74a2b8f1585c2818ac3421 | [
"MIT"
] | null | null | null | benchmark/common.py | Semanti1/smarts_baseline | 77dbc350f37ae7735c74a2b8f1585c2818ac3421 | [
"MIT"
] | null | null | null | benchmark/common.py | Semanti1/smarts_baseline | 77dbc350f37ae7735c74a2b8f1585c2818ac3421 | [
"MIT"
] | null | null | null | # Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
#
# 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 us... | 38.175691 | 110 | 0.591652 |
1f35022201a73b8853f06d4d5298a130b3a2eaf8 | 434 | py | Python | python/FTPServer.py | mlecriva/SPL_Meter | 626d405ef979a36da3100f2b200b5dae9ee094c7 | [
"MIT"
] | 3 | 2019-07-29T21:20:24.000Z | 2019-07-30T08:52:32.000Z | python/FTPServer.py | mlecriva/SPL_Meter | 626d405ef979a36da3100f2b200b5dae9ee094c7 | [
"MIT"
] | null | null | null | python/FTPServer.py | mlecriva/SPL_Meter | 626d405ef979a36da3100f2b200b5dae9ee094c7 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
from pyftpdlib.authorizers import DummyAuthorizer
from pyftpdlib.handlers import FTPHandler
from pyftpdlib.servers import FTPServer
authorizer = DummyAuthorizer()
authorizer.add_user(
"test", "test", "/Users/username", perm="elradfmw")
handler = FTPHandler
handler.authorizer = authorizer
handl... | 25.529412 | 55 | 0.778802 |
22ed5cd61679611f836ae7afe47474b65c7b678a | 1,392 | py | Python | setup.py | greschd/aiida-wannier90 | 747529e8c9fe2df3e65c806a9060a55eb4baa9a0 | [
"MIT"
] | 8 | 2019-10-31T23:51:50.000Z | 2021-03-30T04:48:17.000Z | setup.py | greschd/aiida-wannier90 | 747529e8c9fe2df3e65c806a9060a55eb4baa9a0 | [
"MIT"
] | 84 | 2017-07-17T20:28:15.000Z | 2022-02-16T20:29:10.000Z | setup.py | greschd/aiida-wannier90 | 747529e8c9fe2df3e65c806a9060a55eb4baa9a0 | [
"MIT"
] | 12 | 2017-11-20T08:54:35.000Z | 2022-01-26T12:38:12.000Z | # -*- coding: utf-8 -*-
################################################################################
# Copyright (c), AiiDA team and individual contributors. #
# All rights reserved. #
# This file is part of the AiiDA-wannier90 code. ... | 38.666667 | 80 | 0.490661 |
8df634aa7d3a1a254cfd012b72661087336a9337 | 341 | py | Python | plugins/labels/kivy.py | OleksandrBlack/electrum-safecoin | 71a383635f9f2c3b50649376daabb6ba610431c2 | [
"MIT"
] | null | null | null | plugins/labels/kivy.py | OleksandrBlack/electrum-safecoin | 71a383635f9f2c3b50649376daabb6ba610431c2 | [
"MIT"
] | null | null | null | plugins/labels/kivy.py | OleksandrBlack/electrum-safecoin | 71a383635f9f2c3b50649376daabb6ba610431c2 | [
"MIT"
] | 1 | 2020-01-31T22:01:23.000Z | 2020-01-31T22:01:23.000Z | from .labels import LabelsPlugin
from electrum_safecoin.plugins import hook
class Plugin(LabelsPlugin):
@hook
def load_wallet(self, wallet, window):
self.window = window
self.start_wallet(wallet)
def on_pulled(self, wallet):
self.print_error('on pulled')
self.window._trigg... | 22.733333 | 45 | 0.70088 |
d1f4bb98614dba31c964123975c9b9faa08b93bd | 148 | py | Python | faq/tests/__init__.py | Kirembu/django-helpline-faq | 4cd9ef3aa310833bf2fe1cfb9bdc8c67913ab27f | [
"BSD-3-Clause"
] | 46 | 2015-02-01T22:33:00.000Z | 2022-02-27T05:25:11.000Z | faq/tests/__init__.py | jhensley/django-faq | fc680d6be1deaa035e4bb2e752bb57db3eb0e096 | [
"BSD-3-Clause"
] | 2 | 2015-02-28T11:28:33.000Z | 2015-03-15T21:03:37.000Z | faq/tests/__init__.py | jhensley/django-faq | fc680d6be1deaa035e4bb2e752bb57db3eb0e096 | [
"BSD-3-Clause"
] | 23 | 2015-03-12T15:06:27.000Z | 2021-09-30T03:19:15.000Z | from faq.tests.test_admin import *
from faq.tests.test_models import *
from faq.tests.test_templatetags import *
from faq.tests.test_views import *
| 29.6 | 41 | 0.810811 |
937a617088a7e25674a9e2a4c6ab9d381d714435 | 13,377 | py | Python | fedot/utilities/ts_gapfilling.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | 1 | 2021-11-09T10:24:38.000Z | 2021-11-09T10:24:38.000Z | fedot/utilities/ts_gapfilling.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | null | null | null | fedot/utilities/ts_gapfilling.py | rozlana-g/FEDOT | a909d6c0ef481cc1cf7a5f10f7b1292d8d2def5c | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
from scipy import interpolate
from fedot.core.data.data import InputData
from fedot.core.repository.dataset_types import DataTypesEnum
from fedot.core.repository.tasks import Task, TaskTypesEnum, TsForecastingParams
class SimpleGapFiller:
"""
Base class used for filling in the gaps in time... | 38.22 | 80 | 0.615086 |
7db61a020a2c5f6a7fd411989693f79cdb2b0218 | 959 | py | Python | autosk_dev_test/utilities/policies_theano.py | hmendozap/master-arbeit-files | 5c1b90bc4a424313234b84bad405799de6f8d2ed | [
"MIT"
] | 2 | 2018-01-18T06:25:21.000Z | 2018-12-11T07:43:09.000Z | autosk_dev_test/utilities/policies_theano.py | hmendozap/master-arbeit-files | 5c1b90bc4a424313234b84bad405799de6f8d2ed | [
"MIT"
] | 1 | 2016-03-29T07:55:18.000Z | 2016-03-29T07:55:18.000Z | autosk_dev_test/utilities/policies_theano.py | hmendozap/master-arbeit-files | 5c1b90bc4a424313234b84bad405799de6f8d2ed | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
Policies modules
"""
__author__ = 'mendozah'
import theano
import theano.tensor as T
initial_lr = 0.1
value_gamma = 0.8
value_epoch = 3.0
value_power = 0.75
lr = theano.shared(initial_lr, 'lr')
epoch, gamma, powr, step = T.scalars('epoch', 'gm', 'powr', 'step')
lr_policy = 'fixed'
if ... | 25.918919 | 67 | 0.571429 |
db0c073745d24dee662ab71688fe18dafcd9de72 | 4,320 | py | Python | onfido/migrations/0010_convert_raw_fields_to_jsonb.py | snicks1/django-onfido | 7288552c6a156d022539d4d22d7f5a0236018ada | [
"MIT"
] | null | null | null | onfido/migrations/0010_convert_raw_fields_to_jsonb.py | snicks1/django-onfido | 7288552c6a156d022539d4d22d7f5a0236018ada | [
"MIT"
] | null | null | null | onfido/migrations/0010_convert_raw_fields_to_jsonb.py | snicks1/django-onfido | 7288552c6a156d022539d4d22d7f5a0236018ada | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-11-15 22:50
from __future__ import unicode_literals
from django.db import migrations
from ..db.fields import JSONField
class Migration(migrations.Migration):
dependencies = [
('onfido', '0009_add_is_clear_field'),
]
operations = [
... | 37.241379 | 102 | 0.627083 |
8ca0e29cdfb3e612765d6e67072f93d940a802bc | 231 | py | Python | anyway/database.py | ShaiEdy/anyway | ea669ad089d37fe0933a4596397bcb2d0b4f5de9 | [
"BSD-3-Clause"
] | 1 | 2020-07-16T16:51:17.000Z | 2020-07-16T16:51:17.000Z | anyway/database.py | ShaiEdy/anyway | ea669ad089d37fe0933a4596397bcb2d0b4f5de9 | [
"BSD-3-Clause"
] | 5 | 2020-07-30T08:30:04.000Z | 2021-06-25T15:39:48.000Z | anyway/database.py | ShaiEdy/anyway | ea669ad089d37fe0933a4596397bcb2d0b4f5de9 | [
"BSD-3-Clause"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.ext.declarative import declarative_base
from . import config
engine = create_engine(config.SQLALCHEMY_DATABASE_URI, convert_unicode=True, echo=False)
Base = declarative_base()
| 28.875 | 88 | 0.844156 |
cf8ad7ccc113d75e6bf78d20339e9500907eefb3 | 4,892 | py | Python | .history/my_classes/ScopesClosuresAndDecorators/GlobalLocalScopes_20210710134347.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/ScopesClosuresAndDecorators/GlobalLocalScopes_20210710134347.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | .history/my_classes/ScopesClosuresAndDecorators/GlobalLocalScopes_20210710134347.py | minefarmer/deep-Dive-1 | b0675b853180c5b5781888266ea63a3793b8d855 | [
"Unlicense"
] | null | null | null | """ Global and local Scopes
Scopes and Namespaces
When an object is assigned to a variable # a = 10
that variable points to some object
and we say that the variable (name) is bound to that object
That object can be accessed using that name in various parts of our code... | 29.46988 | 184 | 0.611611 |
486dfb815db32866a7a7ffbfcf796d17e1d56dde | 2,549 | py | Python | examples/nin_cifar10.py | deep-learning-algorithm/PyNet | 354c7ee88a712a1f5069d58a0be4a6cbfaeab861 | [
"Apache-2.0"
] | 8 | 2020-11-22T02:22:55.000Z | 2022-03-16T12:18:03.000Z | examples/nin_cifar10.py | zjZSTU/PyNet | 354c7ee88a712a1f5069d58a0be4a6cbfaeab861 | [
"Apache-2.0"
] | null | null | null | examples/nin_cifar10.py | zjZSTU/PyNet | 354c7ee88a712a1f5069d58a0be4a6cbfaeab861 | [
"Apache-2.0"
] | 4 | 2020-12-10T09:21:56.000Z | 2021-04-19T02:25:01.000Z | # -*- coding: utf-8 -*-
# @Time : 19-6-21 下午2:45
# @Author : zj
from pynet import nn, models, vision
import pynet.models.utils as utils
from pynet.vision.data import cifar
import numpy as np
import time
data_path = '~/data/decompress_cifar_10'
epochs = 100
batch_size = 128
momentum = 0.9
learning_rate = 1e-3
re... | 28.322222 | 94 | 0.588466 |
3ce5bc0fec3c2942c8d2572be6c9ed84fba7c1b9 | 769 | py | Python | tests/test_message_handler.py | lucenaproject/lucena2 | 48660adb57ed3aa030bd9376852af1ac24b1f7ca | [
"MIT"
] | null | null | null | tests/test_message_handler.py | lucenaproject/lucena2 | 48660adb57ed3aa030bd9376852af1ac24b1f7ca | [
"MIT"
] | null | null | null | tests/test_message_handler.py | lucenaproject/lucena2 | 48660adb57ed3aa030bd9376852af1ac24b1f7ca | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
from lucena.message_handler import MessageHandler
class TestMessageHandler(unittest.TestCase):
def setUp(self):
super(TestMessageHandler, self).setUp()
def test_more_properties_win(self):
mh1 = MessageHandler(
{'a': 123, 'b': 999, 'c': 'he... | 23.30303 | 49 | 0.508453 |
a85c92f6cf48760173f3c378b8ed27dfe86fd158 | 12,153 | py | Python | tests/unit/__init__.py | affiliprint/python-intercom | d7d9de8deba3db1acc3a779c6f258d47620c16f4 | [
"MIT"
] | 77 | 2018-01-12T20:14:37.000Z | 2022-03-21T04:57:24.000Z | tests/unit/__init__.py | affiliprint/python-intercom | d7d9de8deba3db1acc3a779c6f258d47620c16f4 | [
"MIT"
] | 40 | 2018-01-11T01:43:37.000Z | 2022-02-16T19:24:35.000Z | tests/unit/__init__.py | affiliprint/python-intercom | d7d9de8deba3db1acc3a779c6f258d47620c16f4 | [
"MIT"
] | 60 | 2018-03-20T00:38:56.000Z | 2022-02-22T15:49:24.000Z | # -*- coding: utf-8 -*-
import json
import os
from mock import Mock
DIRPATH = os.path.dirname(__file__)
FIXTURES = os.path.join(DIRPATH, 'fixtures')
def create_response(status, fixture=None):
def request(*args, **kwargs):
response = Mock()
response.status_code = status
if fixture:
... | 29.713936 | 148 | 0.45931 |
5f6f284dc1e541bfb75c4803ab7d153e1f5b3927 | 15,672 | py | Python | project.py | Kajitaku/ud_item_catalog | 9c07d6bee3d2ccb9fb5d2575b7e15dd31f4b67ec | [
"MIT"
] | null | null | null | project.py | Kajitaku/ud_item_catalog | 9c07d6bee3d2ccb9fb5d2575b7e15dd31f4b67ec | [
"MIT"
] | null | null | null | project.py | Kajitaku/ud_item_catalog | 9c07d6bee3d2ccb9fb5d2575b7e15dd31f4b67ec | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, redirect
from flask import make_response, jsonify, url_for, flash, session
from flask import session as login_session
from sqlalchemy import create_engine, asc
from sqlalchemy.orm import sessionmaker
from database_setup import Base, Catalog, Item, User
from oauth... | 36.110599 | 80 | 0.637379 |
2fc8f14ffe3746d00919dcfa911f5a28c8959c2f | 2,511 | py | Python | spider/author_page_thread.py | xingkong906/CitationRecommend | 14009e44b464de855480b081366a72ebae63c76a | [
"Apache-2.0"
] | 3 | 2021-02-27T03:04:27.000Z | 2021-07-11T13:44:02.000Z | spider/author_page_thread.py | xingkong906/CitationRecommend | 14009e44b464de855480b081366a72ebae63c76a | [
"Apache-2.0"
] | 1 | 2021-07-12T00:47:57.000Z | 2021-09-14T13:40:12.000Z | spider/author_page_thread.py | xingkong906/CitationRecommend | 14009e44b464de855480b081366a72ebae63c76a | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# !/usr/bin/python3
"""
-------------------------------------------------
File Name: paper_page_thread.py
Author : Carl
Author_email: xingkong906@outlook.com
date: paper_page_thread.py
Description : 对author_page的多线程
----------------------------------------... | 27.593407 | 107 | 0.510155 |
648c38dd33234bf03b6961d692af889db8860619 | 2,285 | py | Python | docs/conf.py | brokad/synthpy | 1dbef795a90af1c8902aeb81be7a5572fe2d8f0b | [
"Apache-2.0"
] | 5 | 2020-12-11T08:58:16.000Z | 2021-04-15T15:16:27.000Z | docs/conf.py | brokad/synthpy | 1dbef795a90af1c8902aeb81be7a5572fe2d8f0b | [
"Apache-2.0"
] | null | null | null | docs/conf.py | brokad/synthpy | 1dbef795a90af1c8902aeb81be7a5572fe2d8f0b | [
"Apache-2.0"
] | 2 | 2021-02-08T16:26:14.000Z | 2021-02-10T12:22:09.000Z | # Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html
# -- Path setup --------------------------------------------------------------
# If ex... | 31.30137 | 79 | 0.677462 |
64d04505c643441cb53b75ee587aca7db5cf3833 | 9,607 | py | Python | datacube_ows/ogc.py | opendatacube/datacube-wms | 573bd69370e95ce95006f0b77cdcd75f49c3552a | [
"Apache-2.0"
] | 4 | 2017-11-02T04:22:30.000Z | 2018-05-01T14:16:23.000Z | datacube_ows/ogc.py | opendatacube/datacube-wms | 573bd69370e95ce95006f0b77cdcd75f49c3552a | [
"Apache-2.0"
] | 33 | 2018-05-23T01:32:06.000Z | 2018-11-05T01:07:09.000Z | datacube_ows/ogc.py | opendatacube/datacube-wms | 573bd69370e95ce95006f0b77cdcd75f49c3552a | [
"Apache-2.0"
] | 7 | 2017-10-09T00:09:44.000Z | 2018-07-27T00:41:19.000Z | # This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2021 OWS Contributors
# SPDX-License-Identifier: Apache-2.0
import sys
import traceback
from time import monotonic
from flask import g, render_template, request
from flas... | 37.381323 | 129 | 0.649943 |
5e3bfea07b0b9494ba94a2e754bc86a459e55cab | 23,015 | py | Python | contrib/devtools/copyright_header.py | wbdeedcoin/wagerr | d746af73ac26cae1ff8336abf9373238b7c352a2 | [
"MIT"
] | 4 | 2018-06-16T20:08:19.000Z | 2018-08-22T15:44:58.000Z | contrib/devtools/copyright_header.py | wbdeedcoin/wagerr | d746af73ac26cae1ff8336abf9373238b7c352a2 | [
"MIT"
] | null | null | null | contrib/devtools/copyright_header.py | wbdeedcoin/wagerr | d746af73ac26cae1ff8336abf9373238b7c352a2 | [
"MIT"
] | 7 | 2018-06-06T18:51:07.000Z | 2018-09-08T15:17:04.000Z | #!/usr/bin/env python3
# Copyright (c) 2016-2018 The Bitcoin Core developers
# Copyright (c) 2018 The Wagerr Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import re
import fnmatch
import sys
import subprocess
imp... | 36.473851 | 92 | 0.601651 |
caf60757ee270b3e7bd23cf83f1d04397d727a47 | 75 | py | Python | backend/wsgi.py | sunwenquan/iSurvey | bc14a102e56b33fb4b3612b3bef98183f6e46612 | [
"Apache-2.0"
] | null | null | null | backend/wsgi.py | sunwenquan/iSurvey | bc14a102e56b33fb4b3612b3bef98183f6e46612 | [
"Apache-2.0"
] | null | null | null | backend/wsgi.py | sunwenquan/iSurvey | bc14a102e56b33fb4b3612b3bef98183f6e46612 | [
"Apache-2.0"
] | null | null | null | # backend/wsgi.py
from surveyapi.app import create_app
app = create_app()
| 15 | 36 | 0.773333 |
7357bd85d97ac9cdde0970631f110a942d40f711 | 182 | py | Python | docker/test_settings.py | uw-it-aca/spotseeker_server | 1d8a5bf98b76fdcb807ed4cd32f939bb7e9aa66c | [
"Apache-2.0"
] | 5 | 2015-03-12T00:36:33.000Z | 2022-02-24T16:41:25.000Z | docker/test_settings.py | uw-it-aca/spotseeker_server | 1d8a5bf98b76fdcb807ed4cd32f939bb7e9aa66c | [
"Apache-2.0"
] | 133 | 2016-02-03T23:54:45.000Z | 2022-03-30T21:33:58.000Z | docker/test_settings.py | uw-it-aca/spotseeker_server | 1d8a5bf98b76fdcb807ed4cd32f939bb7e9aa66c | [
"Apache-2.0"
] | 6 | 2015-01-07T23:21:15.000Z | 2017-12-07T08:26:33.000Z | """ These settings used on automatic unit test runs to reset a customized
setting that cause some unit tests to fail."""
from .settings import *
SPOTSEEKER_SEARCH_FILTERS = []
| 26 | 73 | 0.747253 |
ed6ba534e234239b0d2fad6557e5872e6a9ff2d2 | 1,608 | py | Python | tests/cli/test_cmds_list.py | sobolevn/paasta | 8b87e0b13816c09b3d063b6d3271e6c7627fd264 | [
"Apache-2.0"
] | 1,711 | 2015-11-10T18:04:56.000Z | 2022-03-23T08:53:16.000Z | tests/cli/test_cmds_list.py | sobolevn/paasta | 8b87e0b13816c09b3d063b6d3271e6c7627fd264 | [
"Apache-2.0"
] | 1,689 | 2015-11-10T17:59:04.000Z | 2022-03-31T20:46:46.000Z | tests/cli/test_cmds_list.py | sobolevn/paasta | 8b87e0b13816c09b3d063b6d3271e6c7627fd264 | [
"Apache-2.0"
] | 267 | 2015-11-10T19:17:16.000Z | 2022-02-08T20:59:52.000Z | # Copyright 2015-2016 Yelp Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | 34.212766 | 79 | 0.752488 |
e538f174f7dc0889b9703e29da74ebbac15667d1 | 227 | py | Python | weltgeist/__init__.py | samgeen/Weltgeist | c7d52e879bb3473cecbb06651b5e76dac3020da6 | [
"MIT"
] | null | null | null | weltgeist/__init__.py | samgeen/Weltgeist | c7d52e879bb3473cecbb06651b5e76dac3020da6 | [
"MIT"
] | null | null | null | weltgeist/__init__.py | samgeen/Weltgeist | c7d52e879bb3473cecbb06651b5e76dac3020da6 | [
"MIT"
] | null | null | null | # Decides what to import from this folder
# NOTE: I removed "graphics" from this list because pyglet seems to segfault pdb on my machine
from . import analyticsolutions, cooling, gravity, integrator, radiation, sources, units | 75.666667 | 95 | 0.788546 |
ab2c0507c90986273c2b98a56f2e98b04da3ff60 | 1,413 | py | Python | tests/test_qsvm_regressor.py | Qulacs-Osaka/scikit-qulacs | f13d6a36ef0dae1e7d4fdda6f01bcb2346f3cb3e | [
"MIT"
] | 4 | 2021-07-02T03:53:44.000Z | 2022-03-18T02:05:44.000Z | tests/test_qsvm_regressor.py | Qulacs-Osaka/scikit-qulacs | f13d6a36ef0dae1e7d4fdda6f01bcb2346f3cb3e | [
"MIT"
] | 109 | 2021-07-01T07:10:24.000Z | 2022-03-30T08:26:57.000Z | tests/test_qsvm_regressor.py | Qulacs-Osaka/scikit-qulacs | f13d6a36ef0dae1e7d4fdda6f01bcb2346f3cb3e | [
"MIT"
] | 2 | 2021-11-10T07:01:11.000Z | 2021-12-25T21:29:30.000Z | import random
import numpy as np
from numpy.random import RandomState
from sklearn.metrics import mean_squared_error
from skqulacs.circuit import create_ibm_embedding_circuit
from skqulacs.qsvm import QSVR
def func_to_learn(x):
return np.sin(x[0] * x[1] * 2)
def generate_noisy_sine(x_min: float, x_max: float,... | 23.949153 | 64 | 0.664544 |
c025fde41143cc9465b5f07e6b5791aa8be04a9f | 19,762 | py | Python | src/plot/base_plot.py | tsikes/Frhodo | de2f6d6c72afa2825a718dde98794ee93c3c61c8 | [
"BSD-3-Clause"
] | 3 | 2021-03-27T16:31:18.000Z | 2021-03-31T03:41:42.000Z | src/plot/base_plot.py | tsikes/Frhodo | de2f6d6c72afa2825a718dde98794ee93c3c61c8 | [
"BSD-3-Clause"
] | 1 | 2021-01-27T06:07:56.000Z | 2021-01-27T06:07:56.000Z | src/plot/base_plot.py | tsikes/Frhodo | de2f6d6c72afa2825a718dde98794ee93c3c61c8 | [
"BSD-3-Clause"
] | 2 | 2020-06-19T16:11:53.000Z | 2021-01-28T17:40:09.000Z | # This file is part of Frhodo. Copyright © 2020, UChicago Argonne, LLC
# and licensed under BSD-3-Clause. See License.txt in the top-level
# directory for license and copyright information.
from qtpy.QtWidgets import QMenu, QAction
from qtpy import QtCore, QtGui
from copy import deepcopy
from matplotlib import figu... | 42.682505 | 107 | 0.532284 |
188bb539c01da5b3fa8b6ba2eea0f8a30102db5c | 68,330 | py | Python | python/paddle/fluid/layers/tensor.py | LiYuRio/Paddle | dbd6e2df9d074973b7ee177e2d6b96ed2318008e | [
"Apache-2.0"
] | 1 | 2021-12-27T02:40:41.000Z | 2021-12-27T02:40:41.000Z | python/paddle/fluid/layers/tensor.py | LiYuRio/Paddle | dbd6e2df9d074973b7ee177e2d6b96ed2318008e | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/layers/tensor.py | LiYuRio/Paddle | dbd6e2df9d074973b7ee177e2d6b96ed2318008e | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2022 PaddlePaddle 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
#
# Unlessf required by ap... | 37.585259 | 162 | 0.566311 |
d9dab1f3a5663f6c37df62514f648412d7013960 | 7,282 | py | Python | code/abalation_study.py | fbenites/TRANSLIT | a1caffff2e7fef63ca4dfe8ff32eddbfb95b5678 | [
"CC0-1.0"
] | 4 | 2020-07-19T17:28:42.000Z | 2022-02-18T01:24:23.000Z | code/abalation_study.py | fbenites/TRANSLIT | a1caffff2e7fef63ca4dfe8ff32eddbfb95b5678 | [
"CC0-1.0"
] | 7 | 2021-03-19T11:38:23.000Z | 2022-03-12T00:19:20.000Z | code/abalation_study.py | fbenites/TRANSLIT | a1caffff2e7fef63ca4dfe8ff32eddbfb95b5678 | [
"CC0-1.0"
] | 2 | 2021-06-26T12:35:26.000Z | 2022-03-06T07:38:29.000Z | import shelve
import data_generator
def print_table(headers, rows):
print("\\begin{table}\n\\begin{tabular}{"+"".join(["|c|"]*len(headers))+"}\n")
print("&".join(headers)+"\\\\\n")
for row in rowHeaders:
print(row+"\\\\\n")
print("\\end{tabular}\n\\caption{}\n\\label{}\n\\end{table}\n")
... | 36.964467 | 174 | 0.602582 |
682392edbe8bdab7b518dfe3a063320260e059da | 989 | py | Python | courses/machine_learning/deepdive/08_image/flowersmodel/setup.py | joydeepmitra/Machine-Learning | ff887fae1e317e79c8e49208fc273c336cb79077 | [
"Apache-2.0"
] | 58 | 2019-05-16T00:12:11.000Z | 2022-03-14T06:12:12.000Z | courses/machine_learning/deepdive/08_image/flowersmodel/setup.py | joydeepmitra/Machine-Learning | ff887fae1e317e79c8e49208fc273c336cb79077 | [
"Apache-2.0"
] | 8 | 2020-01-28T22:26:41.000Z | 2022-02-09T23:48:28.000Z | courses/machine_learning/deepdive/08_image/flowersmodel/setup.py | joydeepmitra/Machine-Learning | ff887fae1e317e79c8e49208fc273c336cb79077 | [
"Apache-2.0"
] | 60 | 2018-12-10T20:59:36.000Z | 2022-02-01T03:18:01.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 30.90625 | 74 | 0.744186 |
15b31f79ff32e7d93927a308bb857a3a7ed0406f | 6,692 | py | Python | model/caption.py | Haochen-Luo/fairseq-image-captioning-master | 17ae057de992de869ba0bbb41dd5de0333fc6076 | [
"Apache-2.0"
] | 282 | 2019-11-28T13:44:05.000Z | 2022-03-26T17:34:35.000Z | model/caption.py | Haochen-Luo/fairseq-image-captioning-master | 17ae057de992de869ba0bbb41dd5de0333fc6076 | [
"Apache-2.0"
] | 29 | 2019-11-30T12:24:19.000Z | 2022-02-24T17:40:25.000Z | model/caption.py | Haochen-Luo/fairseq-image-captioning-master | 17ae057de992de869ba0bbb41dd5de0333fc6076 | [
"Apache-2.0"
] | 61 | 2020-01-21T14:35:46.000Z | 2022-03-19T17:01:18.000Z | import torch
import torch.nn.functional as F
from model import modules
from fairseq.models import FairseqEncoder, BaseFairseqModel
from fairseq.models import register_model, register_model_architecture, transformer
def create_padding_mask(src_tokens, src_lengths):
padding_mask = torch.zeros(src_tokens.shape[:2]... | 36.369565 | 103 | 0.661835 |
0454cd6e24e2c22fdcf4c0b5b66177bbbad8aa98 | 9,491 | py | Python | testdebug/testBase/testBase.py | telamonian/testdebug | 98b4bc8afaec2c86c859ad4f441934c19fe45be6 | [
"BSD-3-Clause"
] | null | null | null | testdebug/testBase/testBase.py | telamonian/testdebug | 98b4bc8afaec2c86c859ad4f441934c19fe45be6 | [
"BSD-3-Clause"
] | null | null | null | testdebug/testBase/testBase.py | telamonian/testdebug | 98b4bc8afaec2c86c859ad4f441934c19fe45be6 | [
"BSD-3-Clause"
] | null | null | null | import errno
import os
from pathlib import Path
import random
import shutil
from six import print_
import sys
import string
import tarfile
import time
import traceback
from .asserter import Asserter
__all__ = ['TestBase', 'color']
class _TextColor:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[... | 37.219608 | 206 | 0.622906 |
37e3ddde738e3bd481be64da1055982df624d6a7 | 106,361 | py | Python | salt/minion.py | styro/salt | d087d94dca02ca8bf53a6c21b94944bc7957522c | [
"Apache-2.0"
] | null | null | null | salt/minion.py | styro/salt | d087d94dca02ca8bf53a6c21b94944bc7957522c | [
"Apache-2.0"
] | null | null | null | salt/minion.py | styro/salt | d087d94dca02ca8bf53a6c21b94944bc7957522c | [
"Apache-2.0"
] | 1 | 2021-12-02T15:30:00.000Z | 2021-12-02T15:30:00.000Z | # -*- coding: utf-8 -*-
'''
Routines to set up a minion
'''
# Import python libs
from __future__ import absolute_import
from __future__ import print_function
import copy
import errno
import fnmatch
import hashlib
import logging
import multiprocessing
import os
import re
import salt
import signal
import sys
import threa... | 39.451409 | 127 | 0.535168 |
47e6c449f1d37b09711853d0578517bb712a3710 | 8,195 | py | Python | ionoscloud/models/ip_blocks.py | ionos-cloud/sdk-python | bb22b5b93505b25de6aebae97c523a6c2242ec2e | [
"Apache-2.0"
] | null | null | null | ionoscloud/models/ip_blocks.py | ionos-cloud/sdk-python | bb22b5b93505b25de6aebae97c523a6c2242ec2e | [
"Apache-2.0"
] | 6 | 2021-11-26T16:18:51.000Z | 2022-02-18T10:08:49.000Z | ionoscloud/models/ip_blocks.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.046205 | 568 | 0.570958 |
f8e43cd0986078e8447ad7eb02ce9cf35b2c6fd1 | 1,586 | py | Python | ebi/core.py | ray1005yb/ebi | 327121aefaad32f836ddc9344a1f0e16aa7c0c20 | [
"MIT"
] | 22 | 2015-11-20T06:47:26.000Z | 2021-06-02T03:35:43.000Z | ebi/core.py | ray1005yb/ebi | 327121aefaad32f836ddc9344a1f0e16aa7c0c20 | [
"MIT"
] | 10 | 2016-01-22T09:34:59.000Z | 2019-04-03T09:22:07.000Z | ebi/core.py | ray1005yb/ebi | 327121aefaad32f836ddc9344a1f0e16aa7c0c20 | [
"MIT"
] | 9 | 2015-11-30T02:34:27.000Z | 2020-03-11T08:28:44.000Z | from __future__ import absolute_import
from __future__ import print_function
import argparse
import logging
import boto3
from ebcli.lib import aws as ebaws
from .commands.bgdeploy import apply_args as apply_args_bgdeploy
from .commands.clonedeploy import apply_args as apply_args_clonedeploy
from .commands.create imp... | 30.5 | 70 | 0.753468 |
75d0ad44529f87d7e91e1657902e8daad33d7650 | 23,457 | py | Python | src/util/mar.py | yrahul3910/src | a8cf12d634cbe30e64aefeb9ed3cbfc56d55db40 | [
"MIT"
] | null | null | null | src/util/mar.py | yrahul3910/src | a8cf12d634cbe30e64aefeb9ed3cbfc56d55db40 | [
"MIT"
] | null | null | null | src/util/mar.py | yrahul3910/src | a8cf12d634cbe30e64aefeb9ed3cbfc56d55db40 | [
"MIT"
] | null | null | null | from __future__ import print_function, division
import pickle
from pdb import set_trace
import numpy as np
from sklearn.feature_extraction.text import TfidfVectorizer
import csv
from collections import Counter
from sklearn import svm
import matplotlib.pyplot as plt
import time
import os
class MAR(object):
... | 37.894992 | 143 | 0.517585 |
893b7894e961d9eca2d140b0194cb67f4bcdb84d | 348 | py | Python | centreOfMass.py | Robbie1977/NRRDtools | e16f1e49fccadc5f717f55b7c2c3dc49ec96f89f | [
"MIT"
] | 1 | 2015-02-23T11:41:45.000Z | 2015-02-23T11:41:45.000Z | centreOfMass.py | Robbie1977/NRRDtools | e16f1e49fccadc5f717f55b7c2c3dc49ec96f89f | [
"MIT"
] | 2 | 2016-04-07T11:07:01.000Z | 2016-06-24T13:23:24.000Z | centreOfMass.py | Robbie1977/NRRDtools | e16f1e49fccadc5f717f55b7c2c3dc49ec96f89f | [
"MIT"
] | null | null | null | import numpy as np
import sys, os
import nrrd
from scipy import ndimage
if (len(sys.argv) < 2):
print('Error: missing arguments!')
print('e.g. python centreOfMass.py imageIn.nrrd')
else:
Iin = str(sys.argv[1])
data1, header1 = nrrd.read(Iin)
print(list(np.array(ndimage.measurements.center_of_mass(... | 23.2 | 82 | 0.689655 |
fdc9f95b8a35d678ffca46744686cebdf5e981fe | 2,106 | py | Python | Examples/FilterProgressReporting/FilterProgressReporting.py | nathantspencer/SimpleElastix | a9641c1197e58a4ff614145e9ba5ca43c2833ebf | [
"Apache-2.0"
] | 350 | 2017-05-22T14:23:55.000Z | 2022-03-26T07:11:28.000Z | Examples/FilterProgressReporting/FilterProgressReporting.py | nathantspencer/SimpleElastix | a9641c1197e58a4ff614145e9ba5ca43c2833ebf | [
"Apache-2.0"
] | 382 | 2017-05-19T06:43:28.000Z | 2022-03-30T16:16:59.000Z | Examples/FilterProgressReporting/FilterProgressReporting.py | nathantspencer/SimpleElastix | a9641c1197e58a4ff614145e9ba5ca43c2833ebf | [
"Apache-2.0"
] | 121 | 2017-05-24T07:26:13.000Z | 2022-03-24T07:20:09.000Z | #!/usr/bin/env python
#=========================================================================
#
# Copyright NumFOCUS
#
# 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://... | 29.25 | 109 | 0.667142 |
ceac4936401713d7a8c857bb830f1b6e09c31efb | 13,810 | py | Python | visualise.py | simoncrowe/bookchain-network-visualisation | ce46db2596c31745bb8588ca84172a24b2789c10 | [
"BSD-3-Clause"
] | null | null | null | visualise.py | simoncrowe/bookchain-network-visualisation | ce46db2596c31745bb8588ca84172a24b2789c10 | [
"BSD-3-Clause"
] | 1 | 2021-06-01T23:35:33.000Z | 2021-06-01T23:35:33.000Z | visualise.py | simoncrowe/bookchain-network-visualisation | ce46db2596c31745bb8588ca84172a24b2789c10 | [
"BSD-3-Clause"
] | null | null | null | """Consumes queue-router's /traffic API and outputs an OpenGL visualisation
Adapted from: https://github.com/glumpy/glumpy/blob/master/examples/graph.py
"""
from collections import OrderedDict
import configparser
import json
import os
import random
import threading
from glumpy import app, collections
from glumpy.tra... | 31.457859 | 81 | 0.585663 |
12db50771487256b50f412ca46c79617ec01840d | 1,269 | py | Python | sprox/_widgetselector.py | carl-wallace/sprox | 69c8639b86318c28bbaad36125232d144d8be380 | [
"MIT"
] | 3 | 2015-07-03T16:31:22.000Z | 2018-04-19T04:26:02.000Z | sprox/_widgetselector.py | carl-wallace/sprox | 69c8639b86318c28bbaad36125232d144d8be380 | [
"MIT"
] | 8 | 2015-02-23T23:01:50.000Z | 2021-07-06T14:10:26.000Z | sprox/_widgetselector.py | carl-wallace/sprox | 69c8639b86318c28bbaad36125232d144d8be380 | [
"MIT"
] | 7 | 2015-06-14T04:07:53.000Z | 2020-04-28T13:50:50.000Z | """
widgetselecter Module
this contains the class which allows the ViewConfig to select the appropriate widget for the given field
Classes:
Name Description
WidgetSelecter Parent Class
SAWidgetSelector Selecter Based on sqlalchemy field types
Databas... | 25.38 | 104 | 0.72498 |
1edec41430d61099ab3400a63b0a30b857d6c741 | 158,653 | py | Python | tests/unit/gapic/firestore_admin_v1/test_firestore_admin.py | anna-hope/python-firestore | aa7594c93b2d7480ac4283a1d1abafe76aa7a353 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/firestore_admin_v1/test_firestore_admin.py | anna-hope/python-firestore | aa7594c93b2d7480ac4283a1d1abafe76aa7a353 | [
"Apache-2.0"
] | null | null | null | tests/unit/gapic/firestore_admin_v1/test_firestore_admin.py | anna-hope/python-firestore | aa7594c93b2d7480ac4283a1d1abafe76aa7a353 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 38.601703 | 124 | 0.690463 |
0bee5aa9fac99a34c397a885b845d21c7415f583 | 944 | py | Python | app/main/forms.py | mungai-joel/pitch | 495b328756d35dcd91e3c4b570c1de8c7e1a5dc2 | [
"MIT"
] | null | null | null | app/main/forms.py | mungai-joel/pitch | 495b328756d35dcd91e3c4b570c1de8c7e1a5dc2 | [
"MIT"
] | null | null | null | app/main/forms.py | mungai-joel/pitch | 495b328756d35dcd91e3c4b570c1de8c7e1a5dc2 | [
"MIT"
] | null | null | null | from flask_wtf import FlaskForm
from wtforms import StringField, TextAreaField, SubmitField, SelectField
from wtforms.validators import Required
class PitchForm(FlaskForm):
pitch = TextAreaField('Your Pitch', validators=[Required()])
# my_category = StringField('Category', validators=[Required()])
my_categ... | 55.529412 | 308 | 0.733051 |
b553ad9eef0d2ca3c3a7c8b84fa0bc133c09169f | 611 | py | Python | dreifaltigkeit/migrations/0014_auto_20200410_1008.py | normanjaeckel/Dreifaltigkeit2 | e9fb94a6ace8e11da85ba20fd296a283ffeea931 | [
"MIT"
] | null | null | null | dreifaltigkeit/migrations/0014_auto_20200410_1008.py | normanjaeckel/Dreifaltigkeit2 | e9fb94a6ace8e11da85ba20fd296a283ffeea931 | [
"MIT"
] | 6 | 2021-03-18T20:44:28.000Z | 2022-02-10T07:19:35.000Z | dreifaltigkeit/migrations/0014_auto_20200410_1008.py | normanjaeckel/Dreifaltigkeit2 | e9fb94a6ace8e11da85ba20fd296a283ffeea931 | [
"MIT"
] | null | null | null | # Generated by Django 2.2.12 on 2020-04-10 08:08
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("dreifaltigkeit", "0013_clericalwordaudiofile_hidden")]
operations = [
migrations.AlterField(
model_name="event",
name="content",... | 29.095238 | 155 | 0.610475 |
64b2b237d9fdfbf18752e053dc8210241c0d5cae | 2,279 | py | Python | app.py | mayankrajcu/Authentication-User-and-Login-using-BCrypt-and-WerkZeug-Packages | bf6695b34af000e2f2a0058f78a85cea7603deed | [
"MIT"
] | 1 | 2019-07-23T18:59:31.000Z | 2019-07-23T18:59:31.000Z | Flask/07-User-Authentication/01-Flask-Login/app.py | Sandy1811/demandforecasting | fdb6878d93502773ba8da809c2de1b33c96fb9a0 | [
"Apache-2.0"
] | 8 | 2021-02-08T20:32:03.000Z | 2022-03-11T23:56:31.000Z | Flask/07-User-Authentication/01-Flask-Login/app.py | Sandy1811/demandforecasting | fdb6878d93502773ba8da809c2de1b33c96fb9a0 | [
"Apache-2.0"
] | null | null | null | from myproject import app,db
from flask import render_template, redirect, request, url_for, flash,abort
from flask_login import login_user,login_required,logout_user
from myproject.models import User
from myproject.forms import LoginForm, RegistrationForm
from werkzeug.security import generate_password_hash, check_pass... | 30.797297 | 80 | 0.652918 |
c8d83832e4ceddc8185f597fd3db45954b2662ea | 1,829 | py | Python | teaching-asistant evaluation.py | turhansel/teaching-asistant-evaluation | a18dbc7f4743e84c0451dc51aa0a599256991e5e | [
"MIT"
] | 2 | 2021-03-17T12:39:46.000Z | 2022-02-23T20:34:43.000Z | teaching-asistant evaluation.py | turhansel/teaching-asistant-evaluation | a18dbc7f4743e84c0451dc51aa0a599256991e5e | [
"MIT"
] | null | null | null | teaching-asistant evaluation.py | turhansel/teaching-asistant-evaluation | a18dbc7f4743e84c0451dc51aa0a599256991e5e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Wed Jun 24 16:35:19 2020
@author: Turhan
"""
import pandas as pd
#Veri Hazırlama
sutun = ["anadil","egitmen","kurs","donemi"
,"sinifbuyuklugu","sinifozelligi"
]
veri = pd.read_csv("tae.data", names=sutun)
girdiler = veri.iloc[:,0:-1:]
hedef = veri... | 29.983607 | 87 | 0.734281 |
a8c0c684252cac1254090495e66acf9d868fef24 | 12,589 | py | Python | Miscellaneous_Tools/JobScript_Creator/JobScript_Creator_Class.py | The-Kristina/CellComp | 29ec7690e0d9adb1a6214937ca41fd1dadce18c6 | [
"CNRI-Python",
"RSA-MD",
"Xnet",
"Net-SNMP",
"X11"
] | 7 | 2019-05-13T10:07:44.000Z | 2022-03-01T16:20:48.000Z | Miscellaneous_Tools/JobScript_Creator/JobScript_Creator_Class.py | The-Kristina/CellComp | 29ec7690e0d9adb1a6214937ca41fd1dadce18c6 | [
"CNRI-Python",
"RSA-MD",
"Xnet",
"Net-SNMP",
"X11"
] | null | null | null | Miscellaneous_Tools/JobScript_Creator/JobScript_Creator_Class.py | The-Kristina/CellComp | 29ec7690e0d9adb1a6214937ca41fd1dadce18c6 | [
"CNRI-Python",
"RSA-MD",
"Xnet",
"Net-SNMP",
"X11"
] | 3 | 2020-04-23T18:13:20.000Z | 2020-11-11T18:46:48.000Z | # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# ----- Job Script Creator for SegClass & Tracking Jobs ----- #
# #
# ----- Creator : Kristina ULICNA ----- #
... | 48.984436 | 236 | 0.583525 |
1d3a6d14986cdd475d4a259f304e5640747ba8df | 962 | py | Python | kubernetes/test/test_v1_attached_volume.py | anemerovsky-essextec/python | 6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_attached_volume.py | anemerovsky-essextec/python | 6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c | [
"Apache-2.0"
] | null | null | null | kubernetes/test/test_v1_attached_volume.py | anemerovsky-essextec/python | 6e40b9169b27c3f1f9422c0f6dd1cd9caef8d57c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.12.1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import os
import sys
i... | 21.377778 | 105 | 0.70894 |
f2e484a96fff7582a7ab2c55297a8ccb082729a0 | 564 | py | Python | testagent/parser/exceptions/__init__.py | patriziotufarolo/testagent | daf1a56bd208704dfd61d4c9f779f4ad7ee7d6cd | [
"BSD-3-Clause"
] | 1 | 2016-07-12T15:34:36.000Z | 2016-07-12T15:34:36.000Z | testagent/parser/exceptions/__init__.py | patriziotufarolo/testagent | daf1a56bd208704dfd61d4c9f779f4ad7ee7d6cd | [
"BSD-3-Clause"
] | null | null | null | testagent/parser/exceptions/__init__.py | patriziotufarolo/testagent | daf1a56bd208704dfd61d4c9f779f4ad7ee7d6cd | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of cumulus-testagent.
# https://github.com/patriziotufarolo/cumulus-testagent
# Licensed under the MIT license:
# http://www.opensource.org/licenses/MIT-license
# Copyright (c) 2015, Patrizio Tufarolo <patrizio.tufarolo@studenti.unimi.it>
from testage... | 40.285714 | 89 | 0.820922 |
1158ba968d56c57b059ff581d95dc90005942bd2 | 10,157 | py | Python | nutszebra_initialization.py | nutszebra/trainer | 9359c6ed01c5dad832e957e0adc1a41c79967044 | [
"MIT"
] | 5 | 2016-12-25T02:55:28.000Z | 2018-05-30T10:40:36.000Z | nutszebra_initialization.py | nutszebra/trainer | 9359c6ed01c5dad832e957e0adc1a41c79967044 | [
"MIT"
] | null | null | null | nutszebra_initialization.py | nutszebra/trainer | 9359c6ed01c5dad832e957e0adc1a41c79967044 | [
"MIT"
] | 2 | 2017-12-14T19:45:04.000Z | 2019-08-24T03:19:35.000Z | import numpy as np
class Initialization(object):
"""Some useful functions for initialization
Attributes:
"""
def __init__(self):
pass
@staticmethod
def gauss(sizes, variance=0.01, mean=0.0, dtype=np.float32):
"""Give numpy.ndarray back that are initialized with the gaussian... | 29.526163 | 106 | 0.539431 |
2d40155b91d85d6057d93efcb199bfa54f5cac41 | 1,058 | py | Python | sdk/python/pulumi_azure_native/aadiam/v20170401/__init__.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/aadiam/v20170401/__init__.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/aadiam/v20170401/__init__.py | pulumi-bot/pulumi-azure-native | f7b9490b5211544318e455e5cceafe47b628e12c | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
# Export this package's modules as members:
from ._enums import *
from .diagnostic_setting import *
from .get_diagnostic_setting import *
from ._inputs... | 31.117647 | 97 | 0.687146 |
2188223cbd2ee0711d5d7acb7cbae5ac6d2d7d8d | 550 | py | Python | 2019/day1/fuel.py | scrubskip/adventofcode2018 | 8149908d1239759597fda575432cf3ec99019dc0 | [
"Apache-2.0"
] | null | null | null | 2019/day1/fuel.py | scrubskip/adventofcode2018 | 8149908d1239759597fda575432cf3ec99019dc0 | [
"Apache-2.0"
] | null | null | null | 2019/day1/fuel.py | scrubskip/adventofcode2018 | 8149908d1239759597fda575432cf3ec99019dc0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
#
def main():
modules = open("day1input.txt", "r")
requirement_sum = 0
for module in modules.readlines():
requirement_sum += get_fuel_requirement_inclusive(module)
return requirement_sum
def get_fuel_requirement(mass):
return int(int(mass) / 3) - 2
def get_fuel_r... | 18.965517 | 65 | 0.658182 |
155d6aa235fd0459c3b2855dbc58e4697ed98083 | 12,066 | py | Python | tests/python/unittest/test_meta_schedule_integration.py | psrivas2/relax | 4329af78eb1dc4c4ff8a61d3bf39aa4034e9cb2a | [
"Apache-2.0"
] | 11 | 2021-11-02T00:49:16.000Z | 2021-11-19T02:17:00.000Z | tests/python/unittest/test_meta_schedule_integration.py | psrivas2/relax | 4329af78eb1dc4c4ff8a61d3bf39aa4034e9cb2a | [
"Apache-2.0"
] | 16 | 2021-11-02T00:17:12.000Z | 2021-11-21T20:47:52.000Z | tests/python/unittest/test_meta_schedule_integration.py | psrivas2/relax | 4329af78eb1dc4c4ff8a61d3bf39aa4034e9cb2a | [
"Apache-2.0"
] | 4 | 2021-11-05T18:17:23.000Z | 2021-11-11T06:22:00.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 33.798319 | 139 | 0.606746 |
aaacf8cf1561b3cb5b5fe29bb82daf18df921ea7 | 33 | py | Python | application/routes/__init__.py | agu3rra/flask-starter | 87c42dbd0d7709abb17c90ff794c18256c428b56 | [
"MIT"
] | null | null | null | application/routes/__init__.py | agu3rra/flask-starter | 87c42dbd0d7709abb17c90ff794c18256c428b56 | [
"MIT"
] | null | null | null | application/routes/__init__.py | agu3rra/flask-starter | 87c42dbd0d7709abb17c90ff794c18256c428b56 | [
"MIT"
] | null | null | null | from .users import users_resource | 33 | 33 | 0.878788 |
ee121e75cc5d6a0582e80feda13c2572333ce08f | 12,095 | py | Python | mojo/public/tools/bindings/generators/mojom_java_generator.py | aranajhonny/chromium | caf5bcb822f79b8997720e589334266551a50a13 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2019-01-16T03:57:39.000Z | 2019-01-16T03:57:39.000Z | mojo/public/tools/bindings/generators/mojom_java_generator.py | aranajhonny/chromium | caf5bcb822f79b8997720e589334266551a50a13 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2018-02-10T21:00:08.000Z | 2018-03-20T05:09:50.000Z | mojo/public/tools/bindings/generators/mojom_java_generator.py | aranajhonny/chromium | caf5bcb822f79b8997720e589334266551a50a13 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | # Copyright 2014 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.
"""Generates java source files from a mojom.Module."""
import argparse
import ast
import os
import re
from jinja2 import contextfilter
import mojom.genera... | 33.228022 | 80 | 0.681852 |
824cf717f576a06322541a36196caa296d66c574 | 6,030 | py | Python | graphs/bidirectional_breadth_first_search.py | TeddyFirman/Algorithm_Python | edbd50a97a62c2beb2a187e4c411c677aa43115e | [
"MIT"
] | null | null | null | graphs/bidirectional_breadth_first_search.py | TeddyFirman/Algorithm_Python | edbd50a97a62c2beb2a187e4c411c677aa43115e | [
"MIT"
] | null | null | null | graphs/bidirectional_breadth_first_search.py | TeddyFirman/Algorithm_Python | edbd50a97a62c2beb2a187e4c411c677aa43115e | [
"MIT"
] | null | null | null | """
https://en.wikipedia.org/wiki/Bidirectional_search
"""
from __future__ import annotations
import time
Path = list[tuple[int, int]]
grid = [
[0, 0, 0, 0, 0, 0, 0],
[0, 1, 0, 0, 0, 0, 0], # 0 are free path whereas 1's are obstacles
[0, 0, 0, 0, 0, 0, 0],
[0, 0, 1, 0, 0, 0, 0],
[1... | 32.594595 | 85 | 0.536153 |
96cbd9fe9f50214426c78227efa6711647bfb225 | 2,175 | py | Python | tts/plotting_utils.py | flagship-open/emotional_TTS | d153af1c842892e0cd1f19c1e6ea1e6e48a49686 | [
"MIT"
] | null | null | null | tts/plotting_utils.py | flagship-open/emotional_TTS | d153af1c842892e0cd1f19c1e6ea1e6e48a49686 | [
"MIT"
] | null | null | null | tts/plotting_utils.py | flagship-open/emotional_TTS | d153af1c842892e0cd1f19c1e6ea1e6e48a49686 | [
"MIT"
] | 1 | 2021-09-09T06:38:05.000Z | 2021-09-09T06:38:05.000Z | import matplotlib
matplotlib.use("Agg")
import matplotlib.pylab as plt
import numpy as np
def save_figure_to_numpy(fig):
# save it to a numpy array.
data = np.fromstring(fig.canvas.tostring_rgb(), dtype=np.uint8, sep='')
data = data.reshape(fig.canvas.get_width_height()[::-1] + (3,))
return data
def... | 28.246753 | 75 | 0.646437 |
a2f0e5a1ef2a980118d0d95b3bb1fff5e4941bff | 2,441 | py | Python | evaluate_test_chemprop.py | cbilodeau2/g2g_optimization | c4afbc141285f4b8241e75c53a1eaa83df7d6ab6 | [
"MIT"
] | 6 | 2020-12-17T20:52:47.000Z | 2022-03-25T12:39:15.000Z | evaluate_test_chemprop.py | cbilodeau2/g2g_optimization | c4afbc141285f4b8241e75c53a1eaa83df7d6ab6 | [
"MIT"
] | null | null | null | evaluate_test_chemprop.py | cbilodeau2/g2g_optimization | c4afbc141285f4b8241e75c53a1eaa83df7d6ab6 | [
"MIT"
] | 1 | 2021-06-27T11:52:15.000Z | 2021-06-27T11:52:15.000Z | import rdkit
import argparse
import pickle
import os
from g2g_optimization.train.decode import decode
from g2g_optimization.train.args import read_args
from g2g_optimization.hgraph import common_atom_vocab
from g2g_optimization.train.evaluate_chemprop import evaluate_chemprop
lg = rdkit.RDLogger.logger()
lg.setLevel... | 40.683333 | 124 | 0.76526 |
d4259cffc38c0e709e56f5dc2325abcde43984fd | 4,046 | py | Python | tidy.py | rgosens2/cpp-fqa | a18c33e1f2681b52df2324f772ca039482583537 | [
"BSD-2-Clause"
] | null | null | null | tidy.py | rgosens2/cpp-fqa | a18c33e1f2681b52df2324f772ca039482583537 | [
"BSD-2-Clause"
] | null | null | null | tidy.py | rgosens2/cpp-fqa | a18c33e1f2681b52df2324f772ca039482583537 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
import os, subprocess
fqas = [f for f in os.listdir(".") if f.endswith(".fqa")]
htmls = [f[:-4] + ".html" for f in fqas] + ["fqa.html"]
files = htmls # ['function.html']
# doesn't help with bitexact since we use a new fqa2html anyway.
# bitexactexc = [line.split()[0] for line in open('..\\post... | 41.71134 | 106 | 0.675729 |
8d792883b811ff5b90a406aa72b634cefea2d72a | 3,393 | py | Python | my_instagram/models.py | kd-kinuthiadavid/testing-deploy-ig-clone | 529676e654b0a9b304a4ada6b6664eb439c8cb4c | [
"MIT"
] | null | null | null | my_instagram/models.py | kd-kinuthiadavid/testing-deploy-ig-clone | 529676e654b0a9b304a4ada6b6664eb439c8cb4c | [
"MIT"
] | null | null | null | my_instagram/models.py | kd-kinuthiadavid/testing-deploy-ig-clone | 529676e654b0a9b304a4ada6b6664eb439c8cb4c | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib.auth.models import User
import datetime as dt
# Create your models here.
# class Image(models.Model):
# '''
# Image model
# '''
# image = models.ImageField(upload_to='gallery/')
# image_url = models.TextField()
# name = models.CharField(max_len... | 28.754237 | 101 | 0.690245 |
77a67ed73a92c1713e5dd02f4cb1331af583d5cc | 1,356 | py | Python | fleet-rec/fleetrec/core/reader.py | ZHUI/Fleet | 382c04c40866cfa8ead3d996eaefbfb4575362bd | [
"Apache-2.0"
] | 1 | 2020-04-28T08:04:07.000Z | 2020-04-28T08:04:07.000Z | fleet-rec/fleetrec/core/reader.py | ZHUI/Fleet | 382c04c40866cfa8ead3d996eaefbfb4575362bd | [
"Apache-2.0"
] | null | null | null | fleet-rec/fleetrec/core/reader.py | ZHUI/Fleet | 382c04c40866cfa8ead3d996eaefbfb4575362bd | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle 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 app... | 29.478261 | 74 | 0.713864 |
9f289bf0c17e3e28950602c5a48f12d744029b0a | 12,566 | py | Python | flow_sdk/model/container/workload_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | 5 | 2019-07-31T04:11:05.000Z | 2021-01-07T03:23:20.000Z | flow_sdk/model/container/workload_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | flow_sdk/model/container/workload_pb2.py | easyopsapis/easyops-api-python | adf6e3bad33fa6266b5fa0a449dd4ac42f8447d0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: workload.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.protobuf im... | 57.378995 | 1,522 | 0.769378 |
421a0283967bbb1b0bfd73857a8948f77cc06b13 | 2,848 | py | Python | gen_browser_header/main/GenHeader.py | zwzw911/gen-browser-header | bf0f1d3a71ba68842e889ec5e0718672796b0ecb | [
"MIT"
] | null | null | null | gen_browser_header/main/GenHeader.py | zwzw911/gen-browser-header | bf0f1d3a71ba68842e889ec5e0718672796b0ecb | [
"MIT"
] | null | null | null | gen_browser_header/main/GenHeader.py | zwzw911/gen-browser-header | bf0f1d3a71ba68842e889ec5e0718672796b0ecb | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
# -*- coding:utf-8 -*-
import gen_browser_header.main.GenUA as gen_ua
import gen_browser_header.self.SelfEnum as self_enum
import gen_browser_header.helper.Helper as gbh_helper
def gen_header(setting, url, num=None):
'''
:param setting:
:param url: 根据url生成host
:param num:
... | 37.973333 | 105 | 0.61236 |
8bbd4f5800edb493ba615ce8225500e8ab10781a | 14,368 | py | Python | google/cloud/securitycenter_v1p1beta1/proto/notification_config_pb2.py | tmatsuo/python-securitycenter | dbb9311676003f452295848c49cbe97cb22c47b5 | [
"Apache-2.0"
] | null | null | null | google/cloud/securitycenter_v1p1beta1/proto/notification_config_pb2.py | tmatsuo/python-securitycenter | dbb9311676003f452295848c49cbe97cb22c47b5 | [
"Apache-2.0"
] | null | null | null | google/cloud/securitycenter_v1p1beta1/proto/notification_config_pb2.py | tmatsuo/python-securitycenter | dbb9311676003f452295848c49cbe97cb22c47b5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/cloud/securitycenter_v1p1beta1/proto/notification_config.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.proto... | 41.889213 | 1,451 | 0.676782 |
7b21abb4b5602a83cde9cf644352c3e7c51915e4 | 2,265 | py | Python | blender/arm/logicnode/transform/LN_rotate_object.py | notwarp/armory | bd6078e3035eefcb3c725664698eeb369b4c2d88 | [
"Zlib"
] | null | null | null | blender/arm/logicnode/transform/LN_rotate_object.py | notwarp/armory | bd6078e3035eefcb3c725664698eeb369b4c2d88 | [
"Zlib"
] | null | null | null | blender/arm/logicnode/transform/LN_rotate_object.py | notwarp/armory | bd6078e3035eefcb3c725664698eeb369b4c2d88 | [
"Zlib"
] | null | null | null | from arm.logicnode.arm_nodes import *
class RotateObjectNode(ArmLogicTreeNode):
"""Rotates the given object."""
bl_idname = 'LNRotateObjectNode'
bl_label = 'Rotate Object'
arm_section = 'rotation'
arm_version = 1
def init(self, context):
super().init(context)
self.add_input('Ar... | 45.3 | 125 | 0.625607 |
506f6318b9c59e3de825b7c8b782e01811ad6bfe | 1,053 | py | Python | skdecide/builders/discrete_optimization/vrp/solver/greedy_vrp.py | galleon/bug-free-invention | 37bcea112da39d1390ff2b30951b36ee5dbc0e6d | [
"MIT"
] | null | null | null | skdecide/builders/discrete_optimization/vrp/solver/greedy_vrp.py | galleon/bug-free-invention | 37bcea112da39d1390ff2b30951b36ee5dbc0e6d | [
"MIT"
] | null | null | null | skdecide/builders/discrete_optimization/vrp/solver/greedy_vrp.py | galleon/bug-free-invention | 37bcea112da39d1390ff2b30951b36ee5dbc0e6d | [
"MIT"
] | null | null | null | from skdecide.builders.discrete_optimization.generic_tools.do_solver import SolverDO, ResultStorage
from skdecide.builders.discrete_optimization.generic_tools.do_problem import ParamsObjectiveFunction, \
build_aggreg_function_and_params_objective
from skdecide.builders.discrete_optimization.vrp.vrp_model import Vrp... | 55.421053 | 107 | 0.745489 |
7b2184ba75f3cf5c13363e12598623b4554af002 | 406 | py | Python | .github/write_target_url.py | Social-Tech-Collab/socialtechcollaborative | 01c540b4c378ceec5bf777ede4004e88e21a44c8 | [
"MIT"
] | null | null | null | .github/write_target_url.py | Social-Tech-Collab/socialtechcollaborative | 01c540b4c378ceec5bf777ede4004e88e21a44c8 | [
"MIT"
] | 12 | 2020-05-07T23:37:34.000Z | 2022-02-26T08:27:13.000Z | .github/write_target_url.py | socialtechus/socialtechus.github.io | 999218f1802409cbc8dcc28f414aabbf554e8641 | [
"MIT"
] | 1 | 2020-05-16T06:42:06.000Z | 2020-05-16T06:42:06.000Z | import requests
import json
with open("payload.json") as file:
test = json.load(file)
pr_url = test['pull_request']['url']
pr_content = json.loads(requests.get(pr_url).content)
status_url = pr_content['statuses_url']
latest_status = json.loads(requests.get(status_url).content)[0]
latest_status['target_url']
... | 27.066667 | 63 | 0.736453 |
c47ee9fa3860af5f82b56cee6a848e2bef1ecb1b | 4,618 | py | Python | saas/blueking/component/apis/sops.py | nannan00/bk-iam-saas | 217600fa6e5fd466fff9c33c20c4dbd7c69f77d9 | [
"MIT"
] | 7 | 2021-08-13T03:48:16.000Z | 2021-12-20T15:31:38.000Z | saas/blueking/component/apis/sops.py | nannan00/bk-iam-saas | 217600fa6e5fd466fff9c33c20c4dbd7c69f77d9 | [
"MIT"
] | 456 | 2021-08-16T02:13:57.000Z | 2022-03-30T10:02:49.000Z | saas/blueking/component/apis/sops.py | nannan00/bk-iam-saas | 217600fa6e5fd466fff9c33c20c4dbd7c69f77d9 | [
"MIT"
] | 17 | 2021-08-10T04:08:46.000Z | 2022-03-14T14:24:36.000Z | # -*- coding: utf-8 -*-
"""
TencentBlueKing is pleased to support the open source community by making 蓝鲸智云-权限中心(BlueKing-IAM) available.
Copyright (C) 2017-2021 THL A29 Limited, a Tencent company. All rights reserved.
Licensed under the MIT License (the "License"); you may not use this file except in compliance with th... | 43.566038 | 115 | 0.622347 |
c12b10b256019728b02ce7424c177b1a978eb082 | 2,176 | py | Python | ports/esp32/boards/TTGO_LORA/modules/bios.py | ondiiik/micropython-twatch-2020 | fb526a1ed19a741354e9552a4c077c2b832d4c4f | [
"MIT"
] | 1 | 2021-10-07T16:17:28.000Z | 2021-10-07T16:17:28.000Z | ports/esp32/boards/TTGO_LORA/modules/bios.py | ondiiik/micropython-twatch-2020 | fb526a1ed19a741354e9552a4c077c2b832d4c4f | [
"MIT"
] | 1 | 2021-05-22T15:33:56.000Z | 2021-05-23T13:33:05.000Z | ports/esp32/boards/TTGO_LORA/modules/bios.py | ondiiik/micropython-twatch-2020 | fb526a1ed19a741354e9552a4c077c2b832d4c4f | [
"MIT"
] | null | null | null | # Copyright 2020 LeMaRiva|tech lemariva.com
#
# 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 agr... | 35.672131 | 77 | 0.497702 |
1da80cd45289568a51cb0696e6a524e1d5061e4d | 988 | py | Python | bin/scrape_software_versions.py | nf-core/scflow | 5b128d6fdf1b35af28159bc76d1cd7432f6647e2 | [
"MIT"
] | 9 | 2020-12-09T11:53:02.000Z | 2021-11-18T15:53:48.000Z | bin/scrape_software_versions.py | combiz/nf-core-scflow | 374726161fe2d681c835274d332f043d4d38df5b | [
"MIT"
] | 16 | 2020-03-12T15:16:01.000Z | 2021-07-23T17:00:42.000Z | bin/scrape_software_versions.py | nf-core/scflow | 5b128d6fdf1b35af28159bc76d1cd7432f6647e2 | [
"MIT"
] | 4 | 2021-04-22T14:54:45.000Z | 2021-08-30T13:44:29.000Z | #!/usr/bin/env python
from __future__ import print_function
import os
results = {}
version_files = [x for x in os.listdir(".") if x.endswith(".version.txt")]
for version_file in version_files:
software = version_file.replace(".version.txt", "")
if software == "pipeline":
software = "nf-core/scflow"
... | 26.702703 | 74 | 0.644737 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.