hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 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 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 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 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
798286312087596e9c0fb479d4e733acfcd47291 | 20,295 | py | Python | flask_appbuilder/security/sqla/manager.py | zchencq/Flask-AppBuilder | 06dc6f85493ff75db21fb5f19e0a40be1b1172b0 | [
"BSD-3-Clause"
] | 1 | 2020-06-29T20:02:39.000Z | 2020-06-29T20:02:39.000Z | flask_appbuilder/security/sqla/manager.py | zchencq/Flask-AppBuilder | 06dc6f85493ff75db21fb5f19e0a40be1b1172b0 | [
"BSD-3-Clause"
] | null | null | null | flask_appbuilder/security/sqla/manager.py | zchencq/Flask-AppBuilder | 06dc6f85493ff75db21fb5f19e0a40be1b1172b0 | [
"BSD-3-Clause"
] | null | null | null | import logging
from typing import List, Optional
import uuid
from sqlalchemy import and_, func, literal
from sqlalchemy.engine.reflection import Inspector
from werkzeug.security import generate_password_hash
from .models import (
assoc_permissionview_role,
Permission,
PermissionView,
RegisterUser,
... | 34.166667 | 90 | 0.578271 |
798286b382892b3bb653fd000fd48c097771f5b7 | 1,834 | py | Python | tests/integration/other/test_exchange_rate_manager.py | defendercrypt/lbry-sdk | 6944c4a7c42c6fd9bdd6c4371f8bfa62905fd528 | [
"MIT"
] | null | null | null | tests/integration/other/test_exchange_rate_manager.py | defendercrypt/lbry-sdk | 6944c4a7c42c6fd9bdd6c4371f8bfa62905fd528 | [
"MIT"
] | null | null | null | tests/integration/other/test_exchange_rate_manager.py | defendercrypt/lbry-sdk | 6944c4a7c42c6fd9bdd6c4371f8bfa62905fd528 | [
"MIT"
] | null | null | null | import asyncio
import logging
from decimal import Decimal
from lbry.testcase import AsyncioTestCase
from lbry.extras.daemon.exchange_rate_manager import ExchangeRate, ExchangeRateManager, FEEDS, MarketFeed
class TestExchangeRateManager(AsyncioTestCase):
async def test_exchange_rate_manager(self):
manager ... | 39.869565 | 111 | 0.655398 |
798287651bb66fef35932022d87c81116af29cff | 16,513 | py | Python | Amazon-Employee-Access-Challenge-EDA.py | mayank171986/Amazon-Employee-Access | 84a65d4e2f8eb196c1f83b1e03faf452e760f972 | [
"MIT"
] | null | null | null | Amazon-Employee-Access-Challenge-EDA.py | mayank171986/Amazon-Employee-Access | 84a65d4e2f8eb196c1f83b1e03faf452e760f972 | [
"MIT"
] | null | null | null | Amazon-Employee-Access-Challenge-EDA.py | mayank171986/Amazon-Employee-Access | 84a65d4e2f8eb196c1f83b1e03faf452e760f972 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
# In[1]:
# import libraries
import pandas as pd
import numpy as np
import seaborn as sb
import matplotlib.pyplot as plt
get_ipython().run_line_magic('matplotlib', 'inline')
import warnings
warnings.filterwarnings('ignore')
# # Amazon Employee Access Challenge
# ## Overview
#... | 23.657593 | 756 | 0.724944 |
7982877c4674b7b8d256140ac5214051506dd2de | 288 | py | Python | model.py | ndminh21/aaa | b31fa62092f5839bda567d97e0b52868f52cc79e | [
"BSD-Source-Code"
] | null | null | null | model.py | ndminh21/aaa | b31fa62092f5839bda567d97e0b52868f52cc79e | [
"BSD-Source-Code"
] | null | null | null | model.py | ndminh21/aaa | b31fa62092f5839bda567d97e0b52868f52cc79e | [
"BSD-Source-Code"
] | null | null | null | from app import db
from sqlalchemy.dialects.postgresql import JSON
class Transaction(db.Model):
__tablename__ = 'transaction'
id = db.Column(db.String(), primary_key=True)
size = db.Column(db.String())
time = db.Column(db.String())
valueout = db.Column(db.String()) | 26.181818 | 49 | 0.697917 |
798287e53c6bfad7c14c436545e66801fc77adee | 4,454 | py | Python | scripts/get-history.py | encukou/portingdb | 052645fd293c19444e9364e15b13ea9d51e56fea | [
"MIT"
] | 31 | 2015-09-23T14:14:37.000Z | 2021-12-17T03:50:04.000Z | scripts/get-history.py | fedora-python/portingdb | 1c243544b02e6a6ebd978901a7a3d49bc36d7056 | [
"MIT"
] | 346 | 2015-10-12T14:29:43.000Z | 2022-02-01T10:55:54.000Z | scripts/get-history.py | encukou/portingdb | 052645fd293c19444e9364e15b13ea9d51e56fea | [
"MIT"
] | 63 | 2015-10-15T17:01:56.000Z | 2020-10-18T21:03:28.000Z | #! /usr/bin/env python3
"""Get historical status data as a CSV file
Walks the Git history of the repo, loading each revision where data/ changed,
and recording the number of packages for each status.
When an existing data file is specified with --update, the file is repeated,
with commits that aren't in it appended.
... | 30.930556 | 78 | 0.603053 |
79828855d174a1e472152eadf452094baa0ef6e9 | 808 | py | Python | docassemble_webapp/docassemble/webapp/deregister.py | Puzzlax-Ltd/docassemble | c575de032d10547f3f4676b789c8e8629b499c2c | [
"MIT"
] | null | null | null | docassemble_webapp/docassemble/webapp/deregister.py | Puzzlax-Ltd/docassemble | c575de032d10547f3f4676b789c8e8629b499c2c | [
"MIT"
] | null | null | null | docassemble_webapp/docassemble/webapp/deregister.py | Puzzlax-Ltd/docassemble | c575de032d10547f3f4676b789c8e8629b499c2c | [
"MIT"
] | null | null | null | import os
import sys
from sqlalchemy import delete
if __name__ == "__main__":
import docassemble.base.config
docassemble.base.config.load(arguments=sys.argv)
from docassemble.base.config import hostname
from docassemble.webapp.app_object import app
from docassemble.webapp.db_object import db
from docassemble.we... | 33.666667 | 104 | 0.753713 |
79828d5ad7264602d43b005e09cc87df00f8a8f0 | 807 | py | Python | tests/plugins/test_cubetv.py | sn4kebite/streamlink | 054b760ce7e9f43451eed08e9f39de440c3e5add | [
"BSD-2-Clause"
] | 5 | 2017-03-21T19:43:17.000Z | 2018-10-03T14:04:29.000Z | tests/plugins/test_cubetv.py | sn4kebite/streamlink | 054b760ce7e9f43451eed08e9f39de440c3e5add | [
"BSD-2-Clause"
] | 7 | 2016-10-13T23:29:31.000Z | 2018-06-28T14:04:32.000Z | tests/plugins/test_cubetv.py | sn4kebite/streamlink | 054b760ce7e9f43451eed08e9f39de440c3e5add | [
"BSD-2-Clause"
] | 2 | 2016-11-24T18:37:33.000Z | 2017-03-21T19:43:49.000Z | import unittest
from streamlink.plugins.cubetv import CubeTV
class TestPluginCubeTV(unittest.TestCase):
def test_can_handle_url(self):
# should match
self.assertTrue(CubeTV.can_handle_url("https://www.cube.tv/Tecnosh"))
self.assertTrue(CubeTV.can_handle_url("https://www.cube.tv/garotadobl... | 44.833333 | 82 | 0.707559 |
79828d5feaf47dcd3e9da3648ca32e28a5a7385e | 438 | py | Python | livere.py | Carreau/phd-dissertation | f283cf3819af019027a4e017141ec51029a0e46c | [
"CC-BY-3.0"
] | null | null | null | livere.py | Carreau/phd-dissertation | f283cf3819af019027a4e017141ec51029a0e46c | [
"CC-BY-3.0"
] | 1 | 2015-01-23T10:18:16.000Z | 2015-01-23T10:18:16.000Z | livere.py | Carreau/phd-dissertation | f283cf3819af019027a4e017141ec51029a0e46c | [
"CC-BY-3.0"
] | null | null | null | from livereload import Server, shell
server = Server()
# run a shell command
server.watch('static/*.stylus', 'make static')
# run a function
#server.watch('foo.txt', alert)
# output stdout into a file
server.watch('_build/html/*.html')#, shell('lessc style.less', output='style.css'))
server.watch('*.rst', shell('ma... | 24.333333 | 83 | 0.691781 |
79828d7b5243a244ca21bb9fa29e4c8c7f7a2101 | 3,314 | py | Python | layernet/io/iamdb/build_netcdf.py | huashiyiqike/netlab | d265bc02bd3dafdeec7371f9fb9d65e8f9e10626 | [
"Apache-2.0"
] | 21 | 2015-09-25T08:40:53.000Z | 2022-03-24T23:49:19.000Z | layernet/io/iamdb/build_netcdf.py | huashiyiqike/netlab | d265bc02bd3dafdeec7371f9fb9d65e8f9e10626 | [
"Apache-2.0"
] | 1 | 2015-11-10T10:17:05.000Z | 2015-11-11T02:19:26.000Z | layernet/io/iamdb/build_netcdf.py | huashiyiqike/netlab | d265bc02bd3dafdeec7371f9fb9d65e8f9e10626 | [
"Apache-2.0"
] | 20 | 2015-09-27T15:08:40.000Z | 2020-09-16T09:26:02.000Z | import os
from sets import Set
from get_lineStroke import getLineStroke
from get_targetStrings import getTargetString
from get_xmlFileName import getXmlNames
import netcdf_helpers
import numpy as np
targetStrings = []
wordTargetStrings = []
charSet = Set()
inputs = []
labels = []
seqDims = []
seqLengths = []
seqTag... | 34.884211 | 143 | 0.719976 |
79828ddbc064bac76fd2f3a417e217785fe3e0be | 17,606 | py | Python | octoprint_PrusaMeshMap/__init__.py | stephenwilley/OctoPrint-PrusaMeshMap | 8e5b261e31633be926809c02a7297858b3970a76 | [
"MIT"
] | 1 | 2018-09-24T14:41:17.000Z | 2018-09-24T14:41:17.000Z | octoprint_PrusaMeshMap/__init__.py | stephenwilley/OctoPrint-PrusaMeshMap | 8e5b261e31633be926809c02a7297858b3970a76 | [
"MIT"
] | null | null | null | octoprint_PrusaMeshMap/__init__.py | stephenwilley/OctoPrint-PrusaMeshMap | 8e5b261e31633be926809c02a7297858b3970a76 | [
"MIT"
] | 2 | 2018-11-18T01:11:29.000Z | 2019-01-20T14:48:58.000Z | # coding=utf-8
from __future__ import absolute_import
### (Don't forget to remove me)
# This is a basic skeleton for your plugin's __init__.py. You probably want to adjust the class name of your plugin
# as well as the plugin mixins it's subclassing from. This is really just a basic skeleton to get you started,
# defi... | 45.028133 | 691 | 0.635408 |
79828e5fee4cc3b3a3294af0c47ce8b4933c41e7 | 2,296 | py | Python | ml-agents/mlagents/envs/communicator_objects/space_type_proto_pb2.py | apstwilly/ml-agents | d3f9fd63043f1c82790d3fe35ee07dc5ed1232b9 | [
"Apache-2.0"
] | 33 | 2018-09-04T12:10:49.000Z | 2022-02-05T03:27:40.000Z | ml-agents/mlagents/envs/communicator_objects/space_type_proto_pb2.py | Beinger/ml-agents | d3f9fd63043f1c82790d3fe35ee07dc5ed1232b9 | [
"Apache-2.0"
] | 1 | 2022-02-05T03:51:16.000Z | 2022-02-06T22:48:42.000Z | ml-agents/mlagents/envs/communicator_objects/space_type_proto_pb2.py | Beinger/ml-agents | d3f9fd63043f1c82790d3fe35ee07dc5ed1232b9 | [
"Apache-2.0"
] | 3 | 2020-05-05T15:48:08.000Z | 2021-12-11T18:44:21.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mlagents/envs/communicator_objects/space_type_proto.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descript... | 37.032258 | 322 | 0.814895 |
7982900fb1aac5904b23b7cd9de2aa608d2c6a91 | 365 | py | Python | python/testData/console/indent10.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/console/indent10.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/console/indent10.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | x = '''Multiline starts;
next line with indent;
next line with indent;
multiline ends'''
x = '''Multiline starts;
first
second
third
fourth
fifth
multiline ends'''
x = '''Multiline starts;
#line
... | 21.470588 | 30 | 0.432877 |
7982904e97acb63c19f25995df34b524f76416f2 | 2,552 | py | Python | sample_project/env/lib/python3.9/site-packages/qtpy/tests/test_main.py | Istiakmorsalin/ML-Data-Science | 681e68059b146343ef55b0671432dc946970730d | [
"MIT"
] | 4 | 2021-11-19T03:25:13.000Z | 2022-02-24T15:32:30.000Z | sample_project/env/lib/python3.9/site-packages/qtpy/tests/test_main.py | Istiakmorsalin/ML-Data-Science | 681e68059b146343ef55b0671432dc946970730d | [
"MIT"
] | null | null | null | sample_project/env/lib/python3.9/site-packages/qtpy/tests/test_main.py | Istiakmorsalin/ML-Data-Science | 681e68059b146343ef55b0671432dc946970730d | [
"MIT"
] | 3 | 2020-08-04T02:48:32.000Z | 2020-08-17T01:20:09.000Z | import os
from qtpy import QtCore, QtGui, QtWidgets, QtWebEngineWidgets
def assert_pyside():
"""
Make sure that we are using PySide
"""
import PySide
assert QtCore.QEvent is PySide.QtCore.QEvent
assert QtGui.QPainter is PySide.QtGui.QPainter
assert QtWidgets.QWidget is PySide.... | 30.746988 | 92 | 0.649295 |
798290844db4fa609d0e501b73006d34b19f0bd0 | 1,343 | py | Python | process_pipelines/chatterbot.py | LaudateCorpus1/chinese_chatbot_corpus | 3f1516947753744919611b5dc7f74e513d157036 | [
"Apache-2.0"
] | 2,321 | 2019-04-16T06:14:55.000Z | 2022-03-31T08:10:34.000Z | process_pipelines/chatterbot.py | wysstartgo/chinese_chatbot_corpus | a05452654b8b374eee646dd6bf43e4e9f4e57661 | [
"Apache-2.0"
] | 9 | 2019-05-08T02:14:07.000Z | 2021-08-04T07:39:33.000Z | process_pipelines/chatterbot.py | wysstartgo/chinese_chatbot_corpus | a05452654b8b374eee646dd6bf43e4e9f4e57661 | [
"Apache-2.0"
] | 506 | 2019-04-19T09:14:40.000Z | 2022-03-28T02:31:45.000Z | import codecs
import os
from config import Config
from util import *
def prepocess(raw_corpus_file_name, result_file_name):
post_symbol = "- -"
response_symbol = " -"
raw_corpus_file = codecs.open(raw_corpus_file_name, encoding=Config.encoding, errors="replace")
result_file = codecs.open(result_fil... | 31.232558 | 99 | 0.696203 |
798290ad51e40103d6120de80c07962c63e3fbf8 | 1,722 | py | Python | mephisto/plugins/dice.py | Kenton1989/mephisto-bot | 50a8008c99b984a453713f480fa578bf5a8353c8 | [
"MIT"
] | null | null | null | mephisto/plugins/dice.py | Kenton1989/mephisto-bot | 50a8008c99b984a453713f480fa578bf5a8353c8 | [
"MIT"
] | null | null | null | mephisto/plugins/dice.py | Kenton1989/mephisto-bot | 50a8008c99b984a453713f480fa578bf5a8353c8 | [
"MIT"
] | null | null | null | import os
import logging
import math
import time
from random import randint
from nonebot import on_command, CommandSession
import math_expr as me
log = logging.getLogger('/dice')
MAX_PARAM_TXT_LEN = 12
EPS = 1e-14
@on_command('dice', aliases=('色子', '骰子'), shell_like=True, only_to_me=False)
async def dice(session:... | 23.27027 | 76 | 0.619048 |
798291cc0af611539978a5ef577034c43a7f1f59 | 2,651 | py | Python | api/python/test/test_activities_api.py | Fl3x0r/StravAPP | 17a12f8a6c78914cc380ce3d9300487e26a536ac | [
"MIT"
] | null | null | null | api/python/test/test_activities_api.py | Fl3x0r/StravAPP | 17a12f8a6c78914cc380ce3d9300487e26a536ac | [
"MIT"
] | 1 | 2021-09-09T14:04:55.000Z | 2021-09-10T17:58:37.000Z | custom-swagger/python/test/test_activities_api.py | Zepp333333/HARDIO | 9a36e8fd9c9478f98dbe929e5a31e4e87fdc1932 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Strava API v3
The [Swagger Playground](https://developers.strava.com/playground) is the easiest way to familiarize yourself with the Strava API by submitting HTTP requests and observing the responses before you write any client code. It will show what a response will look like with differe... | 29.131868 | 726 | 0.68427 |
798293351bcc9d370a3aebdaae0bc2d0fb9742ef | 289 | py | Python | dingdianxiaoshuo/dingdian/dingdian/pipelines.py | fst034356/crawler | 98f0c1a129b3b5b77fe88971f4f0c6aae5a8964f | [
"MIT"
] | 92 | 2017-03-06T06:32:49.000Z | 2020-04-05T02:14:56.000Z | dingdianxiaoshuo/dingdian/dingdian/pipelines.py | GeraldDoubleJ/crawler | ab068b1b4d8d00336bb11cea0860244e0817e472 | [
"MIT"
] | 1 | 2018-06-03T10:38:26.000Z | 2018-09-04T09:17:40.000Z | dingdianxiaoshuo/dingdian/dingdian/pipelines.py | GeraldDoubleJ/crawler | ab068b1b4d8d00336bb11cea0860244e0817e472 | [
"MIT"
] | 58 | 2017-04-09T11:18:40.000Z | 2020-03-23T11:20:17.000Z | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
class DingdianPipeline(object):
def process_item(self, item, spider):
return item
| 22.230769 | 65 | 0.709343 |
798293c29282c57fdf60c0d5a9258d3e3b84b97a | 9,533 | py | Python | httprunner/api.py | ovalike/HttpRunner | 6b23edf44c9aa71eba2c6d5d2e6b3335243ac992 | [
"Apache-2.0"
] | 1 | 2019-11-28T07:56:26.000Z | 2019-11-28T07:56:26.000Z | httprunner/api.py | fakegeeker/HttpRunner | 152ab02f5fc6e39770c138cfe7e90908a2c21bb8 | [
"Apache-2.0"
] | null | null | null | httprunner/api.py | fakegeeker/HttpRunner | 152ab02f5fc6e39770c138cfe7e90908a2c21bb8 | [
"Apache-2.0"
] | 1 | 2019-03-12T03:37:07.000Z | 2019-03-12T03:37:07.000Z | # encoding: utf-8
import os
import unittest
from httprunner import (exceptions, loader, logger, parser, report, runner,
utils, validator)
class HttpRunner(object):
def __init__(self, failfast=False, save_tests=False, report_template=None, report_dir=None,
log_level="INFO", log_f... | 31.566225 | 104 | 0.56488 |
798294751d3ae6fb4d1116def73fb2a4c2ef111b | 379 | py | Python | build/simulink/catkin_generated/pkg.installspace.context.pc.py | Swaffles/MQS_Control | 9f1c101f12533a405d5865904c45a5c3ea212ae8 | [
"CC0-1.0"
] | null | null | null | build/simulink/catkin_generated/pkg.installspace.context.pc.py | Swaffles/MQS_Control | 9f1c101f12533a405d5865904c45a5c3ea212ae8 | [
"CC0-1.0"
] | null | null | null | build/simulink/catkin_generated/pkg.installspace.context.pc.py | Swaffles/MQS_Control | 9f1c101f12533a405d5865904c45a5c3ea212ae8 | [
"CC0-1.0"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "".split(';') if "" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "".split(';') if "" != "" else []
PROJECT_NAME = "simulink"
PROJECT_SPACE_DIR = "/home/... | 42.111111 | 68 | 0.709763 |
7982958bda2fdf90291760fa4785764fe8739062 | 16,696 | py | Python | test/python/quantum_info/operators/channel/test_choi.py | TheGupta2012/qiskit-terra | 5ea6e9557655b144228c29d7099375f5d2c91120 | [
"Apache-2.0"
] | 1,599 | 2018-07-10T10:59:12.000Z | 2022-03-31T23:56:25.000Z | test/python/quantum_info/operators/channel/test_choi.py | TheGupta2012/qiskit-terra | 5ea6e9557655b144228c29d7099375f5d2c91120 | [
"Apache-2.0"
] | 5,244 | 2018-07-10T06:20:13.000Z | 2022-03-31T22:18:48.000Z | test/python/quantum_info/operators/channel/test_choi.py | TheGupta2012/qiskit-terra | 5ea6e9557655b144228c29d7099375f5d2c91120 | [
"Apache-2.0"
] | 1,409 | 2018-07-10T02:16:12.000Z | 2022-03-31T09:01:32.000Z | # This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivat... | 36.060475 | 87 | 0.572892 |
798295ea4459a2d9bc05d450bb4318520bf7bc90 | 2,526 | py | Python | custom_components/mitemp_bt/const.py | dvv/ble_monitor | e9d0c4a335fb05539abaf903ac01a3e165be4c44 | [
"MIT"
] | null | null | null | custom_components/mitemp_bt/const.py | dvv/ble_monitor | e9d0c4a335fb05539abaf903ac01a3e165be4c44 | [
"MIT"
] | null | null | null | custom_components/mitemp_bt/const.py | dvv/ble_monitor | e9d0c4a335fb05539abaf903ac01a3e165be4c44 | [
"MIT"
] | null | null | null | """Constants for the Xiaomi passive BLE monitor sensor integration."""
from homeassistant.const import (
DEVICE_CLASS_POWER,
)
# Configuration options
CONF_ROUNDING = "rounding"
CONF_DECIMALS = "decimals"
CONF_PERIOD = "period"
CONF_LOG_SPIKES = "log_spikes"
CONF_USE_MEDIAN = "use_median"
CONF_ACTIVE_SC... | 29.372093 | 104 | 0.617181 |
798295f74ccd76d5ab5371ccc9ed2cd18d58cb2e | 2,758 | py | Python | web/admin/account.py | tangjx/migrant | b4f21368130877521b3c3ab648dd3b3cd9448b65 | [
"MIT"
] | null | null | null | web/admin/account.py | tangjx/migrant | b4f21368130877521b3c3ab648dd3b3cd9448b65 | [
"MIT"
] | null | null | null | web/admin/account.py | tangjx/migrant | b4f21368130877521b3c3ab648dd3b3cd9448b65 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding:utf-8 -*-
"""
account action
author comger@gmail.com
"""
from kpages import url,not_empty
from kpages.model import ModelMaster
from utility import ActionHandler
from logic.utility import m_update,m_del,m_info,m_exists
AModel = ModelMaster()('AccountModel')
@url(r"/admin/?"... | 26.776699 | 95 | 0.617114 |
79829663816e88e3164be15ba417fe059b859a9f | 2,993 | py | Python | cvxpy/tests/test_monotonicity.py | hashstat/cvxpy | 20d667ebe8614821fa38e41b1e333257512d9594 | [
"ECL-2.0",
"Apache-2.0"
] | 3,285 | 2015-01-03T04:02:29.000Z | 2021-04-19T14:51:29.000Z | cvxpy/tests/test_monotonicity.py | h-vetinari/cvxpy | 86307f271819bb78fcdf64a9c3a424773e8269fa | [
"ECL-2.0",
"Apache-2.0"
] | 1,138 | 2015-01-01T19:40:14.000Z | 2021-04-18T23:37:31.000Z | cvxpy/tests/test_monotonicity.py | h-vetinari/cvxpy | 86307f271819bb78fcdf64a9c3a424773e8269fa | [
"ECL-2.0",
"Apache-2.0"
] | 765 | 2015-01-02T19:29:39.000Z | 2021-04-20T00:50:43.000Z | """
Copyright 2013 Steven Diamond
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... | 33.629213 | 72 | 0.66288 |
79829711113d1f303498fc32a9aec94c6f271056 | 365 | py | Python | src/tarski/fstrips/__init__.py | phoeft670/tarski | 7d955e535fbbca012bfd1a12402b97febc6b35b9 | [
"Apache-2.0"
] | 29 | 2018-11-26T20:31:04.000Z | 2021-12-29T11:08:40.000Z | src/tarski/fstrips/__init__.py | phoeft670/tarski | 7d955e535fbbca012bfd1a12402b97febc6b35b9 | [
"Apache-2.0"
] | 101 | 2018-06-07T13:10:01.000Z | 2022-03-11T11:54:00.000Z | src/tarski/fstrips/__init__.py | phoeft670/tarski | 7d955e535fbbca012bfd1a12402b97febc6b35b9 | [
"Apache-2.0"
] | 18 | 2018-11-01T22:44:39.000Z | 2022-02-28T04:57:15.000Z |
from .problem import Problem, create_fstrips_problem
from .action import Action
from .derived import Derived
from .fstrips import BaseEffect, SingleEffect, AddEffect, DelEffect, FunctionalEffect, IncreaseEffect, \
LiteralEffect, UniversalEffect, ChoiceEffect, VectorisedEffect, LinearEffect, BlackBoxEffect,\
la... | 45.625 | 104 | 0.830137 |
79829721f7f7443da22c4122dcdc84d6fc2131a7 | 2,443 | py | Python | carts/tests/test_delivery_date.py | stanwood/traidoo-api | 83e8599f2eb54352988bac27e2d4acd30734816d | [
"MIT"
] | 3 | 2020-05-05T12:12:09.000Z | 2020-05-08T08:48:16.000Z | carts/tests/test_delivery_date.py | stanwood/traidoo-api | 83e8599f2eb54352988bac27e2d4acd30734816d | [
"MIT"
] | 160 | 2020-05-19T13:03:43.000Z | 2022-03-12T00:35:28.000Z | carts/tests/test_delivery_date.py | stanwood/traidoo-api | 83e8599f2eb54352988bac27e2d4acd30734816d | [
"MIT"
] | null | null | null | import datetime
import pytest
from django.conf import settings
from django.utils import timezone
from model_bakery import baker
from carts.models import CartItem
from items.models import Item
@pytest.mark.django_db
def test_delivery_date(buyer, client_buyer, traidoo_region):
cart = baker.make_recipe("carts.cart... | 28.08046 | 86 | 0.60745 |
79829757a72add76f5e34b20ba3408a09b78737b | 2,147 | py | Python | setup.py | MrSumit/coc.py | 6214d1a31a798d51d8acbcb567841bc3cb6fbfa8 | [
"MIT"
] | 1 | 2021-01-15T23:18:57.000Z | 2021-01-15T23:18:57.000Z | setup.py | MrSumit/coc.py | 6214d1a31a798d51d8acbcb567841bc3cb6fbfa8 | [
"MIT"
] | null | null | null | setup.py | MrSumit/coc.py | 6214d1a31a798d51d8acbcb567841bc3cb6fbfa8 | [
"MIT"
] | null | null | null | import os
import subprocess
from setuptools import setup, Command
REQUIREMENTS = []
with open(os.path.join(os.getcwd(), "requirements.txt")) as f:
REQUIREMENTS = f.read().splitlines()
VERSION = "1.0.4"
if "a" in VERSION:
VERSION += "+" + subprocess.check_output(["git", "rev-parse", "--short", "HEAD"]).decode... | 33.546875 | 175 | 0.606428 |
7982975fbb616b58f137be0c9cf7199db0377eee | 3,414 | py | Python | sopel/modules/isup.py | gitloon/sopel | 8cf460fc9ee5c53c36cdfffcf019e6df4801515e | [
"EFL-2.0"
] | null | null | null | sopel/modules/isup.py | gitloon/sopel | 8cf460fc9ee5c53c36cdfffcf019e6df4801515e | [
"EFL-2.0"
] | 2 | 2022-02-09T21:53:02.000Z | 2022-02-09T21:54:52.000Z | sopel/modules/isup.py | gitloon/sopel | 8cf460fc9ee5c53c36cdfffcf019e6df4801515e | [
"EFL-2.0"
] | null | null | null | """
isup.py - Sopel Website Status Check Plugin
Copyright 2011, Elsie Powell http://embolalia.com
Licensed under the Eiffel Forum License 2.
https://sopel.chat
"""
from __future__ import annotations
import requests
from sopel import plugin
PLUGIN_OUTPUT_PREFIX = '[isup] '
def get_site_url(site):
"""Get a ``s... | 31.321101 | 82 | 0.621851 |
798297b9c037c5517cb7fd5965450ac5699a56be | 7,473 | py | Python | deps/pygments/scripts/check_sources.py | trentm/molybdenum | ce62d0ae38586280f022ee31ec97b9db22915686 | [
"MIT"
] | 5 | 2015-03-12T07:02:09.000Z | 2019-04-27T20:16:19.000Z | deps/pygments/scripts/check_sources.py | trentm/molybdenum | ce62d0ae38586280f022ee31ec97b9db22915686 | [
"MIT"
] | 3 | 2015-07-20T21:36:23.000Z | 2017-01-25T02:43:14.000Z | deps/pygments/scripts/check_sources.py | trentm/molybdenum | ce62d0ae38586280f022ee31ec97b9db22915686 | [
"MIT"
] | 2 | 2016-06-29T10:05:34.000Z | 2021-03-03T01:18:10.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Checker for file headers
~~~~~~~~~~~~~~~~~~~~~~~~
Make sure each Python file has a correct file header
including copyright and license information.
:copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE fo... | 30.753086 | 77 | 0.500067 |
798297ef4c00b6a538acd21872d899d8656fdeaa | 1,127 | py | Python | scripts/LED_off.py | ksbjr/KickPi-OS_up | e52389f2d263b3cb0eda766e7c5d356e3ade21e6 | [
"BSD-3-Clause"
] | null | null | null | scripts/LED_off.py | ksbjr/KickPi-OS_up | e52389f2d263b3cb0eda766e7c5d356e3ade21e6 | [
"BSD-3-Clause"
] | null | null | null | scripts/LED_off.py | ksbjr/KickPi-OS_up | e52389f2d263b3cb0eda766e7c5d356e3ade21e6 | [
"BSD-3-Clause"
] | 2 | 2022-01-13T15:37:07.000Z | 2022-03-02T18:15:11.000Z | # Install Pimiga - not for use!!!
# B.Titze 2020
# Status LED
# LED Orange GPIO 14
# LED Red GPIO 15
# Power LED Blue
# LED Blue GPIO 5
# LED Red GPIO 26
# LED Orange GPIO 19
# LED Yellow GPIO 13
# LED Green GPIO 6
# LED Blue GPIO 5
# LED Ambient Blue GPIO 11
# PWR-LED (green)
# dtoverlay = pwr-led, gpio = 17 (3.3V... | 16.333333 | 39 | 0.691216 |
79829908847fce51d7c39528633991f516d520bb | 20,820 | py | Python | xadmin/sites.py | ldsxp/xadmin-py3 | 8da0dc1e53b4cea77b5e30c4ac93773a5bf0b5ec | [
"BSD-3-Clause"
] | 2 | 2019-05-31T06:22:25.000Z | 2021-01-23T13:26:13.000Z | xadmin/sites.py | ldsxp/xadmin-py3 | 8da0dc1e53b4cea77b5e30c4ac93773a5bf0b5ec | [
"BSD-3-Clause"
] | 1 | 2021-02-08T20:31:24.000Z | 2021-02-08T20:31:24.000Z | xadmin/sites.py | ldsxp/xadmin-py3 | 8da0dc1e53b4cea77b5e30c4ac93773a5bf0b5ec | [
"BSD-3-Clause"
] | null | null | null | import sys
from functools import update_wrapper
from future.utils import iteritems
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.models.base import ModelBase
from django.utils import six
from django.views.decorators.cache import never_cache
from django.template.... | 38.201835 | 124 | 0.609654 |
79829a1fb2d88da1d24bf66650951a18c4bef564 | 496 | py | Python | numba/tests/issues/test_issue_50.py | liuzhenhai/numba | 855a2b262ae3d82bd6ac1c3e1c0acb36ee2e2acf | [
"BSD-2-Clause"
] | 1 | 2015-01-29T06:52:36.000Z | 2015-01-29T06:52:36.000Z | numba/tests/issues/test_issue_50.py | shiquanwang/numba | a41c85fdd7d6abf8ea1ebe9116939ddc2217193b | [
"BSD-2-Clause"
] | null | null | null | numba/tests/issues/test_issue_50.py | shiquanwang/numba | a41c85fdd7d6abf8ea1ebe9116939ddc2217193b | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import
from numba import jit
from numpy import zeros
import unittest
@jit()
def test():
foo = zeros((1,))
foo[0] = 0
@jit()
def test2():
foo = [0]
foo[0] = 0
class TestIssue50(unittest.TestCase):
def test_1d_arr_s... | 17.714286 | 64 | 0.65121 |
79829b761757eb476a46f4805ba73b6cde16fd48 | 2,151 | py | Python | src/clients/composite/aws_cloudtrail_client.py | jezd-axyl/platsec-aws-scanner | bc2b064c87ac2f77fab49c1e1eb3782d6de685b2 | [
"Apache-2.0"
] | null | null | null | src/clients/composite/aws_cloudtrail_client.py | jezd-axyl/platsec-aws-scanner | bc2b064c87ac2f77fab49c1e1eb3782d6de685b2 | [
"Apache-2.0"
] | 4 | 2021-05-06T12:36:46.000Z | 2022-02-11T09:47:57.000Z | src/clients/composite/aws_cloudtrail_client.py | jezd-axyl/platsec-aws-scanner | bc2b064c87ac2f77fab49c1e1eb3782d6de685b2 | [
"Apache-2.0"
] | 2 | 2021-04-21T04:48:47.000Z | 2022-01-14T04:29:17.000Z | from logging import getLogger
from typing import Optional, Sequence
from botocore.client import BaseClient
from src.aws_scanner_config import AwsScannerConfig as Config
from src.clients import boto_try
from src.clients.aws_logs_client import AwsLogsClient
from src.data.aws_cloudtrail_types import EventSelector, Trail... | 37.086207 | 102 | 0.67364 |
79829cf47827abfbf59a09a46677faea67891109 | 5,068 | py | Python | cdk/integration_stack.py | NASA-IMPACT/hls-sentinel2-downloader-serverless | e3e4f542fc805c6259f20a6dd932c98cccd4144c | [
"Apache-2.0"
] | null | null | null | cdk/integration_stack.py | NASA-IMPACT/hls-sentinel2-downloader-serverless | e3e4f542fc805c6259f20a6dd932c98cccd4144c | [
"Apache-2.0"
] | 2 | 2021-07-23T00:49:42.000Z | 2021-07-23T00:51:25.000Z | cdk/integration_stack.py | NASA-IMPACT/hls-sentinel2-downloader-serverless | e3e4f542fc805c6259f20a6dd932c98cccd4144c | [
"Apache-2.0"
] | null | null | null | import json
from aws_cdk import (
aws_apigateway,
aws_lambda,
aws_lambda_python,
aws_logs,
aws_s3,
aws_secretsmanager,
aws_ssm,
core,
)
class IntegrationStack(core.Stack):
def __init__(
self,
scope: core.Construct,
construct_id: str,
identifier: str... | 34.013423 | 88 | 0.572021 |
79829cfab4a7901127fc7c9e4689ee599914b783 | 7,992 | py | Python | WANNRelease/prettyNeatWann/domain/cartpole_swingup.py | redhotk1m/brain-tokyo-workshop | 442e55034bcc9cff60269bcfe045479b13f9a0c6 | [
"Apache-2.0"
] | 1 | 2020-08-19T12:17:26.000Z | 2020-08-19T12:17:26.000Z | WANNRelease/prettyNeatWann/domain/cartpole_swingup.py | redhotk1m/brain-tokyo-workshop | 442e55034bcc9cff60269bcfe045479b13f9a0c6 | [
"Apache-2.0"
] | null | null | null | WANNRelease/prettyNeatWann/domain/cartpole_swingup.py | redhotk1m/brain-tokyo-workshop | 442e55034bcc9cff60269bcfe045479b13f9a0c6 | [
"Apache-2.0"
] | null | null | null | """
Cart pole swing-up: Original version from:
https://github.com/zuoxingdong/DeepPILCO/blob/master/cartpole_swingup.py
Modified so that done=True when x is outside of -2.4 to 2.4
Reward is also reshaped to be similar to PyBullet/roboschool version
More difficult, since dt is 0.05 (not 0.01), and only 200 timesteps
"... | 36.327273 | 160 | 0.596847 |
79829e528d84ceb13875eb48f354bb44d5b3ac5c | 1,419 | py | Python | examples/bilgetank.py | pimoroni/mote-phat | b30b606abca939287a11b37761c19b9efece2751 | [
"MIT"
] | 14 | 2016-11-17T21:01:09.000Z | 2021-02-04T14:50:42.000Z | examples/bilgetank.py | pimoroni/mote-phat | b30b606abca939287a11b37761c19b9efece2751 | [
"MIT"
] | 9 | 2016-12-14T13:58:30.000Z | 2021-11-27T12:44:09.000Z | examples/bilgetank.py | pimoroni/mote-phat | b30b606abca939287a11b37761c19b9efece2751 | [
"MIT"
] | 10 | 2016-10-28T13:13:47.000Z | 2019-09-08T17:27:49.000Z | #!/usr/bin/env python
import math
import time
from colorsys import hsv_to_rgb
import motephat
print("""
Mote pHAT: #BilgeTank
This is the lighting script we use to run the shelves in BilgeTank.
It uses a simple Sine wave to sweep gently between greeny blue
and blue, giving a nice oceanic effect!
This is achieved... | 22.52381 | 75 | 0.616631 |
79829f1085e52a4f3321a7abd42db060c2850de8 | 15,649 | py | Python | src/lib/utils/image_draw.py | Lakerszjb/CentereNet-C | a628ccc64b704333c320f1ce6fd67c1433855afc | [
"MIT"
] | null | null | null | src/lib/utils/image_draw.py | Lakerszjb/CentereNet-C | a628ccc64b704333c320f1ce6fd67c1433855afc | [
"MIT"
] | null | null | null | src/lib/utils/image_draw.py | Lakerszjb/CentereNet-C | a628ccc64b704333c320f1ce6fd67c1433855afc | [
"MIT"
] | null | null | null | from random import random as rand
import cv2
import numpy as np
import math
import copy
def draw_points(im, points, point_color=None):
color = (rand() * 255, rand() * 255, rand() * 255) if point_color is None else point_color
for i in range(points.shape[0]):
cv2.circle(im, (int(points[i, 0]), int(poin... | 42.524457 | 126 | 0.562272 |
79829f70cddd15c510fc645246b84e8fa17b79fa | 474 | py | Python | apps/external_apps/schedule/occurrence.py | indro/t2c | 56482ad4aed150f29353e054db2c97b567243bf8 | [
"MIT"
] | 3 | 2015-12-25T14:45:36.000Z | 2016-11-28T09:58:03.000Z | apps/external_apps/schedule/occurrence.py | indro/t2c | 56482ad4aed150f29353e054db2c97b567243bf8 | [
"MIT"
] | null | null | null | apps/external_apps/schedule/occurrence.py | indro/t2c | 56482ad4aed150f29353e054db2c97b567243bf8 | [
"MIT"
] | null | null | null | class Occurrence(object):
"""
An Occurrence is an incarnation of a recurring event for a given date.
"""
def __init__(self,event,start,end):
self.event = event
self.start = start
self.end = end
def __unicode__(self):
return "%s to %s" %(self.start, self.end)
de... | 24.947368 | 74 | 0.578059 |
79829fddc3480c5646fee0575233288a7f669382 | 79 | py | Python | quantmod/tanolib.py | EfimovIN/dash-technical-charting | 79d48f2507e107761362c9fd7b4e19efcad01c8d | [
"MIT"
] | 129 | 2017-07-08T06:49:46.000Z | 2022-03-26T15:12:47.000Z | quantmod/tanolib.py | EfimovIN/dash-technical-charting | 79d48f2507e107761362c9fd7b4e19efcad01c8d | [
"MIT"
] | 10 | 2018-07-11T17:09:55.000Z | 2021-02-07T06:47:58.000Z | quantmod/tanolib.py | EfimovIN/dash-technical-charting | 79d48f2507e107761362c9fd7b4e19efcad01c8d | [
"MIT"
] | 50 | 2017-08-13T19:35:05.000Z | 2022-01-15T20:08:13.000Z | """Python native technical indicators
Ta-Lib indicators in 'ta.py' file.
"""
| 13.166667 | 37 | 0.708861 |
7982a0cb3d32c97c06417c9ebc7e42aaf0b3f569 | 834 | py | Python | aoc-2021/day4.py | flanggut/advent-of-code | d0c3a62596564d2886bcf31e107b38df122c0d20 | [
"MIT"
] | null | null | null | aoc-2021/day4.py | flanggut/advent-of-code | d0c3a62596564d2886bcf31e107b38df122c0d20 | [
"MIT"
] | null | null | null | aoc-2021/day4.py | flanggut/advent-of-code | d0c3a62596564d2886bcf31e107b38df122c0d20 | [
"MIT"
] | null | null | null | import aoc
import numpy as np
def didwin(board):
for i in range(0, board.shape[0]):
if np.sum(board[i, :]) == -board.shape[0]:
return True
for i in range(0, board.shape[1]):
if np.sum(board[:, i]) == -board.shape[1]:
return True
return False
data = aoc.get_data(... | 22.540541 | 84 | 0.557554 |
7982a1a96ddb607347ebbb2e1009ff51456b6dbb | 1,437 | py | Python | raw/day14/part1.py | aesdeef/advent-of-code-2021 | 4561bcf12ac03d360f5b28c48ef80134f97613b9 | [
"MIT"
] | 2 | 2021-12-03T06:18:27.000Z | 2021-12-06T11:28:33.000Z | raw/day14/part1.py | aesdeef/advent-of-code-2021 | 4561bcf12ac03d360f5b28c48ef80134f97613b9 | [
"MIT"
] | null | null | null | raw/day14/part1.py | aesdeef/advent-of-code-2021 | 4561bcf12ac03d360f5b28c48ef80134f97613b9 | [
"MIT"
] | null | null | null | import re
from collections import Counter
from itertools import chain, count
# READ THE ENTIRE DESCRIPTION FIRST
INPUT_FILE = "../../input/14.txt"
# INPUT_FILE = "test.txt"
with open(INPUT_FILE) as f:
template = f.readline().strip()
template = [x for x in template]
f.readline()
rules = dict()
for... | 22.107692 | 60 | 0.567154 |
7982a22d74113cf4b473a7a41575fad96912a0cb | 14,422 | py | Python | src/package/dataset/data_cmt.py | Jiangtong-Li/ZHSIR | fd2c0a7e79f22cbf565ccd5e13342f1b317ac9b7 | [
"Apache-2.0"
] | 8 | 2019-09-29T02:29:16.000Z | 2020-12-01T13:48:01.000Z | src/package/dataset/data_cmt.py | Jiangtong-Li/ZHSIR | fd2c0a7e79f22cbf565ccd5e13342f1b317ac9b7 | [
"Apache-2.0"
] | null | null | null | src/package/dataset/data_cmt.py | Jiangtong-Li/ZHSIR | fd2c0a7e79f22cbf565ccd5e13342f1b317ac9b7 | [
"Apache-2.0"
] | 1 | 2021-02-13T09:27:05.000Z | 2021-02-13T09:27:05.000Z | import os
import csv
import time
import random
import pickle
import torchvision
from torchvision import transforms
import cv2
import random
import numpy as np
import torch
from torch.utils.data import Dataset as torchDataset
from torchvision.transforms import Normalize
from package.dataset.utils import *
from package.... | 43.179641 | 196 | 0.61316 |
7982a24c9720ce0eabcaad2e3ad13cc4f40b9f8d | 6,770 | py | Python | src/toil/wdl/toilwdl.py | cmarkello/toil | 756c45c773c5bd95d48d5d2fd7986d467781f09b | [
"Apache-2.0"
] | null | null | null | src/toil/wdl/toilwdl.py | cmarkello/toil | 756c45c773c5bd95d48d5d2fd7986d467781f09b | [
"Apache-2.0"
] | null | null | null | src/toil/wdl/toilwdl.py | cmarkello/toil | 756c45c773c5bd95d48d5d2fd7986d467781f09b | [
"Apache-2.0"
] | null | null | null | # Copyright (C) 2018 UCSC Computational Genomics Lab
#
# 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 o... | 43.961039 | 100 | 0.66839 |
7982a2c4fbc3c02e5106d45cbaa3b0c141f9fbb7 | 7,674 | py | Python | stream_alert_cli/terraform/handler.py | ashmere/streamalert | 5a03d3d272a8e4e4b1ee71567fad1d7e185bb903 | [
"Apache-2.0"
] | null | null | null | stream_alert_cli/terraform/handler.py | ashmere/streamalert | 5a03d3d272a8e4e4b1ee71567fad1d7e185bb903 | [
"Apache-2.0"
] | 110 | 2019-02-13T05:32:07.000Z | 2021-07-29T05:42:01.000Z | stream_alert_cli/terraform/handler.py | ashmere/streamalert | 5a03d3d272a8e4e4b1ee71567fad1d7e185bb903 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2017-present, Airbnb Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, sof... | 35.859813 | 94 | 0.640865 |
7982a2e1771dfb233c6a8ec9e4223effda6fa6db | 83 | py | Python | notebooks/_solutions/case2_observations_analysis23.py | jonasvdd/DS-python-data-analysis | 835226f562ee0b0631d70e48a17c4526ff58a538 | [
"BSD-3-Clause"
] | 65 | 2017-03-21T09:15:40.000Z | 2022-02-01T23:43:08.000Z | notebooks/_solutions/case2_observations_analysis23.py | jonasvdd/DS-python-data-analysis | 835226f562ee0b0631d70e48a17c4526ff58a538 | [
"BSD-3-Clause"
] | 100 | 2016-12-15T03:44:06.000Z | 2022-03-07T08:14:07.000Z | notebooks/_solutions/case2_observations_analysis23.py | jorisvandenbossche/ICES-python-data | 63864947657f37cb26cb4e2dcd67ff106dffe9cd | [
"BSD-3-Clause"
] | 52 | 2016-12-19T07:48:52.000Z | 2022-02-19T17:53:48.000Z | pivoted = n_plot_sex.pivot(columns="sex", index="verbatimLocality", values="count") | 83 | 83 | 0.771084 |
7982a37f804347f703a894f540844af502471d5b | 425 | py | Python | pysad/transform/projection/__init__.py | selimfirat/pysad | dff2ff38258eb8a85c9d34cf5f0b876fc1dc9ede | [
"BSD-3-Clause"
] | 155 | 2020-08-17T12:52:38.000Z | 2022-03-19T02:59:26.000Z | pysad/transform/projection/__init__.py | shubhsoni/pysad | dff2ff38258eb8a85c9d34cf5f0b876fc1dc9ede | [
"BSD-3-Clause"
] | 2 | 2020-10-22T09:50:28.000Z | 2021-02-15T02:01:44.000Z | pysad/transform/projection/__init__.py | shubhsoni/pysad | dff2ff38258eb8a85c9d34cf5f0b876fc1dc9ede | [
"BSD-3-Clause"
] | 14 | 2020-10-09T17:08:23.000Z | 2022-03-25T11:30:12.000Z | """
The :mod:`pysad.transform.projection` module contains methods to project input into (possibly) lower dimensional space to better discriminate anomalies.
"""
from .random_projector import BaseSKLearnProjector, GaussianRandomProjector, SparseRandomProjector
from .streamhash_projector import StreamhashProjector
__all... | 53.125 | 152 | 0.837647 |
7982a48b5b2c089ef911313b7c49387c6fab56e5 | 10,274 | py | Python | seamm_dashboard/routes/api/jobs.py | molssi-seamm/seamm_dashboard | 6abc86903d93dca64578c0a048db67510bf1bc70 | [
"BSD-3-Clause"
] | 5 | 2020-04-17T16:34:13.000Z | 2021-12-09T17:24:01.000Z | seamm_dashboard/routes/api/jobs.py | molssi-seamm/seamm_dashboard | 6abc86903d93dca64578c0a048db67510bf1bc70 | [
"BSD-3-Clause"
] | 55 | 2020-02-26T20:47:52.000Z | 2022-03-12T14:22:10.000Z | seamm_dashboard/routes/api/jobs.py | molssi-seamm/seamm_dashboard | 6abc86903d93dca64578c0a048db67510bf1bc70 | [
"BSD-3-Clause"
] | 4 | 2019-10-15T18:34:14.000Z | 2022-01-04T20:50:43.000Z | """
API calls for jobs.
"""
import os
import shutil
from datetime import datetime, timezone
import fasteners
import json
import logging
from pathlib import Path
import re
import urllib.parse
import seamm_datastore.api
from flask import send_from_directory, Response
from flask_jwt_extended import jwt_required
from s... | 27.108179 | 107 | 0.542145 |
7982a52bf797504f3246d9f767888ec5636c5fe2 | 16,428 | py | Python | src/vm-django/comments/views.py | utmandrew/virtual-mystery | ce41bfe1d30012fdd5c5dc576bff7773668ec3c9 | [
"MIT"
] | 2 | 2018-10-14T10:05:31.000Z | 2019-04-22T16:42:07.000Z | src/vm-django/comments/views.py | utmandrew/virtual-mystery | ce41bfe1d30012fdd5c5dc576bff7773668ec3c9 | [
"MIT"
] | 36 | 2018-07-28T15:00:06.000Z | 2022-03-02T02:43:41.000Z | src/vm-django/comments/views.py | utmandrew/virtual-mystery | ce41bfe1d30012fdd5c5dc576bff7773668ec3c9 | [
"MIT"
] | 8 | 2019-03-15T16:39:40.000Z | 2020-09-13T22:59:16.000Z | import logging
from datetime import datetime
import bleach
from markdown import markdown
from django.core.exceptions import ObjectDoesNotExist
from rest_framework import status, permissions
from rest_framework.response import Response
from rest_framework.views import APIView
from rest_framework.authentication import ... | 40.663366 | 113 | 0.604395 |
7982a58206e7956d930f4a91c9c940f828400e72 | 1,277 | py | Python | multiprocessing/10_processing_image_multiprocessing.py | BenedictusAryo/python_threading | 8133315ed59b2ad927dfe748f63a1f41dda3d0bc | [
"MIT"
] | 1 | 2021-02-01T10:14:22.000Z | 2021-02-01T10:14:22.000Z | multiprocessing/10_processing_image_multiprocessing.py | BenedictusAryo/python_threading | 8133315ed59b2ad927dfe748f63a1f41dda3d0bc | [
"MIT"
] | null | null | null | multiprocessing/10_processing_image_multiprocessing.py | BenedictusAryo/python_threading | 8133315ed59b2ad927dfe748f63a1f41dda3d0bc | [
"MIT"
] | null | null | null | # 10 Processing Images Multiprocessing
import time
import concurrent.futures
from PIL import Image, ImageFilter
img_names = [
'photo-1516117172878-fd2c41f4a759.jpg',
'photo-1532009324734-20a7a5813719.jpg',
'photo-1524429656589-6633a470097c.jpg',
'photo-1530224264768-7ff8c1789d79.jpg',
'photo-15641... | 28.377778 | 62 | 0.728269 |
7982a83dcf59abab69955923b4ba7e5885bf6244 | 5,078 | py | Python | cinder_tempest_plugin/api/volume/test_volume_backup.py | openstack/cinder-tempest-plugin | a2a23ca6d10c90d19cda68220d102409c75390e5 | [
"Apache-2.0"
] | 10 | 2017-11-21T13:32:37.000Z | 2021-04-24T19:22:26.000Z | cinder_tempest_plugin/api/volume/test_volume_backup.py | openstack/cinder-tempest-plugin | a2a23ca6d10c90d19cda68220d102409c75390e5 | [
"Apache-2.0"
] | null | null | null | cinder_tempest_plugin/api/volume/test_volume_backup.py | openstack/cinder-tempest-plugin | a2a23ca6d10c90d19cda68220d102409c75390e5 | [
"Apache-2.0"
] | 3 | 2018-01-22T15:50:37.000Z | 2019-02-26T10:41:29.000Z | # Copyright (c) 2016 Mirantis Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | 40.951613 | 78 | 0.65065 |
7982a84b53973277c4c1573ec80100733cd74bbc | 7,075 | py | Python | docs/conf.py | muffinresearch/addons-server | 66613e9262a5e9475254091552de28a53b5b4072 | [
"BSD-3-Clause"
] | 1 | 2015-10-29T06:55:20.000Z | 2015-10-29T06:55:20.000Z | docs/conf.py | magopian/olympia | 70cad15111a89e3d5c715cbade8925b12d1b98dc | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | magopian/olympia | 70cad15111a89e3d5c715cbade8925b12d1b98dc | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# zamboni documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 22 20:39:35 2009.
#
# 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
# autogenerated file.
#
# All... | 33.060748 | 80 | 0.71689 |
7982a99f17f2e1b64dac1fb940604b4e749d6394 | 1,131 | py | Python | archive/mongonalysis.py | hmallen/cryptomongo | 799f2d2160c7adf161f4bcb9bade61e3f75eb16b | [
"MIT"
] | null | null | null | archive/mongonalysis.py | hmallen/cryptomongo | 799f2d2160c7adf161f4bcb9bade61e3f75eb16b | [
"MIT"
] | null | null | null | archive/mongonalysis.py | hmallen/cryptomongo | 799f2d2160c7adf161f4bcb9bade61e3f75eb16b | [
"MIT"
] | null | null | null | import configparser
import logging
import sys
from pymongo import MongoClient
config_path = 'config/settings.conf'
config = configparser.ConfigParser()
config.read(config_path)
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
class TradeAnalyzer:
def __init__(self):
self.mo... | 27.585366 | 135 | 0.656057 |
7982a9f8f0b7f5b8f0011bfd1570d99dadada924 | 925 | py | Python | Chapter03/Chapter3_sniifing/Chapter3_sniifing/Chapter_3_programs/netdiss.py | kaisaryousuf/Python-Penetration-Testing-Essentials-Second-Edition | f2a666b62826b4adc334a8e69ccbfe20b5cf12c2 | [
"MIT"
] | 18 | 2018-06-04T08:27:25.000Z | 2022-02-24T02:08:51.000Z | Chapter03/Chapter3_sniifing/Chapter3_sniifing/Chapter_3_programs/netdiss.py | kaisaryousuf/Python-Penetration-Testing-Essentials-Second-Edition | f2a666b62826b4adc334a8e69ccbfe20b5cf12c2 | [
"MIT"
] | null | null | null | Chapter03/Chapter3_sniifing/Chapter3_sniifing/Chapter_3_programs/netdiss.py | kaisaryousuf/Python-Penetration-Testing-Essentials-Second-Edition | f2a666b62826b4adc334a8e69ccbfe20b5cf12c2 | [
"MIT"
] | 11 | 2018-04-12T00:43:49.000Z | 2022-03-13T18:24:55.000Z | import socket
import binascii
s = socket.socket(socket.PF_PACKET, socket.SOCK_RAW, socket.ntohs(0x0003))
s.bind(("eth0",socket.htons(0x0800)))
def mach(mac):
a = '\\x'
mac1= mac.replace(':',a)
mac2= a+mac1
return mac2
sor = '\x48\x41\x43\x4b\x45\x52'
vic1 = raw_input("Enter the Victim MAC ")
victmac = mach(vic... | 18.877551 | 74 | 0.703784 |
7982aa9a7c617393e94bbf92bff099c2df1b35d6 | 3,010 | py | Python | tests/test_types.py | HashimHL/sqlmodel | 8d3806b422e55549b50c2d9bf9872f1a80442a7e | [
"MIT"
] | null | null | null | tests/test_types.py | HashimHL/sqlmodel | 8d3806b422e55549b50c2d9bf9872f1a80442a7e | [
"MIT"
] | null | null | null | tests/test_types.py | HashimHL/sqlmodel | 8d3806b422e55549b50c2d9bf9872f1a80442a7e | [
"MIT"
] | null | null | null | import ipaddress
import uuid
from datetime import date, datetime, time, timedelta
from decimal import Decimal
from enum import Enum, auto
from pathlib import Path
from typing import Optional
import pytest
from pydantic import BaseModel
from sqlmodel import Field, Session, SQLModel, create_engine
class HeroEnum(Enum... | 31.684211 | 106 | 0.704319 |
7982ab7af0f7d369166cf33010fab04ca82ca878 | 11,846 | py | Python | flash/text/classification/data.py | egorchakov/lightning-flash | b3c049c6e41d711492b6cfe6b56cd3677c76a69b | [
"Apache-2.0"
] | null | null | null | flash/text/classification/data.py | egorchakov/lightning-flash | b3c049c6e41d711492b6cfe6b56cd3677c76a69b | [
"Apache-2.0"
] | null | null | null | flash/text/classification/data.py | egorchakov/lightning-flash | b3c049c6e41d711492b6cfe6b56cd3677c76a69b | [
"Apache-2.0"
] | null | null | null | # Copyright The PyTorch Lightning team.
#
# 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 i... | 37.134796 | 117 | 0.631352 |
7982aba810725635bed1e86d9dbc0135b8dbf41b | 4,595 | py | Python | test/data_api.py | mbmasuda/post-tonal-theory-helper | 094b638753541e4b3c9c9ee736c9dea207432e3e | [
"MIT"
] | null | null | null | test/data_api.py | mbmasuda/post-tonal-theory-helper | 094b638753541e4b3c9c9ee736c9dea207432e3e | [
"MIT"
] | null | null | null | test/data_api.py | mbmasuda/post-tonal-theory-helper | 094b638753541e4b3c9c9ee736c9dea207432e3e | [
"MIT"
] | null | null | null | """
Parameterized data for the test_api.py pytest test file.
"""
test_init_happy_path = [
('8364eT7tE', (3, 4, 6, 7, 8, 10, 11), (8, 3, 6, 4, 11, 10, 7, 10, 11)),
('0teE942Te', (0, 2, 4, 9, 10, 11), (0, 10, 11, 11, 9, 4, 2, 10, 11)),
('123', (1, 2, 3), (1, 2, 3)),
('2468t', (2, 4, 6, 8, 10), (2, 4, 6, ... | 26.408046 | 80 | 0.356692 |
7982ac1820d4aa1fa7f1935aea7d875fc3768b87 | 1,820 | py | Python | modules/bitwise/doc/shri.py | brycelelbach/nt2 | 73d7e8dd390fa4c8d251c6451acdae65def70e0b | [
"BSL-1.0"
] | 1 | 2022-03-24T03:35:10.000Z | 2022-03-24T03:35:10.000Z | modules/bitwise/doc/shri.py | brycelelbach/nt2 | 73d7e8dd390fa4c8d251c6451acdae65def70e0b | [
"BSL-1.0"
] | null | null | null | modules/bitwise/doc/shri.py | brycelelbach/nt2 | 73d7e8dd390fa4c8d251c6451acdae65def70e0b | [
"BSL-1.0"
] | null | null | null | [ ## this file was manually modified by jt
{
'functor' : {
'arity' : '2',
'call_types' : ['T', 'iT'],
'ret_arity' : '0',
'rturn' : {
'default' : 'T',
},
'simd_types' : ['integer_'],
'type_defs' : [],
'types' : ['unsigned_in... | 36.4 | 107 | 0.364835 |
7982ac263b863e1c7766168fdf9b523a5e137d4d | 4,845 | py | Python | tools/accuracy_checker/accuracy_checker/annotation_converters/cvat_attributes_recognition.py | apankratovantonp/open_model_zoo | e372d4173e50741a6828cda415d55c37320f89cd | [
"Apache-2.0"
] | 5 | 2020-03-09T07:39:04.000Z | 2021-08-16T07:17:28.000Z | tools/accuracy_checker/accuracy_checker/annotation_converters/cvat_attributes_recognition.py | apankratovantonp/open_model_zoo | e372d4173e50741a6828cda415d55c37320f89cd | [
"Apache-2.0"
] | null | null | null | tools/accuracy_checker/accuracy_checker/annotation_converters/cvat_attributes_recognition.py | apankratovantonp/open_model_zoo | e372d4173e50741a6828cda415d55c37320f89cd | [
"Apache-2.0"
] | 3 | 2020-07-06T08:45:26.000Z | 2020-11-12T10:14:45.000Z | """
Copyright (c) 2019 Intel Corporation
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,... | 46.142857 | 105 | 0.655728 |
7982ac32f8e0db18989fb64b6174c9cd92584fe8 | 31,070 | py | Python | snoop/data/tasks.py | liquidinvestigations/hoover-snoop2 | 28e328401609f53fb56abaa4817619085aa3fbee | [
"MIT"
] | null | null | null | snoop/data/tasks.py | liquidinvestigations/hoover-snoop2 | 28e328401609f53fb56abaa4817619085aa3fbee | [
"MIT"
] | 168 | 2019-11-07T12:38:07.000Z | 2021-04-19T09:53:51.000Z | snoop/data/tasks.py | liquidinvestigations/hoover-snoop2 | 28e328401609f53fb56abaa4817619085aa3fbee | [
"MIT"
] | null | null | null | """Definition of Snoop Task System.
This is a simple set of wrappers around Celery functions to afford them stability, reproductability and
result storage. Even while Celery has support for using "result backends" to store the task results, we
didn't enjoy the fact that a power failure or unexpected server restart wou... | 35.794931 | 127 | 0.610171 |
7982ada834d6069f384c2404a75929c1d9e0fc47 | 826 | py | Python | tests/unit-tests/test_rst_raw.py | hazemelraffiee/confluencebuilder | c283e7fb513c156b9b6e0ba3694fc3e0468a74c9 | [
"BSD-2-Clause"
] | 90 | 2016-07-21T00:39:19.000Z | 2019-03-08T08:27:17.000Z | tests/unit-tests/test_rst_raw.py | hazemelraffiee/confluencebuilder | c283e7fb513c156b9b6e0ba3694fc3e0468a74c9 | [
"BSD-2-Clause"
] | 124 | 2016-10-18T20:06:48.000Z | 2019-03-08T04:41:53.000Z | tests/unit-tests/test_rst_raw.py | hazemelraffiee/confluencebuilder | c283e7fb513c156b9b6e0ba3694fc3e0468a74c9 | [
"BSD-2-Clause"
] | 39 | 2016-07-21T00:39:52.000Z | 2019-03-06T14:33:31.000Z | # -*- coding: utf-8 -*-
"""
:copyright: Copyright 2016-2022 Sphinx Confluence Builder Contributors (AUTHORS)
:license: BSD-2-Clause (LICENSE)
"""
from tests.lib.testcase import ConfluenceTestCase
from tests.lib.testcase import setup_builder
from tests.lib import parse
import os
class TestConfluenceRstRaw(ConfluenceT... | 29.5 | 80 | 0.698547 |
7982af2c284de08cf91e2758e6b548d9f5a62a4e | 355 | py | Python | app/core/models/leasing_mode.py | bladewing/bahnplan-next | c51d5c3e42f67a590c8588be2664d7a2192000d1 | [
"MIT"
] | null | null | null | app/core/models/leasing_mode.py | bladewing/bahnplan-next | c51d5c3e42f67a590c8588be2664d7a2192000d1 | [
"MIT"
] | 2 | 2020-11-15T19:14:06.000Z | 2021-07-19T10:50:04.000Z | app/core/models/leasing_mode.py | bladewing/bahnplan-next | c51d5c3e42f67a590c8588be2664d7a2192000d1 | [
"MIT"
] | null | null | null | from django.db.models import Model, CharField, DecimalField
class LeasingMode(Model):
"""yearly and weekly costs to own a vehicle"""
name = CharField(max_length=127)
factor_yearly = DecimalField(max_digits=4, decimal_places=2)
factor_weekly = DecimalField(max_digits=4, decimal_places=2)
def __str... | 29.583333 | 64 | 0.732394 |
7982afff2302f76e48cd14fd5baea0c7d5e06781 | 18,724 | py | Python | selfdrive/thermald/thermald.py | BBBmau/openpilot | 08a1ce0f3faa078cfc61c394b6bc84430f85aeeb | [
"MIT"
] | null | null | null | selfdrive/thermald/thermald.py | BBBmau/openpilot | 08a1ce0f3faa078cfc61c394b6bc84430f85aeeb | [
"MIT"
] | null | null | null | selfdrive/thermald/thermald.py | BBBmau/openpilot | 08a1ce0f3faa078cfc61c394b6bc84430f85aeeb | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import datetime
import os
import time
from pathlib import Path
from typing import Dict, NoReturn, Optional, Tuple
from collections import namedtuple, OrderedDict
import psutil
from smbus2 import SMBus
import cereal.messaging as messaging
from cereal import log
from common.filter_simple import F... | 40.094218 | 159 | 0.725112 |
7982b00bdd2f8f7921c0c847d0da68a22dc3734a | 12,661 | py | Python | 5_labeller/Cell_labler.py | meliketoy/cellnet.pytorch | f1cf32d0158783d701a31f1a35c3dfbc1ab8e0e3 | [
"MIT"
] | 4 | 2019-09-23T12:27:35.000Z | 2020-02-06T07:40:32.000Z | 5_labeller/Cell_labler.py | meliketoy/cellnet.pytorch | f1cf32d0158783d701a31f1a35c3dfbc1ab8e0e3 | [
"MIT"
] | null | null | null | 5_labeller/Cell_labler.py | meliketoy/cellnet.pytorch | f1cf32d0158783d701a31f1a35c3dfbc1ab8e0e3 | [
"MIT"
] | 1 | 2019-09-22T03:09:05.000Z | 2019-09-22T03:09:05.000Z | # coding: utf-8
import csv
import sys
import cv2
from os import makedirs
from os.path import splitext,basename,exists
from PyQt5 import QtWidgets
from PyQt5 import QtGui
from PyQt5 import uic
from PyQt5 import QtCore
from PyQt5.QtCore import pyqtSlot
from PyQt5.QtWidgets import QFileDialog
class Form(QtWidgets.QDial... | 42.486577 | 125 | 0.604376 |
7982b035f877ed4077a417e4957a6698152978b5 | 10,208 | py | Python | disambigReps-et.py | kosovojs/pywikibot-scripts | 4a9bf5177ebcfbba719970f9f3b48fbd51831818 | [
"MIT"
] | 3 | 2021-10-03T17:27:43.000Z | 2021-10-05T12:27:06.000Z | disambigReps-et.py | kosovojs/pywikibot-scripts | 4a9bf5177ebcfbba719970f9f3b48fbd51831818 | [
"MIT"
] | null | null | null | disambigReps-et.py | kosovojs/pywikibot-scripts | 4a9bf5177ebcfbba719970f9f3b48fbd51831818 | [
"MIT"
] | null | null | null | import re, pywikibot, requests
import toolforge
from datetime import datetime
site = pywikibot.Site('et', "wikipedia")
conn = toolforge.connect('etwiki_p')
def encode_if_necessary(b):
if type(b) is bytes:
return b.decode('utf8')
return b
def run_query(sqlquery):
#query = query.encode('utf-8')
#pr... | 29.588406 | 162 | 0.67212 |
7982b040adf577481656ea83d4c4bccec5b90170 | 16,375 | py | Python | python/ray/workflow/workflow_access.py | siddgoel/ray | 7f3031f451de410b71a5fcb18e04452bfa7351d6 | [
"Apache-2.0"
] | 22 | 2018-05-08T05:52:34.000Z | 2020-04-01T10:09:55.000Z | python/ray/workflow/workflow_access.py | siddgoel/ray | 7f3031f451de410b71a5fcb18e04452bfa7351d6 | [
"Apache-2.0"
] | 51 | 2018-05-17T05:55:28.000Z | 2020-03-18T06:49:49.000Z | python/ray/workflow/workflow_access.py | AyushExel/ray | 46465abd6d866c3903b17c601e84e81b46c67190 | [
"Apache-2.0"
] | 10 | 2018-04-27T10:50:59.000Z | 2020-02-24T02:41:43.000Z | import logging
import time
from typing import Any, Dict, List, Tuple, Optional, TYPE_CHECKING
from dataclasses import dataclass
import ray
from ray.workflow import common
from ray.workflow.common import WorkflowStaticRef
from ray.workflow import recovery
from ray.workflow import storage
from ray.workflow import workfl... | 36.63311 | 88 | 0.637802 |
7982b0b6ce0a62ccd7f6bd9b4fe6605466fea964 | 60,077 | py | Python | torchaudio/functional/functional.py | jaeyeun97/audio | 8a347b62cf5c907d2676bdc983354834e500a282 | [
"BSD-2-Clause"
] | 4 | 2022-03-16T15:35:35.000Z | 2022-03-22T23:55:41.000Z | torchaudio/functional/functional.py | jaeyeun97/audio | 8a347b62cf5c907d2676bdc983354834e500a282 | [
"BSD-2-Clause"
] | 2 | 2021-05-14T15:52:24.000Z | 2021-11-23T17:16:52.000Z | torchaudio/functional/functional.py | ranchlai/audio | 8a347b62cf5c907d2676bdc983354834e500a282 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from collections.abc import Sequence
import io
import math
import warnings
from typing import Optional, Tuple
import torch
from torch import Tensor
from torchaudio._internal import module_utils as _mod_utils
import torchaudio
__all__ = [
"spectrogram",
"griffinlim",
"amplitude_to_... | 37.084568 | 116 | 0.620903 |
7982b0bcbbfff91707489ce11c19bc044d22e953 | 2,604 | py | Python | Medium/Design Circular Deque.py | Koushik-Deb/LeetCode | de2e3f6222f89d42ef716076b4846173d01f69a2 | [
"MIT"
] | null | null | null | Medium/Design Circular Deque.py | Koushik-Deb/LeetCode | de2e3f6222f89d42ef716076b4846173d01f69a2 | [
"MIT"
] | null | null | null | Medium/Design Circular Deque.py | Koushik-Deb/LeetCode | de2e3f6222f89d42ef716076b4846173d01f69a2 | [
"MIT"
] | 3 | 2021-07-29T14:06:48.000Z | 2021-07-29T16:54:13.000Z | class MyCircularDeque:
def __init__(self, k: int):
"""
Initialize your data structure here. Set the size of the deque to be k.
"""
self.cap = k
self.front, self.rear = -1, -1
self.arr = [-1] * self.cap
self.n = 0
def insertFront(self, value: int) -> bool... | 28.304348 | 92 | 0.52573 |
7982b33b13219260572c861a7ae617c25ceb753a | 25,824 | py | Python | fastai2/learner.py | bearpelican/fastai2 | 445fa28e42b8d6205adc135527c22883fcfbef41 | [
"Apache-2.0"
] | null | null | null | fastai2/learner.py | bearpelican/fastai2 | 445fa28e42b8d6205adc135527c22883fcfbef41 | [
"Apache-2.0"
] | null | null | null | fastai2/learner.py | bearpelican/fastai2 | 445fa28e42b8d6205adc135527c22883fcfbef41 | [
"Apache-2.0"
] | 1 | 2020-08-20T14:20:47.000Z | 2020-08-20T14:20:47.000Z | #AUTOGENERATED! DO NOT EDIT! File to edit: dev/13_learner.ipynb (unless otherwise specified).
__all__ = ['CancelFitException', 'CancelEpochException', 'CancelTrainException', 'CancelValidException',
'CancelBatchException', 'Callback', 'TrainEvalCallback', 'GatherPredsCallback', 'event', 'replacing_yield',
... | 43.843803 | 126 | 0.652997 |
7982b449627667e2fa6530db975d00903bd62a6d | 4,180 | py | Python | my_game_09.py | huntercbx/games-with-python | 7eefc6ce69af05d2cd338e0e2523cff6af29a2a3 | [
"MIT"
] | null | null | null | my_game_09.py | huntercbx/games-with-python | 7eefc6ce69af05d2cd338e0e2523cff6af29a2a3 | [
"MIT"
] | null | null | null | my_game_09.py | huntercbx/games-with-python | 7eefc6ce69af05d2cd338e0e2523cff6af29a2a3 | [
"MIT"
] | 1 | 2021-09-23T17:58:38.000Z | 2021-09-23T17:58:38.000Z | import pygame
import os
# ширина и высота игрового экрана
WIDTH = 640
HEIGHT = 480
# частота кадров
FPS = 60
# путь к изображениям
game_folder = os.path.dirname(__file__)
img_folder = os.path.join(game_folder, "images");
# класс для корабля игрока
class PlayerShip(pygame.sprite.Sprite):
def __init... | 28.243243 | 94 | 0.60311 |
7982b51832392c53a080f4b6ddb0d15d010a5005 | 1,061 | py | Python | matching/simcse.py | Macielyoung/sentence_representation_matching | aa33147eb870a805f69dbc54c2177b11a94cf814 | [
"Apache-2.0"
] | 22 | 2022-01-24T10:08:39.000Z | 2022-03-31T10:47:05.000Z | matching/simcse.py | Macielyoung/sentence_representation_matching | aa33147eb870a805f69dbc54c2177b11a94cf814 | [
"Apache-2.0"
] | 3 | 2022-03-06T11:52:25.000Z | 2022-03-15T06:32:17.000Z | matching/simcse.py | Macielyoung/sentence_representation_matching | aa33147eb870a805f69dbc54c2177b11a94cf814 | [
"Apache-2.0"
] | 5 | 2022-02-28T09:13:04.000Z | 2022-03-22T12:50:09.000Z | # -*- coding: utf-8 -*-
# @Time : 2021/6/10
# @Author : kaka
import torch.nn as nn
from transformers import BertConfig, BertModel
class SimCSE(nn.Module):
def __init__(self, pretrained="hfl/chinese-bert-wwm-ext", pool_type="cls", dropout_prob=0.3):
super().__init__()
conf = BertConfig.from_pr... | 37.892857 | 97 | 0.640905 |
7982b6a326943607abe0bf5dc4832f626db0953f | 1,212 | py | Python | brownie_contracts/scripts/createFreezer.py | CR-Mercado/DeepFreeze | f3a50b5d9967634da6476e10db696edf75d4b98a | [
"MIT"
] | 2 | 2021-10-05T17:57:29.000Z | 2021-12-16T11:49:14.000Z | brownie_contracts/scripts/createFreezer.py | CR-Mercado/DeepFreeze | f3a50b5d9967634da6476e10db696edf75d4b98a | [
"MIT"
] | null | null | null | brownie_contracts/scripts/createFreezer.py | CR-Mercado/DeepFreeze | f3a50b5d9967634da6476e10db696edf75d4b98a | [
"MIT"
] | 2 | 2021-11-18T22:08:49.000Z | 2021-12-28T00:13:50.000Z | from brownie import DeepFreezeFactory, Contract
from scripts.helpful_scripts import get_account
from web3 import Web3
from sys import exit
import json
HINT = "Hello"
ETH = Web3.toWei(0.1, "Ether")
def createFreezer():
if len(DeepFreezeFactory) == 0:
print("You need to deploy the contract first")
... | 29.560976 | 139 | 0.679043 |
7982b80402d58dc9a1c5aa050156e86d0cedb909 | 1,026 | py | Python | isi_sdk_8_2_0/test/test_settings_mapping_mapping_settings.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 24 | 2018-06-22T14:13:23.000Z | 2022-03-23T01:21:26.000Z | isi_sdk_8_2_0/test/test_settings_mapping_mapping_settings.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 46 | 2018-04-30T13:28:22.000Z | 2022-03-21T21:11:07.000Z | isi_sdk_8_2_0/test/test_settings_mapping_mapping_settings.py | mohitjain97/isilon_sdk_python | a371f438f542568edb8cda35e929e6b300b1177c | [
"Unlicense"
] | 29 | 2018-06-19T00:14:04.000Z | 2022-02-08T17:51:19.000Z | # coding: utf-8
"""
Isilon SDK
Isilon SDK - Language bindings for the OneFS API # noqa: E501
OpenAPI spec version: 7
Contact: sdk@isilon.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import unittest
import isi_sdk_8_2_0
from i... | 25.02439 | 119 | 0.740741 |
7982b8a21f0b0ad5efacd25390d21da1d6f11ea4 | 8,421 | py | Python | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/decorators.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 8 | 2019-10-07T16:33:47.000Z | 2020-12-07T03:59:58.000Z | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/decorators.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | null | null | null | dev/Gems/CloudGemMetric/v1/AWS/python/windows/Lib/numba/decorators.py | jeikabu/lumberyard | 07228c605ce16cbf5aaa209a94a3cb9d6c1a4115 | [
"AML"
] | 5 | 2020-08-27T20:44:18.000Z | 2021-08-21T22:54:11.000Z | """
Define @jit and related decorators.
"""
from __future__ import print_function, division, absolute_import
import sys
import warnings
from . import config, sigutils
from .errors import DeprecationError
from .targets import registry
# -----------------------------------------------------------------------------
... | 32.766537 | 85 | 0.603966 |
7982ba491873b45738840e57ce3a3c0d72140792 | 388 | py | Python | django/www/MeteoGaliciaDB/registros/models.py | hugo-lorenzo-mato/Meteo-Galicia-DB | 3dd52534c16216de5f25cd40877d2facc7cffe24 | [
"MIT"
] | null | null | null | django/www/MeteoGaliciaDB/registros/models.py | hugo-lorenzo-mato/Meteo-Galicia-DB | 3dd52534c16216de5f25cd40877d2facc7cffe24 | [
"MIT"
] | null | null | null | django/www/MeteoGaliciaDB/registros/models.py | hugo-lorenzo-mato/Meteo-Galicia-DB | 3dd52534c16216de5f25cd40877d2facc7cffe24 | [
"MIT"
] | 1 | 2021-04-27T18:37:41.000Z | 2021-04-27T18:37:41.000Z | from django.db import models
from django.contrib.auth.models import User
# Create your models here.
class UserProfileInfoModel(models.Model):
user=models.OneToOneField(User)
# clases adicionales
portfolio_site = models.URLField(blank=True)
profile_pic = models.ImageField(upload_to='profile_pics', bl... | 24.25 | 73 | 0.75 |
7982bbb93cc579623c501401bddc35f0c0f0ad1d | 670 | py | Python | Lib/site-packages/traitlets/utils/bunch.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/traitlets/utils/bunch.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | Lib/site-packages/traitlets/utils/bunch.py | edupyter/EDUPYTER38 | 396183cea72987506f1ef647c0272a2577c56218 | [
"bzip2-1.0.6"
] | null | null | null | """Yet another implementation of bunch
attribute-access of items on a dict.
"""
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
class Bunch(dict): # type:ignore[type-arg]
"""A dict with attribute-access"""
def __getattr__(self, key):
try:
... | 24.814815 | 71 | 0.638806 |
7982bc4e217448dd9d8427bd350dddd89ee050ab | 2,962 | py | Python | systest/lib/netem.py | renich/raet | 6bd9c268db07d24373db734e63e11b6fff5f3e0e | [
"Apache-2.0"
] | 36 | 2015-02-10T20:39:59.000Z | 2022-01-09T18:36:47.000Z | systest/lib/netem.py | renich/raet | 6bd9c268db07d24373db734e63e11b6fff5f3e0e | [
"Apache-2.0"
] | 11 | 2016-10-10T17:19:47.000Z | 2020-04-23T16:35:47.000Z | systest/lib/netem.py | renich/raet | 6bd9c268db07d24373db734e63e11b6fff5f3e0e | [
"Apache-2.0"
] | 5 | 2015-06-01T09:00:00.000Z | 2020-04-23T17:06:20.000Z | # -*- coding: utf-8 -*-
'''
Linux tc netem adapter
'''
from subprocess import call, check_output
SU_CMD = ['sudo']
NETEM_DEL_LO_ROOT_CMD = ['tc', 'qdisc', 'del', 'dev', 'lo', 'root']
NETEM_ADD_LO_ROOT_CMD = ['tc', 'qdisc', 'add', 'dev', 'lo', 'root', 'netem']
NETEM_SHOW_LO = ['tc', 'qdisc', 'show', 'dev', 'lo']
de... | 27.425926 | 91 | 0.644835 |
7982bc6e1ad37ec1e46ff9798b0ea70cd00e7d68 | 6,895 | py | Python | src/ezdxf/entities/blockrecord.py | mbway/ezdxf | d0b12ed8ddfa2225d11e61120d1f3ef24e4abb9c | [
"MIT"
] | null | null | null | src/ezdxf/entities/blockrecord.py | mbway/ezdxf | d0b12ed8ddfa2225d11e61120d1f3ef24e4abb9c | [
"MIT"
] | null | null | null | src/ezdxf/entities/blockrecord.py | mbway/ezdxf | d0b12ed8ddfa2225d11e61120d1f3ef24e4abb9c | [
"MIT"
] | null | null | null | # Created: 17.02.2019
# Copyright (c) 2019, Manfred Moitzi
# License: MIT License
from typing import TYPE_CHECKING
import logging
from ezdxf.lldxf.attributes import DXFAttr, DXFAttributes, DefSubclass
from ezdxf.lldxf.const import DXF12, SUBCLASS_MARKER, DXF2007, DXFInternalEzdxfError
from ezdxf.entities.dxfentity impo... | 36.289474 | 119 | 0.663524 |
7982bc6f9438f14fd0f8c6f8595270be1ebb7fd0 | 2,979 | py | Python | tests/integration/test_app.py | hypothesis/pyramid-sanity | 5dcd43e4c3228231bfa2b43a2663198cc0e69b48 | [
"BSD-2-Clause"
] | null | null | null | tests/integration/test_app.py | hypothesis/pyramid-sanity | 5dcd43e4c3228231bfa2b43a2663198cc0e69b48 | [
"BSD-2-Clause"
] | 6 | 2020-08-26T12:02:12.000Z | 2021-04-19T15:33:38.000Z | tests/integration/test_app.py | hypothesis/pyramid-sanity | 5dcd43e4c3228231bfa2b43a2663198cc0e69b48 | [
"BSD-2-Clause"
] | null | null | null | import pytest
from pyramid.config import Configurator
from pyramid.httpexceptions import HTTPFound
from webtest.app import TestApp as WebTestApp
class BrokenWebTestApp(WebTestApp):
def encode_multipart(self, params, files):
content_type, body = super().encode_multipart(params, files)
# Return som... | 32.380435 | 84 | 0.65626 |
7982bdd6f59b8143a8c39f2a3376f4b4d5571a56 | 607 | py | Python | bindings/python/sigar.py | Unstoppable94/hyperic-sigar | ce9fb72b60ad3a9c63963429c954aa92a69ae545 | [
"Apache-2.0"
] | 3 | 2016-10-18T18:03:15.000Z | 2021-01-14T13:57:27.000Z | bindings/python/sigar.py | Unstoppable94/hyperic-sigar | ce9fb72b60ad3a9c63963429c954aa92a69ae545 | [
"Apache-2.0"
] | 60 | 2015-04-10T00:31:15.000Z | 2015-04-10T01:06:45.000Z | lib/hyperic-sigar-1.6.4/bindings/python/sigar.py | hamiltont/clasp | ea7c1f09ad3a49573d52ab608a2a289861d94d5d | [
"MIT"
] | 3 | 2016-06-18T14:40:07.000Z | 2022-03-27T17:52:08.000Z | #
# Copyright (c) 2007 Hyperic, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | 33.722222 | 74 | 0.751236 |
7982bdf8f5e176042884648e4ec40fa1f41b133f | 5,072 | py | Python | setup.py | fNIRS/pysnirf | 863b41c4a63ec2de4f69eabc93b262526261a4a8 | [
"Apache-2.0"
] | 3 | 2018-12-09T20:29:53.000Z | 2022-03-02T21:33:26.000Z | setup.py | fNIRS/pysnirf | 863b41c4a63ec2de4f69eabc93b262526261a4a8 | [
"Apache-2.0"
] | 1 | 2019-10-31T18:00:47.000Z | 2021-03-24T10:38:27.000Z | setup.py | fNIRS/pysnirf | 863b41c4a63ec2de4f69eabc93b262526261a4a8 | [
"Apache-2.0"
] | 1 | 2018-11-15T17:06:03.000Z | 2018-11-15T17:06:03.000Z | #!/bin/env python
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
... | 32.935065 | 79 | 0.653983 |
7982bf129a2b9a37aa9b10c4e331b51d739d3701 | 253 | py | Python | {{cookiecutter.out_dir}}/src/{{cookiecutter.flask_project_name}}/{{cookiecutter.flask_settings_name}}/dev.py | corpusops/cookiecutter-flask | 9b1bce6852a45c5803e4b69fbf5b0e39fcb1b209 | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.out_dir}}/src/{{cookiecutter.flask_project_name}}/{{cookiecutter.flask_settings_name}}/dev.py | corpusops/cookiecutter-flask | 9b1bce6852a45c5803e4b69fbf5b0e39fcb1b209 | [
"BSD-3-Clause"
] | null | null | null | {{cookiecutter.out_dir}}/src/{{cookiecutter.flask_project_name}}/{{cookiecutter.flask_settings_name}}/dev.py | corpusops/cookiecutter-flask | 9b1bce6852a45c5803e4b69fbf5b0e39fcb1b209 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
from .base import * # noqa
DEBUG = True
try:
from .local import * # noqa
except ImportError:
pass
# vim:set et sts=4 ts=4 tw=80:
| 18.071429 | 64 | 0.675889 |
7982bf7173e22dd237a1752eec1a4f75445dc6af | 3,948 | py | Python | scripts/determine_vs_version.py | ziga-lunarg/Vulkan-Tools | 93a695c53ed3d66b0bc5eca3ad43de53f9681a16 | [
"Apache-2.0"
] | 2,151 | 2020-04-18T07:31:17.000Z | 2022-03-31T08:39:18.000Z | scripts/determine_vs_version.py | ziga-lunarg/Vulkan-Tools | 93a695c53ed3d66b0bc5eca3ad43de53f9681a16 | [
"Apache-2.0"
] | 2,197 | 2016-02-17T17:45:17.000Z | 2018-07-12T18:09:44.000Z | scripts/determine_vs_version.py | ziga-lunarg/Vulkan-Tools | 93a695c53ed3d66b0bc5eca3ad43de53f9681a16 | [
"Apache-2.0"
] | 338 | 2020-04-18T08:03:10.000Z | 2022-03-29T12:33:22.000Z | #!/usr/bin/env python3
#
# Copyright (c) 2016 The Khronos Group Inc.
# Copyright (c) 2016 Valve Corporation
# Copyright (c) 2016 LunarG, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#... | 32.9 | 86 | 0.609676 |
7982c01c4fbfd7e1b8510f3407a994fa53072254 | 398 | py | Python | reporting_engine/api/migrations/0007_auto_20210412_1001.py | JiaHsin/ftf-re-api | 02e7ed5d0628a1d5a9aec3b37f6bcba93bf3284e | [
"MIT"
] | 2 | 2021-02-15T17:36:17.000Z | 2021-02-26T21:08:50.000Z | reporting_engine/api/migrations/0007_auto_20210412_1001.py | JiaHsin/ftf-re-api | 02e7ed5d0628a1d5a9aec3b37f6bcba93bf3284e | [
"MIT"
] | 2 | 2021-03-01T19:03:31.000Z | 2021-03-10T00:54:51.000Z | reporting_engine/api/migrations/0007_auto_20210412_1001.py | JiaHsin/ftf-re-api | 02e7ed5d0628a1d5a9aec3b37f6bcba93bf3284e | [
"MIT"
] | 4 | 2021-02-14T01:23:40.000Z | 2021-02-19T14:20:37.000Z | # Generated by Django 3.1.6 on 2021-04-12 14:01
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0006_auto_20210402_1719'),
]
operations = [
migrations.AlterField(
model_name='datadefinition',
name='calcula... | 20.947368 | 47 | 0.610553 |
7982c331761af411e981490c2f4b2e540962b2e7 | 3,027 | py | Python | proxyclient/experiments/hacr_trap_bits.py | EricRabil/m1n1 | 0a1a9348c32e2e44374720cd9d68cbe81cf696df | [
"MIT"
] | 1,604 | 2021-01-14T19:04:59.000Z | 2022-03-31T18:34:16.000Z | proxyclient/experiments/hacr_trap_bits.py | EricRabil/m1n1 | 0a1a9348c32e2e44374720cd9d68cbe81cf696df | [
"MIT"
] | 105 | 2021-01-15T03:52:27.000Z | 2022-03-30T22:16:52.000Z | proxyclient/experiments/hacr_trap_bits.py | EricRabil/m1n1 | 0a1a9348c32e2e44374720cd9d68cbe81cf696df | [
"MIT"
] | 96 | 2021-01-14T21:13:53.000Z | 2022-03-31T12:14:14.000Z | #!/usr/bin/env python3
# SPDX-License-Identifier: MIT
import sys, pathlib
sys.path.append(str(pathlib.Path(__file__).resolve().parents[1]))
from m1n1.setup import *
from m1n1 import asm
code_len = 12 * 16 * 8 + 4
data_len = 8 * 16 * 8
if u.mrs(SPRR_CONFIG_EL1):
u.msr(GXF_CONFIG_EL12, 0)
u.msr(SPRR_CONFIG_EL1... | 23.465116 | 75 | 0.551371 |
7982c3c3771379bcdece1dce4cc786efe69811b1 | 3,384 | py | Python | optimizer/constraints.py | alphamatic/amp | 5018137097159415c10eaa659a2e0de8c4e403d4 | [
"BSD-3-Clause"
] | 5 | 2021-08-10T23:16:44.000Z | 2022-03-17T17:27:00.000Z | optimizer/constraints.py | alphamatic/amp | 5018137097159415c10eaa659a2e0de8c4e403d4 | [
"BSD-3-Clause"
] | 330 | 2021-06-10T17:28:22.000Z | 2022-03-31T00:55:48.000Z | optimizer/constraints.py | alphamatic/amp | 5018137097159415c10eaa659a2e0de8c4e403d4 | [
"BSD-3-Clause"
] | 6 | 2021-06-10T17:20:32.000Z | 2022-03-28T08:08:03.000Z | """
Import as:
import optimizer.constraints as opconstr
"""
import logging
from typing import List
import cvxpy as cvx
import core.config as cconfig
import helpers.hdbg as hdbg
import optimizer.base as opbase
_LOG = logging.getLogger(__name__)
class ConstraintBuilder:
"""
Consume a config, e.g.,
{
... | 28.2 | 82 | 0.622636 |
7982c587032fec5144e1253d317e8a64764e83bf | 1,822 | py | Python | aliyun-python-sdk-cassandra/aliyunsdkcassandra/request/v20190101/DescribeNodeToolExecutionHistoriesRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 1,001 | 2015-07-24T01:32:41.000Z | 2022-03-25T01:28:18.000Z | aliyun-python-sdk-cassandra/aliyunsdkcassandra/request/v20190101/DescribeNodeToolExecutionHistoriesRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 363 | 2015-10-20T03:15:00.000Z | 2022-03-08T12:26:19.000Z | aliyun-python-sdk-cassandra/aliyunsdkcassandra/request/v20190101/DescribeNodeToolExecutionHistoriesRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | 682 | 2015-09-22T07:19:02.000Z | 2022-03-22T09:51:46.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 36.44 | 105 | 0.770582 |
7982c67f8fac0ce910917943db7eea9e1c8c052f | 6,132 | py | Python | examples/legacy/plugins/tasks/ipython_kernel/example_task.py | enthought/envisage | ca57225c4e9022d1ed5299a60e13dc2290d7d94e | [
"BSD-3-Clause"
] | 51 | 2015-05-12T01:34:15.000Z | 2022-03-20T19:11:22.000Z | examples/legacy/plugins/tasks/ipython_kernel/example_task.py | enthought/envisage | ca57225c4e9022d1ed5299a60e13dc2290d7d94e | [
"BSD-3-Clause"
] | 347 | 2015-02-27T19:51:09.000Z | 2022-03-21T16:03:01.000Z | examples/legacy/plugins/tasks/ipython_kernel/example_task.py | enthought/envisage | ca57225c4e9022d1ed5299a60e13dc2290d7d94e | [
"BSD-3-Clause"
] | 11 | 2015-02-11T04:32:54.000Z | 2021-09-13T10:50:05.000Z | # Enthought library imports.
from pyface.tasks.api import (
Task,
TaskLayout,
PaneItem,
IEditor,
IEditorAreaPane,
SplitEditorAreaPane,
)
from pyface.tasks.action.api import (
DockPaneToggleGroup,
SMenuBar,
SMenu,
SToolBar,
TaskAction,
)
from pyface.api import (
Confirmati... | 30.507463 | 79 | 0.514677 |
7982c6e326857c73f5c53480d74a300f9e7ec913 | 380 | py | Python | custom/icds_reports/migrations/0150_update_agg_awc_monthly_view.py | satyaakam/commcare-hq | 233f255ff20ab3a16013e9fdfdb9c1dcf632e415 | [
"BSD-3-Clause"
] | null | null | null | custom/icds_reports/migrations/0150_update_agg_awc_monthly_view.py | satyaakam/commcare-hq | 233f255ff20ab3a16013e9fdfdb9c1dcf632e415 | [
"BSD-3-Clause"
] | 1 | 2021-06-02T04:45:16.000Z | 2021-06-02T04:45:16.000Z | custom/icds_reports/migrations/0150_update_agg_awc_monthly_view.py | satyaakam/commcare-hq | 233f255ff20ab3a16013e9fdfdb9c1dcf632e415 | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 1.11.16 on 2019-10-10
from django.db import migrations
from corehq.sql_db.operations import RawSQLMigration
migrator = RawSQLMigration(('custom', 'icds_reports', 'migrations', 'sql_templates', 'database_views'))
class Migration(migrations.Migration):
dependencies = [
('icds_repor... | 22.352941 | 103 | 0.723684 |
7982c712f7062f48a93ae201d94106bd785c7099 | 736 | py | Python | Chapter01/chapter1_10.py | sTone3/Tkinter-GUI-Application-Development-Cookbook | 6c42edaa66c30d13e1903f3a3a66f609f20783d9 | [
"MIT"
] | 43 | 2018-05-09T23:29:07.000Z | 2022-03-05T02:03:32.000Z | Chapter01/chapter1_10.py | wenxuefeng3930/Tkinter-GUI-Application-Development-Cookbook | 6e22bc472e07a9aaa017ef66bfd32644578a873a | [
"MIT"
] | null | null | null | Chapter01/chapter1_10.py | wenxuefeng3930/Tkinter-GUI-Application-Development-Cookbook | 6e22bc472e07a9aaa017ef66bfd32644578a873a | [
"MIT"
] | 40 | 2018-06-18T14:44:13.000Z | 2022-03-12T09:11:50.000Z | import tkinter as tk
class App(tk.Tk):
def __init__(self):
super().__init__()
frame = tk.Frame(self, bg="green",
height=100, width=100)
frame.bind("<Button-1>", self.print_event)
frame.bind("<Double-Button-1>", self.print_event)
frame.bind("<ButtonRe... | 32 | 58 | 0.580163 |
7982c86590cf8992ccadc40d7712e5b04bea1a61 | 3,185 | py | Python | src/prototypical_batch_sampler.py | COAOX/Cifar-Prototypical | 801c3c1074f8e767c6a3654a0476d07f52bb718e | [
"MIT"
] | null | null | null | src/prototypical_batch_sampler.py | COAOX/Cifar-Prototypical | 801c3c1074f8e767c6a3654a0476d07f52bb718e | [
"MIT"
] | null | null | null | src/prototypical_batch_sampler.py | COAOX/Cifar-Prototypical | 801c3c1074f8e767c6a3654a0476d07f52bb718e | [
"MIT"
] | null | null | null | # coding=utf-8
import numpy as np
import torch
class PrototypicalBatchSampler(object):
'''
PrototypicalBatchSampler: yield a batch of indexes at each iteration.
Indexes are calculated by keeping in account 'classes_per_it' and 'num_samples',
In fact at every iteration the batch indexes will r... | 43.630137 | 100 | 0.629513 |
7982c8f2b66562bc59ce6d365f8381e7129d67dc | 2,158 | py | Python | src/colors.py | yasserprogamer/POSI-SW | 190eb01ca872462cdf1d5f17b22081123fc33033 | [
"Apache-2.0"
] | 1 | 2022-02-04T21:15:18.000Z | 2022-02-04T21:15:18.000Z | src/colors.py | yasserprogamer/POSI-SW | 190eb01ca872462cdf1d5f17b22081123fc33033 | [
"Apache-2.0"
] | null | null | null | src/colors.py | yasserprogamer/POSI-SW | 190eb01ca872462cdf1d5f17b22081123fc33033 | [
"Apache-2.0"
] | null | null | null | """
This file is originally coded by yasserprogamer.
Colors API and Console Virtual Terminal Sequences was taken from:
https://docs.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
I coded this file to color console and terminal texts
and change cursor mode and other things....
"""
i... | 31.735294 | 84 | 0.586191 |
7982c8f3369e9b8d274e27d7381abfc34b0efa7d | 912 | py | Python | django_hello/urls.py | MIT99-prog/python-docs-hello-django | 7b65aa8439cd03ac2740c0acb01d30805f3e148a | [
"MIT"
] | null | null | null | django_hello/urls.py | MIT99-prog/python-docs-hello-django | 7b65aa8439cd03ac2740c0acb01d30805f3e148a | [
"MIT"
] | null | null | null | django_hello/urls.py | MIT99-prog/python-docs-hello-django | 7b65aa8439cd03ac2740c0acb01d30805f3e148a | [
"MIT"
] | null | null | null | """django_hello URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-... | 35.076923 | 77 | 0.721491 |
7982ca48ee666107b81296bd776b0252aa1acc01 | 5,918 | py | Python | utils/build/build.py | Kobold/pano_pics_preview | 44cbdf0b6c8a3f44a5db97151b22c82fbdf91a78 | [
"MIT"
] | null | null | null | utils/build/build.py | Kobold/pano_pics_preview | 44cbdf0b6c8a3f44a5db97151b22c82fbdf91a78 | [
"MIT"
] | null | null | null | utils/build/build.py | Kobold/pano_pics_preview | 44cbdf0b6c8a3f44a5db97151b22c82fbdf91a78 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os
import tempfile
import sys
import subprocess
import urllib.parse
JS = [
'js/libpannellum.js',
'js/RequestAnimationFrame.js',
'js/pannellum.js',
]
CSS = [
'css/pannellum.css',
]
HTML = [
'standalone/pannellum.htm'
]
def merge(files):
buffer = []
for filename in files:
... | 38.679739 | 156 | 0.626394 |
7982cbdaa5664243d5c43c93525004e7ebe8b1ef | 4,311 | py | Python | pyfam/walker.py | richardseifert/COCKAMCMC | ba97bcb1520b7c9adb68bf2b03226ce01e5aa53a | [
"MIT"
] | null | null | null | pyfam/walker.py | richardseifert/COCKAMCMC | ba97bcb1520b7c9adb68bf2b03226ce01e5aa53a | [
"MIT"
] | null | null | null | pyfam/walker.py | richardseifert/COCKAMCMC | ba97bcb1520b7c9adb68bf2b03226ce01e5aa53a | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
class walker:
def __init__(self, x, y, model, p0, psig=None, cost=None):
self.x = np.array(x)
self.y = np.array(y)
self.model = model
#Define a cost function.
if cost == None:
self.cost = lambda p, x=x, y=y, m=m... | 33.418605 | 105 | 0.529112 |
7982cceebeb3ff15d878a776b5898d91949a6188 | 2,707 | py | Python | redeneural/event/migrations/0001_initial.py | RedeNeural/site | c93add1ead09483ab37fc71abd408d0483191469 | [
"MIT"
] | null | null | null | redeneural/event/migrations/0001_initial.py | RedeNeural/site | c93add1ead09483ab37fc71abd408d0483191469 | [
"MIT"
] | 4 | 2018-11-23T13:38:08.000Z | 2018-11-30T23:34:20.000Z | redeneural/event/migrations/0001_initial.py | RedeNeural/site | c93add1ead09483ab37fc71abd408d0483191469 | [
"MIT"
] | null | null | null | # Generated by Django 2.1.3 on 2018-11-30 23:25
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import redeneural.event.models
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
('meetup_group', '0001_initial'),
... | 55.244898 | 143 | 0.642039 |
7982ccf190e437463f265c4944ce846a4250f29b | 2,320 | py | Python | scripts/db/universal/csv2json.py | CCLab/Raw-Salad | 1ec028985e2b910aca31302fb57ed0677778756e | [
"BSD-3-Clause"
] | null | null | null | scripts/db/universal/csv2json.py | CCLab/Raw-Salad | 1ec028985e2b910aca31302fb57ed0677778756e | [
"BSD-3-Clause"
] | null | null | null | scripts/db/universal/csv2json.py | CCLab/Raw-Salad | 1ec028985e2b910aca31302fb57ed0677778756e | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/python
#
# simple JSON file export from CSV dumps (universal)
#
# what should be taken into consideration, and what this script doesn't do:
# - the header should consist of ascii symbols only
# - the header shoudn't contain any special symbol like \", ",", ":", "|" etc. (except "_" and "-")
# - there should... | 33.142857 | 116 | 0.633621 |
7982ce15ecee7dd3d8ec813522494f2ad91f8704 | 64,254 | py | Python | newrelic/api/transaction.py | bradleycamacho/newrelic-python-agent | d41fb461e7a4eb428fa85b0abc21734814bd7390 | [
"Apache-2.0"
] | null | null | null | newrelic/api/transaction.py | bradleycamacho/newrelic-python-agent | d41fb461e7a4eb428fa85b0abc21734814bd7390 | [
"Apache-2.0"
] | null | null | null | newrelic/api/transaction.py | bradleycamacho/newrelic-python-agent | d41fb461e7a4eb428fa85b0abc21734814bd7390 | [
"Apache-2.0"
] | null | null | null | # Copyright 2010 New Relic, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | 34.901684 | 79 | 0.615899 |
7982cea62f77db0202df2aae2b81229ae492bb16 | 3,347 | py | Python | Codes/HUV.py | odtu/HV-UAV | 6cb51f781195b937fa5ae377dbf2afda8fbe4477 | [
"Apache-2.0"
] | 6 | 2015-01-14T10:57:31.000Z | 2021-07-30T07:04:19.000Z | Codes/HUV.py | odtu/HV-UAV | 6cb51f781195b937fa5ae377dbf2afda8fbe4477 | [
"Apache-2.0"
] | 1 | 2015-01-28T18:32:32.000Z | 2020-07-28T20:04:09.000Z | Codes/HUV.py | odtu/HV-UAV | 6cb51f781195b937fa5ae377dbf2afda8fbe4477 | [
"Apache-2.0"
] | 2 | 2015-01-14T10:56:13.000Z | 2015-01-14T15:44:17.000Z | import csv
import numpy as np
import matplotlib.pyplot as plt
def import_text(filename, separator):
#import whole matrix file
for line in csv.reader(open(filename), delimiter=separator,
skipinitialspace=True):
if line:
yield line
def CreateMatrix(row,column,pat... | 29.104348 | 97 | 0.594264 |
7982cfa352e6948a7e261dbe4a0eda2067b6cfb7 | 17,798 | py | Python | testing/code/test_source.py | LeastAuthority/pytest | b50911285a4d2f593afb92f568b21686473e25a5 | [
"MIT"
] | null | null | null | testing/code/test_source.py | LeastAuthority/pytest | b50911285a4d2f593afb92f568b21686473e25a5 | [
"MIT"
] | null | null | null | testing/code/test_source.py | LeastAuthority/pytest | b50911285a4d2f593afb92f568b21686473e25a5 | [
"MIT"
] | null | null | null | # flake8: noqa
# disable flake check on this file because some constructs are strange
# or redundant on purpose and can't be disable on a line-by-line basis
from __future__ import absolute_import, division, print_function
import inspect
import sys
import _pytest._code
import py
import pytest
from _pytest._code import ... | 23.825971 | 87 | 0.561861 |
7982d082ace861588e0c35299ad67be639fc838a | 2,732 | py | Python | tests/example_1.py | PhilipeRLeal/bootstrap_analyses | 377103706aa56b2ab6f16123d703550abc6ce18c | [
"MIT"
] | null | null | null | tests/example_1.py | PhilipeRLeal/bootstrap_analyses | 377103706aa56b2ab6f16123d703550abc6ce18c | [
"MIT"
] | null | null | null | tests/example_1.py | PhilipeRLeal/bootstrap_analyses | 377103706aa56b2ab6f16123d703550abc6ce18c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Thu Mar 26 17:23:54 2020
@author: Philipe_Leal
"""
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import os
path = os.path.join(os.getcwd(), 'Data_example.csv')
df = pd.read_csv(path, sep=',', decimal='.', encoding='latin')
print(df.head())
#########3... | 24.176991 | 80 | 0.714861 |
7982d0cd561362094d05eb28a9e9b5d90c27cee4 | 6,197 | py | Python | lithophane.py | colspan/lithophane-generator | db84d265b1471585d892137beec99e9e0b30b0ed | [
"MIT"
] | null | null | null | lithophane.py | colspan/lithophane-generator | db84d265b1471585d892137beec99e9e0b30b0ed | [
"MIT"
] | null | null | null | lithophane.py | colspan/lithophane-generator | db84d265b1471585d892137beec99e9e0b30b0ed | [
"MIT"
] | null | null | null | import cv2
import numpy as np
from stl import mesh
# MEMO: axis mappings
# width, height, depth == x, y, z
# img.shape == (y, x)
# pcd.shape == (x, y, z)
def img_to_planepcd(img, target_depth=1.0, target_width=None):
if target_width is None:
target_width = img.shape[1]
target_height = int(img.shape[0... | 33.679348 | 93 | 0.541714 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.