hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
423e9d9ea7413739b62b99cedf359ea5c6207578 | 3,433 | py | Python | utils/cmd_args.py | shaolinkhoa/rec-attend-public | 678407e98fcd4c3b72f101dda3e4bc8c120bca0f | [
"MIT"
] | 118 | 2017-04-10T00:41:31.000Z | 2022-03-28T09:34:28.000Z | utils/cmd_args.py | shaolinkhoa/rec-attend-public | 678407e98fcd4c3b72f101dda3e4bc8c120bca0f | [
"MIT"
] | 10 | 2017-10-02T04:23:27.000Z | 2022-03-09T08:09:12.000Z | utils/cmd_args.py | shaolinkhoa/rec-attend-public | 678407e98fcd4c3b72f101dda3e4bc8c120bca0f | [
"MIT"
] | 51 | 2017-05-23T02:46:16.000Z | 2021-10-09T05:21:34.000Z | """
Command-line argument wrapper.
Singleton implementation. Each class declare a subset of flags. Flags all need
to be declared before calling "make".
Use "get" for all external usage. Do not call CmdArgs class constructor unless
absolutely necessary.
"""
import argparse
cmd_args = None
def init(description):
... | 29.594828 | 79 | 0.573551 |
50b448f9cf0fea04f2255705f8a2c344b97353e9 | 78 | py | Python | challenge_1/python/papersquares/stringreversechallenge1.py | rchicoli/2017-challenges | 44f0b672e5dea34de1dde131b6df837d462f8e29 | [
"Apache-2.0"
] | 271 | 2017-01-01T22:58:36.000Z | 2021-11-28T23:05:29.000Z | challenge_1/python/papersquares/stringreversechallenge1.py | AakashOfficial/2017Challenges | a8f556f1d5b43c099a0394384c8bc2d826f9d287 | [
"Apache-2.0"
] | 283 | 2017-01-01T23:26:05.000Z | 2018-03-23T00:48:55.000Z | challenge_1/python/papersquares/stringreversechallenge1.py | AakashOfficial/2017Challenges | a8f556f1d5b43c099a0394384c8bc2d826f9d287 | [
"Apache-2.0"
] | 311 | 2017-01-01T22:59:23.000Z | 2021-09-23T00:29:12.000Z | n = str(raw_input('what would you like to see backwards?:'))
print n [::-1]
| 15.6 | 60 | 0.641026 |
fdd8159c9c758bee3b9eceefb1e255bcd405e920 | 12,154 | py | Python | utils/dataloader.py | msieb1/LTCN | c9432891327774edf8193e885cc4f10f53fcaa60 | [
"MIT"
] | 1 | 2020-08-21T03:47:33.000Z | 2020-08-21T03:47:33.000Z | utils/dataloader.py | msieb1/LTCN | c9432891327774edf8193e885cc4f10f53fcaa60 | [
"MIT"
] | null | null | null | utils/dataloader.py | msieb1/LTCN | c9432891327774edf8193e885cc4f10f53fcaa60 | [
"MIT"
] | null | null | null | from __future__ import print_function, division
import os
import torch
import pandas as pd
from skimage import io, transform
import numpy as np
import matplotlib.pyplot as plt
from torch.utils.data import Dataset, DataLoader
from torchvision import transforms, utils
from vocabulary import Vocabulary
import nltk
from co... | 40.648829 | 178 | 0.652707 |
42b90f0e26f707655ae4ab9b3c60593e9545228d | 6,784 | py | Python | neutron/tests/unit/services/l3_router/service_providers/test_driver_controller.py | igor-toga/local-snat | 7adfe5668d309ff56350acee0d0b986e670abe7c | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/services/l3_router/service_providers/test_driver_controller.py | igor-toga/local-snat | 7adfe5668d309ff56350acee0d0b986e670abe7c | [
"Apache-2.0"
] | null | null | null | neutron/tests/unit/services/l3_router/service_providers/test_driver_controller.py | igor-toga/local-snat | 7adfe5668d309ff56350acee0d0b986e670abe7c | [
"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... | 48.457143 | 78 | 0.619399 |
8631773f83a23b54f42b1e0e764b4f7447acb1d7 | 1,169 | py | Python | synthtiger/components/image_effect/image_rotate.py | KoryakovDmitry/synthtiger | 8a995aef46f2c5fe3ee0bbaca2269b3cf66927d4 | [
"MIT"
] | 153 | 2021-07-29T02:47:45.000Z | 2022-03-29T13:38:30.000Z | synthtiger/components/image_effect/image_rotate.py | moonbings/synthtiger | 87f6de877d8497d3f3b14d414bd3b0ea5f017175 | [
"MIT"
] | 10 | 2021-07-29T02:59:46.000Z | 2022-03-05T19:31:23.000Z | synthtiger/components/image_effect/image_rotate.py | moonbings/synthtiger | 87f6de877d8497d3f3b14d414bd3b0ea5f017175 | [
"MIT"
] | 37 | 2021-08-01T23:13:34.000Z | 2022-03-22T07:46:45.000Z | """
SynthTIGER
Copyright (c) 2021-present NAVER Corp.
MIT license
"""
import imgaug.augmenters as iaa
import numpy as np
from synthtiger.components.component import Component
class ImageRotate(Component):
def __init__(self, angle=(-45, 45), ccw=0, mode="constant"):
super().__init__()
self.angle ... | 24.354167 | 82 | 0.559453 |
d74cd5f5036faeee27da0a48206cd874e32bc7df | 6,215 | py | Python | examples/oldexamples/large_wikipedia_chef.py | richard-dinh/ricecooker | 1de27c9c01aa2c65b2109ada2b790b23cbc3b0dd | [
"MIT"
] | 14 | 2017-01-10T09:33:03.000Z | 2021-11-28T12:11:27.000Z | examples/oldexamples/large_wikipedia_chef.py | richard-dinh/ricecooker | 1de27c9c01aa2c65b2109ada2b790b23cbc3b0dd | [
"MIT"
] | 174 | 2016-09-29T17:32:54.000Z | 2022-03-29T15:02:48.000Z | examples/oldexamples/large_wikipedia_chef.py | richard-dinh/ricecooker | 1de27c9c01aa2c65b2109ada2b790b23cbc3b0dd | [
"MIT"
] | 41 | 2016-08-29T23:26:17.000Z | 2021-11-29T17:12:03.000Z | #!/usr/bin/env python
import tempfile
import requests
from bs4 import BeautifulSoup
from ricecooker.chefs import SushiChef
from ricecooker.classes import licenses
from ricecooker.classes.files import HTMLZipFile
from ricecooker.classes.nodes import ChannelNode, HTML5AppNode, TopicNode
from ricecooker.utils.caching i... | 35.514286 | 182 | 0.687369 |
4dd5294e8abc485cf6a67f64ad8a13da3cfc836f | 36,752 | py | Python | bokeh/plotting/helpers.py | ammarnajjar/bokeh | d4ca6f26d7dc218c12e0bfd2583e7fcd1089d545 | [
"BSD-3-Clause"
] | 1 | 2019-12-02T03:08:41.000Z | 2019-12-02T03:08:41.000Z | bokeh/plotting/helpers.py | ammarnajjar/bokeh | d4ca6f26d7dc218c12e0bfd2583e7fcd1089d545 | [
"BSD-3-Clause"
] | null | null | null | bokeh/plotting/helpers.py | ammarnajjar/bokeh | d4ca6f26d7dc218c12e0bfd2583e7fcd1089d545 | [
"BSD-3-Clause"
] | null | null | null | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 36.031373 | 160 | 0.618905 |
2a2dfef7f2dc21312d7c01fbf1d079a4429df748 | 1,734 | py | Python | export_xml.py | Conturing/mts-xml2dot | 93ffd6ebc42283c4392073f87096193011cb2545 | [
"MIT"
] | null | null | null | export_xml.py | Conturing/mts-xml2dot | 93ffd6ebc42283c4392073f87096193011cb2545 | [
"MIT"
] | null | null | null | export_xml.py | Conturing/mts-xml2dot | 93ffd6ebc42283c4392073f87096193011cb2545 | [
"MIT"
] | null | null | null | import xml
from mts import MTS
import logging
from itertools import chain
import xml.etree.ElementTree as ET
log = logging.getLogger(__name__)
def modal_to_xml(path, mts: MTS, mc: bool = False, derive_groups: bool = False):
root = ET.Element('modalContract')
states = ET.SubElement(root, 'states')
trans... | 32.716981 | 80 | 0.61534 |
a671068814287a1f184c4ba976510571febc2f55 | 8,268 | py | Python | atom/nucleus/python/nucleus_api/models/page_stage.py | sumit4-ttn/SDK | b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/page_stage.py | sumit4-ttn/SDK | b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff | [
"Apache-2.0"
] | null | null | null | atom/nucleus/python/nucleus_api/models/page_stage.py | sumit4-ttn/SDK | b3ae385e5415e47ac70abd0b3fdeeaeee9aa7cff | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Hydrogen Atom API
The Hydrogen Atom API # noqa: E501
OpenAPI spec version: 1.7.0
Contact: info@hydrogenplatform.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class PageStage(object):
"""NOTE:... | 25.518519 | 173 | 0.562409 |
8837f23a90247d2fc695399288f3fd82850bacf1 | 2,520 | py | Python | var/spack/repos/builtin/packages/freetype/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/freetype/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 8 | 2021-11-09T20:28:40.000Z | 2022-03-15T03:26:33.000Z | var/spack/repos/builtin/packages/freetype/package.py | jeanbez/spack | f4e51ce8f366c85bf5aa0eafe078677b42dae1ba | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2 | 2019-02-08T20:37:20.000Z | 2019-03-31T15:19:26.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class Freetype(AutotoolsPackage):
"""FreeType is a freely available software library to ... | 43.448276 | 96 | 0.709127 |
651fd2422961cea6d9892c60e96fc5a8e302c7b0 | 1,403 | py | Python | pefnv.py | not-wlan/pefnv | 96d8d1418f497f9d51d130df3bc73acb3f25172b | [
"Unlicense"
] | null | null | null | pefnv.py | not-wlan/pefnv | 96d8d1418f497f9d51d130df3bc73acb3f25172b | [
"Unlicense"
] | null | null | null | pefnv.py | not-wlan/pefnv | 96d8d1418f497f9d51d130df3bc73acb3f25172b | [
"Unlicense"
] | null | null | null | import sys
import pefile
import fnv
class Export:
def __init__(self, name: bytes, module: str):
self.name = name
self.module = module
self.hash32 = self.hash(32)
self.hash64 = self.hash(64)
def __str__(self):
return f"[{self.module}] {self.name}\n\t-> 32: {self.hash32}... | 25.981481 | 93 | 0.600855 |
5ebe77cbbbbfd82f7c0f3659186d83ad33dfb6f8 | 7,136 | py | Python | adet/modeling/blendmask/blendmask.py | manusheoran/AdelaiDet_DA | 04f0843c6be8e436716783300abcba715d560853 | [
"BSD-2-Clause"
] | 2,597 | 2020-03-15T06:01:23.000Z | 2022-03-31T18:21:31.000Z | adet/modeling/blendmask/blendmask.py | manusheoran/AdelaiDet_DA | 04f0843c6be8e436716783300abcba715d560853 | [
"BSD-2-Clause"
] | 467 | 2020-03-16T11:31:52.000Z | 2022-03-31T08:50:15.000Z | adet/modeling/blendmask/blendmask.py | manusheoran/AdelaiDet_DA | 04f0843c6be8e436716783300abcba715d560853 | [
"BSD-2-Clause"
] | 584 | 2020-03-15T05:53:40.000Z | 2022-03-26T02:56:30.000Z | # -*- coding: utf-8 -*-
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved
import torch
from torch import nn
from detectron2.structures import ImageList
from detectron2.modeling.postprocessing import detector_postprocess, sem_seg_postprocess
from detectron2.modeling.proposal_generator import build... | 46.03871 | 97 | 0.651345 |
78f4bcc817514dcf517f91b836afab7ac8f5b987 | 135 | py | Python | ir_project/ir_project/items.py | EliHar/InfoRetrievalSearch | 69dc8a784c69c9a86beb8f3d5132d718583d4e06 | [
"MIT"
] | 1 | 2018-07-18T00:46:47.000Z | 2018-07-18T00:46:47.000Z | ir_project/ir_project/items.py | EliHar/InfoRetrievalSearch | 69dc8a784c69c9a86beb8f3d5132d718583d4e06 | [
"MIT"
] | null | null | null | ir_project/ir_project/items.py | EliHar/InfoRetrievalSearch | 69dc8a784c69c9a86beb8f3d5132d718583d4e06 | [
"MIT"
] | null | null | null | from scrapy.item import Item, Field
class IrProjectItem(Item):
url = Field()
title = Field()
body = Field()
body2 = Field()
pass
| 15 | 35 | 0.681481 |
63400ea13f19120d85af705fbde85860988bf346 | 1,041 | py | Python | basic/myfunc/deco.py | fplust/python3-cookbook | 0eaca2e3631bb69deaf466c32023bbb2093513da | [
"Apache-2.0"
] | null | null | null | basic/myfunc/deco.py | fplust/python3-cookbook | 0eaca2e3631bb69deaf466c32023bbb2093513da | [
"Apache-2.0"
] | null | null | null | basic/myfunc/deco.py | fplust/python3-cookbook | 0eaca2e3631bb69deaf466c32023bbb2093513da | [
"Apache-2.0"
] | null | null | null | # encoding: utf-8
"""
Topic: sample
Desc : 利用闭包演示带参的装饰器
"""
from time import time
from functools import wraps
__author__ = 'Xiong Neng'
def logged(when):
def log(f, *args, **kargs):
print('Called: function: %s, args: %r, kargs: %r' % (f, args, kargs))
def pre_decorator(func):
@wraps(... | 22.630435 | 77 | 0.543708 |
87a0d473bd3510c4db503509575a9deb6f2e0794 | 13,123 | py | Python | dask/dataframe/tests/test_utils_dataframe.py | mikiec84/dask | c4ee834c1f7a71c3c85e80d1aea04a071db51ba4 | [
"BSD-3-Clause"
] | null | null | null | dask/dataframe/tests/test_utils_dataframe.py | mikiec84/dask | c4ee834c1f7a71c3c85e80d1aea04a071db51ba4 | [
"BSD-3-Clause"
] | null | null | null | dask/dataframe/tests/test_utils_dataframe.py | mikiec84/dask | c4ee834c1f7a71c3c85e80d1aea04a071db51ba4 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pandas as pd
import pandas.util.testing as tm
import dask.dataframe as dd
from dask.dataframe.utils import (shard_df_on_index, meta_nonempty, make_meta,
raise_on_meta_error, check_meta,
UNKNOWN_CATEGORIES, is_dataframe_like,
... | 33.909561 | 81 | 0.558561 |
7330d80866d1d1797b0258b185a9f925309e71c6 | 5,813 | py | Python | sympy/physics/units/prefixes.py | atul107/sympy | 023ca2a94af32ee88f48594b9fa60a5cf430342f | [
"BSD-3-Clause"
] | null | null | null | sympy/physics/units/prefixes.py | atul107/sympy | 023ca2a94af32ee88f48594b9fa60a5cf430342f | [
"BSD-3-Clause"
] | 1 | 2017-10-23T06:56:43.000Z | 2017-10-23T06:56:43.000Z | sympy/physics/units/prefixes.py | ylemkimon/sympy | 5fcbde2ed7385df250510bd5207f270cba990265 | [
"BSD-3-Clause"
] | 1 | 2020-10-02T15:05:03.000Z | 2020-10-02T15:05:03.000Z | # -*- coding: utf-8 -*-
"""
Module defining unit prefixe class and some constants.
Constant dict for SI and binary prefixes are defined as PREFIXES and
BIN_PREFIXES.
"""
from sympy import Expr, sympify
class Prefix(Expr):
"""
This class represent prefixes, with their name, symbol and factor.
Prefixes a... | 27.419811 | 117 | 0.57165 |
7da6842eca574cb9d1602854ef3b5735b7f63712 | 28,374 | py | Python | death/DNC/priorDNC.py | Fuchai/mayoehr | ec79d2157bedf4f4f0fc783d86523df8a758e27c | [
"MIT"
] | null | null | null | death/DNC/priorDNC.py | Fuchai/mayoehr | ec79d2157bedf4f4f0fc783d86523df8a758e27c | [
"MIT"
] | null | null | null | death/DNC/priorDNC.py | Fuchai/mayoehr | ec79d2157bedf4f4f0fc783d86523df8a758e27c | [
"MIT"
] | null | null | null | """
8/12/2018
Batch DNC is the model with externally stored states and batch processing timesteps on forward()
This architecture uses the stock LSTM.
"""
import torch
from torch import nn
import pdb
from torch.autograd import Variable
from torch.nn.functional import cosine_similarity, softmax, normalize
from torch.nn.... | 38.762295 | 130 | 0.610947 |
33f9e1639362300f535de5c33a05689f9c20274d | 129 | py | Python | Blob_Lib/assimp-5.2.3/assimp/contrib/gtest/scripts/fuse_gtest_files.py | antholuo/Blob_Traffic | 5d6acf88044e9abc63c0ff356714179eaa4b75bf | [
"MIT"
] | null | null | null | Blob_Lib/assimp-5.2.3/assimp/contrib/gtest/scripts/fuse_gtest_files.py | antholuo/Blob_Traffic | 5d6acf88044e9abc63c0ff356714179eaa4b75bf | [
"MIT"
] | null | null | null | Blob_Lib/assimp-5.2.3/assimp/contrib/gtest/scripts/fuse_gtest_files.py | antholuo/Blob_Traffic | 5d6acf88044e9abc63c0ff356714179eaa4b75bf | [
"MIT"
] | null | null | null | version https://git-lfs.github.com/spec/v1
oid sha256:c5f4a68cc7042cca852782fb4b796756056e15da66e986e21eee4aa487a3d06f
size 8884
| 32.25 | 75 | 0.883721 |
c4c15c0dcc83ccc1b4dc5e3aa483aeae07fc212c | 6,122 | py | Python | tests/wallet/test_singleton_lifecycle.py | grayfallstown/covid-blockchain | 194d5351c70d3ee5d928f767e21c7894cfbb59a7 | [
"Apache-2.0"
] | null | null | null | tests/wallet/test_singleton_lifecycle.py | grayfallstown/covid-blockchain | 194d5351c70d3ee5d928f767e21c7894cfbb59a7 | [
"Apache-2.0"
] | null | null | null | tests/wallet/test_singleton_lifecycle.py | grayfallstown/covid-blockchain | 194d5351c70d3ee5d928f767e21c7894cfbb59a7 | [
"Apache-2.0"
] | null | null | null | import asyncio
from typing import List, Tuple
from blspy import G2Element
from clvm_tools import binutils
from covid.types.blockchain_format.program import Program, INFINITE_COST
from covid.types.announcement import Announcement
from covid.types.blockchain_format.coin import Coin
from covid.types.blockchain_format.s... | 41.646259 | 119 | 0.786998 |
d6ecb0672749975904c2e9b7646e3e19ef915191 | 609 | py | Python | catalog/migrations/0003_bookinstance_borrower.py | robml/django_local_library | 0dd881fe17a8bd506fbc67ede5ad1a88af0b25b4 | [
"BSD-3-Clause"
] | null | null | null | catalog/migrations/0003_bookinstance_borrower.py | robml/django_local_library | 0dd881fe17a8bd506fbc67ede5ad1a88af0b25b4 | [
"BSD-3-Clause"
] | 6 | 2020-02-28T22:43:15.000Z | 2021-09-22T18:39:34.000Z | catalog/migrations/0003_bookinstance_borrower.py | robml/django_local_library | 0dd881fe17a8bd506fbc67ede5ad1a88af0b25b4 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 3.0.3 on 2020-02-27 22:16
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('catalog', '0002_auto_202... | 27.681818 | 134 | 0.683087 |
c16d0dccae12e6499d2dfea7432fc659eda0a02b | 5,305 | py | Python | manage.py | rawdamedia/organize | 0037d5316d79d312ba4459d22f5ff6df09cce55c | [
"MIT"
] | 1,231 | 2018-01-13T17:06:24.000Z | 2022-03-31T22:14:36.000Z | manage.py | rawdamedia/organize | 0037d5316d79d312ba4459d22f5ff6df09cce55c | [
"MIT"
] | 170 | 2018-03-13T19:15:17.000Z | 2022-03-31T10:14:15.000Z | manage.py | rawdamedia/organize | 0037d5316d79d312ba4459d22f5ff6df09cce55c | [
"MIT"
] | 86 | 2018-03-14T02:12:49.000Z | 2022-03-27T00:16:07.000Z | import argparse
import getpass
import re
import subprocess
from datetime import datetime
from pathlib import Path
import requests
SRC_FOLDER = "organize"
CURRENT_FOLDER = Path(__file__).resolve().parent
GITHUB_API_ENDPOINT = "https://api.github.com/repos/tfeldmann/organize"
def ask_confirm(text):
while True:
... | 29.636872 | 88 | 0.610933 |
65c99c901f3a6000be3f35cd7f6b757fb17c40c4 | 331,241 | py | Python | ck/kernel.py | mdecourse/ck | 49dde7a741ac71939c4f2b0e107d43788d40ff21 | [
"BSD-3-Clause"
] | null | null | null | ck/kernel.py | mdecourse/ck | 49dde7a741ac71939c4f2b0e107d43788d40ff21 | [
"BSD-3-Clause"
] | null | null | null | ck/kernel.py | mdecourse/ck | 49dde7a741ac71939c4f2b0e107d43788d40ff21 | [
"BSD-3-Clause"
] | null | null | null | #
# Collective Knowledge (CK)
#
# See CK LICENSE.txt for licensing details
# See CK COPYRIGHT.txt for copyright details
#
# Author and developer: Grigori Fursin
#
# I have prototyped the CK kernel as a monolithic architecture
# without object oriented programming and with global variables
# and a minimal set of comm... | 29.09451 | 447 | 0.497236 |
1042d086faa58e256122584d2e13773081bad9d8 | 3,525 | py | Python | graph/bfs.py | dxmahata/codinginterviews | 1e74fd7d18febd918542ef8b33f9059218a4ab12 | [
"Apache-2.0"
] | null | null | null | graph/bfs.py | dxmahata/codinginterviews | 1e74fd7d18febd918542ef8b33f9059218a4ab12 | [
"Apache-2.0"
] | null | null | null | graph/bfs.py | dxmahata/codinginterviews | 1e74fd7d18febd918542ef8b33f9059218a4ab12 | [
"Apache-2.0"
] | null | null | null | '''
Created on Jul 1, 2016
@author: Debanjan
'''
import sys
from queue import Queue
class Vertex:
def __init__(self, node):
self.id = node
self.adjacent = {}
# Set distance to infinity for all nodes
self.distance = sys.maxsize
# Mark all nodes unvisited
self.... | 25.359712 | 80 | 0.569362 |
47cbdd3ae725c80c48a3d8fc2a6d5b6e5e98bde3 | 1,223 | py | Python | src/main/python/sets_add_up_to_number.py | mohnoor94/ProblemsSolving | fc861a5804c448d76c4785f3c98943a1e9accfd2 | [
"Apache-2.0"
] | 8 | 2018-10-13T05:46:06.000Z | 2021-10-13T10:13:05.000Z | src/main/python/sets_add_up_to_number.py | mohnoor94/ProblemsSolving | fc861a5804c448d76c4785f3c98943a1e9accfd2 | [
"Apache-2.0"
] | null | null | null | src/main/python/sets_add_up_to_number.py | mohnoor94/ProblemsSolving | fc861a5804c448d76c4785f3c98943a1e9accfd2 | [
"Apache-2.0"
] | 1 | 2020-03-31T16:25:55.000Z | 2020-03-31T16:25:55.000Z | def count_sets(array, total):
"""
*** Interview question ***
> Dynamic Programming <
A generalization of 'IsSummationFound' problem
BUT:
- No duplicates
- No negative numbers
- Array is sorted
Problem statement and more details: https://youtu.be/nqlNzOcnCfs
Note: I... | 27.177778 | 113 | 0.582993 |
84f95ee5581ab207e2f9582741d1e91bd3a6d52c | 2,613 | py | Python | benchmarks/analyze.py | Quansight-Labs/uarray-docs | 8c9f9d766649d34922e3cf670d91da8746fd67aa | [
"BSD-3-Clause"
] | 4 | 2018-09-21T17:38:58.000Z | 2020-06-30T00:37:25.000Z | benchmarks/analyze.py | Quansight-Labs/uarray-docs | 8c9f9d766649d34922e3cf670d91da8746fd67aa | [
"BSD-3-Clause"
] | 3 | 2018-09-27T10:55:22.000Z | 2018-12-08T19:02:27.000Z | benchmarks/analyze.py | Quansight-Labs/uarray-docs | 8c9f9d766649d34922e3cf670d91da8746fd67aa | [
"BSD-3-Clause"
] | 2 | 2018-11-28T01:47:49.000Z | 2020-04-24T15:55:45.000Z | import os
import pathlib
import perf
from collections import defaultdict
import matplotlib as mpl
mpl.use('TkAgg')
from matplotlib import pyplot as plt
import numpy as np
def get_items(d):
for path in pathlib.Path(d).glob("*.json"):
try:
_, reduced = path.stem.split('-', 2)
except Value... | 29.033333 | 87 | 0.598928 |
3c930f8eaf33a7f1f33d03caf7fb3393665c3360 | 1,173 | py | Python | tests/mindspore_test_framework/components/function_inputs_policy/cartesian_product_on_id_for_function_inputs.py | unseenme/mindspore | 4ba052f0cd9146ac0ccc4880a778706f1b2d0af8 | [
"Apache-2.0"
] | 2 | 2020-04-28T03:49:10.000Z | 2020-04-28T03:49:13.000Z | tests/mindspore_test_framework/components/function_inputs_policy/cartesian_product_on_id_for_function_inputs.py | liyong126/mindspore | 930a1fb0a8fa9432025442c4f4732058bb7af592 | [
"Apache-2.0"
] | 7 | 2020-03-30T08:31:56.000Z | 2020-04-01T09:54:39.000Z | tests/mindspore_test_framework/components/function_inputs_policy/cartesian_product_on_id_for_function_inputs.py | liyong126/mindspore | 930a1fb0a8fa9432025442c4f4732058bb7af592 | [
"Apache-2.0"
] | 1 | 2020-03-30T17:07:43.000Z | 2020-03-30T17:07:43.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 40.448276 | 96 | 0.689685 |
54b3627dfb5ff412e928d8b554a132c8b1c3c7e0 | 7,287 | py | Python | src/.history/DSP_main_20201014010527.py | hassan-alhujhoj/ENEL420-GA-DSP | e550300bc671950f27909b499d440446a325326d | [
"MIT"
] | null | null | null | src/.history/DSP_main_20201014010527.py | hassan-alhujhoj/ENEL420-GA-DSP | e550300bc671950f27909b499d440446a325326d | [
"MIT"
] | null | null | null | src/.history/DSP_main_20201014010527.py | hassan-alhujhoj/ENEL420-GA-DSP | e550300bc671950f27909b499d440446a325326d | [
"MIT"
] | null | null | null | """
Genetic Algorithms for Digital Signal Processing
Created on Mon Oct 05 20:01:05 2020
Last Edited on Mon Oct 12 2020 by Luke Trenberth
TODO tidy up this code and to finalise it. Add up the third FIR filter method in here too.
"""
import numpy as np
import matplotlib
from scipy import signal
from scipy.fftp... | 43.89759 | 149 | 0.625909 |
7d8a9a968b625ef52a7a82272dc53759571e93f9 | 805 | py | Python | leetcode/285.inorder-successor-in-bst.py | geemaple/algorithm | 68bc5032e1ee52c22ef2f2e608053484c487af54 | [
"MIT"
] | 177 | 2017-08-21T08:57:43.000Z | 2020-06-22T03:44:22.000Z | leetcode/285.inorder-successor-in-bst.py | geemaple/algorithm | 68bc5032e1ee52c22ef2f2e608053484c487af54 | [
"MIT"
] | 2 | 2018-09-06T13:39:12.000Z | 2019-06-03T02:54:45.000Z | leetcode/285.inorder-successor-in-bst.py | geemaple/algorithm | 68bc5032e1ee52c22ef2f2e608053484c487af54 | [
"MIT"
] | 23 | 2017-08-23T06:01:28.000Z | 2020-04-20T03:17:36.000Z | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def inorderSuccessor(self, root, p):
"""
:type root: TreeNode
:type p: TreeNode
:rtype: T... | 23 | 40 | 0.445963 |
c60b0fce16f15eceb540fc322298d0636ab6b6dd | 2,592 | py | Python | test/functional/invalidtxrequest.py | BitcoinFinTech/BitcoinFinTech | 9bad8d64721768953cb9c18f30d48ec8c2757879 | [
"MIT"
] | 27 | 2018-01-31T03:29:33.000Z | 2022-03-22T06:49:52.000Z | test/functional/invalidtxrequest.py | BitcoinFinTech/BitcoinFinTech | 9bad8d64721768953cb9c18f30d48ec8c2757879 | [
"MIT"
] | 3 | 2018-01-21T14:16:58.000Z | 2018-07-26T03:04:21.000Z | test/functional/invalidtxrequest.py | BitcoinFinTech/BitcoinFinTech | 9bad8d64721768953cb9c18f30d48ec8c2757879 | [
"MIT"
] | 11 | 2018-02-05T04:01:40.000Z | 2021-05-06T08:19:33.000Z | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test node responses to invalid transactions.
In this test we connect to one node over p2p, and test tx... | 35.027027 | 98 | 0.654321 |
26cbb4361ec421cd4609b0ca8de7aad4035a3574 | 392 | py | Python | test/optest/tfunits/RangeTest.py | ishine/MAI | 64753cd2f59af2949896937c2e5dbfc4d8bab1e0 | [
"Apache-2.0"
] | null | null | null | test/optest/tfunits/RangeTest.py | ishine/MAI | 64753cd2f59af2949896937c2e5dbfc4d8bab1e0 | [
"Apache-2.0"
] | null | null | null | test/optest/tfunits/RangeTest.py | ishine/MAI | 64753cd2f59af2949896937c2e5dbfc4d8bab1e0 | [
"Apache-2.0"
] | null | null | null | import tensorflow as tf
from tensorflow.python.framework import graph_util
sess = tf.InteractiveSession()
op = tf.range([3, 4], [18, 10], [5, 3], name="range")
target=op.eval();
print(target)
constant_graph = graph_util.convert_variables_to_constants(sess, sess.graph_def, ['range'])
with tf.gfile.FastGFile("range.... | 24.5 | 91 | 0.732143 |
9e173e5a42a5f51eab835475fdf66ad4aec23929 | 2,451 | py | Python | 10_advanced_techniques/meet_in_the_middle_fastio_optimization.py | hariharanragothaman/CSES | fa3478a71fbf66f695673e2a644d84084f6a3b90 | [
"MIT"
] | 1 | 2021-06-17T17:14:13.000Z | 2021-06-17T17:14:13.000Z | 10_advanced_techniques/meet_in_the_middle_fastio_optimization.py | hariharanragothaman/CSES | fa3478a71fbf66f695673e2a644d84084f6a3b90 | [
"MIT"
] | null | null | null | 10_advanced_techniques/meet_in_the_middle_fastio_optimization.py | hariharanragothaman/CSES | fa3478a71fbf66f695673e2a644d84084f6a3b90 | [
"MIT"
] | null | null | null | import os, sys
from io import BytesIO, IOBase
from collections import Counter
def main():
n, target = map(int, input().split())
arr = list(map(int, input().split()))
se = Counter()
se1 = Counter()
ls = []
for i in range(n // 2):
x = arr[i]
for j in range(len(ls)):
... | 26.641304 | 79 | 0.544676 |
4faa5ac6a5ce7e93b722734e9440931d94916340 | 325 | py | Python | web/game/views.py | ihsgnef/kuiperbowl | a0c3e346bc05ed149fdb34f12b872c983a40613e | [
"MIT"
] | null | null | null | web/game/views.py | ihsgnef/kuiperbowl | a0c3e346bc05ed149fdb34f12b872c983a40613e | [
"MIT"
] | 5 | 2019-10-01T03:34:43.000Z | 2020-05-26T14:28:40.000Z | web/game/views.py | jasmaa/quizbowl | 282fe17217891266da96bcf1a9da4af5eff80fcc | [
"MIT"
] | 1 | 2021-05-10T01:46:45.000Z | 2021-05-10T01:46:45.000Z | from django.shortcuts import render
from .models import *
# Create your views here.
def home(request):
return render(request, "game/home.html",{
})
def game_room(request, label):
room, created = Room.objects.get_or_create(label=label)
return render(request, "game/game.html",{
"room":room,
... | 20.3125 | 59 | 0.673846 |
c555164c6d05b99988055d86b8d143e08e521c72 | 6,072 | py | Python | src/utils/databases/mongo_helper.py | Supreeth-Shetty/Projectathon---Simplified-AI | 3fc26a58a9370d119811ac4e864af977c21f6c40 | [
"MIT"
] | 8 | 2021-12-23T06:05:00.000Z | 2021-12-26T05:39:00.000Z | src/utils/databases/mongo_helper.py | Supreeth-Shetty/Projectathon---Simplified-AI | 3fc26a58a9370d119811ac4e864af977c21f6c40 | [
"MIT"
] | null | null | null | src/utils/databases/mongo_helper.py | Supreeth-Shetty/Projectathon---Simplified-AI | 3fc26a58a9370d119811ac4e864af977c21f6c40 | [
"MIT"
] | 2 | 2021-12-23T06:10:11.000Z | 2021-12-23T07:24:28.000Z | import pymongo
import pandas as pd
import time
from src.utils.common.common_helper import read_config
from src.utils.common.common_helper import check_file_presence
import os
from loguru import logger
from from_root import from_root
config_args = read_config("config.yaml")
logger.remove()
log_path = os.path.join(from_... | 36.8 | 126 | 0.546443 |
8c54c1993d58975aee9e33f7d5aff524112a295a | 12,867 | py | Python | nova/api/validation/parameter_types.py | bopopescu/TestNova | fb6a183b54f87cc078dc6de5be89711ec0d9ac26 | [
"Apache-2.0"
] | 2 | 2021-10-11T04:56:25.000Z | 2022-02-16T08:49:29.000Z | nova/api/validation/parameter_types.py | bopopescu/TestNova | fb6a183b54f87cc078dc6de5be89711ec0d9ac26 | [
"Apache-2.0"
] | 132 | 2017-03-27T11:31:52.000Z | 2022-03-30T08:45:02.000Z | nova/api/validation/parameter_types.py | bopopescu/TestNova | fb6a183b54f87cc078dc6de5be89711ec0d9ac26 | [
"Apache-2.0"
] | 8 | 2017-03-27T07:50:38.000Z | 2020-02-14T16:55:56.000Z | # Copyright 2014 NEC Corporation. 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 ... | 26.099391 | 79 | 0.624932 |
689277ca20e29f96b0fb11ba2a75d94eba5b1baa | 4,045 | py | Python | back-end/Chatbot/DataProcessing/wordData.py | ThijmenVanBuuren/chatbot-radboud-library | efed2318031c15578adeb7be9e760caec58018eb | [
"BSD-3-Clause"
] | null | null | null | back-end/Chatbot/DataProcessing/wordData.py | ThijmenVanBuuren/chatbot-radboud-library | efed2318031c15578adeb7be9e760caec58018eb | [
"BSD-3-Clause"
] | null | null | null | back-end/Chatbot/DataProcessing/wordData.py | ThijmenVanBuuren/chatbot-radboud-library | efed2318031c15578adeb7be9e760caec58018eb | [
"BSD-3-Clause"
] | null | null | null | """
Copyright (c) 2021, Sanne Janssen, Hilde Kerkhoven,
Savannah Hazeleger, Roel van der Heijden, Thijmen van Buuren, Lars Boere, Lisa Hensens.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
"""
import pandas as... | 28.892857 | 104 | 0.53424 |
64a7226535677107fb00ec554ce4ce2a9b4242c4 | 4,435 | py | Python | usermigrate/keycloak/utils.py | ESGF/esgf-keycloak-user-migration | 27b75ee9acd0f9ac16f6730865364ac7d95611d0 | [
"BSD-3-Clause"
] | 1 | 2020-12-09T20:31:12.000Z | 2020-12-09T20:31:12.000Z | usermigrate/keycloak/utils.py | ESGF/esgf-keycloak-user-migration | 27b75ee9acd0f9ac16f6730865364ac7d95611d0 | [
"BSD-3-Clause"
] | null | null | null | usermigrate/keycloak/utils.py | ESGF/esgf-keycloak-user-migration | 27b75ee9acd0f9ac16f6730865364ac7d95611d0 | [
"BSD-3-Clause"
] | null | null | null | """ Utility functions for interacting with a Keycloak server. """
__author__ = "William Tucker"
__date__ = "2020-09-09"
__copyright__ = "Copyright 2020 United Kingdom Research and Innovation"
__license__ = "BSD - see LICENSE file in top-level package directory"
import requests
import json
from datetime import datet... | 30.376712 | 79 | 0.616911 |
687343c58a80fd7205f11817af7828355dfc1d89 | 44,105 | py | Python | mypy/fastparse2.py | mehes-kth/mypy | 28ccef04ca65053db6aecb79590e3db1534300f2 | [
"PSF-2.0"
] | null | null | null | mypy/fastparse2.py | mehes-kth/mypy | 28ccef04ca65053db6aecb79590e3db1534300f2 | [
"PSF-2.0"
] | null | null | null | mypy/fastparse2.py | mehes-kth/mypy | 28ccef04ca65053db6aecb79590e3db1534300f2 | [
"PSF-2.0"
] | null | null | null | """
This file is nearly identical to `fastparse.py`, except that it works with a Python 2
AST instead of a Python 3 AST.
Previously, how we handled Python 2 code was by first obtaining the Python 2 AST via
typed_ast, converting it into a Python 3 AST by using typed_ast.conversion, then
running it through mypy.fastpars... | 41.452068 | 99 | 0.589684 |
d4c472279736251168cd117fb0691a2665928591 | 3,194 | py | Python | env/lib/python2.7/site-packages/mercurial/hgweb/protocol.py | jlwysf/onduty | 20d90583a6996d037912af08eb29a6d6fa06bf66 | [
"MIT"
] | null | null | null | env/lib/python2.7/site-packages/mercurial/hgweb/protocol.py | jlwysf/onduty | 20d90583a6996d037912af08eb29a6d6fa06bf66 | [
"MIT"
] | null | null | null | env/lib/python2.7/site-packages/mercurial/hgweb/protocol.py | jlwysf/onduty | 20d90583a6996d037912af08eb29a6d6fa06bf66 | [
"MIT"
] | null | null | null | #
# Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net>
# Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
import cgi, cStringIO, zlib, urllib
from mercurial import util, w... | 32.262626 | 74 | 0.558234 |
55bce768f723fe9ff7d1fa68ee883298f3b71756 | 1,794 | py | Python | material/admin/views.py | sesostris/django-material-admin | f6678e57286bd871a820b235f868873d5f86d649 | [
"MIT"
] | null | null | null | material/admin/views.py | sesostris/django-material-admin | f6678e57286bd871a820b235f868873d5f86d649 | [
"MIT"
] | null | null | null | material/admin/views.py | sesostris/django-material-admin | f6678e57286bd871a820b235f868873d5f86d649 | [
"MIT"
] | null | null | null | import datetime
from django.contrib import messages
from django.utils.translation import gettext_lazy as _
from django.views.generic import TemplateView
class ThemesView(TemplateView):
title = _('Theme selection')
themes = (
{'display': _('Default'), 'name': 'default'},
{'display': _('Night')... | 34.5 | 91 | 0.602007 |
593bb9db5f479a2c79bfd5c74279912c43a9e266 | 190 | py | Python | PySpark/rdd.py | JSJeong-me/KOSA_BIGDATA_DEEPLEARNONG | 5126befee247c33afedcba4ce72d1a000e25a218 | [
"MIT"
] | null | null | null | PySpark/rdd.py | JSJeong-me/KOSA_BIGDATA_DEEPLEARNONG | 5126befee247c33afedcba4ce72d1a000e25a218 | [
"MIT"
] | null | null | null | PySpark/rdd.py | JSJeong-me/KOSA_BIGDATA_DEEPLEARNONG | 5126befee247c33afedcba4ce72d1a000e25a218 | [
"MIT"
] | null | null | null | from pyspark import SparkContext, SparkConf
sc = SparkContext.getOrCreate()
data = [1, 2, 3, 4, 5]
distData = sc.parallelize(data)
res = distData.reduce(lambda a, b: a + b)
print(res) | 27.142857 | 44 | 0.694737 |
c48bb9aa6750a0ab67b738f24d04790e3cd6e053 | 1,681 | py | Python | st2tests/st2tests/mocks/runners/polling_async_runner.py | muyouming/st2 | a80fa2b6b0f7ff3281ed8dee8ca6e97910fbd00e | [
"Apache-2.0"
] | 4,920 | 2015-01-01T15:12:17.000Z | 2022-03-31T19:31:15.000Z | st2tests/st2tests/mocks/runners/polling_async_runner.py | muyouming/st2 | a80fa2b6b0f7ff3281ed8dee8ca6e97910fbd00e | [
"Apache-2.0"
] | 3,563 | 2015-01-05T19:02:19.000Z | 2022-03-31T19:23:09.000Z | st2tests/st2tests/mocks/runners/polling_async_runner.py | muyouming/st2 | a80fa2b6b0f7ff3281ed8dee8ca6e97910fbd00e | [
"Apache-2.0"
] | 774 | 2015-01-01T20:41:24.000Z | 2022-03-31T13:25:29.000Z | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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 ... | 30.563636 | 77 | 0.719215 |
5536f2a1aa6f9cd735749b029f6d5ba9d8563bb7 | 2,490 | py | Python | tests/conftest.py | shubham-king/poll | 677e870bea36dffbf27f24e4cdeec892b40f7128 | [
"MIT"
] | 112 | 2019-06-11T17:52:57.000Z | 2022-03-18T00:05:21.000Z | tests/conftest.py | shubham-king/poll | 677e870bea36dffbf27f24e4cdeec892b40f7128 | [
"MIT"
] | 91 | 2019-05-28T11:33:40.000Z | 2022-02-27T12:12:07.000Z | tests/conftest.py | shubham-king/poll | 677e870bea36dffbf27f24e4cdeec892b40f7128 | [
"MIT"
] | 69 | 2019-07-10T16:58:06.000Z | 2022-03-30T22:09:44.000Z | """Base fixtures for testing and import point for everything else."""
import pytest
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from sqlalchemy.exc import InternalError
from pollbot.db import base
from tests.fixtures import * # noqa
from tests.helper import * # noqa
@pytest.fixture(sco... | 31.923077 | 89 | 0.713655 |
2c4d113269d496b40f48d57219c6ce42b5aba9a4 | 4,051 | py | Python | register_subcommands.py | eunwoo1104/cork | bb6fb4cef8b5291e1b1f4c63e40a7d30cecc598c | [
"MIT"
] | null | null | null | register_subcommands.py | eunwoo1104/cork | bb6fb4cef8b5291e1b1f4c63e40a7d30cecc598c | [
"MIT"
] | 1 | 2021-02-13T13:05:26.000Z | 2021-04-03T16:24:17.000Z | register_subcommands.py | eunwoo1104/cork | bb6fb4cef8b5291e1b1f4c63e40a7d30cecc598c | [
"MIT"
] | 1 | 2021-01-09T06:31:01.000Z | 2021-01-09T06:31:01.000Z | import asyncio
from discord_slash.utils import manage_commands
from modules.client import CorkClient
loop = asyncio.get_event_loop()
loop.run_until_complete(manage_commands.add_slash_command(
791679306123968553,
CorkClient.get_settings("token"),
None,
"set",
"알림 세부 설정 관련 명령어입니다.",
[
{
... | 32.408 | 90 | 0.36707 |
01d234b87326e30e0774913dc3a5ed7f28b48c33 | 278 | py | Python | test/models.py | bekzhanno/BlockchainAnalyticsToolUsingDjango | 87ce09ecd3009d12d8441dfda6dc0ef9f6bd7a5a | [
"MIT"
] | null | null | null | test/models.py | bekzhanno/BlockchainAnalyticsToolUsingDjango | 87ce09ecd3009d12d8441dfda6dc0ef9f6bd7a5a | [
"MIT"
] | null | null | null | test/models.py | bekzhanno/BlockchainAnalyticsToolUsingDjango | 87ce09ecd3009d12d8441dfda6dc0ef9f6bd7a5a | [
"MIT"
] | 1 | 2022-02-07T17:00:25.000Z | 2022-02-07T17:00:25.000Z | from django.db import models
# Create your models here.
class Product(models.Model):
address = models.CharField(max_length=100, null=False, blank=False)
balance = models.FloatField()
def __str__(self):
return f'{self.address} - {self.balance}'
| 19.857143 | 71 | 0.672662 |
80c1108ab6ad143b15cbf0a14823c70aad3f870f | 1,111 | py | Python | apps/confidencechronograms/test/tests_chronogram.py | CesarAugusto88/confidence_chronogram | 9676dbefa8b742e1ef192292c71e7d00e044cbbe | [
"MIT"
] | 1 | 2020-12-14T14:33:32.000Z | 2020-12-14T14:33:32.000Z | apps/confidencechronograms/test/tests_chronogram.py | CesarAugusto88/cronograma | ae6eca1d9132b57152e64f9dc9b9c578b87aef96 | [
"MIT"
] | 6 | 2020-06-05T22:03:12.000Z | 2022-03-12T00:49:29.000Z | apps/confidencechronograms/test/tests_chronogram.py | CesarAugusto88/cronograma | ae6eca1d9132b57152e64f9dc9b9c578b87aef96 | [
"MIT"
] | 1 | 2020-09-08T20:24:29.000Z | 2020-09-08T20:24:29.000Z | from django.test import TestCase
#from django.test.runner import DiscoverRunner
from django.urls import reverse
from confidencechronograms.models import Cliente, Funcionario, Chronogram, Task
class TaskTestCase(TestCase):
""" A test runner to test without database creation/deletion """
@classmethod
def s... | 33.666667 | 83 | 0.708371 |
747fb6206d1f45fd1b7b9816acfcea51fca47c2a | 10,222 | py | Python | checkv/modules/complete_genomes.py | wolfQK/CheckV-fork | 3519bf4bf07fb73806225946a5629ddc542b4252 | [
"BSD-3-Clause-LBNL"
] | null | null | null | checkv/modules/complete_genomes.py | wolfQK/CheckV-fork | 3519bf4bf07fb73806225946a5629ddc542b4252 | [
"BSD-3-Clause-LBNL"
] | null | null | null | checkv/modules/complete_genomes.py | wolfQK/CheckV-fork | 3519bf4bf07fb73806225946a5629ddc542b4252 | [
"BSD-3-Clause-LBNL"
] | null | null | null | import csv
import os
import string
import sys
import time
import Bio.SeqIO
import numpy as np
import checkv
import collections
from checkv import utility
class Genome:
def __init__(self):
self.seq = None
self.id = None
self.length = None
self.dtr = None
class TR:
def __init__... | 33.735974 | 240 | 0.583447 |
1b9a2b5f5bf2ef6ae17d9a488b3a5c0eb3e70c4f | 4,338 | py | Python | 2021/quals/pwn-atheris/challenge/autorunner.py | BearerPipelineTest/google-ctf | a0cab9cb6663ab908b9186d5428aa9674253c5c3 | [
"Apache-2.0"
] | 2,757 | 2018-04-28T21:41:36.000Z | 2022-03-29T06:33:36.000Z | 2021/quals/pwn-atheris/challenge/autorunner.py | BearerPipelineTest/google-ctf | a0cab9cb6663ab908b9186d5428aa9674253c5c3 | [
"Apache-2.0"
] | 20 | 2019-07-23T15:29:32.000Z | 2022-01-21T12:53:04.000Z | 2021/quals/pwn-atheris/challenge/autorunner.py | BearerPipelineTest/google-ctf | a0cab9cb6663ab908b9186d5428aa9674253c5c3 | [
"Apache-2.0"
] | 449 | 2018-05-09T05:54:05.000Z | 2022-03-30T14:54:18.000Z | #!/usr/bin/python3
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http:#www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | 31.897059 | 108 | 0.701706 |
d11ab1f758e377ceb1916bdbe7303a4277f8f4b6 | 12,186 | py | Python | pysnmp-with-texts/Juniper-SUBSCRIBER-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/Juniper-SUBSCRIBER-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/Juniper-SUBSCRIBER-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module Juniper-SUBSCRIBER-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/JUNIPER-SUBSCRIBER-MIB
# Produced by pysmi-0.3.4 at Wed May 1 14:01:13 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (d... | 136.921348 | 1,138 | 0.791646 |
c37c7e10ef59496aa143db4815dc55137eb1281f | 329 | py | Python | game/write_text.py | Ujjwal29/squabble | f0deb4b6840f954908fdb5649b26a4c0cc1f4963 | [
"MIT"
] | null | null | null | game/write_text.py | Ujjwal29/squabble | f0deb4b6840f954908fdb5649b26a4c0cc1f4963 | [
"MIT"
] | 2 | 2020-09-20T05:55:56.000Z | 2020-10-11T10:28:17.000Z | game/write_text.py | Ujjwal29/squabble | f0deb4b6840f954908fdb5649b26a4c0cc1f4963 | [
"MIT"
] | 2 | 2020-10-11T10:54:45.000Z | 2020-10-11T10:58:43.000Z | import pygame
pygame.init()
pygame.display.set_caption('Squabble')
screen = pygame.display.set_mode((800, 600),0,32)
font = pygame.font.SysFont(None, 42)
def write_text(text, font, color, surface, x, y):
textobj = font.render(text, 1, color)
textrect = textobj.get_rect(center=(x,y))
surface.blit(textobj, ... | 29.909091 | 49 | 0.717325 |
7acb53718276543737859ead55a7f6a4b177a818 | 3,955 | py | Python | spikes/Docker/old/testing/docker_py_stdin/codehandler.py | CharlesDDNoble/broncode | 01d35823871345a42b7c1e022466561b48d69a17 | [
"MIT"
] | null | null | null | spikes/Docker/old/testing/docker_py_stdin/codehandler.py | CharlesDDNoble/broncode | 01d35823871345a42b7c1e022466561b48d69a17 | [
"MIT"
] | 1 | 2020-06-06T00:42:26.000Z | 2020-06-06T00:42:26.000Z | spikes/Docker/old/testing/docker_py_stdin/codehandler.py | CharlesDDNoble/broncode | 01d35823871345a42b7c1e022466561b48d69a17 | [
"MIT"
] | null | null | null | import os
import docker
from time import time, sleep
class CodeHandler:
"""This class defines a CodeHandler object
Spawns docker containers in order to compile and execute code.
Attributes:
code (str): The code that will be executed in the docker container.
flags (str): Compiler/Interpreter flags that the cod... | 31.64 | 81 | 0.709229 |
b82d2f0dd4eb764f894f668b54088130c70e0025 | 9,935 | py | Python | herbstluftwm/hl_status_deamon.py | FAUSheppy/config | 998e13f71a4b48c60f645470631cf937586be2fd | [
"Unlicense"
] | 1 | 2019-05-07T13:03:10.000Z | 2019-05-07T13:03:10.000Z | herbstluftwm/hl_status_deamon.py | FAUSheppy/config | 998e13f71a4b48c60f645470631cf937586be2fd | [
"Unlicense"
] | null | null | null | herbstluftwm/hl_status_deamon.py | FAUSheppy/config | 998e13f71a4b48c60f645470631cf937586be2fd | [
"Unlicense"
] | null | null | null | #!/usr/bin/python3
import os
import sys
import time
import sys
import subprocess
import re
import hl_utils
import signal
import socket
from hl_constants import *
from datetime import datetime
battery_average=[]
bat_prev = -1
def sigusr1_handler(signum, frame):
save()
def sigusr2_handler(signum, frame):
... | 36.525735 | 191 | 0.463915 |
e6faf1dc769a99c4ca1612ad4064cca30872ee28 | 2,487 | py | Python | src/run_env.py | ylajaaski/reinforcement_env | 1a1f5540162106098cdaf9d4e1ffcfcff8243a6c | [
"MIT"
] | null | null | null | src/run_env.py | ylajaaski/reinforcement_env | 1a1f5540162106098cdaf9d4e1ffcfcff8243a6c | [
"MIT"
] | null | null | null | src/run_env.py | ylajaaski/reinforcement_env | 1a1f5540162106098cdaf9d4e1ffcfcff8243a6c | [
"MIT"
] | null | null | null | from src.envs.collision_v0.collision import Collision_v0
from src.envs.collision_v0.agents.policy_gradient import Agent
import numpy as np
import pandas as pd
def run_env(environment, agent, train, episodes, save, save_interval):
# Saving by default
action_space = environment.space.n
mode = environment.m... | 38.261538 | 194 | 0.599115 |
25cc16a9f51ad037fe1ee19f962220f54cc9b727 | 3,193 | py | Python | data/preprocess_ljspeech.py | jefflai108/VGNSL | 0edc3db3691abbad2a505b2165bd99e7a62d784f | [
"MIT"
] | 1 | 2022-03-08T16:09:03.000Z | 2022-03-08T16:09:03.000Z | data/preprocess_ljspeech.py | jefflai108/VGNSL | 0edc3db3691abbad2a505b2165bd99e7a62d784f | [
"MIT"
] | null | null | null | data/preprocess_ljspeech.py | jefflai108/VGNSL | 0edc3db3691abbad2a505b2165bd99e7a62d784f | [
"MIT"
] | null | null | null | import os
import string
import shutil
import tqdm
import benepar
import spacy
from nltk import Tree
def replace_leaves(tree, leaves):
if isinstance(tree, str):
return leaves[0]
left = 0
new_children = list()
for child in tree:
n_leaves = 1 if isinstance(child, str) else len(child.le... | 35.087912 | 105 | 0.645474 |
e876adda1e1ea3f10bf08b1e10e21c624b9ee25d | 427 | py | Python | raster/migrations/0018_rasterlayermetadata_srs_wkt.py | bpneumann/django-raster | 74daf9d396f2332a2cd83723b7330e6b10d73b1c | [
"BSD-3-Clause"
] | null | null | null | raster/migrations/0018_rasterlayermetadata_srs_wkt.py | bpneumann/django-raster | 74daf9d396f2332a2cd83723b7330e6b10d73b1c | [
"BSD-3-Clause"
] | null | null | null | raster/migrations/0018_rasterlayermetadata_srs_wkt.py | bpneumann/django-raster | 74daf9d396f2332a2cd83723b7330e6b10d73b1c | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('raster', '0017_copy_srids_20150922_0207'),
]
operations = [
migrations.AddField(
model_name='rasterlayermetadata... | 21.35 | 58 | 0.620609 |
03d7a95c066c675726f7f6a54e1d1bc42d1e9abc | 4,902 | py | Python | neural_network_lyapunov/examples/tinydiffsim/learn_ca_dyn.py | hongkai-dai/neural-network-lyapunov-1 | 8843c13f69f7f39cbb939ab250413e76f61843f6 | [
"MIT"
] | 58 | 2021-06-21T08:59:52.000Z | 2022-03-31T14:35:23.000Z | neural_network_lyapunov/examples/tinydiffsim/learn_ca_dyn.py | StanfordASL/neural-network-lyapunov | 9e5db1c7f91b42df729026c9aa8575bc126f66b6 | [
"MIT"
] | 8 | 2021-08-22T05:31:23.000Z | 2022-03-29T03:47:07.000Z | neural_network_lyapunov/examples/tinydiffsim/learn_ca_dyn.py | StanfordASL/neural-network-lyapunov | 9e5db1c7f91b42df729026c9aa8575bc126f66b6 | [
"MIT"
] | 11 | 2021-06-21T04:29:59.000Z | 2022-03-30T05:54:43.000Z | import neural_network_lyapunov.worlds as worlds
import neural_network_lyapunov.utils as utils
import neural_network_lyapunov.control_affine_system as mut
import pytinydiffsim as pd
import argparse
import torch
import yaml
def load_multibody(cfg):
world = pd.TinyWorld()
urdf_data = pd.TinyUrdfParser().load_u... | 33.806897 | 77 | 0.583639 |
e220e8d149e5b51f22fba6c24c73ab75d382337c | 3,839 | py | Python | owslib/coverage/wcsdecoder.py | bradh/OWSLib | 38282ae839db47eab02e7fbcbce3199f4dfeea7b | [
"BSD-3-Clause"
] | 1 | 2015-03-16T05:22:04.000Z | 2015-03-16T05:22:04.000Z | owslib/coverage/wcsdecoder.py | bradh/OWSLib | 38282ae839db47eab02e7fbcbce3199f4dfeea7b | [
"BSD-3-Clause"
] | null | null | null | owslib/coverage/wcsdecoder.py | bradh/OWSLib | 38282ae839db47eab02e7fbcbce3199f4dfeea7b | [
"BSD-3-Clause"
] | 1 | 2021-04-10T21:23:49.000Z | 2021-04-10T21:23:49.000Z | #WCS response decoder.
#Decodes response from a WCS (either a Coverages XML document or a Multipart MIME) and extracts the urls of the coverage data.
#Copyright (c) 2007 STFC <http://www.stfc.ac.uk>
#Author: Dominic Lowe, STFC
#contact email: d.lowe@rl.ac.uk
#
# Multipart MIME decoding based on http://aspn.activestate.... | 38.777778 | 149 | 0.57541 |
a06fbc8a5dde2cd65bd4ccb7e39c1be93e67a81f | 630 | py | Python | trick_sims/SIM_jet_event/RUN_test/unit_test.py | dexueyang/trick-dup0 | 2d5d5502fa896d3c42eda40ce0ee45e98ec35463 | [
"NASA-1.3"
] | null | null | null | trick_sims/SIM_jet_event/RUN_test/unit_test.py | dexueyang/trick-dup0 | 2d5d5502fa896d3c42eda40ce0ee45e98ec35463 | [
"NASA-1.3"
] | null | null | null | trick_sims/SIM_jet_event/RUN_test/unit_test.py | dexueyang/trick-dup0 | 2d5d5502fa896d3c42eda40ce0ee45e98ec35463 | [
"NASA-1.3"
] | 3 | 2021-06-22T11:02:39.000Z | 2021-10-21T00:58:00.000Z |
dyn.baseball.pos[0] = 16.0
dyn.baseball.pos[1] = 0.1
dyn.baseball.pos[2] = 2.0
dyn.baseball.vel[0] = -30.0
dyn.baseball.vel[1] = -0.1
dyn.baseball.vel[2] = 1.0
dyn.baseball.theta = trick.attach_units("d",-90.0)
dyn.baseball.phi = trick.attach_units("d",1.0)
dyn.baseball.omega0 = trick.attach_units("rev/s",30.0)
... | 23.333333 | 55 | 0.709524 |
ce4451fa1f29b1fb3ee6f0a0709d79a52fc5e167 | 1,565 | py | Python | rnd_game.py | joegog/rock-paper-scissors-lizard-spock | f08c419a89d4315f2698c87f282a8f8ec409e825 | [
"MIT"
] | 1 | 2020-09-28T11:16:22.000Z | 2020-09-28T11:16:22.000Z | rnd_game.py | joegog/rock-paper-scissors-lizard-spock | f08c419a89d4315f2698c87f282a8f8ec409e825 | [
"MIT"
] | null | null | null | rnd_game.py | joegog/rock-paper-scissors-lizard-spock | f08c419a89d4315f2698c87f282a8f8ec409e825 | [
"MIT"
] | null | null | null | from random import randrange
from termcolor import cprint
class RNDGame():
def __init__(self, username) -> object:
self.username = username
print("Hallo " + self.username + " Welcome to 'Random Number Game'")
print("The goal of the game is that you correctly guess a random number from 1-2... | 34.021739 | 117 | 0.571246 |
6b370154482bde6d435da45df4aaee28fb93c805 | 2,486 | py | Python | auth0/v3/management/client_grants.py | agarwalrounak/auth0-python | 2bdd9008b0124b53360c79dd299331a8190d95f9 | [
"MIT"
] | 2 | 2020-10-08T21:42:56.000Z | 2021-03-21T08:17:52.000Z | auth0/v3/management/client_grants.py | agarwalrounak/auth0-python | 2bdd9008b0124b53360c79dd299331a8190d95f9 | [
"MIT"
] | null | null | null | auth0/v3/management/client_grants.py | agarwalrounak/auth0-python | 2bdd9008b0124b53360c79dd299331a8190d95f9 | [
"MIT"
] | null | null | null | from .rest import RestClient
class ClientGrants(object):
"""Auth0 client grants endpoints
Args:
domain (str): Your Auth0 domain, e.g: 'username.auth0.com'
token (str): Management API v2 Token
telemetry (bool, optional): Enable or disable Telemetry
(defaults to True)
... | 28.906977 | 101 | 0.591714 |
8dc81b7f0926f9697da6ab36f5a404d08091f626 | 2,173 | py | Python | src/python/dags/robby_example.py | robbytarigan/HelloWorldKubernetes | 8869b1ec4008ee34227b36af10e32e638a09bdc0 | [
"MIT"
] | null | null | null | src/python/dags/robby_example.py | robbytarigan/HelloWorldKubernetes | 8869b1ec4008ee34227b36af10e32e638a09bdc0 | [
"MIT"
] | null | null | null | src/python/dags/robby_example.py | robbytarigan/HelloWorldKubernetes | 8869b1ec4008ee34227b36af10e32e638a09bdc0 | [
"MIT"
] | null | null | null | """Example DAG demonstrating the usage of the PythonOperator."""
import time
from pprint import pprint
from airflow import DAG
from airflow.operators.python import PythonOperator, PythonVirtualenvOperator
from airflow.utils.dates import days_ago
args = {
'owner': 'airflow',
}
dag = DAG(
dag_id='robby_example... | 25.267442 | 80 | 0.705016 |
296e16370a72f1c8f8fe7a7d0bc26c0bd1e3d7d7 | 1,454 | py | Python | data-models/python-datawrangling/src/gda/datawrangling/test_data_regex.py | zhoujiagen/giant-data-analysis | ffeede8654edda00b1539af81d5aae470fb84c98 | [
"MIT"
] | 2 | 2017-12-07T10:36:40.000Z | 2020-05-15T13:02:45.000Z | data-models/python-datawrangling/src/gda/datawrangling/test_data_regex.py | zhoujiagen/giant-data-analysis | ffeede8654edda00b1539af81d5aae470fb84c98 | [
"MIT"
] | 2 | 2022-03-24T06:25:32.000Z | 2022-03-24T06:25:33.000Z | data-models/python-datawrangling/src/gda/datawrangling/test_data_regex.py | zhoujiagen/giant-data-analysis | ffeede8654edda00b1539af81d5aae470fb84c98 | [
"MIT"
] | 5 | 2017-03-31T14:20:38.000Z | 2022-03-05T11:17:23.000Z | # -*- coding: utf-8 -*-
"""
使用正则表达式处理数据.
"""
import unittest
class TestRegex(unittest.TestCase):
def test_string(self):
print("hello, {}".format("regex"))
print("hello, %s" % "regex")
value_dict = {"number": 1.234}
print("hello, number: {number:.4f}".format(**value_dict))
def... | 29.08 | 91 | 0.596286 |
a8e19108ac11877b39f67eac245c652f10207366 | 867 | py | Python | setup.py | jennydaman/pl-topologicalcopy | 1e830e4d36ce5cf459adac2801f8fa197d366aa7 | [
"MIT"
] | null | null | null | setup.py | jennydaman/pl-topologicalcopy | 1e830e4d36ce5cf459adac2801f8fa197d366aa7 | [
"MIT"
] | null | null | null | setup.py | jennydaman/pl-topologicalcopy | 1e830e4d36ce5cf459adac2801f8fa197d366aa7 | [
"MIT"
] | null | null | null | from os import path
from setuptools import setup
with open(path.join(path.dirname(path.abspath(__file__)), 'README.rst')) as f:
readme = f.read()
setup(
name = 'topologicalcopy',
version = '0.1',
description = 'A plugin ts app to copy filtered output dirs from a list of plugi... | 30.964286 | 102 | 0.55594 |
768140b57262994605c9b961540ddde2db92f421 | 2,319 | py | Python | twitch_user_logger/api/twitch.py | willmeyers/twitch-user-logger | 4afa91a1960a472aaba515f63684b138ea1dae23 | [
"MIT"
] | null | null | null | twitch_user_logger/api/twitch.py | willmeyers/twitch-user-logger | 4afa91a1960a472aaba515f63684b138ea1dae23 | [
"MIT"
] | null | null | null | twitch_user_logger/api/twitch.py | willmeyers/twitch-user-logger | 4afa91a1960a472aaba515f63684b138ea1dae23 | [
"MIT"
] | null | null | null | import typing
import sqlite3
import requests
from twitch_user_logger.api.database import user_exists, insert_user
class Twitch:
def __init__(self, client_id: str, client_secret: str, db: sqlite3.Connection = None):
self.oauth = self._get_token(client_id, client_secret)
self.access_token = self.oa... | 26.655172 | 90 | 0.541182 |
d50afdff735d565945872c8eb7429fc9f70c9c99 | 4,634 | py | Python | salt/modules/chef.py | jkur/salt | 3e62675550f9869d550d7787800270e632955d2f | [
"Apache-2.0"
] | 2 | 2015-11-07T12:05:15.000Z | 2018-10-29T13:21:06.000Z | salt/modules/chef.py | jkur/salt | 3e62675550f9869d550d7787800270e632955d2f | [
"Apache-2.0"
] | null | null | null | salt/modules/chef.py | jkur/salt | 3e62675550f9869d550d7787800270e632955d2f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
'''
Execute chef in server or solo mode
'''
# Import Python libs
from __future__ import absolute_import
import logging
import os
# Import Salt libs
import salt.utils
import salt.utils.decorators as decorators
# Import 3rd-party libs
import salt.ext.six as six
log = logging.getLogger(__name__... | 22.066667 | 78 | 0.613077 |
fa9473055e82e2fbae9c3d26eb1a0487d847f7a0 | 280 | py | Python | tests/test_main.py | ydty/concreate_inspection_app | 86f022f2185c71f88c6d0c19439f2f92a94767d1 | [
"MIT"
] | null | null | null | tests/test_main.py | ydty/concreate_inspection_app | 86f022f2185c71f88c6d0c19439f2f92a94767d1 | [
"MIT"
] | null | null | null | tests/test_main.py | ydty/concreate_inspection_app | 86f022f2185c71f88c6d0c19439f2f92a94767d1 | [
"MIT"
] | null | null | null | import pytest
class TestMainAdd:
@pytest.fixture
def target(self):
from src.main import add
return add
def test_addint(self, target):
# call
actual = target(1, 2)
# verify
expect = 3
assert actual == expect
| 15.555556 | 34 | 0.557143 |
ec9674c02ec0cad96a6c6ce8b4e7e6903733a00c | 760 | py | Python | pembayaran/urls.py | annisadevin/panpacation | fe638d46083c6118adcbc9c84058a396756e0d2a | [
"Unlicense"
] | null | null | null | pembayaran/urls.py | annisadevin/panpacation | fe638d46083c6118adcbc9c84058a396756e0d2a | [
"Unlicense"
] | null | null | null | pembayaran/urls.py | annisadevin/panpacation | fe638d46083c6118adcbc9c84058a396756e0d2a | [
"Unlicense"
] | 1 | 2021-07-13T00:55:05.000Z | 2021-07-13T00:55:05.000Z | from django.urls import path
from pembayaran.views import *
app_name = 'pembayaran'
urlpatterns = [
path('buatpesanan/<str:id_penginapan>/<str:tgl_checkin>/<str:tgl_checkout>/<int:total_penginap>/', buatpesanan, name='buatpesanan'),
path('metodebayar/<str:nama_pemesan>/<str:id_penginapan>/<str:nama_penginapan>... | 76 | 265 | 0.759211 |
5e1ac3c4f3d1bee52c33cffacfda8cce16baf601 | 18,852 | py | Python | utils/data_helpers.py | RandolphVI/Deep-Relevance-Ranking | 7282113a9f5c1e5082fe360323a6930830a70f17 | [
"Apache-2.0"
] | 9 | 2019-02-28T08:59:03.000Z | 2021-02-26T15:56:36.000Z | utils/data_helpers.py | RandolphVI/Graph2Seq | c25c993e609424b4b31456a0eed113ccfb94058e | [
"Apache-2.0"
] | null | null | null | utils/data_helpers.py | RandolphVI/Graph2Seq | c25c993e609424b4b31456a0eed113ccfb94058e | [
"Apache-2.0"
] | 1 | 2019-12-18T14:43:08.000Z | 2019-12-18T14:43:08.000Z | # -*- coding:utf-8 -*-
__author__ = 'Randolph'
import os
import heapq
import multiprocessing
import gensim
import logging
import json
import numpy as np
import matplotlib.pyplot as plt
from collections import OrderedDict
from pylab import *
from gensim.models import word2vec
from tflearn.data_utils import pad_sequenc... | 34.40146 | 111 | 0.644547 |
06b370dbae7df1d9fabc76ccfd8e1d8580e22f8c | 2,999 | py | Python | framework/behaviour/SelectorPolicies.py | vitorascorrea/pokemon-vgc-engine | 3925deb408a70d25c4c9e7b53e021ea5a25d3bda | [
"MIT"
] | 1 | 2022-01-05T10:00:46.000Z | 2022-01-05T10:00:46.000Z | framework/behaviour/SelectorPolicies.py | vitorascorrea/pokemon-vgc-engine | 3925deb408a70d25c4c9e7b53e021ea5a25d3bda | [
"MIT"
] | null | null | null | framework/behaviour/SelectorPolicies.py | vitorascorrea/pokemon-vgc-engine | 3925deb408a70d25c4c9e7b53e021ea5a25d3bda | [
"MIT"
] | null | null | null | import random
from typing import Set, Tuple
import PySimpleGUI as sg
from framework.DataConstants import DEFAULT_TEAM_SIZE, MAX_TEAM_SIZE
from framework.DataObjects import PkmFullTeamView
from framework.behaviour import SelectorPolicy
class GUISelectorPolicy(SelectorPolicy):
def __init__(self, selected_team_si... | 35.282353 | 105 | 0.599533 |
e8b3c1981f07d25b57b853b2747eac11744c18fd | 14,023 | py | Python | util/matrix_generator.py | gburri/MAVRIC_Library | 3e8d1de67c87b63bfe0b30d6f901cd2624ef43e7 | [
"BSD-3-Clause"
] | null | null | null | util/matrix_generator.py | gburri/MAVRIC_Library | 3e8d1de67c87b63bfe0b30d6f901cd2624ef43e7 | [
"BSD-3-Clause"
] | null | null | null | util/matrix_generator.py | gburri/MAVRIC_Library | 3e8d1de67c87b63bfe0b30d6f901cd2624ef43e7 | [
"BSD-3-Clause"
] | null | null | null | # /*******************************************************************************
# * Copyright (c) 2009-2014, MAV'RIC Development Team
# * All rights reserved.
# *
# * Redistribution and use in source and binary forms, with or without
# * modification, are permitted provided that the following conditions are m... | 37.097884 | 139 | 0.487271 |
f0c04d005564c25586fac250ec6ee754e4be8a2c | 3,580 | py | Python | xkosc.py | kopc718/test | 8b7e2ef50cc615baa0741e26fc93d6aadc21c301 | [
"MIT"
] | null | null | null | xkosc.py | kopc718/test | 8b7e2ef50cc615baa0741e26fc93d6aadc21c301 | [
"MIT"
] | null | null | null | xkosc.py | kopc718/test | 8b7e2ef50cc615baa0741e26fc93d6aadc21c301 | [
"MIT"
] | null | null | null | import random
class GRA(object):
def __init__(self, name="", score_g1 = [], score_g2 = []):
self.name = name
self.score_g1 = list(score_g1)
self.score_g2 = list(score_g2)
def rename(self):
self.name = input("")
def introduce(self):
return self.name
def throw... | 29.833333 | 104 | 0.446927 |
028234ab45fef33f9ef076a6b1086ab0b6043882 | 13,600 | py | Python | socialserver/util/image.py | niallasher/neosocialserver | 883b841cbb5fe890a7f528fe1b2e0b6555f1c27f | [
"MIT"
] | null | null | null | socialserver/util/image.py | niallasher/neosocialserver | 883b841cbb5fe890a7f528fe1b2e0b6555f1c27f | [
"MIT"
] | 11 | 2022-03-10T04:55:09.000Z | 2022-03-30T14:24:19.000Z | socialserver/util/image.py | niallasher/neosocialserver | 883b841cbb5fe890a7f528fe1b2e0b6555f1c27f | [
"MIT"
] | null | null | null | # Copyright (c) Niall Asher 2022
import datetime
import re
from base64 import urlsafe_b64decode
from math import gcd
from os import makedirs, mkdir, path
from types import SimpleNamespace
from base64 import b64encode
import PIL
from PIL import Image, ImageOps
from pony.orm import commit, db_session, select
from socia... | 30.561798 | 106 | 0.695588 |
03702976a65883eebad79a491126a5c4411f1095 | 3,830 | py | Python | telebot_app.py | Saugandhik/covid19 | 84943beb2cf143dfa303e01de6b59aae709074f6 | [
"MIT"
] | null | null | null | telebot_app.py | Saugandhik/covid19 | 84943beb2cf143dfa303e01de6b59aae709074f6 | [
"MIT"
] | null | null | null | telebot_app.py | Saugandhik/covid19 | 84943beb2cf143dfa303e01de6b59aae709074f6 | [
"MIT"
] | 2 | 2020-06-07T21:32:31.000Z | 2021-05-01T10:56:27.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun Jun 7 00:43:19 2020
@author: sauga
"""
from covid_study import gettotaldata,getstatesdata
import time
import telebot
from apscheduler.schedulers.background import BackgroundScheduler
token=${{secrets.TOKEN_VALUE}}
bot = telebot.TeleBot(token)
user = bot.get_me()
scheduler... | 29.921875 | 151 | 0.684334 |
30640c4366c62591385ad37c9e671b336e97f134 | 1,257 | py | Python | comprehension/ReadingComp_Test.py | cvcnetwork/katecheo | ca59b38e4ad4f65ecb8eeca211c43582627a17c3 | [
"Apache-2.0"
] | 21 | 2019-07-01T23:22:05.000Z | 2021-09-13T15:56:58.000Z | comprehension/ReadingComp_Test.py | cvcnetwork/katecheo | ca59b38e4ad4f65ecb8eeca211c43582627a17c3 | [
"Apache-2.0"
] | 8 | 2019-07-02T14:47:22.000Z | 2020-12-20T10:13:48.000Z | comprehension/ReadingComp_Test.py | cvcnetwork/katecheo | ca59b38e4ad4f65ecb8eeca211c43582627a17c3 | [
"Apache-2.0"
] | 8 | 2019-07-01T20:35:11.000Z | 2021-06-04T04:50:25.000Z | """
python ReadingComp_Test.py
"""
import unittest
import json
import requests
class ReadingComp_Test(unittest.TestCase):
def test_comprehension(self):
payload = {
"params" : [
'Jesus of Nazareth, also known as Jesus Christ, was a Jewish teacher and reformer of religion who has ... | 33.972973 | 357 | 0.571997 |
497151a205ac9405053e223dd190d70194c31f2e | 6,469 | py | Python | mmdet/apis/apis.py | kostas1515/LongTailActivations | 0f11aa536dad928d9de5eabb1d4445edf6cdc056 | [
"Apache-2.0"
] | null | null | null | mmdet/apis/apis.py | kostas1515/LongTailActivations | 0f11aa536dad928d9de5eabb1d4445edf6cdc056 | [
"Apache-2.0"
] | null | null | null | mmdet/apis/apis.py | kostas1515/LongTailActivations | 0f11aa536dad928d9de5eabb1d4445edf6cdc056 | [
"Apache-2.0"
] | null | null | null | import random
import warnings
import numpy as np
import torch
from mmcv.parallel import MMDataParallel, MMDistributedDataParallel
from mmcv.runner import (HOOKS, DistSamplerSeedHook, EpochBasedRunner,
Fp16OptimizerHook, OptimizerHook, build_optimizer,
build_runner)
fro... | 37.610465 | 79 | 0.626372 |
ed85efaadcaf1dddad05a335844b4b39199ca01e | 5,429 | py | Python | Computer science/Fundamentals/Dev tools/Command line/Working with files/Working with file modes and permissions/topic.py | chanchanchong/PYTHON-TRACK-IN-HYPERSKILL | 462fe08ff4a2b183fd45a0235ab1ec7a788bd54c | [
"MIT"
] | null | null | null | Computer science/Fundamentals/Dev tools/Command line/Working with files/Working with file modes and permissions/topic.py | chanchanchong/PYTHON-TRACK-IN-HYPERSKILL | 462fe08ff4a2b183fd45a0235ab1ec7a788bd54c | [
"MIT"
] | null | null | null | Computer science/Fundamentals/Dev tools/Command line/Working with files/Working with file modes and permissions/topic.py | chanchanchong/PYTHON-TRACK-IN-HYPERSKILL | 462fe08ff4a2b183fd45a0235ab1ec7a788bd54c | [
"MIT"
] | null | null | null | # Theory: Working with file modes and permissions
# You may already know that in Unix, files have access settings
# and that there are several permissions and limitations for users.
# In this topic we will learn how to change access settings using
# commands in the Unix terminal. Let's find out how to do it
# below.
... | 33.720497 | 87 | 0.721864 |
f41625840cea3e726b0afcd06139b7ce3f77b21d | 1,942 | py | Python | tests/deephyper/nas/keras_search_space_test.py | felixeperez/deephyper | 23c720d19ed9510ca121b41196b5cc8ec4cd0ba9 | [
"BSD-3-Clause"
] | 185 | 2018-11-06T18:49:47.000Z | 2022-03-31T22:10:41.000Z | tests/deephyper/nas/keras_search_space_test.py | felixeperez/deephyper | 23c720d19ed9510ca121b41196b5cc8ec4cd0ba9 | [
"BSD-3-Clause"
] | 108 | 2018-12-17T17:58:05.000Z | 2022-03-16T10:22:08.000Z | tests/deephyper/nas/keras_search_space_test.py | felixeperez/deephyper | 23c720d19ed9510ca121b41196b5cc8ec4cd0ba9 | [
"BSD-3-Clause"
] | 50 | 2018-12-11T20:41:41.000Z | 2022-02-25T19:50:47.000Z | import pytest
import tensorflow as tf
from deephyper.nas import KSearchSpace
from deephyper.nas.node import ConstantNode, VariableNode
from deephyper.nas.operation import operation, Concatenate
Dense = operation(tf.keras.layers.Dense)
@pytest.mark.incremental
class TestKSearchSpace:
def test_create(self):
... | 27.742857 | 65 | 0.579815 |
40cde173abdf8fc3e2667779c0943e6689f0de1e | 342 | py | Python | dashboard/libs/render.py | bmov/allround | 17a124eee94663e31d84155a6a3468fa06dcd5ef | [
"MIT"
] | null | null | null | dashboard/libs/render.py | bmov/allround | 17a124eee94663e31d84155a6a3468fa06dcd5ef | [
"MIT"
] | null | null | null | dashboard/libs/render.py | bmov/allround | 17a124eee94663e31d84155a6a3468fa06dcd5ef | [
"MIT"
] | null | null | null | import htmlmin
from flask_stache import render_template
def render(template, **context):
return htmlmin.minify(render_template(template, **context),
remove_comments=False, remove_empty_space=False,
remove_all_empty_space=False,
reduce_e... | 34.2 | 74 | 0.643275 |
1dfa6ca7027cd4a85e32a21fbbcee940e70b4ead | 1,884 | py | Python | OmniMarkupLib/Renderers/libs/python3/docutils/languages/eo.py | henumohe/OmniMarkupPreviewer | a15382a8309fe04f2c515151c00c074ab9c0d1ab | [
"MIT"
] | 476 | 2015-01-07T08:59:53.000Z | 2022-02-11T09:46:06.000Z | OmniMarkupLib/Renderers/libs/python3/docutils/languages/eo.py | henumohe/OmniMarkupPreviewer | a15382a8309fe04f2c515151c00c074ab9c0d1ab | [
"MIT"
] | 82 | 2015-01-15T12:30:43.000Z | 2022-01-06T02:56:53.000Z | OmniMarkupLib/Renderers/libs/python3/docutils/languages/eo.py | henumohe/OmniMarkupPreviewer | a15382a8309fe04f2c515151c00c074ab9c0d1ab | [
"MIT"
] | 99 | 2015-01-14T19:53:45.000Z | 2021-08-11T15:17:26.000Z | # $Id$
# Author: Marcelo Huerta San Martin <richieadler@users.sourceforge.net>
# Copyright: This module has been placed in the public domain.
# New language mappings are welcome. Before doing a new translation, please
# read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be
# translated for each langu... | 30.387097 | 78 | 0.613057 |
8a11e4b7e2af3f74598584d5f6845be159074ae7 | 163 | py | Python | PyMOTW/source/importlib/example/__init__.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 1 | 2019-01-04T05:47:50.000Z | 2019-01-04T05:47:50.000Z | PyMOTW/source/importlib/example/__init__.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 1 | 2020-07-18T03:52:03.000Z | 2020-07-18T04:18:01.000Z | PyMOTW/source/importlib/example/__init__.py | axetang/AxePython | 3b517fa3123ce2e939680ad1ae14f7e602d446a6 | [
"Apache-2.0"
] | 2 | 2021-03-06T04:28:32.000Z | 2021-03-06T04:59:17.000Z | #!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2008 Doug Hellmann All rights reserved.
#
"""
"""
#end_pymotw_header
print('Importing example package')
| 14.818182 | 55 | 0.705521 |
31db689f89989d4933c4263505e26575578088d4 | 3,016 | py | Python | DecryptLogin/login.py | Myfanily123456/DecryptLogin | bf11dde3430b3b64ed59d3487803baac48685d4d | [
"MIT"
] | 1 | 2022-02-23T11:58:57.000Z | 2022-02-23T11:58:57.000Z | DecryptLogin/login.py | Myfanily123456/DecryptLogin | bf11dde3430b3b64ed59d3487803baac48685d4d | [
"MIT"
] | null | null | null | DecryptLogin/login.py | Myfanily123456/DecryptLogin | bf11dde3430b3b64ed59d3487803baac48685d4d | [
"MIT"
] | null | null | null | '''
Function:
requests模拟登录
Author:
Charles
微信公众号:
Charles的皮卡丘
更新日期:
2022-02-08
'''
from .core import *
'''模拟登录类-直接返回登录后的session'''
class Login():
def __init__(self, **kwargs):
self.info = 'Login class, login in some websites using requests directly.'
self.supported_apis = {
... | 56.90566 | 147 | 0.60809 |
c5efeae714cdd234de8b922e2f959aae02e01c28 | 3,862 | py | Python | gold_digger/__main__.py | N0081K/gold-digger | 3a68084bf65565a61009f5e01da643499a5e06e6 | [
"Apache-2.0"
] | null | null | null | gold_digger/__main__.py | N0081K/gold-digger | 3a68084bf65565a61009f5e01da643499a5e06e6 | [
"Apache-2.0"
] | 94 | 2019-07-03T15:33:29.000Z | 2022-03-28T01:17:41.000Z | gold_digger/__main__.py | N0081K/gold-digger | 3a68084bf65565a61009f5e01da643499a5e06e6 | [
"Apache-2.0"
] | 1 | 2022-01-14T11:24:36.000Z | 2022-01-14T11:24:36.000Z | from datetime import date, datetime as datetime_
import click
from crontab import CronTab
from . import di_container
from .api_server.app import app
from .database.db_model import Base
from .settings import DATABASE_NAME
def _parse_date(ctx, param, value):
"""
:type ctx: click.core.Context
:type param: ... | 32.728814 | 122 | 0.632833 |
6747033807840bed7e7cc02616b6319610e086e6 | 38 | py | Python | python/testData/resolve/FormatStringPackedDictCall.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/resolve/FormatStringPackedDictCall.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/resolve/FormatStringPackedDictCall.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | '{<ref>foo}'.format(**dict(foo="fo"))
| 19 | 37 | 0.552632 |
d374f7f82d6e4f20705d079b6afb212932527f55 | 339 | py | Python | volunteer_categories/api/permissions.py | UFestYeg/UFestVolunteerSite | 3802cc54e893fb3596483aa3946cd622415d1150 | [
"MIT"
] | null | null | null | volunteer_categories/api/permissions.py | UFestYeg/UFestVolunteerSite | 3802cc54e893fb3596483aa3946cd622415d1150 | [
"MIT"
] | null | null | null | volunteer_categories/api/permissions.py | UFestYeg/UFestVolunteerSite | 3802cc54e893fb3596483aa3946cd622415d1150 | [
"MIT"
] | null | null | null | from rest_framework.permissions import BasePermission, SAFE_METHODS
class IsAdminOrAuthenticatedReadOnly(BasePermission):
def has_permission(self, request, view):
if request.method in SAFE_METHODS:
return bool(request.user and request.user.is_authenticated)
else:
return req... | 33.9 | 71 | 0.740413 |
5c12ed7e229916dfe46a9c1f0e85cf6187f50ceb | 38,913 | py | Python | samples/bert_glue_tensorflow/main.py | Berumotto1/ml-platform-sdk-python | fc30300552bbeed5d97e8846beb040c9d262d23e | [
"MIT"
] | 11 | 2021-09-08T09:20:54.000Z | 2022-02-18T06:45:47.000Z | samples/bert_glue_tensorflow/main.py | Berumotto1/ml-platform-sdk-python | fc30300552bbeed5d97e8846beb040c9d262d23e | [
"MIT"
] | 1 | 2021-09-24T03:21:07.000Z | 2021-09-24T06:32:26.000Z | samples/bert_glue_tensorflow/main.py | Berumotto1/ml-platform-sdk-python | fc30300552bbeed5d97e8846beb040c9d262d23e | [
"MIT"
] | 4 | 2021-09-23T07:54:06.000Z | 2021-11-27T09:40:55.000Z | # Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 35.183544 | 88 | 0.627708 |
0eac56b673a137a833ff673b4e19f9b31a3b32b2 | 311 | py | Python | src/interpreter/functions/if_func.py | BowlingPizzaBall/b-star | 3e614443281702e124309ea7496314519b707b5f | [
"MIT"
] | null | null | null | src/interpreter/functions/if_func.py | BowlingPizzaBall/b-star | 3e614443281702e124309ea7496314519b707b5f | [
"MIT"
] | null | null | null | src/interpreter/functions/if_func.py | BowlingPizzaBall/b-star | 3e614443281702e124309ea7496314519b707b5f | [
"MIT"
] | null | null | null | from typing import List
from src.interpreter.expression import Expression
def if_func(block: List, codebase):
compare = Expression(block[1], codebase)
true = block[2]
false = block[3]
if compare:
return Expression(true, codebase)
else:
return Expression(false, codebase)
| 20.733333 | 49 | 0.684887 |
ec4ee2bd02c99e1f7367023f7f67f73e5694b40c | 23,719 | py | Python | bpy_lambda/2.78/scripts/addons/measureit/__init__.py | resultant-gamedev/bpy_lambda | c8cf46c10c69e74a0892b621d76c62edaa5b04bc | [
"MIT"
] | null | null | null | bpy_lambda/2.78/scripts/addons/measureit/__init__.py | resultant-gamedev/bpy_lambda | c8cf46c10c69e74a0892b621d76c62edaa5b04bc | [
"MIT"
] | null | null | null | bpy_lambda/2.78/scripts/addons/measureit/__init__.py | resultant-gamedev/bpy_lambda | c8cf46c10c69e74a0892b621d76c62edaa5b04bc | [
"MIT"
] | 1 | 2019-11-24T18:43:42.000Z | 2019-11-24T18:43:42.000Z | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 51.675381 | 107 | 0.459969 |
018e59cbf50618bc7cf1d3474d089b04d54ab6bc | 936 | py | Python | tf2_ros_py/setup.py | LoyVanBeek/geometry2 | ccccd4f00095f197c02285a3f5d4b8d9886fb2bd | [
"BSD-3-Clause"
] | null | null | null | tf2_ros_py/setup.py | LoyVanBeek/geometry2 | ccccd4f00095f197c02285a3f5d4b8d9886fb2bd | [
"BSD-3-Clause"
] | null | null | null | tf2_ros_py/setup.py | LoyVanBeek/geometry2 | ccccd4f00095f197c02285a3f5d4b8d9886fb2bd | [
"BSD-3-Clause"
] | null | null | null | from setuptools import find_packages
from setuptools import setup
package_name = 'tf2_ros_py'
setup(
name=package_name,
version='0.14.1',
packages=find_packages(exclude=['test']),
data_files=[
('share/ament_index/resource_index/packages',
['resource/' + package_name]),
('sh... | 27.529412 | 76 | 0.632479 |
4deaa4024f1e426a66ecb1e44fafe079059092d8 | 1,340 | py | Python | test_data_cleaning.py | powergascan/mod3-hypothesis-testing | f529e02463b33f9f20657c7e7c3eb249477622ff | [
"MIT"
] | null | null | null | test_data_cleaning.py | powergascan/mod3-hypothesis-testing | f529e02463b33f9f20657c7e7c3eb249477622ff | [
"MIT"
] | 2 | 2019-08-22T18:19:08.000Z | 2019-08-23T16:58:07.000Z | test_data_cleaning.py | powergascan/mod3-hypothesis-testing | f529e02463b33f9f20657c7e7c3eb249477622ff | [
"MIT"
] | 11 | 2019-08-20T13:09:44.000Z | 2019-08-22T21:33:09.000Z | import pandas as pd
import pytest
import re
@pytest.mark.cleaning
def test_if_dataframe(df):
assert pd.core.frame.DataFrame == type(df), 'The return of full_clean is not a DataFrame'
@pytest.mark.cleaning
def test_no_null_values(df):
assert df.isnull().sum().sum() == 0, "This DataFrame still has null value... | 34.358974 | 97 | 0.678358 |
e61c6c63415d22beb2296d09b3aeccae95b95f75 | 517 | py | Python | build/navigation/move_base/catkin_generated/pkg.develspace.context.pc.py | lty1994/ros_project | d55ce07c592d545f9a43330fa6bf96af6651575f | [
"BSD-2-Clause"
] | null | null | null | build/navigation/move_base/catkin_generated/pkg.develspace.context.pc.py | lty1994/ros_project | d55ce07c592d545f9a43330fa6bf96af6651575f | [
"BSD-2-Clause"
] | null | null | null | build/navigation/move_base/catkin_generated/pkg.develspace.context.pc.py | lty1994/ros_project | d55ce07c592d545f9a43330fa6bf96af6651575f | [
"BSD-2-Clause"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/autolabor/catkin_ws/devel/include".split(';') if "/home/autolabor/catkin_ws/devel/include" != "" else []
PROJECT_CATKIN_DEPENDS = "dynamic_reconfigure;geometry_msgs;move_base_msgs;nav_msgs;roscpp... | 57.444444 | 145 | 0.760155 |
f53d07cd6839bece9eb07b4a6b33a897a2b26ee7 | 34,827 | py | Python | jax/lax_linalg.py | malmaud/jax | 343e486df89d3bf27a4e0be3c914bb2819361c74 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | jax/lax_linalg.py | malmaud/jax | 343e486df89d3bf27a4e0be3c914bb2819361c74 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | jax/lax_linalg.py | malmaud/jax | 343e486df89d3bf27a4e0be3c914bb2819361c74 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | 37.208333 | 114 | 0.667298 |
d2c5419467ffbb206c73772d70a7f6a46f556d37 | 3,394 | py | Python | packit/constants.py | jkonecny12/packit | ba257ea4f461e7bbdfa833e070af126428044541 | [
"MIT"
] | null | null | null | packit/constants.py | jkonecny12/packit | ba257ea4f461e7bbdfa833e070af126428044541 | [
"MIT"
] | null | null | null | packit/constants.py | jkonecny12/packit | ba257ea4f461e7bbdfa833e070af126428044541 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2019 Red Hat, Inc.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge,... | 36.106383 | 80 | 0.737183 |
7cbb9206a8ddfbcd7522c7f61728b6377ba068d7 | 3,212 | py | Python | django_divipola/settings.py | Dandresfsoto/django_divipola | 338bac5a9bbc00700a87f0c9a474bb64940d6556 | [
"BSD-3-Clause"
] | 1 | 2018-08-16T04:29:02.000Z | 2018-08-16T04:29:02.000Z | django_divipola/settings.py | Dandresfsoto/django_divipola | 338bac5a9bbc00700a87f0c9a474bb64940d6556 | [
"BSD-3-Clause"
] | null | null | null | django_divipola/settings.py | Dandresfsoto/django_divipola | 338bac5a9bbc00700a87f0c9a474bb64940d6556 | [
"BSD-3-Clause"
] | null | null | null | """
Django settings for django_divipola project.
Generated by 'django-admin startproject' using Django 2.0.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.0/ref/settings/
"""
impo... | 25.903226 | 91 | 0.696451 |
f5ac9826d61da6e2f7ea0afe338083a36f298372 | 6,556 | py | Python | meta_dataset/models/functional_classifiers.py | bmelaiths/meta-dataset | 10088555c400768d895f97ae004738196e38a237 | [
"Apache-2.0"
] | null | null | null | meta_dataset/models/functional_classifiers.py | bmelaiths/meta-dataset | 10088555c400768d895f97ae004738196e38a237 | [
"Apache-2.0"
] | null | null | null | meta_dataset/models/functional_classifiers.py | bmelaiths/meta-dataset | 10088555c400768d895f97ae004738196e38a237 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2020 The Meta-Dataset Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 41.493671 | 80 | 0.691275 |
c7dea2c85d3334b0e073b6c73035f961634f1d84 | 9,046 | py | Python | minorityreport/minority_report.py | joelnitta/phyloscripts | ef308fc45e8aae904bf8e235ec0a9809b588a6ea | [
"MIT"
] | 17 | 2018-05-24T14:34:32.000Z | 2022-01-17T16:40:24.000Z | minorityreport/minority_report.py | joelnitta/phyloscripts | ef308fc45e8aae904bf8e235ec0a9809b588a6ea | [
"MIT"
] | 4 | 2018-06-22T13:27:56.000Z | 2021-06-07T15:45:27.000Z | minorityreport/minority_report.py | joelnitta/phyloscripts | ef308fc45e8aae904bf8e235ec0a9809b588a6ea | [
"MIT"
] | 8 | 2019-07-15T15:40:54.000Z | 2022-02-16T20:45:35.000Z |
import os,sys,argparse,subprocess
from ete3 import Tree,TreeStyle,TextFace,NodeStyle
helptext = '''This script will print tree figures representing the minority bipartitions
found by PhyParts. Given the species tree used for PhyParts, the PhyParts output file 'root'
and the node of interest, one PNG file will be gene... | 82.236364 | 3,139 | 0.74099 |
de53a0fbcaf22da4b7b3ba5d9ee6f3e1c20432ca | 1,958 | py | Python | test_transfer/models/matching.py | longqianh/Image-Matching | b83a94ef79da76e05430646a1175e37eee87a1b7 | [
"Apache-2.0"
] | 10 | 2020-10-02T08:47:31.000Z | 2022-03-15T01:06:19.000Z | test_transfer/models/matching.py | longqianh/Image-Matching | b83a94ef79da76e05430646a1175e37eee87a1b7 | [
"Apache-2.0"
] | 1 | 2020-08-15T18:41:30.000Z | 2020-08-15T18:41:30.000Z | test_transfer/models/matching.py | longqianh/Image-Matching | b83a94ef79da76e05430646a1175e37eee87a1b7 | [
"Apache-2.0"
] | 2 | 2021-04-07T12:42:53.000Z | 2021-06-01T02:39:05.000Z | # Origin:
# Magic Leap, Inc.
# Unpublished Copyright (c) 2020
# Originating Authors: Paul-Edouard Sarlin, Daniel DeTone, Tomasz Malisiewicz
# delete and fine tune: Peter_H
import torch
from .superpoint import SuperPoint
from .superglue import SuperGlue
# from superpoint import SuperPoint
# from superglue import... | 27.194444 | 78 | 0.601124 |
a6be0a06046dda0f9763c345cad2aeee33ee60bc | 3,682 | py | Python | clinicadl/clinicadl/test/evaluation_multiCNN.py | yogeshmj/AD-DL | 76b9b564061581effe8f3698992bfea3ffb055fa | [
"MIT"
] | 112 | 2019-10-21T14:50:35.000Z | 2022-03-29T03:15:47.000Z | clinicadl/clinicadl/test/evaluation_multiCNN.py | yogeshmj/AD-DL | 76b9b564061581effe8f3698992bfea3ffb055fa | [
"MIT"
] | 136 | 2019-10-17T17:40:55.000Z | 2021-06-30T14:53:29.000Z | clinicadl/clinicadl/test/evaluation_multiCNN.py | yogeshmj/AD-DL | 76b9b564061581effe8f3698992bfea3ffb055fa | [
"MIT"
] | 49 | 2019-11-26T13:57:52.000Z | 2022-03-20T13:17:42.000Z | # coding: utf8
from __future__ import print_function
import argparse
import os
from os import path
import torch.nn as nn
from torch.utils.data import DataLoader
from clinicadl.tools.deep_learning.data import return_dataset, get_transforms, load_data, compute_num_cnn
from clinicadl.tools.deep_learning import read_json... | 40.021739 | 107 | 0.641771 |
4e6e12d61d59707810ed8caaa87033ae1dc6ca22 | 326 | py | Python | test.py | basicworld/hanzi2pinyin | 99f8ad2de9ea5de0d12950db52eaa31784eccaf8 | [
"MIT"
] | null | null | null | test.py | basicworld/hanzi2pinyin | 99f8ad2de9ea5de0d12950db52eaa31784eccaf8 | [
"MIT"
] | null | null | null | test.py | basicworld/hanzi2pinyin | 99f8ad2de9ea5de0d12950db52eaa31784eccaf8 | [
"MIT"
] | 2 | 2018-01-09T03:25:07.000Z | 2021-06-23T09:55:06.000Z | # coding:utf8
"""
"""
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
if __name__ == '__main__':
string = ['大中国', '博大精深', '今始科技', 'sdafew', '12d0--0;/']
from Converter import Converter
con = Converter()
for i in string:
print i, con.convert(i)
print i, con.convert(i, with_tone=F... | 20.375 | 59 | 0.610429 |
4ccb13139bf8384c418cfd0ddaf363dbba1fca68 | 595 | py | Python | stock/orm/__init__.py | cdddg/twstock | 49d3d84291abbee660de147d662dd4203525f087 | [
"MIT"
] | 1 | 2021-04-20T03:34:15.000Z | 2021-04-20T03:34:15.000Z | stock/orm/__init__.py | cdddg/twstock | 49d3d84291abbee660de147d662dd4203525f087 | [
"MIT"
] | 3 | 2020-08-08T05:26:01.000Z | 2021-01-01T05:47:10.000Z | stock/orm/__init__.py | cdddg/twstock | 49d3d84291abbee660de147d662dd4203525f087 | [
"MIT"
] | null | null | null | import peewee
from . import models
__all__ = [models]
class SQLFactory:
@classmethod
def sqlite(cls, database_name="sqlite.db"):
return peewee.SqliteDatabase(database_name)
@classmethod
def mysql(cls, database_name, host, user, password, port=3306):
return peewee.MySQLDatabase(datab... | 29.75 | 114 | 0.731092 |
96a903e5cd59fab75d6c9532ab0ae4fd9309967a | 30,154 | py | Python | setup.py | zlhsmfj/airflow | d2efb33239d36e58fb69066fd23779724cb11a90 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-03-03T01:44:04.000Z | 2021-03-03T01:44:04.000Z | setup.py | zlhsmfj/airflow | d2efb33239d36e58fb69066fd23779724cb11a90 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | setup.py | zlhsmfj/airflow | d2efb33239d36e58fb69066fd23779724cb11a90 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 1 | 2021-03-03T01:44:08.000Z | 2021-03-03T01:44:08.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 31.641133 | 109 | 0.650428 |
6478833ce84f7603b2b7d785ff7b6d3a9281bc96 | 462 | py | Python | kh_site/group_coaching/migrations/0007_auto_20181110_0237.py | nhuntwalker/kyeisha-site | ccccc4a277f354a5f64c38476885a499483f80fc | [
"MIT"
] | null | null | null | kh_site/group_coaching/migrations/0007_auto_20181110_0237.py | nhuntwalker/kyeisha-site | ccccc4a277f354a5f64c38476885a499483f80fc | [
"MIT"
] | 7 | 2020-06-05T18:51:41.000Z | 2022-03-11T23:28:14.000Z | kh_site/group_coaching/migrations/0007_auto_20181110_0237.py | nhuntwalker/kyeisha-site | ccccc4a277f354a5f64c38476885a499483f80fc | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-11-10 02:37
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('group_coaching', '0006_auto_20181107_2259'),
]
operations = [
migrations.Alte... | 22 | 54 | 0.62987 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.