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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a17224f6572387f2bf5e2725f83d913460c2b76 | 14,313 | py | Python | BagOfWordsClassification.py | JustusSchwan/MasterThesis | a9b928ed1c121a72ad1bfec28d941d31e4b232e8 | [
"MIT"
] | null | null | null | BagOfWordsClassification.py | JustusSchwan/MasterThesis | a9b928ed1c121a72ad1bfec28d941d31e4b232e8 | [
"MIT"
] | null | null | null | BagOfWordsClassification.py | JustusSchwan/MasterThesis | a9b928ed1c121a72ad1bfec28d941d31e4b232e8 | [
"MIT"
] | null | null | null | from __future__ import print_function
import cPickle
import itertools
import sqlite3
from os import path
import matplotlib.pyplot as plt
import numpy as np
import pylab
from scipy import stats
from sklearn.decomposition import PCA
from sklearn.metrics import confusion_matrix
from sklearn.model_selection import LeaveO... | 37.566929 | 118 | 0.667854 |
4a1722bc0cc582a48bfff34394bf3211b751f442 | 4,818 | py | Python | src/offline/news/model-update-embedding/src/train.py | shenshaoyong/recommender-system-dev-workshop-code | ce422627181472ad513f473b65bf42410c46304a | [
"Apache-2.0"
] | 1 | 2021-07-14T09:15:40.000Z | 2021-07-14T09:15:40.000Z | src/offline/news/model-update-embedding/src/train.py | shenshaoyong/recommender-system-dev-workshop-code | ce422627181472ad513f473b65bf42410c46304a | [
"Apache-2.0"
] | null | null | null | src/offline/news/model-update-embedding/src/train.py | shenshaoyong/recommender-system-dev-workshop-code | ce422627181472ad513f473b65bf42410c46304a | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import os
import sys
import math
import pickle
import boto3
import os
import numpy as np
import kg
import pandas as pd
# from tqdm import tqdm
import time
import argparse
import json
import logging
import re
import dglke
# tqdm.pandas()
# pandarallel.initialize(progress_bar=True)
... | 31.907285 | 88 | 0.697177 |
4a17230546b098643b2dfed1560dce43de4cbac9 | 17,538 | py | Python | Lib/test/test_gettext.py | deadsnakes/python2.3 | 0b4a6871ca57123c10aa48cc2a5d2b7c0ee3c849 | [
"PSF-2.0"
] | 1 | 2020-11-26T18:53:46.000Z | 2020-11-26T18:53:46.000Z | Lib/test/test_gettext.py | deadsnakes/python2.3 | 0b4a6871ca57123c10aa48cc2a5d2b7c0ee3c849 | [
"PSF-2.0"
] | null | null | null | Lib/test/test_gettext.py | deadsnakes/python2.3 | 0b4a6871ca57123c10aa48cc2a5d2b7c0ee3c849 | [
"PSF-2.0"
] | 1 | 2019-04-11T11:27:01.000Z | 2019-04-11T11:27:01.000Z | import os
import base64
import shutil
import gettext
import unittest
from test.test_support import run_suite
# TODO:
# - Add new tests, for example for "dgettext"
# - Remove dummy tests, for example testing for single and double quotes
# has no sense, it would have if we were testing a parser (i.e. pygettext)
#... | 38.973333 | 217 | 0.717243 |
4a17230e44b6828d642f6f6e5280fb7a11660f5d | 5,351 | py | Python | tests/generator/test_rom.py | 13thProgression/peas-blockchain | 8e058cbfe0c1ab73f7c1ec41bedb39071c63141c | [
"Apache-2.0"
] | 2 | 2021-08-16T17:45:07.000Z | 2021-09-18T19:00:58.000Z | tests/generator/test_rom.py | 13thProgression/peas-blockchain | 8e058cbfe0c1ab73f7c1ec41bedb39071c63141c | [
"Apache-2.0"
] | 4 | 2021-09-26T15:50:20.000Z | 2021-10-06T06:18:51.000Z | tests/generator/test_rom.py | 13thProgression/peas-blockchain | 8e058cbfe0c1ab73f7c1ec41bedb39071c63141c | [
"Apache-2.0"
] | 3 | 2021-09-29T19:08:41.000Z | 2022-03-15T08:47:28.000Z | from clvm_tools import binutils
from clvm_tools.clvmc import compile_clvm_text
from peas.full_node.generator import run_generator
from peas.full_node.mempool_check_conditions import get_name_puzzle_conditions
from peas.types.blockchain_format.program import Program, SerializedProgram
from peas.types.blockchain_format.... | 39.345588 | 120 | 0.744721 |
4a1724911663165b0241f657d18fff72cfa61cb6 | 4,907 | py | Python | test/test_unit_connection.py | richiverse/snowflake-connector-python | 1dd45059ba06bdfeb840914982df51f1b6b913a7 | [
"Apache-2.0"
] | null | null | null | test/test_unit_connection.py | richiverse/snowflake-connector-python | 1dd45059ba06bdfeb840914982df51f1b6b913a7 | [
"Apache-2.0"
] | null | null | null | test/test_unit_connection.py | richiverse/snowflake-connector-python | 1dd45059ba06bdfeb840914982df51f1b6b913a7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012-2019 Snowflake Computing Inc. All right reserved.
#
import os
import snowflake.connector
from snowflake.connector.auth import (
delete_temporary_credential_file,
)
from snowflake.connector.compat import PY2
if PY2:
from mock import patch
els... | 28.864706 | 78 | 0.557367 |
4a1724b5d3b3fe1888267a8eadcc1b16fa815be8 | 113 | py | Python | code/pyFoamCompressCaseFiles.py | sosohungry/pyfoam | b19e40a0ef1f41268930122226660414722178e6 | [
"MIT"
] | null | null | null | code/pyFoamCompressCaseFiles.py | sosohungry/pyfoam | b19e40a0ef1f41268930122226660414722178e6 | [
"MIT"
] | null | null | null | code/pyFoamCompressCaseFiles.py | sosohungry/pyfoam | b19e40a0ef1f41268930122226660414722178e6 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
from PyFoam.Applications.CompressCaseFiles import CompressCaseFiles
CompressCaseFiles()
| 18.833333 | 67 | 0.831858 |
4a1725f6924bd4375834af5f4d5a0ce6e62579a5 | 22,178 | py | Python | tslearn/svm/svm.py | hoangph3/tslearn | c589de380398379f2587f8cc812571d2a6d75938 | [
"BSD-2-Clause"
] | null | null | null | tslearn/svm/svm.py | hoangph3/tslearn | c589de380398379f2587f8cc812571d2a6d75938 | [
"BSD-2-Clause"
] | null | null | null | tslearn/svm/svm.py | hoangph3/tslearn | c589de380398379f2587f8cc812571d2a6d75938 | [
"BSD-2-Clause"
] | null | null | null | from sklearn.svm import SVC, SVR
from sklearn.base import ClassifierMixin, RegressorMixin
from sklearn.utils import deprecated
from sklearn.utils import check_array, check_X_y
from sklearn.utils.validation import check_is_fitted
import numpy
from ..metrics import cdist_gak, gamma_soft_dtw, VARIABLE_LENGTH_METRICS
from... | 38.237931 | 93 | 0.61304 |
4a17260a521997d4902b4dddb17d7af15c01d4bd | 4,773 | py | Python | volatility/volatility/plugins/mac/ldrmodules.py | williamclot/MemoryVisualizer | 2ff9f30f07519d6578bc36c12f8d08acc9cb4383 | [
"MIT"
] | 2 | 2018-07-16T13:30:40.000Z | 2018-07-17T12:02:05.000Z | volatility/volatility/plugins/mac/ldrmodules.py | williamclot/MemoryVisualizer | 2ff9f30f07519d6578bc36c12f8d08acc9cb4383 | [
"MIT"
] | null | null | null | volatility/volatility/plugins/mac/ldrmodules.py | williamclot/MemoryVisualizer | 2ff9f30f07519d6578bc36c12f8d08acc9cb4383 | [
"MIT"
] | null | null | null | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License Version 2 as
# published by the Free Software Foundation. You may not use, modify or
# distribu... | 34.338129 | 102 | 0.528808 |
4a172659751010b4af67318b973afa751485a574 | 23,508 | py | Python | GramAddict/core/device_facade.py | patbengr/bot | 902ce2ea0cd9e9ccae5b6c58a04674939cdd7921 | [
"MIT"
] | null | null | null | GramAddict/core/device_facade.py | patbengr/bot | 902ce2ea0cd9e9ccae5b6c58a04674939cdd7921 | [
"MIT"
] | null | null | null | GramAddict/core/device_facade.py | patbengr/bot | 902ce2ea0cd9e9ccae5b6c58a04674939cdd7921 | [
"MIT"
] | null | null | null | import logging
import string
from datetime import datetime
from enum import Enum, auto
from os import getcwd, listdir
from random import randint, uniform
from re import search
from subprocess import PIPE, run
from time import sleep
import uiautomator2
from GramAddict.core.utils import random_sleep
logger = logging.g... | 36.73125 | 218 | 0.526076 |
4a172a5612f74e6bfae1b490ef02e054a4ae7509 | 1,833 | py | Python | rpc_client.py | guimarac/dag-evaluate | 7b0248536dd67ee5d6bb52b6164dfb49868366a5 | [
"MIT"
] | null | null | null | rpc_client.py | guimarac/dag-evaluate | 7b0248536dd67ee5d6bb52b6164dfb49868366a5 | [
"MIT"
] | null | null | null | rpc_client.py | guimarac/dag-evaluate | 7b0248536dd67ee5d6bb52b6164dfb49868366a5 | [
"MIT"
] | null | null | null | import json
import time
from xmlrpc.client import ServerProxy
class RPCClient(object):
def __init__(self, server_url):
self.server_url = server_url
self.server_proxy = ServerProxy(server_url)
def evaluate_pipeline(self, candidate, dataset, metrics_list, n_splits, timeout):
_dataset =... | 25.816901 | 85 | 0.616476 |
4a172a6a252690d919bee020c1e2c63f3d9aa7f8 | 2,566 | py | Python | validations/library/ip_range.py | mail2nsrajesh/tripleo-validations | 591a65f4dd70e4989a4340eb09a2dfc7577e8d4d | [
"Apache-2.0"
] | null | null | null | validations/library/ip_range.py | mail2nsrajesh/tripleo-validations | 591a65f4dd70e4989a4340eb09a2dfc7577e8d4d | [
"Apache-2.0"
] | null | null | null | validations/library/ip_range.py | mail2nsrajesh/tripleo-validations | 591a65f4dd70e4989a4340eb09a2dfc7577e8d4d | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 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 ... | 28.197802 | 76 | 0.646142 |
4a172ade62b7cb0a2c752283b0114c92a7862fcf | 115,174 | py | Python | Statistical Methods and Data Analysis/Module 2 Assignment/venv/lib/python3.8/site-packages/matplotlib/pyplot.py | ZohaibZ/DataScience | ba06c724293f8674375827bdf2d4f42d32788ebb | [
"MIT"
] | 9 | 2021-04-12T16:11:38.000Z | 2022-03-18T09:03:58.000Z | Statistical Methods and Data Analysis/Module 2 Assignment/venv/lib/python3.8/site-packages/matplotlib/pyplot.py | ZohaibZ/DataScience | ba06c724293f8674375827bdf2d4f42d32788ebb | [
"MIT"
] | 21 | 2021-04-13T01:17:40.000Z | 2022-03-11T16:06:50.000Z | Statistical Methods and Data Analysis/Module 2 Assignment/venv/lib/python3.8/site-packages/matplotlib/pyplot.py | ZohaibZ/DataScience | ba06c724293f8674375827bdf2d4f42d32788ebb | [
"MIT"
] | 2 | 2020-09-10T10:24:52.000Z | 2021-01-05T21:54:51.000Z | # Note: The first part of this file can be modified in place, but the latter
# part is autogenerated by the boilerplate.py script.
"""
`matplotlib.pyplot` is a state-based interface to matplotlib. It provides
a MATLAB-like way of plotting.
pyplot is mainly intended for interactive plots and simple cases of
programmat... | 34.555656 | 79 | 0.644685 |
4a172af280e5aa16f3e40aac98d423bf199007e1 | 793 | py | Python | 2015/python/day17/chal34.py | astonshane/AdventOfCode | 25c7380e73eede3f79287de6a9dedc8314ab7965 | [
"MIT"
] | null | null | null | 2015/python/day17/chal34.py | astonshane/AdventOfCode | 25c7380e73eede3f79287de6a9dedc8314ab7965 | [
"MIT"
] | null | null | null | 2015/python/day17/chal34.py | astonshane/AdventOfCode | 25c7380e73eede3f79287de6a9dedc8314ab7965 | [
"MIT"
] | null | null | null | import sys
from itertools import combinations
def sumCombo(combo):
total = 0
for i in combo:
total += i
return total
# ######################
if len(sys.argv) != 3:
print "need an input file and storage capacity"
exit(1)
storage = int(sys.argv[2])
containers = []
f = open(sys.argv[1])
f... | 21.432432 | 65 | 0.602774 |
4a172b083cc57fa4070b443c68ff2062a9a7ee11 | 27,239 | py | Python | pypy/lib_pypy/_cffi_ssl/_stdssl/errorcodes.py | Clear-Sight/cython-vs-pypy-performance | a81df5e1dbc115468ddfd60670ddfad448a5c992 | [
"MIT"
] | 1 | 2021-06-02T23:02:09.000Z | 2021-06-02T23:02:09.000Z | pypy/lib_pypy/_cffi_ssl/_stdssl/errorcodes.py | Clear-Sight/cython-vs-pypy-performance | a81df5e1dbc115468ddfd60670ddfad448a5c992 | [
"MIT"
] | 1 | 2021-03-30T18:08:41.000Z | 2021-03-30T18:08:41.000Z | pypy/lib_pypy/_cffi_ssl/_stdssl/errorcodes.py | Clear-Sight/cython-vs-pypy-performance | a81df5e1dbc115468ddfd60670ddfad448a5c992 | [
"MIT"
] | null | null | null | # File generated by tools/make_ssl_data.py
# Generated on 2016-11-10T17:38:59.402032
from _pypy_openssl import ffi, lib
_lib_codes = []
_lib_codes.append(("PEM", lib.ERR_LIB_PEM))
_lib_codes.append(("SSL", lib.ERR_LIB_SSL))
_lib_codes.append(("X509", lib.ERR_LIB_X509))
_error_codes = []
_error_codes.append(("BAD_BASE... | 68.785354 | 93 | 0.813172 |
4a172d10cd92fb1c390b6030710a25d082926d60 | 1,487 | py | Python | tacker/tests/etc/samples/etsi/nfv/user_data_sample_userdata_invalid_hot_param/UserData/lcm_user_data_invalid_hot_param.py | takahashi-tsc/tacker | a0ae01a13dcc51bb374060adcbb4fd484ab37156 | [
"Apache-2.0"
] | 116 | 2015-10-18T02:57:08.000Z | 2022-03-15T04:09:18.000Z | tacker/tests/etc/samples/etsi/nfv/user_data_sample_userdata_invalid_hot_param/UserData/lcm_user_data_invalid_hot_param.py | takahashi-tsc/tacker | a0ae01a13dcc51bb374060adcbb4fd484ab37156 | [
"Apache-2.0"
] | 6 | 2016-11-07T22:15:54.000Z | 2021-05-09T06:13:08.000Z | tacker/tests/etc/samples/etsi/nfv/user_data_sample_userdata_invalid_hot_param/UserData/lcm_user_data_invalid_hot_param.py | takahashi-tsc/tacker | a0ae01a13dcc51bb374060adcbb4fd484ab37156 | [
"Apache-2.0"
] | 166 | 2015-10-20T15:31:52.000Z | 2021-11-12T08:39:49.000Z | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the ... | 37.175 | 79 | 0.724277 |
4a172e9819f319254684647161038a03bdf91f2a | 4,788 | py | Python | predata.py | sunsunza2009/thai-sent_tokenize | 896fdd8c83822eb9767799b481fad68f6b8c1997 | [
"Apache-2.0"
] | 4 | 2018-07-10T08:17:07.000Z | 2019-06-19T13:15:29.000Z | predata.py | wannaphongcom/test-thai-sent-tokenize-NaiveBayesClassifier | be2cbd172d3434ab140ab15c5ef962a971568dc8 | [
"Apache-2.0"
] | null | null | null | predata.py | wannaphongcom/test-thai-sent-tokenize-NaiveBayesClassifier | be2cbd172d3434ab140ab15c5ef962a971568dc8 | [
"Apache-2.0"
] | 2 | 2019-07-30T16:28:08.000Z | 2019-11-07T14:42:48.000Z | # -*- coding: utf-8 -*-
import codecs
from tokenizeword import wordcut as word_tokenize
from nltk.tokenize import RegexpTokenizer
from pythainlp.tag import pos_tag
import glob
import re
from random import shuffle
#จัดการประโยคซ้ำ
data_not=[]
def Unique(p):
text=re.sub("<[^>]*>","",p)
text=re.sub("\[(.*?)\]","",text)
... | 27.517241 | 131 | 0.531537 |
4a172f8270c112d84868f656851f7b3cbe2107fb | 27 | py | Python | cocotb_test/__init__.py | mciepluc/cocotb-test | 0a8ad18f9396638c3abbfd4304f5fd33a2a34e5a | [
"BSD-2-Clause"
] | 14 | 2021-09-17T18:23:07.000Z | 2022-03-20T14:28:48.000Z | lib/contourpy/_version.py | ianthomas23/contourpy | 10df582b7631332467b848981a0255f4739ef901 | [
"BSD-3-Clause"
] | 9 | 2021-04-22T07:56:38.000Z | 2022-03-05T14:28:36.000Z | lib/contourpy/_version.py | ianthomas23/contourpy | 10df582b7631332467b848981a0255f4739ef901 | [
"BSD-3-Clause"
] | 1 | 2021-05-29T05:03:55.000Z | 2021-05-29T05:03:55.000Z | __version__ = "0.0.5.dev1"
| 13.5 | 26 | 0.666667 |
4a172fae5e2225c738c7531c6b195d46fe478f04 | 6,713 | py | Python | rqalpha/environment.py | xiecang/rqalpha | b31fd71692f0cc17b5bd72691446d3c1f576f0b6 | [
"Apache-2.0"
] | 1 | 2019-04-22T14:29:24.000Z | 2019-04-22T14:29:24.000Z | rqalpha/environment.py | 1M15M3/rqalpha | eeee5859c30728a2dbc5d6a30a7ebcc6fde8b5ee | [
"Apache-2.0"
] | null | null | null | rqalpha/environment.py | 1M15M3/rqalpha | eeee5859c30728a2dbc5d6a30a7ebcc6fde8b5ee | [
"Apache-2.0"
] | 1 | 2019-04-28T01:24:16.000Z | 2019-04-28T01:24:16.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2017 Ricequant, 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 ... | 34.25 | 115 | 0.693133 |
4a17303d42dbe2b6267842f596301dcfadcb12de | 217 | py | Python | Problem_sets/spiral_matrix/test_script/solution.py | zanderhinton/DSA_collaborative_prep | 8427255e0084c6d69031027492d847a90b970840 | [
"MIT"
] | 3 | 2020-02-02T14:52:16.000Z | 2020-09-28T12:32:35.000Z | Problem_sets/spiral_matrix/test_script/solution.py | zanderhinton/DSA_collaborative_prep | 8427255e0084c6d69031027492d847a90b970840 | [
"MIT"
] | 14 | 2020-02-02T21:17:49.000Z | 2020-02-10T15:48:36.000Z | Problem_sets/spiral_matrix/test_script/solution.py | zanderhinton/DSA_collaborative_prep | 8427255e0084c6d69031027492d847a90b970840 | [
"MIT"
] | 9 | 2020-02-02T20:00:05.000Z | 2020-02-17T19:02:32.000Z | import pickle
def spiral_matrix(desired_input):
soln_idx = desired_input -1
with open("test_cases_spiral_op.pkl", "rb") as f:
desired_output = pickle.load(f)
return desired_output[soln_idx] | 24.111111 | 53 | 0.700461 |
4a17307e0fc74d06e69f31c07d9dcf26596bd962 | 8,882 | py | Python | Train/gan_trainer.py | ZM-Zhou/MDE_Platform_Pytorch | d86efe061bf14a6eed3352cc45e1437e46c138b1 | [
"MIT"
] | null | null | null | Train/gan_trainer.py | ZM-Zhou/MDE_Platform_Pytorch | d86efe061bf14a6eed3352cc45e1437e46c138b1 | [
"MIT"
] | null | null | null | Train/gan_trainer.py | ZM-Zhou/MDE_Platform_Pytorch | d86efe061bf14a6eed3352cc45e1437e46c138b1 | [
"MIT"
] | null | null | null | import numpy as np
import time
import torch
import torch.optim as optim
from torch.utils.data import DataLoader
import os
import sys
sys.path.append(os.getcwd())
from Train.logger import *
from Utils.import_choice import JsonArg, Stage, json_to_data, setup_seed
class Trainer:
def __init__(self):
json_ar... | 39.829596 | 84 | 0.537154 |
4a1730aca576368412e5a3afc57890d7125a816b | 280 | py | Python | main.py | cconrey3/agilent8164 | 12d48321a075ffefbf71408ab95ac1c64f5ae027 | [
"MIT"
] | 1 | 2022-03-25T00:29:21.000Z | 2022-03-25T00:29:21.000Z | main.py | cconrey3/agilent8164 | 12d48321a075ffefbf71408ab95ac1c64f5ae027 | [
"MIT"
] | null | null | null | main.py | cconrey3/agilent8164 | 12d48321a075ffefbf71408ab95ac1c64f5ae027 | [
"MIT"
] | null | null | null | import pyvisa
from al8164 import AL8164
#Instrument Initialization
rm = pyvisa.ResourceManager()
rl = rm.list_resources()
resource = rl[1]
inst = rm.open_resource(resource)
my_laser = AL8164(inst)
print("SUCCESSFUL CONSTRUCTION")
my_laser.get_IDN()
print("SUCCESSFUL QUERY")
#
| 17.5 | 33 | 0.775 |
4a1731326faedddbf627b67e57b429139b836374 | 930 | py | Python | datliser/urls.py | arunikayadav42/Backend | 5364884f178e2a338b321b4a63a19fbc55212fe2 | [
"MIT"
] | 2 | 2018-11-22T21:09:56.000Z | 2018-11-26T07:41:14.000Z | datliser/urls.py | arunikayadav42/Backend | 5364884f178e2a338b321b4a63a19fbc55212fe2 | [
"MIT"
] | 8 | 2018-11-26T12:00:08.000Z | 2019-01-19T11:11:19.000Z | datliser/urls.py | arunikayadav42/Backend | 5364884f178e2a338b321b4a63a19fbc55212fe2 | [
"MIT"
] | 4 | 2018-11-30T19:14:05.000Z | 2018-12-22T07:10:16.000Z | """datliser URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-b... | 37.2 | 79 | 0.695699 |
4a17316ab038e3b5f1e67f4850623988ad86d27f | 566 | py | Python | examples/mpu6050_plotter_example.py | rhou7873/Adafruit_CircuitPython_MPU6050 | aa4e43fe82d285e8c0e358dc6b975e5864c0f611 | [
"MIT"
] | 22 | 2020-02-29T12:00:14.000Z | 2022-03-21T12:14:41.000Z | examples/mpu6050_plotter_example.py | rhou7873/Adafruit_CircuitPython_MPU6050 | aa4e43fe82d285e8c0e358dc6b975e5864c0f611 | [
"MIT"
] | 13 | 2020-01-05T12:35:38.000Z | 2022-03-30T02:02:57.000Z | examples/mpu6050_plotter_example.py | rhou7873/Adafruit_CircuitPython_MPU6050 | aa4e43fe82d285e8c0e358dc6b975e5864c0f611 | [
"MIT"
] | 21 | 2019-10-17T23:21:28.000Z | 2022-03-29T14:48:04.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
import time
import board
import adafruit_mpu6050
i2c = board.I2C() # uses board.SCL and board.SDA
mpu = adafruit_mpu6050.MPU6050(i2c)
mpu.accelerometer_range = adafruit_mpu6050.Range.RANGE_2_G
mpu.gyro_range = adafruit_mpu6... | 31.444444 | 75 | 0.726148 |
4a17319badf4087989a653e81000e26148f3fc55 | 2,577 | py | Python | rl/make_game.py | Seanny123/alphazero_singleplayer | 906d75a46221eb4a838560c19eb04d14788af436 | [
"MIT"
] | null | null | null | rl/make_game.py | Seanny123/alphazero_singleplayer | 906d75a46221eb4a838560c19eb04d14788af436 | [
"MIT"
] | null | null | null | rl/make_game.py | Seanny123/alphazero_singleplayer | 906d75a46221eb4a838560c19eb04d14788af436 | [
"MIT"
] | 1 | 2019-11-19T05:21:30.000Z | 2019-11-19T05:21:30.000Z | import gym
from gym.envs.registration import register
import numpy as np
from .wrappers import (NormalizeWrapper, ReparametrizeWrapper, PILCOWrapper, ScaleRewardWrapper, ClipRewardWrapper,
ScaledObservationWrapper)
# Register deterministic FrozenLakes
register(
id='FrozenLakeNotSlippery-v0'... | 29.965116 | 115 | 0.648428 |
4a17323448f676508302a03ee84a72f6f28f93b2 | 786 | py | Python | ckan/config/middleware/__init__.py | gg2/ckan | d61a533cc330b6050f4957573f58ec912695ed0a | [
"BSD-3-Clause"
] | 2,805 | 2015-01-02T18:13:15.000Z | 2022-03-31T03:35:01.000Z | ckan/config/middleware/__init__.py | gg2/ckan | d61a533cc330b6050f4957573f58ec912695ed0a | [
"BSD-3-Clause"
] | 3,801 | 2015-01-02T11:05:36.000Z | 2022-03-31T19:24:37.000Z | ckan/config/middleware/__init__.py | gg2/ckan | d61a533cc330b6050f4957573f58ec912695ed0a | [
"BSD-3-Clause"
] | 1,689 | 2015-01-02T19:46:43.000Z | 2022-03-28T14:59:43.000Z | # encoding: utf-8
"""WSGI app initialization"""
import logging
from ckan.config.environment import load_environment
from ckan.config.middleware.flask_app import make_flask_stack
log = logging.getLogger(__name__)
# This is a test Flask request context to be used internally.
# Do not use it!
_internal_test_request_... | 23.818182 | 79 | 0.767176 |
4a1732a47c49d898a63aed18ae5d3b2daa2568ab | 943 | py | Python | test/unit/test_constants.py | Spendency/cw-logs-to-lambda | 24dcd104ddbae159f2568d0672d05731b9884504 | [
"MIT"
] | null | null | null | test/unit/test_constants.py | Spendency/cw-logs-to-lambda | 24dcd104ddbae159f2568d0672d05731b9884504 | [
"MIT"
] | null | null | null | test/unit/test_constants.py | Spendency/cw-logs-to-lambda | 24dcd104ddbae159f2568d0672d05731b9884504 | [
"MIT"
] | null | null | null | """Constants used for unit tests.
This can be used to define values for environment variables so unit tests can use these to assert on expected values.
"""
LAMBDA_NAME = 'name'
AWS_LOG_EVENT = {
"awslogs":
{
"data": "H4sIAAAAAAAAAHWPwQqCQBCGX0Xm7EFtK+smZBEUgXoLCdMhFtKV3akI8d0bLYmibvPPN3wz00CJxmQnTO41... | 52.388889 | 298 | 0.760339 |
4a1734fe3684a21545203f67b64a6c59ee7d6229 | 12,031 | py | Python | gui/demo_trader.py | MaxGosselin/TelferRIT | 37b4f5aecc3f315b5ee6db757b2b2b622b854f6a | [
"Unlicense",
"MIT"
] | null | null | null | gui/demo_trader.py | MaxGosselin/TelferRIT | 37b4f5aecc3f315b5ee6db757b2b2b622b854f6a | [
"Unlicense",
"MIT"
] | null | null | null | gui/demo_trader.py | MaxGosselin/TelferRIT | 37b4f5aecc3f315b5ee6db757b2b2b622b854f6a | [
"Unlicense",
"MIT"
] | null | null | null | """draws the price charts for all the securities in the currently active
case"""
from multiprocessing.connection import Listener
from bokeh.driving import count
from bokeh.layouts import layout, column, gridplot, row, widgetbox
from bokeh.models import ColumnDataSource, CustomJS, Span
from bokeh.plotting import curdoc,... | 32.961644 | 138 | 0.503865 |
4a17351ac1f8d8ce044453269c336d2b4fd57e85 | 299 | py | Python | Practice and Revision/if.py | emmapatton/Programming-1-and-2 | 4104e60858429d26f1ca754899968b97d55fd897 | [
"Apache-2.0"
] | null | null | null | Practice and Revision/if.py | emmapatton/Programming-1-and-2 | 4104e60858429d26f1ca754899968b97d55fd897 | [
"Apache-2.0"
] | null | null | null | Practice and Revision/if.py | emmapatton/Programming-1-and-2 | 4104e60858429d26f1ca754899968b97d55fd897 | [
"Apache-2.0"
] | null | null | null | #Adapted from: https://docs.python.org/3/tutorial/controlflow.html
x = int(input("Please enter an integer: "))
if x < 0:
x = 0
print('Negative changed to zero')
elif x == 0:
print('Zero')
elif x == 1:
print('Single')
else:
print('More')
print("The final value of x is:", x) | 21.357143 | 66 | 0.61204 |
4a17354b3cacab042caadb9dbeffa484386cb4a9 | 390 | py | Python | shop/shop/settings/components/background.py | Mykytenkovladislav/book_shop_and_warehouse | 60852e5ed3869291e73623b8b8d7901d39d66c9d | [
"MIT"
] | null | null | null | shop/shop/settings/components/background.py | Mykytenkovladislav/book_shop_and_warehouse | 60852e5ed3869291e73623b8b8d7901d39d66c9d | [
"MIT"
] | null | null | null | shop/shop/settings/components/background.py | Mykytenkovladislav/book_shop_and_warehouse | 60852e5ed3869291e73623b8b8d7901d39d66c9d | [
"MIT"
] | null | null | null | from datetime import timedelta
# from celery.schedules import crontab
CELERY_TASK_RESULT_EXPIRES = 3600
CELERY_BEAT_SCHEDULE = {
"celery.backend_cleanup": {
"task": "celery.backend_cleanup",
"schedule": timedelta(seconds=300),
"args": (),
},
"periodical": {
"task": "store.... | 21.666667 | 43 | 0.628205 |
4a1735abab0b4971f1bd684a455402366f5195bc | 157 | py | Python | Desafio005 - Antecessor e Sucessor.py | kleberfsobrinho/python | 34739d127c1a3908f5a2fd5a7ef07d4c78658802 | [
"MIT"
] | null | null | null | Desafio005 - Antecessor e Sucessor.py | kleberfsobrinho/python | 34739d127c1a3908f5a2fd5a7ef07d4c78658802 | [
"MIT"
] | null | null | null | Desafio005 - Antecessor e Sucessor.py | kleberfsobrinho/python | 34739d127c1a3908f5a2fd5a7ef07d4c78658802 | [
"MIT"
] | null | null | null | n = int(input('Entre com um inteiro: '))
print('Analisando o número {}, temos que seu sucessor é {} e seu antecessor {}!'.format(n, n+1, n-1))
print('\n')
| 26.166667 | 101 | 0.630573 |
4a173792c88779bf9f0ea174116609c1fef5bb45 | 4,234 | py | Python | aixing_bot.py | mikeysan/aixingBot | 1c95cc5bae86ae0da0b6c0afabded295fe74c1d5 | [
"MIT"
] | 3 | 2020-10-02T09:24:01.000Z | 2021-05-21T17:06:32.000Z | aixing_bot.py | mikeysan/aixingBot | 1c95cc5bae86ae0da0b6c0afabded295fe74c1d5 | [
"MIT"
] | 2 | 2020-10-03T10:42:50.000Z | 2021-06-24T17:05:48.000Z | aixing_bot.py | mikeysan/aixingBot | 1c95cc5bae86ae0da0b6c0afabded295fe74c1d5 | [
"MIT"
] | 4 | 2020-10-02T09:24:04.000Z | 2021-06-22T06:03:06.000Z | # aixing_bot.py
# A discord bot created by Mikey San
# This is mostly a tutorial project for use on my discord server.
import os
import logging
import datetime
from itertools import cycle
import discord
from discord.ext import commands, tasks
from discord.ext.commands import Context, CommandError
from dotenv import ... | 32.569231 | 93 | 0.651157 |
4a1737d53e42358aad0b8bcf8cfd9ddfd89784a1 | 2,303 | py | Python | vmm/cli/main.py | kmohrf/vmm | 5e0dc8c9502d07681bfaca8634ed5b083deae77b | [
"BSD-3-Clause"
] | 4 | 2020-03-08T08:45:35.000Z | 2021-10-17T11:05:17.000Z | vmm/cli/main.py | kmohrf/vmm | 5e0dc8c9502d07681bfaca8634ed5b083deae77b | [
"BSD-3-Clause"
] | null | null | null | vmm/cli/main.py | kmohrf/vmm | 5e0dc8c9502d07681bfaca8634ed5b083deae77b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: UTF-8 -*-
# Copyright (c) 2007 - 2014, Pascal Volk
# See COPYING for distribution information.
"""
vmm.cli.main
~~~~~~~~~~~~~~~~~~~~~~~~~~~
vmm's command line interface.
"""
from configparser import NoOptionError, NoSectionError
from gettext import gettext as _
from vmm import errors
from v... | 29.909091 | 80 | 0.622666 |
4a173867e013b882c2ea524e55c921ea25624edf | 6,561 | py | Python | my_portal/projects/models.py | cgajagon/my_portal | cea810512528ea4ef30bbc7e14873fa25ed2f54f | [
"MIT"
] | null | null | null | my_portal/projects/models.py | cgajagon/my_portal | cea810512528ea4ef30bbc7e14873fa25ed2f54f | [
"MIT"
] | null | null | null | my_portal/projects/models.py | cgajagon/my_portal | cea810512528ea4ef30bbc7e14873fa25ed2f54f | [
"MIT"
] | null | null | null | import datetime
from django.db import models
from django.urls import reverse_lazy
from my_portal.users.models import User
class Supplier(models.Model):
USA = 'USA'
CAN = 'CANADA'
OTH = 'OTHER'
COUNTRY = [
(USA, 'USA'),
(CAN, 'CANADA'),
(OTH, 'OTHER'),
]
vendor_code = mo... | 34.350785 | 99 | 0.670782 |
4a17393262725c0e3abdeeb54322f1fa2053f3f6 | 627 | py | Python | src/exif.py | philchand/phockup | b88b4fc48524df07371a06b25a302c039aa1bf9c | [
"MIT"
] | null | null | null | src/exif.py | philchand/phockup | b88b4fc48524df07371a06b25a302c039aa1bf9c | [
"MIT"
] | null | null | null | src/exif.py | philchand/phockup | b88b4fc48524df07371a06b25a302c039aa1bf9c | [
"MIT"
] | 1 | 2017-10-05T02:47:43.000Z | 2017-10-05T02:47:43.000Z | from subprocess import check_output, CalledProcessError
import json
import shlex
import sys
class Exif(object):
def __init__(self, filename):
self.filename = filename
def data(self):
try:
exif_command = 'exiftool -time:all -mimetype -j %s' % shlex.quote(self.filename)
... | 28.5 | 92 | 0.617225 |
4a1739b9e517724ee5f981f7beb755adb2a2d604 | 1,336 | py | Python | src/openprocurement/tender/competitivedialogue/views/stage1/qualification_complaint.py | pontostroy/api | 5afdd3a62a8e562cf77e2d963d88f1a26613d16a | [
"Apache-2.0"
] | 3 | 2020-03-13T06:44:23.000Z | 2020-11-05T18:25:29.000Z | src/openprocurement/tender/competitivedialogue/views/stage1/qualification_complaint.py | pontostroy/api | 5afdd3a62a8e562cf77e2d963d88f1a26613d16a | [
"Apache-2.0"
] | 2 | 2021-03-25T23:27:04.000Z | 2022-03-21T22:18:15.000Z | src/openprocurement/tender/competitivedialogue/views/stage1/qualification_complaint.py | scrubele/prozorro-testing | 42b93ea2f25d8cc40e66c596f582c7c05e2a9d76 | [
"Apache-2.0"
] | 3 | 2020-10-16T16:25:14.000Z | 2021-05-22T12:26:20.000Z | # -*- coding: utf-8 -*-
from openprocurement.tender.openeu.utils import qualifications_resource
from openprocurement.tender.openeu.views.qualification_complaint import (
TenderEUQualificationComplaintResource as BaseTenderQualificationComplaintResource,
)
from openprocurement.tender.competitivedialogue.constants im... | 46.068966 | 100 | 0.824102 |
4a173a95b813fbab13ac2160a9f309c8607499b0 | 3,353 | py | Python | sdk/lusid/models/transaction_query_mode.py | slemasne/lusid-sdk-python-preview | 94a97951ec2052bc1672b7be21e52ad2fcf6eea0 | [
"MIT"
] | null | null | null | sdk/lusid/models/transaction_query_mode.py | slemasne/lusid-sdk-python-preview | 94a97951ec2052bc1672b7be21e52ad2fcf6eea0 | [
"MIT"
] | null | null | null | sdk/lusid/models/transaction_query_mode.py | slemasne/lusid-sdk-python-preview | 94a97951ec2052bc1672b7be21e52ad2fcf6eea0 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.3725
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getf... | 27.710744 | 83 | 0.573516 |
4a173c023e0c459b9637e8156ae513f4c78a6ce2 | 3,700 | py | Python | hide_and_seek/ui/game.py | houtaru/hide-and-seek | ee5523b16e10419e8b9f58ac2b1f66bff8935418 | [
"MIT"
] | null | null | null | hide_and_seek/ui/game.py | houtaru/hide-and-seek | ee5523b16e10419e8b9f58ac2b1f66bff8935418 | [
"MIT"
] | null | null | null | hide_and_seek/ui/game.py | houtaru/hide-and-seek | ee5523b16e10419e8b9f58ac2b1f66bff8935418 | [
"MIT"
] | null | null | null | import os
import pygame
from pygame.locals import Rect
from ..ui.player import Player
from ..ui.table import Table
import hide_and_seek.utils.constants as Constants
from ..utils.rand import Rand
from ..controllers.level_1 import Backtrack
class Game:
def __init__(self, opt):
pygame.init()
pygame... | 33.636364 | 84 | 0.446486 |
4a173cc988c2316007e202437d742354a5cf09c4 | 1,562 | py | Python | tools/ridet/test_hrsc2016_8p.py | Artcs1/RotationDetection | 095be17345ee9984d8de8f24eb6b5a0b2d764a06 | [
"Apache-2.0"
] | 850 | 2020-10-27T08:51:54.000Z | 2022-03-30T15:12:06.000Z | tools/ridet/test_hrsc2016_8p.py | Artcs1/RotationDetection | 095be17345ee9984d8de8f24eb6b5a0b2d764a06 | [
"Apache-2.0"
] | 94 | 2020-12-01T02:18:47.000Z | 2022-03-30T08:14:27.000Z | tools/ridet/test_hrsc2016_8p.py | Artcs1/RotationDetection | 095be17345ee9984d8de8f24eb6b5a0b2d764a06 | [
"Apache-2.0"
] | 149 | 2020-10-29T03:30:32.000Z | 2022-03-29T09:53:23.000Z | # -*- coding:utf-8 -*-
from __future__ import absolute_import
from __future__ import print_function
from __future__ import division
import os
import sys
import tensorflow as tf
import time
import cv2
import pickle
import numpy as np
import argparse
from tqdm import tqdm
sys.path.append("../../")
from libs.models.det... | 29.471698 | 91 | 0.644686 |
4a173db01f86af5887c830e7dab5cffa1e96f122 | 18,860 | py | Python | qa/rpc-tests/test_framework/comptool.py | v1nc0/macclone14.3 | e91fb2566205b5f4e2e1b2384cd93309a24261c4 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/comptool.py | v1nc0/macclone14.3 | e91fb2566205b5f4e2e1b2384cd93309a24261c4 | [
"MIT"
] | null | null | null | qa/rpc-tests/test_framework/comptool.py | v1nc0/macclone14.3 | e91fb2566205b5f4e2e1b2384cd93309a24261c4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Machinecoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from .mininode import *
from .blockstore import BlockStore, TxStore
from .util import p2p_port
'''
T... | 45.227818 | 145 | 0.599576 |
4a173e5bc9b3869b0c0a876735208d2766068131 | 7,278 | py | Python | train.py | greulist137/Data-Science---Deep-Learning-Image-Classifier | 1d7d44ebf2d5fc619c6020d002b21eaf6af6b9f2 | [
"MIT"
] | null | null | null | train.py | greulist137/Data-Science---Deep-Learning-Image-Classifier | 1d7d44ebf2d5fc619c6020d002b21eaf6af6b9f2 | [
"MIT"
] | null | null | null | train.py | greulist137/Data-Science---Deep-Learning-Image-Classifier | 1d7d44ebf2d5fc619c6020d002b21eaf6af6b9f2 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Aug 12 12:17:00 2018
@author: greul
"""
# Imports here
from torch import nn
from torch import optim
import torch.nn.functional as F
import matplotlib as plt
#%config InlineBackend.figure_format = 'retina'
import matplotlib.pyplot as plt
from PIL import Image
from torchvisio... | 37.132653 | 116 | 0.585463 |
4a173f3c2ddb99722dfcb406e0de77c366d5989c | 1,303 | py | Python | xlsxwriter/test/comparison/test_image42.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/comparison/test_image42.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | xlsxwriter/test/comparison/test_image42.py | Rippling/XlsxWriter-1 | be8d1cb8f8b156cf87bbe5d591f1f5475804be44 | [
"BSD-2-Clause"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c), 2013-2021, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompar... | 31.02381 | 107 | 0.635457 |
4a173f9819cd4e04940b0d64f77c0401066eda7a | 861 | py | Python | lab7.py | uni-student234/ISAT252 | 4c0942919c432456fe26900c23f076161b4cc266 | [
"MIT"
] | null | null | null | lab7.py | uni-student234/ISAT252 | 4c0942919c432456fe26900c23f076161b4cc266 | [
"MIT"
] | null | null | null | lab7.py | uni-student234/ISAT252 | 4c0942919c432456fe26900c23f076161b4cc266 | [
"MIT"
] | null | null | null | """
Week 2, day 7, lab 7
"""
3.1
i = 0
while i <= 6:
if i == 3 or i == 6:
i = i + 1
continue
print(i)
i = i + 1
#3.2
i = 5
factorial = 1
while i > 1:
factorial = factorial*i
i = i - 1
print(factorial)
#3.3
i = 1
factorial = 0
while i <= 5:
factorial = factorial + i
i = i + ... | 13.666667 | 32 | 0.563298 |
4a174068bd960160047d880bc306efd533d13656 | 2,326 | py | Python | sklego/meta/decay_estimator.py | lahdjirayhan/scikit-lego | 5dd145df796c4d254cd505727c9db01484ebc39c | [
"MIT"
] | 784 | 2019-03-01T21:35:53.000Z | 2022-03-30T11:22:46.000Z | sklego/meta/decay_estimator.py | lahdjirayhan/scikit-lego | 5dd145df796c4d254cd505727c9db01484ebc39c | [
"MIT"
] | 382 | 2019-02-27T10:38:53.000Z | 2022-03-31T07:22:24.000Z | sklego/meta/decay_estimator.py | lahdjirayhan/scikit-lego | 5dd145df796c4d254cd505727c9db01484ebc39c | [
"MIT"
] | 112 | 2019-03-01T19:34:37.000Z | 2022-03-30T14:10:29.000Z | import numpy as np
from sklearn import clone
from sklearn.base import BaseEstimator
from sklearn.utils.validation import (
check_is_fitted,
check_X_y,
FLOAT_DTYPES,
)
class DecayEstimator(BaseEstimator):
"""
Morphs an estimator suchs that the training weights can be
adapted to ensure that poin... | 33.228571 | 92 | 0.624248 |
4a17415fb417debb14950cca36a9c5be5eb6714e | 1,048 | py | Python | refinery/units/crypto/cipher/rc4mod.py | larsborn/refinery | c8b19156b17e5fa5de5c72bc668a14d646584560 | [
"BSD-3-Clause"
] | null | null | null | refinery/units/crypto/cipher/rc4mod.py | larsborn/refinery | c8b19156b17e5fa5de5c72bc668a14d646584560 | [
"BSD-3-Clause"
] | null | null | null | refinery/units/crypto/cipher/rc4mod.py | larsborn/refinery | c8b19156b17e5fa5de5c72bc668a14d646584560 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from itertools import cycle
from . import arg, StreamCipherUnit
class rc4mod(StreamCipherUnit):
"""
Implements a modifiably version of the RC4 stream cipher where the size of
the RC4 table can be altered.
"""
def __init__(
self, key, *,
... | 28.324324 | 97 | 0.520992 |
4a17418572502275b4ca576b230619c8583eeb71 | 3,221 | py | Python | 01_PythonTutorial/045_StringMethods.py | EliazBobadilla/Python-Tutorial-W3Schools | 0f22be2eea493c7e331d15b72847a34a4b748884 | [
"MIT"
] | 5 | 2021-05-29T23:30:57.000Z | 2021-12-19T11:21:24.000Z | 01_PythonTutorial/045_StringMethods.py | ChromeOwO/Python-Tutorial-W3Schools | 0f22be2eea493c7e331d15b72847a34a4b748884 | [
"MIT"
] | null | null | null | 01_PythonTutorial/045_StringMethods.py | ChromeOwO/Python-Tutorial-W3Schools | 0f22be2eea493c7e331d15b72847a34a4b748884 | [
"MIT"
] | 4 | 2021-06-04T20:23:48.000Z | 2022-01-23T05:48:19.000Z | #String Methods
'''
capitalize() Converts the first character to upper case
casefold() Converts string into lower case
center() Returns a centered string
count() Returns the number of times a specified value occurs in a string
encode() Returns an encoded version of the string
endswith() Returns true if the string ends... | 56.508772 | 122 | 0.800373 |
4a174193270ca4b9dbe22e7db12150535085d671 | 547 | py | Python | protseqspark/ProtSeqIO/tsv_helper.py | benchiverton/Proteomics | 006ac5877a5256ee60abdfff35ad81c4a1afa157 | [
"MIT"
] | 2 | 2020-09-26T14:33:21.000Z | 2021-01-19T19:22:54.000Z | protseqspark/ProtSeqIO/tsv_helper.py | benchiverton/Proteomics | 006ac5877a5256ee60abdfff35ad81c4a1afa157 | [
"MIT"
] | 2 | 2020-09-28T12:39:04.000Z | 2022-02-13T15:02:38.000Z | protseqspark/ProtSeqIO/tsv_helper.py | benchiverton/Proteomics | 006ac5877a5256ee60abdfff35ad81c4a1afa157 | [
"MIT"
] | null | null | null | from typing import Iterator
from ..ProtSeq import ProteinSequence
def writeSequenceToTsv(tsv_file: str, sequences: Iterator[ProteinSequence]):
file = open(tsv_file, "x")
for seq in sequences:
file.write(f'{sequenceToTsv(seq)}\n')
file.close()
def sequenceToTsv(seq: ProteinSequence) -> str:
r... | 28.789474 | 76 | 0.702011 |
4a1744152cd4f445219a81f181bed508a4299b5b | 502 | py | Python | data/split_fasta.py | jhwnkim/covid-mut-rate | 43a011dfef2cadb9770860d1d11d8a43c0f904ab | [
"MIT"
] | null | null | null | data/split_fasta.py | jhwnkim/covid-mut-rate | 43a011dfef2cadb9770860d1d11d8a43c0f904ab | [
"MIT"
] | null | null | null | data/split_fasta.py | jhwnkim/covid-mut-rate | 43a011dfef2cadb9770860d1d11d8a43c0f904ab | [
"MIT"
] | null | null | null | from Bio import SeqIO
import sys
print(sys.argv)
if len(sys.argv) > 1:
infile = sys.argv[1]
else:
infile = "./old/MA-sequences-2-toy.fasta"
if len(sys.argv)> 2:
size = int(sys.argv[2])
else:
size = 250
# excludes = []
# if len(sys.argv)> 3:
# exclude = sys.argv[]
records = list( SeqIO.parse(infile,... | 20.916667 | 71 | 0.621514 |
4a174424b9032c4e1f1ba8c9f93994b32d6bf3d9 | 2,045 | py | Python | Preprocess.py | abhinandansharma/number-plate-recognition | e31a1bfb5b7d92199829cb30b281d37f2b4552bb | [
"MIT"
] | null | null | null | Preprocess.py | abhinandansharma/number-plate-recognition | e31a1bfb5b7d92199829cb30b281d37f2b4552bb | [
"MIT"
] | null | null | null | Preprocess.py | abhinandansharma/number-plate-recognition | e31a1bfb5b7d92199829cb30b281d37f2b4552bb | [
"MIT"
] | null | null | null | # Preprocess.py
import cv2
import numpy as np
import math
# module level variables ##########################################################################
GAUSSIAN_SMOOTH_FILTER_SIZE = (5, 5)
ADAPTIVE_THRESH_BLOCK_SIZE = 19
ADAPTIVE_THRESH_WEIGHT = 9
###############################################################... | 34.083333 | 163 | 0.630807 |
4a17469c34caf6ee91a6f3cba43353f7c4fd839f | 16,261 | py | Python | tests/algorithms/test_enumeration.py | PermutaTriangle/Tilings | 227d4d014bf07b4037b7af1b35a1f2139ebe7e92 | [
"BSD-3-Clause"
] | 5 | 2020-04-30T20:19:27.000Z | 2021-03-06T20:20:14.000Z | tests/algorithms/test_enumeration.py | PermutaTriangle/Tilings | 227d4d014bf07b4037b7af1b35a1f2139ebe7e92 | [
"BSD-3-Clause"
] | 129 | 2019-06-04T14:50:58.000Z | 2022-03-29T13:47:00.000Z | tests/algorithms/test_enumeration.py | PermutaTriangle/Tilings | 227d4d014bf07b4037b7af1b35a1f2139ebe7e92 | [
"BSD-3-Clause"
] | 7 | 2020-06-11T14:24:06.000Z | 2020-09-14T21:51:57.000Z | import abc
import pytest
import sympy
from comb_spec_searcher.utils import taylor_expand
from tilings import GriddedPerm, Tiling
from tilings.algorithms import (
DatabaseEnumeration,
LocalEnumeration,
MonotoneTreeEnumeration,
)
from tilings.exception import InvalidOperationError
class CommonTest(abc.ABC... | 34.233684 | 87 | 0.480967 |
4a17474b6359ebc975e952c45706005671144f00 | 971 | py | Python | tensorflow/contrib/framework/python/framework/__init__.py | ln0119/tensorflow-fast-rcnn | e937e6394818c9a320754237651d7fe083b1020d | [
"Apache-2.0"
] | 73 | 2017-01-05T09:06:08.000Z | 2021-11-06T14:00:50.000Z | tensorflow/contrib/framework/python/framework/__init__.py | minhhoai2/tensorflow | da88903d5e29230d68d861053aa1dea1432c0696 | [
"Apache-2.0"
] | 8 | 2017-04-10T10:36:20.000Z | 2021-02-07T01:02:32.000Z | tensorflow/contrib/framework/python/framework/__init__.py | minhhoai2/tensorflow | da88903d5e29230d68d861053aa1dea1432c0696 | [
"Apache-2.0"
] | 151 | 2016-11-10T09:01:15.000Z | 2022-01-18T08:13:49.000Z | # Copyright 2015 Google 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 required by applicable law or a... | 42.217391 | 80 | 0.719876 |
4a174840726b65ed3529638839d76d548d17ab40 | 4,293 | py | Python | django_liquid/liquid.py | jg-rp/django-liquid | 33363b4c52b16050508f86b8b9f6a93fa5fa6a68 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | django_liquid/liquid.py | jg-rp/django-liquid | 33363b4c52b16050508f86b8b9f6a93fa5fa6a68 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | django_liquid/liquid.py | jg-rp/django-liquid | 33363b4c52b16050508f86b8b9f6a93fa5fa6a68 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | """A Liquid template engine for Django."""
from pathlib import Path
import liquid
from django.conf import settings
from django.template import TemplateDoesNotExist
from django.template import TemplateSyntaxError
from django.utils.functional import cached_property
from django.utils.module_loading import import_strin... | 31.335766 | 86 | 0.641276 |
4a17492f48a79db9dbb3fd0f8d4f9fad56e57c5d | 7,656 | py | Python | yt/frontends/art/fields.py | tukss/yt | 8bf6fce609cad3d4b291ebd94667019ab2e18377 | [
"BSD-3-Clause-Clear"
] | null | null | null | yt/frontends/art/fields.py | tukss/yt | 8bf6fce609cad3d4b291ebd94667019ab2e18377 | [
"BSD-3-Clause-Clear"
] | 8 | 2020-04-02T16:51:49.000Z | 2022-01-11T14:12:44.000Z | yt/frontends/art/fields.py | tukss/yt | 8bf6fce609cad3d4b291ebd94667019ab2e18377 | [
"BSD-3-Clause-Clear"
] | 2 | 2020-08-12T15:46:11.000Z | 2021-02-09T13:09:17.000Z | from yt.fields.field_info_container import FieldInfoContainer
b_units = "code_magnetic"
ra_units = "code_length / code_time**2"
rho_units = "code_mass / code_length**3"
vel_units = "code_velocity"
# NOTE: ARTIO uses momentum density.
mom_units = "code_mass / (code_length**2 * code_time)"
en_units = "code_mass*code_vel... | 29.221374 | 85 | 0.4872 |
4a1749dd9305207b3ae6f3927d3894321b6623fa | 21,917 | py | Python | pyKinectTools/scripts/PoseInitAndTracking_PF.py | colincsl/pyKinectTools | a84bb5b7ff9dd613576415932865c2ad435520b3 | [
"BSD-2-Clause-FreeBSD"
] | 33 | 2015-04-07T16:28:04.000Z | 2021-11-22T00:28:43.000Z | pyKinectTools/scripts/PoseInitAndTracking_PF.py | colincsl/pyKinectTools | a84bb5b7ff9dd613576415932865c2ad435520b3 | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | pyKinectTools/scripts/PoseInitAndTracking_PF.py | colincsl/pyKinectTools | a84bb5b7ff9dd613576415932865c2ad435520b3 | [
"BSD-2-Clause-FreeBSD"
] | 13 | 2015-04-07T16:28:34.000Z | 2021-04-26T08:04:36.000Z | """
Main file for training multi-camera pose
"""
import sys
import time
import traceback
import itertools as it
from joblib import Parallel, delayed
import cPickle as pickle
import optparse
from copy import deepcopy
import numpy as np
import scipy.misc as sm
import scipy.ndimage as nd
import Image
import cv2
import ... | 37.27381 | 188 | 0.672857 |
4a1749e9fcb294fb2e4e76ac15fb20c74c5f8ae9 | 2,430 | py | Python | security_monkey/task_scheduler/util.py | boladmin/security_monkey | c28592ffd518fa399527d26262683fc860c30eef | [
"Apache-2.0"
] | 4,258 | 2015-01-04T22:06:10.000Z | 2022-03-31T23:40:27.000Z | security_monkey/task_scheduler/util.py | boladmin/security_monkey | c28592ffd518fa399527d26262683fc860c30eef | [
"Apache-2.0"
] | 1,013 | 2015-01-12T02:31:03.000Z | 2021-09-16T19:09:03.000Z | security_monkey/task_scheduler/util.py | boladmin/security_monkey | c28592ffd518fa399527d26262683fc860c30eef | [
"Apache-2.0"
] | 965 | 2015-01-11T21:06:07.000Z | 2022-03-17T16:53:57.000Z | """
.. module: security_monkey.task_scheduler.util
:platform: Unix
:synopsis: Instantiates the Celery object for use with task scheduling.
.. version:: $$VERSION$$
.. moduleauthor:: Mike Grima <mgrima@netflix.com>
"""
from celery import Celery
from security_monkey import app
from security_monkey.common.utils... | 27.613636 | 115 | 0.688889 |
4a1749ff734c1190f08fde79430f1b43298e3152 | 7,122 | py | Python | .venv/lib/python3.8/site-packages/pandas/tests/indexes/timedeltas/test_timedelta.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 115 | 2020-06-18T15:00:58.000Z | 2022-03-02T10:13:19.000Z | .venv/lib/python3.8/site-packages/pandas/tests/indexes/timedeltas/test_timedelta.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 21 | 2021-04-13T01:17:40.000Z | 2022-03-11T16:06:50.000Z | .venv/lib/python3.8/site-packages/pandas/tests/indexes/timedeltas/test_timedelta.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 60 | 2020-07-22T14:53:10.000Z | 2022-03-23T10:17:59.000Z | from datetime import timedelta
import numpy as np
import pytest
import pandas as pd
from pandas import (
DataFrame,
Index,
Int64Index,
Series,
Timedelta,
TimedeltaIndex,
date_range,
timedelta_range,
)
import pandas._testing as tm
from ..datetimelike import DatetimeLike
randn = np.ran... | 30.698276 | 88 | 0.597304 |
4a174a23b052e19b13851f09284c3fa2a7841751 | 88,227 | py | Python | openmc/surface.py | simondrichards/openmc | 91db1c94636884d8fc15a8edbdfb533850fe22b7 | [
"MIT"
] | 1 | 2019-08-27T19:49:57.000Z | 2019-08-27T19:49:57.000Z | openmc/surface.py | ilhamv/openmc | 46b42d5eadef701c024e04a94be510ffb1d7aa2d | [
"MIT"
] | null | null | null | openmc/surface.py | ilhamv/openmc | 46b42d5eadef701c024e04a94be510ffb1d7aa2d | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from collections import OrderedDict
from collections.abc import Iterable
from copy import deepcopy
import math
from numbers import Real
from xml.etree import ElementTree as ET
from warnings import warn, catch_warnings, simplefilter
import numpy as np
from .checkvalue import check_t... | 33.205495 | 90 | 0.584538 |
4a174cd1ea672e3d680ebe9698c178f961c70447 | 1,483 | py | Python | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/cdn/apis/QueryRefreshTaskByIdsRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 14 | 2018-04-19T09:53:56.000Z | 2022-01-27T06:05:48.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/cdn/apis/QueryRefreshTaskByIdsRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 15 | 2018-09-11T05:39:54.000Z | 2021-07-02T12:38:02.000Z | python_code/vnev/Lib/site-packages/jdcloud_sdk/services/cdn/apis/QueryRefreshTaskByIdsRequest.py | Ureimu/weather-robot | 7634195af388538a566ccea9f8a8534c5fb0f4b6 | [
"MIT"
] | 33 | 2018-04-20T05:29:16.000Z | 2022-02-17T09:10:05.000Z | # coding=utf8
# Copyright 2018 JDCLOUD.COM
#
# 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 ... | 27.462963 | 75 | 0.683075 |
4a174d1d6a4a96113e4d6890c26917c517d7441f | 1,305 | py | Python | picshrink/mail_util.py | wtttc/apkshrink | 50b61c38b64c4a4fe0b11e686045852a3c685f3d | [
"MIT"
] | 3 | 2015-09-01T10:46:15.000Z | 2016-05-20T09:29:42.000Z | picshrink/mail_util.py | wtttc/apkshrink | 50b61c38b64c4a4fe0b11e686045852a3c685f3d | [
"MIT"
] | null | null | null | picshrink/mail_util.py | wtttc/apkshrink | 50b61c38b64c4a4fe0b11e686045852a3c685f3d | [
"MIT"
] | 1 | 2020-12-08T10:37:32.000Z | 2020-12-08T10:37:32.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from email.mime.application import MIMEApplication
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import smtplib
__author__ = 'tiantong'
# MIMEText should has been used on mail_content
def sendMail(mail_content, subject,email_from, em... | 29.659091 | 111 | 0.70728 |
4a174d585a32843e35f9a317fe2219fcbf6eaace | 7,453 | py | Python | paddlenlp/taskflow/models/sentiment_analysis_model.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | paddlenlp/taskflow/models/sentiment_analysis_model.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | paddlenlp/taskflow/models/sentiment_analysis_model.py | mukaiu/PaddleNLP | 0315365dbafa6e3b1c7147121ba85e05884125a5 | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | 46.291925 | 144 | 0.630753 |
4a174dc11fd2120273247b7fafcb23a97534d71b | 1,680 | py | Python | Layers/SMatirxLayer.py | Yottaxx/T-LSTM | 92618d8c3ee2418b194a2e1592512548da955b77 | [
"MIT"
] | 9 | 2020-05-23T05:40:27.000Z | 2021-11-19T01:29:36.000Z | Layers/SMatirxLayer.py | Yottaxx/T-LSTM | 92618d8c3ee2418b194a2e1592512548da955b77 | [
"MIT"
] | 1 | 2020-11-29T04:35:52.000Z | 2021-01-29T07:39:37.000Z | Layers/SMatirxLayer.py | Yottaxx/T-LSTM | 92618d8c3ee2418b194a2e1592512548da955b77 | [
"MIT"
] | 2 | 2020-10-26T13:42:49.000Z | 2020-11-01T02:01:33.000Z | import torch.nn as nn
import torch.nn.functional as F
import torch
import torch
from torch_geometric.nn import GCNConv, GATConv
from torch_geometric.data import Data
# graph functional
class SentenceMatrixLayer(nn.Module):
def __init__(self, in_size, out_size=1,p_Asem=0.8):
super(SentenceMatrixLayer, self... | 30.545455 | 105 | 0.599405 |
4a174e0fae202f498a6cb7b9a29f87b1170469a5 | 1,857 | py | Python | aliyun-python-sdk-elasticsearch/aliyunsdkelasticsearch/request/v20170613/GetTransferableNodesRequest.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-elasticsearch/aliyunsdkelasticsearch/request/v20170613/GetTransferableNodesRequest.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-elasticsearch/aliyunsdkelasticsearch/request/v20170613/GetTransferableNodesRequest.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.411765 | 99 | 0.76629 |
4a174e34da2e9a6ba93f110f110315864edcda38 | 22,902 | py | Python | rl_agents/trainer/log_creator.py | rvalienter90/rl-agents | ad6be08f9a7e2f0ec0daf6f557bd9f476bb9e4da | [
"MIT"
] | null | null | null | rl_agents/trainer/log_creator.py | rvalienter90/rl-agents | ad6be08f9a7e2f0ec0daf6f557bd9f476bb9e4da | [
"MIT"
] | null | null | null | rl_agents/trainer/log_creator.py | rvalienter90/rl-agents | ad6be08f9a7e2f0ec0daf6f557bd9f476bb9e4da | [
"MIT"
] | null | null | null | import time
import csv
import os
import numpy as np
import copy
class LogCreator():
RAW_LOG_FOLDER = 'raw_logfiles'
TIMESTEP_LOG_FOLDER = 'timestep_logs'
EPISODE_LOGFILE = 'episode_logfile'
TIMESTEP_LOGFILE = 'timestep_logfile'
EPISODE_FIELD_NAMES = ['episode', 'episode_reward', 'episode_length',... | 54.528571 | 183 | 0.628286 |
4a174f27a3f7ef01b3eecc32917350a9708c65d7 | 6,476 | py | Python | salt/modules/debian_service.py | jkur/salt | 3e62675550f9869d550d7787800270e632955d2f | [
"Apache-2.0"
] | 3 | 2015-04-16T18:42:35.000Z | 2017-10-30T16:57:49.000Z | salt/modules/debian_service.py | jkur/salt | 3e62675550f9869d550d7787800270e632955d2f | [
"Apache-2.0"
] | 16 | 2015-11-18T00:44:03.000Z | 2018-10-29T20:48:27.000Z | salt/modules/debian_service.py | jkur/salt | 3e62675550f9869d550d7787800270e632955d2f | [
"Apache-2.0"
] | 1 | 2020-10-19T11:49:50.000Z | 2020-10-19T11:49:50.000Z | # -*- coding: utf-8 -*-
'''
Service support for Debian systems (uses update-rc.d and /sbin/service)
'''
from __future__ import absolute_import
# Import python libs
import logging
import glob
import re
# Import 3rd-party libs
# pylint: disable=import-error
from salt.ext.six.moves import shlex_quote as _cmd_quote
# pyl... | 21.094463 | 97 | 0.605003 |
4a174fad33085dd552c43128ad902c80233d97d9 | 2,543 | py | Python | common/interwebs.py | jmcollis/GitSavvy | 153dca03bfd63db8248c1f9ee03bb6f2ebef545a | [
"MIT"
] | 1 | 2019-06-19T14:58:32.000Z | 2019-06-19T14:58:32.000Z | common/interwebs.py | jmcollis/GitSavvy | 153dca03bfd63db8248c1f9ee03bb6f2ebef545a | [
"MIT"
] | null | null | null | common/interwebs.py | jmcollis/GitSavvy | 153dca03bfd63db8248c1f9ee03bb6f2ebef545a | [
"MIT"
] | null | null | null | """
A simple HTTP interface for making GET, PUT and POST requests.
"""
import http.client
import json
from urllib.parse import urlparse, urlencode, quote # NOQA
from base64 import b64encode
from functools import partial
from collections import namedtuple
Response = namedtuple("Response", ("payload", "headers", "stat... | 31.012195 | 103 | 0.657491 |
4a17507daca7562c6e81d5a4df737f43cbeb4147 | 3,696 | py | Python | docs/conf.py | MrBartusek/corkus.py | 031c11e3e251f0bddbcb67415564357460fe7fea | [
"MIT"
] | 5 | 2021-09-10T14:20:15.000Z | 2022-01-09T11:27:49.000Z | docs/conf.py | MrBartusek/corkus.py | 031c11e3e251f0bddbcb67415564357460fe7fea | [
"MIT"
] | 11 | 2021-08-15T09:39:09.000Z | 2022-01-12T14:11:24.000Z | docs/conf.py | MrBartusek/corkus.py | 031c11e3e251f0bddbcb67415564357460fe7fea | [
"MIT"
] | 2 | 2021-12-01T23:33:14.000Z | 2022-01-12T11:08:18.000Z | import sys
import os
from datetime import datetime
import re
import glob
sys.path.insert(0, ".")
sys.path.insert(1, "..")
from corkus import __version__
copyright = datetime.today().strftime("%Y, MrBartusek")
exclude_patterns = ["_build"]
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sp... | 31.862069 | 127 | 0.619589 |
4a175087a99fe476d9387ad0f15fbe6e357dc3b8 | 29,492 | py | Python | python/ccxt/bithumb.py | orikalinski/ccxt_new | 318caa4f8db7ffb719edab2c060a0989d2a9cd28 | [
"MIT"
] | 1 | 2019-09-26T09:16:37.000Z | 2019-09-26T09:16:37.000Z | python/ccxt/bithumb.py | orikalinski/ccxt_new | 318caa4f8db7ffb719edab2c060a0989d2a9cd28 | [
"MIT"
] | 1 | 2020-09-03T10:11:29.000Z | 2020-09-03T10:11:29.000Z | python/ccxt/bithumb.py | orikalinski/ccxt_new | 318caa4f8db7ffb719edab2c060a0989d2a9cd28 | [
"MIT"
] | 3 | 2019-09-26T09:17:26.000Z | 2021-02-01T11:51:49.000Z | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import base64
import hashlib
from ccxt.base.errors import ExchangeError
from ccxt.base.errors impor... | 39.114058 | 292 | 0.478842 |
4a1750b4a5755fc7101e7d0743520a8704d9cfaa | 10,246 | py | Python | perfkitbenchmarker/providers/gcp/google_kubernetes_engine.py | inflatador/PerfKitBenchmarker | 9a12f44aa0c3fe6873e57a7920b1d13c006073e3 | [
"Apache-2.0"
] | null | null | null | perfkitbenchmarker/providers/gcp/google_kubernetes_engine.py | inflatador/PerfKitBenchmarker | 9a12f44aa0c3fe6873e57a7920b1d13c006073e3 | [
"Apache-2.0"
] | 1 | 2021-02-23T12:07:44.000Z | 2021-02-23T12:07:44.000Z | perfkitbenchmarker/providers/gcp/google_kubernetes_engine.py | isabella232/PerfKitBenchmarker | 8dd509ac0e024b7deeccd74266c8e6211a69529e | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 PerfKitBenchmarker Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 39.713178 | 185 | 0.71179 |
4a1750d1485d085e088f75a654ad1eaaa132bb7b | 1,219 | py | Python | python/leetcode/526.py | ParkinWu/leetcode | b31312bdefbb2be795f3459e1a76fbc927cab052 | [
"MIT"
] | null | null | null | python/leetcode/526.py | ParkinWu/leetcode | b31312bdefbb2be795f3459e1a76fbc927cab052 | [
"MIT"
] | null | null | null | python/leetcode/526.py | ParkinWu/leetcode | b31312bdefbb2be795f3459e1a76fbc927cab052 | [
"MIT"
] | null | null | null | # 假设有从 1 到 N 的 N 个整数,如果从这 N 个数字中成功构造出一个数组,使得数组的第 i 位 (1 <= i <= N) 满足如下两个条件中的一个,我们就称这个数组为一个优美的排列。条件:
#
# 第 i 位的数字能被 i 整除
# i 能被第 i 位上的数字整除
# 现在给定一个整数 N,请问可以构造多少个优美的排列?
#
# 示例1:
#
# 输入: 2
# 输出: 2
# 解释:
#
# 第 1 个优美的排列是 [1, 2]:
# 第 1 个位置(i=1)上的数字是1,1能被 i(i=1)整除
# 第 2 个位置(i=2)上的数字是2,2能被 i(i=2)整除
#
# 第 2 个优美的排列是 [2, 1]:... | 20.316667 | 100 | 0.539787 |
4a1750f17f03a34785bc56c7c2adbd375e29d24b | 17,109 | py | Python | selfdrive/car/honda/carstate.py | Arkantium/ArnePilot | 2fe3eba61e763df8a5997ac40aec1fc77b501352 | [
"MIT"
] | null | null | null | selfdrive/car/honda/carstate.py | Arkantium/ArnePilot | 2fe3eba61e763df8a5997ac40aec1fc77b501352 | [
"MIT"
] | null | null | null | selfdrive/car/honda/carstate.py | Arkantium/ArnePilot | 2fe3eba61e763df8a5997ac40aec1fc77b501352 | [
"MIT"
] | null | null | null | from cereal import car
from collections import defaultdict
from common.numpy_fast import interp
from opendbc.can.can_define import CANDefine
from opendbc.can.parser import CANParser
from selfdrive.config import Conversions as CV
from selfdrive.car.interfaces import CarStateBase
from selfdrive.car.honda.values import CA... | 46.240541 | 153 | 0.651178 |
4a1751b331d21c6593c27dcff9d7bb2357bc7f34 | 19,379 | py | Python | python/paddle/hapi/callbacks.py | Ray2020BD/Paddle | 994087188816575d456c2f9c2a6c90aad83b4e71 | [
"Apache-2.0"
] | 1 | 2020-10-29T13:54:19.000Z | 2020-10-29T13:54:19.000Z | python/paddle/hapi/callbacks.py | Ray2020BD/Paddle | 994087188816575d456c2f9c2a6c90aad83b4e71 | [
"Apache-2.0"
] | null | null | null | python/paddle/hapi/callbacks.py | Ray2020BD/Paddle | 994087188816575d456c2f9c2a6c90aad83b4e71 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 33.183219 | 87 | 0.57392 |
4a1751fc9b4e896fffc3941b69e2e577800f2a6e | 59 | py | Python | messi/__main__.py | eerimoq/messi | 3c0e0b227f7dec4970b0126cdb1a9005817f75fb | [
"MIT"
] | 7 | 2020-06-08T13:31:53.000Z | 2021-11-23T11:51:45.000Z | messi/__main__.py | eerimoq/messager | 396bc0112c43615ff5785616d2d710f38f0bb446 | [
"MIT"
] | 17 | 2020-05-24T06:01:37.000Z | 2020-10-19T05:12:05.000Z | messi/__main__.py | eerimoq/messager | 396bc0112c43615ff5785616d2d710f38f0bb446 | [
"MIT"
] | 1 | 2022-03-22T05:19:34.000Z | 2022-03-22T05:19:34.000Z | # Execute as "python -m messi"
from . import main
main()
| 9.833333 | 30 | 0.661017 |
4a1752693db55974b98c578ca99cefe1acdf59da | 4,634 | py | Python | particle_sampler/factory.py | yesitsreallyme/Robotics | 2a9232cf23933322d1352619810508a0a5e6733d | [
"MIT"
] | null | null | null | particle_sampler/factory.py | yesitsreallyme/Robotics | 2a9232cf23933322d1352619810508a0a5e6733d | [
"MIT"
] | null | null | null | particle_sampler/factory.py | yesitsreallyme/Robotics | 2a9232cf23933322d1352619810508a0a5e6733d | [
"MIT"
] | null | null | null | """
Module with factory methods for different objects (either real or simulation)
"""
class FactoryCreate:
"""Class to create objects which are related to the physical iRobot Create2 robot.
"""
def __init__(self):
"""Constructor.
"""
from robot import Create2Driver
self._c... | 30.688742 | 100 | 0.632067 |
4a17557a447b6a424e9c591e4508f20003dc956a | 10,383 | py | Python | app/participant/views.py | vicoociv/bread-and-roses | bf53988d670b2a1e19883b394e249be0a1fbe934 | [
"MIT"
] | null | null | null | app/participant/views.py | vicoociv/bread-and-roses | bf53988d670b2a1e19883b394e249be0a1fbe934 | [
"MIT"
] | null | null | null | app/participant/views.py | vicoociv/bread-and-roses | bf53988d670b2a1e19883b394e249be0a1fbe934 | [
"MIT"
] | 1 | 2020-08-04T02:33:08.000Z | 2020-08-04T02:33:08.000Z | import datetime
from flask import abort, flash, redirect, render_template, url_for, request
from flask_login import current_user, login_required
from .forms import NewDonorForm, TodoToAsking, AskingToPledged, PledgedToCompleted
from ..decorators import admin_required
from . import participant
from .. import db
from ..... | 37.348921 | 112 | 0.63421 |
4a1756ad178263aaac78d0496ba0c16a0aaec8ae | 383 | py | Python | core/commands/owner/test.py | stefano-mecocci/nebula8 | 668a5b9dc3a2a022a346fee391fccf6816072dea | [
"Apache-2.0"
] | null | null | null | core/commands/owner/test.py | stefano-mecocci/nebula8 | 668a5b9dc3a2a022a346fee391fccf6816072dea | [
"Apache-2.0"
] | null | null | null | core/commands/owner/test.py | stefano-mecocci/nebula8 | 668a5b9dc3a2a022a346fee391fccf6816072dea | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright SquirrelNetwork
import datetime
from core import decorators
from core.utilities.functions import chat_object
from core.database.repository.group import GroupRepository
@decorators.owner.init
def init(update,context):
chat = chat_object(update)
row... | 25.533333 | 58 | 0.75718 |
4a175841d94d1767a154bd2f14da1f3ea8ff23e4 | 1,156 | py | Python | tests/unit/network_services/collector/test_publisher.py | mythwm/yardstick | ea13581f450c9c44f6f73d383e6a192697a95cc1 | [
"Apache-2.0"
] | null | null | null | tests/unit/network_services/collector/test_publisher.py | mythwm/yardstick | ea13581f450c9c44f6f73d383e6a192697a95cc1 | [
"Apache-2.0"
] | null | null | null | tests/unit/network_services/collector/test_publisher.py | mythwm/yardstick | ea13581f450c9c44f6f73d383e6a192697a95cc1 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2016-2017 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... | 28.9 | 74 | 0.749135 |
4a1758c898c663bc0d1b8dc58a2478c6b51babcb | 1,088 | py | Python | web/service.py | w6688j/TripleIE | 21b069c1a5cef4d5deba0ce6d4b662051d57bb95 | [
"MIT"
] | null | null | null | web/service.py | w6688j/TripleIE | 21b069c1a5cef4d5deba0ce6d4b662051d57bb95 | [
"MIT"
] | 1 | 2019-04-02T06:51:07.000Z | 2019-04-02T11:14:38.000Z | web/service.py | w6688j/TripleIE | 21b069c1a5cef4d5deba0ce6d4b662051d57bb95 | [
"MIT"
] | 1 | 2019-04-02T02:11:08.000Z | 2019-04-02T02:11:08.000Z | import sys
from flask import Flask, request, jsonify, render_template
sys.path.append('/home/httpd/TripleIE')
from cli_single_question import CliSingle
from web.models.question import Question
app = Flask(__name__)
@app.route('/', methods=["GET"])
def index():
return render_template('index.html')
@app.route... | 22.666667 | 69 | 0.688419 |
4a1759e407a598c84a093acddb71369f4e893809 | 3,144 | py | Python | lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py | tkf/opencilk-project | 48265098754b785d1b06cb08d8e22477a003efcd | [
"MIT"
] | 1 | 2019-12-11T17:43:58.000Z | 2019-12-11T17:43:58.000Z | lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py | tkf/opencilk-project | 48265098754b785d1b06cb08d8e22477a003efcd | [
"MIT"
] | 10 | 2018-05-27T23:16:42.000Z | 2019-09-30T13:28:45.000Z | lldb/packages/Python/lldbsuite/test/functionalities/thread/multi_break/TestMultipleBreakpoints.py | tkf/opencilk-project | 48265098754b785d1b06cb08d8e22477a003efcd | [
"MIT"
] | 3 | 2019-12-21T06:35:35.000Z | 2020-06-07T23:18:58.000Z | """
Test number of threads.
"""
from __future__ import print_function
import os
import time
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class MultipleBreakpointTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
de... | 33.446809 | 105 | 0.645992 |
4a175b0fc0ae5c4a170a650bb83643ec0710dcbd | 4,010 | py | Python | alipay/aop/api/request/AlipaySecurityProdHaiguanAuthCreateRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipaySecurityProdHaiguanAuthCreateRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/request/AlipaySecurityProdHaiguanAuthCreateRequest.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.FileItem import FileItem
from alipay.aop.api.constant.ParamConstants import *
from alipay.aop.api.domain.AlipaySecurityProdHaiguanAuthCreateModel import AlipaySecurityProdHaiguanAuthCreateModel
class AlipaySecurityProdHaiguanAuthCreateRe... | 27.655172 | 148 | 0.64788 |
4a175b67889bbab2bd333c75d9a8acdd4c622e5c | 4,112 | py | Python | azure-mgmt-network/azure/mgmt/network/v2018_07_01/models/subnet.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | azure-mgmt-network/azure/mgmt/network/v2018_07_01/models/subnet.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | azure-mgmt-network/azure/mgmt/network/v2018_07_01/models/subnet.py | JonathanGailliez/azure-sdk-for-python | f0f051bfd27f8ea512aea6fc0c3212ee9ee0029b | [
"MIT"
] | 1 | 2018-08-28T14:36:47.000Z | 2018-08-28T14:36:47.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 48.376471 | 119 | 0.684095 |
4a175bf0581f8833a8c8fe6b7ed32984b09144e6 | 792 | py | Python | pyflux/setup.py | ThomasHoppe/pyflux | 297f2afc2095acd97c12e827dd500e8ea5da0c0f | [
"BSD-3-Clause"
] | 2,091 | 2016-04-01T02:52:10.000Z | 2022-03-29T11:38:15.000Z | pyflux/setup.py | EricSchles/pyflux | 297f2afc2095acd97c12e827dd500e8ea5da0c0f | [
"BSD-3-Clause"
] | 160 | 2016-04-26T14:52:18.000Z | 2022-03-15T02:09:07.000Z | pyflux/setup.py | EricSchles/pyflux | 297f2afc2095acd97c12e827dd500e8ea5da0c0f | [
"BSD-3-Clause"
] | 264 | 2016-05-02T14:03:31.000Z | 2022-03-29T07:48:20.000Z | import os
PACKAGE_NAME = 'pyflux'
def configuration(parent_package='', top_path=None):
from numpy.distutils.misc_util import Configuration
config = Configuration(PACKAGE_NAME, parent_package, top_path)
config.add_subpackage('__check_build')
config.add_subpackage('arma')
config.add_subpacka... | 27.310345 | 66 | 0.727273 |
4a175c3d3d23909eb34196af98331d77a8790755 | 205 | py | Python | pyuniqid/__init__.py | boriskurikhin/pyuniqid | d61477708adeeee34882a2f5ef359c0194405675 | [
"MIT"
] | 1 | 2020-06-26T19:37:37.000Z | 2020-06-26T19:37:37.000Z | pyuniqid/__init__.py | boriskurikhin/pyuniqid | d61477708adeeee34882a2f5ef359c0194405675 | [
"MIT"
] | 1 | 2020-06-29T04:38:02.000Z | 2020-06-29T05:38:25.000Z | pyuniqid/__init__.py | boriskurikhin/pyuniqid | d61477708adeeee34882a2f5ef359c0194405675 | [
"MIT"
] | 2 | 2020-06-26T16:09:37.000Z | 2020-06-29T02:59:10.000Z | """Global pyuniqid module.
Main module for the pyuniqid package.
Typical example usage:
from pyuniqid import uniqid
my_id = uniqid()
"""
from pyuniqid.uniqid import uniqid
__all__ = ["uniqid"]
| 13.666667 | 37 | 0.721951 |
4a175c96c67da22908e96fe6935723954d9cdf8d | 14,796 | py | Python | src/tests/test_application.py | yuin/rays | 62ce174fc46577d93fb6ee595baf8d91d77e89bd | [
"MIT"
] | null | null | null | src/tests/test_application.py | yuin/rays | 62ce174fc46577d93fb6ee595baf8d91d77e89bd | [
"MIT"
] | null | null | null | src/tests/test_application.py | yuin/rays | 62ce174fc46577d93fb6ee595baf8d91d77e89bd | [
"MIT"
] | 1 | 2019-04-17T08:20:59.000Z | 2019-04-17T08:20:59.000Z | #vim fileencoding=utf8
from __future__ import division, print_function
import sys
import itertools
from rays import *
from rays.compat import *
from .base import *
import_BytesIO()
import pytest
class TestApplication(Base):
def test_define_tls_property(self):
self.finish_app_config()
self.app.define_tls_p... | 27.501859 | 178 | 0.623209 |
4a175c9d84f948bdf80e128328bd6ab747af8e83 | 6,041 | py | Python | chris_backend/servicefiles/tests/test_serializers.py | rudolphpienaar/ChRIS_ultron_backEnd | 5de4e255fb151ac7a6f900327704831da11dcd1f | [
"MIT"
] | 26 | 2016-05-26T14:09:35.000Z | 2022-01-28T19:12:43.000Z | chris_backend/servicefiles/tests/test_serializers.py | rudolphpienaar/ChRIS_ultron_backEnd | 5de4e255fb151ac7a6f900327704831da11dcd1f | [
"MIT"
] | 168 | 2016-06-24T11:07:15.000Z | 2022-03-21T12:33:43.000Z | chris_backend/servicefiles/tests/test_serializers.py | rudolphpienaar/ChRIS_ultron_backEnd | 5de4e255fb151ac7a6f900327704831da11dcd1f | [
"MIT"
] | 45 | 2017-08-16T16:41:40.000Z | 2022-03-31T18:12:14.000Z |
import logging
import time
import io
from unittest import mock
from django.test import TestCase, tag
from django.conf import settings
from rest_framework import serializers
from servicefiles.models import Service, ServiceFile
from servicefiles.serializers import ServiceFileSerializer
from servicefiles.serializers im... | 43.775362 | 92 | 0.68631 |
4a175cdb03794731b266b004d59d65f668ebdc9f | 443 | py | Python | config/api_router.py | devnelmar/Pokeindex-application | 6bfefacabf201713151407d1a87cf2fce4220884 | [
"MIT"
] | null | null | null | config/api_router.py | devnelmar/Pokeindex-application | 6bfefacabf201713151407d1a87cf2fce4220884 | [
"MIT"
] | null | null | null | config/api_router.py | devnelmar/Pokeindex-application | 6bfefacabf201713151407d1a87cf2fce4220884 | [
"MIT"
] | null | null | null | from django.conf import settings
from rest_framework.routers import DefaultRouter, SimpleRouter
from pokeindexapi.users.api.views import UserViewSet
from pokeindexapi.apps.pokedex.api.views import PokemonViewSet
if settings.DEBUG:
router = DefaultRouter()
else:
router = SimpleRouter()
router.register("users"... | 24.611111 | 62 | 0.79684 |
4a175ddeb569be6778d0ec734f7c6b360b064e4c | 7,929 | py | Python | backend/testfigmafeb28app_d_23627/settings.py | crowdbotics-dev/testfigmafeb28app-d-23627 | e0613f6d8e5907a6416a15461108463a17a75f8b | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/testfigmafeb28app_d_23627/settings.py | crowdbotics-dev/testfigmafeb28app-d-23627 | e0613f6d8e5907a6416a15461108463a17a75f8b | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/testfigmafeb28app_d_23627/settings.py | crowdbotics-dev/testfigmafeb28app-d-23627 | e0613f6d8e5907a6416a15461108463a17a75f8b | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
Django settings for testfigmafeb28app_d_23627 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/... | 30.496154 | 112 | 0.737798 |
4a175e1d994e868880641c77c6f7503cb0c62c88 | 1,333 | py | Python | Software/Estadística/MCMC/HS/Cosas_viejas/analsis_cadenas_2params.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | Software/Estadística/MCMC/HS/Cosas_viejas/analsis_cadenas_2params.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | Software/Estadística/MCMC/HS/Cosas_viejas/analsis_cadenas_2params.py | matiasleize/tesis_licenciatura | 5df6e341314583702b466b8ed7977d410f0ee457 | [
"MIT"
] | null | null | null | import numpy as np
import emcee
from matplotlib import pyplot as plt
import corner
import sys
import os
import time
from pc_path import definir_path
path_git, path_datos_global = definir_path()
os.chdir(path_git)
sys.path.append('./Software/Funcionales/')
from funciones_analisis_cadenas import graficar_cadenas,grafica... | 28.978261 | 93 | 0.72018 |
4a175f1110de4fa3d778d2490f0083bc29077bc0 | 69 | py | Python | pylinear/grism/instruments/__init__.py | Russell-Ryan/pyLINEAR | d68e44bc64d302b816db69d2becc4de3b15059f9 | [
"MIT"
] | 2 | 2019-08-07T19:57:04.000Z | 2021-01-21T22:54:13.000Z | pylinear/grism/instruments/__init__.py | Russell-Ryan/pyLINEAR | d68e44bc64d302b816db69d2becc4de3b15059f9 | [
"MIT"
] | 1 | 2019-10-02T03:18:26.000Z | 2019-10-02T03:18:26.000Z | pylinear/grism/instruments/__init__.py | Russell-Ryan/pyLINEAR | d68e44bc64d302b816db69d2becc4de3b15059f9 | [
"MIT"
] | 5 | 2019-09-03T17:01:10.000Z | 2020-08-05T17:49:42.000Z | from .config import Config
from .load_detector import load_detector
| 17.25 | 40 | 0.84058 |
4a175f2418bce11f806bce5cee352edd765aea0c | 3,558 | py | Python | PSO.py | Sheeran-Tsingtao/Optimization-Algorithm | ef1ed3d41c7bc130d798673dbc3e67a5e3f99686 | [
"MIT"
] | 1 | 2021-06-15T03:16:00.000Z | 2021-06-15T03:16:00.000Z | PSO.py | Sheeran-Tsingtao/Optimization-Algorithm | ef1ed3d41c7bc130d798673dbc3e67a5e3f99686 | [
"MIT"
] | null | null | null | PSO.py | Sheeran-Tsingtao/Optimization-Algorithm | ef1ed3d41c7bc130d798673dbc3e67a5e3f99686 | [
"MIT"
] | null | null | null | import math
import random
import numpy as np
import matplotlib.pyplot as plt
import pylab as mpl
flag = 1;
class PSO:
def __init__(self, dimension, time, size, low, up, v_low, v_high):
self.dimension = dimension
self.time = time
self.size = size
self.bound = []
self... | 31.767857 | 103 | 0.479202 |
4a176073201fe5dfe15f863c708fb12cd5c3de33 | 8,499 | py | Python | monai/visualize/img2tensorboard.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | 1 | 2021-08-02T07:18:50.000Z | 2021-08-02T07:18:50.000Z | monai/visualize/img2tensorboard.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | null | null | null | monai/visualize/img2tensorboard.py | albarqounilab/MONAI | bb0b307d68021a243011a58fd82a1d275f00a51a | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 - 2021 MONAI Consortium
# 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 wri... | 39.901408 | 119 | 0.668785 |
4a1760bcf6bbea372e0fd62dad17a2566686db7d | 8,641 | py | Python | NewsMLG2/partmeta.py | iptc/python-newsmlg2 | 5914c9db36d64674586e63879d476fdd2ca1c07f | [
"MIT"
] | null | null | null | NewsMLG2/partmeta.py | iptc/python-newsmlg2 | 5914c9db36d64674586e63879d476fdd2ca1c07f | [
"MIT"
] | null | null | null | NewsMLG2/partmeta.py | iptc/python-newsmlg2 | 5914c9db36d64674586e63879d476fdd2ca1c07f | [
"MIT"
] | null | null | null | """
partMeta support
"""
from .attributegroups import CommonPowerAttributes, I18NAttributes
from .concepts import QualPropType
from .contentmeta import (
AdministrativeMetadataGroup, DescriptiveMetadataGroup, Icon
)
from .extensionproperties import Flex2ExtPropType
from .itemmanagement import EdNote, Signal
from .... | 35.854772 | 80 | 0.576206 |
4a1760c9bc0512dee43f6491b5e47ea5c805895e | 1,788 | py | Python | papermerge/core/views/decorators.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | null | null | null | papermerge/core/views/decorators.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | 1 | 2021-02-12T02:28:00.000Z | 2021-02-24T04:08:34.000Z | papermerge/core/views/decorators.py | w-michal/papermerge | 14703c3316deea06696da041b7adc4bd0b15270b | [
"Apache-2.0"
] | 2 | 2021-02-11T23:10:29.000Z | 2021-02-13T09:06:49.000Z | import json
from django.http import (
HttpResponse,
HttpResponseRedirect
)
def smart_dump(value):
if isinstance(value, str):
return json.dumps({'msg': value})
if isinstance(value, dict):
return json.dumps(value)
return ""
def json_response(func):
"""
Decorates view to ... | 27.090909 | 72 | 0.568233 |
4a17610b1b7c41a2b1b76fc2c5ece1989c52fc4c | 845 | py | Python | polyaxon/signals/users.py | elyase/polyaxon | 1c19f059a010a6889e2b7ea340715b2bcfa382a0 | [
"MIT"
] | null | null | null | polyaxon/signals/users.py | elyase/polyaxon | 1c19f059a010a6889e2b7ea340715b2bcfa382a0 | [
"MIT"
] | null | null | null | polyaxon/signals/users.py | elyase/polyaxon | 1c19f059a010a6889e2b7ea340715b2bcfa382a0 | [
"MIT"
] | null | null | null | from hestia.decorators import ignore_raw
from rest_framework.authtoken.models import Token
from django.conf import settings
from django.db.models.signals import post_save
from django.dispatch import Signal, receiver
import auditor
from event_manager.events.user import USER_REGISTERED, USER_UPDATED
@receiver(post_... | 29.137931 | 70 | 0.784615 |
4a1761681300c5e731809b32a97060891cc15a7f | 967 | py | Python | zeus/modules/__init__.py | georgefang/vega | 977054e12dd3bc1c96bbe35f18d5db4bc82d0522 | [
"MIT"
] | null | null | null | zeus/modules/__init__.py | georgefang/vega | 977054e12dd3bc1c96bbe35f18d5db4bc82d0522 | [
"MIT"
] | null | null | null | zeus/modules/__init__.py | georgefang/vega | 977054e12dd3bc1c96bbe35f18d5db4bc82d0522 | [
"MIT"
] | null | null | null | # -*- coding:utf-8 -*-
# Copyright (C) 2020. Huawei Technologies Co., Ltd. All rights reserved.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the MIT License.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the ... | 30.21875 | 72 | 0.722854 |
4a17618bfcf356a86372b26e66cb71bde18a62e6 | 1,113 | py | Python | drones/filter.py | codacy-badger/01 | edf4deb6de72533f784d2411d0bf10bcd5a68e74 | [
"MIT"
] | null | null | null | drones/filter.py | codacy-badger/01 | edf4deb6de72533f784d2411d0bf10bcd5a68e74 | [
"MIT"
] | null | null | null | drones/filter.py | codacy-badger/01 | edf4deb6de72533f784d2411d0bf10bcd5a68e74 | [
"MIT"
] | null | null | null | from rest_framework import filters
from django_filters import AllValuesFilter, DateTimeFilter, NumberFilter
from drones.models import Competition
class CompetitionFilter(filters.FilterSet):
from_achievement_date = DateTimeFilter(name='distance_achievement_date', lookup_expr='gte')
to_achievement_date = DateTim... | 46.375 | 95 | 0.677448 |
4a1761bacf9cda6a828863d7ba7a2b9ff0c6f26a | 49 | py | Python | ShopOnline/payment/__init__.py | tupakisyao/ShopOnline- | 4a6d10f7600b6d085903913216701d67464485e3 | [
"MIT"
] | 3 | 2017-04-25T10:19:02.000Z | 2017-06-07T12:50:30.000Z | online-shop/myshop/payment/__init__.py | EssaAlshammri/django-by-example | d1a1cba9308d4f19bbb1228dbd191ad5540b2c78 | [
"MIT"
] | 12 | 2019-10-02T17:18:09.000Z | 2022-03-11T23:54:53.000Z | online-shop/myshop/payment/__init__.py | EssaAlshammri/django-by-example | d1a1cba9308d4f19bbb1228dbd191ad5540b2c78 | [
"MIT"
] | 1 | 2019-10-21T08:14:38.000Z | 2019-10-21T08:14:38.000Z | default_app_config = 'payment.apps.PaymentConfig' | 49 | 49 | 0.857143 |
4a17628a4c2daac3c5f67b8b834fd5bc6cb7b565 | 1,490 | py | Python | aries_cloudagent/messaging/trustping/messages/ping.py | DibbsZA/aries-cloudagent-python | a094dd7697023721ac2a2fd4e58b04d4b37d1f44 | [
"Apache-2.0"
] | 7 | 2020-07-07T15:44:41.000Z | 2022-03-26T21:20:41.000Z | aries_cloudagent/messaging/trustping/messages/ping.py | totemprotocol/aries-fl | dd78dcebc771971abfee301b80cdd5d246c14840 | [
"Apache-2.0"
] | null | null | null | aries_cloudagent/messaging/trustping/messages/ping.py | totemprotocol/aries-fl | dd78dcebc771971abfee301b80cdd5d246c14840 | [
"Apache-2.0"
] | 2 | 2019-12-02T18:59:07.000Z | 2020-06-03T18:58:20.000Z | """Represents a trust ping message."""
from marshmallow import fields
from ...agent_message import AgentMessage, AgentMessageSchema
from ..message_types import PING
HANDLER_CLASS = "aries_cloudagent.messaging.trustping.handlers.ping_handler.PingHandler"
class Ping(AgentMessage):
"""Class representing a trustpi... | 25.689655 | 88 | 0.64094 |
4a17629037b67bf303889fb224118051315a2beb | 1,078 | py | Python | ACM-Solution/PrimitiveDrawing.py | wasi0013/Python-CodeBase | 4a7a36395162f68f84ded9085fa34cc7c9b19233 | [
"MIT"
] | 2 | 2016-04-26T15:40:40.000Z | 2018-07-18T10:16:42.000Z | ACM-Solution/PrimitiveDrawing.py | wasi0013/Python-CodeBase | 4a7a36395162f68f84ded9085fa34cc7c9b19233 | [
"MIT"
] | 1 | 2016-04-26T15:44:15.000Z | 2016-04-29T14:44:40.000Z | pygame/PrimitiveDrawing.py | wasi0013/Python-CodeBase | 4a7a36395162f68f84ded9085fa34cc7c9b19233 | [
"MIT"
] | 1 | 2018-10-02T16:12:19.000Z | 2018-10-02T16:12:19.000Z | import pygame, sys
from pygame.locals import *
pygame.init()
DISPLAYSURF = pygame.display.set_mode((500,400),0,32)
pygame.display.set_caption("Primitive Drawing")
#colour setup
BLACK = (0,0,0)
WHITE = (255,255,255)
RED =(255,0,0)
GREEN = (0,255,0)
BLUE = (0,0,255)
#draw surface objects
DISPLAYSURF... | 16.089552 | 86 | 0.636364 |
4a1762f2e84f20b91c791155e3b93550237ffa3b | 169 | py | Python | pyensemblorthologues/__init__.py | Uauy-Lab/pyensemblorthologues | 352119c30572bc493650db3fe22ae8855ca51949 | [
"MIT"
] | null | null | null | pyensemblorthologues/__init__.py | Uauy-Lab/pyensemblorthologues | 352119c30572bc493650db3fe22ae8855ca51949 | [
"MIT"
] | null | null | null | pyensemblorthologues/__init__.py | Uauy-Lab/pyensemblorthologues | 352119c30572bc493650db3fe22ae8855ca51949 | [
"MIT"
] | null | null | null | """Top-level package for PyEnsemblOrthologues."""
__author__ = """Ricardo H. Ramirez-Gonzalez"""
__email__ = "ricardo.ramirez-gonzalez@jic.ac.uk"
__version__ = "0.1.2"
| 28.166667 | 49 | 0.727811 |
4a1763093e15353d17f34a9cdab845382fafbc92 | 23,532 | py | Python | generate.py | Holmes7/library-checker-problems | d29be07a624955b20f4e9bcc3f14fe74d0a9e1cc | [
"Apache-2.0"
] | null | null | null | generate.py | Holmes7/library-checker-problems | d29be07a624955b20f4e9bcc3f14fe74d0a9e1cc | [
"Apache-2.0"
] | null | null | null | generate.py | Holmes7/library-checker-problems | d29be07a624955b20f4e9bcc3f14fe74d0a9e1cc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import sys
import argparse
import os
import platform
import shutil
import hashlib
import json
from datetime import datetime
from logging import Logger, basicConfig, getLogger, INFO
from os import getenv
from pathlib import Path
from subprocess import (DEVNULL, PIPE, STDOUT, CalledProcessError,
... | 37.711538 | 126 | 0.570117 |
4a17634155efc1d39ffec204c43fb2a4586d1fc4 | 23,588 | bzl | Python | swift/internal/xcode_swift_toolchain.bzl | LaudateCorpus1/rules_swift | f7c05b638f861f7a01c705c2c83e40c776543611 | [
"Apache-2.0"
] | 2 | 2020-07-01T20:21:35.000Z | 2021-04-28T21:28:50.000Z | swift/internal/xcode_swift_toolchain.bzl | LaudateCorpus1/rules_swift | f7c05b638f861f7a01c705c2c83e40c776543611 | [
"Apache-2.0"
] | null | null | null | swift/internal/xcode_swift_toolchain.bzl | LaudateCorpus1/rules_swift | f7c05b638f861f7a01c705c2c83e40c776543611 | [
"Apache-2.0"
] | 2 | 2021-06-03T10:06:10.000Z | 2022-02-02T14:23:52.000Z | # Copyright 2018 The Bazel 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 applicable la... | 39.777403 | 100 | 0.686027 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.