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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
4a1302788bd59603944e6bbc625a12406a2c44fa | 8,016 | py | Python | frappe/desk/notifications.py | kwiesmueller/frappe | 6a748661c2140b15fd43437477f2ea6eef6b5de0 | [
"MIT"
] | null | null | null | frappe/desk/notifications.py | kwiesmueller/frappe | 6a748661c2140b15fd43437477f2ea6eef6b5de0 | [
"MIT"
] | 5 | 2020-12-04T21:08:07.000Z | 2022-03-12T00:39:56.000Z | frappe/desk/notifications.py | kwiesmueller/frappe | 6a748661c2140b15fd43437477f2ea6eef6b5de0 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.desk.doctype.notification_settings.notification_settings import get_subscribed_documents
from six import string_types
import json
@frappe.whitelist()
@... | 28.628571 | 111 | 0.718189 |
4a1302f1784f954bb5d17dfb86beac11d1580002 | 4,879 | py | Python | src/super_image/models/ddbpn/modeling_ddbpn.py | eugenesiow/super-image | 44099ee61cbed0d6f54e563ce55bc36cd2565868 | [
"Apache-2.0"
] | 17 | 2021-07-29T07:22:53.000Z | 2022-03-30T16:23:38.000Z | src/super_image/models/ddbpn/modeling_ddbpn.py | eugenesiow/super-image | 44099ee61cbed0d6f54e563ce55bc36cd2565868 | [
"Apache-2.0"
] | 1 | 2021-10-17T10:10:01.000Z | 2021-10-17T19:47:13.000Z | src/super_image/models/ddbpn/modeling_ddbpn.py | eugenesiow/super-image | 44099ee61cbed0d6f54e563ce55bc36cd2565868 | [
"Apache-2.0"
] | 5 | 2021-09-14T13:25:08.000Z | 2022-03-30T16:23:33.000Z | import torch
import torch.nn as nn
import torch.nn.functional as F
from .configuration_ddbpn import DdbpnConfig
from ...modeling_utils import (
MeanShift,
PreTrainedModel
)
def projection_conv(in_channels, out_channels, scale, up=True):
kernel_size, stride, padding = {
2: (6, 2, 2),
4: (8... | 30.304348 | 95 | 0.520189 |
4a130338a9cd03867e78cfb8f33ac3d030229248 | 3,163 | py | Python | ptah/form/vocabulary.py | timgates42/ptah | 47594cef8e80397a545bdc9e166eafcac94c72d6 | [
"BSD-3-Clause"
] | 13 | 2015-03-18T16:06:50.000Z | 2021-04-27T19:14:35.000Z | ptah/form/vocabulary.py | timgates42/ptah | 47594cef8e80397a545bdc9e166eafcac94c72d6 | [
"BSD-3-Clause"
] | null | null | null | ptah/form/vocabulary.py | timgates42/ptah | 47594cef8e80397a545bdc9e166eafcac94c72d6 | [
"BSD-3-Clause"
] | 6 | 2015-01-07T11:17:32.000Z | 2020-04-02T11:35:03.000Z | from zope.interface import implementer
from pyramid.compat import string_types
from ptah.form.interfaces import ITerm, IVocabulary
@implementer(ITerm)
class Term(object):
"""Simple tokenized term used by Vocabulary."""
def __init__(self, value, token=None,
title=None, description=None, **kw)... | 29.560748 | 76 | 0.574455 |
4a1304035c6b088c7bcfd2736382df23b87b9664 | 4,738 | py | Python | EP1/Gabriel Frederico Takahashi Vargas EP1.py | GabrielTaka/Fatec-EP-PYTHON-language-Masanori | c4d30b4dd375e495c99b770dcc5e28fc5be49f04 | [
"MIT"
] | 1 | 2018-01-14T21:56:07.000Z | 2018-01-14T21:56:07.000Z | EP1/Gabriel Frederico Takahashi Vargas EP1.py | GabrielTaka/Fatec-EP-PYTHON-language-Masanori | c4d30b4dd375e495c99b770dcc5e28fc5be49f04 | [
"MIT"
] | null | null | null | EP1/Gabriel Frederico Takahashi Vargas EP1.py | GabrielTaka/Fatec-EP-PYTHON-language-Masanori | c4d30b4dd375e495c99b770dcc5e28fc5be49f04 | [
"MIT"
] | null | null | null | txtB = '''clnr bcdktps fvxsmsbx kqj hvbncjw wsmngb xhcvvc nfkjfn fkvl ljhqlbhs ptqtwp
vtfbq szkpmn hxl hsd qmrr jzjbjgp tsssrk fmvx bstbzwsx njdm nrvfgs bdjzlg nwnlmbx
vjqqxsp vbxj gwtll xfrmgqqj mmttm xlbnkbw bkw frgwz twrkx nfgxqmb cvr tgmw nfw mghts
bsncq zfn vpkgwcd cdbdwsjf krrkl fst lmz vvwtkrf dqt fkm pfnpqh ... | 59.225 | 88 | 0.795905 |
4a1304d71a3b9251fe528ae448edd98c8f69d082 | 16,544 | py | Python | GUI.py | gamesun/MyTerm-for-WangH | e3a1cc3f58ef1b17916e32debff6eb7d917cdbb1 | [
"BSD-3-Clause"
] | 1 | 2020-08-26T07:47:22.000Z | 2020-08-26T07:47:22.000Z | GUI.py | gamesun/MyTerm-for-WangH | e3a1cc3f58ef1b17916e32debff6eb7d917cdbb1 | [
"BSD-3-Clause"
] | null | null | null | GUI.py | gamesun/MyTerm-for-WangH | e3a1cc3f58ef1b17916e32debff6eb7d917cdbb1 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# generated by wxGlade 0.6.8 (standalone edition) on Tue Jan 14 10:41:03 2014
#
import wx
import wx.grid
# begin wxGlade: dependencies
# end wxGlade
# begin wxGlade: extracode
# end wxGlade
class MyFrame(wx.Frame):
def __init__(self, *args, **kwd... | 54.242623 | 331 | 0.628868 |
4a1305219999dbe88334173058cadeed2b094098 | 364 | py | Python | AdvancedPythonModules/collections_module_defaultdict.py | theprogrammingthinker/Python-practice | fef11a7fbd5082a0614b01f88a13ea29d68860bf | [
"Unlicense"
] | 1 | 2017-05-02T10:28:36.000Z | 2017-05-02T10:28:36.000Z | AdvancedPythonModules/collections_module_defaultdict.py | theprogrammingthinker/Python-practice | fef11a7fbd5082a0614b01f88a13ea29d68860bf | [
"Unlicense"
] | null | null | null | AdvancedPythonModules/collections_module_defaultdict.py | theprogrammingthinker/Python-practice | fef11a7fbd5082a0614b01f88a13ea29d68860bf | [
"Unlicense"
] | null | null | null | from collections import defaultdict
d = {"k1": 1}
print(d["k1"])
# d['k2']
# KeyError: 'one'
d = defaultdict(object)
print(d['one'])
# <object object at 0x00000174A073A0A0>
for item in d:
print(item)
# one
d = defaultdict(lambda : 0)
print(d['one'])
print(d['two'])
print(d)
# defaultdict(<function <lambda> a... | 15.826087 | 78 | 0.645604 |
4a1305a44cb22b0ff8c9aea59c06d7be304e0dfb | 445 | py | Python | server/model/user.py | dyf102/Gomoku-online | 889df373c9a9827a867d1d4559ec105f4358d4c6 | [
"Apache-2.0"
] | null | null | null | server/model/user.py | dyf102/Gomoku-online | 889df373c9a9827a867d1d4559ec105f4358d4c6 | [
"Apache-2.0"
] | null | null | null | server/model/user.py | dyf102/Gomoku-online | 889df373c9a9827a867d1d4559ec105f4358d4c6 | [
"Apache-2.0"
] | null | null | null |
IDLE = 0
OFFLINE = 1
INGAME = 2
class User(object):
def __init__(self, username, uid, point=0, status=IDLE):
self.username = username
self.uid = uid
self.point = point
self.status = status
def ___str__(self):
return '{} {} {} {}'.format(self.username, self.uid, self.... | 21.190476 | 86 | 0.606742 |
4a13065831fab61cb838c9567bd8066d374617a2 | 1,877 | py | Python | software/python/simple_pendulum/controllers/energy_shaping/unit_test.py | alopezrivera/torque_limited_simple_pendulum | 2164a41d65c16743ba260a79a04a04cdd72c3903 | [
"BSD-3-Clause"
] | 15 | 2021-10-16T04:50:34.000Z | 2022-03-26T23:54:19.000Z | software/python/simple_pendulum/controllers/energy_shaping/unit_test.py | alopezrivera/torque_limited_simple_pendulum | 2164a41d65c16743ba260a79a04a04cdd72c3903 | [
"BSD-3-Clause"
] | 17 | 2021-11-30T22:17:28.000Z | 2022-03-21T12:28:45.000Z | software/python/simple_pendulum/controllers/energy_shaping/unit_test.py | alopezrivera/torque_limited_simple_pendulum | 2164a41d65c16743ba260a79a04a04cdd72c3903 | [
"BSD-3-Clause"
] | 13 | 2021-10-18T07:45:29.000Z | 2022-03-22T12:56:33.000Z | """
Unit Tests
==========
"""
import unittest
import numpy as np
from simple_pendulum.model.pendulum_plant import PendulumPlant
from simple_pendulum.simulation.simulation import Simulator
from simple_pendulum.controllers.energy_shaping.energy_shaping_controller import EnergyShapingController
class Test(unittest.Te... | 29.793651 | 104 | 0.523175 |
4a130676d09f041d7eb8e340dc1559192942c0c9 | 1,286 | py | Python | src/python/pants/util/retry.py | revl/pants | 8ad83e4ca80c095d44efceafd8b41e575da39c65 | [
"Apache-2.0"
] | 1 | 2020-06-13T22:01:39.000Z | 2020-06-13T22:01:39.000Z | src/python/pants/util/retry.py | revl/pants | 8ad83e4ca80c095d44efceafd8b41e575da39c65 | [
"Apache-2.0"
] | null | null | null | src/python/pants/util/retry.py | revl/pants | 8ad83e4ca80c095d44efceafd8b41e575da39c65 | [
"Apache-2.0"
] | 3 | 2020-06-30T08:28:13.000Z | 2021-07-28T09:35:57.000Z | # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import logging
import time
logger = logging.getLogger(__name__)
def retry_on_exception(func, max_retries, exception_types, backoff_func=lambda n: 0):
"""Retry a callable against a s... | 42.866667 | 98 | 0.642302 |
4a1306d8e9ba9d6249e579516852f99bb8faa673 | 2,474 | py | Python | examples/system/light_sleep/example_test.py | BU-EC444/esp-idf | 5963de1caf284b14ddfed11e52730a55e3783a3d | [
"Apache-2.0"
] | 4 | 2022-03-15T22:43:28.000Z | 2022-03-28T01:25:08.000Z | examples/system/light_sleep/example_test.py | BU-EC444/esp-idf | 5963de1caf284b14ddfed11e52730a55e3783a3d | [
"Apache-2.0"
] | null | null | null | examples/system/light_sleep/example_test.py | BU-EC444/esp-idf | 5963de1caf284b14ddfed11e52730a55e3783a3d | [
"Apache-2.0"
] | 1 | 2022-03-28T03:15:38.000Z | 2022-03-28T03:15:38.000Z | from __future__ import print_function
import re
import time
import ttfw_idf
ENTERING_SLEEP_STR = 'Entering light sleep'
EXIT_SLEEP_REGEX = re.compile(r'Returned from light sleep, reason: (\w+), t=(\d+) ms, slept for (\d+) ms')
WAITING_FOR_GPIO_STR = re.compile(r'Waiting for GPIO\d to go high...')
WAKEUP_INTERVAL_MS... | 36.382353 | 122 | 0.700889 |
4a13080ba9fb7e4b45111e0f195dbce3a4cfb728 | 20,124 | py | Python | content/test/gpu/gpu_tests/gpu_integration_test_unittest.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 14,668 | 2015-01-01T01:57:10.000Z | 2022-03-31T23:33:32.000Z | content/test/gpu/gpu_tests/gpu_integration_test_unittest.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 86 | 2015-10-21T13:02:42.000Z | 2022-03-14T07:50:50.000Z | content/test/gpu/gpu_tests/gpu_integration_test_unittest.py | zealoussnow/chromium | fd8a8914ca0183f0add65ae55f04e287543c7d4a | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 5,941 | 2015-01-02T11:32:21.000Z | 2022-03-31T16:35:46.000Z | # Copyright 2016 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.
# It's reasonable for unittests to be messing with protected members.
# pylint: disable=protected-access
from __future__ import print_function
import json
... | 37.898305 | 80 | 0.701302 |
4a13087d393ed421a90d0e1a57d491a43b69c806 | 840 | py | Python | jam_sesh/spotify/migrations/0003_vote.py | jaybrt/JamSesh | 3a44e45ebd01acc90388a8d69eb48f1a91940507 | [
"MIT"
] | null | null | null | jam_sesh/spotify/migrations/0003_vote.py | jaybrt/JamSesh | 3a44e45ebd01acc90388a8d69eb48f1a91940507 | [
"MIT"
] | null | null | null | jam_sesh/spotify/migrations/0003_vote.py | jaybrt/JamSesh | 3a44e45ebd01acc90388a8d69eb48f1a91940507 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-03-20 07:23
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('api', '0003_room_current_song'),
('spotify', '0002_auto_20210312_0133'),
]
operations = [
migration... | 32.307692 | 114 | 0.6 |
4a1308ce823e3010a4c22c7d801b835db386e18f | 641 | py | Python | mct_zoom_tool/src/mct_zoom_tool/zoom_tool_master.py | iorodeo/mct | fa8b85f36533c9b1486ca4f6b0c40c3daa6f4e11 | [
"Apache-2.0"
] | null | null | null | mct_zoom_tool/src/mct_zoom_tool/zoom_tool_master.py | iorodeo/mct | fa8b85f36533c9b1486ca4f6b0c40c3daa6f4e11 | [
"Apache-2.0"
] | null | null | null | mct_zoom_tool/src/mct_zoom_tool/zoom_tool_master.py | iorodeo/mct | fa8b85f36533c9b1486ca4f6b0c40c3daa6f4e11 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import roslib
roslib.load_manifest('mct_zoom_tool')
import rospy
from mct_msg_and_srv.srv import CommandString
def zoom_tool_master_srv(cmd):
proxy = rospy.ServiceProxy('/zoom_tool_master', CommandString)
resp = proxy(cmd)
return resp.flag, resp.message
def start():... | 21.366667 | 79 | 0.605304 |
4a1309920b76ca164ee9888602910effdb8f9719 | 964 | py | Python | backend/app/consumers.py | schajee/boilerplate | 30b30519d837b8c1dac4c480eff1e5635c285951 | [
"MIT"
] | 4 | 2021-11-30T11:08:08.000Z | 2022-01-14T12:51:39.000Z | backend/app/consumers.py | schajee/boilerplate | 30b30519d837b8c1dac4c480eff1e5635c285951 | [
"MIT"
] | null | null | null | backend/app/consumers.py | schajee/boilerplate | 30b30519d837b8c1dac4c480eff1e5635c285951 | [
"MIT"
] | null | null | null | # rest/consumers.py
from channels.generic.websocket import AsyncWebsocketConsumer
import json
class NotifyConsumer(AsyncWebsocketConsumer):
async def connect(self):
self.room_name = self.scope['url_route']['kwargs']['username']
self.room_group_name = 'notify_%s' % self.room_name
# Join roo... | 29.212121 | 70 | 0.651452 |
4a130a12e4e24c82aa0f5bdaf8c7077196e45a6b | 2,731 | py | Python | profile_collection/startup/csx1/startup/settings.py | NSLS-II-CSX/xf23id1_profiles | 88b24b0bae222f4d69c278c5e3da8a9560c846d0 | [
"BSD-3-Clause"
] | null | null | null | profile_collection/startup/csx1/startup/settings.py | NSLS-II-CSX/xf23id1_profiles | 88b24b0bae222f4d69c278c5e3da8a9560c846d0 | [
"BSD-3-Clause"
] | 57 | 2016-03-05T16:37:55.000Z | 2022-02-16T18:43:33.000Z | profile_collection/startup/csx1/startup/settings.py | NSLS-II-CSX/xf23id1_profiles | 88b24b0bae222f4d69c278c5e3da8a9560c846d0 | [
"BSD-3-Clause"
] | 4 | 2016-03-06T19:40:18.000Z | 2019-01-24T22:49:30.000Z | from bluesky.magics import BlueskyMagics
from .startup import sd
from .detectors import *
from .endstation import *
from .accelerator import *
from .optics import *
from .tardis import *
#
# Setup of sup. data for plans
#
sd.monitors = []
sd.flyers = []
sd.baseline = [theta, delta, gamma, muR,
sx, say,... | 23.747826 | 114 | 0.599048 |
4a130a13c94dddec86b54f6f146e9e48056f8169 | 131 | py | Python | distributions/__init__.py | iris-theof/distributions | 4d7189c599b491dab313804dea6338bad06b478d | [
"CNRI-Python",
"Xnet",
"X11"
] | 2 | 2021-01-19T19:00:14.000Z | 2021-01-21T10:24:32.000Z | distributions/__init__.py | iris-theof/distributions_package | 4d7189c599b491dab313804dea6338bad06b478d | [
"CNRI-Python",
"Xnet",
"X11"
] | null | null | null | distributions/__init__.py | iris-theof/distributions_package | 4d7189c599b491dab313804dea6338bad06b478d | [
"CNRI-Python",
"Xnet",
"X11"
] | null | null | null | from .Gaussiandistribution import Gaussian
from .Binomialdistribution import Binomial
from .Bernoullidistribution import Bernoulli
| 32.75 | 44 | 0.885496 |
4a130a81ba3d3fb695a634a4f065f212d9f7de38 | 1,611 | py | Python | nailgun/nailgun/api/v1/handlers/plugin.py | Zipfer/fuel-web | c6c4032eb6e29474e2be0318349265bdb566454c | [
"Apache-2.0"
] | null | null | null | nailgun/nailgun/api/v1/handlers/plugin.py | Zipfer/fuel-web | c6c4032eb6e29474e2be0318349265bdb566454c | [
"Apache-2.0"
] | null | null | null | nailgun/nailgun/api/v1/handlers/plugin.py | Zipfer/fuel-web | c6c4032eb6e29474e2be0318349265bdb566454c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2014 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | 34.276596 | 78 | 0.696462 |
4a130ac762c07f687c837f149e8b3b27cd0e56ec | 13,187 | py | Python | tests/gcp/operators/test_dataflow.py | rolanddb/incubator-airflow | e090744787458b50d7eb35bd3c66f15fba7322c2 | [
"Apache-2.0"
] | 2 | 2020-10-12T05:21:27.000Z | 2021-07-07T09:23:47.000Z | tests/gcp/operators/test_dataflow.py | sb2nov/airflow | e405be0141a996c5bb3659e3f19cab0e1ac8dc8d | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | 3 | 2021-03-11T06:46:16.000Z | 2021-09-29T17:48:20.000Z | tests/gcp/operators/test_dataflow.py | sb2nov/airflow | e405be0141a996c5bb3659e3f19cab0e1ac8dc8d | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"ECL-2.0",
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | 41.468553 | 89 | 0.691059 |
4a130aeea945ca532e4bb34bc3c4867af151c42d | 3,832 | py | Python | .history/First_Wish/settings_20210906110055.py | Sahil1515/First-Wish-Website | de973f2a5c682b142c6faba4b127e4d83291dac5 | [
"MIT"
] | null | null | null | .history/First_Wish/settings_20210906110055.py | Sahil1515/First-Wish-Website | de973f2a5c682b142c6faba4b127e4d83291dac5 | [
"MIT"
] | null | null | null | .history/First_Wish/settings_20210906110055.py | Sahil1515/First-Wish-Website | de973f2a5c682b142c6faba4b127e4d83291dac5 | [
"MIT"
] | null | null | null | """
Django settings for First_Wish project.
Generated by 'django-admin startproject' using Django 3.2.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.2/ref/settings/
"""
from pathli... | 24.253165 | 91 | 0.709029 |
4a130c49121da4b40b17cfd9e14a076b6686dcae | 1,989 | py | Python | ExamplePCB.py | lrh2999/PCBpy | 95e4d373a24238ed56989a67ac78e991878facc9 | [
"MIT"
] | 1 | 2020-05-24T06:17:57.000Z | 2020-05-24T06:17:57.000Z | ExamplePCB.py | lrh2999/PCBpy | 95e4d373a24238ed56989a67ac78e991878facc9 | [
"MIT"
] | null | null | null | ExamplePCB.py | lrh2999/PCBpy | 95e4d373a24238ed56989a67ac78e991878facc9 | [
"MIT"
] | null | null | null | from PCBpy import *
schem_data = {
'cad_filename': 'pstxref.dat',
'loop_a_net': ('XCVU160', 'XCKU095', 'CON38P'),
'loop_b_pin': ('AFBR')
}
part_specific_data = [
{
'xlx_filename': 'xcvu9pflgc2104pkg.csv',
'cad_part_num': 'XCVU160-H1FLGC2104',
'cad_instance': 'IC4',
'gt... | 26.52 | 68 | 0.557064 |
4a130cc69dd231c938d774cab9de4435737f5a62 | 10,485 | py | Python | src/cmds/farm_funcs.py | Flofie/chia-blockchain | d3013f1a392fc1761d975581a7b1d0770f92cb14 | [
"Apache-2.0"
] | null | null | null | src/cmds/farm_funcs.py | Flofie/chia-blockchain | d3013f1a392fc1761d975581a7b1d0770f92cb14 | [
"Apache-2.0"
] | null | null | null | src/cmds/farm_funcs.py | Flofie/chia-blockchain | d3013f1a392fc1761d975581a7b1d0770f92cb14 | [
"Apache-2.0"
] | null | null | null | import math
from typing import Any, Dict, List, Optional
import aiohttp
from src.cmds.units import units
from src.consensus.block_record import BlockRecord
from src.rpc.farmer_rpc_client import FarmerRpcClient
from src.rpc.full_node_rpc_client import FullNodeRpcClient
from src.rpc.harvester_rpc_client import Harveste... | 40.326923 | 119 | 0.673247 |
4a130cd320bce08ab8920a47c9a505340e2806ef | 3,810 | py | Python | smallbusiness/hooks.py | ashish-greycube/smallbusiness | 4aeb7e31f599c5ee1b0077cfae56ee207c748f28 | [
"MIT"
] | null | null | null | smallbusiness/hooks.py | ashish-greycube/smallbusiness | 4aeb7e31f599c5ee1b0077cfae56ee207c748f28 | [
"MIT"
] | null | null | null | smallbusiness/hooks.py | ashish-greycube/smallbusiness | 4aeb7e31f599c5ee1b0077cfae56ee207c748f28 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from . import __version__ as app_version
app_name = "smallbusiness"
app_title = "Small Business App"
app_publisher = "GreyCube Technologies"
app_description = "It is scale down version of erpnext for small business"
app_icon = "octicon octicon-squirrel"
a... | 25.918367 | 81 | 0.676378 |
4a130dcf1ee0ccd414b6a27b466229aed524039b | 8,022 | py | Python | archivedtst/archive/test_scripts/test_functions 5.py | judejeh/rom-comma | 2cace7c4d9d72a35237bc7ddc0f54aec3b9b1d63 | [
"BSD-3-Clause"
] | 1 | 2021-06-08T16:01:09.000Z | 2021-06-08T16:01:09.000Z | archivedtst/archive/test_scripts/test_functions 5.py | judejeh/rom-comma | 2cace7c4d9d72a35237bc7ddc0f54aec3b9b1d63 | [
"BSD-3-Clause"
] | null | null | null | archivedtst/archive/test_scripts/test_functions 5.py | judejeh/rom-comma | 2cace7c4d9d72a35237bc7ddc0f54aec3b9b1d63 | [
"BSD-3-Clause"
] | 2 | 2021-07-05T11:58:05.000Z | 2021-11-06T17:35:11.000Z | # BSD 3-Clause License
#
# Copyright (c) 2019, Robert A. Milton
# 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
# ... | 52.431373 | 144 | 0.693468 |
4a130ef5f091fb8831942e6268a511a46103389d | 159 | py | Python | setup.py | SumnerLab/CASA-Dialogue-Act-Classifier | 6b7dacd250b7231878902e8ccc48fb7390212935 | [
"MIT"
] | 1 | 2021-01-04T21:38:24.000Z | 2021-01-04T21:38:24.000Z | setup.py | SumnerLab/CASA-Dialogue-Act-Classifier | 6b7dacd250b7231878902e8ccc48fb7390212935 | [
"MIT"
] | null | null | null | setup.py | SumnerLab/CASA-Dialogue-Act-Classifier | 6b7dacd250b7231878902e8ccc48fb7390212935 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(name='context_aware_dialogue_act_classifier',
version='0.1',
packages = find_packages(),
)
| 26.5 | 51 | 0.716981 |
4a130f4de9864a677f237b756bf704feb0800d64 | 6,875 | py | Python | src/C2_clean_census.py | CityOfLosAngeles/planning-entitlements | cf83b57063b4e55722cc640172b529611b263b3a | [
"Apache-2.0"
] | null | null | null | src/C2_clean_census.py | CityOfLosAngeles/planning-entitlements | cf83b57063b4e55722cc640172b529611b263b3a | [
"Apache-2.0"
] | 55 | 2020-01-08T17:50:17.000Z | 2021-01-13T21:45:31.000Z | src/C2_clean_census.py | CityOfLosAngeles/planning-entitlements | cf83b57063b4e55722cc640172b529611b263b3a | [
"Apache-2.0"
] | 2 | 2020-07-16T02:10:30.000Z | 2021-01-25T21:14:49.000Z | # Clean Census data
import numpy as np
import pandas as pd
import re
from datetime import datetime
from tqdm import tqdm
tqdm.pandas()
bucket_name = 'city-planning-entitlements'
"""
# Compile individual census tables into 1 parquet file
full_df = pd.DataFrame()
for name in ['commute', 'income', 'in... | 30.021834 | 100 | 0.554909 |
4a13106cf6b02b3e038ed72eaa86b4936ae46eae | 389 | py | Python | safe_explorer/utils/path.py | FelippeRoza/safe-explorer | de0e0d2107578fac4d9fdc774f6d8094f9d15168 | [
"Apache-2.0"
] | 33 | 2020-05-25T01:19:08.000Z | 2022-03-29T02:38:51.000Z | safe_explorer/utils/path.py | FelippeRoza/safe-explorer | de0e0d2107578fac4d9fdc774f6d8094f9d15168 | [
"Apache-2.0"
] | 2 | 2020-12-22T09:01:34.000Z | 2021-04-14T08:02:23.000Z | safe_explorer/utils/path.py | FelippeRoza/safe-explorer | de0e0d2107578fac4d9fdc774f6d8094f9d15168 | [
"Apache-2.0"
] | 13 | 2019-10-19T07:59:40.000Z | 2022-03-17T03:07:52.000Z | import inspect
import os
def get_project_root_dir():
return f"{get_current_file_path()}/../../"
def get_current_file_path():
caller_file_path = os.path.abspath(inspect.getfile(inspect.currentframe().f_back))
return os.path.dirname(caller_file_path)
def get_files_in_path(path):
return [f for f in os.... | 27.785714 | 86 | 0.714653 |
4a13108decb5ade903a3ddd94e76c6478ebe7dc9 | 1,829 | py | Python | botctl/botctl.py | wizeline/botctl | 85f69f7fa463246661823c9686e6550d4b4ca03e | [
"MIT"
] | null | null | null | botctl/botctl.py | wizeline/botctl | 85f69f7fa463246661823c9686e6550d4b4ca03e | [
"MIT"
] | null | null | null | botctl/botctl.py | wizeline/botctl | 85f69f7fa463246661823c9686e6550d4b4ca03e | [
"MIT"
] | 1 | 2020-10-13T16:30:05.000Z | 2020-10-13T16:30:05.000Z | from botctl.common import command_callback, execute_subcommand, parse_variable
from botctl.types import PlatformEnvironment, BotControlCommand
class DelCommand(BotControlCommand):
"""Usage:
$ botctl del <variable>
"""
__commandname__ = 'botctl'
@command_callback
def __call__(self, variable_na... | 26.897059 | 78 | 0.681247 |
4a1310e9723e7509ebe088a0aafc893eeeefc3e8 | 2,519 | py | Python | games/game.py | carllacan/qlearning | a4fe2296fb6733c060ae20cf1a6bc3123078ebd7 | [
"MIT"
] | null | null | null | games/game.py | carllacan/qlearning | a4fe2296fb6733c060ae20cf1a6bc3123078ebd7 | [
"MIT"
] | null | null | null | games/game.py | carllacan/qlearning | a4fe2296fb6733c060ae20cf1a6bc3123078ebd7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Sep 1 10:18:38 2017
@author: carles
"""
import numpy as np
class Game:
def __init__(self, grid_height, grid_width, frames_used):
"""
To make printing easier the coordinates refer to
distance from the top border
... | 28.625 | 74 | 0.55657 |
4a1311ecffab88b51d19b2cfe16c33b5102a1597 | 4,868 | py | Python | pylib/cqlshlib/test/cassconnect.py | haaawk/scylla-tools-java | 283ce3a58a2b04e60a84ce6744eee55ce09b3801 | [
"Apache-2.0"
] | 7 | 2021-04-26T14:52:42.000Z | 2021-12-03T22:53:17.000Z | pylib/cqlshlib/test/cassconnect.py | haaawk/scylla-tools-java | 283ce3a58a2b04e60a84ce6744eee55ce09b3801 | [
"Apache-2.0"
] | null | null | null | pylib/cqlshlib/test/cassconnect.py | haaawk/scylla-tools-java | 283ce3a58a2b04e60a84ce6744eee55ce09b3801 | [
"Apache-2.0"
] | 1 | 2017-05-18T14:40:23.000Z | 2017-05-18T14:40:23.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... | 34.524823 | 94 | 0.724938 |
4a131246b9bc949fd302424fb09266faf9b1f980 | 28,787 | py | Python | python/ccxt/bleutrade.py | florije4ex/ccxt | 1dba6c5e45c5e93292f1951e0a2411647a82624a | [
"MIT"
] | null | null | null | python/ccxt/bleutrade.py | florije4ex/ccxt | 1dba6c5e45c5e93292f1951e0a2411647a82624a | [
"MIT"
] | null | null | null | python/ccxt/bleutrade.py | florije4ex/ccxt | 1dba6c5e45c5e93292f1951e0a2411647a82624a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN:
# https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code
from ccxt.base.exchange import Exchange
import hashlib
import math
from ccxt.base.errors import ExchangeError
from ccxt.base.errors import ... | 37.877632 | 128 | 0.495189 |
4a1312787db7c6e7866aa9a21a749ad08603bec3 | 2,314 | py | Python | eventsourcing/application/snapshotting.py | scbabacus/eventsourcing | 8404c5b26719ed9d9d1d257ebba774879c7243c4 | [
"BSD-3-Clause"
] | null | null | null | eventsourcing/application/snapshotting.py | scbabacus/eventsourcing | 8404c5b26719ed9d9d1d257ebba774879c7243c4 | [
"BSD-3-Clause"
] | null | null | null | eventsourcing/application/snapshotting.py | scbabacus/eventsourcing | 8404c5b26719ed9d9d1d257ebba774879c7243c4 | [
"BSD-3-Clause"
] | null | null | null | from eventsourcing.application.policies import SnapshottingPolicy
from eventsourcing.application.simple import SimpleApplication
from eventsourcing.infrastructure.eventstore import EventStore
from eventsourcing.infrastructure.snapshotting import EventSourcedSnapshotStrategy
class ApplicationWithSnapshotting(SimpleApp... | 42.072727 | 91 | 0.727312 |
4a1313f5208ed23bdd7cffd7d3d8741610efe017 | 311 | py | Python | Codewars/7kyu/string-scramble/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | 7 | 2017-09-20T16:40:39.000Z | 2021-08-31T18:15:08.000Z | Codewars/7kyu/string-scramble/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | Codewars/7kyu/string-scramble/Python/test.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | # Python - 3.6.0
test.describe('Example Tests')
test.assert_equals(scramble('abcd', [0, 3, 1, 2]), 'acdb', 'Should return acdb')
test.assert_equals(scramble('sc301s', [4, 0, 3, 1, 5, 2]), 'c0s3s1', 'Should return c0s3s1')
test.assert_equals(scramble('bskl5', [2, 1, 4, 3, 0]), '5sblk', 'Should return 5sblk')
| 38.875 | 92 | 0.655949 |
4a13158061ce18208de3cd2ed14611ddee478fe0 | 2,348 | py | Python | pipeline/src/tables/flags.py | sawyerwatts/StopSpotDataPipeline | 6537d0d1779d9ffa6a3096c02f4081d659c12a0e | [
"MIT"
] | 3 | 2020-02-19T05:25:56.000Z | 2020-02-22T21:31:34.000Z | pipeline/src/tables/flags.py | sawyerwatts/StopSpotDataPipeline | 6537d0d1779d9ffa6a3096c02f4081d659c12a0e | [
"MIT"
] | 69 | 2020-02-20T20:30:03.000Z | 2020-05-29T01:20:05.000Z | pipeline/src/tables/flags.py | wolakdav/TeamBeeCapstoneProject | 6957416273fda85a12e86408ae635d7491fb1035 | [
"MIT"
] | 4 | 2020-06-05T03:47:49.000Z | 2020-12-21T01:17:02.000Z | import pandas
from .table import Table
import flaggers.flagger as flagger
class Flags(Table):
def __init__(self, user=None, passwd=None, hostname=None, db_name=None, schema="hive", engine=None):
super().__init__(user, passwd, hostname, db_name, schema, engine)
self._table_name = "flags"
... | 30.894737 | 110 | 0.602641 |
4a1315b617ffe77878f223d4d658be4109a204e0 | 1,573 | py | Python | internal/notes/builtin-SAVE/packages/xf86bigfontproto/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 1 | 2019-01-17T20:07:19.000Z | 2019-01-17T20:07:19.000Z | internal/notes/builtin-SAVE/packages/xf86bigfontproto/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | null | null | null | internal/notes/builtin-SAVE/packages/xf86bigfontproto/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 2 | 2019-08-06T18:13:57.000Z | 2021-11-05T18:19:49.000Z | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | 44.942857 | 89 | 0.684043 |
4a1316b50c1e2f1f0a440e202b036949f0757a37 | 1,818 | py | Python | yt_dlp/extractor/footyroom.py | nxtreaming/yt-dlp | 385ffb467b2285e85a2a5495b90314ba1f8e0700 | [
"Unlicense"
] | 11 | 2022-01-06T22:09:50.000Z | 2022-03-12T22:26:22.000Z | yt_dlp/extractor/footyroom.py | nxtreaming/yt-dlp | 385ffb467b2285e85a2a5495b90314ba1f8e0700 | [
"Unlicense"
] | 4 | 2022-02-25T08:20:18.000Z | 2022-03-17T16:16:20.000Z | yt_dlp/extractor/footyroom.py | nxtreaming/yt-dlp | 385ffb467b2285e85a2a5495b90314ba1f8e0700 | [
"Unlicense"
] | 3 | 2022-02-19T08:59:13.000Z | 2022-03-06T16:11:21.000Z | from .common import InfoExtractor
from .streamable import StreamableIE
class FootyRoomIE(InfoExtractor):
_VALID_URL = r'https?://footyroom\.com/matches/(?P<id>\d+)'
_TESTS = [{
'url': 'http://footyroom.com/matches/79922154/hull-city-vs-chelsea/review',
'info_dict': {
'id': '7992215... | 33.666667 | 83 | 0.566557 |
4a1316edcff66608e648dcd888830c6a4351db34 | 4,015 | py | Python | tests/test_api/test_inference_tracking.py | jcwon0/BlurHPE | c97a57e92a8a7f171b0403aee640222a32513562 | [
"Apache-2.0"
] | null | null | null | tests/test_api/test_inference_tracking.py | jcwon0/BlurHPE | c97a57e92a8a7f171b0403aee640222a32513562 | [
"Apache-2.0"
] | null | null | null | tests/test_api/test_inference_tracking.py | jcwon0/BlurHPE | c97a57e92a8a7f171b0403aee640222a32513562 | [
"Apache-2.0"
] | null | null | null | import pytest
from mmpose.apis import (get_track_id, inference_top_down_pose_model,
init_pose_model, vis_pose_tracking_result)
def test_pose_tracking_demo():
# COCO demo
# build the pose model from a config file and a checkpoint file
pose_model = init_pose_model(
... | 37.523364 | 80 | 0.636862 |
4a13187a24c5050bfb6c39b80d21bc6b33374644 | 2,840 | py | Python | web_server/parsers/WIP/download_sport.py | yutkin/News-Aggregator | b35b2cdd873121aab03cb14c191b2a3b4d3d5180 | [
"MIT"
] | 17 | 2017-05-09T13:03:21.000Z | 2022-01-08T18:32:01.000Z | web_server/parsers/WIP/download_sport.py | uav-profile/News-Aggregator | b35b2cdd873121aab03cb14c191b2a3b4d3d5180 | [
"MIT"
] | null | null | null | web_server/parsers/WIP/download_sport.py | uav-profile/News-Aggregator | b35b2cdd873121aab03cb14c191b2a3b4d3d5180 | [
"MIT"
] | 6 | 2018-04-23T03:28:33.000Z | 2021-04-02T06:29:23.000Z | import csv
import requests
from multiprocessing import Process, Queue, Value, Lock, current_process
import queue
from datetime import datetime, timedelta
import signal
import logging
import time
import pandas as pd
from bs4 import BeautifulSoup
NUM_JOBS = 16
def url_fetcher(Q, sync_flag):
curr_page = 2
url_c... | 30.869565 | 85 | 0.572183 |
4a131933ccac252afeeeb38b0440c195f17ee5af | 12,526 | py | Python | cron-jobs/validation/packit-service-validation.py | mmuzila/deployment | 314199992c9cb6595e43ee9f97e130bcc0ddb308 | [
"MIT"
] | null | null | null | cron-jobs/validation/packit-service-validation.py | mmuzila/deployment | 314199992c9cb6595e43ee9f97e130bcc0ddb308 | [
"MIT"
] | null | null | null | cron-jobs/validation/packit-service-validation.py | mmuzila/deployment | 314199992c9cb6595e43ee9f97e130bcc0ddb308 | [
"MIT"
] | null | null | null | # Copyright Contributors to the Packit project.
# SPDX-License-Identifier: MIT
import enum
import sentry_sdk
import time
from copr.v3 import Client
from datetime import datetime, timedelta, date
from os import getenv
from github import InputGitAuthor
from ogr.services.github import GithubService
from ogr.abstract im... | 32.117949 | 108 | 0.539997 |
4a131ab8208a3c7526dec611ad8c4170fe350c2f | 1,119 | py | Python | galaxy/api/aggregators.py | maxamillion/galaxy | 0460baf9d2c8da0a0e88c7975eca2e3abcc82f23 | [
"Apache-2.0"
] | null | null | null | galaxy/api/aggregators.py | maxamillion/galaxy | 0460baf9d2c8da0a0e88c7975eca2e3abcc82f23 | [
"Apache-2.0"
] | 1 | 2021-06-10T23:59:59.000Z | 2021-06-10T23:59:59.000Z | galaxy/api/aggregators.py | connectthefuture/galaxy | 841821957680643e07c1a94fb609f8e4117c19d1 | [
"Apache-2.0"
] | null | null | null | # (c) 2012-2016, Ansible by Red Hat
#
# This file is part of Ansible Galaxy
#
# Ansible Galaxy is free software: you can redistribute it and/or modify
# it under the terms of the Apache License as published by
# the Apache Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
... | 41.444444 | 102 | 0.76765 |
4a131b715e9bcc86f6d20e7cb70c05190ede31a6 | 6,613 | py | Python | fence/blueprints/data/blueprint.py | ADParedes/fence | 81afd1914c483da5514d0bcc13ecbfda9758dd9f | [
"Apache-2.0"
] | null | null | null | fence/blueprints/data/blueprint.py | ADParedes/fence | 81afd1914c483da5514d0bcc13ecbfda9758dd9f | [
"Apache-2.0"
] | 1 | 2019-11-01T08:30:28.000Z | 2019-11-01T08:30:28.000Z | fence/blueprints/data/blueprint.py | ADParedes/fence | 81afd1914c483da5514d0bcc13ecbfda9758dd9f | [
"Apache-2.0"
] | 3 | 2019-10-16T04:27:54.000Z | 2019-10-24T02:27:52.000Z | import flask
from cdislogging import get_logger
from fence.auth import login_required, require_auth_header, current_token
from fence.blueprints.data.indexd import (
BlankIndex,
IndexedFile,
get_signed_url_for_file,
)
from fence.errors import Forbidden, InternalError, UserError
from fence.utils import is_v... | 35.175532 | 88 | 0.692575 |
4a131c288f319ae02f152c18ebf853b0460e8c9a | 1,653 | py | Python | core/helper.py | Metleb1996/histents | f57a6cc6f496a58b370336ac7009f9519fccb4e2 | [
"MIT"
] | null | null | null | core/helper.py | Metleb1996/histents | f57a6cc6f496a58b370336ac7009f9519fccb4e2 | [
"MIT"
] | null | null | null | core/helper.py | Metleb1996/histents | f57a6cc6f496a58b370336ac7009f9519fccb4e2 | [
"MIT"
] | null | null | null | import re
import datetime
def user_data_control(data: dict):
try:
for i in data.keys():
data[i] = str(data[i]).strip()
except Exception as e:
return str(e), False
if len(data['user_name']) < 5 or len(data['user_name']) > 80:
return "The username complies with the rules. Please us... | 38.44186 | 121 | 0.629764 |
4a131c8358cc8153bac7c813a5a7be64af6502de | 1,783 | py | Python | src/reactions/MassAction.py | AnEvilBurrito/model-builder | f1a7d3a53c7d40b359a5e6521a51869f307ef48c | [
"MIT"
] | null | null | null | src/reactions/MassAction.py | AnEvilBurrito/model-builder | f1a7d3a53c7d40b359a5e6521a51869f307ef48c | [
"MIT"
] | null | null | null | src/reactions/MassAction.py | AnEvilBurrito/model-builder | f1a7d3a53c7d40b359a5e6521a51869f307ef48c | [
"MIT"
] | null | null | null | from .Reactions import Reactions
# from Reactions import Reactions
class MassAction(Reactions):
# Simplified Mass Action with only two forward specie and one backward specie,
# with molecularities of 1
def __init__(self, forwardSpecie1: str, forwardSpecie2: str, backwardSpecie: str = '_Auto', name='', Ka... | 28.301587 | 142 | 0.601795 |
4a131d287deb8c717c4e210145e70334120cba77 | 4,763 | py | Python | kikit/eeschema_v6.py | TadeasPilar/KiKit | 8364e085a9b6358df645c33ce3e62629b239f704 | [
"MIT"
] | null | null | null | kikit/eeschema_v6.py | TadeasPilar/KiKit | 8364e085a9b6358df645c33ce3e62629b239f704 | [
"MIT"
] | null | null | null | kikit/eeschema_v6.py | TadeasPilar/KiKit | 8364e085a9b6358df645c33ce3e62629b239f704 | [
"MIT"
] | null | null | null | from dataclasses import dataclass, field
from kikit.sexpr import Atom, parseSexprF
from itertools import islice
import os
from typing import Optional
@dataclass
class Symbol:
uuid: Optional[str] = None
path: Optional[str] = None
unit: Optional[int] = None
lib_id: Optional[str] = None
in_bom: Option... | 28.866667 | 71 | 0.575898 |
4a131da1d458918f774e879a2294d985cf75ded0 | 10,362 | py | Python | spearmint/tests/kernels/test_matern.py | jatinarora2409/Spearmint | a209eb8aa7d5d93f2fdca6cff50dc17a94d926ab | [
"RSA-MD"
] | 1,590 | 2015-01-02T19:11:29.000Z | 2022-03-31T13:36:16.000Z | spearmint/tests/kernels/test_matern.py | jatinarora2409/Spearmint | a209eb8aa7d5d93f2fdca6cff50dc17a94d926ab | [
"RSA-MD"
] | 99 | 2015-02-20T06:45:49.000Z | 2021-12-06T13:28:44.000Z | spearmint/tests/kernels/test_matern.py | jatinarora2409/Spearmint | a209eb8aa7d5d93f2fdca6cff50dc17a94d926ab | [
"RSA-MD"
] | 366 | 2015-01-17T20:29:49.000Z | 2022-02-21T16:22:31.000Z | # -*- coding: utf-8 -*-
# Spearmint
#
# Academic and Non-Commercial Research Use Software License and Terms
# of Use
#
# Spearmint is a software package to perform Bayesian optimization
# according to specific algorithms (the “Software”). The Software is
# designed to automatically run experiments (thus the code name
... | 47.1 | 70 | 0.763849 |
4a131dfd43b8c3f66c2dbf87317c1d2c29601ead | 10,520 | py | Python | colour_demosaicing/bayer/demosaicing/menon2007.py | MengmSun/colour-demosaicing | 3f3893403e467c1cffc17cb708db3a5669b42d18 | [
"BSD-3-Clause"
] | 1 | 2022-03-03T13:26:20.000Z | 2022-03-03T13:26:20.000Z | colour_demosaicing/bayer/demosaicing/menon2007.py | MengmSun/colour-demosaicing | 3f3893403e467c1cffc17cb708db3a5669b42d18 | [
"BSD-3-Clause"
] | null | null | null | colour_demosaicing/bayer/demosaicing/menon2007.py | MengmSun/colour-demosaicing | 3f3893403e467c1cffc17cb708db3a5669b42d18 | [
"BSD-3-Clause"
] | null | null | null | """
DDFAPD - Menon (2007) Bayer CFA Demosaicing
===========================================
*Bayer* CFA (Colour Filter Array) DDFAPD - *Menon (2007)* demosaicing.
References
----------
- :cite:`Menon2007c` : Menon, D., Andriani, S., & Calvagno, G. (2007).
Demosaicing With Directional Filtering and a posteriori ... | 28.053333 | 79 | 0.532319 |
4a131e020c330f61584dbe8efd48ab07a4663eb7 | 6,581 | py | Python | src/services/stream/crunchyroll.py | alexmuch/holo | 29cd5bf492104c4b68c0d7fe0e808ef4dae54bb9 | [
"MIT"
] | null | null | null | src/services/stream/crunchyroll.py | alexmuch/holo | 29cd5bf492104c4b68c0d7fe0e808ef4dae54bb9 | [
"MIT"
] | null | null | null | src/services/stream/crunchyroll.py | alexmuch/holo | 29cd5bf492104c4b68c0d7fe0e808ef4dae54bb9 | [
"MIT"
] | null | null | null | from logging import debug, info, warning, error, exception
import re
from datetime import datetime, timedelta
from .. import AbstractServiceHandler
from data.models import Episode, UnprocessedStream
class ServiceHandler(AbstractServiceHandler):
_show_url = "http://crunchyroll.com/{id}"
_show_re = re.compile("crunch... | 30.467593 | 111 | 0.711746 |
4a131f6888a2f1e54db9b7aa69c175046cde6891 | 985 | py | Python | opennre/model/pairwise_ranking_loss.py | igorvlnascimento/DeepREF | 0fed8120571e44e12ee3d1861289bc101c0a275f | [
"MIT"
] | null | null | null | opennre/model/pairwise_ranking_loss.py | igorvlnascimento/DeepREF | 0fed8120571e44e12ee3d1861289bc101c0a275f | [
"MIT"
] | null | null | null | opennre/model/pairwise_ranking_loss.py | igorvlnascimento/DeepREF | 0fed8120571e44e12ee3d1861289bc101c0a275f | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
class PairwiseRankingLoss(nn.Module):
def __init__(self,
margin_positive=2.5,
margin_negative=0.5,
gamma=2.0):
super().__init__()
self.margin_positive = margin_positive
sel... | 42.826087 | 97 | 0.649746 |
4a131f7b91fb30c765f5ef1239a03b4338992bb2 | 297 | py | Python | tests/mock/oauth_claims.py | MisterWil/python-abode | 4ffce2314ed7e2c5d48a2c2758fddaef440b05ad | [
"MIT"
] | 48 | 2017-08-10T21:32:50.000Z | 2021-08-15T05:09:58.000Z | tests/mock/oauth_claims.py | MisterWil/python-abode | 4ffce2314ed7e2c5d48a2c2758fddaef440b05ad | [
"MIT"
] | 81 | 2017-08-10T21:39:40.000Z | 2022-01-16T18:43:08.000Z | tests/mock/oauth_claims.py | MisterWil/python-abode | 4ffce2314ed7e2c5d48a2c2758fddaef440b05ad | [
"MIT"
] | 28 | 2017-08-17T21:20:12.000Z | 2022-01-16T12:22:07.000Z | """Mock Abode Claims Response."""
from tests.mock import OAUTH_TOKEN
def get_response_ok(oauth_token=OAUTH_TOKEN):
"""Return the oauth2 claims token."""
return '''
{
"token_type":"Bearer",
"access_token":"''' + oauth_token + '''",
"expires_in":3600
}'''
| 21.214286 | 49 | 0.599327 |
4a131fdf5d094d681a5d50a3ac54815f8fadae35 | 9,979 | py | Python | thingsboard_gateway/tb_client/tb_gateway_mqtt.py | netcadlabs/thingsboard-gateway | 6c4bd1a98627aaf1aba5011297d25c3fbc0bed0d | [
"Apache-2.0"
] | null | null | null | thingsboard_gateway/tb_client/tb_gateway_mqtt.py | netcadlabs/thingsboard-gateway | 6c4bd1a98627aaf1aba5011297d25c3fbc0bed0d | [
"Apache-2.0"
] | null | null | null | thingsboard_gateway/tb_client/tb_gateway_mqtt.py | netcadlabs/thingsboard-gateway | 6c4bd1a98627aaf1aba5011297d25c3fbc0bed0d | [
"Apache-2.0"
] | null | null | null | # Copyright 2021. ThingsBoard
#
# 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 ... | 48.441748 | 144 | 0.659685 |
4a132156956254692bf097c75ea6d3b87c38222d | 1,732 | py | Python | tests/unittests/test_search_space.py | Jerryzcn/autogluon | 778cfa23e5695b44fc3c7a5da0cbc764917d80a2 | [
"Apache-2.0"
] | null | null | null | tests/unittests/test_search_space.py | Jerryzcn/autogluon | 778cfa23e5695b44fc3c7a5da0cbc764917d80a2 | [
"Apache-2.0"
] | null | null | null | tests/unittests/test_search_space.py | Jerryzcn/autogluon | 778cfa23e5695b44fc3c7a5da0cbc764917d80a2 | [
"Apache-2.0"
] | 1 | 2021-02-04T23:29:47.000Z | 2021-02-04T23:29:47.000Z | import autogluon as ag
@ag.obj(
name=ag.space.Categorical('auto', 'gluon'),
)
class myobj:
def __init__(self, name):
self.name = name
@ag.func(
framework=ag.space.Categorical('mxnet', 'pytorch'),
)
def myfunc(framework):
return framework
@ag.args(
a=ag.space.Real(1e-3, 1e-2, log=True),
... | 28.866667 | 83 | 0.48903 |
4a1321778296a6f3f88a46d32d703f26a780cf1a | 1,421 | py | Python | coupons/migrations/0003_auto_20150416_0617.py | jelukas/django-coupons | b4de97570720c30ca034fdc8c121ad1645e8cb53 | [
"BSD-3-Clause"
] | null | null | null | coupons/migrations/0003_auto_20150416_0617.py | jelukas/django-coupons | b4de97570720c30ca034fdc8c121ad1645e8cb53 | [
"BSD-3-Clause"
] | null | null | null | coupons/migrations/0003_auto_20150416_0617.py | jelukas/django-coupons | b4de97570720c30ca034fdc8c121ad1645e8cb53 | [
"BSD-3-Clause"
] | 1 | 2021-08-30T10:50:41.000Z | 2021-08-30T10:50:41.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('coupons', '0002_coupon_valid_until'),
]
operations = [
migrations.CreateModel(
name='Campaign',
fiel... | 35.525 | 167 | 0.582688 |
4a1321ed39b53b8928ce73772867715421a373f7 | 10,407 | py | Python | backend/env/lib/python3.8/site-packages/jedi/inference/references.py | lubitelpospat/CFM-source | 4e6af33ee68c6f2f05b6952b64a6b3f0591d5b03 | [
"MIT"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | backend/env/lib/python3.8/site-packages/jedi/inference/references.py | lubitelpospat/CFM-source | 4e6af33ee68c6f2f05b6952b64a6b3f0591d5b03 | [
"MIT"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | backend/env/lib/python3.8/site-packages/jedi/inference/references.py | lubitelpospat/CFM-source | 4e6af33ee68c6f2f05b6952b64a6b3f0591d5b03 | [
"MIT"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import os
import re
from parso import python_bytes_to_unicode
from jedi._compatibility import FileNotFoundError
from jedi.debug import dbg
from jedi.file_io import KnownContentFileIO
from jedi.inference.imports import SubModuleName, load_module_from_path
from jedi.inference.filters import ParserTreeFilter
from jedi.i... | 34.69 | 93 | 0.644854 |
4a132226c46c4389e8a645bcae884cf3c09f12f1 | 366 | py | Python | main.py | victhepythonista/fireworks-stimulation | 44ff44f90ec4cbd29d0148163dd60175ad809e1f | [
"MIT"
] | null | null | null | main.py | victhepythonista/fireworks-stimulation | 44ff44f90ec4cbd29d0148163dd60175ad809e1f | [
"MIT"
] | null | null | null | main.py | victhepythonista/fireworks-stimulation | 44ff44f90ec4cbd29d0148163dd60175ad809e1f | [
"MIT"
] | null | null | null | import pygame
from backend import *
pygame.init()
bg = pygame.image.load("nightsky.jpeg")
class FireworksScreen(Screen):
def __init__(self):
Screen.__init__(self,(900,500))
self.fw_manager = FireworksManager()
def display_widgets(self):
self.window.blit(bg, (0,0))
self.fw_manager.show(self.w... | 18.3 | 40 | 0.693989 |
4a1323448f7fd664667913f66e3aa8237dc01a31 | 4,681 | py | Python | src/audio.py | samx81/End-to-end-ASR-Pytorch | 16e565008031c73e5b18f890c77e830440f3d101 | [
"MIT"
] | null | null | null | src/audio.py | samx81/End-to-end-ASR-Pytorch | 16e565008031c73e5b18f890c77e830440f3d101 | [
"MIT"
] | null | null | null | src/audio.py | samx81/End-to-end-ASR-Pytorch | 16e565008031c73e5b18f890c77e830440f3d101 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
import torchaudio
class CMVN(torch.jit.ScriptModule):
__constants__ = ["mode", "dim", "eps"]
def __init__(self, mode="global", dim=2, eps=1e-10):
# `torchaudio.load()` loads audio with shape [channel, feature_dim, time]
# so ... | 34.674074 | 116 | 0.616749 |
4a1324d9c2a490758dc29449b6542614e6f0cf12 | 1,201 | py | Python | Project/src/Modules/House/Family/Reolink/reolink_device.py | DBrianKimmel/PyHouse | a100fc67761a22ae47ed6f21f3c9464e2de5d54f | [
"MIT"
] | 3 | 2016-11-16T00:37:58.000Z | 2019-11-10T13:10:19.000Z | Project/src/Modules/House/Family/Reolink/reolink_device.py | DBrianKimmel/PyHouse | a100fc67761a22ae47ed6f21f3c9464e2de5d54f | [
"MIT"
] | null | null | null | Project/src/Modules/House/Family/Reolink/reolink_device.py | DBrianKimmel/PyHouse | a100fc67761a22ae47ed6f21f3c9464e2de5d54f | [
"MIT"
] | 1 | 2020-07-19T22:06:52.000Z | 2020-07-19T22:06:52.000Z | """
@name: /home/briank/workspace/PyHouse/Project/src/Modules/House/Family/Reolink/reolink_device.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: (c) 2013-2019 by D. Brian Kimmel
@license: MIT License
@note: Created on Jan 26, 2020
@summary:
"""
__updated__ = '2020-01-26'
__... | 21.836364 | 101 | 0.64363 |
4a1324ffbfd60694de7b5a6256905c88f50544c3 | 3,089 | py | Python | tests/unit/lib/utils/test_hash.py | stackchain/aws-sam-cli | 5690348deb2193c653ba361bc0fc358dd410b3eb | [
"Apache-2.0",
"MIT"
] | null | null | null | tests/unit/lib/utils/test_hash.py | stackchain/aws-sam-cli | 5690348deb2193c653ba361bc0fc358dd410b3eb | [
"Apache-2.0",
"MIT"
] | 1 | 2020-10-05T17:15:43.000Z | 2020-10-05T17:15:43.000Z | tests/unit/lib/utils/test_hash.py | misk0/aws-sam-cli | a7cf9f025bc6da2bd388fee35dd07da584362047 | [
"Apache-2.0",
"MIT"
] | null | null | null | import os
import shutil
import tempfile
from unittest import TestCase
from unittest.mock import patch
from samcli.lib.utils.hash import dir_checksum, str_checksum
class TestHash(TestCase):
def setUp(self):
self.temp_dir = tempfile.mkdtemp()
def tearDown(self):
shutil.rmtree(self.temp_dir, ig... | 39.101266 | 119 | 0.65976 |
4a13256cfb5fe27f06e4b9aeb769a97425b81e94 | 5,911 | py | Python | capture.py | Hoke19/Network-intrusion-dataset-creator | c2f335ee6910602f39fe4b8e45bfd9893e906d26 | [
"MIT"
] | null | null | null | capture.py | Hoke19/Network-intrusion-dataset-creator | c2f335ee6910602f39fe4b8e45bfd9893e906d26 | [
"MIT"
] | null | null | null | capture.py | Hoke19/Network-intrusion-dataset-creator | c2f335ee6910602f39fe4b8e45bfd9893e906d26 | [
"MIT"
] | null | null | null | # MIT License
# Copyright (c) 2018 nrajasin
# 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, publi... | 39.406667 | 124 | 0.584165 |
4a13258bcf56f527209963e370f0234a8d0550e5 | 1,081 | py | Python | lingvodoc/views/v2/convert_five_tiers_validate/view.py | SegFaulti4/lingvodoc | 8b296b43453a46b814d3cd381f94382ebcb9c6a6 | [
"Apache-2.0"
] | 5 | 2017-03-30T18:02:11.000Z | 2021-07-20T16:02:34.000Z | lingvodoc/views/v2/convert_five_tiers_validate/view.py | SegFaulti4/lingvodoc | 8b296b43453a46b814d3cd381f94382ebcb9c6a6 | [
"Apache-2.0"
] | 15 | 2016-02-24T13:16:59.000Z | 2021-09-03T11:47:15.000Z | lingvodoc/views/v2/convert_five_tiers_validate/view.py | Winking-maniac/lingvodoc | f037bf0e91ccdf020469037220a43e63849aa24a | [
"Apache-2.0"
] | 22 | 2015-09-25T07:13:40.000Z | 2021-08-04T18:08:26.000Z | import logging
import tempfile
from pyramid.view import view_config
from pyramid.httpexceptions import (
HTTPOk,
HTTPNotFound,
HTTPError,
HTTPBadRequest
)
import tempfile
from lingvodoc.scripts import elan_parser
from urllib import request
@view_config(route_name='convert_five_tiers_validate', rendere... | 27.025 | 94 | 0.677151 |
4a1326460562d52affeb8d4c16668ddc248a50b3 | 881 | py | Python | venv/lib/python3.9/site-packages/markdown/__version__.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 182 | 2017-03-05T07:43:13.000Z | 2022-03-15T13:09:07.000Z | venv/lib/python3.9/site-packages/markdown/__version__.py | qarik-hanrattyjen/apache-airflow-backport-providers-google-2021.3.3 | 630dcef73e6a258b6e9a52f934e2dd912ce741f8 | [
"Apache-2.0"
] | 15 | 2018-05-02T11:05:30.000Z | 2018-05-11T20:51:27.000Z | env/lib/python3.6/site-packages/markdown/__version__.py | bcss-pm/incidents | 927a102104b5718fe118bceb307d3cd633d6699b | [
"MIT"
] | 38 | 2017-04-26T14:13:37.000Z | 2021-06-24T11:36:38.000Z | #
# markdown/__version__.py
#
# version_info should conform to PEP 386
# (major, minor, micro, alpha/beta/rc/final, #)
# (1, 1, 2, 'alpha', 0) => "1.1.2.dev"
# (1, 2, 0, 'beta', 2) => "1.2b2"
version_info = (2, 6, 11, 'final', 0)
def _get_version():
" Returns a PEP 386-compliant version number from version_info. ... | 28.419355 | 69 | 0.586833 |
4a1327320f9094127947c47b92be759a493920d2 | 12,651 | py | Python | tests/test_read_pdf_table.py | cjotade/tabula-py | dc55064b6c71bc1bcc010f76c397e2256abd9d7b | [
"MIT"
] | null | null | null | tests/test_read_pdf_table.py | cjotade/tabula-py | dc55064b6c71bc1bcc010f76c397e2256abd9d7b | [
"MIT"
] | null | null | null | tests/test_read_pdf_table.py | cjotade/tabula-py | dc55064b6c71bc1bcc010f76c397e2256abd9d7b | [
"MIT"
] | null | null | null | import filecmp
import json
import os
import platform
import shutil
import subprocess
import tempfile
import unittest
import uuid
from unittest.mock import patch
import pandas as pd
import tabula
class TestReadPdfTable(unittest.TestCase):
def setUp(self):
self.uri = (
"https://github.com/chez... | 36.353448 | 88 | 0.587226 |
4a1327cfbeaf8198876a6929a3a66872c137d46c | 5,598 | py | Python | Sources/AlphaBot2/python/prgm.py | maroneal/SmartC | 515502d69832b5acf427715b87f0cc17d10e7987 | [
"BSD-2-Clause"
] | null | null | null | Sources/AlphaBot2/python/prgm.py | maroneal/SmartC | 515502d69832b5acf427715b87f0cc17d10e7987 | [
"BSD-2-Clause"
] | null | null | null | Sources/AlphaBot2/python/prgm.py | maroneal/SmartC | 515502d69832b5acf427715b87f0cc17d10e7987 | [
"BSD-2-Clause"
] | 2 | 2019-03-04T08:26:39.000Z | 2019-04-15T09:40:31.000Z | import time
import os
import RPi.GPIO as GPIO
from adafruit_servokit import ServoKit
import math
from picamera import PiCamera
from AlphaBot2 import AlphaBot2
kit = ServoKit(channels=16)
Ab = AlphaBot2()
#camera = PiCamera()
BUZ = 4
IR = 17 #Remote controller
DR = 16
DL = 19
PWM = 50
n = 0
TRIG = 22
ECHO = 27
GPIO... | 28.85567 | 71 | 0.435334 |
4a132862707004f44e3168b4c3953ddf92017152 | 2,388 | py | Python | examples/example_jumping_robot/src/jr_graph_builder.py | danbarla/GTDynamics | 0448b359aff9e0e784832666e4048ee01c8b082d | [
"BSD-2-Clause"
] | null | null | null | examples/example_jumping_robot/src/jr_graph_builder.py | danbarla/GTDynamics | 0448b359aff9e0e784832666e4048ee01c8b082d | [
"BSD-2-Clause"
] | null | null | null | examples/example_jumping_robot/src/jr_graph_builder.py | danbarla/GTDynamics | 0448b359aff9e0e784832666e4048ee01c8b082d | [
"BSD-2-Clause"
] | null | null | null | """
* GTDynamics Copyright 2020, Georgia Tech Research Corporation,
* Atlanta, Georgia 30332-0415
* All Rights Reserved
* See LICENSE for the license information
*
* @file jr_graph_builder.py
* @brief Create factor graphs for the jumping robot.
* @author Yetong Zhang
"""
import os,sys,inspect
currentdir = o... | 37.3125 | 94 | 0.708961 |
4a132a12f3ef5c06f148afe7df0c4e323db0979a | 1,079 | py | Python | source/pkgsrc/games/unknown-horizons/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | 1 | 2021-11-20T22:46:39.000Z | 2021-11-20T22:46:39.000Z | source/pkgsrc/games/unknown-horizons/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | source/pkgsrc/games/unknown-horizons/patches/patch-setup.py | Scottx86-64/dotfiles-1 | 51004b1e2b032664cce6b553d2052757c286087d | [
"Unlicense"
] | null | null | null | $NetBSD: patch-setup.py,v 1.2 2021/03/09 09:39:11 nia Exp $
- On NetBSD platform.dist() is not defined. Always install to
the same binary directory anyway, for consistency.
- Install man pages to PKGMANDIR.
--- setup.py.orig 2019-01-12 15:15:42.000000000 +0000
+++ setup.py
@@ -39,10 +39,7 @@ from horizons.ext impor... | 35.966667 | 86 | 0.681186 |
4a132bf9bdfdad5bd4a529b79a9343c8a9bd4db6 | 32,111 | py | Python | openbook_auth/tests/views/test_authenticated_user.py | TamaraAbells/okuna-api | f87d8e80d2f182c01dbce68155ded0078ee707e4 | [
"MIT"
] | 164 | 2019-07-29T17:59:06.000Z | 2022-03-19T21:36:01.000Z | openbook_auth/tests/views/test_authenticated_user.py | TamaraAbells/okuna-api | f87d8e80d2f182c01dbce68155ded0078ee707e4 | [
"MIT"
] | 188 | 2019-03-16T09:53:25.000Z | 2019-07-25T14:57:24.000Z | openbook_auth/tests/views/test_authenticated_user.py | TamaraAbells/okuna-api | f87d8e80d2f182c01dbce68155ded0078ee707e4 | [
"MIT"
] | 80 | 2019-08-03T17:49:08.000Z | 2022-02-28T16:56:33.000Z | from unittest import mock
from urllib.parse import urlsplit
from django.urls import reverse
from faker import Faker
from rest_framework import status
from mixer.backend.django import mixer
from openbook_circles.models import Circle
from openbook_common.tests.models import OpenbookAPITestCase
from openbook_auth.models... | 32.766327 | 122 | 0.677712 |
4a132dfee586102f9a09b6165079113f880dd4f3 | 1,124 | py | Python | python/test/test_stop_order_request.py | KoenBal/OANDA_V20_Client | e67b9dbaddff6ed23e355d3ce7f9c9972799c702 | [
"MIT"
] | 1 | 2018-10-25T03:57:32.000Z | 2018-10-25T03:57:32.000Z | python/test/test_stop_order_request.py | KoenBal/OANDA_V20_Client | e67b9dbaddff6ed23e355d3ce7f9c9972799c702 | [
"MIT"
] | null | null | null | python/test/test_stop_order_request.py | KoenBal/OANDA_V20_Client | e67b9dbaddff6ed23e355d3ce7f9c9972799c702 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
OANDA v20 REST API
The full OANDA v20 REST API Specification. This specification defines how to interact with v20 Accounts, Trades, Orders, Pricing and more. To authenticate use the string 'Bearer ' followed by the token which can be obtained at https://www.oanda.com/demo-account/tpa/perso... | 27.414634 | 298 | 0.720641 |
4a132e03be79dabfaf1ac43e2c37823b4dd65cf5 | 2,277 | py | Python | rssfly/extractor/comic_walker.py | lidavidm/rssfly | 1cfb893a249e4095412b966a1bf50fc3de7744e7 | [
"Apache-2.0"
] | 1 | 2021-02-14T03:44:35.000Z | 2021-02-14T03:44:35.000Z | rssfly/extractor/comic_walker.py | lidavidm/rssfly | 1cfb893a249e4095412b966a1bf50fc3de7744e7 | [
"Apache-2.0"
] | 6 | 2021-07-15T13:03:19.000Z | 2022-03-26T14:14:14.000Z | rssfly/extractor/comic_walker.py | lidavidm/rssfly | 1cfb893a249e4095412b966a1bf50fc3de7744e7 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 David Li
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | 35.030769 | 86 | 0.651296 |
4a132ed2c1af9ded142ea0f932d3b576726fe1ef | 461 | py | Python | mayan/apps/linking/tests/literals.py | CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons | 0e4e919fd2e1ded6711354a0330135283e87f8c7 | [
"Apache-2.0"
] | 2 | 2021-09-12T19:41:19.000Z | 2021-09-12T19:41:20.000Z | mayan/apps/linking/tests/literals.py | CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons | 0e4e919fd2e1ded6711354a0330135283e87f8c7 | [
"Apache-2.0"
] | 37 | 2021-09-13T01:00:12.000Z | 2021-10-02T03:54:30.000Z | mayan/apps/linking/tests/literals.py | CMU-313/fall-2021-hw2-451-unavailable-for-legal-reasons | 0e4e919fd2e1ded6711354a0330135283e87f8c7 | [
"Apache-2.0"
] | 1 | 2021-09-22T13:17:30.000Z | 2021-09-22T13:17:30.000Z | from ..literals import INCLUSION_AND
TEST_SMART_LINK_CONDITION_FOREIGN_DOCUMENT_DATA = 'label'
TEST_SMART_LINK_CONDITION_EXPRESSION = 'title'
TEST_SMART_LINK_CONDITION_EXPRESSION_EDITED = '\'test edited\''
TEST_SMART_LINK_CONDITION_INCLUSION = INCLUSION_AND
TEST_SMART_LINK_CONDITION_OPERATOR = 'icontains'
TEST_... | 41.909091 | 64 | 0.830803 |
4a133026c32306bebcbbf568209e677798d91294 | 1,387 | py | Python | synapse/server_notices/worker_server_notices_sender.py | zauguin/synapse | ea00f18135ce30e8415526ce68585ea90da5b856 | [
"Apache-2.0"
] | 1 | 2019-08-29T05:52:15.000Z | 2019-08-29T05:52:15.000Z | synapse/server_notices/worker_server_notices_sender.py | zauguin/synapse | ea00f18135ce30e8415526ce68585ea90da5b856 | [
"Apache-2.0"
] | null | null | null | synapse/server_notices/worker_server_notices_sender.py | zauguin/synapse | ea00f18135ce30e8415526ce68585ea90da5b856 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2018 New Vector Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | 29.510638 | 75 | 0.656092 |
4a133057f9802a38b89d26865d0eae962fe7947a | 7,686 | py | Python | landavailability/api/ranking.py | alphagov/land-avilability-api | 048d4eed4caedb7b9f41caa5d69025506b2eb57d | [
"MIT"
] | 1 | 2017-07-24T17:00:34.000Z | 2017-07-24T17:00:34.000Z | landavailability/api/ranking.py | alphagov/land-availability-api | 048d4eed4caedb7b9f41caa5d69025506b2eb57d | [
"MIT"
] | 23 | 2016-11-21T15:00:11.000Z | 2019-06-04T07:07:55.000Z | landavailability/api/ranking.py | alphagov/land-avilability-api | 048d4eed4caedb7b9f41caa5d69025506b2eb57d | [
"MIT"
] | 4 | 2017-03-23T16:42:40.000Z | 2021-12-01T07:27:30.000Z | import pandas as pd
import numpy as np
log = __import__('logging').getLogger(__file__)
def school_site_size_range(**kwargs):
'''Returns the floor space (m^2), as a range, for a school with the
given characteristics.
'''
# size_req on ola
size = school_site_size(**kwargs)
# upper_site_req, low... | 39.618557 | 98 | 0.647281 |
4a1330bb356730c273398a46882c1f5fad0d8b47 | 5,144 | py | Python | long_range_conv/lrc_layers/nufft_layers_1d.py | Forgotten/Efficient_Long-Range_Convolutions_for_Point_Clouds | 1fe364052eca9330edeaeb32c59d0ec5195c12c4 | [
"MIT"
] | 4 | 2020-10-10T19:45:49.000Z | 2021-09-24T09:45:38.000Z | long_range_conv/lrc_layers/nufft_layers_1d.py | Forgotten/Efficient_Long-Range_Convolutions_for_Point_Clouds | 1fe364052eca9330edeaeb32c59d0ec5195c12c4 | [
"MIT"
] | null | null | null | long_range_conv/lrc_layers/nufft_layers_1d.py | Forgotten/Efficient_Long-Range_Convolutions_for_Point_Clouds | 1fe364052eca9330edeaeb32c59d0ec5195c12c4 | [
"MIT"
] | 1 | 2020-10-22T02:21:31.000Z | 2020-10-22T02:21:31.000Z | import tensorflow as tf
import numpy as np
@tf.function
def gaussianPer(x, tau, L = 2*np.pi):
return tf.exp( -tf.square(x )/(4*tau)) + \
tf.exp( -tf.square(x-L)/(4*tau)) + \
tf.exp( -tf.square(x+L)/(4*tau))
@tf.function
def gaussianDeconv(k, tau):
return tf.sqrt(np.pi/tau... | 43.965812 | 131 | 0.602449 |
4a1330e7acf911e2749c60c567ae406d1471e9ec | 443 | py | Python | 73.py | thaisNY/GuanabaraPy | a0a3acbd9242a39491a365b07562037d7a936bba | [
"MIT"
] | null | null | null | 73.py | thaisNY/GuanabaraPy | a0a3acbd9242a39491a365b07562037d7a936bba | [
"MIT"
] | null | null | null | 73.py | thaisNY/GuanabaraPy | a0a3acbd9242a39491a365b07562037d7a936bba | [
"MIT"
] | null | null | null | campeoes = ('Palmeiras','Cruzeiro','Grêmio','Santos','Corintias','Flamengo','Atlético Mineiro','Atlético Paranaense',
'Internacional','Chapecoense','Botafogo','São Paulo','Fluminense','Vasco da Gama','Bahia',
'Sport','Vitória','Ponta Preta','America','Coritiba')
print(campeoes[: 5])
print(campeo... | 55.375 | 117 | 0.68623 |
4a13311b836867169cfd1ae45ba4a4fd91ed01e9 | 229 | py | Python | splinter/__init__.py | schurma/splinter | 521556670097cf189c7ad271663e967cbd9c11df | [
"BSD-3-Clause"
] | 2,049 | 2015-01-02T00:54:57.000Z | 2022-03-25T20:58:09.000Z | splinter/__init__.py | schurma/splinter | 521556670097cf189c7ad271663e967cbd9c11df | [
"BSD-3-Clause"
] | 557 | 2015-01-09T23:13:11.000Z | 2022-03-31T08:03:08.000Z | splinter/__init__.py | jsfehler/splinter | 3131074686255569ba14a6d342f6ac9593529181 | [
"BSD-3-Clause"
] | 464 | 2015-01-02T15:56:04.000Z | 2022-03-19T16:31:30.000Z | # Copyright 2016 splinter authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
from splinter.browser import Browser # NOQA
__version__ = "0.16.0"
| 25.444444 | 55 | 0.755459 |
4a13319d92033112d39967336a68e450a96eb319 | 1,650 | py | Python | example/testssh.py | hubo1016/vlcp-ssh | 39001f92375f34f52cd711aa5adbd5b181fdcd05 | [
"Apache-2.0"
] | null | null | null | example/testssh.py | hubo1016/vlcp-ssh | 39001f92375f34f52cd711aa5adbd5b181fdcd05 | [
"Apache-2.0"
] | 1 | 2016-01-15T04:05:12.000Z | 2016-01-15T07:35:45.000Z | example/testssh.py | hubo1016/vlcp-ssh | 39001f92375f34f52cd711aa5adbd5b181fdcd05 | [
"Apache-2.0"
] | null | null | null | '''
Created on 2015/12/31
:author: think
'''
from __future__ import print_function
from vlcp.server import main
from vlcp.server.module import Module
from vlcp.event.runnable import RoutineContainer
from vlcpssh.sshclient import SSHFactory
from vlcp.utils.connector import TaskPool
from vlcp.config.config import manage... | 30.555556 | 87 | 0.663636 |
4a1332079349afe0641b27c6130090718cb40152 | 7,164 | py | Python | gs_quant/analytics/datagrid/data_row.py | skyquant2/gs-quant | b7e648fa7912b13ad1fd503b643389e34587aa1e | [
"Apache-2.0"
] | 4 | 2021-05-11T14:35:53.000Z | 2022-03-14T03:52:34.000Z | gs_quant/analytics/datagrid/data_row.py | skyquant2/gs-quant | b7e648fa7912b13ad1fd503b643389e34587aa1e | [
"Apache-2.0"
] | null | null | null | gs_quant/analytics/datagrid/data_row.py | skyquant2/gs-quant | b7e648fa7912b13ad1fd503b643389e34587aa1e | [
"Apache-2.0"
] | null | null | null | """
Copyright 2019 Goldman Sachs.
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 di... | 33.633803 | 109 | 0.63847 |
4a1332b067a53bc252d061d7330f2b48a51e147c | 17,033 | py | Python | kilt/labrinth.py | Jefaxe/kilt | 36885faecc410d7bd7d0248892b37992dbf2a839 | [
"MIT"
] | 3 | 2021-04-02T19:14:56.000Z | 2021-04-13T11:37:40.000Z | kilt/labrinth.py | Jefaxe/kilt | 36885faecc410d7bd7d0248892b37992dbf2a839 | [
"MIT"
] | null | null | null | kilt/labrinth.py | Jefaxe/kilt | 36885faecc410d7bd7d0248892b37992dbf2a839 | [
"MIT"
] | null | null | null | import json
import logging
import os
import traceback
import urllib.error
import urllib.request
import webbrowser
from kilt import error, config, version
from PIL import Image
labrinth_mod = "https://api.modrinth.com/api/v1/mod"
kilt_doc = "https://github.com/Jefaxe/Kilt/wiki"
labrinth_doc = "https://github.com/modr... | 47.845506 | 143 | 0.573651 |
4a13336112c6e9da6a175dd29d1d7240b8e42a1b | 135 | py | Python | never_saiddit/reddit/tests/utils.py | Damgaard/Never-Saiddit | d2b0bac0a39da0f21d8a0e5ed46094786615c41f | [
"MIT"
] | null | null | null | never_saiddit/reddit/tests/utils.py | Damgaard/Never-Saiddit | d2b0bac0a39da0f21d8a0e5ed46094786615c41f | [
"MIT"
] | null | null | null | never_saiddit/reddit/tests/utils.py | Damgaard/Never-Saiddit | d2b0bac0a39da0f21d8a0e5ed46094786615c41f | [
"MIT"
] | null | null | null | class FakeReddit(object):
"""A faked reddit instance"""
class auth():
def authorize(code):
return "1234"
| 16.875 | 33 | 0.562963 |
4a13350bd71824ce81e11c55db45a28987fb795c | 3,763 | py | Python | stonesoup/hypothesiser/distance.py | JPompeus/Stone-Soup | 030c60aaf5ff92d7bb53f06e350c0bf58c9af037 | [
"MIT"
] | null | null | null | stonesoup/hypothesiser/distance.py | JPompeus/Stone-Soup | 030c60aaf5ff92d7bb53f06e350c0bf58c9af037 | [
"MIT"
] | 4 | 2020-03-10T13:51:00.000Z | 2020-03-23T12:38:24.000Z | stonesoup/hypothesiser/distance.py | JPompeus/Stone-Soup | 030c60aaf5ff92d7bb53f06e350c0bf58c9af037 | [
"MIT"
] | 1 | 2019-12-09T14:33:09.000Z | 2019-12-09T14:33:09.000Z | # -*- coding: utf-8 -*-
from .base import Hypothesiser
from ..base import Property
from ..measures import Measure
from ..predictor import Predictor
from ..types.multihypothesis import \
MultipleHypothesis
from ..types.hypothesis import SingleDistanceHypothesis
from ..types.detection import MissedDetection
from ..up... | 36.533981 | 79 | 0.638852 |
4a1335c495cf401791752eb42cfd2d8b580c9e40 | 2,381 | py | Python | driver/options.py | koltenfluckiger/pyseleniummanagement | 46403adb98d0495b61f8273da326ba117178043f | [
"MIT",
"Unlicense"
] | null | null | null | driver/options.py | koltenfluckiger/pyseleniummanagement | 46403adb98d0495b61f8273da326ba117178043f | [
"MIT",
"Unlicense"
] | null | null | null | driver/options.py | koltenfluckiger/pyseleniummanagement | 46403adb98d0495b61f8273da326ba117178043f | [
"MIT",
"Unlicense"
] | null | null | null | try:
from abc import ABC
from typing import List
except ImportError as err:
print("Unable to import: {}".format(err))
exit()
from selenium.webdriver.firefox.options import Options as FirefoxOpts
from selenium.webdriver.chrome.options import Options as ChromeOpts
from selenium.webdriver.safari.service i... | 30.922078 | 86 | 0.614028 |
4a13361900f9564ebea3412ece91ae5f77ce4bda | 6,958 | py | Python | commands/role.py | Vepnar/UserAnalyzer | 7059eaf5eb37ae46ede60d688f3733e7cf372f7b | [
"Apache-2.0"
] | null | null | null | commands/role.py | Vepnar/UserAnalyzer | 7059eaf5eb37ae46ede60d688f3733e7cf372f7b | [
"Apache-2.0"
] | null | null | null | commands/role.py | Vepnar/UserAnalyzer | 7059eaf5eb37ae46ede60d688f3733e7cf372f7b | [
"Apache-2.0"
] | 2 | 2018-09-10T06:37:49.000Z | 2018-09-28T10:34:49.000Z | from bot import dbot as bot
import discordutil as du
#Add role command
@bot.command(pass_context=True)
async def addrole(ctx):
#Get the author
author = ctx.message.author
#Parse the args from the command
args = du.splitCmd(ctx.message.content)
#Check if the user has permission to add roles
if d... | 39.089888 | 92 | 0.590112 |
4a13367132bd19014188cc7d7307dd2b744bc160 | 1,140 | py | Python | xlsxwriter/test/comparison/test_page_breaks05.py | dthadi3/XlsxWriter | f1801e82240aa9c746ce14948ef95990b83162cf | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2020-07-01T07:24:37.000Z | 2020-07-01T07:24:37.000Z | xlsxwriter/test/comparison/test_page_breaks05.py | dthadi3/XlsxWriter | f1801e82240aa9c746ce14948ef95990b83162cf | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | xlsxwriter/test/comparison/test_page_breaks05.py | dthadi3/XlsxWriter | f1801e82240aa9c746ce14948ef95990b83162cf | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2020, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparison_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 27.804878 | 91 | 0.59386 |
4a133851cf2b4c858e76127d0574928ac3588a4a | 1,693 | py | Python | sentiment_model.py | GongCQ/pytorch-sentiment-analysis | 0850c2dc1884a71e1b2a27bcf5b186020c9b3dd7 | [
"MIT"
] | null | null | null | sentiment_model.py | GongCQ/pytorch-sentiment-analysis | 0850c2dc1884a71e1b2a27bcf5b186020c9b3dd7 | [
"MIT"
] | null | null | null | sentiment_model.py | GongCQ/pytorch-sentiment-analysis | 0850c2dc1884a71e1b2a27bcf5b186020c9b3dd7 | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
class BERTGRUSentiment(nn.Module):
def __init__(self,
bert,
hidden_dim,
output_dim,
n_layers,
bidirectional,
dropout,
use_mask,
use_ppb):
... | 27.306452 | 105 | 0.517425 |
4a13389a0ffe20ca9b2981a36dda9e935cf39ee7 | 18,063 | py | Python | rest_framework/tests/generics.py | forgingdestiny/django-rest-framework | f7fdcd55e451e4a37c518e1916dc2be513edbab5 | [
"Unlicense"
] | 1 | 2015-02-26T17:30:58.000Z | 2015-02-26T17:30:58.000Z | rest_framework/tests/generics.py | forgingdestiny/django-rest-framework | f7fdcd55e451e4a37c518e1916dc2be513edbab5 | [
"Unlicense"
] | null | null | null | rest_framework/tests/generics.py | forgingdestiny/django-rest-framework | f7fdcd55e451e4a37c518e1916dc2be513edbab5 | [
"Unlicense"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
from django.shortcuts import get_object_or_404
from django.test import TestCase
from rest_framework import generics, serializers, status
from rest_framework.tests.utils import RequestFactory
from rest_framework.tests.models import BasicModel, Comment,... | 37.166667 | 100 | 0.627415 |
4a1338d9177bb33163c28b3ced027c4a5a94d2e5 | 9,729 | py | Python | src/autograd_hacks.py | rohancalum/Federated-Learning-PyTorch | 6785ea90df26ca2d4d5cefc3d08957bc7b807461 | [
"MIT"
] | null | null | null | src/autograd_hacks.py | rohancalum/Federated-Learning-PyTorch | 6785ea90df26ca2d4d5cefc3d08957bc7b807461 | [
"MIT"
] | null | null | null | src/autograd_hacks.py | rohancalum/Federated-Learning-PyTorch | 6785ea90df26ca2d4d5cefc3d08957bc7b807461 | [
"MIT"
] | null | null | null | """
Library for extracting interesting quantites from autograd, see README.md
Not thread-safe because of module-level variables
Notation:
o: number of output classes (exact Hessian), number of Hessian samples (sampled Hessian)
n: batch-size
do: output dimension (output channels for convolution)
di: input dimension (inp... | 35.637363 | 126 | 0.64282 |
4a1338f63a6e2a44612784726b94a7d8d944d507 | 2,077 | py | Python | setup.py | lehtiolab/msstitch | c497dfb4b76bfe1f69e162130739feb0df0c8888 | [
"MIT"
] | 2 | 2020-11-17T22:18:50.000Z | 2022-03-31T17:47:24.000Z | setup.py | lehtiolab/msstitch | c497dfb4b76bfe1f69e162130739feb0df0c8888 | [
"MIT"
] | 1 | 2020-09-23T10:33:05.000Z | 2020-09-23T10:33:05.000Z | setup.py | lehtiolab/msstitch | c497dfb4b76bfe1f69e162130739feb0df0c8888 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
###################################################################
NAME = 'msstitch'
PACKAGES = find_packages(where='src')
KEYWORDS = ['mass spectrometry', 'proteomics', 'processing']
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience... | 33.5 | 96 | 0.605681 |
4a133a65af4183e26ba68715e8a277765e22fb64 | 54,076 | py | Python | indra/explanation/model_checker.py | RohitChattopadhyay/indra | a688e8cd46e876a299824c60cf4f6af8618f03da | [
"BSD-2-Clause"
] | null | null | null | indra/explanation/model_checker.py | RohitChattopadhyay/indra | a688e8cd46e876a299824c60cf4f6af8618f03da | [
"BSD-2-Clause"
] | null | null | null | indra/explanation/model_checker.py | RohitChattopadhyay/indra | a688e8cd46e876a299824c60cf4f6af8618f03da | [
"BSD-2-Clause"
] | null | null | null | from __future__ import print_function, unicode_literals, absolute_import
from builtins import dict, str
from future.utils import python_2_unicode_compatible
import logging
import numbers
import textwrap
import networkx as nx
import itertools
import numpy as np
import scipy.stats
from copy import deepcopy
from collectio... | 41.405819 | 80 | 0.595477 |
4a133a73e9d95b5c090999e0a07b0293dfbbe2f3 | 561 | py | Python | discovery-infra/test_infra/utils/cluster_name.py | mkowalski/assisted-test-infra | 7584c25dd96db54653026a271738c97bca1ab4cc | [
"Apache-2.0"
] | null | null | null | discovery-infra/test_infra/utils/cluster_name.py | mkowalski/assisted-test-infra | 7584c25dd96db54653026a271738c97bca1ab4cc | [
"Apache-2.0"
] | null | null | null | discovery-infra/test_infra/utils/cluster_name.py | mkowalski/assisted-test-infra | 7584c25dd96db54653026a271738c97bca1ab4cc | [
"Apache-2.0"
] | null | null | null | import uuid
from dataclasses import dataclass
from test_infra import consts
from test_infra.utils import get_env
@dataclass
class ClusterName:
suffix: str = str(uuid.uuid4())[: consts.SUFFIX_LENGTH]
prefix: str = get_env("CLUSTER_NAME", f"{consts.CLUSTER_PREFIX}")
def __str__(self):
return self... | 22.44 | 69 | 0.659537 |
4a133ad2911344461846f9a78ad80da95de71394 | 5,165 | py | Python | scitbx/examples/chebyshev_lsq_example.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | 2 | 2021-03-18T12:31:57.000Z | 2022-03-14T06:27:06.000Z | scitbx/examples/chebyshev_lsq_example.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | null | null | null | scitbx/examples/chebyshev_lsq_example.py | hbrunie/cctbx_project | 2d8cb383d50fe20cdbbe4bebae8ed35fabce61e5 | [
"BSD-3-Clause-LBNL"
] | 1 | 2021-03-26T12:52:30.000Z | 2021-03-26T12:52:30.000Z | from __future__ import absolute_import, division, print_function
from scitbx.array_family import flex
from scitbx.math import chebyshev_polynome
from scitbx.math import chebyshev_lsq_fit
from six.moves import cStringIO as StringIO
from six.moves import range
from six.moves import zip
def example():
x_obs = (flex.d... | 34.433333 | 74 | 0.582381 |
4a133bff451fc87804bd6faf0276f85e7944e13e | 1,681 | py | Python | src/sentinel/azext_sentinel/vendored_sdks/security_insights/models/data_connectors_check_requirements_py3.py | hpsan/azure-cli-extensions | be1589bb6dd23837796e088d28e65e873050171e | [
"MIT"
] | null | null | null | src/sentinel/azext_sentinel/vendored_sdks/security_insights/models/data_connectors_check_requirements_py3.py | hpsan/azure-cli-extensions | be1589bb6dd23837796e088d28e65e873050171e | [
"MIT"
] | null | null | null | src/sentinel/azext_sentinel/vendored_sdks/security_insights/models/data_connectors_check_requirements_py3.py | hpsan/azure-cli-extensions | be1589bb6dd23837796e088d28e65e873050171e | [
"MIT"
] | 1 | 2020-07-16T23:49:49.000Z | 2020-07-16T23:49:49.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------
from ... | 41 | 459 | 0.675193 |
4a133c0a05904ea1ddee4df6405f53017d07c94a | 8,362 | py | Python | var/spack/repos/builtin/packages/dihydrogen/package.py | wscullin/spack | ace3753076941ed8b642864b36305aecbe2bd35b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/dihydrogen/package.py | wscullin/spack | ace3753076941ed8b642864b36305aecbe2bd35b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 5 | 2021-07-26T03:14:25.000Z | 2022-03-31T03:19:31.000Z | var/spack/repos/builtin/packages/dihydrogen/package.py | wscullin/spack | ace3753076941ed8b642864b36305aecbe2bd35b | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
from spack import *
class Dihydrogen(CMakePackage, CudaPackage, ROCmPackage):
"""DiHydrogen is the second... | 40.009569 | 95 | 0.618871 |
4a133c3b0ed546db192d7e02472a47db9cbdfe5a | 9,047 | py | Python | tests/helpers/__init__.py | MosheFriedland/cloudbridge | af7644322044863d401645311c0d1f2556bccb63 | [
"MIT"
] | 61 | 2018-07-10T18:32:43.000Z | 2022-03-06T04:50:20.000Z | tests/helpers/__init__.py | MosheFriedland/cloudbridge | af7644322044863d401645311c0d1f2556bccb63 | [
"MIT"
] | 134 | 2018-07-02T16:46:29.000Z | 2022-02-03T17:05:43.000Z | tests/helpers/__init__.py | MosheFriedland/cloudbridge | af7644322044863d401645311c0d1f2556bccb63 | [
"MIT"
] | 23 | 2018-08-07T17:33:16.000Z | 2021-12-25T01:44:20.000Z | import functools
import operator
import os
import sys
import unittest
import uuid
from cloudbridge.base import helpers as cb_helpers
from cloudbridge.factory import CloudProviderFactory
from cloudbridge.interfaces import CloudProvider
from cloudbridge.interfaces import InstanceState
from cloudbridge.interfaces import ... | 32.08156 | 78 | 0.626174 |
4a133c66948833fd89dd39c01476822b76ff8a46 | 8,920 | py | Python | python/http_client/v1/polyaxon_sdk/models/v1_hook.py | mouradmourafiq/polyaxon-client | 5fc32b9decc7305161561d404b0127f3e900c64a | [
"Apache-2.0"
] | null | null | null | python/http_client/v1/polyaxon_sdk/models/v1_hook.py | mouradmourafiq/polyaxon-client | 5fc32b9decc7305161561d404b0127f3e900c64a | [
"Apache-2.0"
] | null | null | null | python/http_client/v1/polyaxon_sdk/models/v1_hook.py | mouradmourafiq/polyaxon-client | 5fc32b9decc7305161561d404b0127f3e900c64a | [
"Apache-2.0"
] | 1 | 2021-12-03T07:12:03.000Z | 2021-12-03T07:12:03.000Z | #!/usr/bin/python
#
# Copyright 2018-2022 Polyaxon, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | 26.94864 | 192 | 0.585426 |
4a133d3593f1d6ff30b6924e01dd5fa5b9b89251 | 3,472 | py | Python | tests/util/test_config.py | Palisand/ambramelin | 264da5c3592dc9287bdda3c1383a04420439d07b | [
"MIT"
] | null | null | null | tests/util/test_config.py | Palisand/ambramelin | 264da5c3592dc9287bdda3c1383a04420439d07b | [
"MIT"
] | null | null | null | tests/util/test_config.py | Palisand/ambramelin | 264da5c3592dc9287bdda3c1383a04420439d07b | [
"MIT"
] | null | null | null | import json
from pathlib import Path
from tempfile import NamedTemporaryFile, TemporaryDirectory
import cattr
import pytest
from pytest_mock import MockerFixture
from ambramelin.util import config as util_config
from ambramelin.util.config import Config, Environment, User
class TestLoadConfig:
def test_with_fil... | 28 | 85 | 0.642857 |
4a133ddbe3f1745f7993fe6ffef695c0e1730bc8 | 1,994 | py | Python | src_py/elf/zmq_util.py | r-woo/elfai | 2c37625e608e7720b8bd7847419d7b53e87e260a | [
"BSD-3-Clause"
] | 3,305 | 2018-05-02T17:41:36.000Z | 2022-03-28T05:57:56.000Z | src_py/elf/zmq_util.py | r-woo/elfai | 2c37625e608e7720b8bd7847419d7b53e87e260a | [
"BSD-3-Clause"
] | 135 | 2018-05-02T19:25:13.000Z | 2020-08-20T02:39:14.000Z | src_py/elf/zmq_util.py | r-woo/elfai | 2c37625e608e7720b8bd7847419d7b53e87e260a | [
"BSD-3-Clause"
] | 604 | 2018-05-02T19:38:45.000Z | 2022-03-18T10:01:57.000Z | # Copyright (c) 2018-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
import zmq
class ZMQCtx:
def __init__(self):
pass
def __enter__(self):
pass
def __exit_... | 25.896104 | 71 | 0.585757 |
4a133e8efdcb369e2805a7147ce7096ab5faf268 | 1,843 | py | Python | httpx/__init__.py | bandoche/httpx | b23420392efdcc10f3d802f335739d9cb3d72d5c | [
"BSD-3-Clause"
] | null | null | null | httpx/__init__.py | bandoche/httpx | b23420392efdcc10f3d802f335739d9cb3d72d5c | [
"BSD-3-Clause"
] | null | null | null | httpx/__init__.py | bandoche/httpx | b23420392efdcc10f3d802f335739d9cb3d72d5c | [
"BSD-3-Clause"
] | null | null | null | from .__version__ import __description__, __title__, __version__
from .api import delete, get, head, options, patch, post, put, request, stream
from .auth import Auth, BasicAuth, DigestAuth
from .client import AsyncClient, Client
from .config import PoolLimits, Proxy, Timeout
from .dispatch.asgi import ASGIDispatch
fro... | 21.183908 | 78 | 0.652198 |
4a133eb0501bfe4baeed13e705ac5c831c7645fb | 2,174 | py | Python | nessai/utils/logging.py | Rodrigo-Tenorio/nessai | 2b4175da61b3a7250d1154a126ad93481836df0d | [
"MIT"
] | 16 | 2021-02-18T00:04:54.000Z | 2021-09-01T03:25:45.000Z | nessai/utils/logging.py | Rodrigo-Tenorio/nessai | 2b4175da61b3a7250d1154a126ad93481836df0d | [
"MIT"
] | 59 | 2021-03-09T11:05:37.000Z | 2022-03-30T14:21:14.000Z | nessai/utils/logging.py | Rodrigo-Tenorio/nessai | 2b4175da61b3a7250d1154a126ad93481836df0d | [
"MIT"
] | 1 | 2022-03-25T12:28:16.000Z | 2022-03-25T12:28:16.000Z | # -*- coding: utf-8 -*-
"""
Utilities related to logging.
"""
import logging
import os
def setup_logger(output=None, label='nessai', log_level='WARNING'):
"""
Setup the logger.
Based on the implementation in Bilby:
https://git.ligo.org/lscsoft/bilby/-/blob/master/bilby/core/utils/log.py
Paramete... | 30.194444 | 79 | 0.600276 |
4a133fd5e27fab96c7d58c75d7102735286243e3 | 1,658 | py | Python | config/wsgi.py | mamecheikh-debug/gaynde | aabad48fd411df52285f3da83617643bd60a6a96 | [
"MIT"
] | null | null | null | config/wsgi.py | mamecheikh-debug/gaynde | aabad48fd411df52285f3da83617643bd60a6a96 | [
"MIT"
] | null | null | null | config/wsgi.py | mamecheikh-debug/gaynde | aabad48fd411df52285f3da83617643bd60a6a96 | [
"MIT"
] | null | null | null | """
WSGI config for Gaynde project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` ... | 42.512821 | 79 | 0.801568 |
4a1343045511fa73dcec00afc8683a2b799e6b68 | 1,487 | py | Python | tests/python/test_struct.py | xwang186/taichi | 1a8ec6ebfae8b3859fd91d4889e2de3c12f1dde2 | [
"MIT"
] | null | null | null | tests/python/test_struct.py | xwang186/taichi | 1a8ec6ebfae8b3859fd91d4889e2de3c12f1dde2 | [
"MIT"
] | null | null | null | tests/python/test_struct.py | xwang186/taichi | 1a8ec6ebfae8b3859fd91d4889e2de3c12f1dde2 | [
"MIT"
] | null | null | null | import taichi as ti
from tests import test_utils
@test_utils.test()
def test_linear():
x = ti.field(ti.i32)
y = ti.field(ti.i32)
n = 128
ti.root.dense(ti.i, n).place(x)
ti.root.dense(ti.i, n).place(y)
for i in range(n):
x[i] = i
y[i] = i + 123
for i in range(n):
... | 18.358025 | 65 | 0.507061 |
4a1343771bb00d447ef95f72b517c9ed03fc3c33 | 7,263 | py | Python | skbot/transform/simplfy.py | FirefoxMetzger/scikit-bot | ee6f1d3451a3c61a6fa122cc42efc4dd67afc9c9 | [
"Apache-2.0"
] | 3 | 2021-09-09T08:33:06.000Z | 2021-12-22T13:51:49.000Z | skbot/transform/simplfy.py | FirefoxMetzger/scikit-bot | ee6f1d3451a3c61a6fa122cc42efc4dd67afc9c9 | [
"Apache-2.0"
] | 31 | 2021-08-12T08:12:58.000Z | 2022-03-21T23:16:36.000Z | skbot/transform/simplfy.py | FirefoxMetzger/scikit-bot | ee6f1d3451a3c61a6fa122cc42efc4dd67afc9c9 | [
"Apache-2.0"
] | null | null | null | from typing import List
from .base import CompundLink, Link, InvertLink
from .affine import AffineCompound, Translation, Rotation
from .joints import Joint
import numpy as np
def simplify_links(
links: List[Link],
*,
keep_links: List[Link] = None,
keep_joints: bool = False,
eps: float = 1e-16
) ->... | 34.585714 | 85 | 0.583092 |
4a1343b072633916cf054e5536ebd7776bb0a52a | 2,614 | py | Python | NLP/Full_classifier/Readmodels.py | AlexKH22/Machine_Learning | 7d2ee3ad99b29cc3b19ea02487e644f3e2b993c9 | [
"Apache-2.0"
] | null | null | null | NLP/Full_classifier/Readmodels.py | AlexKH22/Machine_Learning | 7d2ee3ad99b29cc3b19ea02487e644f3e2b993c9 | [
"Apache-2.0"
] | null | null | null | NLP/Full_classifier/Readmodels.py | AlexKH22/Machine_Learning | 7d2ee3ad99b29cc3b19ea02487e644f3e2b993c9 | [
"Apache-2.0"
] | null | null | null | import random
import pickle
from nltk.classify import ClassifierI
from statistics import mode
from nltk.tokenize import word_tokenize
class VoteClassifier(ClassifierI):
def __init__(self, *classifiers):
self._classifiers = classifiers
def classify(self, features):
votes = []
for c ... | 24.203704 | 79 | 0.700842 |
4a1347096fae94208063106c6e3457715d894ea0 | 247 | py | Python | frosch/style/token/__init__.py | HallerPatrick/frog | 2a5eae6678a22c1f0a51be0b99fe2e45cbf7ff64 | [
"MIT"
] | 204 | 2020-11-01T20:01:35.000Z | 2022-02-17T17:57:43.000Z | frosch/style/token/__init__.py | HallerPatrick/frog | 2a5eae6678a22c1f0a51be0b99fe2e45cbf7ff64 | [
"MIT"
] | 58 | 2020-11-01T00:10:38.000Z | 2022-03-24T19:20:30.000Z | frosch/style/token/__init__.py | HallerPatrick/frog | 2a5eae6678a22c1f0a51be0b99fe2e45cbf7ff64 | [
"MIT"
] | 6 | 2020-11-09T06:23:44.000Z | 2021-03-26T21:22:43.000Z | """
frosch - Better runtime errors
Patrick Haller
patrickhaller40@googlemail.com
License MIT
"""
from pygments.token import (
Keyword,
Name,
Comment,
String,
Error,
Number,
Operator,
Generic,
)
| 11.227273 | 34 | 0.603239 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.