hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
01490053cb9fd905829b36cc4370a3f6de2a8949 | 2,655 | py | Python | azure-graphrbac/azure/graphrbac/models/application_create_parameters.py | CharaD7/azure-sdk-for-python | 9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c | [
"MIT"
] | null | null | null | azure-graphrbac/azure/graphrbac/models/application_create_parameters.py | CharaD7/azure-sdk-for-python | 9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c | [
"MIT"
] | null | null | null | azure-graphrbac/azure/graphrbac/models/application_create_parameters.py | CharaD7/azure-sdk-for-python | 9fdf0aac0cec8a15a5bb2a0ea27dd331dbfa2f5c | [
"MIT"
] | null | null | null | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 43.52459 | 163 | 0.66629 |
c224040ce1540203cf28bc0237e09cf40944fbda | 8,604 | py | Python | frappeclient/frappeclient.py | ard-ly/frappe-client | a0c4bdc116b3101e52950020a95f42d9c1401ab9 | [
"MIT"
] | null | null | null | frappeclient/frappeclient.py | ard-ly/frappe-client | a0c4bdc116b3101e52950020a95f42d9c1401ab9 | [
"MIT"
] | null | null | null | frappeclient/frappeclient.py | ard-ly/frappe-client | a0c4bdc116b3101e52950020a95f42d9c1401ab9 | [
"MIT"
] | 1 | 2020-12-27T11:33:06.000Z | 2020-12-27T11:33:06.000Z | import requests
import json
import frappe
from urllib.parse import quote
try:
from StringIO import StringIO
except:
from io import StringIO
try:
unicode
except NameError:
unicode = str
class AuthError(Exception):
pass
class FrappeException(Exception):
pass
class NotUploadableException(FrappeExcepti... | 27.227848 | 108 | 0.695026 |
418113a628a60f9b440ee95c29a923c0374200e6 | 1,539 | py | Python | tests/test_parser.py | decorator-factory/py-lark-lispy | bafd11fb311fefbb2cb40563ef2e113eeb6b4ff5 | [
"MIT"
] | 1 | 2020-08-13T19:16:24.000Z | 2020-08-13T19:16:24.000Z | tests/test_parser.py | decorator-factory/py-lark-lispy | bafd11fb311fefbb2cb40563ef2e113eeb6b4ff5 | [
"MIT"
] | null | null | null | tests/test_parser.py | decorator-factory/py-lark-lispy | bafd11fb311fefbb2cb40563ef2e113eeb6b4ff5 | [
"MIT"
] | null | null | null | import pylarklispy.parser as parser
from pylarklispy.entities import *
FULL_EXAMPLE = \
"""
; This is a comment
(hello world)
(lorem :ipsum [dolor-sit amet])
(quoted &ex &[pression])
(turtles (all (the (way :down))))
(whitespace [:does not
:mat ter])
(commas,,,,, :are [white , , space])
(strings "work fi... | 34.2 | 114 | 0.612736 |
b516d6004c7966648735348006913ba5c56bbe7e | 338 | py | Python | old files/problem0006.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | old files/problem0006.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | old files/problem0006.py | kmarcini/Project-Euler-Python | d644e8e1ec4fac70a9ab407ad5e1f0a75547c8d3 | [
"BSD-3-Clause"
] | null | null | null | ###########################
# Project Euler Problem 6
# Sum square difference
#
# Code by Kevin Marciniak
###########################
sum_of_squares = 0
square_of_sum = 0
# for i in range(1, 11):
for i in range(1, 101):
sum_of_squares += i * i
square_of_sum += i
square_of_sum *= square_of_sum
print(square_of_sum ... | 17.789474 | 37 | 0.606509 |
56dbac5bff931c332aaf5871218ded9d970b2616 | 74 | py | Python | 9 - Text Bounding Box with OpenCV (EAST)/east/__init__.py | IgorMeloS/OCR | f4916dde9accbba3b86b6c6d5db850ef04daf426 | [
"Apache-2.0"
] | null | null | null | 9 - Text Bounding Box with OpenCV (EAST)/east/__init__.py | IgorMeloS/OCR | f4916dde9accbba3b86b6c6d5db850ef04daf426 | [
"Apache-2.0"
] | null | null | null | 9 - Text Bounding Box with OpenCV (EAST)/east/__init__.py | IgorMeloS/OCR | f4916dde9accbba3b86b6c6d5db850ef04daf426 | [
"Apache-2.0"
] | null | null | null | from .east import EAST_OUTPUT_LAYERS
from .east import decode_predictions
| 24.666667 | 36 | 0.864865 |
60a56466df866d49c622fcbb63fa235500f003c0 | 4,992 | py | Python | train_scripts/train_hopper_from_load.py | hari-sikchi/stable-baselines | f3627c4b8625c1021a1a893b0a2fd8bfed9e84ed | [
"MIT"
] | null | null | null | train_scripts/train_hopper_from_load.py | hari-sikchi/stable-baselines | f3627c4b8625c1021a1a893b0a2fd8bfed9e84ed | [
"MIT"
] | null | null | null | train_scripts/train_hopper_from_load.py | hari-sikchi/stable-baselines | f3627c4b8625c1021a1a893b0a2fd8bfed9e84ed | [
"MIT"
] | null | null | null |
#from stable_baselines.common.policies import MlpPolicy
from stable_baselines.common.vec_env import DummyVecEnv, VecNormalize
from stable_baselines.sac.policies import MlpPolicy
from stable_baselines import PPO2, SAC
import hopper_rep
import os
import gym
import os
import numpy as np
import matplotlib.pyplot as plt
fr... | 33.059603 | 128 | 0.66226 |
46b34b3d019fc19eb554b0bc6afa753d7a56a67f | 3,751 | py | Python | app/lambda_functions/social_integration/twitter/publish.py | aveek22/wordpress-social | 14bb18450e0885c239bf2e0ff213be1d57fe1155 | [
"MIT"
] | null | null | null | app/lambda_functions/social_integration/twitter/publish.py | aveek22/wordpress-social | 14bb18450e0885c239bf2e0ff213be1d57fe1155 | [
"MIT"
] | null | null | null | app/lambda_functions/social_integration/twitter/publish.py | aveek22/wordpress-social | 14bb18450e0885c239bf2e0ff213be1d57fe1155 | [
"MIT"
] | null | null | null | # Import system libraries
import boto3 # To interact with the AWS resources
import tweepy # Use Tweepy to interact with Twitter
import logging # Log messages for debugging
import os # Get environment variables
# Import custom libraries
from credentials import TwitterCredent... | 34.1 | 113 | 0.592909 |
e2ac1309ddf3c55bfc6a30864c39a0f67589cf7e | 4,691 | py | Python | tests/examples/market_maker/test_on_chain_market_maker.py | upgradvisor/vyper | 642884ea938a25793c1b2fac866e8458e63a7b49 | [
"Apache-2.0"
] | 1,347 | 2019-11-22T06:49:38.000Z | 2022-03-31T19:49:32.000Z | tests/examples/market_maker/test_on_chain_market_maker.py | upgradvisor/vyper | 642884ea938a25793c1b2fac866e8458e63a7b49 | [
"Apache-2.0"
] | 915 | 2019-11-21T05:48:16.000Z | 2022-03-31T23:51:03.000Z | tests/examples/market_maker/test_on_chain_market_maker.py | upgradvisor/vyper | 642884ea938a25793c1b2fac866e8458e63a7b49 | [
"Apache-2.0"
] | 262 | 2019-11-28T01:44:04.000Z | 2022-03-31T21:33:43.000Z | import pytest
@pytest.fixture
def market_maker(get_contract):
with open("examples/market_maker/on_chain_market_maker.vy") as f:
contract_code = f.read()
return get_contract(contract_code)
TOKEN_NAME = "Vypercoin"
TOKEN_SYMBOL = "FANG"
TOKEN_DECIMALS = 18
TOKEN_INITIAL_SUPPLY = 21 * 10 ** 6
TOKEN_TOT... | 37.230159 | 89 | 0.676188 |
3516c03b57743946de0f13b55c0eac484ea70631 | 6,162 | py | Python | onix/salameche/cram.py | AI-Pranto/ONIX | 2d9ef4598e1e6e982a236bddcc1b9f04bcbed706 | [
"MIT"
] | 16 | 2019-09-18T06:03:55.000Z | 2022-02-16T05:23:53.000Z | onix/salameche/cram.py | AI-Pranto/ONIX | 2d9ef4598e1e6e982a236bddcc1b9f04bcbed706 | [
"MIT"
] | 7 | 2020-11-17T20:41:00.000Z | 2022-01-31T17:55:21.000Z | onix/salameche/cram.py | AI-Pranto/ONIX | 2d9ef4598e1e6e982a236bddcc1b9f04bcbed706 | [
"MIT"
] | 11 | 2019-09-11T13:52:05.000Z | 2021-11-24T09:43:22.000Z | """Compute the solution of the matricial depletion equation using the CRAM method"""
import numpy as np
import warnings
import time
def CRAM16(At,N_0):
"""CRAM uses a Chebishev Rational Approximation Method of order 16 to compute the solution of the matricial depletion equation.
Parameters
----------
... | 36.461538 | 494 | 0.672671 |
077fa31b2d4f69b8707fd29fbb6668e1de90e901 | 15,319 | py | Python | ctapipe/core/tool.py | mservillat/ctapipe | 81ce758f9594751142333bca339ac69fe91c92cb | [
"BSD-3-Clause"
] | null | null | null | ctapipe/core/tool.py | mservillat/ctapipe | 81ce758f9594751142333bca339ac69fe91c92cb | [
"BSD-3-Clause"
] | null | null | null | ctapipe/core/tool.py | mservillat/ctapipe | 81ce758f9594751142333bca339ac69fe91c92cb | [
"BSD-3-Clause"
] | null | null | null | """Classes to handle configurable command-line user interfaces."""
import logging
import logging.config
import textwrap
from abc import abstractmethod
import pathlib
import os
from traitlets import default
from traitlets.config import Application, Configurable
from .. import __version__ as version
from .traits import... | 35.05492 | 88 | 0.607677 |
0e19755f71b69f7b0c19ae66893b8188b62562df | 15,545 | py | Python | ensembler/ensemble/replicas_dynamic_parameters.py | philthiel/Ensembler | 943efac3c673eb40165927e81336386788e3a19f | [
"MIT"
] | 39 | 2020-05-19T08:45:27.000Z | 2022-03-17T16:58:34.000Z | ensembler/ensemble/replicas_dynamic_parameters.py | SchroederB/Ensembler | 943efac3c673eb40165927e81336386788e3a19f | [
"MIT"
] | 38 | 2020-06-18T13:02:18.000Z | 2022-02-25T14:29:17.000Z | ensembler/ensemble/replicas_dynamic_parameters.py | SchroederB/Ensembler | 943efac3c673eb40165927e81336386788e3a19f | [
"MIT"
] | 13 | 2020-05-19T08:45:57.000Z | 2022-03-10T16:18:20.000Z | """
.. automodule: replica_approach_dynamic_parameters
This module shall be used to implement subclasses of ensemble.
It is a class, that is using multiple system. It can be used for RE or Conveyor belt
"""
import numpy as np
import pandas as pd
from scipy import constants as const
from tqdm.notebook import tqd... | 34.621381 | 134 | 0.562432 |
fd5be35da127e8cdc96477e659e58faefce78e35 | 6,881 | py | Python | examples/rossman_reg.py | SimonCarozza/autolrn | d0875844a3e9b4fc22510ef320aa498e339b6192 | [
"MIT"
] | null | null | null | examples/rossman_reg.py | SimonCarozza/autolrn | d0875844a3e9b4fc22510ef320aa498e339b6192 | [
"MIT"
] | null | null | null | examples/rossman_reg.py | SimonCarozza/autolrn | d0875844a3e9b4fc22510ef320aa498e339b6192 | [
"MIT"
] | null | null | null | from autolrn.regression import param_grids_distros as pgd
from autolrn import auto_utils as au
from autolrn.regression import r_eval_utils as reu
from autolrn.regression import evaluate as eu
from autolrn.regression import train as tr
from pandas import read_csv
import numpy as np
from pkg_resources import resource_str... | 31.277273 | 90 | 0.640459 |
b0d271f6204b0472f966a499a1ca109a2bf2a0a1 | 11,994 | py | Python | docs/conf.py | BrainModes/fmriprep | 50e6dc739be3d67bf63ab7418eb80738fde7d59b | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | BrainModes/fmriprep | 50e6dc739be3d67bf63ab7418eb80738fde7d59b | [
"BSD-3-Clause"
] | null | null | null | docs/conf.py | BrainModes/fmriprep | 50e6dc739be3d67bf63ab7418eb80738fde7d59b | [
"BSD-3-Clause"
] | 1 | 2021-03-22T10:59:59.000Z | 2021-03-22T10:59:59.000Z | # -*- coding: utf-8 -*-
#
# fmriprep documentation build configuration file, created by
# sphinx-quickstart on Mon May 9 09:04:25 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | 33.502793 | 89 | 0.701267 |
79232ea3a4d5948b82480dc6e30eced57f3b9896 | 737 | py | Python | config/trades.py | ashwinath/stocks-graph | de92ef613f597e4dabba3226a70194000fd2ae70 | [
"Apache-2.0"
] | null | null | null | config/trades.py | ashwinath/stocks-graph | de92ef613f597e4dabba3226a70194000fd2ae70 | [
"Apache-2.0"
] | null | null | null | config/trades.py | ashwinath/stocks-graph | de92ef613f597e4dabba3226a70194000fd2ae70 | [
"Apache-2.0"
] | null | null | null | import os
import yaml
from google.protobuf import json_format
from generated.proto.trades_pb2 import TradeHistory
from generated.proto.config_pb2 import Config
from typing import List
def get_all_trade_configs(config: Config) -> List[TradeHistory]:
all_trade_histories = []
for dir_path, dir_names, file_names... | 33.5 | 73 | 0.671642 |
40a8499e2082b72622267136776b5c8a09b62ded | 1,167 | py | Python | tools/linter_lib/pyflakes.py | Debilski/zulip | ff4b5d8ce699d43ffc648986354592235274b70c | [
"Apache-2.0"
] | 1 | 2020-03-17T10:29:40.000Z | 2020-03-17T10:29:40.000Z | tools/linter_lib/pyflakes.py | Debilski/zulip | ff4b5d8ce699d43ffc648986354592235274b70c | [
"Apache-2.0"
] | null | null | null | tools/linter_lib/pyflakes.py | Debilski/zulip | ff4b5d8ce699d43ffc648986354592235274b70c | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
import argparse
from typing import List
from zulint.linters import run_pyflakes
def check_pyflakes(files, options):
# type: (List[str], argparse.Namespace) -> bool
suppress_patterns = [
("scripts/lib/pythonrc.py", "importe... | 33.342857 | 87 | 0.67952 |
357d7ed23b58f87700bd8cf08dcb764532771fc7 | 11,231 | py | Python | Phase_2/pytools-master/ycsb/ycsb.py | manu2504/WANCom | 8acdffb947d36fa7d7c8c78cbe9c3b06864128a6 | [
"MIT"
] | null | null | null | Phase_2/pytools-master/ycsb/ycsb.py | manu2504/WANCom | 8acdffb947d36fa7d7c8c78cbe9c3b06864128a6 | [
"MIT"
] | null | null | null | Phase_2/pytools-master/ycsb/ycsb.py | manu2504/WANCom | 8acdffb947d36fa7d7c8c78cbe9c3b06864128a6 | [
"MIT"
] | null | null | null | #!/usr/bin/python
import pandas as pd
import numpy as np
import logging
import subprocess
import time
import os
import psutil
import random
import itertools
import multiprocessing
import copy
from pytools.common.common import remove_repeated_spaces
from pytools.ycsb.parsing.parse_ycsb_file import cpp_parse_ycsb_file
fr... | 31.63662 | 100 | 0.622474 |
41657f26ba81951574a8e78009912a30c0ca3da3 | 293 | py | Python | tests/utests/ofagent/test_loxi_ofp13_util.py | jonohart/voltha | 87314cd53cb4c61e7e62b0ed3fc6da94603cc507 | [
"Apache-2.0"
] | null | null | null | tests/utests/ofagent/test_loxi_ofp13_util.py | jonohart/voltha | 87314cd53cb4c61e7e62b0ed3fc6da94603cc507 | [
"Apache-2.0"
] | null | null | null | tests/utests/ofagent/test_loxi_ofp13_util.py | jonohart/voltha | 87314cd53cb4c61e7e62b0ed3fc6da94603cc507 | [
"Apache-2.0"
] | null | null | null | from unittest import TestCase, main
import loxi.of13 as ofp
class TestConection_mgr(TestCase):
def test_bitmap_to_version(self):
bitmaps = [18]
versions = ofp.util.bitmap_to_version(bitmaps)
self.assertEqual(versions,[1,4])
if __name__ == '__main__':
main()
| 22.538462 | 54 | 0.692833 |
f80c5d18eb2db35906ad9b87261fb789d1761e20 | 5,425 | py | Python | python/ray/serve/benchmarks/microbenchmark.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 22 | 2018-05-08T05:52:34.000Z | 2020-04-01T10:09:55.000Z | python/ray/serve/benchmarks/microbenchmark.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 73 | 2021-09-25T07:11:39.000Z | 2022-03-26T07:10:59.000Z | python/ray/serve/benchmarks/microbenchmark.py | mgelbart/ray | 4cec2286572e368a4bd64aae467751a384eff62d | [
"Apache-2.0"
] | 10 | 2018-04-27T10:50:59.000Z | 2020-02-24T02:41:43.000Z | # Runs several scenarios with varying max batch size, max concurrent queries,
# number of replicas, and with intermediate serve handles (to simulate ensemble
# models) either on or off.
import aiohttp
import asyncio
import logging
import time
import requests
import numpy as np
import ray
from ray import serve
logge... | 28.255208 | 83 | 0.58894 |
66a0cef7dd8cdf1cb5b4047ad80d8ce57fc138f6 | 44,300 | py | Python | frappe/model/document.py | smehata/frappe | 99b4825a319b3e7474d83ab8d3be6e854e8fd7e0 | [
"MIT"
] | null | null | null | frappe/model/document.py | smehata/frappe | 99b4825a319b3e7474d83ab8d3be6e854e8fd7e0 | [
"MIT"
] | null | null | null | frappe/model/document.py | smehata/frappe | 99b4825a319b3e7474d83ab8d3be6e854e8fd7e0 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: MIT. See LICENSE
import hashlib
import json
import time
from werkzeug.exceptions import NotFound
import frappe
from frappe import _, msgprint, is_whitelisted
from frappe.utils import flt, cstr, now, get_datetime_str, file_lock, date_diff
f... | 31.30742 | 130 | 0.717494 |
3e1be44bcd83841ad1a0b32fed1511f6ded23c5a | 197 | py | Python | bin/twigs/quasi-polytwigs-123-6x3-trapezoid-ring.py | tiwo/puzzler | 7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e | [
"Intel"
] | null | null | null | bin/twigs/quasi-polytwigs-123-6x3-trapezoid-ring.py | tiwo/puzzler | 7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e | [
"Intel"
] | null | null | null | bin/twigs/quasi-polytwigs-123-6x3-trapezoid-ring.py | tiwo/puzzler | 7ad3d9a792f0635f7ec59ffa85fb46b54fd77a7e | [
"Intel"
] | 1 | 2022-01-02T16:54:14.000Z | 2022-01-02T16:54:14.000Z | #!/usr/bin/env python
# $Id$
"""many solutions"""
import puzzler
from puzzler.puzzles.quasipolytwigs123 import QuasiPolytwigs123_6x3TrapezoidRing
puzzler.run(QuasiPolytwigs123_6x3TrapezoidRing)
| 19.7 | 80 | 0.822335 |
4b5d400a929094757db708d9021873d68ebd9b34 | 38,148 | py | Python | conans/test/build_helpers/cmake_test.py | aharrison24/conan | d5197368d1bcf99241cad08c858f6a1471613471 | [
"MIT"
] | null | null | null | conans/test/build_helpers/cmake_test.py | aharrison24/conan | d5197368d1bcf99241cad08c858f6a1471613471 | [
"MIT"
] | null | null | null | conans/test/build_helpers/cmake_test.py | aharrison24/conan | d5197368d1bcf99241cad08c858f6a1471613471 | [
"MIT"
] | null | null | null | import os
import shutil
import stat
import sys
import unittest
import platform
from collections import namedtuple
from conans import tools
from conans.model.conan_file import ConanFile
from conans.model.settings import Settings
from conans.client.conf import default_settings_yml
from conans.client.build.cmake import ... | 43.153846 | 125 | 0.602312 |
b7282a78cc9c2d12f4ea6d2ba55c24b2110513d6 | 3,684 | py | Python | python/oneflow/nn/modules/reshape.py | Zhangchangh/oneflow | 4ea3935458cc83dcea0abd88dd613f09c57dc01a | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/modules/reshape.py | Zhangchangh/oneflow | 4ea3935458cc83dcea0abd88dd613f09c57dc01a | [
"Apache-2.0"
] | null | null | null | python/oneflow/nn/modules/reshape.py | Zhangchangh/oneflow | 4ea3935458cc83dcea0abd88dd613f09c57dc01a | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow 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 law or agr... | 30.957983 | 106 | 0.635722 |
23f4892bd188872ba6dca01e0ea0c762d99831b2 | 49 | py | Python | dir1/my_code1.py | mbaseer07/Pyneta | d12f185f030f4c4d88045d2083275272504676f6 | [
"Apache-2.0"
] | null | null | null | dir1/my_code1.py | mbaseer07/Pyneta | d12f185f030f4c4d88045d2083275272504676f6 | [
"Apache-2.0"
] | null | null | null | dir1/my_code1.py | mbaseer07/Pyneta | d12f185f030f4c4d88045d2083275272504676f6 | [
"Apache-2.0"
] | null | null | null | Print ("Hello")
Print ("Hello")
Print ("Hello")
| 9.8 | 15 | 0.612245 |
83e8e32d8f77fcede90b4dbf16b2e8bfafdda0f7 | 134 | py | Python | archive/urls.py | boxed/forum | abb3699d310bf3a404f031a3cb0e4bdbf403da5a | [
"BSD-3-Clause"
] | 2 | 2019-06-28T16:30:44.000Z | 2020-12-28T01:46:52.000Z | archive/urls.py | boxed/forum | abb3699d310bf3a404f031a3cb0e4bdbf403da5a | [
"BSD-3-Clause"
] | 14 | 2019-02-26T17:25:54.000Z | 2019-04-03T18:11:24.000Z | archive/urls.py | boxed/forum | abb3699d310bf3a404f031a3cb0e4bdbf403da5a | [
"BSD-3-Clause"
] | 1 | 2019-06-14T14:21:47.000Z | 2019-06-14T14:21:47.000Z | from django.urls import path
from . import views
urlpatterns = [
path('<path:path>', views.index),
path('', views.index),
]
| 14.888889 | 37 | 0.641791 |
5016fe209a174cf0398a6695ce260f6333813469 | 3,347 | py | Python | IT LAB/lab5/Question3/Question1/Question1/settings.py | Sahil1515/Sem6-Labs | cabedbccc2a5272365c250e2d3f4e3a3e802233f | [
"MIT"
] | 1 | 2021-03-03T16:26:59.000Z | 2021-03-03T16:26:59.000Z | IT LAB/lab5/Question3/Question1/Question1/settings.py | Sahil1515/sem6-Labs | cabedbccc2a5272365c250e2d3f4e3a3e802233f | [
"MIT"
] | null | null | null | IT LAB/lab5/Question3/Question1/Question1/settings.py | Sahil1515/sem6-Labs | cabedbccc2a5272365c250e2d3f4e3a3e802233f | [
"MIT"
] | null | null | null | """
Django settings for Question1 project.
Generated by 'django-admin startproject' using Django 3.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathlib... | 25.549618 | 91 | 0.703018 |
fd0e78d8411110f3d4571b697788495380da4106 | 543 | py | Python | manage.py | Audiopolis/IoTConnect | 394559af7142802541be2dfda28b93a567ffc1d0 | [
"MIT"
] | 1 | 2022-01-10T09:53:57.000Z | 2022-01-10T09:53:57.000Z | manage.py | Audiopolis/IoTConnect | 394559af7142802541be2dfda28b93a567ffc1d0 | [
"MIT"
] | null | null | null | manage.py | Audiopolis/IoTConnect | 394559af7142802541be2dfda28b93a567ffc1d0 | [
"MIT"
] | 1 | 2022-01-10T09:54:24.000Z | 2022-01-10T09:54:24.000Z | #!/usr/bin/env python
import os
import sys
if __name__ == '__main__':
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'uninett_api.settings')
try:
from django.core.management import execute_from_command_line
except ImportError as exc:
raise ImportError(
"Couldn't import Django. ... | 33.9375 | 75 | 0.688766 |
977a9af42f065083a8090792f405ea7e8ea02c81 | 3,649 | py | Python | objects/CSCG/_3d/__tests__/unittests/Poisson/hdMSEM_inner.py | mathischeap/mifem | 3242e253fb01ca205a76568eaac7bbdb99e3f059 | [
"MIT"
] | 1 | 2020-10-14T12:48:35.000Z | 2020-10-14T12:48:35.000Z | objects/CSCG/_3d/__tests__/unittests/Poisson/hdMSEM_inner.py | mathischeap/mifem | 3242e253fb01ca205a76568eaac7bbdb99e3f059 | [
"MIT"
] | null | null | null | objects/CSCG/_3d/__tests__/unittests/Poisson/hdMSEM_inner.py | mathischeap/mifem | 3242e253fb01ca205a76568eaac7bbdb99e3f059 | [
"MIT"
] | null | null | null | """
Here we use the hdMSEM to solve the inner-orientated version of the Poisson problem. We do this to
test the hybridization of 0-forms.
"""
import sys
if './' not in sys.path: sys.path.append('./')
import random
from objects.CSCG._3d.__init__ import mesh as mesh3
from objects.CSCG._3d.__init__ import space as spac... | 29.909836 | 98 | 0.658263 |
9ec155b69525bc39cde97dc5b82b82fb0a8381ab | 11,135 | py | Python | kornia/geometry/epipolar/essential.py | Ishticode/kornia | 974abb43ec72d12dbd244a2fb247bbbab8498de0 | [
"ECL-2.0",
"Apache-2.0"
] | 418 | 2018-10-02T22:31:36.000Z | 2019-01-16T14:15:45.000Z | kornia/geometry/epipolar/essential.py | Ishticode/kornia | 974abb43ec72d12dbd244a2fb247bbbab8498de0 | [
"ECL-2.0",
"Apache-2.0"
] | 94 | 2019-01-17T22:10:45.000Z | 2019-05-22T23:47:58.000Z | kornia/geometry/epipolar/essential.py | Ishticode/kornia | 974abb43ec72d12dbd244a2fb247bbbab8498de0 | [
"ECL-2.0",
"Apache-2.0"
] | 25 | 2018-10-02T22:50:04.000Z | 2019-01-13T18:14:11.000Z | """Module containing functionalities for the Essential matrix."""
from typing import Optional, Tuple
import torch
from kornia.utils import eye_like, vec_like
from .numeric import cross_product_matrix
from .projection import depth_from_point, projection_from_KRt
from .triangulation import triangulate_points
__all__ ... | 37.116667 | 111 | 0.625505 |
6a966441bab93c23cec28555cc721e2722699439 | 22,221 | py | Python | src/python/system/process_handler.py | tapaswenipathak/clusterfuzz | a5468fc736ee42af9e2dd63e24c22ae2c3ac1662 | [
"Apache-2.0"
] | 1 | 2019-11-09T23:09:00.000Z | 2019-11-09T23:09:00.000Z | src/python/system/process_handler.py | tapaswenipathak/clusterfuzz | a5468fc736ee42af9e2dd63e24c22ae2c3ac1662 | [
"Apache-2.0"
] | null | null | null | src/python/system/process_handler.py | tapaswenipathak/clusterfuzz | a5468fc736ee42af9e2dd63e24c22ae2c3ac1662 | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 34.61215 | 80 | 0.703119 |
c984a2bd1d52a4c5957318edacb37409258e5ac8 | 7,286 | py | Python | src/recommender.py | s0umitra/Recommendation-System-101-MovieTweetings | e585e6170588fa534747ab849dfdd89634cdcb6d | [
"MIT"
] | 1 | 2020-09-16T14:23:15.000Z | 2020-09-16T14:23:15.000Z | src/recommender.py | s0umitra/Recommendation-System-101-MovieTweetings | e585e6170588fa534747ab849dfdd89634cdcb6d | [
"MIT"
] | null | null | null | src/recommender.py | s0umitra/Recommendation-System-101-MovieTweetings | e585e6170588fa534747ab849dfdd89634cdcb6d | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import lib
class Recommender:
"""
This Recommender uses FunkSVD to make predictions of exact ratings and uses either FunkSVD or a Knowledge Based
recommendation (highest ranked) to make recommendations for users. Finally, if given a movie, the recommender
will pr... | 42.115607 | 117 | 0.601702 |
b9dc3563acb91688180ab86fe156fb71bd6f7d1a | 1,171 | py | Python | src/fuzzingtool/core/defaults/encoders/__init__.py | NESCAU-UFLA/FuzzingTool | d0dbe3ee4c17ec8ee72423bf7fabce6849e01807 | [
"MIT"
] | 131 | 2020-12-14T18:45:29.000Z | 2022-03-31T03:00:21.000Z | src/fuzzingtool/core/defaults/encoders/__init__.py | NESCAU-UFLA/FuzzingTool | d0dbe3ee4c17ec8ee72423bf7fabce6849e01807 | [
"MIT"
] | 51 | 2020-12-14T16:02:38.000Z | 2022-03-31T18:47:12.000Z | src/fuzzingtool/core/defaults/encoders/__init__.py | NESCAU-UFLA/FuzzingTool | d0dbe3ee4c17ec8ee72423bf7fabce6849e01807 | [
"MIT"
] | 38 | 2020-12-14T21:12:18.000Z | 2022-03-29T18:23:20.000Z | # Copyright (c) 2020 - present Vitor Oriel <https://github.com/VitorOriel>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to ... | 55.761905 | 80 | 0.781383 |
7e922aacf3502cb9c2d0af4b8790d911112c413e | 4,331 | py | Python | tests/__init__.py | alseambusher/python-libarchive-c | a076378728fcc54a79bd3bc15f41365d5a740d6d | [
"CC0-1.0"
] | null | null | null | tests/__init__.py | alseambusher/python-libarchive-c | a076378728fcc54a79bd3bc15f41365d5a740d6d | [
"CC0-1.0"
] | null | null | null | tests/__init__.py | alseambusher/python-libarchive-c | a076378728fcc54a79bd3bc15f41365d5a740d6d | [
"CC0-1.0"
] | 1 | 2019-11-05T17:08:43.000Z | 2019-11-05T17:08:43.000Z | from __future__ import division, print_function, unicode_literals
from contextlib import closing, contextmanager
from copy import copy
from os import chdir, getcwd, stat, walk
from os.path import abspath, dirname, join
from stat import S_ISREG
import tarfile
from libarchive import file_reader
from . import surrogate... | 31.384058 | 75 | 0.558762 |
3bdd5fcf9075bf03032ca2c0d5f953b74b68365e | 2,375 | py | Python | tests/snapshots/snap_test_holidata/test_holidata_produces_holidays_for_locale_and_year[pl_PL-2019] 1.py | gour/holidata | 89c7323f9c5345a3ecbf5cd5a835b0e08cfebc13 | [
"MIT"
] | 32 | 2019-04-12T08:01:34.000Z | 2022-02-28T04:41:50.000Z | tests/snapshots/snap_test_holidata/test_holidata_produces_holidays_for_locale_and_year[pl_PL-2019] 1.py | gour/holidata | 89c7323f9c5345a3ecbf5cd5a835b0e08cfebc13 | [
"MIT"
] | 74 | 2019-07-09T16:35:20.000Z | 2022-03-09T16:41:34.000Z | tests/snapshots/snap_test_holidata/test_holidata_produces_holidays_for_locale_and_year[pl_PL-2019] 1.py | gour/holidata | 89c7323f9c5345a3ecbf5cd5a835b0e08cfebc13 | [
"MIT"
] | 20 | 2019-01-28T07:41:02.000Z | 2022-02-16T02:38:57.000Z | [
{
'date': '2019-01-01',
'description': 'Nowy Rok',
'locale': 'pl-PL',
'notes': '',
'region': '',
'type': 'NF'
},
{
'date': '2019-01-06',
'description': 'Trzech Króli',
'locale': 'pl-PL',
'notes': '',
'region': '',
... | 22.40566 | 64 | 0.381053 |
0309e26fccd1610c9e2e5c8951cc88195663f233 | 968 | py | Python | extras/metrics.py | FreedomBen/banshee | 55a6ff7a7d479b3ab64f1a5394609f82341dfa59 | [
"MIT"
] | 8 | 2017-08-21T14:24:49.000Z | 2020-08-24T00:04:59.000Z | extras/metrics.py | FreedomBen/banshee | 55a6ff7a7d479b3ab64f1a5394609f82341dfa59 | [
"MIT"
] | 67 | 2017-04-16T08:29:23.000Z | 2021-01-09T13:58:08.000Z | extras/metrics.py | FreedomBen/banshee | 55a6ff7a7d479b3ab64f1a5394609f82341dfa59 | [
"MIT"
] | 8 | 2017-06-13T17:51:07.000Z | 2021-12-20T02:37:07.000Z | #!/usr/bin/env python
import cgi
import os
# INITIAL SETUP:
# 1. mkdir data
# 2. chmod o-xr data
# 3. echo 0 > data/count
# 4. change data_dir below
data_dir = '/home/bansheeweb/download.banshee-project.org/metrics/data/';
uploaded = False
form = cgi.FieldStorage()
if form.file:
# Read the current count
f =... | 19.36 | 73 | 0.594008 |
e478d65a6fcafafb5c7d6f96cc7789890297d309 | 52,872 | py | Python | mypy/main.py | SwagatSBhuyan/mypy | 218b91c5576a69da51e0813abd0fc7c5fd2d627e | [
"PSF-2.0"
] | 2 | 2017-03-21T21:27:44.000Z | 2020-12-06T19:13:11.000Z | mypy/main.py | SwagatSBhuyan/mypy | 218b91c5576a69da51e0813abd0fc7c5fd2d627e | [
"PSF-2.0"
] | null | null | null | mypy/main.py | SwagatSBhuyan/mypy | 218b91c5576a69da51e0813abd0fc7c5fd2d627e | [
"PSF-2.0"
] | 1 | 2021-05-21T08:25:52.000Z | 2021-05-21T08:25:52.000Z | """Mypy type checker command line tool."""
import argparse
from gettext import gettext
import os
import subprocess
import sys
import time
from typing import Any, Dict, IO, List, Optional, Sequence, Tuple, TextIO, Union
from typing_extensions import Final, NoReturn
from mypy import build
from mypy import defaults
fro... | 45.074169 | 99 | 0.632944 |
18dfa4638b0a726c9d07757bd8976a11fd214c43 | 2,850 | py | Python | st2common/st2common/constants/pack.py | ekhavana/st2 | 2b47b0e317a2dfd7d92d63ec6dcf706493148890 | [
"Apache-2.0"
] | null | null | null | st2common/st2common/constants/pack.py | ekhavana/st2 | 2b47b0e317a2dfd7d92d63ec6dcf706493148890 | [
"Apache-2.0"
] | null | null | null | st2common/st2common/constants/pack.py | ekhavana/st2 | 2b47b0e317a2dfd7d92d63ec6dcf706493148890 | [
"Apache-2.0"
] | null | null | null | # Licensed to the StackStorm, Inc ('StackStorm') 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 use th... | 29.6875 | 147 | 0.711228 |
9c8ce207d5d6aed72c5813e0b8cd483171e6c4bb | 1,764 | py | Python | PowerTrack/get_stream.py | g4brielvs/enterprise-scripts-python | 788d425a180ca5ec06511ee5a1304957ec4d28ee | [
"Apache-2.0"
] | null | null | null | PowerTrack/get_stream.py | g4brielvs/enterprise-scripts-python | 788d425a180ca5ec06511ee5a1304957ec4d28ee | [
"Apache-2.0"
] | null | null | null | PowerTrack/get_stream.py | g4brielvs/enterprise-scripts-python | 788d425a180ca5ec06511ee5a1304957ec4d28ee | [
"Apache-2.0"
] | null | null | null |
import argparse
import json
import os
import ssl
import sys
import requests
from dotenv import load_dotenv
load_dotenv(verbose=True) # Throws error if it can't find .env file
# Argparse for cli options. Run `python engagement_totals.py -h` to see list of available arguments.
parser = argparse.ArgumentParser()
parse... | 29.4 | 100 | 0.668367 |
de79c50bcf2db093ce388c48ecf4f5cdef4ddb45 | 10,842 | py | Python | pynmt/__init__.py | obrmmk/demo | b5deb85b2b2bf118b850f93c255ee88d055156a8 | [
"MIT"
] | null | null | null | pynmt/__init__.py | obrmmk/demo | b5deb85b2b2bf118b850f93c255ee88d055156a8 | [
"MIT"
] | null | null | null | pynmt/__init__.py | obrmmk/demo | b5deb85b2b2bf118b850f93c255ee88d055156a8 | [
"MIT"
] | 1 | 2021-11-23T14:04:36.000Z | 2021-11-23T14:04:36.000Z | import torch
import torch.nn as nn
from torch.nn import (TransformerEncoder, TransformerDecoder,
TransformerEncoderLayer, TransformerDecoderLayer)
from torch import Tensor
from typing import Iterable, List
import math
import os
import numpy as np
try:
from janome.tokenizer import Tokenizer
ex... | 36.14 | 168 | 0.620365 |
c1de78b4426b8252cb0fbfcd0fad10e147eb59c5 | 426 | py | Python | examples/getVersion.py | lelongfds/xym-ledger-app | 5f2e1045abc4a2995cd62b1b13ed2b6c8dec66a3 | [
"Apache-2.0"
] | 2 | 2019-06-05T10:42:07.000Z | 2019-07-23T14:58:26.000Z | examples/getVersion.py | lelongfds/xym-ledger-app | 5f2e1045abc4a2995cd62b1b13ed2b6c8dec66a3 | [
"Apache-2.0"
] | null | null | null | examples/getVersion.py | lelongfds/xym-ledger-app | 5f2e1045abc4a2995cd62b1b13ed2b6c8dec66a3 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
from ledgerblue.comm import getDongle
# Create APDU message.
# CLA 0xE0
# INS 0x06 GET_APP_CONFIGURATION
# P1 0x00 NO USER CONFIRMATION
# P2 0x00 NO CHAIN CODE
apduMessage = "E0060000ff"
print("-= NEM Ledger =-")
print("Request app Version")
dongle = getDongle(True)
result = dongle.exchan... | 22.421053 | 69 | 0.71831 |
2f6e9e8b7bf146aa6caa9144ea695188e32cd412 | 7,532 | py | Python | scripts/automation/regression/astf_tests/astf_resilience_test.py | timgates42/trex-core | efe94752fcb2d0734c83d4877afe92a3dbf8eccd | [
"Apache-2.0"
] | 956 | 2015-06-24T15:04:55.000Z | 2022-03-30T06:25:04.000Z | scripts/automation/regression/astf_tests/astf_resilience_test.py | angelyouyou/trex-core | fddf78584cae285d9298ef23f9f5c8725e16911e | [
"Apache-2.0"
] | 782 | 2015-09-20T15:19:00.000Z | 2022-03-31T23:52:05.000Z | scripts/automation/regression/astf_tests/astf_resilience_test.py | angelyouyou/trex-core | fddf78584cae285d9298ef23f9f5c8725e16911e | [
"Apache-2.0"
] | 429 | 2015-06-27T19:34:21.000Z | 2022-03-23T11:02:51.000Z | import os, sys
import time
import random
import string
from .astf_general_test import CASTFGeneral_Test, CTRexScenario
from nose.tools import assert_raises
from trex.astf.api import *
from trex.stl.trex_stl_packet_builder_scapy import ip2int, int2ip
class ASTFResilience_Test(CASTFGeneral_Test):
"""Checking stabil... | 37.849246 | 120 | 0.555762 |
8822ec0893e103a7aa1ed60c5fd17fd823b3295c | 1,476 | py | Python | translation.py | warrenregister/GEMSEC_DNA_Seq | 78dba5da2378d78a13eb6ea0b9aa1f7da5d2104c | [
"MIT"
] | null | null | null | translation.py | warrenregister/GEMSEC_DNA_Seq | 78dba5da2378d78a13eb6ea0b9aa1f7da5d2104c | [
"MIT"
] | null | null | null | translation.py | warrenregister/GEMSEC_DNA_Seq | 78dba5da2378d78a13eb6ea0b9aa1f7da5d2104c | [
"MIT"
] | null | null | null | """ Translation of DNA sequences into proteins from NGS"""
import numpy as np
import pandas as pd
import math
import itertools as it
import os
from time import time
#from time import time
def translate(seq):
"""
Translate DNA to protein
"""
table = {
'ATA':'I', 'ATC':'I', 'ATT':'I', 'ATG':'M',
... | 32.086957 | 65 | 0.440379 |
5afbcb2ed630511bd8040044c7e8043273f22b89 | 24,274 | py | Python | Broca.py | vMarcelino/Broca | 1fe56c85c9d0e08b943ddfb4bb92a10bda8a9440 | [
"MIT"
] | null | null | null | Broca.py | vMarcelino/Broca | 1fe56c85c9d0e08b943ddfb4bb92a10bda8a9440 | [
"MIT"
] | null | null | null | Broca.py | vMarcelino/Broca | 1fe56c85c9d0e08b943ddfb4bb92a10bda8a9440 | [
"MIT"
] | null | null | null | from enum import Enum
print("Projeto broca!")
showClass = 1 == 0
def MainCodeExecution():
# stringInput = "(" + input("Manual expression Override: ") + ")"
# print(stringInput)
ExpressionVariableDatabase() # Variable database initialization
e0 = ExpressionVariable("e0")
e1 = ExpressionVariable... | 37.809969 | 160 | 0.582763 |
609223c0b5451eaeaf7df32ddd633c2b00c79cfa | 3,108 | py | Python | zombie/migrations/0003_auto_20180414_1357.py | davidpettersson/klimatbanta | ac963b8a0b0799eacbfe7c0b8cc58ec2433d4dc4 | [
"MIT"
] | null | null | null | zombie/migrations/0003_auto_20180414_1357.py | davidpettersson/klimatbanta | ac963b8a0b0799eacbfe7c0b8cc58ec2433d4dc4 | [
"MIT"
] | null | null | null | zombie/migrations/0003_auto_20180414_1357.py | davidpettersson/klimatbanta | ac963b8a0b0799eacbfe7c0b8cc58ec2433d4dc4 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.12 on 2018-04-14 11:57
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0002_remo... | 36.564706 | 214 | 0.600708 |
2473182eb2e998e9b548c7a46e8886e9df1edcfe | 12,171 | py | Python | pw_tokenizer/py/elf_reader_test.py | curtin-space/pigweed | fe2e1743e03fabd2676f01d9de0ac9d34a426076 | [
"Apache-2.0"
] | 86 | 2021-03-09T23:49:40.000Z | 2022-03-30T08:14:51.000Z | pw_tokenizer/py/elf_reader_test.py | curtin-space/pigweed | fe2e1743e03fabd2676f01d9de0ac9d34a426076 | [
"Apache-2.0"
] | 4 | 2021-07-27T20:32:03.000Z | 2022-03-08T10:39:07.000Z | pw_tokenizer/py/elf_reader_test.py | curtin-space/pigweed | fe2e1743e03fabd2676f01d9de0ac9d34a426076 | [
"Apache-2.0"
] | 22 | 2021-03-11T15:15:47.000Z | 2022-02-09T06:16:36.000Z | #!/usr/bin/env python3
# Copyright 2020 The Pigweed Authors
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 45.58427 | 93 | 0.608989 |
5ad94ae7519f6892ff7e98adad40c4f3917dd270 | 204 | py | Python | get-sender-id.py | fakegit/trsh | f34dda6e6c9beec307fc04962e03bbe4e9d521a5 | [
"MIT"
] | 68 | 2017-04-23T11:04:00.000Z | 2022-02-04T22:23:53.000Z | get-sender-id.py | fakegit/trsh | f34dda6e6c9beec307fc04962e03bbe4e9d521a5 | [
"MIT"
] | 2 | 2018-03-31T20:01:47.000Z | 2021-11-18T20:48:30.000Z | get-sender-id.py | fakegit/trsh | f34dda6e6c9beec307fc04962e03bbe4e9d521a5 | [
"MIT"
] | 27 | 2017-05-01T07:50:19.000Z | 2021-11-29T05:19:57.000Z | #!/usr/bin/python
import telepot
from pprint import pprint
bot = telepot.Bot('TG-BOT-TOKEN')
response = bot.getUpdates()
# Print all raw messages with chat_id,text,type,username
pprint(response)
| 12 | 56 | 0.740196 |
da12fca16ee77391be661e1ed24115c186af6262 | 528 | py | Python | h2o-hadoop-common/tests/python/pyunit_read_invalid_file.py | kernelrich/h2o-3 | 16bd6be6d0ac22b037cb55b4c647e63e2b112e1e | [
"Apache-2.0"
] | 6,098 | 2015-05-22T02:46:12.000Z | 2022-03-31T16:54:51.000Z | h2o-hadoop-common/tests/python/pyunit_read_invalid_file.py | kernelrich/h2o-3 | 16bd6be6d0ac22b037cb55b4c647e63e2b112e1e | [
"Apache-2.0"
] | 2,517 | 2015-05-23T02:10:54.000Z | 2022-03-30T17:03:39.000Z | h2o-hadoop-common/tests/python/pyunit_read_invalid_file.py | kernelrich/h2o-3 | 16bd6be6d0ac22b037cb55b4c647e63e2b112e1e | [
"Apache-2.0"
] | 2,199 | 2015-05-22T04:09:55.000Z | 2022-03-28T22:20:45.000Z | #! /usr/env/python
import sys
import os
sys.path.insert(1, os.path.join("../../../h2o-py"))
from tests import pyunit_utils
import h2o
def read_invalid_file():
try:
hdfs_path = 'hdfs:///user/jenkins/tests/invalid'
h2o.import_file(hdfs_path)
assert False, "Read of file, which does not exists... | 22.956522 | 94 | 0.67803 |
134dea980359beedd3ea29dedfba5d6e04be334e | 2,916 | py | Python | Month 01/Week 01/Day 06/d.py | KevinKnott/Coding-Review | 6a83cb798cc317d1e4357ac6b2b1fbf76fa034fb | [
"MIT"
] | null | null | null | Month 01/Week 01/Day 06/d.py | KevinKnott/Coding-Review | 6a83cb798cc317d1e4357ac6b2b1fbf76fa034fb | [
"MIT"
] | null | null | null | Month 01/Week 01/Day 06/d.py | KevinKnott/Coding-Review | 6a83cb798cc317d1e4357ac6b2b1fbf76fa034fb | [
"MIT"
] | null | null | null | # Kth Largest Element in an Array: https://leetcode.com/problems/kth-largest-element-in-an-array/
# Given an integer array nums and an integer k, return the kth largest element in the array.
# Note that it is the kth largest element in the sorted order, not the kth distinct element.
import heapq
import random
# Note I... | 39.945205 | 162 | 0.63786 |
f82d1c64b62dbeefbdff3bec3b3fa44b0e5d3a63 | 8,349 | py | Python | pickydict/PickyDict.py | florian-huber/pickydict | b4138a4d1edc1257c4aed0691d915ef42b89ebc9 | [
"MIT"
] | 4 | 2022-01-06T13:43:53.000Z | 2022-02-10T01:41:04.000Z | pickydict/PickyDict.py | florian-huber/pickydict | b4138a4d1edc1257c4aed0691d915ef42b89ebc9 | [
"MIT"
] | 8 | 2022-01-17T10:01:12.000Z | 2022-03-07T21:10:32.000Z | pickydict/PickyDict.py | florian-huber/pickydict | b4138a4d1edc1257c4aed0691d915ef42b89ebc9 | [
"MIT"
] | null | null | null | import logging
import json
import re
logger = logging.getLogger('pickydict')
class PickyDict(dict):
"""More picky version of Python dictionary.
PickyDict objects will behave just like Python dictionaries, with a few
notable exceptions:
(1) PickyDict has a force_lower_case attribute. If set to T... | 39.947368 | 93 | 0.624745 |
226e48489a830f377fdc99306cbde1a6f45d2064 | 5,238 | py | Python | tensorflow/lite/testing/op_tests/fully_connected.py | yage99/tensorflow | c7fa71b32a3635eb25596ae80d007b41007769c4 | [
"Apache-2.0"
] | 74 | 2020-07-06T17:11:39.000Z | 2022-01-28T06:31:28.000Z | tensorflow/lite/testing/op_tests/fully_connected.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 1,056 | 2019-12-15T01:20:31.000Z | 2022-02-10T02:06:28.000Z | tensorflow/lite/testing/op_tests/fully_connected.py | sseung0703/tensorflow | be084bd7a4dd241eb781fc704f57bcacc5c9b6dd | [
"Apache-2.0"
] | 12 | 2020-07-08T07:27:17.000Z | 2021-12-27T08:54:27.000Z | # Copyright 2019 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.534161 | 80 | 0.605002 |
1fdf1dfba2932cefb0179fc976d440e06c12de9d | 6,061 | py | Python | ASC_Project/analyses/solver/Solver_Hub.py | nasserarbabi/ASC_Challenge | 88dab668756121be6ef81eb7a298cc1add8274a2 | [
"MIT"
] | null | null | null | ASC_Project/analyses/solver/Solver_Hub.py | nasserarbabi/ASC_Challenge | 88dab668756121be6ef81eb7a298cc1add8274a2 | [
"MIT"
] | null | null | null | ASC_Project/analyses/solver/Solver_Hub.py | nasserarbabi/ASC_Challenge | 88dab668756121be6ef81eb7a298cc1add8274a2 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, unicode_literals
from .Darcy_CVFEM import Darcy_CVFEM
from ..models import (BC, Analysis, Connectivity, Mesh, Nodes, Preform, Resin,
Section, Step, Results)
from time import sleep
import numpy as np
from celery import shared_task
import os
imp... | 32.411765 | 126 | 0.574328 |
d297dd9199fba94ee124818bf8d870149b8fc93e | 4,253 | py | Python | textract/textract_worker/worker.py | aws-samples/nlp-textract-comprehend-demo | 69d93dc03bf14e6987f48a5a908f0f88bece34c6 | [
"MIT-0"
] | 3 | 2020-08-26T00:17:43.000Z | 2021-06-22T09:48:47.000Z | textract/textract_worker/worker.py | aws-samples/nlp-textract-comprehend-demo | 69d93dc03bf14e6987f48a5a908f0f88bece34c6 | [
"MIT-0"
] | 2 | 2020-09-11T11:52:39.000Z | 2021-07-23T23:44:14.000Z | textract/textract_worker/worker.py | aws-samples/nlp-textract-comprehend-demo | 69d93dc03bf14e6987f48a5a908f0f88bece34c6 | [
"MIT-0"
] | 3 | 2020-08-28T03:01:30.000Z | 2021-06-10T18:52:59.000Z | import boto3
import time
import os
import json
def is_job_complete(jobId):
"""
That function is responsible to validate if a started job in textract is completed or not
"""
client = boto3.client('textract')
response = client.get_document_text_detection(JobId=jobId)
status = response["JobStatus"... | 31.503704 | 93 | 0.599107 |
98861b63395b73cce7b8a6e6d463da045f823807 | 2,185 | py | Python | old-katas/bowling-kata/day-7.py | Alex-Diez/python-tdd-katas | a176f16cfd103e618e539a57cac0748fba52221c | [
"MIT"
] | null | null | null | old-katas/bowling-kata/day-7.py | Alex-Diez/python-tdd-katas | a176f16cfd103e618e539a57cac0748fba52221c | [
"MIT"
] | null | null | null | old-katas/bowling-kata/day-7.py | Alex-Diez/python-tdd-katas | a176f16cfd103e618e539a57cac0748fba52221c | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
class Game(object):
def __init__(self):
self.rolls = []
def roll(self, pins):
self.rolls.append(pins)
def score(self):
score = 0
frame_index = 0
for i in range(0, 10):
if self._is_strike(frame_index):
score += sel... | 26.325301 | 77 | 0.590847 |
dbe03429705e12c3c878e01d79a951c34d7c1344 | 9,144 | py | Python | ansible/grab001/lib/python2.7/site-packages/ansible/modules/core/network/nxos/nxos_evpn_global.py | archmangler/jumpcloud | 9dda2862d9331b8794f6985c157fa50d7260fcd0 | [
"MIT"
] | null | null | null | ansible/grab001/lib/python2.7/site-packages/ansible/modules/core/network/nxos/nxos_evpn_global.py | archmangler/jumpcloud | 9dda2862d9331b8794f6985c157fa50d7260fcd0 | [
"MIT"
] | null | null | null | ansible/grab001/lib/python2.7/site-packages/ansible/modules/core/network/nxos/nxos_evpn_global.py | archmangler/jumpcloud | 9dda2862d9331b8794f6985c157fa50d7260fcd0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... | 28.485981 | 93 | 0.600503 |
f000aa725c130e343e283ba21cd45761224b3ce2 | 361 | py | Python | tests/packages/test_directory_dependency.py | utek/core | 1172536cac35ca4e2519b9bd516ae8f1cf23994a | [
"MIT"
] | null | null | null | tests/packages/test_directory_dependency.py | utek/core | 1172536cac35ca4e2519b9bd516ae8f1cf23994a | [
"MIT"
] | null | null | null | tests/packages/test_directory_dependency.py | utek/core | 1172536cac35ca4e2519b9bd516ae8f1cf23994a | [
"MIT"
] | null | null | null | import pytest
from poetry.core.packages.directory_dependency import DirectoryDependency
from poetry.core.utils._compat import Path
DIST_PATH = Path(__file__).parent.parent / "fixtures" / "git" / "github.com" / "demo"
def test_directory_dependency_must_exist():
with pytest.raises(ValueError):
DirectoryD... | 27.769231 | 85 | 0.764543 |
824661fe30c00afd8b5fcdd1f9c50a8d9f778c50 | 10,495 | py | Python | oslo_db/options.py | mail2nsrajesh/oslo.db | d17be6e20c82819714518d8459a8ab2e88453c13 | [
"Apache-2.0"
] | null | null | null | oslo_db/options.py | mail2nsrajesh/oslo.db | d17be6e20c82819714518d8459a8ab2e88453c13 | [
"Apache-2.0"
] | 1 | 2018-02-28T17:29:41.000Z | 2018-02-28T17:29:41.000Z | oslo_db/options.py | mail2nsrajesh/oslo.db | d17be6e20c82819714518d8459a8ab2e88453c13 | [
"Apache-2.0"
] | null | null | null | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed u... | 48.364055 | 79 | 0.566841 |
47858b122baf95c8e45af58b5d99fa39bbcf2b99 | 7,639 | py | Python | tools/yuidoc/bin/Cheetah/Filters.py | theatlantic/backplanejs | d7b844457abba930df6a800e55eb9c70c8b76cd9 | [
"Apache-2.0"
] | 115 | 2015-01-02T12:23:59.000Z | 2021-12-22T08:18:04.000Z | tools/yuidoc/bin/Cheetah/Filters.py | theatlantic/backplanejs | d7b844457abba930df6a800e55eb9c70c8b76cd9 | [
"Apache-2.0"
] | 1 | 2017-01-12T09:10:46.000Z | 2017-01-12T09:10:46.000Z | tools/yuidoc/bin/Cheetah/Filters.py | theatlantic/backplanejs | d7b844457abba930df6a800e55eb9c70c8b76cd9 | [
"Apache-2.0"
] | 69 | 2015-03-12T07:40:21.000Z | 2020-04-04T15:15:55.000Z | '''
Filters for the #filter directive as well as #transform
#filter results in output filters Cheetah's $placeholders .
#transform results in a filter on the entirety of the output
'''
import sys
# Additional entities WebSafe knows how to transform. No need to include
# '<', '>' or '&' since those wi... | 35.86385 | 91 | 0.592355 |
87716dcbccf1abe6d5296b2e992cb38af80e4779 | 11,487 | py | Python | homeassistant/helpers/helper_config_entry_flow.py | Rjevski/core | eca5fb5d54f50e7a103338ba74a94ff7ee0882db | [
"Apache-2.0"
] | null | null | null | homeassistant/helpers/helper_config_entry_flow.py | Rjevski/core | eca5fb5d54f50e7a103338ba74a94ff7ee0882db | [
"Apache-2.0"
] | null | null | null | homeassistant/helpers/helper_config_entry_flow.py | Rjevski/core | eca5fb5d54f50e7a103338ba74a94ff7ee0882db | [
"Apache-2.0"
] | null | null | null | """Helpers for data entry flows for helper config entries."""
from __future__ import annotations
from abc import abstractmethod
from collections.abc import Callable, Mapping
import copy
from dataclasses import dataclass
import types
from typing import Any, cast
import voluptuous as vol
from homeassistant import conf... | 36.466667 | 89 | 0.660834 |
1ac44e3cce3db82dd840b03d5251b4a7c85abd78 | 564 | py | Python | login/APIv1/userLogin.py | aotella/calcoff_backend | 7f25ff494ea2e1e4119fe7450d805c986fa77f0c | [
"Apache-2.0",
"MIT"
] | null | null | null | login/APIv1/userLogin.py | aotella/calcoff_backend | 7f25ff494ea2e1e4119fe7450d805c986fa77f0c | [
"Apache-2.0",
"MIT"
] | null | null | null | login/APIv1/userLogin.py | aotella/calcoff_backend | 7f25ff494ea2e1e4119fe7450d805c986fa77f0c | [
"Apache-2.0",
"MIT"
] | null | null | null | from ..models import UserModel
import bcrypt
def userLogin(request):
try:
userObject = UserModel.objects.get(UserName=request['userName'])
if bcrypt.checkpw(str(request['password']),str(userObject.Password)):
returnData={}
returnData['UserName']=userObject.UserName
... | 31.333333 | 77 | 0.618794 |
60481a4cd46253b27a1a2f3fd2bf90d2cc2d923a | 3,078 | py | Python | cybox/utils/idgen.py | siemens/python-cybox | b692a98c8a62bd696e2a0dda802ada7359853482 | [
"BSD-3-Clause"
] | null | null | null | cybox/utils/idgen.py | siemens/python-cybox | b692a98c8a62bd696e2a0dda802ada7359853482 | [
"BSD-3-Clause"
] | null | null | null | cybox/utils/idgen.py | siemens/python-cybox | b692a98c8a62bd696e2a0dda802ada7359853482 | [
"BSD-3-Clause"
] | 1 | 2019-04-16T18:37:32.000Z | 2019-04-16T18:37:32.000Z | # Copyright (c) 2014, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
"""Methods for generating IDs for Objects and Observables"""
import uuid
from cybox.utils.nsparser import Namespace
EXAMPLE_NAMESPACE = Namespace("http://example.com", "example")
__all__ = ['InvalidMethodError',... | 27.981818 | 77 | 0.662443 |
b53c43dc70d91ac1fe0904143a2ee33b5bf574f5 | 2,079 | py | Python | lab04/scanner.py | konrad2508/compilators-lab | ebafe4c8b72d4600408c0ceb54ad0bed0138e736 | [
"MIT"
] | 1 | 2020-10-28T13:18:09.000Z | 2020-10-28T13:18:09.000Z | lab05/scanner.py | konrad2508/compilators-lab | ebafe4c8b72d4600408c0ceb54ad0bed0138e736 | [
"MIT"
] | null | null | null | lab05/scanner.py | konrad2508/compilators-lab | ebafe4c8b72d4600408c0ceb54ad0bed0138e736 | [
"MIT"
] | null | null | null | import ply.lex as lex
reserved = {
'if': 'IF',
'else': 'ELSE',
'for': 'FOR',
'while': 'WHILE',
'break': 'BREAK',
'continue': 'CONTINUE',
'return': 'RETURN',
'eye': 'EYE',
'zeros': 'ZEROS',
'ones': 'ONES',
'print': 'PRINT'
}
tokens = (
'WHITESPACE', 'COMMENT', '... | 19.990385 | 116 | 0.537278 |
edac057cbf99b03df2f3df6c5e0ab240cf5925ed | 24,877 | py | Python | puzzle-project/puzzle/views.py | bhavul/GIDS-Endurance-Hacker-Puzzle | 78b057b9158e7e818de833f1fd91c7f5d598ac8a | [
"MIT"
] | null | null | null | puzzle-project/puzzle/views.py | bhavul/GIDS-Endurance-Hacker-Puzzle | 78b057b9158e7e818de833f1fd91c7f5d598ac8a | [
"MIT"
] | null | null | null | puzzle-project/puzzle/views.py | bhavul/GIDS-Endurance-Hacker-Puzzle | 78b057b9158e7e818de833f1fd91c7f5d598ac8a | [
"MIT"
] | null | null | null | from pyramid.httpexceptions import HTTPFound
from pyramid.response import Response, FileResponse
from pyramid.url import route_url
from pyramid.view import view_config
from pyramid.events import ApplicationCreated
from pyramid.events import NewRequest
from pyramid.events import subscriber
import sqlite3
import random
i... | 24,877 | 24,877 | 0.660691 |
b66e6d9e4ddb82c17b2ba93194051581d151a0ca | 10,062 | py | Python | sample/helper.py | gazsim/RPICourseTrends | 99aede5b7f9dcae8a5d0fd85da52b484146f9367 | [
"MIT"
] | 4 | 2018-09-11T20:17:49.000Z | 2018-12-13T01:01:07.000Z | sample/helper.py | gazsim/RPICourseTrends | 99aede5b7f9dcae8a5d0fd85da52b484146f9367 | [
"MIT"
] | 13 | 2018-10-30T19:43:39.000Z | 2019-02-22T21:21:09.000Z | sample/helper.py | gazsim/RPICourseTrends | 99aede5b7f9dcae8a5d0fd85da52b484146f9367 | [
"MIT"
] | 6 | 2018-09-11T20:19:18.000Z | 2022-03-24T02:05:01.000Z | import urllib
from urllib import request
from html.parser import HTMLParser
from bs4 import BeautifulSoup
from datetime import datetime
import numpy as np
from sample import Database
import mysql
class Course(object):
def __init__(self, data):
self.CRN = data[0]
self.SubjCrse = data[1]
se... | 30.398792 | 107 | 0.547207 |
54d9d07cc9be9e4c22b1e77e899e64019a731db8 | 5,147 | py | Python | options/base_options.py | shashikant-ghangare/ThermalGAN | be8fae6bbd5ee22326eecbbb2b84c013aa11df05 | [
"MIT"
] | 75 | 2018-11-26T23:04:37.000Z | 2022-03-28T07:28:58.000Z | options/base_options.py | matinraayai/ThermalGAN | be8fae6bbd5ee22326eecbbb2b84c013aa11df05 | [
"MIT"
] | 13 | 2018-12-09T09:55:24.000Z | 2022-01-27T17:26:00.000Z | options/base_options.py | matinraayai/ThermalGAN | be8fae6bbd5ee22326eecbbb2b84c013aa11df05 | [
"MIT"
] | 23 | 2019-08-15T01:01:44.000Z | 2022-03-21T13:37:30.000Z | import argparse
import os
from util import util
import torch
class BaseOptions():
def __init__(self):
self.parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
self.initialized = False
def initialize(self):
self.parser.add_argument('--dataroot', req... | 64.3375 | 197 | 0.645619 |
81ce9f742b0599adc1f16f71a1cc9deb318c33c2 | 1,706 | py | Python | sleepypuppy/admin/user/views.py | soffensive/sleepy-puppy | ab8ff46d624d30458740676b6930184e97a742a6 | [
"Apache-2.0"
] | 952 | 2015-08-31T16:50:22.000Z | 2018-08-22T08:48:27.000Z | sleepypuppy/admin/user/views.py | soffensive/sleepy-puppy | ab8ff46d624d30458740676b6930184e97a742a6 | [
"Apache-2.0"
] | 18 | 2015-09-03T19:23:23.000Z | 2018-06-24T17:36:40.000Z | sleepypuppy/admin/user/views.py | rjw1/sleepy-puppy | 2ef1eddff60045c8dd3799d9a57974fa3a7c5eb7 | [
"Apache-2.0"
] | 135 | 2015-09-01T09:22:48.000Z | 2018-08-26T02:10:16.000Z | # Copyright 2015 Netflix, 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... | 34.12 | 98 | 0.689332 |
eac046d2b72b8acdfdfdfe815d8004d7a8d3c9aa | 3,496 | py | Python | predict.py | birds-on-mars/birdsonearth | 62921423b787ad8b81b8e60e8de42a3f6e113d88 | [
"Apache-2.0"
] | 13 | 2019-04-11T10:02:11.000Z | 2021-12-01T22:27:18.000Z | predict.py | birds-on-mars/birdsonearth | 62921423b787ad8b81b8e60e8de42a3f6e113d88 | [
"Apache-2.0"
] | 2 | 2019-12-17T13:31:09.000Z | 2020-05-14T09:48:10.000Z | predict.py | birds-on-mars/birdsonearth | 62921423b787ad8b81b8e60e8de42a3f6e113d88 | [
"Apache-2.0"
] | 2 | 2020-07-17T21:03:18.000Z | 2021-07-14T02:09:31.000Z | import sys, getopt
import imp
import params as p
import VGGish_model as m
import torch
import os
import pickle
import numpy as np
from utils import vggish_input
from utils import preprocessing as pre
from utils import Dataset as d
from utils import trainer as t
imp.reload(p)
imp.reload(d)
imp.reload(m)
imp.reload(t)
... | 30.4 | 85 | 0.626716 |
c2a612e4d5c180ba1f613cdd492713405039836c | 1,425 | py | Python | crime.py | tulerfeng/datamining-homework-1 | 6d9989c7f60d5fd05dae12ea754a13ee3f45f944 | [
"MIT"
] | null | null | null | crime.py | tulerfeng/datamining-homework-1 | 6d9989c7f60d5fd05dae12ea754a13ee3f45f944 | [
"MIT"
] | null | null | null | crime.py | tulerfeng/datamining-homework-1 | 6d9989c7f60d5fd05dae12ea754a13ee3f45f944 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
from pandas import DataFrame
import matplotlib.pyplot as plt
def loader():
filepath = "crime/records-for-2011.csv"
df = pd.read_csv(filepath, header=0)
return df
def cnt(str1,data1):
print(data1[str1].value_cnts()[:10])
def find(str2,data2):
... | 23.360656 | 102 | 0.621754 |
ddbdad8dbe00a299758723151aa67d6c423b39fb | 311 | py | Python | setup.py | chenyaoBOYqu/albino | 8c43893b8d8dc3f92a01c2a6f8f66f2bd123b333 | [
"CC0-1.0"
] | 8 | 2020-06-30T20:16:14.000Z | 2021-01-26T00:51:27.000Z | setup.py | chenyaoBOYqu/albino | 8c43893b8d8dc3f92a01c2a6f8f66f2bd123b333 | [
"CC0-1.0"
] | null | null | null | setup.py | chenyaoBOYqu/albino | 8c43893b8d8dc3f92a01c2a6f8f66f2bd123b333 | [
"CC0-1.0"
] | 3 | 2020-09-02T23:03:04.000Z | 2021-03-21T23:47:46.000Z | #!/usr/bin/env python3
import setuptools
setuptools.setup(
name="gpt2_bot",
version="0",
author="Al Beano",
author_email="albino@autistici.org",
description="GPT-2 SUPER NEXT GENERATION AI irc shitposting bot",
url="https://github.com/albino/shithead-X",
scripts=["gpt2_bot.py"],
)
| 23.923077 | 69 | 0.681672 |
1e1b3c91409c975568e698a0c5458078390eea24 | 4,200 | py | Python | code/train.py | marco-digio/Twitter4SSE | 724b3f5d638b17a0e46353a1ea1a409da17ab8bd | [
"Apache-2.0"
] | 6 | 2021-10-09T17:24:53.000Z | 2022-01-02T17:23:41.000Z | code/train.py | marco-digio/Twitter4SSE | 724b3f5d638b17a0e46353a1ea1a409da17ab8bd | [
"Apache-2.0"
] | null | null | null | code/train.py | marco-digio/Twitter4SSE | 724b3f5d638b17a0e46353a1ea1a409da17ab8bd | [
"Apache-2.0"
] | null | null | null | from sentence_transformers import SentenceTransformer, InputExample
from sentence_transformers import evaluation, losses
from torch.utils.data import DataLoader
from sentence_transformers.evaluation import EmbeddingSimilarityEvaluator
import os
from sentence_transformers import SentenceTransformer, LoggingHandler, los... | 40 | 144 | 0.721667 |
82458f4378ed530c5179351f5905bda6b3362f12 | 214,323 | py | Python | kvirt/cli.py | pacevedom/kcli | 6e2035fb92f4adbdc44b9e1fe19c1231f46deadf | [
"Apache-2.0"
] | null | null | null | kvirt/cli.py | pacevedom/kcli | 6e2035fb92f4adbdc44b9e1fe19c1231f46deadf | [
"Apache-2.0"
] | null | null | null | kvirt/cli.py | pacevedom/kcli | 6e2035fb92f4adbdc44b9e1fe19c1231f46deadf | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# PYTHON_ARGCOMPLETE_OK
# coding=utf-8
from distutils.spawn import find_executable
from getpass import getuser
from kvirt.config import Kconfig
from kvirt.examples import plandatacreate, vmdatacreate, hostcreate, _list, plancreate, planinfo, productinfo
from kvirt.examples import repocreate, isoc... | 48.887546 | 120 | 0.651456 |
3bf7f25653e6dd2a5bfde349116f7a0420fc5fc1 | 37,698 | py | Python | zerver/tests/test_event_queue.py | Signior-X/zulip | 7f0381d4c7f17706e7840ca54c171db940f0d885 | [
"Apache-2.0"
] | 1 | 2020-07-07T05:28:25.000Z | 2020-07-07T05:28:25.000Z | zerver/tests/test_event_queue.py | Signior-X/zulip | 7f0381d4c7f17706e7840ca54c171db940f0d885 | [
"Apache-2.0"
] | 10 | 2018-11-26T23:16:45.000Z | 2019-02-18T23:17:03.000Z | zerver/tests/test_event_queue.py | Signior-X/zulip | 7f0381d4c7f17706e7840ca54c171db940f0d885 | [
"Apache-2.0"
] | 2 | 2017-08-22T12:52:22.000Z | 2019-03-29T05:20:32.000Z | import time
from typing import Any, Callable, Collection, Dict, List
from unittest import mock
import orjson
from django.http import HttpRequest, HttpResponse
from zerver.lib.actions import do_change_subscription_property, do_mute_topic
from zerver.lib.test_classes import ZulipTestCase
from zerver.lib.test_helpers im... | 41.155022 | 98 | 0.612048 |
79b8d8200432ce95ac878bfcbfc5eb342ccbdc76 | 1,814 | py | Python | src/collectors/loadavg/loadavg.py | lreed/Diamond | 2772cdbc27a7ba3fedeb6d4241aeee9d2fcbdb80 | [
"MIT"
] | 1 | 2015-03-13T00:29:53.000Z | 2015-03-13T00:29:53.000Z | src/collectors/loadavg/loadavg.py | jwilder/Diamond | d5c59eaa4441ac671e3ba7b922e89650b8d9e52a | [
"MIT"
] | null | null | null | src/collectors/loadavg/loadavg.py | jwilder/Diamond | d5c59eaa4441ac671e3ba7b922e89650b8d9e52a | [
"MIT"
] | null | null | null | # coding=utf-8
"""
Uses /proc/loadavg to collect data on load average
#### Dependencies
* /proc/loadavg
"""
import diamond.collector
import re
import os
from diamond.collector import str_to_bool
_RE = re.compile(r'([\d.]+) ([\d.]+) ([\d.]+) (\d+)/(\d+)')
class LoadAverageCollector(diamond.collector.Collector):... | 28.793651 | 76 | 0.553473 |
0fcf5b0cb2c136431e751c9afba7e7adc3a1ac5c | 2,305 | py | Python | api/app/main/model/user.py | PrathamBooks/assisted-translations | bc68bf50abf5752304eb2ca87a1cebc8f1308591 | [
"MIT"
] | null | null | null | api/app/main/model/user.py | PrathamBooks/assisted-translations | bc68bf50abf5752304eb2ca87a1cebc8f1308591 | [
"MIT"
] | null | null | null | api/app/main/model/user.py | PrathamBooks/assisted-translations | bc68bf50abf5752304eb2ca87a1cebc8f1308591 | [
"MIT"
] | null | null | null |
from .. import db, flask_bcrypt
import datetime
from app.main.model.blacklist import BlacklistToken
from ..config import key
import jwt
class User(db.Model):
""" User Model for storing user related details """
__tablename__ = "user"
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
em... | 31.575342 | 90 | 0.611714 |
9e9f9b62a7ff1e7ba3b5045f38c6aaa0c4b05049 | 25,828 | py | Python | sdks/python/appcenter_sdk/models/LogFlowDevice.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | null | null | null | sdks/python/appcenter_sdk/models/LogFlowDevice.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 6 | 2019-10-23T06:38:53.000Z | 2022-01-22T07:57:58.000Z | sdks/python/appcenter_sdk/models/LogFlowDevice.py | Brantone/appcenter-sdks | eeb063ecf79908b6e341fb00196d2cd9dc8f3262 | [
"MIT"
] | 2 | 2019-10-23T06:31:05.000Z | 2021-08-21T17:32:47.000Z | # coding: utf-8
"""
App Center Client
Microsoft Visual Studio App Center API # noqa: E501
OpenAPI spec version: preview
Contact: benedetto.abbenanti@gmail.com
Project Repository: https://github.com/b3nab/appcenter-sdks
"""
import pprint
import re # noqa: F401
import six
class LogFlowDevice(... | 33.070423 | 505 | 0.642404 |
90f76bb529c5d9ef06d67a765113bf84c805446a | 10,747 | py | Python | ems/Enquiry_record.py | pushpa-kumari123/Enquiry_Management_System | 4c9cb4daaaa46bb32812391cf97851a48a05aef0 | [
"Apache-2.0"
] | null | null | null | ems/Enquiry_record.py | pushpa-kumari123/Enquiry_Management_System | 4c9cb4daaaa46bb32812391cf97851a48a05aef0 | [
"Apache-2.0"
] | null | null | null | ems/Enquiry_record.py | pushpa-kumari123/Enquiry_Management_System | 4c9cb4daaaa46bb32812391cf97851a48a05aef0 | [
"Apache-2.0"
] | null | null | null | from tkinter import *
from tkinter import ttk
from tkinter import messagebox
import pymysql as db
my_window = Tk()
my_window.title("our final project/login/Enquiry record")
my_window.geometry("1366x768")
my_window.configure(bg="grey")
my_window.resizable(1, 1)
L1=Label(my_window,text="ENQUIRY MANAGEMENT SY... | 37.058621 | 166 | 0.602494 |
256d8d8608c9c1638da672bdfbd7f6fd73633cab | 82 | py | Python | example/new/apps.py | mozumder/django-mozumder | 887ce303249eac2d77de062fd57023dbc4b782dd | [
"MIT"
] | 1 | 2020-06-13T06:12:16.000Z | 2020-06-13T06:12:16.000Z | example/new/apps.py | mozumder/django-mozumder | 887ce303249eac2d77de062fd57023dbc4b782dd | [
"MIT"
] | 4 | 2020-06-18T03:53:29.000Z | 2021-06-09T17:56:12.000Z | example/new/apps.py | mozumder/django-mozumder | 887ce303249eac2d77de062fd57023dbc4b782dd | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class NewConfig(AppConfig):
name = 'new'
| 11.714286 | 33 | 0.719512 |
269fd507ea3010854d7a8bac07ce5b15c8a2d550 | 2,092 | py | Python | web3_multicall/multicall.py | BrunoMazorra/web3_multicall_blocknumber | 2f12f6b6bb9853b10db90b968f5b0b75a9b1a7b4 | [
"MIT"
] | null | null | null | web3_multicall/multicall.py | BrunoMazorra/web3_multicall_blocknumber | 2f12f6b6bb9853b10db90b968f5b0b75a9b1a7b4 | [
"MIT"
] | null | null | null | web3_multicall/multicall.py | BrunoMazorra/web3_multicall_blocknumber | 2f12f6b6bb9853b10db90b968f5b0b75a9b1a7b4 | [
"MIT"
] | null | null | null | # ------------------------------------------------------------ Imports ----------------------------------------------------------- #
# System
from typing import Optional, List
# Pip
from web3_wrapped_contract import WrappedContract
from web3.eth import Eth
from web3.contract import ContractFunction
# Local
from ._ab... | 32.184615 | 132 | 0.383365 |
28c2a1782a17ec321ce04dfa5cd91734af78eb7c | 972 | py | Python | scripts/deepsolar/deepsolar_test.py | thejeshgn/data | 945af2e1269b914ff1e3169880169161f4137a58 | [
"Apache-2.0"
] | 25 | 2020-07-18T04:44:57.000Z | 2022-03-03T14:44:20.000Z | scripts/deepsolar/deepsolar_test.py | thejeshgn/data | 945af2e1269b914ff1e3169880169161f4137a58 | [
"Apache-2.0"
] | 276 | 2020-05-09T00:57:50.000Z | 2022-03-29T23:27:38.000Z | scripts/deepsolar/deepsolar_test.py | thejeshgn/data | 945af2e1269b914ff1e3169880169161f4137a58 | [
"Apache-2.0"
] | 59 | 2020-05-09T00:45:30.000Z | 2022-03-28T16:03:53.000Z | '''
Unit tests for deepsolar.py
Usage: python3 deepsolar_test.py
'''
import unittest
import os
import tempfile
from .deepsolar import write_csv
module_dir_ = os.path.dirname(__file__)
class TestDeepSolar(unittest.TestCase):
def test_write_csv(self):
with tempfile.TemporaryDirectory() as tmp_dir:
... | 29.454545 | 77 | 0.617284 |
d51ac2c8d329b828006307c9952c7e73519b06b0 | 3,683 | py | Python | tests/conftest.py | yaniv1984/2021 | 31d55d8861edc044627cc36898bebbaa3983129b | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | yaniv1984/2021 | 31d55d8861edc044627cc36898bebbaa3983129b | [
"Apache-2.0"
] | null | null | null | tests/conftest.py | yaniv1984/2021 | 31d55d8861edc044627cc36898bebbaa3983129b | [
"Apache-2.0"
] | null | null | null | from datetime import datetime
import allure
import pytest
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
from webdriver_manager.firefox import GeckoDriverManager
from pages.about_page import AboutPage
from pages.forgot_password_page import ForgotPasswordPage
from pages.login_p... | 35.757282 | 118 | 0.732827 |
0a3fde05b95e825ae20826453ce033634163c0bd | 5,691 | py | Python | tests/ui/test_ui.py | stranac/voice-skill-sdk | 8bfbbedf36ed4e4b2ff865deffe4dee804d57031 | [
"MIT"
] | null | null | null | tests/ui/test_ui.py | stranac/voice-skill-sdk | 8bfbbedf36ed4e4b2ff865deffe4dee804d57031 | [
"MIT"
] | null | null | null | tests/ui/test_ui.py | stranac/voice-skill-sdk | 8bfbbedf36ed4e4b2ff865deffe4dee804d57031 | [
"MIT"
] | null | null | null | #
# voice-skill-sdk
#
# (C) 2021, Deutsche Telekom AG
#
# This file is distributed under the terms of the MIT license.
# For details see the file LICENSE in the top directory.
#
import json
import asyncio
import pathlib
import datetime
from datetime import date
from fastapi.testclient import TestClient
from skill_sd... | 26.84434 | 119 | 0.486909 |
a50681e25921f669a3699a9de1c1bbc761519571 | 5,651 | py | Python | msize.py | soniyanaik1177/Virtua-Try-On- | d104003a33dfc82083e5956804632cf1a83eeb79 | [
"MIT"
] | 8 | 2021-05-29T11:11:20.000Z | 2022-02-17T04:38:41.000Z | msize.py | chefpr7/Try-First | efaf7636cc0ff06dcec70ee300462d931c4e9d5c | [
"MIT"
] | 14 | 2021-05-28T05:53:39.000Z | 2022-03-12T01:05:21.000Z | msize.py | chefpr7/Try-First | efaf7636cc0ff06dcec70ee300462d931c4e9d5c | [
"MIT"
] | 9 | 2021-05-20T09:05:57.000Z | 2022-02-17T04:38:47.000Z | import cv2
from math import sqrt
import numpy as np
from parser import get
def pose_parse(file_path):
MODE = "COCO"
protoFile = "./pose_deploy_linevec.prototxt"
weightsFile = "./pose_iter_440000.caffemodel"
nPoints = 18
POSE_PAIRS = [ [1,0],[1,2],[1,5],[2,3],[3,4],[5,6],[6,7],[1,8],[8,9],[9,10],[1,... | 26.530516 | 172 | 0.470359 |
b3fd92eb299e5d401471f6e0359f893af93f2f69 | 11,296 | py | Python | tools/aquery_differ/aquery_differ_v2.py | zhengwei143/bazel | 90e3bb9cca56a379c9f3524bc7fdb66558baab79 | [
"Apache-2.0"
] | 2 | 2022-03-20T05:04:46.000Z | 2022-03-20T05:05:40.000Z | tools/aquery_differ/aquery_differ_v2.py | zhengwei143/bazel | 90e3bb9cca56a379c9f3524bc7fdb66558baab79 | [
"Apache-2.0"
] | 1 | 2021-01-01T19:12:37.000Z | 2021-01-02T12:26:27.000Z | tools/aquery_differ/aquery_differ_v2.py | zhengwei143/bazel | 90e3bb9cca56a379c9f3524bc7fdb66558baab79 | [
"Apache-2.0"
] | 1 | 2020-11-03T04:46:04.000Z | 2020-11-03T04:46:04.000Z | # Lint as: python2, python3
# Copyright 2020 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
#
# Unle... | 36.794788 | 98 | 0.729108 |
9b42d2b0fc978c57d23fbb30cd47a3b92a4ac8e3 | 8,245 | py | Python | train.py | huzuohuyou/cnn-text-classification-tf | 8ef64a5ad937444ac56e8195fe3a8e039da5d240 | [
"Apache-2.0"
] | null | null | null | train.py | huzuohuyou/cnn-text-classification-tf | 8ef64a5ad937444ac56e8195fe3a8e039da5d240 | [
"Apache-2.0"
] | null | null | null | train.py | huzuohuyou/cnn-text-classification-tf | 8ef64a5ad937444ac56e8195fe3a8e039da5d240 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
import tensorflow as tf
import numpy as np
import os
import time
import datetime
import data_helpers
from text_cnn import TextCNN
from tensorflow.contrib import learn
# Parameters
# ==================================================
# Data loading params
tf.flags.DEFINE_float("dev_sample_perce... | 43.624339 | 124 | 0.661249 |
6452393409d253fffb3ef9edbf74ddd171fd11c5 | 891 | py | Python | district_info/migrations/0003_auto_20200413_1218.py | Shovon588/corona-info | e4ac5b79239b31842e8ed6c7b38a95caecadfc43 | [
"MIT"
] | null | null | null | district_info/migrations/0003_auto_20200413_1218.py | Shovon588/corona-info | e4ac5b79239b31842e8ed6c7b38a95caecadfc43 | [
"MIT"
] | 5 | 2021-03-19T01:55:54.000Z | 2021-09-22T18:53:08.000Z | district_info/migrations/0003_auto_20200413_1218.py | Shovon588/corona-info | e4ac5b79239b31842e8ed6c7b38a95caecadfc43 | [
"MIT"
] | null | null | null | # Generated by Django 3.0.4 on 2020-04-13 06:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('district_info', '0002_totalinfo'),
]
operations = [
migrations.AlterField(
model_name='caseinfo',
name='cases',
... | 26.205882 | 57 | 0.573513 |
0db3dc8ba95e100845fd84bf4b1994dabd144c99 | 4,229 | py | Python | anki_vector/opengl/__init__.py | Johnnydaszhu/vector-python-sdk | 8086ab128dcd0819e3e3e8a64a95552ceb9ae0ca | [
"Apache-2.0"
] | 1 | 2019-01-24T13:49:00.000Z | 2019-01-24T13:49:00.000Z | anki_vector/opengl/__init__.py | Johnnydaszhu/vector-python-sdk | 8086ab128dcd0819e3e3e8a64a95552ceb9ae0ca | [
"Apache-2.0"
] | null | null | null | anki_vector/opengl/__init__.py | Johnnydaszhu/vector-python-sdk | 8086ab128dcd0819e3e3e8a64a95552ceb9ae0ca | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 Anki, 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 in the file LICENSE.txt or at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 41.871287 | 112 | 0.663277 |
3c901874624c849a6bded3860ec3bba9f5d3d0e4 | 3,165 | py | Python | tests/integration/modules/test_config.py | fake-name/salt | d8f04936e4407f51946e32e8166159778f6c31a5 | [
"Apache-2.0"
] | 1 | 2021-09-06T00:14:04.000Z | 2021-09-06T00:14:04.000Z | tests/integration/modules/test_config.py | fake-name/salt | d8f04936e4407f51946e32e8166159778f6c31a5 | [
"Apache-2.0"
] | 2 | 2021-04-30T21:17:57.000Z | 2021-12-13T20:40:23.000Z | tests/integration/modules/test_config.py | fake-name/salt | d8f04936e4407f51946e32e8166159778f6c31a5 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Validate the config system
"""
from __future__ import absolute_import
import pytest
from tests.support.case import ModuleCase
from tests.support.unit import skipIf
@pytest.mark.windows_whitelisted
class ConfigTest(ModuleCase):
"""
Test config routines
"""
@skipIf(True, "... | 38.13253 | 87 | 0.62812 |
f716eee3eb58697b715967ba75f76f3d236c3384 | 3,353 | py | Python | minigrid_basics/examples/rw_four_directions.py | dumpmemory/google-research | bc87d010ab9086b6e92c3f075410fa6e1f27251b | [
"Apache-2.0"
] | null | null | null | minigrid_basics/examples/rw_four_directions.py | dumpmemory/google-research | bc87d010ab9086b6e92c3f075410fa6e1f27251b | [
"Apache-2.0"
] | null | null | null | minigrid_basics/examples/rw_four_directions.py | dumpmemory/google-research | bc87d010ab9086b6e92c3f075410fa6e1f27251b | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2022 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | 31.632075 | 92 | 0.737548 |
7af1cbb8ca3461575452971173f7d03c09c7a421 | 43,887 | py | Python | chia/consensus/blockchain.py | Starcoder0x/chia-blockchain | 5b2f5772780d0370f76b0134db6a7fdc7af42862 | [
"Apache-2.0"
] | 1 | 2022-03-20T14:52:23.000Z | 2022-03-20T14:52:23.000Z | chia/consensus/blockchain.py | zcomputerwiz/experiments-blockchain | 841754b44494451a9e3e537575eeec431fe533d1 | [
"Apache-2.0"
] | 3 | 2022-03-21T22:00:11.000Z | 2022-03-21T22:00:40.000Z | chia/consensus/blockchain.py | zcomputerwiz/experiments-blockchain | 841754b44494451a9e3e537575eeec431fe533d1 | [
"Apache-2.0"
] | 1 | 2022-03-20T14:51:39.000Z | 2022-03-20T14:51:39.000Z | import asyncio
import dataclasses
import logging
import multiprocessing
import traceback
from concurrent.futures.process import ProcessPoolExecutor
from enum import Enum
from multiprocessing.context import BaseContext
from pathlib import Path
from typing import Dict, List, Optional, Set, Tuple
from clvm.casts import i... | 45.525934 | 120 | 0.635245 |
1b7d7f23ed51892d5d963e44d8a40d42147743a0 | 4,388 | py | Python | django/contrib/gis/geos/point.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | 3 | 2016-07-08T23:49:32.000Z | 2018-04-15T22:55:01.000Z | django/contrib/gis/geos/point.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | 27 | 2017-02-05T15:57:04.000Z | 2018-04-15T22:57:26.000Z | django/contrib/gis/geos/point.py | egenerat/gae-django | f12379483cf3917ed3cb46ca5ff0b94daf89fc50 | [
"MIT"
] | null | null | null | from ctypes import c_uint
from django.contrib.gis.geos.error import GEOSException
from django.contrib.gis.geos.geometry import GEOSGeometry
from django.contrib.gis.geos import prototypes as capi
class Point(GEOSGeometry):
_minlength = 2
_maxlength = 3
def __init__(self, x, y=None, z=None, srid=No... | 32.264706 | 88 | 0.563355 |
bca9932734a77534ec6ab840c658fb894b65a76d | 1,501 | py | Python | setup.py | usnistgov/VTSG | f4477a78ec19f7e9757da0321cb5a69428e358cf | [
"MIT"
] | null | null | null | setup.py | usnistgov/VTSG | f4477a78ec19f7e9757da0321cb5a69428e358cf | [
"MIT"
] | 1 | 2022-01-31T22:22:55.000Z | 2022-01-31T22:22:55.000Z | setup.py | usnistgov/VTSG | f4477a78ec19f7e9757da0321cb5a69428e358cf | [
"MIT"
] | null | null | null | # *modified "Tue Feb 15 09:02:23 2022" *by "Paul E. Black"
import os
from setuptools import setup
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ... | 34.906977 | 102 | 0.696869 |
67fc679bb8b7b3ad3459eea1031754fc096d73e5 | 138,443 | py | Python | tests/helpers/test_event.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 3 | 2021-11-22T22:37:43.000Z | 2022-03-17T00:55:28.000Z | tests/helpers/test_event.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 14 | 2022-01-13T04:27:21.000Z | 2022-03-06T20:30:43.000Z | tests/helpers/test_event.py | MrDelik/core | 93a66cc357b226389967668441000498a10453bb | [
"Apache-2.0"
] | 3 | 2022-01-02T18:49:54.000Z | 2022-01-25T02:03:54.000Z | """Test event helpers."""
# pylint: disable=protected-access
import asyncio
from datetime import date, datetime, timedelta
from unittest.mock import patch
from astral import LocationInfo
import astral.sun
import jinja2
import pytest
from homeassistant.components import sun
from homeassistant.const import MATCH_ALL
im... | 32.069261 | 117 | 0.664143 |
d2ccbcc3c9f87b60bd7874b7d9a7ed955545dcac | 6,677 | py | Python | main.py | valord577/auto_add_wechat_friends_py | e612e277a7cf0951dd779adbb58bea48f1397c21 | [
"Apache-2.0"
] | 124 | 2018-11-06T07:29:01.000Z | 2021-12-22T06:51:45.000Z | main.py | AllureLo/auto_add_wechat_friends_py | e612e277a7cf0951dd779adbb58bea48f1397c21 | [
"Apache-2.0"
] | 8 | 2018-11-10T08:02:15.000Z | 2022-03-14T12:41:00.000Z | main.py | AllureLo/auto_add_wechat_friends_py | e612e277a7cf0951dd779adbb58bea48f1397c21 | [
"Apache-2.0"
] | 42 | 2018-11-06T07:57:20.000Z | 2022-03-07T07:39:43.000Z | #!/usr/local/bin/python
# -*- coding:utf-8 -*-
"""
@author: valor
@file: main.py
@time: 2018/11/5 15:59
"""
import time
from adb import By
from adb import Adb
import file
class Main:
def __init__(self, port=None, device=None):
self._adb = Adb(port, device)
# 用于查找失败三次时 程序暂停半小时
self._f... | 32.100962 | 101 | 0.50996 |
f2862b5b035b8721de31d8aeca4f7e36c390c7db | 75,539 | py | Python | nuitka/tree/ComplexCallHelperFunctions.py | sthagen/Nuitka-Nuitka | 023dc76eeafd9c53ee2a51931474ddd98a3ba083 | [
"Apache-2.0"
] | null | null | null | nuitka/tree/ComplexCallHelperFunctions.py | sthagen/Nuitka-Nuitka | 023dc76eeafd9c53ee2a51931474ddd98a3ba083 | [
"Apache-2.0"
] | null | null | null | nuitka/tree/ComplexCallHelperFunctions.py | sthagen/Nuitka-Nuitka | 023dc76eeafd9c53ee2a51931474ddd98a3ba083 | [
"Apache-2.0"
] | null | null | null | # Copyright 2022, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | 35.036642 | 93 | 0.583672 |
807ac0916bf1a651541dc440dff3ad6d472d1cbb | 8,760 | py | Python | vk/session.py | ashvardanian/PyScrapeVk | f47757ba9eec08dfb3ad44708eeb3e5b5aa35e24 | [
"MIT"
] | 1 | 2020-04-15T19:38:17.000Z | 2020-04-15T19:38:17.000Z | vk/session.py | ashvardanian/PyScrapeVk | f47757ba9eec08dfb3ad44708eeb3e5b5aa35e24 | [
"MIT"
] | null | null | null | vk/session.py | ashvardanian/PyScrapeVk | f47757ba9eec08dfb3ad44708eeb3e5b5aa35e24 | [
"MIT"
] | null | null | null | import re
import urllib
import logging
from abc import abstractmethod
import requests
from .exceptions import VkAuthError, VkAPIError
from .exceptions import CAPTCHA_IS_NEEDED as CAPTCHA_IS_NEEDED
from .exceptions import ACCESS_DENIED as ACCESS_DENIED
from .api import APINamespace
from .utils import json_iter_parse, ... | 33.692308 | 113 | 0.634589 |
d86358a3cada88d531b0e4c9d3f7ffe12ce7e596 | 7,367 | py | Python | ec2rlcore/programversion.py | ketanbhut/aws-ec2rescue-linux | 3a4c096f31005ea3b3c36bd8e6f840d457ccc937 | [
"Apache-2.0"
] | null | null | null | ec2rlcore/programversion.py | ketanbhut/aws-ec2rescue-linux | 3a4c096f31005ea3b3c36bd8e6f840d457ccc937 | [
"Apache-2.0"
] | null | null | null | ec2rlcore/programversion.py | ketanbhut/aws-ec2rescue-linux | 3a4c096f31005ea3b3c36bd8e6f840d457ccc937 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016-2018 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
#
# or in the "license" f... | 44.648485 | 120 | 0.628478 |
41e4871aaed7e8c72fd67d9cb0161ef240bbca69 | 3,081 | py | Python | tests/MyTestCase.py | mribrgr/StuRa-Mitgliederdatenbank | 87a261d66c279ff86056e315b05e6966b79df9fa | [
"MIT"
] | 8 | 2019-11-26T13:34:46.000Z | 2021-06-21T13:41:57.000Z | src/tests/MyTestCase.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 93 | 2019-12-16T09:29:10.000Z | 2021-04-24T12:03:33.000Z | src/tests/MyTestCase.py | Sumarbrander/Stura-Mitgliederdatenbank | 691dbd33683b2c2d408efe7a3eb28e083ebcd62a | [
"MIT"
] | 2 | 2020-12-03T12:43:19.000Z | 2020-12-22T21:48:47.000Z | import csv
from platform import system
from selenium import webdriver
from django.contrib.auth import get_user_model
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from aemter.models import Funktion, Unterbereich, Organisationseinheit
import importscripts.main as imp
class MyTestCase(StaticL... | 33.857143 | 92 | 0.605972 |
72a632c8adf92ea637f8cf8bea4689960dc36fd2 | 6,019 | py | Python | designate/context.py | Woody89/designate-private | 0a6ed5a1d7cdac5cb1e9dec8fd3ddfb9a77c58f5 | [
"Apache-2.0"
] | null | null | null | designate/context.py | Woody89/designate-private | 0a6ed5a1d7cdac5cb1e9dec8fd3ddfb9a77c58f5 | [
"Apache-2.0"
] | null | null | null | designate/context.py | Woody89/designate-private | 0a6ed5a1d7cdac5cb1e9dec8fd3ddfb9a77c58f5 | [
"Apache-2.0"
] | 1 | 2019-11-16T10:55:49.000Z | 2019-11-16T10:55:49.000Z | # Copyright 2012 Managed I.T.
#
# Author: Kiall Mac Innes <kiall@managedit.ie>
#
# 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 r... | 29.79703 | 79 | 0.629839 |
bc933805857fcf886ad7b3b093c08fbd44d82755 | 60 | py | Python | src/practice/20_framework/rl/types/__init__.py | djjh/reinforcement-learning-labs | 22706dab9e7f16e364ee4ed79c0bd67a343e5b08 | [
"MIT"
] | 1 | 2019-10-06T11:45:52.000Z | 2019-10-06T11:45:52.000Z | src/practice/20_framework/rl/types/__init__.py | djjh/reinforcement-learning-labs | 22706dab9e7f16e364ee4ed79c0bd67a343e5b08 | [
"MIT"
] | null | null | null | src/practice/20_framework/rl/types/__init__.py | djjh/reinforcement-learning-labs | 22706dab9e7f16e364ee4ed79c0bd67a343e5b08 | [
"MIT"
] | null | null | null | from .episode import Episode
from .episodes import Episodes
| 20 | 30 | 0.833333 |
87a8e6b17ad85194a0e8096d489e0eb6d85f0acb | 2,325 | py | Python | maupassant/tensorflow_helper/layers_helper.py | Jwuthri/TextToolKit | 5feb87f9818932cf2f67b404a9a088b785ec5287 | [
"MIT"
] | 2 | 2021-01-14T13:56:36.000Z | 2021-01-14T18:41:43.000Z | maupassant/tensorflow_helper/layers_helper.py | Jwuthri/TextToolKit | 5feb87f9818932cf2f67b404a9a088b785ec5287 | [
"MIT"
] | 4 | 2020-03-25T18:07:29.000Z | 2022-02-09T23:40:14.000Z | maupassant/tensorflow_helper/layers_helper.py | Jwuthri/TextToolKit | 5feb87f9818932cf2f67b404a9a088b785ec5287 | [
"MIT"
] | null | null | null | import tensorflow as tf
def text_to_layer(block, unit, return_sequences=False):
"""Build tensorflow layer, easily."""
layer = None
if block == "CNN":
layer = tf.keras.layers.Conv1D(unit, kernel_size=1, strides=1, padding='same', activation='relu')
elif block == "LCNN":
layer = tf.keras... | 48.4375 | 132 | 0.683441 |
f1404eaaeb32786c9b0abc7f9896fe843a9e8d22 | 12,356 | py | Python | great_expectations/data_context/types/resource_identifiers.py | MajorDaxx/great_expectations | 5c4aad62292a0f83316960c54250d9ceeb89d5a8 | [
"Apache-2.0"
] | 1 | 2022-03-16T22:09:49.000Z | 2022-03-16T22:09:49.000Z | great_expectations/data_context/types/resource_identifiers.py | draev/great_expectations | 317e15ee7e50f6e0d537b62154177440f33b795d | [
"Apache-2.0"
] | null | null | null | great_expectations/data_context/types/resource_identifiers.py | draev/great_expectations | 317e15ee7e50f6e0d537b62154177440f33b795d | [
"Apache-2.0"
] | null | null | null | import logging
import warnings
from typing import Optional, Union
from uuid import UUID
from dateutil.parser import parse
from great_expectations.core.data_context_key import DataContextKey
from great_expectations.core.id_dict import BatchKwargs, IDDict
from great_expectations.core.run_identifier import RunIdentifier... | 33.394595 | 118 | 0.670282 |
cf610b34a2a5b2c0f9952c7261b8ea3e71a49096 | 1,404 | py | Python | geetools/collection/group.py | carderne/gee_tools | 4003e75ffb0ffefc9f41b1a34d849eebdb486161 | [
"MIT"
] | 1 | 2019-10-22T10:11:52.000Z | 2019-10-22T10:11:52.000Z | geetools/collection/group.py | carderne/gee_tools | 4003e75ffb0ffefc9f41b1a34d849eebdb486161 | [
"MIT"
] | null | null | null | geetools/collection/group.py | carderne/gee_tools | 4003e75ffb0ffefc9f41b1a34d849eebdb486161 | [
"MIT"
] | 1 | 2020-01-09T07:41:04.000Z | 2020-01-09T07:41:04.000Z | # coding=utf-8
""" Group of collections """
from . import getCommonBands, rescale
from datetime import date
class CollectionGroup(object):
def __init__(self, *args):
self.collections = args
@property
def ids(self):
return [col.id for col in self.collections]
def commonBands(self, refe... | 33.428571 | 77 | 0.597578 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.