hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 972 | max_forks_repo_name stringlengths 6 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
83460a0306ce0c4d051de8ff7ec33c1611162381 | 18,428 | py | Python | stock_analysis/test_file.py | ztaylor2/stock-analysis | 57edd3a7b33a61cf3b7f68dab6b7640ccdc65a02 | [
"MIT"
] | 15 | 2017-11-03T17:30:02.000Z | 2022-01-14T06:15:06.000Z | stock_analysis/test_file.py | seekdestiny/stock-analysis | 57edd3a7b33a61cf3b7f68dab6b7640ccdc65a02 | [
"MIT"
] | 3 | 2019-12-26T16:39:17.000Z | 2021-06-01T21:56:41.000Z | stock_analysis/test_file.py | seekdestiny/stock-analysis | 57edd3a7b33a61cf3b7f68dab6b7640ccdc65a02 | [
"MIT"
] | 4 | 2018-03-01T06:35:08.000Z | 2021-04-02T16:39:12.000Z | """Tests for the Stock Analysis app."""
from __future__ import unicode_literals
from pyramid.httpexceptions import HTTPNotFound, HTTPFound, HTTPBadRequest
from datetime import datetime
import os
import pytest
""" UNIT TESTS FOR MODELS """
stock_details = {
'company': 'Yahoo',
'exchange': 'NYSE',
'ticker... | 35.302682 | 99 | 0.674029 |
299d0827c01c5140f974b69bc3db8af150b95bb5 | 4,758 | py | Python | scripts/mdns.py | jrbenito/SonoffDIY-tasmotizer | 1fe9eb9b3b5630102feaf941bd02173d916e81a5 | [
"MIT"
] | null | null | null | scripts/mdns.py | jrbenito/SonoffDIY-tasmotizer | 1fe9eb9b3b5630102feaf941bd02173d916e81a5 | [
"MIT"
] | 3 | 2020-03-30T14:07:54.000Z | 2020-03-30T22:59:29.000Z | scripts/mdns.py | jrbenito/SonoffDIY-tasmotizer | 1fe9eb9b3b5630102feaf941bd02173d916e81a5 | [
"MIT"
] | null | null | null | import hashlib
import json
import time
import sys
import requests
from zeroconf import ServiceBrowser, Zeroconf
class MyListener(object):
"""
This class is used for the mDNS browsing discovery device, including calling the remove_service and add_service
properties to ServiceBrowser, and also contains broa... | 35.244444 | 116 | 0.588903 |
570109eb1b0b526b78c82465503a5810ee1663cb | 2,502 | py | Python | nipype/interfaces/semtools/diffusion/maxcurvature.py | felixsc1/nipype | e722d6170593583f16ddfcb95473e5d30b5f1d7c | [
"Apache-2.0"
] | 8 | 2019-05-29T09:38:30.000Z | 2021-01-20T03:36:59.000Z | nipype/interfaces/semtools/diffusion/maxcurvature.py | felixsc1/nipype | e722d6170593583f16ddfcb95473e5d30b5f1d7c | [
"Apache-2.0"
] | 12 | 2021-03-09T03:01:16.000Z | 2022-03-11T23:59:36.000Z | nipype/interfaces/semtools/diffusion/maxcurvature.py | felixsc1/nipype | e722d6170593583f16ddfcb95473e5d30b5f1d7c | [
"Apache-2.0"
] | 2 | 2017-09-23T16:22:00.000Z | 2019-08-01T14:18:52.000Z | # -*- coding: utf-8 -*-
# -*- coding: utf8 -*-
"""Autogenerated file - DO NOT EDIT
If you spot a bug, please report it on the mailing list and/or change the generator."""
import os
from ...base import (CommandLine, CommandLineInputSpec, SEMLikeCommandLine,
TraitedSpec, File, Directory, traits, is... | 43.894737 | 421 | 0.733813 |
51a7e9d639b3997cc869cd14a27e9e263a7dc805 | 2,490 | py | Python | api/content/signals.py | luoyangC/island_django | e40a16f1465edc1376b00aa8f953b285f9802731 | [
"Apache-2.0"
] | null | null | null | api/content/signals.py | luoyangC/island_django | e40a16f1465edc1376b00aa8f953b285f9802731 | [
"Apache-2.0"
] | 6 | 2020-05-05T07:13:16.000Z | 2021-09-22T18:58:16.000Z | api/content/signals.py | luoyangC/island_django | e40a16f1465edc1376b00aa8f953b285f9802731 | [
"Apache-2.0"
] | null | null | null | from django.db.models.signals import post_save, post_delete
from django.dispatch import receiver
from content.models import Article
from action.models import Like, Fav, Comment, Reply
@receiver(post_save, sender=Fav)
def add_fav(sender, instance=None, **kwargs):
if instance:
_article = Article.ob... | 30.740741 | 71 | 0.640161 |
a653a6560a881ca6ce83946e4e639af153cdfca6 | 4,777 | py | Python | stability/stability-iterative-android-tests/iterative/Launch_Exit_Repeatedly.py | JianfengXu/crosswalk-test-suite | 6fb6ef9d89235743ee8b867fd2541c5bdf388786 | [
"BSD-3-Clause"
] | null | null | null | stability/stability-iterative-android-tests/iterative/Launch_Exit_Repeatedly.py | JianfengXu/crosswalk-test-suite | 6fb6ef9d89235743ee8b867fd2541c5bdf388786 | [
"BSD-3-Clause"
] | null | null | null | stability/stability-iterative-android-tests/iterative/Launch_Exit_Repeatedly.py | JianfengXu/crosswalk-test-suite | 6fb6ef9d89235743ee8b867fd2541c5bdf388786 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
#
# Copyright (c) 2015 Intel Corporation.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of works must retain the original copyright notice, this
# list of c... | 40.142857 | 83 | 0.55516 |
a3ba97a93c960cbcd0df7919306b95fc4f28144f | 100 | py | Python | inspect_platform.py | TheCharmingCthulhu/cython-vst-loader | 2d2d358515f24f4846ca664e5a9b366a207207a6 | [
"MIT"
] | 23 | 2020-07-29T14:44:29.000Z | 2022-01-07T05:29:16.000Z | inspect_platform.py | TheCharmingCthulhu/cython-vst-loader | 2d2d358515f24f4846ca664e5a9b366a207207a6 | [
"MIT"
] | 14 | 2020-09-09T02:38:24.000Z | 2022-03-04T05:19:25.000Z | inspect_platform.py | TheCharmingCthulhu/cython-vst-loader | 2d2d358515f24f4846ca664e5a9b366a207207a6 | [
"MIT"
] | 2 | 2021-06-05T23:30:08.000Z | 2021-06-06T19:58:59.000Z | import os
from sys import platform
print("sys.platform: " + platform)
print("os.name: " + os.name)
| 16.666667 | 34 | 0.7 |
be9210a06c6699eee39ff691f9988557b99ea616 | 3,879 | py | Python | superset/datasets/commands/export.py | 7vikpeculiar/superset | 800ced5e257d5d83d6dbe4ced0e7318ac40d026f | [
"Apache-2.0"
] | 2 | 2021-12-21T15:57:16.000Z | 2022-01-31T02:22:02.000Z | superset/datasets/commands/export.py | 7vikpeculiar/superset | 800ced5e257d5d83d6dbe4ced0e7318ac40d026f | [
"Apache-2.0"
] | 10 | 2022-01-05T01:31:07.000Z | 2022-03-16T01:09:46.000Z | superset/datasets/commands/export.py | 7vikpeculiar/superset | 800ced5e257d5d83d6dbe4ced0e7318ac40d026f | [
"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... | 38.029412 | 87 | 0.646816 |
5c196b7661c634a0fb4335cadae1836297423d05 | 8,790 | py | Python | python/gui/filedialog.py | trago/fringeproc | 6a2441bce129a56296f50b9c333609cc3036eb7e | [
"Unlicense"
] | 3 | 2015-09-17T14:19:34.000Z | 2018-02-08T07:03:23.000Z | python/gui/filedialog.py | trago/fringeproc | 6a2441bce129a56296f50b9c333609cc3036eb7e | [
"Unlicense"
] | null | null | null | python/gui/filedialog.py | trago/fringeproc | 6a2441bce129a56296f50b9c333609cc3036eb7e | [
"Unlicense"
] | null | null | null | # Copyright (c) 2012, Julio C. Estrada
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
# + Redistributions of source code must retain the above copyright notice,
# this list of conditions and ... | 34.470588 | 87 | 0.568601 |
ac0614953cb64ace12f03a420dc1855dc983faf1 | 34 | py | Python | cct/qtgui2/main/scripting/wizard/sequencewizard/__init__.py | awacha/cct | be1adbed2533df15c778051f3f4f9da0749c873a | [
"BSD-3-Clause"
] | 1 | 2015-11-04T16:37:39.000Z | 2015-11-04T16:37:39.000Z | cct/qtgui2/main/scripting/wizard/sequencewizard/__init__.py | awacha/cct | be1adbed2533df15c778051f3f4f9da0749c873a | [
"BSD-3-Clause"
] | null | null | null | cct/qtgui2/main/scripting/wizard/sequencewizard/__init__.py | awacha/cct | be1adbed2533df15c778051f3f4f9da0749c873a | [
"BSD-3-Clause"
] | 1 | 2020-03-05T02:50:43.000Z | 2020-03-05T02:50:43.000Z | from .wizard import SequenceWizard | 34 | 34 | 0.882353 |
6bb59e0a7ec370c58ce11ff8e19a22ac49c55b32 | 10,070 | py | Python | watson_developer_cloud/alchemy_language_v1.py | mcwilkes/python-sdk | bc545472ad1d00f77e916773e3a949160e4f48c3 | [
"Apache-2.0"
] | null | null | null | watson_developer_cloud/alchemy_language_v1.py | mcwilkes/python-sdk | bc545472ad1d00f77e916773e3a949160e4f48c3 | [
"Apache-2.0"
] | null | null | null | watson_developer_cloud/alchemy_language_v1.py | mcwilkes/python-sdk | bc545472ad1d00f77e916773e3a949160e4f48c3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 IBM 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 agreed t... | 49.121951 | 119 | 0.630983 |
c8d24a6f7788231824b6f5dec00308f3351c374b | 2,390 | py | Python | docs/Lessons/topics/sql/scrollCanv.py | tgolsson/appJar | 5e2f8bff44e927e7c2bae17fccddc6dbf79952f0 | [
"Apache-2.0"
] | 666 | 2016-11-14T18:17:40.000Z | 2022-03-29T03:53:22.000Z | docs/Lessons/topics/sql/scrollCanv.py | tgolsson/appJar | 5e2f8bff44e927e7c2bae17fccddc6dbf79952f0 | [
"Apache-2.0"
] | 598 | 2016-10-20T21:04:09.000Z | 2022-03-15T22:44:49.000Z | docs/Lessons/topics/sql/scrollCanv.py | tgolsson/appJar | 5e2f8bff44e927e7c2bae17fccddc6dbf79952f0 | [
"Apache-2.0"
] | 95 | 2017-01-19T12:23:58.000Z | 2022-03-06T18:16:21.000Z | import tkinter as tk
class Example(tk.Frame):
def __init__(self, root):
tk.Frame.__init__(self, root)
self.canvas = tk.Canvas(root, borderwidth=0, background="#ffffff")
self.vsb = tk.Scrollbar(root, orient="vertical", command=self.canvas.yview)
self.canvas.configure(yscrollcommand... | 37.936508 | 91 | 0.573222 |
7fd7d312de80f4ce46aa3d7cc60d85d0ad9cadd3 | 2,488 | py | Python | citicup-model/production/model/average_model.py | TianChenjiang/Networker | 07ae61860470de3786162cbdfe7f8ed58d1726ce | [
"MIT"
] | null | null | null | citicup-model/production/model/average_model.py | TianChenjiang/Networker | 07ae61860470de3786162cbdfe7f8ed58d1726ce | [
"MIT"
] | 6 | 2020-01-28T22:59:04.000Z | 2022-01-21T23:29:23.000Z | citicup-model/production/model/average_model.py | TianChenjiang/Networker | 07ae61860470de3786162cbdfe7f8ed58d1726ce | [
"MIT"
] | 1 | 2021-03-21T03:19:29.000Z | 2021-03-21T03:19:29.000Z | from model.files import pro, code_set, JSPATH
import datetime
from model.deeplearning_model import deep_predict
from model.lightgbm_model import lgb_predict
import json
import pandas as pd
from werkzeug.exceptions import NotFound
import bisect
def get_result(code, forecast_close_line, price_df):
deep_prob = deep_... | 32.311688 | 114 | 0.680466 |
84da16d60f215ebf2de5ae35e9e9227036e844c7 | 1,581 | py | Python | authors/apps/profiles/utilities.py | arthurarty/ah-backend-poseidon | d2b561e83ed1e9a585853f4a4e2e37805e86c35c | [
"BSD-3-Clause"
] | 1 | 2019-01-22T18:00:44.000Z | 2019-01-22T18:00:44.000Z | authors/apps/profiles/utilities.py | arthurarty/ah-backend-poseidon | d2b561e83ed1e9a585853f4a4e2e37805e86c35c | [
"BSD-3-Clause"
] | 24 | 2018-11-27T10:11:13.000Z | 2021-06-10T21:01:15.000Z | authors/apps/profiles/utilities.py | andela/ah-backend-poseidon | d2b561e83ed1e9a585853f4a4e2e37805e86c35c | [
"BSD-3-Clause"
] | 4 | 2019-05-29T12:08:52.000Z | 2020-05-23T11:48:42.000Z | from .exceptions import NotificationDoesNotExist, NotificaionForbidden
from .models import Notification, Profile
from django.dispatch import receiver
from ..comments.models import Comment, Article
from django.db.models.signals import post_save
from ..authentication.models import User
def return_notification(request, ... | 35.931818 | 77 | 0.73561 |
e6f22e805b6ab86eb5fc6ce63307faa5bf2ae4a4 | 3,769 | py | Python | xlsxwriter/test/worksheet/test_cond_format09.py | eddiechapman/XlsxWriter | c636117ab30e64e4b7b824c9105595c42887c2c9 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2021-03-27T11:14:47.000Z | 2021-03-27T11:14:47.000Z | xlsxwriter/test/worksheet/test_cond_format09.py | xiaolanmeng86/XlsxWriter | 6c3ea23a410e8216eab8f5751e5544ffb444b3da | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/worksheet/test_cond_format09.py | xiaolanmeng86/XlsxWriter | 6c3ea23a410e8216eab8f5751e5544ffb444b3da | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2021, John McNamara, jmcnamara@cpan.org
#
import unittest
from ...compatibility import StringIO
from ..helperfunctions import _xml_to_list
from ...worksheet import Worksheet
class TestAss... | 35.895238 | 171 | 0.405678 |
a075d89037174b7b5c317979bf4f0a6e3a7446da | 5,164 | py | Python | squeaknode/twitter/twitter_forwarder.py | azernik/squeaknode | 3d29338d5674f55d1c4bc97a370053d43810559f | [
"MIT"
] | null | null | null | squeaknode/twitter/twitter_forwarder.py | azernik/squeaknode | 3d29338d5674f55d1c4bc97a370053d43810559f | [
"MIT"
] | null | null | null | squeaknode/twitter/twitter_forwarder.py | azernik/squeaknode | 3d29338d5674f55d1c4bc97a370053d43810559f | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2020 Jonathan Zernik
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, mer... | 36.366197 | 107 | 0.640589 |
2c45edc6ec3742428d3a313ed18c064f133fd58a | 21,707 | py | Python | linen_examples/wmt/input_pipeline.py | isabella232/flax | 39a04e82d6f97ef90c59425599018f2b9df8b6ea | [
"Apache-2.0"
] | null | null | null | linen_examples/wmt/input_pipeline.py | isabella232/flax | 39a04e82d6f97ef90c59425599018f2b9df8b6ea | [
"Apache-2.0"
] | null | null | null | linen_examples/wmt/input_pipeline.py | isabella232/flax | 39a04e82d6f97ef90c59425599018f2b9df8b6ea | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The Flax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 37.620451 | 80 | 0.633436 |
623619850eed02c3beaf5bd487e2d9b83bcc7d77 | 1,080 | py | Python | sandbox/apps/python/multigrid/jacobi3D/polymage_defect.py | rcodin/polymage | 653487be125dec4950d1c65da4f736fa05fb938f | [
"Apache-2.0"
] | 10 | 2016-07-22T06:53:11.000Z | 2021-02-19T06:22:00.000Z | sandbox/apps/python/multigrid/jacobi3D/polymage_defect.py | rcodin/polymage | 653487be125dec4950d1c65da4f736fa05fb938f | [
"Apache-2.0"
] | null | null | null | sandbox/apps/python/multigrid/jacobi3D/polymage_defect.py | rcodin/polymage | 653487be125dec4950d1c65da4f736fa05fb938f | [
"Apache-2.0"
] | 2 | 2017-11-21T20:29:36.000Z | 2021-05-21T01:52:05.000Z | from __init__ import *
import sys
from polymage_common import set_ghosts
sys.path.insert(0, ROOT)
from compiler import *
from constructs import *
def defect(U_, F_, l, name, pipe_data):
if U_ == None:
return F_
z = pipe_data['z']
y = pipe_data['y']
x = pipe_data['x']
invhh = pipe_dat... | 25.116279 | 65 | 0.422222 |
0e9226ebeb9ac9de73c16b46f793333e83198b72 | 7,787 | py | Python | src/morphforgecontrib/simulation/channels/util.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | 1 | 2021-01-21T11:31:59.000Z | 2021-01-21T11:31:59.000Z | src/morphforgecontrib/simulation/channels/util.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | null | null | null | src/morphforgecontrib/simulation/channels/util.py | mikehulluk/morphforge | 2a95096f144ed4ea487decb735ce66706357d3c7 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are m... | 44.497143 | 197 | 0.577629 |
f9bee3927790f0c9594d70d9c339fb9e4cf3d7c7 | 1,466 | py | Python | Raspberry_Pi/compare_fp.py | sbcshop/PiFinger | f4825aacade25afbde484f1cd28880223fb89672 | [
"MIT"
] | 3 | 2021-02-26T01:43:22.000Z | 2021-12-09T16:38:02.000Z | Raspberry_Pi/compare_fp.py | sbcshop/PiFinger | f4825aacade25afbde484f1cd28880223fb89672 | [
"MIT"
] | null | null | null | Raspberry_Pi/compare_fp.py | sbcshop/PiFinger | f4825aacade25afbde484f1cd28880223fb89672 | [
"MIT"
] | null | null | null | from oled_091 import SSD1306
from os import path
from time import sleep
DIR_PATH = path.abspath(path.dirname(__file__))
DefaultFont = path.join(DIR_PATH, "Fonts/GothamLight.ttf")
display = SSD1306()
# Import FingerprintSensor class from fingerprint module
from fingerprint import FingerprintSensor
# Set the serial... | 29.32 | 72 | 0.721692 |
e7e97332c38f23c403998751e6bad8d216b5eccc | 2,527 | py | Python | accelbyte_py_sdk/api/lobby/models/model_user_accept_friend_request.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/lobby/models/model_user_accept_friend_request.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | accelbyte_py_sdk/api/lobby/models/model_user_accept_friend_request.py | encyphered/accelbyte-python-sdk | 09c1e989d7251de308150fdcd3119d662ca2d205 | [
"MIT"
] | null | null | null | # Auto-generated at 2021-09-27T17:12:33.456547+08:00
# from: Justice Lobby Service (1.33.0)
# Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved.
# This is licensed software from AccelByte Inc, for limitations
# and restrictions contact your company contract manager.
# pylint: disable=duplicate-code
# pylin... | 28.077778 | 109 | 0.649387 |
6753c919d390bf184cef9defbfba8f1e3ff83c78 | 132 | py | Python | Section 2/TokenizeInputData.py | PacktPublishing/Clean-Data-Tips-Tricks-and-Techniques | 4ca6a8025e3825f1e3083a9162117c9d888571e9 | [
"MIT"
] | 11 | 2018-11-10T16:42:59.000Z | 2021-10-01T23:23:52.000Z | Section 2/TokenizeInputData.py | PacktPublishing/Clean-Data-Tips-Tricks-and-Techniques | 4ca6a8025e3825f1e3083a9162117c9d888571e9 | [
"MIT"
] | null | null | null | Section 2/TokenizeInputData.py | PacktPublishing/Clean-Data-Tips-Tricks-and-Techniques | 4ca6a8025e3825f1e3083a9162117c9d888571e9 | [
"MIT"
] | 7 | 2018-10-31T13:07:56.000Z | 2021-03-13T19:48:38.000Z | from nltk.tokenize import word_tokenize
text1 = "It's true that the chicken was smart."
tokens = word_tokenize(text1)
print(tokens)
| 26.4 | 47 | 0.787879 |
15e40208aa229506c9b539f2b22806f08d671fb1 | 117 | py | Python | Clase 8 otro ejemplo/test/test_multiplicar.py | JoselynRuiz/Programacion-III | 9c09378e1e933372d0dfba2d2261f04c5aee86b3 | [
"MIT"
] | null | null | null | Clase 8 otro ejemplo/test/test_multiplicar.py | JoselynRuiz/Programacion-III | 9c09378e1e933372d0dfba2d2261f04c5aee86b3 | [
"MIT"
] | null | null | null | Clase 8 otro ejemplo/test/test_multiplicar.py | JoselynRuiz/Programacion-III | 9c09378e1e933372d0dfba2d2261f04c5aee86b3 | [
"MIT"
] | null | null | null | from unittest import TestCase
class TestMultiplicar(TestCase):
def test_multiplicar(self):
self.fail()
| 16.714286 | 32 | 0.726496 |
d22d9fe5307e3678f17236c4d3837f3bad6ba3e0 | 3,174 | py | Python | python/pysoarlib/IdentifierExtensions.py | amininger/vim-soar-debugger | c1a4cfa8b0e4760470c5619325f522f2f5021c25 | [
"MIT"
] | 10 | 2019-05-31T19:00:27.000Z | 2022-01-15T10:07:51.000Z | python/pysoarlib/IdentifierExtensions.py | amininger/vim-soar-debugger | c1a4cfa8b0e4760470c5619325f522f2f5021c25 | [
"MIT"
] | 2 | 2020-04-21T12:36:01.000Z | 2020-04-28T13:18:03.000Z | python/pysoarlib/IdentifierExtensions.py | amininger/vim-soar-debugger | c1a4cfa8b0e4760470c5619325f522f2f5021c25 | [
"MIT"
] | 4 | 2020-04-21T14:51:27.000Z | 2022-01-15T10:07:35.000Z | """ Defines additional helper methods for the Identifier class for accessing child values
This module is not intended to be imported directly,
Importing the pysoarlib module will cause these to be added to the Identifier class
Note that the methods will use CamelCase, so get_child_str => GetChildStr
"""
_INTEGER_VAL =... | 39.675 | 130 | 0.687146 |
50089aa7630077ad0b4162fb733b4b56c73d0d6d | 14,286 | py | Python | tasks/pipeline.py | psviderski/datadog-agent | dd41dd75294f4605409aea7545c26e61f77d7abb | [
"Apache-2.0"
] | null | null | null | tasks/pipeline.py | psviderski/datadog-agent | dd41dd75294f4605409aea7545c26e61f77d7abb | [
"Apache-2.0"
] | null | null | null | tasks/pipeline.py | psviderski/datadog-agent | dd41dd75294f4605409aea7545c26e61f77d7abb | [
"Apache-2.0"
] | null | null | null | import io
import os
import re
import traceback
from collections import defaultdict
from invoke import task
from invoke.exceptions import Exit
from tasks.utils import DEFAULT_BRANCH
from .libs.common.color import color_message
from .libs.common.gitlab import Gitlab
from .libs.pipeline_notifications import (
base_... | 38.096 | 145 | 0.666807 |
b34c2d49fd98275f79a55a1bee988d1b09ff2e17 | 1,142 | py | Python | venv/lib/python3.7/site-packages/djangosecure/fileslib.py | Justin-Bee/SER401_Trynkit | 3bf826121b2115f67271d88aa253075d71e81a90 | [
"Apache-2.0"
] | 4 | 2017-01-15T08:46:56.000Z | 2021-03-11T21:35:48.000Z | venv/lib/python3.7/site-packages/djangosecure/fileslib.py | Justin-Bee/SER401-Trynkit | 3bf826121b2115f67271d88aa253075d71e81a90 | [
"Apache-2.0"
] | 51 | 2019-10-08T01:53:02.000Z | 2021-06-04T22:02:21.000Z | djangosecure/fileslib.py | rafahsolis/djangosecure | 698169e8f9cd2665fa4db27f27b9dcf0f09ad54b | [
"Apache-2.0"
] | 2 | 2019-10-10T17:06:33.000Z | 2020-06-16T05:34:13.000Z | # -*-coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import os
# from django.utils.translation import ugettext as _
def check_or_create_dir(directorio, logger=None):
"""
Check if some path exists, creating it if not
:param directorio:
:param logger: logging logger instance
... | 30.864865 | 98 | 0.626095 |
4b7b978f42688b99f8622d1cfd80d14252969ecb | 25,606 | py | Python | tests/test_factory.py | g4brielvs/faker | bf206c96d347f948cc189e0f321e8dd0b55d0149 | [
"MIT"
] | null | null | null | tests/test_factory.py | g4brielvs/faker | bf206c96d347f948cc189e0f321e8dd0b55d0149 | [
"MIT"
] | null | null | null | tests/test_factory.py | g4brielvs/faker | bf206c96d347f948cc189e0f321e8dd0b55d0149 | [
"MIT"
] | null | null | null | # coding=utf-8
from __future__ import unicode_literals
import re
import unittest
import string
import sys
from ipaddress import ip_address, ip_network
import six
from faker import Generator, Faker
from faker.generator import random
from faker.utils import text, decorators
class BarProvider(object):
def foo_f... | 35.514563 | 97 | 0.599742 |
be396374442be330e4430c5c700ed4d24e175ed6 | 619 | py | Python | metf_python_client/examples/03-BlynkUnitTest.py | dontsovcmc/metf-python-client | 7d9100bfdb0dc14857fb8cd1f49b50439cba18f0 | [
"MIT"
] | null | null | null | metf_python_client/examples/03-BlynkUnitTest.py | dontsovcmc/metf-python-client | 7d9100bfdb0dc14857fb8cd1f49b50439cba18f0 | [
"MIT"
] | null | null | null | metf_python_client/examples/03-BlynkUnitTest.py | dontsovcmc/metf-python-client | 7d9100bfdb0dc14857fb8cd1f49b50439cba18f0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import unittest
from metf_python_client import METFClient, HIGH, LOW, OUTPUT
from metf_python_client.boards.nodemcu import LED_BUILTIN_AUX
ESP_HOST = '192.168.3.49'
class TestMethods(unittest.TestCase):
def test_blynk(self):
# Blynk build id NodeMCU LED
# https://lowvolt... | 22.107143 | 78 | 0.673667 |
8e041c0b8bff9af136b7b62833dca827e752528d | 576 | py | Python | fairmotion/utils/constants.py | CristianNajeraL/fairmotion | 60955cf208af5a1b5bbc46152c29dfa8f60fd9d2 | [
"BSD-3-Clause"
] | 419 | 2020-08-28T20:06:33.000Z | 2022-03-26T19:33:54.000Z | fairmotion/utils/constants.py | CristianNajeraL/fairmotion | 60955cf208af5a1b5bbc46152c29dfa8f60fd9d2 | [
"BSD-3-Clause"
] | 18 | 2020-09-08T21:13:19.000Z | 2022-03-08T17:33:30.000Z | fairmotion/utils/constants.py | CristianNajeraL/fairmotion | 60955cf208af5a1b5bbc46152c29dfa8f60fd9d2 | [
"BSD-3-Clause"
] | 65 | 2020-08-31T18:31:49.000Z | 2022-03-19T06:26:13.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
import numpy as np
EPSILON = np.finfo(float).eps
EYE_R = np.array([[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], float)
EYE_T = np.array(
[
[1.0, 0.0, 0.0, 0.0],
[0.0, 1.0, 0.0, 0.0],
[0.0, 0.0, 1.0, 0.0],
[0.0, 0.0, 0.0, ... | 14.769231 | 76 | 0.508681 |
f6ebee3151d7ebc21ad0f6173e8ad2b71bfe2910 | 79 | py | Python | tests/perfs/test_ozone_perf_measure_L2.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/perfs/test_ozone_perf_measure_L2.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/perfs/test_ozone_perf_measure_L2.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z |
import tests.perfs.test_ozone_perf_measure as tperf
tperf.build_model("L2");
| 15.8 | 51 | 0.810127 |
002986f93736843311f40e8e7caefcbc2a67468d | 1,518 | py | Python | pysimplegui/DemoPrograms/Demo_OpenCV_Webcam.py | konsan1101/py-etc | bcca13119b0d2453866988404fd1c4976f55d4d5 | [
"MIT"
] | null | null | null | pysimplegui/DemoPrograms/Demo_OpenCV_Webcam.py | konsan1101/py-etc | bcca13119b0d2453866988404fd1c4976f55d4d5 | [
"MIT"
] | 2 | 2020-06-06T00:30:56.000Z | 2021-06-10T22:30:37.000Z | pysimplegui/DemoPrograms/Demo_OpenCV_Webcam.py | konsan1101/py-etc | bcca13119b0d2453866988404fd1c4976f55d4d5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import PySimpleGUI as sg
import cv2
import numpy as np
"""
Demo program that displays a webcam using OpenCV
"""
def main():
sg.theme('Black')
# define the window layout
layout = [[sg.Text('OpenCV Demo', size=(40, 1), justification='center', font='Helvetica 20')],
[sg... | 29.192308 | 98 | 0.557312 |
bdbda4a618a20b678d6f6e622802e9e786dc5033 | 480 | py | Python | clinic/migrations/0004_auto_20181105_1918.py | Pranavraut033/Patient-Management | 4c48087d8a2aa095e63200af5232f738513333ce | [
"Apache-2.0"
] | null | null | null | clinic/migrations/0004_auto_20181105_1918.py | Pranavraut033/Patient-Management | 4c48087d8a2aa095e63200af5232f738513333ce | [
"Apache-2.0"
] | null | null | null | clinic/migrations/0004_auto_20181105_1918.py | Pranavraut033/Patient-Management | 4c48087d8a2aa095e63200af5232f738513333ce | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.0.4 on 2018-11-05 13:48
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('clinic', '0003_auto_20181105_1916'),
]
operations = [
migrations.AlterField(
model_name='person',
name='profile',
... | 25.263158 | 144 | 0.641667 |
66a3479b2cc92353a1d7c43a0cc83b65f09659c9 | 3,626 | py | Python | src/sentry/utils/data_filters.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | 1 | 2019-10-17T17:46:16.000Z | 2019-10-17T17:46:16.000Z | src/sentry/utils/data_filters.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | null | null | null | src/sentry/utils/data_filters.py | learninto/sentry | 4f9f564841498b3af49c1677d6b61f3e47b01923 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
import fnmatch
import ipaddress
import six
from django.utils.encoding import force_text
from sentry import tsdb
from sentry.utils.safe import get_path
class FilterStatKeys(object):
"""
NOTE: This enum also exists in semaphore, check if alignment is needed when
edi... | 29.479675 | 99 | 0.699669 |
294ae008f23633193b477e660601e11a1c5cbae5 | 862 | py | Python | textrenderer/corpus/corpus_utils.py | Sand0001/OCR_textrender_jap_chn_eng | 87a01946bb8cd5229d2babcdf42a18df5b3e561f | [
"MIT"
] | null | null | null | textrenderer/corpus/corpus_utils.py | Sand0001/OCR_textrender_jap_chn_eng | 87a01946bb8cd5229d2babcdf42a18df5b3e561f | [
"MIT"
] | null | null | null | textrenderer/corpus/corpus_utils.py | Sand0001/OCR_textrender_jap_chn_eng | 87a01946bb8cd5229d2babcdf42a18df5b3e561f | [
"MIT"
] | null | null | null | from textrenderer.corpus.chn_corpus import ChnCorpus
from textrenderer.corpus.jap_corpus import JAPCorpus
from textrenderer.corpus.eng_corpus import EngCorpus
from textrenderer.corpus.list_corpus import ListCorpus
from textrenderer.corpus.random_corpus import RandomCorpus
def corpus_factory(corpus_mode: str, chars_fi... | 31.925926 | 84 | 0.715777 |
92ed5327185be6fc53251062d468af44037b8684 | 4,451 | py | Python | cnc-gcode/cnc_gui.py | shadelx/cnc-gcode | 01be8dfa83829500672a4862dffa8f30ab1f9f71 | [
"MIT"
] | 2 | 2021-03-05T18:15:41.000Z | 2022-02-16T17:46:40.000Z | cnc-gcode/cnc_gui.py | shadelx/cnc-gcode | 01be8dfa83829500672a4862dffa8f30ab1f9f71 | [
"MIT"
] | null | null | null | cnc-gcode/cnc_gui.py | shadelx/cnc-gcode | 01be8dfa83829500672a4862dffa8f30ab1f9f71 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'cnc-gui.ui'
#
# Created by: PyQt5 UI code generator 5.15.3
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore, QtGu... | 49.455556 | 209 | 0.702539 |
733ac77798cf95eafa95b5967c2c9355be5a16d3 | 360 | py | Python | g-code-testing/g_code_parsing/g_code_functionality_defs/smoothie/reset_from_error_g_code_functionality_def.py | Opentrons/protocol_framework | ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f | [
"Apache-2.0"
] | null | null | null | g-code-testing/g_code_parsing/g_code_functionality_defs/smoothie/reset_from_error_g_code_functionality_def.py | Opentrons/protocol_framework | ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f | [
"Apache-2.0"
] | null | null | null | g-code-testing/g_code_parsing/g_code_functionality_defs/smoothie/reset_from_error_g_code_functionality_def.py | Opentrons/protocol_framework | ebbd6b2fe984edd6ecfcbf1dbe040db7f7356b9f | [
"Apache-2.0"
] | null | null | null | from typing import Dict
from g_code_parsing.g_code_functionality_defs.g_code_functionality_def_base import (
GCodeFunctionalityDefBase,
)
class ResetFromErrorGCodeFunctionalityDef(GCodeFunctionalityDefBase):
@classmethod
def _generate_command_explanation(cls, g_code_args: Dict[str, str]) -> str:
r... | 32.727273 | 84 | 0.805556 |
7cbc2deae7088efd9f71225319430c3ad0283bb1 | 106 | py | Python | exercicios-turtle/.history/clown_20210623225950.py | Aleff13/poo-ufsc | bc1574df26f840a3c0fd5b1e0c72e5d69f61493d | [
"MIT"
] | 1 | 2021-11-28T18:49:21.000Z | 2021-11-28T18:49:21.000Z | exercicios-turtle/.history/clown_20210623225950.py | Aleff13/poo-ufsc | bc1574df26f840a3c0fd5b1e0c72e5d69f61493d | [
"MIT"
] | null | null | null | exercicios-turtle/.history/clown_20210623225950.py | Aleff13/poo-ufsc | bc1574df26f840a3c0fd5b1e0c72e5d69f61493d | [
"MIT"
] | null | null | null | import turtle
tortuguita= turtle.Turtle()
tortuguita.dot(30,"black")
tortuguita.forward()
turtle.done() | 13.25 | 27 | 0.764151 |
60ef6442c131f07aad73ffbc33ec6ca20286d0c3 | 815 | py | Python | users/migrations/0001_initial.py | tomito26/awwards | e91c611c90be5f4bc2b0ef9a46cf1b2517ed17c0 | [
"MIT"
] | 1 | 2020-10-27T15:04:34.000Z | 2020-10-27T15:04:34.000Z | users/migrations/0001_initial.py | tomito26/awwards | e91c611c90be5f4bc2b0ef9a46cf1b2517ed17c0 | [
"MIT"
] | null | null | null | users/migrations/0001_initial.py | tomito26/awwards | e91c611c90be5f4bc2b0ef9a46cf1b2517ed17c0 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-24 06:22
import cloudinary.models
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_US... | 30.185185 | 121 | 0.660123 |
596f4b27d5f7747dc8211477e4a83579e01a6aeb | 381 | py | Python | apps/accounts/migrations/0002_account_attendant.py | SnifferNandez/bCTF | 76db910d8cd8465e1375a3a02014a4f66d7a4087 | [
"MIT"
] | null | null | null | apps/accounts/migrations/0002_account_attendant.py | SnifferNandez/bCTF | 76db910d8cd8465e1375a3a02014a4f66d7a4087 | [
"MIT"
] | null | null | null | apps/accounts/migrations/0002_account_attendant.py | SnifferNandez/bCTF | 76db910d8cd8465e1375a3a02014a4f66d7a4087 | [
"MIT"
] | 1 | 2019-10-25T20:00:41.000Z | 2019-10-25T20:00:41.000Z | # Generated by Django 2.1.2 on 2018-10-15 22:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('accounts', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='account',
name='attendant',
... | 20.052632 | 53 | 0.593176 |
f69e41ec4f68b328cc09c0a81f4dbc74d0ceca00 | 3,037 | py | Python | blog/templatetags/tag_cloud.py | jacobian/jacobian.org | cacff78aa68cb1585a63c04ff5bd7fc484066730 | [
"Apache-2.0"
] | 8 | 2018-11-12T21:11:18.000Z | 2020-10-20T09:03:54.000Z | blog/templatetags/tag_cloud.py | jacobian/jacobian.org | cacff78aa68cb1585a63c04ff5bd7fc484066730 | [
"Apache-2.0"
] | 5 | 2018-11-28T12:56:57.000Z | 2020-02-05T21:56:48.000Z | blog/templatetags/tag_cloud.py | jacobian/jacobian.org | cacff78aa68cb1585a63c04ff5bd7fc484066730 | [
"Apache-2.0"
] | 5 | 2018-11-19T16:47:15.000Z | 2020-02-14T22:34:26.000Z | from django import template
from django.utils.safestring import mark_safe
register = template.Library()
from blog.models import Tag
# Classes for different levels
CLASSES = (
"--skip--", # We don't show the least popular tags
"not-popular-at-all",
"not-very-popular",
"somewhat-popular",
"somewha... | 27.609091 | 102 | 0.620678 |
17208a6bae9bd6d371e77af7605be3b806223b75 | 2,157 | py | Python | src/run/runcore.py | ufo2011/NXP-MCUBootUtility | 5d1840b1beee997e5453484309f5466ce166bfbe | [
"Apache-2.0"
] | 174 | 2018-12-30T16:20:36.000Z | 2022-03-24T03:02:02.000Z | src/run/runcore.py | ufo2011/NXP-MCUBootUtility | 5d1840b1beee997e5453484309f5466ce166bfbe | [
"Apache-2.0"
] | 138 | 2019-01-02T16:18:44.000Z | 2022-03-30T15:57:24.000Z | src/run/runcore.py | ufo2011/NXP-MCUBootUtility | 5d1840b1beee997e5453484309f5466ce166bfbe | [
"Apache-2.0"
] | 86 | 2018-12-27T13:16:58.000Z | 2022-02-03T11:42:35.000Z | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
import rundef
import boot
sys.path.append(os.path.abspath(".."))
from gen import gencore
from ui import uidef
from ui import uivar
from ui import uilang
##
# @brief
class secBootRun(gencore.secBootGen):
def __init__(self, parent):
gencore... | 33.184615 | 102 | 0.636532 |
77e931670ac1087980d246bf4b7457dc25216a4e | 211,717 | py | Python | test/unit/proxy/controllers/test_obj.py | Priyanka-Askani/swift | 1ab691f63778008015b34ce004992844acee9968 | [
"Apache-2.0"
] | 1 | 2019-05-25T10:55:58.000Z | 2019-05-25T10:55:58.000Z | test/unit/proxy/controllers/test_obj.py | Priyanka-Askani/swift | 1ab691f63778008015b34ce004992844acee9968 | [
"Apache-2.0"
] | 2 | 2015-01-20T10:38:14.000Z | 2015-01-20T10:39:40.000Z | test/unit/proxy/controllers/test_obj.py | Priyanka-Askani/swift | 1ab691f63778008015b34ce004992844acee9968 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright (c) 2010-2012 OpenStack Foundation
#
# 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 a... | 43.870079 | 79 | 0.573506 |
6bb5ed9bb102e09076a540e684b0750ab417a233 | 57 | py | Python | takeyourmeds/settings/role.py | takeyourmeds/takeyourmeds-web | edf24188f26948902cfb69793b4d5aa3cf8b6dea | [
"MIT"
] | 11 | 2015-06-01T16:31:42.000Z | 2022-03-01T01:20:58.000Z | takeyourmeds/settings/role.py | takeyourmeds/takeyourmeds-web | edf24188f26948902cfb69793b4d5aa3cf8b6dea | [
"MIT"
] | 111 | 2015-07-20T13:23:16.000Z | 2017-09-08T08:17:10.000Z | takeyourmeds/settings/role.py | takeyourmeds/takeyourmeds-web | edf24188f26948902cfb69793b4d5aa3cf8b6dea | [
"MIT"
] | 6 | 2015-07-15T08:08:12.000Z | 2018-06-23T00:13:13.000Z | # overwritten by build system
from roles.local import *
| 14.25 | 29 | 0.77193 |
41895e1c8bbc008bb9fa453d488d8913ef287bca | 8,006 | py | Python | Steering_.py | didghwns0514/AutonomousDriving | 6622a4b28c3c7e7cbc59bd7d24835861dea4eae6 | [
"MIT"
] | 3 | 2021-03-10T02:46:41.000Z | 2021-05-04T00:00:29.000Z | Steering_.py | didghwns0514/AutonomousDriving | 6622a4b28c3c7e7cbc59bd7d24835861dea4eae6 | [
"MIT"
] | null | null | null | Steering_.py | didghwns0514/AutonomousDriving | 6622a4b28c3c7e7cbc59bd7d24835861dea4eae6 | [
"MIT"
] | null | null | null | import cv2
import time
import math
import numpy as np
import matplotlib.pyplot as plt
global destination, lanewidth_Half, lane_Error, destination_I,list_Lane
global t1, start_time, gear, find, point, speed_Obs
global start_time, U_straight_time, J_straight_time, J_straight_time_2
global just_once, just_once_2, t1, t2,... | 36.226244 | 140 | 0.485136 |
0f6e4de80d71212354fe0e0cecd5bc48b1ac9ef6 | 8,201 | py | Python | comprehensive_scenario/plot_results.py | adeliegorce/tools4reionisation | da97c677a40b93258f78fb5882de05eedae7c304 | [
"MIT"
] | null | null | null | comprehensive_scenario/plot_results.py | adeliegorce/tools4reionisation | da97c677a40b93258f78fb5882de05eedae7c304 | [
"MIT"
] | null | null | null | comprehensive_scenario/plot_results.py | adeliegorce/tools4reionisation | da97c677a40b93258f78fb5882de05eedae7c304 | [
"MIT"
] | 1 | 2020-07-29T14:14:51.000Z | 2020-07-29T14:14:51.000Z | import matplotlib.pyplot as plt
import numpy as np
import matplotlib
from scipy import integrate
import sys
from highz import *
import highz_config as hz
import triangleme2 as triangleme
import warnings
warnings.filterwarnings("ignore", category=RuntimeWarning)
# plt.ion()
colors = ['#1f77b4','#d62728', '#... | 46.596591 | 192 | 0.606511 |
a4c7ea8c73e5c4b3b39ca6bfd73813fa92b4e12c | 15,312 | py | Python | world/dominion/unit_types.py | emonical/arxcode | 10a24a2d86f709469698f3d1815fe1ae0d6174a3 | [
"MIT"
] | 1 | 2020-09-30T04:59:24.000Z | 2020-09-30T04:59:24.000Z | world/dominion/unit_types.py | emonical/arxcode | 10a24a2d86f709469698f3d1815fe1ae0d6174a3 | [
"MIT"
] | null | null | null | world/dominion/unit_types.py | emonical/arxcode | 10a24a2d86f709469698f3d1815fe1ae0d6174a3 | [
"MIT"
] | null | null | null | """
Unit types:
All the stats for different kinds of military units are defined here and
will be used at runtime.
"""
import traceback
from .combat_grid import PositionActor
from random import randint
from . import unit_constants
_UNIT_TYPES = {}
def register_unit(unit_cls):
"""
Registers decorated class in... | 28.890566 | 87 | 0.613179 |
9603ff0eacc671b06d1e042de8ae6258e06dcc2e | 1,658 | py | Python | obolus/server.py | Anomareh/obolus | dcbc9a8b8ca0d66dabe30774a3b3b427b86f3292 | [
"BSD-3-Clause"
] | null | null | null | obolus/server.py | Anomareh/obolus | dcbc9a8b8ca0d66dabe30774a3b3b427b86f3292 | [
"BSD-3-Clause"
] | null | null | null | obolus/server.py | Anomareh/obolus | dcbc9a8b8ca0d66dabe30774a3b3b427b86f3292 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import asyncio
from os import getpid, kill
import signal
from sys import exit
from utils import Buffer, clean_string, dirty_string
class Server:
def __init__(self, port):
self.port = port
self.users = {}
self.pid = getpid()
self.loop = asyncio.get_event_l... | 24.746269 | 66 | 0.607961 |
9510ed1acd155d84268cce985b642e34ea4d6d4d | 4,986 | py | Python | mediacloud/test/__init__.py | mediacloud/api-client | df47422ab417014d78fe41e1659280d5f766a530 | [
"MIT"
] | 7 | 2021-01-28T17:31:54.000Z | 2021-12-20T16:28:23.000Z | mediacloud/test/__init__.py | mediacloud/api-client | df47422ab417014d78fe41e1659280d5f766a530 | [
"MIT"
] | 2 | 2021-04-07T23:26:50.000Z | 2021-09-24T00:43:16.000Z | mediacloud/test/__init__.py | mediacloud/api-client | df47422ab417014d78fe41e1659280d5f766a530 | [
"MIT"
] | 3 | 2021-07-29T11:25:25.000Z | 2021-12-25T22:27:26.000Z | import os.path
import logging
from dotenv import load_dotenv
TEST_USER_EMAIL = "mc-api-test@media.mit.edu"
QUERY_LAST_FEW_DAYS = "publish_date:[NOW-3DAY TO NOW]"
QUERY_LAST_WEEK = "publish_date:[NOW-7DAY TO NOW]"
QUERY_LAST_MONTH = "publish_date:[NOW-31DAY TO NOW]"
QUERY_LAST_YEAR = "publish_date:[NOW-1YEAR TO NOW]"... | 155.8125 | 4,012 | 0.725231 |
8a06917a05944994d25eff26a5b57f4fe3632e5b | 3,358 | py | Python | projects/SixDPose/tools/plot_speed.py | jkznst/detectron2 | 790f1894134bb85b897b0912367ee54a24caf2b2 | [
"Apache-2.0"
] | null | null | null | projects/SixDPose/tools/plot_speed.py | jkznst/detectron2 | 790f1894134bb85b897b0912367ee54a24caf2b2 | [
"Apache-2.0"
] | 1 | 2020-06-23T13:39:45.000Z | 2020-06-23T13:39:45.000Z | projects/SixDPose/tools/plot_speed.py | jkznst/detectron2 | 790f1894134bb85b897b0912367ee54a24caf2b2 | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
import numpy as np
import matplotlib.pyplot as plt
def plot_speed_crpnet():
plt.axvspan(25, 75, facecolor='#2ca02c', alpha=0.3)
plt.scatter(2, 50.2, s=100, label='[82] w/ ref.')
plt.scatter(3, 62.7, s=100, marker='^', label='BB8[87] w/ ref.')
plt.scatter(10, 79, s=100, marker='s', label... | 39.97619 | 118 | 0.566706 |
f5babfa614eb826a54c85eeb6562d6c436542be3 | 6,262 | py | Python | openstack_dashboard/dashboards/admin/metadata_defs/views.py | HaManhDong/Custom-Horizon | 17513ebbe03b8ae58e0925f826801343e1e3e3e0 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/metadata_defs/views.py | HaManhDong/Custom-Horizon | 17513ebbe03b8ae58e0925f826801343e1e3e3e0 | [
"Apache-2.0"
] | null | null | null | openstack_dashboard/dashboards/admin/metadata_defs/views.py | HaManhDong/Custom-Horizon | 17513ebbe03b8ae58e0925f826801343e1e3e3e0 | [
"Apache-2.0"
] | null | null | null | # (c) Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | 37.27381 | 79 | 0.644842 |
a5863fed9592e169eac2fb4669e095476abc9baf | 3,383 | py | Python | examples/basic_operations/update_ad_group.py | bjagadev17/google-ads-python | ee2c059498d5679a0d1d9011f3795324439fad7c | [
"Apache-2.0"
] | null | null | null | examples/basic_operations/update_ad_group.py | bjagadev17/google-ads-python | ee2c059498d5679a0d1d9011f3795324439fad7c | [
"Apache-2.0"
] | null | null | null | examples/basic_operations/update_ad_group.py | bjagadev17/google-ads-python | ee2c059498d5679a0d1d9011f3795324439fad7c | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# Copyright 2018 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 ... | 32.528846 | 79 | 0.681348 |
4f32f2101b129ed0d8e58a555355f71a8d9d0fc2 | 6,767 | py | Python | source/CE-Integration/Cleanup.py | tylangesmith/aws-cloudendure-migration-factory-solution | 54ca1740e79d749992356df91e19aa10831bdd65 | [
"MIT-0"
] | null | null | null | source/CE-Integration/Cleanup.py | tylangesmith/aws-cloudendure-migration-factory-solution | 54ca1740e79d749992356df91e19aa10831bdd65 | [
"MIT-0"
] | null | null | null | source/CE-Integration/Cleanup.py | tylangesmith/aws-cloudendure-migration-factory-solution | 54ca1740e79d749992356df91e19aa10831bdd65 | [
"MIT-0"
] | null | null | null | #########################################################################################
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. #
# SPDX-License-Identifier: MIT-0 #
# ... | 51.656489 | 193 | 0.58076 |
73a2ee6383a85f41bbd5547c174e2a7be93e84a6 | 132,585 | py | Python | tensorflow/python/training/saver_test.py | imdone/tensorflow | bb4d1ef3861c83627ee9586b85ac3070a7d38335 | [
"Apache-2.0"
] | 1 | 2021-04-16T14:53:22.000Z | 2021-04-16T14:53:22.000Z | tensorflow/python/training/saver_test.py | imdone/tensorflow | bb4d1ef3861c83627ee9586b85ac3070a7d38335 | [
"Apache-2.0"
] | 10 | 2018-02-04T18:41:52.000Z | 2018-05-02T09:00:46.000Z | tensorflow/python/training/saver_test.py | imdone/tensorflow | bb4d1ef3861c83627ee9586b85ac3070a7d38335 | [
"Apache-2.0"
] | 4 | 2018-01-17T14:22:49.000Z | 2018-02-27T15:06:41.000Z | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 41.811731 | 87 | 0.675846 |
14d1d5ad981028071efd7b67d678b74658ad0f3a | 5,911 | py | Python | test/combine1.py | SungbinChoi/w4c_st1 | 5acdedf3c6278cd7239a6beb605c3e16821f7c86 | [
"Apache-2.0"
] | null | null | null | test/combine1.py | SungbinChoi/w4c_st1 | 5acdedf3c6278cd7239a6beb605c3e16821f7c86 | [
"Apache-2.0"
] | null | null | null | test/combine1.py | SungbinChoi/w4c_st1 | 5acdedf3c6278cd7239a6beb605c3e16821f7c86 | [
"Apache-2.0"
] | null | null | null | import random
from random import shuffle
import numpy as np
from datetime import datetime
import time
import queue
import threading
import logging
from PIL import Image
import itertools
import re
import os
import glob
import shutil
import sys
import copy
import h5py
from netCDF4 import Dataset
import torch
import torch... | 33.777143 | 124 | 0.628658 |
96b29950ff796458ec270f990730e08d499a7ffe | 1,138 | py | Python | utils/TokenizationMapper.py | eyal-orbach/Details2Story-XLNetPlanCloze | 47fd98ca2d59f3d4113d2de510fe955fff49efb9 | [
"MIT"
] | 4 | 2020-12-14T03:25:03.000Z | 2022-03-19T20:30:25.000Z | utils/TokenizationMapper.py | eyal-orbach/Details2Story-XLNetPlanCloze | 47fd98ca2d59f3d4113d2de510fe955fff49efb9 | [
"MIT"
] | 1 | 2021-12-04T00:42:49.000Z | 2021-12-04T00:42:49.000Z | utils/TokenizationMapper.py | eyal-orbach/Details2Story-XLNetPlanCloze | 47fd98ca2d59f3d4113d2de510fe955fff49efb9 | [
"MIT"
] | 1 | 2021-04-08T21:30:56.000Z | 2021-04-08T21:30:56.000Z |
SRC_TOKENIZER_SPECIAL_CHAR = b'\xe2\x96\x81'
HELPER_TOKENIZER_SPECIAL_CHAR =b'\xc4\xa0'
class TokenizationMapper(object):
mapping = {}
target_unk_idx = None
def get_target_idx_From_src(self, src_idx):
return self.mapping.get(src_idx, self.target_unk_idx)
def init_map(self, source_tokenizer... | 33.470588 | 86 | 0.635325 |
456f744898fc134adc8f95b08f5ded0d85db3977 | 1,014 | py | Python | gxf/extensions/reload.py | Talanor/gxf | 4dd2f3a123e646fcbf0f44b43f2004b04acba9be | [
"MIT"
] | 41 | 2015-02-16T02:30:19.000Z | 2019-11-03T06:39:52.000Z | gxf/extensions/reload.py | Talanor/gxf | 4dd2f3a123e646fcbf0f44b43f2004b04acba9be | [
"MIT"
] | 4 | 2015-02-02T10:51:00.000Z | 2019-03-02T15:48:57.000Z | gxf/extensions/reload.py | Talanor/gxf | 4dd2f3a123e646fcbf0f44b43f2004b04acba9be | [
"MIT"
] | 8 | 2015-01-21T20:48:21.000Z | 2019-01-28T12:53:56.000Z | # -*- coding: utf-8 -*-
import sys
import importlib
import gxf
@gxf.register()
class Reload(gxf.MaintenanceCommand):
'''
This command can be used to reload packages from source.
'''
def setup(self, parser):
parser.add_argument(
'package', nargs='*', default=['gxf', 'gxf.extensio... | 26.684211 | 68 | 0.532544 |
829a16aed8d079085606670a782b3e9290e42416 | 160 | py | Python | words.py | Diplomatica-HTN/Profanity-Filter | 85f3135648b27c454bc3b33178cedb5c37569bc9 | [
"MIT"
] | 1 | 2021-09-19T14:17:24.000Z | 2021-09-19T14:17:24.000Z | words.py | Diplomatica-HTN/Profanity-Filter | 85f3135648b27c454bc3b33178cedb5c37569bc9 | [
"MIT"
] | null | null | null | words.py | Diplomatica-HTN/Profanity-Filter | 85f3135648b27c454bc3b33178cedb5c37569bc9 | [
"MIT"
] | null | null | null |
# Note these words are offensive
string = '''
List of Offensive Words Not Shown on Github'''
string_list = string.split('\n')
string_list = string_list[1:]
| 16 | 46 | 0.7125 |
a759c21e5c76c2d5bb415535416335f4ac7f4186 | 1,432 | py | Python | chainer/functions/loss/mean_absolute_error.py | dydo0316/test2 | a9982a8b426dd07eb1ec4e7695a7bc546ecc6063 | [
"MIT"
] | null | null | null | chainer/functions/loss/mean_absolute_error.py | dydo0316/test2 | a9982a8b426dd07eb1ec4e7695a7bc546ecc6063 | [
"MIT"
] | null | null | null | chainer/functions/loss/mean_absolute_error.py | dydo0316/test2 | a9982a8b426dd07eb1ec4e7695a7bc546ecc6063 | [
"MIT"
] | null | null | null | import numpy
import chainer
from chainer.backends import cuda
from chainer import function_node
from chainer.utils import type_check
class MeanAbsoluteError(function_node.FunctionNode):
"""Mean absolute error function."""
def check_type_forward(self, in_types):
type_check.argname(in_types, ('x0', '... | 29.22449 | 78 | 0.63757 |
a7fbcab93a6e2896e9d58b488d9be6c17f7e243f | 38,005 | py | Python | bokeh/session.py | hhuuggoo/bokeh | cc274a5003edf91804b49bd933c99644fdb0a9fc | [
"BSD-3-Clause"
] | 2 | 2020-04-07T18:55:04.000Z | 2021-02-27T13:33:23.000Z | bokeh/session.py | jeycin/bokeh | 8bf4a6f626c505dcb9c525409c0f74debf4499d7 | [
"BSD-3-Clause"
] | null | null | null | bokeh/session.py | jeycin/bokeh | 8bf4a6f626c505dcb9c525409c0f74debf4499d7 | [
"BSD-3-Clause"
] | null | null | null | """ Defines the base PlotSession and some example session types.
"""
from exceptions import DataIntegrityException
from os.path import abspath, split, join
import os.path
import json
import logging
import urlparse
import uuid
import warnings
import requests
from bokeh import protocol, utils
from bokeh.objects import... | 38.505572 | 87 | 0.586291 |
3cf3004039e6eab9f2c8ce4feffe5925e17d4288 | 814 | py | Python | battery_test.py | wanderer-soul92/functional-python-wanderer-soul92 | 35c355e1e2087a1a3576370ba6420a42957584ec | [
"MIT"
] | null | null | null | battery_test.py | wanderer-soul92/functional-python-wanderer-soul92 | 35c355e1e2087a1a3576370ba6420a42957584ec | [
"MIT"
] | null | null | null | battery_test.py | wanderer-soul92/functional-python-wanderer-soul92 | 35c355e1e2087a1a3576370ba6420a42957584ec | [
"MIT"
] | null | null | null | BMS_allowed_range = {'temperature': {'min': 0, 'max': 45},
'soc': {'min': 20, 'max': 80},
'charge_rate': {'min': 0, 'max': 0.8}}
def get_out_of_range_parameter(BMS_input):
out_of_range_parameters = []
for parameter,value in BMS_input.items() :
check_tolerance_range(para... | 33.916667 | 91 | 0.676904 |
7dd1ac6b443ddb00051c0ccd8baa441b6907ce83 | 23,397 | py | Python | google/cloud/aiplatform_v1/services/model_service/transports/grpc_asyncio.py | dizcology/python-aiplatform | 1a135775966c8a2303ded529eba514dcf9db7205 | [
"Apache-2.0"
] | 2 | 2021-10-02T02:25:44.000Z | 2021-11-17T10:35:01.000Z | google/cloud/aiplatform_v1/services/model_service/transports/grpc_asyncio.py | pompipo/python-aiplatform | 3612b05c62dfb46822cd2c1798fd47349dba33bc | [
"Apache-2.0"
] | 1 | 2021-03-02T18:25:00.000Z | 2021-03-02T18:25:00.000Z | google/cloud/aiplatform_v1/services/model_service/transports/grpc_asyncio.py | pompipo/python-aiplatform | 3612b05c62dfb46822cd2c1798fd47349dba33bc | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | 43.247689 | 98 | 0.64145 |
ddc37746b62df11d6c2e6dcd0b4958b805b2349f | 97 | py | Python | main/urls.py | Shubhashis-coder/translator | e1db53700a7bef0f6239d847b9f97b8592d0c140 | [
"MIT"
] | null | null | null | main/urls.py | Shubhashis-coder/translator | e1db53700a7bef0f6239d847b9f97b8592d0c140 | [
"MIT"
] | null | null | null | main/urls.py | Shubhashis-coder/translator | e1db53700a7bef0f6239d847b9f97b8592d0c140 | [
"MIT"
] | null | null | null | from django.urls import path
from .views import *
urlpatterns = [
path('',home,name="home"),
]
| 13.857143 | 28 | 0.680412 |
dd1d8005191a71d1c3388de6051df7b08530394d | 889 | py | Python | setup.py | xc938/pypdftk | e2f1fda9033131fd8220931eeb4feed791fd7aee | [
"BSD-3-Clause"
] | null | null | null | setup.py | xc938/pypdftk | e2f1fda9033131fd8220931eeb4feed791fd7aee | [
"BSD-3-Clause"
] | null | null | null | setup.py | xc938/pypdftk | e2f1fda9033131fd8220931eeb4feed791fd7aee | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
import setuptools
with open("README.md", "r") as fh:
long_description = fh.read()
setuptools.setup(
name='pypdftk-snap-wrkarnd',
description='''Python wrapper for PDFTK with snap installation workaround''',
long_description=long_description,
long_description_content_type="tex... | 34.192308 | 81 | 0.619798 |
fbefb09b4a66d443a7c6274657c1da1f1b552b6a | 736 | py | Python | python/logSensors-example.py | webbhm/MHZ-16_CO2 | df099a4980b7e4a05510997de7c034037ebb0434 | [
"MIT"
] | null | null | null | python/logSensors-example.py | webbhm/MHZ-16_CO2 | df099a4980b7e4a05510997de7c034037ebb0434 | [
"MIT"
] | null | null | null | python/logSensors-example.py | webbhm/MHZ-16_CO2 | df099a4980b7e4a05510997de7c034037ebb0434 | [
"MIT"
] | null | null | null | #Check sensors and log to file
from logData import logData
from si7021 import getHumidity, getTempC
import NDIR
try:
humidity = getHumidity()
logData("si7021", "Success", "humidity", "{:10.1f}".format(humidity), '')
except (IOError):
logData("si7021", "Failure", "humidity", '', IOError)
try:
temp ... | 28.307692 | 80 | 0.619565 |
7676c4985d061440dbc9c4913e380e3a013f4beb | 1,556 | py | Python | recipes/cymunk/__init__.py | lbovet/kivy-ios | 679fc62256ffb87b6101840563fc2952d7166e1b | [
"MIT"
] | null | null | null | recipes/cymunk/__init__.py | lbovet/kivy-ios | 679fc62256ffb87b6101840563fc2952d7166e1b | [
"MIT"
] | null | null | null | recipes/cymunk/__init__.py | lbovet/kivy-ios | 679fc62256ffb87b6101840563fc2952d7166e1b | [
"MIT"
] | null | null | null | """
Author: Lawrence Du
E-mail: larrydu88@gmail.com
"""
from toolchain import CythonRecipe,shprint
import os
from os.path import join
import sh
class CymunkRecipe(CythonRecipe):
version = 'master'
url = 'https://github.com/tito/cymunk/archive/{version}.zip'
name = 'cymunk'
depends = ['hostpython']
... | 28.814815 | 89 | 0.595758 |
871f3738977c4424e0f083b6edbfe016025f6d8e | 14,346 | py | Python | RL/rl/rllib_script/agent/utils.py | robot-perception-group/AutonomousBlimpDRL | a10a88b2e9c9f9a83435cff2e4bc7e16e83cfeee | [
"MIT"
] | 8 | 2021-11-21T20:47:37.000Z | 2022-03-15T09:50:06.000Z | RL/rl/rllib_script/agent/utils.py | robot-perception-group/AutonomousBlimpDRL | a10a88b2e9c9f9a83435cff2e4bc7e16e83cfeee | [
"MIT"
] | null | null | null | RL/rl/rllib_script/agent/utils.py | robot-perception-group/AutonomousBlimpDRL | a10a88b2e9c9f9a83435cff2e4bc7e16e83cfeee | [
"MIT"
] | null | null | null | import copy
import importlib
import json
import os
import re
from copy import deepcopy
from functools import partial
from typing import Callable, Dict, List, Optional, TypeVar, Union
import yaml
def with_lock(func: Callable):
"""Use as decorator (@withlock) around object methods that need locking.
Note: The... | 39.961003 | 79 | 0.601073 |
14f83a853f2ab7a6763173cfd1d20ea078d3dcfe | 268 | py | Python | minitest.py | Genzo4/proxy_manager | 6547b6ad1c5a16261dffef04f2be9168551fa8d8 | [
"MIT"
] | 2 | 2021-06-04T15:36:39.000Z | 2022-02-03T07:17:26.000Z | minitest.py | Genzo4/proxy_manager | 6547b6ad1c5a16261dffef04f2be9168551fa8d8 | [
"MIT"
] | null | null | null | minitest.py | Genzo4/proxy_manager | 6547b6ad1c5a16261dffef04f2be9168551fa8d8 | [
"MIT"
] | null | null | null | from proxy_manager_g4 import ProxyManager
from proxy_manager_g4.consts import PROTOCOL_HTTPS
proxy_manager = ProxyManager(protocol=PROTOCOL_HTTPS, anonymity=True)
for i in range(1, 1000):
pr = proxy_manager.get_random()
print(i, ": ", pr, "(", pr.used, ")")
| 29.777778 | 69 | 0.742537 |
01980a7040d7af4545e51778223b1a1c4b423514 | 711 | py | Python | onboarding/exporting/tests.py | icclab/openstack-ova-onboarding | 443a789875acc012616bf53eeca2ce01db8ad85d | [
"Apache-2.0"
] | 8 | 2016-09-06T17:47:24.000Z | 2021-03-09T15:07:23.000Z | onboarding/exporting/tests.py | icclab/openstack-ova-onboarding | 443a789875acc012616bf53eeca2ce01db8ad85d | [
"Apache-2.0"
] | 1 | 2020-04-16T01:11:25.000Z | 2020-04-16T01:11:25.000Z | onboarding/exporting/tests.py | icclab/openstack-ova-onboarding | 443a789875acc012616bf53eeca2ce01db8ad85d | [
"Apache-2.0"
] | 3 | 2017-07-20T11:26:56.000Z | 2019-05-05T11:25:41.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 35.55 | 75 | 0.74121 |
0c64342d90d76cb022c856cb1492c0ad0a508b6b | 878 | py | Python | modulo/modulo/urls.py | programavalentina/AssistanceControl_CreativeSpace | c7bdd21380528b10c696f94917fae0cdcb8c4d94 | [
"MIT"
] | 1 | 2018-10-29T18:50:12.000Z | 2018-10-29T18:50:12.000Z | modulo/modulo/urls.py | programavalentina/login_-GeekSpace | c52465adb1306c7a9d32f963e3cb6260cf1058fe | [
"MIT"
] | null | null | null | modulo/modulo/urls.py | programavalentina/login_-GeekSpace | c52465adb1306c7a9d32f963e3cb6260cf1058fe | [
"MIT"
] | null | null | null | """modulo URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.1/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 31.357143 | 77 | 0.693622 |
7ba32ec3f4b5b608ef2a8490361f7253e8615d86 | 20,762 | py | Python | src/kestrel/session.py | jmcasava/kestrel-lang | 1a5480e8bbf1e2ceb1723f9c4feab66cf5664d02 | [
"Apache-2.0"
] | null | null | null | src/kestrel/session.py | jmcasava/kestrel-lang | 1a5480e8bbf1e2ceb1723f9c4feab66cf5664d02 | [
"Apache-2.0"
] | null | null | null | src/kestrel/session.py | jmcasava/kestrel-lang | 1a5480e8bbf1e2ceb1723f9c4feab66cf5664d02 | [
"Apache-2.0"
] | null | null | null | """A Kestrel session provides an isolated stateful runtime space for a huntflow.
A huntflow is the source code or script of a cyber threat hunt, which can be
developed offline in a text editor or interactively as the hunt goes. A Kestrel
session provides the runtime space for a huntflow that allows execution and
inspe... | 40.081081 | 140 | 0.621761 |
94884373220351b79d480d251680dd6885e44332 | 6,110 | py | Python | CIM15/IEC61970/Informative/InfAssets/WindingInsulation.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 58 | 2015-04-22T10:41:03.000Z | 2022-03-29T16:04:34.000Z | CIM15/IEC61970/Informative/InfAssets/WindingInsulation.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 12 | 2015-08-26T03:57:23.000Z | 2020-12-11T20:14:42.000Z | CIM15/IEC61970/Informative/InfAssets/WindingInsulation.py | MaximeBaudette/PyCIM | d68ee5ccfc1d32d44c5cd09fb173142fb5ff4f14 | [
"MIT"
] | 35 | 2015-01-10T12:21:03.000Z | 2020-09-09T08:18:16.000Z | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | 44.59854 | 203 | 0.716858 |
6ec4f3d722c6b198fa6f06107514eae852858c9f | 65,921 | py | Python | pysnmp-with-texts/SLA-MONITOR-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/SLA-MONITOR-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/SLA-MONITOR-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module SLA-MONITOR-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SLA-MONITOR-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:06:03 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27... | 184.136872 | 6,901 | 0.808043 |
eb96dff3ca80f8d36abdb589b88bf107b2c17306 | 1,380 | py | Python | check_files/reify_batch_prediction_dataset.py | mmerce/bigmler | e411bb292a3c8db4cac6754b2b744ffe27fdb47a | [
"Apache-2.0"
] | null | null | null | check_files/reify_batch_prediction_dataset.py | mmerce/bigmler | e411bb292a3c8db4cac6754b2b744ffe27fdb47a | [
"Apache-2.0"
] | null | null | null | check_files/reify_batch_prediction_dataset.py | mmerce/bigmler | e411bb292a3c8db4cac6754b2b744ffe27fdb47a | [
"Apache-2.0"
] | null | null | null | from bigml.api import BigML
api = BigML()
source1_file = "iris.csv"
args = \
{u'fields': {u'000000': {u'name': u'sepal length', u'optype': u'numeric'},
u'000001': {u'name': u'sepal width', u'optype': u'numeric'},
u'000002': {u'name': u'petal length', u'o... | 38.333333 | 85 | 0.566667 |
8a071d0c8d8773c5c40b94a1c39c8e05c81e5219 | 23,269 | py | Python | tests/test_runner/tests.py | sproggi/django | bb9587eef159bb8708965aef51c6a4b36a625c02 | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 1 | 2015-07-31T22:44:06.000Z | 2015-07-31T22:44:06.000Z | tests/test_runner/tests.py | sproggi/django | bb9587eef159bb8708965aef51c6a4b36a625c02 | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 3 | 2017-06-08T19:48:12.000Z | 2021-01-09T13:54:25.000Z | tests/test_runner/tests.py | sproggi/django | bb9587eef159bb8708965aef51c6a4b36a625c02 | [
"CNRI-Python-GPL-Compatible",
"BSD-3-Clause"
] | 2 | 2015-03-18T15:49:40.000Z | 2018-09-04T17:51:07.000Z | """
Tests for django test runner
"""
import unittest
from unittest import mock
from admin_scripts.tests import AdminScriptTestCase
from django import db
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.management import call_command
from django.core.management.... | 39.041946 | 119 | 0.623748 |
57225fbb97fa1b910635e3b6971ca3228684b582 | 562 | py | Python | setup.py | fredjn/eiffel-graphql-api | 52e54954bd418686a5668e6dfe9fbb4bc35273af | [
"Apache-2.0"
] | 3 | 2019-12-16T13:54:21.000Z | 2019-12-20T21:52:14.000Z | setup.py | fredjn/eiffel-graphql-api | 52e54954bd418686a5668e6dfe9fbb4bc35273af | [
"Apache-2.0"
] | 41 | 2019-12-16T13:32:30.000Z | 2021-09-01T06:51:51.000Z | setup.py | fredjn/eiffel-graphql-api | 52e54954bd418686a5668e6dfe9fbb4bc35273af | [
"Apache-2.0"
] | 7 | 2019-12-19T13:38:46.000Z | 2021-12-20T14:05:00.000Z | # -*- coding: utf-8 -*-
"""Setup file for eiffel_graphql_api.
Use setup.cfg to configure your project.
This file was generated with PyScaffold 3.2.3.
PyScaffold helps you to put up the scaffold of your new Python project.
Learn more under: https://pyscaffold.org/
"""
import sys
from pkg_resources import VersionConfl... | 23.416667 | 71 | 0.733096 |
6d4d47974b4629f9a753f7fbfc6d80f714c8156c | 507 | py | Python | python/Josephus Survivor.py | TechieHelper/Codewars | 98ea8deb14ae1422162895f481e4175ab5868955 | [
"MIT"
] | null | null | null | python/Josephus Survivor.py | TechieHelper/Codewars | 98ea8deb14ae1422162895f481e4175ab5868955 | [
"MIT"
] | null | null | null | python/Josephus Survivor.py | TechieHelper/Codewars | 98ea8deb14ae1422162895f481e4175ab5868955 | [
"MIT"
] | null | null | null | # A program to see which person survives Josephus permutation
people = 7
likelihood = 3
def josephus_survivor(n,k):
data = []
for i in range(n):
data.append(n-i)
data.sort()
numToLeave = 0
for i in range(3):
for j in range(k):
numToLeave += data[numToLeav... | 14.911765 | 61 | 0.575937 |
58f28a4a242ab9ed93c19c814e2cdc5c32146797 | 665 | py | Python | sesion_05/manage.py | bernest/modulo-django-desarrollo-web-cdmx-20-05pt | 33f971f032f7d3902a49a993d46e3ecefb21d59b | [
"MIT"
] | null | null | null | sesion_05/manage.py | bernest/modulo-django-desarrollo-web-cdmx-20-05pt | 33f971f032f7d3902a49a993d46e3ecefb21d59b | [
"MIT"
] | null | null | null | sesion_05/manage.py | bernest/modulo-django-desarrollo-web-cdmx-20-05pt | 33f971f032f7d3902a49a993d46e3ecefb21d59b | [
"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', 'bedu_rest.settings')
try:
from django.core.management import execute_from_command_line
except Im... | 28.913043 | 73 | 0.679699 |
8316ffea4f7f0d45f8fded053326d8d61749e5f8 | 507 | py | Python | Aula14/ex12.py | danicon/MD2-Curso_Python | 77a2eb2d123eb1359dd7c84360c83bf3b3033ab4 | [
"MIT"
] | 1 | 2020-11-28T14:48:03.000Z | 2020-11-28T14:48:03.000Z | Aula14/ex12.py | danicon/MD2-Curso_Python | 77a2eb2d123eb1359dd7c84360c83bf3b3033ab4 | [
"MIT"
] | null | null | null | Aula14/ex12.py | danicon/MD2-Curso_Python | 77a2eb2d123eb1359dd7c84360c83bf3b3033ab4 | [
"MIT"
] | null | null | null | resp = 'S'
soma = quant = media = maior = menor = 0
while resp in 'Ss':
num = int(input('Digite um número: '))
soma += num
quant += 1
if quant == 1:
maior =menor = num
else:
if num > maior:
maior = num
if num < menor:
menor = num
resp = str(input(... | 28.166667 | 66 | 0.550296 |
29309f53b097c21f32efd36ae008e0802f13522b | 1,550 | py | Python | nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTransformConvert.py | vferat/nipype | 536c57da150d157dcb5c121af43aaeab71cdbd5f | [
"Apache-2.0"
] | null | null | null | nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTransformConvert.py | vferat/nipype | 536c57da150d157dcb5c121af43aaeab71cdbd5f | [
"Apache-2.0"
] | 2 | 2018-04-17T19:18:16.000Z | 2020-03-04T22:05:02.000Z | nipype/interfaces/semtools/utilities/tests/test_auto_BRAINSTransformConvert.py | oesteban/nipype | c14f24eba1da08711bbb894e049ee858ed740096 | [
"Apache-2.0"
] | null | null | null | # AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT
from __future__ import unicode_literals
from ..brains import BRAINSTransformConvert
def test_BRAINSTransformConvert_inputs():
input_map = dict(
args=dict(argstr='%s', ),
displacementVolume=dict(
argstr='--displacementVolume %s',
... | 32.978723 | 70 | 0.616774 |
34cff6e90e3d24a8997adb31e36755ba929755b8 | 10,567 | py | Python | pyvoltha/adapters/extensions/events/kpi/adapter_pm_metrics.py | nsharma70/pyvoltha | ea01eb85f45e3cd0bed12b4b446e5af7f66c16db | [
"Apache-2.0"
] | null | null | null | pyvoltha/adapters/extensions/events/kpi/adapter_pm_metrics.py | nsharma70/pyvoltha | ea01eb85f45e3cd0bed12b4b446e5af7f66c16db | [
"Apache-2.0"
] | 1 | 2021-03-25T23:34:15.000Z | 2021-03-25T23:34:15.000Z | pyvoltha/adapters/extensions/events/kpi/adapter_pm_metrics.py | rohan-agra/VOL-2311-pyvoltha | 54ac9266cf4fc27a7583ba08ada779ad107e9cfe | [
"Apache-2.0"
] | null | null | null | # Copyright 2017-present Open Networking Foundation
#
# 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 o... | 46.756637 | 102 | 0.632725 |
71a1cac50f33d21478576a67a50b6e63ae6073ce | 1,253 | py | Python | examples/ES/es.py | jkren6/PARL | 7299032f8e1804bb4ada0f087fd485816046fa90 | [
"Apache-2.0"
] | 3,172 | 2018-05-22T02:02:29.000Z | 2022-03-31T09:14:56.000Z | examples/ES/es.py | ic7y/PARL | e8797bd0d31d81bc81aae8b12792ff922bcb8ea9 | [
"Apache-2.0"
] | 422 | 2018-05-17T16:58:45.000Z | 2022-03-31T02:03:25.000Z | examples/ES/es.py | ic7y/PARL | e8797bd0d31d81bc81aae8b12792ff922bcb8ea9 | [
"Apache-2.0"
] | 794 | 2018-05-21T18:33:19.000Z | 2022-03-30T13:38:09.000Z | # Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | 29.833333 | 99 | 0.664804 |
dd69c690e622bb861ac88d038fb561f5f4428dfe | 8,609 | py | Python | basic_mcmc.py | bikestra/bdapy | accea9908651730acd49fce8beda7a684529ca16 | [
"Apache-2.0"
] | 48 | 2015-01-04T07:24:34.000Z | 2022-03-09T15:41:02.000Z | basic_mcmc.py | bikestra/bdapy | accea9908651730acd49fce8beda7a684529ca16 | [
"Apache-2.0"
] | null | null | null | basic_mcmc.py | bikestra/bdapy | accea9908651730acd49fce8beda7a684529ca16 | [
"Apache-2.0"
] | 11 | 2016-04-29T15:00:30.000Z | 2020-05-20T03:59:57.000Z | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <markdowncell>
# # Basic Markov-Chain Monte-Carlo (MCMC) Sampling #
#
# ## Gibbs Sampling from Bivariate Normal Distribution (BDA 11.1) ##
#
# Here, we sample from a bivariate normal distribution using Gibbs sampling, although it is not simple to draw from actual... | 36.172269 | 268 | 0.649204 |
df8b6f581c69ffba7b90a12497fd6b131b189d81 | 5,107 | py | Python | yt_dlp/WS_Extractor/lynda.py | evolution-ant/local-youtube-dl | e9be36e8cdc585c0e24a18c74d790b62af6e11a7 | [
"Unlicense"
] | null | null | null | yt_dlp/WS_Extractor/lynda.py | evolution-ant/local-youtube-dl | e9be36e8cdc585c0e24a18c74d790b62af6e11a7 | [
"Unlicense"
] | null | null | null | yt_dlp/WS_Extractor/lynda.py | evolution-ant/local-youtube-dl | e9be36e8cdc585c0e24a18c74d790b62af6e11a7 | [
"Unlicense"
] | null | null | null | # encoding: utf-8
import re
from ..extractor.common import (
InfoExtractor,
)
from ..extractor.lynda import (
LyndaBaseIE,
LyndaIE as OldLyndaIE
)
from ..utils import (
int_or_none,
ExtractorError
)
from ..compat import compat_str
class LyndaIE(OldLyndaIE):
_VALID_URL = r'https?://www\.ly... | 37.551471 | 148 | 0.547288 |
086b6c60437a280bbc69784635d525aa6cfa435f | 1,375 | py | Python | Exercises/parse_ranges/test_parse_ranges.py | t-reppert/PythonMorsels | c681b7dd0d91b4c97bfd45d88c629542f7ce1b96 | [
"MIT"
] | null | null | null | Exercises/parse_ranges/test_parse_ranges.py | t-reppert/PythonMorsels | c681b7dd0d91b4c97bfd45d88c629542f7ce1b96 | [
"MIT"
] | null | null | null | Exercises/parse_ranges/test_parse_ranges.py | t-reppert/PythonMorsels | c681b7dd0d91b4c97bfd45d88c629542f7ce1b96 | [
"MIT"
] | null | null | null | import unittest
from parse_ranges import parse_ranges
class ParseRangesTests(unittest.TestCase):
"""Tests for parse_ranges."""
def test_three_ranges(self):
self.assertEqual(
list(parse_ranges('1-2,4-4,8-10')),
[1, 2, 4, 8, 9, 10],
)
def test_with_... | 29.255319 | 77 | 0.547636 |
92a6e42ab5925af7087bc8bf95d2f294218e696f | 552 | py | Python | core/advertisements/migrations/0004_auto_20210111_1001.py | dotHashemi/qeshm-employment | 3f7bd2b50b8cae0df74c1abbb5befe1f46546dc9 | [
"MIT"
] | 2 | 2021-01-12T07:22:14.000Z | 2021-01-12T15:47:00.000Z | core/advertisements/migrations/0004_auto_20210111_1001.py | dotHashemi/qeshm-employment | 3f7bd2b50b8cae0df74c1abbb5befe1f46546dc9 | [
"MIT"
] | null | null | null | core/advertisements/migrations/0004_auto_20210111_1001.py | dotHashemi/qeshm-employment | 3f7bd2b50b8cae0df74c1abbb5befe1f46546dc9 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.5 on 2021-01-11 06:31
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('advertisements', '0003_auto_20210111_0944'),
]
operations = [
migrations.RenameField(
model_name='advertisement',
ol... | 23 | 54 | 0.586957 |
f61d1c14282ea0326ad9372f172f3f44e94a3e5a | 3,812 | py | Python | migrations/versions/22cab9c1bbf4_.py | iq9/say-so-backend-flask | 1e463afd29bb312466d8c0e24d61152782223acf | [
"MIT"
] | 1 | 2021-01-03T16:13:35.000Z | 2021-01-03T16:13:35.000Z | migrations/versions/22cab9c1bbf4_.py | rbrooks/say-so-backend-flask | 1e463afd29bb312466d8c0e24d61152782223acf | [
"MIT"
] | 1 | 2020-05-28T06:22:31.000Z | 2020-05-28T06:22:31.000Z | migrations/versions/22cab9c1bbf4_.py | iq9/say-so-backend-flask | 1e463afd29bb312466d8c0e24d61152782223acf | [
"MIT"
] | null | null | null | """empty message
Revision ID: 22cab9c1bbf4
Revises:
Create Date: 2020-04-20 22:43:15.612577
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '22cab9c1bbf4'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands auto gene... | 37.742574 | 72 | 0.663431 |
5849c4008b5af9ea09744ed7a1ae13ad3c6c3bcd | 2,512 | py | Python | examples/gen-enums.py | erdmann/pyvips | 0da5d23247a36929c1e0b285331f17715225ecca | [
"MIT"
] | null | null | null | examples/gen-enums.py | erdmann/pyvips | 0da5d23247a36929c1e0b285331f17715225ecca | [
"MIT"
] | null | null | null | examples/gen-enums.py | erdmann/pyvips | 0da5d23247a36929c1e0b285331f17715225ecca | [
"MIT"
] | null | null | null | #!/usr/bin/python3
import sys
import xml.etree.ElementTree as ET
from pyvips import ffi, values_for_enum, vips_lib, \
type_map, type_name, type_from_name
# This file generates enums.py -- the set of classes giving the permissible
# values for the pyvips enums. Run with something like:
#
# ./gen-enums.py ~/GIT/... | 27.304348 | 79 | 0.608678 |
e501f14eb7656eabf3777d5e3c944c315ea0643b | 54 | py | Python | litex/soc/cores/cpu/neorv32/__init__.py | motec-research/litex | 0bd2abf68d3047e9bba09604b99b9019b02084fd | [
"ADSL"
] | 1 | 2021-12-25T13:49:55.000Z | 2021-12-25T13:49:55.000Z | litex/soc/cores/cpu/neorv32/__init__.py | motec-research/litex | 0bd2abf68d3047e9bba09604b99b9019b02084fd | [
"ADSL"
] | null | null | null | litex/soc/cores/cpu/neorv32/__init__.py | motec-research/litex | 0bd2abf68d3047e9bba09604b99b9019b02084fd | [
"ADSL"
] | 1 | 2021-12-25T13:49:57.000Z | 2021-12-25T13:49:57.000Z | from litex.soc.cores.cpu.neorv32.core import NEORV32
| 27 | 53 | 0.814815 |
61162b027610267f22226a090154efc517a1648f | 3,480 | py | Python | script/hassfest/zeroconf.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 6 | 2017-08-02T19:26:39.000Z | 2020-03-14T22:47:41.000Z | script/hassfest/zeroconf.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 58 | 2020-08-03T07:33:02.000Z | 2022-03-31T06:02:05.000Z | script/hassfest/zeroconf.py | tbarbette/core | 8e58c3aa7bc8d2c2b09b6bd329daa1c092d52d3c | [
"Apache-2.0"
] | 14 | 2018-08-19T16:28:26.000Z | 2021-09-02T18:26:53.000Z | """Generate zeroconf file."""
from collections import OrderedDict, defaultdict
import json
from typing import Dict
from .model import Config, Integration
BASE = """
\"\"\"Automatically generated by hassfest.
To update, run python3 -m script.hassfest
\"\"\"
# fmt: off
ZEROCONF = {}
HOMEKIT = {}
""".strip()
def g... | 30 | 85 | 0.590805 |
9a90a905ee9b33352e3ef08635beef3424c9f448 | 2,504 | py | Python | azure-mgmt-network/azure/mgmt/network/v2017_10_01/models/express_route_circuit_authorization.py | v-Ajnava/azure-sdk-for-python | a1f6f80eb5869c5b710e8bfb66146546697e2a6f | [
"MIT"
] | 4 | 2016-06-17T23:25:29.000Z | 2022-03-30T22:37:45.000Z | azure/mgmt/network/v2017_10_01/models/express_route_circuit_authorization.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 2 | 2016-09-30T21:40:24.000Z | 2017-11-10T18:16:18.000Z | azure/mgmt/network/v2017_10_01/models/express_route_circuit_authorization.py | EnjoyLifeFund/Debian_py36_packages | 1985d4c73fabd5f08f54b922e73a9306e09c77a5 | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | 3 | 2016-05-03T20:49:46.000Z | 2017-10-05T21:05:27.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 ... | 41.04918 | 123 | 0.654553 |
5fd20929bef778417a3ddb57c20432229637e02e | 4,565 | py | Python | PythonLinearNonlinearControl/common/utils.py | Geonhee-LEE/PythonLinearNonlinearControl | 2a2467098108641483778c09ceb7906cb49f6cee | [
"MIT"
] | 425 | 2020-03-31T07:17:48.000Z | 2022-03-30T09:44:41.000Z | PythonLinearNonlinearControl/common/utils.py | Geonhee-LEE/PythonLinearNonlinearControl | 2a2467098108641483778c09ceb7906cb49f6cee | [
"MIT"
] | 6 | 2020-06-22T23:50:41.000Z | 2021-11-19T08:48:35.000Z | PythonLinearNonlinearControl/common/utils.py | Geonhee-LEE/PythonLinearNonlinearControl | 2a2467098108641483778c09ceb7906cb49f6cee | [
"MIT"
] | 88 | 2020-04-03T12:58:54.000Z | 2022-03-28T07:01:22.000Z | import numpy as np
def rotate_pos(pos, angle):
""" Transformation the coordinate in the angle
Args:
pos (numpy.ndarray): local state, shape(data_size, 2)
angle (float): rotate angle, in radians
Returns:
rotated_pos (numpy.ndarray): shape(data_size, 2)
"""
rot_mat = np.arr... | 30.844595 | 81 | 0.585761 |
2fc34b0fd412fcb1730b03dd307fd3a4ec07bee2 | 9,211 | py | Python | raiden/waiting.py | karlb/raiden | 61ade0559add1a97588ae6bdedd5e0b99ed41de3 | [
"MIT"
] | 1 | 2019-10-08T11:56:50.000Z | 2019-10-08T11:56:50.000Z | raiden/waiting.py | karlb/raiden | 61ade0559add1a97588ae6bdedd5e0b99ed41de3 | [
"MIT"
] | null | null | null | raiden/waiting.py | karlb/raiden | 61ade0559add1a97588ae6bdedd5e0b99ed41de3 | [
"MIT"
] | null | null | null | import gevent
import structlog
from raiden.transfer import channel, views
from raiden.transfer.events import EventPaymentReceivedSuccess
from raiden.transfer.state import (
CHANNEL_AFTER_CLOSE_STATES,
CHANNEL_STATE_SETTLED,
NODE_NETWORK_REACHABLE,
)
from raiden.utils import typing
# type alias to avoid bo... | 29.712903 | 94 | 0.658778 |
e76b8512c3380414cf09f374980f1d5d8a9d9efd | 20,099 | py | Python | tests/unit/test_sns.py | zonywhoop/localstack | 673e1a23374362c64606fb36c0746ee29cbf5553 | [
"Apache-2.0"
] | 2 | 2021-02-06T10:07:22.000Z | 2021-03-27T02:08:11.000Z | tests/unit/test_sns.py | zonywhoop/localstack | 673e1a23374362c64606fb36c0746ee29cbf5553 | [
"Apache-2.0"
] | 1 | 2021-03-01T13:55:42.000Z | 2021-03-01T13:55:42.000Z | tests/unit/test_sns.py | zonywhoop/localstack | 673e1a23374362c64606fb36c0746ee29cbf5553 | [
"Apache-2.0"
] | 1 | 2021-02-08T03:29:16.000Z | 2021-02-08T03:29:16.000Z | import json
import uuid
import base64
import unittest
import dateutil.parser
import re
from localstack.services.sns import sns_listener
class SNSTests(unittest.TestCase):
def setUp(self):
self.subscriber = {
'Protocol': 'sqs',
'RawMessageDelivery': 'false',
'TopicArn': ... | 38.651923 | 110 | 0.464202 |
48f5aaacde39ea55fa9aa8760ec455ce073a40db | 26,058 | py | Python | node/market.py | benemorius/OpenBazaar | 01be48a53a84099bbb8564d050f618caf82bc008 | [
"MIT"
] | 1 | 2019-06-18T07:38:33.000Z | 2019-06-18T07:38:33.000Z | node/market.py | benemorius/OpenBazaar | 01be48a53a84099bbb8564d050f618caf82bc008 | [
"MIT"
] | null | null | null | node/market.py | benemorius/OpenBazaar | 01be48a53a84099bbb8564d050f618caf82bc008 | [
"MIT"
] | null | null | null | """
This module manages all market related activities
"""
from StringIO import StringIO
import ast
from base64 import b64decode, b64encode
import logging
import traceback
from PIL import Image, ImageOps
import gnupg
import tornado
from zmq.eventloop import ioloop
import constants
from pybitcointools.main import privk... | 38.490399 | 192 | 0.559828 |
f4cd424d5fab8444435a13792ab1633bf1dfc8b9 | 551 | py | Python | shabanipy/plotting/utils.py | ShabaniLab/DataAnalysis | e234b7d0e4ff8ecc11e58134e6309a095abcd2c0 | [
"MIT"
] | 6 | 2019-06-25T20:01:03.000Z | 2022-03-25T23:15:57.000Z | shabanipy/plotting/utils.py | ShabaniLab/DataAnalysis | e234b7d0e4ff8ecc11e58134e6309a095abcd2c0 | [
"MIT"
] | null | null | null | shabanipy/plotting/utils.py | ShabaniLab/DataAnalysis | e234b7d0e4ff8ecc11e58134e6309a095abcd2c0 | [
"MIT"
] | 5 | 2019-06-11T17:21:54.000Z | 2021-08-24T14:45:08.000Z | """General plotting utilities."""
from matplotlib import rcParams
def format_phase(value, tick_number):
"""The value are expected in unit of π
"""
if value == 0:
return '0'
elif value == 1.0:
return 'π'
elif value == -1.0:
return '-π'
else:
return f'{value:g}π'... | 18.366667 | 42 | 0.513612 |
ec81e78e0e8ea6ff39479a00ce00bf8d16c9875b | 546 | py | Python | lesson06/sunzhaohui/modules/auth.py | herrywen-nanj/51reboot | 1130c79a360e1b548a6eaad176eb60f8bed22f40 | [
"Apache-2.0"
] | null | null | null | lesson06/sunzhaohui/modules/auth.py | herrywen-nanj/51reboot | 1130c79a360e1b548a6eaad176eb60f8bed22f40 | [
"Apache-2.0"
] | null | null | null | lesson06/sunzhaohui/modules/auth.py | herrywen-nanj/51reboot | 1130c79a360e1b548a6eaad176eb60f8bed22f40 | [
"Apache-2.0"
] | null | null | null | # _*_ encoding:utf-8 _*_
__author__ = 'sunzhaohui'
__date__ = '2019-07-01 15:03'
import sys
USERINFO = ("51reboot", "123456")
class Auth(object):
def __init__(self,username,password):
self.username = username
self.password = password
def login(self):
if self.username == USERINFO[0] a... | 21.84 | 73 | 0.59707 |
7de0dd48d529dc70d94356c98cb58055266d661c | 23,659 | py | Python | google/ads/google_ads/v2/services/expanded_landing_page_view_service_client.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | 1 | 2019-11-30T23:42:39.000Z | 2019-11-30T23:42:39.000Z | google/ads/google_ads/v2/services/expanded_landing_page_view_service_client.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v2/services/expanded_landing_page_view_service_client.py | jiulongw/google-ads-python | 6f5256eb1eeb5a9a95c8cdb9b97988d3a676282e | [
"Apache-2.0"
] | 1 | 2020-09-30T17:04:06.000Z | 2020-09-30T17:04:06.000Z | # -*- coding: utf-8 -*-
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 60.048223 | 128 | 0.79306 |
ee28ed0a5dd378047e25f4232034ffc06e627708 | 9,157 | py | Python | ex43.py | Rajab322/lpthw | bde26ca21bd1c72807c93fff15a45a1154ba59d7 | [
"MIT"
] | 329 | 2017-02-25T15:06:58.000Z | 2022-03-31T18:22:21.000Z | ex43.py | dkorzhevin/learn-python3-thw-code | bea1e954d52ed845c3ade7ed87d7bef7de1651ad | [
"MIT"
] | 10 | 2017-02-26T13:55:38.000Z | 2020-02-20T06:10:26.000Z | ex43.py | dkorzhevin/learn-python3-thw-code | bea1e954d52ed845c3ade7ed87d7bef7de1651ad | [
"MIT"
] | 180 | 2017-02-25T20:42:03.000Z | 2022-02-09T05:21:40.000Z | ### @export "fake"
import fake_input
input, input = fake_input.create(['dodge!'])
### @export "imports"
from sys import exit
from random import randint
### @export "scene_class"
class Scene(object):
def enter(self):
print("This scene is not yet configured. Subclass it and implement enter().")
e... | 38.154167 | 102 | 0.613738 |
e36c6805746db2427f71c3409a4ca8cfe7379717 | 1,882 | py | Python | backend/api/routes/favorite.py | Mozzo1000/product-database | 6af88397d0dc27b334e38a5d42f9dbfc396b784d | [
"Apache-2.0"
] | null | null | null | backend/api/routes/favorite.py | Mozzo1000/product-database | 6af88397d0dc27b334e38a5d42f9dbfc396b784d | [
"Apache-2.0"
] | 4 | 2021-12-30T12:09:35.000Z | 2022-01-20T15:51:44.000Z | backend/api/routes/favorite.py | Mozzo1000/product-database | 6af88397d0dc27b334e38a5d42f9dbfc396b784d | [
"Apache-2.0"
] | null | null | null | from flask import Blueprint, request, jsonify
from models import Favorite, FavoriteSchema, User, db
from flask_jwt_extended import jwt_required, get_jwt_identity
favorite_endpoint = Blueprint('favorite', __name__)
@favorite_endpoint.route("/v1/favorites")
@jwt_required()
def get_favorites():
current_user = User.f... | 36.901961 | 91 | 0.714134 |
f4e486e26300f87fc2f81c32e82122516ceba447 | 560 | py | Python | src/openeo_grass_gis_driver/process_graph_db.py | AnikaBettge/openeo-grassgis-driver | ee7721c39c830181256a042ade721ab777ad108b | [
"Apache-2.0"
] | null | null | null | src/openeo_grass_gis_driver/process_graph_db.py | AnikaBettge/openeo-grassgis-driver | ee7721c39c830181256a042ade721ab777ad108b | [
"Apache-2.0"
] | null | null | null | src/openeo_grass_gis_driver/process_graph_db.py | AnikaBettge/openeo-grassgis-driver | ee7721c39c830181256a042ade721ab777ad108b | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from .actinia_processing.config import Config as ActiniaConfig
from sqlitedict import SqliteDict
__license__ = "Apache License, Version 2.0"
__author__ = "Sören Gebbert"
__copyright__ = "Copyright 2018, Sören Gebbert, mundialis"
__maintainer__ = "Soeren Gebbert"
__email__ = "soerengebbert@googl... | 31.111111 | 83 | 0.757143 |
efd3b7277754d59bca734fb6994ce323e3e908f4 | 968 | py | Python | stroylux/main/core/utils/url.py | vladkoblynsky/shop | aaf027f4111605772624a868a0243b221b97c857 | [
"BSD-3-Clause"
] | null | null | null | stroylux/main/core/utils/url.py | vladkoblynsky/shop | aaf027f4111605772624a868a0243b221b97c857 | [
"BSD-3-Clause"
] | 7 | 2020-09-19T16:24:46.000Z | 2022-01-13T03:19:46.000Z | stroylux/main/core/utils/url.py | vladkoblynsky/shop | aaf027f4111605772624a868a0243b221b97c857 | [
"BSD-3-Clause"
] | null | null | null | from urllib.parse import urlparse
from django.conf import settings
from django.core.exceptions import ValidationError
from django.http.request import split_domain_port, validate_host
def validate_storefront_url(url):
"""Validate the storefront URL.
Raise ValidationError if URL isn't in RFC 1808 format
or... | 35.851852 | 73 | 0.686983 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.