hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
79465a5ca2d9d6567de661268dda2623f62c51b8 | 1,036 | py | Python | train_mineral_shards.py | llSourcell/A-Guide-to-DeepMind-s-StarCraft-AI-Environment- | cd8bd7ac637ddb9bec7e8f7a3e9eee03569fcade | [
"Apache-2.0"
] | 217 | 2017-09-13T09:59:28.000Z | 2021-11-09T09:08:19.000Z | train_mineral_shards.py | llSourcell/A-Guide-to-DeepMind-s-StarCraft-AI-Environment- | cd8bd7ac637ddb9bec7e8f7a3e9eee03569fcade | [
"Apache-2.0"
] | 7 | 2017-09-19T14:13:11.000Z | 2019-08-23T01:58:08.000Z | train_mineral_shards.py | llSourcell/A-Guide-to-DeepMind-s-StarCraft-AI-Environment- | cd8bd7ac637ddb9bec7e8f7a3e9eee03569fcade | [
"Apache-2.0"
] | 86 | 2017-09-13T09:59:31.000Z | 2022-03-07T02:14:13.000Z | import sys
import gflags as flags
from baselines import deepq
from pysc2.env import sc2_env
from pysc2.lib import actions
import deepq_mineral_shards
_MOVE_SCREEN = actions.FUNCTIONS.Move_screen.id
_SELECT_ARMY = actions.FUNCTIONS.select_army.id
_SELECT_ALL = [0]
_NOT_QUEUED = [0]
step_mul = 8
FLAGS = flags.FLAGS
... | 19.923077 | 49 | 0.667954 |
79465ad17da4a565a37ca04e82e7732a94d9f54e | 1,647 | py | Python | Gof_script.py | jiaojiaogou/UDSBC | 6f6c2be39c5d1fa718825f63787e28ed8f37dc1a | [
"Apache-2.0"
] | null | null | null | Gof_script.py | jiaojiaogou/UDSBC | 6f6c2be39c5d1fa718825f63787e28ed8f37dc1a | [
"Apache-2.0"
] | null | null | null | Gof_script.py | jiaojiaogou/UDSBC | 6f6c2be39c5d1fa718825f63787e28ed8f37dc1a | [
"Apache-2.0"
] | null | null | null | ## this script writed to caculate the Gof (goodness of fit) of the GS streamflow data
## writed by Jiaojiao Gou 2022-05-05
import os
import math
import string
import numpy as np
import pandas as pd
import xarray as xr
from UDSBC.util import filter_nan
from UDSBC.Postprocess import gof_index
## read sta... | 29.945455 | 87 | 0.613236 |
79465b50e9ece70635c3973a2d674f0bba5f9f76 | 884 | py | Python | solenoid/records/migrations/0016_auto_20210716_1724.py | MITLibraries/solenoid | 9e21d95304058ded81267d9ea4030784a1652f1c | [
"Apache-2.0"
] | null | null | null | solenoid/records/migrations/0016_auto_20210716_1724.py | MITLibraries/solenoid | 9e21d95304058ded81267d9ea4030784a1652f1c | [
"Apache-2.0"
] | 416 | 2017-05-01T21:45:00.000Z | 2022-02-11T22:28:12.000Z | solenoid/records/migrations/0016_auto_20210716_1724.py | MITLibraries/solenoid | 9e21d95304058ded81267d9ea4030784a1652f1c | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.2.5 on 2021-07-16 17:24
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('records', '0015_auto_20200403_1856'),
]
operations = [
migrations.AlterField(
model_name='record',
name='acq_method'... | 26 | 63 | 0.563348 |
79465ba06d8047d04b85159d4d84a09cbc9b9a8f | 540 | py | Python | patsy/dependancies/database.py | python-discord/patsy | 159fb05022d7302e7ef5df4ddce108b293a5bc19 | [
"MIT"
] | 1 | 2022-01-16T21:02:53.000Z | 2022-01-16T21:02:53.000Z | patsy/dependancies/database.py | python-discord/patsy | 159fb05022d7302e7ef5df4ddce108b293a5bc19 | [
"MIT"
] | null | null | null | patsy/dependancies/database.py | python-discord/patsy | 159fb05022d7302e7ef5df4ddce108b293a5bc19 | [
"MIT"
] | 2 | 2021-11-07T21:16:02.000Z | 2021-12-05T20:00:45.000Z | from sqlalchemy.ext.asyncio import AsyncSession, create_async_engine
from sqlalchemy.future import Engine
from sqlalchemy.orm import sessionmaker
from patsy.settings import CONFIG, DATABASE
engine: Engine = create_async_engine(DATABASE.database_url, echo=CONFIG.debug, future=True)
async def get_session():
"""Yi... | 31.764706 | 91 | 0.77037 |
79465c09cf0080010b150384600f1d8ba5334584 | 1,139 | py | Python | tests/test_columns_statistics_api.py | Ramanth/analyticsapi-engines-python-sdk | 93af954e3bd2107146d4914437feb8e27c159741 | [
"Apache-2.0"
] | 12 | 2019-12-01T10:34:50.000Z | 2022-03-14T00:11:21.000Z | tests/test_columns_statistics_api.py | Ramanth/analyticsapi-engines-python-sdk | 93af954e3bd2107146d4914437feb8e27c159741 | [
"Apache-2.0"
] | 33 | 2019-12-01T12:14:01.000Z | 2022-03-22T04:50:30.000Z | tests/test_columns_statistics_api.py | Ramanth/analyticsapi-engines-python-sdk | 93af954e3bd2107146d4914437feb8e27c159741 | [
"Apache-2.0"
] | 1 | 2019-12-01T10:34:52.000Z | 2019-12-01T10:34:52.000Z | import unittest
from fds.analyticsapi.engines.api.column_statistics_api import ColumnStatisticsApi
from fds.analyticsapi.engines.model.column_statistic import ColumnStatistic
from fds.analyticsapi.engines.model.column_statistic_root import ColumnStatisticRoot
from common_functions import CommonFunctions
class TestC... | 36.741935 | 84 | 0.705882 |
79465deacd60b28afaf9536b5f351b27e3c77d78 | 1,198 | py | Python | tests/utils.py | yvdlima/python-zeep | aae3def4385b0f8922e0e83b9cdcd68b2263f739 | [
"MIT"
] | 3 | 2017-04-01T16:05:52.000Z | 2019-07-26T14:32:26.000Z | tests/utils.py | yvdlima/python-zeep | aae3def4385b0f8922e0e83b9cdcd68b2263f739 | [
"MIT"
] | null | null | null | tests/utils.py | yvdlima/python-zeep | aae3def4385b0f8922e0e83b9cdcd68b2263f739 | [
"MIT"
] | 2 | 2020-11-18T09:49:46.000Z | 2021-07-08T14:02:03.000Z | import six
from lxml import etree
from six import binary_type, string_types
def load_xml(xml):
parser = etree.XMLParser(
remove_blank_text=True, remove_comments=True, resolve_entities=False
)
return etree.fromstring(xml.strip(), parser=parser)
def assert_nodes_equal(result, expected):
def _c... | 25.489362 | 76 | 0.66611 |
79465e34f57ecd7f2b619b619a9f12dc1e5a296b | 927 | bzl | Python | antlir/bzl/linux/time.bzl | zeroxoneb/antlir | 811d88965610d16a5c85d831d317f087797ca732 | [
"MIT"
] | 28 | 2020-08-11T16:22:46.000Z | 2022-03-04T15:41:52.000Z | antlir/bzl/linux/time.bzl | zeroxoneb/antlir | 811d88965610d16a5c85d831d317f087797ca732 | [
"MIT"
] | 137 | 2020-08-11T16:07:49.000Z | 2022-02-27T10:59:05.000Z | antlir/bzl/linux/time.bzl | zeroxoneb/antlir | 811d88965610d16a5c85d831d317f087797ca732 | [
"MIT"
] | 10 | 2020-09-10T00:01:28.000Z | 2022-03-08T18:00:28.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
load("@bazel_skylib//lib:paths.bzl", "paths")
load("//antlir/bzl:image.bzl", "image")
load("//antlir/bzl/image/feature:defs.bzl", "feature")
... | 26.485714 | 79 | 0.63754 |
79465e3e6cd337377c7e3cb0590c9eafacc5ac58 | 68 | py | Python | maodevice/utils/__init__.py | mao-wfs/mao-device | 1c1ac88067da307d210234bebd7091fe5dc982c9 | [
"MIT"
] | null | null | null | maodevice/utils/__init__.py | mao-wfs/mao-device | 1c1ac88067da307d210234bebd7091fe5dc982c9 | [
"MIT"
] | null | null | null | maodevice/utils/__init__.py | mao-wfs/mao-device | 1c1ac88067da307d210234bebd7091fe5dc982c9 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from . import decorators
from . import misc
| 17 | 24 | 0.647059 |
79465f3febc1d595e17b8b509dd721aab00aa9ce | 3,605 | py | Python | app/route/stories/processor.py | LifeLaboratory/rosbank_backend | b19aed99b7084c14f0827933b7f28d6e51de92bd | [
"MIT"
] | 2 | 2019-12-06T23:22:33.000Z | 2019-12-08T07:18:31.000Z | app/route/stories/processor.py | LifeLaboratory/rosbank_backend | b19aed99b7084c14f0827933b7f28d6e51de92bd | [
"MIT"
] | 56 | 2019-12-06T17:54:07.000Z | 2019-12-08T04:55:24.000Z | app/route/stories/processor.py | LifeLaboratory/rosbank_backend | b19aed99b7084c14f0827933b7f28d6e51de92bd | [
"MIT"
] | 1 | 2019-12-08T05:04:46.000Z | 2019-12-08T05:04:46.000Z | from app.route.stories.provider import Provider
from app.api.base import base_name as names
from app.api.helper import get_id_user_by_profile, get_id_user_by_profiles
from app.api.helper import get_admins, get_all_profile
from app.route.notifications.processor import add_notification
def publicate_storie(args):
"... | 26.703704 | 103 | 0.654092 |
79465f6b393a46f3822c35aee53bf6b4a97567a4 | 2,191 | py | Python | autotf/ensemble/ML/example/test_stacking/classification.py | DAIM-ML/autotf | 3f82d858f49c27d5ecb624cee555fb8fd47bf067 | [
"BSD-3-Clause"
] | 8 | 2018-03-07T06:58:16.000Z | 2019-01-30T07:49:44.000Z | autotf/ensemble/ML/example/test_stacking/classification.py | DAIM-ML/autotf | 3f82d858f49c27d5ecb624cee555fb8fd47bf067 | [
"BSD-3-Clause"
] | null | null | null | autotf/ensemble/ML/example/test_stacking/classification.py | DAIM-ML/autotf | 3f82d858f49c27d5ecb624cee555fb8fd47bf067 | [
"BSD-3-Clause"
] | 1 | 2018-03-31T09:06:12.000Z | 2018-03-31T09:06:12.000Z | from sklearn.datasets import load_digits
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score, log_loss
from sklearn.ensemble import ExtraTreesClassifier
from sklearn.ensemble import RandomForestClassifier
from xgboost import XGBClassifier
from ensemble import Stacking
... | 38.438596 | 103 | 0.687814 |
79465fc3ff06f91a3655d64857e571f4b869a4bd | 3,670 | py | Python | xylearn/feature_extraction/tfidf.py | thautwarm/xylearn | ade885eb145a750cfe6c7c30896806cee6dfef59 | [
"MIT"
] | null | null | null | xylearn/feature_extraction/tfidf.py | thautwarm/xylearn | ade885eb145a750cfe6c7c30896806cee6dfef59 | [
"MIT"
] | null | null | null | xylearn/feature_extraction/tfidf.py | thautwarm/xylearn | ade885eb145a750cfe6c7c30896806cee6dfef59 | [
"MIT"
] | null | null | null | from sklearn.feature_extraction.text import TfidfTransformer
from collections import Counter
from typing import List
from sklearn.feature_extraction import DictVectorizer
from nltk.tokenize import word_tokenize
import nltk
import numpy as np
import xython as xy
import pandas as pd
import string
Word = str
Doc = List[... | 41.704545 | 259 | 0.70109 |
7946604a9b73e03a999050d2dcb6f2cdd8dddc1b | 3,820 | py | Python | common/src/stack/command/stack/commands/config/host/interface/__init__.py | knutsonchris/stacki | 33087dd5fa311984a66ccecfeee6f9c2c25f665d | [
"BSD-3-Clause"
] | null | null | null | common/src/stack/command/stack/commands/config/host/interface/__init__.py | knutsonchris/stacki | 33087dd5fa311984a66ccecfeee6f9c2c25f665d | [
"BSD-3-Clause"
] | null | null | null | common/src/stack/command/stack/commands/config/host/interface/__init__.py | knutsonchris/stacki | 33087dd5fa311984a66ccecfeee6f9c2c25f665d | [
"BSD-3-Clause"
] | null | null | null | # @copyright@
# Copyright (c) 2006 - 2019 Teradata
# All rights reserved. Stacki(r) v5.x stacki.com
# https://github.com/Teradata/stacki/blob/master/LICENSE.txt
# @copyright@
#
# @rocks@
# Copyright (c) 2000 - 2010 The Regents of the University of California
# All rights reserved. Rocks(r) v5.4 www.rocksclusters.org
# ... | 25.298013 | 95 | 0.647644 |
7946622b0e6c60284fb737fc8a80441154e5abfd | 8,499 | py | Python | lace/test_geometry.py | metabolize/lace | 75cee6a118932cd027692d6cfe36b3726b3a4a5c | [
"BSD-2-Clause"
] | null | null | null | lace/test_geometry.py | metabolize/lace | 75cee6a118932cd027692d6cfe36b3726b3a4a5c | [
"BSD-2-Clause"
] | 6 | 2018-07-12T22:22:14.000Z | 2019-09-28T15:47:38.000Z | lace/test_geometry.py | metabolize/lace | 75cee6a118932cd027692d6cfe36b3726b3a4a5c | [
"BSD-2-Clause"
] | null | null | null | import unittest
import numpy as np
from bltest import attr
import vg
from lace.cache import sc, vc
from lace.mesh import Mesh
class TestGeometryMixin(unittest.TestCase):
debug = False
@attr('missing_assets')
def test_cut_across_axis(self):
original_mesh = Mesh(filename=sc('s3://bodylabs-assets/exa... | 34.408907 | 103 | 0.589716 |
794662892560ebac6135122f05ea321073441773 | 3,739 | py | Python | eeve/taskinfo.py | vMarcelino/eeve | 7dcfa17d34480f5c120ce963680babffff8ab412 | [
"Apache-2.0"
] | 1 | 2019-10-11T18:42:48.000Z | 2019-10-11T18:42:48.000Z | eeve/taskinfo.py | vMarcelino/eeve | 7dcfa17d34480f5c120ce963680babffff8ab412 | [
"Apache-2.0"
] | null | null | null | eeve/taskinfo.py | vMarcelino/eeve | 7dcfa17d34480f5c120ce963680babffff8ab412 | [
"Apache-2.0"
] | 1 | 2019-10-11T18:42:49.000Z | 2019-10-11T18:42:49.000Z | from eeve.variable import VariableGroup, Variable
from dataclasses import dataclass
from typing import List
@dataclass
class TaskInfo:
actions: 'List[Action]'
global_variables: VariableGroup
task_variables: VariableGroup
local_variables: VariableGroup
current_action_index: int = 0
increment_ac... | 31.957265 | 101 | 0.564589 |
7946633eb5861a20e275a53d4f2d0f62498192d3 | 107,420 | py | Python | ambiente_virtual/Lib/site-packages/sqlalchemy/dialects/mssql/base.py | PI-UNIVESP-Penapolis/PRODEA | 1ced58f52bace8b6de0de3c6516b9fb7231da09c | [
"MIT"
] | 1 | 2021-09-22T13:14:37.000Z | 2021-09-22T13:14:37.000Z | ambiente_virtual/Lib/site-packages/sqlalchemy/dialects/mssql/base.py | PI-UNIVESP-Penapolis/PRODEA | 1ced58f52bace8b6de0de3c6516b9fb7231da09c | [
"MIT"
] | null | null | null | ambiente_virtual/Lib/site-packages/sqlalchemy/dialects/mssql/base.py | PI-UNIVESP-Penapolis/PRODEA | 1ced58f52bace8b6de0de3c6516b9fb7231da09c | [
"MIT"
] | null | null | null | # mssql/base.py
# Copyright (C) 2005-2021 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: mssql
:name: Microsoft SQL Server
:full_support: 2017
:no... | 32.394451 | 113 | 0.597161 |
7946636a349651824531fa7e95ab244cfa4717a4 | 2,118 | py | Python | asco.py | rafly7/asco | 6d4e7207cc06b4b8601d2d8c14f8ddf5095699ee | [
"MIT"
] | null | null | null | asco.py | rafly7/asco | 6d4e7207cc06b4b8601d2d8c14f8ddf5095699ee | [
"MIT"
] | null | null | null | asco.py | rafly7/asco | 6d4e7207cc06b4b8601d2d8c14f8ddf5095699ee | [
"MIT"
] | null | null | null | #author : rafly dipoe.a
import argparse
import asyncio
import aiohttp
import sys
import time
#Scope variable
loop = asyncio.get_event_loop()
LG='\033[1;32m' #green
DT='\033[0m' # Default
R='\033[0;31m' #red
def _argument():
parser = argparse.ArgumentParser(description="Cheking xss url",formatter_class=argparse.RawTe... | 26.475 | 132 | 0.615675 |
79466384e0c7d08ce5d10b50403399908ef1a994 | 3,632 | py | Python | tools/studio/cvra_studio/network/ParameterTree.py | greck2908/robot-software | 2e1e8177148a089e8883967375dde7f8ed3d878b | [
"MIT"
] | 40 | 2016-10-04T19:59:22.000Z | 2020-12-25T18:11:35.000Z | tools/studio/cvra_studio/network/ParameterTree.py | greck2908/robot-software | 2e1e8177148a089e8883967375dde7f8ed3d878b | [
"MIT"
] | 209 | 2016-09-21T21:54:28.000Z | 2022-01-26T07:42:37.000Z | tools/studio/cvra_studio/network/ParameterTree.py | greck2908/robot-software | 2e1e8177148a089e8883967375dde7f8ed3d878b | [
"MIT"
] | 21 | 2016-11-07T14:40:16.000Z | 2021-11-02T09:53:37.000Z | from collections import namedtuple
import logging
import queue
import uavcan
_Parameter = namedtuple("Parameter", ["name", "value", "type"])
class Parameter(_Parameter):
def __repr__(self):
return str(self.value)
def value_to_parameter(value, name=""):
if isinstance(value, bool):
return P... | 29.528455 | 83 | 0.60848 |
794663f00769e70b212db71032e84da4a1e7bfdf | 1,787 | py | Python | convert_tflite.py | elentail/Serving | 5aad0d310420bae31ab06972e4837b8309fda057 | [
"MIT"
] | null | null | null | convert_tflite.py | elentail/Serving | 5aad0d310420bae31ab06972e4837b8309fda057 | [
"MIT"
] | null | null | null | convert_tflite.py | elentail/Serving | 5aad0d310420bae31ab06972e4837b8309fda057 | [
"MIT"
] | null | null | null | import os
import numpy as np
import tensorflow as tf
# fixed folder
saved_model_dir = "tf_cnn_model/1/"
target_dir = "tflite_cnn_model"
def convert_tflite():
if not os.path.exists(target_dir):
os.makedirs(target_dir)
converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir)
... | 33.092593 | 110 | 0.691102 |
7946642c724f81e04e3091420010e35d5159f522 | 8,467 | py | Python | TxfmPlotWindow.py | dtauxe/hackcu-ad | 7870b741244f8f04cd87ae79896ef825425dcbd1 | [
"Apache-2.0"
] | null | null | null | TxfmPlotWindow.py | dtauxe/hackcu-ad | 7870b741244f8f04cd87ae79896ef825425dcbd1 | [
"Apache-2.0"
] | null | null | null | TxfmPlotWindow.py | dtauxe/hackcu-ad | 7870b741244f8f04cd87ae79896ef825425dcbd1 | [
"Apache-2.0"
] | null | null | null | # Window for plotting transform pairs
import sys
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import Qt
from TxfmPlotHelper import TxfmPlotHelper
from poleSeeker import poleSeeker
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as QMatFigCanvas
#from matplotlib.backends.... | 33.733068 | 126 | 0.568088 |
7946643ec7f55932414f9c9964769a94e36b6d98 | 323 | py | Python | test/test_error.py | coord-e/lottery-backend | 4e1136ea62c471c98871ae28ad6b5144657151b4 | [
"MIT"
] | 3 | 2019-03-17T12:53:25.000Z | 2020-06-28T07:05:47.000Z | test/test_error.py | coord-e/lottery-backend | 4e1136ea62c471c98871ae28ad6b5144657151b4 | [
"MIT"
] | 297 | 2018-06-23T09:48:04.000Z | 2021-09-08T00:06:11.000Z | test/test_error.py | Sakuten/lottery-backend | 4e1136ea62c471c98871ae28ad6b5144657151b4 | [
"MIT"
] | 3 | 2019-03-07T15:38:19.000Z | 2019-03-30T08:00:14.000Z | from api.error import error_response
def test_error_response(client):
with client.application.app_context():
resp, http_code = error_response(0)
resp = resp.get_json()
assert http_code is not None
assert 'message' in resp
assert 'code' in resp
assert resp['code'] ==... | 26.916667 | 43 | 0.650155 |
79466682fd554ecfd18cb9c882be5af04d138c24 | 7,187 | py | Python | tests/test_freshroastsr700.py | trankin/freshroastsr700 | 85e2a353bb8e88dc04d9319b5476447620c37d1e | [
"MIT"
] | 12 | 2017-04-07T16:27:58.000Z | 2021-06-22T14:58:22.000Z | tests/test_freshroastsr700.py | trankin/freshroastsr700 | 85e2a353bb8e88dc04d9319b5476447620c37d1e | [
"MIT"
] | 23 | 2015-11-17T03:16:00.000Z | 2021-12-11T00:42:53.000Z | tests/test_freshroastsr700.py | trankin/freshroastsr700 | 85e2a353bb8e88dc04d9319b5476447620c37d1e | [
"MIT"
] | 12 | 2016-06-25T13:30:52.000Z | 2020-10-11T15:36:32.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2015-2016 Mark Spicer
# Made available under the MIT license.
import unittest
import freshroastsr700
from freshroastsr700 import exceptions
class TestFreshroastsr700(unittest.TestCase):
def setUp(self):
self.roaster = freshroastsr700.freshroastsr700(thermostat=Tru... | 39.927778 | 72 | 0.716572 |
794667005b4f96118d524d96e9d320d902e4928f | 1,842 | py | Python | pywavefront/exceptions.py | RoyJames/PyWavefront | 7f5e713f935e5ff109de8a0cd2f3eaba04e9722c | [
"BSD-3-Clause"
] | 139 | 2019-02-25T11:42:05.000Z | 2022-03-17T18:49:27.000Z | pywavefront/exceptions.py | RoyJames/PyWavefront | 7f5e713f935e5ff109de8a0cd2f3eaba04e9722c | [
"BSD-3-Clause"
] | 72 | 2016-01-22T14:00:31.000Z | 2019-02-22T16:47:15.000Z | pywavefront/exceptions.py | RoyJames/PyWavefront | 7f5e713f935e5ff109de8a0cd2f3eaba04e9722c | [
"BSD-3-Clause"
] | 42 | 2015-07-29T16:01:57.000Z | 2019-01-15T09:17:40.000Z | # ----------------------------------------------------------------------------
# PyWavefront
# Copyright (c) 2018 Kurt Yoder
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistribution... | 47.230769 | 78 | 0.70684 |
79466732dead6421793b2369c0a1ecd9d1e1cfa4 | 7,719 | py | Python | custom/ilsgateway/tanzania/reports/facility_details.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2020-05-05T13:10:01.000Z | 2020-05-05T13:10:01.000Z | custom/ilsgateway/tanzania/reports/facility_details.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2019-12-09T14:00:14.000Z | 2019-12-09T14:00:14.000Z | custom/ilsgateway/tanzania/reports/facility_details.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 division
from __future__ import unicode_literals
from corehq.apps.commtrack.models import StockState
from corehq.apps.locations.dbaccessors import get_user_docs_by_location
from corehq.apps.locations.models import SQLLocation
from corehq.apps.reports.datatab... | 32.987179 | 104 | 0.609794 |
7946674b69742ef5e4ec7f1624dc932023a07153 | 98 | py | Python | flusher/flusher/cli.py | LeastAuthority/bandchain | 68814332e458767fe09a2856f43df6ce0545713e | [
"Apache-2.0"
] | 1 | 2021-06-29T04:20:50.000Z | 2021-06-29T04:20:50.000Z | flusher/flusher/cli.py | LeastAuthority/bandchain | 68814332e458767fe09a2856f43df6ce0545713e | [
"Apache-2.0"
] | 2 | 2020-07-07T12:40:17.000Z | 2020-07-20T01:51:55.000Z | flusher/flusher/cli.py | LeastAuthority/bandchain | 68814332e458767fe09a2856f43df6ce0545713e | [
"Apache-2.0"
] | null | null | null | import click
@click.group()
def cli():
"""BandChain's flusher utility program."""
pass
| 10.888889 | 46 | 0.632653 |
7946679a43e7677634a08ad38adb945548628d8a | 4,054 | py | Python | src/pretalx/common/views.py | MaxRink/pretalx | 6f0e944ba1721b0d665b180407b40a558940aca6 | [
"Apache-2.0"
] | null | null | null | src/pretalx/common/views.py | MaxRink/pretalx | 6f0e944ba1721b0d665b180407b40a558940aca6 | [
"Apache-2.0"
] | null | null | null | src/pretalx/common/views.py | MaxRink/pretalx | 6f0e944ba1721b0d665b180407b40a558940aca6 | [
"Apache-2.0"
] | null | null | null | import os.path
import urllib
from contextlib import suppress
from django.conf import settings
from django.contrib import messages
from django.contrib.auth import login
from django.http import FileResponse, Http404
from django.shortcuts import redirect
from django.utils.http import is_safe_url
from django.utils.timezon... | 36.522523 | 114 | 0.686976 |
7946681c51648b1074aae3f3ad3baf1458243a65 | 2,306 | py | Python | tools/Polygraphy/polygraphy/backend/pyt/runner.py | 5had3z/TensorRT | 8561894f7373c5c87a0b67c9a8661b345971aa09 | [
"Apache-2.0"
] | 4 | 2021-04-16T13:49:38.000Z | 2022-01-16T08:58:07.000Z | tools/Polygraphy/polygraphy/backend/pyt/runner.py | 5had3z/TensorRT | 8561894f7373c5c87a0b67c9a8661b345971aa09 | [
"Apache-2.0"
] | null | null | null | tools/Polygraphy/polygraphy/backend/pyt/runner.py | 5had3z/TensorRT | 8561894f7373c5c87a0b67c9a8661b345971aa09 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appl... | 36.603175 | 144 | 0.651344 |
7946684f199be9c500036d85a3e981c4b3cc5b54 | 553 | py | Python | nbkode/testsuite/__init__.py | Yash-10/numbakit-ode | aa5a0f417a2218bd471db754b35cc61996b2461e | [
"BSD-3-Clause"
] | 37 | 2020-11-07T08:53:49.000Z | 2021-12-24T00:01:16.000Z | nbkode/testsuite/__init__.py | Yash-10/numbakit-ode | aa5a0f417a2218bd471db754b35cc61996b2461e | [
"BSD-3-Clause"
] | 24 | 2020-11-04T02:05:28.000Z | 2022-03-28T21:14:08.000Z | nbkode/testsuite/__init__.py | Yash-10/numbakit-ode | aa5a0f417a2218bd471db754b35cc61996b2461e | [
"BSD-3-Clause"
] | 4 | 2020-12-24T09:19:50.000Z | 2022-03-04T16:45:49.000Z | """
nbkode.testsuite
~~~~~~~~~~~~~~~~
numbakit-ode (nbkode) is a Python package to solve
**ordinary differential equations (ODE)** that uses
numba to compile code and therefore speed up calculations.
:copyright: 2020 by nbkode Authors, see AUTHORS for more details.
:license: BSD, see LICEN... | 23.041667 | 73 | 0.631103 |
794668844cba4edba1c2cca522fe26e29ee1021e | 695 | py | Python | mar-crawlers/common/crawler_common.py | chema0/mar | a1ed70744603d1f9c838042054537849745b1c31 | [
"Apache-2.0"
] | 2 | 2021-06-22T13:59:25.000Z | 2022-01-29T18:53:26.000Z | mar-crawlers/common/crawler_common.py | chema0/mar | a1ed70744603d1f9c838042054537849745b1c31 | [
"Apache-2.0"
] | 8 | 2021-05-03T13:36:30.000Z | 2022-02-07T08:35:40.000Z | mar-crawlers/common/crawler_common.py | chema0/mar | a1ed70744603d1f9c838042054537849745b1c31 | [
"Apache-2.0"
] | 1 | 2022-01-27T10:00:23.000Z | 2022-01-27T10:00:23.000Z | import os
import sqlite3
def model_already_exists(model_id, c):
c.execute('SELECT model_id FROM data WHERE model_id = ?', [model_id])
value = c.fetchone()
return value is not None
def open_db(output_folder, database_name, smash=False):
db = os.path.join(output_folder, database_name)
if smash and o... | 26.730769 | 96 | 0.627338 |
794668cfb9071cf09d37fd9222b275cd3d1245c8 | 472 | py | Python | mayan/apps/appearance/migrations/0005_theme_font_other.py | TheerapatLoinok/Mayan-EDMS | dc06cc7a57aa2fe6ea97575d0196df4950e63975 | [
"Apache-2.0"
] | null | null | null | mayan/apps/appearance/migrations/0005_theme_font_other.py | TheerapatLoinok/Mayan-EDMS | dc06cc7a57aa2fe6ea97575d0196df4950e63975 | [
"Apache-2.0"
] | null | null | null | mayan/apps/appearance/migrations/0005_theme_font_other.py | TheerapatLoinok/Mayan-EDMS | dc06cc7a57aa2fe6ea97575d0196df4950e63975 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.2.24 on 2022-03-20 09:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('appearance', '0004_auto_20220320_0950'),
]
operations = [
migrations.AddField(
model_name='theme',
name='font_other... | 24.842105 | 131 | 0.631356 |
79466977235c674fdc21cfda2762af2723e5757d | 10,544 | py | Python | build_tools/bazel_to_cmake/bazel_to_cmake_targets.py | yzhang93/iree | 382fc631b663dee0b5bb60c617525e97880d5ece | [
"Apache-2.0"
] | null | null | null | build_tools/bazel_to_cmake/bazel_to_cmake_targets.py | yzhang93/iree | 382fc631b663dee0b5bb60c617525e97880d5ece | [
"Apache-2.0"
] | null | null | null | build_tools/bazel_to_cmake/bazel_to_cmake_targets.py | yzhang93/iree | 382fc631b663dee0b5bb60c617525e97880d5ece | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The IREE Authors
#
# Licensed under the Apache License v2.0 with LLVM Exceptions.
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
import re
# Bazel to CMake target name conversions used by bazel_to_cmake.py.
EXPLICIT_TARGET_MAPPIN... | 39.051852 | 79 | 0.669006 |
79466bbf627e71517eba72d7b6d73462bd6d40b0 | 2,574 | py | Python | translate2/numberout.py | sdytkht/se2se | 91a5d69c15746a3f5b620d4dcc4a0b5783737702 | [
"Apache-2.0"
] | null | null | null | translate2/numberout.py | sdytkht/se2se | 91a5d69c15746a3f5b620d4dcc4a0b5783737702 | [
"Apache-2.0"
] | null | null | null | translate2/numberout.py | sdytkht/se2se | 91a5d69c15746a3f5b620d4dcc4a0b5783737702 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Tue Mar 28 00:02:08 2017
@author: kht
"""
import tensorflow as tf
import translate as tl
import numpy as np
def weight_variable(shape):
initial = tf.truncated_normal(shape, stddev=0.1)
return tf.Variable(initial)
def bias_variable(shape):
initial = tf.constant(0.1, ... | 31.390244 | 103 | 0.571484 |
79466c05e9b6ed9b3c8657642cf7bc4f04c93bbf | 5,370 | py | Python | src/attentionwalk.py | erdiolmezogullari/AttentionWalk | d8c8297018374d965c0a024c3f1833f54347504e | [
"MIT"
] | 1 | 2021-03-16T10:22:03.000Z | 2021-03-16T10:22:03.000Z | src/attentionwalk.py | erdiolmezogullari/AttentionWalk | d8c8297018374d965c0a024c3f1833f54347504e | [
"MIT"
] | null | null | null | src/attentionwalk.py | erdiolmezogullari/AttentionWalk | d8c8297018374d965c0a024c3f1833f54347504e | [
"MIT"
] | null | null | null | """AttentionWalk class."""
import torch
import numpy as np
import pandas as pd
from tqdm import trange
from utils import read_graph, feature_calculator, adjacency_opposite_calculator
class AttentionWalkLayer(torch.nn.Module):
"""
Attention Walk Layer.
For details see the paper.
"""
def __init__(se... | 40.37594 | 99 | 0.654376 |
79466cd9ff0a80345912027feabb7685aaa75f85 | 3,985 | py | Python | homeassistant/components/homekit/const.py | henrikstumpf/home-assistant | e00e65a8938214b16a583cd44601a9729cad2873 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/homekit/const.py | henrikstumpf/home-assistant | e00e65a8938214b16a583cd44601a9729cad2873 | [
"Apache-2.0"
] | null | null | null | homeassistant/components/homekit/const.py | henrikstumpf/home-assistant | e00e65a8938214b16a583cd44601a9729cad2873 | [
"Apache-2.0"
] | null | null | null | """Constants used be the HomeKit component."""
# #### MISC ####
DEBOUNCE_TIMEOUT = 0.5
DOMAIN = 'homekit'
HOMEKIT_FILE = '.homekit.state'
HOMEKIT_NOTIFY_ID = 4663548
# #### CONFIG ####
CONF_AUTO_START = 'auto_start'
CONF_ENTITY_CONFIG = 'entity_config'
CONF_FILTER = 'filter'
# #### CONFIG DEFAULTS ####
DEFAULT_AUTO_S... | 35.265487 | 74 | 0.80276 |
79466e23aeafa959d32511e8edb023f437d93028 | 277 | py | Python | Arrays/main_3.py | RobertElias/PythonProjects | 9dcf24bdd6b31ad94cfab6cf81caf7fdc0f8023a | [
"MIT"
] | null | null | null | Arrays/main_3.py | RobertElias/PythonProjects | 9dcf24bdd6b31ad94cfab6cf81caf7fdc0f8023a | [
"MIT"
] | null | null | null | Arrays/main_3.py | RobertElias/PythonProjects | 9dcf24bdd6b31ad94cfab6cf81caf7fdc0f8023a | [
"MIT"
] | null | null | null | #3. Write a Python program to append a new item to the end of the array.
from array import *
array_num = array('i', [1, 3, 5, 7, 9])
print("Original array: "+str(array_num))
print("Append 11 at the end of the array:")
array_num.append(11)
print("New array: "+str(array_num))
| 27.7 | 72 | 0.693141 |
79466e6c9cfe618bc3ad8c5db7d3bfc53e668c1a | 56 | py | Python | noo/impl/packager/__init__.py | nooproject/noo | 238711c55faeb1226a4e5339cd587a312c4babac | [
"MIT"
] | 2 | 2022-02-03T07:35:46.000Z | 2022-02-03T16:12:25.000Z | noo/impl/packager/__init__.py | nooproject/noo | 238711c55faeb1226a4e5339cd587a312c4babac | [
"MIT"
] | 2 | 2022-03-05T02:31:38.000Z | 2022-03-05T21:26:42.000Z | noo/impl/packager/__init__.py | nooproject/noo | 238711c55faeb1226a4e5339cd587a312c4babac | [
"MIT"
] | 1 | 2022-03-05T01:40:29.000Z | 2022-03-05T01:40:29.000Z | from .packager import Packager
__all__ = ("Packager",)
| 14 | 30 | 0.732143 |
7946707c223dc1fbfd89022bf077131c28a0dbf0 | 1,571 | py | Python | game/my.py | senhordaluz/jc1-python | 7ed14199147dcc74c970740b670a2da22d91e550 | [
"MIT"
] | null | null | null | game/my.py | senhordaluz/jc1-python | 7ed14199147dcc74c970740b670a2da22d91e550 | [
"MIT"
] | null | null | null | game/my.py | senhordaluz/jc1-python | 7ed14199147dcc74c970740b670a2da22d91e550 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sun Aug 20 21:07:10 2017
@author: Pedro da Luz
"""
import pygame
pygame.mixer.pre_init(44100,-16,2, 1024)
pygame.init()
GAME_NAME = "SUPER SMASH ARANHA-MORCEGO"
SIZE = SCREEN_WIDTH, SCREEN_HEIGHT = [800,600]
FPS = 30
FPSCLOCK = pygame.time.Clock()
muted = False
# Colours ... | 29.092593 | 54 | 0.642266 |
79467145daba1d832ff132b59b7a6cb22dc1057d | 1,829 | py | Python | giantstar/utils/fileReader.py | DaoSen-v/gaintstar | 5ecae8652c9f71aaa78cc0fd181d431cb130cab1 | [
"MIT"
] | 1 | 2021-08-06T08:32:15.000Z | 2021-08-06T08:32:15.000Z | giantstar/utils/fileReader.py | DaoSen-v/gaintstar | 5ecae8652c9f71aaa78cc0fd181d431cb130cab1 | [
"MIT"
] | null | null | null | giantstar/utils/fileReader.py | DaoSen-v/gaintstar | 5ecae8652c9f71aaa78cc0fd181d431cb130cab1 | [
"MIT"
] | null | null | null | # _*_encoding=utf8_*_
# @Time : 2021/6/10 16:07
# @Author : xuyong
# @Email: yong1.xu@casstime.com
import json
from typing import List
import pymysql
import pandas
from giantstar.globalSetting import plus_setting
from giantstar.utils.error import DatabaseNoSuchData, DataIndexError
class ExcelReader:
files = p... | 29.5 | 112 | 0.642428 |
794672c51fdb6f056ee83a094f02ea0d8a1c79da | 2,128 | py | Python | networks/custom_net.py | catch-n-release/drig | 1290e60839e6b45ce2c429d2ed9eb4dcf0678755 | [
"BSD-3-Clause"
] | null | null | null | networks/custom_net.py | catch-n-release/drig | 1290e60839e6b45ce2c429d2ed9eb4dcf0678755 | [
"BSD-3-Clause"
] | null | null | null | networks/custom_net.py | catch-n-release/drig | 1290e60839e6b45ce2c429d2ed9eb4dcf0678755 | [
"BSD-3-Clause"
] | null | null | null | from keras.models import Input, Model
from keras.layers.convolutional import Conv2D, MaxPooling2D
from keras.layers.core import Activation, Dense, Flatten, Dropout
from keras.layers.normalization import BatchNormalization
from keras import backend
from drig.config import Kernel, PoolSize, Padding, Trigger
class Custo... | 29.971831 | 74 | 0.493421 |
794672ea296bb020aa0144860b234562f2fc1187 | 426 | py | Python | dashboard_app/tests/mixins.py | bitlabstudio/django-dashboard-app | ed98f2bca91a4ced36d0dd1aa1baee78e989cf64 | [
"MIT"
] | 10 | 2017-03-21T01:31:37.000Z | 2021-07-14T02:54:50.000Z | dashboard_app/tests/mixins.py | bitlabstudio/django-dashboard-app | ed98f2bca91a4ced36d0dd1aa1baee78e989cf64 | [
"MIT"
] | 2 | 2015-04-14T09:15:09.000Z | 2015-04-18T07:52:40.000Z | dashboard_app/tests/mixins.py | bitmazk/django-dashboard-app | ed98f2bca91a4ced36d0dd1aa1baee78e989cf64 | [
"MIT"
] | 5 | 2015-04-14T09:22:29.000Z | 2016-10-11T08:21:21.000Z | """Mixins for the tests of the dashboard_app."""
from ..widget_pool import dashboard_widget_pool
class WidgetTestCaseMixin(object):
"""
Mixin that makes sure to unregister widgets leftover from other tests.
"""
def _unregister_widgets(self):
# unregister all widgets that might be leftover fro... | 30.428571 | 74 | 0.725352 |
794673b6ef346afe8c7e6fa0eede154c467613d5 | 973 | py | Python | mayo/override/quantize/base.py | deep-fry/mayo | 7211a11fdb9bb0a036d496a3eba16c96db122f89 | [
"MIT"
] | 110 | 2018-06-07T17:52:29.000Z | 2022-03-28T08:04:02.000Z | mayo/override/quantize/base.py | kypomon/mayo | 7211a11fdb9bb0a036d496a3eba16c96db122f89 | [
"MIT"
] | 6 | 2019-10-17T12:00:29.000Z | 2021-10-21T13:41:22.000Z | mayo/override/quantize/base.py | kypomon/mayo | 7211a11fdb9bb0a036d496a3eba16c96db122f89 | [
"MIT"
] | 22 | 2018-07-05T01:30:49.000Z | 2021-10-19T06:15:40.000Z | from mayo.override import util
from mayo.override.base import OverriderBase
class QuantizerBase(OverriderBase):
@property
def real_width(self):
raise NotImplementedError(
'Override this method to compute real bit-width '
'required for {!r}.'.format(self))
def eval(self, at... | 30.40625 | 78 | 0.652621 |
794673cc4300c071fbbd29a81a8c49c86f2ffa81 | 4,191 | py | Python | nova/objects/instance_fault.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/objects/instance_fault.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | null | null | null | nova/objects/instance_fault.py | rossella/nova | 9b1180d5a09227604a470cb9d0790b57daf1b6d7 | [
"Apache-2.0"
] | 1 | 2020-07-24T06:47:54.000Z | 2020-07-24T06:47:54.000Z | # Copyright 2013 IBM Corp.
#
# 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 agree... | 37.756757 | 78 | 0.629205 |
79467489fd6ab097d14550f7af3746da3c6065ce | 156 | py | Python | tfc_web/bikes/urls.py | SmartCambridge/tfc_web | ac16b3c2aa5200320e9ffa9d270fb409b98ed55d | [
"MIT"
] | 2 | 2018-10-28T20:15:23.000Z | 2019-03-29T09:06:09.000Z | tfc_web/bikes/urls.py | SmartCambridge/tfc_web | ac16b3c2aa5200320e9ffa9d270fb409b98ed55d | [
"MIT"
] | 107 | 2018-10-22T06:57:07.000Z | 2020-09-15T14:43:03.000Z | tfc_web/bikes/urls.py | SmartCambridge/tfc_web | ac16b3c2aa5200320e9ffa9d270fb409b98ed55d | [
"MIT"
] | 1 | 2020-03-20T19:49:29.000Z | 2020-03-20T19:49:29.000Z | from django.conf.urls import url
from bikes.views import current_bikes
urlpatterns = [
url(r'^current-bikes', current_bikes, name='current-bikes'),
]
| 19.5 | 64 | 0.74359 |
7946770183dfa7d7ecb250c446eb17e463d5921e | 5,584 | py | Python | tests/gmprocess/metrics/imc/radial_transverse_test.py | baagaard-usgs/groundmotion-processing | 6be2b4460d598bba0935135efa85af2655578565 | [
"Unlicense"
] | 54 | 2019-01-12T02:05:38.000Z | 2022-03-29T19:43:56.000Z | tests/gmprocess/metrics/imc/radial_transverse_test.py | baagaard-usgs/groundmotion-processing | 6be2b4460d598bba0935135efa85af2655578565 | [
"Unlicense"
] | 700 | 2018-12-18T19:44:31.000Z | 2022-03-30T20:54:28.000Z | tests/gmprocess/metrics/imc/radial_transverse_test.py | baagaard-usgs/groundmotion-processing | 6be2b4460d598bba0935135efa85af2655578565 | [
"Unlicense"
] | 41 | 2018-11-29T23:17:56.000Z | 2022-03-31T04:04:23.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# stdlib imports
import os
# third party imports
import numpy as np
import scipy.constants as sp
from obspy import read, read_inventory
from obspy.geodetics import gps2dist_azimuth
from obspy.core.event import Origin
import pkg_resources
# local imports
from gmprocess.me... | 35.566879 | 85 | 0.60351 |
79467844b687f0d95b51c377133cfb9372a99e3a | 2,831 | py | Python | wikipedia-data-examples/win_unicode_console/readline_hook.py | jtmorgan/ds4ux | 14c4ece59b367fe7c8db09a126161693b9a640b3 | [
"MIT"
] | null | null | null | wikipedia-data-examples/win_unicode_console/readline_hook.py | jtmorgan/ds4ux | 14c4ece59b367fe7c8db09a126161693b9a640b3 | [
"MIT"
] | null | null | null | wikipedia-data-examples/win_unicode_console/readline_hook.py | jtmorgan/ds4ux | 14c4ece59b367fe7c8db09a126161693b9a640b3 | [
"MIT"
] | null | null | null |
import sys, traceback
from ctypes import pythonapi, cdll, c_size_t, c_char_p, c_void_p, cast, CFUNCTYPE, POINTER, addressof
PyMem_Malloc = pythonapi.PyMem_Malloc
PyMem_Malloc.restype = c_size_t
PyMem_Malloc.argtypes = [c_size_t]
strncpy = cdll.msvcrt.strncpy
strncpy.restype = c_char_p
strncpy.argtypes = [c_char_p, c... | 26.457944 | 129 | 0.767573 |
79467853dcd6f36ad5d8951182550364b5da7bbf | 18,776 | py | Python | ravop/core/__init__.py | 7enTropy7/ravop | e8741adac086ed2727cb9e9fb6fec15dae297573 | [
"MIT"
] | null | null | null | ravop/core/__init__.py | 7enTropy7/ravop | e8741adac086ed2727cb9e9fb6fec15dae297573 | [
"MIT"
] | null | null | null | ravop/core/__init__.py | 7enTropy7/ravop | e8741adac086ed2727cb9e9fb6fec15dae297573 | [
"MIT"
] | null | null | null | import ast
import imp
import json
import sys
import os
import time
from functools import wraps
import numpy as np
import speedtest
from ..globals import globals as g
from ..config import FTP_SERVER_URL
from ..strings import OpTypes, NodeTypes, functions, OpStatus
from ..utils import make_request, convert_to_ndarray, ... | 29.200622 | 124 | 0.551555 |
794678a4bf3e65fe14a5544b156af7162396e46a | 21,394 | py | Python | front_panel_settings.py | labscript-suite-temp-2-archive/lkohfahl-blacs--forked-from--labscript_suite-blacs | 6deae2cff7baec77d01f91bc07123c26c7e01c5c | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | front_panel_settings.py | labscript-suite-temp-2-archive/lkohfahl-blacs--forked-from--labscript_suite-blacs | 6deae2cff7baec77d01f91bc07123c26c7e01c5c | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | front_panel_settings.py | labscript-suite-temp-2-archive/lkohfahl-blacs--forked-from--labscript_suite-blacs | 6deae2cff7baec77d01f91bc07123c26c7e01c5c | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | #####################################################################
# #
# /front_panel_settings.py #
# #
# Copyright 2013, Monash University ... | 52.694581 | 202 | 0.531691 |
79467bac96460fc060858f3f984b01bcdfde6f32 | 629 | py | Python | comparador_hashes/ch.py | mauriciopicirillo/Seguran-a_da_informa-o_com_Python | 0a439066dda42268de7338c815c4cf7872079211 | [
"MIT"
] | null | null | null | comparador_hashes/ch.py | mauriciopicirillo/Seguran-a_da_informa-o_com_Python | 0a439066dda42268de7338c815c4cf7872079211 | [
"MIT"
] | null | null | null | comparador_hashes/ch.py | mauriciopicirillo/Seguran-a_da_informa-o_com_Python | 0a439066dda42268de7338c815c4cf7872079211 | [
"MIT"
] | null | null | null | import hashlib
arquivo1 = 'a.txt'
arquivo2 = 'b.txt'
hash1 = hashlib.new('ripemd160')
hash1.update(open(arquivo1, 'rb').read())
hash2 = hashlib.new('ripemd160')
hash2.update(open(arquivo2, 'rb').read())
if hash1.digest() != hash2.digest():
print(f'O arquivo: {arquivo1} é diferente do arquivo: {arquivo2}')
... | 29.952381 | 70 | 0.662957 |
79467bb38f0bffc5757e730d320942d1b6f2b095 | 938 | py | Python | data/_unify.py | efsantrifuge/kr_tr_word_quizes | a49962a49a2e04d0e199a752ef3ac971420fb5ad | [
"MIT"
] | null | null | null | data/_unify.py | efsantrifuge/kr_tr_word_quizes | a49962a49a2e04d0e199a752ef3ac971420fb5ad | [
"MIT"
] | null | null | null | data/_unify.py | efsantrifuge/kr_tr_word_quizes | a49962a49a2e04d0e199a752ef3ac971420fb5ad | [
"MIT"
] | null | null | null | '''
simple job file to unify files
no user input for files to be processed, please edit the code
example command:
python _unify.py 1
python _unify.py 0
'''
import sys
def unify():
filename_prefix = ''
filename_postfix = '.txt'
count_begin = 1
count_end = 7
if sys.argv[1] == '1':
raw = ... | 19.957447 | 77 | 0.554371 |
79467c9a3c28ee88dd4039a803c6941b730ab341 | 1,245 | py | Python | Python/max-points-on-a-line.py | ShuaiWangGit/LeetCode | d85a4cb23f8f85059691994e7ad89001c6e4f3f6 | [
"MIT"
] | 5 | 2018-09-06T03:12:33.000Z | 2022-03-03T18:57:11.000Z | Python/max-points-on-a-line.py | pnandini/LeetCode | e746c3298be96dec8e160da9378940568ef631b1 | [
"MIT"
] | 1 | 2018-07-10T03:28:43.000Z | 2018-07-10T03:28:43.000Z | Python/max-points-on-a-line.py | pnandini/LeetCode | e746c3298be96dec8e160da9378940568ef631b1 | [
"MIT"
] | 5 | 2018-09-06T03:12:35.000Z | 2021-07-03T09:00:56.000Z | # Time: O(n^2)
# Space: O(n)
#
# Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.
#
import collections
# Definition for a point
class Point:
def __init__(self, a=0, b=0):
self.x = a
self.y = b
class Solution(object):
def maxPoints(self, poi... | 27.666667 | 101 | 0.51245 |
79467de14e824fdd929e1d60e7b09d37d9c5c583 | 3,561 | py | Python | mlp-mmdgm/generate_data_mnist.py | jjzhunet9/mmdgm | 9422bdc88b913c09506944d3529f6f955b95687c | [
"MIT"
] | 22 | 2015-11-12T09:49:05.000Z | 2020-04-06T10:44:04.000Z | mlp-mmdgm/generate_data_mnist.py | jjzhunet9/mmdgm | 9422bdc88b913c09506944d3529f6f955b95687c | [
"MIT"
] | null | null | null | mlp-mmdgm/generate_data_mnist.py | jjzhunet9/mmdgm | 9422bdc88b913c09506944d3529f6f955b95687c | [
"MIT"
] | 11 | 2015-10-07T08:07:01.000Z | 2020-07-16T03:12:15.000Z | import numpy as np
import scipy.io as sio
import cPickle, gzip
import math
import os, sys
from anglepy import paramgraphics
# load data
print 'Loading data...'
f = gzip.open('./data/mnist/mnist_28.pkl.gz', 'rb')
(x_train, t_train), (x_valid, t_valid), (x_test, t_test) = cPickle.load(f)
f.close()
# choose number of ... | 39.131868 | 224 | 0.697276 |
79467fd06238a3a544540b4ba6f35eb88aa4b786 | 3,365 | py | Python | openGaussBase/testcase/SECURITY/PERMISSIONS/Opengauss_Function_Security_Separation_Case0010.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/SECURITY/PERMISSIONS/Opengauss_Function_Security_Separation_Case0010.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/SECURITY/PERMISSIONS/Opengauss_Function_Security_Separation_Case0010.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | """
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... | 38.678161 | 84 | 0.628232 |
79468093116729e4b6804b1dd49ef30ef356e8c8 | 362 | py | Python | ezdisteach/model/__init__.py | call-learning/ez-disteach | 7636dfdbfb709769824266800ebba18be764ecc3 | [
"MIT"
] | null | null | null | ezdisteach/model/__init__.py | call-learning/ez-disteach | 7636dfdbfb709769824266800ebba18be764ecc3 | [
"MIT"
] | null | null | null | ezdisteach/model/__init__.py | call-learning/ez-disteach | 7636dfdbfb709769824266800ebba18be764ecc3 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import pkgutil
__path__ = pkgutil.extend_path(__path__, __name__)
for importer, modname, ispkg in pkgutil.walk_packages(path=__path__, prefix=__name__ + '.'):
__import__(modname)
from .base import ImportationError, create_model, AttributeNotInMetaInformation, ModelException, NoSuchModel, \... | 36.2 | 111 | 0.781768 |
794681aadd15b4de1426eccab41d4766de40f459 | 351 | py | Python | backend/todolist/api/routes.py | ElPapi42/flask-todo | 526c5c397068754bfb67aac417558cbb7e640dfb | [
"MIT"
] | 1 | 2021-07-30T11:24:59.000Z | 2021-07-30T11:24:59.000Z | backend/todolist/api/routes.py | ElPapi42/flask-todo | 526c5c397068754bfb67aac417558cbb7e640dfb | [
"MIT"
] | 5 | 2019-12-29T15:31:31.000Z | 2021-05-10T22:25:27.000Z | backend/todolist/api/routes.py | ElPapi42/flask-todo | 526c5c397068754bfb67aac417558cbb7e640dfb | [
"MIT"
] | 8 | 2019-12-22T18:33:50.000Z | 2019-12-28T20:13:21.000Z | from flask_restful import Api
from . import api_bp
from .controllers import UserController, UserList, TaskList, TaskController
api = Api(api_bp)
api.add_resource(UserList, "/users/")
api.add_resource(UserController, "/users/<u_id>/")
api.add_resource(TaskList, "/users/<u_id>/tasks/")
api.add_resource(TaskController,... | 31.909091 | 75 | 0.766382 |
794681c02ef0cbf91026fe6897a071cb1b82d803 | 19,406 | py | Python | app.py | tahoeivanova/memory_app | 48c86189344c425473e6ea897c43b510cc727487 | [
"MIT"
] | null | null | null | app.py | tahoeivanova/memory_app | 48c86189344c425473e6ea897c43b510cc727487 | [
"MIT"
] | null | null | null | app.py | tahoeivanova/memory_app | 48c86189344c425473e6ea897c43b510cc727487 | [
"MIT"
] | null | null | null | from bottle import Bottle, route, static_file, template, run, request, redirect
from sqlAlchemy_classes import User, NumberResults, CardsResults, PiResults, Card, PathName, PathItems, session, cards_filter
import random
import itertools
from mnemo_functions import pi_reader
import hashlib
import os
application = Bottl... | 34.105448 | 181 | 0.689941 |
794681cb7fe5ff828e5d95dd594e5eed8bfe10ca | 28,797 | py | Python | vut/lib/python3.8/site-packages/pipenv/patched/yaml2/constructor.py | dan-mutua/djangowk1 | 1e5dcb6443ef21451e21845ec639198719e11b10 | [
"MIT"
] | 6,263 | 2017-01-20T17:41:36.000Z | 2022-02-15T20:48:57.000Z | vut/lib/python3.8/site-packages/pipenv/patched/yaml2/constructor.py | dan-mutua/djangowk1 | 1e5dcb6443ef21451e21845ec639198719e11b10 | [
"MIT"
] | 1,100 | 2017-01-20T19:41:52.000Z | 2017-12-06T09:15:13.000Z | vut/lib/python3.8/site-packages/pipenv/patched/yaml2/constructor.py | dan-mutua/djangowk1 | 1e5dcb6443ef21451e21845ec639198719e11b10 | [
"MIT"
] | 366 | 2017-01-21T10:06:52.000Z | 2021-11-25T17:09:19.000Z |
__all__ = [
'BaseConstructor',
'SafeConstructor',
'FullConstructor',
'UnsafeConstructor',
'Constructor',
'ConstructorError'
]
from error import *
from nodes import *
import datetime
import binascii, re, sys, types
class ConstructorError(MarkedYAMLError):
pass
class timezone(datetime.t... | 37.840999 | 112 | 0.597979 |
794681cc6b1a39751766a5a689ac39aeb7ad93ab | 17,696 | py | Python | imbalanced_ensemble/ensemble/_bagging.py | ZhiningLiu1998/imbalanced-ensemble | 26670c8a6b7bab26ae1e18cba3174a9d9038a680 | [
"MIT"
] | 87 | 2021-05-19T08:29:26.000Z | 2022-03-30T23:59:05.000Z | imbalanced_ensemble/ensemble/_bagging.py | ZhiningLiu1998/imbalanced-ensemble | 26670c8a6b7bab26ae1e18cba3174a9d9038a680 | [
"MIT"
] | 8 | 2021-05-28T10:27:28.000Z | 2022-01-11T11:21:03.000Z | imbalanced_ensemble/ensemble/_bagging.py | ZhiningLiu1998/imbalanced-ensemble | 26670c8a6b7bab26ae1e18cba3174a9d9038a680 | [
"MIT"
] | 18 | 2021-05-19T08:30:29.000Z | 2022-03-28T08:30:10.000Z | """Base classes for all bagging-like methods in imbalanced_ensemble.
ResampleBaggingClassifier Base class for all resampling +
bagging imbalanced ensemble classifier.
"""
# Authors: Zhining Liu <zhining.liu@outlook.com>
# License: MIT
# %%
from abc import ABCMeta, abstractmethod
import numpy as np
import numbers... | 36.040733 | 88 | 0.609912 |
794683430f090cd0dc05173cfdff1f5443606f7b | 8,800 | py | Python | libcloud/common/aliyun.py | zimventures/libcloud | be0765df384f1baccde24539156119856cb96816 | [
"Apache-2.0"
] | 1,435 | 2015-01-07T05:32:51.000Z | 2022-03-25T19:39:34.000Z | libcloud/common/aliyun.py | zimventures/libcloud | be0765df384f1baccde24539156119856cb96816 | [
"Apache-2.0"
] | 1,158 | 2015-01-04T18:08:42.000Z | 2022-03-24T14:34:57.000Z | libcloud/common/aliyun.py | zimventures/libcloud | be0765df384f1baccde24539156119856cb96816 | [
"Apache-2.0"
] | 832 | 2015-01-05T09:20:21.000Z | 2022-03-24T19:22:19.000Z | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | 35.2 | 78 | 0.5825 |
794686dc4cab8b4ee324ef4fa53731df65b2ff56 | 152 | py | Python | setup.py | sheaffej/python-vscode-docker | 3ea980d77f7ec8424d59fb72e25b34f7c077a125 | [
"Apache-2.0"
] | null | null | null | setup.py | sheaffej/python-vscode-docker | 3ea980d77f7ec8424d59fb72e25b34f7c077a125 | [
"Apache-2.0"
] | null | null | null | setup.py | sheaffej/python-vscode-docker | 3ea980d77f7ec8424d59fb72e25b34f7c077a125 | [
"Apache-2.0"
] | null | null | null | # https://setuptools.readthedocs.io/en/latest/references/keywords.html
from setuptools import setup
setup(
name='My App',
packages=['myapp']
)
| 19 | 70 | 0.723684 |
794686e52b0b5ffa955fa6961b0be3021265baf9 | 842 | py | Python | src/preprocess.py | tapilab/is-jzheng | 600fd4de4478e8cf2c19fc196b5898ebe9f42cac | [
"MIT"
] | null | null | null | src/preprocess.py | tapilab/is-jzheng | 600fd4de4478e8cf2c19fc196b5898ebe9f42cac | [
"MIT"
] | null | null | null | src/preprocess.py | tapilab/is-jzheng | 600fd4de4478e8cf2c19fc196b5898ebe9f42cac | [
"MIT"
] | null | null | null | """
Load mutiple lines of json file from a single file.
return "text" line by line from each json.
"""
import json
import glob
import codecs
import re
import string
def load_file(path):
with codecs.open(path,encoding="utf-8") as file:
lines = file.readlines()
res = []
for line in lines:
... | 15.035714 | 60 | 0.623515 |
79468756edf34818274e17f9e559b07de3802c48 | 473 | py | Python | 28. Codechef Problems/CodeChef/LTIME95C/EQUINOX.py | prachi996/HacktoberFest2021-5 | d386e40952fadc7545b8a9744454fa9936c2d133 | [
"MIT"
] | 1 | 2021-10-06T10:29:51.000Z | 2021-10-06T10:29:51.000Z | 28. Codechef Problems/CodeChef/LTIME95C/EQUINOX.py | prachi996/HacktoberFest2021-5 | d386e40952fadc7545b8a9744454fa9936c2d133 | [
"MIT"
] | null | null | null | 28. Codechef Problems/CodeChef/LTIME95C/EQUINOX.py | prachi996/HacktoberFest2021-5 | d386e40952fadc7545b8a9744454fa9936c2d133 | [
"MIT"
] | null | null | null | """
Problem Name: Equinox
CodeChef Link: https://www.codechef.com/LTIME95C/problems/EQUINOX/
Problem Code: EQUINOX
"""
for i in range(int(input())):
N, A, B = map(int, input().split())
anu = 0
sar = 0
for i in range(N):
s = input()
if s[0] in "EQUINOX":
sar += A
e... | 18.192308 | 66 | 0.496829 |
79468802e85b1f0c69fe15c04b204fde86b55c55 | 725 | py | Python | test/conectardb.py | eadev/usqele | 4ec69f24cae60ddd35f8c1268c0de9c9141434a5 | [
"MIT"
] | 1 | 2022-03-12T01:37:07.000Z | 2022-03-12T01:37:07.000Z | test/conectardb.py | eadev/usqele | 4ec69f24cae60ddd35f8c1268c0de9c9141434a5 | [
"MIT"
] | null | null | null | test/conectardb.py | eadev/usqele | 4ec69f24cae60ddd35f8c1268c0de9c9141434a5 | [
"MIT"
] | 1 | 2021-12-17T01:08:39.000Z | 2021-12-17T01:08:39.000Z | import pymysql.cursors
def start():
# CONECTARSE A LA BASE DE DATOS
connection = pymysql.connect(host=HOST,
user=USER,
password=PASSWORD,
database=BD,
cursorclass=pymysql.cursors.DictCursor)
... | 32.954545 | 91 | 0.553103 |
79468812a22d34158516042d6557a2978d0c36c0 | 1,095 | py | Python | kdesupport/grantlee/grantlee.py | gitdevmod/craft-blueprints-kde | 81a866d2d606dabd57347fbac7cdab42979332dd | [
"BSD-2-Clause"
] | null | null | null | kdesupport/grantlee/grantlee.py | gitdevmod/craft-blueprints-kde | 81a866d2d606dabd57347fbac7cdab42979332dd | [
"BSD-2-Clause"
] | null | null | null | kdesupport/grantlee/grantlee.py | gitdevmod/craft-blueprints-kde | 81a866d2d606dabd57347fbac7cdab42979332dd | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import info
class subinfo(info.infoclass):
def setTargets(self):
self.svnTargets['master'] = "https://github.com/steveire/grantlee.git"
self.targets["5.2.0"] = "https://github.com/steveire/grantlee/archive/v5.2.0.tar.gz"
self.targetDigests["5.2.0"] = (['139acee5746b... | 37.758621 | 140 | 0.677626 |
79468ad547b2835e84c8fc61d525a99c92c5c57c | 171 | py | Python | app.py | rturatti/labdevops-experience | ead33374b10df19fdda385e487542c29b813f6df | [
"MIT"
] | null | null | null | app.py | rturatti/labdevops-experience | ead33374b10df19fdda385e487542c29b813f6df | [
"MIT"
] | 1 | 2021-11-25T16:41:27.000Z | 2021-11-25T16:41:27.000Z | app.py | rturatti/labdevops-experience | ead33374b10df19fdda385e487542c29b813f6df | [
"MIT"
] | null | null | null | from flask import Flask
app = Flask(__name__)
@app.route("/")
def pagina_inicial():
return "Hello World - Rodrigo Turatti"
if __name__ == '__main__':
app.run()
| 15.545455 | 42 | 0.672515 |
79468aec3a5d1251bc398d7e5dcc8efae2cfbccf | 1,774 | py | Python | examples/ad_manager/v202005/order_service/get_all_orders.py | jasperan/googleads-python-lib | 6add9a7cc6148e98ada8097586a8eb1b47b2a8fd | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v202005/order_service/get_all_orders.py | jasperan/googleads-python-lib | 6add9a7cc6148e98ada8097586a8eb1b47b2a8fd | [
"Apache-2.0"
] | null | null | null | examples/ad_manager/v202005/order_service/get_all_orders.py | jasperan/googleads-python-lib | 6add9a7cc6148e98ada8097586a8eb1b47b2a8fd | [
"Apache-2.0"
] | 1 | 2021-06-23T09:15:34.000Z | 2021-06-23T09:15:34.000Z | #!/usr/bin/env python
#
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | 35.48 | 80 | 0.704622 |
79468b9680371d13bcbecf2959a3704a7454eaef | 878 | py | Python | candlepb/Combo/problem_exp6.py | bigwater/candlepb | c513f6c85492c936eebff07ba40f1f4f062919c7 | [
"BSD-2-Clause"
] | 1 | 2021-01-21T04:25:50.000Z | 2021-01-21T04:25:50.000Z | candlepb/Combo/problem_exp6.py | bigwater/candlepb | c513f6c85492c936eebff07ba40f1f4f062919c7 | [
"BSD-2-Clause"
] | null | null | null | candlepb/Combo/problem_exp6.py | bigwater/candlepb | c513f6c85492c936eebff07ba40f1f4f062919c7 | [
"BSD-2-Clause"
] | 1 | 2021-02-01T01:37:30.000Z | 2021-02-01T01:37:30.000Z | from deephyper.benchmark import Problem
from candlepb.Combo.models.candle_mlp_5 import create_structure
# We create our Problem object with the Problem class, you don't have to name your Problem object 'Problem' it can be any name you want. You can also define different problems in the same module.
Problem = Problem()... | 43.9 | 195 | 0.780182 |
79468bbd2769af37355edc49a1dd99e9f56c538e | 283 | py | Python | djconnectwise/migrations/0086_merge_20190507_1402.py | kti-sam/django-connectwise | 28484faad9435892a46b8ce4a3c957f64c299971 | [
"MIT"
] | 10 | 2017-04-27T19:51:38.000Z | 2020-10-09T17:21:23.000Z | djconnectwise/migrations/0086_merge_20190507_1402.py | kti-sam/django-connectwise | 28484faad9435892a46b8ce4a3c957f64c299971 | [
"MIT"
] | 45 | 2017-02-07T22:52:07.000Z | 2021-11-25T21:45:44.000Z | djconnectwise/migrations/0086_merge_20190507_1402.py | kti-sam/django-connectwise | 28484faad9435892a46b8ce4a3c957f64c299971 | [
"MIT"
] | 9 | 2017-01-27T00:07:33.000Z | 2021-07-12T19:48:27.000Z | # Generated by Django 2.1 on 2019-05-07 14:02
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('djconnectwise', '0085_auto_20190506_1028'),
('djconnectwise', '0085_auto_20190430_1004'),
]
operations = [
]
| 18.866667 | 53 | 0.664311 |
79468bf27b32c88c6c3a5cdc5f365ffcf124ce34 | 728 | py | Python | png.py | kaleksandrov/advanced-python-training | 0d1927cbb7bf9c72668341264c56f314d21ef2c4 | [
"MIT"
] | null | null | null | png.py | kaleksandrov/advanced-python-training | 0d1927cbb7bf9c72668341264c56f314d21ef2c4 | [
"MIT"
] | null | null | null | png.py | kaleksandrov/advanced-python-training | 0d1927cbb7bf9c72668341264c56f314d21ef2c4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import struct
PNG_HEADER=b"\x89PNG\r\n\x1a\n"
CHUNK_SIZE=4096
def print_binary_file(filename):
with open(filename, 'rb') as f:
for chunk in f.read(CHUNK_SIZE):
print(chunk, end=' ')
def check_if_png(filename):
with open(filename, 'rb') as f:
header = f.re... | 23.483871 | 62 | 0.589286 |
79468c1c0200960b3cf52c0553f181646445fcf2 | 37,682 | py | Python | TSIClient/TSIClient.py | jbrown15/RaaLabs-TSIClient | 5d0c4bdd130647e01552e878f2594e1978546054 | [
"MIT"
] | null | null | null | TSIClient/TSIClient.py | jbrown15/RaaLabs-TSIClient | 5d0c4bdd130647e01552e878f2594e1978546054 | [
"MIT"
] | 1 | 2021-06-02T02:19:55.000Z | 2021-06-02T02:19:55.000Z | TSIClient/TSIClient.py | jbrown15/RaaLabs-TSIClient | 5d0c4bdd130647e01552e878f2594e1978546054 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import json
import pandas as pd
import requests
import logging
from TSIClient.exceptions import TSIEnvironmentError
from TSIClient.exceptions import TSIStoreError
from TSIClient.exceptions import TSIQueryError
class TSIClient():
"""TSIClient. Holds methods ... | 38.76749 | 153 | 0.589167 |
79468d8ab21ea794f3cb15408968b13a7d8a79af | 5,514 | py | Python | contrib/seeds/makeseeds.py | crypto-node/MUE | 0fe297bb1bc1755d1ed0ac95f1f1b9e2e656b526 | [
"MIT"
] | 4 | 2020-06-19T11:37:16.000Z | 2021-08-02T22:56:37.000Z | contrib/seeds/makeseeds.py | crypto-node/MUE | 0fe297bb1bc1755d1ed0ac95f1f1b9e2e656b526 | [
"MIT"
] | null | null | null | contrib/seeds/makeseeds.py | crypto-node/MUE | 0fe297bb1bc1755d1ed0ac95f1f1b9e2e656b526 | [
"MIT"
] | 4 | 2020-02-27T11:26:34.000Z | 2022-01-20T13:29:19.000Z | #!/usr/bin/env python3
# Copyright (c) 2013-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Generate seeds.txt from Pieter's DNS seeder
#
NSEEDS=512
MAX_SEEDS_PER_ASN=2
MIN_BLOCKS = 615801
#... | 32.05814 | 186 | 0.566921 |
79468dc450d255592f65b3cb23c1aa2ad2d0214f | 1,489 | py | Python | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_type_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2021-09-07T18:36:04.000Z | 2021-09-07T18:36:04.000Z | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_type_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | sdk/datafactory/azure-mgmt-datafactory/azure/mgmt/datafactory/models/linked_integration_runtime_type_py3.py | tzhanl/azure-sdk-for-python | 18cd03f4ab8fd76cc0498f03e80fbc99f217c96e | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.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 ... | 34.627907 | 134 | 0.652116 |
79468e5234c6ee7add40cf770e7aad871856b22f | 243 | py | Python | conanfile.py | bincrafters/conan-boost_chrono | 64f61589a92a062f956f3ce7dd6c21362552df77 | [
"MIT"
] | null | null | null | conanfile.py | bincrafters/conan-boost_chrono | 64f61589a92a062f956f3ce7dd6c21362552df77 | [
"MIT"
] | null | null | null | conanfile.py | bincrafters/conan-boost_chrono | 64f61589a92a062f956f3ce7dd6c21362552df77 | [
"MIT"
] | 2 | 2019-04-24T05:53:46.000Z | 2019-06-06T20:27:28.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import python_requires
base = python_requires("boost_base/2.0.0@bincrafters/testing")
class BoostChronoConan(base.BoostBaseConan):
name = "boost_chrono"
version = "1.70.0"
| 18.692308 | 62 | 0.707819 |
79468ede447c69937e3b5be5592caf8d1d42727a | 3,292 | py | Python | hfc/fabric_network/couchdbwalletstore.py | roviso/hyberledger-py | 908dd597e0822f99cf618f235dd517824ba44bc4 | [
"Apache-2.0"
] | 389 | 2016-09-18T11:50:10.000Z | 2022-03-29T21:45:40.000Z | hfc/fabric_network/couchdbwalletstore.py | roviso/hyberledger-py | 908dd597e0822f99cf618f235dd517824ba44bc4 | [
"Apache-2.0"
] | 112 | 2017-08-18T00:32:21.000Z | 2022-02-25T18:55:57.000Z | hfc/fabric_network/couchdbwalletstore.py | roviso/hyberledger-py | 908dd597e0822f99cf618f235dd517824ba44bc4 | [
"Apache-2.0"
] | 268 | 2016-10-12T02:56:58.000Z | 2022-03-30T09:50:54.000Z | import couchdb
from cryptography.hazmat.backends import default_backend
from cryptography.hazmat.primitives import serialization
from cryptography.hazmat.primitives.serialization import load_pem_private_key
from hfc.fabric_ca.caservice import Enrollment
from hfc.fabric.user import User
from hfc.fabric.user import val... | 36.175824 | 112 | 0.635784 |
79468f059f4ce9c9298102b828700088c5c64b8a | 2,388 | py | Python | src/MOSIM/abstraction/access/remote/remote_adapter_client.py | dfki-asr/MMIPython-Core | 2f4b51ffde606c45661d9dbd5153576f919bdb8b | [
"MIT"
] | null | null | null | src/MOSIM/abstraction/access/remote/remote_adapter_client.py | dfki-asr/MMIPython-Core | 2f4b51ffde606c45661d9dbd5153576f919bdb8b | [
"MIT"
] | null | null | null | src/MOSIM/abstraction/access/remote/remote_adapter_client.py | dfki-asr/MMIPython-Core | 2f4b51ffde606c45661d9dbd5153576f919bdb8b | [
"MIT"
] | null | null | null | ## SPDX-License-Identifier: MIT
## The content of this file has been developed in the context of the MOSIM research project.
## Original author(s): Jannes Lehwald
# -*- coding: utf-8 -*-
"""
"""
from thrift.transport import TSocket
from thrift.transport import TTransport
from thrift.protocol import TCompactProtocol... | 28.771084 | 100 | 0.600503 |
79468fe34b85be16d384aba1e89267bc3024e813 | 1,262 | py | Python | wavesim/tests/python/test_BuildInfo.py | TheComet/wavesim | 90125d5273b96633e5f74666ddb707cedfa2fbf1 | [
"Apache-2.0"
] | 7 | 2018-01-25T10:58:39.000Z | 2021-05-08T08:08:37.000Z | wavesim/tests/python/test_BuildInfo.py | TheComet/wavesim | 90125d5273b96633e5f74666ddb707cedfa2fbf1 | [
"Apache-2.0"
] | 4 | 2018-03-06T15:47:13.000Z | 2018-03-07T19:07:45.000Z | wavesim/tests/python/test_BuildInfo.py | TheComet/wavesim | 90125d5273b96633e5f74666ddb707cedfa2fbf1 | [
"Apache-2.0"
] | 2 | 2018-02-18T02:02:31.000Z | 2020-02-16T09:49:12.000Z | import wavesim
import unittest
class TestBuildInfo(unittest.TestCase):
def test_build_info(self):
self.assertTrue(isinstance(wavesim.build_info, str))
self.assertTrue(len(wavesim.build_info) > 10)
def test_build_number(self):
self.assertTrue(isinstance(wavesim.build_number, int))
... | 33.210526 | 71 | 0.691759 |
7946905946aa974b9e22a3fdc9143d26f75693e1 | 4,282 | py | Python | nipyapi/nifi/models/variable_entity.py | Paul-Verardi/nipyapi | 7a709611d9cf30e4ce8943db4d4dd617f2f7c81c | [
"Apache-2.0"
] | null | null | null | nipyapi/nifi/models/variable_entity.py | Paul-Verardi/nipyapi | 7a709611d9cf30e4ce8943db4d4dd617f2f7c81c | [
"Apache-2.0"
] | 1 | 2018-11-13T21:01:33.000Z | 2018-11-13T21:01:33.000Z | nipyapi/nifi/models/variable_entity.py | Paul-Verardi/nipyapi | 7a709611d9cf30e4ce8943db4d4dd617f2f7c81c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
NiFi Rest Api
The Rest Api provides programmatic access to command and control a NiFi instance in real time. Start and stop processors, monitor queues, query provenance data, and more. Each endpoint below includes a description, ... | 27.805195 | 479 | 0.555348 |
794690ddb0b17b33d14c802e813d1a6df5666d75 | 15,837 | py | Python | venv/lib/python3.9/site-packages/_pytest/runner.py | almmello/frozen | c9928491f694b56a0023926bc763c703ba1fd75a | [
"BSD-2-Clause"
] | 9 | 2019-05-29T23:50:28.000Z | 2021-01-29T20:51:05.000Z | venv/lib/python3.9/site-packages/_pytest/runner.py | almmello/frozen | c9928491f694b56a0023926bc763c703ba1fd75a | [
"BSD-2-Clause"
] | 61 | 2020-10-12T13:34:56.000Z | 2022-03-28T03:02:21.000Z | venv/lib/python3.9/site-packages/_pytest/runner.py | almmello/frozen | c9928491f694b56a0023926bc763c703ba1fd75a | [
"BSD-2-Clause"
] | 3 | 2020-05-25T02:38:08.000Z | 2021-01-20T06:23:06.000Z | """Basic collect and runtest protocol implementations."""
import bdb
import os
import sys
from typing import Callable
from typing import cast
from typing import Dict
from typing import Generic
from typing import List
from typing import Optional
from typing import Tuple
from typing import Type
from typing import TYPE_CH... | 34.205184 | 88 | 0.640525 |
7946912b09114108ab46ea2f12e00357ccfa4bdf | 2,335 | py | Python | tests/test_core.py | quippp/twilio-python | 22b84cdfd19a6b1bde84350053870a7c507af410 | [
"MIT"
] | 11 | 2016-01-23T04:38:23.000Z | 2017-11-19T04:03:25.000Z | venv/lib/python2.7/site-packages/tests/test_core.py | jideobs/twilioAngular | eb95308d287d7dbb72fe516a633199a0af8b76b9 | [
"MIT"
] | 1 | 2016-02-29T01:35:27.000Z | 2016-02-29T01:35:27.000Z | venv/lib/python2.7/site-packages/tests/test_core.py | jideobs/twilioAngular | eb95308d287d7dbb72fe516a633199a0af8b76b9 | [
"MIT"
] | 2 | 2019-05-19T06:02:26.000Z | 2020-12-23T11:27:20.000Z | from datetime import datetime
from datetime import date
from nose.tools import assert_equal
from twilio.rest.resources import parse_date
from twilio.rest.resources import transform_params
from twilio.rest.resources import convert_keys
from twilio.rest.resources import convert_case
from twilio.rest.resources import co... | 22.669903 | 63 | 0.630835 |
79469383dca3782f16702cf74ee8e5be92ff6c87 | 15,949 | py | Python | contrib/client-side/svnmerge/svnmerge-migrate-history.py | YueLinHo/Subversion | b28ce23d2e0109f0ca64b9f2a46be0fa23820f5f | [
"Apache-2.0"
] | 1 | 2018-03-09T01:54:29.000Z | 2018-03-09T01:54:29.000Z | contrib/client-side/svnmerge/svnmerge-migrate-history.py | whiplashcn/subversion | da9560b9b82437f9a8be30165dc110ce708b29bc | [
"Apache-2.0"
] | null | null | null | contrib/client-side/svnmerge/svnmerge-migrate-history.py | whiplashcn/subversion | da9560b9b82437f9a8be30165dc110ce708b29bc | [
"Apache-2.0"
] | 2 | 2017-04-24T23:04:44.000Z | 2020-11-04T07:27:17.000Z | #!/usr/bin/env python
#
# svnmerge-migrate-history.py: Migrate merge history from svnmerge.py's
# format to Subversion 1.5's format.
#
# ====================================================================
# Copyright (c) 2007-2009 CollabNet. All rights reserved.
#
# This software is licen... | 38.9 | 79 | 0.661985 |
7946939a56bdbcf8e3f641ebe54d9ddc789634a3 | 1,266 | py | Python | trufflehog/models.py | jleeothon/trufflehog | b71eb157da9f263e242641f5af83ca8788e55798 | [
"MIT"
] | null | null | null | trufflehog/models.py | jleeothon/trufflehog | b71eb157da9f263e242641f5af83ca8788e55798 | [
"MIT"
] | 3 | 2020-02-12T00:17:43.000Z | 2021-06-10T19:56:49.000Z | trufflehog/models.py | jleeothon/trufflehog | b71eb157da9f263e242641f5af83ca8788e55798 | [
"MIT"
] | null | null | null | from django.db import models
import datetime
import functools
from django.db import models
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
__all__ = ('DateTraceable', 'Hideable')
class DateTraceable(models.Model):
"""
An abstract model mixin that let's you trace ... | 20.419355 | 73 | 0.619273 |
794694a3187a158ea7191373cf03c9b8d878b8d2 | 792 | py | Python | app/core/admin.py | shreyask543/Recipe-api | 34c43db4ee6cdcd90cdcf8e88a536ef66452ddb6 | [
"MIT"
] | null | null | null | app/core/admin.py | shreyask543/Recipe-api | 34c43db4ee6cdcd90cdcf8e88a536ef66452ddb6 | [
"MIT"
] | null | null | null | app/core/admin.py | shreyask543/Recipe-api | 34c43db4ee6cdcd90cdcf8e88a536ef66452ddb6 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseuserAdmin
from django.utils.translation import gettext as _
from core import models
class UserAdmin(BaseuserAdmin):
ordering=['id']
list_display=['email', 'name']
fieldsets=(
(None, {'fields':('email','password... | 25.548387 | 64 | 0.570707 |
794694c022586ee11a24e91b5f3c5af080fc2340 | 1,459 | py | Python | stt/core/local_mic.py | Haynie-Research-and-Development/jarvis | 062f20303b3e1d46a20a68e8ed8337b3d05f84dd | [
"Apache-2.0"
] | 78 | 2017-08-19T03:46:13.000Z | 2020-02-19T04:29:45.000Z | stt/core/local_mic.py | Haynie-Research-and-Development/jarvis | 062f20303b3e1d46a20a68e8ed8337b3d05f84dd | [
"Apache-2.0"
] | 5 | 2017-08-21T16:33:08.000Z | 2018-06-21T18:37:18.000Z | stt/core/local_mic.py | Haynie-Research-and-Development/jarvis | 062f20303b3e1d46a20a68e8ed8337b3d05f84dd | [
"Apache-2.0"
] | 13 | 2017-08-19T16:46:08.000Z | 2018-11-05T23:11:34.000Z | # -*- coding: utf-8 -*-
#**********************************************************
#* CATEGORY JARVIS HOME AUTOMTION
#* GROUP SPEECH TO TEXT
#* AUTHOR LANCE HAYNIE <LANCE@HAYNIEMAIL.COM>
#**********************************************************
#Jarvis Home Automation
#Copyright (C) 2017 Haynie Resear... | 33.930233 | 72 | 0.647019 |
794694c5230efd1b0bcd489a27f0341f8215ab6a | 892 | py | Python | models/model.py | technetbytes/ModelService | 5268d53b4bedb400d8ba4a326297fa7f6b8bc666 | [
"Apache-2.0"
] | null | null | null | models/model.py | technetbytes/ModelService | 5268d53b4bedb400d8ba4a326297fa7f6b8bc666 | [
"Apache-2.0"
] | null | null | null | models/model.py | technetbytes/ModelService | 5268d53b4bedb400d8ba4a326297fa7f6b8bc666 | [
"Apache-2.0"
] | null | null | null | from sqlalchemy import Column, Integer, String, Text, DateTime, Float, Boolean, PickleType
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
class AiModel(Base):
'''This is AiModel sample Data model class.'''
__tablename__ = "tModels"
__table_args__ = {"schema":"KnowHo... | 37.166667 | 90 | 0.705157 |
7946955d4bffa68f8fa64fc98210b680d51091ab | 8,100 | py | Python | examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_derpy.py | felipeek/bullet3 | 6a59241074720e9df119f2f86bc01765917feb1e | [
"Zlib"
] | 9,136 | 2015-01-02T00:41:45.000Z | 2022-03-31T15:30:02.000Z | examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_derpy.py | felipeek/bullet3 | 6a59241074720e9df119f2f86bc01765917feb1e | [
"Zlib"
] | 2,424 | 2015-01-05T08:55:58.000Z | 2022-03-30T19:34:55.000Z | examples/pybullet/gym/pybullet_envs/minitaur/envs/minitaur_derpy.py | felipeek/bullet3 | 6a59241074720e9df119f2f86bc01765917feb1e | [
"Zlib"
] | 2,921 | 2015-01-02T10:19:30.000Z | 2022-03-31T02:48:42.000Z | """This file implements the functionalities of a minitaur derpy using pybullet.
It is the result of first pass system identification for the derpy robot. The
"""
import math
import os, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(os.path.... | 47.368421 | 93 | 0.623086 |
794695b5c4d63abb3ce976e7fe32fe489183d196 | 2,079 | py | Python | airflow/providers/amazon/aws/sensors/sagemaker_tuning.py | daemon-demon/airflow | 6f96e81f0123b30750fb68ec496246023bf63f35 | [
"Apache-2.0"
] | 2 | 2021-07-30T17:25:56.000Z | 2021-08-03T13:51:09.000Z | airflow/providers/amazon/aws/sensors/sagemaker_tuning.py | daemon-demon/airflow | 6f96e81f0123b30750fb68ec496246023bf63f35 | [
"Apache-2.0"
] | 20 | 2021-01-23T12:33:08.000Z | 2021-12-07T22:30:37.000Z | airflow/providers/amazon/aws/sensors/sagemaker_tuning.py | daemon-demon/airflow | 6f96e81f0123b30750fb68ec496246023bf63f35 | [
"Apache-2.0"
] | 1 | 2020-09-10T09:51:46.000Z | 2020-09-10T09:51:46.000Z | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | 36.473684 | 83 | 0.749399 |
7946960dbd2f5d9667143105ebb524c987f9f246 | 969 | gyp | Python | cloud_print/gcp20/prototype/gcp20_device.gyp | hujiajie/pa-chromium | 1816ff80336a6efd1616f9e936880af460b1e105 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2020-05-03T06:33:56.000Z | 2021-11-14T18:39:42.000Z | cloud_print/gcp20/prototype/gcp20_device.gyp | hujiajie/pa-chromium | 1816ff80336a6efd1616f9e936880af460b1e105 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | cloud_print/gcp20/prototype/gcp20_device.gyp | hujiajie/pa-chromium | 1816ff80336a6efd1616f9e936880af460b1e105 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | null | null | null | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
{
'target_defaults': {
'variables': {
'chromium_code': 1,
'enable_wexit_time_destructors': 1,
},
'include_dirs': [
'<(DEPTH)'... | 23.071429 | 72 | 0.506708 |
794697fd8043f084052f9059e46bd0864f7c68e9 | 2,212 | py | Python | v2PyTorch/evaluate.py | gzerveas/TransformChrome | ab1046009aff2ec863aa65223dcfcd750d41ab86 | [
"MIT"
] | 1 | 2020-07-14T18:19:18.000Z | 2020-07-14T18:19:18.000Z | v2PyTorch/evaluate.py | gzerveas/TransformChrome | ab1046009aff2ec863aa65223dcfcd750d41ab86 | [
"MIT"
] | null | null | null | v2PyTorch/evaluate.py | gzerveas/TransformChrome | ab1046009aff2ec863aa65223dcfcd750d41ab86 | [
"MIT"
] | null | null | null | import numpy
import torch
import scipy
import scipy.sparse as sp
import logging
from six.moves import xrange
from collections import OrderedDict
import sys
import pdb
from sklearn import metrics
import torch.nn.functional as F
from torch.autograd import Variable
from pdb import set_trace as stop
def save_to_csv(epoc... | 25.72093 | 127 | 0.661392 |
7946980c82684da7c6dc80538f79d4be317a96b6 | 3,135 | py | Python | superset/explore/form_data/commands/create.py | nieaijun99/superset | 86368dd406b9e828f31186a4b6179d24758a7d87 | [
"Apache-2.0"
] | 2 | 2021-12-21T15:57:16.000Z | 2022-01-31T02:22:02.000Z | superset/explore/form_data/commands/create.py | nieaijun99/superset | 86368dd406b9e828f31186a4b6179d24758a7d87 | [
"Apache-2.0"
] | null | null | null | superset/explore/form_data/commands/create.py | nieaijun99/superset | 86368dd406b9e828f31186a4b6179d24758a7d87 | [
"Apache-2.0"
] | 2 | 2021-12-21T13:41:18.000Z | 2021-12-26T22:16:43.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 42.945205 | 88 | 0.704944 |
79469aa6f38865ce33bd754061ea9ab7f7547358 | 3,447 | py | Python | tests/test_permissions.py | jonathan-s/djangocms-alias | 9a9f3020aa0a01339164094c2bc1caf190d66428 | [
"BSD-3-Clause"
] | 1 | 2020-05-12T02:29:16.000Z | 2020-05-12T02:29:16.000Z | tests/test_permissions.py | jonathan-s/djangocms-alias | 9a9f3020aa0a01339164094c2bc1caf190d66428 | [
"BSD-3-Clause"
] | 9 | 2021-11-30T16:12:46.000Z | 2022-03-31T16:55:36.000Z | tests/test_permissions.py | jonathan-s/djangocms-alias | 9a9f3020aa0a01339164094c2bc1caf190d66428 | [
"BSD-3-Clause"
] | 7 | 2020-01-13T09:10:40.000Z | 2021-07-21T12:49:07.000Z | from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from cms.api import add_plugin
from djangocms_alias.cms_plugins import Alias
from djangocms_alias.models import Alias as AliasModel
from djangocms_alias.utils import is_versioning_enabled
from .base import Ba... | 30.776786 | 67 | 0.577894 |
79469aacd2457be98e2ed7887cc05db3dca2cf18 | 787 | py | Python | tests/conftest.py | caphrim007/hashin | a9e2239bf46fcba12be9ecac272a806fc48bfe1e | [
"MIT"
] | 92 | 2016-01-27T10:41:48.000Z | 2022-03-28T19:54:46.000Z | tests/conftest.py | caphrim007/hashin | a9e2239bf46fcba12be9ecac272a806fc48bfe1e | [
"MIT"
] | 91 | 2016-01-26T22:11:22.000Z | 2022-03-19T12:59:29.000Z | tests/conftest.py | caphrim007/hashin | a9e2239bf46fcba12be9ecac272a806fc48bfe1e | [
"MIT"
] | 28 | 2016-02-01T22:05:27.000Z | 2022-02-24T06:28:09.000Z | import os
from tempfile import mkdtemp
from contextlib import contextmanager
from shutil import rmtree
import mock
import pytest
@pytest.fixture
def murlopen():
with mock.patch("hashin.urlopen") as patch:
yield patch
@pytest.fixture
def mock_get_parser():
with mock.patch("hashin.get_parser") as pa... | 17.108696 | 50 | 0.660737 |
79469ba89529a2626dacbbfb24ed0dab6ffe4d8d | 901 | py | Python | pdfcreator/urls.py | fahimfarhan/cancer-web-app | 6c5d8c5c90b0909cbd161d2ae87b4f12549bdfef | [
"MIT"
] | null | null | null | pdfcreator/urls.py | fahimfarhan/cancer-web-app | 6c5d8c5c90b0909cbd161d2ae87b4f12549bdfef | [
"MIT"
] | 5 | 2021-03-18T20:13:38.000Z | 2022-01-13T00:35:37.000Z | pdfcreator/urls.py | fahimfarhan/cancer-web-app | 6c5d8c5c90b0909cbd161d2ae87b4f12549bdfef | [
"MIT"
] | null | null | null | from django.conf.urls import url
from pdfcreator import views, summary
app_name = 'pdfcreator'
urlpatterns = [
url(r'^view/prescription/(?P<p_id>[0-9]+)/(?P<number>[0-9]+)/(?P<user_pk>[0-9]+)/$', views.view_prescription, name='view_prescription'),
url(r'^pdf/prescription/(?P<p_id>[0-9]+)/(?P<number>[0-9]+)/$... | 47.421053 | 140 | 0.624861 |
79469bb18a2e15a0d92c4d47f85ab7c15df9b034 | 1,519 | py | Python | task1_watchers.py | MoisesFreitas1/DeeperSystems_Task1 | e1ea248c76db72297ad7ff40da645d41d88c031a | [
"MIT"
] | null | null | null | task1_watchers.py | MoisesFreitas1/DeeperSystems_Task1 | e1ea248c76db72297ad7ff40da645d41d88c031a | [
"MIT"
] | null | null | null | task1_watchers.py | MoisesFreitas1/DeeperSystems_Task1 | e1ea248c76db72297ad7ff40da645d41d88c031a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 5 14:36:24 2020
@author: Moises
"""
import pandas as pd
import json
df_json = pd.read_json('source_file_2.json')
df_json = df_json.sort_values(by ='priority')
df_json = pd.concat([df_json], ignore_index=True)
watchers = df_json['watchers'].to_fr... | 29.211538 | 103 | 0.641211 |
79469bb5d514c3c8dbefdef7f387feb8ea3c7246 | 22,090 | py | Python | cozy/evaluation.py | MostAwesomeDude/cozy | e7b0ace2915c54b1176fc4d3eed289ede109a058 | [
"Apache-2.0"
] | null | null | null | cozy/evaluation.py | MostAwesomeDude/cozy | e7b0ace2915c54b1176fc4d3eed289ede109a058 | [
"Apache-2.0"
] | null | null | null | cozy/evaluation.py | MostAwesomeDude/cozy | e7b0ace2915c54b1176fc4d3eed289ede109a058 | [
"Apache-2.0"
] | null | null | null | """Interpreter for Cozy expressions.
Important functions:
- eval: execute an expression in an environment
- eval_bulk: execute the same expression in many different environments
"""
from functools import cmp_to_key, lru_cache
import itertools
from fractions import Fraction
from cozy.target_syntax import *
from coz... | 30.468966 | 216 | 0.568493 |
79469db16c1ae0ea106551d11ce41b87aa329afc | 1,219 | py | Python | benchmarks/comprehension.py | wangwansan/grumpy | aff3b3ff62a34c5baa9783307764f640df021337 | [
"Apache-2.0"
] | 11,252 | 2017-01-04T16:19:12.000Z | 2022-03-31T13:42:31.000Z | benchmarks/comprehension.py | wangwansan/grumpy | aff3b3ff62a34c5baa9783307764f640df021337 | [
"Apache-2.0"
] | 301 | 2017-01-04T17:34:00.000Z | 2022-03-15T21:40:21.000Z | benchmarks/comprehension.py | wangwansan/grumpy | aff3b3ff62a34c5baa9783307764f640df021337 | [
"Apache-2.0"
] | 819 | 2017-01-04T17:26:26.000Z | 2022-03-20T14:11:28.000Z | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 27.088889 | 75 | 0.727646 |
79469de5422df8b871a2ff04e92c210bc18fff0c | 5,051 | py | Python | magrathea/core/feed/entry.py | RootForum/magrathea | 85bf611c749969225b079d2177834a86a9905ef0 | [
"MIT"
] | 1 | 2017-07-22T13:07:05.000Z | 2017-07-22T13:07:05.000Z | magrathea/core/feed/entry.py | RootForum/magrathea | 85bf611c749969225b079d2177834a86a9905ef0 | [
"MIT"
] | null | null | null | magrathea/core/feed/entry.py | RootForum/magrathea | 85bf611c749969225b079d2177834a86a9905ef0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
magrathea.core.feed.entry
~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: Copyright 2014 by the RootForum.org team, see AUTHORS.
:license: MIT License, see LICENSE for details.
"""
import base64
import calendar
import time
from ...utils.convert import to_str, to_bytes
from .info impor... | 29.538012 | 117 | 0.601663 |
79469e718645f32631873f3f1276349a6a6c7b8c | 423 | py | Python | setup.py | ljwolf/seatsvotes | 6d44bba02016cc7ac24cebf6e0d70e1e9e801a5b | [
"MIT"
] | null | null | null | setup.py | ljwolf/seatsvotes | 6d44bba02016cc7ac24cebf6e0d70e1e9e801a5b | [
"MIT"
] | null | null | null | setup.py | ljwolf/seatsvotes | 6d44bba02016cc7ac24cebf6e0d70e1e9e801a5b | [
"MIT"
] | null | null | null | from setuptools import setup
setup(name='seatsvotes',
version='0.0.1',
description='tools to conduct seats votes modeling',
url='https://github.com/ljwolf/seatsvotes',
author='Levi John Wolf',
author_email='levi.john.wolf@gmail.com',
license='3-Clause BSD',
packages=['seatsvot... | 32.538462 | 74 | 0.654846 |
79469e7655b1bc90e3a75ea2112b6d26f0962412 | 1,450 | py | Python | paasta_tools/list_tron_namespaces.py | sofyat/paasta | 6765ed992ec224bf78741ffcd615a6a6c6ffb780 | [
"Apache-2.0"
] | null | null | null | paasta_tools/list_tron_namespaces.py | sofyat/paasta | 6765ed992ec224bf78741ffcd615a6a6c6ffb780 | [
"Apache-2.0"
] | null | null | null | paasta_tools/list_tron_namespaces.py | sofyat/paasta | 6765ed992ec224bf78741ffcd615a6a6c6ffb780 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2015-2018 Yelp 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... | 27.884615 | 75 | 0.683448 |
79469ff3c4a8d013fce0bb56c6dee8041dee039b | 7,848 | py | Python | bokeh/themes/theme.py | dkapitan/bokeh | d518cecd1d9919db49e3c0033e8c1b89db9965bf | [
"BSD-3-Clause"
] | 1 | 2020-02-07T16:57:56.000Z | 2020-02-07T16:57:56.000Z | bokeh/themes/theme.py | dkapitan/bokeh | d518cecd1d9919db49e3c0033e8c1b89db9965bf | [
"BSD-3-Clause"
] | 1 | 2021-05-11T23:19:27.000Z | 2021-05-11T23:19:27.000Z | bokeh/themes/theme.py | dkapitan/bokeh | d518cecd1d9919db49e3c0033e8c1b89db9965bf | [
"BSD-3-Clause"
] | 1 | 2020-03-06T07:38:50.000Z | 2020-03-06T07:38:50.000Z | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | 38.470588 | 128 | 0.507008 |
7946a07e6a738a4866b87072b28c6c3e9b2fdb77 | 1,414 | py | Python | ingenico/direct/sdk/domain/fixed_list_validator.py | Ingenico/direct-sdk-python3 | d2b30b8e8afb307153a1f19ac4c054d5344449ce | [
"Apache-2.0"
] | null | null | null | ingenico/direct/sdk/domain/fixed_list_validator.py | Ingenico/direct-sdk-python3 | d2b30b8e8afb307153a1f19ac4c054d5344449ce | [
"Apache-2.0"
] | 1 | 2021-03-30T12:55:39.000Z | 2021-04-08T08:23:27.000Z | ingenico/direct/sdk/domain/fixed_list_validator.py | Ingenico/direct-sdk-python3 | d2b30b8e8afb307153a1f19ac4c054d5344449ce | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
#
# This class was auto-generated from the API references found at
# https://support.direct.ingenico.com/documentation/api/reference/
#
from typing import List
from ingenico.direct.sdk.data_object import DataObject
class FixedListValidator(DataObject):
__allowed_values = None
@proper... | 32.883721 | 97 | 0.6471 |
7946a0cf105413db4fce928c4b26a3a9e25dec7f | 5,107 | py | Python | tests/test_utils/system_tests_class.py | dorranh/airflow | 1a9a2cadcf8606cfcb729d1323dd33dfacc64633 | [
"Apache-2.0"
] | 5 | 2020-07-17T07:33:58.000Z | 2022-03-02T06:23:47.000Z | tests/test_utils/system_tests_class.py | dorranh/airflow | 1a9a2cadcf8606cfcb729d1323dd33dfacc64633 | [
"Apache-2.0"
] | 7 | 2020-06-03T14:55:17.000Z | 2021-12-30T00:01:50.000Z | tests/test_utils/system_tests_class.py | dorranh/airflow | 1a9a2cadcf8606cfcb729d1323dd33dfacc64633 | [
"Apache-2.0"
] | 12 | 2020-01-09T14:02:39.000Z | 2022-01-24T07:18:51.000Z | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 36.478571 | 98 | 0.673389 |
7946a0d1aad524bd14e83eb3724ee4288fde68ec | 1,390 | py | Python | memory.py | ppeigne/DQN-reimplementation | ce5e11f9b6c7c0dc42f9a65fee872a70ac5c6415 | [
"MIT"
] | null | null | null | memory.py | ppeigne/DQN-reimplementation | ce5e11f9b6c7c0dc42f9a65fee872a70ac5c6415 | [
"MIT"
] | null | null | null | memory.py | ppeigne/DQN-reimplementation | ce5e11f9b6c7c0dc42f9a65fee872a70ac5c6415 | [
"MIT"
] | null | null | null | import numpy as np
import torch as T
from typing import Tuple
class Memory():
def __init__(self, size:int, state_shape: Tuple[int, ...]) -> None:
self.size = size
self.current_states = T.zeros((size, *state_shape), dtype=T.float32)
self.actions = T.zeros(size, dtype=T.int64)
self.r... | 40.882353 | 103 | 0.651079 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.