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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0ab137aadb320eb130c9c45a932452978fad5116 | 1,160 | py | Python | robonaldo/context/entities.py | xtrm-en/robonaldo | 91601bad88043effbb717e40467526fe11bd4cb5 | [
"0BSD"
] | null | null | null | robonaldo/context/entities.py | xtrm-en/robonaldo | 91601bad88043effbb717e40467526fe11bd4cb5 | [
"0BSD"
] | null | null | null | robonaldo/context/entities.py | xtrm-en/robonaldo | 91601bad88043effbb717e40467526fe11bd4cb5 | [
"0BSD"
] | null | null | null | import time
class Updatable:
def __init__(self, last_update: int = -1):
self.last_update = last_update
def update(self) -> None:
self.last_update = int(time.time() * 1000)
def get_delta(self) -> int:
return time.time() * 1000 - self.last_update
class Positionable(Updatable):
... | 25.777778 | 81 | 0.607759 |
4d629a6c9384bcae2fbff1d73ac2f10b0dbe0881 | 679 | py | Python | scripts/touchscreens.py | markusa380/yourcontrols | db77977e44816873346ee177567d06f19b858cf0 | [
"Apache-2.0"
] | null | null | null | scripts/touchscreens.py | markusa380/yourcontrols | db77977e44816873346ee177567d06f19b858cf0 | [
"Apache-2.0"
] | null | null | null | scripts/touchscreens.py | markusa380/yourcontrols | db77977e44816873346ee177567d06f19b858cf0 | [
"Apache-2.0"
] | null | null | null | import os
import yaml
PREFIX_PREFIX = "YCB_"
SPACING = " "
yaml_file = open("out/touchscreenkeys.yaml", "w")
js_file = open("out/TouchScreenKeys.js", "w")
js_file.write("var instrumentButtonMapping = {\n")
count = 0
for filename in os.listdir("touchscreens/"):
data = yaml.load(open("touchscreens/" + filenam... | 30.863636 | 80 | 0.608247 |
1c4a24828c826c88606ac6a3b6cd095dfec7005a | 15,703 | py | Python | tests/chainer_tests/test_optimizer.py | toshihikoyanase/chainer | 65b34a19d28f60f732c7069163ca23c710a309f4 | [
"MIT"
] | null | null | null | tests/chainer_tests/test_optimizer.py | toshihikoyanase/chainer | 65b34a19d28f60f732c7069163ca23c710a309f4 | [
"MIT"
] | 2 | 2018-01-09T23:05:30.000Z | 2018-01-19T01:19:34.000Z | tests/chainer_tests/test_optimizer.py | bkvogel/chainer | 894cd5d008f11eccdf6e1d7106f5b8bfff9ce005 | [
"MIT"
] | null | null | null | import copy
import unittest
import warnings
import mock
import numpy as np
import chainer
from chainer import backend
from chainer.backends import cuda
from chainer import optimizer
from chainer import optimizers
from chainer import testing
from chainer.testing import attr
class TestHyperparameter(unittest.TestCase... | 32.244353 | 79 | 0.650513 |
94c89bb55a44131467dcc7bd7f03a302328f7022 | 5,997 | py | Python | tests/test_bake_project.py | imartinezl/cookiecutter-python | 401af89f199a42d5335318e3dc9d66a5726ccd8e | [
"MIT"
] | null | null | null | tests/test_bake_project.py | imartinezl/cookiecutter-python | 401af89f199a42d5335318e3dc9d66a5726ccd8e | [
"MIT"
] | null | null | null | tests/test_bake_project.py | imartinezl/cookiecutter-python | 401af89f199a42d5335318e3dc9d66a5726ccd8e | [
"MIT"
] | null | null | null | from contextlib import contextmanager
import shlex
import os
import sys
import subprocess
import yaml
import datetime
from cookiecutter.utils import rmtree
from click.testing import CliRunner
import importlib
@contextmanager
def inside_dir(dirpath):
"""
Execute code from inside the given directory
:para... | 33.316667 | 79 | 0.675504 |
ed0014e5ee2db303ae3e62d2705c1d5eb230176b | 1,782 | py | Python | 06/part2/main.py | orrinjelo/AdventOfCode2018 | 7455737bebfb56d7912c8f8760a55ea0a5b240a3 | [
"MIT"
] | 1 | 2020-12-14T21:05:28.000Z | 2020-12-14T21:05:28.000Z | 06/part2/main.py | orrinjelo/AdventOfCode2018 | 7455737bebfb56d7912c8f8760a55ea0a5b240a3 | [
"MIT"
] | null | null | null | 06/part2/main.py | orrinjelo/AdventOfCode2018 | 7455737bebfb56d7912c8f8760a55ea0a5b240a3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import os, sys
import numpy as np
from operator import itemgetter
from pprint import pprint
sys.path.append(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..'))
from utils.timeit import timeit
def print_field(f):
X,Y = f.shape
for y in range(Y):
for x in range... | 25.098592 | 86 | 0.571268 |
4a73a491a3e71b275511be8a6c8a5c86a04c6f4a | 2,771 | py | Python | coco/scanner.py | alv16106/compiler | 810636ce0a66b44467e7874dc75b32e0385917cb | [
"MIT"
] | null | null | null | coco/scanner.py | alv16106/compiler | 810636ce0a66b44467e7874dc75b32e0385917cb | [
"MIT"
] | null | null | null | coco/scanner.py | alv16106/compiler | 810636ce0a66b44467e7874dc75b32e0385917cb | [
"MIT"
] | null | null | null |
class Token:
def __init__(self, t, val, pos):
self.t = t
self.val = val
self.pos = pos
def __str__(self):
values = (self.t.name, self.val, self.pos)
return 'Token of type "\033[1m%s\033[0m with value %s in position %s' % values
class Scanner:
def __init__(self,... | 32.988095 | 86 | 0.447492 |
ef2b9abd0cd7ab2c492bcc9dda09a7775be75c8d | 10,609 | py | Python | kde/stat_tools.py | atfienberg/kde | a94623c382813fabe6e41993f8686a4e511346a8 | [
"MIT"
] | 3 | 2021-07-08T01:51:16.000Z | 2022-03-02T00:49:21.000Z | kde/stat_tools.py | godbolt/kde | f1154dd1a0d5875b4eb117132fee54344f28bab5 | [
"MIT"
] | null | null | null | kde/stat_tools.py | godbolt/kde | f1154dd1a0d5875b4eb117132fee54344f28bab5 | [
"MIT"
] | null | null | null | # pylint: disable=line-too-long, invalid-name
from __future__ import absolute_import, division, print_function
__license__ = """MIT License
Copyright (c) 2014-2019 Sebastian Schoenen and Martin Leuermann
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated do... | 31.480712 | 84 | 0.62758 |
dd510374c1b4679771fac16fc6e4057278d95284 | 15,692 | py | Python | videoanalyst/engine/tester/tester_impl/davis.py | yutliu/betterSAT | fb983f43b12352f9ee6ae40b4e0954f6ba502fb8 | [
"MIT"
] | null | null | null | videoanalyst/engine/tester/tester_impl/davis.py | yutliu/betterSAT | fb983f43b12352f9ee6ae40b4e0954f6ba502fb8 | [
"MIT"
] | null | null | null | videoanalyst/engine/tester/tester_impl/davis.py | yutliu/betterSAT | fb983f43b12352f9ee6ae40b4e0954f6ba502fb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*
import copy
import itertools
import math
import os
from os import makedirs
from os.path import isdir, join
import cv2
import numpy as np
from loguru import logger
from PIL import Image
from tqdm import tqdm
import torch
import torch.multiprocessing as mp
from torch.multiprocessing import Manage... | 43.22865 | 132 | 0.52001 |
25f99dbbb459e637966ecb8f8643538c930f1f4f | 10,651 | py | Python | dev/services/wms/ows_refactored/fc/style_fc_cfg.py | MatthewJA/dea-config | a843dbaf3e283a626791783d7318737932c2ab6f | [
"Apache-2.0"
] | null | null | null | dev/services/wms/ows_refactored/fc/style_fc_cfg.py | MatthewJA/dea-config | a843dbaf3e283a626791783d7318737932c2ab6f | [
"Apache-2.0"
] | null | null | null | dev/services/wms/ows_refactored/fc/style_fc_cfg.py | MatthewJA/dea-config | a843dbaf3e283a626791783d7318737932c2ab6f | [
"Apache-2.0"
] | null | null | null | from ows_refactored.ows_legend_cfg import (
legend_idx_0_100_pixel_fc_25ticks,
legend_idx_0_100_pixel_fc_bs_25ticks,
legend_idx_0_100_pixel_fc_ngv_25ticks,
)
style_fc_simple_rgb = {
"name": "simple_rgb",
"title": "Simple RGB",
"abstract": "Simple true-colour image, using the red, green and blue... | 25.420048 | 129 | 0.477608 |
afc6783a0bb0ea7be6d5fdc1a2c2d0cc8764dac9 | 8,342 | py | Python | homeassistant/components/xiaomi_miio/__init__.py | marcelblijleven/core | 6d13466f8a9b157609227046e5ee542d1a261d0f | [
"Apache-2.0"
] | null | null | null | homeassistant/components/xiaomi_miio/__init__.py | marcelblijleven/core | 6d13466f8a9b157609227046e5ee542d1a261d0f | [
"Apache-2.0"
] | null | null | null | homeassistant/components/xiaomi_miio/__init__.py | marcelblijleven/core | 6d13466f8a9b157609227046e5ee542d1a261d0f | [
"Apache-2.0"
] | null | null | null | """Support for Xiaomi Miio."""
from datetime import timedelta
import logging
import async_timeout
from miio import AirHumidifier, AirHumidifierMiot, DeviceException
from miio.gateway.gateway import GatewayException
from homeassistant import config_entries, core
from homeassistant.const import CONF_HOST, CONF_TOKEN
fr... | 31.961686 | 104 | 0.70211 |
8eaf1e9d2c1edb679c00df94df60d5eba378e295 | 172 | py | Python | spacy/lang/el/lemmatizer/_nouns_irreg.py | algteam/spacy_zh_model | 0b0cba1a3964aa426e5f96087849c90e69e2a89d | [
"MIT"
] | 5 | 2019-04-19T06:27:29.000Z | 2019-12-02T13:30:47.000Z | spacy/lang/el/lemmatizer/_nouns_irreg.py | algteam/spacy_zh_model | 0b0cba1a3964aa426e5f96087849c90e69e2a89d | [
"MIT"
] | null | null | null | spacy/lang/el/lemmatizer/_nouns_irreg.py | algteam/spacy_zh_model | 0b0cba1a3964aa426e5f96087849c90e69e2a89d | [
"MIT"
] | 2 | 2019-04-19T06:27:18.000Z | 2019-10-04T12:39:15.000Z | # coding: utf8
from __future__ import unicode_literals
NOUNS_IRREG = {
"λευτεριά": ("ελευθερία",),
"καφέδες": ("καφές",),
"ποιήματα": ("ποίημα",),
}
| 17.2 | 40 | 0.581395 |
ef92351d6fcaabb7998206c3dede14471069c4b8 | 1,820 | py | Python | get_quarter.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | null | null | null | get_quarter.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | null | null | null | get_quarter.py | DazEB2/SimplePyScripts | 1dde0a42ba93fe89609855d6db8af1c63b1ab7cc | [
"CC-BY-4.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
__author__ = 'ipetrash'
import datetime as DT
def get_quarter(month_or_date=None) -> int:
dt = month_or_date
if dt is None:
dt = DT.date.today()
if isinstance(dt, int):
month = dt
else:
month = dt.month
if month in (1, 2, ... | 23.636364 | 69 | 0.597253 |
3a248270c0d7d41a5518adbfa8981072c857fef2 | 30 | py | Python | foliant/meta_commands/draw/__init__.py | foliant-docs/foliantcontrib.project_graph | 2dae1047908986cbed6a7e53d6b0590e79a2a2fa | [
"MIT"
] | null | null | null | foliant/meta_commands/draw/__init__.py | foliant-docs/foliantcontrib.project_graph | 2dae1047908986cbed6a7e53d6b0590e79a2a2fa | [
"MIT"
] | null | null | null | foliant/meta_commands/draw/__init__.py | foliant-docs/foliantcontrib.project_graph | 2dae1047908986cbed6a7e53d6b0590e79a2a2fa | [
"MIT"
] | null | null | null | from .draw import MetaCommand
| 15 | 29 | 0.833333 |
3d71e4b846ebf1ad6948fd22991dd46b418e8fce | 4,628 | py | Python | venv/Lib/site-packages/win32com/demos/outlookAddin.py | dasxran/seleniumMachineLearning | 3098f836913a89847cb9e308189383a4ea981139 | [
"MIT"
] | 64 | 2020-07-22T06:24:18.000Z | 2022-03-27T10:48:15.000Z | venv/Lib/site-packages/win32com/demos/outlookAddin.py | dasxran/seleniumMachineLearning | 3098f836913a89847cb9e308189383a4ea981139 | [
"MIT"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | venv/Lib/site-packages/win32com/demos/outlookAddin.py | dasxran/seleniumMachineLearning | 3098f836913a89847cb9e308189383a4ea981139 | [
"MIT"
] | 18 | 2021-11-12T03:15:45.000Z | 2022-03-25T05:29:00.000Z | # A demo plugin for Microsoft Outlook (NOT Outlook Express)
#
# This addin simply adds a new button to the main Outlook toolbar,
# and displays a message box when clicked. Thus, it demonstrates
# how to plug in to Outlook itself, and hook outlook events.
#
# Additionally, each time a new message arrives in the Inbox, ... | 40.243478 | 121 | 0.721046 |
a92d16a0a6f860d7843b0822d0af32da610bd45d | 16,471 | py | Python | tempest/common/preprov_creds.py | azorge/tempest | 549dfc93fb7e3d6d8566064a60a6069deae5c8eb | [
"Apache-2.0"
] | 1 | 2021-05-21T08:24:02.000Z | 2021-05-21T08:24:02.000Z | tempest/common/preprov_creds.py | azorge/tempest | 549dfc93fb7e3d6d8566064a60a6069deae5c8eb | [
"Apache-2.0"
] | null | null | null | tempest/common/preprov_creds.py | azorge/tempest | 549dfc93fb7e3d6d8566064a60a6069deae5c8eb | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# 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 re... | 44.158177 | 79 | 0.609313 |
fa8094c0365a4484cb497f7fa54df2c706321100 | 633 | py | Python | Python-code-snippets-201-300/289-pywebview-play-video.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | Python-code-snippets-201-300/289-pywebview-play-video.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | Python-code-snippets-201-300/289-pywebview-play-video.py | abartoha/python-snippets-ref | 04e4feada96077f0e849b277204c012194e8fbcd | [
"Unlicense"
] | null | null | null | """Code snippets vol-58
289-pywebview-Play video.
Download all snippets so far:
https://wp.me/Pa5TU8-1yg
Blog: stevepython.wordpress.com
Requires:
---------
pip3 install pywebview
play_video.html file and test.mp4 in cwd.
Origin:
https://github.com/r0x0r/pywebview/tree/master/examples
"""
import webview
... | 25.32 | 74 | 0.587678 |
dc741e9dc33a612e238073b522bdb99e7dba3cb8 | 2,815 | py | Python | tests/test_draco.py | ousttrue/pydracodec | 05ef3cd72f7f1d092c8313ef1bda3a7cd4d0f062 | [
"Apache-2.0"
] | 1 | 2021-11-26T13:43:13.000Z | 2021-11-26T13:43:13.000Z | tests/test_draco.py | ousttrue/pydracodec | 05ef3cd72f7f1d092c8313ef1bda3a7cd4d0f062 | [
"Apache-2.0"
] | null | null | null | tests/test_draco.py | ousttrue/pydracodec | 05ef3cd72f7f1d092c8313ef1bda3a7cd4d0f062 | [
"Apache-2.0"
] | null | null | null | import unittest
import os
import pathlib
import json
import pydracodec
import pydracodec.dracodec_unity
import ctypes
def get_bufferview_bytes(gltf_path: pathlib.Path, gltf, bufferview_index: int) -> bytes:
match gltf['bufferViews'][bufferview_index]:
case {
'buffer': buffer_index,
... | 36.558442 | 124 | 0.517229 |
5df0f304a292d3071bb1bea5f3d6f91b697422d1 | 3,731 | py | Python | PaperExperiments/XHExp101/parameters.py | stefan-c-kremer/TE_World2 | 8e1fae218af8a1eabae776deecac62192c22e0ca | [
"MIT"
] | null | null | null | PaperExperiments/XHExp101/parameters.py | stefan-c-kremer/TE_World2 | 8e1fae218af8a1eabae776deecac62192c22e0ca | [
"MIT"
] | null | null | null | PaperExperiments/XHExp101/parameters.py | stefan-c-kremer/TE_World2 | 8e1fae218af8a1eabae776deecac62192c22e0ca | [
"MIT"
] | null | null | null |
# parameters.py
"""
Exp 101 - {'Initial_genes': '500', 'Host_mutation_rate': '0.03', 'TE_progeny': '0.00, 0, 0.55, 1, 0.30, 2, 0.15, 3', 'TE_Insertion_Distribution': 'Triangle( pmax=0, pzero=3.0/3.0 )', 'Carrying_capacity': '300', 'TE_excision_rate': '0.1', 'Junk_BP': '1.4', 'Gene_Insertion_Distribution': 'Triangle( p... | 38.864583 | 377 | 0.647816 |
54501e5a2e3628e242b911a44d9302b33f069813 | 735 | py | Python | behave/tests/utils.py | uktrade/data-hub | 81151252c52f17094899927cda244e32195c32e7 | [
"MIT"
] | null | null | null | behave/tests/utils.py | uktrade/data-hub | 81151252c52f17094899927cda244e32195c32e7 | [
"MIT"
] | 16 | 2016-12-05T14:44:01.000Z | 2017-04-11T16:08:05.000Z | behave/tests/utils.py | uktrade/data-hub | 81151252c52f17094899927cda244e32195c32e7 | [
"MIT"
] | null | null | null | import os
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
def get_chrome_webdriver():
"""Return the Chrome webdriver."""
selenium_url = 'http://selenium:{port}/wd/hub'.format(port=os.environ['SELENIUM_PORT'])
return webdriver.Remote(
c... | 28.269231 | 91 | 0.721088 |
5edd8e74a8899a25fb51e2a4e133f3cb7933fa26 | 5,251 | py | Python | tensorflow/contrib/autograph/impl/conversion_test.py | tucaiyong/tensorflow | 3cc3c87f375f1bc292bd58db4928b810ac888bc6 | [
"Apache-2.0"
] | 14 | 2018-12-06T06:51:33.000Z | 2021-03-23T11:29:24.000Z | tensorflow/contrib/autograph/impl/conversion_test.py | tucaiyong/tensorflow | 3cc3c87f375f1bc292bd58db4928b810ac888bc6 | [
"Apache-2.0"
] | 10 | 2018-02-04T18:41:52.000Z | 2018-05-02T09:00:46.000Z | tensorflow/contrib/autograph/impl/conversion_test.py | tucaiyong/tensorflow | 3cc3c87f375f1bc292bd58db4928b810ac888bc6 | [
"Apache-2.0"
] | 4 | 2018-01-17T14:22:49.000Z | 2018-02-27T15:06:41.000Z | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 31.63253 | 80 | 0.713388 |
13499018b3645b57be2bdfe062c7fac8eda8b4a9 | 235 | py | Python | iot_device/discover.py | iot49/iot-device | 4113ee25a603e5125c8ddf525b11ead57bfbd158 | [
"MIT"
] | null | null | null | iot_device/discover.py | iot49/iot-device | 4113ee25a603e5125c8ddf525b11ead57bfbd158 | [
"MIT"
] | null | null | null | iot_device/discover.py | iot49/iot-device | 4113ee25a603e5125c8ddf525b11ead57bfbd158 | [
"MIT"
] | 1 | 2020-09-08T10:42:28.000Z | 2020-09-08T10:42:28.000Z | from abc import ABC, abstractmethod
class Discover(ABC):
"""Base class for device discovery"""
def __init__(self):
pass
@abstractmethod
def scan(self) -> list:
"""url's of devices that are online"""
| 18.076923 | 46 | 0.625532 |
1e067b55e8afb0dc18182239b3e956fb4a0cd0b1 | 2,832 | py | Python | tests/functional/gtcs/test_division_by_zero_corrupts_db.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2022-02-05T11:37:13.000Z | 2022-02-05T11:37:13.000Z | tests/functional/gtcs/test_division_by_zero_corrupts_db.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-09-03T11:47:00.000Z | 2021-09-03T12:42:10.000Z | tests/functional/gtcs/test_division_by_zero_corrupts_db.py | FirebirdSQL/firebird-qa | 96af2def7f905a06f178e2a80a2c8be4a4b44782 | [
"MIT"
] | 1 | 2021-06-30T14:14:16.000Z | 2021-06-30T14:14:16.000Z | #coding:utf-8
#
# id: functional.gtcs.division_by_zero_corrupts_db
# title: GTCS/tests/CF_ISQL_29. Zero divide in SP can crash database when call this SP several times.
# decription:
# ::: NB :::
# ### Name of original test has no any relation with actual task of this ... | 28.897959 | 108 | 0.618291 |
5fdadd5ce2d6172dfd221b1a4ead1318e87ce7d5 | 4,116 | py | Python | IntentParserApp/intents.py | nehavadnere/onos | d853f650b85cdf06adfb1fed3b0236c0d54f3bfc | [
"Apache-2.0"
] | null | null | null | IntentParserApp/intents.py | nehavadnere/onos | d853f650b85cdf06adfb1fed3b0236c0d54f3bfc | [
"Apache-2.0"
] | null | null | null | IntentParserApp/intents.py | nehavadnere/onos | d853f650b85cdf06adfb1fed3b0236c0d54f3bfc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
'''
Intent Generator
Generate intents from mission requirements and required network topology
'''
import sys
from random import randrange
import requests
import json
import codecs
import time
def main(argv):
print 'Format: python intents.py <path to network.json> <path to mission.json>'
print ... | 31.906977 | 208 | 0.701166 |
433eeea59a8c067512f2851b64ed3a0e878a84d5 | 2,130 | py | Python | setup.py | NBISweden/beacon-python | ba3499e3cedd4e38c105bb984f34d21098fe8a89 | [
"Apache-2.0"
] | null | null | null | setup.py | NBISweden/beacon-python | ba3499e3cedd4e38c105bb984f34d21098fe8a89 | [
"Apache-2.0"
] | 2 | 2020-03-16T09:15:43.000Z | 2020-03-18T10:19:57.000Z | setup.py | NBISweden/beacon-python | ba3499e3cedd4e38c105bb984f34d21098fe8a89 | [
"Apache-2.0"
] | null | null | null | from setuptools import setup
from beacon_api import __license__, __version__, __author__, __description__
setup(name='beacon_api',
version=__version__,
url='https://beacon-python.rtfd.io/',
project_urls={
'Source': 'https://github.com/CSCfi/beacon-python',
},
license=__license_... | 36.724138 | 81 | 0.561502 |
ba467c01d7359dd8a2a32de1f76ea37db455f26e | 2,620 | py | Python | test/parser/unit_operators/testcases/Scan/Scan_generator.py | AyishaR/deepC | 1dc9707ef5ca9000fc13c3da7f1129685a83b494 | [
"Apache-2.0"
] | 223 | 2020-04-15T20:34:33.000Z | 2022-03-28T05:41:49.000Z | test/parser/unit_operators/testcases/Scan/Scan_generator.py | AyishaR/deepC | 1dc9707ef5ca9000fc13c3da7f1129685a83b494 | [
"Apache-2.0"
] | 42 | 2019-07-29T15:57:12.000Z | 2020-04-08T15:12:48.000Z | test/parser/unit_operators/testcases/Scan/Scan_generator.py | AyishaR/deepC | 1dc9707ef5ca9000fc13c3da7f1129685a83b494 | [
"Apache-2.0"
] | 58 | 2019-07-22T11:46:19.000Z | 2020-04-09T22:56:41.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 ... | 48.518519 | 137 | 0.75229 |
c2be95e78468be23609bc738dbf06a1b7fe7f657 | 6,315 | py | Python | src/sentry/api/endpoints/project_plugin_details.py | Ali-Tahir/sentry | aa7b306c5ea671ac002a3524982563679557cb31 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/api/endpoints/project_plugin_details.py | Ali-Tahir/sentry | aa7b306c5ea671ac002a3524982563679557cb31 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/api/endpoints/project_plugin_details.py | Ali-Tahir/sentry | aa7b306c5ea671ac002a3524982563679557cb31 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import logging
import six
from django import forms
from django.core.urlresolvers import reverse
from rest_framework import serializers
from rest_framework.response import Response
from requests.exceptions import HTTPError
from sentry.exceptions import InvalidIdentity, PluginErr... | 34.320652 | 96 | 0.616944 |
da10338448ecb18d2b2ca982030bf610a4d30bb7 | 15,803 | py | Python | findatapy/timeseries/calendar.py | DT021/findatapy | c9be891f1ca592928251e52d6f62b6decea9150e | [
"Apache-2.0"
] | 1,205 | 2016-08-17T14:44:08.000Z | 2022-03-31T15:54:10.000Z | findatapy/timeseries/calendar.py | DT021/findatapy | c9be891f1ca592928251e52d6f62b6decea9150e | [
"Apache-2.0"
] | 35 | 2016-10-07T07:44:20.000Z | 2022-01-28T14:21:41.000Z | findatapy/timeseries/calendar.py | DT021/findatapy | c9be891f1ca592928251e52d6f62b6decea9150e | [
"Apache-2.0"
] | 191 | 2016-09-01T11:31:44.000Z | 2022-03-17T21:29:55.000Z | __author__ = 'saeedamen' # Saeed Amen
#
# Copyright 2016-2020 Cuemacro
#
# 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... | 34.962389 | 135 | 0.590268 |
d12835f684faa75594a91f38c450e12079600a91 | 423 | py | Python | DS-400/Easy/171-Excel Sheet Column Number/RighttoLeft.py | ericchen12377/Leetcode-Algorithm-Python | eb58cd4f01d9b8006b7d1a725fc48910aad7f192 | [
"MIT"
] | 2 | 2020-04-24T18:36:52.000Z | 2020-04-25T00:15:57.000Z | DS-400/Easy/171-Excel Sheet Column Number/RighttoLeft.py | ericchen12377/Leetcode-Algorithm-Python | eb58cd4f01d9b8006b7d1a725fc48910aad7f192 | [
"MIT"
] | null | null | null | DS-400/Easy/171-Excel Sheet Column Number/RighttoLeft.py | ericchen12377/Leetcode-Algorithm-Python | eb58cd4f01d9b8006b7d1a725fc48910aad7f192 | [
"MIT"
] | null | null | null | class Solution(object):
def titleToNumber(self, s):
"""
:type s: str
:rtype: int
"""
result = 0
# Decimal 65 in ASCII corresponds to char 'A'
alpha_map = {chr(i + 65): i + 1 for i in range(26)}
n = len(s)
for i in range(n):
... | 26.4375 | 59 | 0.458629 |
5146c4b1b40023007d5b3c8bb314fd9910be68fa | 1,504 | py | Python | collect/scraping.py | opendot/3Deeprinting | a2a3ab5ba9abe9af1da9805d0d1b4ab0dfb21971 | [
"MIT"
] | null | null | null | collect/scraping.py | opendot/3Deeprinting | a2a3ab5ba9abe9af1da9805d0d1b4ab0dfb21971 | [
"MIT"
] | null | null | null | collect/scraping.py | opendot/3Deeprinting | a2a3ab5ba9abe9af1da9805d0d1b4ab0dfb21971 | [
"MIT"
] | null | null | null | from lxml import html
import requests
import os
import time
# starts here
if __name__ == '__main__':
queries = [
'vase',
'vases',
'pot',
]
pages = 10
for q in queries:
for p in range(pages):
print 'Query', q, 'page', p
searchUrl = 'http://www... | 33.422222 | 115 | 0.533245 |
04f3b3decefde186d40aaa7d7dcee98be0c92c2b | 5,380 | py | Python | capital_gains_calculator/read_xml.py | jemrobinson/capital-gains-calculator | 2ef3c7c786c1e2180e81f5b87194b953dd0ed17f | [
"MIT"
] | null | null | null | capital_gains_calculator/read_xml.py | jemrobinson/capital-gains-calculator | 2ef3c7c786c1e2180e81f5b87194b953dd0ed17f | [
"MIT"
] | 2 | 2021-12-31T12:48:47.000Z | 2022-01-10T17:24:57.000Z | capital_gains_calculator/read_xml.py | jemrobinson/capital-gains-calculator | 2ef3c7c786c1e2180e81f5b87194b953dd0ed17f | [
"MIT"
] | null | null | null | """Utility functions for reading PortfolioPerformance XML files"""
# Standard library imports
from decimal import Decimal
import re
import xml.etree.ElementTree as ET
# Third party imports
import pandas as pd
def flatten(element_lists):
"""Return all elements from a list of lists"""
for element_list in eleme... | 33.625 | 88 | 0.538662 |
9c1eb1b6bbb6cd724ddc8f2463c01a794f60b5f0 | 474 | py | Python | 1ere/tkter/Ex1.py | gb85150/NSI | 32c23f531d338493804daa0f19915b5afa6a8012 | [
"MIT"
] | 4 | 2020-09-14T14:16:30.000Z | 2021-09-09T18:06:57.000Z | 1ere/tkter/Ex1.py | gb85150/NSI | 32c23f531d338493804daa0f19915b5afa6a8012 | [
"MIT"
] | 2 | 2020-09-14T07:28:09.000Z | 2020-09-19T10:25:42.000Z | 1ere/tkter/Ex1.py | gb85150/NSI | 32c23f531d338493804daa0f19915b5afa6a8012 | [
"MIT"
] | 1 | 2021-09-10T12:16:50.000Z | 2021-09-10T12:16:50.000Z | import tkinter as tk
def add():
"""
Ajoute 1 à une variable globale [count]
:return: La variable count est incrémentée de 1
"""
global count
count += 1
return count
count = -1
main_window = tk.Tk()
main_window.title("Mon super compteur")
main_window.geometry("200x200")
click_button = tk.... | 20.608696 | 63 | 0.698312 |
b9e6e148a378c07c48c5fcf38ca2a4dfad461841 | 2,424 | py | Python | daemon/examples/myemane/examplemodel.py | CleberPeter/core | b02fd4ccac3c9f13b4885eaa6aed64395d74eb69 | [
"BSD-2-Clause"
] | 463 | 2015-07-28T16:28:12.000Z | 2022-03-31T16:11:29.000Z | daemon/examples/myemane/examplemodel.py | CleberPeter/core | b02fd4ccac3c9f13b4885eaa6aed64395d74eb69 | [
"BSD-2-Clause"
] | 392 | 2015-08-07T09:14:40.000Z | 2022-03-31T18:12:28.000Z | daemon/examples/myemane/examplemodel.py | CleberPeter/core | b02fd4ccac3c9f13b4885eaa6aed64395d74eb69 | [
"BSD-2-Clause"
] | 163 | 2015-07-30T15:54:03.000Z | 2022-03-21T22:54:03.000Z | """
Example custom emane model.
"""
from typing import Dict, List, Optional, Set
from core.config import Configuration
from core.emane import emanemanifest, emanemodel
class ExampleModel(emanemodel.EmaneModel):
"""
Custom emane model.
:cvar name: defines the emane model name that will show up in the GUI... | 43.285714 | 108 | 0.72731 |
849af18545cad2c85cd1b9eb66affc437c308983 | 1,572 | py | Python | var/spack/repos/builtin/packages/scala/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 11 | 2015-10-04T02:17:46.000Z | 2018-02-07T18:23:00.000Z | var/spack/repos/builtin/packages/scala/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 22 | 2017-08-01T22:45:10.000Z | 2022-03-10T07:46:31.000Z | var/spack/repos/builtin/packages/scala/package.py | player1537-forks/spack | 822b7632222ec5a91dc7b7cda5fc0e08715bd47c | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 4 | 2016-06-10T17:57:39.000Z | 2018-09-11T04:59:38.000Z | # Copyright 2013-2022 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Scala(Package):
"""Scala is a general-purpose programming language providing support for
... | 40.307692 | 97 | 0.751272 |
9085f17b3a82ae6f51d7e161d6983156450efbf4 | 572 | py | Python | skills/media.py | ZhaoHouLin/python-line-bot-lesson | 3cde7273efc70b45ab68bf5124670449c0d5c12c | [
"MIT"
] | null | null | null | skills/media.py | ZhaoHouLin/python-line-bot-lesson | 3cde7273efc70b45ab68bf5124670449c0d5c12c | [
"MIT"
] | null | null | null | skills/media.py | ZhaoHouLin/python-line-bot-lesson | 3cde7273efc70b45ab68bf5124670449c0d5c12c | [
"MIT"
] | null | null | null |
from linebot.models import AudioSendMessage, VideoSendMessage
from models.message_request import MessageRequest
from skills import add_skill
@add_skill('{media}')
def get(message_request: MessageRequest):
audio = AudioSendMessage(
original_content_url='https://www.soundhelix.com/examples/mp3/SoundHelix-S... | 23.833333 | 93 | 0.699301 |
ff1906f33ca949a5a87d84143ac58c825ae354ed | 961 | py | Python | workflow/scripts/parse_HLA_types.py | snakemake-workflows/dna-seq-neoantigen-prediction | 77a5256983a7bb1b63c1b25e7c5eb7f21974ba73 | [
"MIT"
] | 6 | 2020-09-15T02:32:08.000Z | 2021-11-16T08:47:27.000Z | workflow/scripts/parse_HLA_types.py | jafors/Neoantigen_Prediction | 77a5256983a7bb1b63c1b25e7c5eb7f21974ba73 | [
"MIT"
] | 1 | 2022-01-11T12:39:15.000Z | 2022-01-11T12:39:15.000Z | workflow/scripts/parse_HLA_types.py | jafors/Neoantigen_Prediction | 77a5256983a7bb1b63c1b25e7c5eb7f21974ba73 | [
"MIT"
] | 4 | 2020-11-03T04:16:39.000Z | 2021-11-16T08:47:32.000Z | import pandas as pd
hlaI = ["A","B","C"]
hlaII = ["DRB1", "DPA1", "DPB1", "DQA1", "DQB1"]
hlas = pd.read_csv(snakemake.input[0], sep='\t')
hlasI = hlas[hlas.Locus.isin(hlaI)]
hlasI["Allele"]="HLA-" + hlasI.Allele.str.split(":", expand=True)[[0,1]].apply(lambda x: ''.join(x), axis=1).str.replace('*','')
hlasI = hlas... | 45.761905 | 149 | 0.654527 |
88cc46395966a33c3f4bfb8d96761735fd5fe283 | 181 | py | Python | lino_book/projects/team/asgi.py | khchine5/book | b6272d33d49d12335d25cf0a2660f7996680b1d1 | [
"BSD-2-Clause"
] | 1 | 2018-01-12T14:09:58.000Z | 2018-01-12T14:09:58.000Z | lino_book/projects/team/asgi.py | khchine5/book | b6272d33d49d12335d25cf0a2660f7996680b1d1 | [
"BSD-2-Clause"
] | 4 | 2018-02-06T19:53:10.000Z | 2019-08-01T21:47:44.000Z | lino_book/projects/team/asgi.py | khchine5/book | b6272d33d49d12335d25cf0a2660f7996680b1d1 | [
"BSD-2-Clause"
] | null | null | null | import os
from channels.asgi import get_channel_layer
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "lino_book.projects.team.settings.demo")
channel_layer = get_channel_layer()
| 25.857143 | 88 | 0.834254 |
833dde95e16a1d9f26c1c241668b9a202435cb22 | 6,299 | py | Python | parsr/migrations/0037_auto__add_field_file_package.py | frontendphil/analyzr | bb177e16039e02aac1bd72e6fd7cc6d2805d95cf | [
"MIT"
] | 4 | 2015-05-02T12:19:05.000Z | 2019-09-20T13:21:13.000Z | parsr/migrations/0037_auto__add_field_file_package.py | frontendphil/analyzr | bb177e16039e02aac1bd72e6fd7cc6d2805d95cf | [
"MIT"
] | null | null | null | parsr/migrations/0037_auto__add_field_file_package.py | frontendphil/analyzr | bb177e16039e02aac1bd72e6fd7cc6d2805d95cf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'File.package'
db.add_column(u'parsr_file', 'package',
self.gf('django.... | 67.731183 | 151 | 0.555803 |
8324a84f5172b54a9b6a297e3b09f23588f15b5a | 2,278 | py | Python | ona/db.py | k4g4/ona.py | 1c6f2b4dd3d85c267302d507db5f73680034428c | [
"MIT"
] | 1 | 2019-05-12T18:58:32.000Z | 2019-05-12T18:58:32.000Z | ona/db.py | k4g4/ona.py | 1c6f2b4dd3d85c267302d507db5f73680034428c | [
"MIT"
] | 5 | 2021-03-18T23:01:01.000Z | 2022-03-11T23:49:11.000Z | ona/db.py | k4g4/ona.py | 1c6f2b4dd3d85c267302d507db5f73680034428c | [
"MIT"
] | 1 | 2019-08-05T02:05:10.000Z | 2019-08-05T02:05:10.000Z | from pymongo import MongoClient, ReturnDocument
from cachetools import LRUCache
from contextlib import contextmanager
class OnaDocument(dict):
'''This class represents a generic MongoDB document.'''
__getattr__ = dict.get
__setattr__ = dict.__setitem__
__delattr__ = dict.__delitem__
class OnaDB:
... | 42.185185 | 117 | 0.647498 |
4446dc6483296d9566685493eaf9e0b1fc20a11f | 12,695 | py | Python | lib/rucio/tests/test_rse_expression_parser.py | TeAmP0is0N/rucio | 45c1b83f8e1514953a41fd076b4e651dd564c39f | [
"Apache-2.0"
] | null | null | null | lib/rucio/tests/test_rse_expression_parser.py | TeAmP0is0N/rucio | 45c1b83f8e1514953a41fd076b4e651dd564c39f | [
"Apache-2.0"
] | null | null | null | lib/rucio/tests/test_rse_expression_parser.py | TeAmP0is0N/rucio | 45c1b83f8e1514953a41fd076b4e651dd564c39f | [
"Apache-2.0"
] | null | null | null | # Copyright European Organization for Nuclear Research (CERN)
#
# 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
#
# Authors:
# - Martin Barisits, <m... | 53.117155 | 241 | 0.69232 |
6754600f6077a162028bd1390f0cd8888a1478f1 | 1,133 | py | Python | lib/candy_editor/core/__init__.py | lihaochen910/Candy | d12cb964768459c22f30c22531d3e1734901e814 | [
"MIT"
] | 1 | 2021-11-06T14:38:37.000Z | 2021-11-06T14:38:37.000Z | lib/candy_editor/core/__init__.py | lihaochen910/Candy | d12cb964768459c22f30c22531d3e1734901e814 | [
"MIT"
] | 5 | 2021-11-06T04:23:06.000Z | 2022-03-12T01:03:25.000Z | lib/candy_editor/core/__init__.py | lihaochen910/Candy | d12cb964768459c22f30c22531d3e1734901e814 | [
"MIT"
] | 1 | 2021-11-07T05:19:51.000Z | 2021-11-07T05:19:51.000Z | import logging
# loggingLevel = logging.WARNING
# loggingLevel = logging.INFO
# loggingLevel = logging.DEBUG
##----------------------------------------------------------------##
from . import signals
##----------------------------------------------------------------##
from .helpers import *
from .model import *
fro... | 29.051282 | 115 | 0.600177 |
643d2f4b7a8ef45528c8de8e729db7525c458c77 | 1,056 | py | Python | tests/test_obj_CylinderSegment.py | OrtnerMichael/magPyLib | 4c7e7f56f6e0b915ec0e024c172c460fa80126e5 | [
"BSD-2-Clause"
] | null | null | null | tests/test_obj_CylinderSegment.py | OrtnerMichael/magPyLib | 4c7e7f56f6e0b915ec0e024c172c460fa80126e5 | [
"BSD-2-Clause"
] | null | null | null | tests/test_obj_CylinderSegment.py | OrtnerMichael/magPyLib | 4c7e7f56f6e0b915ec0e024c172c460fa80126e5 | [
"BSD-2-Clause"
] | null | null | null | import numpy as np
import magpylib as magpy
def test_repr():
"""test __repr__"""
pm2 = magpy.magnet.CylinderSegment((1, 2, 3), (1, 2, 3, 0, 90))
assert pm2.__repr__()[:15] == "CylinderSegment", "CylinderSegment repr failed"
def test_barycenter():
"""test if barycenter is computed correctly"""
c... | 32 | 87 | 0.626894 |
37af7908b2d81365e4be2dc577585b2d542ae72f | 410 | py | Python | ProjectEuler/p056.py | TISparta/competitive-programming-solutions | 31987d4e67bb874bf15653565c6418b5605a20a8 | [
"MIT"
] | 1 | 2018-01-30T13:21:30.000Z | 2018-01-30T13:21:30.000Z | ProjectEuler/p056.py | TISparta/competitive-programming-solutions | 31987d4e67bb874bf15653565c6418b5605a20a8 | [
"MIT"
] | null | null | null | ProjectEuler/p056.py | TISparta/competitive-programming-solutions | 31987d4e67bb874bf15653565c6418b5605a20a8 | [
"MIT"
] | 1 | 2018-08-29T13:26:50.000Z | 2018-08-29T13:26:50.000Z |
# Execution time : 0.251594 seconds
# Solution Explanation
# Brute-force approach is enough.
import time
width = 40
def solution():
return max(sum(int(it) for it in str(a**b)) for a in range(100) for b in range(100))
if __name__=="__main__":
start_ = time.time()
print(' Answer -> %s '.center(width,'-'... | 22.777778 | 88 | 0.629268 |
c1c70b8566db5a85c82448af289f34c928045991 | 406 | bzl | Python | third_party/javax_inject.bzl | wix/exodus | dfb0c9713b07a8b6a49b548b7b543021e748d80b | [
"MIT"
] | 186 | 2019-06-05T01:02:53.000Z | 2022-03-31T10:44:19.000Z | third_party/javax_inject.bzl | wix/exodus | dfb0c9713b07a8b6a49b548b7b543021e748d80b | [
"MIT"
] | 25 | 2019-06-04T23:18:55.000Z | 2021-09-22T03:44:25.000Z | third_party/javax_inject.bzl | wix/exodus | dfb0c9713b07a8b6a49b548b7b543021e748d80b | [
"MIT"
] | 17 | 2019-06-04T18:45:19.000Z | 2022-01-20T09:40:04.000Z | load("//:import_external.bzl", import_external = "safe_wix_scala_maven_import_external")
def dependencies():
import_external(
name = "javax_inject_javax_inject",
artifact = "javax.inject:javax.inject:1",
artifact_sha256 = "91c77044a50c481636c32d916fd89c9118a72195390452c81065080f957de7ff",
sr... | 36.909091 | 91 | 0.785714 |
a625714afff55a26db5d4652032250b82e7587f4 | 3,472 | py | Python | nuitka/build/inline_copy/lib/scons-3.1.0/SCons/Tool/filesystem.py | jayvdb/Nuitka | 0ff702e065b1b53231ba0cae451385a3da0fe766 | [
"Apache-2.0"
] | 1 | 2019-03-31T09:56:11.000Z | 2019-03-31T09:56:11.000Z | nuitka/build/inline_copy/lib/scons-3.1.0/SCons/Tool/filesystem.py | jayvdb/Nuitka | 0ff702e065b1b53231ba0cae451385a3da0fe766 | [
"Apache-2.0"
] | null | null | null | nuitka/build/inline_copy/lib/scons-3.1.0/SCons/Tool/filesystem.py | jayvdb/Nuitka | 0ff702e065b1b53231ba0cae451385a3da0fe766 | [
"Apache-2.0"
] | null | null | null | """SCons.Tool.filesystem
Tool-specific initialization for the filesystem tools.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001 - 2019 The SCons Foundation
#
# Permission is hereby gran... | 35.070707 | 121 | 0.659562 |
53f914cb24c06564ae98e011cbd91898f54edaad | 16,078 | py | Python | log_mito/model_64.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_mito/model_64.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | log_mito/model_64.py | LoLab-VU/Bayesian_Inference_of_Network_Dynamics | 54a5ef7e868be34289836bbbb024a2963c0c9c86 | [
"MIT"
] | null | null | null | # exported from PySB model 'model'
from pysb import Model, Monomer, Parameter, Expression, Compartment, Rule, Observable, Initial, MatchOnce, Annotation, ANY, WILD
Model()
Monomer('Ligand', ['Receptor'])
Monomer('ParpU', ['C3A'])
Monomer('C8A', ['BidU'])
Monomer('SmacM', ['BaxA'])
Monomer('BaxM', ['BidM', 'BaxA'])
M... | 87.857923 | 710 | 0.803458 |
2342ffd1ef296c0a0b1d547686bec2fe69b6a254 | 121 | py | Python | newspider/pipelines.py | Hironsan/japanese-news-crawler | cec9015fc41ce94a80a1d5fe5a7652913686563d | [
"MIT"
] | 7 | 2017-06-19T03:00:07.000Z | 2021-02-23T12:41:39.000Z | newspider/pipelines.py | Hironsan/japanese-news-crawler | cec9015fc41ce94a80a1d5fe5a7652913686563d | [
"MIT"
] | null | null | null | newspider/pipelines.py | Hironsan/japanese-news-crawler | cec9015fc41ce94a80a1d5fe5a7652913686563d | [
"MIT"
] | 4 | 2017-06-13T21:18:15.000Z | 2018-08-17T06:44:14.000Z | # -*- coding: utf-8 -*-
class NewspiderPipeline(object):
def process_item(self, item, spider):
return item
| 17.285714 | 41 | 0.636364 |
9ab9b6bb65ef7e8d4b8eb5e1152e0e27ac553f62 | 25,035 | py | Python | imcsdk/imchandle.py | TetrationAnalytics/imcsdk | d86e47831f294dc9fa5e99b9a92abceac2502d76 | [
"Apache-2.0"
] | null | null | null | imcsdk/imchandle.py | TetrationAnalytics/imcsdk | d86e47831f294dc9fa5e99b9a92abceac2502d76 | [
"Apache-2.0"
] | null | null | null | imcsdk/imchandle.py | TetrationAnalytics/imcsdk | d86e47831f294dc9fa5e99b9a92abceac2502d76 | [
"Apache-2.0"
] | 2 | 2016-05-26T02:05:46.000Z | 2017-09-13T05:13:25.000Z | # Copyright 2015 Cisco Systems, 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 writin... | 33.604027 | 83 | 0.569323 |
1246aae32c5cf2a8cf8d007ce669452046febb88 | 12,361 | py | Python | sopel_SpiceBotSERV/SpiceBotCore/interface/database.py | SpiceBot/SpiceBotSERV | 19d254c694287af869f5390f71efd20a9fcf620f | [
"EFL-2.0"
] | null | null | null | sopel_SpiceBotSERV/SpiceBotCore/interface/database.py | SpiceBot/SpiceBotSERV | 19d254c694287af869f5390f71efd20a9fcf620f | [
"EFL-2.0"
] | null | null | null | sopel_SpiceBotSERV/SpiceBotCore/interface/database.py | SpiceBot/SpiceBotSERV | 19d254c694287af869f5390f71efd20a9fcf620f | [
"EFL-2.0"
] | null | null | null | # coding=utf8
from __future__ import unicode_literals, absolute_import, division, print_function
import json
import inspect
from sopel.tools import Identifier
from sopel.db import SopelDB, NickValues, ChannelValues, PluginValues
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.exc import SQLAl... | 37.457576 | 100 | 0.561848 |
a7552a1b61a6da47959fcc3e3379c242da53d407 | 377 | py | Python | shophub/shop/migrations/0009_auto_20190330_1746.py | Saiful1721648/Product-Recommendation-System-Using-Machine-Learning-through-Big-Data-in-E-commerce-Website | cd2fb19ae1bc6a2d0382e3f5288243681ebd7e88 | [
"Apache-2.0"
] | null | null | null | shophub/shop/migrations/0009_auto_20190330_1746.py | Saiful1721648/Product-Recommendation-System-Using-Machine-Learning-through-Big-Data-in-E-commerce-Website | cd2fb19ae1bc6a2d0382e3f5288243681ebd7e88 | [
"Apache-2.0"
] | null | null | null | shophub/shop/migrations/0009_auto_20190330_1746.py | Saiful1721648/Product-Recommendation-System-Using-Machine-Learning-through-Big-Data-in-E-commerce-Website | cd2fb19ae1bc6a2d0382e3f5288243681ebd7e88 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.7 on 2019-03-30 12:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shop', '0008_orders_amount'),
]
operations = [
migrations.AlterField(
model_name='orders',
name='amount',
... | 19.842105 | 49 | 0.588859 |
57369e8f2fff6569f585a7188424092635537361 | 6,824 | py | Python | postprocessing/python_micro_compare/compare_precip_profiles.py | larson-group/clubb_release | b4d671e3e238dbe00752c0dead6a0d4f9897350a | [
"Intel",
"Unlicense",
"NetCDF"
] | null | null | null | postprocessing/python_micro_compare/compare_precip_profiles.py | larson-group/clubb_release | b4d671e3e238dbe00752c0dead6a0d4f9897350a | [
"Intel",
"Unlicense",
"NetCDF"
] | null | null | null | postprocessing/python_micro_compare/compare_precip_profiles.py | larson-group/clubb_release | b4d671e3e238dbe00752c0dead6a0d4f9897350a | [
"Intel",
"Unlicense",
"NetCDF"
] | 1 | 2022-01-28T22:22:04.000Z | 2022-01-28T22:22:04.000Z | # $Id$
"""
compare_precip_profiles
Description:
Compares the precipitation profiles for the Morrison Microphysics parameterization
"""
# Import libraries
import numpy as np
import matplotlib.pyplot as plt
import netCDF4
# Point to CLUBB's 'output' directory and location of SAM's stat file
out_dir = '/home/we... | 35.915789 | 114 | 0.552608 |
fa9eaf9c7e50962f8487accd9fec8bd8ca1dc094 | 4,423 | py | Python | mbdata/api/utils.py | LeoVerto/mbdata | fd6a391d3d1c0a3085904ae65a50129a34cd1a51 | [
"MIT"
] | 1 | 2021-04-13T17:46:43.000Z | 2021-04-13T17:46:43.000Z | mbdata/api/utils.py | LeoVerto/mbdata | fd6a391d3d1c0a3085904ae65a50129a34cd1a51 | [
"MIT"
] | null | null | null | mbdata/api/utils.py | LeoVerto/mbdata | fd6a391d3d1c0a3085904ae65a50129a34cd1a51 | [
"MIT"
] | null | null | null | # Copyright (C) 2013 Lukas Lalinsky
# Distributed under the MIT license, see the LICENSE file for details.
import re
import logging
import xml.sax.saxutils
from six import StringIO, text_type
from flask import request, abort, current_app, json
from mbdata.api.errors import (
SUCCESS,
INVALID_FORMAT_ERROR,
... | 30.93007 | 96 | 0.641194 |
8159adec8698c8b27cc473b5a5439b8007c507c8 | 11,491 | py | Python | services/api/app.py | Shane-Neeley/g2p-aggregator | e0611d9c20857fd30b9f5557400e9ea375546ebd | [
"MIT"
] | null | null | null | services/api/app.py | Shane-Neeley/g2p-aggregator | e0611d9c20857fd30b9f5557400e9ea375546ebd | [
"MIT"
] | null | null | null | services/api/app.py | Shane-Neeley/g2p-aggregator | e0611d9c20857fd30b9f5557400e9ea375546ebd | [
"MIT"
] | null | null | null | #!/usr/bin/python
# sys libs
import datetime
import logging
import yaml
import urllib2
import sys
import re
import argparse
import sys
import os
import socket
import json
# backend
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Search, A
# webserver
import connexion
from flask_cors import CORS... | 32.737892 | 1,063 | 0.629797 |
0181993e5da1e8cb7a2b01d451922940f531d0e7 | 25,198 | py | Python | pydcop/algorithms/gdba.py | rpgoldman/pyDcop | 65e458b180b5614015872214c29d25fa8c306867 | [
"BSD-3-Clause"
] | null | null | null | pydcop/algorithms/gdba.py | rpgoldman/pyDcop | 65e458b180b5614015872214c29d25fa8c306867 | [
"BSD-3-Clause"
] | null | null | null | pydcop/algorithms/gdba.py | rpgoldman/pyDcop | 65e458b180b5614015872214c29d25fa8c306867 | [
"BSD-3-Clause"
] | null | null | null | # BSD-3-Clause License
#
# Copyright 2017 Orange
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the followi... | 36.947214 | 101 | 0.611477 |
1563e2bd33313f8715016714ed09e63e900f588c | 7,191 | py | Python | backend/orange_paper_28802/settings.py | crowdbotics-apps/orange-paper-28802 | b0fe224473d271577b110142ab42d25c50465084 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/orange_paper_28802/settings.py | crowdbotics-apps/orange-paper-28802 | b0fe224473d271577b110142ab42d25c50465084 | [
"FTL",
"AML",
"RSA-MD"
] | 20 | 2021-07-13T17:43:59.000Z | 2021-07-13T17:44:02.000Z | backend/orange_paper_28802/settings.py | crowdbotics-apps/orange-paper-28802 | b0fe224473d271577b110142ab42d25c50465084 | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
Django settings for orange_paper_28802 project.
Generated by 'django-admin startproject' using Django 2.2.2.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
i... | 28.995968 | 112 | 0.730914 |
94c5247483e06b6be6f337ec406b8c597b933f04 | 3,863 | py | Python | binary_release.py | jgough/opensearch-curator | e8d7eb4d969eac551db9f99bd021d0c05e28dc35 | [
"Apache-2.0"
] | null | null | null | binary_release.py | jgough/opensearch-curator | e8d7eb4d969eac551db9f99bd021d0c05e28dc35 | [
"Apache-2.0"
] | null | null | null | binary_release.py | jgough/opensearch-curator | e8d7eb4d969eac551db9f99bd021d0c05e28dc35 | [
"Apache-2.0"
] | null | null | null | import os
import re
import sys
import shutil
import hashlib
# This script simply takes the output of `python setup.py build_exe` and makes
# a compressed archive (zip for windows, tar.gz for Linux) for distribution.
# Utility function to read from file.
def fread(fname):
return open(os.path.join(os.path.dirname(_... | 41.095745 | 112 | 0.623609 |
d43a34a6fb3e4a70412c4090e05b1f4d4a5cef2e | 2,482 | py | Python | example/TCN/network.py | ddddwee1/TorchSUL | 775832049564d8ee7c43e510b57bd716e0a746dd | [
"WTFPL"
] | 7 | 2019-12-14T12:23:36.000Z | 2021-11-16T00:25:13.000Z | example/TCN/network.py | ddddwee1/TorchSUL | 775832049564d8ee7c43e510b57bd716e0a746dd | [
"WTFPL"
] | 1 | 2020-10-20T06:33:53.000Z | 2020-10-26T19:01:21.000Z | example/TCN/network.py | ddddwee1/TorchSUL | 775832049564d8ee7c43e510b57bd716e0a746dd | [
"WTFPL"
] | 1 | 2021-08-24T09:09:36.000Z | 2021-08-24T09:09:36.000Z | from TorchSUL import Model as M
import random
import torch
import torch.nn as nn
import torch.nn.functional as F
import numpy as np
class ResBlock1D(M.Model):
def initialize(self, outchn=1024, k=3):
self.k = k
# self.bn = M.BatchNorm()
self.c1 = M.ConvLayer1D(k, outchn, stride=k, activation=M.PARAM_PRELU, ... | 29.903614 | 117 | 0.665995 |
f42c0d7def942d07adde359b2744b90cb277ffb6 | 9,402 | py | Python | paper/architectures/efficientnet.py | KRLGroup/memory-wrap | c1df5d7f53800939ec40f5d3a432248a28846460 | [
"MIT"
] | 2 | 2021-06-11T09:47:16.000Z | 2021-09-13T02:37:08.000Z | paper/architectures/efficientnet.py | KRLGroup/memory-wrap | c1df5d7f53800939ec40f5d3a432248a28846460 | [
"MIT"
] | null | null | null | paper/architectures/efficientnet.py | KRLGroup/memory-wrap | c1df5d7f53800939ec40f5d3a432248a28846460 | [
"MIT"
] | 1 | 2021-09-13T02:37:15.000Z | 2021-09-13T02:37:15.000Z | '''EfficientNet in PyTorch.
References:
https://github.com/kuangliu/pytorch-cifar/blob/master/models/efficientnet.py
https://github.com/keras-team/keras-applications/blob/master/keras_applications/efficientnet.py
'''
import torch
import torch.nn as nn
import torch.nn.functional as F
from memorywrap import MemoryWrapL... | 34.566176 | 95 | 0.5117 |
a867a718dba852787cc190184ce406c6ff0df45c | 1,317 | py | Python | prx/PathProxy.py | Iuty/vue.fastcnn2.winservice | de4c8dcd19549ca9992346101c78b87077c86813 | [
"Apache-2.0"
] | null | null | null | prx/PathProxy.py | Iuty/vue.fastcnn2.winservice | de4c8dcd19549ca9992346101c78b87077c86813 | [
"Apache-2.0"
] | null | null | null | prx/PathProxy.py | Iuty/vue.fastcnn2.winservice | de4c8dcd19549ca9992346101c78b87077c86813 | [
"Apache-2.0"
] | null | null | null | import os
class PathProxy:
"""
path define here
"""
app_path = r"d:\\FastCNN\\"
project_path = app_path + r"Projects\\"
def getConfigPath():
return PathProxy.app_path + r"Config\Config.conf"
def getProjectDir(projectname):
return os.path.join(PathProxy.project_path , pr... | 30.627907 | 85 | 0.637813 |
6f7f4a0a76fbb9aa125e4010056cfde45b697e17 | 59,836 | py | Python | tensorflow/python/eager/backprop_test.py | sjmielke/tensorflow | 8648e4f6cf131170ef778f7866e5a9f78e41f893 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/eager/backprop_test.py | sjmielke/tensorflow | 8648e4f6cf131170ef778f7866e5a9f78e41f893 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/eager/backprop_test.py | sjmielke/tensorflow | 8648e4f6cf131170ef778f7866e5a9f78e41f893 | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 32.554951 | 80 | 0.658032 |
42b15e70023493766499d81a21d116751cb30103 | 580 | py | Python | shoppingmall/shoppingapp/migrations/0009_auto_20220306_0557.py | roygoswamisuvankar/shopping-mall | 8fdc194699e1610cf53210b84208979c27efe7c3 | [
"MIT"
] | null | null | null | shoppingmall/shoppingapp/migrations/0009_auto_20220306_0557.py | roygoswamisuvankar/shopping-mall | 8fdc194699e1610cf53210b84208979c27efe7c3 | [
"MIT"
] | null | null | null | shoppingmall/shoppingapp/migrations/0009_auto_20220306_0557.py | roygoswamisuvankar/shopping-mall | 8fdc194699e1610cf53210b84208979c27efe7c3 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2022-03-06 05:57
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('shoppingapp', '0008_alter_bank_ac_emp_phone'),
]
operations = [
migrations.AlterField(
model_name='bank_ac',
name='a... | 24.166667 | 62 | 0.586207 |
8dabbb08edfbd685c98ee7f6be687ef32b450e89 | 391 | py | Python | Build_1/asgi.py | AbhijithGanesh/car-data-analyzer | 8b60503c2fb060d0afa63107bf8defe4b48a5587 | [
"BSD-3-Clause"
] | null | null | null | Build_1/asgi.py | AbhijithGanesh/car-data-analyzer | 8b60503c2fb060d0afa63107bf8defe4b48a5587 | [
"BSD-3-Clause"
] | null | null | null | Build_1/asgi.py | AbhijithGanesh/car-data-analyzer | 8b60503c2fb060d0afa63107bf8defe4b48a5587 | [
"BSD-3-Clause"
] | null | null | null | """
ASGI config for Build_1 project.
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/asgi/
"""
import os
from django.core.asgi import get_asgi_application
os.environ.setdefault('DJANGO_SETTI... | 23 | 78 | 0.785166 |
6742461897bb9396c0d1f05898ff58fc0d6177b9 | 6,644 | py | Python | sentiment.py | IJPaul/song-sentiment-site | 70fb43be7c73ba7ada8e49768d10ebf161244c65 | [
"MIT"
] | null | null | null | sentiment.py | IJPaul/song-sentiment-site | 70fb43be7c73ba7ada8e49768d10ebf161244c65 | [
"MIT"
] | null | null | null | sentiment.py | IJPaul/song-sentiment-site | 70fb43be7c73ba7ada8e49768d10ebf161244c65 | [
"MIT"
] | null | null | null | import basic_scraping
from vaderSentiment.vaderSentiment import SentimentIntensityAnalyzer
import re
import googlesearch
"""
Returns an array containing lyrics of a song line by line
Parameter songURL: The Genius URL
Precondition: A valid song lyrics URL (string)
"""
def getLyrics(songURL):
lyricsArr = []
lyr... | 29.39823 | 110 | 0.653371 |
0977c379e85f3675d41b4af2a35b6fa7c2564005 | 2,009 | py | Python | litex_boards/platforms/sipeed_tang_nano.py | chmousset/litex-boards | c081177d77f37a4ea6cff150d42a69bd6f0abbc2 | [
"BSD-2-Clause"
] | null | null | null | litex_boards/platforms/sipeed_tang_nano.py | chmousset/litex-boards | c081177d77f37a4ea6cff150d42a69bd6f0abbc2 | [
"BSD-2-Clause"
] | null | null | null | litex_boards/platforms/sipeed_tang_nano.py | chmousset/litex-boards | c081177d77f37a4ea6cff150d42a69bd6f0abbc2 | [
"BSD-2-Clause"
] | null | null | null | #
# This file is part of LiteX-Boards.
#
# Copyright (c) 2021 Florent Kermarrec <florent@enjoy-digital.fr>
# SPDX-License-Identifier: BSD-2-Clause
# Board diagram/pinout:
# https://user-images.githubusercontent.com/1450143/133655492-532d5e9a-0635-4889-85c9-68683d06cae0.png
# http://dl.sipeed.com/TANG/Nano/HDK/Tang-NAN... | 32.934426 | 117 | 0.578895 |
662617d895fc10a9e86b3366f604a96459c527dd | 1,399 | py | Python | 2020_April_Leetcode_30_days_challenge/Week_1_Single Number/by_xor_in_place.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | 32 | 2020-01-05T13:37:16.000Z | 2022-03-26T07:27:09.000Z | 2020_April_Leetcode_30_days_challenge/Week_1_Single Number/by_xor_in_place.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | null | null | null | 2020_April_Leetcode_30_days_challenge/Week_1_Single Number/by_xor_in_place.py | coderMaruf/leetcode-1 | 20ffe26e43999e44c8acf9800acb371a49bb5853 | [
"MIT"
] | 8 | 2020-06-18T16:17:27.000Z | 2022-03-15T23:58:18.000Z | '''
Description:
Given a non-empty array of integers, every element appears twice except for one. Find that single one.
Note:
Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory?
Example 1:
Input: [2,2,1]
Output: 1
Example 2:
Input: [4,1,2,1,2]
Output: 4
... | 17.4875 | 106 | 0.587563 |
410d77d610b3e32840308bdac1aac7114f935e55 | 3,342 | py | Python | libcst/codemod/visitors/tests/test_gather_exports.py | hoduchieu01/LibCST | 23af2cb45e1f7647f1604404df5f6e5e87b2e42b | [
"Apache-2.0"
] | 1 | 2021-01-18T09:50:29.000Z | 2021-01-18T09:50:29.000Z | libcst/codemod/visitors/tests/test_gather_exports.py | hoduchieu01/LibCST | 23af2cb45e1f7647f1604404df5f6e5e87b2e42b | [
"Apache-2.0"
] | null | null | null | libcst/codemod/visitors/tests/test_gather_exports.py | hoduchieu01/LibCST | 23af2cb45e1f7647f1604404df5f6e5e87b2e42b | [
"Apache-2.0"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
#
from libcst import parse_module
from libcst.codemod import CodemodContext, CodemodTest
from libcst.codemod.visitors import GatherExportsVisit... | 29.575221 | 76 | 0.605625 |
86c1aca3554984ca27fed42a13f15d55d2972ffe | 1,010 | py | Python | magicked_admin/utils/text.py | Nightroad94/kf2-magicked-admin | 0c393a4a134f7ba51f0ed3ad9edcea19c3467fc1 | [
"MIT"
] | 16 | 2018-03-11T05:28:17.000Z | 2019-07-12T02:59:05.000Z | magicked_admin/utils/text.py | Nightroad94/kf2-magicked-admin | 0c393a4a134f7ba51f0ed3ad9edcea19c3467fc1 | [
"MIT"
] | 77 | 2019-09-17T22:45:04.000Z | 2021-11-22T20:03:59.000Z | magicked_admin/utils/text.py | Nightroad94/kf2-magicked-admin | 0c393a4a134f7ba51f0ed3ad9edcea19c3467fc1 | [
"MIT"
] | 10 | 2018-03-22T22:43:26.000Z | 2019-07-22T12:31:37.000Z | import math
CHAT_LINE_HEIGHT = 8
def millify(n):
if not n:
return '0'
millnames = ['', 'K', 'M', 'B', 'T']
n = float(n)
millidx = max(0,
min(len(millnames) - 1,
int(math.floor(
0 if n == 0 else math.log10(abs(n)) / 3))))
... | 21.041667 | 73 | 0.534653 |
01a488b62e12bf57c0ca24ea340869d7aadfc519 | 405 | py | Python | vh-vsftpd/__init__.py | rEinve/ajenti-v | 7f3ef24198f91d7b7be42bbf0df36414d09172a4 | [
"MIT"
] | 150 | 2015-01-08T22:49:25.000Z | 2021-11-13T03:15:50.000Z | vh-vsftpd/__init__.py | rEinve/ajenti-v | 7f3ef24198f91d7b7be42bbf0df36414d09172a4 | [
"MIT"
] | 148 | 2015-01-07T03:53:16.000Z | 2021-10-03T16:13:57.000Z | vh-vsftpd/__init__.py | rEinve/ajenti-v | 7f3ef24198f91d7b7be42bbf0df36414d09172a4 | [
"MIT"
] | 91 | 2015-01-08T22:49:15.000Z | 2022-03-17T12:04:29.000Z | import ajenti
from ajenti.api import *
from ajenti.plugins import *
info = PluginInfo(
title='Ajenti VH - VSFTPD Support',
icon='globe',
dependencies=[
PluginDependency('vh'),
PluginDependency('services'),
BinaryDependency('vsftpd'),
],
)
def init():
from ajenti.plugins.v... | 18.409091 | 51 | 0.664198 |
60b18005932362651742e91fa4bc2a4d8d4fa6e2 | 1,575 | py | Python | seven/main.py | yumenetwork/isn-tkinter | 4811e061e86b072bc4c494e43aaf829d4b90281b | [
"MIT"
] | null | null | null | seven/main.py | yumenetwork/isn-tkinter | 4811e061e86b072bc4c494e43aaf829d4b90281b | [
"MIT"
] | null | null | null | seven/main.py | yumenetwork/isn-tkinter | 4811e061e86b072bc4c494e43aaf829d4b90281b | [
"MIT"
] | null | null | null | from tkinter import *
myWindow = Tk()
x = 0
y = 0
l = 0
c = 0
# Fonctions
def create_grid():
grille.delete("all")
for i in range(5, 305, 20):
grille.create_line([(i, 5), (i, 305)])
for i in range(5, 305, 20):
grille.create_line([(5, i), (305, i)])
grille.create_line([(5, 5), (5, 30... | 25.819672 | 75 | 0.63746 |
9f92d0d2a8d7db55c4465aa4210f0a96882bce42 | 6,438 | py | Python | NLP/learn/utils.py | Sejik/NLP | 3799457fd15e3e7bb86820126e40d9d468906c92 | [
"Apache-2.0"
] | null | null | null | NLP/learn/utils.py | Sejik/NLP | 3799457fd15e3e7bb86820126e40d9d468906c92 | [
"Apache-2.0"
] | null | null | null | NLP/learn/utils.py | Sejik/NLP | 3799457fd15e3e7bb86820126e40d9d468906c92 | [
"Apache-2.0"
] | null | null | null |
from collections import OrderedDict
import json
import logging
from pathlib import Path
import os
import re
import torch
from torch.nn import DataParallel
import requests
logger = logging.getLogger(__name__)
""" Train Counter """
class TrainCounter:
global_step = 0
epoch = 0
def __init__(self, dis... | 30.511848 | 102 | 0.644765 |
9243714bdc98d2f98ce216309c584d6a44a35bf0 | 10,941 | py | Python | jenkins_jobs/local_yaml.py | bvberkum/jenkins-job-builder | bb105b69126bea59518204a05bc9dfc94bb23617 | [
"Apache-2.0"
] | null | null | null | jenkins_jobs/local_yaml.py | bvberkum/jenkins-job-builder | bb105b69126bea59518204a05bc9dfc94bb23617 | [
"Apache-2.0"
] | null | null | null | jenkins_jobs/local_yaml.py | bvberkum/jenkins-job-builder | bb105b69126bea59518204a05bc9dfc94bb23617 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (C) 2013 Hewlett-Packard.
#
# 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 la... | 33.56135 | 78 | 0.665021 |
dad8ed5807af3fa7a19745383758d3a4fd600bca | 55,162 | py | Python | test/unit/test_assistant_v1.py | U34rAli/python-sdk | 3ec1da7fcbbb540a221d980829a638bc94456da4 | [
"Apache-2.0"
] | 2 | 2019-11-23T03:32:32.000Z | 2019-11-23T03:32:36.000Z | test/unit/test_assistant_v1.py | U34rAli/python-sdk | 3ec1da7fcbbb540a221d980829a638bc94456da4 | [
"Apache-2.0"
] | null | null | null | test/unit/test_assistant_v1.py | U34rAli/python-sdk | 3ec1da7fcbbb540a221d980829a638bc94456da4 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
import json
import datetime
from dateutil.tz import tzutc
import responses
import ibm_watson
from ibm_watson import ApiException
from ibm_watson.assistant_v1 import Context, Counterexample, \
CounterexampleCollection, Entity, EntityCollection, Example, \
ExampleCollection, MessageInput, Intent, ... | 35.247284 | 243 | 0.612451 |
a9f846b08efd2d05e03a654f0afb952cd945e717 | 9,850 | py | Python | tests/toranj/test-036-wpantund-host-route-management.py | AdityaHPatwardhan/openthread | a201e9d5d0273bb51fa20efc8758be20a725018e | [
"BSD-3-Clause"
] | 2,962 | 2016-05-11T15:06:06.000Z | 2022-03-27T20:06:16.000Z | tests/toranj/test-036-wpantund-host-route-management.py | AdityaHPatwardhan/openthread | a201e9d5d0273bb51fa20efc8758be20a725018e | [
"BSD-3-Clause"
] | 5,899 | 2016-05-11T19:21:49.000Z | 2022-03-31T18:17:20.000Z | tests/toranj/test-036-wpantund-host-route-management.py | AdityaHPatwardhan/openthread | a201e9d5d0273bb51fa20efc8758be20a725018e | [
"BSD-3-Clause"
] | 1,113 | 2016-05-11T15:37:42.000Z | 2022-03-31T09:37:04.000Z | #!/usr/bin/env python
#
# Copyright (c) 2019, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# ... | 36.481481 | 121 | 0.672284 |
d1fda3712e6e0cc716f7f5c1301c56d001c15916 | 950 | py | Python | python/testData/highlighting/async.py | alexey-anufriev/intellij-community | ffcd46f14e630acdefcc76e2bfc7c43d2449013a | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/highlighting/async.py | alexey-anufriev/intellij-community | ffcd46f14e630acdefcc76e2bfc7c43d2449013a | [
"Apache-2.0"
] | null | null | null | python/testData/highlighting/async.py | alexey-anufriev/intellij-community | ffcd46f14e630acdefcc76e2bfc7c43d2449013a | [
"Apache-2.0"
] | 1 | 2020-10-15T05:56:42.000Z | 2020-10-15T05:56:42.000Z | <info descr="null">async</info> def <info descr="PY.FUNC_DEFINITION">foo</info>():
pass
async = 1
<info descr="null">async</info> def <info descr="PY.FUNC_DEFINITION">bar</info>():
pass
<info descr="null">async</info> def<error descr="'(' expected"><error descr="Identifier expected"> </error></error> # Inco... | 32.758621 | 170 | 0.636842 |
949ec1cd20386cf9efe5d10b577c1f8e55011d04 | 1,591 | py | Python | engine/station_control/test_plans/ppr_test.py | geeklevi/PythonElectron | 0a01b8842a56f91338de6c341bb1c2037aaae359 | [
"CC0-1.0"
] | null | null | null | engine/station_control/test_plans/ppr_test.py | geeklevi/PythonElectron | 0a01b8842a56f91338de6c341bb1c2037aaae359 | [
"CC0-1.0"
] | null | null | null | engine/station_control/test_plans/ppr_test.py | geeklevi/PythonElectron | 0a01b8842a56f91338de6c341bb1c2037aaae359 | [
"CC0-1.0"
] | null | null | null | from .generic_test import GenericTestPlan
from .instruments import Keithley2602B, Agilent86140B
from .tests import liv
import time
class PprTestPlan(GenericTestPlan):
def __init__(self, *args, **kwargs):
super().__init__(self, *args, **kwargs)
print("pprtest")
# print(args)
# print(k... | 36.159091 | 102 | 0.610308 |
9f09e197b33f41b4d52f1fea70587afa4cebdabb | 428,435 | py | Python | tests/test_other.py | asRIA/emscripten | 2bee818f21ff1687f28a4186795c10509cea784c | [
"MIT"
] | null | null | null | tests/test_other.py | asRIA/emscripten | 2bee818f21ff1687f28a4186795c10509cea784c | [
"MIT"
] | null | null | null | tests/test_other.py | asRIA/emscripten | 2bee818f21ff1687f28a4186795c10509cea784c | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright 2013 The Emscripten Authors. All rights reserved.
# Emscripten is available under two separate licenses, the MIT license and the
# University of Illinois/NCSA Open Source License. Both these licenses can be
# found in the LICENSE file.
# noqa: E241
from __future__ import print_function
fr... | 40.865605 | 382 | 0.622225 |
77e77629268a405100ac188230a74378bd208ddf | 478 | py | Python | models/Round6/base_case.py | gehilley/NondimensionalWeathering | 8b59a00d59c026e1b3a3b8f7c3c6fe51a272c21a | [
"MIT"
] | null | null | null | models/Round6/base_case.py | gehilley/NondimensionalWeathering | 8b59a00d59c026e1b3a3b8f7c3c6fe51a272c21a | [
"MIT"
] | null | null | null | models/Round6/base_case.py | gehilley/NondimensionalWeathering | 8b59a00d59c026e1b3a3b8f7c3c6fe51a272c21a | [
"MIT"
] | null | null | null | filename = 'models/Round6/base_case.p'
from weathering_model.weathering_model import run_weathering_model
import numpy as np
import pickle as p
# Run model:
L_star = 9.51
Y0_star = 3.56E-04
v_star = 2.88E+02
nx = 101
t_star_max = 35.8
t_star = np.linspace(0,t_star_max,num=11)
dx_star = L_star / float(nx)
x, X, Y =... | 22.761905 | 85 | 0.73431 |
9fa5a3b7ce8b947fb031c9941a103e897e433f3a | 3,372 | py | Python | 29_nicePitchShifter.py | jaakjensen/PythonDSP | d4f5850a5379c14d531e6f9c6d43e03f53fb888d | [
"MIT"
] | 1 | 2022-01-19T10:40:41.000Z | 2022-01-19T10:40:41.000Z | 29_nicePitchShifter.py | jaakjensen/PythonDSP | d4f5850a5379c14d531e6f9c6d43e03f53fb888d | [
"MIT"
] | null | null | null | 29_nicePitchShifter.py | jaakjensen/PythonDSP | d4f5850a5379c14d531e6f9c6d43e03f53fb888d | [
"MIT"
] | null | null | null |
import matplotlib.pyplot as plt
import numpy as np
import scipy.io.wavfile as wav
wav_fname = 'dspfiles/BibioGuitar.wav'
fs, inputSignal = wav.read(wav_fname)
Ts = 1/fs
semitones = 7 #how many semitones do we increase by?
tr = 2**(semitones/12)
dRate = 1 - tr #Delay rate... | 26.761905 | 80 | 0.650949 |
899263acbfc0d75aa9365eb92cb3e8ada285ee7e | 12,005 | py | Python | src/testdir/test_channel.py | uakms/macvim | 72e6bbfa9f0a436ba0c93b8dede60bc307e07d19 | [
"Vim"
] | 1 | 2019-01-23T10:07:39.000Z | 2019-01-23T10:07:39.000Z | src/testdir/test_channel.py | uakms/macvim | 72e6bbfa9f0a436ba0c93b8dede60bc307e07d19 | [
"Vim"
] | null | null | null | src/testdir/test_channel.py | uakms/macvim | 72e6bbfa9f0a436ba0c93b8dede60bc307e07d19 | [
"Vim"
] | 1 | 2021-11-07T21:46:41.000Z | 2021-11-07T21:46:41.000Z | #!/usr/bin/python
#
# Server that will accept connections from a Vim channel.
# Used by test_channel.vim.
#
# This requires Python 2.6 or later.
from __future__ import print_function
import json
import socket
import sys
import time
import threading
try:
# Python 3
import socketserver
except ImportError:
#... | 44.298893 | 94 | 0.422241 |
2575ea3e862be2a50d6af889cfd57de5930d5bb9 | 2,459 | py | Python | poptimizer/portfolio/tests/test_portfolio.py | ArjaraGit/poptimizer | 0d221d964791cc387dde44529cacb19d35e5febe | [
"Unlicense"
] | null | null | null | poptimizer/portfolio/tests/test_portfolio.py | ArjaraGit/poptimizer | 0d221d964791cc387dde44529cacb19d35e5febe | [
"Unlicense"
] | null | null | null | poptimizer/portfolio/tests/test_portfolio.py | ArjaraGit/poptimizer | 0d221d964791cc387dde44529cacb19d35e5febe | [
"Unlicense"
] | 1 | 2021-12-02T13:32:44.000Z | 2021-12-02T13:32:44.000Z | import logging
from pathlib import Path
import numpy as np
import pandas as pd
import pytest
from poptimizer.config import POptimizerError
from poptimizer.portfolio import portfolio
from poptimizer.portfolio.portfolio import CASH, PORTFOLIO
PARAMS = dict(
name=["test"],
date="2018-03-19",
cash=1000,
... | 32.786667 | 117 | 0.701098 |
b466637895b7bb1bb07021ad297d64b537e22894 | 393 | py | Python | python/ql/test/library-tests/frameworks/django-v2-v3/testproj/wsgi.py | timoles/codeql | 2d24387e9e300bf03be35694816b1e76ae88a50c | [
"MIT"
] | 4,036 | 2020-04-29T00:09:57.000Z | 2022-03-31T14:16:38.000Z | python/ql/test/library-tests/frameworks/django-v2-v3/testproj/wsgi.py | baby636/codeql | 097b6e5e3364ecc7103586d6feb308861e15538e | [
"MIT"
] | 2,970 | 2020-04-28T17:24:18.000Z | 2022-03-31T22:40:46.000Z | python/ql/test/library-tests/frameworks/django-v2-v3/testproj/wsgi.py | ScriptBox99/github-codeql | 2ecf0d3264db8fb4904b2056964da469372a235c | [
"MIT"
] | 794 | 2020-04-29T00:28:25.000Z | 2022-03-30T08:21:46.000Z | """
WSGI config for testproj project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETT... | 23.117647 | 78 | 0.78626 |
c49739da41ff9c2a4e8cee56862d90fab4023245 | 2,526 | py | Python | tasks/util/release.py | jchesterpivotal/Faasm | d4e25baf0c69df7eea8614de3759792748f7b9d4 | [
"Apache-2.0"
] | null | null | null | tasks/util/release.py | jchesterpivotal/Faasm | d4e25baf0c69df7eea8614de3759792748f7b9d4 | [
"Apache-2.0"
] | null | null | null | tasks/util/release.py | jchesterpivotal/Faasm | d4e25baf0c69df7eea8614de3759792748f7b9d4 | [
"Apache-2.0"
] | null | null | null | from os.path import join
from subprocess import check_output
from tasks.util.env import FAASM_LOCAL_DIR, FAASM_TOOLCHAIN_FILE
from tasks.util.version import get_faasm_version
TOOLCHAIN_INSTALL = join(FAASM_LOCAL_DIR, "toolchain")
def _get_artifact_url(name, version=None):
version = version if version else get_f... | 28.066667 | 93 | 0.756928 |
feca693e5c590cb0ffedab8463eae4b4ecf6d2c5 | 1,425 | py | Python | Kai/crab/NANOv7_Fri13/2017/ElEl/crab_cfg_2017_ElEl_B.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | 1 | 2022-01-17T17:29:38.000Z | 2022-01-17T17:29:38.000Z | Kai/crab/NANOv7_Fri13/2017/ElEl/crab_cfg_2017_ElEl_B.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | null | null | null | Kai/crab/NANOv7_Fri13/2017/ElEl/crab_cfg_2017_ElEl_B.py | NJManganelli/FourTopNAOD | 9743d5b49bdbad27a74abb7b2d5b7295f678a0e3 | [
"Apache-2.0"
] | 1 | 2021-12-15T10:56:50.000Z | 2021-12-15T10:56:50.000Z | import os
from WMCore.Configuration import Configuration
from CRABClient.UserUtilities import config, getUsernameFromCRIC
config = Configuration()
config.section_("General")
config.General.requestName = '2017_ElEl_B'
config.General.transferOutputs = True
config.General.transferLogs = True
config.section_("JobType")
c... | 36.538462 | 120 | 0.762807 |
dda0c49e580be98242d3b8520e746c5991626259 | 11,404 | py | Python | recbole/trainer/hyper_tuning.py | ValerieYang99/RecBole | 19ea101b300fbf31bbc79d8efc80c65926834488 | [
"MIT"
] | 1,773 | 2020-11-04T01:22:11.000Z | 2022-03-31T08:05:41.000Z | recbole/trainer/hyper_tuning.py | chenyushuo/RecBole | f04084b8d2cffcb79eb9e4b21325f8f6c75c638e | [
"MIT"
] | 378 | 2020-11-05T02:42:27.000Z | 2022-03-31T22:57:04.000Z | recbole/trainer/hyper_tuning.py | chenyushuo/RecBole | f04084b8d2cffcb79eb9e4b21325f8f6c75c638e | [
"MIT"
] | 354 | 2020-11-04T01:37:09.000Z | 2022-03-31T10:39:32.000Z | # -*- coding: utf-8 -*-
# @Time : 2020/7/19 19:06
# @Author : Shanlei Mu
# @Email : slmu@ruc.edu.cn
# @File : hyper_tuning.py
"""
recbole.trainer.hyper_tuning
############################
"""
from functools import partial
import numpy as np
from recbole.utils.utils import dict2str
def _recursiveFindNodes(roo... | 36.787097 | 118 | 0.584532 |
579c30165d8cf07c02a7f02c78049ec4ec612d5a | 1,713 | py | Python | core/helper.py | ArcArcaman/Karnaugh-Map-Generator | 47e17fa18164a287f2c34d6fc539b84a7a28793a | [
"MIT"
] | null | null | null | core/helper.py | ArcArcaman/Karnaugh-Map-Generator | 47e17fa18164a287f2c34d6fc539b84a7a28793a | [
"MIT"
] | null | null | null | core/helper.py | ArcArcaman/Karnaugh-Map-Generator | 47e17fa18164a287f2c34d6fc539b84a7a28793a | [
"MIT"
] | null | null | null |
def is_boolean(val):
if val == 0 or val == 1 or val == '0' or val == '1':
return True
return False
class KMap:
@classmethod
def find_id(cls, idx, size):
idx_int = int(idx)
_offset = [0, 1, 3, 2]
start_val = idx_int//4
offset_val = _offset[idx_int%4]
... | 27.629032 | 107 | 0.579685 |
2ed3b44b831cd6b3a45b84e6d8fb1fb271b42ad9 | 15,730 | py | Python | docs/conf.py | kimpers/airflow | 88989200a66291580088188f06a6db503ac823e2 | [
"Apache-2.0"
] | 1 | 2020-04-22T19:37:22.000Z | 2020-04-22T19:37:22.000Z | docs/conf.py | kimpers/airflow | 88989200a66291580088188f06a6db503ac823e2 | [
"Apache-2.0"
] | 2 | 2021-03-11T04:23:28.000Z | 2021-09-29T17:44:44.000Z | docs/conf.py | kimpers/airflow | 88989200a66291580088188f06a6db503ac823e2 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# flake8: noqa
# Disable Flake8 because of all the sphinx imports
#
# 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 licens... | 33.397028 | 110 | 0.701971 |
fb865fa4092408d9bc937c2e90853d0d8623f0a8 | 9,517 | py | Python | coc/ext/discordlinks/__init__.py | notPlasticCat/coc.py | 3b803a9c142d7554675418a6df6436dca90c5a05 | [
"MIT"
] | 75 | 2019-04-18T18:27:24.000Z | 2022-03-31T19:33:36.000Z | coc/ext/discordlinks/__init__.py | notPlasticCat/coc.py | 3b803a9c142d7554675418a6df6436dca90c5a05 | [
"MIT"
] | 69 | 2019-04-18T20:28:26.000Z | 2022-03-10T14:06:07.000Z | coc/ext/discordlinks/__init__.py | notPlasticCat/coc.py | 3b803a9c142d7554675418a6df6436dca90c5a05 | [
"MIT"
] | 55 | 2019-04-17T21:11:22.000Z | 2022-03-13T22:32:19.000Z | """An extension that helps interact with the Clash of Clans Discord Junkies' Discord Links API."""
import asyncio
import base64
import logging
import typing
import json
from collections import namedtuple
from datetime import datetime
import aiohttp
from coc.http import json_or_text
from coc.utils import correct_tag... | 34.357401 | 116 | 0.618262 |
0974afc3c8794d148b13d3236c2636a05d8d74b1 | 1,702 | py | Python | data/level/level10363.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | null | null | null | data/level/level10363.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 6 | 2020-07-04T02:53:08.000Z | 2022-03-11T23:53:14.000Z | data/level/level10363.py | levelupai/match3-level-similarity | cc9b28b8741b41bea1273c8bc9b4d265d79a1dca | [
"Apache-2.0"
] | 3 | 2019-12-31T11:42:59.000Z | 2021-03-28T20:06:13.000Z | data = {'level_index': 10363, 'move_count': '30',
'board_info': {(0, 8): {}, (0, 7): {}, (0, 6): {}, (0, 5): {}, (0, 4): {}, (0, 3): {}, (0, 2): {}, (0, 1): {},
(0, 0): {'fall_point': (0, -1)}, (1, 8): {}, (1, 7): {}, (1, 6): {}, (1, 5): {}, (1, 4): {},
(1, 3): {}, ... | 100.117647 | 118 | 0.249119 |
3f9483fd7423dd03a262739e5f7072b81df8877a | 475 | py | Python | pythontutorials/books/AutomateTheBoringStuff/Ch11/P1_mapIt.py | JoseALermaIII/python-tutorials | 9d6cb78beec0bb55e27c49da1217317ba4d5f4fc | [
"MIT"
] | 2 | 2017-04-20T02:57:19.000Z | 2018-10-12T20:15:47.000Z | pythontutorials/books/AutomateTheBoringStuff/Ch11/P1_mapIt.py | JoseALermaIII/python-tutorials | 9d6cb78beec0bb55e27c49da1217317ba4d5f4fc | [
"MIT"
] | 8 | 2021-03-18T21:50:16.000Z | 2022-03-11T23:38:01.000Z | pythontutorials/books/AutomateTheBoringStuff/Ch11/P1_mapIt.py | JoseALermaIII/python-tutorials | 9d6cb78beec0bb55e27c49da1217317ba4d5f4fc | [
"MIT"
] | 3 | 2018-08-30T20:30:50.000Z | 2022-01-18T13:40:51.000Z | #! python3
"""Map it
Launches a map in the browser using an address from the command line or clipboard.
"""
def main():
import webbrowser, sys
from pyperclip import paste
if len(sys.argv) > 1:
# Get address from command line.
address = ' '.join(sys.argv[1:])
else:
# Get addr... | 19 | 82 | 0.618947 |
e9cca667220497a295845144c207f60f61a677f3 | 1,744 | py | Python | pose_vis.py | rancheng/SE3_Pose_Interp | 14ce5db190ec34ac6c5fc013aaa0b57711427818 | [
"MIT"
] | 1 | 2022-02-17T06:30:36.000Z | 2022-02-17T06:30:36.000Z | pose_vis.py | rancheng/SE3_Pose_Interp | 14ce5db190ec34ac6c5fc013aaa0b57711427818 | [
"MIT"
] | null | null | null | pose_vis.py | rancheng/SE3_Pose_Interp | 14ce5db190ec34ac6c5fc013aaa0b57711427818 | [
"MIT"
] | null | null | null | from evo.tools import file_interface
from evo.tools import plot
import matplotlib.pyplot as plt
import argparse
# temporarily override some package settings
from evo.tools.settings import SETTINGS
SETTINGS.plot_usetex = False
SETTINGS.plot_axis_marker_scale = 0.1
DROP_FRAMES = True # drop some keyframes to make the ... | 38.755556 | 81 | 0.699541 |
75e49f5b8e901efd7480e8383689fa28142b95a1 | 11,617 | py | Python | zhmcclient/_hba.py | eaibmz/python-zhmcclient | 901327b932cf7f0175bbb0d18638abbdb82eac04 | [
"Apache-2.0"
] | null | null | null | zhmcclient/_hba.py | eaibmz/python-zhmcclient | 901327b932cf7f0175bbb0d18638abbdb82eac04 | [
"Apache-2.0"
] | null | null | null | zhmcclient/_hba.py | eaibmz/python-zhmcclient | 901327b932cf7f0175bbb0d18638abbdb82eac04 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2021 IBM Corp. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 34.369822 | 79 | 0.634329 |
99c3eb616a31b56cff5fd66f88cb213fc7fbf3f4 | 1,854 | py | Python | src/pymodaq_plugins/daq_viewer_plugins/plugins_1D/daq_1Dviewer_Mock.py | jerlfan/pymodaq_plugins | c92d06b7766dc746a6f4b445865a5723a5fceb0d | [
"CECILL-B"
] | 5 | 2019-04-04T02:57:17.000Z | 2019-10-23T18:13:57.000Z | src/pymodaq_plugins/daq_viewer_plugins/plugins_1D/daq_1Dviewer_Mock.py | jerlfan/pymodaq_plugins | c92d06b7766dc746a6f4b445865a5723a5fceb0d | [
"CECILL-B"
] | 7 | 2019-10-02T10:54:05.000Z | 2021-03-29T13:55:39.000Z | src/pymodaq_plugins/daq_viewer_plugins/plugins_1D/daq_1Dviewer_Mock.py | jerlfan/pymodaq_plugins | c92d06b7766dc746a6f4b445865a5723a5fceb0d | [
"CECILL-B"
] | 43 | 2019-04-04T02:57:25.000Z | 2022-02-04T15:26:32.000Z | from PyQt5.QtCore import QThread
from pymodaq.daq_viewer.utility_classes import DAQ_Viewer_base
import numpy as np
from easydict import EasyDict as edict
from collections import OrderedDict
from pymodaq.daq_utils.daq_utils import ThreadCommand, getLineInfo
from pymodaq.daq_utils.daq_utils import gauss1D
from pymodaq.da... | 37.08 | 161 | 0.695793 |
7b96648c3af8d957b55140f2c1d47a1b70d190ff | 4,491 | py | Python | electrum_atom/tests/test_mnemonic.py | bitcoin-atom/electrum-atom | 156d4d54c5493bcda930efcb972a0c600c36a11d | [
"MIT"
] | 4 | 2018-11-17T23:40:04.000Z | 2021-11-09T20:08:18.000Z | electrum_atom/tests/test_mnemonic.py | bitcoin-atom/electrum-atom | 156d4d54c5493bcda930efcb972a0c600c36a11d | [
"MIT"
] | 1 | 2019-11-12T03:09:15.000Z | 2019-11-12T03:09:15.000Z | electrum_atom/tests/test_mnemonic.py | bitcoin-atom/electrum-atom | 156d4d54c5493bcda930efcb972a0c600c36a11d | [
"MIT"
] | 1 | 2018-09-11T23:30:16.000Z | 2018-09-11T23:30:16.000Z | from electrum_atom import keystore
from electrum_atom import mnemonic
from electrum_atom import old_mnemonic
from electrum_atom.util import bh2u, bfh
from electrum_atom.bitcoin import is_new_seed
from electrum_atom.version import SEED_PREFIX_SW
from . import SequentialTestCase
from .test_wallet_vertical import UNICODE... | 48.815217 | 333 | 0.77377 |
535a514b285b8823ac60881e023b0d61e08faf57 | 4,438 | py | Python | authentication/forms.py | HiroshiFuu/cs-balloting | 565eb3ee88769d88b27705828c10c7b5be964ef5 | [
"MIT"
] | null | null | null | authentication/forms.py | HiroshiFuu/cs-balloting | 565eb3ee88769d88b27705828c10c7b5be964ef5 | [
"MIT"
] | null | null | null | authentication/forms.py | HiroshiFuu/cs-balloting | 565eb3ee88769d88b27705828c10c7b5be964ef5 | [
"MIT"
] | null | null | null | # -*- encoding: utf-8 -*-
from django import forms
from django.contrib.auth import password_validation
from django.contrib.auth.forms import UserCreationForm
from django.utils.translation import gettext as _
from django.core.exceptions import ValidationError
from .models import AuthUser
from .models import Company
f... | 28.632258 | 109 | 0.583146 |
3993278ce30c4911993455f7920ac78edeebc3aa | 4,038 | py | Python | phase2_reducer.py | someshdube/Crowdsourcing | 497fd46415b4c0fc2be69d42e0661d7fe423b278 | [
"Apache-2.0"
] | null | null | null | phase2_reducer.py | someshdube/Crowdsourcing | 497fd46415b4c0fc2be69d42e0661d7fe423b278 | [
"Apache-2.0"
] | null | null | null | phase2_reducer.py | someshdube/Crowdsourcing | 497fd46415b4c0fc2be69d42e0661d7fe423b278 | [
"Apache-2.0"
] | null | null | null | """
Script to create a list of question and single answer to them. The answers that pass a certain merge
threshold will be given only.
"""
# import spacy
from csgame.nlp_loader import nlp
import RedundancyV1
from collections import defaultdict
from operator import itemgetter
class AnswerReducer:
"""
Class t... | 36.709091 | 104 | 0.589896 |
856bd31638fe4b81f1665cc7133ea88f508ae415 | 46,198 | py | Python | sdk/servicebus/azure-servicebus/azure/servicebus/_common/message.py | sima-zhu/azure-sdk-for-python | a413dc783f0df7dc65e9c2ef9762fabff1708c4e | [
"MIT"
] | null | null | null | sdk/servicebus/azure-servicebus/azure/servicebus/_common/message.py | sima-zhu/azure-sdk-for-python | a413dc783f0df7dc65e9c2ef9762fabff1708c4e | [
"MIT"
] | null | null | null | sdk/servicebus/azure-servicebus/azure/servicebus/_common/message.py | sima-zhu/azure-sdk-for-python | a413dc783f0df7dc65e9c2ef9762fabff1708c4e | [
"MIT"
] | null | null | null | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -------------------------------------------------------------------------
# pylint: d... | 39.963668 | 128 | 0.655591 |
2bb8ea9f625ea410f3c8382797f211b4f7ba5b71 | 902 | py | Python | setup.py | jfjlaros/online-array | e946f9d8e89a77f67317eb6136f5c5d1df9d20ed | [
"MIT"
] | null | null | null | setup.py | jfjlaros/online-array | e946f9d8e89a77f67317eb6136f5c5d1df9d20ed | [
"MIT"
] | null | null | null | setup.py | jfjlaros/online-array | e946f9d8e89a77f67317eb6136f5c5d1df9d20ed | [
"MIT"
] | null | null | null | import sys
from setuptools import setup
import online_array as distmeta
if sys.version_info < (2, 6):
raise Exception('online-array requires Python 2.6 or higher.')
setup(
name='online-array',
version=distmeta.__version__,
description='An array-like object that calls a function.',
long_descript... | 28.1875 | 66 | 0.672949 |
164fa31ee96da494e24a05d52f91833b168f084a | 3,014 | py | Python | scrape_mars.py | sadik-20/Web-Scraping-Challenge | d428615e43ccf893ae4f7fc3b9927fc019abb421 | [
"ADSL"
] | null | null | null | scrape_mars.py | sadik-20/Web-Scraping-Challenge | d428615e43ccf893ae4f7fc3b9927fc019abb421 | [
"ADSL"
] | null | null | null | scrape_mars.py | sadik-20/Web-Scraping-Challenge | d428615e43ccf893ae4f7fc3b9927fc019abb421 | [
"ADSL"
] | null | null | null | # --- dependencies and setup ---
from splinter import Browser
from bs4 import BeautifulSoup as bs
import pandas as pd
import time
import requests
#from webdriver_manager.chrome import ChromeDriverManager
# This is for debugging
def savetofile(contents):
file = open('_temporary.txt',"w",encoding="utf-8")
file.... | 28.168224 | 101 | 0.637359 |
7bc2082b84ed08dc1ef6019ee65fc939d7c361c7 | 821 | pyp | Python | LDDImport.pyp | gemvfx/LDDImport | 07179ce7feb474a78df46e204a9d7589fd140811 | [
"MIT"
] | 1 | 2019-05-08T10:50:45.000Z | 2019-05-08T10:50:45.000Z | LDDImport.pyp | gemvfx/LDDImport | 07179ce7feb474a78df46e204a9d7589fd140811 | [
"MIT"
] | 2 | 2016-10-12T15:02:56.000Z | 2019-05-17T11:46:25.000Z | LDDImport.pyp | gemvfx/LDDImport | 07179ce7feb474a78df46e204a9d7589fd140811 | [
"MIT"
] | null | null | null | """
Lego Digital Designer C4D Importer
Copyright: Gerhard Messer
Written for CINEMA 4D R16+
Version History
0.1 - 2015-05-18 - initial plugin
"""
import c4d
from c4d import gui, plugins, utils, bitmaps, storage
import os, sys
#1033677 LDDImport -- registered 25.09.2014
PLUGIN_ID = 1033677
class Olddimporter(... | 22.805556 | 104 | 0.618758 |
8db9f20d7b1c5f23e3905f72b0d1cda12f6482a9 | 994 | py | Python | sdk/servicebus/azure-servicebus/azure/servicebus/aio/__init__.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 1 | 2020-08-17T14:40:09.000Z | 2020-08-17T14:40:09.000Z | sdk/servicebus/azure-servicebus/azure/servicebus/aio/__init__.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 2 | 2020-07-17T13:57:08.000Z | 2020-07-21T18:30:37.000Z | sdk/servicebus/azure-servicebus/azure/servicebus/aio/__init__.py | LianwMS/azure-sdk-for-python | 612d7bca9de86ee1bd1fa59291d7bf897ba9213f | [
"MIT"
] | 1 | 2020-09-18T13:20:20.000Z | 2020-09-18T13:20:20.000Z | # ------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# -------------------------------------------------------------------------
from ._async... | 39.76 | 75 | 0.702213 |
a7618d26e0e366be168fbc8dbea3be23f14c033f | 17,860 | py | Python | c4/system/deviceManager.py | Brewgarten/c4-system-manager | 6fdec33ced4b1cb32d82a24cd168447a899b7e10 | [
"MIT"
] | null | null | null | c4/system/deviceManager.py | Brewgarten/c4-system-manager | 6fdec33ced4b1cb32d82a24cd168447a899b7e10 | [
"MIT"
] | 1 | 2017-10-17T21:51:40.000Z | 2017-10-17T21:51:40.000Z | c4/system/deviceManager.py | Brewgarten/c4-system-manager | 6fdec33ced4b1cb32d82a24cd168447a899b7e10 | [
"MIT"
] | null | null | null | """
Copyright (c) IBM 2015-2017. All Rights Reserved.
Project name: c4-system-manager
This project is licensed under the MIT License, see LICENSE
This module provides a device manager interface to implement device managers.
In particular one should extend :py:class:`~c4.system.deviceManager.DeviceManagerImplementatio... | 36.300813 | 171 | 0.633315 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.