hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d0fe707f619f6bb2d0c5963d747d71727ae089bd | 959 | py | Python | tools/build/test/core_typecheck.py | lijgame/boost | ec2214a19cdddd1048058321a8105dd0231dac47 | [
"BSL-1.0"
] | 85 | 2015-02-08T20:36:17.000Z | 2021-11-14T20:38:31.000Z | libs/boost/tools/build/test/core_typecheck.py | flingone/frameworks_base_cmds_remoted | 4509d9f0468137ed7fd8d100179160d167e7d943 | [
"Apache-2.0"
] | 9 | 2015-01-28T16:33:19.000Z | 2020-04-12T23:03:28.000Z | libs/boost/tools/build/test/core_typecheck.py | flingone/frameworks_base_cmds_remoted | 4509d9f0468137ed7fd8d100179160d167e7d943 | [
"Apache-2.0"
] | 27 | 2015-01-28T16:33:30.000Z | 2021-08-12T05:04:39.000Z | #!/usr/bin/python
# Copyright 2003 Vladimir Prus
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
# This tests the typechecking facilities.
import BoostBuild
t = BoostBuild.Tester(["-ffile.jam"], pass_toolset=0)
... | 19.979167 | 82 | 0.578728 |
4eb41715ba766a5b35b1f8b5d8cb13ae49623741 | 7,694 | py | Python | rltoolkit/rltoolkit/algorithms/td3/td3.py | MIMUW-RL/spp-rl | 86b96cdd220cc4eae86f7cfd26924c69b498dcc6 | [
"MIT"
] | 7 | 2020-06-15T12:25:53.000Z | 2021-11-03T01:08:47.000Z | rltoolkit/rltoolkit/algorithms/td3/td3.py | MIMUW-RL/spp-rl | 86b96cdd220cc4eae86f7cfd26924c69b498dcc6 | [
"MIT"
] | null | null | null | rltoolkit/rltoolkit/algorithms/td3/td3.py | MIMUW-RL/spp-rl | 86b96cdd220cc4eae86f7cfd26924c69b498dcc6 | [
"MIT"
] | 1 | 2020-12-21T11:21:22.000Z | 2020-12-21T11:21:22.000Z | import copy
import logging
from itertools import chain
import numpy as np
import torch
from torch.nn import functional as F
from rltoolkit.algorithms.ddpg import DDPG
from rltoolkit.algorithms.ddpg.models import Critic
logger = logging.getLogger(__name__)
class TD3(DDPG):
def __init__(
self, *args, pi_... | 33.021459 | 107 | 0.603457 |
c598260e13c6c89834c2e2a522b31deea7f1ad4c | 3,718 | py | Python | python/paddle/fluid/tests/unittests/dist_mnist.py | ysh329/Paddle | 50ad9046c9a440564d104eaa354eb9df83a35678 | [
"Apache-2.0"
] | 1 | 2019-09-05T07:32:44.000Z | 2019-09-05T07:32:44.000Z | python/paddle/fluid/tests/unittests/dist_mnist.py | ysh329/Paddle | 50ad9046c9a440564d104eaa354eb9df83a35678 | [
"Apache-2.0"
] | 1 | 2019-05-26T14:23:24.000Z | 2019-05-26T14:23:51.000Z | python/paddle/fluid/tests/unittests/dist_mnist.py | ysh329/Paddle | 50ad9046c9a440564d104eaa354eb9df83a35678 | [
"Apache-2.0"
] | 1 | 2019-07-19T06:47:23.000Z | 2019-07-19T06:47:23.000Z | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 32.902655 | 89 | 0.683163 |
644d14cf869764d7f6c581fcfe4f0f750d3f2e36 | 4,074 | py | Python | homeassistant/helpers/area_registry.py | DieterChmod/home-assistant | 9aad20be283182daeec9c06ba08e54b1c3c05ff5 | [
"Apache-2.0"
] | 2 | 2017-10-26T19:43:55.000Z | 2017-12-30T23:29:00.000Z | homeassistant/helpers/area_registry.py | DieterChmod/home-assistant | 9aad20be283182daeec9c06ba08e54b1c3c05ff5 | [
"Apache-2.0"
] | null | null | null | homeassistant/helpers/area_registry.py | DieterChmod/home-assistant | 9aad20be283182daeec9c06ba08e54b1c3c05ff5 | [
"Apache-2.0"
] | 1 | 2019-12-18T20:06:33.000Z | 2019-12-18T20:06:33.000Z | """Provide a way to connect devices to one physical location."""
import logging
import uuid
from collections import OrderedDict
from typing import MutableMapping # noqa: F401
from typing import Iterable, Optional, cast
import attr
from homeassistant.core import callback
from homeassistant.loader import bind_hass
fro... | 27.714286 | 78 | 0.615611 |
ade1323c516a21d8b880ce9b9e41ad8fc0a8128e | 62,455 | py | Python | vnpy/app/cta_crypto/engine.py | alexfordc/lee_vnpy | 55e2f60aee94682a08e2c10bdd927e436811382c | [
"MIT"
] | null | null | null | vnpy/app/cta_crypto/engine.py | alexfordc/lee_vnpy | 55e2f60aee94682a08e2c10bdd927e436811382c | [
"MIT"
] | null | null | null | vnpy/app/cta_crypto/engine.py | alexfordc/lee_vnpy | 55e2f60aee94682a08e2c10bdd927e436811382c | [
"MIT"
] | 1 | 2020-04-03T10:43:31.000Z | 2020-04-03T10:43:31.000Z | """
数字货币CTA策略运行引擎
华富资产:
"""
import importlib
import os
import sys
import traceback
import json
import pickle
import bz2
from collections import defaultdict
from pathlib import Path
from typing import Any, Callable
from datetime import datetime, timedelta
from collections import OrderedDict
from concurrent.futures imp... | 35.265387 | 120 | 0.575006 |
e1ad52a519f65a4c92c81b9996c5e6320dce9205 | 27,899 | py | Python | sdk/python/pulumi_azure_native/network/v20170301/virtual_network_peering.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20170301/virtual_network_peering.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/network/v20170301/virtual_network_peering.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 63.263039 | 5,465 | 0.713108 |
707aca9b007993ca420d2fec08e92b91af65b373 | 687 | py | Python | python/anyascii/_data/_02d.py | casept/anyascii | d4f426b91751254b68eaa84c6cd23099edd668e6 | [
"ISC"
] | null | null | null | python/anyascii/_data/_02d.py | casept/anyascii | d4f426b91751254b68eaa84c6cd23099edd668e6 | [
"ISC"
] | null | null | null | python/anyascii/_data/_02d.py | casept/anyascii | d4f426b91751254b68eaa84c6cd23099edd668e6 | [
"ISC"
] | null | null | null | b="a b g d e v z t i k' l m n o p' zh r s t' u p k gh q' sh ch ts dz ts' ch' kh j h ey y w q ow e e a b b g g g g d d d d e f k k k h h h h e x x q q i j j j l m n ng ng p u r r gh q gh s s c t t c t v w y z z z e o w loa moa roa soa shoa boa toa choa noa nyoa 'oa zoa doa d'oa joa t'oa c... | 687 | 687 | 0.586608 |
cf93bd2f538e1804268876322e42db5935c702e3 | 33,983 | py | Python | tensorflow/tools/compatibility/renames_v2.py | mzakharocsc/tensorflow | cfdfcc311c10eacad1c9a6506c53987372b132f3 | [
"Apache-2.0"
] | 1 | 2019-09-15T09:42:06.000Z | 2019-09-15T09:42:06.000Z | tensorflow/tools/compatibility/renames_v2.py | mzakharocsc/tensorflow | cfdfcc311c10eacad1c9a6506c53987372b132f3 | [
"Apache-2.0"
] | null | null | null | tensorflow/tools/compatibility/renames_v2.py | mzakharocsc/tensorflow | cfdfcc311c10eacad1c9a6506c53987372b132f3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 63.401119 | 135 | 0.74549 |
53dfd903ffb9624ed692785bac18a8fd59de2a36 | 2,234 | py | Python | experiments/explore_arcade/models/ppo_entropy/src/model_forward.py | michalnand/reinforcement_learning_im | e29caa2a0b7bca3f9ff45ed949a3d3df3a40c4c1 | [
"MIT"
] | null | null | null | experiments/explore_arcade/models/ppo_entropy/src/model_forward.py | michalnand/reinforcement_learning_im | e29caa2a0b7bca3f9ff45ed949a3d3df3a40c4c1 | [
"MIT"
] | null | null | null | experiments/explore_arcade/models/ppo_entropy/src/model_forward.py | michalnand/reinforcement_learning_im | e29caa2a0b7bca3f9ff45ed949a3d3df3a40c4c1 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class Flatten(nn.Module):
def forward(self, input):
return input.view(input.size(0), -1)
class Model(torch.nn.Module):
def __init__(self, input_shape, outputs_count):
super(Model, self).__init__()
self.device = torch.device("cuda" if torch.cuda.is_a... | 27.925 | 101 | 0.575201 |
184dbf84d390f13c5aef467f08cd09c2c81db7f8 | 62 | py | Python | enthought/traits/ui/editors/list_str_editor.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 3 | 2016-12-09T06:05:18.000Z | 2018-03-01T13:00:29.000Z | enthought/traits/ui/editors/list_str_editor.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | 1 | 2020-12-02T00:51:32.000Z | 2020-12-02T08:48:55.000Z | enthought/traits/ui/editors/list_str_editor.py | enthought/etsproxy | 4aafd628611ebf7fe8311c9d1a0abcf7f7bb5347 | [
"BSD-3-Clause"
] | null | null | null | # proxy module
from traitsui.editors.list_str_editor import *
| 20.666667 | 46 | 0.822581 |
81d5588882c120b581ace664ecdc5fde31bc559c | 293 | py | Python | check_db_connector.py | JuliaBessonova/python_training | 496952832892e4c7fbc02ee397b4f63e4322e2a4 | [
"Apache-2.0"
] | null | null | null | check_db_connector.py | JuliaBessonova/python_training | 496952832892e4c7fbc02ee397b4f63e4322e2a4 | [
"Apache-2.0"
] | null | null | null | check_db_connector.py | JuliaBessonova/python_training | 496952832892e4c7fbc02ee397b4f63e4322e2a4 | [
"Apache-2.0"
] | null | null | null | import pymysql.cursors
connection = pymysql.connect(host="127.0.0.1", database="addressbook", user="root", password="")
try:
cursor = connection.cursor()
cursor.execute("select * from group_list")
for row in cursor.fetchall():
print(row)
finally:
connection.close()
| 22.538462 | 96 | 0.679181 |
bb2735d28f1cf1246626e4aa8acf200f91dcea7b | 9,057 | py | Python | src/shiv/cli.py | rsyring/shiv | 46e6c627b2d36d5dc785d22d893fe25655a488f0 | [
"BSD-2-Clause"
] | null | null | null | src/shiv/cli.py | rsyring/shiv | 46e6c627b2d36d5dc785d22d893fe25655a488f0 | [
"BSD-2-Clause"
] | null | null | null | src/shiv/cli.py | rsyring/shiv | 46e6c627b2d36d5dc785d22d893fe25655a488f0 | [
"BSD-2-Clause"
] | null | null | null | import os
import shutil
import hashlib
import sys
import time
from configparser import ConfigParser
from datetime import datetime
from pathlib import Path
from tempfile import TemporaryDirectory
from typing import List, Optional
import click
from . import builder, pip
from .bootstrap.environment import Environment
... | 34.437262 | 119 | 0.674727 |
f79a7ab49c3aae7c7349b3d66132e1371446b653 | 8,910 | py | Python | prepro/prepro_dic_coco.py | zanyarz/NeuralTwinsTalk | a045c23a4adf75d402272031c6732cd7d5b54791 | [
"MIT"
] | 2 | 2020-07-01T07:34:59.000Z | 2020-09-20T21:40:52.000Z | prepro/prepro_dic_coco.py | zanyarz/NeuralTwinsTalk | a045c23a4adf75d402272031c6732cd7d5b54791 | [
"MIT"
] | null | null | null | prepro/prepro_dic_coco.py | zanyarz/NeuralTwinsTalk | a045c23a4adf75d402272031c6732cd7d5b54791 | [
"MIT"
] | null | null | null | """
Preprocess a raw json dataset into hdf5/json files for use in data_loader.lua
Input: json file that has the form
[{ file_path: 'path/img.jpg', captions: ['a caption', ...] }, ...]
example element in this list would look like
{'captions': [u'A man with a red helmet on a small moped on a dirt road. ', u'Man riding a... | 38.571429 | 483 | 0.666554 |
5186b53679fd65d5f2241f82c5a89433b4ea738f | 13,509 | py | Python | fritzcall/src/ldif.py | Mariusz1970/enigma2-plugins-1 | 126d31d075c156f32b09d4321ebe1a17f93a5bd6 | [
"OLDAP-2.3"
] | null | null | null | fritzcall/src/ldif.py | Mariusz1970/enigma2-plugins-1 | 126d31d075c156f32b09d4321ebe1a17f93a5bd6 | [
"OLDAP-2.3"
] | null | null | null | fritzcall/src/ldif.py | Mariusz1970/enigma2-plugins-1 | 126d31d075c156f32b09d4321ebe1a17f93a5bd6 | [
"OLDAP-2.3"
] | 11 | 2015-02-26T20:59:14.000Z | 2021-09-20T08:23:03.000Z | #@PydevCodeAnalysisIgnore
# pylint: disable-msg=W0312,C0324,C0322
"""
ldif - generate and parse LDIF data (see RFC 2849)
See http://python-ldap.sourceforge.net for details.
$Id: ldif.py 699 2012-10-25 17:04:03Z michael $
Python compability note:
Tested with Python 2.0+, but should work with Python 1.5.2+.
"""
__ve... | 29.495633 | 102 | 0.668591 |
9c5b9b68d6d6b601cf35882ffa90a0d65c085fa1 | 409 | py | Python | maplocate_heroku/wsgi.py | karimbahgat/maplocate_heroku | 91a4f217c8c3448b1ac293efbddef28416efc4b8 | [
"MIT"
] | null | null | null | maplocate_heroku/wsgi.py | karimbahgat/maplocate_heroku | 91a4f217c8c3448b1ac293efbddef28416efc4b8 | [
"MIT"
] | null | null | null | maplocate_heroku/wsgi.py | karimbahgat/maplocate_heroku | 91a4f217c8c3448b1ac293efbddef28416efc4b8 | [
"MIT"
] | null | null | null | """
WSGI config for maplocate_heroku project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJA... | 24.058824 | 78 | 0.794621 |
a9972b963a9c2634c70d0afb47670bca21e1e420 | 3,667 | py | Python | reactics-smt/logics/param_constr.py | arturmeski/reactics | a565b5bf5ec671ccad4bbdab38ad264b9d8369cc | [
"MIT"
] | 2 | 2019-03-04T08:51:00.000Z | 2019-11-04T10:42:13.000Z | reactics-smt/logics/param_constr.py | arturmeski/reactics | a565b5bf5ec671ccad4bbdab38ad264b9d8369cc | [
"MIT"
] | null | null | null | reactics-smt/logics/param_constr.py | arturmeski/reactics | a565b5bf5ec671ccad4bbdab38ad264b9d8369cc | [
"MIT"
] | null | null | null | from enum import Enum
ParamConstraint_oper = Enum(
'ParamConstraint_oper',
'param_entity true l_and l_or l_not lt le eq ge gt')
class ParamConstraint(object):
def __init__(self, f_type, L_oper=None, R_oper=None, param=None, entity=""):
self.f_type = f_type
self.left_operand = L_oper
... | 36.67 | 89 | 0.619853 |
7fe01237933289620c36f9cecd0e4e5c307d2e04 | 25,785 | py | Python | aegan.py | ConorLazarou/AEGAN-PyTorch | 2b86eb7a74a15ce45c800e91fc0f4c92de7911cc | [
"MIT"
] | 1 | 2021-03-23T11:29:19.000Z | 2021-03-23T11:29:19.000Z | aegan.py | ConorLazarou/AEGAN-PyTorch | 2b86eb7a74a15ce45c800e91fc0f4c92de7911cc | [
"MIT"
] | null | null | null | aegan.py | ConorLazarou/AEGAN-PyTorch | 2b86eb7a74a15ce45c800e91fc0f4c92de7911cc | [
"MIT"
] | null | null | null | import os
import json
import torch
from torch import nn
from torch import optim
import torchvision as tv
from torchvision.datasets import ImageFolder
from torch.utils.data import DataLoader
from PIL import Image
import numpy as np
class Generator(nn.Module):
def __init__(self, channels, kernels, strides, upsample... | 39.853168 | 111 | 0.597751 |
820b5e40b0a09db1132aabee943188052e1f8ce2 | 93,574 | py | Python | ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py | dangervon/ovsdbapp | 04d1ca0ab6376f93197d3fbb98d431fbf8c0ea59 | [
"Apache-2.0"
] | null | null | null | ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py | dangervon/ovsdbapp | 04d1ca0ab6376f93197d3fbb98d431fbf8c0ea59 | [
"Apache-2.0"
] | null | null | null | ovsdbapp/tests/functional/schema/ovn_northbound/test_impl_idl.py | dangervon/ovsdbapp | 04d1ca0ab6376f93197d3fbb98d431fbf8c0ea59 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 42.188458 | 79 | 0.626114 |
70cce1ccdd4fffc8f811f36f653cee02b4aa3486 | 5,004 | py | Python | app.py | rupeish/object-detection | 9e5f3e42ed7542fffcc4d606f05c81a3a73b3575 | [
"MIT"
] | null | null | null | app.py | rupeish/object-detection | 9e5f3e42ed7542fffcc4d606f05c81a3a73b3575 | [
"MIT"
] | 8 | 2020-11-13T17:47:57.000Z | 2022-02-10T01:53:52.000Z | app.py | rupeish/object-detection | 9e5f3e42ed7542fffcc4d606f05c81a3a73b3575 | [
"MIT"
] | null | null | null | import time
from absl import app, logging
import cv2
import numpy as np
import tensorflow as tf
from yolov3_tf2.models import (
YoloV3, YoloV3Tiny
)
from yolov3_tf2.dataset import transform_images, load_tfrecord_dataset
from yolov3_tf2.utils import draw_outputs
from flask import Flask, request, Response, ... | 34.75 | 97 | 0.601719 |
7d1f6f882d923aebb20b645ac9f8861afb8a6c57 | 12,721 | py | Python | src/controller/python/chip/ChipDeviceCtrl.py | mrjerryjohns/connectedhomeip | b2550f9336b0d7d13fb0ea351fea9831ea372b04 | [
"Apache-2.0"
] | null | null | null | src/controller/python/chip/ChipDeviceCtrl.py | mrjerryjohns/connectedhomeip | b2550f9336b0d7d13fb0ea351fea9831ea372b04 | [
"Apache-2.0"
] | null | null | null | src/controller/python/chip/ChipDeviceCtrl.py | mrjerryjohns/connectedhomeip | b2550f9336b0d7d13fb0ea351fea9831ea372b04 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2020 Project CHIP Authors
# Copyright (c) 2019-2020 Google, LLC.
# Copyright (c) 2013-2018 Nest Labs, Inc.
# All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain... | 39.506211 | 169 | 0.682022 |
8815e257415b91111523b495f59ac79097cc61f6 | 22,025 | py | Python | functions/primary/dates.py | az365/snakee | 2f7dd35f50c76d23aa55f583b72f20455a3ca5a4 | [
"MIT"
] | null | null | null | functions/primary/dates.py | az365/snakee | 2f7dd35f50c76d23aa55f583b72f20455a3ca5a4 | [
"MIT"
] | null | null | null | functions/primary/dates.py | az365/snakee | 2f7dd35f50c76d23aa55f583b72f20455a3ca5a4 | [
"MIT"
] | 2 | 2021-04-10T19:22:15.000Z | 2022-03-08T19:37:56.000Z | from typing import Union, Optional
from datetime import date, timedelta, datetime
try: # Assume we're a sub-module in a package.
from utils import arguments as arg
from utils.decorators import deprecated_with_alternative
from base.enum import DynamicEnum
except ImportError: # Apparently no higher-level p... | 33.270393 | 110 | 0.676504 |
c037a063e82d7e960ea8c32016f40cb92a23201d | 8,253 | py | Python | one_fm/one_fm/doctype/career_history/career_history.py | mohsinalimat/One-FM | ad9a5d8f785c4e69ca68ba1ef75dd26725e5c9c3 | [
"MIT"
] | null | null | null | one_fm/one_fm/doctype/career_history/career_history.py | mohsinalimat/One-FM | ad9a5d8f785c4e69ca68ba1ef75dd26725e5c9c3 | [
"MIT"
] | null | null | null | one_fm/one_fm/doctype/career_history/career_history.py | mohsinalimat/One-FM | ad9a5d8f785c4e69ca68ba1ef75dd26725e5c9c3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2020, omar jaber and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe import _
from frappe.utils import getdate, month_diff
from one_fm.utils import validat... | 37.857798 | 141 | 0.745184 |
256f122bd6d10467d3893fbc967cc63dc2584861 | 19,175 | py | Python | pypesto/objective/amici.py | C-Peiter/pyPESTO | fb2be819b41411dc1686d8429ce5efa6c535b70b | [
"BSD-3-Clause"
] | 97 | 2018-08-01T20:16:57.000Z | 2022-03-31T18:46:28.000Z | pypesto/objective/amici.py | Doresic/pyPESTO | d92bd7801353cd522fa8ec04a750aac120771f01 | [
"BSD-3-Clause"
] | 758 | 2018-08-01T12:47:28.000Z | 2022-03-30T21:00:26.000Z | pypesto/objective/amici.py | Doresic/pyPESTO | d92bd7801353cd522fa8ec04a750aac120771f01 | [
"BSD-3-Clause"
] | 36 | 2018-08-16T20:10:15.000Z | 2022-03-17T16:58:11.000Z | import numpy as np
import copy
import tempfile
import os
import abc
from typing import Dict, Optional, Sequence, Tuple, Union
from collections import OrderedDict
from .base import ObjectiveBase
from .constants import MODE_FUN, MODE_RES, FVAL, RDATAS
from .amici_calculator import AmiciCalculator
from .amici_util import... | 37.451172 | 79 | 0.610117 |
cdfb1c1452cb430cb951e34364e50da5a4b19c23 | 52,670 | py | Python | purity_fb/purity_fb_1dot11/apis/file_systems_api.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | null | null | null | purity_fb/purity_fb_1dot11/apis/file_systems_api.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | null | null | null | purity_fb/purity_fb_1dot11/apis/file_systems_api.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Pure Storage FlashBlade REST 1.11 Python SDK
Pure Storage FlashBlade REST 1.11 Python SDK. Compatible with REST API versions 1.0 - 1.11. Developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/... | 50.741811 | 589 | 0.613575 |
1441eeebe079c231e0063ce1e5e8c4a66b265931 | 185 | py | Python | thyme/wallet/puzzles/generator_loader.py | yuanliuus/thyme-blockchain | 9ea5cddc78f601fcbe77101d74147cf8190e423d | [
"Apache-2.0"
] | 6 | 2021-06-30T13:03:47.000Z | 2021-07-10T12:46:37.000Z | thyme/wallet/puzzles/generator_loader.py | yuanliuus/thyme-blockchain | 9ea5cddc78f601fcbe77101d74147cf8190e423d | [
"Apache-2.0"
] | 8 | 2021-07-01T15:45:09.000Z | 2021-09-08T04:30:46.000Z | thyme/wallet/puzzles/generator_loader.py | yuanliuus/thyme-blockchain | 9ea5cddc78f601fcbe77101d74147cf8190e423d | [
"Apache-2.0"
] | 11 | 2021-07-03T17:30:57.000Z | 2022-03-15T08:47:03.000Z | from thyme.wallet.puzzles.load_clvm import load_serialized_clvm
GENERATOR_FOR_SINGLE_COIN_MOD = load_serialized_clvm("generator_for_single_coin.clvm", package_or_requirement=__name__)
| 46.25 | 119 | 0.891892 |
ec138b7375b11d91ed712cf3f912ea7420c43dc0 | 1,434 | py | Python | tests/integration/goldens/asset/samples/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py | Kache/gapic-generator-python | dcfcb32a60ac6243932304d757e7ef86008d5729 | [
"Apache-2.0"
] | null | null | null | tests/integration/goldens/asset/samples/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py | Kache/gapic-generator-python | dcfcb32a60ac6243932304d757e7ef86008d5729 | [
"Apache-2.0"
] | null | null | null | tests/integration/goldens/asset/samples/generated_samples/cloudasset_v1_generated_asset_service_list_feeds_async.py | Kache/gapic-generator-python | dcfcb32a60ac6243932304d757e7ef86008d5729 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2022 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... | 31.173913 | 85 | 0.75523 |
e829b6bac2936e5ba709531c0e57a0ea881e5073 | 327 | py | Python | saleor/wsgi/health_check.py | elwoodxblues/saleor | 5e4e4a4259a011d24b04ebd24c77c689de843fa1 | [
"CC-BY-4.0"
] | 15,337 | 2015-01-12T02:11:52.000Z | 2021-10-05T19:19:29.000Z | saleor/wsgi/health_check.py | elwoodxblues/saleor | 5e4e4a4259a011d24b04ebd24c77c689de843fa1 | [
"CC-BY-4.0"
] | 7,486 | 2015-02-11T10:52:13.000Z | 2021-10-06T09:37:15.000Z | saleor/wsgi/health_check.py | aminziadna/saleor | 2e78fb5bcf8b83a6278af02551a104cfa555a1fb | [
"CC-BY-4.0"
] | 5,864 | 2015-01-16T14:52:54.000Z | 2021-10-05T23:01:15.000Z | def health_check(application, health_url):
def health_check_wrapper(environ, start_response):
if environ.get("PATH_INFO") == health_url:
start_response("200 OK", [("Content-Type", "text/plain")])
return []
return application(environ, start_response)
return health_check_w... | 36.333333 | 70 | 0.672783 |
ccde6bbee15359347e63cf66687742dc80bc06e8 | 1,465 | py | Python | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/models/ip_rule.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/models/ip_rule.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | sdk/containerregistry/azure-mgmt-containerregistry/azure/mgmt/containerregistry/v2019_05_01/models/ip_rule.py | pjquirk/azure-sdk-for-python | cbf02ec4f177b96eae1dbbba87c34c2c93880150 | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 34.880952 | 78 | 0.610922 |
e6abebbf346c107bddd7ffe07c7dc7bbb0f1e6d8 | 58 | bzl | Python | version.bzl | mu-io/rules_mjml | 2852e72e06187c118da4f6e60878829aefbba600 | [
"Apache-2.0"
] | null | null | null | version.bzl | mu-io/rules_mjml | 2852e72e06187c118da4f6e60878829aefbba600 | [
"Apache-2.0"
] | null | null | null | version.bzl | mu-io/rules_mjml | 2852e72e06187c118da4f6e60878829aefbba600 | [
"Apache-2.0"
] | null | null | null | """The current version of this rule"""
version = "0.0.2"
| 14.5 | 38 | 0.637931 |
0592c4048e6dd75948a526bae2c9d2b508ba2d45 | 3,401 | py | Python | tests/plugins/test_compress.py | obriencj/atomic-reactor | 425acea5311d35543455b18f7d2965c72bcecf73 | [
"BSD-3-Clause"
] | null | null | null | tests/plugins/test_compress.py | obriencj/atomic-reactor | 425acea5311d35543455b18f7d2965c72bcecf73 | [
"BSD-3-Clause"
] | null | null | null | tests/plugins/test_compress.py | obriencj/atomic-reactor | 425acea5311d35543455b18f7d2965c72bcecf73 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import os
import tarfile
import pytest
from atomic_reactor.constants import (EXPORTED_COMPRESSED_IMAGE_NAME_TEMPLATE,
IMAGE_TYPE_DOCKER_ARCHIVE)
from atomic_reactor.core import DockerTasker
from atomic_reactor.inner import DockerBuildWorkfl... | 33.343137 | 88 | 0.616583 |
b77217ba41b0c0b0ce0d78938593395192189329 | 25,496 | py | Python | tests/test_multibyte_jpn.py | Dish1306/reportlab-mirror | 2e8bfd586484eb2e0580167c894f8d7bbb3ee06c | [
"BSD-3-Clause"
] | null | null | null | tests/test_multibyte_jpn.py | Dish1306/reportlab-mirror | 2e8bfd586484eb2e0580167c894f8d7bbb3ee06c | [
"BSD-3-Clause"
] | null | null | null | tests/test_multibyte_jpn.py | Dish1306/reportlab-mirror | 2e8bfd586484eb2e0580167c894f8d7bbb3ee06c | [
"BSD-3-Clause"
] | null | null | null | #Copyright ReportLab Europe Ltd. 2000-2017
#see license.txt for license details
#history www.reportlab.co.uk/rl-cgi/viewcvs.cgi/rlextra/rlj/jpsupport.py
# Temporary japanese support for ReportLab.
"""
The code in this module will disappear any day now and be replaced
by classes in reportlab.pdfbase.cidfonts
"""
from re... | 59.018519 | 2,369 | 0.64265 |
5f000124508d5d35261ac3b31db5bf4547dd2286 | 21,304 | py | Python | bin/splunk_ta_paloalto/modinput_wrapper/base_modinput.py | tlfox/PaloAltoNetworks | d23a6f89c6320051d87096e0d7ccc148df8e19f3 | [
"0BSD"
] | 15 | 2016-06-19T09:05:28.000Z | 2019-11-15T19:34:25.000Z | bin/ta_fireeye_tap/modinput_wrapper/base_modinput.py | pentestfail/TA-FireEye_TAP | fc69768dcaa52c90f7a135ba5a8b0e1646cce411 | [
"MIT"
] | 54 | 2016-08-11T14:22:30.000Z | 2020-08-07T22:14:55.000Z | bin/splunk_ta_paloalto/modinput_wrapper/base_modinput.py | Kintyre/Splunk_TA_paloalto | b8135d89f660113b751647f970a5eb349ff91829 | [
"0BSD"
] | 17 | 2016-04-26T15:45:59.000Z | 2021-06-28T16:50:34.000Z | # encoding = utf-8
import importlib
import copy
import logging
import os
import sys
import json
import tempfile
from solnlib.packages.splunklib import modularinput as smi
from solnlib.log import Logs
from solnlib.modular_input import checkpointer
from solnlib import utils as sutils
from splunktaucclib.global_config i... | 38.875912 | 131 | 0.611763 |
6b39194bad5394f72896d696374d0c19669ebd1c | 11,253 | py | Python | leap_motion/lib/leap_motion/LeapMotionFloatingHandListener.py | szahlner/shadow-teleop | 360c7d7c2586e9295c45fca0b4850b43d230bcda | [
"MIT"
] | 1 | 2022-03-02T20:27:20.000Z | 2022-03-02T20:27:20.000Z | leap_motion/lib/leap_motion/LeapMotionFloatingHandListener.py | szahlner/shadow-teleop | 360c7d7c2586e9295c45fca0b4850b43d230bcda | [
"MIT"
] | null | null | null | leap_motion/lib/leap_motion/LeapMotionFloatingHandListener.py | szahlner/shadow-teleop | 360c7d7c2586e9295c45fca0b4850b43d230bcda | [
"MIT"
] | null | null | null | import os
import pybullet
import numpy as np
import imageio
from . import Leap
from lib.test import test_utils
from lib import utils
class LeapMotionListenerFloatingHand(Leap.Listener):
def __init__(self, num_samples=None, with_object=False, render=False):
super().__init__()
# Sample / Test mod... | 46.8875 | 119 | 0.511597 |
11bac139fa0b0bbbca5edff263c43cf997a0c7af | 3,220 | py | Python | assets/2019-04-07/train.py | vruusmann/blog | 9f63a0361686f9e20a5a038cb67769df80405573 | [
"MIT"
] | null | null | null | assets/2019-04-07/train.py | vruusmann/blog | 9f63a0361686f9e20a5a038cb67769df80405573 | [
"MIT"
] | null | null | null | assets/2019-04-07/train.py | vruusmann/blog | 9f63a0361686f9e20a5a038cb67769df80405573 | [
"MIT"
] | 2 | 2019-02-19T07:59:45.000Z | 2019-12-10T13:56:16.000Z | from lightgbm import LGBMClassifier
from sklearn.impute import SimpleImputer
from sklearn.metrics import accuracy_score, precision_score, recall_score, roc_auc_score
from sklearn.preprocessing import LabelBinarizer, LabelEncoder
from sklearn_pandas import DataFrameMapper
from sklearn2pmml import sklearn2pmml
from sklea... | 33.195876 | 131 | 0.756832 |
cc6a83767e9befded29f4523dcb545a00fc1955c | 1,202 | py | Python | objects/CSCG/_2d/mesh/domain/regions/region/types_wrt_metric/allocator.py | mathischeap/mifem | 3242e253fb01ca205a76568eaac7bbdb99e3f059 | [
"MIT"
] | 1 | 2020-10-14T12:48:35.000Z | 2020-10-14T12:48:35.000Z | objects/CSCG/_2d/mesh/domain/regions/region/types_wrt_metric/allocator.py | mathischeap/mifem | 3242e253fb01ca205a76568eaac7bbdb99e3f059 | [
"MIT"
] | null | null | null | objects/CSCG/_2d/mesh/domain/regions/region/types_wrt_metric/allocator.py | mathischeap/mifem | 3242e253fb01ca205a76568eaac7bbdb99e3f059 | [
"MIT"
] | null | null | null |
from screws.freeze.main import FrozenOnly
from importlib import import_module
class TypeWr2MetricGiver(FrozenOnly):
"""
We use this class to distribute type object to regions.
"""
def __init__(self, ID: str):
assert ID in self.___coded_typeWr2Metric___(), \
" <TypeWr2MetricGiver> ... | 35.352941 | 87 | 0.613145 |
f75f504c636e77f2975edecf0364a47610ab3ef8 | 2,243 | py | Python | parlai/agents/bert_classifier/bert_classifier.py | FrankVerhoef/Persona-Dialogue-Generation | ffd8413c2e8b6446097902dd1c496aeb24b852b4 | [
"MIT"
] | 1 | 2022-02-27T23:52:28.000Z | 2022-02-27T23:52:28.000Z | parlai/agents/bert_classifier/bert_classifier.py | FrankVerhoef/Persona-Dialogue-Generation | ffd8413c2e8b6446097902dd1c496aeb24b852b4 | [
"MIT"
] | null | null | null | parlai/agents/bert_classifier/bert_classifier.py | FrankVerhoef/Persona-Dialogue-Generation | ffd8413c2e8b6446097902dd1c496aeb24b852b4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
from parlai.agents.bert_ranker.bert_dictionary import BertDictionaryAgent
from parlai.agents.bert_ranker.helpers import B... | 40.053571 | 80 | 0.627285 |
02ae5a946dc5347f45512f753cfac3e62301a1dc | 6,426 | py | Python | setuptools/tests/test_find_packages.py | oss-qm/python-setuptools | bbf99b7e599766e15dc56f58f68fe6c32c972faf | [
"MIT"
] | null | null | null | setuptools/tests/test_find_packages.py | oss-qm/python-setuptools | bbf99b7e599766e15dc56f58f68fe6c32c972faf | [
"MIT"
] | null | null | null | setuptools/tests/test_find_packages.py | oss-qm/python-setuptools | bbf99b7e599766e15dc56f58f68fe6c32c972faf | [
"MIT"
] | null | null | null | """Tests for setuptools.find_packages()."""
import os
import sys
import shutil
import tempfile
import platform
import pytest
from setuptools.extern.six import PY3
from setuptools import find_packages
py3_only = pytest.mark.xfail(not PY3, reason="Test runs on Python 3 only")
if PY3:
from setuptools import find_pack... | 34 | 83 | 0.632898 |
b09189be8ea81418c66b329247137676ab37d866 | 8,628 | py | Python | src/third_party/wiredtiger/test/suite/test_config04.py | MartinNeupauer/mongo | 6cc2dfe7edd312b8596355edef454e15988e350e | [
"Apache-2.0"
] | 1 | 2021-06-02T05:13:29.000Z | 2021-06-02T05:13:29.000Z | src/third_party/wiredtiger/test/suite/test_config04.py | MartinNeupauer/mongo | 6cc2dfe7edd312b8596355edef454e15988e350e | [
"Apache-2.0"
] | 2 | 2021-03-26T00:01:11.000Z | 2021-03-26T00:02:19.000Z | src/third_party/wiredtiger/test/suite/test_config04.py | MartinNeupauer/mongo | 6cc2dfe7edd312b8596355edef454e15988e350e | [
"Apache-2.0"
] | 5 | 2020-12-16T13:31:55.000Z | 2021-01-17T07:39:30.000Z | #!/usr/bin/env python
#
# Public Domain 2014-2017 MongoDB, Inc.
# Public Domain 2008-2014 WiredTiger, Inc.
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either in source code form or as a compil... | 39.39726 | 76 | 0.652527 |
ba8a51ed91ab3a9a9d0ce72ebd7f88eca4c5c77d | 822 | py | Python | mmpose/apis/__init__.py | Jackqu/mmpose | ad8acc5ff5da7993c6befdc4b1ced2c2ecb64533 | [
"Apache-2.0"
] | null | null | null | mmpose/apis/__init__.py | Jackqu/mmpose | ad8acc5ff5da7993c6befdc4b1ced2c2ecb64533 | [
"Apache-2.0"
] | null | null | null | mmpose/apis/__init__.py | Jackqu/mmpose | ad8acc5ff5da7993c6befdc4b1ced2c2ecb64533 | [
"Apache-2.0"
] | null | null | null | from .inference import (inference_bottom_up_pose_model,
inference_top_down_pose_model, init_pose_model,
vis_pose_result)
from .inference_3d import (extract_pose_sequence, inference_interhand_3d_model,
inference_pose_lifter_model, vis_3d_pose_res... | 48.352941 | 79 | 0.757908 |
ed862c14fa4632276992c298e450dabdbd241d47 | 1,183 | py | Python | cell.py | cluebbehusen/WeightedTicTacToe | 64ed455b1c21ceaa2a1da8246ef3b667d49e1955 | [
"MIT"
] | null | null | null | cell.py | cluebbehusen/WeightedTicTacToe | 64ed455b1c21ceaa2a1da8246ef3b667d49e1955 | [
"MIT"
] | null | null | null | cell.py | cluebbehusen/WeightedTicTacToe | 64ed455b1c21ceaa2a1da8246ef3b667d49e1955 | [
"MIT"
] | null | null | null | class Cell:
"""Holds information about each individual cell in tic tac toe grid."""
def __init__(self, x, y):
"""Initializes an empty cell."""
self.x = x
self.y = y
self.contents = 'E'
def __str__(self):
"""Returns it contents in string form."""
if self.... | 30.333333 | 80 | 0.555368 |
30c338be6b4182c443652093655b736e414191ef | 435 | py | Python | app/instance/config.py | eduhmik/Store-Manager-api | 50395d39758800784fbd0b3e516b8bedc900cdeb | [
"MIT"
] | null | null | null | app/instance/config.py | eduhmik/Store-Manager-api | 50395d39758800784fbd0b3e516b8bedc900cdeb | [
"MIT"
] | 8 | 2018-10-24T01:33:32.000Z | 2019-10-21T17:36:01.000Z | app/instance/config.py | eduhmik/Store-Manager-api | 50395d39758800784fbd0b3e516b8bedc900cdeb | [
"MIT"
] | 1 | 2018-10-19T21:57:48.000Z | 2018-10-19T21:57:48.000Z | import os
"""
class for app configurations
"""
class Config():
"""Base Config"""
DEBUG = True
SECRET_KEY = os.getenv('SECRET_KEY')
class Development(Config):
'''Configurations for development'''
Debug = True
class Testing(Config):
'''Congigurations for testing'''
TESTING = True
Debug =... | 16.111111 | 40 | 0.652874 |
2ed526ecaa8958959d155f2150897650b01d2ff8 | 940 | py | Python | hyperboard/hyperboard_run.py | WarBean/hyperboard | a96dcbb374d2039b425a4100c4bff10f38f0fc32 | [
"MIT"
] | 377 | 2017-01-24T17:02:49.000Z | 2022-03-21T12:16:56.000Z | hyperboard/hyperboard_run.py | WarBean/hyperboard | a96dcbb374d2039b425a4100c4bff10f38f0fc32 | [
"MIT"
] | 3 | 2017-01-31T13:41:05.000Z | 2017-12-20T03:35:58.000Z | hyperboard/hyperboard_run.py | WarBean/hyperboard | a96dcbb374d2039b425a4100c4bff10f38f0fc32 | [
"MIT"
] | 81 | 2017-01-27T01:39:23.000Z | 2021-02-11T14:47:13.000Z | import os
import sys
import argparse
from os import path
from hyperboard import Server
def main():
parser = argparse.ArgumentParser()
parser.add_argument('--port', help = 'server port, default 5000', type = int, default = 5000)
parser.add_argument('--user', help = 'user name')
parser.add_argument('--pa... | 37.6 | 118 | 0.678723 |
b12f60bfe8d6771ecb8b9abf87ed39d352db33d6 | 5,641 | py | Python | PixInfo.py | Rob0b0/image-retrieval-system | 2178cf4f43aec9b1ac4a3909b8b4f793a8aba346 | [
"MIT"
] | 1 | 2021-05-25T06:41:27.000Z | 2021-05-25T06:41:27.000Z | PixInfo.py | Rob0b0/image-retrieval-system | 2178cf4f43aec9b1ac4a3909b8b4f793a8aba346 | [
"MIT"
] | null | null | null | PixInfo.py | Rob0b0/image-retrieval-system | 2178cf4f43aec9b1ac4a3909b8b4f793a8aba346 | [
"MIT"
] | 1 | 2021-12-04T16:20:11.000Z | 2021-12-04T16:20:11.000Z | # PixInfo.py
# Program to start evaluating an image in python
from PIL import Image, ImageTk
import glob, os, math
import numpy as np
from sklearn import preprocessing
from statistics import stdev
import pandas as pd
# import skimage.io
# Pixel Info class.
class PixInfo:
# Constructor.
def __init__(self... | 33.378698 | 133 | 0.57153 |
42ced9d0e69c3d998e17ab2df889340ddaa5acfb | 15,509 | py | Python | fastapi_websocket_pubsub/pub_sub_client.py | IppSec/fastapi_websocket_pubsub | 2ea08e777bbc11b95ebaecee03c4ae3388234d24 | [
"MIT"
] | 37 | 2021-12-10T14:26:42.000Z | 2022-03-29T11:06:51.000Z | fastapi_websocket_pubsub/pub_sub_client.py | IppSec/fastapi_websocket_pubsub | 2ea08e777bbc11b95ebaecee03c4ae3388234d24 | [
"MIT"
] | 2 | 2022-02-25T15:36:19.000Z | 2022-02-27T13:58:28.000Z | fastapi_websocket_pubsub/pub_sub_client.py | IppSec/fastapi_websocket_pubsub | 2ea08e777bbc11b95ebaecee03c4ae3388234d24 | [
"MIT"
] | 5 | 2021-12-10T13:41:19.000Z | 2022-03-26T17:49:55.000Z | from types import coroutine
from fastapi_websocket_rpc.rpc_channel import (
RpcChannel,
OnDisconnectCallback,
OnConnectCallback,
)
from fastapi_websocket_pubsub.exceptions import PubSubClientInvalidStateException
import websockets
import asyncio
from typing import Coroutine, Dict, List
from .logger import... | 43.687324 | 162 | 0.611387 |
707d5cc976bf38bc59333feda74ed3e65e8373cb | 3,733 | py | Python | object_manipulation/src/testItems.py | RoboHubEindhoven/suii | 92e0502e53001a743259dd3e085d3b437837b443 | [
"BSD-3-Clause"
] | 1 | 2019-07-10T11:47:54.000Z | 2019-07-10T11:47:54.000Z | object_manipulation/src/testItems.py | RoboHubEindhoven-User/suii | 92e0502e53001a743259dd3e085d3b437837b443 | [
"BSD-3-Clause"
] | null | null | null | object_manipulation/src/testItems.py | RoboHubEindhoven-User/suii | 92e0502e53001a743259dd3e085d3b437837b443 | [
"BSD-3-Clause"
] | 1 | 2019-06-27T17:50:11.000Z | 2019-06-27T17:50:11.000Z | #!/usr/bin/env python
import rospy
import tf
#services
from std_srvs.srv import Empty, EmptyResponse, EmptyRequest
from suii_msgs.srv import UpdateItems, UpdateItemsResponse, UpdateItemsRequest
from suii_msgs.srv import Item, ItemResponse, ItemRequest
from suii_msgs.msg import VisionScanObject
tolerance = 10 * 0.01... | 35.894231 | 85 | 0.65738 |
76f52d56260a7cbb02b281650249307cdfcc60f3 | 677 | py | Python | scripts/helpers/info.py | laszlojakab/default | 11d56fd00ef8af48c1f4060a92b2d1d6ccbb2139 | [
"MIT"
] | null | null | null | scripts/helpers/info.py | laszlojakab/default | 11d56fd00ef8af48c1f4060a92b2d1d6ccbb2139 | [
"MIT"
] | null | null | null | scripts/helpers/info.py | laszlojakab/default | 11d56fd00ef8af48c1f4060a92b2d1d6ccbb2139 | [
"MIT"
] | null | null | null | import os
from scripts.helpers.hacs_manifest import get_hacs_manifest
ALTERNATIVES = {
"info": ["info", "INFO", "info.md", "INFO.md", "info.MD", "INFO.MD"],
"readme": ["readme", "README", "readme.md", "README.md", "readme.MD", "README.MD"],
}
def get_info():
manifest = get_hacs_manifest()
info = "rea... | 30.772727 | 87 | 0.615953 |
405bb28c9255e34930db591cf357b5522038d4aa | 400 | py | Python | spark/spark_generators/migrations/0002_generator_is_active.py | matthiask/django-spark | 9377e20b69be257ff31737c97f4479319cd9eb8c | [
"BSD-3-Clause"
] | 2 | 2018-10-22T20:28:25.000Z | 2019-08-30T01:22:13.000Z | spark/spark_generators/migrations/0002_generator_is_active.py | matthiask/django-spark | 9377e20b69be257ff31737c97f4479319cd9eb8c | [
"BSD-3-Clause"
] | null | null | null | spark/spark_generators/migrations/0002_generator_is_active.py | matthiask/django-spark | 9377e20b69be257ff31737c97f4479319cd9eb8c | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 2.1.3 on 2018-11-13 15:22
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [("spark_generators", "0001_initial")]
operations = [
migrations.AddField(
model_name="generator",
name="is_active",
fie... | 23.529412 | 78 | 0.6375 |
898685a0ef7a0b1483816237f0c49ddfcfb3aae9 | 3,581 | py | Python | externalModels/python/DLIBCPU/hog.py | zhkmxx9302013/SoftwarePilot | 826098465b800085774946c20a7a283f369f1d21 | [
"MIT"
] | 4 | 2019-03-20T17:46:01.000Z | 2019-03-31T17:32:44.000Z | externalModels/python/DLIBCPU/hog.py | zhkmxx9302013/SoftwarePilot | 826098465b800085774946c20a7a283f369f1d21 | [
"MIT"
] | null | null | null | externalModels/python/DLIBCPU/hog.py | zhkmxx9302013/SoftwarePilot | 826098465b800085774946c20a7a283f369f1d21 | [
"MIT"
] | null | null | null | import face_recognition, os
import PIL.Image
import math
import numpy
import sys
import socket
import time
quit = False
width=0
height=0
#imgs = os.listdir('HomeParkFaces/')
#img_lst = []
#for img in imgs:
# img_lst.append('HomeParkFaces/'+img)
# print(img)
def getMasks(img):
global width, height
im = PIL... | 26.924812 | 99 | 0.545937 |
073ef1b463dcdc59067647c2072d76fa72f2d0bd | 24,914 | py | Python | melange/openstack/common/wsgi.py | rackerlabs/melange | 26d08ab6e3d77021920511cf74fa4df944046df8 | [
"Apache-2.0"
] | 1 | 2016-11-21T18:57:33.000Z | 2016-11-21T18:57:33.000Z | melange/openstack/common/wsgi.py | rackerlabs/melange | 26d08ab6e3d77021920511cf74fa4df944046df8 | [
"Apache-2.0"
] | null | null | null | melange/openstack/common/wsgi.py | rackerlabs/melange | 26d08ab6e3d77021920511cf74fa4df944046df8 | [
"Apache-2.0"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/... | 34.699164 | 79 | 0.631292 |
95a7c7168ddc56e79e9630c190c7a05a47b91954 | 11,320 | py | Python | docs/source/conf.py | ajkhoury/QBDI | aca7930f6516660545704ab3171cc0c1a32e155a | [
"Apache-2.0"
] | 1 | 2019-08-28T23:30:46.000Z | 2019-08-28T23:30:46.000Z | docs/source/conf.py | ajkhoury/QBDI | aca7930f6516660545704ab3171cc0c1a32e155a | [
"Apache-2.0"
] | null | null | null | docs/source/conf.py | ajkhoury/QBDI | aca7930f6516660545704ab3171cc0c1a32e155a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# QBDI documentation build configuration file, created by
# sphinx-quickstart on Mon Nov 2 10:36:40 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autog... | 33.196481 | 109 | 0.700707 |
b812522a3b4632a0f09cc0d3d1394262a273eb4c | 755 | py | Python | src/sentry/api/endpoints/organization_user_details.py | uandco/sentry | 5b8d45cb71c6617dac8e64265848623fbfce9c99 | [
"BSD-3-Clause"
] | 2 | 2019-03-04T12:45:54.000Z | 2019-03-04T12:45:55.000Z | src/sentry/api/endpoints/organization_user_details.py | uandco/sentry | 5b8d45cb71c6617dac8e64265848623fbfce9c99 | [
"BSD-3-Clause"
] | 196 | 2019-06-10T08:34:10.000Z | 2022-02-22T01:26:13.000Z | src/sentry/api/endpoints/organization_user_details.py | uandco/sentry | 5b8d45cb71c6617dac8e64265848623fbfce9c99 | [
"BSD-3-Clause"
] | 1 | 2017-02-09T06:36:57.000Z | 2017-02-09T06:36:57.000Z | from __future__ import absolute_import
from rest_framework.response import Response
from sentry.api.bases.organization import OrganizationEndpoint
from sentry.api.serializers import serialize
from sentry.models import User
from sentry.api.endpoints.organization_member_index import MemberPermission
class Organizatio... | 31.458333 | 75 | 0.735099 |
91630b1a8d5f91489792aba11f37e90ac21887af | 12,075 | py | Python | baselines/ppo2/ppo2.py | anonymous-supplement/asf | e1a6f6c8e83c49a6e44d01d4bcdf4b79a80248cf | [
"MIT"
] | 2 | 2020-07-06T11:24:03.000Z | 2021-02-10T04:32:43.000Z | baselines/ppo2/ppo2.py | NeteaseFuxiRL/asf | e1a6f6c8e83c49a6e44d01d4bcdf4b79a80248cf | [
"MIT"
] | null | null | null | baselines/ppo2/ppo2.py | NeteaseFuxiRL/asf | e1a6f6c8e83c49a6e44d01d4bcdf4b79a80248cf | [
"MIT"
] | null | null | null | import os
import time
import random
import joblib
import numpy as np
import os.path as osp
import tensorflow as tf
from baselines import logger
from collections import deque
from baselines.common import explained_variance
class Model(object):
def __init__(self, *, policy, ob_space, ac_space, nbatch_act, nbatch_t... | 43.125 | 128 | 0.612008 |
bcec279b9c79e7fb2220fb9dfa16fec8a086e439 | 130 | py | Python | polls/aiohttp_polls/utils.py | settipalli/py-aiohttp-polls | 289a10f4766e469a84b1182fa03aa93f195ba796 | [
"Apache-2.0"
] | null | null | null | polls/aiohttp_polls/utils.py | settipalli/py-aiohttp-polls | 289a10f4766e469a84b1182fa03aa93f195ba796 | [
"Apache-2.0"
] | null | null | null | polls/aiohttp_polls/utils.py | settipalli/py-aiohttp-polls | 289a10f4766e469a84b1182fa03aa93f195ba796 | [
"Apache-2.0"
] | null | null | null | import yaml
import aiopg.sa
def load_config(fname):
with open(fname, 'rt') as f:
data = yaml.load(f)
return data
| 16.25 | 32 | 0.638462 |
b7d39f9c610b85ab5f51f3149e17cc71491f6061 | 57,625 | py | Python | edb/edgeql/compiler/viewgen.py | rohankumardubey/edgedb | d02c41a1c7cbd8b5c0e66878394824f34ae63fd3 | [
"Apache-2.0"
] | null | null | null | edb/edgeql/compiler/viewgen.py | rohankumardubey/edgedb | d02c41a1c7cbd8b5c0e66878394824f34ae63fd3 | [
"Apache-2.0"
] | null | null | null | edb/edgeql/compiler/viewgen.py | rohankumardubey/edgedb | d02c41a1c7cbd8b5c0e66878394824f34ae63fd3 | [
"Apache-2.0"
] | null | null | null | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2008-present MagicStack Inc. and the EdgeDB 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... | 36.471519 | 79 | 0.602447 |
6bdfed92fbfabbefe7b8d7c08c7b6c9be575e930 | 9,390 | py | Python | src/app.py | westsmith-open/loan-item-api | 81ea836a10829bf78c30b5af5ae35d72fde686ec | [
"MIT"
] | null | null | null | src/app.py | westsmith-open/loan-item-api | 81ea836a10829bf78c30b5af5ae35d72fde686ec | [
"MIT"
] | null | null | null | src/app.py | westsmith-open/loan-item-api | 81ea836a10829bf78c30b5af5ae35d72fde686ec | [
"MIT"
] | 1 | 2020-08-16T12:29:16.000Z | 2020-08-16T12:29:16.000Z | import datetime
import os
import traceback
import jwt
import phonenumbers
from phonenumbers.phonenumberutil import NumberParseException
from flask import Flask, request, jsonify
from werkzeug.security import generate_password_hash, check_password_hash
from exceptions import (
InvalidTokenException,
InvalidReq... | 34.649446 | 97 | 0.675506 |
bc2e6e2866039912939d4a4016bb439182b9a1a9 | 12,405 | py | Python | src/data/ipr_initial_data_gathering.py | omegavic01/IPR_Repo | 5588a3b365ccd507e3e6d28fac6c053752a6ce5c | [
"MIT"
] | 5 | 2019-02-23T00:43:10.000Z | 2019-04-16T19:27:54.000Z | src/data/ipr_initial_data_gathering.py | omegavic01/IPR_Repo | 5588a3b365ccd507e3e6d28fac6c053752a6ce5c | [
"MIT"
] | null | null | null | src/data/ipr_initial_data_gathering.py | omegavic01/IPR_Repo | 5588a3b365ccd507e3e6d28fac6c053752a6ce5c | [
"MIT"
] | null | null | null | """
This script is intended to pull the entire IPAM database from DDI then
generates and creates a .xls file then saving it to the path directory.
"""
import os
import time
import json
import pickle
from datetime import datetime
import logging
import requests
from dotenv import find_dotenv, load_dotenv
requests.package... | 36.810089 | 79 | 0.574204 |
8464d1310ca20ac7d2ee52ea5b1232fe436251ac | 231 | py | Python | Algorithms/leet_code/remove_dups/main.py | burakhanaksoy/PythonAlgorithms | f19c11b373e47b1d8ec8e26560471a0603dbfbdb | [
"MIT"
] | 1 | 2021-04-19T12:55:51.000Z | 2021-04-19T12:55:51.000Z | Algorithms/leet_code/remove_dups/main.py | burakhanaksoy/PythonAlgorithms | f19c11b373e47b1d8ec8e26560471a0603dbfbdb | [
"MIT"
] | null | null | null | Algorithms/leet_code/remove_dups/main.py | burakhanaksoy/PythonAlgorithms | f19c11b373e47b1d8ec8e26560471a0603dbfbdb | [
"MIT"
] | null | null | null | class Solution(object):
def removeDuplicates(self, nums):
my_set = set(nums)
my_list = list(my_set)
print(f'{len(my_list)}, nums= {my_list}')
obj = Solution()
obj.removeDuplicates([0,0,1,1,1,2,2,3,3,4]) | 28.875 | 49 | 0.619048 |
c159c49225415528c64730d2f9afa839ba405052 | 345 | py | Python | nbdev_tutorial/_nbdev.py | hoangthienan95/nbdev_tutorial | 06c461af5551f234628d3b6ac41f28398d3fd19f | [
"Apache-2.0"
] | null | null | null | nbdev_tutorial/_nbdev.py | hoangthienan95/nbdev_tutorial | 06c461af5551f234628d3b6ac41f28398d3fd19f | [
"Apache-2.0"
] | null | null | null | nbdev_tutorial/_nbdev.py | hoangthienan95/nbdev_tutorial | 06c461af5551f234628d3b6ac41f28398d3fd19f | [
"Apache-2.0"
] | null | null | null | # AUTOGENERATED BY NBDEV! DO NOT EDIT!
__all__ = ["index", "modules", "custom_doc_links", "git_url"]
index = {"say_hello": "00_core.ipynb"}
modules = ["core.py"]
doc_url = "https://hoangthienan95.github.io/nbdev_tutorial/"
git_url = "https://github.com/hoangthienan95/nbdev_tutorial/tree/{branch}/"
def custom_doc_... | 24.642857 | 75 | 0.724638 |
8c371a67c799af1694aa36d82cb9ab83a0a4bc86 | 259 | py | Python | exercises/en/solution_01_03_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | 2 | 2020-07-07T01:46:37.000Z | 2021-04-20T03:19:43.000Z | exercises/en/solution_01_03_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | exercises/en/solution_01_03_01.py | tuanducdesign/spacy-course | f8d092c5fa2997fccb3f367d174dce8667932b3d | [
"MIT"
] | null | null | null | # Import spaCy and create the English nlp object
import spacy
nlp = spacy.blank("en")
# Process the text
doc = nlp("I like tree kangaroos and narwhals.")
# Select the first token
first_token = doc[0]
# Print the first token's text
print(first_token.text)
| 18.5 | 48 | 0.737452 |
1360ab0f7eac02c361baf9bea73e94f0130e8706 | 2,074 | py | Python | pdmreader/models.py | bianjp/pdmreader | efb77df7239de1736b7d82e7987101c984996125 | [
"MIT"
] | 5 | 2018-09-01T22:58:13.000Z | 2020-02-27T17:04:28.000Z | pdmreader/models.py | bianjp/pdmreader | efb77df7239de1736b7d82e7987101c984996125 | [
"MIT"
] | null | null | null | pdmreader/models.py | bianjp/pdmreader | efb77df7239de1736b7d82e7987101c984996125 | [
"MIT"
] | 3 | 2019-04-06T12:47:17.000Z | 2019-12-17T10:58:07.000Z | from dataclasses import dataclass
from typing import List, Optional
import re
class TypeUtil:
numeric_types = ('number', 'numeric', 'float', 'double', 'integer', 'decimal')
string_types = ('char', 'clob')
@staticmethod
def is_numeric(data_type):
for type_keyword in TypeUtil.numeric_types:
... | 19.752381 | 82 | 0.611379 |
38df0c12ccf2dd140e35b53dbba916ca2001cb2e | 1,705 | py | Python | py/codeforces/868B.py | shhuan/algorithms | 2830c7e2ada8dfd3dcdda7c06846116d4f944a27 | [
"MIT"
] | null | null | null | py/codeforces/868B.py | shhuan/algorithms | 2830c7e2ada8dfd3dcdda7c06846116d4f944a27 | [
"MIT"
] | null | null | null | py/codeforces/868B.py | shhuan/algorithms | 2830c7e2ada8dfd3dcdda7c06846116d4f944a27 | [
"MIT"
] | 1 | 2022-03-09T04:52:55.000Z | 2022-03-09T04:52:55.000Z | # -*- coding: utf-8 -*-
import math
import collections
import bisect
import heapq
import time
import random
"""
created by shhuan at 2017/10/5 15:00
"""
H, M, S, t1, t2 = map(int, input().split())
# 0 - 11.999999999
if M != 0 or S != 0:
H += 0.1
M = M * 12 / 60
S = S * 12 / 60
t1b, t2b = t1, t2
over = Fals... | 18.944444 | 63 | 0.360117 |
74d4482bd59275f2a4f7453e7dda01f24088a97f | 4,621 | py | Python | otello/ci.py | hysds/otello | c32cb7c3c85039bf476ff6002206764ded8e6fc7 | [
"Apache-2.0"
] | null | null | null | otello/ci.py | hysds/otello | c32cb7c3c85039bf476ff6002206764ded8e6fc7 | [
"Apache-2.0"
] | 4 | 2021-01-27T07:48:38.000Z | 2021-09-15T17:56:31.000Z | otello/ci.py | hysds/otello | c32cb7c3c85039bf476ff6002206764ded8e6fc7 | [
"Apache-2.0"
] | null | null | null | import os
import requests
# from otello.utils import decorator
from otello.base import Base
class CI(Base):
def __init__(self, repo=None, branch=None, cfg=None):
"""
:param repo: str (required) git HTTPS repo url
:param branch: str (optional) git branch
:param cfg: file path to co... | 29.812903 | 100 | 0.550314 |
75f48920c1c98fd43467deb96a8fe5bd06057c2c | 3,340 | py | Python | aks_streamer.py | gfortil/hpcc-internship | 8061771bcb4791fca54e6b1d74f0c019ad69bca4 | [
"MIT"
] | null | null | null | aks_streamer.py | gfortil/hpcc-internship | 8061771bcb4791fca54e6b1d74f0c019ad69bca4 | [
"MIT"
] | null | null | null | aks_streamer.py | gfortil/hpcc-internship | 8061771bcb4791fca54e6b1d74f0c019ad69bca4 | [
"MIT"
] | 1 | 2021-06-10T22:07:15.000Z | 2021-06-10T22:07:15.000Z | import time
import requests
import datetime
import subprocess
from config import *
from price_puller_azure_api import pull_price
import pytz
from aks import *
def invoke_spot_eviction_notice_streaming(resource_group, cluster_name):
azure_run_command = 'az aks get-credentials --resource-group {} --name {} && '
... | 31.214953 | 99 | 0.661377 |
6113caee05417e63bba48ab1d2f84a328bb028f8 | 160 | py | Python | socialreminder/apps.py | hussamhadi/socialreminder | 7b0ec502ed170a345bed5b8949c3b6d7cb8d9ee4 | [
"Apache-2.0"
] | 2 | 2022-02-07T18:40:10.000Z | 2022-02-08T18:41:19.000Z | socialreminder/apps.py | hussamhadi/socialreminder | 7b0ec502ed170a345bed5b8949c3b6d7cb8d9ee4 | [
"Apache-2.0"
] | null | null | null | socialreminder/apps.py | hussamhadi/socialreminder | 7b0ec502ed170a345bed5b8949c3b6d7cb8d9ee4 | [
"Apache-2.0"
] | null | null | null | from django.apps import AppConfig
class SocialreminderConfig(AppConfig):
default_auto_field = 'django.db.models.BigAutoField'
name = 'socialreminder'
| 22.857143 | 56 | 0.78125 |
cfbd8f4c1631447aa9a50b547141bd3499951f5b | 14,272 | py | Python | extract_subvideos.py | jrterven/lip_reading_dataset | 85845b7948e4ea26ae27a0cc3e0b15ae68198fb4 | [
"MIT"
] | 2 | 2019-10-06T14:49:12.000Z | 2019-12-09T17:13:20.000Z | extract_subvideos.py | jrterven/lip_reading_dataset | 85845b7948e4ea26ae27a0cc3e0b15ae68198fb4 | [
"MIT"
] | null | null | null | extract_subvideos.py | jrterven/lip_reading_dataset | 85845b7948e4ea26ae27a0cc3e0b15ae68198fb4 | [
"MIT"
] | null | null | null | '''
Generate entries for the dataset by extracting bounding boxes
and time stamps from videos.
Run as:
python extract_subvideos.py --dir [directorio] --cat [categoria]
--vids_log [archivo_log] --results_dir [directorio_de_resultados]
--ann_file [archivo_de_anotaciones]
Jua... | 36.315522 | 111 | 0.526065 |
2006074df47dc0cb58fe0b6a1ce312153c9f3284 | 1,802 | py | Python | vendor/packages/pylint/test/input/func_interfaces.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | 2 | 2019-08-19T17:08:47.000Z | 2019-10-05T11:37:02.000Z | vendor/packages/pylint/test/input/func_interfaces.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | null | null | null | vendor/packages/pylint/test/input/func_interfaces.py | jgmize/kitsune | 8f23727a9c7fcdd05afc86886f0134fb08d9a2f0 | [
"BSD-3-Clause"
] | null | null | null | # pylint:disable-msg=R0201
"""docstring"""
__revision__ = ''
class Interface:
"""base class for interfaces"""
class IMachin(Interface):
"""docstring"""
def truc(self):
"""docstring"""
def troc(self, argument):
"""docstring"""
class Correct1:
"""docstring"""
__implemen... | 18.02 | 73 | 0.546615 |
156d6fcb14a9d1b6f92c38623a8dad57f575ed6a | 604 | py | Python | EfficientCoding/CoinChange.py | vikbehal/Explore | b35948d8a6894647df3ee462746475f7e66f78f8 | [
"MIT"
] | 3 | 2019-01-29T06:33:34.000Z | 2022-01-26T20:01:04.000Z | EfficientCoding/CoinChange.py | vikbehal/Explore | b35948d8a6894647df3ee462746475f7e66f78f8 | [
"MIT"
] | null | null | null | EfficientCoding/CoinChange.py | vikbehal/Explore | b35948d8a6894647df3ee462746475f7e66f78f8 | [
"MIT"
] | 1 | 2022-03-11T10:47:29.000Z | 2022-03-11T10:47:29.000Z | def coin_change(amount, change):
if amount in change:
return 0, amount
chosen_coin = 0
for coin in change:
if coin < amount:
chosen_coin = coin
break
return amount-chosen_coin, chosen_coin
remaining_amount = 8
change = [1, 5, 3, 6]
change.sort()... | 22.37037 | 69 | 0.629139 |
f716130a5e4aa592b5742e419a3914560c7330fc | 1,320 | py | Python | homeassistant/components/synology_dsm/const.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 1,635 | 2015-01-01T14:59:18.000Z | 2016-04-13T02:36:16.000Z | homeassistant/components/synology_dsm/const.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 1,463 | 2015-01-06T06:18:07.000Z | 2016-04-12T22:30:37.000Z | homeassistant/components/synology_dsm/const.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 659 | 2015-01-05T14:02:23.000Z | 2016-04-12T23:39:31.000Z | """Constants for Synology DSM."""
from __future__ import annotations
from synology_dsm.api.surveillance_station.const import SNAPSHOT_PROFILE_BALANCED
from homeassistant.const import Platform
DOMAIN = "synology_dsm"
ATTRIBUTION = "Data provided by Synology"
PLATFORMS = [
Platform.BINARY_SENSOR,
Platform.BUTT... | 23.571429 | 81 | 0.79697 |
c2667786691364f27a74f0d718a34693277173f5 | 8,770 | py | Python | autobot/github.py | fotini-pan/autobot | 7b0f01d7448300e1c2283ffc8973b65099948183 | [
"MIT"
] | null | null | null | autobot/github.py | fotini-pan/autobot | 7b0f01d7448300e1c2283ffc8973b65099948183 | [
"MIT"
] | 5 | 2019-07-19T07:08:04.000Z | 2019-08-14T06:50:19.000Z | autobot/github.py | fotini-pan/autobot | 7b0f01d7448300e1c2283ffc8973b65099948183 | [
"MIT"
] | 2 | 2019-07-23T08:11:19.000Z | 2019-07-23T09:30:29.000Z | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2019 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Github Client."""
from datetime import datetime
import pytz
from github3 import ... | 35.220884 | 88 | 0.552794 |
453eaa3e8a60eb53533f7f0dc94af15ab58a2264 | 425 | py | Python | students/k33402/Sholomov_Dan/warriors_project/warriors_project/asgi.py | heidamn/ITMO_ICT_WebDevelopment_2020-2021 | 47eb0cdf7c7dbe8d071bc4fd3f1ac94848475e7b | [
"MIT"
] | null | null | null | students/k33402/Sholomov_Dan/warriors_project/warriors_project/asgi.py | heidamn/ITMO_ICT_WebDevelopment_2020-2021 | 47eb0cdf7c7dbe8d071bc4fd3f1ac94848475e7b | [
"MIT"
] | null | null | null | students/k33402/Sholomov_Dan/warriors_project/warriors_project/asgi.py | heidamn/ITMO_ICT_WebDevelopment_2020-2021 | 47eb0cdf7c7dbe8d071bc4fd3f1ac94848475e7b | [
"MIT"
] | 1 | 2022-01-25T19:32:14.000Z | 2022-01-25T19:32:14.000Z | """
ASGI config for warriors_project 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
os.environ.se... | 25 | 79 | 0.764706 |
017800468989614d6314b3b85d6969e3e29ba84f | 7,665 | py | Python | keepass/read.py | zangman/crypto-play | fb9a122ce3907a3decab5d70481dd7bb291878c6 | [
"Apache-2.0"
] | null | null | null | keepass/read.py | zangman/crypto-play | fb9a122ce3907a3decab5d70481dd7bb291878c6 | [
"Apache-2.0"
] | 5 | 2020-02-15T16:48:26.000Z | 2021-12-13T20:32:53.000Z | keepass/read.py | zangman/crypto-play | fb9a122ce3907a3decab5d70481dd7bb291878c6 | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 30.058824 | 78 | 0.662361 |
7a931997af1f991db8a1e53ea73f10c22831ec62 | 8,971 | py | Python | mythril/analysis/modules/dependence_on_predictable_vars.py | yxliang01/mythril-classic | 2348c75a5816cb4201ba680b3e0a062d4e467dbc | [
"MIT"
] | null | null | null | mythril/analysis/modules/dependence_on_predictable_vars.py | yxliang01/mythril-classic | 2348c75a5816cb4201ba680b3e0a062d4e467dbc | [
"MIT"
] | null | null | null | mythril/analysis/modules/dependence_on_predictable_vars.py | yxliang01/mythril-classic | 2348c75a5816cb4201ba680b3e0a062d4e467dbc | [
"MIT"
] | 1 | 2021-09-06T03:14:58.000Z | 2021-09-06T03:14:58.000Z | """This module contains the detection code for predictable variable
dependence."""
import logging
import re
from mythril.analysis import solver
from mythril.analysis.call_helpers import get_call_from_state
from mythril.analysis.modules.base import DetectionModule
from mythril.analysis.ops import Call, VarType
from myt... | 39.871111 | 109 | 0.534946 |
aedb73234f18dc72a561b58a4f5d55a8cd9d33b3 | 984 | py | Python | private_test_scripts/avsimp.py | kapikantzari/MultiBench | 44ab6ea028682040a0c04de68239ce5cdf15123f | [
"MIT"
] | 148 | 2021-03-06T06:54:13.000Z | 2022-03-29T19:27:21.000Z | private_test_scripts/avsimp.py | kapikantzari/MultiBench | 44ab6ea028682040a0c04de68239ce5cdf15123f | [
"MIT"
] | 10 | 2021-07-19T22:57:49.000Z | 2022-02-04T03:12:29.000Z | private_test_scripts/avsimp.py | kapikantzari/MultiBench | 44ab6ea028682040a0c04de68239ce5cdf15123f | [
"MIT"
] | 18 | 2021-07-22T07:17:27.000Z | 2022-03-27T16:11:40.000Z | from unimodals.common_models import LeNet, MLP, Constant
from private_test_scripts.all_in_one import all_in_one_train, all_in_one_test
import torch
from torch import nn
from datasets.avmnist.get_data import get_dataloader
from fusions.common_fusions import Concat
from training_structures.Simple_Late_Fusion import train... | 25.894737 | 77 | 0.757114 |
6905e2bc5f951c116b6bd9710eb2fab8a99e344e | 305 | py | Python | manage.py | mani-mishra/nightreads | 2618975e50cb4da960992e2cf699a30664fac690 | [
"MIT"
] | 6 | 2016-05-22T18:41:45.000Z | 2019-07-10T04:39:54.000Z | manage.py | mani-mishra/nightreads | 2618975e50cb4da960992e2cf699a30664fac690 | [
"MIT"
] | 6 | 2016-05-23T13:14:48.000Z | 2016-05-25T14:48:37.000Z | manage.py | rusrushal13/nightreads | 2618975e50cb4da960992e2cf699a30664fac690 | [
"MIT"
] | 7 | 2016-05-22T19:13:45.000Z | 2019-07-14T12:31:08.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
# select settings according to environment.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "nightreads.settings.dev")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| 25.416667 | 78 | 0.770492 |
c3afa139ff9b780e624afa3be21ccc5f7fc7ce78 | 680 | py | Python | products/utills.py | sabbirhossain540/Web-Mall | 8c3c86f78eee221954922ef09630411a9f70d7b3 | [
"MIT"
] | 4 | 2020-09-23T05:58:02.000Z | 2021-12-29T15:02:02.000Z | products/utills.py | sabbirhossain540/Web-Mall | 8c3c86f78eee221954922ef09630411a9f70d7b3 | [
"MIT"
] | null | null | null | products/utills.py | sabbirhossain540/Web-Mall | 8c3c86f78eee221954922ef09630411a9f70d7b3 | [
"MIT"
] | null | null | null | import random
import string
from django.utils.text import slugify
#Slug Generator Function
def random_string_generator(size=10, chars=string.ascii_lowercase + string.digits):
return ''.join(random.choice(chars) for _ in range(size))
def unique_slug_generator(instance, new_slug=None):
if new_slug is not None:... | 30.909091 | 95 | 0.727941 |
ecab4f5e19c50eebd644ad5afc106f24fe69e513 | 422 | py | Python | src/app/tests.py | V4K11/docker-webapp-django | 9472bcfcb0766ba49c4d22c0c7c45c1ba454da1b | [
"MIT"
] | null | null | null | src/app/tests.py | V4K11/docker-webapp-django | 9472bcfcb0766ba49c4d22c0c7c45c1ba454da1b | [
"MIT"
] | 2 | 2021-08-03T18:55:17.000Z | 2021-08-30T10:14:44.000Z | src/app/tests.py | V4K11/docker-webapp-django | 9472bcfcb0766ba49c4d22c0c7c45c1ba454da1b | [
"MIT"
] | null | null | null | from django.test import TestCase
import hashlib
import urllib2
# Create your tests here.
# Downloading from insecure URL
response = urllib2.urlopen('http://www.example.com/')
html = response.read()
os.environ['DB_URL'] = 'psql://test:test@db:5432/test'.format(
user=os.environ['DB_USER'],
password=os.environ['DB_... | 24.823529 | 62 | 0.722749 |
81d95c685411779b1e9be7ef7d561dcb946ecf9c | 44,955 | py | Python | src/sage/combinat/ncsf_qsym/generic_basis_code.py | kcrisman/sage | 3472a854df051b57d1cb7e4934913f17f1fef820 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/ncsf_qsym/generic_basis_code.py | kcrisman/sage | 3472a854df051b57d1cb7e4934913f17f1fef820 | [
"BSL-1.0"
] | null | null | null | src/sage/combinat/ncsf_qsym/generic_basis_code.py | kcrisman/sage | 3472a854df051b57d1cb7e4934913f17f1fef820 | [
"BSL-1.0"
] | null | null | null | """
Generic code for bases
This is a collection of code that is shared by bases of noncommutative
symmetric functions and quasisymmetric functions.
AUTHORS:
- Jason Bandlow
- Franco Saliola
- Chris Berg
"""
#*****************************************************************************
# Copyright (C) 2010 Jaso... | 38.162139 | 143 | 0.523813 |
2f675bff1c75314dd3439acefb120764e2870d9f | 4,967 | py | Python | fslks/datasets/misinformation/question_sentence_manual_split.py | amoldwin/fslks-misinformation | 065ffd8c10a7d1cb7038f46875dbe8414a15752f | [
"MIT"
] | null | null | null | fslks/datasets/misinformation/question_sentence_manual_split.py | amoldwin/fslks-misinformation | 065ffd8c10a7d1cb7038f46875dbe8414a15752f | [
"MIT"
] | null | null | null | fslks/datasets/misinformation/question_sentence_manual_split.py | amoldwin/fslks-misinformation | 065ffd8c10a7d1cb7038f46875dbe8414a15752f | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright 2019 The TensorFlow Datasets 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 appl... | 41.049587 | 123 | 0.696396 |
4e64436d5cd389cd961b7f37a41aa4f46869bb66 | 19,525 | py | Python | pypeln/thread/api.py | sackh/pypeln | 4bbfb23d8fb7581e9c7511fdf4316e34b7a2a075 | [
"MIT"
] | 1 | 2020-07-22T18:19:21.000Z | 2020-07-22T18:19:21.000Z | pypeln/thread/api.py | sackh/pypeln | 4bbfb23d8fb7581e9c7511fdf4316e34b7a2a075 | [
"MIT"
] | null | null | null | pypeln/thread/api.py | sackh/pypeln | 4bbfb23d8fb7581e9c7511fdf4316e34b7a2a075 | [
"MIT"
] | null | null | null | """
The `thread` module lets you create pipelines using objects from python's [threading](https://docs.python.org/3/library/threading.html) module according to Pypeln's general [architecture](https://cgarciae.github.io/pypeln/advanced/#architecture). Use this module when you are in need to perform some synchronous IO o... | 34.618794 | 372 | 0.610755 |
640ef185eeed3efcde2b1bf603d3509327f85600 | 3,948 | py | Python | test/functional/feature_minchainwork.py | Nugetzrul3/dogecash | f09a4ed70e9ea6f5599c8a20fe255cbe24373cc1 | [
"MIT"
] | 52 | 2018-10-08T07:17:35.000Z | 2021-11-29T22:53:08.000Z | test/functional/feature_minchainwork.py | Nugetzrul3/dogecash | f09a4ed70e9ea6f5599c8a20fe255cbe24373cc1 | [
"MIT"
] | 50 | 2018-10-20T10:42:54.000Z | 2021-02-15T21:53:51.000Z | test/functional/feature_minchainwork.py | Nugetzrul3/dogecash | f09a4ed70e9ea6f5599c8a20fe255cbe24373cc1 | [
"MIT"
] | 53 | 2018-11-03T16:42:43.000Z | 2021-12-11T03:55:21.000Z | #!/usr/bin/env python3
# Copyright (c) 2017 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 logic for setting nMinimumChainWork on command line.
Nodes don't consider themselves out of "initial b... | 43.866667 | 108 | 0.702128 |
f310d0b092aeaf3f8fc25c3bb7e80a42318d2734 | 17,353 | py | Python | src/gbkGen.py | jcrosskey/unifam | 7ff125f6bb0b5093a60ffda779847ef537c02790 | [
"MIT"
] | null | null | null | src/gbkGen.py | jcrosskey/unifam | 7ff125f6bb0b5093a60ffda779847ef537c02790 | [
"MIT"
] | null | null | null | src/gbkGen.py | jcrosskey/unifam | 7ff125f6bb0b5093a60ffda779847ef537c02790 | [
"MIT"
] | null | null | null | '''
gbkGen.py
Generate Genbank file from other information
Created by JJ Chai on Wed Jan 21 14:19:17 EST 2015
Last modified 01/21/2015
Copyright (c) 2015 JJ Chai (ORNL). All rights reserved.
'''
# Import Python modules
import argparse
import sys, os, re
from datetime import datetime
import time
## Version
version_s... | 46.151596 | 200 | 0.540656 |
8879c9b4288d4558e519009b79cce545cd526ecd | 811 | py | Python | tests/conftest.py | KevinKGWong/themis-ml | 1cec42f327307e9abb9011c7fb14d005ebe93001 | [
"MIT"
] | 100 | 2017-09-21T21:01:28.000Z | 2022-03-23T05:01:14.000Z | tests/conftest.py | KevinKGWong/themis-ml | 1cec42f327307e9abb9011c7fb14d005ebe93001 | [
"MIT"
] | 21 | 2017-08-29T00:56:52.000Z | 2021-04-20T10:21:23.000Z | tests/conftest.py | KevinKGWong/themis-ml | 1cec42f327307e9abb9011c7fb14d005ebe93001 | [
"MIT"
] | 23 | 2017-10-15T22:34:56.000Z | 2022-03-10T18:09:20.000Z | """Fixtures for testing."""
import pytest
import numpy as np
SEED = 10
@pytest.fixture
def random_X_data():
return {
"bin": create_random_binary_X(),
"cont": create_random_continuous_X()}
def create_random_X(data_fixture):
return np.concatenate([
data_fixture["bin"], data_fixture["... | 19.309524 | 59 | 0.632552 |
aa2ad5710f300f9c50841ac3724b5c22c469e10c | 170 | py | Python | python/cuxfilter/assets/__init__.py | rnyak/cuxfilter | 626e45af3b8a0f2e37bc5cdbe6d2da618141f995 | [
"Apache-2.0"
] | 201 | 2018-12-21T18:32:40.000Z | 2022-03-22T11:50:29.000Z | python/cuxfilter/assets/__init__.py | rnyak/cuxfilter | 626e45af3b8a0f2e37bc5cdbe6d2da618141f995 | [
"Apache-2.0"
] | 258 | 2018-12-27T07:37:50.000Z | 2022-03-31T20:01:32.000Z | python/cuxfilter/assets/__init__.py | rnyak/cuxfilter | 626e45af3b8a0f2e37bc5cdbe6d2da618141f995 | [
"Apache-2.0"
] | 51 | 2019-01-10T19:03:09.000Z | 2022-03-08T01:37:11.000Z | from .geojson_mapper import geo_json_mapper
from .get_open_port import get_open_port
from .screengrab import screengrab
from .notebook_assets import load_notebook_assets
| 34 | 49 | 0.882353 |
4d67d1889ccf086a44d42e6edf95bedf10c465a8 | 54,073 | py | Python | tensorflow/python/eager/benchmarks_test.py | EricLi404/tensorflow | 23759800d89f7b5362c338d9a3fd72a6810c3e22 | [
"Apache-2.0"
] | 2 | 2020-09-08T15:04:52.000Z | 2020-09-08T15:04:54.000Z | tensorflow/python/eager/benchmarks_test.py | EricLi404/tensorflow | 23759800d89f7b5362c338d9a3fd72a6810c3e22 | [
"Apache-2.0"
] | 2 | 2021-08-25T16:16:36.000Z | 2022-02-10T04:51:33.000Z | tensorflow/python/eager/benchmarks_test.py | EricLi404/tensorflow | 23759800d89f7b5362c338d9a3fd72a6810c3e22 | [
"Apache-2.0"
] | 1 | 2021-03-21T20:58:19.000Z | 2021-03-21T20:58:19.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 35.295692 | 80 | 0.710817 |
c07856dc63602bc6ad3aec89b3ff700c173b6ec0 | 6,275 | py | Python | dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/tests/io/formats/test_css.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 18 | 2018-02-23T11:28:54.000Z | 2021-09-23T08:19:54.000Z | dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/tests/io/formats/test_css.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 2 | 2018-01-22T23:21:36.000Z | 2018-01-22T23:31:27.000Z | dev/Gems/CloudGemMetric/v1/AWS/common-code/Lib/pandas/tests/io/formats/test_css.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 12 | 2017-05-23T06:01:12.000Z | 2021-08-16T05:09:46.000Z | import pytest
from pandas.util import testing as tm
from pandas.io.formats.css import CSSResolver, CSSWarning
def assert_resolves(css, props, inherited=None):
resolve = CSSResolver()
actual = resolve(css, inherited=inherited)
assert props == actual
def assert_same_resolution(css1, css2, inherited=None)... | 33.55615 | 76 | 0.564622 |
59bcceadcaab19e547de876e0ad174b22515560a | 3,613 | py | Python | my_vim_files/python27/Lib/idlelib/Bindings.py | satsaeid/dotfiles | 401c3213b31dd941b44e553c6f0441187b01c19a | [
"MIT"
] | 81 | 2017-03-13T08:24:01.000Z | 2021-04-02T09:48:38.000Z | my_vim_files/python27/Lib/idlelib/Bindings.py | satsaeid/dotfiles | 401c3213b31dd941b44e553c6f0441187b01c19a | [
"MIT"
] | 6 | 2017-04-30T08:36:55.000Z | 2017-09-22T01:37:28.000Z | my_vim_files/python27/Lib/idlelib/Bindings.py | satsaeid/dotfiles | 401c3213b31dd941b44e553c6f0441187b01c19a | [
"MIT"
] | 41 | 2017-03-18T14:11:58.000Z | 2021-04-14T05:06:09.000Z | """Define the menu contents, hotkeys, and event bindings.
There is additional configuration information in the EditorWindow class (and
subclasses): the menus are created there based on the menu_specs (class)
variable, and menus not created are silently skipped in the code here. This
makes it possible, for exampl... | 32.258929 | 80 | 0.565181 |
62ef98ae1a5f1f8e9bce326a7ae4347c4d739d59 | 5,695 | py | Python | Python/Problem013.py | 766F6964/Euler-Problems | 375f9324857e5855b85f287c0b352f11a03b0059 | [
"MIT"
] | 2 | 2019-09-11T16:02:00.000Z | 2021-03-14T21:22:18.000Z | Python/Problem013.py | 766F6964/Euler-Problems | 375f9324857e5855b85f287c0b352f11a03b0059 | [
"MIT"
] | null | null | null | Python/Problem013.py | 766F6964/Euler-Problems | 375f9324857e5855b85f287c0b352f11a03b0059 | [
"MIT"
] | null | null | null | numbers = [
37107287533902102798797998220837590246510135740250,
46376937677490009712648124896970078050417018260538,
74324986199524741059474233309513058123726617309629,
91942213363574161572522430563301811072406154908250,
23067588207539346171171980310421047513778063246676,
892616706966236338201363... | 51.772727 | 55 | 0.88885 |
fec563e4e92da6a100f3dfdebc690f94c9ed6aa1 | 2,786 | py | Python | python/mystuff/ex26.py | DrGaud/Python | 6b9570b78ef5c073d91be17d6ea140f641eb1e30 | [
"MIT"
] | null | null | null | python/mystuff/ex26.py | DrGaud/Python | 6b9570b78ef5c073d91be17d6ea140f641eb1e30 | [
"MIT"
] | null | null | null | python/mystuff/ex26.py | DrGaud/Python | 6b9570b78ef5c073d91be17d6ea140f641eb1e30 | [
"MIT"
] | null | null | null |
def break_words(stuff):
"""This function will break up words for us."""
words = stuff.split(' ')
return words
def sort_words(words):
"""Sorts the words."""
return sorted(words)
def print_first_word(words):
"""Prints the first word after popping it off."""
word = words.pop(0)#Corrected wo... | 29.326316 | 179 | 0.722182 |
df79856a28dc8de0c5604213f57a334a39b4d680 | 6,579 | py | Python | glfwToolbox/advanced_shapes.py | ppizarror/glfw-toolbox | 49eefae8a1bad6b47e9aa6575fb3f4b5ac28be58 | [
"MIT"
] | 4 | 2019-05-04T01:53:12.000Z | 2020-05-10T09:02:58.000Z | glfwToolbox/advanced_shapes.py | ppizarror/glfw-toolbox | 49eefae8a1bad6b47e9aa6575fb3f4b5ac28be58 | [
"MIT"
] | null | null | null | glfwToolbox/advanced_shapes.py | ppizarror/glfw-toolbox | 49eefae8a1bad6b47e9aa6575fb3f4b5ac28be58 | [
"MIT"
] | null | null | null | # coding=utf-8
"""
ADVANCED SHAPES
Advenced shapes definition
GLFW-TOOLBOX
Toolbox for GLFW Graphic Library.
MIT License
Copyright (c) 2019-2020 Pablo Pizarro R.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the 'Software'), to deal
... | 28.982379 | 119 | 0.604803 |
7c68dbad5735b836dfe12102965fe729be76961e | 5,280 | py | Python | basenji/augmentation.py | AndyPJiang/basenji | 64e43570c8bece156b4ab926608014f489b7965e | [
"Apache-2.0"
] | 1 | 2020-05-22T20:53:37.000Z | 2020-05-22T20:53:37.000Z | basenji/augmentation.py | AndyPJiang/basenji | 64e43570c8bece156b4ab926608014f489b7965e | [
"Apache-2.0"
] | null | null | null | basenji/augmentation.py | AndyPJiang/basenji | 64e43570c8bece156b4ab926608014f489b7965e | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | 31.058824 | 91 | 0.695833 |
1ac7b76e8cf2ec472bb0c0fde7a1842bb59de2bd | 6,680 | py | Python | councilmatic/subscriptions/migrations/0011_auto__del_storedquery.py | isabella232/councilmatic | a6c560d9018062774310e3f7acc474c635934f17 | [
"BSD-Source-Code"
] | 17 | 2015-01-17T23:42:37.000Z | 2021-12-15T15:42:28.000Z | councilmatic/subscriptions/migrations/0011_auto__del_storedquery.py | codeforamerica/councilmatic | a6c560d9018062774310e3f7acc474c635934f17 | [
"BSD-Source-Code"
] | 2 | 2015-07-16T13:24:58.000Z | 2019-03-13T19:27:05.000Z | councilmatic/subscriptions/migrations/0011_auto__del_storedquery.py | isabella232/councilmatic | a6c560d9018062774310e3f7acc474c635934f17 | [
"BSD-Source-Code"
] | 6 | 2015-07-27T13:02:08.000Z | 2021-04-16T10:25:04.000Z | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'StoredQuery'
db.delete_table('subscriptions_storedquery')
def backwards(self, orm)... | 63.018868 | 182 | 0.567216 |
c591ea7225fe8a2182ec51316b127ce97f20fed3 | 6,963 | py | Python | clock-in.py | lzdnsb/ZJU-Clock-In | 3f12558e8083b694f3274a9633937ef7d0f8e355 | [
"MIT"
] | 1 | 2021-11-02T14:42:43.000Z | 2021-11-02T14:42:43.000Z | clock-in.py | lzdnsb/ZJU-Clock-In | 3f12558e8083b694f3274a9633937ef7d0f8e355 | [
"MIT"
] | null | null | null | clock-in.py | lzdnsb/ZJU-Clock-In | 3f12558e8083b694f3274a9633937ef7d0f8e355 | [
"MIT"
] | 1 | 2021-11-23T12:48:52.000Z | 2021-11-23T12:48:52.000Z | # -*- coding: utf-8 -*-
# 打卡脚修改自ZJU-nCov-Hitcarder的开源代码,感谢这位同学开源的代码
import requests
import json
import re
import datetime
import time
import sys
import time
import random
import ddddocr
class ClockIn(object):
"""Hit card class
Attributes:
username: (str) 浙大统一认证平台用户名(一般为学号)
password: (str) 浙大... | 30.946667 | 231 | 0.572454 |
d4a6ca6f7900b65180239e66371743e658e55ffd | 14,032 | py | Python | chainer/reporter.py | hikjik/chainer | 324a1bc1ea3edd63d225e4a87ed0a36af7fd712f | [
"MIT"
] | 1 | 2019-03-09T07:39:07.000Z | 2019-03-09T07:39:07.000Z | chainer/reporter.py | hitsgub/chainer | 20d4d70f5cdacc1f24f243443f5bebc2055c8f8e | [
"MIT"
] | null | null | null | chainer/reporter.py | hitsgub/chainer | 20d4d70f5cdacc1f24f243443f5bebc2055c8f8e | [
"MIT"
] | null | null | null | from __future__ import absolute_import
import collections
import contextlib
import copy
import json
import typing as tp # NOQA
import warnings
import numpy
import six
from chainer import backend
from chainer.backends import cuda
from chainer import configuration
from chainer import serializer as serializer_module
fr... | 33.89372 | 79 | 0.611816 |
4c1c7a0f4d29533f054d4d8100d753d2eaadfd85 | 282 | py | Python | v2sub/__init__.py | skydreamever/v2sub | 75f932bb1b59e3880feaf5dec9824676140b68b8 | [
"MIT"
] | 2 | 2019-08-21T00:39:55.000Z | 2019-12-06T23:03:33.000Z | v2sub/__init__.py | skydreamever/v2sub | 75f932bb1b59e3880feaf5dec9824676140b68b8 | [
"MIT"
] | null | null | null | v2sub/__init__.py | skydreamever/v2sub | 75f932bb1b59e3880feaf5dec9824676140b68b8 | [
"MIT"
] | 1 | 2020-10-09T00:05:06.000Z | 2020-10-09T00:05:06.000Z | import os
__version__ = '0.3'
# define all global variables in here
BASE_PATH = os.path.join(os.path.expandvars("$HOME"), ".v2sub")
SUBSCRIBE_CONFIG = os.path.join(BASE_PATH, 'subscribes.json')
SERVER_CONFIG = os.path.join(BASE_PATH, 'servers.json')
DEFAULT_SUBSCRIBE = "default"
| 28.2 | 63 | 0.748227 |
9f9d7c35128b54e4e189c6e070768488e78b4dfe | 2,607 | py | Python | player.py | JackBDu/image-mandarinizer | 608464a3807ab0d44c2567f7dd06f9470d5cdecd | [
"MIT"
] | 2 | 2017-03-10T16:34:41.000Z | 2017-03-11T04:34:06.000Z | player.py | JackBDu/image-mandarinizer | 608464a3807ab0d44c2567f7dd06f9470d5cdecd | [
"MIT"
] | null | null | null | player.py | JackBDu/image-mandarinizer | 608464a3807ab0d44c2567f7dd06f9470d5cdecd | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding=utf-8
import time # sleep
import sys # exit
import argparse # argparse
__author__ = 'Jack B. Du'
__copyright__ = 'Copyright (c) 2017, Jack B. Du'
__license__ = 'MIT'
__email__ = 'jackbdu@nyu.edu'
# parsing arguments
parser = argparse.ArgumentParser()
parser.add_argument('fil... | 29.625 | 97 | 0.641734 |
057d85311906b6044ef6c59fd4fd741787dd300d | 2,163 | py | Python | samples/cli/accelbyte_py_sdk_cli/platform/_public_get_qr_code.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | samples/cli/accelbyte_py_sdk_cli/platform/_public_get_qr_code.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | 1 | 2021-10-13T03:46:58.000Z | 2021-10-13T03:46:58.000Z | samples/cli/accelbyte_py_sdk_cli/platform/_public_get_qr_code.py | AccelByte/accelbyte-python-sdk | dcd311fad111c59da828278975340fb92e0f26f7 | [
"MIT"
] | null | null | null | # Copyright (c) 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
#
# Code generated. DO NOT EDIT!
# template_file: python-cli-command.j2
# justice-platform-service (4.10.0)
# pylint: disable=duplicate-co... | 30.464789 | 91 | 0.730929 |
ad68fa2e5b248fb5964dca53c303b9c20d117ef2 | 244 | py | Python | audiotsm/base/__init__.py | green-codes/IMGNE | ce1abc68e4c7122a2295657d18e5f4b46f8512d3 | [
"MIT"
] | 68 | 2017-09-28T08:07:37.000Z | 2021-11-08T11:30:01.000Z | audiotsm/base/__init__.py | green-codes/IMGNE | ce1abc68e4c7122a2295657d18e5f4b46f8512d3 | [
"MIT"
] | 27 | 2021-07-20T05:15:31.000Z | 2021-08-04T05:15:36.000Z | Example Code/Sonification Algorithm Diagrams/audiotsmWithDebugOutput/base/__init__.py | marek-cottingham/magSonify | 74edf69e6a89365d9a08935d58332bfcd8cfedc1 | [
"MIT"
] | 19 | 2017-09-29T09:45:54.000Z | 2021-11-16T00:26:35.000Z | # -*- coding: utf-8 -*-
"""
audiotsm.base
~~~~~~~~~~~~~
This module provides base classes for the implementation of time-scale
modification procedures.
"""
from .tsm import TSM
from .analysis_synthesis import AnalysisSynthesisTSM, Converter
| 18.769231 | 70 | 0.72541 |
a855b3f6e25b95cddc374ae0c12bbff23752f944 | 9,487 | py | Python | 3-atari/1-breakout/breakout_dqn.py | gudwls909/RL_book | 5a53ee963305d4480fd321ea690cdfb9aa6df299 | [
"MIT"
] | null | null | null | 3-atari/1-breakout/breakout_dqn.py | gudwls909/RL_book | 5a53ee963305d4480fd321ea690cdfb9aa6df299 | [
"MIT"
] | null | null | null | 3-atari/1-breakout/breakout_dqn.py | gudwls909/RL_book | 5a53ee963305d4480fd321ea690cdfb9aa6df299 | [
"MIT"
] | null | null | null | from keras.layers.convolutional import Conv2D
from keras.layers import Dense, Flatten
from keras.optimizers import RMSprop
from keras.models import Sequential
from skimage.transform import resize
from skimage.color import rgb2gray
from collections import deque
from keras import backend as K
import tensorflow as tf
impo... | 35.935606 | 79 | 0.574576 |
61b98ecf3583f4d14517b3d4bec9226e47d43155 | 4,233 | py | Python | timesketch/lib/analyzers/domain.py | blueteam0ps/timesketch | a6d845af78c0c5345b3d57a2483ac0a2d41dea12 | [
"Apache-2.0"
] | 1 | 2020-03-06T18:20:53.000Z | 2020-03-06T18:20:53.000Z | timesketch/lib/analyzers/domain.py | blueteam0ps/timesketch | a6d845af78c0c5345b3d57a2483ac0a2d41dea12 | [
"Apache-2.0"
] | null | null | null | timesketch/lib/analyzers/domain.py | blueteam0ps/timesketch | a6d845af78c0c5345b3d57a2483ac0a2d41dea12 | [
"Apache-2.0"
] | 1 | 2020-05-18T15:30:11.000Z | 2020-05-18T15:30:11.000Z | """Sketch analyzer plugin for domain."""
from __future__ import unicode_literals
import collections
import logging
import numpy
from timesketch.lib.analyzers import interface
from timesketch.lib.analyzers import manager
from timesketch.lib.analyzers import utils
class DomainSketchPlugin(interface.BaseSketchAnalyzer... | 32.068182 | 74 | 0.575715 |
cd2820295301ecb3d2bea17c67f508d019d315b9 | 3,916 | py | Python | bincrafters/autodetect.py | bfgroup/bincrafters-package-tools | 0d5e4c388c5b53b8442f4d198ccad1aa8e2ececf | [
"MIT"
] | null | null | null | bincrafters/autodetect.py | bfgroup/bincrafters-package-tools | 0d5e4c388c5b53b8442f4d198ccad1aa8e2ececf | [
"MIT"
] | null | null | null | bincrafters/autodetect.py | bfgroup/bincrafters-package-tools | 0d5e4c388c5b53b8442f4d198ccad1aa8e2ececf | [
"MIT"
] | null | null | null | import os
from bincrafters.build_shared import get_recipe_path, inspect_value_from_recipe, get_version
def _file_contains(file, word):
""" Read file and search for word
:param file: File path to be read
:param word: word to be found
:return: True if found. Otherwise, False
"""
if os.path.isfi... | 29.443609 | 167 | 0.702247 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.