hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | 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 3 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
2981c0d7db082728c69505a339fd5c5214978ef0 | 758 | py | Python | agent.py | shukia/2048-python | e6385ea3749098a418198e727e6976dccf344960 | [
"MIT"
] | null | null | null | agent.py | shukia/2048-python | e6385ea3749098a418198e727e6976dccf344960 | [
"MIT"
] | null | null | null | agent.py | shukia/2048-python | e6385ea3749098a418198e727e6976dccf344960 | [
"MIT"
] | null | null | null | from logic import *
class Agent:
def __init__(self):
self.matrix = []
self.score = 0
def initialize_game(self):
self.score = 0
self.matrix = new_game(4)
self.matrix = add_two(self.matrix)
self.matrix = add_two(self.matrix)
def move(self, direction):
... | 29.153846 | 79 | 0.64248 | 734 | 0.968338 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
29843af5e308c3a6a1b810c3658616edbb2840d2 | 2,234 | py | Python | config/synthia_rand_cityscapes.py | BarracudaPff/code-golf-data-pythpn | 42e8858c2ebc6a061012bcadb167d29cebb85c5e | [
"MIT"
] | null | null | null | config/synthia_rand_cityscapes.py | BarracudaPff/code-golf-data-pythpn | 42e8858c2ebc6a061012bcadb167d29cebb85c5e | [
"MIT"
] | null | null | null | config/synthia_rand_cityscapes.py | BarracudaPff/code-golf-data-pythpn | 42e8858c2ebc6a061012bcadb167d29cebb85c5e | [
"MIT"
] | null | null | null | problem_type = "segmentation"
dataset_name = "synthia_rand_cityscapes"
dataset_name2 = None
perc_mb2 = None
model_name = "resnetFCN"
freeze_layers_from = None
show_model = False
load_imageNet = True
load_pretrained = False
weights_file = "weights.hdf5"
train_model = True
test_model = True
pred_model = False
debug = Tru... | 24.822222 | 42 | 0.821844 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 132 | 0.059087 |
2986e8913a7519f773b1d594848f51448026d50a | 583 | py | Python | utils/HTMLParser.py | onyb/janitor | a46f3bf23467a27c6f5891b64c797295e5cc47d0 | [
"Apache-2.0"
] | null | null | null | utils/HTMLParser.py | onyb/janitor | a46f3bf23467a27c6f5891b64c797295e5cc47d0 | [
"Apache-2.0"
] | null | null | null | utils/HTMLParser.py | onyb/janitor | a46f3bf23467a27c6f5891b64c797295e5cc47d0 | [
"Apache-2.0"
] | null | null | null | from bs4 import BeautifulSoup
from optimizers.AdvancedJSOptimizer import AdvancedJSOptimizer
from optimizers.CSSOptimizer import CSSOptimizer
class HTMLParser(object):
def __init__(self, html):
self.soup = BeautifulSoup(html, 'lxml')
def js_parser(self):
for script in self.soup.find_all('scri... | 32.388889 | 62 | 0.680961 | 439 | 0.753002 | 0 | 0 | 0 | 0 | 0 | 0 | 21 | 0.036021 |
461e4085634d8de9c3e950613c2eaf835255268d | 5,590 | py | Python | spades/main.py | kuwv/spades | 9c36eff2c8fe2e4acc69a317d0c58bb8e1c2373f | [
"Apache-2.0"
] | null | null | null | spades/main.py | kuwv/spades | 9c36eff2c8fe2e4acc69a317d0c58bb8e1c2373f | [
"Apache-2.0"
] | null | null | null | spades/main.py | kuwv/spades | 9c36eff2c8fe2e4acc69a317d0c58bb8e1c2373f | [
"Apache-2.0"
] | null | null | null | '''Provide interface for game.'''
from typing import Any, Dict, List, Optional, Union
import flask
from flask import Blueprint, url_for
from flask_login import current_user, login_required
from flask_wtf import FlaskForm
from flask_sse import sse
from werkzeug.wrappers import Response
from wtforms import IntegerField... | 31.055556 | 78 | 0.617352 | 364 | 0.065116 | 0 | 0 | 3,428 | 0.613238 | 0 | 0 | 1,138 | 0.203578 |
461e9e37802d7e3293cd85e18609ca2b81610862 | 341 | gyp | Python | cluster-1.59/heatmap_clustering/binding.gyp | ericaflin/libheatmap | 18a1aadf4d4cea68f9fd6da20ae858479cf90dab | [
"MIT"
] | 2 | 2020-08-13T19:00:03.000Z | 2021-08-24T06:50:47.000Z | cluster-1.59/heatmap_clustering/binding.gyp | ericaflin/libheatmap | 18a1aadf4d4cea68f9fd6da20ae858479cf90dab | [
"MIT"
] | null | null | null | cluster-1.59/heatmap_clustering/binding.gyp | ericaflin/libheatmap | 18a1aadf4d4cea68f9fd6da20ae858479cf90dab | [
"MIT"
] | null | null | null | {
"targets": [
{
"target_name": "cclust",
"sources": [ "./src/heatmap_clustering_js_module.cpp" ],
'dependencies': ['bonsaiclust']
},
{
'target_name': 'bonsaiclust',
'type': 'static_library',
'sources': [ 'src/cluster.c' ],
'cflags': ['-fPIC', '-I', '-pedantic', '... | 20.058824 | 62 | 0.495601 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 215 | 0.630499 |
461ea3bb055956b5f646cce50edcc52ff396af68 | 4,041 | py | Python | pcg_gazebo/parsers/urdf/__init__.py | TForce1/pcg_gazebo | 9ff88016b7b6903236484958ca7c6ed9f8ffb346 | [
"ECL-2.0",
"Apache-2.0"
] | 40 | 2020-02-04T18:16:49.000Z | 2022-02-22T11:36:34.000Z | pcg_gazebo/parsers/urdf/__init__.py | awesomebytes/pcg_gazebo | 4f335dd460ef7c771f1df78b46a92fad4a62cedc | [
"ECL-2.0",
"Apache-2.0"
] | 75 | 2020-01-23T13:40:50.000Z | 2022-02-09T07:26:01.000Z | pcg_gazebo/parsers/urdf/__init__.py | GimpelZhang/gazebo_world_generator | eb7215499d0ddc972d804c988fadab1969579b1b | [
"ECL-2.0",
"Apache-2.0"
] | 18 | 2020-09-10T06:35:41.000Z | 2022-02-20T19:08:17.000Z | # Copyright (c) 2019 - The Procedural Generation for Gazebo authors
# For information on the respective copyright owner see the NOTICE file
#
# 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
#
#... | 26.411765 | 74 | 0.675823 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,629 | 0.403118 |
461f2a3e6e5c1ff2b9ea5f5bf6bd2c1511d2a0ba | 514 | py | Python | homework/supporting.py | viaviare/MyFirstRepository | dab8530d16ab9746471b61b61e006d9febfed195 | [
"Unlicense"
] | null | null | null | homework/supporting.py | viaviare/MyFirstRepository | dab8530d16ab9746471b61b61e006d9febfed195 | [
"Unlicense"
] | null | null | null | homework/supporting.py | viaviare/MyFirstRepository | dab8530d16ab9746471b61b61e006d9febfed195 | [
"Unlicense"
] | null | null | null | from selenium.webdriver.support.wait import WebDriverWait
from selenium.common.exceptions import NoSuchElementException
class Supporting:
def __init__(self, driver):
self.driver = driver
self.wait = WebDriverWait(driver, 10)
def is_element_present(self, driver, *args):
try:
... | 24.47619 | 61 | 0.677043 | 392 | 0.762646 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4620512d639e2a5d97e4f0f0858dfee7bfe3ebb2 | 1,516 | py | Python | vplsSinVlan.py | javicond3/mininetVPLS | 73164f175d2a1873ccab2a317bd09aa5d09bdda6 | [
"Unlicense"
] | null | null | null | vplsSinVlan.py | javicond3/mininetVPLS | 73164f175d2a1873ccab2a317bd09aa5d09bdda6 | [
"Unlicense"
] | null | null | null | vplsSinVlan.py | javicond3/mininetVPLS | 73164f175d2a1873ccab2a317bd09aa5d09bdda6 | [
"Unlicense"
] | null | null | null | """Custom topology example
Two directly connected switches plus a host for each switch:
host --- switch --- switch --- host
Adding the 'topos' dict with a key/value pair to generate our newly defined
topology enables one to pass in '--topo=mytopo' from the command line.
"""
from mininet.topo import Topo
class M... | 26.137931 | 75 | 0.582454 | 1,157 | 0.763193 | 0 | 0 | 0 | 0 | 0 | 0 | 456 | 0.300792 |
46209cb73578b98d96c50b38e0aa7cf17f602e19 | 2,404 | py | Python | modin/engines/base/io/column_stores/feather_dispatcher.py | webclinic017/modin | 6e38ae4f459660460d07e7d93fe1dda4ad9214cd | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2021-10-11T08:52:27.000Z | 2021-10-11T08:52:27.000Z | modin/engines/base/io/column_stores/feather_dispatcher.py | todd-yu/modin | f284bb3cfd6e53b468da09efd6edc32bafd10689 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | modin/engines/base/io/column_stores/feather_dispatcher.py | todd-yu/modin | f284bb3cfd6e53b468da09efd6edc32bafd10689 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Licensed to Modin Development Team under one or more contributor license agreements.
# See the NOTICE file distributed with this work for additional information regarding
# copyright ownership. The Modin Development Team licenses this file to you under the
# Apache License, Version 2.0 (the "License"); you may not u... | 38.774194 | 89 | 0.688852 | 1,424 | 0.592346 | 0 | 0 | 1,195 | 0.497088 | 0 | 0 | 1,910 | 0.794509 |
4620f61e29c562c8eee22b703bf2ebfcf3321f30 | 1,482 | py | Python | rnnparser/RecursiveNN/tests_npRNN/test_tree_utils.py | uphere-co/nlp-prototype | c4623927e5c5c5f9c3e702eb36497ea1d9fd1ff3 | [
"BSD-3-Clause"
] | null | null | null | rnnparser/RecursiveNN/tests_npRNN/test_tree_utils.py | uphere-co/nlp-prototype | c4623927e5c5c5f9c3e702eb36497ea1d9fd1ff3 | [
"BSD-3-Clause"
] | null | null | null | rnnparser/RecursiveNN/tests_npRNN/test_tree_utils.py | uphere-co/nlp-prototype | c4623927e5c5c5f9c3e702eb36497ea1d9fd1ff3 | [
"BSD-3-Clause"
] | null | null | null | import pytest
from npRNN.tree_utils import Node, NodeTree
def test_merge_results():
#sentence='I know a name of the cat on a hat'
sentence='a name of the cat on a hat'
words=[Node(word) for word in sentence.split()]
tree=NodeTree(words, [0, 5, 3, 1, 2, 0, 0])
assert tree.phrase.name =='(((a name) ... | 38 | 83 | 0.632928 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 227 | 0.153171 |
4621fb7b46924baa48b672c2c85f2d00296c68a8 | 1,267 | py | Python | pyrefine/script.py | jezcope/pyrefine | 44872592b1c0430d942d6901d7670e7b0ae77b11 | [
"MIT"
] | 27 | 2017-03-29T09:12:43.000Z | 2021-12-16T17:00:14.000Z | pyrefine/script.py | jezcope/pyrefine | 44872592b1c0430d942d6901d7670e7b0ae77b11 | [
"MIT"
] | 7 | 2017-04-02T22:10:22.000Z | 2021-06-01T21:25:26.000Z | pyrefine/script.py | jezcope/pyrefine | 44872592b1c0430d942d6901d7670e7b0ae77b11 | [
"MIT"
] | 2 | 2019-07-31T15:03:21.000Z | 2021-12-20T12:12:15.000Z | """A script is a series of operations."""
import json
import os
from .ops import create
class Script(object):
"""A script is a series of operations."""
def __init__(self, s=None):
"""Parse a script from a JSON string."""
if s is not None:
self.parsed_script = json.loads(s)
... | 21.844828 | 72 | 0.566693 | 831 | 0.65588 | 0 | 0 | 0 | 0 | 0 | 0 | 621 | 0.490134 |
46220a2b446c7a9b49f727a4d45bc84e233eea22 | 571 | py | Python | makeCourse/plastex/mhchem/__init__.py | dualspiral/makecourse | 96c0d3137b00a400df082f160eabf8a925953067 | [
"Apache-2.0"
] | null | null | null | makeCourse/plastex/mhchem/__init__.py | dualspiral/makecourse | 96c0d3137b00a400df082f160eabf8a925953067 | [
"Apache-2.0"
] | null | null | null | makeCourse/plastex/mhchem/__init__.py | dualspiral/makecourse | 96c0d3137b00a400df082f160eabf8a925953067 | [
"Apache-2.0"
] | null | null | null | from plasTeX import Command, Environment, sourceChildren
from plasTeX.Base.LaTeX import Math
from plasTeX.Base.TeX.Primitives import BoxCommand
# mhchem package - mostly handled by mathjax
# Overrive boxcommands inside MathJaX to avoid extra <script type="math/tex">
class MHBoxCommand(BoxCommand):
class math(Math.... | 28.55 | 77 | 0.681261 | 298 | 0.521891 | 0 | 0 | 149 | 0.260946 | 0 | 0 | 143 | 0.250438 |
4624e2bb70d8902485f3a782d8d8f3f7917f1147 | 5,187 | py | Python | src/data_augmentation.py | pallabganguly/gestures-cnn | 8778760d7a5854a5987d24d7b8ff30afb216a624 | [
"MIT"
] | 1 | 2018-05-08T15:34:50.000Z | 2018-05-08T15:34:50.000Z | src/data_augmentation.py | pallabganguly/gestures-cnn | 8778760d7a5854a5987d24d7b8ff30afb216a624 | [
"MIT"
] | 9 | 2018-04-25T09:09:08.000Z | 2022-03-11T23:24:27.000Z | src/data_augmentation.py | pallabganguly/gestures-cnn | 8778760d7a5854a5987d24d7b8ff30afb216a624 | [
"MIT"
] | 1 | 2018-06-14T08:44:48.000Z | 2018-06-14T08:44:48.000Z | """
Totally untested file. Will be removed in subsequent commits
"""
import tensorflow as tf
import matplotlib.image as mpimg
import numpy as np
from math import ceil, floor
import os
IMAGE_SIZE = 720
def central_scale_images(X_imgs, scales):
# Various settings needed for Tensorflow operation
boxes = np.zeros... | 39.295455 | 91 | 0.634664 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 502 | 0.09678 |
4626213aaa7096da9c7ee3b429d3bfce1126595c | 1,721 | py | Python | link_to_the_past/hashes.py | zsquareplusc/lttp-backup | 32862ec136c9bda412256142c7d44d1564aab784 | [
"BSD-3-Clause"
] | null | null | null | link_to_the_past/hashes.py | zsquareplusc/lttp-backup | 32862ec136c9bda412256142c7d44d1564aab784 | [
"BSD-3-Clause"
] | null | null | null | link_to_the_past/hashes.py | zsquareplusc/lttp-backup | 32862ec136c9bda412256142c7d44d1564aab784 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# encoding: utf-8
#
# (C) 2012-2016 Chris Liechti <cliechti@gmx.net>
#
# SPDX-License-Identifier: BSD-3-Clause
"""\
Link To The Past - a backup tool
Hash functions and commands.
"""
import hashlib
import zlib
class CRC32(object):
"""\
CRC32 API compatible to the hashlib functions (... | 20.247059 | 80 | 0.535735 | 741 | 0.430564 | 0 | 0 | 0 | 0 | 0 | 0 | 1,006 | 0.584544 |
462677ff68dd069f07b9a100cb78c22fa238e35f | 360 | py | Python | Interview/langTrans.py | dnootana/Python | 2881bafe8bc378fa3cae50a747fcea1a55630c63 | [
"MIT"
] | 1 | 2021-02-19T11:00:11.000Z | 2021-02-19T11:00:11.000Z | Interview/langTrans.py | dnootana/Python | 2881bafe8bc378fa3cae50a747fcea1a55630c63 | [
"MIT"
] | null | null | null | Interview/langTrans.py | dnootana/Python | 2881bafe8bc378fa3cae50a747fcea1a55630c63 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3.8
table="".maketrans("0123456789","\N{Devanagari digit zero}\N{Devanagari digit one}"
"\N{Devanagari digit two}\N{Devanagari digit three}"
"\N{Devanagari digit four}\N{Devanagari digit five}"
"\N{Devanagari digit six}\N{Devanagari digit seven}"
"\N{Devanagari digit eight}\N{Devanagari digit nine... | 45 | 83 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 310 | 0.861111 |
4626c0de5deedd2af689cbda3e1e357bed965d98 | 4,909 | py | Python | cutde/opencl.py | brendanjmeade/cutde | 8d9c01ab7e6073e8a8a45af927644c9b676e5ec6 | [
"CNRI-Python"
] | 1 | 2021-04-23T21:07:29.000Z | 2021-04-23T21:07:29.000Z | cutde/opencl.py | brendanjmeade/cutde | 8d9c01ab7e6073e8a8a45af927644c9b676e5ec6 | [
"CNRI-Python"
] | null | null | null | cutde/opencl.py | brendanjmeade/cutde | 8d9c01ab7e6073e8a8a45af927644c9b676e5ec6 | [
"CNRI-Python"
] | null | null | null | import logging
import warnings
import pyopencl
import pyopencl.array
logger = logging.getLogger(__name__)
gpu_initialized = False
gpu_ctx = None
gpu_queue = None
def report_devices(ctx):
device_names = [d.name for d in ctx.devices]
logger.info("initializing opencl context with devices = " + str(device_name... | 27.734463 | 88 | 0.66266 | 460 | 0.093705 | 0 | 0 | 0 | 0 | 0 | 0 | 1,664 | 0.338969 |
4626daaa44d52cdbb1bec3a34b51700caf38c8dc | 448 | py | Python | tests/test_lamost_tools.py | igomezv/astroNN | 50af116f9cbfc684b63e7ddcf8829343a455722b | [
"MIT"
] | 156 | 2017-10-22T01:29:10.000Z | 2022-03-14T10:28:09.000Z | tests/test_lamost_tools.py | AbdulfattahBaalawi/astroNN | 0b970dd1a8d4d5e6d611ffa52cfd3c2ffdcb4643 | [
"MIT"
] | 16 | 2017-11-02T21:29:28.000Z | 2022-03-14T08:40:41.000Z | tests/test_lamost_tools.py | AbdulfattahBaalawi/astroNN | 0b970dd1a8d4d5e6d611ffa52cfd3c2ffdcb4643 | [
"MIT"
] | 46 | 2017-11-01T18:56:03.000Z | 2022-03-07T06:44:22.000Z | import unittest
import numpy as np
from astroNN.lamost import wavelength_solution, pseudo_continuum
class LamostToolsTestCase(unittest.TestCase):
def test_wavelength_solution(self):
wavelength_solution()
wavelength_solution(dr=5)
self.assertRaises(ValueError, wavelength_solution, dr=1)
... | 23.578947 | 64 | 0.734375 | 295 | 0.658482 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.022321 |
4627027be2fa84a4ea17d7c6b65cd28da93acd06 | 8,265 | py | Python | phase-iii-client/services/aureas/views.py | williamegomez/AUREAS | 06f5bda347481628ba2a08a854b76151a59d6e66 | [
"MIT"
] | 5 | 2019-02-12T18:46:40.000Z | 2019-02-24T15:24:43.000Z | phase-iii-client/services/aureas/views.py | williamegomez/AUREAS | 06f5bda347481628ba2a08a854b76151a59d6e66 | [
"MIT"
] | null | null | null | phase-iii-client/services/aureas/views.py | williamegomez/AUREAS | 06f5bda347481628ba2a08a854b76151a59d6e66 | [
"MIT"
] | 1 | 2019-11-29T02:28:09.000Z | 2019-11-29T02:28:09.000Z | from django.http import HttpResponse
from rest_framework.decorators import api_view
from rest_framework.decorators import parser_classes
from rest_framework.parsers import JSONParser
import numpy as np
import json
import os
from .utils.spectrogram_utils import SpectrogramUtils
from .utils.feature_extraction_utils impor... | 36.409692 | 194 | 0.580762 | 0 | 0 | 0 | 0 | 7,627 | 0.922807 | 0 | 0 | 802 | 0.097036 |
4629ec7d3ad2828b6cef4cc59b99d7273c5fdb56 | 1,416 | py | Python | PyPoll/Homework/main.py | VioletData/python-challenge | 5a59aca85426387db21b0138dfe41aca19aac40d | [
"ADSL"
] | null | null | null | PyPoll/Homework/main.py | VioletData/python-challenge | 5a59aca85426387db21b0138dfe41aca19aac40d | [
"ADSL"
] | null | null | null | PyPoll/Homework/main.py | VioletData/python-challenge | 5a59aca85426387db21b0138dfe41aca19aac40d | [
"ADSL"
] | null | null | null | # Modules
import os
import csv
#Set up path for file
csvpath=os.path.join("..", "Resources", "election_data.csv" )
#print(csvpath)
total_votes=0
#total_profit=0
#previous_value=0
#current_value=0
#list_changes=[]
print("Election Results")
print("---------------------")
#Open the csv file
with open(csvpath, newline=... | 23.6 | 86 | 0.66596 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 969 | 0.684322 |
462a57a1182eb2397cc4d73242d61fbadafdf7cc | 367 | py | Python | test/qa-tests/buildscripts/resmokelib/logging/__init__.py | Mrliu8023/mongo-tools | b9048617a6dc788aae9286d0c2bd3fefe49d23d3 | [
"Apache-2.0"
] | 1 | 2022-02-17T10:51:19.000Z | 2022-02-17T10:51:19.000Z | test/qa-tests/buildscripts/resmokelib/logging/__init__.py | Mrliu8023/mongo-tools | b9048617a6dc788aae9286d0c2bd3fefe49d23d3 | [
"Apache-2.0"
] | null | null | null | test/qa-tests/buildscripts/resmokelib/logging/__init__.py | Mrliu8023/mongo-tools | b9048617a6dc788aae9286d0c2bd3fefe49d23d3 | [
"Apache-2.0"
] | null | null | null | """
Extension to the logging package to support buildlogger.
"""
# Alias the built-in logging.Logger class for type checking arguments. Those interested in
# constructing a new Logger instance should use the loggers.new_logger() function instead.
from logging import Logger
from . import config
from . import buildlo... | 24.466667 | 90 | 0.784741 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 244 | 0.66485 |
462b42e0c4130840f3bc0cd918b3623bf21c3cd2 | 2,645 | py | Python | cohesity_management_sdk/models/azure_cloud_credentials.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | 1 | 2021-01-07T20:36:22.000Z | 2021-01-07T20:36:22.000Z | cohesity_management_sdk/models/azure_cloud_credentials.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | null | null | null | cohesity_management_sdk/models/azure_cloud_credentials.py | chandrashekar-cohesity/management-sdk-python | 9e6ec99e8a288005804b808c4e9b19fd204e3a8b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2019 Cohesity Inc.
class AzureCloudCredentials(object):
"""Implementation of the 'AzureCloudCredentials' model.
Specifies the cloud credentials to connect to a Microsoft
Azure service account.
Attributes:
storage_access_key (string): Specifies the access ... | 35.266667 | 81 | 0.654064 | 2,585 | 0.977316 | 0 | 0 | 904 | 0.341777 | 0 | 0 | 1,819 | 0.687713 |
462c2089ebfd3afcf679c3d29b9f6e291acb4dc2 | 525 | py | Python | src/solutions/01.py | NNRepos/AoC-2021-python-solutions | 556ccc920b96cedbdc2f554a3bee28a793be4483 | [
"MIT"
] | null | null | null | src/solutions/01.py | NNRepos/AoC-2021-python-solutions | 556ccc920b96cedbdc2f554a3bee28a793be4483 | [
"MIT"
] | null | null | null | src/solutions/01.py | NNRepos/AoC-2021-python-solutions | 556ccc920b96cedbdc2f554a3bee28a793be4483 | [
"MIT"
] | null | null | null | from utils.utils import *
lines = get_input(__file__)
lines_as_nums = lines_to_nums(lines)
def part1(nums):
incr = 0
cur = nums[0]
for num in nums:
if num > cur:
incr += 1
cur = num
return incr
def part2():
nums = []
for i in range(len(lines_as_nums)):
if... | 19.444444 | 87 | 0.590476 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 16 | 0.030476 |
462c32bbc3b282511e2c46116729931f71fbbf10 | 1,170 | py | Python | scripts/sqlite_firestore_migration.py | namuan/news-rider | 2f8f5204eda717e39ab7d4c048692d5ec2eb5449 | [
"MIT"
] | 5 | 2021-04-26T20:46:30.000Z | 2021-05-03T07:29:31.000Z | scripts/sqlite_firestore_migration.py | namuan/news-rider | 2f8f5204eda717e39ab7d4c048692d5ec2eb5449 | [
"MIT"
] | null | null | null | scripts/sqlite_firestore_migration.py | namuan/news-rider | 2f8f5204eda717e39ab7d4c048692d5ec2eb5449 | [
"MIT"
] | null | null | null | import datetime
import os
import sys
from google.cloud import firestore
from peewee import *
sys.path.append(os.getcwd())
home_dir = os.getenv('HOME')
db_file_path = os.getcwd() + '/../../data/news_rider.db'
print("Reading database from {}".format(db_file_path))
old_db = SqliteDatabase(db_file_path)
class NewsIte... | 23.877551 | 82 | 0.692308 | 196 | 0.167521 | 0 | 0 | 0 | 0 | 0 | 0 | 190 | 0.162393 |
462c4f9e4def6f4455874dce4f3095e44613b4b1 | 1,372 | py | Python | tensorforce/core/baselines/mlp_baseline.py | youlei202/tensorforce-lei | 871ef7f5c41d496aa8ad674854792ebd52ce1546 | [
"Apache-2.0"
] | 1 | 2019-12-21T03:31:33.000Z | 2019-12-21T03:31:33.000Z | tensorforce/core/baselines/mlp_baseline.py | youlei202/tensorforce-lei | 871ef7f5c41d496aa8ad674854792ebd52ce1546 | [
"Apache-2.0"
] | null | null | null | tensorforce/core/baselines/mlp_baseline.py | youlei202/tensorforce-lei | 871ef7f5c41d496aa8ad674854792ebd52ce1546 | [
"Apache-2.0"
] | 1 | 2019-12-21T03:31:39.000Z | 2019-12-21T03:31:39.000Z | # Copyright 2017 reinforce.io. 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... | 33.463415 | 80 | 0.671283 | 524 | 0.381924 | 0 | 0 | 0 | 0 | 0 | 0 | 904 | 0.658892 |
462cfd1b7c44355d2edae99099ee57b431d8d9a4 | 769 | py | Python | km3pipe/utils/rtree.py | kabartay/km3pipe | 491c425486553e8986682d2b0614918dd23cc964 | [
"MIT"
] | 2 | 2017-01-19T17:22:49.000Z | 2020-04-18T14:00:38.000Z | km3pipe/utils/rtree.py | kabartay/km3pipe | 491c425486553e8986682d2b0614918dd23cc964 | [
"MIT"
] | null | null | null | km3pipe/utils/rtree.py | kabartay/km3pipe | 491c425486553e8986682d2b0614918dd23cc964 | [
"MIT"
] | null | null | null | # coding=utf-8
# Filename: h5tree.py
"""
Print the ROOT file structure.
Usage:
rtree FILE
rtree (-h | --help)
rtree --version
Options:
FILE Input file.
-h --help Show this screen.
"""
from __future__ import division, absolute_import, print_function
from km3pipe.io.root import open_rfile
_... | 19.225 | 76 | 0.684005 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 341 | 0.443433 |
462e9733585d0e06c8930267d52894b75b0d0b14 | 15,952 | py | Python | task_part1_learning.py | till-lu/cit_lcp_2020 | b547185f8be74f57773c3d21ce5e4327b363a2f1 | [
"MIT"
] | null | null | null | task_part1_learning.py | till-lu/cit_lcp_2020 | b547185f8be74f57773c3d21ce5e4327b363a2f1 | [
"MIT"
] | null | null | null | task_part1_learning.py | till-lu/cit_lcp_2020 | b547185f8be74f57773c3d21ce5e4327b363a2f1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from psychopy.visual import Window, TextStim
from psychopy.core import wait, Clock, quit
from psychopy.event import clearEvents, waitKeys, Mouse
from psychopy.gui import Dlg
from time import... | 44.558659 | 716 | 0.656281 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,047 | 0.440327 |
46305fd7b6fccf0915c23423983bb7ae102bfc08 | 14,209 | py | Python | ansible/venv/lib/python2.7/site-packages/ansible/modules/network/f5/bigip_asm_policy_import.py | gvashchenkolineate/gvashchenkolineate_infra_trytravis | 0fb18850afe0d8609693ba4b23f29c7cda17d97f | [
"MIT"
] | 17 | 2017-06-07T23:15:01.000Z | 2021-08-30T14:32:36.000Z | ansible/ansible/modules/network/f5/bigip_asm_policy_import.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 9 | 2017-06-25T03:31:52.000Z | 2021-05-17T23:43:12.000Z | ansible/ansible/modules/network/f5/bigip_asm_policy_import.py | SergeyCherepanov/ansible | 875711cd2fd6b783c812241c2ed7a954bf6f670f | [
"MIT"
] | 3 | 2018-05-26T21:31:22.000Z | 2019-09-28T17:00:45.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | 29.85084 | 114 | 0.606235 | 9,511 | 0.669364 | 0 | 0 | 0 | 0 | 0 | 0 | 4,111 | 0.289324 |
4630b18f7ea854ba3d4c006459393021a0b26e65 | 322 | py | Python | Firewall/Model/Host.py | frieagle94/firewall | 9dc0357f78f128c0275baabebfef6fdf8ff35a47 | [
"Apache-2.0"
] | null | null | null | Firewall/Model/Host.py | frieagle94/firewall | 9dc0357f78f128c0275baabebfef6fdf8ff35a47 | [
"Apache-2.0"
] | null | null | null | Firewall/Model/Host.py | frieagle94/firewall | 9dc0357f78f128c0275baabebfef6fdf8ff35a47 | [
"Apache-2.0"
] | null | null | null | __author__ = 'Riccardo Frigerio'
'''
Oggetto HOST
Attributi:
- mac_address: indirizzo MAC
- port: porta a cui e' collegato
- dpid: switch a cui e' collegato
'''
class Host(object):
def __init__(self, mac_address, port, dpid):
self.mac_address = mac_address
self.port = port
self.dpid = dpi... | 18.941176 | 48 | 0.667702 | 158 | 0.490683 | 0 | 0 | 0 | 0 | 0 | 0 | 146 | 0.453416 |
4632248180ce8a33d74a9026c30eef96e40a8172 | 2,466 | py | Python | docker-compose/tweet_collector/tweet_streamer.py | lorenanda/tweets | 926b7a1b33057e57a59dce2d4fc89e7af18962e6 | [
"MIT"
] | 2 | 2021-05-14T19:11:28.000Z | 2021-06-13T23:17:32.000Z | docker-compose/tweet_collector/tweet_streamer.py | lorenanda/tweets | 926b7a1b33057e57a59dce2d4fc89e7af18962e6 | [
"MIT"
] | null | null | null | docker-compose/tweet_collector/tweet_streamer.py | lorenanda/tweets | 926b7a1b33057e57a59dce2d4fc89e7af18962e6 | [
"MIT"
] | 1 | 2022-02-13T10:47:17.000Z | 2022-02-13T10:47:17.000Z | from tweepy import OAuthHandler, Stream, API
from tweepy.streaming import StreamListener
import json
import logging
import pymongo
import config
client = pymongo.MongoClient(host='mongo_container', port=27018)
db = client.tweets_db
auth = OAuthHandler(config.CONSUMER_API_KEY, config.CONSUMER_API_SECRET)
auth.set_acc... | 30.825 | 94 | 0.664234 | 1,085 | 0.439984 | 0 | 0 | 0 | 0 | 0 | 0 | 833 | 0.337794 |
46325f61280dc8596ca2d94d27452fa3b0d497c6 | 2,028 | py | Python | manage_it/network/models.py | ShangShungInstitute/django-manage-it | 13cb23b57ce3577db7f69250741bcbfe82b69a57 | [
"MIT",
"Unlicense"
] | 1 | 2015-01-20T14:34:32.000Z | 2015-01-20T14:34:32.000Z | manage_it/network/models.py | ShangShungInstitute/django-manage-it | 13cb23b57ce3577db7f69250741bcbfe82b69a57 | [
"MIT",
"Unlicense"
] | null | null | null | manage_it/network/models.py | ShangShungInstitute/django-manage-it | 13cb23b57ce3577db7f69250741bcbfe82b69a57 | [
"MIT",
"Unlicense"
] | null | null | null | from django.db import models
from django.utils.translation import ugettext_lazy as _
from assets.models import Item
from catalog.models import Inventory
CONNECTION_TYPES = (
(1, "Ethernet 1Gb"),
(2, "Ethernet 100Mb"),
(3, "WIFI"),
(4, "Optic Fiber"),
(5, "USB"),
(6, "HDMI"),
(7, "Telephone... | 28.971429 | 76 | 0.65927 | 1,693 | 0.834813 | 0 | 0 | 0 | 0 | 0 | 0 | 302 | 0.148915 |
46346da00abc925aef8a81ab9a6362af4ad40b6c | 3,940 | py | Python | software/L1_mpu.py | roy-kruemcke/SCUTTLE-SLMP | c181ba451e5fecdbbfb8ac7c4c2d743526112b11 | [
"MIT"
] | null | null | null | software/L1_mpu.py | roy-kruemcke/SCUTTLE-SLMP | c181ba451e5fecdbbfb8ac7c4c2d743526112b11 | [
"MIT"
] | null | null | null | software/L1_mpu.py | roy-kruemcke/SCUTTLE-SLMP | c181ba451e5fecdbbfb8ac7c4c2d743526112b11 | [
"MIT"
] | null | null | null | # L1_mpu.py
# Author: Roy Kruemcke (roanoake)
# 30 NOV 2021
# Allows for the interfacing to the MPU9250 using the smbus2 i2c module
# Written for use with Raspberry Pi 4 Model B
import smbus2
import numpy as np
import data
import time
# Initialize Register Data
CONFIG = 0x1A
USER_CTRL = 0x6A
PWR_MGMT_1, PWR_MGMT_2 = 0... | 30.542636 | 95 | 0.639848 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,408 | 0.35736 |
4634863621fdac26b1771cdeb54c5f5a51a3dcb7 | 1,448 | py | Python | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GL/EXT/paletted_texture.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GL/EXT/paletted_texture.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | OpenGLWrapper_JE/venv/Lib/site-packages/OpenGL/raw/GL/EXT/paletted_texture.py | JE-Chen/je_old_repo | a8b2f1ac2eec25758bd15b71c64b59b27e0bcda5 | [
"MIT"
] | null | null | null | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GL import _types as _cs
# End users want this...
from OpenGL.raw.GL._types import *
from OpenGL.raw.GL import _errors
from OpenGL.constant import Constant as _C
import... | 43.878788 | 118 | 0.810083 | 0 | 0 | 0 | 0 | 532 | 0.367403 | 0 | 0 | 314 | 0.216851 |
4634eaef2f0ee2edb50cfda3fdc934ed5f0de8df | 1,494 | py | Python | backend/apps/csyllabusapi/views/university.py | CSyllabus/webapp | 06391d43d97453a135ff78ff8dcdd35846c94d30 | [
"MIT"
] | 3 | 2017-11-02T11:24:09.000Z | 2017-12-08T15:33:43.000Z | backend/apps/csyllabusapi/views/university.py | CSyllabus/webapp | 06391d43d97453a135ff78ff8dcdd35846c94d30 | [
"MIT"
] | 2 | 2017-11-04T10:03:44.000Z | 2017-12-31T08:26:36.000Z | backend/apps/csyllabusapi/views/university.py | CSyllabus/webapp | 06391d43d97453a135ff78ff8dcdd35846c94d30 | [
"MIT"
] | null | null | null | from rest_framework.parsers import JSONParser, FileUploadParser
from rest_framework.views import APIView
from ..models import City
from ..models import Country
from ..models import University
from ..models import Faculty
from ..models import Program
from rest_framework.decorators import api_view, permission_classes
fr... | 33.954545 | 111 | 0.726238 | 837 | 0.560241 | 0 | 0 | 913 | 0.611111 | 0 | 0 | 62 | 0.041499 |
4636eb5b9d65657cf6249aa635cf51cca2defbb9 | 244 | py | Python | prickly-pufferfish/python_questions/add_to_zero.py | Vthechamp22/summer-code-jam-2021 | 0a8bf1f22f6c73300891fd779da36efd8e1304c1 | [
"MIT"
] | 40 | 2020-08-02T07:38:22.000Z | 2021-07-26T01:46:50.000Z | prickly-pufferfish/python_questions/add_to_zero.py | Vthechamp22/summer-code-jam-2021 | 0a8bf1f22f6c73300891fd779da36efd8e1304c1 | [
"MIT"
] | 134 | 2020-07-31T12:15:45.000Z | 2020-12-13T04:42:19.000Z | prickly-pufferfish/python_questions/add_to_zero.py | Vthechamp22/summer-code-jam-2021 | 0a8bf1f22f6c73300891fd779da36efd8e1304c1 | [
"MIT"
] | 101 | 2020-07-31T12:00:47.000Z | 2021-11-01T09:06:58.000Z | """
Write a function with a list of ints as a paramter. /
Return True if any two nums sum to 0. /
>>> add_to_zero([]) /
False /
>>> add_to_zero([1]) /
False /
>>> add_to_zero([1, 2, 3]) /
False /
>>> add_to_zero([1, 2, 3, -2]) /
True /
"""
| 14.352941 | 53 | 0.569672 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 243 | 0.995902 |
4636fb0bc8542fff3140160b2826c73df03573c5 | 827 | py | Python | op_trans/asgi.py | jezzlucena/django-opp-trans | 05e8b2b91a6c46cd800837ae2b683ec043243742 | [
"MIT"
] | 1 | 2021-03-03T02:22:11.000Z | 2021-03-03T02:22:11.000Z | op_trans/asgi.py | jezzlucena/django-opp-trans | 05e8b2b91a6c46cd800837ae2b683ec043243742 | [
"MIT"
] | null | null | null | op_trans/asgi.py | jezzlucena/django-opp-trans | 05e8b2b91a6c46cd800837ae2b683ec043243742 | [
"MIT"
] | null | null | null | """
ASGI config for op_trans project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
from op_trans.websocket import webs... | 28.517241 | 78 | 0.74607 | 0 | 0 | 0 | 0 | 0 | 0 | 330 | 0.399033 | 331 | 0.400242 |
4637594ad65e429cbd0184284c782da6df047d1a | 482 | py | Python | notifai_recruitment/api.py | BudzynskiMaciej/notifai_recruitment | 56860db3a2dad6115747a675895b8f7947e7e12e | [
"MIT"
] | null | null | null | notifai_recruitment/api.py | BudzynskiMaciej/notifai_recruitment | 56860db3a2dad6115747a675895b8f7947e7e12e | [
"MIT"
] | 2 | 2021-05-21T13:26:26.000Z | 2022-02-10T10:04:55.000Z | notifai_recruitment/api.py | BudzynskiMaciej/notifai_recruitment | 56860db3a2dad6115747a675895b8f7947e7e12e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""API routes config for notifai_recruitment project.
REST framework adds support for automatic URL routing to Django, and provides simple, quick and consistent
way of wiring view logic to a set of URLs.
For more information on this file, see
https://www.django-rest-framework.org/api-guide/rou... | 28.352941 | 106 | 0.778008 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 337 | 0.69917 |
46385759fc36e37af911b95c5e283c3da2fdcd54 | 3,786 | py | Python | zipline/data/bundles/equities_bundle.py | walterkissling/zipline | 784580ef2271aeaa52d8e526f15c88fbb55b7547 | [
"Apache-2.0"
] | null | null | null | zipline/data/bundles/equities_bundle.py | walterkissling/zipline | 784580ef2271aeaa52d8e526f15c88fbb55b7547 | [
"Apache-2.0"
] | null | null | null | zipline/data/bundles/equities_bundle.py | walterkissling/zipline | 784580ef2271aeaa52d8e526f15c88fbb55b7547 | [
"Apache-2.0"
] | null | null | null | # File to ingest an equities bundle for zipline
# Import libraries
import pandas as pd
import numpy as np
def equities_bundle(path_to_file):
# Define custom ingest function
def ingest(environ,
asset_db_writer,
minute_bar_writer,
daily_bar_writer,
ad... | 38.242424 | 109 | 0.530639 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 927 | 0.244849 |
46387a117da7cc25b8fd8335919094946b06904f | 343 | py | Python | model/torch_model.py | FernandoLpz/ONNX-PyTorch-TF-Caffe2 | 05aa07b982bd12d2c0d7ce05a94a726b7faaed91 | [
"MIT"
] | 3 | 2020-10-28T03:46:48.000Z | 2021-07-22T06:45:33.000Z | model/torch_model.py | FernandoLpz/ONNX-PyTorch-TF-Caffe2 | 05aa07b982bd12d2c0d7ce05a94a726b7faaed91 | [
"MIT"
] | null | null | null | model/torch_model.py | FernandoLpz/ONNX-PyTorch-TF-Caffe2 | 05aa07b982bd12d2c0d7ce05a94a726b7faaed91 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class TorchModel(nn.ModuleList):
def __init__(self):
super(TorchModel, self).__init__()
self.linear_1 = nn.Linear(2, 12)
self.linear_2 = nn.Linear(12, 1)
def forward(self, x):
out = self.linear_1(x)
out = torch.tanh(out)
out = self.linear_2(out)
out = torch.sigmo... | 21.4375 | 36 | 0.682216 | 307 | 0.895044 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
46389fb316c01f816e67750260b3ef8381f89fb1 | 11,529 | py | Python | nereid/contrib/pagination.py | advocatetax/nereid-1 | ee7ae345e3e7e46b3e13cd6e3b94c388d38a0efa | [
"BSD-3-Clause"
] | null | null | null | nereid/contrib/pagination.py | advocatetax/nereid-1 | ee7ae345e3e7e46b3e13cd6e3b94c388d38a0efa | [
"BSD-3-Clause"
] | null | null | null | nereid/contrib/pagination.py | advocatetax/nereid-1 | ee7ae345e3e7e46b3e13cd6e3b94c388d38a0efa | [
"BSD-3-Clause"
] | 1 | 2021-06-04T13:02:29.000Z | 2021-06-04T13:02:29.000Z | # -*- coding: utf-8 -*-
# This file is part of Tryton & Nereid. The COPYRIGHT file at the top level of
# this repository contains the full copyright notices and license terms.
from math import ceil
from sql import Select, Column
from sql.functions import Function
from sql.aggregate import Count
from werkzeug.utils impo... | 32.94 | 82 | 0.571515 | 11,180 | 0.96956 | 1,645 | 0.142659 | 1,664 | 0.144307 | 0 | 0 | 5,114 | 0.4435 |
4638b2719be97e9698ba7de333d5a9c1e9271178 | 947 | py | Python | app.py | Arpan-206/Youtube-Downloader-Flask | 8ac6233e238d99c4a13d4d00afa2574d156cb80e | [
"MIT"
] | 3 | 2021-04-28T09:49:43.000Z | 2022-01-03T13:03:02.000Z | app.py | Arpan-206/Youtube-Downloader-Flask | 8ac6233e238d99c4a13d4d00afa2574d156cb80e | [
"MIT"
] | null | null | null | app.py | Arpan-206/Youtube-Downloader-Flask | 8ac6233e238d99c4a13d4d00afa2574d156cb80e | [
"MIT"
] | null | null | null | from flask import Flask, request, send_file, render_template, url_for
import pytube
import logging
import sys
import os
from hello import timed_delete
from threading import Timer
timed_delete()
logging.basicConfig(stream=sys.stderr, level=logging.DEBUG)
app = Flask(__name__)
@app.route("/")
def youtube_downloader():
... | 31.566667 | 131 | 0.744456 | 0 | 0 | 0 | 0 | 666 | 0.703273 | 0 | 0 | 319 | 0.336853 |
4638cae0768af5f19dde04ebbab5eceafeebdaf5 | 14,103 | py | Python | si_unit_pandas/base.py | domdfcoding/si_unit_pandas | 6912d775f88dcfb9112199a57c14b6ce6a979d0e | [
"BSD-3-Clause"
] | null | null | null | si_unit_pandas/base.py | domdfcoding/si_unit_pandas | 6912d775f88dcfb9112199a57c14b6ce6a979d0e | [
"BSD-3-Clause"
] | 19 | 2020-12-21T18:26:24.000Z | 2022-01-16T11:47:58.000Z | si_unit_pandas/base.py | domdfcoding/si_unit_pandas | 6912d775f88dcfb9112199a57c14b6ce6a979d0e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# base.py
"""
Base functionality.
"""
#
# Copyright (c) 2020 Dominic Davis-Foster <dominic@davis-foster.co.uk>
#
# Based on cyberpandas
# https://github.com/ContinuumIO/cyberpandas
# Copyright (c) 2018, Anaconda, Inc.
#
# Redistribution and use in source and binary forms, with or without
... | 27.069098 | 124 | 0.704602 | 11,506 | 0.815855 | 0 | 0 | 6,555 | 0.464795 | 0 | 0 | 5,155 | 0.365525 |
46395d1d31524d94efb18967e41d8995a2059eda | 196 | py | Python | agents/admin.py | HerbertRamirez/inmo_web | 3c48911d5e3ee7a75580534664874ba5e8281e55 | [
"MIT"
] | null | null | null | agents/admin.py | HerbertRamirez/inmo_web | 3c48911d5e3ee7a75580534664874ba5e8281e55 | [
"MIT"
] | null | null | null | agents/admin.py | HerbertRamirez/inmo_web | 3c48911d5e3ee7a75580534664874ba5e8281e55 | [
"MIT"
] | 3 | 2021-02-18T15:11:53.000Z | 2021-02-20T17:34:01.000Z | from django.contrib import admin
from .models import Agent
# Register your models here.
class AgentAdmin(admin.ModelAdmin):
readonly_fields = ('created','updated')
admin.site.register(Agent) | 24.5 | 43 | 0.77551 | 79 | 0.403061 | 0 | 0 | 0 | 0 | 0 | 0 | 46 | 0.234694 |
463af3b646e86f201f2bd7fe58504504be2cb376 | 4,203 | py | Python | modules/DEFA/MS_Office/compoundfiles/const.py | naaya17/carpe | fa2e3cfebe20f8839c985e5b9b78b538800172a1 | [
"Apache-2.0"
] | 56 | 2019-02-07T06:21:45.000Z | 2022-03-21T08:19:24.000Z | DEFA/MS_Office/compoundfiles/const.py | sk-yaho/carpe | 077ef7ba1582b3de9f5c08d63431e744b77a9e09 | [
"Apache-2.0"
] | 5 | 2020-05-25T17:29:00.000Z | 2021-12-13T20:49:08.000Z | DEFA/MS_Office/compoundfiles/const.py | sk-yaho/carpe | 077ef7ba1582b3de9f5c08d63431e744b77a9e09 | [
"Apache-2.0"
] | 31 | 2019-03-13T10:23:49.000Z | 2021-11-04T12:14:58.000Z | #!/usr/bin/env python
# vim: set et sw=4 sts=4 fileencoding=utf-8:
#
# A library for reading Microsoft's OLE Compound Document format
# Copyright (c) 2014 Dave Hughes <dave@waveform.org.uk>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation f... | 42.454545 | 83 | 0.695218 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,806 | 0.667618 |
463d1c29208fd7d810aca90bed20af06afc212fd | 3,272 | py | Python | Validation/valid_view_point_cloud.py | dtczhl/Slimmer | c93dac6a59828016484d8bef1c71e9ccceabab9c | [
"MIT"
] | null | null | null | Validation/valid_view_point_cloud.py | dtczhl/Slimmer | c93dac6a59828016484d8bef1c71e9ccceabab9c | [
"MIT"
] | null | null | null | Validation/valid_view_point_cloud.py | dtczhl/Slimmer | c93dac6a59828016484d8bef1c71e9ccceabab9c | [
"MIT"
] | null | null | null | """
view predication for point cloud,
Run valid_one_point_cloud first
"""
import torch
import numpy as np
import sys
import os
import pptk
# ------ Configurations ------
# path to pth file
pth_file = "../tmp/scene0015_00_vh_clean_2.pth.Random.100"
show_gt = False # show groundtruth or not; groudtruth draw ... | 30.579439 | 131 | 0.537897 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 797 | 0.243582 |
463e9059d21ae44008d266e66201d33e8c741f68 | 1,251 | py | Python | core/migrations/0009_measurement.py | Potanist/Potanist | bd9d82fe9ca8f4157b34e5174793777d6729999c | [
"BSD-3-Clause"
] | null | null | null | core/migrations/0009_measurement.py | Potanist/Potanist | bd9d82fe9ca8f4157b34e5174793777d6729999c | [
"BSD-3-Clause"
] | null | null | null | core/migrations/0009_measurement.py | Potanist/Potanist | bd9d82fe9ca8f4157b34e5174793777d6729999c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0008_grow_owner'),
]
operations = [
migrations.CreateModel(
name='Measurement',
fields=[
... | 39.09375 | 114 | 0.576339 | 1,142 | 0.91287 | 0 | 0 | 0 | 0 | 0 | 0 | 173 | 0.138289 |
4642f66823f504498e1fb09dc0db99ad096fbcd2 | 7,257 | py | Python | mkt/purchase/models.py | muffinresearch/zamboni | 045a6f07c775b99672af6d9857d295ed02fe5dd9 | [
"BSD-3-Clause"
] | null | null | null | mkt/purchase/models.py | muffinresearch/zamboni | 045a6f07c775b99672af6d9857d295ed02fe5dd9 | [
"BSD-3-Clause"
] | null | null | null | mkt/purchase/models.py | muffinresearch/zamboni | 045a6f07c775b99672af6d9857d295ed02fe5dd9 | [
"BSD-3-Clause"
] | null | null | null | import datetime
from django.conf import settings
from django.db import models
from django.utils import translation
import tower
from babel import Locale, numbers
from jingo import env
from jinja2.filters import do_dictsort
from tower import ugettext as _
import amo
from amo.fields import DecimalCharField
from amo.he... | 40.316667 | 79 | 0.606587 | 6,825 | 0.940471 | 0 | 0 | 254 | 0.035001 | 0 | 0 | 1,384 | 0.190712 |
4643409696cd3d49a508459df5a413ef73fb761e | 301 | py | Python | src/kol/request/CampgroundRestRequest.py | danheath/temppykol | 7f9621b44df9f9d2d9fc0a5b2a06db116b9ccfab | [
"BSD-3-Clause"
] | 19 | 2015-02-16T08:30:49.000Z | 2020-05-01T06:06:33.000Z | src/kol/request/CampgroundRestRequest.py | danheath/temppykol | 7f9621b44df9f9d2d9fc0a5b2a06db116b9ccfab | [
"BSD-3-Clause"
] | 5 | 2015-01-13T23:01:54.000Z | 2016-11-30T15:23:43.000Z | src/kol/request/CampgroundRestRequest.py | danheath/temppykol | 7f9621b44df9f9d2d9fc0a5b2a06db116b9ccfab | [
"BSD-3-Clause"
] | 19 | 2015-05-28T09:36:19.000Z | 2022-03-15T23:19:29.000Z | from kol.request.GenericRequest import GenericRequest
class CampgroundRestRequest(GenericRequest):
"Rests at the user's campground."
def __init__(self, session):
super(CampgroundRestRequest, self).__init__(session)
self.url = session.serverURL + 'campground.php?action=rest'
| 33.444444 | 67 | 0.750831 | 245 | 0.813953 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.202658 |
4643c3f57a3b1cef340d6b9803b645c83275e77f | 849 | py | Python | pdlearn/adaptor/methods.py | richlewis42/pandas-learn | 4330c642e4f62e8abc6dcd58ba33daf22519f41e | [
"MIT"
] | 1 | 2015-12-16T04:03:19.000Z | 2015-12-16T04:03:19.000Z | pdlearn/adaptor/methods.py | lewisacidic/pandas-learn | 4330c642e4f62e8abc6dcd58ba33daf22519f41e | [
"MIT"
] | 3 | 2015-12-10T02:05:13.000Z | 2015-12-16T04:04:16.000Z | pdlearn/adaptor/methods.py | lewisacidic/pandas-learn | 4330c642e4f62e8abc6dcd58ba33daf22519f41e | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of pandas-learn
# https://github.com/RichLewis42/pandas-learn
#
# Licensed under the MIT license:
# http://www.opensource.org/licenses/MIT
# Copyright (c) 2015, Rich Lewis <rl403@cam.ac.uk>
"""
pdlearn.adaptor.methods
~~~~~~~~~~~~~~~~~~~~~~~
Module ... | 22.945946 | 79 | 0.628975 | 0 | 0 | 0 | 0 | 284 | 0.334511 | 0 | 0 | 495 | 0.583039 |
4643e75f0f9e71df8892955ee0441be6f4a0dd8e | 396 | py | Python | BroCode/lessons/13-nested_loops.py | sofiaEkn/Python_Exercises | 2ffbec63552a29c72de50ef5e5a3307195e1b546 | [
"MIT"
] | null | null | null | BroCode/lessons/13-nested_loops.py | sofiaEkn/Python_Exercises | 2ffbec63552a29c72de50ef5e5a3307195e1b546 | [
"MIT"
] | null | null | null | BroCode/lessons/13-nested_loops.py | sofiaEkn/Python_Exercises | 2ffbec63552a29c72de50ef5e5a3307195e1b546 | [
"MIT"
] | null | null | null | # nested loops = The "inner loop" will finish all of it's iterations before
# finishing one iteration of the "outer loop"
rows = int(input("How many rows?: "))
columns = int(input("How many columns?: "))
symbol = input("Enter a symbol to use: ")
#symbol = int(input("Enter a symbol to use: "))
for i in... | 33 | 75 | 0.643939 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 249 | 0.628788 |
46441ef13bcf6070728bb55ba5a6a680d4610fc1 | 2,516 | py | Python | duct/sources/python/uwsgi.py | geostarling/duct | a862fc1948ed1ecce1e866cbffc7fcedcea81f55 | [
"MIT"
] | 12 | 2017-01-06T11:59:59.000Z | 2021-03-16T17:57:46.000Z | duct/sources/python/uwsgi.py | geostarling/duct | a862fc1948ed1ecce1e866cbffc7fcedcea81f55 | [
"MIT"
] | 20 | 2017-01-06T12:56:39.000Z | 2017-02-06T13:45:28.000Z | duct/sources/python/uwsgi.py | geostarling/duct | a862fc1948ed1ecce1e866cbffc7fcedcea81f55 | [
"MIT"
] | 2 | 2017-02-09T14:02:13.000Z | 2018-10-16T13:18:17.000Z | """
.. module:: uwsgi
:platform: Any
:synopsis: Reads UWSGI stats
.. moduleauthor:: Colin Alston <colin@imcol.in>
"""
import json
try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from zope.interface import implementer
from twisted.internet import defer, reactor
from twis... | 24.666667 | 76 | 0.565183 | 2,039 | 0.810413 | 1,272 | 0.505564 | 1,573 | 0.625199 | 0 | 0 | 645 | 0.256359 |
46454325357264b47dbceec722a3e08a4d41a6be | 22,167 | py | Python | xform/utils.py | alisonamerico/Django-XForm | ad2e96455307b57ef3c485a006db478fe4352a36 | [
"MIT"
] | 3 | 2019-07-25T14:46:14.000Z | 2020-12-14T22:43:46.000Z | xform/utils.py | alisonamerico/Django-XForm | ad2e96455307b57ef3c485a006db478fe4352a36 | [
"MIT"
] | 4 | 2019-09-04T17:39:04.000Z | 2021-11-05T23:14:58.000Z | xform/utils.py | alisonamerico/Django-XForm | ad2e96455307b57ef3c485a006db478fe4352a36 | [
"MIT"
] | 1 | 2021-11-05T23:05:48.000Z | 2021-11-05T23:05:48.000Z | import datetime
import importlib
import json
import logging
import math
import mimetypes
import os
import re
import sys
import uuid
import requests
from urllib.parse import urljoin
from wsgiref.util import FileWrapper
from xml.dom import minidom, Node
from django.conf import settings
from django.core.files.storage ... | 30.873259 | 96 | 0.606668 | 3,441 | 0.155231 | 2,100 | 0.094735 | 0 | 0 | 0 | 0 | 4,438 | 0.200208 |
4645ac5dfc9f12700491f7aec71f5e520201b23f | 9,050 | py | Python | Phase5/testing_query.py | MrKLawrence/Course-Registration-Data-Analytics | b1a88ab9336a545965752d175d8c4796209e487c | [
"MIT"
] | null | null | null | Phase5/testing_query.py | MrKLawrence/Course-Registration-Data-Analytics | b1a88ab9336a545965752d175d8c4796209e487c | [
"MIT"
] | null | null | null | Phase5/testing_query.py | MrKLawrence/Course-Registration-Data-Analytics | b1a88ab9336a545965752d175d8c4796209e487c | [
"MIT"
] | null | null | null | import datetime
from pymongo import MongoClient
import pymongo
import pprint
try:
db = MongoClient("mongodb://localhost:27017")["hkust"]
f=0.05
try:
print("Querying Documents...")
listOfCourseWithWaitingListSize = db.course.aggregate([
{ "$unwind": "$sections" },
# { "$project": { "newProduct": {"$multi... | 35.629921 | 309 | 0.644309 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,029 | 0.445193 |
4648df628268429b96e7a5ae13c51c1984b5c218 | 2,549 | py | Python | aws_iot/dashboard/migrations/0003_auto_20160427_1641.py | anduslim/aws_iot | 39bddc1af05313f5005b5147b9d469ad337d6f28 | [
"BSD-3-Clause"
] | null | null | null | aws_iot/dashboard/migrations/0003_auto_20160427_1641.py | anduslim/aws_iot | 39bddc1af05313f5005b5147b9d469ad337d6f28 | [
"BSD-3-Clause"
] | null | null | null | aws_iot/dashboard/migrations/0003_auto_20160427_1641.py | anduslim/aws_iot | 39bddc1af05313f5005b5147b9d469ad337d6f28 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('dashboard', '0002_gatewaynode_sensorstickerreading'),
]
operations = [
migrations.CreateModel(
name='DerivedInta... | 32.679487 | 114 | 0.566497 | 2,440 | 0.957238 | 0 | 0 | 0 | 0 | 0 | 0 | 651 | 0.255394 |
464a4fad08a32bd81e6c1f0f95fd3057daa4e736 | 901 | py | Python | investing_algorithm_framework/core/models/__init__.py | coding-kitties/investing-algorithm-framework | 1156acf903345ec5e6787ee8767c68e24c4daffd | [
"Apache-2.0"
] | 9 | 2020-09-14T13:46:32.000Z | 2022-02-01T15:40:12.000Z | investing_algorithm_framework/core/models/__init__.py | coding-kitties/investing-algorithm-framework | 1156acf903345ec5e6787ee8767c68e24c4daffd | [
"Apache-2.0"
] | 44 | 2020-12-28T16:22:20.000Z | 2022-03-23T22:11:26.000Z | investing_algorithm_framework/core/models/__init__.py | coding-kitties/investing-algorithm-framework | 1156acf903345ec5e6787ee8767c68e24c4daffd | [
"Apache-2.0"
] | 2 | 2020-12-25T06:14:39.000Z | 2022-01-19T19:00:20.000Z | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
db = SQLAlchemy()
def create_all_tables():
db.create_all()
def initialize_db(app: Flask):
db.init_app(app)
db.app = app
from investing_algorithm_framework.core.models.order_status import OrderStatus
from investing_algorithm_framework.core... | 25.742857 | 78 | 0.785794 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 111 | 0.123196 |
464a949d4e46e87b22e002325b18acfc9b8c6a90 | 592 | py | Python | src/storage-preview/azext_storage_preview/vendored_sdks/azure_storage/v2018_03_28/file/__init__.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 207 | 2017-11-29T06:59:41.000Z | 2022-03-31T10:00:53.000Z | src/storage-preview/azext_storage_preview/vendored_sdks/azure_storage/v2018_03_28/file/__init__.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 4,061 | 2017-10-27T23:19:56.000Z | 2022-03-31T23:18:30.000Z | src/storage-preview/azext_storage_preview/vendored_sdks/azure_storage/v2018_03_28/file/__init__.py | Mannan2812/azure-cli-extensions | e2b34efe23795f6db9c59100534a40f0813c3d95 | [
"MIT"
] | 802 | 2017-10-11T17:36:26.000Z | 2022-03-31T22:24:32.000Z | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
from .file... | 28.190476 | 76 | 0.540541 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 305 | 0.515203 |
464a989a9cb27c1d1baa77e94436a8092fe897da | 2,633 | py | Python | backend/db/patient.py | wooque/openpacs | 4524bc7fade0934a70a53bb311f302828cc56905 | [
"MIT"
] | 1 | 2021-01-04T23:58:54.000Z | 2021-01-04T23:58:54.000Z | backend/db/patient.py | wooque/openpacs | 4524bc7fade0934a70a53bb311f302828cc56905 | [
"MIT"
] | null | null | null | backend/db/patient.py | wooque/openpacs | 4524bc7fade0934a70a53bb311f302828cc56905 | [
"MIT"
] | 1 | 2022-03-05T12:58:09.000Z | 2022-03-05T12:58:09.000Z | from db.table import Table
from db.study import Study
from db.series import Series
from pypika.pseudocolumns import PseudoColumn
class Patient(Table):
name = 'patients'
async def sync_db(self):
await self.exec("""
CREATE TABLE IF NOT EXISTS patients (
id SERIAL PRIMARY KEY,
... | 31.722892 | 86 | 0.557159 | 2,501 | 0.949867 | 0 | 0 | 0 | 0 | 2,440 | 0.9267 | 621 | 0.235853 |
464bc6633efce25b9cc1abebeb497f50584d997d | 1,424 | py | Python | egs/cops/s5/local/text2json.py | Shuang777/kaldi-2016 | 5373fe4bd80857b53134db566cad48b8445cf3b9 | [
"Apache-2.0"
] | null | null | null | egs/cops/s5/local/text2json.py | Shuang777/kaldi-2016 | 5373fe4bd80857b53134db566cad48b8445cf3b9 | [
"Apache-2.0"
] | null | null | null | egs/cops/s5/local/text2json.py | Shuang777/kaldi-2016 | 5373fe4bd80857b53134db566cad48b8445cf3b9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
import json
def sec2str(seconds):
sec_int = int(round(seconds))
hh = sec_int / 3600
mm = (sec_int - hh * 3600) / 60
ss = sec_int - hh * 3600 - mm * 60
return "%d:%02d:%02d" % (hh, mm, ss)
if len(sys.argv) != 4:
print "Usage:", __file__, "<segment> <text> <json>"
print ... | 21.907692 | 72 | 0.589888 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 210 | 0.147472 |
464c2239f3ce7da17665c8d65313e5b7bfe44898 | 762 | py | Python | codeEval/hard/levenshtein_distance.py | ferhatelmas/algo | a7149c7a605708bc01a5cd30bf5455644cefd04d | [
"WTFPL"
] | 25 | 2015-01-21T16:39:18.000Z | 2021-05-24T07:01:24.000Z | codeEval/hard/levenshtein_distance.py | ferhatelmas/algo | a7149c7a605708bc01a5cd30bf5455644cefd04d | [
"WTFPL"
] | 2 | 2020-09-30T19:39:36.000Z | 2020-10-01T17:15:16.000Z | codeEval/hard/levenshtein_distance.py | ferhatelmas/algo | a7149c7a605708bc01a5cd30bf5455644cefd04d | [
"WTFPL"
] | 15 | 2015-01-21T16:39:27.000Z | 2020-10-01T17:00:22.000Z | import sys
from string import ascii_lowercase as alphabet
def generate_neighbours(ws, s):
ls, l = set(), len(s)
for i in xrange(l + 1):
ls.add(s[:i] + s[i + 1 :])
for e in alphabet:
ls.add(s[:i] + e + s[i:])
if i < l and e != s[i]:
ls.add(s[:i] + e + s[i... | 25.4 | 50 | 0.552493 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.013123 |
464c4a39f52a6f1f848e5df28842de523721d469 | 385 | py | Python | models/RelSaleSizeProject.py | the-Minister-0001/cardano-nft-admin | 870ae5303808056af702d7e162a249567505d4c6 | [
"MIT"
] | 1 | 2021-07-28T20:17:25.000Z | 2021-07-28T20:17:25.000Z | models/RelSaleSizeProject.py | the-Minister-0001/cardano-nft-admin | 870ae5303808056af702d7e162a249567505d4c6 | [
"MIT"
] | null | null | null | models/RelSaleSizeProject.py | the-Minister-0001/cardano-nft-admin | 870ae5303808056af702d7e162a249567505d4c6 | [
"MIT"
] | null | null | null | from sqlalchemy import Column, Integer
from sqlalchemy import ForeignKey
from sqlalchemy.orm import declarative_base
from .base import Base
class RelSaleSizeProject(Base):
__tablename__ = 'rel_salesizes_projects'
id = Column(Integer, primary_key=True)
project_id = Column(Integer, ForeignKey('projects.id')... | 29.615385 | 61 | 0.779221 | 241 | 0.625974 | 0 | 0 | 0 | 0 | 0 | 0 | 51 | 0.132468 |
464ce40b514f813772eac4adaecb88e87e70d261 | 1,415 | py | Python | sudoku/recursive_solver.py | mkomaiha/NERS570-Sudoku | 2448de19dd8ae97292b74937d397846d10176a8b | [
"MIT"
] | null | null | null | sudoku/recursive_solver.py | mkomaiha/NERS570-Sudoku | 2448de19dd8ae97292b74937d397846d10176a8b | [
"MIT"
] | null | null | null | sudoku/recursive_solver.py | mkomaiha/NERS570-Sudoku | 2448de19dd8ae97292b74937d397846d10176a8b | [
"MIT"
] | null | null | null | from sudoku.constants import SIZE, BOX_SIZE
from sudoku import Sudoku
class RS(Sudoku):
def __init__(self, grade=0, id=None):
super().__init__(grade, id)
def possible(self, r, c, n):
for i in range(0, SIZE):
if self.solved[r, i] == n:
return False
for i in ... | 31.444444 | 61 | 0.467845 | 1,342 | 0.94841 | 0 | 0 | 0 | 0 | 0 | 0 | 53 | 0.037456 |
464ea27cbe788bd3f30824ac8262b6f8546e28e0 | 40 | py | Python | scraper.py | souravkaranjai/python-webscraper | b4a76846d80e724059eb7cb9abcd5ec13125258a | [
"MIT"
] | null | null | null | scraper.py | souravkaranjai/python-webscraper | b4a76846d80e724059eb7cb9abcd5ec13125258a | [
"MIT"
] | null | null | null | scraper.py | souravkaranjai/python-webscraper | b4a76846d80e724059eb7cb9abcd5ec13125258a | [
"MIT"
] | null | null | null | #!/usr/bin/python3
print('Hello world') | 13.333333 | 20 | 0.7 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.775 |
464f62901d50ef275959e48f29f0c159e6183c2e | 571 | py | Python | src/algoritmia/problems/binpacking/firstfitbinpacker.py | DavidLlorens/algoritmia | 40ca0a89ea6de9b633fa5f697f0a28cae70816a2 | [
"MIT"
] | 6 | 2018-09-15T15:09:10.000Z | 2022-02-27T01:23:11.000Z | src/algoritmia/problems/binpacking/firstfitbinpacker.py | JeromeIllgner/algoritmia | 406afe7206f2411557859bf03480c16db7dcce0d | [
"MIT"
] | null | null | null | src/algoritmia/problems/binpacking/firstfitbinpacker.py | JeromeIllgner/algoritmia | 406afe7206f2411557859bf03480c16db7dcce0d | [
"MIT"
] | 5 | 2018-07-10T20:19:55.000Z | 2021-03-31T03:32:22.000Z | from algoritmia.problems.binpacking.nextfitbinpacker import NextFitBinPacker
class FirstFitBinPacker(NextFitBinPacker):#[full
def pack(self, w: "IList<Real>", C: "Real") -> "IList<int>":
x = [None] * len(w)
free = []
for i in range(len(w)):
for j in range(len(free)):
... | 35.6875 | 77 | 0.450088 | 491 | 0.859895 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.077058 |
465010f857bece90ac2bd5becc8c6c4644e18f35 | 54 | py | Python | facebook/matrixWordSearch.py | rando3/leetcode-python | b13bb35fb3cdc9813c62944547d260be2f9cab02 | [
"MIT"
] | null | null | null | facebook/matrixWordSearch.py | rando3/leetcode-python | b13bb35fb3cdc9813c62944547d260be2f9cab02 | [
"MIT"
] | null | null | null | facebook/matrixWordSearch.py | rando3/leetcode-python | b13bb35fb3cdc9813c62944547d260be2f9cab02 | [
"MIT"
] | null | null | null | https://leetcode.com/problems/word-search/description/ | 54 | 54 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
46522be46094275849b7f3b3da9bf2d51591f8c8 | 10,754 | py | Python | contrib/make_hdf.py | scopatz/PyTables | 05a74def785688abd802224a5ba44393a701ebc7 | [
"BSD-3-Clause"
] | 9 | 2021-09-28T05:20:22.000Z | 2022-03-16T11:09:06.000Z | contrib/make_hdf.py | scopatz/PyTables | 05a74def785688abd802224a5ba44393a701ebc7 | [
"BSD-3-Clause"
] | null | null | null | contrib/make_hdf.py | scopatz/PyTables | 05a74def785688abd802224a5ba44393a701ebc7 | [
"BSD-3-Clause"
] | 9 | 2018-09-14T02:42:36.000Z | 2021-07-12T02:37:45.000Z | #!/usr/bin/env python
from __future__ import generators
import tables, cPickle, time
#################################################################################
def is_scalar(item):
try:
iter(item)
#could be a string
try:
item[:0]+'' #check for string
return... | 30.292958 | 112 | 0.505951 | 4,525 | 0.420774 | 339 | 0.031523 | 0 | 0 | 0 | 0 | 1,772 | 0.164776 |
465234088d4677a447f6bdb4657e058e1a45f5b8 | 2,234 | py | Python | jinja2content.py | firemark/new-site | b7d54320f8e1cfae489108f87f64761ce2510676 | [
"MIT"
] | null | null | null | jinja2content.py | firemark/new-site | b7d54320f8e1cfae489108f87f64761ce2510676 | [
"MIT"
] | null | null | null | jinja2content.py | firemark/new-site | b7d54320f8e1cfae489108f87f64761ce2510676 | [
"MIT"
] | null | null | null | """
jinja2content.py
----------------
DONT EDIT THIS FILE
Pelican plugin that processes Markdown files as jinja templates.
"""
from jinja2 import Environment, FileSystemLoader, ChoiceLoader
import os
from pelican import signals
from pelican.readers import MarkdownReader, HTMLReader, RstReader
from pelican.utils imp... | 31.027778 | 73 | 0.653984 | 1,594 | 0.713518 | 0 | 0 | 0 | 0 | 0 | 0 | 402 | 0.179946 |
465353204681d4b1df6397f2e8098a707504bf13 | 4,125 | py | Python | task3/code/video_process.py | haohaoqian/STD | 38eeb39474a46e8e66bdf4da6a0e28167e2174a2 | [
"MIT"
] | 1 | 2021-11-30T13:07:41.000Z | 2021-11-30T13:07:41.000Z | task3/code/video_process.py | haohaoqian/STD | 38eeb39474a46e8e66bdf4da6a0e28167e2174a2 | [
"MIT"
] | null | null | null | task3/code/video_process.py | haohaoqian/STD | 38eeb39474a46e8e66bdf4da6a0e28167e2174a2 | [
"MIT"
] | null | null | null | import json
from tqdm import tqdm
from utils import *
from alexnet import AlexNet
def classify(net, folder_name, resize=(224, 224)):
transform = []
if resize:
transform.append(torchvision.transforms.Resize(resize))
transform.append(torchvision.transforms.ToTensor())
transform.append... | 39.663462 | 117 | 0.634909 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,683 | 0.394792 |
4654149e1951b836beb90c90a51fb7d22a7e21c8 | 200 | py | Python | Aulas/12aula(antigo)/readint.py | rafaelmcam/RTOs_ChibiOS | 08d8e21f2c7185d2c47846f67cbfba70c706d689 | [
"MIT"
] | 1 | 2019-05-14T22:31:25.000Z | 2019-05-14T22:31:25.000Z | Aulas/12aula(antigo)/readint.py | rafaelmcam/RTOs_ChibiOS | 08d8e21f2c7185d2c47846f67cbfba70c706d689 | [
"MIT"
] | null | null | null | Aulas/12aula(antigo)/readint.py | rafaelmcam/RTOs_ChibiOS | 08d8e21f2c7185d2c47846f67cbfba70c706d689 | [
"MIT"
] | null | null | null | import serial
with serial.Serial("/dev/ttyUSB0", 115200) as ser:
while 1:
for i in range(5):
n = ser.read()[0]
print("{:x}".format(n))
print("--------")
| 18.181818 | 50 | 0.47 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.15 |
46548694a0ea521a51fee1aa569811ccc528f211 | 578 | py | Python | packages/pyre/parsing/Parser.py | avalentino/pyre | 7e1f0287eb7eba1c6d1ef385e5160079283ac363 | [
"BSD-3-Clause"
] | 25 | 2018-04-23T01:45:39.000Z | 2021-12-10T06:01:23.000Z | packages/pyre/parsing/Parser.py | avalentino/pyre | 7e1f0287eb7eba1c6d1ef385e5160079283ac363 | [
"BSD-3-Clause"
] | 53 | 2018-05-31T04:55:00.000Z | 2021-10-07T21:41:32.000Z | packages/pyre/parsing/Parser.py | avalentino/pyre | 7e1f0287eb7eba1c6d1ef385e5160079283ac363 | [
"BSD-3-Clause"
] | 12 | 2018-04-23T22:50:40.000Z | 2022-02-20T17:27:23.000Z | # -*- coding: utf-8 -*-
#
# michael a.g. aïvázis
# orthologue
# (c) 1998-2021 all rights reserved
#
class Parser:
"""
The base class for parsers
"""
# types
from .exceptions import ParsingError, SyntaxError, TokenizationError
# meta methods
def __init__(self, **kwds):
# chain u... | 16.514286 | 72 | 0.595156 | 459 | 0.791379 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.474138 |
4654a308feea7ad07bf6af611b62104666bd4e8d | 5,087 | py | Python | shfl/data_distribution/data_distribution_non_iid.py | SSSuperTIan/Sherpa.ai-Federated-Learning-Framework | a30d73a018526f1033ee0ec57489c4c6e2f15b0a | [
"Apache-2.0"
] | 1 | 2021-03-18T07:31:36.000Z | 2021-03-18T07:31:36.000Z | shfl/data_distribution/data_distribution_non_iid.py | SSSuperTIan/Sherpa.ai-Federated-Learning-Framework | a30d73a018526f1033ee0ec57489c4c6e2f15b0a | [
"Apache-2.0"
] | null | null | null | shfl/data_distribution/data_distribution_non_iid.py | SSSuperTIan/Sherpa.ai-Federated-Learning-Framework | a30d73a018526f1033ee0ec57489c4c6e2f15b0a | [
"Apache-2.0"
] | null | null | null | import numpy as np
import random
import tensorflow as tf
from shfl.data_base.data_base import shuffle_rows
from shfl.data_distribution.data_distribution_sampling import SamplingDataDistribution
class NonIidDataDistribution(SamplingDataDistribution):
"""
Implementation of a non-independent and identically dis... | 36.597122 | 113 | 0.612149 | 4,890 | 0.961085 | 0 | 0 | 939 | 0.184552 | 0 | 0 | 1,492 | 0.293239 |
4656ff804d82461f52d5fb2b608b15a88f9feeb7 | 1,298 | py | Python | example/0_Basic_usage_of_the_library/python_pymongo/2_select.py | AndersonHJB/learning_spider | b855b7808fb5268e9564180cf73ba5b1fb133f58 | [
"MIT"
] | 2 | 2021-09-07T13:28:34.000Z | 2021-12-13T06:17:10.000Z | example/0_Basic_usage_of_the_library/python_pymongo/2_select.py | AndersonHJB/learning_spider | b855b7808fb5268e9564180cf73ba5b1fb133f58 | [
"MIT"
] | null | null | null | example/0_Basic_usage_of_the_library/python_pymongo/2_select.py | AndersonHJB/learning_spider | b855b7808fb5268e9564180cf73ba5b1fb133f58 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
'''
@Time : 2021-06-08
@Author : EvilRecluse
@Contact : https://github.com/RecluseXU
@Desc : 增
'''
# here put the import lib
from pymongo import MongoClient
from bson import ObjectId
connection: MongoClient = MongoClient('mongodb://localhost:27017')
collection = connection['l... | 22 | 80 | 0.743451 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,218 | 0.681208 |
4657a986bf5b4eb76c1f27d0639731c4204bb162 | 4,428 | py | Python | install-b9s.py | ihaveamac/hardmod-b9s-installer | 4b26cfff76bb00430aacbe80679623e3cc5bb46d | [
"MIT"
] | 13 | 2017-05-20T03:54:55.000Z | 2021-10-09T22:10:09.000Z | install-b9s.py | ihaveamac/hardmod-b9s-installer | 4b26cfff76bb00430aacbe80679623e3cc5bb46d | [
"MIT"
] | 2 | 2017-06-09T06:40:20.000Z | 2017-09-17T14:29:28.000Z | install-b9s.py | ihaveamac/hardmod-b9s-installer | 4b26cfff76bb00430aacbe80679623e3cc5bb46d | [
"MIT"
] | 3 | 2017-12-24T19:10:09.000Z | 2020-12-04T09:01:53.000Z | #!/usr/bin/env python3
import hashlib
import os
import shutil
import subprocess
import sys
import time
def doexit(msg, errcode=0):
print(msg)
input('Press Enter to continue...')
sys.exit(errcode)
if not os.path.isfile('NAND.bin'):
doexit('NAND.bin not found.', errcode=1)
if os.path.isfile('firm0fi... | 35.709677 | 78 | 0.626016 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,752 | 0.395664 |
46586eef963ebf4f9bbb1677b780f95787d3e23e | 6,329 | py | Python | pygazebo/connection.py | robobe/pygazebo | 0ab53034c9cc5bf23bae46bf0e9c984349bdfa5a | [
"Apache-2.0"
] | null | null | null | pygazebo/connection.py | robobe/pygazebo | 0ab53034c9cc5bf23bae46bf0e9c984349bdfa5a | [
"Apache-2.0"
] | null | null | null | pygazebo/connection.py | robobe/pygazebo | 0ab53034c9cc5bf23bae46bf0e9c984349bdfa5a | [
"Apache-2.0"
] | 1 | 2020-12-09T17:27:34.000Z | 2020-12-09T17:27:34.000Z | import concurrent
import time
import math
import sys
import asyncio
import logging
from . import msg
from .parse_error import ParseError
from . import DEBUG_LEVEL
logger = logging.getLogger(__name__)
logger.setLevel(DEBUG_LEVEL)
async def _wait_closed(stream):
assert(sys.version_info.major >= 3)
if sys.versi... | 32.623711 | 137 | 0.613367 | 5,945 | 0.939327 | 0 | 0 | 293 | 0.046295 | 4,005 | 0.632801 | 1,095 | 0.173013 |
4658a352b7ba7209186ef3d47f169f46b8660613 | 2,182 | py | Python | src/visualization/visualize_dataset.py | ivangarrera/MachineLearning | c13584cdcb7c4df1ab2814cf42a3c2bd3c203e75 | [
"MIT"
] | null | null | null | src/visualization/visualize_dataset.py | ivangarrera/MachineLearning | c13584cdcb7c4df1ab2814cf42a3c2bd3c203e75 | [
"MIT"
] | null | null | null | src/visualization/visualize_dataset.py | ivangarrera/MachineLearning | c13584cdcb7c4df1ab2814cf42a3c2bd3c203e75 | [
"MIT"
] | null | null | null | from common_clustering import CommonClustering
#■clustering_features = CommonClustering(r'C:\Users\ivangarrera\Desktop\T2_cleaned.csv')
clustering_features = CommonClustering('D:\Ing. Informatica\Cuarto\Machine Learning\T2_cleaned_gyroscope.csv')
attr = list(clustering_features.data_set)[0][:list(clustering_features.... | 36.983051 | 110 | 0.779102 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 686 | 0.314103 |
465a22b29f2bfae5b6e8e5e3348394868002ce0f | 1,483 | py | Python | app.py | Geo-Gabriel/REST-Api-Hotels | e065f4725507e11a11480118f326e79aded533d5 | [
"MIT"
] | null | null | null | app.py | Geo-Gabriel/REST-Api-Hotels | e065f4725507e11a11480118f326e79aded533d5 | [
"MIT"
] | null | null | null | app.py | Geo-Gabriel/REST-Api-Hotels | e065f4725507e11a11480118f326e79aded533d5 | [
"MIT"
] | null | null | null | from blacklist import BLACKLIST
from flask import Flask, jsonify
from flask_restful import Api
from resources.hotel import Hoteis, Hotel
from resources.user import User, UserLogin, UserLogout, UserRegister, Users
from resources.site import Site, Sites
from flask_jwt_extended import JWTManager
app = Flask(__name__)
ap... | 26.017544 | 80 | 0.766689 | 0 | 0 | 0 | 0 | 293 | 0.197572 | 0 | 0 | 444 | 0.299393 |
465a6321a407b2ead52a83060d6a413f0b6c0e5a | 316 | py | Python | scdlbot/__init__.py | samillinier/habesha-skin-pack | 74d1c84b207c8d598f124a91dce11fb09109c772 | [
"MIT"
] | null | null | null | scdlbot/__init__.py | samillinier/habesha-skin-pack | 74d1c84b207c8d598f124a91dce11fb09109c772 | [
"MIT"
] | null | null | null | scdlbot/__init__.py | samillinier/habesha-skin-pack | 74d1c84b207c8d598f124a91dce11fb09109c772 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Top-level package for Music Downloader Telegram Bot."""
# version as tuple for simple comparisons
VERSION = (0, 9, 16)
__author__ = """George Pchelkin"""
__email__ = 'george@pchelk.in'
# string created from tuple to avoid inconsistency
__version__ = ".".join([str(x) for x in VERSION])
| 26.333333 | 58 | 0.696203 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 214 | 0.677215 |
465afd4dc993d8e9672e85b05bdf2dd73ac767b6 | 4,355 | py | Python | uPython/lopyhelper.py | somervda/ourLora | 8ee21a3eefd13464ad5063174a7a7cab57229e0d | [
"MIT"
] | null | null | null | uPython/lopyhelper.py | somervda/ourLora | 8ee21a3eefd13464ad5063174a7a7cab57229e0d | [
"MIT"
] | 3 | 2022-02-14T19:32:32.000Z | 2022-02-24T18:22:28.000Z | uPython/lopyhelper.py | somervda/ourLora | 8ee21a3eefd13464ad5063174a7a7cab57229e0d | [
"MIT"
] | null | null | null | import struct
import pycom
import time
from network import LoRa
def blink(seconds, rgb):
pycom.rgbled(rgb)
time.sleep(seconds)
pycom.rgbled(0x000000) # off
def setUSFrequencyPlan(lora):
""" Sets the frequency plan that matches the TTN gateway in the USA """
# remove all US915 channels
for c... | 35.406504 | 105 | 0.665901 | 1,603 | 0.368083 | 0 | 0 | 0 | 0 | 0 | 0 | 1,689 | 0.38783 |
465b3dc1f585b6b0356f07d08239e727188800e8 | 2,980 | py | Python | configs/efficientnet/retinanet_effb3_fpn_crop896_8x4_1x_coco.py | chenxinfeng4/mmdetection | a99a1aaa5e4a7614f2f89f2350e1b917b2a8ca7e | [
"Apache-2.0"
] | 6 | 2021-12-18T07:23:35.000Z | 2022-02-26T04:38:26.000Z | configs/efficientnet/retinanet_effb3_fpn_crop896_8x4_1x_coco.py | wondervictor/mmdetection | c72bc707e661d61cf09aca0a53ad21812ef874d0 | [
"Apache-2.0"
] | null | null | null | configs/efficientnet/retinanet_effb3_fpn_crop896_8x4_1x_coco.py | wondervictor/mmdetection | c72bc707e661d61cf09aca0a53ad21812ef874d0 | [
"Apache-2.0"
] | 1 | 2021-12-12T13:35:22.000Z | 2021-12-12T13:35:22.000Z | _base_ = [
'../_base_/models/retinanet_r50_fpn.py',
'../_base_/datasets/coco_detection.py', '../_base_/default_runtime.py'
]
cudnn_benchmark = True
norm_cfg = dict(type='BN', requires_grad=True)
checkpoint = 'https://download.openmmlab.com/mmclassification/v0/efficientnet/efficientnet-b3_3rdparty_8xb32-aa_in1k... | 31.702128 | 147 | 0.645638 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 811 | 0.272148 |
465d72bc64541d0735329d0bb15e70e1a6c30e99 | 2,265 | py | Python | tests/test_model.py | Sebastiencreoff/mongo_tool | 048171ba2c172c0e8962a5408edbaec26cfdf4ca | [
"MIT"
] | null | null | null | tests/test_model.py | Sebastiencreoff/mongo_tool | 048171ba2c172c0e8962a5408edbaec26cfdf4ca | [
"MIT"
] | null | null | null | tests/test_model.py | Sebastiencreoff/mongo_tool | 048171ba2c172c0e8962a5408edbaec26cfdf4ca | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import datetime
import mock
import mom
class ExampleClass(mom.Model):
JSON_SCHEMA = {
'$schema': 'http://json-schema.org/schema#',
'title': 'Test class for JSON',
'type': 'object',
'properties': {
'value_datetime': {'type': ['datetime', 'null']}... | 25.449438 | 74 | 0.63532 | 1,029 | 0.454305 | 0 | 0 | 187 | 0.082561 | 0 | 0 | 381 | 0.168212 |
46604f1fc90b7c0ea8ac8ed35c4082c5ab9f172f | 247 | py | Python | src/koeda/utils/stopwords.py | toriving/KoEDA | 5dfbb0e88ede13da2e5e72ac94fe7cb12c0b7cd1 | [
"MIT"
] | 48 | 2021-04-23T16:13:41.000Z | 2022-03-24T09:03:26.000Z | src/koeda/utils/stopwords.py | toriving/KoEDA | 5dfbb0e88ede13da2e5e72ac94fe7cb12c0b7cd1 | [
"MIT"
] | 6 | 2020-11-19T13:56:29.000Z | 2021-09-26T12:13:23.000Z | src/koeda/utils/stopwords.py | toriving/KoEDA | 5dfbb0e88ede13da2e5e72ac94fe7cb12c0b7cd1 | [
"MIT"
] | 3 | 2021-09-13T07:14:29.000Z | 2021-12-29T09:52:36.000Z | import os
import json
STOPWORDS_JSON_PATH = os.path.join(
os.path.dirname(os.path.abspath(__file__)), os.pardir, "corpora/stopwords.json"
)
with open(STOPWORDS_JSON_PATH, "r", encoding="utf-8") as f:
STOPWORD = json.load(f)["stopwords"]
| 24.7 | 83 | 0.720648 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.182186 |
4660b825bf1a5e031627c3620c78b68944deb5c7 | 652 | py | Python | glue/core/tests/test_message.py | ejeschke/glue | 21689e3474aeaeb70e258d76c60755596856976c | [
"BSD-3-Clause"
] | 3 | 2015-09-10T22:23:55.000Z | 2019-04-04T18:47:33.000Z | glue/core/tests/test_message.py | ejeschke/glue | 21689e3474aeaeb70e258d76c60755596856976c | [
"BSD-3-Clause"
] | null | null | null | glue/core/tests/test_message.py | ejeschke/glue | 21689e3474aeaeb70e258d76c60755596856976c | [
"BSD-3-Clause"
] | 1 | 2019-08-04T14:10:12.000Z | 2019-08-04T14:10:12.000Z | from __future__ import absolute_import, division, print_function
import pytest
from .. import message as msg
def test_invalid_subset_msg():
with pytest.raises(TypeError) as exc:
msg.SubsetMessage(None)
assert exc.value.args[0].startswith('Sender must be a subset')
def test_invalid_data_msg():
... | 27.166667 | 74 | 0.739264 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 81 | 0.124233 |
4660df17d48e40efbff3c55617fa7393819b5977 | 1,358 | py | Python | fabfile/config.py | kurochan/config-collector | 656da97eb219eb5bcf913173dd7aa76d0cedd44c | [
"MIT"
] | 1 | 2017-07-30T17:35:10.000Z | 2017-07-30T17:35:10.000Z | fabfile/config.py | kurochan/config-collector | 656da97eb219eb5bcf913173dd7aa76d0cedd44c | [
"MIT"
] | null | null | null | fabfile/config.py | kurochan/config-collector | 656da97eb219eb5bcf913173dd7aa76d0cedd44c | [
"MIT"
] | 1 | 2015-03-01T08:52:14.000Z | 2015-03-01T08:52:14.000Z | # -*- coding: utf-8 -*-
import os
import util
from fabric.api import *
from fabric.state import output
from fabric.colors import *
from base import BaseTask
from helper.print_helper import task_puts
class CollectConfig(BaseTask):
"""
collect configuration
"""
name = "collect"
def run_task(self, *args, **kwa... | 33.121951 | 156 | 0.690722 | 1,129 | 0.83137 | 0 | 0 | 0 | 0 | 0 | 0 | 257 | 0.189249 |
4661333ffeca10b7026c68a47b44fc3be83ff093 | 2,334 | py | Python | python/paddle/fluid/tests/unittests/ir/inference/test_trt_transpose_flatten_concat_fuse_pass.py | LWhite027/PaddleBox | b14bcdf285dd8829e11ab12cc815ac1b1ab62694 | [
"Apache-2.0"
] | 10 | 2021-05-12T07:20:32.000Z | 2022-03-04T08:21:56.000Z | python/paddle/fluid/tests/unittests/ir/inference/test_trt_transpose_flatten_concat_fuse_pass.py | AFLee/Paddle | 311b3b44fc7d51d4d66d90ab8a3fc0d42231afda | [
"Apache-2.0"
] | 1 | 2020-09-10T09:05:52.000Z | 2020-09-10T09:06:22.000Z | python/paddle/fluid/tests/unittests/ir/inference/test_trt_transpose_flatten_concat_fuse_pass.py | AFLee/Paddle | 311b3b44fc7d51d4d66d90ab8a3fc0d42231afda | [
"Apache-2.0"
] | 25 | 2019-12-07T02:14:14.000Z | 2021-12-30T06:16:30.000Z | # 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 appli... | 40.947368 | 83 | 0.673522 | 1,479 | 0.633676 | 0 | 0 | 0 | 0 | 0 | 0 | 844 | 0.361611 |
46627a350df5177a8548cf67ff0c02d30e501fb7 | 2,183 | py | Python | src/stage_02_base_model_creation.py | TUCchkul/Dog-Cat-Classification-with-MLflow | 543f55bd88c048da88f343ff4b1b15b3f84ec20f | [
"MIT"
] | null | null | null | src/stage_02_base_model_creation.py | TUCchkul/Dog-Cat-Classification-with-MLflow | 543f55bd88c048da88f343ff4b1b15b3f84ec20f | [
"MIT"
] | null | null | null | src/stage_02_base_model_creation.py | TUCchkul/Dog-Cat-Classification-with-MLflow | 543f55bd88c048da88f343ff4b1b15b3f84ec20f | [
"MIT"
] | null | null | null | import argparse
import os
import shutil
from tqdm import tqdm
import logging
from src.utils.common import read_yaml, create_directories
import random
from src.utils.model import log_model_summary
import tensorflow as tf
STAGE= "Base Model Creation"
logging.basicConfig(
filename=os.path.join("logs",'running_logs.... | 33.584615 | 81 | 0.633532 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 488 | 0.223546 |
46628dc5cc0651a6487fc8978ac7257bc4e97455 | 3,774 | py | Python | test_calculator.py | Kidatoy/Advanced-Calculator | ebd3e436894116ec35b08872ffecdf762b079670 | [
"MIT"
] | null | null | null | test_calculator.py | Kidatoy/Advanced-Calculator | ebd3e436894116ec35b08872ffecdf762b079670 | [
"MIT"
] | null | null | null | test_calculator.py | Kidatoy/Advanced-Calculator | ebd3e436894116ec35b08872ffecdf762b079670 | [
"MIT"
] | null | null | null | import unittest # https://docs.python.org/3/library/unittest.html
from modules.calculator import Calculator as Calc
class TestCalculator(unittest.TestCase):
"""
Test Driven Development Unittest File
Module: Calculator
Updated: 12/16/2019
Author: Kida Toy
"""
def test_addition(self):
... | 36.640777 | 75 | 0.560943 | 3,655 | 0.968468 | 0 | 0 | 0 | 0 | 0 | 0 | 1,046 | 0.27716 |
4662eb3534b543f9d1857e55e3d0e8669cf078e7 | 9,315 | py | Python | pddf_psuutil/main.py | deran1980/sonic-utilities | a6ae218238e7e552f49191f81451bd55ff56ba51 | [
"Apache-2.0"
] | null | null | null | pddf_psuutil/main.py | deran1980/sonic-utilities | a6ae218238e7e552f49191f81451bd55ff56ba51 | [
"Apache-2.0"
] | 4 | 2020-04-17T06:53:05.000Z | 2020-12-01T02:37:34.000Z | pddf_psuutil/main.py | deran1980/sonic-utilities | a6ae218238e7e552f49191f81451bd55ff56ba51 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
#
# main.py
#
# Command-line utility for interacting with PSU Controller in PDDF mode in SONiC
#
try:
import sys
import os
import click
from tabulate import tabulate
from utilities_common.util_base import UtilHelper
except ImportError as e:
raise ImportError("%s - require... | 31.05 | 117 | 0.646914 | 0 | 0 | 0 | 0 | 5,098 | 0.547289 | 0 | 0 | 1,795 | 0.1927 |
466394d9212459110bd5519845967eacdfeb9888 | 758 | py | Python | gifbox/core/serializers.py | timmygee/gifbox | ccdd88ad9424c8e2c519415cde619af3a61daf66 | [
"MIT"
] | null | null | null | gifbox/core/serializers.py | timmygee/gifbox | ccdd88ad9424c8e2c519415cde619af3a61daf66 | [
"MIT"
] | null | null | null | gifbox/core/serializers.py | timmygee/gifbox | ccdd88ad9424c8e2c519415cde619af3a61daf66 | [
"MIT"
] | null | null | null | from rest_framework import serializers
from versatileimagefield.serializers import VersatileImageFieldSerializer
from .models import Image, AnimatedGif
class ImageSerializer(serializers.ModelSerializer):
class Meta:
model = Image
fields = ('image',)
image = VersatileImageFieldSerializer(
... | 23.6875 | 73 | 0.631926 | 598 | 0.788918 | 0 | 0 | 0 | 0 | 0 | 0 | 137 | 0.180739 |
466460f359120dda2e7fd00e3c8bae00cdec4a39 | 4,930 | py | Python | ginga/canvas/coordmap.py | saimn/ginga | 9daf1875b4c1b0fad0a053c5f258bf7d4c0f3455 | [
"BSD-3-Clause"
] | null | null | null | ginga/canvas/coordmap.py | saimn/ginga | 9daf1875b4c1b0fad0a053c5f258bf7d4c0f3455 | [
"BSD-3-Clause"
] | null | null | null | ginga/canvas/coordmap.py | saimn/ginga | 9daf1875b4c1b0fad0a053c5f258bf7d4c0f3455 | [
"BSD-3-Clause"
] | null | null | null | #
# coordmap.py -- coordinate mappings.
#
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
from ginga import trcalc
from ginga.util import wcs
from ginga.util.six.moves import map
__all__ = ['CanvasMapper', 'DataMapper', 'OffsetMapper', 'WCSMapper']
class ... | 30.245399 | 71 | 0.631034 | 4,596 | 0.932252 | 0 | 0 | 0 | 0 | 0 | 0 | 1,283 | 0.260243 |
46656e54aaab662adced0d0bfa04fce707df2e88 | 6,658 | py | Python | train.py | zpc-666/Paddle-Stochastic-Depth-ResNet110 | bb8b5b90052feef39fafd2a790f08b80b45fbe41 | [
"Apache-2.0"
] | null | null | null | train.py | zpc-666/Paddle-Stochastic-Depth-ResNet110 | bb8b5b90052feef39fafd2a790f08b80b45fbe41 | [
"Apache-2.0"
] | null | null | null | train.py | zpc-666/Paddle-Stochastic-Depth-ResNet110 | bb8b5b90052feef39fafd2a790f08b80b45fbe41 | [
"Apache-2.0"
] | 1 | 2021-08-07T14:56:44.000Z | 2021-08-07T14:56:44.000Z | # coding: utf-8
# 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
# Un... | 47.899281 | 169 | 0.615801 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,613 | 0.23142 |
466669f55fd94ab7691c895cf787adfe7eec635c | 1,204 | py | Python | dataloader/EDSR/video.py | pidan1231239/SR-Stereo2 | 8e7ef8f33a10c9d857cc5383c02d126ee6ab8a29 | [
"MIT"
] | 1 | 2020-03-11T12:19:13.000Z | 2020-03-11T12:19:13.000Z | dataloader/EDSR/video.py | pidan1231239/SR-Stereo2 | 8e7ef8f33a10c9d857cc5383c02d126ee6ab8a29 | [
"MIT"
] | null | null | null | dataloader/EDSR/video.py | pidan1231239/SR-Stereo2 | 8e7ef8f33a10c9d857cc5383c02d126ee6ab8a29 | [
"MIT"
] | null | null | null | import os
from . import common
import cv2
import numpy as np
import imageio
import torch
import torch.utils.data as data
class Video(data.Dataset):
def __init__(self, args, name='Video', train=False, benchmark=False):
self.args = args
self.name = name
self.scale = args.scale
self... | 26.755556 | 77 | 0.623754 | 1,077 | 0.894518 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.01495 |
46674d12a75c726caab7f069ff51c1295884c1f4 | 67 | py | Python | backend/views/__init__.py | chriamue/flask-unchained-react-spa | 610e099f3ece508f4c8a62d3704e4cc49f869194 | [
"MIT"
] | 5 | 2018-10-15T15:33:32.000Z | 2021-01-13T23:03:48.000Z | backend/views/__init__.py | chriamue/flask-unchained-react-spa | 610e099f3ece508f4c8a62d3704e4cc49f869194 | [
"MIT"
] | 18 | 2019-12-10T22:11:27.000Z | 2021-12-13T20:42:58.000Z | backend/views/__init__.py | chriamue/flask-unchained-react-spa | 610e099f3ece508f4c8a62d3704e4cc49f869194 | [
"MIT"
] | 4 | 2018-10-15T15:59:25.000Z | 2020-04-11T17:48:35.000Z | from .contact_submission_resource import ContactSubmissionResource
| 33.5 | 66 | 0.925373 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4667ccf5ef5c78e64a0eadc56411d4151f24e864 | 6,395 | py | Python | blink_handler.py | oyiptong/chromium-dashboard | c94632a779da0c8ab51c2e029fdcceffad6ab4c1 | [
"Apache-2.0"
] | null | null | null | blink_handler.py | oyiptong/chromium-dashboard | c94632a779da0c8ab51c2e029fdcceffad6ab4c1 | [
"Apache-2.0"
] | null | null | null | blink_handler.py | oyiptong/chromium-dashboard | c94632a779da0c8ab51c2e029fdcceffad6ab4c1 | [
"Apache-2.0"
] | 1 | 2020-09-29T19:23:59.000Z | 2020-09-29T19:23:59.000Z | # -*- coding: utf-8 -*-
# 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... | 34.945355 | 124 | 0.70086 | 5,266 | 0.823456 | 0 | 0 | 2,569 | 0.40172 | 0 | 0 | 2,125 | 0.332291 |
46687db58d5ce22cf64d16f65406c0bb8f14b56a | 2,756 | py | Python | OBlog/blueprint/pages/main.py | OhYee/OBlog | a9d7e4fda5651cf9c5afd4c128c4df4442794e97 | [
"BSD-3-Clause"
] | 23 | 2018-02-23T12:56:43.000Z | 2021-12-20T13:21:47.000Z | OBlog/blueprint/pages/main.py | OhYee/OBlog | a9d7e4fda5651cf9c5afd4c128c4df4442794e97 | [
"BSD-3-Clause"
] | 17 | 2018-02-23T12:52:39.000Z | 2018-12-04T05:50:58.000Z | OBlog/blueprint/pages/main.py | OhYee/OBlog | a9d7e4fda5651cf9c5afd4c128c4df4442794e97 | [
"BSD-3-Clause"
] | 2 | 2018-06-16T20:52:23.000Z | 2021-04-08T15:29:44.000Z | from OBlog import database as db
from flask import g, current_app
import re
def getPages():
if not hasattr(g, "getPages"):
res = db.query_db('select * from pages;')
res.sort(key=lambda x: int(x["idx"]))
g.getPages = res
return g.getPages
def getPagesDict():
if not has... | 22.590164 | 96 | 0.576197 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 333 | 0.120043 |
4669e171fec58193272f58bd7b305ba7d5f7aed0 | 78,232 | py | Python | lib/rabbitmq-dotnet-client-rabbitmq_v3_4_4/docs/pyle2-fcfcf7e/Cheetah/Compiler.py | CymaticLabs/Unity3d.Amqp | 42ca5de66fcda21ef6a4040bade99118b2ad6374 | [
"MIT"
] | 83 | 2017-03-15T12:43:25.000Z | 2022-03-31T12:38:44.000Z | lib/rabbitmq-dotnet-client-rabbitmq_v3_4_4/docs/pyle2-fcfcf7e/Cheetah/Compiler.py | CymaticLabs/Unity3d.Amqp | 42ca5de66fcda21ef6a4040bade99118b2ad6374 | [
"MIT"
] | 18 | 2017-03-20T14:12:58.000Z | 2021-07-28T09:11:55.000Z | lib/rabbitmq-dotnet-client-rabbitmq_v3_4_4/docs/pyle2-fcfcf7e/Cheetah/Compiler.py | CymaticLabs/Unity3d.Amqp | 42ca5de66fcda21ef6a4040bade99118b2ad6374 | [
"MIT"
] | 25 | 2017-04-01T01:40:02.000Z | 2022-02-20T11:08:12.000Z | #!/usr/bin/env python
# $Id: Compiler.py,v 1.148 2006/06/22 00:18:22 tavis_rudd Exp $
"""Compiler classes for Cheetah:
ModuleCompiler aka 'Compiler'
ClassCompiler
MethodCompiler
If you are trying to grok this code start with ModuleCompiler.__init__,
ModuleCompiler.compile, and ModuleCompiler.__getattr__.
Meta-Data
==... | 39.631206 | 117 | 0.585323 | 71,727 | 0.91685 | 0 | 0 | 0 | 0 | 0 | 0 | 24,056 | 0.307496 |
466a34ecb0421da1e44f26b4a2ebb96b4fc1273b | 1,267 | py | Python | tests/simple_cmd_checks.py | Rhoynar/plmn-regression | fa58819a405b45430bbde28e52b356e04867aaa3 | [
"MIT"
] | 11 | 2019-02-07T16:13:59.000Z | 2021-08-14T03:53:14.000Z | tests/simple_cmd_checks.py | Rhoynar/plmn-regression | fa58819a405b45430bbde28e52b356e04867aaa3 | [
"MIT"
] | null | null | null | tests/simple_cmd_checks.py | Rhoynar/plmn-regression | fa58819a405b45430bbde28e52b356e04867aaa3 | [
"MIT"
] | 3 | 2019-02-07T16:14:09.000Z | 2021-08-14T05:09:17.000Z | # -*- coding: utf-8 -*-
import compat
import unittest
import sys
from plmn.utils import *
from plmn.results import *
from plmn.modem_cmds import *
from plmn.simple_cmds import *
class SimpleCmdChecks(unittest.TestCase):
def test_simple_status_cmd(self):
SimpleCmds.simple_status_cmd()
assert Resul... | 31.675 | 89 | 0.750592 | 948 | 0.748224 | 0 | 0 | 380 | 0.299921 | 0 | 0 | 180 | 0.142068 |
466a6d9821a84e031f7dcd282011c9bf05adc133 | 13,877 | py | Python | mogan/tests/unit/notifications/test_notification.py | GURUIFENG9139/rocky-mogan | 6008c1d12b00e70d2cc651f7bd5d47968fc3aec7 | [
"Apache-2.0"
] | null | null | null | mogan/tests/unit/notifications/test_notification.py | GURUIFENG9139/rocky-mogan | 6008c1d12b00e70d2cc651f7bd5d47968fc3aec7 | [
"Apache-2.0"
] | null | null | null | mogan/tests/unit/notifications/test_notification.py | GURUIFENG9139/rocky-mogan | 6008c1d12b00e70d2cc651f7bd5d47968fc3aec7 | [
"Apache-2.0"
] | null | null | null | # 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 agreed to in... | 41.423881 | 79 | 0.64906 | 11,988 | 0.863875 | 0 | 0 | 8,241 | 0.59386 | 0 | 0 | 3,365 | 0.242488 |
466b2847bd0a3e11bd815c4ef8485277011347fd | 1,208 | py | Python | plash/macros/packagemanagers.py | 0xflotus/plash | 9dd66a06413d5c1f12fd9a7e7b56a05b797ad309 | [
"MIT"
] | null | null | null | plash/macros/packagemanagers.py | 0xflotus/plash | 9dd66a06413d5c1f12fd9a7e7b56a05b797ad309 | [
"MIT"
] | null | null | null | plash/macros/packagemanagers.py | 0xflotus/plash | 9dd66a06413d5c1f12fd9a7e7b56a05b797ad309 | [
"MIT"
] | null | null | null | from plash.eval import eval, register_macro, shell_escape_args
@register_macro()
def defpm(name, *lines):
'define a new package manager'
@register_macro(name, group='package managers')
@shell_escape_args
def package_manager(*packages):
if not packages:
return
sh_packages =... | 18.875 | 69 | 0.537252 | 0 | 0 | 0 | 0 | 478 | 0.395695 | 0 | 0 | 489 | 0.404801 |
466ccc900104e36f636478253e917a965c1df4d3 | 371 | py | Python | app/schemas/email.py | waynesun09/notify-service | 768a0db264a9e57eecce283108878e24e8d3b740 | [
"MIT"
] | 5 | 2020-12-20T17:10:46.000Z | 2021-08-20T05:00:58.000Z | app/schemas/email.py | RedHatQE/notify-service | 579e995fae0c472f9fbd27471371a2c404d94f66 | [
"MIT"
] | 13 | 2021-01-07T14:17:14.000Z | 2022-01-05T20:36:36.000Z | app/schemas/email.py | RedHatQE/notify-service | 579e995fae0c472f9fbd27471371a2c404d94f66 | [
"MIT"
] | 1 | 2022-01-06T22:21:09.000Z | 2022-01-06T22:21:09.000Z | from typing import Optional, List
from pydantic import BaseModel, EmailStr
from . import result
class EmailBase(BaseModel):
email: Optional[EmailStr] = None
class EmailSend(EmailBase):
msg: str
class EmailResult(BaseModel):
pre_header: Optional[str] = None
begin: Optional[str] = None
content:... | 18.55 | 40 | 0.719677 | 265 | 0.714286 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
466d26384d26ffba4886645e21f0b784ab726d0b | 470 | py | Python | example.py | ErikPel/rankedchoicevoting | 7ea9149d2d7f48d5b4c323537a701b7ccf8a8616 | [
"MIT"
] | 1 | 2021-11-25T07:50:10.000Z | 2021-11-25T07:50:10.000Z | example.py | ErikPel/rankedchoicevoting | 7ea9149d2d7f48d5b4c323537a701b7ccf8a8616 | [
"MIT"
] | null | null | null | example.py | ErikPel/rankedchoicevoting | 7ea9149d2d7f48d5b4c323537a701b7ccf8a8616 | [
"MIT"
] | null | null | null | from rankedchoicevoting import Poll
candidatesA = {"Bob": 0, "Sue": 0, "Bill": 0}
#votes in array sorted by first choice to last choice
votersA = {
"a": ['Bob', 'Bill', 'Sue'],
"b": ['Sue', 'Bob', 'Bill'],
"c": ['Bill', 'Sue', 'Bob'],
"d": ['Bob', 'Bill', 'Sue'],
"f": ['Sue', 'Bob', 'Bill']
}
el... | 24.736842 | 53 | 0.576596 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 192 | 0.408511 |
466d4b83456bbb93d38bc63179c0f99d00a30a62 | 2,422 | py | Python | DeployScript.py | junoteam/TelegramBot | 3e679637a5918c4f9595beaa2f0f67c9e4467056 | [
"Apache-2.0"
] | 3 | 2015-04-08T18:41:02.000Z | 2015-10-28T09:54:47.000Z | DeployScript.py | junoteam/TelegramBot | 3e679637a5918c4f9595beaa2f0f67c9e4467056 | [
"Apache-2.0"
] | null | null | null | DeployScript.py | junoteam/TelegramBot | 3e679637a5918c4f9595beaa2f0f67c9e4467056 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- author: Alex -*-
from Centos6_Bit64 import *
from SystemUtils import *
# Checking version of OS should happened before menu appears
# Check version of CentOS
SystemUtils.check_centos_version()
# Clear screen before to show menu
os.system('clear')
answer = True
whi... | 31.051282 | 77 | 0.604872 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,173 | 0.48431 |
466dad9d3b71c7956f19885bfc3e8b7004d94303 | 1,923 | py | Python | distributed/register/application.py | ADKosm/concurrency | e3bda762ec12d8988ffda060f8842ffda5526f2b | [
"MIT"
] | null | null | null | distributed/register/application.py | ADKosm/concurrency | e3bda762ec12d8988ffda060f8842ffda5526f2b | [
"MIT"
] | null | null | null | distributed/register/application.py | ADKosm/concurrency | e3bda762ec12d8988ffda060f8842ffda5526f2b | [
"MIT"
] | null | null | null | import asyncio
import os
import time
from dataclasses import dataclass
import requests_unixsocket
from aiohttp import ClientSession, web
@dataclass(frozen=True)
class Replica:
replica_id: str
ip: str
is_self: bool
def replicas_discovery():
session = requests_unixsocket.Session()
number_of_repli... | 28.279412 | 115 | 0.651586 | 64 | 0.033281 | 0 | 0 | 88 | 0.045762 | 511 | 0.265731 | 298 | 0.154966 |