hexsha stringlengths 40 40 | size int64 6 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 4 247 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 247 | max_forks_repo_name stringlengths 4 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.04M | avg_line_length float64 1.53 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 6 1.04M | filtered:remove_non_ascii int64 0 538k | filtered:remove_decorators int64 0 917k | filtered:remove_async int64 0 722k | filtered:remove_classes int64 -45 1M | filtered:remove_generators int64 0 814k | filtered:remove_function_no_docstring int64 -102 850k | filtered:remove_class_no_docstring int64 -3 5.46k | filtered:remove_unused_imports int64 -1,350 52.4k | filtered:remove_delete_markers int64 0 59.6k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
b1b74d3e60337f0c5116a05da4c08c36f5421efa | 2,953 | py | Python | hmslearn/tests/pubsub.py | vramesh/factor-graph-compute | ea8b94b63a44c99aa279333444e4852ba7dca728 | [
"MIT"
] | 11 | 2018-03-03T18:27:47.000Z | 2020-08-01T13:09:45.000Z | hmslearn/tests/pubsub.py | vramesh/factor-graph-compute | ea8b94b63a44c99aa279333444e4852ba7dca728 | [
"MIT"
] | 24 | 2018-03-02T19:48:45.000Z | 2018-05-04T20:19:43.000Z | hmslearn/tests/pubsub.py | vramesh/factor-graph-compute | ea8b94b63a44c99aa279333444e4852ba7dca728 | [
"MIT"
] | null | null | null | import unittest
if __name__ == '__main__':
unittest.main()
| 31.752688 | 79 | 0.700982 | import unittest
import mock
from Pubsub import Publisher, Broker, Channel, Subscriber
class TestPublisher(unittest.TestCase):
@mock.patch('pubsub.Broker')
def setUp(self, mock_broker):
self.broker = mock_broker.return_value
publisher_id = 0
self.publisher = Publisher(publisher_id)
... | 0 | 553 | 0 | 2,193 | 0 | 0 | 0 | 26 | 113 |
33fce700aecb0bef227d4bd402737aaeb254d541 | 106 | py | Python | tests/test_models.py | DSPsleeporg/an_spindle | bebe90434628b8d50a2a7fcf5fb131fc5108a623 | [
"BSD-3-Clause"
] | null | null | null | tests/test_models.py | DSPsleeporg/an_spindle | bebe90434628b8d50a2a7fcf5fb131fc5108a623 | [
"BSD-3-Clause"
] | null | null | null | tests/test_models.py | DSPsleeporg/an_spindle | bebe90434628b8d50a2a7fcf5fb131fc5108a623 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
| 13.25 | 28 | 0.632075 | # -*- coding: utf-8 -*-
from anmodel import models
class TestANmodel:
model = models.ANmodel()
| 0 | 0 | 0 | 26 | 0 | 0 | 0 | 5 | 46 |
0387d38e2ca66b86d6d6883da1f3d0f051e405bd | 6,357 | py | Python | scheduler.py | jpagnano/csci_330_Round_Robin | aa375107e2451ba0a776ac7ff1c04e7fd7b40b12 | [
"MIT"
] | null | null | null | scheduler.py | jpagnano/csci_330_Round_Robin | aa375107e2451ba0a776ac7ff1c04e7fd7b40b12 | [
"MIT"
] | null | null | null | scheduler.py | jpagnano/csci_330_Round_Robin | aa375107e2451ba0a776ac7ff1c04e7fd7b40b12 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
'''
Adam Saland
CSCI 330
Command line interface for cpu scheduling simulations
'''
import sys
from optparse import OptionParser
import random
parser = OptionParser()
parser.add_option("-s", "--seed", default=0, help="random", action="store", type="int", dest="seed")
parser.add_option("-p", "--pr... | 41.279221 | 166 | 0.605946 | #! /usr/bin/env python
'''
Adam Saland
CSCI 330
Command line interface for cpu scheduling simulations
'''
import sys
from optparse import OptionParser
import random
parser = OptionParser()
parser.add_option("-s", "--seed", default=0, help="random", action="store", type="int", dest="seed")
parser.add_option("-p", "--pr... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
c1f20e81d834ea6b27d2c2a9ed517e06e7b7ef55 | 5,213 | py | Python | test/test_logging.py | jschuhmac/qiskit-nature | b8b1181d951cf8fa76fe0db9e5ea192dad5fb186 | [
"Apache-2.0"
] | null | null | null | test/test_logging.py | jschuhmac/qiskit-nature | b8b1181d951cf8fa76fe0db9e5ea192dad5fb186 | [
"Apache-2.0"
] | null | null | null | test/test_logging.py | jschuhmac/qiskit-nature | b8b1181d951cf8fa76fe0db9e5ea192dad5fb186 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2022.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 35.705479 | 95 | 0.648187 | # This code is part of Qiskit.
#
# (C) Copyright IBM 2022.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modifications or derivative wo... | 0 | 375 | 0 | 4,006 | 0 | 0 | 0 | 7 | 244 |
9b22a81a0c913a96a8795a8ae2e21f66e1f812f6 | 4,371 | py | Python | src/language/bootstrap.py | fritzo/pomagma | 224bb6adab3fc68e2d853e6365b4b86a8f7f468f | [
"Apache-2.0"
] | 10 | 2015-06-09T00:25:01.000Z | 2019-06-11T16:07:31.000Z | src/language/bootstrap.py | fritzo/pomagma | 224bb6adab3fc68e2d853e6365b4b86a8f7f468f | [
"Apache-2.0"
] | 25 | 2015-03-23T23:16:01.000Z | 2017-08-29T03:35:59.000Z | src/language/bootstrap.py | fritzo/pomagma | 224bb6adab3fc68e2d853e6365b4b86a8f7f468f | [
"Apache-2.0"
] | null | null | null |
from parsable import parsable
SPECS = {}
SPECS['sk'] = {
'binary_probs': {
'APP': 0.374992,
'COMP': 0.198589,
},
'nullary_weights': {
'B': 1.0,
'C': 1.30428,
'CB': 1.35451,
'CI': 1.74145,
'I': 2.21841,
'Y': 2.2918,
'K': 2.6654,
... | 21.855 | 78 | 0.42782 | import os
from math import exp
from parsable import parsable
import pomagma.util
import util
SPECS = {}
SPECS['sk'] = {
'binary_probs': {
'APP': 0.374992,
'COMP': 0.198589,
},
'nullary_weights': {
'B': 1.0,
'C': 1.30428,
'CB': 1.35451,
'CI': 1.74145,
... | 0 | 1,244 | 0 | 0 | 0 | 0 | 0 | -25 | 112 |
43efedfa2368b98cdf0833e9540814cae94fcb57 | 3,297 | py | Python | evaluation.py | karan-deepsync/FastSpeech2 | 84ad261db4a865536b2e15dfb8346644c3192704 | [
"Apache-2.0"
] | 148 | 2020-07-04T15:28:44.000Z | 2022-03-30T15:23:06.000Z | evaluation.py | karan-deepsync/FastSpeech2 | 84ad261db4a865536b2e15dfb8346644c3192704 | [
"Apache-2.0"
] | 13 | 2020-07-05T16:22:52.000Z | 2021-12-26T06:19:10.000Z | evaluation.py | karan-deepsync/FastSpeech2 | 84ad261db4a865536b2e15dfb8346644c3192704 | [
"Apache-2.0"
] | 33 | 2020-07-04T15:38:15.000Z | 2022-03-30T08:10:20.000Z | import configargparse
from dataset import dataloader as loader
from fastspeech import FeedForwardTransformer
import sys
import torch
from dataset.texts import valid_symbols
import os
from utils.hparams import HParam, load_hparam_str
def get_parser():
"""Get parser of training arguments."""
parser = configar... | 32.323529 | 188 | 0.640582 | import configargparse
from dataset import dataloader as loader
from fastspeech import FeedForwardTransformer
import sys
import torch
from dataset.texts import valid_symbols
import os
from utils.hparams import HParam, load_hparam_str
import numpy as np
def evaluate(hp, validloader, model):
energy_diff = list()
... | 0 | 0 | 0 | 0 | 0 | 1,339 | 0 | -3 | 45 |
33c164e41d222026d0ccc1f0332d3ec427b4e155 | 313 | py | Python | AppDB/cassandra/repair_cassandra.py | eabyshev/appscale | 1cfb5a609130f415143ec76718e839b0f73ac668 | [
"Apache-2.0"
] | 2 | 2018-10-09T17:48:12.000Z | 2019-01-15T10:18:19.000Z | AppDB/cassandra/repair_cassandra.py | eabyshev/appscale | 1cfb5a609130f415143ec76718e839b0f73ac668 | [
"Apache-2.0"
] | null | null | null | AppDB/cassandra/repair_cassandra.py | eabyshev/appscale | 1cfb5a609130f415143ec76718e839b0f73ac668 | [
"Apache-2.0"
] | 1 | 2021-11-23T08:30:52.000Z | 2021-11-23T08:30:52.000Z | """ A test script to repair cassandra. """
import logging
from cassandra_interface import NODE_TOOL
from subprocess import call
def run():
""" Starts up cassandra. """
logging.warning("Repairing Cassandra")
call([NODE_TOOL, 'repair'])
logging.warning("Done!")
if __name__ == '__main__':
run()
| 20.866667 | 42 | 0.690096 | """ A test script to repair cassandra. """
import logging
from cassandra_interface import NODE_TOOL
from subprocess import call
def run():
""" Starts up cassandra. """
logging.warning("Repairing Cassandra")
call([NODE_TOOL, 'repair'])
logging.warning("Done!")
if __name__ == '__main__':
run()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
0920679c9d4eddccd5312ac5b9c889984b1694b9 | 2,415 | py | Python | nesi/vendors/Alcatel/adminCommandProcessor.py | inexio/NESi | 920b23ccaf293733b4b571e4df27929c036257f7 | [
"BSD-2-Clause"
] | 30 | 2020-09-03T06:02:38.000Z | 2022-03-11T16:34:18.000Z | vendors/Alcatel/adminCommandProcessor.py | Tubbz-alt/NESi | 0db169dd6378fbd097380280cc41440e652de19e | [
"BSD-2-Clause"
] | 2 | 2021-01-15T10:33:23.000Z | 2021-02-21T21:04:37.000Z | vendors/Alcatel/adminCommandProcessor.py | Tubbz-alt/NESi | 0db169dd6378fbd097380280cc41440e652de19e | [
"BSD-2-Clause"
] | 3 | 2020-12-19T09:11:19.000Z | 2022-02-07T22:15:34.000Z | # This file is part of the NESi software.
#
# Copyright (c) 2020
# Original Software Design by Ilya Etingof <https://github.com/etingof>.
#
# Software adapted by inexio <https://github.com/inexio>.
# - Janis Gro <https://github.com/unkn0wn-user>
# - Philip Konrath <https://github.com/Connyko65>
# - Alexander Dincher <h... | 36.044776 | 95 | 0.624017 | # This file is part of the NESi software.
#
# Copyright (c) 2020
# Original Software Design by Ilya Etingof <https://github.com/etingof>.
#
# Software adapted by inexio <https://github.com/inexio>.
# - Janis Groß <https://github.com/unkn0wn-user>
# - Philip Konrath <https://github.com/Connyko65>
# - Alexander Dincher <... | 2 | 0 | 0 | 1,817 | 0 | 0 | 0 | 33 | 157 |
fe3063362791da33d2ff10ff809a0a5095d205e4 | 5,095 | py | Python | Immigration_Learning/gym-cityflow/gym-cityflow/envs/cityflow_env.py | hrushikeshjadhav9/Multi-Commander | 08cdd24e282c122b8c9758ff0cb92cb600cbbbba | [
"Apache-2.0"
] | 79 | 2019-07-25T02:40:59.000Z | 2022-03-11T02:26:09.000Z | Immigration_Learning/gym-cityflow/gym-cityflow/envs/cityflow_env.py | hrushikeshjadhav9/Multi-Commander | 08cdd24e282c122b8c9758ff0cb92cb600cbbbba | [
"Apache-2.0"
] | 10 | 2019-07-26T12:12:34.000Z | 2021-03-02T12:08:20.000Z | Immigration_Learning/gym-cityflow/gym-cityflow/envs/cityflow_env.py | hrushikeshjadhav9/Multi-Commander | 08cdd24e282c122b8c9758ff0cb92cb600cbbbba | [
"Apache-2.0"
] | 23 | 2019-07-26T12:10:57.000Z | 2022-03-10T07:30:39.000Z | #
| 39.804688 | 124 | 0.622964 | import gym
from gym import error, spaces, utils
from gym.utils import seeding
#
import cityflow
import pandas as pd
import os
import numpy as np
import json
import math
from gym.spaces import Discrete, Box
class CityflowGymEnv(gym.Env):
# metadata = {'render.modes': ['human']}
def __init__(se... | 0 | 0 | 0 | 4,852 | 0 | 0 | 0 | -16 | 254 |
616e1477ef784eca1bbdc5ce5c90cceb48de42d9 | 9,908 | py | Python | couchbase/result.py | griels/couchbase-python-client-ng | bcda55109f82e41041cf727d604bb335546f64e4 | [
"Apache-2.0"
] | null | null | null | couchbase/result.py | griels/couchbase-python-client-ng | bcda55109f82e41041cf727d604bb335546f64e4 | [
"Apache-2.0"
] | null | null | null | couchbase/result.py | griels/couchbase-python-client-ng | bcda55109f82e41041cf727d604bb335546f64e4 | [
"Apache-2.0"
] | null | null | null | from couchbase_core._libcouchbase import Result as SDK2Result
try:
from asyncio.futures import Future
except:
Future=object
Proxy_T = TypeVar('Proxy_T')
ResultPrecursor = NamedTuple('ResultPrecursor', [('orig_result', SDK2Result), ('orig_options', Mapping[str, Any])])
| 27.445983 | 137 | 0.599011 | from couchbase_core.subdocument import Spec
from .options import Seconds, FiniteDuration, forward_args
from couchbase_core.transcodable import Transcodable
from couchbase_core._libcouchbase import Result as SDK2Result
from couchbase_core.result import MultiResult, SubdocResult
from typing import *
from boltons.funcutil... | 0 | 1,507 | 0 | 5,175 | 0 | 1,769 | 0 | 185 | 972 |
891301b752f8660a2377f291dc297f95ab079e44 | 279 | py | Python | scripts/core/neural_networks/base_solution.py | hcngdaniel/home_service_robot | 18cc376097b33b5cab9efcd8f63c38a6bdc4b5c2 | [
"MIT"
] | null | null | null | scripts/core/neural_networks/base_solution.py | hcngdaniel/home_service_robot | 18cc376097b33b5cab9efcd8f63c38a6bdc4b5c2 | [
"MIT"
] | null | null | null | scripts/core/neural_networks/base_solution.py | hcngdaniel/home_service_robot | 18cc376097b33b5cab9efcd8f63c38a6bdc4b5c2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
| 19.928571 | 45 | 0.637993 | #!/usr/bin/env python3
from abc import ABC
import typing
class BaseSolution(ABC):
def __init__(self):
self.name: str = ""
self.result = None
self.result_topic: typing.AnyStr = ""
def __callback__(self, msg):
raise NotImplementedError()
| 0 | 0 | 0 | 198 | 0 | 0 | 0 | -10 | 67 |
fd3cb3ee698355a65eee213347db9934c2c4c1da | 1,369 | py | Python | git_commit_all.py | sirius0xff/ahk | 4eb948b898d65b7bbf970d7d5fe5888ae79311ef | [
"BSD-3-Clause"
] | null | null | null | git_commit_all.py | sirius0xff/ahk | 4eb948b898d65b7bbf970d7d5fe5888ae79311ef | [
"BSD-3-Clause"
] | null | null | null | git_commit_all.py | sirius0xff/ahk | 4eb948b898d65b7bbf970d7d5fe5888ae79311ef | [
"BSD-3-Clause"
] | null | null | null |
main()
# os.chdir(r'C:\Users\SANA-Sirius\Desktop\Software\AutoHotkey\repo')
# main()
if __name__ == '__main__':
input()
| 27.938776 | 89 | 0.548576 | import os
import subprocess
from datetime import datetime
from time import time
from os.path import isdir, exists, join, abspath
def main():
now = datetime.now()
# input(os.getcwd())
# @echo off
# for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set "dt=%%a"
# set ... | 0 | 0 | 0 | 0 | 0 | 1,073 | 0 | 19 | 140 |
eb6c01d75c356eeeb2401d9246ffdd7d5c0ee77c | 8,194 | py | Python | src/test/test_parser.py | GiselleSerate/pandorica | 4f0b6e87c49c1d4461eafbbff375e393d2ae1b52 | [
"Apache-2.0"
] | 1 | 2019-05-23T23:46:37.000Z | 2019-05-23T23:46:37.000Z | src/test/test_parser.py | GiselleSerate/pandorica | 4f0b6e87c49c1d4461eafbbff375e393d2ae1b52 | [
"Apache-2.0"
] | 19 | 2019-06-30T00:35:37.000Z | 2019-08-09T00:00:40.000Z | src/test/test_parser.py | GiselleSerate/pandorica | 4f0b6e87c49c1d4461eafbbff375e393d2ae1b52 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019, Palo Alto Networks
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS... | 39.776699 | 119 | 0.668782 | # Copyright (c) 2019, Palo Alto Networks
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS... | 0 | 0 | 0 | 0 | 0 | 5,550 | 0 | 167 | 268 |
67dd4a66036ac62e8de011bcfc23189f2821636a | 5,808 | py | Python | app/user/test/test_user_api.py | PythonDjangoJavascript/advanced_django_rest_api_with_tdd | c647208f4e7a3b40785321bee7963fa64701d8f5 | [
"MIT"
] | null | null | null | app/user/test/test_user_api.py | PythonDjangoJavascript/advanced_django_rest_api_with_tdd | c647208f4e7a3b40785321bee7963fa64701d8f5 | [
"MIT"
] | null | null | null | app/user/test/test_user_api.py | PythonDjangoJavascript/advanced_django_rest_api_with_tdd | c647208f4e7a3b40785321bee7963fa64701d8f5 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model
from django.urls import reverse
CREATE_USER_URL = reverse("user:create")
TOKEN_URL = reverse("user:token")
ME_URL = reverse("user:me")
# defining create here to access it from all classes bellow
def create_user(**params):
"""Helper function to create new user"""
... | 31.225806 | 78 | 0.62896 | from django.test import TestCase
from django.contrib.auth import get_user_model
from django.urls import reverse
from rest_framework.test import APIClient
from rest_framework import status
CREATE_USER_URL = reverse("user:create")
TOKEN_URL = reverse("user:token")
ME_URL = reverse("user:me")
# defining create here to... | 0 | 0 | 0 | 5,272 | 0 | 0 | 0 | 43 | 113 |
45bdcd85b816f24d52aaef80793d099614fc9b71 | 1,718 | py | Python | examples/attic/replay_model.py | leonmkim/gym-kuka-mujoco | ed45ae74d10e69f4e51439de2d1d0c0811623b6b | [
"MIT"
] | 23 | 2019-03-12T21:19:12.000Z | 2022-03-08T15:03:40.000Z | examples/attic/replay_model.py | hzm2016/gym-kuka-mujoco | a8a40bb08a1a1a269a2386ca0d102d62d8384206 | [
"MIT"
] | 16 | 2019-04-21T17:50:13.000Z | 2022-03-11T23:40:29.000Z | examples/attic/replay_model.py | hzm2016/gym-kuka-mujoco | a8a40bb08a1a1a269a2386ca0d102d62d8384206 | [
"MIT"
] | 14 | 2019-05-21T08:56:43.000Z | 2021-12-31T04:23:29.000Z | import os
import gym
from stable_baselines import PPO2
from stable_baselines.common.vec_env import DummyVecEnv
if __name__=='__main__':
# Visualize the solution
environment_name = 'PegInsertionNoHole-v0'
environment_name = 'RemoteCenterControlledKukaMujoco-v0'
environment_name = 'KukaMujoco-v0'
r... | 44.051282 | 178 | 0.69092 | import os
from datetime import datetime
import gym
import gym_kuka_mujoco
import numpy as np
from stable_baselines import PPO2
from stable_baselines.common.vec_env import DummyVecEnv, SubprocVecEnv, VecNormalize
from stable_baselines.common.policies import MlpPolicy
def replay_model(env, model):
obs = env.reset(... | 0 | 0 | 0 | 0 | 0 | 310 | 0 | 68 | 111 |
ef7fefb8cd566da8f4b82c2a0c138a53147dc9c5 | 1,416 | py | Python | HotCIDR/hotcidr/notifyemail.py | Viasat/hotcidr | 7055a13f949d2fa5bb31cad9b64763e4e6bbbc8b | [
"Apache-2.0"
] | 1 | 2018-03-13T23:06:45.000Z | 2018-03-13T23:06:45.000Z | HotCIDR/hotcidr/notifyemail.py | Viasat/hotcidr | 7055a13f949d2fa5bb31cad9b64763e4e6bbbc8b | [
"Apache-2.0"
] | null | null | null | HotCIDR/hotcidr/notifyemail.py | Viasat/hotcidr | 7055a13f949d2fa5bb31cad9b64763e4e6bbbc8b | [
"Apache-2.0"
] | 2 | 2020-02-26T09:01:39.000Z | 2021-10-30T21:34:36.000Z |
date_fmt = '%m/%d/%y %H:%M'
| 29.5 | 193 | 0.685734 | from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.Utils import formatdate
import smtplib
date_fmt = '%m/%d/%y %H:%M'
def notifyGitBypass(ruleDict):
me = '__FILL_IN_HERE__'
to = ['__FILL_IN_HERE__']
# Create the container (outer) email message.
msg = MIME... | 0 | 0 | 0 | 0 | 0 | 1,229 | 0 | 46 | 112 |
e1538cfc175be1b3bb705676e112ce099005815b | 2,600 | py | Python | proxypool/tester.py | cxapython/ProxyPoolByMe | d6cd5b07b769eabd955b8c6539aae4d805342acc | [
"Apache-2.0"
] | 4 | 2019-09-03T10:21:50.000Z | 2020-05-06T06:02:31.000Z | proxypool/tester.py | cxapython/ProxyPoolByMe | d6cd5b07b769eabd955b8c6539aae4d805342acc | [
"Apache-2.0"
] | 6 | 2021-03-31T19:15:26.000Z | 2022-03-22T20:59:22.000Z | proxypool/tester.py | cxapython/ProxyPoolByMe | d6cd5b07b769eabd955b8c6539aae4d805342acc | [
"Apache-2.0"
] | 1 | 2020-06-07T17:59:04.000Z | 2020-06-07T17:59:04.000Z |
try:
except:
if __name__ == '__main__':
Tester().run()
| 33.766234 | 150 | 0.564231 | import asyncio
import aiohttp
import time
from aiohttp_requests import requests
try:
from aiohttp import ClientError
except:
from aiohttp import ClientProxyConnectionError as ProxyConnectionError
from proxypool.db import RedisClient
from proxypool.setting import *
class Tester(object):
def __init__(self)... | 162 | 0 | 1,410 | 790 | 0 | 0 | 0 | 76 | 207 |
04a342c5282d6386c5a883bfa9cb2b62f43a7ca4 | 351 | py | Python | py_thread_exit.py | linux-downey/AMG8833_ALGO | 475abbbf0cbe850c4d01f24aa3172eccbcd18974 | [
"MIT"
] | null | null | null | py_thread_exit.py | linux-downey/AMG8833_ALGO | 475abbbf0cbe850c4d01f24aa3172eccbcd18974 | [
"MIT"
] | null | null | null | py_thread_exit.py | linux-downey/AMG8833_ALGO | 475abbbf0cbe850c4d01f24aa3172eccbcd18974 | [
"MIT"
] | null | null | null | import threading
import signal
import os
import time
P1 = threading.Thread(target = func)
P1.start()
P1.join()
print "fuck!!!!!"
while 1:
pass
| 11.7 | 39 | 0.612536 | import threading
import signal
import os
import time
def handle(signum,frame):
print "fuck!!"
print signum
os._exit(0)
def func():
signal.signal(signal.SIGINT,handle)
print "hello!!!"
while 1:
time.sleep(1)
P1 = threading.Thread(target = func)
P1.start()
P1.join()
print ... | 0 | 0 | 0 | 0 | 0 | 142 | 0 | 0 | 46 |
a860171719c851ec7bce0998914369ebcf322375 | 501 | py | Python | project/newsfeed/migrations/0002_field_string_attributes_to_unicode.py | beijbom/coralnet | c3f4a44eeb60cb41a079329a0068dc8b34096e89 | [
"BSD-2-Clause"
] | 31 | 2019-12-08T14:22:52.000Z | 2021-12-27T04:58:12.000Z | project/newsfeed/migrations/0002_field_string_attributes_to_unicode.py | beijbom/coralnet | c3f4a44eeb60cb41a079329a0068dc8b34096e89 | [
"BSD-2-Clause"
] | 193 | 2019-12-07T23:27:43.000Z | 2022-03-05T08:05:46.000Z | project/newsfeed/migrations/0002_field_string_attributes_to_unicode.py | beijbom/coralnet | c3f4a44eeb60cb41a079329a0068dc8b34096e89 | [
"BSD-2-Clause"
] | null | null | null | # Generated by Django 1.11.29 on 2020-06-18 18:26
| 27.833333 | 170 | 0.586826 | # Generated by Django 1.11.29 on 2020-06-18 18:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('newsfeed', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='newsitem',
name='category',
... | 0 | 0 | 0 | 386 | 0 | 0 | 0 | 19 | 45 |
1e5ee63bc6409921e28d2e0b2328b321b0f0c383 | 960 | py | Python | NSE_Data_Science_001/NSE01-venv/Lib/site-packages/nsepy/derivatives/archives.py | Stoned-KING/Python_Projects | 33cd9daf5252e0458b15348268f0c244b03646a7 | [
"MIT"
] | null | null | null | NSE_Data_Science_001/NSE01-venv/Lib/site-packages/nsepy/derivatives/archives.py | Stoned-KING/Python_Projects | 33cd9daf5252e0458b15348268f0c244b03646a7 | [
"MIT"
] | null | null | null | NSE_Data_Science_001/NSE01-venv/Lib/site-packages/nsepy/derivatives/archives.py | Stoned-KING/Python_Projects | 33cd9daf5252e0458b15348268f0c244b03646a7 | [
"MIT"
] | null | null | null | try:
except:
pass
PRICE_LIST_URL = 'http://www1.nseindia.com/content/historical/DERIVATIVES/%s/%s/fo%sbhav.csv.zip'
DERIVATIVE_ARCHIVES = 'http://www1.nseindia.com/products/dynaContent/common/productsSymbolMapping.jsp?instrumentType=OPTIDX&symbol=NIFTY&expiryDate=27-07-2006&optionType=CE&strikePrice=&dateRange=w... | 30 | 246 | 0.726042 | import requests as req
import datetime
try:
import numpy as np
import pandas as pd
except:
pass
from bs4 import BeautifulSoup
from io import StringIO, BytesIO
from nsepy.archives import date_to_str, __raw_zip_data_to_str
PRICE_LIST_URL = 'http://www1.nseindia.com/content/historical/DERIVATIVES/%s/%s/fo%... | 0 | 0 | 0 | 0 | 0 | 351 | 0 | 49 | 187 |
f6c9753978510dc543b7af1656ab4b023b62c65c | 2,567 | py | Python | accounts/views.py | bornamir/BT-Real-State---Django | e31b8fa6a85d9f2983a6c0c0bea3df123000db05 | [
"MIT"
] | null | null | null | accounts/views.py | bornamir/BT-Real-State---Django | e31b8fa6a85d9f2983a6c0c0bea3df123000db05 | [
"MIT"
] | null | null | null | accounts/views.py | bornamir/BT-Real-State---Django | e31b8fa6a85d9f2983a6c0c0bea3df123000db05 | [
"MIT"
] | null | null | null | # Create your views here.
| 33.776316 | 143 | 0.596416 | from django.shortcuts import render,redirect
from django.contrib import messages, auth
from django.contrib.auth.models import User
from contacts.models import Contact
# Create your views here.
def register(req):
if req.method == 'POST':
# get form values:
first_name = req.POST['first_name']
... | 0 | 0 | 0 | 0 | 0 | 2,281 | 0 | 79 | 180 |
b8498f7e5033de8f7daaa91b53b4733a075f6cbc | 879 | py | Python | research/sentiment_analysis/data/util.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | 1 | 2019-09-11T09:41:11.000Z | 2019-09-11T09:41:11.000Z | research/sentiment_analysis/data/util.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | null | null | null | research/sentiment_analysis/data/util.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | null | null | null | """Utility module for sentiment analysis."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
START_CHAR = 1
END_CHAR = 2
OOV_CHAR = 3
def pad_sentence(sentence, sentence_length):
"""Pad the given sentense at the end.
... | 26.636364 | 74 | 0.704209 | """Utility module for sentiment analysis."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
START_CHAR = 1
END_CHAR = 2
OOV_CHAR = 3
def pad_sentence(sentence, sentence_length):
"""Pad the given sentense at the end.
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d07c1cabe2ce07bff8c71582f004116170bbeff7 | 1,823 | py | Python | examples/example.py | comsterfpv/pseudo-airspeed | abc5910f035a6114627c733df6e571dba988b070 | [
"MIT"
] | null | null | null | examples/example.py | comsterfpv/pseudo-airspeed | abc5910f035a6114627c733df6e571dba988b070 | [
"MIT"
] | null | null | null | examples/example.py | comsterfpv/pseudo-airspeed | abc5910f035a6114627c733df6e571dba988b070 | [
"MIT"
] | null | null | null | import os
# source: https://www.youtube.com/watch?v=_2XDyqGhHI0
csv_fn = os.path.join('..', 'data', 'flight_pawel_wing_2017.09.csv')
if __name__ == '__main__':
main()
| 49.27027 | 124 | 0.680746 | from pseudoairspeed.analysis import pseudo, load
import argparse
import os
import pandas
# source: https://www.youtube.com/watch?v=_2XDyqGhHI0
csv_fn = os.path.join('..', 'data', 'flight_pawel_wing_2017.09.csv')
def main():
p = argparse.ArgumentParser(description='Example function to analyze pseudo airspeed from ... | 0 | 0 | 0 | 0 | 0 | 1,544 | 0 | 13 | 89 |
edd97fd5676c9705e553c10416613d21c4ff96c5 | 259 | py | Python | m209/__init__.py | gremmie/m209 | 5090b5d66a101c0f444b03ab17fc7159f734b3ce | [
"MIT"
] | null | null | null | m209/__init__.py | gremmie/m209 | 5090b5d66a101c0f444b03ab17fc7159f734b3ce | [
"MIT"
] | null | null | null | m209/__init__.py | gremmie/m209 | 5090b5d66a101c0f444b03ab17fc7159f734b3ce | [
"MIT"
] | null | null | null | # Copyright (C) 2013 by Brian Neal.
# This file is part of m209, the M-209 simulation.
# m209 is released under the MIT License (see LICENSE.txt).
__version__ = '0.1.0'
| 25.9 | 59 | 0.702703 | # Copyright (C) 2013 by Brian Neal.
# This file is part of m209, the M-209 simulation.
# m209 is released under the MIT License (see LICENSE.txt).
__version__ = '0.1.0'
class M209Error(Exception):
"""Base Exception class for all M209 errors"""
pass
| 0 | 0 | 0 | 66 | 0 | 0 | 0 | 0 | 23 |
adaaa237d5b0b5f17f2df86fe38bdfb039f51df3 | 928 | py | Python | djweb/dj_comp_hist/views.py | hdacosta400/computation_hist | 0941184fcdc970f3a6481552ccd318f3605da3c4 | [
"BSD-3-Clause"
] | null | null | null | djweb/dj_comp_hist/views.py | hdacosta400/computation_hist | 0941184fcdc970f3a6481552ccd318f3605da3c4 | [
"BSD-3-Clause"
] | null | null | null | djweb/dj_comp_hist/views.py | hdacosta400/computation_hist | 0941184fcdc970f3a6481552ccd318f3605da3c4 | [
"BSD-3-Clause"
] | null | null | null |
# Create your views here.
| 29.935484 | 115 | 0.681034 | from django.shortcuts import render, get_object_or_404
from .models import Person, Document
# Create your views here.
from django.http import HttpResponse
def index(request):
return HttpResponse("Hello, world. You're at Computation History project.")
def person(request, person_id):
person_obj = get_object... | 0 | 0 | 0 | 0 | 0 | 698 | 0 | 63 | 136 |
fb1924dd695c928dd260a27c4264c8eb9efa8b2f | 5,493 | py | Python | deprecated/example/scienz/wine.py | Vibrant-Planet/aorist | 067e119ef4d0d40802ce74a8e47d882e557ce195 | [
"MIT"
] | 16 | 2021-08-14T10:20:16.000Z | 2022-03-31T04:19:26.000Z | deprecated/example/scienz/wine.py | scie-nz/aorist | ac1e31251af7d851c4491a310b417de880b79d09 | [
"MIT"
] | 5 | 2021-08-15T23:19:10.000Z | 2021-09-26T20:50:41.000Z | deprecated/example/scienz/wine.py | Vibrant-Planet/aorist | 067e119ef4d0d40802ce74a8e47d882e557ce195 | [
"MIT"
] | 1 | 2022-01-06T01:26:24.000Z | 2022-01-06T01:26:24.000Z | """
Description taken from: https://archive.ics.uci.edu/ml/datasets/wine
1. Title of Database: Wine recognition data
Updated Sept 21, 1998 by C.Blake : Added attribute information
2. Sources:
(a) Forina, M. et al, PARVUS - An Extendible Package for Data
Exploration, Classification and Correlation. Insti... | 29.532258 | 173 | 0.706718 | """
Description taken from: https://archive.ics.uci.edu/ml/datasets/wine
1. Title of Database: Wine recognition data
Updated Sept 21, 1998 by C.Blake : Added attribute information
2. Sources:
(a) Forina, M. et al, PARVUS - An Extendible Package for Data
Exploration, Classification and Correlation. Insti... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 59 | 0 |
0e49bb580a5d5f08175f339cfec65801ef663019 | 2,002 | py | Python | python/plugins/processing/script/AddScriptFromTemplateAction.py | dyna-mis/Hilabeling | cb7d5d4be29624a20c8a367162dbc6fd779b2b52 | [
"MIT"
] | null | null | null | python/plugins/processing/script/AddScriptFromTemplateAction.py | dyna-mis/Hilabeling | cb7d5d4be29624a20c8a367162dbc6fd779b2b52 | [
"MIT"
] | null | null | null | python/plugins/processing/script/AddScriptFromTemplateAction.py | dyna-mis/Hilabeling | cb7d5d4be29624a20c8a367162dbc6fd779b2b52 | [
"MIT"
] | 1 | 2021-12-25T08:40:30.000Z | 2021-12-25T08:40:30.000Z | # -*- coding: utf-8 -*-
"""
***************************************************************************
AddScriptFromTemplateAction.py
---------------------
Date : August 2012
Copyright : (C) 2018 by Matteo Ghetta
Email : matteo dot ghetta at gmail dot com
... | 34.517241 | 107 | 0.534466 | # -*- coding: utf-8 -*-
"""
***************************************************************************
AddScriptFromTemplateAction.py
---------------------
Date : August 2012
Copyright : (C) 2018 by Matteo Ghetta
Email : matteo dot ghetta at gmail dot com
... | 3 | 0 | 0 | 587 | 0 | 0 | 0 | 98 | 160 |
616e10f5fae3a5ea4562c788c8aa6e8dba992e51 | 3,140 | py | Python | pylhc_submitter/htc/mask.py | pylhc/submitter | d0f41a3af9b1d3edd4976e6c2f0ded725bce5242 | [
"MIT"
] | null | null | null | pylhc_submitter/htc/mask.py | pylhc/submitter | d0f41a3af9b1d3edd4976e6c2f0ded725bce5242 | [
"MIT"
] | 28 | 2021-05-13T20:32:04.000Z | 2022-02-16T16:17:09.000Z | pylhc_submitter/htc/mask.py | pylhc/submitter | d0f41a3af9b1d3edd4976e6c2f0ded725bce5242 | [
"MIT"
] | null | null | null | """
Mask Resolver
-------------
This module provides functionality to resolve and write script masks for ``HTCondor`` jobs
submission.
"""
import logging
import re
from pathlib import Path
import pandas as pd
from pylhc_submitter.htc.utils import COLUMN_JOB_DIRECTORY, COLUMN_JOB_FILE
LOG = logging.ge... | 37.380952 | 101 | 0.66051 | """
Mask Resolver
-------------
This module provides functionality to resolve and write script masks for ``HTCondor`` jobs
submission.
"""
import logging
import re
from pathlib import Path
import pandas as pd
from pylhc_submitter.htc.utils import COLUMN_JOB_DIRECTORY, COLUMN_JOB_FILE
LOG = logging.ge... | 0 | 0 | 0 | 0 | 0 | 72 | 0 | 0 | 25 |
8281813687879c14230310a3d75a6d81d4878a59 | 53 | py | Python | PageDownloader.py | fede-da/PageDownloader | 2344e2307ea374690ba05923056fff9e59c9ad12 | [
"MIT"
] | null | null | null | PageDownloader.py | fede-da/PageDownloader | 2344e2307ea374690ba05923056fff9e59c9ad12 | [
"MIT"
] | null | null | null | PageDownloader.py | fede-da/PageDownloader | 2344e2307ea374690ba05923056fff9e59c9ad12 | [
"MIT"
] | null | null | null |
from gui import Gui
myGui: Gui = Gui()
myGui.run()
| 8.833333 | 19 | 0.660377 |
from gui import Gui
myGui: Gui = Gui()
myGui.run()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1bf8636ad93560d127d3d6d1fe0df15d89ff1d01 | 981 | py | Python | 00-lesson-1/fakelib/ani_easy.py | tonybutzer/hauge | 7cee4c8edda9a2a5a11e69425516c7c47bb21cbf | [
"MIT"
] | null | null | null | 00-lesson-1/fakelib/ani_easy.py | tonybutzer/hauge | 7cee4c8edda9a2a5a11e69425516c7c47bb21cbf | [
"MIT"
] | null | null | null | 00-lesson-1/fakelib/ani_easy.py | tonybutzer/hauge | 7cee4c8edda9a2a5a11e69425516c7c47bb21cbf | [
"MIT"
] | null | null | null | import matplotlib.animation as animation
| 28.852941 | 101 | 0.639144 | import matplotlib.pyplot as plt
import matplotlib.animation as animation
def ani_easy(tas, cmap='BrBG'):
# Get a handle on the figure and the axes
fig, ax = plt.subplots(figsize=(12,6))
# Plot the initial frame.
cax = tas[0,:,:].plot(
add_colorbar=True,
cmap=cmap,
#cmap='BrBG',
#cmap='m... | 0 | 0 | 0 | 0 | 0 | 886 | 0 | 10 | 44 |
bdaf6403e9b22af80d7d3749c95d783be133e19f | 628 | py | Python | setup.py | include-yy/account-manager | ae28433909d0f6580693d1a5b65e40dfbb9d5f57 | [
"MIT"
] | null | null | null | setup.py | include-yy/account-manager | ae28433909d0f6580693d1a5b65e40dfbb9d5f57 | [
"MIT"
] | null | null | null | setup.py | include-yy/account-manager | ae28433909d0f6580693d1a5b65e40dfbb9d5f57 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='yyam',
version='0.1.4',
packages=find_packages(),
description="include-yy's account manager",
author='include-yy',
author_email='969041171@qq.com',
url='https://github.com/include-yy/account-manager',
license='MIT',
install_... | 20.933333 | 56 | 0.56051 | from setuptools import setup, find_packages
setup(
name='yyam',
version='0.1.4',
packages=find_packages(),
description="include-yy's account manager",
author='include-yy',
author_email='969041171@qq.com',
url='https://github.com/include-yy/account-manager',
license='MIT',
install_... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1c0f05ad0b574b2eee47e13167c1d06b9b3d31dd | 911 | py | Python | tests/test_latex_admin.py | spitfire-hash/latex-admin | b4c14647024c82b5747a09df201fff0ef3bcaf76 | [
"Apache-2.0"
] | 1 | 2020-11-17T16:58:34.000Z | 2020-11-17T16:58:34.000Z | tests/test_latex_admin.py | spitfire-hash/latex-admin | b4c14647024c82b5747a09df201fff0ef3bcaf76 | [
"Apache-2.0"
] | 1 | 2020-11-17T14:07:20.000Z | 2020-11-18T13:08:12.000Z | tests/test_latex_admin.py | spitfire-hash/latex-admin | b4c14647024c82b5747a09df201fff0ef3bcaf76 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Tests for `latex_admin` package."""
# from latex_admin import latex_admin
| 26.794118 | 80 | 0.655324 | #!/usr/bin/env python
"""Tests for `latex_admin` package."""
import unittest
from click.testing import CliRunner
# from latex_admin import latex_admin
from latex_admin import cli
class TestLatexAdmin(unittest.TestCase):
"""Tests for `latex_admin` package."""
def setUp(self):
"""Set up test fixtur... | 0 | 0 | 0 | 704 | 0 | 0 | 0 | 14 | 91 |
63598cc7514dc8fafca550921a4aa55a549b34f0 | 503 | py | Python | setup.py | nondejus/lbcapi | 2f76e48e523451203108669af95355fa3bc827c4 | [
"MIT"
] | null | null | null | setup.py | nondejus/lbcapi | 2f76e48e523451203108669af95355fa3bc827c4 | [
"MIT"
] | null | null | null | setup.py | nondejus/lbcapi | 2f76e48e523451203108669af95355fa3bc827c4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
from setuptools import setup
# Allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='lbcapi',
version='1.0.2',
packages=['lbcapi'],
include_package_data=True,
license='MIT License',
des... | 23.952381 | 78 | 0.675944 | #!/usr/bin/env python
import os
from setuptools import setup
# Allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='lbcapi',
version='1.0.2',
packages=['lbcapi'],
include_package_data=True,
license='MIT License',
des... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d06ad21aa10ccffae0d63d49f3b4c9376f1ddc1f | 3,333 | py | Python | image-eso.py | osmarks/random-stuff | 78602eabd69aebfa061cf201a4d44555fa9a36e7 | [
"MIT"
] | 4 | 2021-02-04T15:09:14.000Z | 2021-12-19T10:54:59.000Z | image-eso.py | osmarks/random-stuff | 78602eabd69aebfa061cf201a4d44555fa9a36e7 | [
"MIT"
] | null | null | null | image-eso.py | osmarks/random-stuff | 78602eabd69aebfa061cf201a4d44555fa9a36e7 | [
"MIT"
] | 1 | 2021-12-19T22:05:07.000Z | 2021-12-19T22:05:07.000Z | from PIL import Image
import random
im = Image.open("/tmp/out.png")
px = im.load()
rng = random.Random()
COMMANDS = 18
size = im.size
position = (0, 0)
direction = (1, 0)
matrix_1 = ((0, 1), (-1, 0))
matrix_2 = ((0, -1), (1, 0))
stack = []
inbuf = ["b", "e", "e", "s", "i", "n", "c", "u", "r", "s", "e"]
while True:
... | 27.319672 | 97 | 0.508551 | from PIL import Image
import random
im = Image.open("/tmp/out.png")
px = im.load()
rng = random.Random()
def randomize(x, pos, m):
rng.seed(bytes(x) + pos[0].to_bytes(4, "little") + pos[1].to_bytes(4, "little"), 2)
return rng.randint(0, m), rng.randint(0, 255)
COMMANDS = 18
size = im.size
position = (0, 0)
d... | 0 | 0 | 0 | 288 | 0 | 316 | 0 | 0 | 67 |
082e570f2de4b9eee5e54397481981f401d3fc94 | 3,131 | py | Python | dpd/uscensus/download_lodes.py | davidbailey/dpd | 29bce937e34afa2161788a5c4a911e590a388229 | [
"MIT"
] | 6 | 2020-08-13T22:21:25.000Z | 2021-09-15T19:12:51.000Z | dpd/uscensus/download_lodes.py | davidbailey/dpd | 29bce937e34afa2161788a5c4a911e590a388229 | [
"MIT"
] | 3 | 2018-01-25T09:11:01.000Z | 2020-12-22T17:31:24.000Z | dpd/uscensus/download_lodes.py | davidbailey/dpd | 29bce937e34afa2161788a5c4a911e590a388229 | [
"MIT"
] | null | null | null | from dpd.utils import download_file
def download_lodes_data(data, st, part_or_seg, type_, year):
"""
Download LODES OD file. APIS documentation from here: https://lehd.ces.census.gov/data/lodes/LODES7/LODESTechDoc7.4.pdf
Args:
data (str): one of "od", "rac", or "wac"
e.g. "od"
... | 41.746667 | 576 | 0.586714 | from dpd.utils import download_file
def download_lodes_data(data, st, part_or_seg, type_, year):
"""
Download LODES OD file. APIS documentation from here: https://lehd.ces.census.gov/data/lodes/LODES7/LODESTechDoc7.4.pdf
Args:
data (str): one of "od", "rac", or "wac"
e.g. "od"
... | 108 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
98864ace31480e5ce14d8d87c7d89a17b38aae66 | 13,493 | py | Python | src/ovirtcli/format/text.py | oVirt/ovirt-engine-cli | 422d70e1dc422f0ca248abea47a472e3605caa4b | [
"Apache-2.0"
] | 4 | 2015-11-29T08:53:03.000Z | 2022-02-05T14:10:24.000Z | src/ovirtcli/format/text.py | oVirt/ovirt-engine-cli | 422d70e1dc422f0ca248abea47a472e3605caa4b | [
"Apache-2.0"
] | null | null | null | src/ovirtcli/format/text.py | oVirt/ovirt-engine-cli | 422d70e1dc422f0ca248abea47a472e3605caa4b | [
"Apache-2.0"
] | 4 | 2015-02-06T02:06:53.000Z | 2020-03-24T07:13:05.000Z | #
# Copyright (c) 2010 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 48.189286 | 173 | 0.477952 | #
# Copyright (c) 2010 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | 0 | 0 | 0 | 12,550 | 0 | 0 | 0 | 76 | 225 |
b3adc2a9d590d573c3ad57305e25bd01ca5345d6 | 4,705 | py | Python | scripts/argumentos_at.py | phabel-LD/python_class-2 | ac21d0d0e0e46c345dbcdb8cc0f47c11c17bff6b | [
"MIT"
] | null | null | null | scripts/argumentos_at.py | phabel-LD/python_class-2 | ac21d0d0e0e46c345dbcdb8cc0f47c11c17bff6b | [
"MIT"
] | null | null | null | scripts/argumentos_at.py | phabel-LD/python_class-2 | ac21d0d0e0e46c345dbcdb8cc0f47c11c17bff6b | [
"MIT"
] | null | null | null | '''
NAME
argumentos_at.py
VERSION
[1.0]
AUTHOR
Daianna Gonzalez Padilla <daianna@lcg.unam.mx>
DESCRIPTION
This programs gets a file with one or more dna sequences and returns an output file with the AT content
of each sequence, from the command line
CATEGORY
DNA sequence analysis
USAGE
... | 35.11194 | 113 | 0.62763 | '''
NAME
argumentos_at.py
VERSION
[1.0]
AUTHOR
Daianna Gonzalez Padilla <daianna@lcg.unam.mx>
DESCRIPTION
This programs gets a file with one or more dna sequences and returns an output file with the AT content
of each sequence, from the command line
CATEGORY
DNA sequence analysis
USAGE
... | 0 | 0 | 0 | 0 | 0 | 2,094 | 0 | -24 | 88 |
e0fc060a3e55ca4577fede87691a77acbe281033 | 1,903 | py | Python | users/migrations/0001_initial.py | hhdMrLion/DJANGO_CRM | 1f8d2d7a025f9dc54b5bf498e7a577469f74c612 | [
"Apache-2.0"
] | 1 | 2021-06-18T03:03:46.000Z | 2021-06-18T03:03:46.000Z | users/migrations/0001_initial.py | hhdMrLion/DJANGO_CRM | 1f8d2d7a025f9dc54b5bf498e7a577469f74c612 | [
"Apache-2.0"
] | null | null | null | users/migrations/0001_initial.py | hhdMrLion/DJANGO_CRM | 1f8d2d7a025f9dc54b5bf498e7a577469f74c612 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-09-28 03:34
from __future__ import unicode_literals
| 43.25 | 141 | 0.596952 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.29 on 2020-09-28 03:34
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
... | 291 | 0 | 0 | 1,550 | 0 | 0 | 0 | 41 | 96 |
08f97b92295c3c29eff10b9ee0006f0dca2d439f | 1,286 | py | Python | commerce/admin.py | PrestonMonteWest/comp-mart | e7699f3c4ac1d77c447cd9300fb9912f4840d2a9 | [
"Apache-2.0"
] | 1 | 2018-04-09T02:06:30.000Z | 2018-04-09T02:06:30.000Z | commerce/admin.py | PrestonMonteWest/compmart | e7699f3c4ac1d77c447cd9300fb9912f4840d2a9 | [
"Apache-2.0"
] | 1 | 2018-07-04T21:08:58.000Z | 2018-07-09T02:34:50.000Z | commerce/admin.py | PrestonMonteWest/compmart | e7699f3c4ac1d77c447cd9300fb9912f4840d2a9 | [
"Apache-2.0"
] | null | null | null | from django.contrib import admin
from . import models
admin.site.register(models.Product, ProductAdmin)
admin.site.register(models.Review, ReviewAdmin)
admin.site.register(models.Order, OrderAdmin)
| 36.742857 | 80 | 0.66874 | from django.contrib import admin
from . import models
class OrderItemInline(admin.TabularInline):
fields = ('product', 'quantity')
raw_id_fields = ('product',)
model = models.OrderItem
extra = 1
class ProductAdmin(admin.ModelAdmin):
list_display = ('name', 'price', 'description', 'stock', 'discont... | 0 | 0 | 0 | 995 | 0 | 0 | 0 | 0 | 92 |
ae0f8d2404360860d62fb249f2d3aa6934c5170c | 1,730 | py | Python | scripts/financials.py | pwaring/125-accounts | a8d577110184e5f833368977c36b1e407c7357f6 | [
"MIT"
] | null | null | null | scripts/financials.py | pwaring/125-accounts | a8d577110184e5f833368977c36b1e407c7357f6 | [
"MIT"
] | 7 | 2017-04-30T11:11:26.000Z | 2020-09-24T15:23:24.000Z | scripts/financials.py | pwaring/125-accounts | a8d577110184e5f833368977c36b1e407c7357f6 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import yaml
import pathlib
import decimal
import datetime
import os
decimal.getcontext().prec = 10
parser = argparse.ArgumentParser()
parser.add_argument('--data', help='path to data directory', required=True)
args = parser.parse_args()
script_path = os.path.dirname(os.path.re... | 28.833333 | 181 | 0.695954 | #!/usr/bin/env python3
import argparse
import yaml
import pathlib
import decimal
import datetime
import os
decimal.getcontext().prec = 10
parser = argparse.ArgumentParser()
parser.add_argument('--data', help='path to data directory', required=True)
args = parser.parse_args()
script_path = os.path.dirname(os.path.re... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
25efef0373814a37ec3b036dce7073a24aa9cde9 | 2,343 | py | Python | setup.py | Multiplicom/wanna-transfer | 4a0b35e9b2c54395b53221f3b796343d9341173b | [
"MIT"
] | 2 | 2018-06-06T16:04:20.000Z | 2018-10-18T12:17:38.000Z | setup.py | Multiplicom/wanna-transfer | 4a0b35e9b2c54395b53221f3b796343d9341173b | [
"MIT"
] | 15 | 2018-01-11T10:16:11.000Z | 2020-02-18T08:23:12.000Z | setup.py | Multiplicom/wanna-transfer | 4a0b35e9b2c54395b53221f3b796343d9341173b | [
"MIT"
] | 1 | 2018-02-20T19:27:09.000Z | 2018-02-20T19:27:09.000Z | """
Wanna-transfer
--------------
Wanna-transfer is a python based tool to
efficient upload and download large files to and from the cloud.
It is easy to setup
```````````````````
And run it:
.. code:: bash
$ pip install wanna-transfer
$ wanna -h
Links
`````
* `development
<https://github.com/Multiplicom/w... | 27.892857 | 88 | 0.618865 | """
Wanna-transfer
--------------
Wanna-transfer is a python based tool to
efficient upload and download large files to and from the cloud.
It is easy to setup
```````````````````
And run it:
.. code:: bash
$ pip install wanna-transfer
$ wanna -h
Links
`````
* `development
<https://github.com/Multiplicom/w... | 0 | 0 | 0 | 0 | 0 | 311 | 0 | -20 | 90 |
4547d0d41da10b58bef3135ba608a2c0f405d4b5 | 282 | py | Python | src/parseCoverageReport.py | LASER-UMASS/Swami | feaa5e091b7c2514db5106eba39f7ffbfa6ed408 | [
"MIT"
] | 9 | 2019-02-25T16:12:31.000Z | 2022-01-18T02:39:50.000Z | src/parseCoverageReport.py | sophiatong/Swami-Additional | feaa5e091b7c2514db5106eba39f7ffbfa6ed408 | [
"MIT"
] | null | null | null | src/parseCoverageReport.py | sophiatong/Swami-Additional | feaa5e091b7c2514db5106eba39f7ffbfa6ed408 | [
"MIT"
] | 5 | 2019-11-21T06:51:40.000Z | 2022-01-18T02:40:08.000Z | """Extract all tables from an html file, printing and saving each to csv file."""
import pandas as pd
import sys
df_list = pd.read_html(sys.argv[1])
df = pd.DataFrame((df_list[0]))
for index, row in df.iterrows():
print row['Element'],"::", row['Cov.'], "::", row['Cov..1']
| 23.5 | 81 | 0.648936 | """Extract all tables from an html file, printing and saving each to csv file."""
import pandas as pd
import sys
df_list = pd.read_html(sys.argv[1])
df = pd.DataFrame((df_list[0]))
for index, row in df.iterrows():
print row['Element'],"::", row['Cov.'], "::", row['Cov..1']
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
97cef5ed02722ef12836a72d979af4079d5745b2 | 426 | py | Python | pyleecan/Methods/Material/ModelBH/get_BH.py | tobsen2code/pyleecan | 5b1ded9e389e0c79ed7b7c878b6e939f2d9962e9 | [
"Apache-2.0"
] | 95 | 2019-01-23T04:19:45.000Z | 2022-03-17T18:22:10.000Z | pyleecan/Methods/Material/ModelBH/get_BH.py | ecs-kev/pyleecan | 1faedde4b24acc6361fa1fdd4e980eaec4ca3a62 | [
"Apache-2.0"
] | 366 | 2019-02-20T07:15:08.000Z | 2022-03-31T13:37:23.000Z | pyleecan/Methods/Material/ModelBH/get_BH.py | ecs-kev/pyleecan | 1faedde4b24acc6361fa1fdd4e980eaec4ca3a62 | [
"Apache-2.0"
] | 74 | 2019-01-24T01:47:31.000Z | 2022-02-25T05:44:42.000Z | # -*- coding: utf-8 -*-
def get_BH(self):
"""
Return the B(H) curve of the material (by default do nothing).
Parameters
----------
self : ModelBH
a ModelBH object
Returns
-------
BH: numpy.ndarray
B(H) values (two colums matrix: H and B(H))
"""
return None
| 17.75 | 66 | 0.593897 | # -*- coding: utf-8 -*-
from numpy import array, linspace, pi
import numpy as np
from scipy.optimize import curve_fit, root_scalar
def get_BH(self):
"""
Return the B(H) curve of the material (by default do nothing).
Parameters
----------
self : ModelBH
a ModelBH object
Returns
--... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 41 | 66 |
0e4df3404e18896ae0f55afd4ce7fd57f74c484b | 871 | py | Python | build-deployment/build_local.py | MIT-Mobile/MIT-Mobile-for-Android | 82c093cab343b8c72bfc6375d9e96c6a7cb5be7d | [
"MIT"
] | 21 | 2015-04-09T08:19:04.000Z | 2021-04-16T01:59:41.000Z | build-deployment/build_local.py | justinanderson/MIT-Mobile-for-Android | 82c093cab343b8c72bfc6375d9e96c6a7cb5be7d | [
"MIT"
] | 12 | 2015-01-06T21:20:08.000Z | 2016-01-13T16:24:56.000Z | build-deployment/build_local.py | MIT-Mobile/MIT-Mobile-for-Android | 82c093cab343b8c72bfc6375d9e96c6a7cb5be7d | [
"MIT"
] | 12 | 2015-01-22T13:33:10.000Z | 2019-05-07T06:32:11.000Z | #!/usr/bin/python
import sys
import os
import build_include
""" parameters -- tag: the git tag or branch to use, fast: use git pull versus git clone
zero parameters means build local source without pulling from git"""
if len(sys.argv) > 1:
tag = sys.argv[1]
else:
tag = False
if len(sys.argv) > 2:
... | 24.194444 | 94 | 0.692308 | #!/usr/bin/python
import sys
import os
import build_include
""" parameters -- tag: the git tag or branch to use, fast: use git pull versus git clone
zero parameters means build local source without pulling from git"""
if len(sys.argv) > 1:
tag = sys.argv[1]
else:
tag = False
if len(sys.argv) > 2:
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
8df4d16c244a374e0505de272ff213a86c20d408 | 1,488 | py | Python | scripts/generate_openapi.py | sillsdev/TheCombine | d8f87c464c5a770019d55eefb3dc6a276ab9da13 | [
"MIT"
] | 14 | 2019-06-14T23:18:04.000Z | 2021-09-04T03:28:32.000Z | scripts/generate_openapi.py | sillsdev/TheCombine | d8f87c464c5a770019d55eefb3dc6a276ab9da13 | [
"MIT"
] | 1,114 | 2019-06-05T15:40:26.000Z | 2022-03-29T16:07:37.000Z | scripts/generate_openapi.py | sillsdev/TheCombine | d8f87c464c5a770019d55eefb3dc6a276ab9da13 | [
"MIT"
] | 9 | 2019-07-31T13:41:15.000Z | 2021-12-06T16:50:02.000Z | #!/usr/bin/env python3
"""Regenerate the frontend OpenAPI bindings to the backend.
Requirements:
- npm/node installed and in PATH
- java 8+ installed and in PATH
"""
EXIT_SUCCESS = 0
if __name__ == "__main__":
main()
| 29.176471 | 98 | 0.639785 | #!/usr/bin/env python3
"""Regenerate the frontend OpenAPI bindings to the backend.
Requirements:
- npm/node installed and in PATH
- java 8+ installed and in PATH
"""
import os
from pathlib import Path
import shutil
from typing import List
EXIT_SUCCESS = 0
def execute(command: List[str], check: bool = True... | 3 | 0 | 0 | 0 | 0 | 1,132 | 0 | -15 | 134 |
6f69eb1be4adecc6264b05f55189f4a39a849b14 | 1,989 | py | Python | 70-79/73.py | NiCrook/Ebabit_Exercises | 235f63e3b6053cbad05d7a3a97595deef085779c | [
"MIT"
] | null | null | null | 70-79/73.py | NiCrook/Ebabit_Exercises | 235f63e3b6053cbad05d7a3a97595deef085779c | [
"MIT"
] | null | null | null | 70-79/73.py | NiCrook/Ebabit_Exercises | 235f63e3b6053cbad05d7a3a97595deef085779c | [
"MIT"
] | null | null | null | # https://edabit.com/challenge/76ibd8jZxvhAwDskb
#
# A city skyline can be represented as a 2-D list with 1s representing buildings. In the example below, the height of
# the tallest building is 4 (second-most right column).
#
# [[0, 0, 0, 0, 0, 0],
# [0, 0, 0, 0, 1, 0],
# [0, 0, 1, 0, 1, 0],
# [0, 1, 1, 1, 1, 0],
# [1... | 22.602273 | 117 | 0.533937 | # https://edabit.com/challenge/76ibd8jZxvhAwDskb
#
# A city skyline can be represented as a 2-D list with 1s representing buildings. In the example below, the height of
# the tallest building is 4 (second-most right column).
#
# [[0, 0, 0, 0, 0, 0],
# [0, 0, 0, 0, 1, 0],
# [0, 0, 1, 0, 1, 0],
# [0, 1, 1, 1, 1, 0],
# [1... | 9 | 0 | 0 | 0 | 0 | 884 | 0 | 0 | 23 |
45171d5dbe0e7a28c4085bc10ef266e011e2b134 | 12,848 | py | Python | coniql/simplugin.py | callumforrester/coniql | 6b0b217d37a93acc680946b8eb2a40db0da551d2 | [
"Apache-2.0"
] | null | null | null | coniql/simplugin.py | callumforrester/coniql | 6b0b217d37a93acc680946b8eb2a40db0da551d2 | [
"Apache-2.0"
] | null | null | null | coniql/simplugin.py | callumforrester/coniql | 6b0b217d37a93acc680946b8eb2a40db0da551d2 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from typing import Dict, Type, TypeVar
# How long to keep Sim alive after the last listener has gone
SIM_DESTROY_TIMEOUT = 10
# Map of channel_id func to its Sim class
CHANNEL_CLASSES: Dict[str, Type['SimChannel']] = {}
# Map of channel_id func to its callable function
FUNCTION_CLA... | 35.888268 | 86 | 0.605464 | from __future__ import annotations
import asyncio
import json
import math
import time
from asyncio import Queue
import dataclasses
from dataclasses import dataclass
from typing import Dict, Type, Set, TypeVar, Generic, List, Any
import numpy as np
from coniql.util import doc_field
from .plugin import Plugin
from ._t... | 0 | 4,812 | 1,639 | 2,708 | 0 | 2,580 | 0 | 202 | 498 |
3042ea44e8d6cea2ff000f2c606d371c9d9725dd | 872 | py | Python | set2/python/p14.py | tkuriyama/cryptopals | 1fce06e4e230a0e88a1339f08335fffcef14419f | [
"MIT"
] | null | null | null | set2/python/p14.py | tkuriyama/cryptopals | 1fce06e4e230a0e88a1339f08335fffcef14419f | [
"MIT"
] | null | null | null | set2/python/p14.py | tkuriyama/cryptopals | 1fce06e4e230a0e88a1339f08335fffcef14419f | [
"MIT"
] | null | null | null | import utils
def main():
"""Main."""
code_b64 = 'Um9sbGluJyBpbiBteSA1LjAKV2l0aCBteSByYWctdG9wIGRvd24gc28gbXkg'
code_b64 += 'aGFpciBjYW4gYmxvdwpUaGUgZ2lybGllcyBvbiBzdGFuZGJ5IHdhdmluZyBq'
code_b64 += 'dXN0IHRvIHNheSBoaQpEaWQgeW91IHN0b3A/IE5vLCBJIGp1c3QgZHJvdmUg'
code_b64 += 'YnkK'
code = bytearra... | 32.296296 | 78 | 0.659404 | import utils
def main():
"""Main."""
code_b64 = 'Um9sbGluJyBpbiBteSA1LjAKV2l0aCBteSByYWctdG9wIGRvd24gc28gbXkg'
code_b64 += 'aGFpciBjYW4gYmxvdwpUaGUgZ2lybGllcyBvbiBzdGFuZGJ5IHdhdmluZyBq'
code_b64 += 'dXN0IHRvIHNheSBoaQpEaWQgeW91IHN0b3A/IE5vLCBJIGp1c3QgZHJvdmUg'
code_b64 += 'YnkK'
code = bytearra... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
aafa300cff88d9dacf2f755dff8458d8b017222b | 478 | py | Python | Day-06/part2.py | archanpatkar/advent2021 | 8e0780cd28b5825af092e4ba8e3d9cd1059bce92 | [
"MIT"
] | null | null | null | Day-06/part2.py | archanpatkar/advent2021 | 8e0780cd28b5825af092e4ba8e3d9cd1059bce92 | [
"MIT"
] | null | null | null | Day-06/part2.py | archanpatkar/advent2021 | 8e0780cd28b5825af092e4ba8e3d9cd1059bce92 | [
"MIT"
] | null | null | null | import sys
sys.path.append("..")
data = fnl(parse)[0]
school = data
print(data)
days = 256
rate = 7
track = [0 for i in range(rate+2)]
for fish in range(len(school)):
track[school[fish]] += 1
pprint(track)
for day in range(days):
day0 = track[0]
track = track[1:]
track.append(0)
if(day0 >= ... | 16.482759 | 49 | 0.585774 | import sys
sys.path.append("..")
from common import *
def parse(d):
return [int(n) for n in d.strip().split(",")]
data = fnl(parse)[0]
school = data
print(data)
days = 256
rate = 7
track = [0 for i in range(rate+2)]
for fish in range(len(school)):
track[school[fish]] += 1
pprint(track)
for day in rang... | 0 | 0 | 0 | 0 | 0 | 42 | 0 | -1 | 45 |
b74ba95ddc10bcbe3857efff4a215ec3fe8911d1 | 503 | py | Python | Scrape&Sum.py | fxie520/Coursera-py4everybody-specialization | e20666e2d07bb9af21689c9acda364936bb68938 | [
"MIT"
] | null | null | null | Scrape&Sum.py | fxie520/Coursera-py4everybody-specialization | e20666e2d07bb9af21689c9acda364936bb68938 | [
"MIT"
] | null | null | null | Scrape&Sum.py | fxie520/Coursera-py4everybody-specialization | e20666e2d07bb9af21689c9acda364936bb68938 | [
"MIT"
] | null | null | null | from urllib.request import urlopen
from bs4 import BeautifulSoup
import ssl
# Ignore SSL certificate errors
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
url = "http://py4e-data.dr-chuck.net/comments_1481945.html"
html = urlopen(url, context=ctx).read().decode()
soup = ... | 25.15 | 59 | 0.735586 | from urllib.request import urlopen
from bs4 import BeautifulSoup
import ssl
# Ignore SSL certificate errors
ctx = ssl.create_default_context()
ctx.check_hostname = False
ctx.verify_mode = ssl.CERT_NONE
url = "http://py4e-data.dr-chuck.net/comments_1481945.html"
html = urlopen(url, context=ctx).read().decode()
soup = ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e1301a6db67dcff08419ca673298c1fb9f4471b4 | 375 | py | Python | roundhouse/contrib/serializers/toml.py | nick-allen/python-roundhouse | 6739fbaf0c5d57802805701848693837a3bdd539 | [
"MIT"
] | null | null | null | roundhouse/contrib/serializers/toml.py | nick-allen/python-roundhouse | 6739fbaf0c5d57802805701848693837a3bdd539 | [
"MIT"
] | null | null | null | roundhouse/contrib/serializers/toml.py | nick-allen/python-roundhouse | 6739fbaf0c5d57802805701848693837a3bdd539 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
| 18.75 | 56 | 0.68 | from __future__ import absolute_import
import toml
from roundhouse import Serializer
class TOMLSerializer(Serializer):
format = 'toml'
extensions = ['.toml']
def serialize(self, data, stream):
stream.write(toml.dumps(data).encode())
return stream
def deserialize(self, stream):
... | 0 | 0 | 0 | 264 | 0 | 0 | 0 | 2 | 69 |
b7a8c1c8ec978d97439c01dcd896e70376a29ddc | 11,641 | py | Python | wip/da-dmn-analysis.py | CANNlab/epitome | ba8b4831c87f008170f4e9e27a8a946e49fcff54 | [
"Apache-2.0"
] | null | null | null | wip/da-dmn-analysis.py | CANNlab/epitome | ba8b4831c87f008170f4e9e27a8a946e49fcff54 | [
"Apache-2.0"
] | null | null | null | wip/da-dmn-analysis.py | CANNlab/epitome | ba8b4831c87f008170f4e9e27a8a946e49fcff54 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import numpy as np
def slidewin_intranet_corr(data, idx, net, n_steps, win_step, win_len):
"""
data -- voxels x timepoints
idx -- voxel network labels (integers)
net -- interger value representing network of interest
n_steps -- number of windows to take
win_step -- step le... | 35.169184 | 140 | 0.58397 | #!/usr/bin/env python
import numpy as np
import epitome as epi
def slidewin_intranet_corr(data, idx, net, n_steps, win_step, win_len):
"""
data -- voxels x timepoints
idx -- voxel network labels (integers)
net -- interger value representing network of interest
n_steps -- number of windows to take
... | 0 | 0 | 0 | 0 | 0 | 7,059 | 0 | 0 | 68 |
2b60fd25fc7d2f2503866bee9497078f5b3b172b | 1,992 | py | Python | readthedocs/organizations/managers.py | NiklasTyra/readthedocs.org | c561a68fbdd1de6ac46d2c15bd652862f3219550 | [
"MIT"
] | 1 | 2021-06-25T01:18:19.000Z | 2021-06-25T01:18:19.000Z | readthedocs/organizations/managers.py | NiklasTyra/readthedocs.org | c561a68fbdd1de6ac46d2c15bd652862f3219550 | [
"MIT"
] | 4 | 2021-06-05T00:10:33.000Z | 2022-01-13T03:44:34.000Z | readthedocs/organizations/managers.py | NiklasTyra/readthedocs.org | c561a68fbdd1de6ac46d2c15bd652862f3219550 | [
"MIT"
] | null | null | null | """Organizations managers."""
| 26.210526 | 76 | 0.606928 | """Organizations managers."""
from django.db import models
from readthedocs.core.utils.extend import SettingsOverrideObject
from .constants import ADMIN_ACCESS, READ_ONLY_ACCESS
class TeamManagerBase(models.Manager):
"""Manager to control team's access."""
def teams_for_user(self, user, organization, adm... | 0 | 0 | 0 | 1,739 | 0 | 0 | 0 | 82 | 138 |
c1cac74dfc3a9b1c44689663e40a570ec5805b07 | 422 | py | Python | aliyun/api/rest/Slb20140515DescribeLoadBalancerHTTPSListenerAttributeRequest.py | snowyxx/aliyun-python-demo | ed40887ddff440b85b77f9b2a1fcda11cca55c8b | [
"Apache-2.0"
] | null | null | null | aliyun/api/rest/Slb20140515DescribeLoadBalancerHTTPSListenerAttributeRequest.py | snowyxx/aliyun-python-demo | ed40887ddff440b85b77f9b2a1fcda11cca55c8b | [
"Apache-2.0"
] | null | null | null | aliyun/api/rest/Slb20140515DescribeLoadBalancerHTTPSListenerAttributeRequest.py | snowyxx/aliyun-python-demo | ed40887ddff440b85b77f9b2a1fcda11cca55c8b | [
"Apache-2.0"
] | null | null | null | '''
Created by auto_sdk on 2015.01.28
'''
| 32.461538 | 82 | 0.777251 | '''
Created by auto_sdk on 2015.01.28
'''
from aliyun.api.base import RestApi
class Slb20140515DescribeLoadBalancerHTTPSListenerAttributeRequest(RestApi):
def __init__(self,domain='slb.aliyuncs.com',port=80):
RestApi.__init__(self,domain, port)
self.ListenerPort = None
self.LoadBalancerId = None
def ... | 0 | 0 | 0 | 317 | 0 | 0 | 0 | 14 | 46 |
4c976d7e71935899c09afdb2d9652537c33d1a1e | 2,056 | py | Python | rosidl_cli/rosidl_cli/command/generate/extensions.py | iuhilnehc-ynos/rosidl | f0b42cfe83b4c2e731023885b4da4ee7c025c0df | [
"Apache-2.0"
] | null | null | null | rosidl_cli/rosidl_cli/command/generate/extensions.py | iuhilnehc-ynos/rosidl | f0b42cfe83b4c2e731023885b4da4ee7c025c0df | [
"Apache-2.0"
] | 1 | 2021-03-16T02:33:22.000Z | 2021-03-16T02:33:22.000Z | rosidl_cli/rosidl_cli/command/generate/extensions.py | iuhilnehc-ynos/rosidl | f0b42cfe83b4c2e731023885b4da4ee7c025c0df | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 35.448276 | 90 | 0.724222 | # Copyright 2021 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | 0 | 0 | 0 | 937 | 0 | 0 | 0 | 22 | 46 |
ee83c4eb3749bad74f63fd196ba0351d9b127ede | 1,410 | py | Python | dm_control/mjcf/skin_test.py | h8907283/dm_control | fe4449606742a7b8bec81930790b98244cddc538 | [
"Apache-2.0"
] | 2,863 | 2018-01-03T01:38:52.000Z | 2022-03-30T09:49:50.000Z | dm_control/mjcf/skin_test.py | krakhit/dm_control | 4e1a35595124742015ae0c7a829e099a5aa100f5 | [
"Apache-2.0"
] | 266 | 2018-01-03T16:00:04.000Z | 2022-03-26T15:45:48.000Z | dm_control/mjcf/skin_test.py | krakhit/dm_control | 4e1a35595124742015ae0c7a829e099a5aa100f5 | [
"Apache-2.0"
] | 580 | 2018-01-03T03:17:27.000Z | 2022-03-31T19:29:32.000Z | # Copyright 2020 The dm_control Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 30.652174 | 78 | 0.722695 | # Copyright 2020 The dm_control Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | 0 | 0 | 0 | 351 | 0 | 0 | 0 | 34 | 91 |
36346791d88912db48de8c00963e7c8259784d26 | 118 | py | Python | lib_pypy/_ctypes/dummy.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 381 | 2018-08-18T03:37:22.000Z | 2022-02-06T23:57:36.000Z | lib_pypy/_ctypes/dummy.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 16 | 2018-09-22T18:12:47.000Z | 2022-02-22T20:03:59.000Z | lib_pypy/_ctypes/dummy.py | nanjekyejoannah/pypy | e80079fe13c29eda7b2a6b4cd4557051f975a2d9 | [
"Apache-2.0",
"OpenSSL"
] | 55 | 2015-08-16T02:41:30.000Z | 2022-03-20T20:33:35.000Z |
resize = dummyfunc
| 19.666667 | 64 | 0.754237 | def dummyfunc(*args, **kwargs):
raise NotImplementedError("non-implemented ctypes function")
resize = dummyfunc
| 0 | 0 | 0 | 0 | 0 | 75 | 0 | 0 | 22 |
625ef6fdd5771725491ab68a02179e0c1d073be3 | 1,295 | py | Python | tools/mo/unit_tests/mo/utils/summarize_graph_test.py | pazamelin/openvino | b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48 | [
"Apache-2.0"
] | 1 | 2021-04-20T08:14:51.000Z | 2021-04-20T08:14:51.000Z | tools/mo/unit_tests/mo/utils/summarize_graph_test.py | pazamelin/openvino | b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48 | [
"Apache-2.0"
] | 58 | 2020-11-06T12:13:45.000Z | 2022-03-28T13:20:11.000Z | tools/mo/unit_tests/mo/utils/summarize_graph_test.py | pazamelin/openvino | b7e8ef910d7ed8e52326d14dc6fd53b71d16ed48 | [
"Apache-2.0"
] | 2 | 2019-09-20T01:33:37.000Z | 2019-09-20T08:42:11.000Z | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
pbtxt = 'node{name:"Placeholder"op:"Placeholder"attr{key:"dtype"value{type:DT_FLOAT}}attr{key:"shape"value{shape{dim' + \
'{size:1}dim{size:227}dim{size:227}dim{size:3}}}}}node{name:"Output/Identity"op:"Identity"input:"Placeholde... | 49.807692 | 121 | 0.688031 | # Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import unittest
from unittest.mock import patch, mock_open
from openvino.tools.mo.front.tf.loader import load_tf_graph_def
from openvino.tools.mo.utils.summarize_graph import summarize_graph
pbtxt = 'node{name:"Placeholder"op:"Placehol... | 0 | 0 | 0 | 705 | 0 | 0 | 0 | 103 | 113 |
5908fb762191a70522748c2baac23a20f269187f | 312 | py | Python | Competitions/Codechef/LTIME50/MAXOR.py | cnm06/Competitive-Programming | 94242ae458570d503b8218f37624b88cc5020d23 | [
"MIT"
] | 994 | 2017-02-28T06:13:47.000Z | 2022-03-31T10:49:00.000Z | Competitions/Codechef/LTIME50/MAXOR.py | Quadrified/Competitive-Programming | bccb69952cc5260fb3647b3301ddac1023dacac8 | [
"MIT"
] | 16 | 2018-01-01T02:59:55.000Z | 2021-11-22T12:49:16.000Z | Competitions/Codechef/LTIME50/MAXOR.py | Quadrified/Competitive-Programming | bccb69952cc5260fb3647b3301ddac1023dacac8 | [
"MIT"
] | 325 | 2017-06-15T03:32:43.000Z | 2022-03-28T22:43:42.000Z | t = int(raw_input().strip())
for i in xrange(t):
n = int(raw_input().strip())
data = [int(j) for j in raw_input().strip().split()]
ans = 0
for j in xrange(n - 1):
for k in xrange(j + 1, n):
if data[j] | data[k] <= max(data[j], data[k]):
ans += 1
print ans
| 28.363636 | 58 | 0.487179 | t = int(raw_input().strip())
for i in xrange(t):
n = int(raw_input().strip())
data = [int(j) for j in raw_input().strip().split()]
ans = 0
for j in xrange(n - 1):
for k in xrange(j + 1, n):
if data[j] | data[k] <= max(data[j], data[k]):
ans += 1
print ans
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
eaa0734620065fe0d364268b18d5ef98ed86ef52 | 7,687 | py | Python | tests/test_imageprojection.py | s1duan/SmoothParticleNets | 826cb25396b59435dc95df5a119d2b349fcfbd4f | [
"MIT"
] | 45 | 2018-05-07T16:56:44.000Z | 2022-03-20T02:52:39.000Z | tests/test_imageprojection.py | s1duan/SmoothParticleNets | 826cb25396b59435dc95df5a119d2b349fcfbd4f | [
"MIT"
] | 1 | 2021-09-27T21:10:33.000Z | 2021-10-03T22:11:40.000Z | tests/test_imageprojection.py | s1duan/SmoothParticleNets | 826cb25396b59435dc95df5a119d2b349fcfbd4f | [
"MIT"
] | 17 | 2018-07-26T20:22:26.000Z | 2021-12-07T03:46:38.000Z | import os
import sys
# Add path to python source to path.
sys.path.append(os.path.join(os.path.dirname(
os.path.dirname(os.path.abspath(__file__))), "python"))
import torch
try:
except ImportError:
print("Make sure to compile SmoothParticleNets before running tests.")
raise
if __name__ == '__main__':... | 37.315534 | 128 | 0.584493 | import os
import sys
# Add path to python source to path.
sys.path.append(os.path.join(os.path.dirname(
os.path.dirname(os.path.abspath(__file__))), "python"))
import SmoothParticleNets as spn
import itertools
import numpy as np
import torch
import torch.autograd
from gradcheck import gradcheck
from test_convsdf ... | 0 | 0 | 0 | 0 | 0 | 6,507 | 0 | 89 | 297 |
f6c03d2c5a2d32ef6ce7eaef03a2a7691daf33a2 | 300 | py | Python | day2_1.py | defectedWBC/AoC | a3e6e05eff86cbeb8dea99c4b9b497282f35c7f7 | [
"MIT"
] | null | null | null | day2_1.py | defectedWBC/AoC | a3e6e05eff86cbeb8dea99c4b9b497282f35c7f7 | [
"MIT"
] | null | null | null | day2_1.py | defectedWBC/AoC | a3e6e05eff86cbeb8dea99c4b9b497282f35c7f7 | [
"MIT"
] | null | null | null | data=open('input2.txt',"r")
la=list()
h,d=0,0
for x in data:
la.append(x.strip().split())
for i in range(len(la)):
if la[i][0]=='forward':
h+=int(la[i][1])
elif la[i][0]=='down':
d+=int(la[i][1])
elif la[i][0]=='up':
d-=int(la[i][1])
print(h*d)
| 20 | 33 | 0.463333 | data=open('input2.txt',"r")
la=list()
h,d=0,0
for x in data:
la.append(x.strip().split())
for i in range(len(la)):
if la[i][0]=='forward':
h+=int(la[i][1])
elif la[i][0]=='down':
d+=int(la[i][1])
elif la[i][0]=='up':
d-=int(la[i][1])
print(h*d)
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
1e2c392a91587264af9830cc82659e4dcfc073e0 | 4,505 | py | Python | examples/ex6_multiprocessing.py | vallen-systems/pyVallenAE | 0e1c712c055ea5c4e7cb4373a2bf73f33c2b886d | [
"MIT"
] | 10 | 2020-01-30T15:34:51.000Z | 2022-03-11T07:49:31.000Z | examples/ex6_multiprocessing.py | vallen-systems/pyVallenAE | 0e1c712c055ea5c4e7cb4373a2bf73f33c2b886d | [
"MIT"
] | 1 | 2020-10-30T16:25:11.000Z | 2020-11-05T19:51:51.000Z | examples/ex6_multiprocessing.py | vallen-systems/pyVallenAE | 0e1c712c055ea5c4e7cb4373a2bf73f33c2b886d | [
"MIT"
] | 5 | 2020-02-08T04:43:03.000Z | 2022-02-23T13:52:00.000Z | """
Go fast with multiprocessing
============================
The streaming interfaces with iterables allow efficient batch processing as shown :doc:`here <ex4_timepicker_batch>`.
But still only one core/thread will be utilized. We will change that will multiprocessing.
Following example shows a batch feature extract... | 37.541667 | 120 | 0.722531 | """
Go fast with multiprocessing
============================
The streaming interfaces with iterables allow efficient batch processing as shown :doc:`here <ex4_timepicker_batch>`.
But still only one core/thread will be utilized. We will change that will multiprocessing.
Following example shows a batch feature extract... | 0 | 0 | 0 | 0 | 161 | 177 | 0 | 17 | 133 |
e826917f2d28f05bb890797412dd67440c0d2bfa | 7,870 | py | Python | machine_learning_with_python/ml_logger/__init__.py | universityofprofessorex/machine-learning-with-python | 88cf5951ccb6ef4ee7a6e0f818b67bb82984aff8 | [
"Apache-2.0"
] | null | null | null | machine_learning_with_python/ml_logger/__init__.py | universityofprofessorex/machine-learning-with-python | 88cf5951ccb6ef4ee7a6e0f818b67bb82984aff8 | [
"Apache-2.0"
] | null | null | null | machine_learning_with_python/ml_logger/__init__.py | universityofprofessorex/machine-learning-with-python | 88cf5951ccb6ef4ee7a6e0f818b67bb82984aff8 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
try: # python 3
from collections import abc
except ImportError: # python 2
import inspect
# import slack
from loguru import logger
LOGGERS = __name__
# """ Logging handler intercepting existing handlers to redirect them to loguru """
# SOURCE: https://github.com/jupiterbjy/CUIAudio... | 30.503876 | 108 | 0.650064 | #!/usr/bin/env python3
import collections
try: # python 3
from collections import abc
except ImportError: # python 2
import collections as abc
import concurrent.futures
from datetime import datetime
import gc
import inspect
import logging
from logging import Logger, LogRecord
import os
# import slack
impor... | 0 | 0 | 0 | 2,755 | 0 | 3,635 | 0 | 71 | 485 |
5aba823208424a96fa512fc72bb36d20476152c7 | 3,647 | py | Python | schedules/admin.py | dvek/scyp | 0f70d6a9071edbf9e26b7cb3cfaea38905e192d1 | [
"MIT"
] | null | null | null | schedules/admin.py | dvek/scyp | 0f70d6a9071edbf9e26b7cb3cfaea38905e192d1 | [
"MIT"
] | 4 | 2020-06-05T18:27:22.000Z | 2021-09-07T23:55:27.000Z | schedules/admin.py | dvek/scyp | 0f70d6a9071edbf9e26b7cb3cfaea38905e192d1 | [
"MIT"
] | null | null | null |
# @admin.register(SchedulerDay)
# class SchedulerDayAdmin(CalendarActionMixin, admin.ModelAdmin):
# date_hierarchy = 'created'
# change_list_template = 'admin/schedules/scheduler_day.html'
# #form = SchedDayForm
# @admin.register(SchedulerMonth)
# class SchedulerMonthAdmin(admin.ModelAdmin):
# ... | 36.108911 | 118 | 0.697834 | from django.contrib import admin
from django.utils import timezone
from django.utils.safestring import mark_safe
from django.urls import reverse
from .calendar import EventCalendar
import datetime, calendar
from .models import (
TimeOfDay,
Scheduler,
SchedulerException,
SchedulerRecurringPattern,
Ac... | 0 | 2,579 | 0 | 90 | 0 | 0 | 0 | 258 | 336 |
1c89478eb6e0f5022b8618d2c23bd832508c0189 | 21,194 | py | Python | tensorflow/python/ops/ragged/ragged_tensor_supported_values_test.py | Saduf2019/tensorflow-1 | d36aab4a474da352accfca38edb5d0f1c584ed9b | [
"Apache-2.0"
] | 7 | 2022-03-04T21:14:47.000Z | 2022-03-22T23:07:39.000Z | tensorflow/python/ops/ragged/ragged_tensor_supported_values_test.py | Martaw-code/tensorflow | f210b2b2f8489ffe97edac886238242288950439 | [
"Apache-2.0"
] | 1 | 2020-08-01T05:40:12.000Z | 2020-08-01T05:40:12.000Z | tensorflow/python/ops/ragged/ragged_tensor_supported_values_test.py | Martaw-code/tensorflow | f210b2b2f8489ffe97edac886238242288950439 | [
"Apache-2.0"
] | 1 | 2022-03-22T00:45:15.000Z | 2022-03-22T00:45:15.000Z | # Copyright 2020 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... | 38.745887 | 80 | 0.631216 | # Copyright 2020 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... | 0 | 16,630 | 0 | 2,341 | 0 | 0 | 0 | 606 | 578 |
6b7685d1f7f0a2ef9a60770efcfeada79a6d0709 | 365 | gyp | Python | gyp/poppler.gyp | quanganh2627/bytm-x64-L-w05-2015_external_chromium_org_third_party_skia | 90b3f9b82dbad266f960601d2120082bb841fb97 | [
"BSD-3-Clause"
] | 111 | 2015-01-13T22:01:50.000Z | 2021-06-10T15:32:48.000Z | gyp/poppler.gyp | quanganh2627/bytm-x64-L-w05-2015_external_chromium_org_third_party_skia | 90b3f9b82dbad266f960601d2120082bb841fb97 | [
"BSD-3-Clause"
] | 129 | 2015-01-14T16:07:02.000Z | 2020-03-11T19:44:42.000Z | gyp/poppler.gyp | quanganh2627/bytm-x64-L-w05-2015_external_chromium_org_third_party_skia | 90b3f9b82dbad266f960601d2120082bb841fb97 | [
"BSD-3-Clause"
] | 64 | 2015-01-14T16:45:39.000Z | 2021-09-08T11:16:05.000Z | # Poppler, assuming it's been installed to the (Linux) system.
{
'targets': [{
'target_name': 'poppler',
'type': 'none',
'direct_dependent_settings': {
'libraries': [
'-lpoppler-cpp',
],
'include_dirs': [
'/usr/include/poppl... | 22.8125 | 62 | 0.430137 | # Poppler, assuming it's been installed to the (Linux) system.
{
'targets': [{
'target_name': 'poppler',
'type': 'none',
'direct_dependent_settings': {
'libraries': [
'-lpoppler-cpp',
],
'include_dirs': [
'/usr/include/poppl... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
e2b22a59ede97a69b5816e1b1c3c9a15b69a71c2 | 32 | py | Python | starry_process/app/main.py | arfon/starry_process | 72b2a540e7e4fdb2e6af61507efa1c9861d5c919 | [
"MIT"
] | 13 | 2020-04-14T17:47:28.000Z | 2022-03-16T15:19:48.000Z | starry_process/app/main.py | arfon/starry_process | 72b2a540e7e4fdb2e6af61507efa1c9861d5c919 | [
"MIT"
] | 22 | 2020-09-23T20:33:22.000Z | 2022-02-07T17:38:09.000Z | starry_process/app/main.py | arfon/starry_process | 72b2a540e7e4fdb2e6af61507efa1c9861d5c919 | [
"MIT"
] | 8 | 2020-04-14T17:47:44.000Z | 2022-02-06T16:39:47.000Z | from .app import app
app.run()
| 8 | 20 | 0.6875 | from .app import app
app.run()
| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
a7d7c475d9a5e9374253d72ef6f2d4dc3f1c325a | 8,619 | py | Python | src/super_gradients/training/models/classification_models/vit.py | Deci-AI/super-gradients | 658f638389654668a085e23c3b19622241fd9267 | [
"Apache-2.0"
] | 308 | 2021-12-30T10:14:30.000Z | 2022-03-30T19:05:31.000Z | src/super_gradients/training/models/classification_models/vit.py | Deci-AI/super-gradients | 658f638389654668a085e23c3b19622241fd9267 | [
"Apache-2.0"
] | 24 | 2022-01-10T08:05:37.000Z | 2022-03-30T18:49:06.000Z | src/super_gradients/training/models/classification_models/vit.py | Deci-AI/super-gradients | 658f638389654668a085e23c3b19622241fd9267 | [
"Apache-2.0"
] | 26 | 2021-12-31T06:04:07.000Z | 2022-03-21T09:51:44.000Z | """Vision Transformer in PyTorch.
Reference:
[1] Dosovitskiy, Alexey, et al. "An image is worth 16x16 words: Transformers for image recognition at scale."
arXiv preprint arXiv:2010.11929 (2020)
Code adapted from https://github.com/lucidrains/vit-pytorch/blob/main/vit_pytorch/vit.py
"""
| 40.275701 | 139 | 0.647175 | """Vision Transformer in PyTorch.
Reference:
[1] Dosovitskiy, Alexey, et al. "An image is worth 16x16 words: Transformers for image recognition at scale."
arXiv preprint arXiv:2010.11929 (2020)
Code adapted from https://github.com/lucidrains/vit-pytorch/blob/main/vit_pytorch/vit.py
"""
import torch
from torch import ... | 0 | 0 | 0 | 6,181 | 0 | 1,767 | 0 | 56 | 318 |
6971d3b74839ca2544c039e1d67dd38c5bb3d013 | 106,237 | py | Python | pysprint.py | salem-ok/PySprint | 2d98adb826ca8a7ede4cdf1b8a5d9b1821034694 | [
"CC0-1.0"
] | 21 | 2021-02-28T13:03:17.000Z | 2022-02-23T05:21:11.000Z | pysprint.py | salem-ok/PySprint | 2d98adb826ca8a7ede4cdf1b8a5d9b1821034694 | [
"CC0-1.0"
] | 72 | 2021-02-28T09:12:02.000Z | 2021-12-16T08:04:20.000Z | pysprint.py | salem-ok/PySprint | 2d98adb826ca8a7ede4cdf1b8a5d9b1821034694 | [
"CC0-1.0"
] | 2 | 2021-11-28T21:44:04.000Z | 2021-12-06T09:09:17.000Z | import pygame
import pygame.display
import pygame.mixer
import pysprint_car
import pysprint_tracks
import json
import os
#New awesome imports from shazz :D
from managers.sample_manager import SampleManager
from managers.texture_manager import TextureManager
from screens.highscores_screen import HighscoresScreen
from ... | 49.024919 | 314 | 0.557979 | import pygame
import pygame.display
import pygame.mixer
from pygame import gfxdraw
import numpy as np
import pysprint_car
import pysprint_tracks
import random
import json
import os
#New awesome imports from shazz :D
from managers.sample_manager import SampleManager
from managers.texture_manager import TextureManager
f... | 0 | 0 | 0 | 0 | 0 | 91,751 | 0 | 4 | 779 |
d9a50a86a382375350c4f6f9e22446c69dc70630 | 35,256 | py | Python | ThirdParty/Twisted/vtkTwisted/src/twisted/web/static.py | inviCRO/VTK | a2dc2e79d4ecb8f6da900535b32e1a2a702c7f48 | [
"BSD-3-Clause"
] | 9 | 2017-07-10T04:27:31.000Z | 2020-07-31T08:54:08.000Z | ThirdParty/Twisted/vtkTwisted/src/twisted/web/static.py | inviCRO/VTK | a2dc2e79d4ecb8f6da900535b32e1a2a702c7f48 | [
"BSD-3-Clause"
] | 14 | 2015-04-25T17:54:13.000Z | 2017-01-13T15:30:39.000Z | ThirdParty/Twisted/vtkTwisted/src/twisted/web/static.py | inviCRO/VTK | a2dc2e79d4ecb8f6da900535b32e1a2a702c7f48 | [
"BSD-3-Clause"
] | 4 | 2017-09-11T02:26:21.000Z | 2021-12-31T05:20:34.000Z | # -*- test-case-name: twisted.web.test.test_static -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Static resources for L{twisted.web}.
"""
from __future__ import division, absolute_import
import mimetypes
from twisted.web import resource
from twisted.python.compat import _PY3
from tw... | 34.063768 | 129 | 0.605259 | # -*- test-case-name: twisted.web.test.test_static -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Static resources for L{twisted.web}.
"""
from __future__ import division, absolute_import
import os
import warnings
import itertools
import time
import errno
import mimetypes
from zope.... | 0 | 1,160 | 0 | 29,951 | 0 | 422 | 0 | 228 | 681 |
fc8d8ce82f46eb97e2ec76dd64bf9eb116b7f953 | 5,122 | py | Python | pyrcn/datasets/_base.py | TUD-STKS/PyRCN | 26fb7f0d55e8c8925f692191c56db2ea32e3f630 | [
"BSD-3-Clause"
] | 35 | 2020-07-21T18:11:01.000Z | 2022-03-28T01:31:11.000Z | pyrcn/datasets/_base.py | TUD-STKS/PyRCN | 26fb7f0d55e8c8925f692191c56db2ea32e3f630 | [
"BSD-3-Clause"
] | 21 | 2020-12-30T14:25:26.000Z | 2021-12-02T10:34:43.000Z | pyrcn/datasets/_base.py | TUD-STKS/PyRCN | 26fb7f0d55e8c8925f692191c56db2ea32e3f630 | [
"BSD-3-Clause"
] | 10 | 2020-07-15T11:22:21.000Z | 2022-03-18T10:27:47.000Z |
def _mg_eq(xt, xtau, a=0.2, b=0.1, n=10):
"""
Mackey-Glass time delay diffential equation, at values x(t) and x(t-tau).
"""
return -b*xt + a*xtau / (1+xtau**n)
def _mg_rk4(xt, xtau, a, b, n, h=1.0):
"""
Runge-Kuta method (RK4) for Mackey-Glass timeseries discretization.
"""
k1 = h * _... | 36.070423 | 101 | 0.591566 | import collections
from typing import Union
import numpy as np
from sklearn.utils.validation import _deprecate_positional_args
from sklearn.datasets import load_digits as sklearn_load_digits
def _mg_eq(xt, xtau, a=0.2, b=0.1, n=10):
"""
Mackey-Glass time delay diffential equation, at values x(t) and x(t-tau).... | 9 | 4,351 | 0 | 0 | 0 | 0 | 0 | 81 | 157 |
0a4d4e404d3a925ce31de8bda0927ce0045d9cf2 | 385 | py | Python | server/core.py | dsjen/gobo | 239e4a5226c3f643d615f264e81b602a0b3aab01 | [
"MIT"
] | 90 | 2017-11-17T05:43:42.000Z | 2022-02-21T17:10:20.000Z | server/core.py | dsjen/gobo | 239e4a5226c3f643d615f264e81b602a0b3aab01 | [
"MIT"
] | 112 | 2017-11-28T22:56:32.000Z | 2022-03-08T23:39:14.000Z | server/core.py | dsjen/gobo | 239e4a5226c3f643d615f264e81b602a0b3aab01 | [
"MIT"
] | 18 | 2017-12-18T21:06:19.000Z | 2022-01-01T16:13:30.000Z | from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_bcrypt import Bcrypt
from flask_mail import Mail
from flask_migrate import Migrate
#: Flask-SQLAlchemy extension instance
db = SQLAlchemy()
#: Flask-Bcrypt extension instance
bcrypt = Bcrypt()
#: Flask-Login extension instance
lo... | 20.263158 | 39 | 0.802597 | from flask_sqlalchemy import SQLAlchemy
from flask_login import LoginManager
from flask_bcrypt import Bcrypt
from flask_mail import Mail
from flask_migrate import Migrate
#: Flask-SQLAlchemy extension instance
db = SQLAlchemy()
#: Flask-Bcrypt extension instance
bcrypt = Bcrypt()
#: Flask-Login extension instance
lo... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
b142ebfa9e998a454acddbfc0be68cc849b5485d | 3,319 | py | Python | cfntools/ls.py | boroivanov/cfn-tools | 1761d509801a6fe4dd826c857df286e75160d5be | [
"MIT"
] | 4 | 2017-02-10T17:25:12.000Z | 2021-03-12T15:06:54.000Z | cfntools/ls.py | boroivanov/cfn-tools | 1761d509801a6fe4dd826c857df286e75160d5be | [
"MIT"
] | 1 | 2019-05-27T19:16:01.000Z | 2019-05-28T06:54:19.000Z | cfntools/ls.py | boroivanov/cfn-tools | 1761d509801a6fe4dd826c857df286e75160d5be | [
"MIT"
] | null | null | null | import sys
import click
from botocore.exceptions import ClientError
status_map = {
'CREATE_IN_PROGRESS': 'CP',
'CREATE_FAILED': 'CF',
'CREATE_COMPLETE': 'C',
'ROLLBACK_IN_PROGRESS': 'RP',
'ROLLBACK_FAILED': 'RF',
'ROLLBACK_COMPLETE': 'R',
'DELETE_IN_PROGRESS': 'DP',
'DELETE_FAILED': '... | 31.018692 | 99 | 0.637541 | import sys
import boto3
import click
from botocore.exceptions import ClientError
status_map = {
'CREATE_IN_PROGRESS': 'CP',
'CREATE_FAILED': 'CF',
'CREATE_COMPLETE': 'C',
'ROLLBACK_IN_PROGRESS': 'RP',
'ROLLBACK_FAILED': 'RF',
'ROLLBACK_COMPLETE': 'R',
'DELETE_IN_PROGRESS': 'DP',
'DELE... | 0 | 1,213 | 0 | 0 | 0 | 348 | 0 | -9 | 91 |
de3635b6ab5e5976733670b2cbe8dd178751d97b | 3,837 | py | Python | main.py | venicegeo/pz-servicemonitor | 1b56ca3348306b188e409bfb03b92e4c1774dab1 | [
"Apache-2.0"
] | null | null | null | main.py | venicegeo/pz-servicemonitor | 1b56ca3348306b188e409bfb03b92e4c1774dab1 | [
"Apache-2.0"
] | null | null | null | main.py | venicegeo/pz-servicemonitor | 1b56ca3348306b188e409bfb03b92e4c1774dab1 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright 2016, RadsiantBlue Technologies, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 30.212598 | 100 | 0.627313 | # -*- coding: utf-8 -*-
# Copyright 2016, RadsiantBlue Technologies, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | 0 | 698 | 0 | 1,827 | 0 | 93 | 0 | -35 | 279 |
536958f9f59db879d82fd9fb96e01e32e0a5fdbe | 1,689 | py | Python | ENV/lib/python3.5/site-packages/pyrogram/api/types/sticker_pack.py | block1o1/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | 4 | 2021-10-14T21:22:25.000Z | 2022-03-12T19:58:48.000Z | ENV/lib/python3.5/site-packages/pyrogram/api/types/sticker_pack.py | inevolin/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | null | null | null | ENV/lib/python3.5/site-packages/pyrogram/api/types/sticker_pack.py | inevolin/CryptoPredicted | 7f660cdc456fb8252b3125028f31fd6f5a3ceea5 | [
"MIT"
] | 1 | 2022-03-15T22:52:53.000Z | 2022-03-15T22:52:53.000Z | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2018 Dan Ts <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free So... | 28.15 | 74 | 0.648905 | # Pyrogram - Telegram MTProto API Client Library for Python
# Copyright (C) 2017-2018 Dan Tès <https://github.com/delivrance>
#
# This file is part of Pyrogram.
#
# Pyrogram is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free S... | 2 | 211 | 0 | 591 | 0 | 0 | 0 | 11 | 69 |
b49809a379d4e48f43a48301a68e5c684b91883b | 3,488 | py | Python | Densidades (test)/plot_regions.py | PaipaPsyche/SuperClusterCharacterization | 8d86ad31aa34dfa6a44592b94c42cba38487216d | [
"MIT"
] | null | null | null | Densidades (test)/plot_regions.py | PaipaPsyche/SuperClusterCharacterization | 8d86ad31aa34dfa6a44592b94c42cba38487216d | [
"MIT"
] | null | null | null | Densidades (test)/plot_regions.py | PaipaPsyche/SuperClusterCharacterization | 8d86ad31aa34dfa6a44592b94c42cba38487216d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 9 17:41:20 2018
@author: David
"""
import numpy as np
import matplotlib.pyplot as plt
from astropy.convolution import Gaussian2DKernel, convolve
#Data Loading========
data1 = np.loadtxt("Halo.txt")
data1=np.transpose(data1)
prints=0#Define si se hacen los prints de c... | 22.797386 | 102 | 0.59203 | # -*- coding: utf-8 -*-
"""
Created on Mon Apr 9 17:41:20 2018
@author: David
"""
import numpy as np
import matplotlib.pyplot as plt
from astropy.convolution import Gaussian2DKernel,convolve
#Data Loading========
data1 = np.loadtxt("Halo.txt")
data1=np.transpose(data1)
prints=0#Define si se hacen los prints de ca... | 0 | 0 | 0 | 0 | 0 | 577 | 0 | -1 | 90 |
068f29160b95440373e599647bcd4ab44806dd00 | 120 | py | Python | aula61_30/tupla.py | thidoa/Udemy_python3 | b4d6b922b3d8eb2cfeb06ba4b5b449b168c32818 | [
"Apache-2.0"
] | null | null | null | aula61_30/tupla.py | thidoa/Udemy_python3 | b4d6b922b3d8eb2cfeb06ba4b5b449b168c32818 | [
"Apache-2.0"
] | null | null | null | aula61_30/tupla.py | thidoa/Udemy_python3 | b4d6b922b3d8eb2cfeb06ba4b5b449b168c32818 | [
"Apache-2.0"
] | null | null | null | tupla1 = (1,2,3,4,5)
print(tupla1)
tupla1 = list(tupla1) # Convertendo a tupla para lista
tupla1[1] = 3000
print(tupla1) | 24 | 54 | 0.716667 | tupla1 = (1,2,3,4,5)
print(tupla1)
tupla1 = list(tupla1) # Convertendo a tupla para lista
tupla1[1] = 3000
print(tupla1) | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4dac4e85cd50262423cf7538d2a6fec900223dde | 1,818 | py | Python | core.py | Mrdaigithub/penetration | b6390a8b0ab7315cece9aad78e5cb11697c4b4c8 | [
"MIT"
] | null | null | null | core.py | Mrdaigithub/penetration | b6390a8b0ab7315cece9aad78e5cb11697c4b4c8 | [
"MIT"
] | null | null | null | core.py | Mrdaigithub/penetration | b6390a8b0ab7315cece9aad78e5cb11697c4b4c8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding: utf-8
import pymysql
db = pymysql.connect("localhost", "root", "root", "hosts")
| 27.969231 | 112 | 0.60451 | #!/usr/bin/env python3
# coding: utf-8
import multiprocessing
from sshconnector import sshconnector
import pymysql
import asyncio
db = pymysql.connect("localhost", "root", "root", "hosts")
def add_unuse_hosts():
def save_host(host):
cursor = db.cursor()
try:
cursor.execute("INSERT IN... | 0 | 0 | 0 | 0 | 0 | 1,555 | 0 | 10 | 136 |
048a7e9f4718ad3529b2df819e07f17e3efb1c00 | 1,145 | py | Python | jpnance/set1/set1.py | ryanwc/classix-crypto | e65ffb96c8a4d93ed0041357ea2347d38f43abc8 | [
"MIT"
] | null | null | null | jpnance/set1/set1.py | ryanwc/classix-crypto | e65ffb96c8a4d93ed0041357ea2347d38f43abc8 | [
"MIT"
] | null | null | null | jpnance/set1/set1.py | ryanwc/classix-crypto | e65ffb96c8a4d93ed0041357ea2347d38f43abc8 | [
"MIT"
] | 1 | 2020-05-09T22:30:43.000Z | 2020-05-09T22:30:43.000Z | #!/usr/bin/python3
import unittest
if __name__ == '__main__':
unittest.main()
| 31.805556 | 199 | 0.759825 | #!/usr/bin/python3
import unittest
class TestMethods(unittest.TestCase):
def testHexToBase64(self):
self.assertEqual(hexToBase64('49276d206b696c6c696e6720796f757220627261696e206c696b65206120706f69736f6e6f7573206d757368726f6f6d'), 'SSdtIGtpbGxpbmcgeW91ciBicmFpbiBsaWtlIGEgcG9pc29ub3VzIG11c2hyb29t')
def testFixedXo... | 0 | 0 | 0 | 419 | 0 | 576 | 0 | 0 | 69 |
efadc5124197703247d19be16e5cd0d463e29d7b | 385 | py | Python | experiment_scripts/update_traffic.py | Joseph329123/microservices-demo | 3550f4728292536728be04ce36d97c588afa49a3 | [
"Apache-2.0"
] | 10 | 2019-08-21T09:01:36.000Z | 2020-02-14T20:18:43.000Z | experiment_scripts/update_traffic.py | Joseph329123/microservices-demo | 3550f4728292536728be04ce36d97c588afa49a3 | [
"Apache-2.0"
] | 5 | 2021-02-08T20:34:22.000Z | 2022-01-22T08:14:35.000Z | experiment_scripts/update_traffic.py | Joseph329123/microservices-demo | 3550f4728292536728be04ce36d97c588afa49a3 | [
"Apache-2.0"
] | 1 | 2019-09-04T18:02:09.000Z | 2019-09-04T18:02:09.000Z | import sys
import ruamel.yaml as yaml
TRAFFIC = sys.argv[1]
file = "../kubernetes-manifests/loadgenerator.yaml"
with open(file, "r") as stream:
d = list(yaml.safe_load_all(stream))
d[0]['spec']['template']['spec']['containers'][0]['env'][0]['value'] = TRAFFIC
with open(file, "w") as stream:
yaml.dump_all(
... | 21.388889 | 78 | 0.631169 | import sys
import ruamel.yaml as yaml
TRAFFIC = sys.argv[1]
file = "../kubernetes-manifests/loadgenerator.yaml"
with open(file, "r") as stream:
d = list(yaml.safe_load_all(stream))
d[0]['spec']['template']['spec']['containers'][0]['env'][0]['value'] = TRAFFIC
with open(file, "w") as stream:
yaml.dump_all(
... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
d6796b4d4a6e1fbe1771bf035ffe76ccb9de6322 | 568 | py | Python | leetcode/python/easy/p674_findLengthOfLCIS.py | kefirzhang/algorithms | 549e68731d4c05002e35f0499d4f7744f5c63979 | [
"Apache-2.0"
] | null | null | null | leetcode/python/easy/p674_findLengthOfLCIS.py | kefirzhang/algorithms | 549e68731d4c05002e35f0499d4f7744f5c63979 | [
"Apache-2.0"
] | null | null | null | leetcode/python/easy/p674_findLengthOfLCIS.py | kefirzhang/algorithms | 549e68731d4c05002e35f0499d4f7744f5c63979 | [
"Apache-2.0"
] | null | null | null |
slu = Solution()
print(slu.findLengthOfLCIS([1, 3, 5, 4, 7]))
| 28.4 | 62 | 0.526408 | class Solution:
def findLengthOfLCIS(self, nums) -> int:
i, length = 0, len(nums)
if length <= 1:
return length
max_continue, cur_continue = 1, 1
while i < length - 1:
if nums[i] < nums[i + 1]:
cur_continue += 1
else:
... | 0 | 0 | 0 | 482 | 0 | 0 | 0 | 0 | 22 |
0917d7a8936d341a2639fc5dcc46803c52f19b92 | 313 | py | Python | a.py | chivitc1/pygamedemo | e1515ed9b94171a9e61a92ecec9da8cdcbe0efde | [
"MIT"
] | null | null | null | a.py | chivitc1/pygamedemo | e1515ed9b94171a9e61a92ecec9da8cdcbe0efde | [
"MIT"
] | null | null | null | a.py | chivitc1/pygamedemo | e1515ed9b94171a9e61a92ecec9da8cdcbe0efde | [
"MIT"
] | null | null | null |
Spam('Key 1', 'Value 1')
Spam('Key 2', 'Value 2')
| 20.866667 | 36 | 0.549521 | class Spam(object):
def __init__(self, key, value):
self.list_ = [value]
self.dict_ = {key : value}
self.list_.append(value)
self.dict_[key] = value
print(f'List: {self.list_}')
print(f'Dict: {self.dict_}')
Spam('Key 1', 'Value 1')
Spam('Key 2', 'Value 2')
| 0 | 0 | 0 | 240 | 0 | 0 | 0 | 0 | 22 |
fd8b24d5ab4a55dbb5bd457c401178e865cff72e | 10,689 | py | Python | neuralnet_pytorch/zoo/resnet.py | justanhduc/neuralnet-pytorch | cbb0c5a540a0ba91cb4dd20684bb00692305d193 | [
"MIT"
] | 28 | 2019-01-07T04:07:55.000Z | 2021-11-09T15:16:11.000Z | neuralnet_pytorch/zoo/resnet.py | justanhduc/neuralnet-pytorch | cbb0c5a540a0ba91cb4dd20684bb00692305d193 | [
"MIT"
] | 9 | 2019-12-25T08:00:33.000Z | 2021-11-23T09:02:34.000Z | neuralnet_pytorch/zoo/resnet.py | justanhduc/neuralnet-pytorch | cbb0c5a540a0ba91cb4dd20684bb00692305d193 | [
"MIT"
] | 3 | 2020-08-07T12:49:05.000Z | 2022-03-07T21:32:39.000Z | import torch.nn as nn
from ..layers import Conv2d, ResNetBottleneckBlock, ResNetBasicBlock
__all__ = ['ResNet', 'resnet18', 'resnet34', 'resnet50', 'resnet101',
'resnet152', 'resnext50_32x4d', 'resnext101_32x8d',
'wide_resnet50_2', 'wide_resnet101_2']
def conv1x1(in_planes, out_planes, stride=1... | 41.917647 | 108 | 0.633081 | import torch.nn as nn
from torchvision.models.resnet import model_urls
from torchvision.models.utils import load_state_dict_from_url
from ..layers import Sequential, Conv2d, BatchNorm2d, FC, MaxPool2d, GlobalAvgPool2D, GroupNorm, \
ResNetBottleneckBlock, ResNetBasicBlock
from ..utils import batch_set_tensor
__all_... | 0 | 0 | 0 | 3,830 | 0 | 953 | 0 | 156 | 112 |
681fdf44df870eed5993126027599f236b1340f1 | 898 | py | Python | src/server/tests/errors_test.py | andreylipattsev/almanac.httparchive.org | a05ae166c09eecdcd34e0c1882d3003b5bfee6b6 | [
"Apache-2.0"
] | 2 | 2017-10-24T18:07:15.000Z | 2018-01-04T13:22:45.000Z | src/server/tests/errors_test.py | andreylipattsev/almanac.httparchive.org | a05ae166c09eecdcd34e0c1882d3003b5bfee6b6 | [
"Apache-2.0"
] | 107 | 2019-10-10T22:56:25.000Z | 2021-06-03T05:28:54.000Z | src/server/tests/errors_test.py | andreylipattsev/almanac.httparchive.org | a05ae166c09eecdcd34e0c1882d3003b5bfee6b6 | [
"Apache-2.0"
] | 3 | 2017-04-20T18:19:13.000Z | 2018-03-01T17:58:49.000Z |
# Create test client without https redirect
# (normally taken care of by running in debug)
# Add a function to test routes with optional location
| 23.631579 | 64 | 0.742762 | from server import app, talisman
import pytest
# Create test client without https redirect
# (normally taken care of by running in debug)
@pytest.fixture
def client():
with app.test_client() as client:
talisman.force_https = False
yield client
# Add a function to test routes with optional locati... | 0 | 104 | 0 | 0 | 0 | 433 | 0 | 3 | 203 |
ca09f2e6316b27ce3b0407b74976f00f1271316d | 474 | py | Python | save_reg.py | deapplegate/wtgpipeline | 9693e8562022cc97bf5a96427e22965e1a5e8497 | [
"MIT"
] | 1 | 2019-03-15T04:01:19.000Z | 2019-03-15T04:01:19.000Z | save_reg.py | deapplegate/wtgpipeline | 9693e8562022cc97bf5a96427e22965e1a5e8497 | [
"MIT"
] | 5 | 2017-12-11T00:11:39.000Z | 2021-07-09T17:05:16.000Z | save_reg.py | deapplegate/wtgpipeline | 9693e8562022cc97bf5a96427e22965e1a5e8497 | [
"MIT"
] | 2 | 2017-08-15T21:19:11.000Z | 2017-10-12T00:36:35.000Z | import os
p = open(os.environ['subdir'] + '/lensing.bands','r').readlines()
i = 0
for l in p:
import re
res = re.split('\s+',l)
f_in = os.environ['subdir'] + '/' + res[0] + '/' + res[1] + '/SCIENCE/coadd_' + res[0] + '_good/coadd.reg'
from glob import glob
command = 'cp ' + f_in + ' ' + os.environ... | 29.625 | 116 | 0.540084 | import os
p = open(os.environ['subdir'] + '/lensing.bands','r').readlines()
i = 0
for l in p:
import re
res = re.split('\s+',l)
f_in = os.environ['subdir'] + '/' + res[0] + '/' + res[1] + '/SCIENCE/coadd_' + res[0] + '_good/coadd.reg'
from glob import glob
command = 'cp ' + f_in + ' ' + os.environ... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
5598346bf0687a8ecac25d85f95f0aa60618cab9 | 507 | py | Python | fileapp/migrations/0007_auto_20181015_0523.py | hanunmasitha/lung-cancer-detection-web | 588fd7b9bafe9e4f15c038c9cb7d36ec0f8d087c | [
"MIT"
] | 3 | 2018-10-31T13:54:01.000Z | 2021-06-30T02:35:27.000Z | fileapp/migrations/0007_auto_20181015_0523.py | hanunmasitha/lung-cancer-detection-web | 588fd7b9bafe9e4f15c038c9cb7d36ec0f8d087c | [
"MIT"
] | null | null | null | fileapp/migrations/0007_auto_20181015_0523.py | hanunmasitha/lung-cancer-detection-web | 588fd7b9bafe9e4f15c038c9cb7d36ec0f8d087c | [
"MIT"
] | 1 | 2021-05-25T10:53:28.000Z | 2021-05-25T10:53:28.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-10-15 05:23
from __future__ import unicode_literals
| 23.045455 | 85 | 0.648915 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-10-15 05:23
from __future__ import unicode_literals
from django.db import migrations, models
import fileapp.models
class Migration(migrations.Migration):
dependencies = [
('fileapp', '0006_auto_20181015_0520'),
]
operations = [
... | 0 | 0 | 0 | 305 | 0 | 0 | 0 | 19 | 68 |
493d3e240ad48db7b633584e8796fbd1633a63b1 | 6,577 | py | Python | designatedashboard/dashboards/project/dns_domains/tables.py | designate-dns/designate-dashboard | 6c9f388b02238bca7f8150be8bdd8282a4d1329d | [
"Apache-2.0"
] | null | null | null | designatedashboard/dashboards/project/dns_domains/tables.py | designate-dns/designate-dashboard | 6c9f388b02238bca7f8150be8bdd8282a4d1329d | [
"Apache-2.0"
] | null | null | null | designatedashboard/dashboards/project/dns_domains/tables.py | designate-dns/designate-dashboard | 6c9f388b02238bca7f8150be8bdd8282a4d1329d | [
"Apache-2.0"
] | null | null | null | # Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 29.493274 | 78 | 0.629618 | # Copyright 2013 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | 0 | 340 | 0 | 4,753 | 0 | 0 | 0 | 72 | 350 |
72fe66142a4e6c7ab54dbf8f03de5399fac02eeb | 6,777 | py | Python | youtube_dl/extractor/sohu.py | rajkotraja/YTDownloader | 01a0c511ebfa56699c1f58164c679b24f7972681 | [
"Unlicense"
] | null | null | null | youtube_dl/extractor/sohu.py | rajkotraja/YTDownloader | 01a0c511ebfa56699c1f58164c679b24f7972681 | [
"Unlicense"
] | null | null | null | youtube_dl/extractor/sohu.py | rajkotraja/YTDownloader | 01a0c511ebfa56699c1f58164c679b24f7972681 | [
"Unlicense"
] | null | null | null | # encoding: utf-8
from __future__ import unicode_literals
| 33.220588 | 94 | 0.460233 | # encoding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_str,
compat_urllib_parse_urlencode,
)
from ..utils import ExtractorError
class SohuIE(InfoExtractor):
_VALID_URL = r'https?://(?P<mytv>my\.)?tv\.sohu\.com/.+?/(?(mytv)|n)(?... | 357 | 0 | 0 | 6,419 | 0 | 0 | 0 | 67 | 113 |
af6039f26d80e5ac995061dbfe1780b92e63290a | 405 | py | Python | rss_temple/api/migrations/0005_auto_20210331_1716.py | murrple-1/rss_temple | 289197923b1e7d1213f1673d164337df17d7269b | [
"MIT"
] | null | null | null | rss_temple/api/migrations/0005_auto_20210331_1716.py | murrple-1/rss_temple | 289197923b1e7d1213f1673d164337df17d7269b | [
"MIT"
] | 8 | 2019-12-04T21:58:35.000Z | 2021-12-15T02:29:49.000Z | rss_temple/api/migrations/0005_auto_20210331_1716.py | murrple-1/rss_temple | 289197923b1e7d1213f1673d164337df17d7269b | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-03-31 17:16
| 21.315789 | 67 | 0.595062 | # Generated by Django 3.1.7 on 2021-03-31 17:16
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('api', '0004_auto_20210331_0442'),
]
operations = [
migrations.AddIndex(
model_name='feedentry',
index=models.Index(
... | 0 | 0 | 0 | 291 | 0 | 0 | 0 | 19 | 46 |
ea3848a5bb6ee50f5b2c27023b9af617a87f786f | 23,890 | py | Python | gapandas/query.py | flyandlure/gapandas | 31a884da101cf1e1bc0a33a171fa820c5eebf560 | [
"MIT"
] | 9 | 2020-06-08T14:43:00.000Z | 2022-03-03T18:14:02.000Z | gapandas/query.py | flyandlure/gapandas | 31a884da101cf1e1bc0a33a171fa820c5eebf560 | [
"MIT"
] | 2 | 2021-06-17T12:04:32.000Z | 2021-07-02T15:56:15.000Z | gapandas/query.py | flyandlure/gapandas | 31a884da101cf1e1bc0a33a171fa820c5eebf560 | [
"MIT"
] | 2 | 2020-06-18T10:45:38.000Z | 2021-12-19T20:00:05.000Z | """
Name: Runs a Google Analytics API query
Developer: Matt Clarke
Date: June 8, 2020
Description: Passes a payload to the Google Analytics reporting API and returns the data.
"""
import math
import pandas as pd
def show_message(verbose, message):
"""Show a message if verbose mode is True.
Args:
ver... | 61.572165 | 120 | 0.656174 | """
Name: Runs a Google Analytics API query
Developer: Matt Clarke
Date: June 8, 2020
Description: Passes a payload to the Google Analytics reporting API and returns the data.
"""
import math
import pandas as pd
def show_message(verbose, message):
"""Show a message if verbose mode is True.
Args:
ver... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
7e52f769da7f2098ca748bfb8a692c750e6a4efc | 2,464 | py | Python | sumo/metrics/tests/util_tests.py | RishabhJain2018/sumo | ad6ae0766b3d7936ef71ec8703280d378cbe0569 | [
"MIT"
] | null | null | null | sumo/metrics/tests/util_tests.py | RishabhJain2018/sumo | ad6ae0766b3d7936ef71ec8703280d378cbe0569 | [
"MIT"
] | null | null | null | sumo/metrics/tests/util_tests.py | RishabhJain2018/sumo | ad6ae0766b3d7936ef71ec8703280d378cbe0569 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""
Copyright (c) Facebook, Inc. and its affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
"""
import matplotlib
import sumo.metrics.utils as utils
matplotlib.use("TkAgg")
"""
Test Evaluator utils functions
... | 28.651163 | 78 | 0.642451 | #!/usr/bin/env python3
"""
Copyright (c) Facebook, Inc. and its affiliates.
This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
"""
import math
import matplotlib
import numpy as np
import os
import unittest
from sumo.geometry.rot3 import Rot3
import... | 0 | 0 | 0 | 1,968 | 0 | 0 | 0 | 14 | 157 |
c33047380969aee33f120ef3b92142f59cef8880 | 13,107 | py | Python | brax/experimental/composer/envs/ma_descs.py | bharadwaj1098/brax | 3108a0535b9b59725c97ef35732ed0378c0fd5cc | [
"Apache-2.0"
] | 1,162 | 2021-06-03T20:15:05.000Z | 2022-03-31T19:53:06.000Z | brax/experimental/composer/envs/ma_descs.py | bharadwaj1098/brax | 3108a0535b9b59725c97ef35732ed0378c0fd5cc | [
"Apache-2.0"
] | 160 | 2021-06-05T02:32:39.000Z | 2022-03-31T11:39:58.000Z | brax/experimental/composer/envs/ma_descs.py | bharadwaj1098/brax | 3108a0535b9b59725c97ef35732ed0378c0fd5cc | [
"Apache-2.0"
] | 117 | 2021-06-04T17:18:21.000Z | 2022-03-30T18:04:48.000Z | # Copyright 2021 The Brax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 37.991304 | 80 | 0.584573 | # Copyright 2021 The Brax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | 0 | 0 | 0 | 0 | 0 | 167 | 0 | 0 | 23 |
b37a8f3f70b1bf355a6c89835397882a1382fd4e | 35,258 | py | Python | orange3/Orange/widgets/widget.py | rgschmitz1/BioDepot-workflow-builder | f74d904eeaf91ec52ec9b703d9fb38e9064e5a66 | [
"MIT"
] | 54 | 2017-01-08T17:21:49.000Z | 2021-11-02T08:46:07.000Z | orange3/Orange/widgets/widget.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 22 | 2017-03-28T06:03:14.000Z | 2021-07-28T05:43:55.000Z | orange3/Orange/widgets/widget.py | Synthia-3/BioDepot-workflow-builder | 4ee93abe2d79465755e82a145af3b6a6e1e79fd4 | [
"MIT"
] | 21 | 2017-01-26T21:12:09.000Z | 2022-01-31T21:34:59.000Z | # Module imports Input, Output and AttributeList to be used in widgets
# pylint: disable=unused-import
# OutputSignal and InputSignal are imported for compatibility, but shouldn't
# be used; use Input and Output instead
from Orange.canvas.registry import (description as widget_description)
from Orange.widgets.utils.me... | 34.874382 | 88 | 0.627943 | # Module imports Input, Output and AttributeList to be used in widgets
# pylint: disable=unused-import
import sys
import os
import types
from operator import attrgetter
from AnyQt.QtWidgets import (
QWidget,
QDialog,
QVBoxLayout,
QSizePolicy,
QApplication,
QStyle,
QShortcut,
QSplitter,... | 0 | 1,837 | 0 | 30,322 | 0 | 140 | 0 | 782 | 490 |
53349746c4ae32e6613cbb7bcd6802d191184382 | 3,191 | py | Python | lib/pymedphys/_experimental/film/calibrate.py | ethanio12345/pymedphys | cb34c992de8d442eced3385018a194364060092d | [
"Apache-2.0"
] | 207 | 2019-01-29T09:53:04.000Z | 2022-03-26T10:34:03.000Z | lib/pymedphys/_experimental/film/calibrate.py | ethanio12345/pymedphys | cb34c992de8d442eced3385018a194364060092d | [
"Apache-2.0"
] | 1,209 | 2019-01-29T07:52:27.000Z | 2022-03-31T20:11:24.000Z | lib/pymedphys/_experimental/film/calibrate.py | ethanio12345/pymedphys | cb34c992de8d442eced3385018a194364060092d | [
"Apache-2.0"
] | 58 | 2019-03-29T09:06:18.000Z | 2022-03-24T07:44:22.000Z | # Copyright (C) 2019 Simon Biggs
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing,... | 27.042373 | 87 | 0.667502 | # Copyright (C) 2019 Simon Biggs
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing,... | 0 | 0 | 0 | 0 | 0 | 934 | 0 | 27 | 160 |
4ef595b3133fab1a3be633aa81f835332c818d75 | 486 | py | Python | hakoblog/config.py | hakobe/hakoblog-python | 61823d5cb538e40917423740d5fe06195ed5c858 | [
"MIT"
] | 13 | 2017-01-18T12:40:07.000Z | 2019-08-24T05:34:06.000Z | hakoblog/config.py | hakobe/hakoblog-python | 61823d5cb538e40917423740d5fe06195ed5c858 | [
"MIT"
] | 1 | 2017-01-20T10:10:37.000Z | 2017-01-20T10:10:37.000Z | hakoblog/config.py | hakobe/hakoblog-python | 61823d5cb538e40917423740d5fe06195ed5c858 | [
"MIT"
] | null | null | null |
CONFIG = config()
| 16.2 | 51 | 0.617284 | import os
class Config:
"""Extendable configuation class.
This is also used for flask application config.
"""
DATABASE = "hakoblog"
DATABASE_HOST = "db"
DATABASE_USER = "root"
DATABASE_PASS = ""
TESTING = False
GLOBAL_USER_NAME = "hakobe"
class Test(Config):
DATABASE = "hako... | 0 | 0 | 0 | 292 | 0 | 92 | 0 | -12 | 91 |
6bc4185435388e72947b36ae8918a2a9b1f9dbaf | 3,219 | py | Python | PYTHON_SCRIPT/DIRECTIONALITY_PLOT.py | PuneetDheer/GRANGER_CAUSALITY | 20b20bf3f72a6b0f3e32109d536d149c99e38b5e | [
"Apache-2.0"
] | null | null | null | PYTHON_SCRIPT/DIRECTIONALITY_PLOT.py | PuneetDheer/GRANGER_CAUSALITY | 20b20bf3f72a6b0f3e32109d536d149c99e38b5e | [
"Apache-2.0"
] | null | null | null | PYTHON_SCRIPT/DIRECTIONALITY_PLOT.py | PuneetDheer/GRANGER_CAUSALITY | 20b20bf3f72a6b0f3e32109d536d149c99e38b5e | [
"Apache-2.0"
] | null | null | null | """
PLOTING DIRECTIONALITY INDEX
@author: PUNEET DHEER
"""
from matplotlib.widgets import Button
import numpy as np
import matplotlib.pyplot as plt
fig,ax = plt.subplots()
plt.subplots_adjust(bottom = 0.3)
dataDI = DI
index = np.arange(0, dataDI.shape[0],1)
pos_DI= dataDI.copy()
neg_DI = dat... | 31.558824 | 138 | 0.547996 | """
PLOTING DIRECTIONALITY INDEX
@author: PUNEET DHEER
"""
from matplotlib.widgets import Button
import numpy as np
import matplotlib.pyplot as plt
from itertools import combinations
fig,ax = plt.subplots()
plt.subplots_adjust(bottom = 0.3)
dataDI = DI
index = np.arange(0, dataDI.shape[0],1)
... | 0 | 0 | 0 | 2,137 | 0 | 0 | 0 | 13 | 48 |
c37a9ffc020769662e24b8824783549b16b3048f | 130 | py | Python | fomoapp/apps.py | jennify/FomoRecommender | f363180413c377adad2f8684e403fa75542d363a | [
"Apache-2.0"
] | null | null | null | fomoapp/apps.py | jennify/FomoRecommender | f363180413c377adad2f8684e403fa75542d363a | [
"Apache-2.0"
] | null | null | null | fomoapp/apps.py | jennify/FomoRecommender | f363180413c377adad2f8684e403fa75542d363a | [
"Apache-2.0"
] | null | null | null | from __future__ import unicode_literals
| 16.25 | 39 | 0.792308 | from __future__ import unicode_literals
from django.apps import AppConfig
class FomoappConfig(AppConfig):
name = 'fomoapp'
| 0 | 0 | 0 | 31 | 0 | 0 | 0 | 12 | 46 |
68fde168c2bfcbba6d16f43881489ccec054776c | 402 | py | Python | flatten-metadata.py | pettitpeon/doe-nft-traits | d05aee512364dfa0301ee859fecf524e7f1d2094 | [
"MIT"
] | null | null | null | flatten-metadata.py | pettitpeon/doe-nft-traits | d05aee512364dfa0301ee859fecf524e7f1d2094 | [
"MIT"
] | null | null | null | flatten-metadata.py | pettitpeon/doe-nft-traits | d05aee512364dfa0301ee859fecf524e7f1d2094 | [
"MIT"
] | null | null | null | import json
# Generate traits JSON from IPFS metadata
json_data = {'assets': []}
dir = 'ipfs\doe_metadata_QmcxJeVYRhyevvwQgsBfSWiY7QVmyNx1rQinzXbc1ZYut5'
for i in range(1, 10001):
with open(f'{dir}/{i}', 'r') as f:
tmp_data = json.loads(f.read())
json_data['assets'].append(tmp_data)
with open... | 28.714286 | 72 | 0.669154 | import json
# Generate traits JSON from IPFS metadata
json_data = {'assets': []}
dir = 'ipfs\doe_metadata_QmcxJeVYRhyevvwQgsBfSWiY7QVmyNx1rQinzXbc1ZYut5'
for i in range(1, 10001):
with open(f'{dir}/{i}', 'r') as f:
tmp_data = json.loads(f.read())
json_data['assets'].append(tmp_data)
with open... | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
f36ef6901225d29b72559b1520a81cb654b41c2f | 5,958 | py | Python | covid/model.py | tgrrr/covid19uk | afde150b841d7a0773b0fe2b918aa1773f791bfa | [
"MIT"
] | null | null | null | covid/model.py | tgrrr/covid19uk | afde150b841d7a0773b0fe2b918aa1773f791bfa | [
"MIT"
] | null | null | null | covid/model.py | tgrrr/covid19uk | afde150b841d7a0773b0fe2b918aa1773f791bfa | [
"MIT"
] | null | null | null | """Describes a DiscreteTimeStateTransitionModel"""
import tensorflow as tf
import tensorflow_probability as tfp
tla = tf.linalg
tfd = tfp.distributions
| 35.676647 | 216 | 0.639812 | """Describes a DiscreteTimeStateTransitionModel"""
import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
from tensorflow_probability.python.internal import dtype_util
from tensorflow_probability.python.internal import reparameterization
from covid.impl.util import batch_gather, transition_coo... | 0 | 302 | 0 | 4,295 | 0 | 795 | 0 | 206 | 203 |
dca555d567e7a249cb4afc3c224804dd1fbd550a | 4,349 | py | Python | data_helper.py | braveld/RNN_learn | d750237cae0a4c59b0580e37c42208ee0f4e1220 | [
"Apache-2.0"
] | 204 | 2016-11-27T11:34:31.000Z | 2021-06-30T04:51:52.000Z | data_helper.py | leelicent/DeepLearning | 46cd295bf9b8f1d40d9176a14f457e4ee89c5a99 | [
"Apache-2.0"
] | 16 | 2016-12-30T05:08:30.000Z | 2019-04-12T16:12:35.000Z | data_helper.py | leelicent/DeepLearning | 46cd295bf9b8f1d40d9176a14f457e4ee89c5a99 | [
"Apache-2.0"
] | 151 | 2016-11-28T08:14:08.000Z | 2021-11-26T09:52:03.000Z | """
description: this file helps to load raw file and gennerate batch x,y
author:luchi
date:22/11/2016
"""
#file path
dataset_path='data/subj0.pkl'
#return batch dataset
| 29.787671 | 111 | 0.673948 | """
description: this file helps to load raw file and gennerate batch x,y
author:luchi
date:22/11/2016
"""
import numpy as np
import cPickle as pkl
#file path
dataset_path='data/subj0.pkl'
def set_dataset_path(path):
dataset_path=path
def load_data(max_len,batch_size,n_words=20000,valid_portion=0.1,sort_by_le... | 0 | 0 | 0 | 0 | 738 | 3,324 | 0 | -3 | 112 |