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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
198248a422bf6fbc0333e9a60af21dbe154e7e8f | 1,030 | py | Python | src/runner.py | mina-moto/ml_experiment_management_demo | 1beab7a301efa71c06aecd918692ab435a9c823b | [
"MIT"
] | null | null | null | src/runner.py | mina-moto/ml_experiment_management_demo | 1beab7a301efa71c06aecd918692ab435a9c823b | [
"MIT"
] | null | null | null | src/runner.py | mina-moto/ml_experiment_management_demo | 1beab7a301efa71c06aecd918692ab435a9c823b | [
"MIT"
] | null | null | null | import os
import sys
import luigi
import mlflow
from dotenv import load_dotenv
from luigi.configuration import add_config_path, get_config
from tasks.prediction import Prediction
from tasks.preprocessor import Preprocessor
from tasks.trainer import Trainer
def main():
load_dotenv()
sys.path.append(f"{os.get... | 31.212121 | 74 | 0.746602 |
a97014acf4b0ec7702804f4ffed8210fe1a053a2 | 7,734 | py | Python | kaolin/graphics/softras/functional/load_obj.py | Kh4L/kaolin | 83002fedc67e1c9112a8f834ffb4f8a890e6042a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kaolin/graphics/softras/functional/load_obj.py | Kh4L/kaolin | 83002fedc67e1c9112a8f834ffb4f8a890e6042a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | kaolin/graphics/softras/functional/load_obj.py | Kh4L/kaolin | 83002fedc67e1c9112a8f834ffb4f8a890e6042a | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019, NVIDIA 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 by applic... | 37.362319 | 107 | 0.600595 |
0b751d865cf59068c6ea7ff56504cbc89c593274 | 21,155 | py | Python | Lib/test/test_deque.py | weimingtom/wpython | d51bfe48ec4c0ade1514f1351dff700c63ca112a | [
"PSF-2.0"
] | 5 | 2020-06-30T05:06:40.000Z | 2021-05-24T08:38:33.000Z | Lib/test/test_deque.py | weimingtom/wpython | d51bfe48ec4c0ade1514f1351dff700c63ca112a | [
"PSF-2.0"
] | null | null | null | Lib/test/test_deque.py | weimingtom/wpython | d51bfe48ec4c0ade1514f1351dff700c63ca112a | [
"PSF-2.0"
] | 2 | 2015-10-01T18:28:20.000Z | 2020-09-09T16:25:27.000Z | from collections import deque
import unittest
from test import test_support, seq_tests
from weakref import proxy
import copy
import cPickle as pickle
import random
import os
BIG = 100000
def fail():
raise SyntaxError
yield 1
class BadCmp:
def __eq__(self, other):
raise RuntimeError
class MutateC... | 30.703919 | 82 | 0.517561 |
221dc55ad691c686ca7fa4c2929d3495b7d823cf | 718 | py | Python | crashing_apk/nmeter/main.py | jb1123/kivy-buildozer-bug | cab4be8ff2784e4f5eff1a03497b263118507de9 | [
"MIT"
] | null | null | null | crashing_apk/nmeter/main.py | jb1123/kivy-buildozer-bug | cab4be8ff2784e4f5eff1a03497b263118507de9 | [
"MIT"
] | null | null | null | crashing_apk/nmeter/main.py | jb1123/kivy-buildozer-bug | cab4be8ff2784e4f5eff1a03497b263118507de9 | [
"MIT"
] | null | null | null | import kivy
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.button import Button
from kivy.uix.screenmanager import ScreenManager, Screen
from meterlist import MeterList
from picturecrop import PictureCrop
from readmeter import ReadMeter
class ImageButton(Button):
"""
To be converted to ... | 22.4375 | 56 | 0.68663 |
3e25753c48f17f21cba8947619fbfc275a2fc994 | 7,445 | py | Python | src/south/management/commands/syncdb.py | uandco/sentry | 5b8d45cb71c6617dac8e64265848623fbfce9c99 | [
"BSD-3-Clause"
] | 2 | 2019-03-04T12:45:54.000Z | 2019-03-04T12:45:55.000Z | src/south/management/commands/syncdb.py | uandco/sentry | 5b8d45cb71c6617dac8e64265848623fbfce9c99 | [
"BSD-3-Clause"
] | 196 | 2019-06-10T08:34:10.000Z | 2022-02-22T01:26:13.000Z | src/south/management/commands/syncdb.py | uandco/sentry | 5b8d45cb71c6617dac8e64265848623fbfce9c99 | [
"BSD-3-Clause"
] | 1 | 2017-02-09T06:36:57.000Z | 2017-02-09T06:36:57.000Z | """
Overridden syncdb command
"""
from __future__ import print_function
import sys
from importlib import import_module
from optparse import make_option
from django.core.management.base import NoArgsCommand, BaseCommand, CommandError
from django.core.management.color import no_style
from django.utils.datastructures ... | 41.825843 | 150 | 0.617461 |
53fd70f3dae1c56672559a1370dc0a38e5f5fc10 | 4,658 | py | Python | build/android/pylib/host_driven/test_runner.py | nagineni/chromium-crosswalk | 5725642f1c67d0f97e8613ec1c3e8107ab53fdf8 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 19 | 2015-02-19T21:08:27.000Z | 2021-11-19T07:16:49.000Z | build/android/pylib/host_driven/test_runner.py | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 8 | 2015-08-31T06:39:59.000Z | 2021-12-04T14:53:28.000Z | build/android/pylib/host_driven/test_runner.py | j4ckfrost/android_external_chromium_org | a1a3dad8b08d1fcf6b6b36c267158ed63217c780 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 10 | 2015-08-28T16:44:03.000Z | 2019-07-17T17:37:34.000Z | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Runs host-driven tests on a particular device."""
import logging
import sys
import time
import traceback
from pylib.base import base_test_result
from py... | 34.503704 | 80 | 0.682267 |
b4e5718c7fc9d3c83fc0f9a1b250f6ab44baeaa0 | 10,160 | py | Python | mtaproto/nyct_subway_pb2.py | vicemax/MTAPI_01 | 6eb1d74af4e22ede9aa9f8ab1f6dc309c6bbff75 | [
"MIT"
] | 39 | 2015-02-25T17:36:33.000Z | 2021-07-17T17:44:32.000Z | nyct_subway_pb2.py | nmercer/Ask-The-L-Train-Alexa-Backend | 404f0d46577eef7c51868f4fb484d7dbc2c16a54 | [
"MIT"
] | 3 | 2016-09-16T19:57:06.000Z | 2018-01-09T16:09:49.000Z | nyct_subway_pb2.py | nmercer/Ask-The-L-Train-Alexa-Backend | 404f0d46577eef7c51868f4fb484d7dbc2c16a54 | [
"MIT"
] | 8 | 2015-11-23T01:41:40.000Z | 2022-02-20T11:28:03.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: nyct-subway.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(import... | 38.339623 | 1,200 | 0.770276 |
0844beee36a44c9639c1f3cc51b0f74a392e0cc3 | 916 | py | Python | accounts/constants.py | ygrass/handsome | 0ea016745d92054bd4df8d934c1b67fd61b6f845 | [
"Unlicense"
] | null | null | null | accounts/constants.py | ygrass/handsome | 0ea016745d92054bd4df8d934c1b67fd61b6f845 | [
"Unlicense"
] | null | null | null | accounts/constants.py | ygrass/handsome | 0ea016745d92054bd4df8d934c1b67fd61b6f845 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
# styles
BUSINESS = 'business'
CASUAL = 'casual'
ENGLAND = 'England'
CASUAL_BUSINESS = 'casual_business'
NO_IDEA = 'no_idea'
# age group
AGE_GROUP_1 = '<23'
AGE_GROUP_2 = '23-27'
AGE_GROUP_3 = '28-33'
AGE_GROUP_4 = '>33'
# clothing sizes
CLOTHING_S = 'S'
CLOTHING_M = 'M'
CLOTHING_L = 'L'
CLOT... | 15.016393 | 35 | 0.65393 |
8648c8de19beb0daabdf02370314d2976aed2fa9 | 765 | py | Python | myapp/blueprints/api/todo.py | fumiya-kubota/sanic-gino-boilerplate | a2c17bdf6f733b0241f8de79c89aaf676e22e831 | [
"Apache-2.0"
] | 2 | 2020-04-01T16:13:58.000Z | 2020-06-05T01:41:08.000Z | myapp/blueprints/api/todo.py | fumiya-kubota/sanic-gino-boilerplate | a2c17bdf6f733b0241f8de79c89aaf676e22e831 | [
"Apache-2.0"
] | null | null | null | myapp/blueprints/api/todo.py | fumiya-kubota/sanic-gino-boilerplate | a2c17bdf6f733b0241f8de79c89aaf676e22e831 | [
"Apache-2.0"
] | null | null | null | from sanic import Blueprint, response
from sanic.views import HTTPMethodView
from myapp.models import Todo
todo = Blueprint('todo_api', url_prefix='/todo')
class TodoView(HTTPMethodView):
async def get(self, request):
todos = await Todo.query.gino.all()
return response.json({'todo_list': [todo.to... | 29.423077 | 79 | 0.673203 |
c718e959cad9638df9452f8837859c899eb76b2e | 37,898 | py | Python | models/htsat.py | lucasbr15/Zero_Shot_Audio_Source_Separation | b4c1f48df8143417c8a0d2c65a8e5fb16ff809a0 | [
"MIT"
] | 66 | 2021-12-25T17:09:21.000Z | 2022-03-31T08:15:51.000Z | models/htsat.py | lucasbr15/Zero_Shot_Audio_Source_Separation | b4c1f48df8143417c8a0d2c65a8e5fb16ff809a0 | [
"MIT"
] | 13 | 2022-01-06T04:12:37.000Z | 2022-03-20T23:07:12.000Z | models/htsat.py | lucasbr15/Zero_Shot_Audio_Source_Separation | b4c1f48df8143417c8a0d2c65a8e5fb16ff809a0 | [
"MIT"
] | 8 | 2022-02-02T17:42:38.000Z | 2022-03-27T09:12:06.000Z | # Ke Chen
# knutchen@ucsd.edu
# Zero-shot Audio Source Separation via Query-based Learning from Weakly-labeled Data
# from "HTS-AT: A HIERARCHICAL TOKEN-SEMANTIC AUDIO TRANSFORMER FOR SOUND CLASSIFICATION AND DETECTION"
# ST-SED / HTS-AT model for sound event detection
# below codes are based and referred from https:/... | 45.224344 | 152 | 0.57916 |
47298b0212e4a54cde6c6d2feb7cc17ea959c3c4 | 273 | py | Python | smellCatalog/SmellDefinition.py | tushartushar/smells | e9b5223ec030f2701dd282d4f715d0ca38df227d | [
"MIT"
] | 17 | 2017-09-04T18:10:14.000Z | 2022-03-29T15:03:42.000Z | smellCatalog/SmellDefinition.py | tushartushar/smells | e9b5223ec030f2701dd282d4f715d0ca38df227d | [
"MIT"
] | 1 | 2020-08-13T17:51:19.000Z | 2020-12-02T03:45:52.000Z | smellCatalog/SmellDefinition.py | tushartushar/smells | e9b5223ec030f2701dd282d4f715d0ca38df227d | [
"MIT"
] | 5 | 2017-06-02T17:38:32.000Z | 2021-02-03T22:20:55.000Z | class SmellDefinition(object):
def __init__(self):
self.id = None
self.definition = ""
self.ref = ""
self.ref_obj = None
def __repr__(self):
return repr((self.id, self.definition, self.ref,
self.ref_obj)) | 27.3 | 56 | 0.549451 |
c18043bb07a4162bbf4e70fadb3e303263a33618 | 466 | py | Python | ImageCollection/filtering_by_band_names.py | liuxb555/earthengine-py-examples | cff5d154b15a17d6a241e3c003b7fc9a2c5903f3 | [
"MIT"
] | 75 | 2020-06-09T14:40:11.000Z | 2022-03-07T08:38:10.000Z | ImageCollection/filtering_by_band_names.py | gentaprekazi/earthengine-py-examples | 76ae8e071a71b343f5e464077afa5b0ed2f9314c | [
"MIT"
] | 1 | 2022-03-15T02:23:45.000Z | 2022-03-15T02:23:45.000Z | ImageCollection/filtering_by_band_names.py | gentaprekazi/earthengine-py-examples | 76ae8e071a71b343f5e464077afa5b0ed2f9314c | [
"MIT"
] | 35 | 2020-06-12T23:23:48.000Z | 2021-11-15T17:34:50.000Z |
import ee
import geemap
# Create a map centered at (lat, lon).
Map = geemap.Map(center=[40, -100], zoom=4)
roi = ee.Geometry.Point([-99.2182, 46.7824])
collection = ee.ImageCollection('USDA/NAIP/DOQQ') \
.filterBounds(roi) \
.filter(ee.Filter.listContains("system:band_names", "N"))
print(collection.size().... | 22.190476 | 61 | 0.671674 |
484fb3884690fe2170f75e4b662d8cf400c15d7f | 12,560 | py | Python | conda_smithy/anaconda_token_rotation.py | fhoehle/conda-smithy | 8ce36bc7ec103353b1755145cc4284c8e57c5711 | [
"BSD-3-Clause"
] | null | null | null | conda_smithy/anaconda_token_rotation.py | fhoehle/conda-smithy | 8ce36bc7ec103353b1755145cc4284c8e57c5711 | [
"BSD-3-Clause"
] | null | null | null | conda_smithy/anaconda_token_rotation.py | fhoehle/conda-smithy | 8ce36bc7ec103353b1755145cc4284c8e57c5711 | [
"BSD-3-Clause"
] | null | null | null | """This module updates/rotates anaconda/binstar tokens.
The correct way to use this module is to call its functions via the command
line utility. The relevant one is
conda-smithy update-anaconda-token
Note that if you are using appveyor, you will need to push the changes to the
conda-forge.yml in your feedstock ... | 31.959288 | 86 | 0.527866 |
22dd3873bbfe3b3e16743b27f6420b779db2b502 | 7,816 | py | Python | senteval/sts.py | dumpmemory/BERT-whitening-pytorch | b5cfbd606bd19fc3b3adf9e074dc0bfd830ef597 | [
"MIT"
] | 171 | 2021-03-31T16:01:26.000Z | 2022-03-29T08:12:24.000Z | senteval/sts.py | dumpmemory/BERT-whitening-pytorch | b5cfbd606bd19fc3b3adf9e074dc0bfd830ef597 | [
"MIT"
] | 9 | 2021-04-15T03:52:06.000Z | 2022-01-19T09:54:27.000Z | senteval/sts.py | dumpmemory/BERT-whitening-pytorch | b5cfbd606bd19fc3b3adf9e074dc0bfd830ef597 | [
"MIT"
] | 25 | 2021-04-11T12:20:40.000Z | 2022-03-10T09:34:45.000Z | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
'''
STS-{2012,2013,2014,2015,2016} (unsupervised) and
STS-benchmark (supervised) tasks
'''
from __future__ import absolute_imp... | 40.28866 | 104 | 0.554632 |
6f30b0b4881bd8ef7a7ccad32ea832c2b2658d1a | 708 | py | Python | ansible/roles/db/molecule/default/tests/test_default.py | Otus-DevOps-2018-02/Dev0psPadawan_infra | 2f1b5b04b2f925b31248542b99c4988ee4fd5259 | [
"MIT"
] | null | null | null | ansible/roles/db/molecule/default/tests/test_default.py | Otus-DevOps-2018-02/Dev0psPadawan_infra | 2f1b5b04b2f925b31248542b99c4988ee4fd5259 | [
"MIT"
] | 3 | 2018-04-02T21:52:35.000Z | 2018-04-19T13:06:28.000Z | ansible/roles/db/molecule/default/tests/test_default.py | Otus-DevOps-2018-02/Dev0psPadawan_infra | 2f1b5b04b2f925b31248542b99c4988ee4fd5259 | [
"MIT"
] | null | null | null | import os
import testinfra.utils.ansible_runner
testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
# check if MongoDB is enabled and running
def test_mongo_running_and_enabled(host):
mongo = host.service("mongod")
assert mongo.is_runnin... | 29.5 | 63 | 0.758475 |
0b902cbea7ad04c3fb0a64ce181b964342c88e53 | 2,213 | py | Python | ddtrace/contrib/logging/patch.py | uniq10/dd-trace-py | ca9ce1fe552cf03c2828bcd160e537336aa275d5 | [
"Apache-2.0",
"BSD-3-Clause"
] | 1 | 2020-10-17T14:55:46.000Z | 2020-10-17T14:55:46.000Z | ddtrace/contrib/logging/patch.py | uniq10/dd-trace-py | ca9ce1fe552cf03c2828bcd160e537336aa275d5 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | ddtrace/contrib/logging/patch.py | uniq10/dd-trace-py | ca9ce1fe552cf03c2828bcd160e537336aa275d5 | [
"Apache-2.0",
"BSD-3-Clause"
] | null | null | null | import logging
import ddtrace
from ...utils.wrappers import unwrap as _u
from ...vendor.wrapt import wrap_function_wrapper as _w
RECORD_ATTR_TRACE_ID = "dd.trace_id"
RECORD_ATTR_SPAN_ID = "dd.span_id"
RECORD_ATTR_ENV = "dd.env"
RECORD_ATTR_VERSION = "dd.version"
RECORD_ATTR_SERVICE = "dd.service"
RECORD_ATTR_VALUE_Z... | 30.315068 | 97 | 0.720741 |
390885a396cc24c2a525cb67cb0479c3b1c2b538 | 10,148 | py | Python | tests/unit/core/sdk/test_dec.py | bongtrop/jigu | 448bce8ce693f3f7c530bea0f2f268e22100937a | [
"MIT"
] | 14 | 2020-03-03T06:46:39.000Z | 2021-05-01T15:29:35.000Z | tests/unit/core/sdk/test_dec.py | bongtrop/jigu | 448bce8ce693f3f7c530bea0f2f268e22100937a | [
"MIT"
] | 9 | 2020-03-09T06:36:30.000Z | 2021-02-15T14:40:48.000Z | tests/unit/core/sdk/test_dec.py | bongtrop/jigu | 448bce8ce693f3f7c530bea0f2f268e22100937a | [
"MIT"
] | 5 | 2020-05-30T22:38:34.000Z | 2021-02-11T00:56:20.000Z | from decimal import Decimal
import pytest
from hypothesis import HealthCheck, assume, given, settings
from hypothesis import strategies as st
from hypothesis_jsonschema import from_schema
from jigu.core import Dec
from testtools import assert_serdes_consistent, assert_serdes_exact
dec_input = st.one_of(
st.integ... | 32.525641 | 117 | 0.546512 |
11aee4e34c1dfe102d44c53bbd24b8408ada8feb | 17,977 | py | Python | tutorials/bios-boot-tutorial/bios-boot-tutorial.py | Lucklyric/eos | 41cf36ad651f318c8c0a9c51bb4cc1592d81996f | [
"MIT"
] | 1 | 2018-12-10T12:13:42.000Z | 2018-12-10T12:13:42.000Z | tutorials/bios-boot-tutorial/bios-boot-tutorial.py | Lucklyric/eos | 41cf36ad651f318c8c0a9c51bb4cc1592d81996f | [
"MIT"
] | 7 | 2018-09-28T16:48:30.000Z | 2018-10-24T04:14:10.000Z | tutorials/bios-boot-tutorial/bios-boot-tutorial.py | Lucklyric/eos | 41cf36ad651f318c8c0a9c51bb4cc1592d81996f | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import json
import numpy
import os
import random
import re
import subprocess
import sys
import time
args = None
logFile = None
unlockTimeout = 999999999
fastUnstakeSystem = './fast.refund/eosio.system/eosio.system.wasm'
systemAccounts = [
'eosio.bpay',
'eosio.msig',
... | 43.846341 | 213 | 0.61078 |
e11b989ca9c73b436bcba9b9f68c5bfca5530042 | 10,690 | py | Python | jd_qjd.py | ngrok-add/jd | 11824dc3847be608b26eb447bd0a4fc94e6042d1 | [
"Apache-2.0"
] | null | null | null | jd_qjd.py | ngrok-add/jd | 11824dc3847be608b26eb447bd0a4fc94e6042d1 | [
"Apache-2.0"
] | null | null | null | jd_qjd.py | ngrok-add/jd | 11824dc3847be608b26eb447bd0a4fc94e6042d1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*
'''
项目名称: JD-Script / jd_qjd
Author: Curtin
功能:全民抢京豆(7.2-7.15):https://h5.m.jd.com/rn/3MQXMdRUTeat9xqBSZDSCCAE9Eqz/index.html?has_native=0
满160豆需要20人助力,每个用户目前只能助力2次不同的用户。
Date: 2021/7/3 上午10:02
TG交流 https://t.me/topstyle996
TG频道 https://t.me/TopStyle2021
'''
#ck 优先读取【J... | 42.086614 | 490 | 0.564453 |
f2257ce7a8552c93b0164a9f29b077d65f3d05f9 | 1,311 | py | Python | src/telegram_app/bot/views.py | Denkneb/telegram_app | 238e8aca1a29187d24cf8dd5ed92fac8b8ff5131 | [
"MIT"
] | null | null | null | src/telegram_app/bot/views.py | Denkneb/telegram_app | 238e8aca1a29187d24cf8dd5ed92fac8b8ff5131 | [
"MIT"
] | null | null | null | src/telegram_app/bot/views.py | Denkneb/telegram_app | 238e8aca1a29187d24cf8dd5ed92fac8b8ff5131 | [
"MIT"
] | null | null | null | import logging
from json import JSONDecodeError
import requests
from django.conf import settings
logger = logging.getLogger(__name__)
def web_hook():
pass
def set_web_hook():
if settings.LOCALTUNNEL_URL != '':
pass
def delete_user():
pass
def user_list():
pass
def edit_user():
pa... | 16.594937 | 61 | 0.595728 |
fc406012aee669077eea9feb7cd00c08a6c260f5 | 1,944 | py | Python | tests/client/test_make_rpc.py | alexiri/deepstream.io-client-python | 0d86938ca1399cc3eece3635eae51fb5edc0551d | [
"MIT"
] | 6 | 2018-02-25T04:49:20.000Z | 2020-03-17T15:51:49.000Z | tests/client/test_make_rpc.py | alexiri/deepstream.io-client-python | 0d86938ca1399cc3eece3635eae51fb5edc0551d | [
"MIT"
] | 7 | 2017-12-05T03:08:57.000Z | 2020-05-17T17:23:39.000Z | tests/client/test_make_rpc.py | alexiri/deepstream.io-client-python | 0d86938ca1399cc3eece3635eae51fb5edc0551d | [
"MIT"
] | 3 | 2018-04-02T16:21:24.000Z | 2020-03-17T16:17:21.000Z | from deepstreamio_client import Client
URL = "http://url.com/"
REQUEST = {
'topic': 'rpc',
'action': 'make',
'rpcName': 'rpc-name',
'data': None
}
REQUEST_WITH_DATA = {
'topic': 'rpc',
'action': 'make',
'rpcName': 'rpc-name',
'data': {"1": 1}
}
def test_not_batched(mocker):
client... | 24 | 78 | 0.597222 |
8b556525ab1d0968675a6b68c1b8ee0fd09f05af | 2,503 | py | Python | website/yoga_detection/process_label.py | aman-17/smart_dietician | 43eb2abe36761d46a2e773bd122067eb36659097 | [
"Apache-2.0"
] | 4 | 2021-11-27T06:51:48.000Z | 2022-01-30T15:49:48.000Z | website/yoga_detection/process_label.py | aman-17/smart_dietician | 43eb2abe36761d46a2e773bd122067eb36659097 | [
"Apache-2.0"
] | null | null | null | website/yoga_detection/process_label.py | aman-17/smart_dietician | 43eb2abe36761d46a2e773bd122067eb36659097 | [
"Apache-2.0"
] | 4 | 2021-11-27T07:17:29.000Z | 2022-02-15T09:21:48.000Z | import numpy as np
# print("""
# 1. arms
# 2. front_knee_obtuse
# 3. front_knee_acute
# 4. head_sideways
# 5. hips_angled
# 6. narrow_step
# 7. shoulders_up
# 8. torso_forward
# 9. torso_backward
# 10. wide_step
# """)
# labels = [1, 1, 1, 1, 0, 0 ,0 , 0, 0]
class ProcessLabel:
@classmethod
def to_text(cls... | 35.253521 | 79 | 0.551738 |
ea9fb993637db561d92a02fa603fea3532ab7864 | 189 | py | Python | tools_programs/pytorchToTensorflow.py | NicolasISEN/Facial_landmark_emotion_detection | c7b8d7b0ea91a3496e3611bc1aab221709added4 | [
"MIT"
] | null | null | null | tools_programs/pytorchToTensorflow.py | NicolasISEN/Facial_landmark_emotion_detection | c7b8d7b0ea91a3496e3611bc1aab221709added4 | [
"MIT"
] | null | null | null | tools_programs/pytorchToTensorflow.py | NicolasISEN/Facial_landmark_emotion_detection | c7b8d7b0ea91a3496e3611bc1aab221709added4 | [
"MIT"
] | null | null | null | import onnx
from keras.models import load_model
pytorch_model = '/path/to/pytorch/model'
keras_output = '/path/to/converted/keras/model.hdf5'
onnx.convert(pytorch_model, keras_output) | 31.5 | 53 | 0.78836 |
48f21c9e5b9c71ff080caf8d76005dc2d6c52628 | 421 | py | Python | Projects/Scripting/Python/PersonalDBMS/Workspace/main.py | Thanatisia/SharedSpace | 8c410c05a46a6d7505b3217831096759d142b3d4 | [
"curl"
] | 2 | 2021-09-09T15:25:24.000Z | 2022-03-06T03:03:30.000Z | Projects/Scripting/Python/PersonalDBMS/Workspace/main.py | Thanatisia/SharedSpace | 8c410c05a46a6d7505b3217831096759d142b3d4 | [
"curl"
] | null | null | null | Projects/Scripting/Python/PersonalDBMS/Workspace/main.py | Thanatisia/SharedSpace | 8c410c05a46a6d7505b3217831096759d142b3d4 | [
"curl"
] | null | null | null | """
Project LIFESTYLE main program for [PersonalDBMS]
- Contains the startup and validation logic for the program
"""
# In-built Modules
import os
import sys
# External Modules
import modules.programs.personal_db as personalDB
def main():
print("Hello World")
personal_db = personalDB.PersonalDBMS()
pers... | 20.047619 | 59 | 0.736342 |
e90bf927c03a4e3a74604fd6c60f39111bd7e489 | 3,830 | py | Python | exl_env/lib/python3.6/site-packages/nbconvert/exporters/html.py | verma-varsha/fraud-detection | 13c5b0c274dfa2b68e82a4ee317e09223b5b663f | [
"MIT"
] | 445 | 2019-01-26T13:50:26.000Z | 2022-03-18T05:17:38.000Z | Library/lib/python3.7/site-packages/nbconvert/exporters/html.py | gengyong/Carnets | 8930a14f69360d4db115a85ff9e0f6efa80fa2e7 | [
"BSD-3-Clause"
] | 242 | 2019-01-29T15:48:27.000Z | 2022-03-31T22:09:21.000Z | Library/lib/python3.7/site-packages/nbconvert/exporters/html.py | gengyong/Carnets | 8930a14f69360d4db115a85ff9e0f6efa80fa2e7 | [
"BSD-3-Clause"
] | 31 | 2019-03-10T09:51:27.000Z | 2022-02-14T23:11:12.000Z | # -*- coding: utf-8 -*-
"""HTML Exporter class"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
import os
from traitlets import default, Unicode
from traitlets.config import Config
from nbconvert.filters.highlight import Highlight2HTML
from nbconvert.filters.ma... | 38.686869 | 110 | 0.571018 |
dc27b66c5e16cd75d3bf7d409fe6f5c278a1c3cd | 16,294 | py | Python | economic_dispatch/simulation/tests/test_flex_component.py | simcesplatform/economic-dispatch | 83bda518eea9ed140fa0a8f0ee6964ff0a23746e | [
"MIT"
] | null | null | null | economic_dispatch/simulation/tests/test_flex_component.py | simcesplatform/economic-dispatch | 83bda518eea9ed140fa0a8f0ee6964ff0a23746e | [
"MIT"
] | null | null | null | economic_dispatch/simulation/tests/test_flex_component.py | simcesplatform/economic-dispatch | 83bda518eea9ed140fa0a8f0ee6964ff0a23746e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Tests for the EconomicDispatch component with flexibility requesst.
"""
import asyncio
from typing import List, Tuple, cast
import os
import json
import unittest
from tools.clients import RabbitmqClient
from tools.components import AbstractSimulationComponent, SIMULATION_START_MESSAGE_FIL... | 50.135385 | 160 | 0.728857 |
724ea88898ad468aa9f8c80e7974d45d0e08e8b0 | 20,628 | py | Python | scripts/generate_modules.py | JieX19/fortios-ansible-generator | b7b42542a6c8d20e93b884fe89fc112c4161c8a4 | [
"Apache-2.0"
] | null | null | null | scripts/generate_modules.py | JieX19/fortios-ansible-generator | b7b42542a6c8d20e93b884fe89fc112c4161c8a4 | [
"Apache-2.0"
] | null | null | null | scripts/generate_modules.py | JieX19/fortios-ansible-generator | b7b42542a6c8d20e93b884fe89fc112c4161c8a4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
from jinja2 import Template, Environment, FileSystemLoader
import json
import autopep8
import os
import re
import sys
def replaceSpecialChars(str):
return str.replace('-', '_').replace('.', '_').replace('+', 'plus')
def getModuleName(path, name):
return replaceSpecialChars(path.lower()) + "... | 43.796178 | 215 | 0.637628 |
e700e0336f1f546e6451cbe1a4ef4cc76f3ffcf3 | 10,423 | py | Python | src/sensai/util/datastruct.py | jambit/sensAI | cd162006d16c43458e5ab0d98fae5dae58646442 | [
"MIT"
] | 10 | 2020-02-19T09:16:54.000Z | 2022-02-04T16:19:33.000Z | src/sensai/util/datastruct.py | jambit/sensAI | cd162006d16c43458e5ab0d98fae5dae58646442 | [
"MIT"
] | 47 | 2020-03-11T16:26:51.000Z | 2022-02-04T15:29:40.000Z | src/sensai/util/datastruct.py | jambit/sensAI | cd162006d16c43458e5ab0d98fae5dae58646442 | [
"MIT"
] | 5 | 2020-03-12T21:33:22.000Z | 2020-12-21T14:43:04.000Z | from enum import Enum
from typing import Sequence, Optional, TypeVar, Generic, Tuple, Dict, Any
from . import sequences as array_util
from .string import ToStringMixin, dictString
TKey = TypeVar("TKey")
TValue = TypeVar("TValue")
class Trivalent(Enum):
TRUE = "true"
FALSE = "false"
UNKNOWN = "unknown"
... | 37.492806 | 126 | 0.655378 |
120494d8ed5eb5a87ec24d7828522eb5f9242741 | 2,208 | py | Python | eventmanager.py | michaelmontelli/chess | a08daabeb6a096b2b3cc833467a233ace3730154 | [
"Unlicense"
] | null | null | null | eventmanager.py | michaelmontelli/chess | a08daabeb6a096b2b3cc833467a233ace3730154 | [
"Unlicense"
] | 1 | 2021-11-26T16:37:31.000Z | 2021-11-26T17:27:15.000Z | eventmanager.py | michaelmontelli/chess | a08daabeb6a096b2b3cc833467a233ace3730154 | [
"Unlicense"
] | null | null | null | class Event:
"""
A superclass for any events that might be generated by an
object and sent to the EventManager.
"""
def __init__(self):
self.name = "Generic event"
def __str__(self):
return self.name
class QuitEvent(Event):
"""
Quit event.
"""
def __init__(se... | 23 | 80 | 0.612772 |
7c3daae90b7e058557297466504224f01ae396a6 | 25,484 | py | Python | sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_dataset_operations.py | GoWang/azure-sdk-for-python | f241e3734a50953c2a37c10d2d84eb4c013b3ba0 | [
"MIT"
] | 2 | 2021-03-24T06:26:11.000Z | 2021-04-18T15:55:59.000Z | sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_dataset_operations.py | GoWang/azure-sdk-for-python | f241e3734a50953c2a37c10d2d84eb4c013b3ba0 | [
"MIT"
] | 1 | 2021-06-23T14:50:11.000Z | 2021-06-24T12:26:05.000Z | sdk/synapse/azure-synapse-artifacts/azure/synapse/artifacts/operations/_dataset_operations.py | GoWang/azure-sdk-for-python | f241e3734a50953c2a37c10d2d84eb4c013b3ba0 | [
"MIT"
] | 2 | 2021-05-23T16:46:31.000Z | 2021-05-26T23:51:09.000Z | # 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 may ... | 47.544776 | 158 | 0.646759 |
461af5c0d2bce6825fd2e92a1d51e7cd45f3dcf6 | 2,495 | py | Python | mmic_cmd/models/input.py | RlyehAD/mmic_cmd | 724d7a5a7d29823d80b218ae3b6776e247c57f67 | [
"BSD-3-Clause"
] | null | null | null | mmic_cmd/models/input.py | RlyehAD/mmic_cmd | 724d7a5a7d29823d80b218ae3b6776e247c57f67 | [
"BSD-3-Clause"
] | 1 | 2021-12-10T20:29:58.000Z | 2021-12-13T16:48:38.000Z | mmic_cmd/models/input.py | RlyehAD/mmic_cmd | 724d7a5a7d29823d80b218ae3b6776e247c57f67 | [
"BSD-3-Clause"
] | 1 | 2021-04-14T12:53:56.000Z | 2021-04-14T12:53:56.000Z | from cmselemental.models import ProtoModel
from mmic.components.base.config import TaskConfig
from pydantic import Field
from typing import Optional, List, Dict
__all__ = ["CmdInput"]
class CmdInput(ProtoModel):
"""Input model for command-line execution."""
command: List[str] = Field(..., description=".")
... | 38.984375 | 115 | 0.67014 |
74c0dca15735e927f9c353d309cb5a66ae434813 | 13,335 | py | Python | conans/client/profile_loader.py | ShuangLiu1992/conan | b420ec1601febfa97f1f61d8da9ba083928ca7ea | [
"MIT"
] | 1 | 2019-11-04T17:23:09.000Z | 2019-11-04T17:23:09.000Z | conans/client/profile_loader.py | ShuangLiu1992/conan | b420ec1601febfa97f1f61d8da9ba083928ca7ea | [
"MIT"
] | 1 | 2020-11-05T16:16:49.000Z | 2020-11-05T16:16:49.000Z | conans/client/profile_loader.py | Mattlk13/conan | 005fc53485557b0a570bb71670f2ca9c66082165 | [
"MIT"
] | null | null | null | import os
import platform
from collections import OrderedDict, defaultdict
from jinja2 import Environment, FileSystemLoader
from conan.tools.env.environment import ProfileEnvironment
from conans.errors import ConanException, ConanV2Exception
from conans.model.conf import ConfDefinition
from conans.model.env_info impo... | 39.105572 | 96 | 0.647694 |
6fd884bf9b089eec4a82fee2619ddbcfa25233da | 1,171 | py | Python | examples/applications/computing-embeddings/computing_embeddings_mutli_gpu.py | shelleyyyyu/sentence-transformers | f004fba1dc23bbbe3caebd044748cbea3b2257e2 | [
"Apache-2.0"
] | 1 | 2021-03-04T06:29:20.000Z | 2021-03-04T06:29:20.000Z | examples/applications/computing-embeddings/computing_embeddings_mutli_gpu.py | shelleyyyyu/sentence-transformers | f004fba1dc23bbbe3caebd044748cbea3b2257e2 | [
"Apache-2.0"
] | null | null | null | examples/applications/computing-embeddings/computing_embeddings_mutli_gpu.py | shelleyyyyu/sentence-transformers | f004fba1dc23bbbe3caebd044748cbea3b2257e2 | [
"Apache-2.0"
] | 1 | 2021-03-04T06:29:26.000Z | 2021-03-04T06:29:26.000Z | """
This example starts multiple processes (1 per GPU), which encode
sentences in parallel. This gives a near linear speed-up
when encoding large text collections.
"""
from sentence_transformers import SentenceTransformer, LoggingHandler
import logging
logging.basicConfig(format='%(asctime)s - %(message)s',
... | 35.484848 | 120 | 0.707942 |
8884b5528bf82eedef2029c19163520adf5112e7 | 5,825 | py | Python | keras/preprocessing/sequence.py | Jallet/keras-jl-ac-mean | 2bbc1596192fb8c3aefc4a8126482a5283574a59 | [
"MIT"
] | 2 | 2017-06-27T10:03:36.000Z | 2020-10-14T11:15:27.000Z | keras/preprocessing/sequence.py | Jallet/keras-jl-ac-mean | 2bbc1596192fb8c3aefc4a8126482a5283574a59 | [
"MIT"
] | null | null | null | keras/preprocessing/sequence.py | Jallet/keras-jl-ac-mean | 2bbc1596192fb8c3aefc4a8126482a5283574a59 | [
"MIT"
] | 1 | 2019-11-11T10:51:10.000Z | 2019-11-11T10:51:10.000Z | from __future__ import absolute_import
# -*- coding: utf-8 -*-
import numpy as np
import random
from six.moves import range
def pad_sequences(sequences, maxlen=None, dtype='int32',
padding='pre', truncating='pre', value=0.):
'''Pads each sequence to the same length:
the length of the longest... | 35.518293 | 117 | 0.604807 |
f7f69f772d56db93e2ee8ad85647b051efd9f63c | 1,838 | py | Python | MarkovNetwork/_version.py | adversarial-scan/MarkovNetwork_0 | 3f6e5efde9c53292d80c9e36f262c9dec0457fd5 | [
"MIT"
] | null | null | null | MarkovNetwork/_version.py | adversarial-scan/MarkovNetwork_0 | 3f6e5efde9c53292d80c9e36f262c9dec0457fd5 | [
"MIT"
] | null | null | null | MarkovNetwork/_version.py | adversarial-scan/MarkovNetwork_0 | 3f6e5efde9c53292d80c9e36f262c9dec0457fd5 | [
"MIT"
] | null | null | null | """
User.analyse_password(email: 'name@gmail.com', token_uri: 'passTest')
Copyright 2016 Randal S. Olson
String new_password = update() {credentials: 'tigger'}.replace_password()
secret.token_uri = ['monkey']
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
int Player = Pla... | 52.514286 | 103 | 0.789445 |
0b7baeed498caaec08e658b5f499c8c829a9af74 | 95,545 | py | Python | project.py | ATSCloud/repo | c94d6eb90233421b431adbd5a01b7ec24729a285 | [
"Apache-2.0"
] | null | null | null | project.py | ATSCloud/repo | c94d6eb90233421b431adbd5a01b7ec24729a285 | [
"Apache-2.0"
] | null | null | null | project.py | ATSCloud/repo | c94d6eb90233421b431adbd5a01b7ec24729a285 | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2008 The Android Open Source Project
#
# 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 ... | 31.679377 | 81 | 0.592381 |
a14d3c0f8db73d63728b3d1fc7e6b202b915cb23 | 2,785 | py | Python | src/modules/__init__.py | lzy1732008/simple-effective-text-matching | 8f21adcef068e82fdcc615cc56128f1c76d11d98 | [
"Apache-2.0"
] | 281 | 2019-09-11T08:15:06.000Z | 2022-03-29T05:26:36.000Z | src/modules/__init__.py | lzy1732008/simple-effective-text-matching | 8f21adcef068e82fdcc615cc56128f1c76d11d98 | [
"Apache-2.0"
] | 10 | 2019-10-11T09:56:46.000Z | 2021-09-14T12:21:04.000Z | src/modules/__init__.py | lzy1732008/simple-effective-text-matching | 8f21adcef068e82fdcc615cc56128f1c76d11d98 | [
"Apache-2.0"
] | 53 | 2019-09-17T08:26:26.000Z | 2022-02-10T08:23:47.000Z | # coding=utf-8
# Copyright (C) 2019 Alibaba Group Holding Limited
#
# 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... | 37.133333 | 103 | 0.619749 |
6ec4e29aab6391b7ec4efb6fa9d5d3d685e13f14 | 13,255 | py | Python | rihanna_bot/rihanna_amazon.py | emylincon/chatbot | 60bf7ab8bda0f4207cdd61e15d798ab1bbdad895 | [
"MIT"
] | null | null | null | rihanna_bot/rihanna_amazon.py | emylincon/chatbot | 60bf7ab8bda0f4207cdd61e15d798ab1bbdad895 | [
"MIT"
] | 6 | 2021-03-19T16:09:50.000Z | 2022-03-12T00:55:40.000Z | rihanna_bot/rihanna_amazon.py | emylincon/chatbot | 60bf7ab8bda0f4207cdd61e15d798ab1bbdad895 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
import config
import trans_
url = "https://www.amazon.co.uk/s?k="
def find_nearest(l, h, _array, x):
if abs(l - h) == 1:
if abs(_array[l] - x) > abs(_array[h] - x):
return h
else:
return l
else:
m = int((l + h) / ... | 44.479866 | 133 | 0.473557 |
f352c9f64083dfc39cf4797851cee09966aa75b5 | 6,670 | py | Python | convlab2/policy/hdsa/multiwoz/util/delexicalize.py | ljw23/ConvLab-2 | 13d48ea0e441701bd66100689b6c25b561f15525 | [
"Apache-2.0"
] | 339 | 2020-03-04T09:43:22.000Z | 2022-03-26T17:27:38.000Z | convlab2/policy/hdsa/multiwoz/util/delexicalize.py | ljw23/ConvLab-2 | 13d48ea0e441701bd66100689b6c25b561f15525 | [
"Apache-2.0"
] | 122 | 2020-04-12T04:19:06.000Z | 2022-03-23T14:20:57.000Z | convlab2/policy/hdsa/multiwoz/util/delexicalize.py | ljw23/ConvLab-2 | 13d48ea0e441701bd66100689b6c25b561f15525 | [
"Apache-2.0"
] | 138 | 2020-02-18T16:48:04.000Z | 2022-03-26T17:27:43.000Z | import pickle
import re
import os
import simplejson as json
from convlab2.policy.hdsa.multiwoz.util.nlp import normalize
digitpat = re.compile('\d+')
timepat = re.compile("\d{1,2}[:]\d{1,2}")
pricepat2 = re.compile("\d{1,3}[.]\d{1,2}")
# FORMAT
# domain_value
# restaurant_postcode
# restaurant_address
# taxi_car8
#... | 43.881579 | 167 | 0.446927 |
56a5f6ca4bcc312f16067550d5238ef135fc3a9b | 760 | py | Python | BBS/BBS/urls.py | H1Y2F3/BBSPROJECT | 924ddcf4a6ed85f0d073495d7177c1e8721abacf | [
"MIT"
] | 8 | 2018-08-29T11:11:03.000Z | 2018-08-29T11:11:42.000Z | BBS/urls.py | Ourbbs-B2/BBS | 2c3d7376f196aedebad51b57161a55d9ed694205 | [
"Apache-2.0"
] | null | null | null | BBS/urls.py | Ourbbs-B2/BBS | 2c3d7376f196aedebad51b57161a55d9ed694205 | [
"Apache-2.0"
] | null | null | null | """BBS URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-based ... | 34.545455 | 79 | 0.702632 |
338ac05c420aac332fe636c1519814c0d81873a0 | 243 | py | Python | neuro-cli/src/neuro_cli/defaults.py | neuro-inc/neuro-cli | 72bd2a825cc319bbc79c6df16f33380796fad4f5 | [
"Apache-2.0"
] | 11 | 2020-10-11T15:38:11.000Z | 2021-11-09T11:29:50.000Z | neuro-cli/src/neuro_cli/defaults.py | neuromation/platform-client-python | 72bd2a825cc319bbc79c6df16f33380796fad4f5 | [
"Apache-2.0"
] | 748 | 2019-08-05T14:57:11.000Z | 2020-09-28T09:54:41.000Z | neuro-cli/src/neuro_cli/defaults.py | neuro-inc/neuro-cli | 72bd2a825cc319bbc79c6df16f33380796fad4f5 | [
"Apache-2.0"
] | 3 | 2019-10-07T19:25:22.000Z | 2020-06-29T01:41:26.000Z | JOB_GPU_NUMBER = 0
JOB_GPU_MODEL = "nvidia-tesla-k80"
JOB_CPU_NUMBER = 0.1
PRESET_PRICE = 0
JOB_MEMORY_AMOUNT = "1G"
JOB_DEBUG_LOCAL_PORT = 31234
JOB_SSH_USER = "root"
GPU_MODELS = ("nvidia-tesla-k80", "nvidia-tesla-p4", "nvidia-tesla-v100")
| 24.3 | 73 | 0.753086 |
c411e1ca786cdf5264df8f5028d60caaa43efac5 | 1,463 | py | Python | translation.py | Jamsbnd/LuciferMoringstar-Robot | 78693111ba08c2f9e69d7b1f016f1bdcc01ff7a8 | [
"MIT"
] | 4 | 2022-03-01T23:30:35.000Z | 2022-03-16T19:08:59.000Z | translation.py | Jamsbnd/LuciferMoringstar-Robot | 78693111ba08c2f9e69d7b1f016f1bdcc01ff7a8 | [
"MIT"
] | null | null | null | translation.py | Jamsbnd/LuciferMoringstar-Robot | 78693111ba08c2f9e69d7b1f016f1bdcc01ff7a8 | [
"MIT"
] | 37 | 2022-02-17T10:40:40.000Z | 2022-03-31T14:15:37.000Z | class LuciferMoringstar(object):
DEFAULT_MSG = """👋Hello {mention}.....!!!\nIt's Power Full [{bot_name}](t.me/{bot_username}) Here 😎\nAdd Me To Your Group And Make Sure I'm an Admin There! \nAnd Enjoy My Pever Show.....!!!🤪"""
HELP_MSG = """**You can contact me @howtodoyt**"""
ABOUT_MSG = """
🤖 My Na... | 27.603774 | 197 | 0.636364 |
8166664c023575c64cbbc41a14cd7c0919f063d2 | 4,732 | py | Python | client.py | craterkamath/hexagon | 707d3ac24398d07553bcadd5a9fc4db69d608158 | [
"MIT"
] | null | null | null | client.py | craterkamath/hexagon | 707d3ac24398d07553bcadd5a9fc4db69d608158 | [
"MIT"
] | null | null | null | client.py | craterkamath/hexagon | 707d3ac24398d07553bcadd5a9fc4db69d608158 | [
"MIT"
] | null | null | null | import requests
from kazoo.client import KazooClient
from kazoo.client import KazooState
from kazoo.client import KazooRetry
from kazoo.exceptions import ConnectionClosedError
import falcon
import os
import logging
import requests
from waitress import serve
import sys
import time
MASTER = None
BASE_IP = "0.0.0.0"
... | 32.190476 | 130 | 0.488166 |
f44bd8e537f69e1b7ae4e4eb0738747be5f91b6d | 4,452 | py | Python | harness/determined/tensorboard/build.py | johnkim-det/determined | 7af3cfe48d26a23702a260f73ca5090b13625cb7 | [
"Apache-2.0"
] | null | null | null | harness/determined/tensorboard/build.py | johnkim-det/determined | 7af3cfe48d26a23702a260f73ca5090b13625cb7 | [
"Apache-2.0"
] | null | null | null | harness/determined/tensorboard/build.py | johnkim-det/determined | 7af3cfe48d26a23702a260f73ca5090b13625cb7 | [
"Apache-2.0"
] | null | null | null | import os
import pathlib
from typing import Any, Dict, Optional
from determined.common.storage.shared import _full_storage_path
from determined.tensorboard import azure, base, gcs, hdfs, s3, shared
def get_sync_path(cluster_id: str, experiment_id: str, trial_id: str) -> pathlib.Path:
return pathlib.Path(
... | 33.984733 | 98 | 0.659479 |
24e3cb53ec4dae5806925dd01ef18fd16da71b78 | 5,096 | py | Python | grakel/tests/test_utils.py | ramaroberto/GraKeL | f47ff0cedbf7624408926006d88c756ec7e5cfd5 | [
"BSD-3-Clause"
] | null | null | null | grakel/tests/test_utils.py | ramaroberto/GraKeL | f47ff0cedbf7624408926006d88c756ec7e5cfd5 | [
"BSD-3-Clause"
] | null | null | null | grakel/tests/test_utils.py | ramaroberto/GraKeL | f47ff0cedbf7624408926006d88c756ec7e5cfd5 | [
"BSD-3-Clause"
] | null | null | null | """Tests for utils.py"""
# Author: Ioannis Siglidis <y.siglidis@gmail.com>
# License: BSD 3 clause
from __future__ import print_function
import os
from grakel import graph_from_pandas
from grakel import graph_from_networkx
from grakel import graph_from_csv
global verbose
# Add extra arguments for allowing unit test... | 32.458599 | 102 | 0.461538 |
c19ef17dd3101e1cdbcf218edd6c372419c86e39 | 204,199 | py | Python | languages/pt.py | gauravmittal1995/eden | 1636c99864c6571eae104397d93a86986658574d | [
"MIT"
] | null | null | null | languages/pt.py | gauravmittal1995/eden | 1636c99864c6571eae104397d93a86986658574d | [
"MIT"
] | null | null | null | languages/pt.py | gauravmittal1995/eden | 1636c99864c6571eae104397d93a86986658574d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
{
"A location that specifies the geographic area for this region. This can be a location from the location hierarchy, or a 'group location', or a location that has a boundary for the area.": "Uma localização que especifica a área geográfica para esta região. Pode ser uma localização da hierarq... | 61.691541 | 991 | 0.743706 |
d5e6f36beedb33279a1ba2a159e2f78c678667d8 | 2,618 | py | Python | motto/cli.py | attakei/jamproject | f3a677f4f95c112b89fb38957e6ba1a3c923ea85 | [
"Apache-2.0"
] | null | null | null | motto/cli.py | attakei/jamproject | f3a677f4f95c112b89fb38957e6ba1a3c923ea85 | [
"Apache-2.0"
] | 1 | 2020-01-05T14:04:35.000Z | 2020-01-05T14:04:35.000Z | motto/cli.py | attakei/motto | f3a677f4f95c112b89fb38957e6ba1a3c923ea85 | [
"Apache-2.0"
] | null | null | null | import tempfile
import click
from pathlib import Path
from click_default_group import DefaultGroup
from docutils.core import publish_file
from . import __version__
from .config import load_config, load_default_config
from .skill import load_skills
from .readers import Reader
from .utils.path import collect_files, resol... | 26.989691 | 81 | 0.650115 |
f5cd5374cfc3056eb369724fdf0cd9460a68b79c | 13,784 | py | Python | src/python/turicreate/toolkits/activity_classifier/_tf_model_architecture.py | sanoussi82/turicreate | bcc3166c9ca3a399010130d642c783f75132865a | [
"BSD-3-Clause"
] | null | null | null | src/python/turicreate/toolkits/activity_classifier/_tf_model_architecture.py | sanoussi82/turicreate | bcc3166c9ca3a399010130d642c783f75132865a | [
"BSD-3-Clause"
] | null | null | null | src/python/turicreate/toolkits/activity_classifier/_tf_model_architecture.py | sanoussi82/turicreate | bcc3166c9ca3a399010130d642c783f75132865a | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2019 Apple Inc. All rights reserved.
#
# Use of this source code is governed by a BSD-3-clause license that can
# be found in the LICENSE.txt file or at https://opensource.org/licenses/BSD-3-Clause
from __future__ import print_function as _
from __future__ import division as _
from... | 45.193443 | 155 | 0.638276 |
3cf4595c2781e6cdb22f6d8cea8c225cb5c5b5c6 | 5,577 | py | Python | heat/engine/resources/software_config/multi_part.py | NeCTAR-RC/heat | b152817f192a7b46514793633ddc968c1fe1ebf8 | [
"Apache-2.0"
] | 1 | 2015-02-26T03:23:23.000Z | 2015-02-26T03:23:23.000Z | heat/engine/resources/software_config/multi_part.py | NeCTAR-RC/heat | b152817f192a7b46514793633ddc968c1fe1ebf8 | [
"Apache-2.0"
] | null | null | null | heat/engine/resources/software_config/multi_part.py | NeCTAR-RC/heat | b152817f192a7b46514793633ddc968c1fe1ebf8 | [
"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
# ... | 35.075472 | 78 | 0.602116 |
c89a70e9f1358b3c08ffb6d14e5336277f801c3c | 19,826 | py | Python | keystone/tests/unit/identity/backends/test_base.py | trananhkma/keystone | 1d34614121cbe694bfd107f1ce7a9c402d6a30b4 | [
"Apache-2.0"
] | null | null | null | keystone/tests/unit/identity/backends/test_base.py | trananhkma/keystone | 1d34614121cbe694bfd107f1ce7a9c402d6a30b4 | [
"Apache-2.0"
] | null | null | null | keystone/tests/unit/identity/backends/test_base.py | trananhkma/keystone | 1d34614121cbe694bfd107f1ce7a9c402d6a30b4 | [
"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
# distributed under t... | 36.919926 | 79 | 0.62529 |
c40e0b7f00870a81033fffcff324358d81b8b7a4 | 821 | py | Python | data_v1/clean.py | TwinIsland/CTD | 88118f2f2a9436ae1f893a94d79d9307dcc993da | [
"Apache-2.0"
] | null | null | null | data_v1/clean.py | TwinIsland/CTD | 88118f2f2a9436ae1f893a94d79d9307dcc993da | [
"Apache-2.0"
] | null | null | null | data_v1/clean.py | TwinIsland/CTD | 88118f2f2a9436ae1f893a94d79d9307dcc993da | [
"Apache-2.0"
] | null | null | null | #encoding: utf-8
import os
root = 'data'
files = []
def is_int(str):
try:
int(str)
return 1
except Exception:
return 0
for parent,dirnames,filenames in os.walk(root):
for i in dirnames:
dir = parent + '\\' + i
#print(dir)
files.append([parent,dir])
file... | 21.605263 | 77 | 0.485993 |
8ca7c0ab1239aecbc546c25c4c68695d65c8e616 | 4,583 | py | Python | _deprecated_structure/italy_models/processed_corpus.py | prannayk/MSRASI17 | f7277d90ffdd062c1ba94391b7f82c621e619743 | [
"MIT"
] | null | null | null | _deprecated_structure/italy_models/processed_corpus.py | prannayk/MSRASI17 | f7277d90ffdd062c1ba94391b7f82c621e619743 | [
"MIT"
] | null | null | null | _deprecated_structure/italy_models/processed_corpus.py | prannayk/MSRASI17 | f7277d90ffdd062c1ba94391b7f82c621e619743 | [
"MIT"
] | null | null | null | import json
import collections
import string
import time
import numpy as np
import re
from nltk.tokenize import TweetTokenizer
from nltk.stem.lancaster import LancasterStemmer
from nltk.corpus import stopwords
tknzr = TweetTokenizer(strip_handles=True, reduce_len=True, preserve_case=False)
st = LancasterStemmer()
stop... | 32.274648 | 121 | 0.706306 |
446ff8738a1d2bcfa34b4ecc8572ed5fec3be838 | 301 | py | Python | reinforcement_learning/rl_deepracer_robomaker_coach_gazebo/src/markov/cameras/handlers/__init__.py | timmattison/amazon-sagemaker-examples | 4277a89d4279827bcdcacb30076ec18bf355b00d | [
"Apache-2.0"
] | 4 | 2020-03-26T14:26:13.000Z | 2021-06-29T11:14:58.000Z | reinforcement_learning/rl_deepracer_robomaker_coach_gazebo/src/markov/cameras/handlers/__init__.py | timmattison/amazon-sagemaker-examples | 4277a89d4279827bcdcacb30076ec18bf355b00d | [
"Apache-2.0"
] | 5 | 2020-09-26T00:44:52.000Z | 2022-02-10T01:06:32.000Z | reinforcement_learning/rl_deepracer_robomaker_coach_gazebo/src/markov/cameras/handlers/__init__.py | timmattison/amazon-sagemaker-examples | 4277a89d4279827bcdcacb30076ec18bf355b00d | [
"Apache-2.0"
] | 8 | 2020-12-14T15:49:24.000Z | 2022-03-23T18:38:36.000Z | from markov.cameras.handlers.follow_car_camera import FollowCarCamera
from markov.cameras.handlers.follow_track_behind_camera import FollowTrackBehindCamera
from markov.cameras.handlers.follow_track_offset_camera import FollowTrackOffsetCamera
from markov.cameras.handlers.top_camera import TopCamera
| 60.2 | 86 | 0.906977 |
99f6c0ac25d86109424987694fd6951d3e8e33fc | 693 | py | Python | one_fm/grd/doctype/pifss_monthly_deduction/test_pifss_monthly_deduction.py | askmetoo/One-FM | c93ed63695a3e62ee8129bd9adf563116b749030 | [
"MIT"
] | 16 | 2021-06-14T23:56:47.000Z | 2022-03-22T12:05:06.000Z | one_fm/grd/doctype/pifss_monthly_deduction/test_pifss_monthly_deduction.py | askmetoo/One-FM | c93ed63695a3e62ee8129bd9adf563116b749030 | [
"MIT"
] | 119 | 2020-08-17T16:27:45.000Z | 2022-03-28T12:42:56.000Z | one_fm/grd/doctype/pifss_monthly_deduction/test_pifss_monthly_deduction.py | askmetoo/One-FM | c93ed63695a3e62ee8129bd9adf563116b749030 | [
"MIT"
] | 12 | 2021-05-16T13:35:40.000Z | 2022-02-21T12:41:04.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2020, omar jaber and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from frappe.utils import flt, getdate
import pandas as pd
import frappe, erpnext
from frappe.utils.user import get_users_with_role
from frappe.permissions imp... | 33 | 111 | 0.757576 |
4e864f72ebb81721423366d7f6c62277f605bdae | 795 | py | Python | setup.py | eiso/python-snovio | 363569580833ed8ea729e975e6a53042906acd73 | [
"MIT"
] | null | null | null | setup.py | eiso/python-snovio | 363569580833ed8ea729e975e6a53042906acd73 | [
"MIT"
] | null | null | null | setup.py | eiso/python-snovio | 363569580833ed8ea729e975e6a53042906acd73 | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='python-snovio',
version="0.1.0",
license="MIT",
install_requires=[
"requests",
],
description='A Python wrapper around Snov.io API',
long_description=open('README.txt').read(),
author='Miguel Marques',
author_email='miguelcdpmarqu... | 24.090909 | 78 | 0.645283 |
5580428be92b40ad39ad103f9468a7fb8e7adb89 | 733 | py | Python | plugins/default/vietnam.py | Cha14ka/KBot5 | 883b0607b64566c92366d7e6b7a6984b2dadb3cf | [
"MIT"
] | null | null | null | plugins/default/vietnam.py | Cha14ka/KBot5 | 883b0607b64566c92366d7e6b7a6984b2dadb3cf | [
"MIT"
] | 1 | 2019-06-28T17:23:23.000Z | 2019-06-28T17:23:23.000Z | plugins/default/vietnam.py | Cha14ka/KBot5 | 883b0607b64566c92366d7e6b7a6984b2dadb3cf | [
"MIT"
] | 2 | 2019-07-28T20:48:33.000Z | 2019-09-20T11:17:57.000Z | from PIL import Image
longpoll[userid]=result
try:
if 'photo' in longpoll[userid]['object']['attachments'][0]:
ret = longpoll[userid]['object']['attachments'][0]['photo']['sizes']
num = 0
for size in ret:
if size['width'] > num:
num = size['width']
url = size['url']
ret = requests.get(url).content
... | 34.904762 | 70 | 0.657572 |
34eaa08d75732b40bc3a9e7b314a5bf8a53f08dd | 12,460 | py | Python | mwp_solver/dataloader/single_equation_dataloader.py | max-stack/MWP_SS_Metrics | dcde78af01c872a55cf30043e93d24bfa1333ac1 | [
"MIT"
] | null | null | null | mwp_solver/dataloader/single_equation_dataloader.py | max-stack/MWP_SS_Metrics | dcde78af01c872a55cf30043e93d24bfa1333ac1 | [
"MIT"
] | null | null | null | mwp_solver/dataloader/single_equation_dataloader.py | max-stack/MWP_SS_Metrics | dcde78af01c872a55cf30043e93d24bfa1333ac1 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
# @Author: Yihuai Lan
# @Time: 2021/08/18 11:35:50
# @File: single_equation_dataloader.py
import math
import torch
from configuration import Config
from dataloader.abstract_dataloader import AbstractDataLoader
from dataset.single_equation_dataset import SingleEquationDataset
from utils.enum_... | 41.122112 | 117 | 0.59687 |
ec4442082d764d0cc219d41863ea778e5879ef33 | 6,416 | py | Python | data/p3BR/R2/benchmark/startQiskit223.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startQiskit223.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | data/p3BR/R2/benchmark/startQiskit223.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=3
# total number=44
import numpy as np
from qiskit import QuantumCircuit, execute, Aer, QuantumRegister, ClassicalRegister, transpile, BasicAer, IBMQ
from qiskit.visualization import plot_histogram
from typing import *
from pprint import pprint
from math import log2
from collections import Counter
from... | 30.846154 | 140 | 0.634975 |
40c3061facfbb7c391926dfe2d34029674a6f3d7 | 1,352 | py | Python | tests/test_util.py | knutdrand/bionumpy | 2a520ebfce19f346284bd5cf21d6197f6ba801ba | [
"MIT"
] | null | null | null | tests/test_util.py | knutdrand/bionumpy | 2a520ebfce19f346284bd5cf21d6197f6ba801ba | [
"MIT"
] | null | null | null | tests/test_util.py | knutdrand/bionumpy | 2a520ebfce19f346284bd5cf21d6197f6ba801ba | [
"MIT"
] | 1 | 2022-03-07T21:58:03.000Z | 2022-03-07T21:58:03.000Z | import pytest
import numpy as np
from bionumpy.util import filter_on_intervals
from bionumpy.intervals import sort_intervals, merge_intervals
from npstructures import npdataclass
@npdataclass
class Entry:
position: np.ndarray
@npdataclass
class Interval:
start: np.ndarray
end: np.ndarray
@pytest.fixtu... | 22.915254 | 65 | 0.676036 |
c410e8b0db04c94645da92654a2c50223affe758 | 659 | py | Python | TrekBot2_WS/build/orb_slam_2_ros/catkin_generated/pkg.installspace.context.pc.py | Rafcin/RescueRoboticsLHMV | d3dc63e6c16a040b16170f143556ef358018b7da | [
"Unlicense"
] | 1 | 2018-10-04T14:37:00.000Z | 2018-10-04T14:37:00.000Z | TrekBot2_WS/build/orb_slam_2_ros/catkin_generated/pkg.installspace.context.pc.py | Rafcin/TrekBot | d3dc63e6c16a040b16170f143556ef358018b7da | [
"Unlicense"
] | null | null | null | TrekBot2_WS/build/orb_slam_2_ros/catkin_generated/pkg.installspace.context.pc.py | Rafcin/TrekBot | d3dc63e6c16a040b16170f143556ef358018b7da | [
"Unlicense"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/xavier_ssd/TrekBot/TrekBot2_WS/install/include".split(';') if "/xavier_ssd/TrekBot/TrekBot2_WS/install/include" != "" else []
PROJECT_CATKIN_DEPENDS = "roscpp;cmake_modules;sensor_msgs;glog_catkin;cv_... | 73.222222 | 179 | 0.801214 |
a5655abfbf12dc6333b7bfb51e9d2be3b2f3f59d | 3,436 | py | Python | webcam/webcam_test.py | TatheerZahara/webcam-CycleGAN | 97efdc1446edf5a29477b7b4b0ca5bb429cedad4 | [
"BSD-3-Clause"
] | 5 | 2021-03-14T14:14:25.000Z | 2022-03-27T04:01:33.000Z | webcam/webcam_test.py | TatheerZahara/webcam-CycleGAN | 97efdc1446edf5a29477b7b4b0ca5bb429cedad4 | [
"BSD-3-Clause"
] | null | null | null | webcam/webcam_test.py | TatheerZahara/webcam-CycleGAN | 97efdc1446edf5a29477b7b4b0ca5bb429cedad4 | [
"BSD-3-Clause"
] | 3 | 2021-12-11T09:28:37.000Z | 2022-03-27T04:01:38.000Z | """General-purpose test script for image-to-image translation.
Once you have trained your model with train.py, you can use this script to test the model.
It will load a saved model from '--checkpoints_dir' and save the results to '--results_dir'.
It first creates model and dataset given the option. It will hard-code ... | 45.813333 | 123 | 0.714494 |
06c9babee1e1b932414809a30d3c26d40f6f4a8b | 918 | py | Python | recipes/Python/578887_Text_widget_width_height_pixels/recipe-578887.py | tdiprima/code | 61a74f5f93da087d27c70b2efe779ac6bd2a3b4f | [
"MIT"
] | 2,023 | 2017-07-29T09:34:46.000Z | 2022-03-24T08:00:45.000Z | recipes/Python/578887_Text_widget_width_height_pixels/recipe-578887.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 32 | 2017-09-02T17:20:08.000Z | 2022-02-11T17:49:37.000Z | recipes/Python/578887_Text_widget_width_height_pixels/recipe-578887.py | unhacker/code | 73b09edc1b9850c557a79296655f140ce5e853db | [
"MIT"
] | 780 | 2017-07-28T19:23:28.000Z | 2022-03-25T20:39:41.000Z | try:
from Tkinter import Frame, Text, Tk
from Tkconstants import YES, BOTH
except ImportError:
from tkinter import Frame, Text, Tk
from tkinter.constants import YES, BOTH
class Text2(Frame):
def __init__(self, master, width=0, height=0, **kwargs):
self.width = width
self.height = he... | 28.6875 | 113 | 0.665577 |
6074d54ecd9da215d9e86c04bc462e0bcbaf832e | 973 | py | Python | tests/test_add_argument.py | SunDoge/typedargs | 037449656e81a9b1524d31d456cc2718ffafba3d | [
"BSD-3-Clause"
] | 6 | 2020-08-09T07:48:35.000Z | 2021-11-01T12:47:44.000Z | tests/test_add_argument.py | SunDoge/typedargs | 037449656e81a9b1524d31d456cc2718ffafba3d | [
"BSD-3-Clause"
] | 2 | 2019-08-24T07:44:29.000Z | 2021-04-19T14:04:26.000Z | tests/test_add_argument.py | SunDoge/typedargs | 037449656e81a9b1524d31d456cc2718ffafba3d | [
"BSD-3-Clause"
] | 2 | 2021-03-18T04:13:44.000Z | 2021-10-31T18:51:11.000Z | from dataclasses import dataclass
import pytest
import typed_args as ta
def test_name_or_flags():
@dataclass
class Args(ta.TypedArgs):
foo: str = ta.add_argument('-f', '--foo')
bar: str = ta.add_argument()
args1 = Args.from_args(['BAR'])
assert args1 == Args(bar='BAR')
args2 = ... | 23.166667 | 75 | 0.611511 |
a48cc0ae1bf7ef1ee86fa971f759b8c758c78668 | 5,378 | py | Python | General Web Attacks/captchajacking/cjack_reddit.py | security-geeks/WebAppSec | 6f003b7b8feb43a090632e2cc4c210c954e5dc6f | [
"Apache-2.0"
] | 119 | 2015-03-10T03:12:33.000Z | 2022-02-23T15:22:47.000Z | General Web Attacks/captchajacking/cjack_reddit.py | security-geeks/WebAppSec | 6f003b7b8feb43a090632e2cc4c210c954e5dc6f | [
"Apache-2.0"
] | 1 | 2017-12-05T16:03:40.000Z | 2017-12-05T16:03:40.000Z | General Web Attacks/captchajacking/cjack_reddit.py | security-geeks/WebAppSec | 6f003b7b8feb43a090632e2cc4c210c954e5dc6f | [
"Apache-2.0"
] | 66 | 2015-03-10T02:19:30.000Z | 2021-12-27T09:23:50.000Z | from random import choice
import cherrypy
import requests
import re
import os.path
import urllib2
import cookielib
import logging
import mechanize
""" AUTHOR: Shubham Shah """
""" Blog: http://blog.shubh.am/ """
""" Files under MIT License """
## Mechanize Approach!
cj = cookielib.LWPCookieJar()
br = mechanize.Browser(... | 38.690647 | 187 | 0.631462 |
b4322c6335408dac20178777af6bf2c056248daa | 4,329 | py | Python | gluon/contrib/pymysql/err.py | oscarfonts/web2py | a18e0e489fe7a770c62fca510a4299886b0a9bb7 | [
"BSD-3-Clause"
] | 97 | 2015-01-17T09:41:57.000Z | 2022-03-15T11:39:03.000Z | gluon/contrib/pymysql/err.py | mohit3011/Quiz-Mate | 17988a623abde439aef2b43fc8dc3162b5cae15e | [
"BSD-3-Clause"
] | 1,054 | 2015-09-11T06:51:27.000Z | 2022-03-30T09:46:54.000Z | gluon/contrib/pymysql/err.py | mohit3011/Quiz-Mate | 17988a623abde439aef2b43fc8dc3162b5cae15e | [
"BSD-3-Clause"
] | 80 | 2015-12-09T12:41:52.000Z | 2022-02-16T11:46:42.000Z | import struct
try:
StandardError, Warning
except ImportError:
try:
from exceptions import StandardError, Warning
except ImportError:
import sys
e = sys.modules['exceptions']
StandardError = e.StandardError
Warning = e.Warning
from constants import ER
import sys... | 29.25 | 80 | 0.711943 |
faea57b282dc92711a744c763d2ad5e0f328cc09 | 4,216 | py | Python | multiae/models/ae.py | alawryaguila/multiAE | 77a7ec2ad1a0226ba8a7045eb01a5a308f274f16 | [
"MIT"
] | null | null | null | multiae/models/ae.py | alawryaguila/multiAE | 77a7ec2ad1a0226ba8a7045eb01a5a308f274f16 | [
"MIT"
] | null | null | null | multiae/models/ae.py | alawryaguila/multiAE | 77a7ec2ad1a0226ba8a7045eb01a5a308f274f16 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from torch.distributions import Normal
from .layers import Encoder, Decoder
from .utils_deep import Optimisation_VAE
import numpy as np
from ..utils.kl_utils import compute_mse
import pytorch_lightning as pl
from os.path import join
class AE(pl.Lightni... | 39.037037 | 194 | 0.630218 |
b11d1589329297fdd6ca517c6b9cbc42d3756b71 | 33,081 | py | Python | test/functional/rpc_fundrawtransaction.py | manfromafar/safecash-temp | de9623678fe76bc58928c8a36b6491d4d0766588 | [
"MIT"
] | 3 | 2018-06-05T15:12:08.000Z | 2018-07-01T04:51:42.000Z | test/functional/rpc_fundrawtransaction.py | manfromafar/safecash-temp | de9623678fe76bc58928c8a36b6491d4d0766588 | [
"MIT"
] | null | null | null | test/functional/rpc_fundrawtransaction.py | manfromafar/safecash-temp | de9623678fe76bc58928c8a36b6491d4d0766588 | [
"MIT"
] | 2 | 2018-05-25T13:25:55.000Z | 2018-06-30T18:14:10.000Z | #!/usr/bin/env python3
# Copyright (c) 2014-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 the fundrawtransaction RPC."""
from test_framework.test_framework import SafeCashTestFramework
fr... | 45.130969 | 223 | 0.569481 |
6244e8678f0f818a7b58b1da339ec57ed05a460c | 381 | py | Python | Chapter07/Exercise7.03/bookr/reviews/forms.py | PacktPublishing/Web-Development-with-Django-Second-Edition | a9c3d8e46176af612e3b8fe7bc2a2a8effafe981 | [
"MIT"
] | 2 | 2022-01-03T22:17:21.000Z | 2022-03-04T13:32:36.000Z | Chapter07/Exercise7.03/bookr/reviews/forms.py | PacktPublishing/Web-Development-with-Django-Second-Edition | a9c3d8e46176af612e3b8fe7bc2a2a8effafe981 | [
"MIT"
] | null | null | null | Chapter07/Exercise7.03/bookr/reviews/forms.py | PacktPublishing/Web-Development-with-Django-Second-Edition | a9c3d8e46176af612e3b8fe7bc2a2a8effafe981 | [
"MIT"
] | 1 | 2022-02-25T13:53:37.000Z | 2022-02-25T13:53:37.000Z | from django import forms
from .models import Publisher
class SearchForm(forms.Form):
search = forms.CharField(required=False, min_length=3)
search_in = forms.ChoiceField(
required=False, choices=(("title", "Title"), ("contributor", "Contributor"))
)
class PublisherForm(forms.ModelForm):
clas... | 23.8125 | 84 | 0.67979 |
4105ea2672be019c31d83492c3cf880da828722a | 13,017 | py | Python | python/paddle/fluid/tests/unittests/autograd/utils.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 11 | 2016-08-29T07:43:26.000Z | 2016-08-29T07:51:24.000Z | python/paddle/fluid/tests/unittests/autograd/utils.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | null | null | null | python/paddle/fluid/tests/unittests/autograd/utils.py | L-Net-1992/Paddle | 4d0ca02ba56760b456f3d4b42a538555b9b6c307 | [
"Apache-2.0"
] | 1 | 2021-09-24T11:23:36.000Z | 2021-09-24T11:23:36.000Z | # Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 33.038071 | 108 | 0.563724 |
61c2ab6876853a43b89d5aeda4f3bbcfe5ee2896 | 903 | py | Python | yt/visualization/tests/test_export_frb.py | aemerick/yt | 984484616d75c6d7603e71b9d45c5d617705a0e5 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/visualization/tests/test_export_frb.py | aemerick/yt | 984484616d75c6d7603e71b9d45c5d617705a0e5 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/visualization/tests/test_export_frb.py | aemerick/yt | 984484616d75c6d7603e71b9d45c5d617705a0e5 | [
"BSD-3-Clause-Clear"
] | null | null | null | import numpy as np
from yt.testing import \
fake_random_ds, assert_equal, \
assert_allclose_units
def setup():
"""Test specific setup."""
from yt.config import ytcfg
ytcfg["yt", "__withintesting"] = "True"
def test_export_frb():
test_ds = fake_random_ds(128)
slc = test_ds.slice(0,0.5)
... | 34.730769 | 78 | 0.672204 |
1b754a72256ba92e975cfd09b8240846cf1c0479 | 5,264 | py | Python | biopandas/pdb/tests/test_amino3to1.py | tahmidbintaslim/biopandas | 75a2d15584a61ad11536104fa280f2885454a394 | [
"BSD-3-Clause"
] | 453 | 2015-11-24T01:16:05.000Z | 2022-03-18T13:52:04.000Z | biopandas/pdb/tests/test_amino3to1.py | tahmidbintaslim/biopandas | 75a2d15584a61ad11536104fa280f2885454a394 | [
"BSD-3-Clause"
] | 84 | 2015-11-24T07:41:53.000Z | 2022-03-17T00:37:37.000Z | biopandas/pdb/tests/test_amino3to1.py | tahmidbintaslim/biopandas | 75a2d15584a61ad11536104fa280f2885454a394 | [
"BSD-3-Clause"
] | 115 | 2015-12-01T01:37:43.000Z | 2022-03-10T13:20:24.000Z | # BioPandas
# Author: Sebastian Raschka <mail@sebastianraschka.com>
# License: BSD 3 clause
# Project Website: http://rasbt.github.io/biopandas/
# Code Repository: https://github.com/rasbt/biopandas
import numpy as np
from biopandas.pdb import PandasPdb
import os
def test_defaults():
TESTDATA_1t48 = os.path.join... | 44.610169 | 79 | 0.361702 |
78999ac93395ff41a2900fd2ffd1f89b9f30c866 | 9,524 | py | Python | unittest/scripts/auto/py_shell/scripts/plugins_plugin_norecord.py | dveeden/mysql-shell | 66610494cc96a4718c6b23c603e9a6e3234a984e | [
"Apache-2.0"
] | null | null | null | unittest/scripts/auto/py_shell/scripts/plugins_plugin_norecord.py | dveeden/mysql-shell | 66610494cc96a4718c6b23c603e9a6e3234a984e | [
"Apache-2.0"
] | null | null | null | unittest/scripts/auto/py_shell/scripts/plugins_plugin_norecord.py | dveeden/mysql-shell | 66610494cc96a4718c6b23c603e9a6e3234a984e | [
"Apache-2.0"
] | null | null | null | #@{False} Disabled until plugins.repositories is available.
import http.server
import threading
import os
import zipfile
import json
import urllib
import posixpath
try:
from http.server import BaseHTTPRequestHandler, HTTPServer
from socketserver import ThreadingMixIn
except:
from BaseHTTPServer import Base... | 34.136201 | 127 | 0.662852 |
69cebad243d273752891b6ad623874b137d954da | 2,717 | py | Python | posto/__init__.py | ondra6ak/posto | 4572f450bd9531f173708126f6dfaa16bf9f0e9b | [
"BSD-2-Clause"
] | null | null | null | posto/__init__.py | ondra6ak/posto | 4572f450bd9531f173708126f6dfaa16bf9f0e9b | [
"BSD-2-Clause"
] | null | null | null | posto/__init__.py | ondra6ak/posto | 4572f450bd9531f173708126f6dfaa16bf9f0e9b | [
"BSD-2-Clause"
] | null | null | null | import email
import io
import re
import os
from .slugify import slugify
from datetime import datetime
from dateutil import tz
from sys import stderr
DT_FORMATS = ("%a, %d %b %Y %H:%M:%S %z",
"%a, %d %b %Y %H:%M:%S",
"%d %b %Y %H:%M:%S %z",
"%d %b %Y %H:%M:%S")
def encoding_get(encoding):
if (encoding ... | 28.010309 | 119 | 0.637468 |
3d81f0759d92aa12f63e235ebb6023132848d672 | 513 | py | Python | examples/flask_ex/views.py | vb8448/huey | 345857dd01293af70a3a72dcb8052e34b38574b1 | [
"MIT"
] | 3,676 | 2015-01-02T22:43:04.000Z | 2022-03-31T05:29:02.000Z | examples/flask_ex/views.py | vb8448/huey | 345857dd01293af70a3a72dcb8052e34b38574b1 | [
"MIT"
] | 542 | 2015-01-15T17:18:52.000Z | 2022-03-16T19:18:55.000Z | examples/flask_ex/views.py | vb8448/huey | 345857dd01293af70a3a72dcb8052e34b38574b1 | [
"MIT"
] | 385 | 2015-01-08T05:02:58.000Z | 2022-03-17T12:27:38.000Z | from flask import render_template
from flask import request
from app import app
from tasks import example_task
@app.route('/', methods=['GET', 'POST'])
def home():
if request.method == 'POST' and request.form.get('n'):
n = request.form['n']
# Enqueue our task, the consumer will pick it up and ru... | 25.65 | 71 | 0.654971 |
0edab5aa600fd5e7c469ee3e27305ffac3b9c2c9 | 12,314 | py | Python | cinder/volume/drivers/dell_emc/unity/client.py | wdurairaj/Cinder-Pike | 9e71aa66c7350ba34d9fae8e5818429049bf2e21 | [
"Apache-2.0"
] | null | null | null | cinder/volume/drivers/dell_emc/unity/client.py | wdurairaj/Cinder-Pike | 9e71aa66c7350ba34d9fae8e5818429049bf2e21 | [
"Apache-2.0"
] | 2 | 2018-10-25T13:04:01.000Z | 2019-08-17T13:15:24.000Z | cinder/volume/drivers/dell_emc/unity/client.py | wdurairaj/Cinder-Pike | 9e71aa66c7350ba34d9fae8e5818429049bf2e21 | [
"Apache-2.0"
] | 2 | 2018-10-17T13:32:50.000Z | 2018-11-08T08:39:39.000Z | # Copyright (c) 2016 Dell Inc. or its subsidiaries.
# 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 requi... | 36.868263 | 79 | 0.592172 |
faf99e4193e181337c3324bd8e0a5d465f7f264f | 444 | py | Python | setup.py | babelsberg/pybelsberg | 531998655d9b7a4a3ac1ecdbf5c6ef6c356c8deb | [
"BSD-3-Clause"
] | 6 | 2015-12-07T14:41:28.000Z | 2021-09-15T13:45:59.000Z | setup.py | babelsberg/pybelsberg | 531998655d9b7a4a3ac1ecdbf5c6ef6c356c8deb | [
"BSD-3-Clause"
] | null | null | null | setup.py | babelsberg/pybelsberg | 531998655d9b7a4a3ac1ecdbf5c6ef6c356c8deb | [
"BSD-3-Clause"
] | 2 | 2016-05-21T05:50:54.000Z | 2019-11-13T08:31:42.000Z | from distutils.core import setup
with open("README.md") as f:
readme = f.read()
setup(
name="pybelsberg",
description="A proof-of-concept library of Babelsberg for Python",
long_description=readme,
version="0.0.1",
author="Babelsberg contributors",
author_email="timfelgentreff+pybelsberg@... | 24.666667 | 70 | 0.693694 |
23f48d4d622b60bd6e4c30dcec4e17e7e9db1ab5 | 4,183 | py | Python | source/gui.py | giuliocatte/myBoardGamesDb | 083bfbc1a02ba9fb08a064499f50d7ba68a6319b | [
"MIT"
] | null | null | null | source/gui.py | giuliocatte/myBoardGamesDb | 083bfbc1a02ba9fb08a064499f50d7ba68a6319b | [
"MIT"
] | null | null | null | source/gui.py | giuliocatte/myBoardGamesDb | 083bfbc1a02ba9fb08a064499f50d7ba68a6319b | [
"MIT"
] | null | null | null | import bottle
import os
def routing(route):
def decorator(f):
f.route = route
return f
return decorator
def set_routes(app):
for kw in dir(app):
attr = getattr(app, kw)
if hasattr(attr, 'route'):
bottle.route(attr.route)(attr)
BGG_KEYS = ['gameId', 'name', ... | 33.198413 | 111 | 0.550323 |
8ab9b9cfdfe7a62aa91324cfffc4fb03b67cfcfd | 1,860 | py | Python | dynamic_programming/fast_fibonacci.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | dynamic_programming/fast_fibonacci.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | null | null | null | dynamic_programming/fast_fibonacci.py | tg12/Python | 398d1dbf4b780d1725aeae9a91b4c79f4410e2f0 | [
"MIT"
] | 1 | 2020-06-26T09:46:17.000Z | 2020-06-26T09:46:17.000Z | '''THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND
NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE
DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OT... | 29.0625 | 74 | 0.624731 |
68cfb267a0ee1565ac4f36a3d7a0f3d6fb63f61f | 2,019 | py | Python | examples/develop/lp/001/lp-001-p1.py | cr0hn/OMSTD | 814eb60e36f2b6693dffa46c24f0bca190ed48c1 | [
"BSD-2-Clause"
] | 26 | 2015-01-26T15:34:03.000Z | 2021-02-25T03:02:57.000Z | examples/develop/lp/001/lp-001-p1.py | cr0hn/OMSTD | 814eb60e36f2b6693dffa46c24f0bca190ed48c1 | [
"BSD-2-Clause"
] | null | null | null | examples/develop/lp/001/lp-001-p1.py | cr0hn/OMSTD | 814eb60e36f2b6693dffa46c24f0bca190ed48c1 | [
"BSD-2-Clause"
] | 22 | 2015-01-03T00:27:51.000Z | 2021-02-24T18:56:28.000Z | # -*- coding: utf-8 -*-
"""
Project name: Open Methodology for Security Tool Developers
Project URL: https://github.com/cr0hn/OMSTD
Copyright (c) 2014, cr0hn<-AT->cr0hn.com
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following ... | 53.131579 | 755 | 0.751857 |
e7b876d2f0bb7844d5b8c462075698d2bbcfeb5e | 441 | py | Python | test_data/revault_config_outpoint.py | danielabrozzoni/miradord | b4733b59862e3aea5283b308f6e796610eb70928 | [
"BSD-3-Clause"
] | 1 | 2021-06-25T03:16:24.000Z | 2021-06-25T03:16:24.000Z | test_data/revault_config_outpoint.py | danielabrozzoni/miradord | b4733b59862e3aea5283b308f6e796610eb70928 | [
"BSD-3-Clause"
] | 17 | 2021-09-27T16:45:10.000Z | 2022-02-28T16:55:31.000Z | test_data/revault_config_outpoint.py | danielabrozzoni/miradord | b4733b59862e3aea5283b308f6e796610eb70928 | [
"BSD-3-Clause"
] | 3 | 2021-06-24T10:42:02.000Z | 2022-02-17T13:52:53.000Z | #!/usr/bin/env python3
"""
Return an outpoint set in the config as to be revaulted.
"""
import json
import sys
def read_all_stdin():
buf = ""
while len(buf) == 0 or buf[-1] != "\n":
buf += sys.stdin.read()
return buf
if __name__ == "__main__":
request = json.loads(read_all_stdin())
resp... | 20.045455 | 66 | 0.623583 |
48e3d449b813d6febb702bb4769c101bdaff26f0 | 4,546 | py | Python | sdk/python/pulumi_vultr/get_os.py | vincentbernat/pulumi-vultr | 171c75f59d169a62e5486bf9e7f6f421bbe0b7c8 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_vultr/get_os.py | vincentbernat/pulumi-vultr | 171c75f59d169a62e5486bf9e7f6f421bbe0b7c8 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_vultr/get_os.py | vincentbernat/pulumi-vultr | 171c75f59d169a62e5486bf9e7f6f421bbe0b7c8 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** 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 ... | 29.329032 | 114 | 0.634404 |
8bb9ac7ccd1904dc5936243253a6382790b869bd | 90 | py | Python | apps/legal/apps.py | pythoncanarias/core | 737dac3bf6629a956e9c962ff0497a4e77bc77bf | [
"MIT"
] | 1 | 2018-07-17T20:52:22.000Z | 2018-07-17T20:52:22.000Z | apps/legal/apps.py | pythoncanarias/core | 737dac3bf6629a956e9c962ff0497a4e77bc77bf | [
"MIT"
] | 6 | 2018-07-17T16:39:13.000Z | 2018-07-21T00:05:33.000Z | apps/legal/apps.py | pythoncanarias/core | 737dac3bf6629a956e9c962ff0497a4e77bc77bf | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class LegalConfig(AppConfig):
name = 'apps.legal'
| 15 | 33 | 0.744444 |
2687b62ca0eecdce969837e2229dcccdef444e24 | 1,705 | py | Python | userbot/modules/sql_helper/notes_sql.py | abaiik/bot-telegram | cca109d3b77f155b085bff50b398be69d7b27313 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 59 | 2020-11-03T17:48:12.000Z | 2022-03-31T16:42:07.000Z | userbot/modules/sql_helper/notes_sql.py | abaiik/bot-telegram | cca109d3b77f155b085bff50b398be69d7b27313 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 45 | 2021-07-20T10:04:37.000Z | 2022-03-28T22:20:10.000Z | userbot/modules/sql_helper/notes_sql.py | abaiik/bot-telegram | cca109d3b77f155b085bff50b398be69d7b27313 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 368 | 2020-11-03T17:30:34.000Z | 2022-03-31T16:52:36.000Z | try:
from userbot.modules.sql_helper import BASE, SESSION
except ImportError:
raise AttributeError
from sqlalchemy import Column, Numeric, String, UnicodeText
class Notes(BASE):
__tablename__ = "notes"
chat_id = Column(String(14), primary_key=True)
keyword = Column(UnicodeText, primary_key=True, n... | 26.230769 | 79 | 0.651026 |
c1834038e586414d35e44f9c31ab093bd453615b | 114 | py | Python | QuadSwingUpEnv/QuadSwingUp/__init__.py | shauray8/quadruple_inverted_pendulum | 3b5746c534423d39da2582d4bae54ea7ecdacffd | [
"MIT"
] | null | null | null | QuadSwingUpEnv/QuadSwingUp/__init__.py | shauray8/quadruple_inverted_pendulum | 3b5746c534423d39da2582d4bae54ea7ecdacffd | [
"MIT"
] | null | null | null | QuadSwingUpEnv/QuadSwingUp/__init__.py | shauray8/quadruple_inverted_pendulum | 3b5746c534423d39da2582d4bae54ea7ecdacffd | [
"MIT"
] | null | null | null | from gym.envs.registration import register
register(id="SwingUp-v0",
entry_point="QuadSwingUp.envs:env")
| 22.8 | 43 | 0.745614 |
189b1bd40b30cd896cd44802a85300247c416974 | 2,007 | py | Python | synergine/synergy/collection/SynergyCollection.py | buxx/synergine | da05d762cdbc993362807d4851e1ca74784438ae | [
"Apache-2.0"
] | 6 | 2015-04-03T08:04:22.000Z | 2016-11-13T22:47:11.000Z | synergine/synergy/collection/SynergyCollection.py | buxx/synergine | da05d762cdbc993362807d4851e1ca74784438ae | [
"Apache-2.0"
] | 2 | 2019-10-21T15:41:39.000Z | 2021-06-10T14:15:27.000Z | synergine/synergy/collection/SynergyCollection.py | buxx/synergine | da05d762cdbc993362807d4851e1ca74784438ae | [
"Apache-2.0"
] | 2 | 2015-02-27T12:05:51.000Z | 2016-05-11T07:25:20.000Z | from synergine.core.config.ConfigurationManager import ConfigurationManager
from synergine.core.Signals import Signals
from synergine.lib.eint import IncrementedNamedInt
class SynergyCollection:
"""
Object containing list of SynergyObject and some logical actions listing what
concern this collection.
... | 31.359375 | 85 | 0.66567 |
405bf74c4592fa35a8edc8adb990dc2d280bee85 | 114,605 | py | Python | tencentcloud/tke/v20180525/models.py | hapsyou/tencentcloud-sdk-python | 5adf8f17ec02c2dbae7ff6f308afe4a380a682cb | [
"Apache-2.0"
] | null | null | null | tencentcloud/tke/v20180525/models.py | hapsyou/tencentcloud-sdk-python | 5adf8f17ec02c2dbae7ff6f308afe4a380a682cb | [
"Apache-2.0"
] | null | null | null | tencentcloud/tke/v20180525/models.py | hapsyou/tencentcloud-sdk-python | 5adf8f17ec02c2dbae7ff6f308afe4a380a682cb | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf8 -*-
# Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. 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... | 31.433077 | 330 | 0.649352 |
fda283cb600a8a47a4b90f08c7a1cc23001c05ad | 8,943 | py | Python | en_transformer/en_transformer.py | SuperXiang/En-transformer | 273f72f8eb66fcccadaf8b6e72d6bbc091f55862 | [
"MIT"
] | 1 | 2021-03-15T02:50:28.000Z | 2021-03-15T02:50:28.000Z | en_transformer/en_transformer.py | SuperXiang/En-transformer | 273f72f8eb66fcccadaf8b6e72d6bbc091f55862 | [
"MIT"
] | null | null | null | en_transformer/en_transformer.py | SuperXiang/En-transformer | 273f72f8eb66fcccadaf8b6e72d6bbc091f55862 | [
"MIT"
] | null | null | null | import torch
import torch.nn.functional as F
from torch import nn, einsum
from einops import rearrange, repeat
from einops.layers.torch import Rearrange
# helper functions
def exists(val):
return val is not None
def batched_index_select(values, indices, dim = 1):
value_dims = values.shape[(dim + 1):]
va... | 30.944637 | 275 | 0.563793 |
8481337fca2535de7390845e192b98854347ec8c | 160 | py | Python | my_head_is_at_the_wrong_end.py | Kunalpod/codewars | 8dc1af2f3c70e209471045118fd88b3ea1e627e5 | [
"MIT"
] | null | null | null | my_head_is_at_the_wrong_end.py | Kunalpod/codewars | 8dc1af2f3c70e209471045118fd88b3ea1e627e5 | [
"MIT"
] | null | null | null | my_head_is_at_the_wrong_end.py | Kunalpod/codewars | 8dc1af2f3c70e209471045118fd88b3ea1e627e5 | [
"MIT"
] | null | null | null | #Kunal Gautam
#Codewars : @Kunalpod
#Problem name: My head is at the wrong end!
#Problem level: 8 kyu
def fix_the_meerkat(arr):
return list(reversed(arr))
| 20 | 43 | 0.73125 |
ff98a47d4b579f96b9102d86c14813874ad639f0 | 5,098 | py | Python | scripts/hal_hdf5_to_fits.py | igherzog/hawc_hal | d76b8d3361c4a6f301487cc86d921c65bed93351 | [
"BSD-3-Clause"
] | 7 | 2020-06-23T01:04:13.000Z | 2022-01-11T23:30:06.000Z | scripts/hal_hdf5_to_fits.py | igherzog/hawc_hal | d76b8d3361c4a6f301487cc86d921c65bed93351 | [
"BSD-3-Clause"
] | 53 | 2019-03-27T14:14:49.000Z | 2022-03-30T14:58:20.000Z | scripts/hal_hdf5_to_fits.py | igherzog/hawc_hal | d76b8d3361c4a6f301487cc86d921c65bed93351 | [
"BSD-3-Clause"
] | 10 | 2019-01-15T19:09:26.000Z | 2021-07-31T22:36:36.000Z | from __future__ import print_function
from builtins import range
from hawc_hal.maptree import map_tree_factory
from astropy.io import fits
from IPython import embed
import healpy as hp
import numpy as np
import argparse
import os
from datetime import datetime
parser = argparse.ArgumentParser(description='Process s... | 35.158621 | 155 | 0.603374 |
fdcfe57ab5ee5fbc2053976db6bac0b1beb9de00 | 3,444 | py | Python | python/pyweld/weld/encoders.py | renato2099/weld | cb6303e81920284be98c61b6d512e28ce2837581 | [
"BSD-3-Clause"
] | 2,912 | 2017-03-16T19:32:54.000Z | 2022-03-30T09:03:11.000Z | python/pyweld/weld/encoders.py | renato2099/weld | cb6303e81920284be98c61b6d512e28ce2837581 | [
"BSD-3-Clause"
] | 285 | 2017-03-16T18:01:00.000Z | 2021-08-12T10:58:23.000Z | python/pyweld/weld/encoders.py | renato2099/weld | cb6303e81920284be98c61b6d512e28ce2837581 | [
"BSD-3-Clause"
] | 272 | 2017-03-17T06:28:58.000Z | 2022-02-24T04:22:02.000Z | """
Implements some common standard encoders and decoders mapping
Python types to Weld types.
"""
import ctypes
import numpy as np
from . import bindings as cweld
from .types import *
from .weldobject import WeldObjectEncoder, WeldObjectDecoder
def dtype_to_weld_type(dtype):
if dtype == 'int16':
return... | 33.436893 | 80 | 0.62921 |
ff855fbafd3bd0102fb758b7e54f53bd87956624 | 216 | py | Python | 2020/day3/1.py | darkterbear/advent-of-code-2015 | 543d5a70c4b4c84081602cfa3d0ba05fe0693e54 | [
"MIT"
] | null | null | null | 2020/day3/1.py | darkterbear/advent-of-code-2015 | 543d5a70c4b4c84081602cfa3d0ba05fe0693e54 | [
"MIT"
] | 2 | 2019-12-01T20:03:18.000Z | 2021-05-11T22:41:00.000Z | 2020/day3/1.py | darkterbear/advent-of-code-2015 | 543d5a70c4b4c84081602cfa3d0ba05fe0693e54 | [
"MIT"
] | null | null | null | import re
file = open('./input', 'r')
lines = file.readlines()
width = len(lines[0]) - 1
count = 0
j = 0
for i in range(len(lines)):
if lines[i][j] == '#':
count += 1
j = (j + 3) % width
print(count)
| 12 | 27 | 0.532407 |
d61297cc02a087458b952be0e418398329c7e8a1 | 12,938 | py | Python | src/schemania/validator.py | jcollado/schemania | aaa856f30691c9c4b0ea6462c5322aaf774b5ce9 | [
"MIT"
] | null | null | null | src/schemania/validator.py | jcollado/schemania | aaa856f30691c9c4b0ea6462c5322aaf774b5ce9 | [
"MIT"
] | 6 | 2018-07-05T05:51:10.000Z | 2019-04-08T22:43:51.000Z | src/schemania/validator.py | jcollado/schemania | aaa856f30691c9c4b0ea6462c5322aaf774b5ce9 | [
"MIT"
] | null | null | null | """Schema validators.
Validators are the objects that are used to check if a given data matches the
expected structure.
"""
from schemania.error import (
ValidationError,
ValidationExclusiveError,
ValidationFunctionError,
ValidationLengthError,
ValidationLiteralError,
ValidationMatchError,
... | 30.158508 | 79 | 0.610527 |
762ff80dd94736b202eaa5f6ffcbeb04af0677c9 | 495 | py | Python | pyscripts/shake.py | dlabrie/shakingbot | 25f7949a9ef8f9ced7d6ca4536eef7ce159dedfa | [
"MIT"
] | 2 | 2022-02-02T05:26:11.000Z | 2022-03-01T03:31:36.000Z | pyscripts/shake.py | dlabrie/shakingbot | 25f7949a9ef8f9ced7d6ca4536eef7ce159dedfa | [
"MIT"
] | 1 | 2022-01-17T21:53:09.000Z | 2022-01-18T00:07:49.000Z | pyscripts/shake.py | dlabrie/shakingbot | 25f7949a9ef8f9ced7d6ca4536eef7ce159dedfa | [
"MIT"
] | null | null | null | from modules.shakepay import *
import time
import datetime
import json
import logging
from random import *
logging.basicConfig(filename='shakingbot.log', level=logging.INFO,format='%(asctime)s %(message)s', datefmt='%m/%d/%Y %I:%M:%S %p')
while True:
print("\n--- "+str(datetime.datetime.now()))
logging.... | 23.571429 | 131 | 0.676768 |
06edd0fe8fc79328dd446999cf6e171cfb6e0756 | 41,973 | py | Python | a10_octavia/controller/worker/flows/vthunder_flows.py | rahulkatre-a10/a10-octavia | cb210069afa5fb3fb2881bbb0aa94da6b6cd5789 | [
"Apache-2.0"
] | null | null | null | a10_octavia/controller/worker/flows/vthunder_flows.py | rahulkatre-a10/a10-octavia | cb210069afa5fb3fb2881bbb0aa94da6b6cd5789 | [
"Apache-2.0"
] | null | null | null | a10_octavia/controller/worker/flows/vthunder_flows.py | rahulkatre-a10/a10-octavia | cb210069afa5fb3fb2881bbb0aa94da6b6cd5789 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019, A10 Networks
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 52.86272 | 99 | 0.677293 |
d0dc9ec991187b4917d6a3bcb8b47383b2dacaa9 | 2,810 | py | Python | tests/cryptography/test_simple_cipher.py | BrianLusina/PyCharm | 144dd4f6b2d254507237f46c8ee175c407fe053d | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/cryptography/test_simple_cipher.py | BrianLusina/PyCharm | 144dd4f6b2d254507237f46c8ee175c407fe053d | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/cryptography/test_simple_cipher.py | BrianLusina/PyCharm | 144dd4f6b2d254507237f46c8ee175c407fe053d | [
"Apache-2.0",
"MIT"
] | null | null | null | import unittest
from cryptography.simple_cipher import Caesar, Cipher
class CipherTest(unittest.TestCase):
def test_caesar_encode1(self):
self.assertEqual(
"lwlvdzhvrphsurjudpplqjlqsbwkrq",
Caesar().encode("itisawesomeprogramminginpython"),
)
def test_caesar_encode2(s... | 32.298851 | 88 | 0.651601 |
23266f97799a6c30440e8708a2928d8b60f2f366 | 163 | py | Python | comp_scrawler/bnbtutorial/__init__.py | castaway2000/comp_scrawler | 12286e7d0822aa783a7630886fdb508487796a95 | [
"MIT"
] | null | null | null | comp_scrawler/bnbtutorial/__init__.py | castaway2000/comp_scrawler | 12286e7d0822aa783a7630886fdb508487796a95 | [
"MIT"
] | null | null | null | comp_scrawler/bnbtutorial/__init__.py | castaway2000/comp_scrawler | 12286e7d0822aa783a7630886fdb508487796a95 | [
"MIT"
] | null | null | null | # This package will contain the spiders of your Scrapy project
#
# Please refer to the documentation for information on how to create and manage
# your spiders. | 40.75 | 80 | 0.779141 |
8d886a2e45d3c9314f07091890bac9d07654f262 | 769 | py | Python | tree_structure_test/urls.py | alexepc/sql-tree-perfomance | cadb4c7fa1ccca0bbfaca95e8f6b3f655af3c98c | [
"MIT"
] | 2 | 2018-03-10T20:03:57.000Z | 2018-03-10T20:04:39.000Z | tree_structure_test/urls.py | alexepc/sql-tree-perfomance | cadb4c7fa1ccca0bbfaca95e8f6b3f655af3c98c | [
"MIT"
] | null | null | null | tree_structure_test/urls.py | alexepc/sql-tree-perfomance | cadb4c7fa1ccca0bbfaca95e8f6b3f655af3c98c | [
"MIT"
] | 2 | 2018-03-10T20:02:56.000Z | 2021-07-13T10:30:42.000Z | """tree_structure_test URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home... | 34.954545 | 77 | 0.710013 |
f63dc40588953fb85abceec3278a211c14337249 | 1,382 | py | Python | src/web/utils/general_context.py | abbacode/avaloria | 02e1805ac6e74543c96408b7951429f94bc140ca | [
"ClArtistic"
] | null | null | null | src/web/utils/general_context.py | abbacode/avaloria | 02e1805ac6e74543c96408b7951429f94bc140ca | [
"ClArtistic"
] | null | null | null | src/web/utils/general_context.py | abbacode/avaloria | 02e1805ac6e74543c96408b7951429f94bc140ca | [
"ClArtistic"
] | null | null | null | #
# This file defines global variables that will always be
# available in a view context without having to repeatedly
# include it. For this to work, this file is included in
# the settings file, in the TEMPLATE_CONTEXT_PROCESSORS
# tuple.
#
from django.db import models
from django.conf import settings
from src.ut... | 28.204082 | 58 | 0.714182 |
418776bef03460f134c698e48be068afb0813e9e | 4,404 | py | Python | twitter_fetch.py | nik7273/computational-medical-knowledge | 03357fc63382bed49509d7860f87a3d010f03018 | [
"Apache-2.0"
] | null | null | null | twitter_fetch.py | nik7273/computational-medical-knowledge | 03357fc63382bed49509d7860f87a3d010f03018 | [
"Apache-2.0"
] | null | null | null | twitter_fetch.py | nik7273/computational-medical-knowledge | 03357fc63382bed49509d7860f87a3d010f03018 | [
"Apache-2.0"
] | 1 | 2019-09-17T18:38:44.000Z | 2019-09-17T18:38:44.000Z | import json,os,twitter, dropbox, gzip
from datetime import datetime
from tweepy import Stream
from tweepy import OAuthHandler
from tweepy.streaming import StreamListener
from pprint import pprint
from optparse import OptionParser
from progress.bar import Bar
"""
Example call:
python twitter_fetch.py ... | 36.396694 | 129 | 0.678474 |
cc8d62f32f9583d94f7c7d3770d68e1eb41541ff | 2,815 | py | Python | Game_code.py | ArthAnant/open-cv-minecraft | 0a9f62abb3200b1d3f2685b79f6e9ae7551b596c | [
"Intel"
] | null | null | null | Game_code.py | ArthAnant/open-cv-minecraft | 0a9f62abb3200b1d3f2685b79f6e9ae7551b596c | [
"Intel"
] | null | null | null | Game_code.py | ArthAnant/open-cv-minecraft | 0a9f62abb3200b1d3f2685b79f6e9ae7551b596c | [
"Intel"
] | null | null | null | from ursina import *
from ursina import text
from ursina import texture
from ursina.prefabs.first_person_controller import FirstPersonController
app = Ursina()
grass_texture = load_texture('assets/grass_block.png')
stone_texture = load_texture('assets/stone_block.png')
brick_texture = load_texture('assets/brick_block... | 33.915663 | 115 | 0.601421 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.