hexsha
stringlengths
40
40
size
int64
2
1.02M
ext
stringclasses
10 values
lang
stringclasses
1 value
max_stars_repo_path
stringlengths
4
245
max_stars_repo_name
stringlengths
6
130
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
245
max_issues_repo_name
stringlengths
6
130
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
245
max_forks_repo_name
stringlengths
6
130
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
2
1.02M
avg_line_length
float64
1
958k
max_line_length
int64
1
987k
alphanum_fraction
float64
0
1
content_no_comment
stringlengths
0
1.01M
is_comment_constant_removed
bool
2 classes
is_sharp_comment_removed
bool
1 class
1c05f95a47766fcdc41fdf7bca7a05aad5974b2f
2,774
py
Python
tasks/transaction_queue.py
paw-digital/graham_discord_bot
51027f9cbff65a4edfddacb724c5b54d0dac96af
[ "MIT" ]
null
null
null
tasks/transaction_queue.py
paw-digital/graham_discord_bot
51027f9cbff65a4edfddacb724c5b54d0dac96af
[ "MIT" ]
null
null
null
tasks/transaction_queue.py
paw-digital/graham_discord_bot
51027f9cbff65a4edfddacb724c5b54d0dac96af
[ "MIT" ]
null
null
null
import asyncio import logging from discord.ext.commands import Bot from db.models.transaction import Transaction from util.env import Env class TransactionQueue(object): _instance = None def __init__(self): raise RuntimeError('Call instance() instead') @classmethod def instance(cls, bot: Bot...
36.5
125
0.581831
import asyncio import logging from discord.ext.commands import Bot from db.models.transaction import Transaction from util.env import Env class TransactionQueue(object): _instance = None def __init__(self): raise RuntimeError('Call instance() instead') @classmethod def instance(cls, bot: Bot...
true
true
1c05f9d657e8f71e0c732da88a76cc665677e8f1
1,499
py
Python
web/api/v1/newsfeed/mixins.py
mehrdad-shokri/arguman.org
b02e5f50f85964180c02f353c1d0aa84ee6d20dd
[ "MIT" ]
1
2021-07-07T11:01:04.000Z
2021-07-07T11:01:04.000Z
web/api/v1/newsfeed/mixins.py
mehrdad-shokri/arguman.org
b02e5f50f85964180c02f353c1d0aa84ee6d20dd
[ "MIT" ]
null
null
null
web/api/v1/newsfeed/mixins.py
mehrdad-shokri/arguman.org
b02e5f50f85964180c02f353c1d0aa84ee6d20dd
[ "MIT" ]
null
null
null
from rest_framework.templatetags.rest_framework import replace_query_param from premises.utils import int_or_default class MongoDBPaginationMixin(object): """ Query parameters: :param page (integer) :param limit (integer) For example: http://arguman.org/api/v1/newsfeed/public/?page=1 http...
29.392157
79
0.631755
from rest_framework.templatetags.rest_framework import replace_query_param from premises.utils import int_or_default class MongoDBPaginationMixin(object): page_query_param = 'page' limit_query_param = 'limit' def get_page(self): return int_or_default(self.request.GET.get(self.page_query_param), 1...
true
true
1c05fa08499d8f375ac933c24dcc772cd404ee3a
786
py
Python
Clipman.py
kamushadenes/ulauncher-clipboard
5d7f07e9b69e04a08476d7021855c013aac9d9e4
[ "MIT" ]
null
null
null
Clipman.py
kamushadenes/ulauncher-clipboard
5d7f07e9b69e04a08476d7021855c013aac9d9e4
[ "MIT" ]
null
null
null
Clipman.py
kamushadenes/ulauncher-clipboard
5d7f07e9b69e04a08476d7021855c013aac9d9e4
[ "MIT" ]
null
null
null
import os import subprocess from lib import logger, execGet, findExec, pidOf name = "Clipman" client = "clipman" def canStart(): return bool(findExec(client)) def isRunning(): return bool(pidOf("wl-paste")) def isEnabled(): return canStart() and isRunning() def start(): pass # subprocess.c...
20.153846
94
0.657761
import os import subprocess from lib import logger, execGet, findExec, pidOf name = "Clipman" client = "clipman" def canStart(): return bool(findExec(client)) def isRunning(): return bool(pidOf("wl-paste")) def isEnabled(): return canStart() and isRunning() def start(): pass def add(text...
true
true
1c05fdeb8d91a837c05819d619506da33aa9cd00
1,133
py
Python
supervised_ml_dashboard/src/main.py
py3lee/projects
5c1631fcf0904a45682e726f4f8638354776ed6d
[ "MIT" ]
null
null
null
supervised_ml_dashboard/src/main.py
py3lee/projects
5c1631fcf0904a45682e726f4f8638354776ed6d
[ "MIT" ]
null
null
null
supervised_ml_dashboard/src/main.py
py3lee/projects
5c1631fcf0904a45682e726f4f8638354776ed6d
[ "MIT" ]
null
null
null
########## # Built-in ########## from pathlib import Path import sys ########### # Custom ########## from preprocess.custom_ingestor import CustomIngestor from preprocess.custom_preprocessor import CustomPreprocessor from utils.utils import create_logger, launch_dashboard ################ # CONFIGURATIONS ###########...
24.630435
105
0.677846
from pathlib import Path import sys from preprocess.custom_ingestor import CustomIngestor from preprocess.custom_preprocessor import CustomPreprocessor from utils.utils import create_logger, launch_dashboard cfg_path = Path(__file__).parents[1] / 'config' sys.path.insert(0, str(cfg_path)) import config as cfg def ...
true
true
1c05fe67b7da9cdbc1c456b7b79107975eb24d25
100
py
Python
light_head_rcnn/links/model/utils/__init__.py
knorth55/chainer-light-head-rcnn
4408311384d5abe550cd6ad004fa190aaced2c95
[ "MIT" ]
17
2018-07-13T12:37:29.000Z
2019-03-25T10:10:23.000Z
light_head_rcnn/links/model/utils/__init__.py
knorth55/chainer-light-head-rcnn
4408311384d5abe550cd6ad004fa190aaced2c95
[ "MIT" ]
9
2018-07-19T09:59:00.000Z
2020-07-01T01:14:17.000Z
light_head_rcnn/links/model/utils/__init__.py
knorth55/chainer-light-head-rcnn
4408311384d5abe550cd6ad004fa190aaced2c95
[ "MIT" ]
1
2019-09-06T07:11:01.000Z
2019-09-06T07:11:01.000Z
from light_head_rcnn.links.model.utils.proposal_target_creator import ProposalTargetCreator # NOQA
50
99
0.88
from light_head_rcnn.links.model.utils.proposal_target_creator import ProposalTargetCreator
true
true
1c05fe90bb777f22d4b21f63c636581d14b938f1
9,617
py
Python
Hashtable.py
SpyEyeFamily/DarkSouL_ReaCt0r
8cde5e03b2120237a345a92b20208efb287b6591
[ "Unlicense" ]
1
2022-02-19T20:44:04.000Z
2022-02-19T20:44:04.000Z
Hashtable.py
SpyEyeFamily/DarkSouL_ReaCt0r
8cde5e03b2120237a345a92b20208efb287b6591
[ "Unlicense" ]
null
null
null
Hashtable.py
SpyEyeFamily/DarkSouL_ReaCt0r
8cde5e03b2120237a345a92b20208efb287b6591
[ "Unlicense" ]
null
null
null
#! /usr/bin/env python ########################### # Copyrights Please # ########################### ########################### # My Original Code # ########################### # WhoAmi : #https://www.facebook.com/Gods.nd.kings #https://www.facebook.com/clayteamwhoami """ Examples: -) Make a single Re...
32.489865
199
0.557346
import socket import sys, os import sys import math import urllib import string import time import urlparse import argparse import ssl import random import itertools def main(): parser = argparse.ArgumentParser(description="| Take down a remote PHP Host |" ...
true
true
1c05ff21ca159164091e767acedf3c040be74a8d
1,991
py
Python
obsidian/stats.py
jottew/obsidian.py
92bf424ae95ece9b71bde61f023c95924a78fc7f
[ "MIT" ]
11
2021-06-18T02:49:48.000Z
2021-07-23T04:27:12.000Z
obsidian/stats.py
jottew/obsidian.py
92bf424ae95ece9b71bde61f023c95924a78fc7f
[ "MIT" ]
18
2021-06-22T17:17:27.000Z
2021-08-05T08:17:18.000Z
obsidian/stats.py
jottew/obsidian.py
92bf424ae95ece9b71bde61f023c95924a78fc7f
[ "MIT" ]
6
2021-06-23T03:38:34.000Z
2021-07-13T13:01:34.000Z
from typing import Any, Dict __all__: tuple = ( 'Stats', ) class Stats: """ Stats of a Obsidian node. """ __slots__: tuple = ( 'heap_used_init', 'heap_used_max', 'heap_used_committed', 'heap_used_used', 'non_heap_used_init', 'non_heap_used_max', ...
30.630769
97
0.623807
from typing import Any, Dict __all__: tuple = ( 'Stats', ) class Stats: __slots__: tuple = ( 'heap_used_init', 'heap_used_max', 'heap_used_committed', 'heap_used_used', 'non_heap_used_init', 'non_heap_used_max', 'non_heap_used_committed', 'non_...
true
true
1c0600a022790f458cd1eeb8d56fb2098149cff3
266
py
Python
backend/api/migrations/0042_merge_20211011_1016.py
kukiamarilla/polijira
510dbc1473db973ac71fc68fa5a9b758b90a780b
[ "MIT" ]
1
2022-03-02T02:28:49.000Z
2022-03-02T02:28:49.000Z
backend/api/migrations/0042_merge_20211011_1016.py
kukiamarilla/polijira
510dbc1473db973ac71fc68fa5a9b758b90a780b
[ "MIT" ]
22
2021-09-01T17:44:25.000Z
2021-10-07T19:39:09.000Z
backend/api/migrations/0042_merge_20211011_1016.py
kukiamarilla/polijira
510dbc1473db973ac71fc68fa5a9b758b90a780b
[ "MIT" ]
null
null
null
# Generated by Django 2.1.4 on 2021-10-11 10:16 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('api', '0036_userstory_proyecto'), ('api', '0041_merge_20211009_0251'), ] operations = [ ]
17.733333
47
0.639098
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('api', '0036_userstory_proyecto'), ('api', '0041_merge_20211009_0251'), ] operations = [ ]
true
true
1c0600daed121325593c2b840c862bd773fc3f7a
2,321
py
Python
pytest-embedded-arduino/pytest_embedded_arduino/app.py
espressif/pytest-embedded
14077e64d3dfa74c03dcbcd1775fc994ba3e4928
[ "MIT" ]
12
2021-06-07T11:39:30.000Z
2022-03-07T18:42:04.000Z
pytest-embedded-arduino/pytest_embedded_arduino/app.py
espressif/pytest-embedded
14077e64d3dfa74c03dcbcd1775fc994ba3e4928
[ "MIT" ]
30
2021-08-10T10:27:41.000Z
2022-03-25T08:08:29.000Z
pytest-embedded-arduino/pytest_embedded_arduino/app.py
espressif/pytest-embedded
14077e64d3dfa74c03dcbcd1775fc994ba3e4928
[ "MIT" ]
6
2021-11-16T13:10:45.000Z
2022-03-31T10:51:29.000Z
import json import os from typing import List, Optional, Tuple from pytest_embedded.app import App class ArduinoApp(App): """ Arduino App class Attributes: app_path (str): Application path. build_dir (str): Build directory. sketch (str): Sketch name. fqbn (str): Fully Qua...
36.265625
120
0.619561
import json import os from typing import List, Optional, Tuple from pytest_embedded.app import App class ArduinoApp(App): flash_settings = {'flash_mode': 'dio', 'flash_size': 'detect', 'flash_freq': '80m'} binary_offsets = { 'esp32': [0x1000, 0x8000, 0x10000], 'esp32s2': [0x1000, 0x8000, 0x1...
true
true
1c06010f4eb1ddbc9705e50783c10e68d9c0bdc9
13,592
py
Python
Lib/site-packages/git/test/lib/helper.py
nemarugommula/ecommerce
60185e79655fbaf0fcad9e877a886fe9eb3c4451
[ "bzip2-1.0.6" ]
5
2019-08-14T07:24:10.000Z
2020-04-15T11:47:48.000Z
Lib/site-packages/git/test/lib/helper.py
nemarugommula/ecommerce
60185e79655fbaf0fcad9e877a886fe9eb3c4451
[ "bzip2-1.0.6" ]
10
2017-05-10T08:10:23.000Z
2020-03-23T10:23:37.000Z
Lib/site-packages/git/test/lib/helper.py
nemarugommula/ecommerce
60185e79655fbaf0fcad9e877a886fe9eb3c4451
[ "bzip2-1.0.6" ]
38
2017-04-26T14:13:37.000Z
2021-06-24T11:36:38.000Z
# helper.py # Copyright (C) 2008, 2009 Michael Trier (mtrier@gmail.com) and contributors # # This module is part of GitPython and is released under # the BSD License: http://www.opensource.org/licenses/bsd-license.php from __future__ import print_function import contextlib from functools import wraps import gc import ...
35.581152
115
0.594614
from __future__ import print_function import contextlib from functools import wraps import gc import io import logging import os import sys import tempfile import textwrap import time import unittest from git.compat import string_types, is_win from git.util import rmtree, cwd import gitdb import os.path as osp Tes...
true
true
1c0601f8cb58182700bb8f8c709f84611849f038
38,530
py
Python
jax/experimental/jax2tf/tests/jax2tf_test.py
ROCmSoftwarePlatform/jax
be34a14dc40384ac8876fad2b23b5e205ccfe22e
[ "Apache-2.0" ]
7
2020-12-04T16:54:54.000Z
2022-02-15T07:26:56.000Z
jax/experimental/jax2tf/tests/jax2tf_test.py
ROCmSoftwarePlatform/jax
be34a14dc40384ac8876fad2b23b5e205ccfe22e
[ "Apache-2.0" ]
20
2021-08-17T20:31:56.000Z
2022-03-31T11:56:24.000Z
jax/experimental/jax2tf/tests/jax2tf_test.py
ROCmSoftwarePlatform/jax
be34a14dc40384ac8876fad2b23b5e205ccfe22e
[ "Apache-2.0" ]
null
null
null
# Copyright 2020 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
37.663734
122
0.627044
import re from typing import Dict, Tuple from absl.testing import absltest from absl.testing import parameterized import jax from jax import dtypes from jax import lax from jax import numpy as jnp from jax import test_util as jtu from jax.config import config from jax.experimental import jax2tf from jax.experimental...
true
true
1c06045afe3535e85231c4b753917ca361fe86e2
7,807
py
Python
.buildbot/jenkins-cleanup-build-states.py
juan561999/Onnx-mlir
f8554660dd98b5bb911320aa4f22823573c9b0fb
[ "Apache-2.0" ]
272
2020-02-20T06:19:18.000Z
2022-03-29T05:34:22.000Z
.buildbot/jenkins-cleanup-build-states.py
AlexandreEichenberger/onnx-mlir
61dee0a93dd8dab95261cecdd0337d748bbfa374
[ "Apache-2.0" ]
1,107
2020-02-29T00:22:00.000Z
2022-03-31T23:50:22.000Z
.buildbot/jenkins-cleanup-build-states.py
AlexandreEichenberger/onnx-mlir
61dee0a93dd8dab95261cecdd0337d748bbfa374
[ "Apache-2.0" ]
157
2020-02-27T18:20:36.000Z
2022-03-30T20:34:57.000Z
#!/usr/bin/env python3 import docker import glob import logging import os import sys logging.basicConfig( level = logging.INFO, format = '[%(asctime)s] %(levelname)s: %(message)s') docker_daemon_socket = os.getenv('DOCKER_DAEMON_SOCKET') docker_registry_host_name = os.getenv('DOCKER_REGISTRY_HOST_NAME') doc...
48.191358
90
0.610862
import docker import glob import logging import os import sys logging.basicConfig( level = logging.INFO, format = '[%(asctime)s] %(levelname)s: %(message)s') docker_daemon_socket = os.getenv('DOCKER_DAEMON_SOCKET') docker_registry_host_name = os.getenv('DOCKER_REGISTRY_HOST_NAME') docker_registry_user_name ...
true
true
1c0604b147d017d064654949cd8c054c7a34f124
1,081
py
Python
obj_handling/operations.py
BMaxV/obj_handling
20f448f09fdadce24414efcb5cc71e3678920ed9
[ "MIT" ]
null
null
null
obj_handling/operations.py
BMaxV/obj_handling
20f448f09fdadce24414efcb5cc71e3678920ed9
[ "MIT" ]
null
null
null
obj_handling/operations.py
BMaxV/obj_handling
20f448f09fdadce24414efcb5cc71e3678920ed9
[ "MIT" ]
null
null
null
def write(filename,objectname,vertices,faces): with open(filename,"w") as f: if objectname==None: f.write("o "+objectname+"\n") for vert in vertices: f.write("v ") for i in vert: f.write(str(i)+" ") f.write("\n") ...
23
46
0.415356
def write(filename,objectname,vertices,faces): with open(filename,"w") as f: if objectname==None: f.write("o "+objectname+"\n") for vert in vertices: f.write("v ") for i in vert: f.write(str(i)+" ") f.write("\n") ...
true
true
1c0604e971c3ff2742c14979f70b61dc3393b2ae
2,849
py
Python
src/rl/atariwrapper.py
tmoer/a0c
62c4aa793205294d5b3a99d192e9b6311f4d34a6
[ "MIT" ]
5
2021-02-02T03:10:49.000Z
2021-11-25T14:22:29.000Z
src/rl/atariwrapper.py
tmoer/cursus
62c4aa793205294d5b3a99d192e9b6311f4d34a6
[ "MIT" ]
1
2020-05-02T17:29:04.000Z
2020-05-02T17:29:04.000Z
src/rl/atariwrapper.py
tmoer/cursus
62c4aa793205294d5b3a99d192e9b6311f4d34a6
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- """ Atari wrapper, based on https://github.com/openai/baselines/blob/master/baselines/common/atari_wrappers.py @author: thomas """ import gym from gym import spaces from collections import deque import numpy as np from PIL import Image class ClipRewardWrapper(gym.RewardWrapper): def reward(...
35.6125
106
0.587575
import gym from gym import spaces from collections import deque import numpy as np from PIL import Image class ClipRewardWrapper(gym.RewardWrapper): def reward(self, reward): return 0.5 * np.sign(reward) class AtariWrapper(gym.Wrapper): def __init__(self, env, skip=4, k=4,ram=False): gym....
true
true
1c06055568f7608a73b1e77153591acf938e68bd
297
py
Python
2-completed-app/webapp/__init__.py
Azure-Samples/msdocs-azure-data-tables-sdk-python
4e4e56c693538ef12fdde0c197b342372e413536
[ "MIT" ]
null
null
null
2-completed-app/webapp/__init__.py
Azure-Samples/msdocs-azure-data-tables-sdk-python
4e4e56c693538ef12fdde0c197b342372e413536
[ "MIT" ]
1
2022-03-29T09:52:14.000Z
2022-03-30T17:19:52.000Z
1-starter-app/webapp/__init__.py
Azure-Samples/msdocs-azure-data-tables-sdk-python
4e4e56c693538ef12fdde0c197b342372e413536
[ "MIT" ]
2
2022-03-25T09:39:24.000Z
2022-03-25T09:55:11.000Z
# ------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. # -------------------------------------------------------------------------- from webapp.webapp import app __all__ = ["app"]
33
76
0.363636
from webapp.webapp import app __all__ = ["app"]
true
true
1c0606b0b001d372ce7ca6d2b9f10d701e2f564c
4,095
py
Python
tests/test_merge_layer.py
sjuvekar/neon
abe5d30a68663c739a97a9e657516d530c66dbd9
[ "Apache-2.0" ]
null
null
null
tests/test_merge_layer.py
sjuvekar/neon
abe5d30a68663c739a97a9e657516d530c66dbd9
[ "Apache-2.0" ]
4
2021-03-26T00:21:20.000Z
2022-03-12T00:46:11.000Z
tests/test_merge_layer.py
huamichaelchen/neon
abe5d30a68663c739a97a9e657516d530c66dbd9
[ "Apache-2.0" ]
1
2016-08-12T09:05:04.000Z
2016-08-12T09:05:04.000Z
# ---------------------------------------------------------------------------- # Copyright 2015 Nervana Systems Inc. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.o...
37.227273
97
0.669353
import itertools as itt import numpy as np from neon import NervanaObject from neon.initializers.initializer import Uniform from neon.layers import Affine, MergeMultistream, Sequential def pytest_generate_tests(metafunc): fargs = [] eps = np.finfo(np.float32).eps w_rng = [[-1.0, 1.0]] rng_max = [...
true
true
1c0606b489dbb7728c5f4bc2691c0c8536a2db83
8,706
py
Python
homeassistant/components/wemo/switch.py
joopert/home-assistant
a3f6fbb3774004b15c397c0556f98c5f7a59cb22
[ "Apache-2.0" ]
3
2020-10-23T14:39:11.000Z
2021-02-17T14:40:17.000Z
homeassistant/components/wemo/switch.py
joopert/home-assistant
a3f6fbb3774004b15c397c0556f98c5f7a59cb22
[ "Apache-2.0" ]
3
2021-02-08T20:54:46.000Z
2021-09-08T02:30:04.000Z
homeassistant/components/wemo/switch.py
joopert/home-assistant
a3f6fbb3774004b15c397c0556f98c5f7a59cb22
[ "Apache-2.0" ]
4
2020-05-30T08:19:47.000Z
2021-05-14T11:39:19.000Z
"""Support for WeMo switches.""" import asyncio import logging from datetime import datetime, timedelta import async_timeout from pywemo import discovery import requests from homeassistant.components.switch import SwitchDevice from homeassistant.exceptions import PlatformNotReady from homeassistant.util import conver...
34.685259
88
0.632323
import asyncio import logging from datetime import datetime, timedelta import async_timeout from pywemo import discovery import requests from homeassistant.components.switch import SwitchDevice from homeassistant.exceptions import PlatformNotReady from homeassistant.util import convert from homeassistant.const import...
true
true
1c0606e7099727a34a4353c69a714cea307ce1e3
167
py
Python
python/python_backup/PRAC_PYTHON/tu.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
16
2018-11-26T08:39:42.000Z
2019-05-08T10:09:52.000Z
python/python_backup/PRAC_PYTHON/tu.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
8
2020-05-04T06:29:26.000Z
2022-02-12T05:33:16.000Z
python/python_backup/PRAC_PYTHON/tu.py
SayanGhoshBDA/code-backup
8b6135facc0e598e9686b2e8eb2d69dd68198b80
[ "MIT" ]
5
2020-02-11T16:02:21.000Z
2021-02-05T07:48:30.000Z
def tuple(t): maxvalue=t[0] minvalue=t[0] for i in range(t): .if t[i]>maxvalue: max=t[i] if t[i]<minvalue: min=t[i] print max, print mini,
15.181818
21
0.550898
def tuple(t): maxvalue=t[0] minvalue=t[0] for i in range(t): .if t[i]>maxvalue: max=t[i] if t[i]<minvalue: min=t[i] print max, print mini,
false
true
1c06071df44bc474ae1634a9e7b90e54764b920b
1,436
py
Python
python3/leetcodepy/combination_sum_ii.py
qianbinbin/leetcode
915cecab0c940cd13847683ec55b17b77eb0f39b
[ "MIT" ]
4
2018-03-05T02:27:16.000Z
2021-03-15T14:19:44.000Z
python3/leetcodepy/combination_sum_ii.py
qianbinbin/leetcode
915cecab0c940cd13847683ec55b17b77eb0f39b
[ "MIT" ]
null
null
null
python3/leetcodepy/combination_sum_ii.py
qianbinbin/leetcode
915cecab0c940cd13847683ec55b17b77eb0f39b
[ "MIT" ]
2
2018-07-22T10:32:10.000Z
2018-10-20T03:14:28.000Z
""" Given a collection of candidate numbers (candidates) and a target number (target), find all unique combinations in candidates where the candidate numbers sum to target. Each number in candidates may only be used once in the combination. Note: The solution set must not contain duplicate combinations. Example 1:...
23.16129
168
0.584262
from typing import List class Solution1: def combinationSum2(self, candidates: List[int], target: int) -> List[List[int]]: result = [] self.combination_sum(sorted(candidates), 0, target, 0, result, []) return result def combination_sum(self, ordered: List[int], index: int, target: int...
true
true
1c0608712068f58f7a637e0e89a27b58c934e255
44,711
py
Python
salt/states/cmd.py
veym4os/salt
6c238d03f9a3ab983c37a98a65cf6faf4e5af65d
[ "Apache-2.0" ]
null
null
null
salt/states/cmd.py
veym4os/salt
6c238d03f9a3ab983c37a98a65cf6faf4e5af65d
[ "Apache-2.0" ]
null
null
null
salt/states/cmd.py
veym4os/salt
6c238d03f9a3ab983c37a98a65cf6faf4e5af65d
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- ''' Execution of arbitrary commands =============================== The cmd state module manages the enforcement of executed commands, this state can tell a command to run under certain circumstances. A simple example to execute a command: .. code-block:: yaml # Store the current date i...
32.82746
114
0.583861
from __future__ import absolute_import, print_function, unicode_literals import os import copy import logging import salt.utils.args import salt.utils.functools import salt.utils.json from salt.exceptions import CommandExecutionError, SaltRenderError from salt.ext import six log = logging.getLogger(__name__) def ...
true
true
1c0609a898ef062a61b229bd1e92422538261906
9,554
py
Python
libica/openapi/libgds/models/create_file_request.py
umccr-illumina/libica
916d27eea499f29bee590268b84208effb0cc576
[ "MIT" ]
null
null
null
libica/openapi/libgds/models/create_file_request.py
umccr-illumina/libica
916d27eea499f29bee590268b84208effb0cc576
[ "MIT" ]
4
2021-11-15T10:47:51.000Z
2022-02-22T04:43:20.000Z
libica/openapi/libgds/models/create_file_request.py
umccr-illumina/libica
916d27eea499f29bee590268b84208effb0cc576
[ "MIT" ]
null
null
null
# coding: utf-8 """ Genomic Data Store Service No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501 The version of the OpenAPI document: v1 Generated by: https://openapi-generator.tech """ import pprint import re # noqa: F401 imp...
29.578947
188
0.594411
import pprint import re import six from libica.openapi.libgds.configuration import Configuration class CreateFileRequest(object): openapi_types = { 'name': 'str', 'volume_id': 'str', 'folder_path': 'str', 'type': 'str', 'volume_name': 'str', 'format': 'str', ...
true
true
1c060a9761db90aa5c80eafb4cb9e965cffbafee
60,553
py
Python
py_stdlib/os_utils/ipaddr.py
tiradani/py_stdlib
31b20853f6086201a54117192ebb3f361487de0b
[ "MIT" ]
null
null
null
py_stdlib/os_utils/ipaddr.py
tiradani/py_stdlib
31b20853f6086201a54117192ebb3f361487de0b
[ "MIT" ]
null
null
null
py_stdlib/os_utils/ipaddr.py
tiradani/py_stdlib
31b20853f6086201a54117192ebb3f361487de0b
[ "MIT" ]
null
null
null
#!/usr/bin/python # # Copyright 2007 Google Inc. # Licensed to PSF under a Contributor Agreement. # # 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/LICE...
31.903583
80
0.573266
"""A fast, lightweight IPv4/IPv6 manipulation library in Python. This library is used to create/poke/manipulate IPv4 and IPv6 addresses and networks. """ __version__ = '2.1.10' import struct IPV4LENGTH = 32 IPV6LENGTH = 128 class AddressValueError(ValueError): """A Value Error related to the address.""" c...
false
true
1c060acccef40aed6b821861ea959864a35a84cf
8,856
py
Python
python_modules/dagster/dagster/core/definitions/decorators/repository.py
camvogel/dagster
b4df94bf34906e7f81c973a7fdad5429ae3697ba
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/definitions/decorators/repository.py
camvogel/dagster
b4df94bf34906e7f81c973a7fdad5429ae3697ba
[ "Apache-2.0" ]
null
null
null
python_modules/dagster/dagster/core/definitions/decorators/repository.py
camvogel/dagster
b4df94bf34906e7f81c973a7fdad5429ae3697ba
[ "Apache-2.0" ]
1
2021-12-08T18:13:19.000Z
2021-12-08T18:13:19.000Z
from functools import update_wrapper from typing import Any, Callable, Optional, Union from dagster import check from dagster.core.errors import DagsterInvalidDefinitionError from ..graph_definition import GraphDefinition from ..partition import PartitionSetDefinition from ..pipeline_definition import PipelineDefinit...
38.172414
120
0.566734
from functools import update_wrapper from typing import Any, Callable, Optional, Union from dagster import check from dagster.core.errors import DagsterInvalidDefinitionError from ..graph_definition import GraphDefinition from ..partition import PartitionSetDefinition from ..pipeline_definition import PipelineDefinit...
true
true
1c060ae20ba813a1df222624b9eda2462956451d
25,248
py
Python
zaza/utilities/generic.py
arif-ali/zaza
cd0137b26641f2eb2ef5440d3a8dde3eb86e101f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
zaza/utilities/generic.py
arif-ali/zaza
cd0137b26641f2eb2ef5440d3a8dde3eb86e101f
[ "ECL-2.0", "Apache-2.0" ]
null
null
null
zaza/utilities/generic.py
arif-ali/zaza
cd0137b26641f2eb2ef5440d3a8dde3eb86e101f
[ "ECL-2.0", "Apache-2.0" ]
2
2017-12-05T17:22:38.000Z
2019-04-19T17:00:06.000Z
# Copyright 2018 Canonical Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
38.546565
79
0.644328
import logging import os import subprocess import yaml from zaza import model from zaza.utilities import juju as juju_utils from zaza.utilities import exceptions as zaza_exceptions def dict_to_yaml(dict_data): return yaml.dump(dict_data, default_flow_style=False) def get_network_config(net_topology, ignore_e...
true
true
1c060bb9528e16498df2c1ca506eebeef3ad1de3
87
py
Python
portfolio_v2/env_vars.py
BuilderTron/portfolio_v2
d87823f4fbdd201a6b739aa197655602eb22e27f
[ "MIT" ]
null
null
null
portfolio_v2/env_vars.py
BuilderTron/portfolio_v2
d87823f4fbdd201a6b739aa197655602eb22e27f
[ "MIT" ]
9
2021-03-19T01:46:10.000Z
2022-03-12T00:23:17.000Z
portfolio_v2/env_vars.py
BuilderTron/portfolio_v2
d87823f4fbdd201a6b739aa197655602eb22e27f
[ "MIT" ]
null
null
null
import os db_user = os.environ.get('DB_USER') db_password = os.environ.get('DB_PASS')
17.4
39
0.735632
import os db_user = os.environ.get('DB_USER') db_password = os.environ.get('DB_PASS')
true
true
1c060c03f2edb97ac72c770463c0bd88ff9557ee
158
py
Python
004 - Exercicios Listas.py/008 - Uso Sorted str.py
rodrigoviannini/meus_Primeiros_Codigos
828dec1c4ce06889efd491145e631c30a45e858f
[ "MIT" ]
2
2021-07-22T23:26:54.000Z
2021-07-22T23:27:27.000Z
004 - Exercicios Listas.py/008 - Uso Sorted str.py
rodrigoviannini/meus_Primeiros_Codigos
828dec1c4ce06889efd491145e631c30a45e858f
[ "MIT" ]
null
null
null
004 - Exercicios Listas.py/008 - Uso Sorted str.py
rodrigoviannini/meus_Primeiros_Codigos
828dec1c4ce06889efd491145e631c30a45e858f
[ "MIT" ]
null
null
null
# ordenando lista de strings: por ordem alfabética, segundo a tabela ascii lista_strings = ["abacate", "pera", "laranja", "998"] print(sorted(lista_strings))
39.5
74
0.746835
lista_strings = ["abacate", "pera", "laranja", "998"] print(sorted(lista_strings))
true
true
1c060c41f1f7df3c03041f80a9d13bc83f25d302
13,286
py
Python
test/torchaudio_unittest/models/rnnt/rnnt_test_impl.py
LaudateCorpus1/audio
a007e922d34028270197c0549bf452b79499d039
[ "BSD-2-Clause" ]
null
null
null
test/torchaudio_unittest/models/rnnt/rnnt_test_impl.py
LaudateCorpus1/audio
a007e922d34028270197c0549bf452b79499d039
[ "BSD-2-Clause" ]
null
null
null
test/torchaudio_unittest/models/rnnt/rnnt_test_impl.py
LaudateCorpus1/audio
a007e922d34028270197c0549bf452b79499d039
[ "BSD-2-Clause" ]
null
null
null
import torch from torchaudio.models import emformer_rnnt_model from torchaudio_unittest.common_utils import TestBaseMixin, torch_script class RNNTTestImpl(TestBaseMixin): def _get_input_config(self): model_config = self._get_model_config() return { "batch_size": 8, "max_inp...
42.312102
120
0.661975
import torch from torchaudio.models import emformer_rnnt_model from torchaudio_unittest.common_utils import TestBaseMixin, torch_script class RNNTTestImpl(TestBaseMixin): def _get_input_config(self): model_config = self._get_model_config() return { "batch_size": 8, "max_inp...
true
true
1c060c6d983e9f87bf02b4f0f91077265f45b89f
576
py
Python
app.py
ZeptoAS/Zepto-Analytics
5ed4b2b31170c53824923d244ca71a0897b11aaf
[ "MIT" ]
null
null
null
app.py
ZeptoAS/Zepto-Analytics
5ed4b2b31170c53824923d244ca71a0897b11aaf
[ "MIT" ]
1
2016-10-17T17:13:58.000Z
2016-10-17T17:13:58.000Z
app.py
ZeptoAS/zepto-analytics
5ed4b2b31170c53824923d244ca71a0897b11aaf
[ "MIT" ]
null
null
null
from flask import Flask, render_template import public, engine, weather, nordpool def register_blueprints(app): app.register_blueprint(public.views.blueprint) app.register_blueprint(engine.views.blueprint) app.register_blueprint(weather.views.blueprint) app.register_blueprint(nordpool.views.blueprint)...
18
52
0.748264
from flask import Flask, render_template import public, engine, weather, nordpool def register_blueprints(app): app.register_blueprint(public.views.blueprint) app.register_blueprint(engine.views.blueprint) app.register_blueprint(weather.views.blueprint) app.register_blueprint(nordpool.views.blueprint)...
true
true
1c060ed8af456dbef207b1f0e082f17d12ab55c9
3,343
py
Python
tests/test_LoxApp.py
4jandals/pyloxone-api
e48a4cc552578c19a0feea1eed4c4d09dde1532e
[ "Apache-2.0" ]
null
null
null
tests/test_LoxApp.py
4jandals/pyloxone-api
e48a4cc552578c19a0feea1eed4c4d09dde1532e
[ "Apache-2.0" ]
null
null
null
tests/test_LoxApp.py
4jandals/pyloxone-api
e48a4cc552578c19a0feea1eed4c4d09dde1532e
[ "Apache-2.0" ]
null
null
null
import pytest from pyloxone_api import LoxApp from pyloxone_api.const import LOXAPPPATH API_KEY_RETURN_HTTPS_STATUS_1 = """{ "LL": { "control": "dev/cfg/apiKey", "value": "{'snr': '12:34:56:78:9A:BC', 'version':'12.0.2.24', 'key':'1234', 'httpsStatus':1}", "Code": "200" } }""" API_KEY_RETURN_HTTPS_STAT...
29.848214
98
0.661083
import pytest from pyloxone_api import LoxApp from pyloxone_api.const import LOXAPPPATH API_KEY_RETURN_HTTPS_STATUS_1 = """{ "LL": { "control": "dev/cfg/apiKey", "value": "{'snr': '12:34:56:78:9A:BC', 'version':'12.0.2.24', 'key':'1234', 'httpsStatus':1}", "Code": "200" } }""" API_KEY_RETURN_HTTPS_STAT...
true
true
1c060f7f32a332e614dbfdf9179fe4bd8d187dce
3,972
py
Python
homeassistant/components/mqtt/camera.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
1
2022-02-07T06:59:27.000Z
2022-02-07T06:59:27.000Z
homeassistant/components/mqtt/camera.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
17
2021-11-24T06:24:20.000Z
2022-03-31T07:17:52.000Z
homeassistant/components/mqtt/camera.py
PiotrMachowski/core
b9d7d0cae2ccd2d88e90e49cc09e154a27ed809b
[ "Apache-2.0" ]
1
2022-01-03T06:44:44.000Z
2022-01-03T06:44:44.000Z
"""Camera that loads a picture from an MQTT topic.""" from __future__ import annotations import functools import voluptuous as vol from homeassistant.components import camera from homeassistant.components.camera import Camera from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_N...
32.032258
83
0.705186
from __future__ import annotations import functools import voluptuous as vol from homeassistant.components import camera from homeassistant.components.camera import Camera from homeassistant.config_entries import ConfigEntry from homeassistant.const import CONF_NAME from homeassistant.core import HomeAssistant, call...
true
true
1c061058e62ec7869607331f1817004c52424136
4,013
py
Python
douban_movie/douban_movie/spiders/movie_people_spider25000.py
ShihaoYing/douban250
abbe18b9c2cd4b0b4b5b128d79ac9ca949feaebc
[ "BSD-2-Clause" ]
551
2018-05-26T05:31:38.000Z
2022-03-30T08:59:48.000Z
douban_movie/douban_movie/spiders/movie_people_spider25000.py
ShihaoYing/douban250
abbe18b9c2cd4b0b4b5b128d79ac9ca949feaebc
[ "BSD-2-Clause" ]
5
2018-06-10T11:12:37.000Z
2020-11-24T11:53:19.000Z
douban_movie/douban_movie/spiders/movie_people_spider25000.py
ShihaoYing/douban250
abbe18b9c2cd4b0b4b5b128d79ac9ca949feaebc
[ "BSD-2-Clause" ]
163
2018-05-27T10:38:54.000Z
2022-03-14T09:13:50.000Z
# -*- coding: utf-8 -*- import scrapy import numpy as np from faker import Factory from douban_movie.dns_cache import _setDNSCache from douban_movie.items import DoubanMovieItem, DoubanMovieCommentItem, DoubanMovieUser # import urlparse # python2.x from urllib import parse as urlparse # python3.x f = Factory.create(...
39.343137
104
0.545477
import scrapy import numpy as np from faker import Factory from douban_movie.dns_cache import _setDNSCache from douban_movie.items import DoubanMovieItem, DoubanMovieCommentItem, DoubanMovieUser from urllib import parse as urlparse f = Factory.create() class DoubanPeopleSpider(scrapy.Spider): name =...
true
true
1c0610b84c0ea3a9b66290b0d546e37b49aa96b0
28,405
py
Python
infra/helper.py
dvyukov/oss-fuzz
11ae0289c9fc0d87dd0d0b3fdefa156f2896cd79
[ "Apache-2.0" ]
null
null
null
infra/helper.py
dvyukov/oss-fuzz
11ae0289c9fc0d87dd0d0b3fdefa156f2896cd79
[ "Apache-2.0" ]
null
null
null
infra/helper.py
dvyukov/oss-fuzz
11ae0289c9fc0d87dd0d0b3fdefa156f2896cd79
[ "Apache-2.0" ]
null
null
null
#!/usr/bin/env python # Copyright 2016 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
31.180022
95
0.647738
from __future__ import print_function from multiprocessing.dummy import Pool as ThreadPool import argparse import datetime import errno import multiprocessing import os import pipes import re import subprocess import sys import templates OSS_FUZZ_DIR = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) BUIL...
true
true
1c06116cbabb035fa329a2e04fdf60eefde5825d
14,848
py
Python
blueprints/auth/views_async.py
shuxiang/MT-WMS
38ef18baed6d9eddb88d43da2eeed55988410daf
[ "Apache-2.0" ]
1
2022-03-11T05:42:25.000Z
2022-03-11T05:42:25.000Z
blueprints/auth/views_async.py
shuxiang/MT-WMS
38ef18baed6d9eddb88d43da2eeed55988410daf
[ "Apache-2.0" ]
null
null
null
blueprints/auth/views_async.py
shuxiang/MT-WMS
38ef18baed6d9eddb88d43da2eeed55988410daf
[ "Apache-2.0" ]
null
null
null
# coding: utf-8 import os import time import os.path from importlib import import_module import traceback from datetime import datetime import json from sqlalchemy import or_, and_, func from flask import Blueprint, request, session, url_for, g, send_file from flask_login import LoginManager, login_user, logout_user, ...
39.384615
192
0.626347
import os import time import os.path from importlib import import_module import traceback from datetime import datetime import json from sqlalchemy import or_, and_, func from flask import Blueprint, request, session, url_for, g, send_file from flask_login import LoginManager, login_user, logout_user, login_required, ...
true
true
1c06123ea4d0774ad4baa663f652fb56c0b5ad3d
3,052
py
Python
addons/test_mail_full/tests/test_sms_server_actions.py
SHIVJITH/Odoo_Machine_Test
310497a9872db7844b521e6dab5f7a9f61d365a4
[ "Apache-2.0" ]
null
null
null
addons/test_mail_full/tests/test_sms_server_actions.py
SHIVJITH/Odoo_Machine_Test
310497a9872db7844b521e6dab5f7a9f61d365a4
[ "Apache-2.0" ]
null
null
null
addons/test_mail_full/tests/test_sms_server_actions.py
SHIVJITH/Odoo_Machine_Test
310497a9872db7844b521e6dab5f7a9f61d365a4
[ "Apache-2.0" ]
null
null
null
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.addons.test_mail_full.tests.common import TestMailFullCommon, TestRecipients class TestServerAction(TestMailFullCommon, TestRecipients): @classmethod def setUpClass(cls): super(TestServerActi...
44.882353
150
0.647772
from odoo.addons.test_mail_full.tests.common import TestMailFullCommon, TestRecipients class TestServerAction(TestMailFullCommon, TestRecipients): @classmethod def setUpClass(cls): super(TestServerAction, cls).setUpClass() cls.test_record = cls.env['mail.test.sms'].with_context(**cls._test_c...
true
true
1c0612c40ca84bd9225da1f6f9856650c95738a6
1,639
py
Python
data/gen_voxels.py
brian-xu/IGGAN
51778f1261c993f22abff6cbd93752d76033cc3c
[ "MIT" ]
7
2021-03-30T12:36:25.000Z
2022-01-27T03:31:38.000Z
data/gen_voxels.py
brian-xu/IGGAN
51778f1261c993f22abff6cbd93752d76033cc3c
[ "MIT" ]
null
null
null
data/gen_voxels.py
brian-xu/IGGAN
51778f1261c993f22abff6cbd93752d76033cc3c
[ "MIT" ]
1
2021-12-15T11:19:22.000Z
2021-12-15T11:19:22.000Z
from zipfile import ZipFile import os import sys import urllib.request import shutil # Platform warning if sys.platform != "win32": print("You need to modify some of the code in this file: see the README for more info.") quit() # check for and download files # Windows specific if not os.path.exists("binvox.e...
34.87234
111
0.670531
from zipfile import ZipFile import os import sys import urllib.request import shutil if sys.platform != "win32": print("You need to modify some of the code in this file: see the README for more info.") quit() if not os.path.exists("binvox.exe"): print("Downloading object voxelizer...") binvox = "http...
true
true
1c0613047bd27b0c8cf11158c9664accca02afba
15,430
py
Python
tests/api/v3_0_0/test_guest_type.py
CiscoISE/ciscoisesdk
860b0fc7cc15d0c2a39c64608195a7ab3d5f4885
[ "MIT" ]
36
2021-05-18T16:24:19.000Z
2022-03-05T13:44:41.000Z
tests/api/v3_0_0/test_guest_type.py
CiscoISE/ciscoisesdk
860b0fc7cc15d0c2a39c64608195a7ab3d5f4885
[ "MIT" ]
15
2021-06-08T19:03:37.000Z
2022-02-25T14:47:33.000Z
tests/api/v3_0_0/test_guest_type.py
CiscoISE/ciscoisesdk
860b0fc7cc15d0c2a39c64608195a7ab3d5f4885
[ "MIT" ]
6
2021-06-10T09:32:01.000Z
2022-01-12T08:34:39.000Z
# -*- coding: utf-8 -*- """IdentityServicesEngineAPI guest_type API fixtures and tests. Copyright (c) 2021 Cisco and/or its affiliates. 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 res...
31.683778
247
0.699287
import pytest from fastjsonschema.exceptions import JsonSchemaException from ciscoisesdk.exceptions import MalformedRequest from ciscoisesdk.exceptions import ciscoisesdkException from tests.environment import IDENTITY_SERVICES_ENGINE_VERSION pytestmark = pytest.mark.skipif(IDENTITY_SERVICES_ENGINE_VERSION != '3.0.0',...
true
true
1c06146a6a5cae1f75bce8c8ecb3770fd3c5fc79
4,838
py
Python
geo_prior/geo_prior/losses.py
gengchenmai/space2vec
a29793336e6a1ebdb497289c286a0b4d5a83079f
[ "Apache-2.0" ]
80
2020-02-15T17:50:38.000Z
2022-03-29T04:17:18.000Z
geo_prior/geo_prior/losses.py
gengchenmai/space2vec
a29793336e6a1ebdb497289c286a0b4d5a83079f
[ "Apache-2.0" ]
1
2020-08-01T01:28:05.000Z
2020-10-23T20:01:06.000Z
geo_prior/geo_prior/losses.py
gengchenmai/space2vec
a29793336e6a1ebdb497289c286a0b4d5a83079f
[ "Apache-2.0" ]
12
2020-03-12T12:09:35.000Z
2021-12-19T08:08:54.000Z
import torch import utils as ut import math def bce_loss(pred): return -torch.log(pred + 1e-5) def rand_samples(batch_size, params, rand_type='uniform'): ''' randomly sample background locations, generate (lon, lat, date) and put into pre loc encoder Note that the generated (lon, lat) are between [-...
39.655738
118
0.670112
import torch import utils as ut import math def bce_loss(pred): return -torch.log(pred + 1e-5) def rand_samples(batch_size, params, rand_type='uniform'): spa_enc_type = params['spa_enc_type'] rand_feats_orig = torch.rand(batch_size, 3).to(params['device'])*2 -1 if rand_type == 'spherical':...
true
true
1c061536cc0d8d5e7768783dd868e6194f191126
1,606
py
Python
MiGRIDS/Analyzer/PerformanceAnalyzers/getGenConfigChanges.py
mmuellerstoffels/GBSTools
aebd8aa6667a2284aaa16424f9b9d22ca3a2a375
[ "MIT" ]
8
2019-02-18T14:18:55.000Z
2022-03-04T12:34:24.000Z
MiGRIDS/Analyzer/PerformanceAnalyzers/getGenConfigChanges.py
mmuellerstoffels/GBSTools
aebd8aa6667a2284aaa16424f9b9d22ca3a2a375
[ "MIT" ]
3
2019-02-13T09:42:08.000Z
2019-05-10T16:59:02.000Z
MiGRIDS/Analyzer/PerformanceAnalyzers/getGenConfigChanges.py
acep-uaf/GBSTools
aebd8aa6667a2284aaa16424f9b9d22ca3a2a375
[ "MIT" ]
3
2019-06-10T19:49:22.000Z
2021-05-08T08:42:57.000Z
# Project: GBS Tool # Author: Dr. Marc Mueller-Stoffels, marc@denamics.com, denamics GmbH # Date: March 5, 2018 # License: MIT License (see LICENSE file of this package for more information) import numpy as np def getGenConfigChanges(genAllP): """ Calculates the total number of configuration changes for the ...
36.5
120
0.715442
import numpy as np def getGenConfigChanges(genAllP): if 'time' in genAllP: genAllP = genAllP.drop('time', 1) genBools = np.sign(genAllP) genBools[genBools < 0] = 0 genBoolsTot = genBools.sum(axis=1) genBoolsTotDiff = genBoolsTot.diff() genSwitched = np.abs...
true
true
1c061556560f5522bc77a1b95fea442ebfc364ee
667
py
Python
manage.py
AtakanAytar/Django-Restaurant-app
30d7e1e4ceaec049858a4199d86783aa214edc16
[ "MIT" ]
null
null
null
manage.py
AtakanAytar/Django-Restaurant-app
30d7e1e4ceaec049858a4199d86783aa214edc16
[ "MIT" ]
null
null
null
manage.py
AtakanAytar/Django-Restaurant-app
30d7e1e4ceaec049858a4199d86783aa214edc16
[ "MIT" ]
null
null
null
#!/usr/bin/env python """Django's command-line utility for administrative tasks.""" import os import sys def main(): """Run administrative tasks.""" os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'truvavision.settings') try: from django.core.management import execute_from_command_line except ...
29
75
0.68066
import os import sys def main(): os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'truvavision.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: raise ImportError( "Couldn't import Django. Are you sure it's installed and " ...
true
true
1c0619229ad0e1dbff95f13cfc7ca42eafd07669
3,388
py
Python
ensemble_gpu.py
killthekitten/kaggle-carvana-2017
90795b1587af0714e5499ae72a301be38014d8b9
[ "MIT" ]
95
2017-10-07T10:38:50.000Z
2021-01-20T17:40:57.000Z
ensemble_gpu.py
killthekitten/kaggle-carvana-2017
90795b1587af0714e5499ae72a301be38014d8b9
[ "MIT" ]
4
2018-05-24T15:02:43.000Z
2019-07-05T07:43:01.000Z
ensemble_gpu.py
killthekitten/kaggle-carvana-2017
90795b1587af0714e5499ae72a301be38014d8b9
[ "MIT" ]
20
2018-04-08T14:28:27.000Z
2020-11-13T13:21:36.000Z
import os import queue import threading from _ast import Lambda import keras.backend as K import numpy as np import tensorflow as tf from keras.engine.topology import Input from keras.engine.training import Model from keras.layers.core import Lambda from keras.preprocessing.image import array_to_img, load_img, img_to_...
28.711864
116
0.668831
import os import queue import threading from _ast import Lambda import keras.backend as K import numpy as np import tensorflow as tf from keras.engine.topology import Input from keras.engine.training import Model from keras.layers.core import Lambda from keras.preprocessing.image import array_to_img, load_img, img_to_...
true
true
1c061954bafbb152bba4d4ab6e19f7309b1383b8
380
py
Python
feature-detection-description/SIFT/SIFT-method-1.py
codearchive/opencv-python-tutorial
7fa1bd6f8804c753718d58d146dd14632d7cc334
[ "Apache-2.0" ]
null
null
null
feature-detection-description/SIFT/SIFT-method-1.py
codearchive/opencv-python-tutorial
7fa1bd6f8804c753718d58d146dd14632d7cc334
[ "Apache-2.0" ]
null
null
null
feature-detection-description/SIFT/SIFT-method-1.py
codearchive/opencv-python-tutorial
7fa1bd6f8804c753718d58d146dd14632d7cc334
[ "Apache-2.0" ]
1
2020-12-02T11:50:09.000Z
2020-12-02T11:50:09.000Z
import cv2 as cv img = cv.imread("input-files/zaha-hadid.jpg") gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY) sift = cv.xfeatures2d.SIFT_create() kp = sift.detect(gray, None) kp, des = sift.compute(gray, kp) img = cv.drawKeypoints(gray, kp, img) # cv.imwrite("output-files/sift_keypoints_1.jpg", img) cv.imshow("Result", im...
27.142857
54
0.710526
import cv2 as cv img = cv.imread("input-files/zaha-hadid.jpg") gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY) sift = cv.xfeatures2d.SIFT_create() kp = sift.detect(gray, None) kp, des = sift.compute(gray, kp) img = cv.drawKeypoints(gray, kp, img) cv.imshow("Result", img) k = cv.waitKey(0) if k == 27: cv.destroyAllWindo...
true
true
1c0619b9efd77a844d233a124d1a1fc635f46aec
1,316
py
Python
test/wsgi/invocation/parameter_selection/test_streaming_request_body_parameter_selector.py
keotl/jivago
892dfb0cae773e36245083c3e56f0f8523145523
[ "MIT" ]
12
2018-03-19T20:57:44.000Z
2020-01-27T14:11:24.000Z
test/wsgi/invocation/parameter_selection/test_streaming_request_body_parameter_selector.py
keotl/jivago
892dfb0cae773e36245083c3e56f0f8523145523
[ "MIT" ]
73
2018-04-20T22:26:00.000Z
2021-12-01T14:17:37.000Z
test/wsgi/invocation/parameter_selection/test_streaming_request_body_parameter_selector.py
keotl/jivago
892dfb0cae773e36245083c3e56f0f8523145523
[ "MIT" ]
1
2019-02-28T13:33:45.000Z
2019-02-28T13:33:45.000Z
import unittest from jivago.wsgi.invocation.missing_route_invocation_argument import MissingRouteInvocationArgument from jivago.wsgi.invocation.parameter_selection.streaming_request_body_parameter_selector import \ StreamingRequestBodyParameterSelector from jivago.wsgi.request.streaming_request_body import Streami...
39.878788
99
0.803191
import unittest from jivago.wsgi.invocation.missing_route_invocation_argument import MissingRouteInvocationArgument from jivago.wsgi.invocation.parameter_selection.streaming_request_body_parameter_selector import \ StreamingRequestBodyParameterSelector from jivago.wsgi.request.streaming_request_body import Streami...
true
true
1c061bd0b2ddbb34da80e793c7183092eb8dbf70
22,870
py
Python
server/pyelliptic/openssl.py
peter-tank/bmsxmlrpc
aead43f30399fa58dc9c6cae95e328ff9a6f8d52
[ "MIT" ]
null
null
null
server/pyelliptic/openssl.py
peter-tank/bmsxmlrpc
aead43f30399fa58dc9c6cae95e328ff9a6f8d52
[ "MIT" ]
null
null
null
server/pyelliptic/openssl.py
peter-tank/bmsxmlrpc
aead43f30399fa58dc9c6cae95e328ff9a6f8d52
[ "MIT" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 Yann GUIBET <yannguibet@gmail.com> # See LICENSE for details. # # Software slightly changed by Jonathan Warren <bitmessage at-symbol jonwarren.org> import sys import ctypes import traceback OpenSSL = None class CipherName: def __init__(self,...
41.133094
145
0.628203
import sys import ctypes import traceback OpenSSL = None class CipherName: def __init__(self, name, pointer, blocksize): self._name = name self._pointer = pointer self._blocksize = blocksize def __str__(self): return "Cipher : " + self._name + " | Blocksize : " + str(self._...
true
true
1c061bf6ac56540acc8a1fbdb3291cd64f1069ba
8,352
py
Python
utils/errors.py
nodonoughue/emitter-detection-python
ebff19acebcc1edfd941280e05f8ddf2ff20c974
[ "MIT" ]
null
null
null
utils/errors.py
nodonoughue/emitter-detection-python
ebff19acebcc1edfd941280e05f8ddf2ff20c974
[ "MIT" ]
null
null
null
utils/errors.py
nodonoughue/emitter-detection-python
ebff19acebcc1edfd941280e05f8ddf2ff20c974
[ "MIT" ]
null
null
null
import numpy as np import scipy.stats as stats import warnings def compute_cep50(covariance): """ Computes the radius for a CEP_50 circle from a given error covariance matrix C. The CEP_50 circle is a circle that contains half of the random samples defined by the error covariance matrix. Calcula...
36.155844
120
0.672055
import numpy as np import scipy.stats as stats import warnings def compute_cep50(covariance): in_shape = np.shape(covariance) if np.size(in_shape) < 2: raise TypeError('Covariance matrix must have at least two dimensions.') elif in_shape[0] != 2 or in_shape[1] != 2: raise TypeError('F...
true
true
1c061ca31269cc15f5adac8170952f3062131286
563
py
Python
ethsential/src/tools/tool.py
1140251/Ethsential
1de423358f5a0ba8b84d80fa63bce09552bca9fd
[ "Apache-2.0" ]
7
2021-10-11T12:07:08.000Z
2022-01-10T01:19:36.000Z
ethsential/src/tools/tool.py
1140251/Ethsential
1de423358f5a0ba8b84d80fa63bce09552bca9fd
[ "Apache-2.0" ]
null
null
null
ethsential/src/tools/tool.py
1140251/Ethsential
1de423358f5a0ba8b84d80fa63bce09552bca9fd
[ "Apache-2.0" ]
null
null
null
from abc import ABC, abstractmethod class Tool(ABC): @abstractmethod def __init__(self): pass @abstractmethod def parse(self, str): pass @property def image(self): raise NotImplementedError @property def command(self): raise NotImplementedError @...
19.413793
67
0.632327
from abc import ABC, abstractmethod class Tool(ABC): @abstractmethod def __init__(self): pass @abstractmethod def parse(self, str): pass @property def image(self): raise NotImplementedError @property def command(self): raise NotImplementedError @...
true
true
1c061d1aaac1ad4679cf60f07f0b23d4fd87cd8e
7,252
py
Python
src/sbcireport.py
chris-ch/coins
41e1976f0459b0d77a9e882f6e0e10777ae6685d
[ "Apache-2.0" ]
null
null
null
src/sbcireport.py
chris-ch/coins
41e1976f0459b0d77a9e882f6e0e10777ae6685d
[ "Apache-2.0" ]
2
2021-04-30T20:36:03.000Z
2021-06-01T22:03:13.000Z
src/sbcireport.py
chris-ch/coins
41e1976f0459b0d77a9e882f6e0e10777ae6685d
[ "Apache-2.0" ]
null
null
null
import pandas from collections import defaultdict import logging from pnl import AverageCostProfitAndLoss def _select_prices(reporting_currency, prices): """ :param reporting_currency: :param prices: :return: """ all_prices = prices.set_index('date') filter_columns = [column for column i...
38.780749
119
0.660094
import pandas from collections import defaultdict import logging from pnl import AverageCostProfitAndLoss def _select_prices(reporting_currency, prices): all_prices = prices.set_index('date') filter_columns = [column for column in all_prices.columns if column.endswith(reporting_currency)] prices_selectio...
true
true
1c061d869bb9ee5609e592071072c466e34c5db7
811
py
Python
notes/mixins.py
Ratgor/iLikeit-voting-platform
34c833d89b2dc04672db23a134c126a809446a0c
[ "FSFAP" ]
null
null
null
notes/mixins.py
Ratgor/iLikeit-voting-platform
34c833d89b2dc04672db23a134c126a809446a0c
[ "FSFAP" ]
null
null
null
notes/mixins.py
Ratgor/iLikeit-voting-platform
34c833d89b2dc04672db23a134c126a809446a0c
[ "FSFAP" ]
null
null
null
## taken from ## https://stackoverflow.com/questions/25151586/django-rest-framework-retrieving-object-count-from-a-model ## check for a variant of performance optimization ## https://marselester.com/drf-pagination.html ## usage/implementation # from .mixins import CountModelMixin # class NoteViewSet(viewsets....
30.037037
107
0.701603
from rest_framework.decorators import action from rest_framework.response import Response class CountModelMixin(object): @action(detail=False) def count(self, request, *args, **kwargs): queryset = self.filter_queryset(self.get_queryset()) content = {'count': queryset.count()} ...
true
true
1c061dda22a3603dc4a545918c952675a4a03f2e
421
py
Python
bin/board-serve.py
rtrusso/boardgame-socketserver
84ed68b1bc6e552532348e0654897cb26a327ad3
[ "MIT" ]
null
null
null
bin/board-serve.py
rtrusso/boardgame-socketserver
84ed68b1bc6e552532348e0654897cb26a327ad3
[ "MIT" ]
null
null
null
bin/board-serve.py
rtrusso/boardgame-socketserver
84ed68b1bc6e552532348e0654897cb26a327ad3
[ "MIT" ]
null
null
null
#!/usr/bin/env python import sys from pkg_resources import iter_entry_points from boardserver import server board_plugins = dict( (ep.name, ep.load()) for ep in iter_entry_points('jrb_board.games') ) args = sys.argv[1:] addr, port = None, None board = board_plugins[args[0]] if len(args) > 1: addr = ar...
16.192308
50
0.674584
import sys from pkg_resources import iter_entry_points from boardserver import server board_plugins = dict( (ep.name, ep.load()) for ep in iter_entry_points('jrb_board.games') ) args = sys.argv[1:] addr, port = None, None board = board_plugins[args[0]] if len(args) > 1: addr = args[1] if len(args) > 2...
true
true
1c061f6e46df5bcb5f4fae3af2fd674602969aa9
119
py
Python
test/__init__.py
sourcery-ai-bot/TanabeSugano
3c04dea5e962748b858db2f6dabf40b7197b2542
[ "MIT" ]
null
null
null
test/__init__.py
sourcery-ai-bot/TanabeSugano
3c04dea5e962748b858db2f6dabf40b7197b2542
[ "MIT" ]
null
null
null
test/__init__.py
sourcery-ai-bot/TanabeSugano
3c04dea5e962748b858db2f6dabf40b7197b2542
[ "MIT" ]
null
null
null
import sys sys.path.append("..") from tanabe import matrices from tanabe import __main__ as frontapp import numpy as np
23.8
39
0.798319
import sys sys.path.append("..") from tanabe import matrices from tanabe import __main__ as frontapp import numpy as np
true
true
1c062092852690f4933dba8c52ac4973c0ac0d49
5,221
py
Python
API/ReadWrite.py
QIB-Sheffield/WEASEL
e4dad345fd6f347cfac990708252844a7cbcd025
[ "Apache-2.0" ]
2
2021-02-10T09:07:15.000Z
2021-03-16T17:05:24.000Z
API/ReadWrite.py
QIB-Sheffield/WEASEL
e4dad345fd6f347cfac990708252844a7cbcd025
[ "Apache-2.0" ]
102
2021-01-20T11:14:21.000Z
2021-12-12T17:34:42.000Z
API/ReadWrite.py
QIB-Sheffield/WEASEL
e4dad345fd6f347cfac990708252844a7cbcd025
[ "Apache-2.0" ]
1
2021-01-29T09:28:05.000Z
2021-01-29T09:28:05.000Z
""" Collection of methods for reading and writing DICOM within a Pipeline. """ import os from PyQt5.QtWidgets import QFileDialog import CoreModules.WriteXMLfromDICOM as WriteXMLfromDICOM from CoreModules.TreeView import TreeView from Displays.UserInput import userInput import logging logger = logging.getLogger(__nam...
34.806667
144
0.598353
import os from PyQt5.QtWidgets import QFileDialog import CoreModules.WriteXMLfromDICOM as WriteXMLfromDICOM from CoreModules.TreeView import TreeView from Displays.UserInput import userInput import logging logger = logging.getLogger(__name__) class ReadWrite(): def log(self, message): print(message) ...
true
true
1c0620de2dd243fb6d28aa77639b52f57ea0e027
1,597
py
Python
utils/download_dataset.py
oreilly-japan/building-ml-pipelines-ja
a5044c63610cd116612cfafb66261611b4541ebb
[ "MIT" ]
8
2021-09-25T01:44:45.000Z
2022-03-04T14:31:00.000Z
utils/download_dataset.py
oreilly-japan/building-ml-pipelines-ja
a5044c63610cd116612cfafb66261611b4541ebb
[ "MIT" ]
null
null
null
utils/download_dataset.py
oreilly-japan/building-ml-pipelines-ja
a5044c63610cd116612cfafb66261611b4541ebb
[ "MIT" ]
3
2021-09-25T01:44:47.000Z
2021-11-22T08:32:14.000Z
""" Downloads the csv data """ import logging import os import pandas as pd # Initial dataset source DATASET_URL = "http://bit.ly/building-ml-pipelines-dataset" # Initial local dataset location LOCAL_FILE_NAME = "data/consumer_complaints_with_narrative.csv" def download_dataset(url=DATASET_URL): """download_d...
24.953125
84
0.674389
import logging import os import pandas as pd DATASET_URL = "http://bit.ly/building-ml-pipelines-dataset" LOCAL_FILE_NAME = "data/consumer_complaints_with_narrative.csv" def download_dataset(url=DATASET_URL): df = pd.read_csv(url, index_col=0) df.to_csv(LOCAL_FILE_NAME) logging.info("Download completed...
true
true
1c062187778692839bc0eddfe96dd31936b568ac
3,269
py
Python
sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_configuration.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
2,728
2015-01-09T10:19:32.000Z
2022-03-31T14:50:33.000Z
sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_configuration.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
17,773
2015-01-05T15:57:17.000Z
2022-03-31T23:50:25.000Z
sdk/digitaltwins/azure-mgmt-digitaltwins/azure/mgmt/digitaltwins/_configuration.py
rsdoherty/azure-sdk-for-python
6bba5326677468e6660845a703686327178bb7b1
[ "MIT" ]
1,916
2015-01-19T05:05:41.000Z
2022-03-31T19:36:44.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 ...
45.402778
129
0.690119
from typing import TYPE_CHECKING from azure.core.configuration import Configuration from azure.core.pipeline import policies from azure.mgmt.core.policies import ARMHttpLoggingPolicy from ._version import VERSION if TYPE_CHECKING: from typing import Any from azure.core.credentials import TokenCredential...
true
true
1c06219b8fb6d96882ef837b5e4d42fe481ca3eb
12,905
py
Python
utils/charts.py
maindolaamit/mllib
03f46089b1d6661dcc3245118b7d108d124e645c
[ "MIT" ]
null
null
null
utils/charts.py
maindolaamit/mllib
03f46089b1d6661dcc3245118b7d108d124e645c
[ "MIT" ]
null
null
null
utils/charts.py
maindolaamit/mllib
03f46089b1d6661dcc3245118b7d108d124e645c
[ "MIT" ]
null
null
null
import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import numpy as np def reset_rc(): """ Reset the matplotlib rc parameters """ mpl.rcParams.update(mpl.rcParamsDefault) def set_rc(titlesize=10): """ Set the RC parameters for matplotlib and set...
35.747922
141
0.638435
import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import numpy as np def reset_rc(): mpl.rcParams.update(mpl.rcParamsDefault) def set_rc(titlesize=10): pd.set_option('display.max_colwidth', 100) sns.set_theme(style='whitegrid', color_codes=True, p...
true
true
1c0621a995543aa0918c923290a326c421f56401
2,774
py
Python
custom/icds_reports/utils/aggregation_helpers/distributed/daily_attendance.py
kkrampa/commcare-hq
d64d7cad98b240325ad669ccc7effb07721b4d44
[ "BSD-3-Clause" ]
1
2020-05-05T13:10:01.000Z
2020-05-05T13:10:01.000Z
custom/icds_reports/utils/aggregation_helpers/distributed/daily_attendance.py
kkrampa/commcare-hq
d64d7cad98b240325ad669ccc7effb07721b4d44
[ "BSD-3-Clause" ]
1
2019-12-09T14:00:14.000Z
2019-12-09T14:00:14.000Z
custom/icds_reports/utils/aggregation_helpers/distributed/daily_attendance.py
MaciejChoromanski/commcare-hq
fd7f65362d56d73b75a2c20d2afeabbc70876867
[ "BSD-3-Clause" ]
5
2015-11-30T13:12:45.000Z
2019-07-01T19:27:07.000Z
from __future__ import absolute_import from __future__ import unicode_literals from corehq.apps.userreports.models import StaticDataSourceConfiguration, get_datasource_config from corehq.apps.userreports.util import get_table_name from custom.icds_reports.const import DAILY_FEEDING_TABLE_ID from custom.icds_reports.ut...
42.030303
111
0.686373
from __future__ import absolute_import from __future__ import unicode_literals from corehq.apps.userreports.models import StaticDataSourceConfiguration, get_datasource_config from corehq.apps.userreports.util import get_table_name from custom.icds_reports.const import DAILY_FEEDING_TABLE_ID from custom.icds_reports.ut...
true
true
1c06220a63155ce2637832eef1a676612af88318
39,898
py
Python
batch_cube.py
jasonrute/puzzle_cube_code
cf0238bc333d55e3637a4a6a4f408d16d4e14418
[ "MIT" ]
2
2020-11-12T06:41:44.000Z
2022-02-27T13:50:38.000Z
batch_cube.py
jasonrute/puzzle_cube_code
cf0238bc333d55e3637a4a6a4f408d16d4e14418
[ "MIT" ]
null
null
null
batch_cube.py
jasonrute/puzzle_cube_code
cf0238bc333d55e3637a4a6a4f408d16d4e14418
[ "MIT" ]
2
2018-05-22T02:40:23.000Z
2018-07-28T11:14:41.000Z
""" An implementation of an array Rubic's cubes. Actions are stored in this order (corresponding to these numbers) 0:L, 1:L', 2:R, 3:R', 4:U, 5:U', 6:D, 7:D', 8:F, 9:F', 10:B, 11:B' Internally the cube is stored as an integer array of dimension ? x 54 One row for each cube, stored in a way easy to import into...
45.082486
260
0.432453
import numpy as np basic_moves = ["L", "L'", "R", "R'", "U", "U'", "D", "D'", "F", "F'", "B", "B'"] eye6 = np.eye(6, dtype=bool) solved_cube_list = np.array([0]*9 + [1]*9 + [2]*9 + [3]*9 + [4]*9 + [5]*9) solved_cube_bit_array = eye6[np.newaxis, solved_cube_list] pc_indices = [58, 61, 64, 95, 98, 101, 132, 135, 138...
true
true
1c062311a136ba6419ca1acb1bee7bdbafaed56e
289
py
Python
start_here.py
IoT-master/robinhood_stocks_aiohttp
d7ec0b1c6dd5de24e50ca8b9282fc8f444975c10
[ "Unlicense", "MIT" ]
1
2021-09-26T18:39:31.000Z
2021-09-26T18:39:31.000Z
start_here.py
webclinic017/robinhood_stocks_aiohttp
d7ec0b1c6dd5de24e50ca8b9282fc8f444975c10
[ "Unlicense", "MIT" ]
null
null
null
start_here.py
webclinic017/robinhood_stocks_aiohttp
d7ec0b1c6dd5de24e50ca8b9282fc8f444975c10
[ "Unlicense", "MIT" ]
3
2020-08-25T03:25:02.000Z
2021-09-26T18:39:33.000Z
from Robinhood import Robinhood from pprint import pprint class Usage(Robinhood): async def main(self): await self.login() options_dict = await self.get_option_positions_from_account() pprint(options_dict) if __name__ == '__main__': instance = Usage()
19.266667
69
0.698962
from Robinhood import Robinhood from pprint import pprint class Usage(Robinhood): async def main(self): await self.login() options_dict = await self.get_option_positions_from_account() pprint(options_dict) if __name__ == '__main__': instance = Usage()
true
true
1c0623a2622726adf94c002c01df102f35a751a1
6,032
py
Python
panbox/pansim/pansim_active/base.py
ag-ds-bubble/panbox
8fb9854fd3c9a931b818bd51781e6d4fb046d580
[ "MIT" ]
null
null
null
panbox/pansim/pansim_active/base.py
ag-ds-bubble/panbox
8fb9854fd3c9a931b818bd51781e6d4fb046d580
[ "MIT" ]
null
null
null
panbox/pansim/pansim_active/base.py
ag-ds-bubble/panbox
8fb9854fd3c9a931b818bd51781e6d4fb046d580
[ "MIT" ]
null
null
null
from ..pansim_view.pansim_view_handler import PanSimViewHandler import pandas as pd import numpy as np from ..._configs.pansim_configs import ROOT_PATH class ActiveBase: def __init__(self): self.pansimData = {} density_data = pd.read_csv(ROOT_PATH+'/_animutils/population_density.csv', index_col=0)...
42.478873
156
0.720325
from ..pansim_view.pansim_view_handler import PanSimViewHandler import pandas as pd import numpy as np from ..._configs.pansim_configs import ROOT_PATH class ActiveBase: def __init__(self): self.pansimData = {} density_data = pd.read_csv(ROOT_PATH+'/_animutils/population_density.csv', index_col=0)...
true
true
1c06244afc9fc2bc2a1630646e62065da43e3871
3,236
py
Python
code_scrapy/craigslist_sample/settings.py
yhsui/Final-project
c009efc555e6dba9bb4ca19654c69fbeb5cd4b60
[ "MIT" ]
null
null
null
code_scrapy/craigslist_sample/settings.py
yhsui/Final-project
c009efc555e6dba9bb4ca19654c69fbeb5cd4b60
[ "MIT" ]
null
null
null
code_scrapy/craigslist_sample/settings.py
yhsui/Final-project
c009efc555e6dba9bb4ca19654c69fbeb5cd4b60
[ "MIT" ]
null
null
null
# -*- coding: utf-8 -*- # Scrapy settings for craigslist_sample project # # For simplicity, this file contains only settings considered important or # commonly used. You can find more settings consulting the documentation: # # http://doc.scrapy.org/en/latest/topics/settings.html # http://scrapy.readthedocs.org...
35.56044
109
0.783993
BOT_NAME = 'craigslist_sample' SPIDER_MODULES = ['craigslist_sample.spiders'] NEWSPIDER_MODULE = 'craigslist_sample.spiders' ROBOTSTXT_OBEY = True
true
true
1c06256ba53c0e0fba3dabec4cd8da59e663dad4
37,661
py
Python
wicrackfi.py
ShineZex/WiCrackFi
b9361a03b05dad8f75f3479d883610f71666804a
[ "MIT" ]
50
2021-01-30T16:54:40.000Z
2022-03-12T17:42:34.000Z
wicrackfi.py
sadamshr3be/wicrackfi-lasharabi
4dead4fb31a518eaf894b308e849a8dc4e0716b0
[ "MIT" ]
1
2021-03-05T21:18:20.000Z
2021-03-05T21:18:20.000Z
wicrackfi.py
sadamshr3be/wicrackfi-lasharabi
4dead4fb31a518eaf894b308e849a8dc4e0716b0
[ "MIT" ]
20
2020-12-06T18:45:54.000Z
2021-12-12T21:37:46.000Z
# ==================================================================================================================== # WiCrackFi # v1.2 # WiFi Security Testing Tool Created By Pedro "Shin...
39.85291
225
0.502323
import os import time import subprocess import shlex import os.path import csv import datetime def instal_setup(): os.system("clear") print("Installing everything that is required:") time.sleep(2) print("Updating...") os.system("sudo apt-get update") time.sleep(1) os.system...
true
true
1c06256d1820f3cb4ed8cd470946ee088f599cea
636
py
Python
___Python/Carsten/m01_emails.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Carsten/m01_emails.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
___Python/Carsten/m01_emails.py
uvenil/PythonKurs201806
85afa9c9515f5dd8bec0c546f077d8cc39568fe8
[ "Apache-2.0" ]
null
null
null
# Import smtplib for the actual sending function import smtplib # Import the email modules we'll need from email.message import EmailMessage # Create a text/plain message msg = EmailMessage() msg.set_content(""" Hallo liebe Anna! Viele Grüße Gabi """) msg['Subject'] = "Mein Betreff" msg['To'] = "sta...
22.714286
77
0.704403
import smtplib from email.message import EmailMessage # Create a text/plain message msg = EmailMessage() msg.set_content(""" Hallo liebe Anna! Viele Grüße Gabi """) msg['Subject'] = "Mein Betreff" msg['To'] = "starke.carsten@gmx.de" # Send the message via our own SMTP server. s = smtplib.SMTP('mai...
true
true
1c062835f0b6c9f223f5ea5ade14bce1b8c5ae03
6,508
py
Python
graph_objs/streamtube/_starts.py
wwwidonja/changed_plotly
1bda35a438539a97c84a3ab3952e95e8848467bd
[ "MIT" ]
null
null
null
graph_objs/streamtube/_starts.py
wwwidonja/changed_plotly
1bda35a438539a97c84a3ab3952e95e8848467bd
[ "MIT" ]
null
null
null
graph_objs/streamtube/_starts.py
wwwidonja/changed_plotly
1bda35a438539a97c84a3ab3952e95e8848467bd
[ "MIT" ]
null
null
null
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Starts(_BaseTraceHierarchyType): # class properties # -------------------- _parent_path_str = "streamtube" _path_str = "streamtube.starts" _valid_props = {"x", "xsrc", "y", "ysrc", "z", "...
24.558491
82
0.500154
from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType import copy as _copy class Starts(_BaseTraceHierarchyType): _parent_path_str = "streamtube" _path_str = "streamtube.starts" _valid_props = {"x", "xsrc", "y", "ysrc", "z", "zsrc"} @property def x(se...
true
true
1c062923dc5dc03b1648e6a9343120780c8ef264
15,336
py
Python
src/zhinst/toolkit/control/drivers/base/sweeper.py
abdurakhimov/zhinst-toolkit
a09a58bd0bfb473800136306989691329e77e90f
[ "MIT" ]
14
2020-07-09T09:14:39.000Z
2022-03-23T05:15:40.000Z
src/zhinst/toolkit/control/drivers/base/sweeper.py
abdurakhimov/zhinst-toolkit
a09a58bd0bfb473800136306989691329e77e90f
[ "MIT" ]
104
2020-08-07T09:38:40.000Z
2022-03-29T11:42:32.000Z
src/zhinst/toolkit/control/drivers/base/sweeper.py
abdurakhimov/zhinst-toolkit
a09a58bd0bfb473800136306989691329e77e90f
[ "MIT" ]
16
2020-07-09T09:17:36.000Z
2022-01-18T14:16:08.000Z
import time import numpy as np from typing import List, Dict from .base import BaseInstrument from zhinst.toolkit.control.node_tree import Parameter from zhinst.toolkit.interface import LoggerModule _logger = LoggerModule(__name__) MAPPINGS = { "bandwidthcontrol": {0: "manual", 1: "fixed", 2: "automatic"}, ...
34.462921
103
0.584116
import time import numpy as np from typing import List, Dict from .base import BaseInstrument from zhinst.toolkit.control.node_tree import Parameter from zhinst.toolkit.interface import LoggerModule _logger = LoggerModule(__name__) MAPPINGS = { "bandwidthcontrol": {0: "manual", 1: "fixed", 2: "automatic"}, ...
true
true
1c062a746c28ff8ccd2d7fd38c1291790fd3be6d
1,460
py
Python
TemplateMatchFF.py
rkucbel1/WTI_TermScreenShot
a094400933ddc1761828f218c8149ab1c58ff17b
[ "MIT" ]
null
null
null
TemplateMatchFF.py
rkucbel1/WTI_TermScreenShot
a094400933ddc1761828f218c8149ab1c58ff17b
[ "MIT" ]
null
null
null
TemplateMatchFF.py
rkucbel1/WTI_TermScreenShot
a094400933ddc1761828f218c8149ab1c58ff17b
[ "MIT" ]
null
null
null
#Object Detection by Template Matching - Store min_loc to a json file import cv2 import numpy as np import json import os path_to_image = os.environ.get('PATH_TO_WTI_SCREENSHOT_IMAGE') def writeToJSONFile(path, filename, data): filePathNameWExt = '/' + path + '/' + filename + '.json' with open(file...
34.761905
83
0.74726
import cv2 import numpy as np import json import os path_to_image = os.environ.get('PATH_TO_WTI_SCREENSHOT_IMAGE') def writeToJSONFile(path, filename, data): filePathNameWExt = '/' + path + '/' + filename + '.json' with open(filePathNameWExt, 'w') as fp: json.dump(data, fp) img_rgb = cv2....
true
true
1c062aa04fe57df9c27e76522b2ce1fa228d1f57
1,077
py
Python
tracker-visual/det_hitmap.py
will-fawcett/trackerSW
fc097b97539d0b40a15e1d6e112f4048cb4122b4
[ "MIT" ]
null
null
null
tracker-visual/det_hitmap.py
will-fawcett/trackerSW
fc097b97539d0b40a15e1d6e112f4048cb4122b4
[ "MIT" ]
null
null
null
tracker-visual/det_hitmap.py
will-fawcett/trackerSW
fc097b97539d0b40a15e1d6e112f4048cb4122b4
[ "MIT" ]
null
null
null
from rootpy.io import root_open import ROOT from ROOT import gStyle ROOT.gROOT.SetBatch(1) # Optional Style, using FCCStyle from FCCSW #from plotstyle import FCCStyle #FCCStyle.initialize() gStyle.SetOptStat(11) gStyle.SetNdivisions(405) import sys f = root_open(sys.argv[1]) nEvents = f.events.GetEntries() nEventS...
25.046512
122
0.659239
from rootpy.io import root_open import ROOT from ROOT import gStyle ROOT.gROOT.SetBatch(1) gStyle.SetOptStat(11) gStyle.SetNdivisions(405) import sys f = root_open(sys.argv[1]) nEvents = f.events.GetEntries() nEventStr = "NEvents: " + str(f.events.GetEntries()) cv = ROOT.TCanvas() h = f.events.Draw("positionedH...
false
true
1c062b79e357ff134df6006eb1025d140137d6fd
16,232
py
Python
bson/__init__.py
yamins81/apymongo
d1fc8e94042efe8df15b7259c14de3f7b91f2158
[ "Apache-2.0" ]
2
2017-05-24T08:00:40.000Z
2018-12-02T14:18:51.000Z
bson/__init__.py
yamins81/apymongo
d1fc8e94042efe8df15b7259c14de3f7b91f2158
[ "Apache-2.0" ]
null
null
null
bson/__init__.py
yamins81/apymongo
d1fc8e94042efe8df15b7259c14de3f7b91f2158
[ "Apache-2.0" ]
1
2018-12-02T14:18:52.000Z
2018-12-02T14:18:52.000Z
# Copyright 2009-2010 10gen, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
31.518447
77
0.605471
import calendar import datetime import re import struct import warnings from bson.binary import Binary from bson.code import Code from bson.dbref import DBRef from bson.errors import (InvalidBSON, InvalidDocument, InvalidStringData) from bson.max_key import MaxKey fr...
true
true
1c062bf066d57f08dc1da20c6afcfe3fd8669585
2,197
py
Python
src/process.py
Naman-Bhalla/os-file-system-python
c85569c6e5896ead673190f4e41d2389e413669e
[ "MIT" ]
null
null
null
src/process.py
Naman-Bhalla/os-file-system-python
c85569c6e5896ead673190f4e41d2389e413669e
[ "MIT" ]
null
null
null
src/process.py
Naman-Bhalla/os-file-system-python
c85569c6e5896ead673190f4e41d2389e413669e
[ "MIT" ]
null
null
null
class Process: def __init__(self, directory): self.current_file = None self.current_directory = directory self.current_index = None def open_file(self, file_name): for files in self.current_directory.sub_files: if not files.is_directory() and files.name == file_nam...
30.943662
81
0.559399
class Process: def __init__(self, directory): self.current_file = None self.current_directory = directory self.current_index = None def open_file(self, file_name): for files in self.current_directory.sub_files: if not files.is_directory() and files.name == file_nam...
true
true
1c062d76bd50c493d6529a43d7b5e8bdb169433c
2,616
py
Python
neutron/ipam/utils.py
ISCAS-VDI/neutron-base
687f03d7131839ae8bc324d5823194d1245bb050
[ "Apache-2.0" ]
4
2018-08-05T00:43:03.000Z
2021-10-13T00:45:45.000Z
neutron/ipam/utils.py
ISCAS-VDI/neutron-base
687f03d7131839ae8bc324d5823194d1245bb050
[ "Apache-2.0" ]
8
2018-06-14T14:50:16.000Z
2018-11-13T16:30:42.000Z
neutron/ipam/utils.py
ISCAS-VDI/neutron-base
687f03d7131839ae8bc324d5823194d1245bb050
[ "Apache-2.0" ]
7
2018-06-12T18:57:04.000Z
2019-05-09T15:42:30.000Z
# Copyright 2015 OpenStack LLC. # 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 b...
37.913043
78
0.682339
import netaddr from neutron_lib import constants def check_subnet_ip(cidr, ip_address): ip = netaddr.IPAddress(ip_address) net = netaddr.IPNetwork(cidr) return (ip != net.network and (net.version == 6 or ip != net[-1]) and net.netmask & ip == net.network) def check_gatew...
true
true
1c062e22ad23ddb79215258a9b2bb4932b5a188b
1,927
py
Python
module2-sql-for-analysis/titanic_queries.py
ed-chin-git/DS-Unit-3-Sprint-2-SQL-and-Databases
7bc0468bea0defd404fc2855f1767953a2b3160e
[ "MIT" ]
null
null
null
module2-sql-for-analysis/titanic_queries.py
ed-chin-git/DS-Unit-3-Sprint-2-SQL-and-Databases
7bc0468bea0defd404fc2855f1767953a2b3160e
[ "MIT" ]
null
null
null
module2-sql-for-analysis/titanic_queries.py
ed-chin-git/DS-Unit-3-Sprint-2-SQL-and-Databases
7bc0468bea0defd404fc2855f1767953a2b3160e
[ "MIT" ]
null
null
null
""" ---------------------------------------------------------------- RPG DataBase Queries ---------------------------------------------------------------- """ import psycopg2 # ___ Connect to ElephantSQL db _________ def conx_elephant(conx_str): # instantiate and return connection obj cnx = psyco...
25.025974
92
0.539699
import psycopg2 def conx_elephant(conx_str): cnx = psycopg2.connect(conx_str) return cnx def run_queries(c): print('----- T I T A N I C I N F O ------') query = """ SELECT COUNT(public.titanic.index) FROM public.titanic """ c.execute(query) rows = c.fetchone() print...
true
true
1c062ec3822167bc2318f0a427e98a08fd0132cf
82,729
py
Python
bathycube/cube.py
noaa-ocs-hydrography/bathycube
917dcac9668377b58dde6a1fdab4d875cd5804af
[ "MIT" ]
null
null
null
bathycube/cube.py
noaa-ocs-hydrography/bathycube
917dcac9668377b58dde6a1fdab4d875cd5804af
[ "MIT" ]
null
null
null
bathycube/cube.py
noaa-ocs-hydrography/bathycube
917dcac9668377b58dde6a1fdab4d875cd5804af
[ "MIT" ]
null
null
null
""" Python implementation of the CUBE module, Combined Uncertainty and Bathymetry Estimator. Python implementation done by Eric Younkin, Feb 2022. CUBE was developed as a research project within the Center of for Coastal and Ocean Mapping and NOAA/UNH Joint Hydrographic Center (CCOM/JHC) at the University of New Hamp...
48.894208
227
0.633224
import sys import numpy as np from numba import types, typed from numba.experimental import jitclass import json from enum import Enum import logging class StdErrFilter(logging.Filter): def filter(self, rec): return rec.levelno in (logging.CRITICAL, logging.ERROR, logging.WARNING) class StdOutFilter(l...
true
true
1c062ee8c0236811484bde24c43a1ef99212af94
3,909
py
Python
pyomnisci/_transforms.py
jp-harvey/pyomnisci-1
bedaa7002299055a172a3de12ca49129d0a51e5d
[ "Apache-2.0" ]
7
2021-02-05T17:00:21.000Z
2022-02-04T20:55:14.000Z
pyomnisci/_transforms.py
jp-harvey/pyomnisci-1
bedaa7002299055a172a3de12ca49129d0a51e5d
[ "Apache-2.0" ]
19
2021-01-14T18:48:13.000Z
2022-01-13T00:26:22.000Z
pyomnisci/_transforms.py
jp-harvey/pyomnisci-1
bedaa7002299055a172a3de12ca49129d0a51e5d
[ "Apache-2.0" ]
8
2020-11-18T01:58:36.000Z
2022-01-27T19:45:50.000Z
import json from base64 import b64decode, b64encode def _change_dashboard_sources(dashboard, remap): """ Remap a dashboard to use a new table Parameters ---------- dashboard: A dictionary containing the old dashboard state remap: A dictionary containing the new dashboard state to be mapped ...
38.323529
78
0.521361
import json from base64 import b64decode, b64encode def _change_dashboard_sources(dashboard, remap): dm = json.loads(dashboard.dashboard_metadata) tlst = map(str.strip, dm.get('table', '').split(',')) tlst = [ remap[t]['name'] if remap.get(t, {}).get('name', {}) else t for t in tlst ] ...
true
true
1c062f027699bf2f6d6e4573899f5642f6eff48f
5,663
py
Python
burisim/ui/__init__.py
rjw57/buri-simulator-python
328da1998880c295cecd356cdc2a13405b0169bd
[ "MIT" ]
5
2016-02-29T15:29:28.000Z
2019-05-30T15:29:35.000Z
burisim/ui/__init__.py
rjw57/buri-simulator-python
328da1998880c295cecd356cdc2a13405b0169bd
[ "MIT" ]
null
null
null
burisim/ui/__init__.py
rjw57/buri-simulator-python
328da1998880c295cecd356cdc2a13405b0169bd
[ "MIT" ]
2
2020-03-07T20:00:08.000Z
2020-07-25T14:22:33.000Z
# Make py2 like py3 from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import ( # pylint: disable=redefined-builtin, unused-import bytes, dict, int, list, object, range, str, ascii, chr, hex, input, next, oct, open, pow, round, super, filter, map, zip ) ...
30.610811
97
0.577256
from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import ( bytes, dict, int, list, object, range, str, ascii, chr, hex, input, next, oct, open, pow, round, super, filter, map, zip ) import cgi from PySide import QtCore, QtGui from .display import HD44...
true
true
1c0630f744297cfc05c393871780500da6778709
6,761
py
Python
src/models/readers/sst_reader.py
pczarnowska/generalized-fairness-metrics
06a4cea1e017e1340ecb14617b629215a8b014cf
[ "Apache-2.0" ]
null
null
null
src/models/readers/sst_reader.py
pczarnowska/generalized-fairness-metrics
06a4cea1e017e1340ecb14617b629215a8b014cf
[ "Apache-2.0" ]
null
null
null
src/models/readers/sst_reader.py
pczarnowska/generalized-fairness-metrics
06a4cea1e017e1340ecb14617b629215a8b014cf
[ "Apache-2.0" ]
null
null
null
from typing import Dict, List, Optional, Union import logging from allennlp.data import Tokenizer from overrides import overrides from nltk.tree import Tree from allennlp.common.file_utils import cached_path from allennlp.data.dataset_readers.dataset_reader import DatasetReader from allennlp.data.fields import LabelF...
43.339744
154
0.617216
from typing import Dict, List, Optional, Union import logging from allennlp.data import Tokenizer from overrides import overrides from nltk.tree import Tree from allennlp.common.file_utils import cached_path from allennlp.data.dataset_readers.dataset_reader import DatasetReader from allennlp.data.fields import LabelF...
true
true
1c063111853ab02bd7a834f8b57bdd3fe1fb66b8
708
py
Python
Lista_1_Variaveis/Exercicio_02.py
nem080/Python
57dc9a931d27c44e45db2182394611c61aed70a2
[ "MIT" ]
2
2020-12-26T03:47:22.000Z
2021-11-14T05:22:56.000Z
Lista_1_Variaveis/Exercicio_02.py
nem080/Python
57dc9a931d27c44e45db2182394611c61aed70a2
[ "MIT" ]
null
null
null
Lista_1_Variaveis/Exercicio_02.py
nem080/Python
57dc9a931d27c44e45db2182394611c61aed70a2
[ "MIT" ]
null
null
null
#2. Tendo como dado de entrada o sexo e a altura (h) de uma pessoa, construa um algoritmo que calcule seu peso ideal, utilizando as seguintes fórmulas: # M - Masculino: (72.7*h) - 58 # F - Feminino: (62.1*h) - 44.7 def main(): print("Informe seu sexo: \n digite M para masculino \n digite F para feminino") sexo = i...
33.714286
151
0.625706
def main(): print("Informe seu sexo: \n digite M para masculino \n digite F para feminino") sexo = input() print("Informe sua altura:") h = float(input()) if(sexo == "f" or "F" or "feminino" or "Feminino"): pesoIdeal = (62.1*h) - 44.7 print("O seu peso ideal é {}".format(pesoIdeal)) elif(se...
true
true
1c06313ffbdfe7a9ad3bc27f10ae9700d9fbba16
1,276
py
Python
practica2/ejercicio2/scripts/generate_report.py
luisyanezblanco/python_certification
67ca7f8c2a5f891fbb7efc3e85bd240417b66838
[ "MIT" ]
null
null
null
practica2/ejercicio2/scripts/generate_report.py
luisyanezblanco/python_certification
67ca7f8c2a5f891fbb7efc3e85bd240417b66838
[ "MIT" ]
null
null
null
practica2/ejercicio2/scripts/generate_report.py
luisyanezblanco/python_certification
67ca7f8c2a5f891fbb7efc3e85bd240417b66838
[ "MIT" ]
null
null
null
#!/usr/bin/env python3 import csv def read_employees(csv_file_location): with open(csv_file_location) as file: csv.register_dialect('empDialect', skipinitialspace=True, strict=True) employee_file = csv.DictReader(open(csv_file_location), dialect = 'empDialect') e...
36.457143
95
0.644984
import csv def read_employees(csv_file_location): with open(csv_file_location) as file: csv.register_dialect('empDialect', skipinitialspace=True, strict=True) employee_file = csv.DictReader(open(csv_file_location), dialect = 'empDialect') employee_list = [] ...
true
true
1c0631f72bbcb976a702ee764d95c5eb87d57336
1,445
py
Python
scaper_concept/venv/lib/python3.9/site-packages/celery/app/annotations.py
edudbot/web-scraper
12c07f805427699b2c3a35ed7c0d7efbc3673a7f
[ "MIT" ]
3
2022-02-11T12:09:29.000Z
2022-02-12T19:13:17.000Z
scaper_concept/venv/lib/python3.9/site-packages/celery/app/annotations.py
edudbot/web-scraper
12c07f805427699b2c3a35ed7c0d7efbc3673a7f
[ "MIT" ]
null
null
null
scaper_concept/venv/lib/python3.9/site-packages/celery/app/annotations.py
edudbot/web-scraper
12c07f805427699b2c3a35ed7c0d7efbc3673a7f
[ "MIT" ]
1
2021-06-30T12:43:39.000Z
2021-06-30T12:43:39.000Z
"""Task Annotations. Annotations is a nice term for monkey-patching task classes in the configuration. This prepares and performs the annotations in the :setting:`task_annotations` setting. """ from celery.utils.functional import firstmethod, mlazy from celery.utils.imports import instantiate _first_match = firstmet...
27.264151
79
0.675433
from celery.utils.functional import firstmethod, mlazy from celery.utils.imports import instantiate _first_match = firstmethod('annotate') _first_match_any = firstmethod('annotate_any') __all__ = ('MapAnnotation', 'prepare', 'resolve_all') class MapAnnotation(dict): def annotate_any(self): try: ...
true
true
1c06321b843b031220087035ec27530d8eaac764
2,727
py
Python
tools/c7n_azure/tests/test_notify.py
sstarcher/cloud-custodian
fc5b51019e9c15d0582089133d080bceee489a94
[ "Apache-2.0" ]
1
2019-06-11T19:43:28.000Z
2019-06-11T19:43:28.000Z
tools/c7n_azure/tests/test_notify.py
sstarcher/cloud-custodian
fc5b51019e9c15d0582089133d080bceee489a94
[ "Apache-2.0" ]
1
2018-06-05T20:40:02.000Z
2018-06-05T21:15:51.000Z
tools/c7n_azure/tests/test_notify.py
sstarcher/cloud-custodian
fc5b51019e9c15d0582089133d080bceee489a94
[ "Apache-2.0" ]
1
2021-06-09T21:22:02.000Z
2021-06-09T21:22:02.000Z
# Copyright 2015-2018 Capital One Services, 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 ...
36.851351
87
0.573157
from __future__ import absolute_import, division, print_function, unicode_literals from azure_common import BaseTest, arm_template from c7n_azure.storage_utils import StorageUtilities from c7n_azure.session import Session class NotifyTest(BaseTest): def setUp(self): super(NotifyTest, self).setUp() ...
true
true
1c0632bd73fea194bd28d45b637940a79b98fddc
2,728
py
Python
data/cirq_new/cirq_program/startCirq_pragma389.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_pragma389.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
data/cirq_new/cirq_program/startCirq_pragma389.py
UCLA-SEAL/QDiff
d968cbc47fe926b7f88b4adf10490f1edd6f8819
[ "BSD-3-Clause" ]
null
null
null
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 5/15/20 4:49 PM # @File : grover.py # qubit number=4 # total number=17 import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np class Opty(cirq.PointOptimizer): def optimization_at( ...
32.86747
92
0.645894
import cirq import cirq.google as cg from typing import Optional import sys from math import log2 import numpy as np class Opty(cirq.PointOptimizer): def optimization_at( self, circuit: 'cirq.Circuit', index: int, op: 'cirq.Operation' ) -> Optional[cirq.PointOpti...
true
true
1c063372ef9b4806480d633d8fbdc0a2b9939296
1,581
py
Python
stock/filter/crossstar.py
shenzhongqiang/cnstock_py
2bb557657a646acb9d20d3ce78e15cf68390f8ea
[ "MIT" ]
2
2016-10-31T04:05:11.000Z
2017-04-17T08:46:53.000Z
stock/filter/crossstar.py
shenzhongqiang/cnstock_py
2bb557657a646acb9d20d3ce78e15cf68390f8ea
[ "MIT" ]
null
null
null
stock/filter/crossstar.py
shenzhongqiang/cnstock_py
2bb557657a646acb9d20d3ce78e15cf68390f8ea
[ "MIT" ]
null
null
null
from stock.filter.interface import Filter, CheckResult from stock.globalvar import * from stock.marketdata import * import logging import logging.config logging.config.fileConfig(LOGCONF) logger = logging.getLogger(__name__) class CrossStar(Filter): def check(self, exsymbol): #print exsymbol try: ...
37.642857
85
0.59203
from stock.filter.interface import Filter, CheckResult from stock.globalvar import * from stock.marketdata import * import logging import logging.config logging.config.fileConfig(LOGCONF) logger = logging.getLogger(__name__) class CrossStar(Filter): def check(self, exsymbol): try: if i...
false
true
1c063394bfbfc343fc1929c3f173cf61e0fdece3
1,090
py
Python
pincer/utils/__init__.py
DamnikB/Pincer
d2b1e22d49a528d59c3e912ddbd4735d9d5a3ef9
[ "MIT" ]
null
null
null
pincer/utils/__init__.py
DamnikB/Pincer
d2b1e22d49a528d59c3e912ddbd4735d9d5a3ef9
[ "MIT" ]
null
null
null
pincer/utils/__init__.py
DamnikB/Pincer
d2b1e22d49a528d59c3e912ddbd4735d9d5a3ef9
[ "MIT" ]
null
null
null
# Copyright Pincer 2021-Present # Full MIT License can be found in `LICENSE` at the project root. from .api_object import APIObject, HTTPMeta, ChannelProperty, GuildProperty from .color import Color from .conversion import construct_client_dict from .directory import chdir from .event_mgr import EventMgr from .extract...
38.928571
78
0.774312
from .api_object import APIObject, HTTPMeta, ChannelProperty, GuildProperty from .color import Color from .conversion import construct_client_dict from .directory import chdir from .event_mgr import EventMgr from .extraction import get_index from .insertion import should_pass_cls, should_pass_ctx from .replace import ...
true
true
1c06350fe4a23e1e1f22ffb5e202b6c2b1a7d714
7,955
py
Python
docs/conf.py
wycemiro/gpstracker
a25401d409a0ddd75edb9c4d3e6bdc40b446dc8c
[ "MIT" ]
1
2018-04-12T17:25:10.000Z
2018-04-12T17:25:10.000Z
docs/conf.py
wycemiro/gpstracker
a25401d409a0ddd75edb9c4d3e6bdc40b446dc8c
[ "MIT" ]
2
2016-12-08T16:49:40.000Z
2016-12-08T16:54:25.000Z
docs/conf.py
wycemiro/gpstracker
a25401d409a0ddd75edb9c4d3e6bdc40b446dc8c
[ "MIT" ]
1
2020-03-23T11:56:24.000Z
2020-03-23T11:56:24.000Z
# -*- coding: utf-8 -*- # # Cookie Cutter Demo documentation build configuration file, created by # sphinx-quickstart. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All configuration va...
32.076613
80
0.707605
from __future__ import unicode_literals import os import sys extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'Cookie Cutter Demo' copyright = """2016, David Currie""" # |version| and |release|, also used in various other places throughout the # built doc...
true
true
1c06352d2a1365dab6a45e559c004e5847785fd1
12,936
py
Python
idaes/models_extra/power_generation/costing/tests/test_NGCC_costing.py
OOAmusat/idaes-pse
ae7d3bb8e372bc32822dcdcb75e9fd96b78da539
[ "RSA-MD" ]
null
null
null
idaes/models_extra/power_generation/costing/tests/test_NGCC_costing.py
OOAmusat/idaes-pse
ae7d3bb8e372bc32822dcdcb75e9fd96b78da539
[ "RSA-MD" ]
null
null
null
idaes/models_extra/power_generation/costing/tests/test_NGCC_costing.py
OOAmusat/idaes-pse
ae7d3bb8e372bc32822dcdcb75e9fd96b78da539
[ "RSA-MD" ]
1
2022-03-17T11:08:43.000Z
2022-03-17T11:08:43.000Z
################################################################################# # The Institute for the Design of Advanced Energy Systems Integrated Platform # Framework (IDAES IP) was produced under the DOE Institute for the # Design of Advanced Energy Systems (IDAES), and is copyright (c) 2018-2021 # by the softwar...
35.734807
88
0.676175
import pytest from idaes.models_extra.power_generation.costing.power_plant_costing import ( get_PP_costing, get_total_TPC, costing_initialization, ) from idaes.core.util.model_statistics import degrees_of_freedom import pyomo.environ as pyo from idaes.core import FlowsheetBlock from idaes.core.solvers impor...
true
true
1c06353e4930b6279bae9a179d5e4af44dcbff00
9,404
py
Python
app.py
paoga87/AppSec_flask_db
d7315c88230646f26f750243e79ff74b412b29d1
[ "MIT" ]
null
null
null
app.py
paoga87/AppSec_flask_db
d7315c88230646f26f750243e79ff74b412b29d1
[ "MIT" ]
null
null
null
app.py
paoga87/AppSec_flask_db
d7315c88230646f26f750243e79ff74b412b29d1
[ "MIT" ]
null
null
null
import os import subprocess import json import re from subprocess import Popen, PIPE, check_output from flask import Flask, render_template, redirect, url_for, session, request from flask_wtf.csrf import CSRFProtect from flask_talisman import Talisman from passlib.hash import sha256_crypt from flask_sqlalchemy import S...
37.919355
420
0.605274
import os import subprocess import json import re from subprocess import Popen, PIPE, check_output from flask import Flask, render_template, redirect, url_for, session, request from flask_wtf.csrf import CSRFProtect from flask_talisman import Talisman from passlib.hash import sha256_crypt from flask_sqlalchemy import S...
true
true
1c0635bd12e51423fb04434ceab8a00db7974abe
4,187
py
Python
src/olympia/files/tests/test_decorators.py
snifhex/addons-server
2b9dee65c10c0dca700ff2d25f3694c7cf769816
[ "BSD-3-Clause" ]
null
null
null
src/olympia/files/tests/test_decorators.py
snifhex/addons-server
2b9dee65c10c0dca700ff2d25f3694c7cf769816
[ "BSD-3-Clause" ]
null
null
null
src/olympia/files/tests/test_decorators.py
snifhex/addons-server
2b9dee65c10c0dca700ff2d25f3694c7cf769816
[ "BSD-3-Clause" ]
null
null
null
from django import http from django.core.exceptions import ObjectDoesNotExist, PermissionDenied from django.test import RequestFactory import pytest from unittest.mock import Mock, patch from olympia import amo from olympia.access import acl from olympia.amo.tests import TestCase from olympia.files.decorators import...
41.04902
83
0.711249
from django import http from django.core.exceptions import ObjectDoesNotExist, PermissionDenied from django.test import RequestFactory import pytest from unittest.mock import Mock, patch from olympia import amo from olympia.access import acl from olympia.amo.tests import TestCase from olympia.files.decorators import...
true
true
1c0637c81af6870faecb68a3ed7a5a784c251103
2,041
py
Python
modules/python/package/setup.py
john-forrest/opencv
6330fa5022e3b42c730ca222bc09f64027dfa59e
[ "BSD-3-Clause" ]
3
2018-11-29T13:12:58.000Z
2020-07-20T09:25:35.000Z
modules/python/package/setup.py
shashiranjan05/opencv
e82e672a933c8bd713ff53ac9ca553ede169b566
[ "BSD-3-Clause" ]
1
2021-06-25T15:16:59.000Z
2021-06-25T15:16:59.000Z
modules/python/package/setup.py
shashiranjan05/opencv
e82e672a933c8bd713ff53ac9ca553ede169b566
[ "BSD-3-Clause" ]
2
2019-05-12T08:43:57.000Z
2019-07-22T15:12:44.000Z
import os import sys import platform import setuptools SCRIPT_DIR=os.path.dirname(os.path.abspath(__file__)) def main(): os.chdir(SCRIPT_DIR) package_name = 'opencv' package_version = os.environ.get('OPENCV_VERSION', '4.0.0') # TODO long_description = 'Open Source Computer Vision Library Python bin...
35.189655
84
0.601666
import os import sys import platform import setuptools SCRIPT_DIR=os.path.dirname(os.path.abspath(__file__)) def main(): os.chdir(SCRIPT_DIR) package_name = 'opencv' package_version = os.environ.get('OPENCV_VERSION', '4.0.0') long_description = 'Open Source Computer Vision Library Python bindings' ...
true
true
1c063818ddeb454dbb7be3f879be1768696a2e25
2,520
py
Python
tests/models/validators/v2_2_1/jsd_e3e170003d865b9a8d76cbe1d2f268be.py
oboehmer/dnacentersdk
25c4e99900640deee91a56aa886874d9cb0ca960
[ "MIT" ]
32
2019-09-05T05:16:56.000Z
2022-03-22T09:50:38.000Z
tests/models/validators/v2_2_1/jsd_e3e170003d865b9a8d76cbe1d2f268be.py
oboehmer/dnacentersdk
25c4e99900640deee91a56aa886874d9cb0ca960
[ "MIT" ]
35
2019-09-07T18:58:54.000Z
2022-03-24T19:29:36.000Z
tests/models/validators/v2_2_1/jsd_e3e170003d865b9a8d76cbe1d2f268be.py
oboehmer/dnacentersdk
25c4e99900640deee91a56aa886874d9cb0ca960
[ "MIT" ]
18
2019-09-09T11:07:21.000Z
2022-03-25T08:49:59.000Z
# -*- coding: utf-8 -*- """Cisco DNA Center createTemplate data model. Copyright (c) 2019-2021 Cisco Systems. 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 withou...
34.054054
83
0.632143
from __future__ import ( absolute_import, division, print_function, unicode_literals, ) import fastjsonschema import json from dnacentersdk.exceptions import MalformedRequest from builtins import * class JSONSchemaValidatorE3E170003D865B9A8D76Cbe1D2F268Be(object): def __init__(self): s...
true
true
1c0638938ed08ce9c18d11b83a776e83a57f5d6e
415
py
Python
oi/Contest/self/2016-5/riteme/chain-gen.py
Riteme/test
b511d6616a25f4ae8c3861e2029789b8ee4dcb8d
[ "BSD-Source-Code" ]
3
2018-08-30T09:43:20.000Z
2019-12-03T04:53:43.000Z
oi/Contest/self/2016-5/riteme/chain-gen.py
Riteme/test
b511d6616a25f4ae8c3861e2029789b8ee4dcb8d
[ "BSD-Source-Code" ]
null
null
null
oi/Contest/self/2016-5/riteme/chain-gen.py
Riteme/test
b511d6616a25f4ae8c3861e2029789b8ee4dcb8d
[ "BSD-Source-Code" ]
null
null
null
#!/usr/bin/env pypy import sys from random import choice, randint, shuffle if len(sys.argv) < 3: print("Usage: {} [N] [M]".format(sys.argv[0])) exit(-1) N = int(sys.argv[1]) M = int(sys.argv[2]) CMAX = 10 print("%s %s" % (N, M)) for i in range(1, N): print("%s %s %s" % (i, i + 1, randint(0, CMAX))) fo...
18.863636
52
0.537349
import sys from random import choice, randint, shuffle if len(sys.argv) < 3: print("Usage: {} [N] [M]".format(sys.argv[0])) exit(-1) N = int(sys.argv[1]) M = int(sys.argv[2]) CMAX = 10 print("%s %s" % (N, M)) for i in range(1, N): print("%s %s %s" % (i, i + 1, randint(0, CMAX))) for i in range(0, M): ...
true
true
1c0638c73a265a1e9d679fecebc641ef7929e5a7
30,636
py
Python
Server/src/virtualenv/Lib/site-packages/pip/_vendor/html5lib/inputstream.py
ppyordanov/HCI_4_Future_Cities
4dc7dc59acccf30357bde66524c2d64c29908de8
[ "MIT" ]
null
null
null
Server/src/virtualenv/Lib/site-packages/pip/_vendor/html5lib/inputstream.py
ppyordanov/HCI_4_Future_Cities
4dc7dc59acccf30357bde66524c2d64c29908de8
[ "MIT" ]
null
null
null
Server/src/virtualenv/Lib/site-packages/pip/_vendor/html5lib/inputstream.py
ppyordanov/HCI_4_Future_Cities
4dc7dc59acccf30357bde66524c2d64c29908de8
[ "MIT" ]
null
null
null
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type import codecs import re from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase from .constants import encodings, ReparseException from . import utils from io import StringIO try: from io i...
34.616949
412
0.565936
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type import codecs import re from .constants import EOF, spaceCharacters, asciiLetters, asciiUppercase from .constants import encodings, ReparseException from . import utils from io import StringIO try: from io i...
true
true
1c0638c9d1d377ab49198293b5841e7b8b64bc0e
12,710
py
Python
slowboy/mmu.py
zmarvel/slowboy
c173343746b425f97d15ad0f25637f345b867fcd
[ "MIT" ]
2
2017-01-27T03:38:18.000Z
2022-02-18T12:07:26.000Z
slowboy/mmu.py
zmarvel/slowboy
c173343746b425f97d15ad0f25637f345b867fcd
[ "MIT" ]
4
2017-04-24T02:58:30.000Z
2017-04-24T03:13:10.000Z
slowboy/mmu.py
zmarvel/slowboy
c173343746b425f97d15ad0f25637f345b867fcd
[ "MIT" ]
null
null
null
import logging from slowboy.gpu import GPU, VRAM_START, OAM_START from slowboy.interrupts import InterruptController from slowboy.timer import Timer JOYP_SELECT_BUTTON_MASK = 0x20 JOYP_SELECT_DIRECTION_MASK = 0x10 class MMU(): def __init__(self, rom: bytes=None, gpu: GPU=None, timer: Timer=None, ...
33.624339
89
0.51251
import logging from slowboy.gpu import GPU, VRAM_START, OAM_START from slowboy.interrupts import InterruptController from slowboy.timer import Timer JOYP_SELECT_BUTTON_MASK = 0x20 JOYP_SELECT_DIRECTION_MASK = 0x10 class MMU(): def __init__(self, rom: bytes=None, gpu: GPU=None, timer: Timer=None, ...
true
true
1c0638e5ae7da2dbe68e57326c8336a8333fa2ab
1,068
py
Python
inference/huggingface/gpt-neo.py
JF-D/DeepSpeedExamples
9c48e366ee912affc90b414faae2d7e502478b79
[ "MIT" ]
null
null
null
inference/huggingface/gpt-neo.py
JF-D/DeepSpeedExamples
9c48e366ee912affc90b414faae2d7e502478b79
[ "MIT" ]
null
null
null
inference/huggingface/gpt-neo.py
JF-D/DeepSpeedExamples
9c48e366ee912affc90b414faae2d7e502478b79
[ "MIT" ]
null
null
null
import os import torch import deepspeed import transformers from deepspeed import module_inject from transformers import pipeline from transformers.models.gpt_neo.modeling_gpt_neo import GPTNeoBlock as gpt2_transformer # Get local gpu rank from torch.distributed/deepspeed launcher local_rank = int(os.getenv('LOCAL_RA...
39.555556
92
0.599251
import os import torch import deepspeed import transformers from deepspeed import module_inject from transformers import pipeline from transformers.models.gpt_neo.modeling_gpt_neo import GPTNeoBlock as gpt2_transformer local_rank = int(os.getenv('LOCAL_RANK', '0')) world_size = int(os.getenv('WORLD_SIZE', '1')) prin...
true
true
1c063a4285464280a81b4a7951bf6ec76cda64b2
1,295
py
Python
libmuscle/python/libmuscle/mcp/test/test_tcp_server.py
DongweiYe/muscle3
0c2fcf5f62995b8639fc84ce1b983c8a8e6248d0
[ "Apache-2.0" ]
null
null
null
libmuscle/python/libmuscle/mcp/test/test_tcp_server.py
DongweiYe/muscle3
0c2fcf5f62995b8639fc84ce1b983c8a8e6248d0
[ "Apache-2.0" ]
null
null
null
libmuscle/python/libmuscle/mcp/test/test_tcp_server.py
DongweiYe/muscle3
0c2fcf5f62995b8639fc84ce1b983c8a8e6248d0
[ "Apache-2.0" ]
null
null
null
import socket from typing import Dict import msgpack import pytest from ymmsl import Reference from libmuscle.outbox import Outbox from libmuscle.post_office import PostOffice from libmuscle.mcp.message import Message def test_create(tcp_server): assert tcp_server._instance_id == Reference('test_sender') as...
28.777778
69
0.706564
import socket from typing import Dict import msgpack import pytest from ymmsl import Reference from libmuscle.outbox import Outbox from libmuscle.post_office import PostOffice from libmuscle.mcp.message import Message def test_create(tcp_server): assert tcp_server._instance_id == Reference('test_sender') as...
true
true
1c063c38489f4878bc61266bbe4cb0f35d116a99
371
py
Python
python/arcPyUtils.py
rgohagan/idn_vam_wfp
e4fd7e43cbbbd4ea97ccdb907f5470a5c66d5dac
[ "MIT" ]
2
2021-04-02T02:21:24.000Z
2021-04-02T02:22:22.000Z
python/arcPyUtils.py
rgohagan/idn_vam_wfp
e4fd7e43cbbbd4ea97ccdb907f5470a5c66d5dac
[ "MIT" ]
null
null
null
python/arcPyUtils.py
rgohagan/idn_vam_wfp
e4fd7e43cbbbd4ea97ccdb907f5470a5c66d5dac
[ "MIT" ]
1
2016-07-18T07:00:17.000Z
2016-07-18T07:00:17.000Z
__author__ = 'rochelle' import arcpy def useSpatialAnalyst(): # Check out the ArcGIS Spatial Analyst extension license if arcpy.CheckExtension("Spatial") == "Available": arcpy.CheckOutExtension("Spatial") else: arcpy.AddMessage("Error: Couldn't get Spatial Analyst extenstion") retur...
30.916667
74
0.695418
__author__ = 'rochelle' import arcpy def useSpatialAnalyst(): if arcpy.CheckExtension("Spatial") == "Available": arcpy.CheckOutExtension("Spatial") else: arcpy.AddMessage("Error: Couldn't get Spatial Analyst extenstion") return -1 arcpy.env.overwriteOutput = 1 return 0
true
true
1c063c8b1ad01c0c5e8cdd12e9c8581ec1e92215
6,710
py
Python
src/nowicki.py
filesmuggler/cutter_node
c46f6c6033661c80145dcb69a4fb78177f6ee30f
[ "MIT" ]
null
null
null
src/nowicki.py
filesmuggler/cutter_node
c46f6c6033661c80145dcb69a4fb78177f6ee30f
[ "MIT" ]
null
null
null
src/nowicki.py
filesmuggler/cutter_node
c46f6c6033661c80145dcb69a4fb78177f6ee30f
[ "MIT" ]
1
2021-08-15T11:53:41.000Z
2021-08-15T11:53:41.000Z
#!/usr/bin/env python import sys,time import rospy import roslib import numpy as np from cv_bridge import CvBridge, CvBridgeError import cv2 import message_filters from sensor_msgs.msg import Image, CameraInfo from std_msgs.msg import Header class CutterNode: def __init__(self): self.image = np.zeros...
38.786127
117
0.637705
import sys,time import rospy import roslib import numpy as np from cv_bridge import CvBridge, CvBridgeError import cv2 import message_filters from sensor_msgs.msg import Image, CameraInfo from std_msgs.msg import Header class CutterNode: def __init__(self): self.image = np.zeros([480,640]) se...
true
true
1c063db34b4a06c06c04d52dd57f067f6071ca2b
2,434
py
Python
src/sentry/models/eventerror.py
E-LLP/sentry
83d97a0ca45cdaac1d5f3026058131a3aeae0068
[ "BSD-3-Clause" ]
null
null
null
src/sentry/models/eventerror.py
E-LLP/sentry
83d97a0ca45cdaac1d5f3026058131a3aeae0068
[ "BSD-3-Clause" ]
null
null
null
src/sentry/models/eventerror.py
E-LLP/sentry
83d97a0ca45cdaac1d5f3026058131a3aeae0068
[ "BSD-3-Clause" ]
null
null
null
from __future__ import absolute_import class EventError(object): INVALID_DATA = 'invalid_data' INVALID_ATTRIBUTE = 'invalid_attribute' VALUE_TOO_LONG = 'value_too_long' UNKNOWN_ERROR = 'unknown_error' SECURITY_VIOLATION = 'security_violation' RESTRICTED_IP = 'restricted_ip' JS_GENERIC_FET...
47.72549
92
0.721857
from __future__ import absolute_import class EventError(object): INVALID_DATA = 'invalid_data' INVALID_ATTRIBUTE = 'invalid_attribute' VALUE_TOO_LONG = 'value_too_long' UNKNOWN_ERROR = 'unknown_error' SECURITY_VIOLATION = 'security_violation' RESTRICTED_IP = 'restricted_ip' JS_GENERIC_FET...
true
true
1c063dec940e820d4b53c977c38c7560e118a48b
2,908
py
Python
uln2003.py
rgov/uln2003
b351b2fd18ac8d425d8e4bc876247f70ddae800c
[ "MIT" ]
null
null
null
uln2003.py
rgov/uln2003
b351b2fd18ac8d425d8e4bc876247f70ddae800c
[ "MIT" ]
null
null
null
uln2003.py
rgov/uln2003
b351b2fd18ac8d425d8e4bc876247f70ddae800c
[ "MIT" ]
1
2019-10-12T20:00:16.000Z
2019-10-12T20:00:16.000Z
# (c) IDWizard 2017 # MIT License. LOW = const(0) HIGH = const(1) HALF_STEP = [ [LOW, LOW, LOW, HIGH], [LOW, LOW, HIGH, HIGH], [LOW, LOW, HIGH, LOW], [LOW, HIGH, HIGH, LOW], [LOW, HIGH, LOW, LOW], [HIGH, HIGH, LOW, LOW], [HIGH, LOW, LOW, LOW], [HIGH, LOW, LOW, HIGH], ] FULL_STEP = [ ...
26.678899
81
0.555365
LOW = const(0) HIGH = const(1) HALF_STEP = [ [LOW, LOW, LOW, HIGH], [LOW, LOW, HIGH, HIGH], [LOW, LOW, HIGH, LOW], [LOW, HIGH, HIGH, LOW], [LOW, HIGH, LOW, LOW], [HIGH, HIGH, LOW, LOW], [HIGH, LOW, LOW, LOW], [HIGH, LOW, LOW, HIGH], ] FULL_STEP = [ [HIGH, LOW, HIGH, LOW], [LOW...
true
true
1c063e49b6a2c1623fd4cf386f25c5343c9967f4
160,431
py
Python
stream-loader.py
Senzing/stream-loader
a203f93f2170ac279d34cb4e751ae27529f3dfd7
[ "Apache-2.0" ]
2
2020-06-03T12:34:50.000Z
2021-02-03T15:59:17.000Z
stream-loader.py
Senzing/stream-loader
a203f93f2170ac279d34cb4e751ae27529f3dfd7
[ "Apache-2.0" ]
122
2018-12-13T15:57:20.000Z
2022-03-31T22:03:11.000Z
stream-loader.py
Senzing/stream-loader
a203f93f2170ac279d34cb4e751ae27529f3dfd7
[ "Apache-2.0" ]
6
2019-07-08T23:10:08.000Z
2021-11-05T09:29:16.000Z
#! /usr/bin/env python3 # ----------------------------------------------------------------------------- # stream-loader.py Loader for streaming input. # ----------------------------------------------------------------------------- import argparse import datetime import functools import importlib import json import li...
37.962849
292
0.615972
import argparse import datetime import functools import importlib import json import linecache import logging import math import multiprocessing import os import queue import random import re import signal import socket import string import subprocess import sys import threading import time from urllib.parse import u...
true
true
1c063eb3f4955c8f9748a349705c09824c86f6c6
3,660
py
Python
src/sdk/python/OsduClient/models/storage_record_history.py
mstest123/self-managed-osdu_from_Daniel
10a0c1d25804caa920bf18c6c7c1d8e711c63756
[ "MIT" ]
3
2021-11-05T20:52:54.000Z
2021-11-23T23:02:29.000Z
src/sdk/python/OsduClient/models/storage_record_history.py
mstest123/self-managed-osdu_from_Daniel
10a0c1d25804caa920bf18c6c7c1d8e711c63756
[ "MIT" ]
4
2021-11-05T19:57:08.000Z
2021-12-14T13:59:04.000Z
src/sdk/python/OsduClient/models/storage_record_history.py
mstest123/self-managed-osdu_from_Daniel
10a0c1d25804caa920bf18c6c7c1d8e711c63756
[ "MIT" ]
36
2021-08-31T20:58:25.000Z
2022-03-30T17:02:57.000Z
# coding: utf-8 """ self-managed-osdu Rest API Documentation for Self Managed OSDU # noqa: E501 OpenAPI spec version: 0.11.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six from OsduClient.configuration import Configurati...
29.047619
124
0.580328
import pprint import re import six from OsduClient.configuration import Configuration class StorageRecordHistory(object): swagger_types = { 'parents': 'list[str]' } attribute_map = { 'parents': 'parents' } def __init__(self, parents=None, _configuration=None): if ...
true
true
1c06411a6610a79d0e15806c6943a1e4647ca0c1
5,611
py
Python
SuperGlue-pytorch/load_data_D2net.py
Aniket-Gujarathi/d2-net
c716d37087390af04c8843452dadfa47a64cfbe2
[ "BSD-3-Clause-Clear" ]
null
null
null
SuperGlue-pytorch/load_data_D2net.py
Aniket-Gujarathi/d2-net
c716d37087390af04c8843452dadfa47a64cfbe2
[ "BSD-3-Clause-Clear" ]
null
null
null
SuperGlue-pytorch/load_data_D2net.py
Aniket-Gujarathi/d2-net
c716d37087390af04c8843452dadfa47a64cfbe2
[ "BSD-3-Clause-Clear" ]
null
null
null
import numpy as np import torch import os import cv2 import math import datetime import random import sys sys.path.append('../') from lib.save_features import extract from lib.model_test import D2Net from lib.model_test import D2Net from lib.pyramid import process_multiscale from scipy.spatial.distance import cdist fr...
34.635802
126
0.58011
import numpy as np import torch import os import cv2 import math import datetime import random import sys sys.path.append('../') from lib.save_features import extract from lib.model_test import D2Net from lib.model_test import D2Net from lib.pyramid import process_multiscale from scipy.spatial.distance import cdist fr...
true
true
1c064120f5638ad8f8aabd34830b71f6d8db6f7a
3,265
py
Python
src/diamond/handler/test/teststatsdhandler.py
Nihn/Diamond-1
1d666bd762d189983548325e8b46db845cbf0320
[ "MIT" ]
5
2015-10-30T08:37:40.000Z
2021-06-15T15:02:40.000Z
src/diamond/handler/test/teststatsdhandler.py
Nihn/Diamond-1
1d666bd762d189983548325e8b46db845cbf0320
[ "MIT" ]
null
null
null
src/diamond/handler/test/teststatsdhandler.py
Nihn/Diamond-1
1d666bd762d189983548325e8b46db845cbf0320
[ "MIT" ]
3
2016-03-30T00:23:30.000Z
2017-05-05T02:48:34.000Z
#!/usr/bin/python # coding=utf-8 ########################################################################## from test import unittest from test import run_only from mock import patch from mock import ANY import configobj from diamond.handler.stats_d import StatsdHandler from diamond.metric import Metric def run_on...
30.801887
74
0.606432
from test import unittest from test import run_only from mock import patch from mock import ANY import configobj from diamond.handler.stats_d import StatsdHandler from diamond.metric import Metric def run_only_if_statsd_is_available(func): try: import statsd except ImportError: statsd = Non...
true
true
1c0641b0332a07714c684287f0a3ead5a8743e8d
7,926
py
Python
openbb_terminal/reports/reports_controller.py
JerBouma/OpenBBTerminal
0c60d70cb29b0a6e4db41d6dd0d34f79a6169b27
[ "MIT" ]
null
null
null
openbb_terminal/reports/reports_controller.py
JerBouma/OpenBBTerminal
0c60d70cb29b0a6e4db41d6dd0d34f79a6169b27
[ "MIT" ]
null
null
null
openbb_terminal/reports/reports_controller.py
JerBouma/OpenBBTerminal
0c60d70cb29b0a6e4db41d6dd0d34f79a6169b27
[ "MIT" ]
null
null
null
"""Reports Controller Module.""" __docformat__ = "numpy" import logging # pylint: disable=R1732 import os import webbrowser from ast import literal_eval from datetime import datetime from typing import List import papermill as pm from prompt_toolkit.completion import NestedCompleter from openbb_terminal import feat...
34.017167
106
0.539112
__docformat__ = "numpy" import logging import os import webbrowser from ast import literal_eval from datetime import datetime from typing import List import papermill as pm from prompt_toolkit.completion import NestedCompleter from openbb_terminal import feature_flags as obbff from openbb_terminal.decorators import...
true
true
1c0641cc08171b7f247524bedebead42d99e8410
527
py
Python
provarme_dashboard/migrations/0020_auto_20190628_2246.py
arferreira/dropazul_app
f341da5f2bcccd2c1f40fad00c6e5d77bba4c6f3
[ "MIT" ]
null
null
null
provarme_dashboard/migrations/0020_auto_20190628_2246.py
arferreira/dropazul_app
f341da5f2bcccd2c1f40fad00c6e5d77bba4c6f3
[ "MIT" ]
9
2020-06-05T23:49:20.000Z
2022-01-13T01:43:03.000Z
provarme_dashboard/migrations/0020_auto_20190628_2246.py
arferreira/dropazul_app
f341da5f2bcccd2c1f40fad00c6e5d77bba4c6f3
[ "MIT" ]
null
null
null
# Generated by Django 2.0.5 on 2019-06-29 01:46 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('provarme_dashboard', '0019_checkout'), ] operations = [ migrations.AlterField( model_name='chec...
26.35
153
0.662239
from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('provarme_dashboard', '0019_checkout'), ] operations = [ migrations.AlterField( model_name='checkout', name='customer', ...
true
true