hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | 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 248 | max_issues_repo_name stringlengths 5 125 | 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 248 | max_forks_repo_name stringlengths 5 125 | 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 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
d203709221f68ac2daa8de8a8dbe4b58bcd9f4f3 | 497 | py | Python | Src/StdLib/Lib/test/xmltests.py | cwensley/ironpython2 | f854444e1e08afc8850cb7c1a739a7dd2d10d32a | [
"Apache-2.0"
] | 2,293 | 2015-01-02T12:46:10.000Z | 2022-03-29T09:45:43.000Z | Src/StdLib/Lib/test/xmltests.py | cwensley/ironpython2 | f854444e1e08afc8850cb7c1a739a7dd2d10d32a | [
"Apache-2.0"
] | 1,074 | 2016-12-07T05:02:48.000Z | 2022-03-22T02:09:11.000Z | Src/StdLib/Lib/test/xmltests.py | cwensley/ironpython2 | f854444e1e08afc8850cb7c1a739a7dd2d10d32a | [
"Apache-2.0"
] | 1,033 | 2015-01-04T07:48:40.000Z | 2022-03-24T09:34:37.000Z | # Convenience test module to run all of the XML-related tests in the
# standard library.
import sys
import test.test_support
test.test_support.verbose = 0
def runtest(name):
__import__(name)
module = sys.modules[name]
if hasattr(module, "test_main"):
module.test_main()
runtest("test.test_minidom... | 22.590909 | 68 | 0.748491 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 231 | 0.464789 |
d20425193c1b51cfe42ea596643380c8747b1847 | 1,275 | py | Python | memcnn/experiment/tests/test_factory.py | classner/memcnn | 107ea40945b2b0d312d05cab5b78633e5f977a52 | [
"MIT"
] | 224 | 2018-03-03T02:46:54.000Z | 2022-02-12T14:33:56.000Z | memcnn/experiment/tests/test_factory.py | classner/memcnn | 107ea40945b2b0d312d05cab5b78633e5f977a52 | [
"MIT"
] | 62 | 2018-04-28T01:25:14.000Z | 2021-11-25T13:20:57.000Z | memcnn/experiment/tests/test_factory.py | classner/memcnn | 107ea40945b2b0d312d05cab5b78633e5f977a52 | [
"MIT"
] | 25 | 2018-04-20T18:08:12.000Z | 2022-02-03T22:13:44.000Z | import pytest
import os
import memcnn.experiment.factory
from memcnn.config import Config
def test_get_attr_from_module():
a = memcnn.experiment.factory.get_attr_from_module('memcnn.experiment.factory.get_attr_from_module')
assert a is memcnn.experiment.factory.get_attr_from_module
def test_load_experiment_... | 37.5 | 104 | 0.741176 | 0 | 0 | 0 | 0 | 427 | 0.334902 | 0 | 0 | 253 | 0.198431 |
d2045b61e5e8006918d4654b503671b6d4cfdf28 | 303 | py | Python | source/bluetooth/test_search_serial_port.py | Takahiro55555/CameraSystem | 53a77b7a7bd0c34b486d73af8ef2a49201a0bdaa | [
"MIT"
] | 1 | 2019-12-03T05:28:35.000Z | 2019-12-03T05:28:35.000Z | source/bluetooth/test_search_serial_port.py | Takahiro55555/CameraSystem | 53a77b7a7bd0c34b486d73af8ef2a49201a0bdaa | [
"MIT"
] | 88 | 2019-07-01T09:11:35.000Z | 2021-09-08T01:13:16.000Z | source/bluetooth/test_search_serial_port.py | Takahiro55555/CameraSystem | 53a77b7a7bd0c34b486d73af8ef2a49201a0bdaa | [
"MIT"
] | 5 | 2019-05-22T06:44:38.000Z | 2019-09-18T05:20:30.000Z | """
@file: test_search_serial_port.py
@author: Futa HIRAKOBA
@brief: search_serial_port.pyのをテストするプログラム
"""
from search_serial_port import search_com_ports, search_enabled_com_port
def test_search_com_ports():
search_com_ports()
def test_search_enabled_com_port():
search_enabled_com_port()
| 18.9375 | 72 | 0.808581 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 130 | 0.397554 |
d2054031cc7f367ae05b0c0f073e7b256fa4a564 | 238 | py | Python | Aula 01/ConversaoMedidas.py | eduardojpsena/EstruturaDeDados-Python-IESP | 97c22fc1411dfdae2d1085e9a3ca0c334ee07988 | [
"MIT"
] | null | null | null | Aula 01/ConversaoMedidas.py | eduardojpsena/EstruturaDeDados-Python-IESP | 97c22fc1411dfdae2d1085e9a3ca0c334ee07988 | [
"MIT"
] | null | null | null | Aula 01/ConversaoMedidas.py | eduardojpsena/EstruturaDeDados-Python-IESP | 97c22fc1411dfdae2d1085e9a3ca0c334ee07988 | [
"MIT"
] | null | null | null | print("---CONVERSÃO DE MEDIDAS---")
valor_metros = float(input("Informe o valor em metros à ser convertido: "))
valor_centimetros = valor_metros * 100
print("{} metros equivale a {} centimetros.".format(valor_metros, valor_centimetros)) | 39.666667 | 85 | 0.747899 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.475 |
d2057f4c0253aa5e357b86320d8d2148ad029e12 | 385 | py | Python | src/easymql/__init__.py | vivek-shrikhande/easy-mql | 8cbf6a77aed8230bd92cee5585227ea4a09001b8 | [
"MIT"
] | null | null | null | src/easymql/__init__.py | vivek-shrikhande/easy-mql | 8cbf6a77aed8230bd92cee5585227ea4a09001b8 | [
"MIT"
] | null | null | null | src/easymql/__init__.py | vivek-shrikhande/easy-mql | 8cbf6a77aed8230bd92cee5585227ea4a09001b8 | [
"MIT"
] | null | null | null | from pyparsing import ParseException
from easymql.exc import EasyMQLSyntaxError
from easymql.pipeline import Pipeline, encode
class EasyMQL:
def parse(self, query_string):
try:
return encode(Pipeline.parse(query_string, explode=False))
except ParseException as e:
raise Eas... | 29.615385 | 85 | 0.724675 | 255 | 0.662338 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d205e00637b9718f14c4962c0430f40c178683e5 | 266 | py | Python | src/guildapi.py | nsde/discord-guildapi | b1303423e74c1370498e594429f3bf4aeae4ee95 | [
"MIT"
] | null | null | null | src/guildapi.py | nsde/discord-guildapi | b1303423e74c1370498e594429f3bf4aeae4ee95 | [
"MIT"
] | null | null | null | src/guildapi.py | nsde/discord-guildapi | b1303423e74c1370498e594429f3bf4aeae4ee95 | [
"MIT"
] | null | null | null | import requests
import json
def getguild(guild_id):
guild_id = str(guild_id)
http_response = requests.get(f'https://discord.com/api/guilds/{guild_id}/widget.json')
response_data = http_response.json()
data = json.dumps(response_data)
return data | 29.555556 | 90 | 0.733083 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 56 | 0.210526 |
d2066abfbaca62c1d5be55ef5d80f560df075d0a | 409 | py | Python | smarthome/smarthomeproj/server/migrations/0011_auto_20210122_0256.py | nunocaseiro/smarthome-server-django | 711db6ff360061d861d9985264f753e0f7846327 | [
"Apache-2.0"
] | null | null | null | smarthome/smarthomeproj/server/migrations/0011_auto_20210122_0256.py | nunocaseiro/smarthome-server-django | 711db6ff360061d861d9985264f753e0f7846327 | [
"Apache-2.0"
] | null | null | null | smarthome/smarthomeproj/server/migrations/0011_auto_20210122_0256.py | nunocaseiro/smarthome-server-django | 711db6ff360061d861d9985264f753e0f7846327 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 3.1.3 on 2021-01-22 02:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('server', '0010_auto_20210122_0054'),
]
operations = [
migrations.AlterField(
model_name='sensorvalue',
name='value',... | 21.526316 | 70 | 0.613692 | 316 | 0.772616 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.244499 |
d207522acb3ce4394972c46c3f9f025ef3ebed35 | 683 | py | Python | p2/core/tasks.py | BeryJu/p2 | 80b5c6a821f90cef73d6e8cd3c6cdb05ffa86b27 | [
"MIT"
] | null | null | null | p2/core/tasks.py | BeryJu/p2 | 80b5c6a821f90cef73d6e8cd3c6cdb05ffa86b27 | [
"MIT"
] | null | null | null | p2/core/tasks.py | BeryJu/p2 | 80b5c6a821f90cef73d6e8cd3c6cdb05ffa86b27 | [
"MIT"
] | null | null | null | """p2 core tasks"""
from p2.core.celery import CELERY_APP
from p2.lib.reflection import path_to_class
@CELERY_APP.task(bind=True)
def signal_marshall(self, signal, args=None, kwargs=None):
"""Run signal in task worker"""
if not args:
args = []
if not kwargs:
kwargs = {}
# Lookup PK to ... | 32.52381 | 72 | 0.648609 | 0 | 0 | 0 | 0 | 578 | 0.846266 | 0 | 0 | 101 | 0.147877 |
d207656cad5f592cc3b1825bcd0b8c7607785174 | 4,463 | py | Python | tests/keras_contrib/layers/test_convolutional.py | rgreenblatt/keras-contrib | 46fcdb9384b3bc9399c651b2b43640aa54098e64 | [
"MIT"
] | 7 | 2017-07-22T09:05:44.000Z | 2019-04-30T02:08:04.000Z | tests/keras_contrib/layers/test_convolutional.py | rgreenblatt/keras-contrib | 46fcdb9384b3bc9399c651b2b43640aa54098e64 | [
"MIT"
] | 1 | 2017-12-26T02:59:59.000Z | 2017-12-26T02:59:59.000Z | tests/keras_contrib/layers/test_convolutional.py | rgreenblatt/keras-contrib | 46fcdb9384b3bc9399c651b2b43640aa54098e64 | [
"MIT"
] | 11 | 2017-07-06T14:11:51.000Z | 2021-08-21T23:18:20.000Z | import pytest
import numpy as np
import itertools
from numpy.testing import assert_allclose
from keras_contrib.utils.test_utils import layer_test, keras_test
from keras.utils.conv_utils import conv_input_length
from keras import backend as K
from keras_contrib import backend as KC
from keras_contrib.layers import conv... | 37.191667 | 95 | 0.538203 | 0 | 0 | 0 | 0 | 3,842 | 0.860856 | 0 | 0 | 434 | 0.097244 |
d20883f007efa4a112403e5dc5f0370600e053b9 | 8,131 | py | Python | superpyrate/task_countfiles.py | willu47/superpyrate | 60ce6f98a00cac418f62ccac9a194023a4f4b37a | [
"MIT"
] | null | null | null | superpyrate/task_countfiles.py | willu47/superpyrate | 60ce6f98a00cac418f62ccac9a194023a4f4b37a | [
"MIT"
] | null | null | null | superpyrate/task_countfiles.py | willu47/superpyrate | 60ce6f98a00cac418f62ccac9a194023a4f4b37a | [
"MIT"
] | null | null | null | """Holds the luigi tasks which count the number of rows in the files
Records the number of clean and dirty rows in the AIS data,
writing these stats to the database and finally producing a report of the
statistics
1. Count the number of rows in the raw csv files (in ``files/unzipped/<archive>``)
2. Count the number o... | 39.663415 | 101 | 0.615422 | 6,800 | 0.836305 | 3,583 | 0.440659 | 3,857 | 0.474357 | 0 | 0 | 2,369 | 0.291354 |
d20a84d94f2ed93364b818533786034015f7b86f | 1,917 | py | Python | pyquil/api/__init__.py | stjordanis/pyquil | 36987ecb78d5dc85d299dd62395b7669a1cedd5a | [
"Apache-2.0"
] | 677 | 2017-01-09T23:20:22.000Z | 2018-11-26T10:57:49.000Z | pyquil/api/__init__.py | stjordanis/pyquil | 36987ecb78d5dc85d299dd62395b7669a1cedd5a | [
"Apache-2.0"
] | 574 | 2018-11-28T05:38:40.000Z | 2022-03-23T20:38:28.000Z | pyquil/api/__init__.py | stjordanis/pyquil | 36987ecb78d5dc85d299dd62395b7669a1cedd5a | [
"Apache-2.0"
] | 202 | 2018-11-30T06:36:28.000Z | 2022-03-29T15:38:18.000Z | ##############################################################################
# Copyright 2016-2017 Rigetti Computing
#
# 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... | 33.631579 | 112 | 0.691706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,117 | 0.582681 |
d20aad59d161f70830e20fabfe7cc1b0d6c4b1b9 | 946 | py | Python | nodes/makeblock_ros_one.py | to4dy/makeblock-ros | 12b58195c9be3cc95c6398704a17ceb3a841813e | [
"MIT"
] | 7 | 2017-12-17T00:45:07.000Z | 2022-03-11T10:25:54.000Z | nodes/makeblock_ros_one.py | to4dy/makeblock-ros | 12b58195c9be3cc95c6398704a17ceb3a841813e | [
"MIT"
] | null | null | null | nodes/makeblock_ros_one.py | to4dy/makeblock-ros | 12b58195c9be3cc95c6398704a17ceb3a841813e | [
"MIT"
] | 3 | 2016-06-21T05:45:24.000Z | 2017-04-19T18:48:31.000Z | #!/usr/bin/env python
# license removed for brevity
import rospy
from std_msgs.msg import Float32
from megapi import *
from makeblock_ros.srv import *
bot = None
def onRead(v):
print("and here!")
rospy.loginfo(v)
pub.publish(v)
def handle_makeblock_motors(req):
global bot
bot.motorRun(M1, req.s... | 20.12766 | 73 | 0.662791 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 172 | 0.181818 |
d20acbdc55dd2187f4e70d6f0f36211cc6ddf2d9 | 9,347 | py | Python | bets-templates.py | longnow/longview | 9345faacec64f427eab43790abc165af6a572e3d | [
"BSD-2-Clause"
] | 82 | 2015-01-23T04:20:31.000Z | 2022-02-18T22:33:53.000Z | bets-templates.py | longnow/longview | 9345faacec64f427eab43790abc165af6a572e3d | [
"BSD-2-Clause"
] | 2 | 2015-03-27T22:24:46.000Z | 2017-02-20T08:19:12.000Z | bets-templates.py | longnow/longview | 9345faacec64f427eab43790abc165af6a572e3d | [
"BSD-2-Clause"
] | 7 | 2015-06-04T20:37:02.000Z | 2021-03-10T02:41:08.000Z | # Copyright (c) 2004, The Long Now Foundation
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list o... | 23.484925 | 167 | 0.642559 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9,226 | 0.987055 |
d20af14dd3e3f451b0c30965586bb3662c6ee4a4 | 768 | py | Python | ansible/roles/kraken.config/filter_plugins/expand_config.py | yenicapotediaz/k2 | 90aeb6efd77371c388b1429fc443aa30673c7787 | [
"Apache-2.0"
] | 85 | 2016-10-06T23:15:14.000Z | 2017-09-15T00:52:25.000Z | ansible/roles/kraken.config/filter_plugins/expand_config.py | yenicapotediaz/k2 | 90aeb6efd77371c388b1429fc443aa30673c7787 | [
"Apache-2.0"
] | 739 | 2016-09-19T21:48:58.000Z | 2017-09-15T17:46:52.000Z | ansible/roles/kraken.config/filter_plugins/expand_config.py | yenicapotediaz/k2 | 90aeb6efd77371c388b1429fc443aa30673c7787 | [
"Apache-2.0"
] | 47 | 2016-09-22T21:32:12.000Z | 2017-09-14T21:00:53.000Z | import copy, os
from ansible import errors
def expand_config(config_data):
try:
all_data = copy.deepcopy(expand_envs(config_data))
return all_data
except Exception, e:
raise errors.AnsibleFilterError(
'expand_config plugin error: {0}, config_data={1}'.format(
str(e),
... | 26.482759 | 70 | 0.669271 | 147 | 0.191406 | 0 | 0 | 0 | 0 | 0 | 0 | 105 | 0.136719 |
d20cfcc3e7e361f935e2feabc8a3b8078a59377a | 2,514 | py | Python | jaxopt/_src/loop.py | ianwilliamson/jaxopt | 0ff6be8094aacb3bf5472a41d780e3f56fc8e0f8 | [
"Apache-2.0"
] | 2 | 2021-10-04T15:20:55.000Z | 2021-10-05T08:52:46.000Z | jaxopt/_src/loop.py | ianwilliamson/jaxopt | 0ff6be8094aacb3bf5472a41d780e3f56fc8e0f8 | [
"Apache-2.0"
] | null | null | null | jaxopt/_src/loop.py | ianwilliamson/jaxopt | 0ff6be8094aacb3bf5472a41d780e3f56fc8e0f8 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 30.289157 | 79 | 0.699682 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,111 | 0.441925 |
d20e5a4fd52895393eb34015d45cba3558f08f7a | 8,407 | py | Python | official/recommendation/model_runner.py | decster/models | 82e783e3172f254b62dc4af08987754ebb7c348c | [
"Apache-2.0"
] | 3 | 2018-10-31T02:16:47.000Z | 2018-11-06T09:11:37.000Z | official/recommendation/model_runner.py | decster/models | 82e783e3172f254b62dc4af08987754ebb7c348c | [
"Apache-2.0"
] | null | null | null | official/recommendation/model_runner.py | decster/models | 82e783e3172f254b62dc4af08987754ebb7c348c | [
"Apache-2.0"
] | 1 | 2020-01-21T17:39:55.000Z | 2020-01-21T17:39:55.000Z | # 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
#
# Unless required by applica... | 40.418269 | 93 | 0.692875 | 7,300 | 0.868324 | 0 | 0 | 0 | 0 | 0 | 0 | 3,473 | 0.413108 |
d20eb1e22a6672296afae7cc1ca61eef92581ba3 | 53,916 | py | Python | resources/mgltools_x86_64Linux2_1.5.6/MGLToolsPckgs/MolKit/amberPrmTop.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | 8 | 2021-12-14T21:30:01.000Z | 2022-02-14T11:30:03.000Z | resources/mgltools_x86_64Linux2_1.5.6/MGLToolsPckgs/MolKit/amberPrmTop.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | null | null | null | resources/mgltools_x86_64Linux2_1.5.6/MGLToolsPckgs/MolKit/amberPrmTop.py | J-E-J-S/aaRS-Pipeline | 43f59f28ab06e4b16328c3bc405cdddc6e69ac44 | [
"MIT"
] | null | null | null | ## Automatically adapted for numpy.oldnumeric Jul 23, 2007 by
############################################################################
#
# Author: Ruth HUEY, Michel F. SANNER
#
# Copyright: M. Sanner TSRI 2001
#
#############################################################################
# $Header: /opt/cvs/pyt... | 34.037879 | 108 | 0.476167 | 52,633 | 0.976204 | 0 | 0 | 0 | 0 | 0 | 0 | 12,838 | 0.238111 |
d20f67ca5ace0109a27cb8bee9fd7724ffdbb6df | 2,342 | py | Python | main_model/example.py | benmaier/DigCT | 62fc3fddb7600e2a43761e08618b2e3df423569c | [
"MIT"
] | null | null | null | main_model/example.py | benmaier/DigCT | 62fc3fddb7600e2a43761e08618b2e3df423569c | [
"MIT"
] | null | null | null | main_model/example.py | benmaier/DigCT | 62fc3fddb7600e2a43761e08618b2e3df423569c | [
"MIT"
] | 1 | 2021-07-12T13:50:35.000Z | 2021-07-12T13:50:35.000Z | import numpy as np
from simulation import simulation_code
from tqdm import tqdm
def make_length(arr,maxlen):
dL = maxlen - len(arr)
if dL > 0:
newa = np.concatenate((arr, np.ones(dL)*arr[-1]))
else:
newa = arr
return newa
def make_equal_length(arr_list):
maxlen = max([len(a) for ... | 23.897959 | 79 | 0.62041 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 218 | 0.093083 |
d2106f01efc43255c99ac9c1592bee8f1c926386 | 5,480 | py | Python | app/migrations/0002_appointment_doctor_patient_person_receptionist.py | sairamBikkina/sdp1 | e48cb01e8100259f95c16911f5fe6f843313464e | [
"MIT"
] | 5 | 2020-08-06T07:16:00.000Z | 2022-01-20T22:07:58.000Z | app/migrations/0002_appointment_doctor_patient_person_receptionist.py | sairamBikkina/sdp1 | e48cb01e8100259f95c16911f5fe6f843313464e | [
"MIT"
] | 2 | 2020-10-04T13:58:24.000Z | 2020-10-04T14:00:35.000Z | app/migrations/0002_appointment_doctor_patient_person_receptionist.py | sairamBikkina/sdp1 | e48cb01e8100259f95c16911f5fe6f843313464e | [
"MIT"
] | 3 | 2020-10-03T07:19:52.000Z | 2021-10-05T07:15:30.000Z | # Generated by Django 3.0.5 on 2020-05-24 10:19
import datetime
import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0001_initial'),
]
operations = [
migrations.Create... | 34.683544 | 87 | 0.387044 | 5,304 | 0.967883 | 0 | 0 | 0 | 0 | 0 | 0 | 462 | 0.084307 |
d210d3e4fc7f26c1bc84d6a2851b1aad30445d94 | 2,185 | py | Python | notebook/datetime_fromisoformat.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 174 | 2018-05-30T21:14:50.000Z | 2022-03-25T07:59:37.000Z | notebook/datetime_fromisoformat.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 5 | 2019-08-10T03:22:02.000Z | 2021-07-12T20:31:17.000Z | notebook/datetime_fromisoformat.py | vhn0912/python-snippets | 80b2e1d6b2b8f12ae30d6dbe86d25bb2b3a02038 | [
"MIT"
] | 53 | 2018-04-27T05:26:35.000Z | 2022-03-25T07:59:37.000Z | import datetime
s = '2018-12-31'
d = datetime.date.fromisoformat(s)
print(d)
# 2018-12-31
print(type(d))
# <class 'datetime.date'>
# print(datetime.date.fromisoformat('2018-12'))
# ValueError: Invalid isoformat string: '2018-12'
print(datetime.date.fromisoformat('2018-01-01'))
# 2018-01-01
# print(datetime.date.... | 20.809524 | 71 | 0.707551 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,365 | 0.624714 |
d211994f319cdf819a2e0d0b5d58c4101deb9cd5 | 418 | py | Python | app/main/models/hello_db.py | ZenithClown/flask-docker-template | cf5949fb6f448dd73cc287842b5deb1d5f7bd321 | [
"MIT"
] | null | null | null | app/main/models/hello_db.py | ZenithClown/flask-docker-template | cf5949fb6f448dd73cc287842b5deb1d5f7bd321 | [
"MIT"
] | 41 | 2021-09-01T17:31:47.000Z | 2022-03-28T12:13:12.000Z | app/main/models/hello_db.py | ZenithClown/flask-docker-template | cf5949fb6f448dd73cc287842b5deb1d5f7bd321 | [
"MIT"
] | 1 | 2021-12-22T07:25:08.000Z | 2021-12-22T07:25:08.000Z | # -*- encoding: utf-8 -*-
from .. import db
from ._base_model import ModelSchema
class HelloDB(db.Model, ModelSchema):
"""Use the Model to Establish a Connection to DB"""
__tablename__ = "HelloDB"
id = db.Column(db.Integer, primary_key = True, autoincrement = True, nullable = False)
field = db.Co... | 24.588235 | 93 | 0.665072 | 334 | 0.799043 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.203349 |
d2126b69bc34d19eeaa2b4aa3508f4499874a0f2 | 3,069 | py | Python | affineTransform.py | LuBru90/Facemorphing | ddeb8b0d368d62c66a032290cd756f0e3f3d6a81 | [
"Apache-2.0"
] | null | null | null | affineTransform.py | LuBru90/Facemorphing | ddeb8b0d368d62c66a032290cd756f0e3f3d6a81 | [
"Apache-2.0"
] | null | null | null | affineTransform.py | LuBru90/Facemorphing | ddeb8b0d368d62c66a032290cd756f0e3f3d6a81 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
import cv2
import time
def getTransformMatrix(origin, destination):
x = np.zeros(origin.shape[0] + 1) # insert [0]-element for better indexing -> x[1] = first element
x[1:] = origin[:,0]
y = np.copy(x)
y[1:] = origin[:,1]
x_ = np.copy(x)
x_[1... | 38.848101 | 121 | 0.491691 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 233 | 0.07592 |
d214f97afaf19189be80677ea4aa9be0be0607e7 | 4,219 | py | Python | demo_count.py | addtt/multi-object-datasets | d3b03ec56a9e971fed4d3519e8bfee5ed02ed9cb | [
"MIT"
] | 4 | 2020-01-06T08:50:04.000Z | 2021-12-06T08:41:13.000Z | demo_count.py | addtt/multi-object-datasets | d3b03ec56a9e971fed4d3519e8bfee5ed02ed9cb | [
"MIT"
] | 2 | 2021-06-08T20:48:25.000Z | 2021-09-08T01:35:58.000Z | demo_count.py | addtt/multi-object-datasets | d3b03ec56a9e971fed4d3519e8bfee5ed02ed9cb | [
"MIT"
] | 2 | 2020-11-19T14:20:29.000Z | 2021-01-12T12:00:44.000Z | import argparse
import os
import torch
import torch.nn.functional as F
from torch import nn
from torch.optim.adamax import Adamax
from multiobject.pytorch import MultiObjectDataLoader, MultiObjectDataset
epochs = 100
batch_size = 64
lr = 3e-4
dataset_filename = os.path.join(
'dsprites',
'multi_dsprites_color... | 27.756579 | 73 | 0.569803 | 1,207 | 0.286087 | 0 | 0 | 0 | 0 | 0 | 0 | 634 | 0.150273 |
d21501d0dc912be2f83952df41a003d90a5d9684 | 2,015 | py | Python | run_main_script.py | korombus/blender_battleVR_py | d0d0ccfabfa644fc97105e5cc99e86e37167cb55 | [
"MIT"
] | null | null | null | run_main_script.py | korombus/blender_battleVR_py | d0d0ccfabfa644fc97105e5cc99e86e37167cb55 | [
"MIT"
] | null | null | null | run_main_script.py | korombus/blender_battleVR_py | d0d0ccfabfa644fc97105e5cc99e86e37167cb55 | [
"MIT"
] | null | null | null | import bpy
import random
import math
## 固定値設定 #############################################################
# 実行ファイルパス一覧
FILE_ROOT_PATH = 'D:/blender_battleVR_py/'
setrendr_file_name = FILE_ROOT_PATH + "setting_render.py"
magicobj_file_name = FILE_ROOT_PATH + "magic_model.py"
fieldins_file_name = FILE_ROOT_PATH + "fie... | 31.984127 | 130 | 0.718114 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,073 | 0.462301 |
d215f5660d06095bfa19474e13bb492e71765463 | 2,014 | py | Python | apps/genres/tests/__init__.py | GiannisClipper/payments | 94e08144597b3f4cd0de8485edf3f5535aeb9da6 | [
"MIT"
] | null | null | null | apps/genres/tests/__init__.py | GiannisClipper/payments | 94e08144597b3f4cd0de8485edf3f5535aeb9da6 | [
"MIT"
] | null | null | null | apps/genres/tests/__init__.py | GiannisClipper/payments | 94e08144597b3f4cd0de8485edf3f5535aeb9da6 | [
"MIT"
] | null | null | null | from django.test import TestCase
import copy
from django.contrib.auth import get_user_model
from funds.models import Fund
from genres.models import Genre
from users.tests import UserCreateMethods
from funds.tests import FundCreateMethods
from users.tests import USER_SAMPLES, ADMIN_SAMPLES
from funds.tests import F... | 31.968254 | 86 | 0.602781 | 1,120 | 0.556107 | 0 | 0 | 0 | 0 | 0 | 0 | 446 | 0.22145 |
d2160cde3b51571cda15a85e9fdd3c56dfb2cae0 | 4,881 | py | Python | rltorch/papers/DQN/hyperparams.py | Jjschwartz/rltorch | eeb2ad955f018d768db98c4a2be5da96a75579f6 | [
"MIT"
] | null | null | null | rltorch/papers/DQN/hyperparams.py | Jjschwartz/rltorch | eeb2ad955f018d768db98c4a2be5da96a75579f6 | [
"MIT"
] | null | null | null | rltorch/papers/DQN/hyperparams.py | Jjschwartz/rltorch | eeb2ad955f018d768db98c4a2be5da96a75579f6 | [
"MIT"
] | null | null | null | """Hyperparameters from paper """
import numpy as np
import torch.optim as optim
from .model import DQN, DuelingDQN
class AtariHyperparams:
ALGO = "DQN"
SEED = 2
LOG_DISPLAY_FREQ = 10
# Image sizing
WIDTH = 84
HEIGHT = 84
# Number of most recent frames given as input to Q-network
A... | 31.901961 | 77 | 0.591477 | 4,761 | 0.975415 | 0 | 0 | 2,325 | 0.476337 | 0 | 0 | 1,430 | 0.292973 |
d2162729fc2afb100ad7e2d7244982b56598a414 | 822 | py | Python | scripts/problem0002.py | Joel301/Project_Euler | 2280dc19b8e0a2c956cf0d6db6c7d24eedd5e943 | [
"MIT"
] | null | null | null | scripts/problem0002.py | Joel301/Project_Euler | 2280dc19b8e0a2c956cf0d6db6c7d24eedd5e943 | [
"MIT"
] | null | null | null | scripts/problem0002.py | Joel301/Project_Euler | 2280dc19b8e0a2c956cf0d6db6c7d24eedd5e943 | [
"MIT"
] | null | null | null | #! python3
# -*- coding: utf-8 -*-
"""
Euler description from https://projecteuler.net/
Problem 0002
Each new term in the Fibonacci sequence is generated by adding the previous two
terms. By starting with 1 and 2, the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ...
By considering the terms in the Fibo... | 22.833333 | 79 | 0.644769 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 502 | 0.610706 |
d216db91805a0649ebde91802222cf781d19168b | 1,090 | py | Python | pandas/main.py | monishshah18/python-cp-cheatsheet | a5514b08816959de1198156f7764c54a7a585f20 | [
"Apache-2.0"
] | 140 | 2020-10-21T13:23:52.000Z | 2022-03-31T15:09:45.000Z | pandas/main.py | stacykutyepov/python-cp-cheatsheet | a00a57e1b36433648d1cace331e15ff276cef189 | [
"Apache-2.0"
] | 1 | 2021-07-22T14:01:25.000Z | 2021-07-22T14:01:25.000Z | pandas/main.py | stacykutyepov/python-cp-cheatsheet | a00a57e1b36433648d1cace331e15ff276cef189 | [
"Apache-2.0"
] | 33 | 2020-10-21T14:17:02.000Z | 2022-03-25T11:25:03.000Z | """
Summarize a column total cases column and total deaths column
Country by country data in columns, sum up and match global totals
"""
import csv
import pandas
pandas.set_option("display.max_rows", None, "display.max_columns", None)
col_list = ["Total Cases", "Country/ Other", "Total Deaths", "# 9/27/2020"]
df = p... | 34.0625 | 119 | 0.633945 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 437 | 0.400917 |
d2179a39d18a821a8ac003b90306797cd588fe76 | 908 | py | Python | conradomateu/day08/day08.py | CloudCoders/AdventOfCode2017 | 5a52d1e89076eccb55686e4af5848de289309813 | [
"MIT"
] | 8 | 2017-12-11T18:22:52.000Z | 2017-12-13T00:50:24.000Z | conradomateu/day08/day08.py | CloudCoders/AdventOfCode2017 | 5a52d1e89076eccb55686e4af5848de289309813 | [
"MIT"
] | 8 | 2017-12-01T14:31:29.000Z | 2017-12-07T21:43:43.000Z | conradomateu/day08/day08.py | CloudCoders/AdventOfCode2017 | 5a52d1e89076eccb55686e4af5848de289309813 | [
"MIT"
] | null | null | null | import operator
def parse(op):
dict[op[0]] = ops[op[1]](dict[op[0]], int(op[2]))
maxs.append(max(dict.values()))
def parser(exp):
return ops[exp[1]](dict[exp[0]], int(exp[2]))
def execute(op, exp):
if parser(exp):
parse(op)
def initDictVars(arr):
vars = set([x.split(' ')[0] for x in ... | 18.916667 | 71 | 0.544053 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 47 | 0.051762 |
d21892bc6e13fbca51eb7154188132cae4f0e838 | 667 | py | Python | app/db/events.py | ilya-goldin/kanban-board-app | 3c7026aedb0e21eaccc26a2ac4a37f0b6a91a122 | [
"MIT"
] | null | null | null | app/db/events.py | ilya-goldin/kanban-board-app | 3c7026aedb0e21eaccc26a2ac4a37f0b6a91a122 | [
"MIT"
] | null | null | null | app/db/events.py | ilya-goldin/kanban-board-app | 3c7026aedb0e21eaccc26a2ac4a37f0b6a91a122 | [
"MIT"
] | null | null | null | import asyncpg
from fastapi import FastAPI
from loguru import logger
from app.core.settings.app import AppSettings
async def connect_to_db(app: FastAPI, settings: AppSettings) -> None:
logger.info('Connecting to PostgreSQL')
app.state.pool = await asyncpg.create_pool(
str(settings.database_url),
... | 24.703704 | 69 | 0.731634 | 0 | 0 | 0 | 0 | 0 | 0 | 545 | 0.817091 | 101 | 0.151424 |
d21994c5a36ba9f1f16825926274957f83707bde | 912 | py | Python | Problem009/Python/solution_1.py | drocha87/ProjectEuler | c18407448aa4f05484191a0df1380e34f2b8c5d7 | [
"MIT"
] | 167 | 2015-08-12T19:32:03.000Z | 2022-03-25T12:26:43.000Z | Problem009/Python/solution_1.py | drocha87/ProjectEuler | c18407448aa4f05484191a0df1380e34f2b8c5d7 | [
"MIT"
] | 153 | 2016-02-16T02:05:31.000Z | 2020-11-06T15:35:51.000Z | Problem009/Python/solution_1.py | drocha87/ProjectEuler | c18407448aa4f05484191a0df1380e34f2b8c5d7 | [
"MIT"
] | 84 | 2015-08-12T20:54:04.000Z | 2022-02-27T05:14:53.000Z | #!/usr/bin/env python
# coding=utf-8
# Python Script
#
# Copyleft © Manoel Vilela
#
#
from __future__ import print_function
"""
Special Pythagorean triplet
Problem 9
A Pythagorean triplet is a set of three natural numbers, a < b < c, for which,
a² + b² = c²
For example, 3² + 4² = 9 + 16 = 25 = 52.
There exists ... | 19.826087 | 78 | 0.582237 | 0 | 0 | 297 | 0.323529 | 0 | 0 | 0 | 0 | 366 | 0.398693 |
d2201ef9718699e7cd1fdb19d37ed6f30c51724b | 1,248 | py | Python | contrib/automation_tests/orbit_load_presets.py | vwbaker/orbit | 361cc416d1b3ecbc07318275c1bdbc1bb1bc9651 | [
"BSD-2-Clause"
] | 2 | 2020-07-31T08:18:58.000Z | 2021-12-26T06:43:07.000Z | contrib/automation_tests/orbit_load_presets.py | jayant99acharya/orbit | f713721e33448a6b0dc8ea4c5aa587855337e32c | [
"BSD-2-Clause"
] | 3 | 2022-02-15T02:46:06.000Z | 2022-02-28T01:28:39.000Z | contrib/automation_tests/orbit_load_presets.py | jayant99acharya/orbit | f713721e33448a6b0dc8ea4c5aa587855337e32c | [
"BSD-2-Clause"
] | 1 | 2021-03-10T15:21:19.000Z | 2021-03-10T15:21:19.000Z | """
Copyright (c) 2020 The Orbit 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 absl import app
from core.orbit_e2e import E2ETestSuite
from test_cases.connection_window import FilterAndSelectFirstProcess, ConnectToStadiaInstanc... | 32 | 93 | 0.786058 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 738 | 0.591346 |
d22021e322a81ec24f4d2957e1994d21c7ec3963 | 52 | py | Python | interrogatio/shortcuts/__init__.py | ffaraone/interrogatio | 8b66e7fe73d14bfda38cc2eb3aecb3291e4afda1 | [
"BSD-3-Clause"
] | 5 | 2019-02-19T13:10:39.000Z | 2022-03-04T19:11:04.000Z | interrogatio/shortcuts/__init__.py | ffaraone/interrogatio | 8b66e7fe73d14bfda38cc2eb3aecb3291e4afda1 | [
"BSD-3-Clause"
] | 11 | 2020-03-24T16:58:41.000Z | 2021-12-14T10:19:17.000Z | interrogatio/shortcuts/__init__.py | ffaraone/interrogatio | 8b66e7fe73d14bfda38cc2eb3aecb3291e4afda1 | [
"BSD-3-Clause"
] | 2 | 2019-05-31T08:36:26.000Z | 2020-12-18T17:58:50.000Z | from interrogatio.shortcuts.dialogs import * # noqa | 52 | 52 | 0.807692 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.115385 |
d220977b89635aa8f8397e7f63e18931cf662876 | 609 | py | Python | skit_pipelines/components/extract_tgz.py | skit-ai/skit-pipelines | d692582107aee81b1bb4aebcf169f7260ac956b5 | [
"MIT"
] | null | null | null | skit_pipelines/components/extract_tgz.py | skit-ai/skit-pipelines | d692582107aee81b1bb4aebcf169f7260ac956b5 | [
"MIT"
] | 4 | 2022-03-22T14:17:46.000Z | 2022-03-24T16:22:23.000Z | skit_pipelines/components/extract_tgz.py | skit-ai/skit-pipelines | d692582107aee81b1bb4aebcf169f7260ac956b5 | [
"MIT"
] | null | null | null | from typing import Union
import kfp
from kfp.components import InputPath, OutputPath
from skit_pipelines import constants as pipeline_constants
def extract_tgz_archive(
tgz_path: InputPath(str),
output_path: OutputPath(str),
):
import tarfile
from loguru import logger
logger.debug(f"Extracting... | 22.555556 | 65 | 0.766831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.10509 |
d220ea28079528b416680ff1ccebd74a80b37141 | 4,438 | py | Python | python_modules/dagster/dagster_tests/core_tests/definitions_tests/test_input_defaults.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | 1 | 2021-04-27T19:49:59.000Z | 2021-04-27T19:49:59.000Z | python_modules/dagster/dagster_tests/core_tests/definitions_tests/test_input_defaults.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | 7 | 2022-03-16T06:55:04.000Z | 2022-03-18T07:03:25.000Z | python_modules/dagster/dagster_tests/core_tests/definitions_tests/test_input_defaults.py | bitdotioinc/dagster | 4fe395a37b206b1a48b956fa5dd72bf698104cca | [
"Apache-2.0"
] | null | null | null | import pytest
from dagster import (
DagsterInvalidDefinitionError,
InputDefinition,
Nothing,
Optional,
composite_solid,
execute_pipeline,
execute_solid,
lambda_solid,
pipeline,
)
def test_none():
@lambda_solid(input_defs=[InputDefinition("x", Optional[int], default_value=None)... | 25.36 | 109 | 0.677332 | 0 | 0 | 0 | 0 | 1,951 | 0.439612 | 0 | 0 | 408 | 0.091933 |
d2213ea96c7a47974d92d29c00540c2195a53bed | 69 | py | Python | vivid/__init__.py | blacktanktop/vivid | e85837bcd86575f8a275517250dd026aac3e451f | [
"BSD-2-Clause-FreeBSD"
] | 39 | 2020-05-13T18:13:25.000Z | 2022-03-02T10:46:53.000Z | vivid/__init__.py | blacktanktop/vivid | e85837bcd86575f8a275517250dd026aac3e451f | [
"BSD-2-Clause-FreeBSD"
] | 29 | 2020-05-13T18:04:09.000Z | 2022-02-27T04:43:18.000Z | vivid/__init__.py | blacktanktop/vivid | e85837bcd86575f8a275517250dd026aac3e451f | [
"BSD-2-Clause-FreeBSD"
] | 3 | 2020-05-13T19:17:01.000Z | 2020-10-28T21:29:42.000Z | from .core import BaseBlock
from .runner import Runner, create_runner | 34.5 | 41 | 0.84058 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d2214310a3d3e2da5645867f809ad278174b1b1c | 473 | py | Python | rsa.py | overrkill/security | cd473013652903d6b21fa83f2c57a07f289078e6 | [
"MIT"
] | 1 | 2020-05-08T07:32:16.000Z | 2020-05-08T07:32:16.000Z | rsa.py | overrkill/security | cd473013652903d6b21fa83f2c57a07f289078e6 | [
"MIT"
] | null | null | null | rsa.py | overrkill/security | cd473013652903d6b21fa83f2c57a07f289078e6 | [
"MIT"
] | null | null | null | import math as m
p=int(input("enter a prime integer p "))
q=int(input("enter a prime integer q "))
num=int(input("enter a number to encrypt "))
n=p*q
z=(p-1)*(q-1)
for e in range(2,z):
if m.gcd(e,z)==1:
break
for i in range(1,10):
x=1+i*z
if x%e==0:
d=int(x/e)
break
alpha=pow(num,e)
ctt=alpha % n
beta=pow(c... | 17.518519 | 61 | 0.610994 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.310782 |
d221a299320cc8e2a6ab063e29d7c98428b76ee2 | 831 | py | Python | python_2_script/komand_python_2_script/actions/run/action.py | GreyNoise-Intelligence/insightconnect-plugins | 2ba3121d42fd96e1267bb095bc76b962678c1f56 | [
"MIT"
] | null | null | null | python_2_script/komand_python_2_script/actions/run/action.py | GreyNoise-Intelligence/insightconnect-plugins | 2ba3121d42fd96e1267bb095bc76b962678c1f56 | [
"MIT"
] | null | null | null | python_2_script/komand_python_2_script/actions/run/action.py | GreyNoise-Intelligence/insightconnect-plugins | 2ba3121d42fd96e1267bb095bc76b962678c1f56 | [
"MIT"
] | null | null | null | import komand
from .schema import RunInput, RunOutput
# Custom imports below
class Run(komand.Action):
def __init__(self):
super(self.__class__, self).__init__(
name="run", description="Run command", input=RunInput(), output=RunOutput()
)
def construct(self, func):
func +... | 22.459459 | 87 | 0.545126 | 750 | 0.902527 | 0 | 0 | 0 | 0 | 0 | 0 | 178 | 0.2142 |
d221e2f598eaeab4c5c60286a3134659beef83e8 | 636 | py | Python | config/configSample.py | snipeso/sample_psychopy | 332cd34cf2c584f9ba01302050964649dd2e5367 | [
"Linux-OpenIB"
] | null | null | null | config/configSample.py | snipeso/sample_psychopy | 332cd34cf2c584f9ba01302050964649dd2e5367 | [
"Linux-OpenIB"
] | 3 | 2021-06-02T00:56:48.000Z | 2021-09-08T01:35:53.000Z | config/configSample.py | snipeso/sample_psychopy | 332cd34cf2c584f9ba01302050964649dd2e5367 | [
"Linux-OpenIB"
] | null | null | null | from config.updateConfig import UpdateConfig
sampleCONF = {
"task": {
"name": "sample",
},
"instructions": {
"text": "Give instructions",
"startPrompt": "Press any key to continue. Press q to quit.",
"alarm": "horn.wav",
"questionnaireReminder": "answerQuestionnaire.... | 22.714286 | 99 | 0.630503 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 276 | 0.433962 |
d2222f7d6b30cad257fa79d950b134ab33ead31c | 2,994 | py | Python | oneflow/python/test/onnx/util.py | basicv8vc/oneflow | 2a0480b3f4ff42a59fcae945a3b3bb2d208e37a3 | [
"Apache-2.0"
] | 1 | 2020-10-13T03:03:40.000Z | 2020-10-13T03:03:40.000Z | oneflow/python/test/onnx/util.py | basicv8vc/oneflow | 2a0480b3f4ff42a59fcae945a3b3bb2d208e37a3 | [
"Apache-2.0"
] | null | null | null | oneflow/python/test/onnx/util.py | basicv8vc/oneflow | 2a0480b3f4ff42a59fcae945a3b3bb2d208e37a3 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow 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 applicable law or agr... | 33.640449 | 89 | 0.671343 | 0 | 0 | 0 | 0 | 274 | 0.091516 | 0 | 0 | 762 | 0.254509 |
d2233790f33ba2cc856d503da044f2647bccf7b5 | 237 | py | Python | pymodule1/Hello1.py | debjava/pymodule1 | 8e5f63660f0b835709896cc50ed1147b386422a2 | [
"MIT"
] | null | null | null | pymodule1/Hello1.py | debjava/pymodule1 | 8e5f63660f0b835709896cc50ed1147b386422a2 | [
"MIT"
] | null | null | null | pymodule1/Hello1.py | debjava/pymodule1 | 8e5f63660f0b835709896cc50ed1147b386422a2 | [
"MIT"
] | null | null | null | '''
Created on Mar 30, 2019
@author: PIKU
'''
def justSayHello():
print("Hello ...")
def getHello():
return "Hello guys"
if __name__ == '__main__':
justSayHello()
x = getHello()
print(x)
| 11.85 | 27 | 0.523207 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 83 | 0.350211 |
d22400f5a3ef8a9ceac1f66b5070a0a5f8fc69d4 | 1,090 | py | Python | scripts/Evaluation_Metrics/mean_average.py | Mr-TalhaIlyas/CED-Net-Crops-and-Weeds-Segmentation-for-Smart-Farming-Using | dc1b645ad1a3a00ef650b170a4ac4c26ab0d687a | [
"CC-BY-4.0"
] | null | null | null | scripts/Evaluation_Metrics/mean_average.py | Mr-TalhaIlyas/CED-Net-Crops-and-Weeds-Segmentation-for-Smart-Farming-Using | dc1b645ad1a3a00ef650b170a4ac4c26ab0d687a | [
"CC-BY-4.0"
] | null | null | null | scripts/Evaluation_Metrics/mean_average.py | Mr-TalhaIlyas/CED-Net-Crops-and-Weeds-Segmentation-for-Smart-Farming-Using | dc1b645ad1a3a00ef650b170a4ac4c26ab0d687a | [
"CC-BY-4.0"
] | 1 | 2021-03-29T01:49:49.000Z | 2021-03-29T01:49:49.000Z | from Evaluation_Metrics.Average_Precision import ElevenPointInterpolatedAP
from Evaluation_Metrics.New_Metric import TP_FP
def mean_AP(GT,PRED,TH):
Rice_GT=GT[:,:,:,1]
Weed_GT=GT[:,:,:,0]
Rice_P=PRED[:,:,:,1]
Weed_P=PRED[:,:,:,0]
TP_R,FP_R=TP_FP(Rice_GT,Rice_P,TH)
Acc_TPR=[]
s=0
for i i... | 22.244898 | 74 | 0.547706 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d22588027964a9ce9520023258895efa1631a6bd | 5,001 | py | Python | src/peter_sslers/lib/errors.py | jvanasco/pyramid_letsencrypt_admin | 6db37d30ef8028ff978bf6083cdf978fc88a4782 | [
"MIT"
] | 35 | 2016-04-21T18:55:31.000Z | 2022-03-30T08:22:43.000Z | src/peter_sslers/lib/errors.py | jvanasco/pyramid_letsencrypt_admin | 6db37d30ef8028ff978bf6083cdf978fc88a4782 | [
"MIT"
] | 8 | 2018-05-23T13:38:49.000Z | 2021-03-19T21:05:44.000Z | src/peter_sslers/lib/errors.py | jvanasco/pyramid_letsencrypt_admin | 6db37d30ef8028ff978bf6083cdf978fc88a4782 | [
"MIT"
] | 2 | 2016-08-18T21:07:11.000Z | 2017-01-11T09:47:40.000Z | def formstash_to_querystring(formStash):
err = []
for (k, v) in formStash.errors.items():
err.append(("%s--%s" % (k, v)).replace("\n", "+").replace(" ", "+"))
err = sorted(err)
err = "---".join(err)
return err
class _UrlSafeException(Exception):
@property
def as_querystring(self):
... | 20.084337 | 118 | 0.659868 | 4,536 | 0.907019 | 0 | 0 | 235 | 0.046991 | 0 | 0 | 1,770 | 0.353929 |
d22743bfb3140f3685546e3e673c4427883f8ae7 | 771 | py | Python | tips-lib/tools/ordo/cc.py | cosmoss-jigu/tips | 386b992894363b535876020d1e60aa95f3d05f7c | [
"Apache-2.0"
] | 13 | 2021-07-16T07:52:15.000Z | 2022-02-13T10:52:46.000Z | tips-lib/tools/ordo/cc.py | cosmoss-jigu/tips | 386b992894363b535876020d1e60aa95f3d05f7c | [
"Apache-2.0"
] | null | null | null | tips-lib/tools/ordo/cc.py | cosmoss-jigu/tips | 386b992894363b535876020d1e60aa95f3d05f7c | [
"Apache-2.0"
] | 5 | 2021-08-09T13:16:23.000Z | 2022-03-09T08:50:19.000Z | #!/usr/bin/env python3
import sys
offset_table = []
def get_freq(a):
v = {}
for i in a:
if i in v:
v[i] += 1
else:
v.update({i: 1})
return v
def process_file(filename):
freq = {}
a = []
median = 0
with open(filename, "r") as f:
a = f.read... | 17.133333 | 69 | 0.460441 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 76 | 0.098573 |
d2293531f48224d20922b0077cb19bb8cfd631bb | 18,212 | py | Python | cognitive_services/__main__.py | cleveranjos/Rapid-ML-Gateway | 10a14abfce3351791331642c47eddfbf622e76d2 | [
"MIT"
] | 3 | 2020-07-15T19:45:31.000Z | 2020-09-30T16:15:48.000Z | cognitive_services/__main__.py | cleveranjos/Rapid-ML-Gateway | 10a14abfce3351791331642c47eddfbf622e76d2 | [
"MIT"
] | 12 | 2020-07-15T17:00:24.000Z | 2021-01-19T21:02:00.000Z | cognitive_services/__main__.py | cleveranjos/Rapid-ML-Gateway | 10a14abfce3351791331642c47eddfbf622e76d2 | [
"MIT"
] | 2 | 2020-07-15T18:59:02.000Z | 2020-10-07T17:22:52.000Z | #! /usr/bin/env python3
import os
import sys
PARENT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(os.path.join(PARENT_DIR, 'generated'))
sys.path.append(os.path.join(PARENT_DIR, 'helper_functions'))
import argparse
import json
import logging
import logging.config
import inspect, tim... | 43.361905 | 167 | 0.597024 | 16,297 | 0.89485 | 7,326 | 0.402262 | 8,121 | 0.445915 | 0 | 0 | 6,150 | 0.337689 |
d2296fe0c90ef20ef9cee97c8335c9349c8e3dec | 1,534 | py | Python | spirecomm/spire/card.py | ysjin94/Slaying_the_Spire_AI | 172b2e44b9da81f35cbdfa1ee0fd2a4ecbc66634 | [
"MIT"
] | null | null | null | spirecomm/spire/card.py | ysjin94/Slaying_the_Spire_AI | 172b2e44b9da81f35cbdfa1ee0fd2a4ecbc66634 | [
"MIT"
] | null | null | null | spirecomm/spire/card.py | ysjin94/Slaying_the_Spire_AI | 172b2e44b9da81f35cbdfa1ee0fd2a4ecbc66634 | [
"MIT"
] | 2 | 2020-07-13T18:21:46.000Z | 2020-08-04T21:18:10.000Z | from enum import Enum
class CardType(Enum):
ATTACK = 1
SKILL = 2
POWER = 3
STATUS = 4
CURSE = 5
class CardRarity(Enum):
BASIC = 1
COMMON = 2
UNCOMMON = 3
RARE = 4
SPECIAL = 5
CURSE = 6
class Card:
def __init__(self, card_id, name, card_type, rarity, upgrades=0, has_... | 26.448276 | 156 | 0.582138 | 1,503 | 0.979791 | 0 | 0 | 646 | 0.421121 | 0 | 0 | 96 | 0.062581 |
d229bf33f366491dd645f2b26164b3b0a59e7d44 | 114 | py | Python | src/typeDefs/lineFlowSumm.py | nagasudhirpulla/wrldc_scada_mumbai_dashboard | bc107ef47568781b588316f0c5c0c0d2a08adac8 | [
"MIT"
] | null | null | null | src/typeDefs/lineFlowSumm.py | nagasudhirpulla/wrldc_scada_mumbai_dashboard | bc107ef47568781b588316f0c5c0c0d2a08adac8 | [
"MIT"
] | null | null | null | src/typeDefs/lineFlowSumm.py | nagasudhirpulla/wrldc_scada_mumbai_dashboard | bc107ef47568781b588316f0c5c0c0d2a08adac8 | [
"MIT"
] | null | null | null | from typing import TypedDict
class ILineFlowSumm(TypedDict):
inst: dict
maxFlow: dict
maxTime: dict
| 14.25 | 31 | 0.719298 | 82 | 0.719298 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d22a005c486e400a70fdda2609e473e34cb98a87 | 1,280 | py | Python | eval/user.py | hscspring/chatbot | 9d0bc91db0d8834a1a75cba3edcd3133191e80af | [
"Apache-2.0"
] | null | null | null | eval/user.py | hscspring/chatbot | 9d0bc91db0d8834a1a75cba3edcd3133191e80af | [
"Apache-2.0"
] | null | null | null | eval/user.py | hscspring/chatbot | 9d0bc91db0d8834a1a75cba3edcd3133191e80af | [
"Apache-2.0"
] | null | null | null | import os
import random
import numpy as np
import torch
from chatbot_agent.nlu import BERTNLU
from chatbot_agent.policy.rule import RulePolicy
from chatbot_agent.nlg import TemplateNLG
from chatbot_agent.agent import PipelineAgent
from chatbot_agent.analyzer import Analyzer
def set_seed(r_seed):
random.seed(r_se... | 26.666667 | 82 | 0.742188 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 231 | 0.180469 |
d22b9934bc74f943c4699852c43f6be8c7246c45 | 3,027 | py | Python | insights/parsers/tests/test_zipl_conf.py | lhuett/insights-core | 1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8 | [
"Apache-2.0"
] | 121 | 2017-05-30T20:23:25.000Z | 2022-03-23T12:52:15.000Z | insights/parsers/tests/test_zipl_conf.py | lhuett/insights-core | 1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8 | [
"Apache-2.0"
] | 1,977 | 2017-05-26T14:36:03.000Z | 2022-03-31T10:38:53.000Z | insights/parsers/tests/test_zipl_conf.py | lhuett/insights-core | 1c84eeffc037f85e2bbf60c9a302c83aa1a50cf8 | [
"Apache-2.0"
] | 244 | 2017-05-30T20:22:57.000Z | 2022-03-26T10:09:39.000Z | from insights.parsers.zipl_conf import ZiplConf
from insights.tests import context_wrap
from insights.parsers import ParseException
import pytest
ZIPL_CONF = """
[defaultboot]
defaultauto
prompt=1
timeout=5
default=linux
target=/boot
[linux]
image=/boot/vmlinuz-3.10.0-693.el7.s390x
ramdisk=/boot/initramfs-3.10... | 41.465753 | 269 | 0.720846 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,280 | 0.753221 |
d22d10f837e5ad288e126f1c5e79e0d962cba280 | 6,560 | py | Python | tests/services/http_service.py | the-gw/tomodachi | a1e2efc1abe6f4e2de4a580e58184323660b4299 | [
"MIT"
] | null | null | null | tests/services/http_service.py | the-gw/tomodachi | a1e2efc1abe6f4e2de4a580e58184323660b4299 | [
"MIT"
] | null | null | null | tests/services/http_service.py | the-gw/tomodachi | a1e2efc1abe6f4e2de4a580e58184323660b4299 | [
"MIT"
] | null | null | null | import asyncio
import os
import signal
import tomodachi
from typing import Any, Dict, Tuple, Callable, Union # noqa
from aiohttp import web
from tomodachi.transport.http import http, http_error, http_static, websocket, Response, RequestHandler
from tomodachi.discovery.dummy_registry import DummyRegistry
async def mi... | 33.989637 | 131 | 0.611738 | 5,778 | 0.880256 | 0 | 0 | 5,797 | 0.883151 | 4,479 | 0.682358 | 1,274 | 0.194089 |
d22d16cc4c908be77ff9ce274ee5534ee91f29e1 | 13,624 | py | Python | mantrid/loadbalancer.py | epio/mantrid | 1c699f1a4b33888b533c19cb6d025173f2160576 | [
"BSD-3-Clause"
] | 30 | 2015-01-01T00:32:47.000Z | 2021-09-07T20:25:01.000Z | mantrid/loadbalancer.py | epio/mantrid | 1c699f1a4b33888b533c19cb6d025173f2160576 | [
"BSD-3-Clause"
] | null | null | null | mantrid/loadbalancer.py | epio/mantrid | 1c699f1a4b33888b533c19cb6d025173f2160576 | [
"BSD-3-Clause"
] | 9 | 2015-05-12T05:09:12.000Z | 2021-12-29T19:07:01.000Z | import eventlet
import errno
import logging
import traceback
import mimetools
import resource
import json
import os
import sys
import argparse
from eventlet import wsgi
from eventlet.green import socket
from .actions import Unknown, Proxy, Empty, Static, Redirect, NoHosts, Spin
from .config import SimpleConfig
from .ma... | 38.485876 | 153 | 0.545435 | 13,152 | 0.965355 | 0 | 0 | 2,202 | 0.161627 | 0 | 0 | 3,478 | 0.255285 |
d22daea1e02414a246423f9065c5355093e77a88 | 18,989 | py | Python | pyhelp/managers.py | FHuchet/pyhelp | 9d658f5c6f6d8aee8e528ca9946a40eac0ff3a68 | [
"MIT"
] | 1 | 2020-07-20T20:32:15.000Z | 2020-07-20T20:32:15.000Z | pyhelp/managers.py | FHuchet/pyhelp | 9d658f5c6f6d8aee8e528ca9946a40eac0ff3a68 | [
"MIT"
] | null | null | null | pyhelp/managers.py | FHuchet/pyhelp | 9d658f5c6f6d8aee8e528ca9946a40eac0ff3a68 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright © 2018 PyHelp Project Contributors
# https://github.com/jnsebgosselin/pyhelp
#
# This file is part of PyHelp.
# Licensed under the terms of the GNU General Public License.
# ---- Standard Library Imports
import os
import os.path as osp
# ---- Third Party imports
import numpy as ... | 37.015595 | 79 | 0.596609 | 17,503 | 0.921696 | 0 | 0 | 793 | 0.041759 | 0 | 0 | 5,478 | 0.288468 |
d22e790f560b51447016ed3ce2c5663688b5fd74 | 6,131 | py | Python | tests/unit/test_types.py | OvalMoney/momapper | 9bcf1909a80677cab831132444be27fa4adaa2a5 | [
"MIT"
] | null | null | null | tests/unit/test_types.py | OvalMoney/momapper | 9bcf1909a80677cab831132444be27fa4adaa2a5 | [
"MIT"
] | null | null | null | tests/unit/test_types.py | OvalMoney/momapper | 9bcf1909a80677cab831132444be27fa4adaa2a5 | [
"MIT"
] | null | null | null | from decimal import Decimal
import pytest
from bson import Decimal128
from momapper import MappedClass, Field
from momapper.mongodb.collection import MappedCollection
from momapper.types import (
DecimalType,
ValidationError,
IntType,
FloatType,
StringType,
ByteType,
BoolType,
ListType... | 31.280612 | 88 | 0.669222 | 791 | 0.129016 | 0 | 0 | 5,032 | 0.820747 | 0 | 0 | 330 | 0.053825 |
d230b8b07301d92ab203c4ea79e6dcb73031cdf8 | 36 | py | Python | deepleaps/workspace/src/ipc/CustomCommand.py | Longseabear/deep-leaps-pytorch | abcb87f3079c0612bde4a4f94c75d7c05d5aee3a | [
"MIT"
] | 1 | 2021-02-27T18:00:39.000Z | 2021-02-27T18:00:39.000Z | deepleaps/workspace/src/ipc/CustomCommand.py | Longseabear/deep-leaps-pytorch | abcb87f3079c0612bde4a4f94c75d7c05d5aee3a | [
"MIT"
] | null | null | null | deepleaps/workspace/src/ipc/CustomCommand.py | Longseabear/deep-leaps-pytorch | abcb87f3079c0612bde4a4f94c75d7c05d5aee3a | [
"MIT"
] | null | null | null | import deepleaps.ipc.RunningCommand
| 18 | 35 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d230ba96d95fc33b542202e8343f1394390c32cd | 26,878 | py | Python | sharpy/solvers/dynamiccoupled.py | ostodieck/sharpy | b85aa1c001a0ec851af4eb259cce7c01dfa68b9e | [
"BSD-3-Clause"
] | 1 | 2020-07-27T05:15:35.000Z | 2020-07-27T05:15:35.000Z | sharpy/solvers/dynamiccoupled.py | briandesilva/sharpy | aed86428ff88fd14d36cabd91cf7e04b5fc9a39a | [
"BSD-3-Clause"
] | null | null | null | sharpy/solvers/dynamiccoupled.py | briandesilva/sharpy | aed86428ff88fd14d36cabd91cf7e04b5fc9a39a | [
"BSD-3-Clause"
] | null | null | null | import ctypes as ct
import time
import copy
import numpy as np
import sharpy.aero.utils.mapping as mapping
import sharpy.utils.cout_utils as cout
import sharpy.utils.solver_interface as solver_interface
import sharpy.utils.controller_interface as controller_interface
from sharpy.utils.solver_interface import solver, ... | 43.775244 | 230 | 0.613625 | 25,839 | 0.961344 | 0 | 0 | 25,847 | 0.961641 | 0 | 0 | 8,267 | 0.307575 |
d232def19f888f5ef15eb9c21425eef07dc01fdd | 4,734 | py | Python | pony/orm/tests/test_generator_db_session.py | ProgHaj/pony | 52720af1728ab2931364be8615e18ad8714a7c9e | [
"Apache-2.0"
] | 2,628 | 2015-01-02T17:55:28.000Z | 2022-03-31T10:36:42.000Z | pony/orm/tests/test_generator_db_session.py | ProgHaj/pony | 52720af1728ab2931364be8615e18ad8714a7c9e | [
"Apache-2.0"
] | 525 | 2015-01-03T20:30:08.000Z | 2022-03-23T12:30:01.000Z | pony/orm/tests/test_generator_db_session.py | ProgHaj/pony | 52720af1728ab2931364be8615e18ad8714a7c9e | [
"Apache-2.0"
] | 256 | 2015-01-02T17:55:31.000Z | 2022-03-20T17:01:37.000Z | from __future__ import absolute_import, print_function, division
import unittest
from pony.orm.core import *
from pony.orm.core import local
from pony.orm.tests.testutils import *
from pony.orm.tests import setup_database, teardown_database
class TestGeneratorDbSession(unittest.TestCase):
def setUp(self):
... | 25.451613 | 113 | 0.555978 | 4,440 | 0.937896 | 3,194 | 0.674694 | 2,358 | 0.498099 | 0 | 0 | 404 | 0.08534 |
d234e5a37645a98c004023879e482d81ecedb1c6 | 725 | py | Python | private_sharing/migrations/0008_featuredproject.py | danamlewis/open-humans | 9b08310cf151f49032b66ddd005bbd47d466cc4e | [
"MIT"
] | 57 | 2016-09-01T21:55:52.000Z | 2022-03-27T22:15:32.000Z | private_sharing/migrations/0008_featuredproject.py | danamlewis/open-humans | 9b08310cf151f49032b66ddd005bbd47d466cc4e | [
"MIT"
] | 464 | 2015-03-23T18:08:28.000Z | 2016-08-25T04:57:36.000Z | private_sharing/migrations/0008_featuredproject.py | danamlewis/open-humans | 9b08310cf151f49032b66ddd005bbd47d466cc4e | [
"MIT"
] | 25 | 2017-01-24T16:23:27.000Z | 2021-11-07T01:51:42.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2018-01-05 01:20
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('private_sharing', '0007_auto_20171220_2038'),
]
operations = [
migrations.CreateMod... | 30.208333 | 133 | 0.623448 | 575 | 0.793103 | 0 | 0 | 0 | 0 | 0 | 0 | 195 | 0.268966 |
d235a418647a421cc3cde687c03b74bacf4239b5 | 5,759 | py | Python | Tests/Validation/Optimization/test_zdt3.py | magnetron/pyleecan | 2a3338f4ab080ad6488b5ab8746c3fea1f36f177 | [
"Apache-2.0"
] | 1 | 2021-02-26T12:28:45.000Z | 2021-02-26T12:28:45.000Z | Tests/Validation/Optimization/test_zdt3.py | magnetron/pyleecan | 2a3338f4ab080ad6488b5ab8746c3fea1f36f177 | [
"Apache-2.0"
] | null | null | null | Tests/Validation/Optimization/test_zdt3.py | magnetron/pyleecan | 2a3338f4ab080ad6488b5ab8746c3fea1f36f177 | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Test Pyleecan optimization module using Zitzler–Deb–Thiele's function N. 3
"""
import pytest
from ....definitions import PACKAGE_NAME
from ....Tests.Validation.Machine.SCIM_001 import SCIM_001
from ....Classes.InputCurrent import InputCurrent
from ....Classes.MagFEMM import MagFEMM
from ....Classes... | 30.310526 | 94 | 0.581177 | 0 | 0 | 0 | 0 | 4,901 | 0.850425 | 0 | 0 | 1,302 | 0.225924 |
d2366db96566571009998f46fd017359e1980f42 | 325 | py | Python | comm_lib/import_lib.py | GUTLY/machine_learning_in_action | 7820c948014c615ed10f693f03ea116a0f7d6b96 | [
"Apache-2.0"
] | null | null | null | comm_lib/import_lib.py | GUTLY/machine_learning_in_action | 7820c948014c615ed10f693f03ea116a0f7d6b96 | [
"Apache-2.0"
] | null | null | null | comm_lib/import_lib.py | GUTLY/machine_learning_in_action | 7820c948014c615ed10f693f03ea116a0f7d6b96 | [
"Apache-2.0"
] | null | null | null | """
@Time : 12/4/2020 13:57
@Author : Young lee
@File : import_lib
@Project : machine_learning_in_action
"""
import collections
import math
import os
import random
import sys
import tarfile
import time
import zipfile
import operator
from IPython import display
from matplotlib import pyplot as plt
import numpy a... | 16.25 | 37 | 0.775385 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.353846 |
d236f9020f43723fb7080a085f23e82a9664de09 | 590 | py | Python | example/example.py | fmilthaler/HTMLParser | ebe343796e32a25726b6659742196ceaab30bb3d | [
"MIT"
] | null | null | null | example/example.py | fmilthaler/HTMLParser | ebe343796e32a25726b6659742196ceaab30bb3d | [
"MIT"
] | null | null | null | example/example.py | fmilthaler/HTMLParser | ebe343796e32a25726b6659742196ceaab30bb3d | [
"MIT"
] | null | null | null | from htmlparser import HTMLParser
import pandas
# Here we scrap a page from Wikipedia, parse it for tables, and convert the first table found into a `pandas.DataFrame`.
url = "https://en.wikipedia.org/wiki/List_of_S%26P_500_companies"
hp = HTMLParser(url)
# scrapping the webpage
page = hp.scrap_url()
# extracting only... | 36.875 | 120 | 0.772881 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 329 | 0.557627 |
d2374979329fc2d21717d5eca2294d35f3c0c1d9 | 2,099 | py | Python | project_name/common/models.py | brevetech/breve_drf_template | 125e476810641f919296cb878980f91f4c091cf2 | [
"MIT"
] | null | null | null | project_name/common/models.py | brevetech/breve_drf_template | 125e476810641f919296cb878980f91f4c091cf2 | [
"MIT"
] | 17 | 2021-04-05T00:22:13.000Z | 2022-01-11T04:53:47.000Z | project_name/common/models.py | brevetech/breve_drf_template | 125e476810641f919296cb878980f91f4c091cf2 | [
"MIT"
] | 1 | 2022-01-07T05:48:19.000Z | 2022-01-07T05:48:19.000Z | from django.db import models
# https://stackoverflow.com/questions/1737017/django-auto-now-and-auto-now-add/1737078#1737078
from {{project_name}}.common.enums import PersonSexEnum
class TimeStampedModel(models.Model):
"""
Defines a timestamped model with create_date (auto_now_add) and update_date (auto_now)
... | 32.292308 | 97 | 0.682706 | 1,919 | 0.911206 | 0 | 0 | 0 | 0 | 0 | 0 | 528 | 0.250712 |
d2387686143e714809862b9c318c59cf934f177d | 4,881 | py | Python | PikaBus/tools/PikaTools.py | alexbodn/PikaBus | 5faf2e48f4d4deecb4428707f94bcf72a81cc3ee | [
"MIT"
] | 7 | 2020-03-21T12:22:18.000Z | 2022-02-10T11:43:51.000Z | PikaBus/tools/PikaTools.py | alexbodn/PikaBus | 5faf2e48f4d4deecb4428707f94bcf72a81cc3ee | [
"MIT"
] | null | null | null | PikaBus/tools/PikaTools.py | alexbodn/PikaBus | 5faf2e48f4d4deecb4428707f94bcf72a81cc3ee | [
"MIT"
] | 1 | 2021-06-21T10:56:56.000Z | 2021-06-21T10:56:56.000Z | from typing import Union, List
import pika
import pika.exceptions
import time
import logging
def CreateDurableQueue(channel: pika.adapters.blocking_connection.BlockingChannel, queue: str,
settings: dict = None):
if settings is None:
settings = {}
channel.queue_declare(queue,
... | 38.132813 | 132 | 0.629379 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 247 | 0.050604 |
d23a8dd5865bbf7ea08abcad56ee55962f12112f | 16,087 | py | Python | roundup/backends/blobfiles.py | Noschvie/roundup | 996377ed0d12c69a01c7565dc5f47d6fb0ccaf19 | [
"MIT"
] | 1 | 2015-12-17T08:09:28.000Z | 2015-12-17T08:09:28.000Z | roundup/backends/blobfiles.py | Noschvie/roundup | 996377ed0d12c69a01c7565dc5f47d6fb0ccaf19 | [
"MIT"
] | null | null | null | roundup/backends/blobfiles.py | Noschvie/roundup | 996377ed0d12c69a01c7565dc5f47d6fb0ccaf19 | [
"MIT"
] | 1 | 2015-07-10T08:16:24.000Z | 2015-07-10T08:16:24.000Z | #
# Copyright (c) 2001 Bizar Software Pty Ltd (http://www.bizarsoftware.com.au/)
# This module is free software, and you may redistribute it and/or modify
# under the same terms as Python, so long as this copyright message and
# disclaimer are retained in their original form.
#
# IN NO EVENT SHALL BIZAR SOFTWARE PTY LT... | 39.525799 | 82 | 0.654752 | 14,620 | 0.908808 | 0 | 0 | 0 | 0 | 0 | 0 | 11,292 | 0.701933 |
d23c5a7f0d13366045cfa8ea9d83ec4de2417ed0 | 1,467 | py | Python | LeetCode/E2 - Add Two Numbers/solution.py | ltdangkhoa/Computer-Science-Fundamental | b70ba714e1dd13fcb377125e047c5fc08d3a82b3 | [
"MIT"
] | null | null | null | LeetCode/E2 - Add Two Numbers/solution.py | ltdangkhoa/Computer-Science-Fundamental | b70ba714e1dd13fcb377125e047c5fc08d3a82b3 | [
"MIT"
] | null | null | null | LeetCode/E2 - Add Two Numbers/solution.py | ltdangkhoa/Computer-Science-Fundamental | b70ba714e1dd13fcb377125e047c5fc08d3a82b3 | [
"MIT"
] | null | null | null | """solution.py"""
# Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
class Solution:
def addTwoNumbers(self, l1: ListNode, l2: ListNode) -> ListNode:
"""
T: O(?)
S: O(?)
"""
l3 = ListNode(0)
... | 23.66129 | 68 | 0.445808 | 1,408 | 0.959782 | 0 | 0 | 0 | 0 | 0 | 0 | 147 | 0.100204 |
d23c85c65422eeb7798338451574df0f59e40725 | 1,984 | py | Python | networking_mlnx/dhcp/mlnx_dhcp.py | stackhpc/networking-mlnx | 6a297fd040ff09e26e477b90f2fb229dc6a691b2 | [
"Apache-2.0"
] | null | null | null | networking_mlnx/dhcp/mlnx_dhcp.py | stackhpc/networking-mlnx | 6a297fd040ff09e26e477b90f2fb229dc6a691b2 | [
"Apache-2.0"
] | null | null | null | networking_mlnx/dhcp/mlnx_dhcp.py | stackhpc/networking-mlnx | 6a297fd040ff09e26e477b90f2fb229dc6a691b2 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 Mellanox Technologies, Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 34.807018 | 78 | 0.681452 | 1,282 | 0.646169 | 0 | 0 | 0 | 0 | 0 | 0 | 626 | 0.315524 |
d23df24d42dc33a797b2ad6f76f674f1c588ed01 | 679 | py | Python | solution/practice/algorithms/warmup/plus-minus/solution.py | benevolentPreta/HackerRank_Py3 | 03c4bd9e2db2d91645b72b62b060d73f5ec7e437 | [
"BSD-2-Clause"
] | null | null | null | solution/practice/algorithms/warmup/plus-minus/solution.py | benevolentPreta/HackerRank_Py3 | 03c4bd9e2db2d91645b72b62b060d73f5ec7e437 | [
"BSD-2-Clause"
] | 1 | 2020-06-06T19:56:54.000Z | 2020-06-06T19:56:54.000Z | solution/practice/algorithms/warmup/plus-minus/solution.py | benevolentPreta/HackerRank_Py3 | 03c4bd9e2db2d91645b72b62b060d73f5ec7e437 | [
"BSD-2-Clause"
] | null | null | null | #!/bin/python3
import math
import os
import random
import re
import sys
# Complete the plusMinus function below.
def plusMinus(arr):
'''
There is probably a better solution than this
but this would be the trivial solution, and it
is successful.
'''
pos, neg, zero = 0, 0, 0
size = len(arr)... | 17.868421 | 51 | 0.564065 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 196 | 0.28866 |
d23e3eac1aa7a46a82d21a527d06862f245b4e29 | 4,273 | py | Python | youtube_dl/extractor/gorillavid.py | builder07/ytdl | 2c0a5d50af7ecc7302c813d649ee72dcd457a50a | [
"Unlicense"
] | null | null | null | youtube_dl/extractor/gorillavid.py | builder07/ytdl | 2c0a5d50af7ecc7302c813d649ee72dcd457a50a | [
"Unlicense"
] | null | null | null | youtube_dl/extractor/gorillavid.py | builder07/ytdl | 2c0a5d50af7ecc7302c813d649ee72dcd457a50a | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
compat_urllib_request,
)
from ..utils import (
ExtractorError,
encode_dict,
int_or_none,
)
class GorillaVidIE(InfoExtractor):
IE_DESC = 'Gor... | 33.645669 | 110 | 0.528902 | 4,006 | 0.937295 | 0 | 0 | 0 | 0 | 0 | 0 | 1,931 | 0.451802 |
d23f4d942f6df091ea30d280bbf61284f173aee1 | 7,552 | py | Python | Tests/test_GenBank_unittest.py | cbrueffer/biopython | 1ffb1d92d4735166089e28ac07ee614d5ec80070 | [
"PostgreSQL"
] | null | null | null | Tests/test_GenBank_unittest.py | cbrueffer/biopython | 1ffb1d92d4735166089e28ac07ee614d5ec80070 | [
"PostgreSQL"
] | null | null | null | Tests/test_GenBank_unittest.py | cbrueffer/biopython | 1ffb1d92d4735166089e28ac07ee614d5ec80070 | [
"PostgreSQL"
] | null | null | null | # Copyright 2013 by Kai Blin.
# Revisions copyright 2015 by Peter Cock.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
import unittest
import warnings
from os import path
from Bio import BiopythonP... | 50.346667 | 121 | 0.659428 | 7,054 | 0.934057 | 0 | 0 | 0 | 0 | 0 | 0 | 2,852 | 0.377648 |
d24018cb7c01fc32bd606207dd5f57d954a62e7b | 6,618 | py | Python | segtrain/trainer/trainer.py | parthi-bharathi/semantic-image-segmentation | 5dd34db4d74b0fe3d6cc9033a0e55ddf6e73420c | [
"Apache-2.0"
] | 2 | 2020-08-26T00:13:37.000Z | 2022-01-07T07:59:59.000Z | segtrain/trainer/trainer.py | parthi-bharathi/semantic-image-segmentation | 5dd34db4d74b0fe3d6cc9033a0e55ddf6e73420c | [
"Apache-2.0"
] | 1 | 2020-10-20T13:37:29.000Z | 2020-10-27T09:59:32.000Z | segtrain/trainer/trainer.py | parthi-bharathi/semantic-image-segmentation | 5dd34db4d74b0fe3d6cc9033a0e55ddf6e73420c | [
"Apache-2.0"
] | 1 | 2022-03-02T10:57:37.000Z | 2022-03-02T10:57:37.000Z | import os
import tensorflow.keras.backend as K
from dataflow import (
BatchData, RepeatedData, MultiProcessRunnerZMQ)
from tensorflow.keras.callbacks import Callback, ReduceLROnPlateau, ModelCheckpoint, TensorBoard
from tensorflow.keras.callbacks import LearningRateScheduler
from .modelcheckpoint import CustomMod... | 39.159763 | 135 | 0.630553 | 5,732 | 0.866123 | 4,326 | 0.653672 | 0 | 0 | 0 | 0 | 813 | 0.122847 |
d24182845a6b7e4d2904f9bc95447b5c4c1ca7fd | 1,570 | py | Python | turtle/pyramid.py | luscra0/Turtle-Experiments | df9693c871dd176673667c231f7f81250a479348 | [
"MIT"
] | null | null | null | turtle/pyramid.py | luscra0/Turtle-Experiments | df9693c871dd176673667c231f7f81250a479348 | [
"MIT"
] | 6 | 2021-08-30T01:08:10.000Z | 2021-08-30T23:04:55.000Z | turtle/pyramid.py | luscra0/Turtle-Shape-Thingy | df9693c871dd176673667c231f7f81250a479348 | [
"MIT"
] | null | null | null | import turtle
import math
from time import sleep
def calculate_points(pos, r1, r2, angles):
points = []
for a in angles:
x = pos[0] + (r1 * math.cos(math.radians(a)))
y = pos[1] + (r2 * math.sin(math.radians(a)))
points.append((x, y))
return points
def draw_pyramid(tur, draw=False)... | 26.166667 | 136 | 0.625478 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d2423e50a292004365a346d8a0b8d79733015061 | 5,791 | py | Python | docker_leash/config.py | docker-leash/docker-leash | d98c0a98ddecac2c9775e839d1e64382b811a3cf | [
"MIT"
] | 1 | 2018-01-15T12:29:20.000Z | 2018-01-15T12:29:20.000Z | docker_leash/config.py | docker-leash/docker-leash | d98c0a98ddecac2c9775e839d1e64382b811a3cf | [
"MIT"
] | 92 | 2018-01-12T21:04:42.000Z | 2018-04-08T17:25:26.000Z | docker_leash/config.py | docker-leash/docker-leash | d98c0a98ddecac2c9775e839d1e64382b811a3cf | [
"MIT"
] | 2 | 2018-01-13T16:52:54.000Z | 2020-04-24T22:45:46.000Z | # vim:set ts=4 sw=4 et:
'''
Config
======
'''
import re
from .action_mapper import Action
from .checks_list import Checks
from .exceptions import ConfigurationException
class Config(object):
"""The :class:`Config` class is responsible for storing application groups
and policies read from the datastore.
... | 30.967914 | 105 | 0.583319 | 5,617 | 0.969953 | 0 | 0 | 2,546 | 0.439648 | 0 | 0 | 2,692 | 0.464859 |
d242ed9d3520b1a1062f3207cee3beda75ae982b | 1,039 | py | Python | printapp/migrations/0002_auto_20180217_1917.py | sumanlearning/potpapa2018 | 1557dd5aca645cb55a08e5b92623804e51fa8dfe | [
"Unlicense"
] | null | null | null | printapp/migrations/0002_auto_20180217_1917.py | sumanlearning/potpapa2018 | 1557dd5aca645cb55a08e5b92623804e51fa8dfe | [
"Unlicense"
] | null | null | null | printapp/migrations/0002_auto_20180217_1917.py | sumanlearning/potpapa2018 | 1557dd5aca645cb55a08e5b92623804e51fa8dfe | [
"Unlicense"
] | null | null | null | # Generated by Django 2.0.2 on 2018-02-17 12:17
import datetime
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('printapp', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='historybayar',
name=... | 29.685714 | 107 | 0.599615 | 930 | 0.895091 | 0 | 0 | 0 | 0 | 0 | 0 | 230 | 0.221367 |
d243084a9d78e560bb874101db60f382836bb734 | 7,569 | py | Python | waller.py | fredrikwahlberg/harvesters | 205dadeb3b6e25203843e71b95cb99aaf840c712 | [
"MIT"
] | 1 | 2018-02-20T16:34:26.000Z | 2018-02-20T16:34:26.000Z | waller.py | fredrikwahlberg/harvesters | 205dadeb3b6e25203843e71b95cb99aaf840c712 | [
"MIT"
] | null | null | null | waller.py | fredrikwahlberg/harvesters | 205dadeb3b6e25203843e71b95cb99aaf840c712 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: Fredrik Wahlberg <[email protected]>
"""
import requests
import json
import os.path
import re
class Waller():
def __init__(self, datapath, verbose=False):
super(Waller, self).__init__()
self.reprname = "Waller"
assert os.path.exists(datapath), ... | 35.369159 | 104 | 0.492139 | 7,257 | 0.958779 | 185 | 0.024442 | 0 | 0 | 0 | 0 | 1,080 | 0.142687 |
d244090a382037591d1f8d9a0c4ab8297cd9b302 | 701 | py | Python | helper_functions_class.py | lucaschatham/lambdata | 125087c521847e4f7659a4c8e34008994f3fb01b | [
"MIT"
] | null | null | null | helper_functions_class.py | lucaschatham/lambdata | 125087c521847e4f7659a4c8e34008994f3fb01b | [
"MIT"
] | null | null | null | helper_functions_class.py | lucaschatham/lambdata | 125087c521847e4f7659a4c8e34008994f3fb01b | [
"MIT"
] | null | null | null | """
Here are two different functions used for common data cleaning tasks.
You can use these functions to load data into a pandas Dataframe.
"""
import numpy as np
import pandas as pd
from sklearn.utils import shuffle
class CleanData:
def __init__(self):
"""
This init function instanti... | 22.612903 | 84 | 0.673324 | 476 | 0.67903 | 0 | 0 | 0 | 0 | 0 | 0 | 327 | 0.466476 |
d245456046b81bffbc996ce46fc7291edbaf4e36 | 870 | py | Python | services/web/apps/crm/supplierprofile/views.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | services/web/apps/crm/supplierprofile/views.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | services/web/apps/crm/supplierprofile/views.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ---------------------------------------------------------------------
# crm.supplierprofile application
# ---------------------------------------------------------------------
# Copyright (C) 2007-2019 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
#... | 33.461538 | 71 | 0.558621 | 368 | 0.422989 | 0 | 0 | 0 | 0 | 0 | 0 | 455 | 0.522989 |
d24561aa431196a52ec81712ae5c3dded61222c7 | 2,849 | py | Python | all-python-codes/bagels/main.py | abdussalam02/py-projects | 653ba4e6923ee1f55a64aef23174515c1db68758 | [
"MIT"
] | null | null | null | all-python-codes/bagels/main.py | abdussalam02/py-projects | 653ba4e6923ee1f55a64aef23174515c1db68758 | [
"MIT"
] | null | null | null | all-python-codes/bagels/main.py | abdussalam02/py-projects | 653ba4e6923ee1f55a64aef23174515c1db68758 | [
"MIT"
] | null | null | null | from random import shuffle
NUM_DIGIT = 3
MAX_GUESSES = 10
def main(): # main game
print(
f"""
Bagels, a detective logic game.
By Ibrahim raimi
I am thinking of a number {NUM_DIGIT} number with no repeted digits.
Try to guess what it is. Here re some clues:
When i ... | 30.634409 | 107 | 0.570727 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,414 | 0.496314 |
d24580d757e7e7fcbb4b8b0a5b6d34e117acf284 | 2,652 | py | Python | NetEmbs/DataProcessing/unique_signatures.py | AlexWorldD/NetEmbs | ea3dc5769e2feb728dac8f21ec677a9807def3df | [
"Apache-2.0"
] | 1 | 2021-09-02T16:47:27.000Z | 2021-09-02T16:47:27.000Z | NetEmbs/DataProcessing/unique_signatures.py | AlexWorldD/NetEmbs | ea3dc5769e2feb728dac8f21ec677a9807def3df | [
"Apache-2.0"
] | null | null | null | NetEmbs/DataProcessing/unique_signatures.py | AlexWorldD/NetEmbs | ea3dc5769e2feb728dac8f21ec677a9807def3df | [
"Apache-2.0"
] | 1 | 2019-12-25T08:38:55.000Z | 2019-12-25T08:38:55.000Z | # encoding: utf-8
__author__ = 'Aleksei Maliutin'
"""
unique_signatures.py
Created by lex at 2019-03-28.
"""
import pandas as pd
from NetEmbs.CONFIG import N_DIGITS
def get_signature(df: pd.DataFrame) -> pd.Series:
"""
Aggregation function over GroupBy object: to extract unique signature for the given busines... | 34 | 120 | 0.633107 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,474 | 0.555807 |
d248471875d205a42c77cea45df52d51bb8e0b18 | 6,008 | py | Python | books/api/RecurringInvoicesApi.py | harshal-choudhari/books-python-wrappers | 43616ee451a78ef2f02facc1cfb1d7f1121a1464 | [
"MIT"
] | 1 | 2021-04-21T06:40:48.000Z | 2021-04-21T06:40:48.000Z | books/api/RecurringInvoicesApi.py | harshal-choudhari/books-python-wrappers | 43616ee451a78ef2f02facc1cfb1d7f1121a1464 | [
"MIT"
] | null | null | null | books/api/RecurringInvoicesApi.py | harshal-choudhari/books-python-wrappers | 43616ee451a78ef2f02facc1cfb1d7f1121a1464 | [
"MIT"
] | 1 | 2021-04-21T07:31:47.000Z | 2021-04-21T07:31:47.000Z | #$Id$#
from books.util.ZohoHttpClient import ZohoHttpClient
from books.parser.RecurringInvoiceParser import RecurringInvoiceParser
from .Api import Api
from json import dumps
base_url = Api().base_url + 'recurringinvoices/'
parser = RecurringInvoiceParser()
zoho_http_client = ZohoHttpClient()
class RecurringInvoice... | 33.19337 | 89 | 0.636152 | 5,693 | 0.94757 | 0 | 0 | 0 | 0 | 0 | 0 | 3,081 | 0.512816 |
d249639feb0e944a523bdb5fe34255236bfa3990 | 661 | py | Python | api/settings/local.py | hartliddell/api | 73d44d2271c01fe7540fedeee9174c4032cbbbc0 | [
"MIT"
] | null | null | null | api/settings/local.py | hartliddell/api | 73d44d2271c01fe7540fedeee9174c4032cbbbc0 | [
"MIT"
] | null | null | null | api/settings/local.py | hartliddell/api | 73d44d2271c01fe7540fedeee9174c4032cbbbc0 | [
"MIT"
] | null | null | null | """Define the django settings for a local setup."""
from .base import * # noqa
# SECURITY WARNING: don't run with debug turned on in production!
# See: https://docs.djangoproject.com/en/dev/ref/settings/#debug
DEBUG = True
TEMPLATES[0]['OPTIONS']['debug'] = DEBUG
# SECURITY WARNING: keep the secret key used in produ... | 33.05 | 70 | 0.747352 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 526 | 0.795764 |
d24974e9a9f24d16218c96318a69ab049db6dc83 | 1,457 | py | Python | scripts/010_smultixcan/utils/ukb_gtex_variants_intersection/compute_intersection_ukb_gtex_variants.py | miltondp/phenomexcan | 38390ac21987f1e72835c42919c53abd1a35cb7e | [
"MIT"
] | 3 | 2020-12-07T15:06:41.000Z | 2021-05-25T06:03:38.000Z | scripts/010_smultixcan/utils/ukb_gtex_variants_intersection/compute_intersection_ukb_gtex_variants.py | miltondp/phenomexcan | 38390ac21987f1e72835c42919c53abd1a35cb7e | [
"MIT"
] | 1 | 2020-07-01T14:45:38.000Z | 2020-07-01T15:15:55.000Z | scripts/010_smultixcan/utils/ukb_gtex_variants_intersection/compute_intersection_ukb_gtex_variants.py | miltondp/phenomexcan | 38390ac21987f1e72835c42919c53abd1a35cb7e | [
"MIT"
] | 1 | 2020-08-20T13:23:40.000Z | 2020-08-20T13:23:40.000Z | #!/usr/bin/env python
import os
import argparse
import sqlite3
from glob import glob
import pandas as pd
parser = argparse.ArgumentParser()
parser.add_argument('--gtex-models-dir', type=str, required=True)
parser.add_argument('--variants-file-with-gtex-id', type=str, required=True)
parser.add_argument('--output-file... | 33.883721 | 125 | 0.753603 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 529 | 0.363075 |
d24abb7e1be3b51950c14587cbae8b44aa330b06 | 5,676 | py | Python | h/security/predicates.py | hypothesis/h | 92c1a326c305a3d94fe48f87402135fd7beb6a20 | [
"BSD-2-Clause"
] | 2,103 | 2015-01-07T12:47:49.000Z | 2022-03-29T02:38:25.000Z | h/security/predicates.py | hypothesis/h | 92c1a326c305a3d94fe48f87402135fd7beb6a20 | [
"BSD-2-Clause"
] | 4,322 | 2015-01-04T17:18:01.000Z | 2022-03-31T17:06:02.000Z | h/security/predicates.py | hypothesis/h | 92c1a326c305a3d94fe48f87402135fd7beb6a20 | [
"BSD-2-Clause"
] | 389 | 2015-01-24T04:10:02.000Z | 2022-03-28T08:00:16.000Z | """
Define authorization predicates.
These are functions which accept an `Identity` object and a context object and
return a truthy value. These represent building blocks of our permission map
which define when people do, or don't have permissions.
For example a predicate might define "group_created_by_user" which is... | 27.687805 | 88 | 0.767442 | 0 | 0 | 367 | 0.064658 | 2,811 | 0.495243 | 0 | 0 | 1,640 | 0.288936 |
d24c807fe0e09931fae3e0caaf649694c890f3db | 3,325 | py | Python | gdm/planing_tool/models/empresas.py | Deonstudios/GDM | ad6c8182d3e70a6c4d1490f452b2c16e12dc85d8 | [
"Apache-2.0"
] | null | null | null | gdm/planing_tool/models/empresas.py | Deonstudios/GDM | ad6c8182d3e70a6c4d1490f452b2c16e12dc85d8 | [
"Apache-2.0"
] | null | null | null | gdm/planing_tool/models/empresas.py | Deonstudios/GDM | ad6c8182d3e70a6c4d1490f452b2c16e12dc85d8 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
from planing_tool.models.plazas import State, Country, City
from django.contrib.gis.db.models import PointField
from datetime import datetime, timedelta
from libs.currency_utils import CurrencyUtils
from django.contrib.gis.db.models.manager import GeoManager
from django.db import models
from simple_histo... | 29.166667 | 79 | 0.67218 | 2,749 | 0.823547 | 0 | 0 | 0 | 0 | 0 | 0 | 617 | 0.184841 |
d24ca4e55e2ea29a960fa8ecd6a05a6ef87a0584 | 8,346 | py | Python | network.py | tonyhu20116543/Playing-20-Question-Game-with-Policy-Based-Reinforcement-Learning | fb9b20181dd3e3273fcbc28144d60f01185ceffd | [
"MIT"
] | 12 | 2020-07-24T13:21:35.000Z | 2021-11-08T10:13:24.000Z | network.py | tonyhu20116543/Playing-20-Question-Game-with-Policy-Based-Reinforcement-Learning | fb9b20181dd3e3273fcbc28144d60f01185ceffd | [
"MIT"
] | null | null | null | network.py | tonyhu20116543/Playing-20-Question-Game-with-Policy-Based-Reinforcement-Learning | fb9b20181dd3e3273fcbc28144d60f01185ceffd | [
"MIT"
] | 7 | 2020-07-24T13:28:44.000Z | 2021-11-08T10:13:25.000Z | import os
import tensorflow as tf
from util import masked_softmax
class PolicyNetwork(object):
""" Policy Function approximator. """
def __init__(self, input_size, output_size, learning_rate=0.001, summaries_dir=None, scope="policy_estimator"):
with tf.variable_scope(scope):
# Writes Tens... | 46.88764 | 122 | 0.642104 | 8,267 | 0.990534 | 0 | 0 | 0 | 0 | 0 | 0 | 837 | 0.100288 |
d24d2defb1725aab6afee3638c1358468609f75a | 32,111 | py | Python | tests/test_reusable_executor.py | hoodmane/loky | 00fbd9d5e8ebc8f9427096a0f64d7d7ad51b9f9b | [
"BSD-3-Clause"
] | 153 | 2020-01-29T07:26:58.000Z | 2022-03-31T23:30:55.000Z | tests/test_reusable_executor.py | hoodmane/loky | 00fbd9d5e8ebc8f9427096a0f64d7d7ad51b9f9b | [
"BSD-3-Clause"
] | 98 | 2020-01-17T09:14:16.000Z | 2022-03-10T15:32:14.000Z | tests/test_reusable_executor.py | hoodmane/loky | 00fbd9d5e8ebc8f9427096a0f64d7d7ad51b9f9b | [
"BSD-3-Clause"
] | 22 | 2020-01-17T09:26:38.000Z | 2022-02-02T09:27:59.000Z | import os
import sys
import gc
import ctypes
import psutil
import pytest
import warnings
import threading
from time import sleep
from multiprocessing import util, current_process
from pickle import PicklingError, UnpicklingError
from distutils.version import LooseVersion
import loky
from loky import cpu_count
from lok... | 38.687952 | 79 | 0.64112 | 28,839 | 0.898103 | 164 | 0.005107 | 9,899 | 0.308274 | 0 | 0 | 9,385 | 0.292267 |
d24e25a2e5e83961161f51930a9dbcf5a8859141 | 3,781 | py | Python | modules/common/parsers/timetable_parser.py | hgyoseo/hdmeal | f6f96c9190701b38eb6f08e2238f4f5214b95d3b | [
"MIT"
] | 2 | 2020-03-01T13:15:57.000Z | 2020-03-25T18:53:21.000Z | modules/common/parsers/timetable_parser.py | hgyoseo/hdmeal | f6f96c9190701b38eb6f08e2238f4f5214b95d3b | [
"MIT"
] | null | null | null | modules/common/parsers/timetable_parser.py | hgyoseo/hdmeal | f6f96c9190701b38eb6f08e2238f4f5214b95d3b | [
"MIT"
] | null | null | null | # ██╗ ██╗██████╗ ███╗ ███╗███████╗ █████╗ ██╗
# ██║ ██║██╔══██╗████╗ ████║██╔════╝██╔══██╗██║
# ███████║██║ ██║██╔████╔██║█████╗ ███████║██║
# ██╔══██║██║ ██║██║╚██╔╝██║██╔══╝ ██╔══██║██║
# ██║ ██║██████╔╝██║ ╚═╝ ██║███████╗██║ ██║███████╗
# ╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝
# Copyrigh... | 37.81 | 122 | 0.524729 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,960 | 0.437598 |
d24e88624ecd17dbeb714acc8fe1596a1a4493c1 | 34,597 | py | Python | gittle/gittle.py | justecorruptio/gittle | e046fe4731ebe4168884e51ac5baa26c79f0567d | [
"Apache-2.0"
] | 1 | 2016-09-10T15:21:30.000Z | 2016-09-10T15:21:30.000Z | gittle/gittle.py | justecorruptio/gittle | e046fe4731ebe4168884e51ac5baa26c79f0567d | [
"Apache-2.0"
] | null | null | null | gittle/gittle.py | justecorruptio/gittle | e046fe4731ebe4168884e51ac5baa26c79f0567d | [
"Apache-2.0"
] | null | null | null | # From the future
from __future__ import absolute_import
# Python imports
import os
import copy
import logging
from hashlib import sha1
from shutil import rmtree
from functools import partial, wraps
# Dulwich imports
from dulwich.repo import Repo as DulwichRepo
from dulwich.client import get_transport_and_path
from d... | 29.394223 | 125 | 0.598144 | 33,244 | 0.960893 | 0 | 0 | 6,888 | 0.199092 | 0 | 0 | 6,780 | 0.195971 |
d24ee59db0447d71e371a28fd126b436b147eeac | 992 | py | Python | testg.py | dcn01/AndroidDropFrameAnalysis | 630d75dc999a8d1e4eec71edc0a1220334166d0a | [
"MIT"
] | 2 | 2018-12-10T03:49:03.000Z | 2018-12-10T13:43:26.000Z | testg.py | dcn01/AndroidDropFrameAnalysis | 630d75dc999a8d1e4eec71edc0a1220334166d0a | [
"MIT"
] | null | null | null | testg.py | dcn01/AndroidDropFrameAnalysis | 630d75dc999a8d1e4eec71edc0a1220334166d0a | [
"MIT"
] | null | null | null | # fpsAllFrameRead = open("profileAllFrame.txt", "r")
# profileDataReadList =[]
# t = []
# for line in fpsAllFrameRead.readlines():
# profileDataReadList.append(line)
#
# for line in profileDataReadList:
# splitByComma = line.split(",")
# l = len(splitByComma)
# print str(l)
a = 34.4/(1000/60)
print str... | 31 | 149 | 0.5625 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 931 | 0.938508 |
d24f47bb348b9648ed9893766e4cb276bd461df6 | 452 | py | Python | app/core/urls.py | vatsamail/django-profiles | d9738fcb129e4f50ecde28126f5ffcccdf1999e0 | [
"MIT"
] | 1 | 2019-05-24T14:22:04.000Z | 2019-05-24T14:22:04.000Z | app/core/urls.py | vatsamail/django-profiles | d9738fcb129e4f50ecde28126f5ffcccdf1999e0 | [
"MIT"
] | 9 | 2020-06-05T18:17:48.000Z | 2022-03-11T23:21:33.000Z | app/core/urls.py | vatsamail/django-profiles | d9738fcb129e4f50ecde28126f5ffcccdf1999e0 | [
"MIT"
] | 1 | 2018-06-22T05:54:58.000Z | 2018-06-22T05:54:58.000Z | from django.urls import include, path, re_path
from . import views
from django.contrib.auth.views import (
login,
logout,
password_reset,
password_reset_done,
password_reset_confirm,
password_reset_complete,
)
app_name = 'core'
urlpatterns = [
path('', views.Home... | 26.588235 | 99 | 0.64823 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 75 | 0.165929 |
d250a6fd3bfdb7ab11ae4c2f8ffe9bfe5c487a4e | 745 | py | Python | Python/lab2/temp_convert_FtoC.py | varuneagle555/BSA-STEM-Merit-Badge-Week | 04da40973c99eb64184bb98b58d8bf87b337456c | [
"MIT"
] | 3 | 2016-03-22T07:05:35.000Z | 2021-01-08T21:46:32.000Z | Python/lab2/temp_convert_FtoC.py | varuneagle555/BSA-STEM-Merit-Badge-Week | 04da40973c99eb64184bb98b58d8bf87b337456c | [
"MIT"
] | null | null | null | Python/lab2/temp_convert_FtoC.py | varuneagle555/BSA-STEM-Merit-Badge-Week | 04da40973c99eb64184bb98b58d8bf87b337456c | [
"MIT"
] | 4 | 2017-02-10T22:21:18.000Z | 2022-02-20T01:06:25.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""temp_convert.py: Convert temperature F to C."""
# initialize looping variable, assume yes as first answer
continueYN = "Y"
while continueYN.upper() == "Y":
# get temperature input from the user, and prompt them for what we expect
degF = int(raw_input("Enter te... | 25.689655 | 86 | 0.64698 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 491 | 0.658177 |
d25277187f27f31c782ae6f4bfb336436c74c318 | 2,197 | py | Python | test/connector/exchange/wazirx/test_wazirx_user_stream_tracker.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 3,027 | 2019-04-04T18:52:17.000Z | 2022-03-30T09:38:34.000Z | test/connector/exchange/wazirx/test_wazirx_user_stream_tracker.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 4,080 | 2019-04-04T19:51:11.000Z | 2022-03-31T23:45:21.000Z | test/connector/exchange/wazirx/test_wazirx_user_stream_tracker.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 1,342 | 2019-04-04T20:50:53.000Z | 2022-03-31T15:22:36.000Z | #!/usr/bin/env python
from os.path import join, realpath
import sys; sys.path.insert(0, realpath(join(__file__, "../../../../../")))
import conf
from hummingbot.connector.exchange.wazirx.wazirx_api_order_book_data_source import WazirxAPIOrderBookDataSource
from hummingbot.connector.exchange.wazirx.wazirx_user_stre... | 35.435484 | 115 | 0.690942 | 1,469 | 0.668639 | 271 | 0.12335 | 470 | 0.213928 | 563 | 0.256259 | 129 | 0.058716 |
d252d60d44fc7e878fae2a2e799df7cff950fbd9 | 597 | py | Python | setup.py | jaspershen/getDB | 6f767279775e201f9505bb1e98dd141ffe0335f7 | [
"MIT"
] | null | null | null | setup.py | jaspershen/getDB | 6f767279775e201f9505bb1e98dd141ffe0335f7 | [
"MIT"
] | null | null | null | setup.py | jaspershen/getDB | 6f767279775e201f9505bb1e98dd141ffe0335f7 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(name='getDB',
version='0.0.4',
description="This module can be used to download HMDB and KEGG database.",
license='MIT',
author='Xiaotao Shen',
author_email='[email protected]',
url='https://github.com/jaspershen/getDB',
long_... | 35.117647 | 80 | 0.624791 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 274 | 0.458961 |
d2536eb6f6ea1a24212cca3d6076bd9bd30877a3 | 7,706 | py | Python | lib/pts2angmap.py | samsafadi/PointRCNN | 761d4cadb3e634dc0994f2e95318240c37fbb485 | [
"MIT"
] | 1 | 2020-11-16T20:11:26.000Z | 2020-11-16T20:11:26.000Z | lib/pts2angmap.py | samsafadi/PointRCNN | 761d4cadb3e634dc0994f2e95318240c37fbb485 | [
"MIT"
] | null | null | null | lib/pts2angmap.py | samsafadi/PointRCNN | 761d4cadb3e634dc0994f2e95318240c37fbb485 | [
"MIT"
] | null | null | null |
"""
modified from sparsify.py file. This file gnerate angle map of [H=64,W=1024,4] from velodyne lidar bins
To run this:
python3 pts2angmap.py --calib_path '/root/gdrive/My Drive/PointRCNN/data/KITTI/object/training/calib/'\
--image_path '/root/gdrive/My Drive/PointRCNN/data/KITTI/object/training/image_2/' ... | 34.401786 | 194 | 0.611601 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,111 | 0.273942 |
d2537e3317890ddaef34e1cff80e0e43d3fa3866 | 13,481 | py | Python | testsuite/conversion.py | buganini/bsdconv | 7830f4ebef9b04f9877a21f24a7705a48a4812c4 | [
"BSD-2-Clause"
] | 33 | 2015-01-25T12:04:04.000Z | 2021-12-12T23:16:55.000Z | testsuite/conversion.py | buganini/bsdconv | 7830f4ebef9b04f9877a21f24a7705a48a4812c4 | [
"BSD-2-Clause"
] | 14 | 2015-11-19T20:52:39.000Z | 2021-06-15T03:18:31.000Z | testsuite/conversion.py | buganini/bsdconv | 7830f4ebef9b04f9877a21f24a7705a48a4812c4 | [
"BSD-2-Clause"
] | 5 | 2016-07-27T15:30:39.000Z | 2020-07-06T11:52:15.000Z | # -*- coding: utf-8 -*-
import sys
import urllib
from bsdconv import Bsdconv
def bsdconv01(dt):
dt=dt.lstrip("0").upper()
if len(dt) & 1:
return "010"+dt
else:
return "01"+dt
def bnf(s):
return ",".join([bsdconv01(x) for x in s.strip().split(" ")])
iotest=[
["big5:utf-8","\xa5\x5c\x5c\xaf\xe0","功\能"],
["b... | 53.284585 | 350 | 0.656925 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 11,138 | 0.782163 |
d2554278f5d4ba5a87659a474ac65fdd8acaa5a1 | 2,488 | py | Python | apps/cloud/odc/apps/cloud/thredds_to_tar.py | robbibt/odc-tools | e2df2c9ef65dbd5652d97cd88617989b4b724814 | [
"Apache-2.0"
] | null | null | null | apps/cloud/odc/apps/cloud/thredds_to_tar.py | robbibt/odc-tools | e2df2c9ef65dbd5652d97cd88617989b4b724814 | [
"Apache-2.0"
] | null | null | null | apps/cloud/odc/apps/cloud/thredds_to_tar.py | robbibt/odc-tools | e2df2c9ef65dbd5652d97cd88617989b4b724814 | [
"Apache-2.0"
] | null | null | null | import tarfile
import click
import requests
from odc.io.tar import tar_mode, add_txt_file
from multiprocessing.dummy import Pool as ThreadPool
from functools import partial
from urllib.parse import urlparse
from thredds_crawler.crawl import Crawl
def download(url):
parsed_uri = urlparse(url)
target_filename ... | 33.621622 | 115 | 0.663987 | 0 | 0 | 0 | 0 | 2,032 | 0.81672 | 0 | 0 | 891 | 0.358119 |
d25543f2eb84e1a829ecf2a781633ed4850daa4c | 599 | py | Python | examples/ec2/tests/config.py | dabble-of-devops-biodeploy/terraform-aws-batch | 9d075163821f81f33d6be767820d1db20b45eb8e | [
"Apache-2.0"
] | 3 | 2021-12-07T18:10:16.000Z | 2022-02-04T09:15:31.000Z | examples/ec2/tests/config.py | dabble-of-devops-biodeploy/terraform-aws-batch | 9d075163821f81f33d6be767820d1db20b45eb8e | [
"Apache-2.0"
] | null | null | null | examples/ec2/tests/config.py | dabble-of-devops-biodeploy/terraform-aws-batch | 9d075163821f81f33d6be767820d1db20b45eb8e | [
"Apache-2.0"
] | 1 | 2022-02-22T01:48:38.000Z | 2022-02-22T01:48:38.000Z | DATA_S3 = "bioanalyze-ec2-test-nf-rnaseq-06o3qdtm7v"
JOB_S3 = DATA_S3
# These come from the terraform code in auto-deployment/terraform
ECR = "dabbleofdevops/nextflow-rnaseq-tutorial"
COMPUTE_ENVIRONMENT = "bioanalyze-ec2-test-nf-rnaseq"
JOB_DEF_NAME = "bioanalyze-ec2-test-nf-rnaseq"
JOB_QUEUE_NAME = "bioanalyze-ec2-... | 49.916667 | 104 | 0.806344 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 464 | 0.774624 |
d255a8c98ce6037d15065ccd226fd922085a64a0 | 4,067 | py | Python | adios-1.9.0/wrappers/numpy/example/utils/ncdf2bp.py | swatisgupta/Adaptive-compression | b97a1d3d3e0e968f59c7023c7367a7efa9f672d0 | [
"BSD-2-Clause"
] | null | null | null | adios-1.9.0/wrappers/numpy/example/utils/ncdf2bp.py | swatisgupta/Adaptive-compression | b97a1d3d3e0e968f59c7023c7367a7efa9f672d0 | [
"BSD-2-Clause"
] | null | null | null | adios-1.9.0/wrappers/numpy/example/utils/ncdf2bp.py | swatisgupta/Adaptive-compression | b97a1d3d3e0e968f59c7023c7367a7efa9f672d0 | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python
"""
Example:
$ python ./ncdf2bp.py netcdf_file
"""
from adios import *
from scipy.io import netcdf
import numpy as np
import sys
import os
import operator
def usage():
print os.path.basename(sys.argv[0]), "netcdf_file"
if len(sys.argv) < 2:
usage()
sys.exit(0)
##fname = "MERRA100.... | 27.666667 | 81 | 0.572904 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,045 | 0.256946 |
d256dc1971a485e302633a36903b74f4a74ac3ab | 2,322 | py | Python | airflow/operators/hive_operator.py | nirmeshk/airflow | 4556450b88ef7682a006e9125131a5bb3a91df00 | [
"Apache-2.0"
] | 1 | 2021-03-02T20:08:53.000Z | 2021-03-02T20:08:53.000Z | airflow/operators/hive_operator.py | nirmeshk/airflow | 4556450b88ef7682a006e9125131a5bb3a91df00 | [
"Apache-2.0"
] | null | null | null | airflow/operators/hive_operator.py | nirmeshk/airflow | 4556450b88ef7682a006e9125131a5bb3a91df00 | [
"Apache-2.0"
] | null | null | null | import logging
import re
from airflow.hooks import HiveCliHook
from airflow.models import BaseOperator
from airflow.utils import apply_defaults
class HiveOperator(BaseOperator):
"""
Executes hql code in a specific Hive database.
:param hql: the hql to be executed
:type hql: string
:param hive_cl... | 33.652174 | 77 | 0.656331 | 2,174 | 0.936262 | 0 | 0 | 520 | 0.223945 | 0 | 0 | 883 | 0.380276 |
d2571cfece71be4e3c7267fd9fb5b654ad0b459f | 1,042 | py | Python | classification/prepare_model.py | JSC-NIIAS/TwGoA4aij2021 | 9f011f506748435190f8e4e635820c8208144b94 | [
"MIT"
] | null | null | null | classification/prepare_model.py | JSC-NIIAS/TwGoA4aij2021 | 9f011f506748435190f8e4e635820c8208144b94 | [
"MIT"
] | null | null | null | classification/prepare_model.py | JSC-NIIAS/TwGoA4aij2021 | 9f011f506748435190f8e4e635820c8208144b94 | [
"MIT"
] | null | null | null | import os
import yaml
import segmentation_models_pytorch as smp
import torch
import argparse
import torch.nn as nn
import timm
from model_wrapper import Classification_model
def prepare_model(opt):
with open(opt.hyp) as f:
experiment_dict = yaml.load(f, Loader=yaml.FullLoader)
model_pretrained = timm.c... | 41.68 | 177 | 0.764875 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 209 | 0.200576 |
d257693b9fe3b1d9ae0d3ac5245b8412f3de31ea | 8,259 | py | Python | KarpuzTwitterApp/logic.py | bounswe/bounswe2018group5 | d547820bfb3070da3e3935a64429e4c45aef6098 | [
"MIT"
] | 10 | 2018-03-18T20:33:39.000Z | 2021-03-03T07:37:33.000Z | KarpuzTwitterApp/logic.py | bounswe/bounswe2018group5 | d547820bfb3070da3e3935a64429e4c45aef6098 | [
"MIT"
] | 254 | 2018-02-07T15:52:26.000Z | 2019-01-08T04:11:47.000Z | KarpuzTwitterApp/logic.py | bounswe/bounswe2018group5 | d547820bfb3070da3e3935a64429e4c45aef6098 | [
"MIT"
] | 5 | 2018-03-01T13:28:45.000Z | 2021-05-24T11:07:06.000Z | from requests import get
from utils.TwitterService import TwitterService
import tweepy
from decouple import config
def get_tweets_with_location_and_query(search_params):
""" Searches all tweets that are in the given location and contains a query string. """
if 'geocode' not in search_params:
return {'... | 36.544248 | 128 | 0.683134 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,455 | 0.297251 |
d258b7f764b2791ef696f1cad34e04a51316c183 | 4,511 | py | Python | StepperComms.py | MicaelJarniac/StepperComms | 53336a3733c1b5bb30b3d001b7fe3414f9c3fab9 | [
"MIT"
] | null | null | null | StepperComms.py | MicaelJarniac/StepperComms | 53336a3733c1b5bb30b3d001b7fe3414f9c3fab9 | [
"MIT"
] | null | null | null | StepperComms.py | MicaelJarniac/StepperComms | 53336a3733c1b5bb30b3d001b7fe3414f9c3fab9 | [
"MIT"
] | null | null | null | # Required imports
import os
import sys
import serial
import time
sys.path.append(os.path.dirname(os.path.expanduser('~/projects/Python-Playground/Debug'))) # Update path accordingly
from Debug.Debug import Debug
# Declare debug
debug = Debug(True, 3).prt # Simplifies debugging messages
# Message building blocks
RW... | 38.228814 | 144 | 0.552871 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,710 | 0.379073 |