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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
797790d4afe8776a36b2ad36c4654dd91107495c | 205 | py | Python | legacy/relay.py | ruminize/OmegaHomeControl | 18540d3f550dd16ef91bc6aaead66dea5d4681e1 | [
"MIT"
] | null | null | null | legacy/relay.py | ruminize/OmegaHomeControl | 18540d3f550dd16ef91bc6aaead66dea5d4681e1 | [
"MIT"
] | null | null | null | legacy/relay.py | ruminize/OmegaHomeControl | 18540d3f550dd16ef91bc6aaead66dea5d4681e1 | [
"MIT"
] | null | null | null | from OmegaExpansion import relayExp
relayExp.driverInit(7)
relayExp.setAllChannels(7, 0)
defaultChannel = 7;
def setRelay(num, state):
relayExp.setChannel(defaultChannel, num, state)
# setRelay(1, 1) | 18.636364 | 49 | 0.77561 |
797791049650761f1f1f4d60872acaff0bfe69a9 | 191 | py | Python | pyutilities/pysftp.py | dmitry-ed-gusev/pyutilities | 5c3af90e0f991d6cf3e689de6a885dded4f50a7c | [
"MIT"
] | 1 | 2021-05-18T17:40:07.000Z | 2021-05-18T17:40:07.000Z | pyutilities/pysftp.py | dmitry-ed-gusev/pyutilities | 5c3af90e0f991d6cf3e689de6a885dded4f50a7c | [
"MIT"
] | null | null | null | pyutilities/pysftp.py | dmitry-ed-gusev/pyutilities | 5c3af90e0f991d6cf3e689de6a885dded4f50a7c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
"""
Some useful/convenient functions related to SFTP working.
Created: Dmitrii Gusev, 25.04.2019
Modified: Dmitrii Gusev, 13.05.2019
"""
| 15.916667 | 61 | 0.675393 |
797791aefdf423b334125173178fe0a20e369f0e | 3,093 | bzl | Python | rules/runfiles/tool.bzl | aiuto/bazel_examples | b3df8fc2601ac78e8208c63b9f5d74c599857b2f | [
"Apache-2.0"
] | null | null | null | rules/runfiles/tool.bzl | aiuto/bazel_examples | b3df8fc2601ac78e8208c63b9f5d74c599857b2f | [
"Apache-2.0"
] | null | null | null | rules/runfiles/tool.bzl | aiuto/bazel_examples | b3df8fc2601ac78e8208c63b9f5d74c599857b2f | [
"Apache-2.0"
] | null | null | null | """Create a tool with runfiles and a rule which uses it.
A rule may register an action that uses a tool which requires external files
during runtime. This demonstrates best practices for handling such a scenario.
"""
def _tool_impl(ctx):
# Runfiles expansion for tools (executables that are to be run
# as part... | 33.989011 | 82 | 0.657614 |
7977949a7fa02e9aa564dfc3e3d2e17016e583df | 15,368 | py | Python | composer/datasets/cifar.py | hanlint/composer | 83d96b7efde533cbc2fff7dd7e0769da2b177807 | [
"Apache-2.0"
] | null | null | null | composer/datasets/cifar.py | hanlint/composer | 83d96b7efde533cbc2fff7dd7e0769da2b177807 | [
"Apache-2.0"
] | null | null | null | composer/datasets/cifar.py | hanlint/composer | 83d96b7efde533cbc2fff7dd7e0769da2b177807 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 MosaicML. All Rights Reserved.
"""CIFAR image classification dataset.
The CIFAR datasets are a collection of labeled 32x32 colour images. Please refer to the `CIFAR dataset
<https://www.cs.toronto.edu/~kriz/cifar.html>`_ for more details.
"""
import logging
import os
import textwrap
from dataclasses... | 51.397993 | 178 | 0.639771 |
797795bd27f6212249f1b38b656e01dd1a1adc29 | 4,088 | py | Python | leaderboard/autoagents/autonomous_agent.py | AIasd/leaderboard | 8f2152b364f530f06b2a0e7905e601d25f682f52 | [
"MIT"
] | 5 | 2022-01-06T01:10:47.000Z | 2022-03-18T15:39:43.000Z | leaderboard/autoagents/autonomous_agent.py | AIasd/leaderboard | 8f2152b364f530f06b2a0e7905e601d25f682f52 | [
"MIT"
] | 15 | 2022-01-03T19:36:36.000Z | 2022-03-30T03:57:58.000Z | leaderboard/autoagents/autonomous_agent.py | AIasd/leaderboard | 8f2152b364f530f06b2a0e7905e601d25f682f52 | [
"MIT"
] | 3 | 2021-11-22T08:01:47.000Z | 2022-03-11T08:53:58.000Z | #!/usr/bin/env python
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
"""
This module provides the base class for all autonomous agents
"""
from __future__ import print_function
from enum import Enum
import carla
from srunner.scenariomanager.time... | 30.507463 | 158 | 0.611546 |
797795c52dbaaf27277160fc1dd98d2fb5ef9416 | 263 | py | Python | Domo/Domo.Packaging/Packages/ModuleTest/0.1/ConsoleTrigger.py | vinhui/Domo | d1920d148177b2cb186d9cdd7860b5402fa018a1 | [
"Apache-2.0"
] | null | null | null | Domo/Domo.Packaging/Packages/ModuleTest/0.1/ConsoleTrigger.py | vinhui/Domo | d1920d148177b2cb186d9cdd7860b5402fa018a1 | [
"Apache-2.0"
] | 1 | 2017-02-06T08:29:47.000Z | 2017-02-08T14:11:23.000Z | Domo/Domo.Packaging/Packages/ModuleTest/0.1/ConsoleTrigger.py | vinhui/Domo | d1920d148177b2cb186d9cdd7860b5402fa018a1 | [
"Apache-2.0"
] | null | null | null | from Domo.Modules import *
class ConsoleTrigger(ControllerTriggerModule):
def __init__(self):
ControllerTriggerModule.init(self, ConsoleController)
pass
def OnEnable(self):
self.controller.sendLine("This is a test")
pass
def OnDisable(self):
pass | 20.230769 | 55 | 0.768061 |
7977968ecc51d8161d2ba1209fadcdc330d0d3e4 | 650 | py | Python | chadlib/collection/stack.py | cjreynol/chadlib | e417a6c5b100b7124a7d9b61d0120b3caa897bb8 | [
"MIT"
] | 1 | 2021-08-06T21:56:52.000Z | 2021-08-06T21:56:52.000Z | chadlib/collection/stack.py | cjreynol/chadlib | e417a6c5b100b7124a7d9b61d0120b3caa897bb8 | [
"MIT"
] | null | null | null | chadlib/collection/stack.py | cjreynol/chadlib | e417a6c5b100b7124a7d9b61d0120b3caa897bb8 | [
"MIT"
] | null | null | null |
class Stack:
"""
A standard stack data structure that supports peek, pop, push operations.
List based version where the tail end of the list is the top of the stack.
"""
def __init__(self, *args):
self.data = list(args)
@property
def is_empty(self):
return not bool(s... | 19.117647 | 78 | 0.589231 |
797796bd3410d3288fc8134874edee2acdb14665 | 22,358 | py | Python | pgl/graph_wrapper.py | xjqbest/PGL | da9d2e0af8d41e29a73c6b349c2f7b3d664d2acc | [
"Apache-2.0"
] | null | null | null | pgl/graph_wrapper.py | xjqbest/PGL | da9d2e0af8d41e29a73c6b349c2f7b3d664d2acc | [
"Apache-2.0"
] | null | null | null | pgl/graph_wrapper.py | xjqbest/PGL | da9d2e0af8d41e29a73c6b349c2f7b3d664d2acc | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019 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 applic... | 36.06129 | 92 | 0.593881 |
79779748407a85b9988611ba5a97f7c07c033572 | 1,680 | py | Python | venv/lib/python3.8/site-packages/statsmodels/datasets/longley/data.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 6,931 | 2015-01-01T11:41:55.000Z | 2022-03-31T17:03:24.000Z | venv/lib/python3.8/site-packages/statsmodels/datasets/longley/data.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 6,137 | 2015-01-01T00:33:45.000Z | 2022-03-31T22:53:17.000Z | venv/lib/python3.8/site-packages/statsmodels/datasets/longley/data.py | johncollinsai/post-high-frequency-data | 88533b0e0afc7e7f82fee1d3ca4b68abc30aaeb4 | [
"MIT"
] | 2,608 | 2015-01-02T21:32:31.000Z | 2022-03-31T07:38:30.000Z | """Longley dataset"""
from statsmodels.datasets import utils as du
__docformat__ = 'restructuredtext'
COPYRIGHT = """This is public domain."""
TITLE = __doc__
SOURCE = """
The classic 1967 Longley Data
http://www.itl.nist.gov/div898/strd/lls/data/Longley.shtml
::
Longley, J.W. (1967) "An Appraisal... | 22.702703 | 78 | 0.626786 |
7977987beb22cec79f0edae6dfdaf1843975bb9d | 12,610 | py | Python | keylime/tpm/tpm_abstract.py | lkatalin/keylime | 1766957a748140d6040df70fd522452a12606a5e | [
"Apache-2.0"
] | null | null | null | keylime/tpm/tpm_abstract.py | lkatalin/keylime | 1766957a748140d6040df70fd522452a12606a5e | [
"Apache-2.0"
] | null | null | null | keylime/tpm/tpm_abstract.py | lkatalin/keylime | 1766957a748140d6040df70fd522452a12606a5e | [
"Apache-2.0"
] | null | null | null | '''
SPDX-License-Identifier: Apache-2.0
Copyright 2017 Massachusetts Institute of Technology.
'''
from abc import ABCMeta, abstractmethod
import ast
import fcntl
import hashlib
import os
import string
import struct
import simplejson as json
import yaml
try:
from yaml import CSafeLoader as SafeLoader, CSafeDumper ... | 35.322129 | 208 | 0.606265 |
797798ddbe18716a05a9c19dc76e6681a367563c | 411 | py | Python | tests/__init__.py | RobertoPrevato/Essentials | 8d49126a1a8479b11b88b8752659fe370e3f0a9d | [
"MIT"
] | 4 | 2019-09-21T19:09:18.000Z | 2020-09-08T20:12:55.000Z | tests/__init__.py | RobertoPrevato/Essentials | 8d49126a1a8479b11b88b8752659fe370e3f0a9d | [
"MIT"
] | 2 | 2020-12-12T16:19:46.000Z | 2022-03-14T16:54:17.000Z | tests/__init__.py | RobertoPrevato/Essentials | 8d49126a1a8479b11b88b8752659fe370e3f0a9d | [
"MIT"
] | 1 | 2021-11-10T14:04:33.000Z | 2021-11-10T14:04:33.000Z | from typing import Any
class CrashTest(RuntimeError):
def __init__(self, value: Any = ""):
super().__init__("Crash!" + (f" {value}" if value else ""))
self.value = value
def __eq__(self, other):
if isinstance(other, str):
return str(self) == other
if isinstance(oth... | 27.4 | 67 | 0.593674 |
7977999e62ca0a4da977d36f07b6e1eb1e80eff7 | 4,352 | py | Python | nifti/spm2analyze.py | cburns/pynifti | 12c0314994a1061b573990dbd46ea8e35cec8e60 | [
"MIT"
] | 1 | 2017-12-11T11:47:00.000Z | 2017-12-11T11:47:00.000Z | nifti/spm2analyze.py | cburns/pynifti | 12c0314994a1061b573990dbd46ea8e35cec8e60 | [
"MIT"
] | null | null | null | nifti/spm2analyze.py | cburns/pynifti | 12c0314994a1061b573990dbd46ea8e35cec8e60 | [
"MIT"
] | null | null | null | ''' Header reading functions for SPM2 version of analyze format '''
import numpy as np
from nifti.volumeutils import HeaderDataError, HeaderTypeError
from nifti.batteryrunners import Report
from nifti import spm99analyze as spm99 # module import
image_dimension_dtd = spm99.image_dimension_dtd[:]
image_dimension_dtd[... | 33.736434 | 95 | 0.577895 |
797799bc868c280ef96e22d3d0aa2671e0dce193 | 307 | py | Python | new_neuron_analysis/util.py | hugerepo-tianhang/low_dim_update_stable | 565f6cbf886d266d0633bc112ccae28f1d116ee1 | [
"MIT"
] | null | null | null | new_neuron_analysis/util.py | hugerepo-tianhang/low_dim_update_stable | 565f6cbf886d266d0633bc112ccae28f1d116ee1 | [
"MIT"
] | null | null | null | new_neuron_analysis/util.py | hugerepo-tianhang/low_dim_update_stable | 565f6cbf886d266d0633bc112ccae28f1d116ee1 | [
"MIT"
] | null | null | null | import numpy as np
def comp_dict(a,b):
if a is None and b is None:
return True
if a.keys() != b.keys():
return False
keys = a.keys()
result = []
for key in keys:
re = (np.array(a[key]) == np.array(b[key])).all()
result.append(re)
return all(result)
| 20.466667 | 57 | 0.534202 |
797799cbd28a7079b4d55ddf7bd3008fa603d748 | 9,432 | py | Python | tests/test_xmlgenerator.py | aurzenligl/melina | 3fbd5257f17a15ac9c95bc1a6317b27fa967fc4e | [
"MIT"
] | null | null | null | tests/test_xmlgenerator.py | aurzenligl/melina | 3fbd5257f17a15ac9c95bc1a6317b27fa967fc4e | [
"MIT"
] | null | null | null | tests/test_xmlgenerator.py | aurzenligl/melina | 3fbd5257f17a15ac9c95bc1a6317b27fa967fc4e | [
"MIT"
] | null | null | null | import os
import melina
datadir = os.path.abspath(__file__ + '/../data')
def parse(filename):
return melina.XmlParser.from_file(datadir + '/' + filename).parse()
def generate(tu):
return melina.XmlGenerator(tu).to_string()
class TestGenerator():
def test_example(self):
tu = parse('example.xml')
... | 36.137931 | 143 | 0.475191 |
79779a12637bc9395c29c91750bd87c1793ed0b3 | 4,099 | py | Python | qklnn/misc/binning.py | cambouvy/BSc-Thesis-Project | ca2504cb828ab068545e130eac393ceb34f2a457 | [
"MIT"
] | 1 | 2021-10-02T11:15:10.000Z | 2021-10-02T11:15:10.000Z | qklnn/misc/binning.py | cambouvy/BSc-Thesis-Project | ca2504cb828ab068545e130eac393ceb34f2a457 | [
"MIT"
] | null | null | null | qklnn/misc/binning.py | cambouvy/BSc-Thesis-Project | ca2504cb828ab068545e130eac393ceb34f2a457 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
import xarray as xr
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from matplotlib.gridspec import GridSpec
from IPython import embed
# store = pd.HDFStore('./clipped_nions0_zeffx1_nustar1e-3_sepfluxes.h5')
store = pd.HDFStore("filtered... | 31.05303 | 102 | 0.582825 |
79779b71043f0d3174d0ebc0e77598f2bb74032f | 409 | py | Python | kivy/tests/test_uix_textinput.py | ChristopherGS/kivy | 2e1db8d373eac585e23f54bfbd929e9c26fb68bd | [
"MIT"
] | null | null | null | kivy/tests/test_uix_textinput.py | ChristopherGS/kivy | 2e1db8d373eac585e23f54bfbd929e9c26fb68bd | [
"MIT"
] | null | null | null | kivy/tests/test_uix_textinput.py | ChristopherGS/kivy | 2e1db8d373eac585e23f54bfbd929e9c26fb68bd | [
"MIT"
] | 1 | 2019-04-12T05:43:48.000Z | 2019-04-12T05:43:48.000Z | '''
uix.textinput tests
========================
'''
import unittest
from kivy.uix.textinput import TextInput
class TextInputTest(unittest.TestCase):
def test_focusable_when_disabled(self):
ti = TextInput()
ti.disabled = True
ti.focused = True
ti.bind(focus=self.on_focused)
... | 19.47619 | 48 | 0.640587 |
79779b8a56b2644377d97e8f355d7e038f5b4bc5 | 127 | py | Python | api/asgi.py | malokhvii-eduard/yanotes | 3f0a3acdd5c2ea51a9e0ade3a713f937b0f1548d | [
"MIT"
] | null | null | null | api/asgi.py | malokhvii-eduard/yanotes | 3f0a3acdd5c2ea51a9e0ade3a713f937b0f1548d | [
"MIT"
] | null | null | null | api/asgi.py | malokhvii-eduard/yanotes | 3f0a3acdd5c2ea51a9e0ade3a713f937b0f1548d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import uvicorn
if __name__ == "__main__":
uvicorn.run("app.main:app", host="0.0.0.0", port=8000)
| 15.875 | 58 | 0.653543 |
79779bb38e7fa8cf85cca86ec6206f70aa4934fc | 6,047 | py | Python | constants.py | Tirke/colab-editor | 64c00c81d843dc20a1f98b08028aac4bd152eab0 | [
"MIT"
] | 1 | 2019-10-25T09:16:45.000Z | 2019-10-25T09:16:45.000Z | constants.py | Tirke/colab-editor | 64c00c81d843dc20a1f98b08028aac4bd152eab0 | [
"MIT"
] | null | null | null | constants.py | Tirke/colab-editor | 64c00c81d843dc20a1f98b08028aac4bd152eab0 | [
"MIT"
] | null | null | null | # TK COLORS
COLORS = ['antique white', 'papaya whip', 'blanched almond', 'bisque', 'peach puff',
'navajo white', 'lemon chiffon', 'lavender',
'lavender blush', 'misty rose', 'dark slate gray', 'dim gray', 'slate gray',
'light slate gray', 'gray', 'light grey', 'midnight blue', 'navy', 'co... | 72.855422 | 114 | 0.624111 |
79779d3b6717982bfe998db64c3abefda3db3cc1 | 188 | py | Python | PythonDocs/src/005.py | Bean-jun/LearnGuide | 30a8567b222d18b15d3e9027a435b5bfe640a046 | [
"MIT"
] | 1 | 2022-02-23T13:42:01.000Z | 2022-02-23T13:42:01.000Z | PythonDocs/src/005.py | Bean-jun/LearnGuide | 30a8567b222d18b15d3e9027a435b5bfe640a046 | [
"MIT"
] | null | null | null | PythonDocs/src/005.py | Bean-jun/LearnGuide | 30a8567b222d18b15d3e9027a435b5bfe640a046 | [
"MIT"
] | null | null | null | # for循环
for i in range(10):
print(i)
# while循环
flag = True
a = 0
while True:
if flag is False:
break
a += 1
print('哈' * a, "!")
if a > 6:
flag = False
| 12.533333 | 23 | 0.478723 |
79779e3c9832bfb2123d8d80069f9e02b1a4f673 | 2,215 | py | Python | 100_vD_FeNiSi_Debye/pick_choice.py | r-a-morrison/fe_alloy_sound_velocities | 8da1b0d073e93fb4b4be3d61b73e58b7a7a3097b | [
"MIT"
] | null | null | null | 100_vD_FeNiSi_Debye/pick_choice.py | r-a-morrison/fe_alloy_sound_velocities | 8da1b0d073e93fb4b4be3d61b73e58b7a7a3097b | [
"MIT"
] | null | null | null | 100_vD_FeNiSi_Debye/pick_choice.py | r-a-morrison/fe_alloy_sound_velocities | 8da1b0d073e93fb4b4be3d61b73e58b7a7a3097b | [
"MIT"
] | null | null | null | # Substitute for psvl
# Front matter
##############
import os
from os import fdopen, remove
from tempfile import mkstemp
from shutil import move
import glob
import re
import time
import pandas as pd
import numpy as np
from scipy import constants
from scipy.optimize import curve_fit
import matplotlib
import matplotlib.... | 24.611111 | 72 | 0.702483 |
79779e4138a02992621edd854f3178586e55ec31 | 1,047 | py | Python | threading/sync-threads.py | ermus19/python-examples | 38f53cc1fbd45f3fdb6b1bb79993090773000219 | [
"MIT"
] | null | null | null | threading/sync-threads.py | ermus19/python-examples | 38f53cc1fbd45f3fdb6b1bb79993090773000219 | [
"MIT"
] | null | null | null | threading/sync-threads.py | ermus19/python-examples | 38f53cc1fbd45f3fdb6b1bb79993090773000219 | [
"MIT"
] | null | null | null | import threading
import time
EXIT_FLAG = 0
class exampleThread (threading.Thread):
def __init__(self, threadID, name, counter):
threading.Thread.__init__(self)
self.threadID = threadID
self.name = name
self.counter = counter
def run(self):
print(... | 21.367347 | 64 | 0.590258 |
79779fc6d85cc000cd48463db28e795a031e6755 | 534 | py | Python | ppanggram/views.py | ChaehwanHwang/ppanggram | 2028e049f402cef2bfd1f92bd49d4b342cd9b6fd | [
"MIT"
] | 1 | 2018-12-13T05:19:26.000Z | 2018-12-13T05:19:26.000Z | ppanggram/views.py | ChaehwanHwang/ppanggram | 2028e049f402cef2bfd1f92bd49d4b342cd9b6fd | [
"MIT"
] | 10 | 2020-06-05T19:59:51.000Z | 2022-02-26T13:40:19.000Z | ppanggram/views.py | ChaehwanHwang/ppanggram | 2028e049f402cef2bfd1f92bd49d4b342cd9b6fd | [
"MIT"
] | null | null | null | from django.views.generic import View
from django.http import HttpResponse
from django.conf import settings
import os
class ReactAppView(View):
def get(self, request):
try:
with open(os.path.join(str(settings.ROOT_DIR), 'frontend', 'build', 'index.html')) as file:
return HttpRes... | 29.666667 | 103 | 0.559925 |
7977a0e02e03dabdd6561d94b7f8e60d301cc72b | 158 | py | Python | setup.py | hiyongz/uiautomator2 | a6feafcf5c8d057ec70f2ec96f03221d970e44ac | [
"MIT"
] | 4,493 | 2017-09-18T17:20:59.000Z | 2022-03-31T08:16:01.000Z | setup.py | BreakCircle/uiautomator2 | 8a92edd1c2c4398719d1f19168ed1199c6fe399b | [
"MIT"
] | 745 | 2017-10-19T15:05:01.000Z | 2022-03-25T06:19:20.000Z | setup.py | BreakCircle/uiautomator2 | 8a92edd1c2c4398719d1f19168ed1199c6fe399b | [
"MIT"
] | 1,202 | 2017-09-28T02:01:59.000Z | 2022-03-31T02:14:54.000Z | #!/usr/bin/env python
# coding: utf-8
#
# Licensed under MIT
#
import setuptools
setuptools.setup(setup_requires=['pbr'], python_requires='>=3.6', pbr=True)
| 17.555556 | 75 | 0.71519 |
7977a1dd0402a4188f66c18a4e4aace26ab1ec71 | 31,922 | py | Python | multimodal_transformers/model/tabular_transformers.py | karolzak/Multimodal-Toolkit | 2308578e3ab09fa0f8cc2c9bbb9c141bb3ccc721 | [
"MIT"
] | null | null | null | multimodal_transformers/model/tabular_transformers.py | karolzak/Multimodal-Toolkit | 2308578e3ab09fa0f8cc2c9bbb9c141bb3ccc721 | [
"MIT"
] | null | null | null | multimodal_transformers/model/tabular_transformers.py | karolzak/Multimodal-Toolkit | 2308578e3ab09fa0f8cc2c9bbb9c141bb3ccc721 | [
"MIT"
] | null | null | null | from torch import nn
from transformers import (
BertForSequenceClassification,
RobertaForSequenceClassification,
DistilBertForSequenceClassification,
AlbertForSequenceClassification,
XLNetForSequenceClassification,
XLMForSequenceClassification
)
from transformers.models.bert.modeling_bert import... | 50.191824 | 152 | 0.611741 |
7977a33844dc51ab04439ed2a532e706d38f20ea | 724 | py | Python | test/test_adadelta.py | farhansabir123/climin | 3f97a4472b1d2ae18504629a099ce54e24810ffd | [
"BSD-3-Clause"
] | 140 | 2015-01-04T07:29:34.000Z | 2022-03-01T23:16:12.000Z | test/test_adadelta.py | farhansabir123/climin | 3f97a4472b1d2ae18504629a099ce54e24810ffd | [
"BSD-3-Clause"
] | 21 | 2015-01-15T15:15:45.000Z | 2021-03-08T17:14:16.000Z | test/test_adadelta.py | farhansabir123/climin | 3f97a4472b1d2ae18504629a099ce54e24810ffd | [
"BSD-3-Clause"
] | 62 | 2015-02-23T19:49:15.000Z | 2022-01-11T16:00:53.000Z | from __future__ import absolute_import, print_function
import itertools
from climin import Adadelta
from .losses import LogisticRegression
from .common import continuation
def test_adadelta_lr():
obj = LogisticRegression()
args = itertools.repeat(((obj.X, obj.Z), {}))
opt = Adadelta(obj.pars, obj.fprim... | 25.857143 | 56 | 0.675414 |
7977a3530df136cb9d22176ef20ecd7cdd7f247c | 186 | py | Python | ParallelPlateSim/TPCGeometry.py | triskeldeian/MXTPSim | 77160dc844c32f7ea4496bdf29e45a5b90553774 | [
"MIT"
] | null | null | null | ParallelPlateSim/TPCGeometry.py | triskeldeian/MXTPSim | 77160dc844c32f7ea4496bdf29e45a5b90553774 | [
"MIT"
] | null | null | null | ParallelPlateSim/TPCGeometry.py | triskeldeian/MXTPSim | 77160dc844c32f7ea4496bdf29e45a5b90553774 | [
"MIT"
] | null | null | null | import gmsh
import sys
gmsh.initialize()
gmsh.model.add("ParallelPlates")
# Defining all the basic dimensions
# All distances in mm
drift_z = 150.0
plate_x = 700.0
plate_y = 400.0
| 11.625 | 35 | 0.736559 |
7977a3991d3cb1fc668da234eed7f88ea0862e03 | 1,571 | py | Python | rulr/Components/RigidBody.py | elliotwoods/Rulr-2.0 | 125503a8d58c4fcfbec9a32ca4a2cc7d9f3ec825 | [
"MIT"
] | 6 | 2019-02-15T17:17:00.000Z | 2020-08-26T17:02:44.000Z | rulr/Components/RigidBody.py | elliotwoods/Rulr-2.0 | 125503a8d58c4fcfbec9a32ca4a2cc7d9f3ec825 | [
"MIT"
] | 1 | 2022-01-27T16:04:36.000Z | 2022-01-27T16:04:36.000Z | rulr/Components/RigidBody.py | elliotwoods/Rulr-2.0 | 125503a8d58c4fcfbec9a32ca4a2cc7d9f3ec825 | [
"MIT"
] | null | null | null | import rulr.Components
from rulr.Utils.Parameters import Vector, BoundVector, Matrix, Bool, Float
from rulr.Utils.AutoGroup import AutoGroup
import numpy as np
import math
import rulr.Math
from tkinter import filedialog
import cv2
class Component(rulr.Components.Base):
"""A rigid body transform (transla... | 33.425532 | 95 | 0.721197 |
7977a5428c2a6ca9e20ea0e928e71fdea332f95a | 4,046 | py | Python | src/predict.py | skoblov-lab/KUPPNet | 835821882cd21e4f9e03fa3e0e64679107fc4658 | [
"MIT"
] | null | null | null | src/predict.py | skoblov-lab/KUPPNet | 835821882cd21e4f9e03fa3e0e64679107fc4658 | [
"MIT"
] | null | null | null | src/predict.py | skoblov-lab/KUPPNet | 835821882cd21e4f9e03fa3e0e64679107fc4658 | [
"MIT"
] | null | null | null | from itertools import chain, filterfalse, tee
from numbers import Integral
from typing import Iterable, Optional, Mapping, Text
import numpy as np
from functools import reduce
from src.structures import NetInput, Interval, Seq
def predict_and_dump(inp: NetInput, model: "keras model", hparams: Mapping, cli_params: M... | 40.059406 | 114 | 0.652991 |
7977a56b502dbeb1f04cbd1df2aad77b1c323b03 | 2,284 | py | Python | run.py | anjesh/pdf-processor | b37981b3825afdb642a4df1e4eb6c23981b94e1c | [
"MIT"
] | 4 | 2015-06-15T16:16:40.000Z | 2017-09-07T03:52:50.000Z | run.py | anjesh/pdf-processor | b37981b3825afdb642a4df1e4eb6c23981b94e1c | [
"MIT"
] | 1 | 2016-04-26T02:16:52.000Z | 2016-04-26T03:40:25.000Z | run.py | anjesh/pdf-processor | b37981b3825afdb642a4df1e4eb6c23981b94e1c | [
"MIT"
] | 5 | 2015-07-29T05:47:55.000Z | 2019-08-11T22:30:46.000Z | from PdfProcessor import *
import argparse
from datetime import datetime
import ConfigParser
import ProcessLogger
import traceback
from urllib2 import HTTPError, URLError
parser = argparse.ArgumentParser(description='Processes the pdf and extracts the text')
parser.add_argument('-l','--language', help='Language of inp... | 45.68 | 154 | 0.728109 |
7977a7a7e28dc14e27c13e5e3d8fca8c78012487 | 4,523 | py | Python | tempest/api/object_storage/test_container_quotas.py | cityofships/tempest | 59aa6811a3664d88b8939603b8e974644fbe21fa | [
"Apache-2.0"
] | 254 | 2015-01-05T19:22:52.000Z | 2022-03-29T08:14:54.000Z | tempest/api/object_storage/test_container_quotas.py | cityofships/tempest | 59aa6811a3664d88b8939603b8e974644fbe21fa | [
"Apache-2.0"
] | 13 | 2015-03-02T15:53:04.000Z | 2022-02-16T02:28:14.000Z | tempest/api/object_storage/test_container_quotas.py | cityofships/tempest | 59aa6811a3664d88b8939603b8e974644fbe21fa | [
"Apache-2.0"
] | 367 | 2015-01-07T15:05:39.000Z | 2022-03-04T09:50:35.000Z | # Copyright 2013 Cloudwatt
# 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... | 38.65812 | 78 | 0.681185 |
7977a86a27effd9fde613107160e2c439bcc1147 | 8,962 | py | Python | mhfp/lsh_forest.py | CDB-2000/mhfp | 1c281cf77c7129829cae7648cc83673b4f8315e8 | [
"MIT"
] | 56 | 2018-10-07T17:35:02.000Z | 2022-03-17T11:30:27.000Z | mhfp/lsh_forest.py | CDB-2000/mhfp | 1c281cf77c7129829cae7648cc83673b4f8315e8 | [
"MIT"
] | 5 | 2018-10-18T00:59:14.000Z | 2021-07-19T18:14:07.000Z | mhfp/lsh_forest.py | CDB-2000/mhfp | 1c281cf77c7129829cae7648cc83673b4f8315e8 | [
"MIT"
] | 14 | 2018-10-18T20:32:50.000Z | 2022-02-17T08:08:58.000Z | import warnings
import numpy as np
from functools import partial
from operator import itemgetter
from collections import defaultdict
from mhfp.encoder import MHFPEncoder
# Adapted from:
# https://github.com/ekzhu/datasketch/blob/master/datasketch/lshforest.py
class LSHForestHelper():
"""A class simplyfing the use... | 36.137097 | 126 | 0.667039 |
7977a99ba62c9340935dff5c7bed2b3438115494 | 2,249 | py | Python | demos/polls/aiohttpdemo_polls/db.py | asvetlov/aiohttp_admin | 16ab89bd788e5c5724ff1d2fdff212f1a36b4ab6 | [
"Apache-2.0"
] | 221 | 2016-09-17T12:06:05.000Z | 2021-11-12T11:42:21.000Z | demos/polls/aiohttpdemo_polls/db.py | asvetlov/aiohttp_admin | 16ab89bd788e5c5724ff1d2fdff212f1a36b4ab6 | [
"Apache-2.0"
] | 541 | 2016-09-21T17:02:21.000Z | 2020-10-21T09:25:19.000Z | demos/polls/aiohttpdemo_polls/db.py | asvetlov/aiohttp_admin | 16ab89bd788e5c5724ff1d2fdff212f1a36b4ab6 | [
"Apache-2.0"
] | 63 | 2016-09-21T16:46:11.000Z | 2021-07-09T14:59:17.000Z | import asyncio
import sqlalchemy as sa
__all__ = ['question', 'choice']
meta = sa.MetaData()
question = sa.Table(
'question', meta,
sa.Column('id', sa.Integer, nullable=False),
sa.Column('question_text', sa.String(200), nullable=False),
sa.Column('pub_date', sa.Date, nullable=False),
# Indexes... | 32.594203 | 73 | 0.628724 |
7977ab35a4e6793e712e081366717b3761b9cb52 | 102 | py | Python | tests/data/module1.py | thisfred/breakfast | 2d5a72187ad62bfb4dd62fba4b0d1b1e7e341cd4 | [
"BSD-2-Clause"
] | null | null | null | tests/data/module1.py | thisfred/breakfast | 2d5a72187ad62bfb4dd62fba4b0d1b1e7e341cd4 | [
"BSD-2-Clause"
] | 6 | 2016-12-15T23:36:56.000Z | 2016-12-17T00:24:52.000Z | tests/data/module1.py | thisfred/breakfast | 2d5a72187ad62bfb4dd62fba4b0d1b1e7e341cd4 | [
"BSD-2-Clause"
] | null | null | null | import os
from tests.data.module2 import fun
def fun2():
print(os.path.join("", ""))
fun()
| 11.333333 | 34 | 0.607843 |
7977ac24bcafeb338b85e0748caeb55e887c5ea1 | 1,522 | py | Python | test/test_add_contact.py | ivangrebeniuk/python_training | bcf459539556d7d7152f7891e0d65bb744b4b475 | [
"Apache-2.0"
] | null | null | null | test/test_add_contact.py | ivangrebeniuk/python_training | bcf459539556d7d7152f7891e0d65bb744b4b475 | [
"Apache-2.0"
] | null | null | null | test/test_add_contact.py | ivangrebeniuk/python_training | bcf459539556d7d7152f7891e0d65bb744b4b475 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from model.contact import Contact
import pytest
import random
import string
def random_string(prefix, maxlen):
symbols = string.ascii_letters + string.digits + string.punctuation + " " * 5
return prefix + "".join([random.choice(symbols) for i in range(random.randrange(maxlen))])
test... | 58.538462 | 338 | 0.676084 |
7977acec755d6ae194afbf0378148f87254bd725 | 1,135 | py | Python | setup.py | AlbertHovhannisyan/imagescraper | 894ac41d72834a368d00aa9b24945cd923141310 | [
"MIT"
] | null | null | null | setup.py | AlbertHovhannisyan/imagescraper | 894ac41d72834a368d00aa9b24945cd923141310 | [
"MIT"
] | null | null | null | setup.py | AlbertHovhannisyan/imagescraper | 894ac41d72834a368d00aa9b24945cd923141310 | [
"MIT"
] | null | null | null | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
import sys
requirement_list = [r.strip() for r in open('requirements.txt', 'r').readlines() if r]
extra = {}
if sys.version_info >= (3,):
extra['use_2to3'] = True
else:
requirement_list.append('futures')
setup(na... | 28.375 | 86 | 0.611454 |
7977acecfc8db05937b9bc13d6fdd36afcdb4cd3 | 419 | py | Python | filamentcolors/migrations/0019_swatch_donated_by.py | itsthejoker/filamentcolors.xyz | 10cdc3b573093f4122ec3300d4fcc1c72771659d | [
"MIT"
] | 12 | 2019-04-29T01:36:25.000Z | 2022-03-24T18:10:47.000Z | filamentcolors/migrations/0019_swatch_donated_by.py | itsthejoker/filamentcolors.xyz | 10cdc3b573093f4122ec3300d4fcc1c72771659d | [
"MIT"
] | 16 | 2020-02-07T15:21:29.000Z | 2022-03-24T02:59:45.000Z | filamentcolors/migrations/0019_swatch_donated_by.py | itsthejoker/filamentcolors.xyz | 10cdc3b573093f4122ec3300d4fcc1c72771659d | [
"MIT"
] | 1 | 2020-10-06T02:55:13.000Z | 2020-10-06T02:55:13.000Z | # Generated by Django 3.0.4 on 2020-06-19 02:06
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("filamentcolors", "0018_auto_20200619_0202"),
]
operations = [
migrations.AddField(
model_name="swatch",
name="donate... | 22.052632 | 74 | 0.615752 |
7977ad2bbdd25d906bf00157f826cfc9c7add01a | 2,451 | py | Python | ioe_api/companies/events.py | mohsinalimat/frappe_ioe_api | d21941ac6050644c8ccbcc21a9ccc24f1a432712 | [
"MIT"
] | 1 | 2021-02-24T13:48:01.000Z | 2021-02-24T13:48:01.000Z | ioe_api/companies/events.py | mohsinalimat/frappe_ioe_api | d21941ac6050644c8ccbcc21a9ccc24f1a432712 | [
"MIT"
] | 1 | 2019-12-16T09:08:20.000Z | 2019-12-17T08:10:50.000Z | ioe_api/companies/events.py | mohsinalimat/frappe_ioe_api | d21941ac6050644c8ccbcc21a9ccc24f1a432712 | [
"MIT"
] | 3 | 2020-05-31T21:08:56.000Z | 2021-12-22T10:42:21.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2019, Dirk Chang and contributors
# For license information, please see license.txt
#
# Api for companies.events
#
from __future__ import unicode_literals
import frappe
import json
from six import text_type, string_types
from iot.iot.doctype.iot_device_event.iot_device_event imp... | 21.5 | 140 | 0.686659 |
7977ad3c392da1a259b81474fa55fab048848132 | 12,364 | py | Python | torch/distributed/algorithms/join.py | VidocqH/pytorch | a9c3580080e7678d5592f4e8ca4bce31409f44aa | [
"Intel"
] | 2 | 2021-03-17T12:00:33.000Z | 2021-03-17T12:18:29.000Z | torch/distributed/algorithms/join.py | stas00/pytorch | 6a085648d81ce88ff59d6d1438fdb3707a0d6fb7 | [
"Intel"
] | null | null | null | torch/distributed/algorithms/join.py | stas00/pytorch | 6a085648d81ce88ff59d6d1438fdb3707a0d6fb7 | [
"Intel"
] | null | null | null | import warnings
from abc import ABC, abstractmethod
from typing import Any, List, NamedTuple
import torch
import torch.distributed as dist
class _JoinHook(ABC):
r"""
This defines a join hook, which provides two entry points in the join
context manager: a main hook, which is called repeatedly while there ... | 37.695122 | 91 | 0.633371 |
7977ae03b1321dc79fe4faae4616a5fddd05ea65 | 2,029 | py | Python | src/wai/common/meta/typing/_get_argument_to_typevar/_get_argument_to_typevar_3_7.py | waikato-datamining/wai-common | bf3d7ae6e01bcb7ffe9f5c2b5d10a05908a68c34 | [
"MIT"
] | null | null | null | src/wai/common/meta/typing/_get_argument_to_typevar/_get_argument_to_typevar_3_7.py | waikato-datamining/wai-common | bf3d7ae6e01bcb7ffe9f5c2b5d10a05908a68c34 | [
"MIT"
] | 8 | 2020-07-01T02:11:31.000Z | 2020-12-17T01:57:17.000Z | src/wai/common/meta/typing/_get_argument_to_typevar/_get_argument_to_typevar_3_7.py | waikato-datamining/wai-common | bf3d7ae6e01bcb7ffe9f5c2b5d10a05908a68c34 | [
"MIT"
] | null | null | null | from typing import Type, TypeVar
import typing_inspect
from ._get_argument_to_typevar_base import check_args
def get_argument_to_typevar(cls: Type, generic_base_class: Type, typevar: TypeVar):
"""
Gets the argument given to a type variable parameterising
a generic base class in a particular sub-class of ... | 35.596491 | 84 | 0.641203 |
7977ae14a638a78556134030ae4f7a66e081e1d1 | 4,616 | py | Python | nmap-converter.py | Nazicc/nmap-converter | 51c18ab05df1aabb4a3919adc5d696c3986e39bf | [
"BSD-2-Clause"
] | 2 | 2018-03-30T15:17:49.000Z | 2021-03-13T05:01:40.000Z | nmap-converter.py | Nazicc/nmap-converter | 51c18ab05df1aabb4a3919adc5d696c3986e39bf | [
"BSD-2-Clause"
] | null | null | null | nmap-converter.py | Nazicc/nmap-converter | 51c18ab05df1aabb4a3919adc5d696c3986e39bf | [
"BSD-2-Clause"
] | 1 | 2021-03-13T05:01:19.000Z | 2021-03-13T05:01:19.000Z | #!/usr/bin/env python
from libnmap.parser import NmapParser, NmapParserException
from xlsxwriter import Workbook
from datetime import datetime
import os.path
def main(reports, workbook):
summary = workbook.add_worksheet("Summary")
results = workbook.add_worksheet("Results")
row = 1
for reportid, rep... | 47.587629 | 175 | 0.573657 |
7977aeb88adf1628719c8bbdc371f3090364a025 | 595 | py | Python | django_server/player/migrations/0002_audio_owner.py | SolomidHero/music-player | 22d2178c9419f47cccb831a141ec491883382e96 | [
"MIT"
] | 2 | 2020-11-19T22:53:35.000Z | 2022-01-13T05:32:41.000Z | django_server/player/migrations/0002_audio_owner.py | SolomidHero/music-player | 22d2178c9419f47cccb831a141ec491883382e96 | [
"MIT"
] | 8 | 2019-12-06T12:53:45.000Z | 2022-02-18T15:43:54.000Z | django_server/player/migrations/0002_audio_owner.py | SolomidHero/music-player | 22d2178c9419f47cccb831a141ec491883382e96 | [
"MIT"
] | null | null | null | # Generated by Django 3.0 on 2020-01-11 12:51
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
('player', '0001_initial'),
... | 27.045455 | 144 | 0.67395 |
7977af39904f2ddb960a55f1f9726bb336a00390 | 1,369 | py | Python | tests/haiku/models/test_haiku_line.py | tebriel/fry-bot | 5ffe7bb0cd10fb0141726962971f30ead3f0e091 | [
"Unlicense"
] | 1 | 2022-03-16T12:50:19.000Z | 2022-03-16T12:50:19.000Z | tests/haiku/models/test_haiku_line.py | tebriel/fry-bot | 5ffe7bb0cd10fb0141726962971f30ead3f0e091 | [
"Unlicense"
] | 2 | 2022-02-22T17:18:38.000Z | 2022-03-03T23:20:01.000Z | tests/haiku/models/test_haiku_line.py | tebriel/fry-bot | 5ffe7bb0cd10fb0141726962971f30ead3f0e091 | [
"Unlicense"
] | null | null | null | from bot.haiku.models import HaikuKey
def test_save(haiku_metadata, haiku_line):
"""Test the save method."""
haiku_metadata.client.table_client.get_entity.return_value = {
"PartitionKey": HaikuKey.FIVE.value,
"RowKey": haiku_metadata.ROW_KEY,
"MaxID": "0",
}
line = haiku_line(s... | 29.12766 | 80 | 0.593134 |
7977afa92559024860ed6da5e62b1d24cab8fbba | 8,617 | py | Python | python/dlxapi/models/dlc_portfolio.py | dlens/dlxapi | 189a6519240ce625d7a9cdb89e305a335d2aa045 | [
"MIT"
] | null | null | null | python/dlxapi/models/dlc_portfolio.py | dlens/dlxapi | 189a6519240ce625d7a9cdb89e305a335d2aa045 | [
"MIT"
] | 1 | 2020-08-20T17:31:43.000Z | 2020-08-20T17:31:43.000Z | python/dlxapi/models/dlc_portfolio.py | dlens/dlxapi | 189a6519240ce625d7a9cdb89e305a335d2aa045 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Decision Lens API
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: 1.0
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import... | 28.160131 | 208 | 0.600789 |
7977afadb132ee11723540502c4aa0543fe527e8 | 3,120 | py | Python | api/capture.py | cabelo/visionpaste | bd9d4d40f677e5aac24b4602d3b410b7d7444aa7 | [
"BSD-3-Clause"
] | 5 | 2020-08-04T17:39:10.000Z | 2022-01-02T14:31:41.000Z | api/capture.py | cabelo/visionpaste | bd9d4d40f677e5aac24b4602d3b410b7d7444aa7 | [
"BSD-3-Clause"
] | null | null | null | api/capture.py | cabelo/visionpaste | bd9d4d40f677e5aac24b4602d3b410b7d7444aa7 | [
"BSD-3-Clause"
] | null | null | null | from torchvision import models
from PIL import Image
import matplotlib.pyplot as plt
import torch
import numpy as np
import cv2
import base64
import torchvision.transforms as T
def decode_segmap(image, source, nc=21):
label_colors = np.array([(0, 0, 0), # 0=background
# 1=aeroplane, 2=bicycle, 3=bir... | 34.666667 | 94 | 0.60609 |
7977b024a44d4045e9b2c9dfbb4299a1fb686128 | 2,547 | py | Python | floodsystem/station.py | JoeBarney1/floodlevelmonitor131 | 98d93ca3d5bf6d1f2f105529d2f758450f791188 | [
"MIT"
] | 1 | 2022-01-23T19:30:19.000Z | 2022-01-23T19:30:19.000Z | floodsystem/station.py | JoeBarney1/floodlevelmonitor131 | 98d93ca3d5bf6d1f2f105529d2f758450f791188 | [
"MIT"
] | null | null | null | floodsystem/station.py | JoeBarney1/floodlevelmonitor131 | 98d93ca3d5bf6d1f2f105529d2f758450f791188 | [
"MIT"
] | null | null | null | # Copyright (C) 2018 Garth N. Wells
#
# SPDX-License-Identifier: MIT
"""This module provides a model for a monitoring station, and tools
for manipulating/modifying station data
"""
NoneType = type(None)
class MonitoringStation:
"""This class represents a river level monitoring station"""
def __init__(self,... | 35.873239 | 136 | 0.625442 |
7977b1941b2bb08cacc46a077074650075e953c6 | 4,720 | py | Python | scripts/classification/imagenet/verify_pretrained.py | JiangongWang/mean-teacher-cross-domain-detection | c52b8b2e22e8ff30ead1bef82409d41f52883ccd | [
"Apache-2.0"
] | 36 | 2019-12-25T04:59:49.000Z | 2022-03-17T07:24:49.000Z | scripts/classification/imagenet/verify_pretrained.py | icemansina/gluon-cv | f116fbd3b0cebbf2a34f08461471db3b4e1c7133 | [
"Apache-2.0"
] | 1 | 2019-04-29T04:05:51.000Z | 2019-04-29T04:05:51.000Z | scripts/classification/imagenet/verify_pretrained.py | icemansina/gluon-cv | f116fbd3b0cebbf2a34f08461471db3b4e1c7133 | [
"Apache-2.0"
] | 9 | 2019-12-25T05:00:33.000Z | 2021-10-01T14:23:51.000Z | import argparse, os
import mxnet as mx
from mxnet import gluon, nd, image
from mxnet.gluon.nn import Block, HybridBlock
from mxnet.gluon.data.vision import transforms
from gluoncv.data import imagenet
from gluoncv.model_zoo import get_model
# CLI
parser = argparse.ArgumentParser(description='Train a model for image ... | 36.030534 | 100 | 0.634958 |
7977b1a8e9e0a5b0f4b4d44293f6a4c2bc4ae6a6 | 81 | py | Python | scene/data/preprocessing/__init__.py | yngtodd/scene | 99355c05b1668586fa09ac70b39c258b39e73c72 | [
"MIT"
] | 2 | 2019-04-18T18:06:41.000Z | 2021-03-09T02:05:34.000Z | scene/data/preprocessing/__init__.py | yngtodd/scene | 99355c05b1668586fa09ac70b39c258b39e73c72 | [
"MIT"
] | null | null | null | scene/data/preprocessing/__init__.py | yngtodd/scene | 99355c05b1668586fa09ac70b39c258b39e73c72 | [
"MIT"
] | null | null | null | from .preprocess import clean_numbers
from .preprocess import clean_special_chars | 40.5 | 43 | 0.888889 |
7977b1cfd442aad7593abc893f5eee51dc783692 | 1,595 | py | Python | examples/example-basic.py | jkpubsrc/python-module-jk-argparsing | 6ee4f818ff9b970a6bdff8ed588ef32cf3a190bc | [
"Apache-2.0"
] | null | null | null | examples/example-basic.py | jkpubsrc/python-module-jk-argparsing | 6ee4f818ff9b970a6bdff8ed588ef32cf3a190bc | [
"Apache-2.0"
] | null | null | null | examples/example-basic.py | jkpubsrc/python-module-jk-argparsing | 6ee4f818ff9b970a6bdff8ed588ef32cf3a190bc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
import os
import time
import traceback
import sys
import abc
import sh
from jk_argparsing import *
from jk_argparsing.textmodel import *
LOREM_IPSUM = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse congue, orci vel interdum bibendum, nisi mauris porttitor tortor, "... | 25.31746 | 154 | 0.749216 |
7977b1fe47195aff3788e30d1d0b6e279199a746 | 30,691 | py | Python | environment/lib/python3.8/site-packages/numba/tests/test_ir_inlining.py | 123972/PCA-nutricion | aff3c51a71c887c3fa367dbf9d599be5915c80cc | [
"MIT"
] | 1 | 2021-02-27T20:33:37.000Z | 2021-02-27T20:33:37.000Z | environment/lib/python3.8/site-packages/numba/tests/test_ir_inlining.py | 123972/PCA-nutricion | aff3c51a71c887c3fa367dbf9d599be5915c80cc | [
"MIT"
] | 2 | 2021-05-11T16:00:55.000Z | 2021-08-23T20:45:22.000Z | environment/lib/python3.8/site-packages/numba/tests/test_ir_inlining.py | 123972/PCA-nutricion | aff3c51a71c887c3fa367dbf9d599be5915c80cc | [
"MIT"
] | 1 | 2021-04-17T15:28:25.000Z | 2021-04-17T15:28:25.000Z | """
This tests the inline kwarg to @jit and @overload etc, it has nothing to do with
LLVM or low level inlining.
"""
import numpy as np
from numba import njit, typeof
from numba.core import types, ir, ir_utils
from numba.core.extending import (
overload,
overload_method,
overload_attribute,
register_... | 28.629664 | 80 | 0.534424 |
7977b30e7ae6e7ef2880beed1c5ed72a29cc3859 | 93,253 | py | Python | tensorflow/lite/python/lite_test.py | Bharat123rox/tensorflow | b818cbe0a53ed8470c0353f13f18141cf2c425a1 | [
"Apache-2.0"
] | 1 | 2020-02-15T14:00:01.000Z | 2020-02-15T14:00:01.000Z | tensorflow/lite/python/lite_test.py | sagol/tensorflow | 04f2870814d2773e09dcfa00cbe76a66a2c4de88 | [
"Apache-2.0"
] | null | null | null | tensorflow/lite/python/lite_test.py | sagol/tensorflow | 04f2870814d2773e09dcfa00cbe76a66a2c4de88 | [
"Apache-2.0"
] | 1 | 2020-02-14T10:12:19.000Z | 2020-02-14T10:12:19.000Z | # Lint as: python2, python3
# Copyright 2018 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
#
... | 42.138726 | 105 | 0.690198 |
7977b375e04031b32932da91226122e8cbbd32e3 | 6,131 | py | Python | tests/unit/docs/test_service.py | kellertk/boto3 | c09b7abbccdacf6e0228901b68e49cbe800840d2 | [
"Apache-2.0"
] | null | null | null | tests/unit/docs/test_service.py | kellertk/boto3 | c09b7abbccdacf6e0228901b68e49cbe800840d2 | [
"Apache-2.0"
] | 2 | 2022-02-21T11:38:59.000Z | 2022-03-07T22:57:08.000Z | tests/unit/docs/test_service.py | kellertk/boto3 | c09b7abbccdacf6e0228901b68e49cbe800840d2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# https://aws.amazon.com/apache2.0/
#
# or in the "license" file accomp... | 43.48227 | 76 | 0.567607 |
7977b3a5da73814879eb45b9f77427e4e43c527f | 11,630 | py | Python | emtf_nnet/nest/nest.py | jiafulow/emtf-nnet | 70a6c747c221178f9db940197ea886bdb60bf3ba | [
"Apache-2.0"
] | null | null | null | emtf_nnet/nest/nest.py | jiafulow/emtf-nnet | 70a6c747c221178f9db940197ea886bdb60bf3ba | [
"Apache-2.0"
] | null | null | null | emtf_nnet/nest/nest.py | jiafulow/emtf-nnet | 70a6c747c221178f9db940197ea886bdb60bf3ba | [
"Apache-2.0"
] | null | null | null | # The following source code was originally obtained from:
# https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/util/nest.py
# ==============================================================================
# Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache Li... | 34.820359 | 85 | 0.655374 |
7977b3f9dd936582d9ac9953cf26529b5d3cef50 | 4,611 | py | Python | rocket_releaser/changelog.py | 15five/rocket_releaser | 3afb9eeb701eaf19934e5516fc1baab0cd414387 | [
"MIT"
] | 2 | 2020-12-16T05:17:43.000Z | 2022-03-31T08:22:21.000Z | rocket_releaser/changelog.py | 15five/rocket_releaser | 3afb9eeb701eaf19934e5516fc1baab0cd414387 | [
"MIT"
] | 2 | 2020-12-15T17:18:07.000Z | 2021-05-05T21:57:31.000Z | rocket_releaser/changelog.py | 15five/rocket_releaser | 3afb9eeb701eaf19934e5516fc1baab0cd414387 | [
"MIT"
] | 1 | 2021-02-02T09:18:34.000Z | 2021-02-02T09:18:34.000Z | import re
import logging
from typing import List
logger = logging.getLogger(__name__)
class ChangeLog:
def __init__(
self, pull_request_dicts: List[dict], org_name: str, repo_name: str, jira_url=""
):
self.pull_request_dicts = pull_request_dicts
self.features = []
self.fixes ... | 31.8 | 101 | 0.476469 |
7977b4748f6895ef097640d1c0bf5699ff1a08af | 13,255 | py | Python | fixtures/security_group.py | vkolli/contrail-test-perf | db04b8924a2c330baabe3059788b149d957a7d67 | [
"Apache-2.0"
] | 1 | 2017-06-13T04:42:34.000Z | 2017-06-13T04:42:34.000Z | fixtures/security_group.py | vkolli/contrail-test-perf | db04b8924a2c330baabe3059788b149d957a7d67 | [
"Apache-2.0"
] | null | null | null | fixtures/security_group.py | vkolli/contrail-test-perf | db04b8924a2c330baabe3059788b149d957a7d67 | [
"Apache-2.0"
] | null | null | null | import fixtures
from vnc_api.vnc_api import NoIdError
from vnc_api.gen.cfixture import ContrailFixture
from vnc_api.gen.resource_xsd import PolicyEntriesType
from vnc_api.gen.resource_test import SecurityGroupTestFixtureGen,\
ProjectTestFixtureGen, DomainTestFixtureGen
from tcutils.util import retry
try:
from... | 39.332344 | 107 | 0.610562 |
7977b7434f00b1f4cbb3e29852d969eae2e32a9c | 93 | py | Python | setup.py | JohannGordillo/Tarea01 | f7fdf6c60891646ef766301fb2415beabb791ab5 | [
"MIT"
] | null | null | null | setup.py | JohannGordillo/Tarea01 | f7fdf6c60891646ef766301fb2415beabb791ab5 | [
"MIT"
] | null | null | null | setup.py | JohannGordillo/Tarea01 | f7fdf6c60891646ef766301fb2415beabb791ab5 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(name="Tarea01", packages=find_packages())
| 23.25 | 47 | 0.806452 |
7977b7578dd7af7185c44a02ecf351713c7ba709 | 2,994 | py | Python | dev/tools/sidebar_data.py | anhquan0412/fastai_dev | aabbc18d496ef89de2063b9a1357d725b77e6f7d | [
"Apache-2.0"
] | 380 | 2019-07-10T17:23:35.000Z | 2022-03-21T10:30:55.000Z | dev/tools/sidebar_data.py | anhquan0412/fastai_dev | aabbc18d496ef89de2063b9a1357d725b77e6f7d | [
"Apache-2.0"
] | 162 | 2019-08-16T17:24:47.000Z | 2021-09-27T21:41:00.000Z | dev/tools/sidebar_data.py | anhquan0412/fastai_dev | aabbc18d496ef89de2063b9a1357d725b77e6f7d | [
"Apache-2.0"
] | 238 | 2019-07-13T13:38:43.000Z | 2022-03-06T01:45:00.000Z | # Usage: After editing this file, next run:
#
# tools/make_sidebar.py
# git commit docs/_data/sidebars/home_sidebar.yml docs_src/sidebar/sidebar_data.py
# git push
# This dict defines the structure:
sidebar_d = {
'Getting started': {
'Installation': 'https://github.com/fastai/fastai/blob/master/README.md#... | 31.1875 | 94 | 0.50668 |
7977b7acdbcb90f838c6746b2f3bf60703eadfc5 | 1,192 | py | Python | google/ads/googleads/v10/enums/types/custom_audience_member_type.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v10/enums/types/custom_audience_member_type.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"Apache-2.0"
] | null | null | null | google/ads/googleads/v10/enums/types/custom_audience_member_type.py | JakobSteixner/google-ads-python | df2b802cc7e78295a4ece21cc7ef3787cd35dab0 | [
"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... | 29.073171 | 74 | 0.703859 |
7977b9a8ba05a1074c0cbc60a216a07e6740f44c | 6,994 | py | Python | anillo/handlers/routing.py | jespino/anillo | 901a84fd2b4fa909bc06e8bd76090457990576a7 | [
"BSD-2-Clause"
] | 14 | 2015-03-02T17:49:45.000Z | 2021-05-04T16:11:48.000Z | anillo/handlers/routing.py | jespino/anillo | 901a84fd2b4fa909bc06e8bd76090457990576a7 | [
"BSD-2-Clause"
] | 14 | 2015-03-03T09:52:17.000Z | 2017-02-15T08:55:58.000Z | anillo/handlers/routing.py | jespino/anillo | 901a84fd2b4fa909bc06e8bd76090457990576a7 | [
"BSD-2-Clause"
] | 8 | 2015-03-03T09:02:51.000Z | 2019-02-03T04:19:02.000Z | """
Url routing module.
This module provides to anillo nanoframework a handler that manages the
url matching and routing. It is hightly inspired by clojure's compojure
library and other similar ones.
This is a little example on how you can define routes:
urls = [
url("/<int:year>", index, methods=["get", "po... | 32.082569 | 99 | 0.609379 |
7977ba0af2b44f220d5e7431aa4daf9fea39536f | 2,221 | py | Python | include/scons/test/CacheDir/multi-targets.py | SWEN-712/screen-reader-brandonp728 | e30c25ad2d10ce632fac0548696a61a872328f59 | [
"bzip2-1.0.6"
] | null | null | null | include/scons/test/CacheDir/multi-targets.py | SWEN-712/screen-reader-brandonp728 | e30c25ad2d10ce632fac0548696a61a872328f59 | [
"bzip2-1.0.6"
] | null | null | null | include/scons/test/CacheDir/multi-targets.py | SWEN-712/screen-reader-brandonp728 | e30c25ad2d10ce632fac0548696a61a872328f59 | [
"bzip2-1.0.6"
] | 1 | 2019-01-17T13:47:56.000Z | 2019-01-17T13:47:56.000Z | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# 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,
... | 28.474359 | 73 | 0.740657 |
7977ba93aee70240c4a25b9263b10c3cd7333434 | 1,237 | py | Python | examples/applications/fine_tune_classification.py | gugarosa/textfier | 31d245218978a5a4c31f22b0fb13597327fb7d23 | [
"Apache-2.0"
] | 2 | 2020-09-12T01:47:40.000Z | 2020-10-01T22:35:39.000Z | examples/applications/fine_tune_classification.py | gugarosa/textfier | 31d245218978a5a4c31f22b0fb13597327fb7d23 | [
"Apache-2.0"
] | null | null | null | examples/applications/fine_tune_classification.py | gugarosa/textfier | 31d245218978a5a4c31f22b0fb13597327fb7d23 | [
"Apache-2.0"
] | null | null | null | import textfier.utils.loader as l
from textfier.core import Dataset, Runner
from textfier.tasks import SequenceClassificationTask
# Loads training and testing samples
X_train, Y_train = l.load_csv('data/csv/train.csv')
X_test, Y_test = l.load_csv('data/csv/test.csv')
# Creates the sequence classification task with pr... | 38.65625 | 94 | 0.773646 |
7977baa557b490ad842a9403b064934f55146621 | 4,311 | py | Python | examples/pruning/mxnet_integration.py | hross/optuna | 2f896b2b51a99a6ebe7206310c5b9d3cb88fc782 | [
"MIT"
] | null | null | null | examples/pruning/mxnet_integration.py | hross/optuna | 2f896b2b51a99a6ebe7206310c5b9d3cb88fc782 | [
"MIT"
] | null | null | null | examples/pruning/mxnet_integration.py | hross/optuna | 2f896b2b51a99a6ebe7206310c5b9d3cb88fc782 | [
"MIT"
] | null | null | null | """
Optuna example that demonstrates a pruner for MXNet.
In this example, we optimize the validation accuracy of hand-written digit recognition using
MXNet and MNIST, where the architecture of the neural network and the learning rate of optimizer
is optimized. Throughout the training of neural networks, a pruner obser... | 33.944882 | 96 | 0.701693 |
7977bb2ca5f6bdf01a7835c38df8a084db36242d | 2,611 | py | Python | amaascore/assets/equity_future.py | amaas-fintech/amaas-core-sdk-python | bd77884de6e5ab05d864638addeb4bb338a51183 | [
"Apache-2.0"
] | null | null | null | amaascore/assets/equity_future.py | amaas-fintech/amaas-core-sdk-python | bd77884de6e5ab05d864638addeb4bb338a51183 | [
"Apache-2.0"
] | 8 | 2017-06-06T09:42:41.000Z | 2018-01-16T10:16:16.000Z | amaascore/assets/equity_future.py | amaas-fintech/amaas-core-sdk-python | bd77884de6e5ab05d864638addeb4bb338a51183 | [
"Apache-2.0"
] | 8 | 2017-01-18T04:14:01.000Z | 2017-12-01T08:03:10.000Z | from __future__ import absolute_import, division, print_function, unicode_literals
from datetime import date
from decimal import Decimal
from amaascore.assets.future import Future
class EquityFuture(Future):
def __init__(self, asset_manager_id, asset_id, settlement_type, contract_size, point_value, tick_size,
... | 62.166667 | 111 | 0.643432 |
7977bb571826ab6b4d0625a1d6bbaf27487e5903 | 1,680 | py | Python | py_grpc_prometheus/server_metrics.py | rcoup/py-grpc-prometheus | e2530974e0ba691973664d1be3b0b690059787d2 | [
"Apache-2.0"
] | null | null | null | py_grpc_prometheus/server_metrics.py | rcoup/py-grpc-prometheus | e2530974e0ba691973664d1be3b0b690059787d2 | [
"Apache-2.0"
] | null | null | null | py_grpc_prometheus/server_metrics.py | rcoup/py-grpc-prometheus | e2530974e0ba691973664d1be3b0b690059787d2 | [
"Apache-2.0"
] | null | null | null | from prometheus_client import Counter
from prometheus_client import Histogram
GRPC_SERVER_STARTED_COUNTER = Counter(
"grpc_server_started_total",
"Total number of RPCs started on the server.",
["grpc_type", "grpc_service", "grpc_method"])
GRPC_SERVER_STREAM_MSG_RECEIVED = Counter(
"grpc_server_msg_rec... | 38.181818 | 90 | 0.73869 |
7977bd18e9b1cae3ba84637b2db2a272c7548f75 | 53 | py | Python | example/__init__.py | tim-mccurrach/django-s3-upload | 1f6bfc418a256e768394b055b170e40c050788fa | [
"MIT"
] | 26 | 2018-04-17T09:26:44.000Z | 2022-01-14T18:34:10.000Z | example/__init__.py | tim-mccurrach/django-s3-upload | 1f6bfc418a256e768394b055b170e40c050788fa | [
"MIT"
] | 26 | 2017-07-14T11:59:04.000Z | 2022-01-11T22:13:57.000Z | example/__init__.py | tim-mccurrach/django-s3-upload | 1f6bfc418a256e768394b055b170e40c050788fa | [
"MIT"
] | 13 | 2017-07-19T20:06:06.000Z | 2021-11-12T17:14:56.000Z | default_app_config = "example.apps.ExampleAppConfig"
| 26.5 | 52 | 0.849057 |
7977bf0180c2d8686c5c9560dd01b80f97d02caf | 2,549 | py | Python | MI/Assignment 1/Assignment1.py | Ojjie/Sem5-Assignments | c1c96ae468792f1fc1310ef6e2e8a8b8c97f1434 | [
"MIT"
] | 1 | 2021-07-06T14:56:49.000Z | 2021-07-06T14:56:49.000Z | MI/Assignment 1/Assignment1.py | Ojjie/Sem5-Assignments | c1c96ae468792f1fc1310ef6e2e8a8b8c97f1434 | [
"MIT"
] | null | null | null | MI/Assignment 1/Assignment1.py | Ojjie/Sem5-Assignments | c1c96ae468792f1fc1310ef6e2e8a8b8c97f1434 | [
"MIT"
] | null | null | null | '''
Assume df is a pandas dataframe object of the dataset given
'''
import numpy as np
import pandas as pd
import random
'''Calculate the entropy of the enitre dataset'''
#input:pandas_dataframe
#output:int/float/double/large
def get_entropy_of_dataset(df):
entropy = 0
unique_values = df.iloc[:,-1].... | 29.639535 | 97 | 0.707336 |
7977bf21274dad24cc6aaa69d80070d270d34846 | 60,075 | py | Python | pytorch_pretrained_bert/modeling_transfo_xl.py | 9173860/WMSeg | 526d3ad0bf17bc657d9100cbcb7a0d8682b10643 | [
"MIT"
] | null | null | null | pytorch_pretrained_bert/modeling_transfo_xl.py | 9173860/WMSeg | 526d3ad0bf17bc657d9100cbcb7a0d8682b10643 | [
"MIT"
] | null | null | null | pytorch_pretrained_bert/modeling_transfo_xl.py | 9173860/WMSeg | 526d3ad0bf17bc657d9100cbcb7a0d8682b10643 | [
"MIT"
] | null | null | null | # coding=utf-8
# Copyright 2018 Google AI, Google Brain and Carnegie Mellon University Authors and the HuggingFace Inc. team.
# Copyright (c) 2018, 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 Lice... | 42.576187 | 134 | 0.592876 |
7977c067c17c27e967e64a3503d500573b3bfca7 | 7,466 | py | Python | ultracart/models/customer_tax_codes.py | UltraCart/rest_api_v2_sdk_python | d734ea13fabc7a57872ff68bac06861edb8fd882 | [
"Apache-2.0"
] | 1 | 2018-03-15T16:56:23.000Z | 2018-03-15T16:56:23.000Z | ultracart/models/customer_tax_codes.py | UltraCart/rest_api_v2_sdk_python | d734ea13fabc7a57872ff68bac06861edb8fd882 | [
"Apache-2.0"
] | null | null | null | ultracart/models/customer_tax_codes.py | UltraCart/rest_api_v2_sdk_python | d734ea13fabc7a57872ff68bac06861edb8fd882 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
UltraCart Rest API V2
UltraCart REST API Version 2 # noqa: E501
OpenAPI spec version: 2.0.0
Contact: support@ultracart.com
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import six
class CustomerTaxCodes(object)... | 32.46087 | 174 | 0.643718 |
7977c2c3e6a03d00a23a2c3ec31301333b0c1af3 | 6,520 | py | Python | google/ads/google_ads/v6/proto/enums/feed_attribute_type_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v6/proto/enums/feed_attribute_type_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v6/proto/enums/feed_attribute_type_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads/v6/enums/feed_attribute_type.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import ref... | 41.006289 | 1,020 | 0.765337 |
7977c35e7b8b2a5e4ce628f62d276d6060b13aec | 547 | py | Python | examples/python/abstract_json.py | serge-sans-paille/LIEF | 5d56141061bfc27e3c971e9e474dc86fdaf0c6a9 | [
"Apache-2.0"
] | null | null | null | examples/python/abstract_json.py | serge-sans-paille/LIEF | 5d56141061bfc27e3c971e9e474dc86fdaf0c6a9 | [
"Apache-2.0"
] | null | null | null | examples/python/abstract_json.py | serge-sans-paille/LIEF | 5d56141061bfc27e3c971e9e474dc86fdaf0c6a9 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Description
# -----------
# Dump abstract informations in a JSON format
# see: abstract_reader.py
import argparse
import sys
import lief
import json
def main():
parser = argparse.ArgumentParser()
parser.add_argument('binary', help = 'A binary')
args = parse... | 21.038462 | 62 | 0.670932 |
7977c3801653ff52e25a0de7d6534c2717a30715 | 5,181 | py | Python | ros/devel/lib/python2.7/dist-packages/dbw_mkz_msgs/msg/_ThrottleCmd.py | naubergois/selfdrivingcarscapstone | 87b076489e3d6167477fe83fbfa249de997ffd36 | [
"MIT"
] | 3 | 2020-10-05T17:17:20.000Z | 2020-10-19T02:10:22.000Z | ros/devel/lib/python2.7/dist-packages/dbw_mkz_msgs/msg/_ThrottleCmd.py | naubergois/selfdrivingcarscapstone | 87b076489e3d6167477fe83fbfa249de997ffd36 | [
"MIT"
] | null | null | null | ros/devel/lib/python2.7/dist-packages/dbw_mkz_msgs/msg/_ThrottleCmd.py | naubergois/selfdrivingcarscapstone | 87b076489e3d6167477fe83fbfa249de997ffd36 | [
"MIT"
] | null | null | null | # This Python file uses the following encoding: utf-8
"""autogenerated by genpy from dbw_mkz_msgs/ThrottleCmd.msg. Do not edit."""
import codecs
import sys
python3 = True if sys.hexversion > 0x03000000 else False
import genpy
import struct
class ThrottleCmd(genpy.Message):
_md5sum = "d75259a1444adebea30e45b37542c41... | 32.584906 | 145 | 0.669176 |
7977c43926c42f3d0477a9681f07c9ea99b04e9a | 1,170 | py | Python | test/preprocessing/tokenizer_test.py | henriettekhn/MLinPractice | ad05f0137a407a17e75ffca08706c5250bcd0d49 | [
"MIT"
] | null | null | null | test/preprocessing/tokenizer_test.py | henriettekhn/MLinPractice | ad05f0137a407a17e75ffca08706c5250bcd0d49 | [
"MIT"
] | null | null | null | test/preprocessing/tokenizer_test.py | henriettekhn/MLinPractice | ad05f0137a407a17e75ffca08706c5250bcd0d49 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Oct 7 14:30:41 2021
@author: ml
"""
import unittest
import pandas as pd
from script.preprocessing.tokenizer import Tokenizer
class TokenizerTest(unittest.TestCase):
def setUp(self):
self.INPUT_COLUMN = "input"
self.OUTPUT_COL... | 28.536585 | 80 | 0.67094 |
7977c4c94847a72540bc9d2b744af07fb27dd4f0 | 8,651 | py | Python | john_zelle_python3/chapter5.py | alirkaya/programming-textbook-solutions | 7362dce474b8a881d654f95604e09d1d0e76aec2 | [
"MIT"
] | null | null | null | john_zelle_python3/chapter5.py | alirkaya/programming-textbook-solutions | 7362dce474b8a881d654f95604e09d1d0e76aec2 | [
"MIT"
] | null | null | null | john_zelle_python3/chapter5.py | alirkaya/programming-textbook-solutions | 7362dce474b8a881d654f95604e09d1d0e76aec2 | [
"MIT"
] | null | null | null | # Chapter 5 Exercises
# Review Questions (True/False)
# 1. False. It can be enclosed by singe and double quotes.
# 2. True.
# 3. False. Files are treated as string and can contains multi-lines.
# 4. True.
# 5. True.
# 6. True.
# 7. True.
# 8. False. It is a very weak form of encryption.
# 9. False. It is appen... | 21.466501 | 116 | 0.575887 |
7977c4fe0b36c22701d8291f95199c2173e541e2 | 4,338 | py | Python | common/loss.py | prozyy/Pose3D-RIE | 32488a29b5444e85cd4d60744b97ae3b6c3098c7 | [
"MIT"
] | null | null | null | common/loss.py | prozyy/Pose3D-RIE | 32488a29b5444e85cd4d60744b97ae3b6c3098c7 | [
"MIT"
] | null | null | null | common/loss.py | prozyy/Pose3D-RIE | 32488a29b5444e85cd4d60744b97ae3b6c3098c7 | [
"MIT"
] | null | null | null | # Copyright (c) 2018-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the
# LICENSE file in the root directory of this source tree.
#
import torch
import numpy as np
def mpjpe_loss(predicted, target):
"""
Mean per-joint position error (i.e. mean Euclid... | 35.557377 | 119 | 0.668511 |
7977c6f2d38ea9901207a3c3dc472e2347f4d7c6 | 27,430 | py | Python | azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/resource_groups_operations.py | SUSE/azure-sdk-for-python | 324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f | [
"MIT"
] | 2 | 2020-07-29T14:22:17.000Z | 2020-11-06T18:47:40.000Z | azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/resource_groups_operations.py | SUSE/azure-sdk-for-python | 324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f | [
"MIT"
] | 1 | 2016-08-01T07:37:04.000Z | 2016-08-01T07:37:04.000Z | azure-mgmt-resource/azure/mgmt/resource/resources/v2016_09_01/operations/resource_groups_operations.py | SUSE/azure-sdk-for-python | 324f99d26dd6f4ee9793b9bf1d4d5f928e4b6c2f | [
"MIT"
] | 1 | 2020-12-12T21:04:41.000Z | 2020-12-12T21:04:41.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 45.792988 | 168 | 0.655341 |
7977c7384b6226c0bf5fb51b813e524e05174cef | 4,212 | py | Python | openshift/test/test_v1_build_post_commit_spec.py | flaper87/openshift-restclient-python | 13d5d86ca89035b9f596032e7a34f3cc33bf8f18 | [
"Apache-2.0"
] | null | null | null | openshift/test/test_v1_build_post_commit_spec.py | flaper87/openshift-restclient-python | 13d5d86ca89035b9f596032e7a34f3cc33bf8f18 | [
"Apache-2.0"
] | null | null | null | openshift/test/test_v1_build_post_commit_spec.py | flaper87/openshift-restclient-python | 13d5d86ca89035b9f596032e7a34f3cc33bf8f18 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
OpenShift API (with Kubernetes)
OpenShift provides builds, application lifecycle, image content management, and administrative policy on top of Kubernetes. The API allows consistent management of those objects. All API operations are authenticated via an Authorization bearer token that is... | 97.953488 | 3,380 | 0.791311 |
7977c75d1af1f58823d2a8c0d84eb4fdf2c5db83 | 16,668 | py | Python | ryu/app/network_awareness/network_monitor.py | coolMarlon/ryu | 38bee69ee8931959386f051c0bfe2bfa61d3ce61 | [
"Apache-2.0"
] | null | null | null | ryu/app/network_awareness/network_monitor.py | coolMarlon/ryu | 38bee69ee8931959386f051c0bfe2bfa61d3ce61 | [
"Apache-2.0"
] | null | null | null | ryu/app/network_awareness/network_monitor.py | coolMarlon/ryu | 38bee69ee8931959386f051c0bfe2bfa61d3ce61 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright (C) 2016 Li Cheng at Beijing University of Posts
# and Telecommunications. www.muzixing.com
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.or... | 38.583333 | 79 | 0.531977 |
7977c8a8470d31d5cfddb3af4e03eb1abf209296 | 917 | py | Python | benchmarks/bench_context_manager_overhead.py | jeremiedbb/threadpoolctl | e8c9dc6ebd5565a75284aed31beec2e439d4f80e | [
"BSD-3-Clause"
] | null | null | null | benchmarks/bench_context_manager_overhead.py | jeremiedbb/threadpoolctl | e8c9dc6ebd5565a75284aed31beec2e439d4f80e | [
"BSD-3-Clause"
] | null | null | null | benchmarks/bench_context_manager_overhead.py | jeremiedbb/threadpoolctl | e8c9dc6ebd5565a75284aed31beec2e439d4f80e | [
"BSD-3-Clause"
] | null | null | null | import time
from argparse import ArgumentParser
from pprint import pprint
from statistics import mean, stdev
from threadpoolctl import threadpool_info, threadpool_limits
parser = ArgumentParser(description='Measure threadpool_limits call overhead.')
parser.add_argument('--import', dest="packages", default=[], nargs='+... | 31.62069 | 79 | 0.68157 |
7977c8babb7d2776c7db089e0c96eae8adf6bf6c | 81,391 | py | Python | mne/report.py | cuckoong/mne-python | 09ede511b83720076d26e22b71c5eb5cad5c2f9f | [
"BSD-3-Clause"
] | null | null | null | mne/report.py | cuckoong/mne-python | 09ede511b83720076d26e22b71c5eb5cad5c2f9f | [
"BSD-3-Clause"
] | null | null | null | mne/report.py | cuckoong/mne-python | 09ede511b83720076d26e22b71c5eb5cad5c2f9f | [
"BSD-3-Clause"
] | 1 | 2020-03-05T08:43:17.000Z | 2020-03-05T08:43:17.000Z | """Generate self-contained HTML reports from MNE objects."""
# Authors: Alex Gramfort <alexandre.gramfort@inria.fr>
# Mainak Jas <mainak@neuro.hut.fi>
# Teon Brooks <teon.brooks@gmail.com>
#
# License: BSD (3-clause)
import base64
from io import BytesIO
import os
import os.path as op
import fnmatch
... | 38.104401 | 938 | 0.547493 |
7977ca065f34a8066c926d19a9576dd7bc238509 | 1,064 | py | Python | chrome/common/extensions/docs/server2/samples_data_source_test.py | nagineni/chromium-crosswalk | 5725642f1c67d0f97e8613ec1c3e8107ab53fdf8 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 4 | 2017-04-05T01:51:34.000Z | 2018-02-15T03:11:54.000Z | chrome/common/extensions/docs/server2/samples_data_source_test.py | nagineni/chromium-crosswalk | 5725642f1c67d0f97e8613ec1c3e8107ab53fdf8 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 1 | 2021-12-13T19:44:12.000Z | 2021-12-13T19:44:12.000Z | chrome/common/extensions/docs/server2/samples_data_source_test.py | nagineni/chromium-crosswalk | 5725642f1c67d0f97e8613ec1c3e8107ab53fdf8 | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 4 | 2017-04-05T01:52:03.000Z | 2022-02-13T17:58:45.000Z | #!/usr/bin/env python
# Copyright (c) 2012 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.
import json
import os
import sys
import unittest
from samples_data_source import SamplesDataSource
from servlet import Request
cl... | 30.4 | 75 | 0.665414 |
7977cb25342bb7570316927832ce923cfc673216 | 3,163 | py | Python | compile.py | Resist-Tech/Fluent | c634a0ec22758af34499c55c39d751c52b8b625f | [
"MIT"
] | null | null | null | compile.py | Resist-Tech/Fluent | c634a0ec22758af34499c55c39d751c52b8b625f | [
"MIT"
] | null | null | null | compile.py | Resist-Tech/Fluent | c634a0ec22758af34499c55c39d751c52b8b625f | [
"MIT"
] | 2 | 2021-05-19T02:43:23.000Z | 2021-05-24T22:08:36.000Z | # compile.py
# Run on current file with rOS
# Token '#*#' means line for testing purposes.
from tkinter import *
import sys
import re
class ParsingError(Exception):
pass
def line_error(line, line_num):
raise ParsingError(f'Error on Line {line_num}:\n{line}')
def check_error(line, length, equal=True):
... | 34.380435 | 130 | 0.49921 |
7977cce10954ed731d710ffcd518c0cbc2e3484b | 439 | py | Python | setup.py | mohamed-zezo/ispapi | ec2dc8cde0b742d64a6a0df907ff6572cc279957 | [
"MIT"
] | 2 | 2019-07-08T06:23:41.000Z | 2020-07-07T20:16:44.000Z | setup.py | mohamed-zezo/ispapi | ec2dc8cde0b742d64a6a0df907ff6572cc279957 | [
"MIT"
] | 2 | 2020-07-08T21:28:49.000Z | 2021-06-02T00:17:14.000Z | setup.py | mohamed-zezo/ispapi | ec2dc8cde0b742d64a6a0df907ff6572cc279957 | [
"MIT"
] | 1 | 2020-07-12T12:32:37.000Z | 2020-07-12T12:32:37.000Z | #!/usr/bin/env python3
import setuptools
setuptools.setup(name='ispapi',
version='0.1',
description='Collection of ISP API clients with comming cli',
author='Jo De Boeck',
author_email='deboeck.jo@gmail.com',
url='http://github.com/grimpy/ispapi',
install_requires=['requests'],
... | 31.357143 | 71 | 0.669704 |
7977cd80a64fe72df242505661595a8c20e43524 | 10,443 | py | Python | kubernetes-engine-samples/triton_gke/triton_server/tensorrt/docker/resnet/onnx_to_tensorrt.py | ethem-kinginthenorth/nvidia-gcp-samples | 53551fa387615204a6d4688d7aa31b9ba846e6a6 | [
"Apache-2.0"
] | 18 | 2020-11-13T00:35:07.000Z | 2022-03-25T08:46:48.000Z | kubernetes-engine-samples/triton_gke/triton_server/tensorrt/docker/resnet/onnx_to_tensorrt.py | ethem-kinginthenorth/nvidia-gcp-samples | 53551fa387615204a6d4688d7aa31b9ba846e6a6 | [
"Apache-2.0"
] | 3 | 2020-12-14T05:51:02.000Z | 2021-03-04T00:38:25.000Z | kubernetes-engine-samples/triton_gke/triton_server/tensorrt/docker/resnet/onnx_to_tensorrt.py | ethem-kinginthenorth/nvidia-gcp-samples | 53551fa387615204a6d4688d7aa31b9ba846e6a6 | [
"Apache-2.0"
] | 6 | 2021-01-12T21:48:59.000Z | 2021-12-15T21:27:47.000Z | #!/usr/bin/env python3
# Copyright 2019 NVIDIA Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 49.259434 | 306 | 0.660921 |
7977cf051d411bcf9e572e0b0d25d3d44572f831 | 8,271 | bzl | Python | tools/bzl/asciidoc.bzl | mamh-java/gerrit | b327cbe9f74cc860c82a68fc80a117374ebad937 | [
"Apache-2.0"
] | 623 | 2016-02-25T11:50:17.000Z | 2022-03-25T20:41:15.000Z | tools/bzl/asciidoc.bzl | mamh-java/gerrit | b327cbe9f74cc860c82a68fc80a117374ebad937 | [
"Apache-2.0"
] | 56 | 2020-02-12T21:13:43.000Z | 2022-03-03T23:14:55.000Z | tools/bzl/asciidoc.bzl | mamh-java/gerrit | b327cbe9f74cc860c82a68fc80a117374ebad937 | [
"Apache-2.0"
] | 157 | 2016-01-18T05:43:49.000Z | 2022-03-17T16:10:40.000Z | def documentation_attributes():
return [
"toc2",
"newline=\"\\n\"",
'asterisk="*"',
'plus="+"',
'caret="^"',
'startsb="["',
'endsb="]"',
'tilde="~"',
"last-update-label!",
"source-highlighter=prettify",
... | 25.606811 | 86 | 0.522911 |
7977d01ba719a6dad0ea214aae58ccb39d07406c | 353 | py | Python | peachy/__init__.py | shelsoloa/Peachy | 2300f617e26f09ab39e2c5fa1a10226a5b0426b9 | [
"MIT"
] | 2 | 2017-06-24T20:24:30.000Z | 2018-08-12T20:06:24.000Z | peachy/__init__.py | shelsoloa/Peachy | 2300f617e26f09ab39e2c5fa1a10226a5b0426b9 | [
"MIT"
] | null | null | null | peachy/__init__.py | shelsoloa/Peachy | 2300f617e26f09ab39e2c5fa1a10226a5b0426b9 | [
"MIT"
] | null | null | null | """Peachy Framework
peachy
Developing games with python is Peachy!
Peachy is extensively documented using Google Style Python Docstrings, follows
PEP8, and uses best practice patterns.
Copyright:
(c) 2016 by Sheldon Allen.
License:
MIT, see LICENSE for details.
"""
from peachy.base import Engine, Wor... | 18.578947 | 78 | 0.747875 |
7977d053aad91418df4682b9b65fdf5c2fccc1f6 | 4,183 | py | Python | conanfile.py | macat/conan-zmq | 214c088c9831450f3536534d1fded1f8f66cb2b0 | [
"MIT"
] | null | null | null | conanfile.py | macat/conan-zmq | 214c088c9831450f3536534d1fded1f8f66cb2b0 | [
"MIT"
] | null | null | null | conanfile.py | macat/conan-zmq | 214c088c9831450f3536534d1fded1f8f66cb2b0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
from conans import ConanFile, tools, CMake
class ZMQConan(ConanFile):
name = "zmq"
version = "4.3.1"
url = "https://github.com/bincrafters/conan-zmq"
homepage = "https://github.com/zeromq/libzmq"
description = "ZeroMQ is a community of projects focused on decentra... | 46.477778 | 110 | 0.611523 |
7977d06098a7a64317b3178785b5cd857544c21d | 10,012 | py | Python | contrib/spendfrom/spendfrom.py | mirzaei-ce/core-filbit | 415073034f471c38a60223af52b8da76c302ae1c | [
"MIT"
] | null | null | null | contrib/spendfrom/spendfrom.py | mirzaei-ce/core-filbit | 415073034f471c38a60223af52b8da76c302ae1c | [
"MIT"
] | null | null | null | contrib/spendfrom/spendfrom.py | mirzaei-ce/core-filbit | 415073034f471c38a60223af52b8da76c302ae1c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Use the raw transactions API to spend filbits received on particular addresses,
# and send any change back to that same address.
#
# Example usage:
# spendfrom.py # Lists available funds
# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
#
# Assumes it will talk to a filbitd or Filbi... | 37.358209 | 111 | 0.630743 |
7977d0f8165df727c4f863605c2799b3fec1f581 | 4,834 | py | Python | app/core/views.py | muhammad-mamdouh/real-estate-data-processor | f811659234440b8a8be383b3b8356afcd0fb0d53 | [
"MIT"
] | null | null | null | app/core/views.py | muhammad-mamdouh/real-estate-data-processor | f811659234440b8a8be383b3b8356afcd0fb0d53 | [
"MIT"
] | null | null | null | app/core/views.py | muhammad-mamdouh/real-estate-data-processor | f811659234440b8a8be383b3b8356afcd0fb0d53 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
from rest_framework import status, viewsets
from rest_framework.exceptions import ValidationError
from rest_framework.response import Response
from rest_framework.throttling import AnonRateThrottle, UserRateThrottle
from rest_framework.vie... | 42.403509 | 116 | 0.704386 |
7977d12fc6926ba9c72832617f4935269c5fe352 | 6,766 | py | Python | fonts/sapphire9600npro128_8x16.py | ccccmagicboy/st7735_mpy | b15f1bde69fbe6e0eb4931c57e71c136d8e7f024 | [
"MIT"
] | 6 | 2020-07-11T16:59:19.000Z | 2021-07-16T19:32:49.000Z | ports/esp32/user_modules/st7735_mpy/fonts/sapphire9600npro128_8x16.py | d4niele/micropython | a1f7b37d392bf46b28045ce215ae899fda8d8c38 | [
"MIT"
] | 1 | 2020-04-14T03:14:45.000Z | 2020-04-14T03:14:45.000Z | fonts/sapphire9600npro128_8x16.py | ccccmagicboy/st7735_mpy | b15f1bde69fbe6e0eb4931c57e71c136d8e7f024 | [
"MIT"
] | null | null | null | """converted from ..\fonts\Sapphire9600NPRO128_8x16.bin """
WIDTH = 8
HEIGHT = 16
FIRST = 0x20
LAST = 0x7f
_FONT =\
b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'\
b'\x00\x00\x18\x3c\x3c\x3c\x3c\x18\x18\x00\x18\x18\x00\x00\x00\x00'\
b'\x00\x36\x36\x36\x36\x14\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00... | 64.438095 | 68 | 0.710021 |
7977d232b1facc4be5285321763c8832bb59b96f | 7,734 | py | Python | deepspeed/ops/adam/cpu_adam.py | ConnollyLeon/DeepSpeed | 2d84d1c185ef0345eaf43a7240d61b33eda43497 | [
"MIT"
] | 1 | 2021-03-17T05:06:08.000Z | 2021-03-17T05:06:08.000Z | deepspeed/ops/adam/cpu_adam.py | ConnollyLeon/DeepSpeed | 2d84d1c185ef0345eaf43a7240d61b33eda43497 | [
"MIT"
] | 1 | 2020-12-01T04:14:15.000Z | 2020-12-01T04:14:15.000Z | deepspeed/ops/adam/cpu_adam.py | ConnollyLeon/DeepSpeed | 2d84d1c185ef0345eaf43a7240d61b33eda43497 | [
"MIT"
] | null | null | null | '''
Copyright 2020 The Microsoft DeepSpeed Team
'''
import math
import torch
import time
from pathlib import Path
from ..op_builder import CPUAdamBuilder
class DeepSpeedCPUAdam(torch.optim.Optimizer):
optimizer_id = 0
def __init__(self,
model_params,
lr=1e-3... | 44.965116 | 114 | 0.489915 |
7977d421504981efbe384ae70cc84d0013a51c09 | 10,455 | py | Python | src/geocodio/client.py | bennylope/pygeocodio | 6d6bcd7759aeaafc55a1d28babad1096f891cec8 | [
"BSD-3-Clause"
] | 68 | 2015-01-21T11:08:54.000Z | 2022-01-04T23:35:33.000Z | src/geocodio/client.py | bennylope/pygeocodio | 6d6bcd7759aeaafc55a1d28babad1096f891cec8 | [
"BSD-3-Clause"
] | 35 | 2015-02-17T23:32:36.000Z | 2022-03-28T22:15:22.000Z | src/geocodio/client.py | bennylope/pygeocodio | 6d6bcd7759aeaafc55a1d28babad1096f891cec8 | [
"BSD-3-Clause"
] | 21 | 2015-03-23T19:40:33.000Z | 2022-03-28T20:59:11.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import logging
import re
import requests
from geocodio.data import Address, Location, LocationCollection, LocationCollectionDict
from geocodio import exceptions
logger = logging.getLogger(__name__)
DEFAULT_API_VERSION = "1.6"
def error_response(response)... | 34.734219 | 117 | 0.562697 |
7977d454e3d4b5e4f87d1af3f44b8a67bd598ae4 | 8,077 | py | Python | A_source_code/carbon/code/read_parameter.py | vanHoek-dgnm/CARBON-DISC | 3ecd5f4efba5e032d43679ee977064d6b25154a9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | A_source_code/carbon/code/read_parameter.py | vanHoek-dgnm/CARBON-DISC | 3ecd5f4efba5e032d43679ee977064d6b25154a9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | A_source_code/carbon/code/read_parameter.py | vanHoek-dgnm/CARBON-DISC | 3ecd5f4efba5e032d43679ee977064d6b25154a9 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | # ******************************************************
## Copyright 2019, PBL Netherlands Environmental Assessment Agency and Utrecht University.
## Reuse permitted under Gnu Public License, GPL v3.
# ******************************************************
# Import Python modules
import os
# Import own general modul... | 39.019324 | 121 | 0.510833 |
7977d528b1baf99994a6b1486dda9a1eb64e81db | 593 | py | Python | Exercicios/Todos/ex009.py | Edson921/exerciciosResolvidos | 72a3089f4848650c62ac0dd876abf5695a64525a | [
"MIT"
] | null | null | null | Exercicios/Todos/ex009.py | Edson921/exerciciosResolvidos | 72a3089f4848650c62ac0dd876abf5695a64525a | [
"MIT"
] | null | null | null | Exercicios/Todos/ex009.py | Edson921/exerciciosResolvidos | 72a3089f4848650c62ac0dd876abf5695a64525a | [
"MIT"
] | null | null | null | num = int(input('Digite o numero para exibir a sua tabuada: '))
print('-'*12)
print('{} x {:2} = {} '. format(num, 1, num * 1))
print('{} x {:2} = {} '. format(num, 2, num * 2))
print('{} x {:2} = {} '. format(num, 3, num * 3))
print('{} x {:2} = {} '. format(num, 4, num * 4))
print('{} x {:2} = {} '. format(num, 5, nu... | 45.615385 | 63 | 0.456998 |
7977d79a1c4704a94fad723a59dd7bca6189e535 | 307 | py | Python | account/urls.py | WorldStat/WorldStats | db1c9ff2b4b9c725f18363bbde2263e7b25a5e4e | [
"MIT"
] | null | null | null | account/urls.py | WorldStat/WorldStats | db1c9ff2b4b9c725f18363bbde2263e7b25a5e4e | [
"MIT"
] | null | null | null | account/urls.py | WorldStat/WorldStats | db1c9ff2b4b9c725f18363bbde2263e7b25a5e4e | [
"MIT"
] | null | null | null | from django.urls import path
from .views import entry, exit, profile, reg, ajax_reg
urlpatterns = [
path('entry', entry, name='entry'),
path('exit', exit, name='exit'),
path('profile', profile, name='profile'),
path('reg', reg, name='reg'),
path('ajax_reg', ajax_reg, name='ajax_reg')
] | 30.7 | 54 | 0.644951 |
7977d7bc52b87feb25ccd44fa6381736088f2e1d | 1,158 | py | Python | darc/proxy/script.py | JarryShaw/darc | 0fc8782bb2f641ca3734c94666cbc36e3d9cb09f | [
"BSD-3-Clause"
] | 24 | 2020-07-08T06:16:52.000Z | 2022-02-19T00:33:34.000Z | darc/proxy/script.py | JarryShaw/darc | 0fc8782bb2f641ca3734c94666cbc36e3d9cb09f | [
"BSD-3-Clause"
] | 42 | 2020-05-29T12:56:10.000Z | 2022-03-07T17:12:08.000Z | darc/proxy/script.py | JarryShaw/darc | 0fc8782bb2f641ca3734c94666cbc36e3d9cb09f | [
"BSD-3-Clause"
] | 7 | 2020-07-11T18:57:24.000Z | 2022-02-01T21:46:30.000Z | # -*- coding: utf-8 -*-
"""JavaScript Links
======================
The :mod:`darc.proxy.script` module contains the auxiliary functions
around managing and processing the JavaScript links.
Currently, the :mod:`darc` project directly save the JavaScript links
extracted to the data storage path :data:`~darc.proxy.scrip... | 26.930233 | 132 | 0.66494 |
7977d7e8b20c6f7f8019cf38766808d39a303954 | 4,460 | py | Python | server/www/packages/packages-windows/x86/ldap3/strategy/asyncStream.py | zhoulhb/teleport | 54da194697898ef77537cfe7032d774555dc1335 | [
"Apache-2.0"
] | 640 | 2018-09-12T03:14:13.000Z | 2022-03-30T04:38:09.000Z | server/www/packages/packages-windows/x86/ldap3/strategy/asyncStream.py | zhoulhb/teleport | 54da194697898ef77537cfe7032d774555dc1335 | [
"Apache-2.0"
] | 175 | 2018-09-10T19:52:20.000Z | 2022-03-30T04:37:30.000Z | server/www/packages/packages-windows/x86/ldap3/strategy/asyncStream.py | zhoulhb/teleport | 54da194697898ef77537cfe7032d774555dc1335 | [
"Apache-2.0"
] | 230 | 2018-09-13T02:40:49.000Z | 2022-03-29T11:53:58.000Z | """
"""
# Created on 2016.07.10
#
# Author: Giovanni Cannata
#
# Copyright 2016 - 2018 Giovanni Cannata
#
# This file is part of ldap3.
#
# ldap3 is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Founda... | 38.119658 | 119 | 0.633184 |
7977d80c8a4fabd0f225f38b17c256e9d4f8e14b | 17 | py | Python | tests/CompileTests/Python_tests/test2011_016.py | maurizioabba/rose | 7597292cf14da292bdb9a4ef573001b6c5b9b6c0 | [
"BSD-3-Clause"
] | 488 | 2015-01-09T08:54:48.000Z | 2022-03-30T07:15:46.000Z | tests/CompileTests/Python_tests/test2011_016.py | sujankh/rose-matlab | 7435d4fa1941826c784ba97296c0ec55fa7d7c7e | [
"BSD-3-Clause"
] | 174 | 2015-01-28T18:41:32.000Z | 2022-03-31T16:51:05.000Z | tests/CompileTests/Python_tests/test2011_016.py | sujankh/rose-matlab | 7435d4fa1941826c784ba97296c0ec55fa7d7c7e | [
"BSD-3-Clause"
] | 146 | 2015-04-27T02:48:34.000Z | 2022-03-04T07:32:53.000Z | while 0:
"123"
| 5.666667 | 8 | 0.529412 |
7977d8bf97859c4ce1240c5dc7eafb2c88df1981 | 1,332 | py | Python | source/sphinx_extensions/qiime1.py | antgonza/docs | ac2a829e8a1754bf5b5c0c3a2aee795ed8452dfa | [
"BSD-3-Clause"
] | 1 | 2017-09-05T20:21:23.000Z | 2017-09-05T20:21:23.000Z | source/sphinx_extensions/qiime1.py | BenKaehler/docs | a4382a478b7ca5e0cd5b7dc86e69a1393bcdaba7 | [
"BSD-3-Clause"
] | 1 | 2019-07-15T20:56:12.000Z | 2019-07-15T20:56:12.000Z | source/sphinx_extensions/qiime1.py | antgonza/docs | ac2a829e8a1754bf5b5c0c3a2aee795ed8452dfa | [
"BSD-3-Clause"
] | null | null | null | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2019, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | 33.3 | 78 | 0.595345 |
7977d9c9a63fd351343ae73d1c68382f6d68f955 | 16,835 | py | Python | sdk/lusid/api/relationships_api.py | mneedham/lusid-sdk-python-preview | f4494009d1a2f3431d931c813cab679bdbd92c84 | [
"MIT"
] | null | null | null | sdk/lusid/api/relationships_api.py | mneedham/lusid-sdk-python-preview | f4494009d1a2f3431d931c813cab679bdbd92c84 | [
"MIT"
] | null | null | null | sdk/lusid/api/relationships_api.py | mneedham/lusid-sdk-python-preview | f4494009d1a2f3431d931c813cab679bdbd92c84 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
LUSID API
FINBOURNE Technology # noqa: E501
The version of the OpenAPI document: 0.11.3192
Contact: info@finbourne.com
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import re # noqa: F401
# python 2 and python 3 compatibility lib... | 52.774295 | 170 | 0.641461 |
7977da45742420bfa0996f2473e4e4aea6ca2b9f | 3,880 | py | Python | deprecated/examples/distribute_ctr/infer.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 170 | 2020-08-12T12:07:01.000Z | 2022-03-07T02:38:26.000Z | deprecated/examples/distribute_ctr/infer.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 195 | 2020-08-13T03:22:15.000Z | 2022-03-30T07:40:25.000Z | deprecated/examples/distribute_ctr/infer.py | hutuxian/FleetX | 843c7aa33f5a14680becf058a3aaf0327eefafd4 | [
"Apache-2.0"
] | 67 | 2020-08-14T02:07:46.000Z | 2022-03-28T10:05:33.000Z | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | 36.952381 | 77 | 0.614948 |
7977db55d0fcdfebb2330f9085be07fb21e0f8a0 | 342 | py | Python | Python_for_Everybody-Coursera/CHAPTER_6/Lecture/exx.py | andresdelarosa1887/Public-Projects | db8d8e0c0f5f0f7326346462fcdfe21ce8142a12 | [
"Unlicense"
] | 1 | 2020-09-29T17:29:34.000Z | 2020-09-29T17:29:34.000Z | Python_for_Everybody-Coursera/CHAPTER_6/Lecture/exx.py | andresdelarosa1887/Public-Projects | db8d8e0c0f5f0f7326346462fcdfe21ce8142a12 | [
"Unlicense"
] | null | null | null | Python_for_Everybody-Coursera/CHAPTER_6/Lecture/exx.py | andresdelarosa1887/Public-Projects | db8d8e0c0f5f0f7326346462fcdfe21ce8142a12 | [
"Unlicense"
] | null | null | null | #Parsing and Extracting
data= "From Stephen.marquard@uct.ac.za Sat Jan 5 09:14:16 2008"
atpos= data.find("@")
print(atpos)
atss= data.find(" ",atpos) #here it starts at 21 and then goes and find the next space
print(atss)
host= data[atpos+1: atss] #Now we are extracting the part that we are interested in
print(host)
#... | 31.090909 | 86 | 0.736842 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.