hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | 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 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 251 | 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 3 251 | 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9925fe80ef49aef05e7858470eaf068c1ee1e417 | 1,308 | py | Python | Ninja/Leetcode/200_Number_of_Islands.py | cyandterry/Python-Study | b40e6c4db10da417e72247f61146f7570621106a | [
"MIT"
] | 61 | 2015-02-03T20:25:55.000Z | 2021-05-17T19:33:40.000Z | Ninja/Leetcode/200_Number_of_Islands.py | cyandterry/Python-Study | b40e6c4db10da417e72247f61146f7570621106a | [
"MIT"
] | null | null | null | Ninja/Leetcode/200_Number_of_Islands.py | cyandterry/Python-Study | b40e6c4db10da417e72247f61146f7570621106a | [
"MIT"
] | 37 | 2015-02-04T07:12:52.000Z | 2020-05-16T18:47:16.000Z | """
Given a 2d grid map of '1's (land) and '0's (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizontally or vertically. You may assume all four edges of the grid are all surrounded by water.
Example 1:
Input:
11110
11010
11000
00000
Output:1
Examp... | 24.222222 | 256 | 0.526758 |
992723148f30fd087631440427dc71c1155bf987 | 35 | py | Python | tfrecord_handler/io.py | m-zayan/tfrecord-handler | fef50743cbc61c6ffd937c47428d9c6102a8e047 | [
"Apache-2.0"
] | null | null | null | tfrecord_handler/io.py | m-zayan/tfrecord-handler | fef50743cbc61c6ffd937c47428d9c6102a8e047 | [
"Apache-2.0"
] | null | null | null | tfrecord_handler/io.py | m-zayan/tfrecord-handler | fef50743cbc61c6ffd937c47428d9c6102a8e047 | [
"Apache-2.0"
] | null | null | null | from tfrecord_handler._io import *
| 17.5 | 34 | 0.828571 |
99273a7a5161288479971768a0ab968c5b5326bb | 2,313 | py | Python | tests/test_auth.py | tagmeh/uipath-auth | 8dec763604ee40d6d2b04d3cf0e4b283d1f4c7fc | [
"MIT"
] | null | null | null | tests/test_auth.py | tagmeh/uipath-auth | 8dec763604ee40d6d2b04d3cf0e4b283d1f4c7fc | [
"MIT"
] | 1 | 2020-02-22T18:19:02.000Z | 2020-02-27T04:10:47.000Z | tests/test_auth.py | tagmeh/uipath-auth | 8dec763604ee40d6d2b04d3cf0e4b283d1f4c7fc | [
"MIT"
] | null | null | null | import unittest
import configparser
from uipath_api import auth
import os
import datetime
ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
| 39.20339 | 106 | 0.643753 |
9927c9a9f4dd5bf5a2c0046ef884223a0402b99f | 7,263 | py | Python | send_mail/tasks.py | ritstudentgovernment/PawPrints | 6f52d721d4c367a8524f49881e62a162a81469b4 | [
"Apache-2.0"
] | 15 | 2017-04-03T14:01:44.000Z | 2022-03-18T06:38:56.000Z | send_mail/tasks.py | ritstudentgovernment/PawPrints | 6f52d721d4c367a8524f49881e62a162a81469b4 | [
"Apache-2.0"
] | 87 | 2016-10-13T01:53:38.000Z | 2022-02-11T03:39:55.000Z | send_mail/tasks.py | ritstudentgovernment/PawPrints | 6f52d721d4c367a8524f49881e62a162a81469b4 | [
"Apache-2.0"
] | 8 | 2017-10-19T18:30:48.000Z | 2021-04-03T02:26:01.000Z | """
Defines email sending tasks that will run in the background with Huey
Author: Peter Zujko & Omar De La Hoz & Lukas Yelle (lxy5611)
All db_tasks will retry at most 3 times.
"""
from petitions.models import *
from profile.models import Profile
from django.conf import settings
from django.db.models import Q
from dja... | 37.632124 | 128 | 0.679471 |
9928ed74e6ff2bd688ab4068d57831371dc6c03d | 5,412 | py | Python | parse_loadstone.py | EmperorArthur/Loadstone_Parser | 7943e91af131ee4b1ef44985227a933a4126041c | [
"BSD-3-Clause"
] | null | null | null | parse_loadstone.py | EmperorArthur/Loadstone_Parser | 7943e91af131ee4b1ef44985227a933a4126041c | [
"BSD-3-Clause"
] | null | null | null | parse_loadstone.py | EmperorArthur/Loadstone_Parser | 7943e91af131ee4b1ef44985227a933a4126041c | [
"BSD-3-Clause"
] | 1 | 2018-04-19T09:42:42.000Z | 2018-04-19T09:42:42.000Z | #!/bin/python3
#Utilities for downloading and parsing Final Fantasy 14 Loadstone content
#Copyright Arthur Moore 2016 BSD 3 clause license
import requests
from bs4 import BeautifulSoup
import re
#Get a page from the Loadstone
# returns a BeautifulSoup object
#Each item has a separate detail page that must be loaded ... | 43.296 | 146 | 0.665373 |
9929c4f00dbfed289344d43aba31e0e02c9b6695 | 3,168 | py | Python | backalley/local_file_collector.py | marcsello/backalley | f429bec0d0df7ed5a30a16c9e4cd065ba5a00987 | [
"MIT"
] | null | null | null | backalley/local_file_collector.py | marcsello/backalley | f429bec0d0df7ed5a30a16c9e4cd065ba5a00987 | [
"MIT"
] | null | null | null | backalley/local_file_collector.py | marcsello/backalley | f429bec0d0df7ed5a30a16c9e4cd065ba5a00987 | [
"MIT"
] | null | null | null | from typing import List
from queue import Queue
import logging
import os
import os.path
from entity_info import EntityInfo, EntityType
| 33.702128 | 114 | 0.57702 |
9929ca378f85f069f43b01b2e6b9a5f840475d81 | 466 | py | Python | setup.py | spyoungtech/commander | 891172d31dc93b9e34c5e38097159141c863d75e | [
"MIT"
] | 3 | 2018-08-14T20:42:43.000Z | 2020-03-04T05:18:47.000Z | setup.py | spyoungtech/commander | 891172d31dc93b9e34c5e38097159141c863d75e | [
"MIT"
] | 2 | 2020-07-08T12:30:08.000Z | 2022-02-02T14:59:23.000Z | setup.py | spyoungtech/commander | 891172d31dc93b9e34c5e38097159141c863d75e | [
"MIT"
] | null | null | null | from setuptools import setup
setup(
name='voice-commander',
version='0.0.2a',
packages=['voice_commander'],
install_requires=['fuzzywuzzy', 'fuzzywuzzy[speedup]', 'keyboard', 'easygui', 'pyaudio', 'SpeechRecognition'],
url='https://github.com/spyoungtech/voice-commander',
license='MIT',
aut... | 33.285714 | 114 | 0.708155 |
992a1b97ab841088ba1a353a1387dd164ee55119 | 468 | py | Python | DecoratorEx.py | JaeGyu/PythonEx_1 | e67053db6ca7431c3dd66351c190c53229e3f141 | [
"MIT"
] | null | null | null | DecoratorEx.py | JaeGyu/PythonEx_1 | e67053db6ca7431c3dd66351c190c53229e3f141 | [
"MIT"
] | null | null | null | DecoratorEx.py | JaeGyu/PythonEx_1 | e67053db6ca7431c3dd66351c190c53229e3f141 | [
"MIT"
] | null | null | null |
print(greet("Alice"))
print(greet2("Alice"))
print(change_name_greet(greet))
print(upper(greet)("Alice"))
| 16.714286 | 47 | 0.634615 |
992a80c828507c2e3f4422350dbac836fe3f438d | 31,647 | py | Python | model/QuerySpecificBBCluster.py | nihilistsumo/Blackbox_clustering | 9257890fb9a945115f249988c9e863654d23551c | [
"MIT"
] | 1 | 2022-02-11T19:14:06.000Z | 2022-02-11T19:14:06.000Z | model/QuerySpecificBBCluster.py | nihilistsumo/Blackbox_clustering | 9257890fb9a945115f249988c9e863654d23551c | [
"MIT"
] | null | null | null | model/QuerySpecificBBCluster.py | nihilistsumo/Blackbox_clustering | 9257890fb9a945115f249988c9e863654d23551c | [
"MIT"
] | 1 | 2021-05-05T14:52:56.000Z | 2021-05-05T14:52:56.000Z | from model.BBCluster import CustomSentenceTransformer, OptimCluster, euclid_dist
from experiments.treccar_run import prepare_cluster_data_train_only, prepare_cluster_data2, get_trec_dat, \
get_paratext_dict
from util.Data import InputTRECCARExample
import numpy as np
import torch
import torch.nn as nn
from torch im... | 50.879421 | 120 | 0.646096 |
992bb2a6e79023ca99c7d761267938c9b60dac68 | 4,127 | py | Python | sme_management/tests/test_models.py | BuildForSDG/Team-004-Backend | d0d0882d2d392edd8e47e07b234b0919db246773 | [
"MIT"
] | 2 | 2020-05-11T23:38:33.000Z | 2020-05-26T22:35:45.000Z | sme_management/tests/test_models.py | BuildForSDG/Team-004-Backend | d0d0882d2d392edd8e47e07b234b0919db246773 | [
"MIT"
] | 35 | 2020-05-17T14:03:26.000Z | 2021-06-10T19:20:22.000Z | sme_management/tests/test_models.py | BuildForSDG/Team-004-Backend | d0d0882d2d392edd8e47e07b234b0919db246773 | [
"MIT"
] | 3 | 2020-05-02T20:34:58.000Z | 2020-06-07T13:52:49.000Z | import os
from django.core.files import File
from django.test import TestCase
from django.contrib.auth import get_user_model
from django.conf import settings
from sme_management.models import *
def create_sample_sme(org_name='Andela', address='Ikorodu Rd'):
"""Create and return sample sme."""
return SME.obj... | 31.265152 | 83 | 0.666828 |
992dd5dd4afe7fb5319e83d89c10478b7f02bd2a | 2,115 | py | Python | python/tests/evaluation_helpers/test_http_helper.py | kbarnes3/TierOnePointFive | 34f2b91d7abc6de6c9e0b68c89de232f67819c85 | [
"BSD-2-Clause"
] | null | null | null | python/tests/evaluation_helpers/test_http_helper.py | kbarnes3/TierOnePointFive | 34f2b91d7abc6de6c9e0b68c89de232f67819c85 | [
"BSD-2-Clause"
] | 4 | 2017-07-29T02:36:11.000Z | 2017-08-24T00:46:46.000Z | python/tests/evaluation_helpers/test_http_helper.py | kbarnes3/TierOnePointFive | 34f2b91d7abc6de6c9e0b68c89de232f67819c85 | [
"BSD-2-Clause"
] | null | null | null | import requests
import requests.exceptions
import requests_mock
from tieronepointfive.enums import State, Transition
from tieronepointfive.state_machine import StateMachineTick
from tieronepointfive.evaluation_helpers import HttpHelper
from ..mock_config import MockConfig
google = 'https://www.google.com'
b... | 38.454545 | 143 | 0.765012 |
992e89001f213fed829a9a41116395bf5f70481a | 2,270 | py | Python | glance/tests/gate/test_data_migration_version.py | bwLehrpool/glance | d4119be0543bdaefe78fc11e16c3a01b55aa9e3a | [
"Apache-2.0"
] | null | null | null | glance/tests/gate/test_data_migration_version.py | bwLehrpool/glance | d4119be0543bdaefe78fc11e16c3a01b55aa9e3a | [
"Apache-2.0"
] | null | null | null | glance/tests/gate/test_data_migration_version.py | bwLehrpool/glance | d4119be0543bdaefe78fc11e16c3a01b55aa9e3a | [
"Apache-2.0"
] | null | null | null | # Copyright 2019 Red Hat, Inc.
# 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... | 39.137931 | 78 | 0.623348 |
99300d44895143abf4e320183d6546b81381078a | 1,008 | py | Python | setup.py | skunkie/vrealize-pysdk | 958f2c74c815f424665b1ac6529905040cd92b1f | [
"Apache-2.0"
] | 2 | 2019-10-11T09:55:15.000Z | 2020-02-18T07:08:44.000Z | setup.py | skunkie/vrealize-pysdk | 958f2c74c815f424665b1ac6529905040cd92b1f | [
"Apache-2.0"
] | null | null | null | setup.py | skunkie/vrealize-pysdk | 958f2c74c815f424665b1ac6529905040cd92b1f | [
"Apache-2.0"
] | null | null | null | import os
from setuptools import setup
setup(
name='vralib',
packages=['vralib'],
version='0.1',
description='This is a helper library used to manage vRealize Automation via python.',
author='Russell Pope',
author_email='vralib@kovarus.com',
url='https://github.com/kovarus/vrealize-pysdk... | 28 | 90 | 0.632937 |
99318e1b85a50f995e3e345e1e7f01ee0f6bcf70 | 9,894 | py | Python | examples/sandbox_api_v2/complex_project.py | acbart/python-analysis | 3cd2cc22d50a414ae6b62c74d2643be4742238d4 | [
"MIT"
] | 14 | 2019-08-22T03:40:23.000Z | 2022-03-13T00:30:53.000Z | examples/sandbox_api_v2/complex_project.py | pedal-edu/pedal | 3cd2cc22d50a414ae6b62c74d2643be4742238d4 | [
"MIT"
] | 74 | 2019-09-12T04:35:56.000Z | 2022-01-26T19:21:32.000Z | examples/sandbox_api_v2/complex_project.py | acbart/python-analysis | 3cd2cc22d50a414ae6b62c74d2643be4742238d4 | [
"MIT"
] | 2 | 2018-09-16T22:39:15.000Z | 2018-09-17T12:53:28.000Z | '''
Instructor control script for Project 5- Text Adventure Beta
@author: acbart
@requires: pedal
@title: Project 5- Text Adventure- Control Script
@version: 4/4/2019 10:29am
'''
__version__ = 1
from pedal.assertions.organizers import phase, postcondition, precondition
from pedal.assertions.setup import resolve_all
f... | 42.282051 | 196 | 0.679503 |
99323e8a12cde588dd2bc1c30a2dbda9df176374 | 7,804 | py | Python | neatest/genome.py | goktug97/NEATEST | f35f355fd896c8f9ab88d411752324ebcc836d71 | [
"MIT"
] | 13 | 2021-09-25T19:52:38.000Z | 2021-09-28T09:42:22.000Z | neatest/genome.py | goktug97/NEATEST | f35f355fd896c8f9ab88d411752324ebcc836d71 | [
"MIT"
] | null | null | null | neatest/genome.py | goktug97/NEATEST | f35f355fd896c8f9ab88d411752324ebcc836d71 | [
"MIT"
] | null | null | null | from typing import List
import math
import os
from .connection import Connection, GeneRate, Weight
from .node import Node, NodeType, group_nodes
from .version import VERSION
import cloudpickle # type: ignore
try:
disable_mpi = os.environ.get('NEATEST_DISABLE_MPI')
if disable_mpi and disable_mpi != '0':
... | 43.597765 | 89 | 0.563813 |
993571fac317e372a26e69ba4f4a19588ed51867 | 864 | py | Python | x_server.py | koshtony/remote-xploiter | f34dd9d532a98b42ca45e9f6f8982ab608cf642f | [
"MIT"
] | null | null | null | x_server.py | koshtony/remote-xploiter | f34dd9d532a98b42ca45e9f6f8982ab608cf642f | [
"MIT"
] | null | null | null | x_server.py | koshtony/remote-xploiter | f34dd9d532a98b42ca45e9f6f8982ab608cf642f | [
"MIT"
] | null | null | null | from threading import *
from socket import *
servs=server()
getting=Thread(target=servs.revg)
getting.daemon=True
getting.start()
servs.main() | 28.8 | 51 | 0.542824 |
993605e64d34991227020ec250dc90010bc12fb4 | 682 | py | Python | jmeter_api/configs/__init__.py | dashawn888/jmeter_api | 1ab5b02f3a7c8ad1b84fc50db4fe1fc2fa7c91bd | [
"Apache-2.0"
] | 11 | 2020-03-22T13:30:21.000Z | 2021-12-25T06:23:44.000Z | jmeter_api/configs/__init__.py | dashawn888/jmeter_api | 1ab5b02f3a7c8ad1b84fc50db4fe1fc2fa7c91bd | [
"Apache-2.0"
] | 2 | 2020-03-23T00:06:42.000Z | 2021-02-24T21:41:40.000Z | jmeter_api/configs/__init__.py | dashawn888/jmeter_api | 1ab5b02f3a7c8ad1b84fc50db4fe1fc2fa7c91bd | [
"Apache-2.0"
] | 3 | 2020-11-09T14:14:25.000Z | 2021-05-27T02:54:38.000Z | from jmeter_api.configs.counter.elements import Counter
from jmeter_api.configs.csv_data_set_config.elements import CsvDataSetConfig
from jmeter_api.configs.http_auth_manager.elements import HTTPAuthManager
from jmeter_api.configs.http_cache_manager.elements import HTTPCacheManager
from jmeter_api.configs.http_cookie_m... | 68.2 | 89 | 0.907625 |
99362ec1918c5a228d1484342057785ff49599d9 | 770 | py | Python | 2020/17/part1.py | cheshyre/advent-of-code | 2ccc1529bbf8b0deed938d0783deb09dcc8f5e50 | [
"Unlicense"
] | 1 | 2021-12-03T07:20:23.000Z | 2021-12-03T07:20:23.000Z | 2020/17/part1.py | cheshyre/advent-of-code | 2ccc1529bbf8b0deed938d0783deb09dcc8f5e50 | [
"Unlicense"
] | null | null | null | 2020/17/part1.py | cheshyre/advent-of-code | 2ccc1529bbf8b0deed938d0783deb09dcc8f5e50 | [
"Unlicense"
] | null | null | null | import os
import cube
cur_dir = os.path.dirname(os.path.abspath(__file__))
z = 0
active_dict = {}
with open(f"{cur_dir}/input") as f:
for y, line in enumerate(f):
for x, char in enumerate(line.strip()):
if char == "#":
active_dict[(x, y, z)] = cube.Cube(x, y, z)
active_dict ... | 30.8 | 77 | 0.741558 |
993679cf18fb575717d3ec43572613b88cdb5275 | 310 | py | Python | src/features/build_features.py | victormmp/ibm_advanced_ds_capstone | fe5f785c6118acaaa698a07d6e1f8a82b816d042 | [
"MIT"
] | null | null | null | src/features/build_features.py | victormmp/ibm_advanced_ds_capstone | fe5f785c6118acaaa698a07d6e1f8a82b816d042 | [
"MIT"
] | null | null | null | src/features/build_features.py | victormmp/ibm_advanced_ds_capstone | fe5f785c6118acaaa698a07d6e1f8a82b816d042 | [
"MIT"
] | null | null | null | import csv
import pandas as pd
import numpy as np
import os
import sys
root_dir = os.path.dirname(__file__)
sys.path.insert(0, root_dir + '/../..')
| 16.315789 | 39 | 0.629032 |
99380c017e625f35bdee30012424c12da74e34c2 | 562 | py | Python | 03/03/islower.py | pylangstudy/201708 | 126b1af96a1d1f57522d5a1d435b58597bea2e57 | [
"CC0-1.0"
] | null | null | null | 03/03/islower.py | pylangstudy/201708 | 126b1af96a1d1f57522d5a1d435b58597bea2e57 | [
"CC0-1.0"
] | 39 | 2017-07-31T22:54:01.000Z | 2017-08-31T00:19:03.000Z | 03/03/islower.py | pylangstudy/201708 | 126b1af96a1d1f57522d5a1d435b58597bea2e57 | [
"CC0-1.0"
] | null | null | null | s = b'abc'; print(s.islower(), s)
s = b'Abc'; print(s.islower(), s)
s = b'ABC'; print(s.islower(), s)
s = b'123'; print(s.islower(), s)
s = b'(_)'; print(s.islower(), s)
s = b'(abc)'; print(s.islower(), s)
s = b'(aBc)'; print(s.islower(), s)
s = bytearray(b'abc'); print(s.islower(), s)
s = bytearray(b'Abc'); print(s.i... | 35.125 | 46 | 0.578292 |
9938b1f263bbae3606a689e4fc6b14c6d55fe3e6 | 5,936 | py | Python | tornadoutil.py | langloisjp/tornado-logging-app | 02505b8a5bef782f9b67120874355b64f1b3e81a | [
"MIT"
] | 1 | 2015-12-09T00:09:52.000Z | 2015-12-09T00:09:52.000Z | tornadoutil.py | langloisjp/tornado-logging-app | 02505b8a5bef782f9b67120874355b64f1b3e81a | [
"MIT"
] | null | null | null | tornadoutil.py | langloisjp/tornado-logging-app | 02505b8a5bef782f9b67120874355b64f1b3e81a | [
"MIT"
] | null | null | null | """
Tornado server utilities
- LoggingApplication: a base Application class with logging and metrics
- RequestHandler: a base request handler with helpers
Dependencies:
- metrics
- servicelog
See tests/test_tornadoutil.py for usage example.
"""
import json
import datetime
import uuid
import httplib # for httplib.r... | 34.114943 | 78 | 0.63157 |
9939051042bf55dc56637d71a73ebeb04bd0f880 | 1,085 | py | Python | doc/source/EXAMPLES/mu_reproj_interact.py | kapteyn-astro/kapteyn | f12332cfd567c7c0da40628dcfc7b297971ee636 | [
"BSD-3-Clause"
] | 3 | 2016-04-28T08:55:33.000Z | 2018-07-23T18:35:58.000Z | doc/source/EXAMPLES/mu_reproj_interact.py | kapteyn-astro/kapteyn | f12332cfd567c7c0da40628dcfc7b297971ee636 | [
"BSD-3-Clause"
] | 2 | 2020-07-23T12:28:37.000Z | 2021-07-13T18:26:06.000Z | doc/source/EXAMPLES/mu_reproj_interact.py | kapteyn-astro/kapteyn | f12332cfd567c7c0da40628dcfc7b297971ee636 | [
"BSD-3-Clause"
] | 3 | 2017-05-03T14:01:08.000Z | 2020-07-23T12:23:28.000Z | from kapteyn import maputils
from matplotlib import pyplot as plt
import numpy
# Read first image as base
Basefits = maputils.FITSimage(promptfie=maputils.prompt_fitsfile)
print(type(Basefits), isinstance(Basefits, maputils.FITSimage))
# Get data from a second image. This is the data that
# should be reprojected to... | 43.4 | 86 | 0.795392 |
99395a7a92f7e8a8e84654783b43338d037e4a86 | 8,269 | py | Python | eventline/api_object.py | exograd/py-eventline | ff30594545125193cc3518e28d6224c75a07e608 | [
"0BSD"
] | null | null | null | eventline/api_object.py | exograd/py-eventline | ff30594545125193cc3518e28d6224c75a07e608 | [
"0BSD"
] | null | null | null | eventline/api_object.py | exograd/py-eventline | ff30594545125193cc3518e28d6224c75a07e608 | [
"0BSD"
] | null | null | null | # Copyright (c) 2022 Exograd SAS.
#
# 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 ALL WA... | 30.178832 | 79 | 0.554239 |
993ab3350b193c779b4f099dd66923c8b840235c | 2,466 | py | Python | dplace_app/load/glottocode.py | Lumilam/D-Place | 3544163e22308919b5c27328dfaea8a1c0f3b291 | [
"MIT"
] | null | null | null | dplace_app/load/glottocode.py | Lumilam/D-Place | 3544163e22308919b5c27328dfaea8a1c0f3b291 | [
"MIT"
] | null | null | null | dplace_app/load/glottocode.py | Lumilam/D-Place | 3544163e22308919b5c27328dfaea8a1c0f3b291 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import logging
from collections import defaultdict
from dplace_app.models import Language, ISOCode, Society, LanguageFamily
from util import delete_all
| 32.88 | 87 | 0.626115 |
993b284007e5ce57710cedbee37f9826a0ffb0ec | 4,081 | py | Python | so_ana_util/error_handling.py | HBernigau/StackOverflowAnalysis | 42dae7c0c23fcdeca23f8c770ad17b2eb341d091 | [
"MIT"
] | null | null | null | so_ana_util/error_handling.py | HBernigau/StackOverflowAnalysis | 42dae7c0c23fcdeca23f8c770ad17b2eb341d091 | [
"MIT"
] | null | null | null | so_ana_util/error_handling.py | HBernigau/StackOverflowAnalysis | 42dae7c0c23fcdeca23f8c770ad17b2eb341d091 | [
"MIT"
] | null | null | null | """
contains several utilities for error handling
allows for storing "chained error information" without copying the entire
traceback object.
Note: module is currently not used / within a later refactoring the following error-Approach will be
implemented:
- bellow-flow level errors are never ignored / rather: throw ... | 29.359712 | 128 | 0.642735 |
993e1a819f6f487b24a2d7f90f46158e52218a76 | 584 | py | Python | lib/hyperparams.py | J-Moravec/pairtree | 91cbba628b78aea31034efb080976fdb47d83976 | [
"MIT"
] | 15 | 2021-01-19T21:13:50.000Z | 2022-02-02T00:01:33.000Z | lib/hyperparams.py | J-Moravec/pairtree | 91cbba628b78aea31034efb080976fdb47d83976 | [
"MIT"
] | 17 | 2020-11-25T09:41:03.000Z | 2022-03-28T04:52:14.000Z | lib/hyperparams.py | J-Moravec/pairtree | 91cbba628b78aea31034efb080976fdb47d83976 | [
"MIT"
] | 6 | 2021-01-01T06:00:31.000Z | 2021-06-29T15:03:11.000Z | explanations = {
'gamma': '''
Proportion of tree modifications that should use mutrel-informed choice for
node to move, rather than uniform choice
''',
'zeta': '''
Proportion of tree modifications that should use mutrel-informed choice for
destination to move node to, rather than uniform choice
... | 23.36 | 79 | 0.674658 |
99401a7bd2c6e3ecb8b4b60088a02ca13ad242af | 107 | bzl | Python | test/com/facebook/buck/parser/testdata/python_user_defined_rules/errors/invalid_attr_name/bad_attrs.bzl | Unknoob/buck | 2dfc734354b326f2f66896dde7746a11965d5a13 | [
"Apache-2.0"
] | 8,027 | 2015-01-02T05:31:44.000Z | 2022-03-31T07:08:09.000Z | test/com/facebook/buck/parser/testdata/python_user_defined_rules/errors/invalid_attr_name/bad_attrs.bzl | Unknoob/buck | 2dfc734354b326f2f66896dde7746a11965d5a13 | [
"Apache-2.0"
] | 2,355 | 2015-01-01T15:30:53.000Z | 2022-03-30T20:21:16.000Z | test/com/facebook/buck/parser/testdata/python_user_defined_rules/errors/invalid_attr_name/bad_attrs.bzl | Unknoob/buck | 2dfc734354b326f2f66896dde7746a11965d5a13 | [
"Apache-2.0"
] | 1,280 | 2015-01-09T03:29:04.000Z | 2022-03-30T15:14:14.000Z |
bad_attrs = rule(implementation = _impl, attrs = {"1234isntvalid": attr.int()})
| 21.4 | 79 | 0.682243 |
9943e8ba1fe715b4c9d83b3026d9f901028d6a2e | 359 | py | Python | app/database/seed/seeds/real_madrid/team.py | batistado/FlaskFootball | 4cd57edca35a7ce9864201f7ae0fc8af55a2724f | [
"MIT"
] | null | null | null | app/database/seed/seeds/real_madrid/team.py | batistado/FlaskFootball | 4cd57edca35a7ce9864201f7ae0fc8af55a2724f | [
"MIT"
] | null | null | null | app/database/seed/seeds/real_madrid/team.py | batistado/FlaskFootball | 4cd57edca35a7ce9864201f7ae0fc8af55a2724f | [
"MIT"
] | null | null | null | import os
import app.database.seed.seed_helper as helper
from app.translation.deserializer import Deserializer
from app.extensions import db
real_madrid = {
'name': 'Real Madrid CF',
'players': helper.read_csv_file(os.path.join(os.path.dirname(__file__), 'players.csv')),
}
team = Deserializer().deserialize_... | 23.933333 | 92 | 0.763231 |
9944ed29ef18664f91835683e77f02025e71e44d | 1,253 | py | Python | solver/problem4.py | suzannastep/eulers | 886da24546a490a11bc31ace4fbfa71536b129bf | [
"MIT"
] | null | null | null | solver/problem4.py | suzannastep/eulers | 886da24546a490a11bc31ace4fbfa71536b129bf | [
"MIT"
] | 1 | 2018-05-21T22:07:51.000Z | 2018-05-21T22:07:51.000Z | solver/problem4.py | suzannastep/eulers | 886da24546a490a11bc31ace4fbfa71536b129bf | [
"MIT"
] | null | null | null | import solver.algorithms as alg
import numpy as np
def problem4(t0, tf, NA0, NB0, tauA, tauB, n, returnlist=False):
"""Uses Euler's method to model the solution to a radioactive decay problem where dNA/dt = -NA/tauA and dNB/dt = NA/tauA - NB/tauB.
Args:
t0 (float): Start time
tf (float): End t... | 39.15625 | 135 | 0.623304 |
9946addc08217b2a1101ee5cf8cd56d32f207148 | 32 | py | Python | mhkit/river/io/__init__.py | Matthew-Boyd/MHKiT-Python | 016e9e67dbe1ac1ec24b3a6f8eb2771f73dfefa6 | [
"BSD-3-Clause"
] | 21 | 2020-04-20T19:10:03.000Z | 2022-03-30T18:46:03.000Z | mhkit/river/io/__init__.py | Matthew-Boyd/MHKiT-Python | 016e9e67dbe1ac1ec24b3a6f8eb2771f73dfefa6 | [
"BSD-3-Clause"
] | 110 | 2020-03-06T22:11:08.000Z | 2022-03-25T20:28:36.000Z | mhkit/river/io/__init__.py | Matthew-Boyd/MHKiT-Python | 016e9e67dbe1ac1ec24b3a6f8eb2771f73dfefa6 | [
"BSD-3-Clause"
] | 32 | 2020-03-05T20:33:10.000Z | 2022-03-24T20:19:34.000Z | from mhkit.river.io import usgs
| 16 | 31 | 0.8125 |
9946ecb403a384000ba7abec0b673e218cfb79aa | 436 | py | Python | examples/loop.py | letmaik/exhaust | 7c3b4f1dfab95192968b0bcb49bbb5574e1ac83b | [
"MIT"
] | 1 | 2021-12-04T21:37:41.000Z | 2021-12-04T21:37:41.000Z | examples/loop.py | letmaik/exhaust | 7c3b4f1dfab95192968b0bcb49bbb5574e1ac83b | [
"MIT"
] | null | null | null | examples/loop.py | letmaik/exhaust | 7c3b4f1dfab95192968b0bcb49bbb5574e1ac83b | [
"MIT"
] | null | null | null | # This example shows how a space can be modelled with loops.
import exhaust
for numbers in exhaust.space(generate_numbers):
print(numbers)
# Output:
# [1, 1, 1, 1, 1]
# [1, 1, 1, 1, 2]
# [1, 1, 1, 1, 3]
# [1, 1, 1, 1, 4]
# [1, 1, 1, 1, 5]
# [1, 1, 1, 2, 1]
# ...
# [5, 5, 5, 5, 5]
| 18.956522 | 60 | 0.568807 |
9947f9b9c078d6c553858729a5952d4735a8d687 | 755 | py | Python | src/unittest/python/raq_matchers/TimeMatchers.py | Continuous-Delivery-Machines/raqcrawl | f00fd7cd29143c99b7b17151d65c22ba87959b64 | [
"Apache-2.0"
] | null | null | null | src/unittest/python/raq_matchers/TimeMatchers.py | Continuous-Delivery-Machines/raqcrawl | f00fd7cd29143c99b7b17151d65c22ba87959b64 | [
"Apache-2.0"
] | null | null | null | src/unittest/python/raq_matchers/TimeMatchers.py | Continuous-Delivery-Machines/raqcrawl | f00fd7cd29143c99b7b17151d65c22ba87959b64 | [
"Apache-2.0"
] | null | null | null | from datetime import datetime, timedelta
from hamcrest.core.base_matcher import BaseMatcher
| 32.826087 | 108 | 0.744371 |
99489d96ff8b69b63d16bbfe1bbdd74e88ff4c9d | 2,422 | py | Python | seatsvotes/cvtools.py | ljwolf/seatsvotes | 6d44bba02016cc7ac24cebf6e0d70e1e9e801a5b | [
"MIT"
] | null | null | null | seatsvotes/cvtools.py | ljwolf/seatsvotes | 6d44bba02016cc7ac24cebf6e0d70e1e9e801a5b | [
"MIT"
] | null | null | null | seatsvotes/cvtools.py | ljwolf/seatsvotes | 6d44bba02016cc7ac24cebf6e0d70e1e9e801a5b | [
"MIT"
] | null | null | null | import numpy as np
import statsmodels as __sm
import pandas as pd
sm = __sm.api
def leverage(results):
"""
Compute the leverage matrix from a WLS model:
H = W^.5 X(X'WX)^-1X'W^.5
where W^.5 is the scalar square root.
"""
if isinstance(results.model, sm.WLS):
W = np.diag(results.model... | 32.293333 | 89 | 0.606524 |
9949b8baa4f22569ccabc008291170f9e579a8e5 | 4,137 | py | Python | pana.py | gigae-Cyon/PearlAbyssNewsArchive | f929d90dc32d807de28fc48ed3d4966b5e8a5471 | [
"MIT"
] | null | null | null | pana.py | gigae-Cyon/PearlAbyssNewsArchive | f929d90dc32d807de28fc48ed3d4966b5e8a5471 | [
"MIT"
] | null | null | null | pana.py | gigae-Cyon/PearlAbyssNewsArchive | f929d90dc32d807de28fc48ed3d4966b5e8a5471 | [
"MIT"
] | null | null | null | import requests
from bs4 import BeautifulSoup
import pickle
import re, datetime
#
# , ( '~' )
# , ( '20xx.xx.xx' )
# ,,,
# request
url = 'https://search.naver.com/search.naver?where=news&query=%ED%8E%84%EC%96%B4%EB%B9%84%EC%8A%A4&sm=tab_tmr&nso=so:r,p:all,a:all&sort=0'
res = requests.get(url)
res... | 33.362903 | 142 | 0.662557 |
994a38b1a44b5485284d61f6f94e7e736096f6bb | 488 | py | Python | app/api/v1/models/meetups_model.py | MRichardN/Questioner-api | 2697ccc976c6f4896246f7f817aab7d12f1d606c | [
"MIT"
] | null | null | null | app/api/v1/models/meetups_model.py | MRichardN/Questioner-api | 2697ccc976c6f4896246f7f817aab7d12f1d606c | [
"MIT"
] | 2 | 2019-01-08T06:58:47.000Z | 2019-01-08T08:46:16.000Z | app/api/v1/models/meetups_model.py | MRichardN/Questioner-api | 2697ccc976c6f4896246f7f817aab7d12f1d606c | [
"MIT"
] | null | null | null | from datetime import datetime
from ..utils.utils import idGenerator
from .base_model import Model
meetups = []
| 17.428571 | 50 | 0.612705 |
994c12e38f2a4f62bbd27c7c76592e6520b353ab | 7,656 | py | Python | code/extracted_features_gridsearch.py | prediction2020/multimodal-classification | 0805d5b48b640e89ab942c5e44be22e2315a8079 | [
"MIT"
] | 2 | 2020-11-28T12:03:58.000Z | 2020-12-01T11:55:37.000Z | code/extracted_features_gridsearch.py | Alabenba/multimodal-classification-1 | 15dad8385b2e7986e09e72ba62d6303be63b68f3 | [
"MIT"
] | null | null | null | code/extracted_features_gridsearch.py | Alabenba/multimodal-classification-1 | 15dad8385b2e7986e09e72ba62d6303be63b68f3 | [
"MIT"
] | 3 | 2019-12-17T13:35:34.000Z | 2021-01-21T05:42:18.000Z | """
File name: extracted_features_gridsearch.py
Author: Esra Zihni
Date created: 29.04.2019
"""
import numpy as np
import sys
import os
import yaml
import pickle
import pandas as pd
import pandas.core.indexes
sys.modules['pandas.indexes'] = pandas.core.indexes
import json
import time
import keras
import tensorflow ... | 38.862944 | 158 | 0.708856 |
994c3e8c1a0f1cd2339af26e2dce6708adab8045 | 469 | py | Python | FootageOverview/FootageManager/migrations/0003_footage_staticpath.py | nylser/FootageOverview | 921e003550ba445d5a3308dee231a2d92e642b01 | [
"Unlicense"
] | null | null | null | FootageOverview/FootageManager/migrations/0003_footage_staticpath.py | nylser/FootageOverview | 921e003550ba445d5a3308dee231a2d92e642b01 | [
"Unlicense"
] | null | null | null | FootageOverview/FootageManager/migrations/0003_footage_staticpath.py | nylser/FootageOverview | 921e003550ba445d5a3308dee231a2d92e642b01 | [
"Unlicense"
] | null | null | null | # Generated by Django 2.1.1 on 2018-09-20 07:56
from django.db import migrations, models
| 23.45 | 91 | 0.616205 |
994c7b74cdedc31413b19d9ccd08ae14b0309f6f | 1,474 | py | Python | dataschema/dataschemaMgmt.py | italia/daf-ckan-crawler | 58d4f02b91dd6386439bffed659e2797c7c6b76f | [
"Apache-2.0"
] | null | null | null | dataschema/dataschemaMgmt.py | italia/daf-ckan-crawler | 58d4f02b91dd6386439bffed659e2797c7c6b76f | [
"Apache-2.0"
] | null | null | null | dataschema/dataschemaMgmt.py | italia/daf-ckan-crawler | 58d4f02b91dd6386439bffed659e2797c7c6b76f | [
"Apache-2.0"
] | 3 | 2017-09-24T07:47:16.000Z | 2019-06-07T14:35:41.000Z | import pandas as pd
import json
import numpy as np
#DEFINITIONS
NAMESPACE = "it.gov.daf.dataset.opendata"
#print(getDataSchema("data.json", "testData"))
| 24.983051 | 85 | 0.580054 |
994cfc719e1e719affbbe45627d217841cc00c12 | 86 | py | Python | scripts/misc/redis_test.py | cclauss/archai | a5fb8f937f7f1319e3204120803b2a045e9f768b | [
"MIT"
] | 344 | 2020-06-12T22:12:56.000Z | 2022-03-29T06:48:20.000Z | scripts/misc/redis_test.py | cclauss/archai | a5fb8f937f7f1319e3204120803b2a045e9f768b | [
"MIT"
] | 29 | 2020-06-13T19:56:49.000Z | 2022-03-30T20:26:48.000Z | scripts/misc/redis_test.py | cclauss/archai | a5fb8f937f7f1319e3204120803b2a045e9f768b | [
"MIT"
] | 68 | 2020-06-12T19:32:43.000Z | 2022-03-05T06:58:40.000Z | import redis
redis_client = redis.StrictRedis(host="127.0.0.1", port=6379)
input("") | 17.2 | 61 | 0.72093 |
994d943e1ed28992f43ea83c07fdc959e483bccf | 383 | py | Python | app/route/errors.py | DreamAndDead/flask-glass | b00cd7ae56b8dc4e7d35bce88f5f1d2a1ebc45b3 | [
"MIT"
] | 2 | 2017-06-29T07:34:11.000Z | 2018-01-15T05:38:15.000Z | app/route/errors.py | DreamAndDead/flask-glass | b00cd7ae56b8dc4e7d35bce88f5f1d2a1ebc45b3 | [
"MIT"
] | null | null | null | app/route/errors.py | DreamAndDead/flask-glass | b00cd7ae56b8dc4e7d35bce88f5f1d2a1ebc45b3 | [
"MIT"
] | null | null | null | """
what flask do when 404 or something wrong happens
"""
from flask import render_template
from . import main
| 16.652174 | 49 | 0.678851 |
994e2c4582f849408c46e8115212cc872ef527b8 | 5,377 | py | Python | cert_issuer/transaction_handler.py | NunoEdgarGFlowHub/cert-issuer | c63a3cf6c6f6a5fe5c6f0378a94bf57fbabb3d76 | [
"MIT"
] | null | null | null | cert_issuer/transaction_handler.py | NunoEdgarGFlowHub/cert-issuer | c63a3cf6c6f6a5fe5c6f0378a94bf57fbabb3d76 | [
"MIT"
] | null | null | null | cert_issuer/transaction_handler.py | NunoEdgarGFlowHub/cert-issuer | c63a3cf6c6f6a5fe5c6f0378a94bf57fbabb3d76 | [
"MIT"
] | 1 | 2017-09-23T21:42:36.000Z | 2017-09-23T21:42:36.000Z | import logging
import random
from abc import abstractmethod
from pycoin.serialize import b2h
from cert_issuer import tx_utils
from cert_issuer.errors import InsufficientFundsError
from cert_issuer.signer import FinalizableSigner
# Estimate fees assuming worst case 3 inputs
ESTIMATE_NUM_INPUTS = 3
# Estimate fees as... | 37.340278 | 111 | 0.700019 |
994f2a9b067dc43d042097eea7bcc12994acae5d | 873 | py | Python | pypro/aperitivos/tests/test_video.py | ravellys/curso-django | 98c0fad20d7c9e5dcd3482eb37c43f9d65695184 | [
"MIT"
] | null | null | null | pypro/aperitivos/tests/test_video.py | ravellys/curso-django | 98c0fad20d7c9e5dcd3482eb37c43f9d65695184 | [
"MIT"
] | 789 | 2020-09-02T01:46:12.000Z | 2022-03-31T23:55:42.000Z | pypro/aperitivos/tests/test_video.py | ravellys/curso-django | 98c0fad20d7c9e5dcd3482eb37c43f9d65695184 | [
"MIT"
] | null | null | null | import pytest
from django.urls import reverse
from model_mommy import mommy
from pypro.aperitivos.models import Video
from pypro.django_assertions import assert_contains
def test_status_code(resp):
return resp.status_code == 200
def test_status_code_video_notfound(resp_video_notfound):
return resp_video... | 22.973684 | 89 | 0.767468 |
994f592b6d42ce726a0b0b48c33d080b05873db6 | 2,386 | py | Python | tests/test_analytics.py | lakshyaag/csgo | f06be1af630690b806691cbd069245e61117ee3a | [
"MIT"
] | 118 | 2020-03-21T03:50:14.000Z | 2022-03-22T23:56:19.000Z | tests/test_analytics.py | lakshyaag/csgo | f06be1af630690b806691cbd069245e61117ee3a | [
"MIT"
] | 83 | 2020-06-18T20:48:46.000Z | 2022-02-04T00:04:07.000Z | tests/test_analytics.py | lakshyaag/csgo | f06be1af630690b806691cbd069245e61117ee3a | [
"MIT"
] | 18 | 2020-06-23T04:39:23.000Z | 2022-02-03T16:18:01.000Z | import pytest
import numpy as np
from csgo.analytics.distance import (
bombsite_distance,
point_distance,
polygon_area,
area_distance,
)
from csgo.analytics.coords import Encoder
| 33.138889 | 85 | 0.591785 |
99513706c29cd040b8e1f9c0d65abac5eadeb33f | 491 | py | Python | Problems/Dynamic Programming/Easy/BuySellStock1/buy_sell_stock_1.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | 1 | 2021-08-16T14:52:05.000Z | 2021-08-16T14:52:05.000Z | Problems/Dynamic Programming/Easy/BuySellStock1/buy_sell_stock_1.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | Problems/Dynamic Programming/Easy/BuySellStock1/buy_sell_stock_1.py | dolong2110/Algorithm-By-Problems-Python | 31ecc7367aaabdd2b0ac0af7f63ca5796d70c730 | [
"MIT"
] | null | null | null | from typing import List | 27.277778 | 44 | 0.590631 |
995250f9e5d5c8cfc9076c0744ff6774100f5c5c | 45 | py | Python | src/Web Server Micropython/src/config.py | AlestanAlves/IoT-Devices | ee96a11139e2f147e892e58350e258fecfd2bc9e | [
"MIT"
] | null | null | null | src/Web Server Micropython/src/config.py | AlestanAlves/IoT-Devices | ee96a11139e2f147e892e58350e258fecfd2bc9e | [
"MIT"
] | null | null | null | src/Web Server Micropython/src/config.py | AlestanAlves/IoT-Devices | ee96a11139e2f147e892e58350e258fecfd2bc9e | [
"MIT"
] | null | null | null | # Networking settings
ssid = ""
password = "" | 15 | 21 | 0.666667 |
99528f1bcb117738e7d9a6979b7ae04eff5afc1b | 429 | py | Python | equinox/__init__.py | marcelroed/equinox | 3804a8d60217bde685bee0a893a7bd55b1e63c26 | [
"Apache-2.0"
] | null | null | null | equinox/__init__.py | marcelroed/equinox | 3804a8d60217bde685bee0a893a7bd55b1e63c26 | [
"Apache-2.0"
] | null | null | null | equinox/__init__.py | marcelroed/equinox | 3804a8d60217bde685bee0a893a7bd55b1e63c26 | [
"Apache-2.0"
] | null | null | null | from . import experimental, nn
from .filters import (
combine,
filter,
is_array,
is_array_like,
is_inexact_array,
is_inexact_array_like,
partition,
)
from .grad import filter_custom_vjp, filter_grad, filter_value_and_grad
from .jit import filter_jit
from .module import Module, static_field
f... | 22.578947 | 71 | 0.762238 |
9953d2878fe8cc130e4e72a78ce5a1ae7d2b1d1a | 3,186 | py | Python | server/edd/__init__.py | zhwycsz/edd | bdc1d2f8b5e375d3a1254829b9d2b460dd09ca12 | [
"BSD-3-Clause-LBNL"
] | 1 | 2020-04-07T03:14:52.000Z | 2020-04-07T03:14:52.000Z | server/edd/__init__.py | zhwycsz/edd | bdc1d2f8b5e375d3a1254829b9d2b460dd09ca12 | [
"BSD-3-Clause-LBNL"
] | null | null | null | server/edd/__init__.py | zhwycsz/edd | bdc1d2f8b5e375d3a1254829b9d2b460dd09ca12 | [
"BSD-3-Clause-LBNL"
] | null | null | null | # coding: utf-8
import logging
import re
from itertools import chain
from textwrap import TextWrapper
from django.core import mail
from django.test import TestCase as DjangoTestCase
from django.views import debug
from six import string_types
from six.moves.urllib.parse import urlparse, urlunparse
from threadlocals.th... | 31.235294 | 88 | 0.654739 |
9953ddf3a08462c5fca0db41a04e7d949abfb211 | 3,933 | py | Python | zfs/obj_desc.py | hiliev/py-zfs-recovery | ec3bb3316b28b91c197993d8c0a0803d4ab39605 | [
"BSD-3-Clause"
] | 14 | 2017-07-09T19:25:14.000Z | 2020-07-18T11:58:36.000Z | zfs/obj_desc.py | hiliev/py-zfs-recovery | ec3bb3316b28b91c197993d8c0a0803d4ab39605 | [
"BSD-3-Clause"
] | 8 | 2018-03-24T08:58:47.000Z | 2021-01-20T17:18:37.000Z | zfs/obj_desc.py | hiliev/py-zfs-recovery | ec3bb3316b28b91c197993d8c0a0803d4ab39605 | [
"BSD-3-Clause"
] | 2 | 2018-03-17T23:16:35.000Z | 2018-04-14T10:06:04.000Z | # Copyright (c) 2017 Hristo Iliev <github@hiliev.eu>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of c... | 36.082569 | 118 | 0.558607 |
99549198ea1be936ab3ff520705cf0b4a4757741 | 5,871 | py | Python | ner-cmv-tagger.py | jouniluoma/ner-cmv-tagger | ecf0037d04ea844c25c03cd3a5e15e5ee19ed161 | [
"MIT"
] | null | null | null | ner-cmv-tagger.py | jouniluoma/ner-cmv-tagger | ecf0037d04ea844c25c03cd3a5e15e5ee19ed161 | [
"MIT"
] | null | null | null | ner-cmv-tagger.py | jouniluoma/ner-cmv-tagger | ecf0037d04ea844c25c03cd3a5e15e5ee19ed161 | [
"MIT"
] | null | null | null | import os
import sys
import re
import numpy as np
from collections import deque
import functools
from multiprocessing import Pool
from multiprocessing import cpu_count
import tensorflow as tf
from common import load_ner_model, argument_parser
from pubmeddb import stream_documents, get_word_labels, tags_to_spans, wr... | 43.813433 | 131 | 0.57503 |
9954f17e9f9b2b6cf9615524434baa330e442422 | 1,745 | py | Python | sopel/util/textgen.py | Ameenekosan/Yumiko | 16624f0b3f5c94262104b85866ce2cf7fd96f0db | [
"EFL-2.0"
] | null | null | null | sopel/util/textgen.py | Ameenekosan/Yumiko | 16624f0b3f5c94262104b85866ce2cf7fd96f0db | [
"EFL-2.0"
] | null | null | null | sopel/util/textgen.py | Ameenekosan/Yumiko | 16624f0b3f5c94262104b85866ce2cf7fd96f0db | [
"EFL-2.0"
] | null | null | null | import re
import random
TEMPLATE_RE = re.compile(r"\{(.+?)\}")
| 33.557692 | 93 | 0.62235 |
995680b25f293385b1b3c0e4810d1bd28b5693a8 | 9,308 | py | Python | prototree/train.py | TristanGomez44/ProtoTree | d9e77a90b47cb1efe19f1736c6701872a3c4a62e | [
"MIT"
] | 35 | 2020-12-03T14:38:52.000Z | 2022-03-30T02:41:26.000Z | prototree/train.py | TristanGomez44/ProtoTree | d9e77a90b47cb1efe19f1736c6701872a3c4a62e | [
"MIT"
] | 3 | 2021-06-01T10:55:12.000Z | 2021-11-27T10:40:14.000Z | prototree/train.py | TristanGomez44/ProtoTree | d9e77a90b47cb1efe19f1736c6701872a3c4a62e | [
"MIT"
] | 7 | 2021-03-13T12:17:01.000Z | 2022-02-17T15:12:13.000Z | from tqdm import tqdm
import argparse
from copy import deepcopy
import torch
import torch.nn.functional as F
import torch.optim
import torch.utils.data
from torch.utils.data import DataLoader
from prototree.prototree import ProtoTree
from util.log import Log
# Updates leaves with derivative-free algor... | 38.783333 | 151 | 0.572733 |
9956e73164bd63500cea24e33dc9bcf6d9f73e4e | 4,311 | py | Python | scp.py | KvantPro/SCP | 1304d03007992f223d319d41037e2b32c9fbf934 | [
"Unlicense"
] | 1 | 2021-11-12T19:28:16.000Z | 2021-11-12T19:28:16.000Z | scp.py | KvantPro/SCP | 1304d03007992f223d319d41037e2b32c9fbf934 | [
"Unlicense"
] | null | null | null | scp.py | KvantPro/SCP | 1304d03007992f223d319d41037e2b32c9fbf934 | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'SCP.ui'
#
# Created by: PyQt5 UI code generator 5.15.2
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import QtCore... | 31.23913 | 189 | 0.566922 |
9957a2a526e364ebd2287d38b8a9c3830c67da27 | 1,466 | py | Python | egs/librispeech/s5/fairseq_ltlm/ltlm/pyutils/kaldi_utils.py | somniumism/kaldi | 4609ea102ab633af53414f0b13d60c0424fcd9ce | [
"Apache-2.0"
] | 1 | 2022-01-31T20:47:12.000Z | 2022-01-31T20:47:12.000Z | egs/librispeech/s5/fairseq_ltlm/ltlm/pyutils/kaldi_utils.py | somniumism/kaldi | 4609ea102ab633af53414f0b13d60c0424fcd9ce | [
"Apache-2.0"
] | 5 | 2020-08-14T01:53:54.000Z | 2020-11-16T15:46:11.000Z | egs/librispeech/s5/fairseq_ltlm/ltlm/pyutils/kaldi_utils.py | somniumism/kaldi | 4609ea102ab633af53414f0b13d60c0424fcd9ce | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 STC-Innovation LTD (Author: Anton Mitrofanov)
import subprocess
import os
import time
import logging
logger = logging.getLogger(__name__)
def compute_wer(orig_fname, utt2hyp, tmp_dir='tmp', keep_tmp=False, hyp_filter='local/wer_hyp_filter', apply_hyp_filter=True):
""" Compute wer using compute-... | 34.904762 | 126 | 0.649386 |
9959d60654ba2b048caafd94de2c99ac44a44a32 | 311 | py | Python | polygon_cli/colors.py | SergeyMelnikov/polygon-cli | 62bb6a94a5c70f20681c41f1371b0328690e2df3 | [
"MIT"
] | 50 | 2016-01-16T12:58:25.000Z | 2022-01-29T13:34:03.000Z | polygon_cli/colors.py | SergeyMelnikov/polygon-cli | 62bb6a94a5c70f20681c41f1371b0328690e2df3 | [
"MIT"
] | 18 | 2016-01-22T08:25:33.000Z | 2021-09-09T17:41:00.000Z | polygon_cli/colors.py | SergeyMelnikov/polygon-cli | 62bb6a94a5c70f20681c41f1371b0328690e2df3 | [
"MIT"
] | 19 | 2016-01-15T09:57:08.000Z | 2021-09-09T15:02:52.000Z | import colorama
colorama.init(autoreset=True)
error = colored(colorama.Fore.RED)
warning = colored(colorama.Fore.YELLOW)
success = colored(colorama.Fore.GREEN)
info = colored(colorama.Fore.CYAN)
| 22.214286 | 90 | 0.765273 |
995a079b3191ebb48a0a239dc759e1d69f8990ae | 9,682 | py | Python | vendor/istio.io/api/python/istio_api/networking/v1alpha3/service_dependency_pb2.py | octarinesec/istio | 913b459130045fc4846a36c46c05a48da88776bb | [
"Apache-2.0"
] | 2 | 2020-07-20T06:35:29.000Z | 2021-01-22T03:35:38.000Z | vendor/istio.io/api/python/istio_api/networking/v1alpha3/service_dependency_pb2.py | octarinesec/istio | 913b459130045fc4846a36c46c05a48da88776bb | [
"Apache-2.0"
] | null | null | null | vendor/istio.io/api/python/istio_api/networking/v1alpha3/service_dependency_pb2.py | octarinesec/istio | 913b459130045fc4846a36c46c05a48da88776bb | [
"Apache-2.0"
] | 1 | 2021-01-22T03:35:42.000Z | 2021-01-22T03:35:42.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: networking/v1alpha3/service_dependency.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from googl... | 40.008264 | 837 | 0.777629 |
995a58a9925fadb09a5c67c7b02f8fa9ada8ac1e | 9,044 | py | Python | text/src/autogluon/text/text_prediction/infer_types.py | zhiqiangdon/autogluon | 71ee7ef0f05d8f0aad112d8c1719174aa33194d9 | [
"Apache-2.0"
] | 4,462 | 2019-12-09T17:41:07.000Z | 2022-03-31T22:00:41.000Z | text/src/autogluon/text/text_prediction/infer_types.py | zhiqiangdon/autogluon | 71ee7ef0f05d8f0aad112d8c1719174aa33194d9 | [
"Apache-2.0"
] | 1,408 | 2019-12-09T17:48:59.000Z | 2022-03-31T20:24:12.000Z | text/src/autogluon/text/text_prediction/infer_types.py | zhiqiangdon/autogluon | 71ee7ef0f05d8f0aad112d8c1719174aa33194d9 | [
"Apache-2.0"
] | 623 | 2019-12-10T02:04:18.000Z | 2022-03-20T17:11:01.000Z | import collections
import pandas as pd
import warnings
from typing import Union, Optional, List, Dict, Tuple
from autogluon.core.constants import MULTICLASS, BINARY, REGRESSION
from .constants import NULL, CATEGORICAL, NUMERICAL, TEXT
#TODO, This file may later be merged with the infer type logic in tabular.
def is_... | 37.371901 | 100 | 0.616762 |
995c1d175eaa730142c2c791dfe0d0bd25c6e60b | 1,955 | py | Python | python/partition_string.py | Hamng/python-sources | 0cc5a5d9e576440d95f496edcfd921ae37fcd05a | [
"Unlicense"
] | null | null | null | python/partition_string.py | Hamng/python-sources | 0cc5a5d9e576440d95f496edcfd921ae37fcd05a | [
"Unlicense"
] | 1 | 2019-02-23T18:30:51.000Z | 2019-02-23T18:30:51.000Z | python/partition_string.py | Hamng/python-sources | 0cc5a5d9e576440d95f496edcfd921ae37fcd05a | [
"Unlicense"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Fri Jan 29 14:37:54 2021
@author: Ham
"""
import more_itertools as mit
import io
STDIN_SIO = io.StringIO("""
abcd
""".strip())
if __name__ == '__main__':
while True:
if not (line := STDIN_SIO.readline().strip()):
break
print(... | 29.621212 | 122 | 0.557033 |
995d69939d2d763e9d9c13dfa53c33127ce868ab | 2,887 | py | Python | src/workflow/tests/test_workflows.py | opnfv/laas | 35b9f39178cc502a5283a1b37a65f7dd0838ae05 | [
"Apache-2.0"
] | 2 | 2020-10-31T15:03:20.000Z | 2021-03-22T16:29:15.000Z | src/workflow/tests/test_workflows.py | opnfv/laas | 35b9f39178cc502a5283a1b37a65f7dd0838ae05 | [
"Apache-2.0"
] | 13 | 2019-12-04T23:29:42.000Z | 2022-03-02T04:53:53.000Z | src/workflow/tests/test_workflows.py | opnfv/laas | 35b9f39178cc502a5283a1b37a65f7dd0838ae05 | [
"Apache-2.0"
] | null | null | null | ##############################################################################
# Copyright (c) 2018 Parker Berberian, Sawyer Bergeron, and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distrib... | 28.87 | 89 | 0.626256 |
995f2990d29348610be1e082126660e99e500133 | 1,335 | py | Python | tests/database/test_key_value.py | UMDLARS/CYLGame | 880dc63ccfa2f5a1ede097b92e7479686fc41b29 | [
"MIT"
] | 2 | 2020-02-24T17:58:33.000Z | 2020-10-30T20:26:57.000Z | tests/database/test_key_value.py | UMDLARS/CYLGame | 880dc63ccfa2f5a1ede097b92e7479686fc41b29 | [
"MIT"
] | 56 | 2018-01-26T19:45:02.000Z | 2021-12-07T03:56:48.000Z | tests/database/test_key_value.py | UMDLARS/CYLGame | 880dc63ccfa2f5a1ede097b92e7479686fc41b29 | [
"MIT"
] | 3 | 2019-10-31T14:57:49.000Z | 2020-10-22T01:14:04.000Z | import pytest
from CYLGame.Database import GameDB
from . import ex_db, temp_dir
| 29.021739 | 79 | 0.689888 |
995ff73160e804154606204631367eefc3fb8d9c | 1,522 | py | Python | notifications/sms.py | HexNumbers/OctoPrint | ba01fdd0c625150bdbe09a2ba965e30b7f434e4a | [
"MIT"
] | null | null | null | notifications/sms.py | HexNumbers/OctoPrint | ba01fdd0c625150bdbe09a2ba965e30b7f434e4a | [
"MIT"
] | null | null | null | notifications/sms.py | HexNumbers/OctoPrint | ba01fdd0c625150bdbe09a2ba965e30b7f434e4a | [
"MIT"
] | null | null | null | import smtplib, sys, urllib2
from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.mime.image import MIMEImage
from PIL import Image
import io
GMAIL_USERNAME = '*******@gmail.com'
GMAIL_PASS = '*******'
RECEPIENT = '*******@tmomail.net'
SNAP_URL='http://127.0.0.1:8080/?action=s... | 35.395349 | 81 | 0.636662 |
996108d06aae592c15163dd6bc276224a1cc07f6 | 1,729 | py | Python | Day 20/day20.py | RyanRMurray/aoc2018 | 84d537fb57f5c1a5e2ad4d8524f7e66bb4bbe785 | [
"MIT"
] | null | null | null | Day 20/day20.py | RyanRMurray/aoc2018 | 84d537fb57f5c1a5e2ad4d8524f7e66bb4bbe785 | [
"MIT"
] | null | null | null | Day 20/day20.py | RyanRMurray/aoc2018 | 84d537fb57f5c1a5e2ad4d8524f7e66bb4bbe785 | [
"MIT"
] | null | null | null | from operator import itemgetter
dir = {
'N' : [0,-1],
'E' : [1, 0],
'W' : [-1,0],
'S' : [0, 1]
}
grid = {} #point -> 0 for open space, 1 for door
main()
| 22.166667 | 57 | 0.590515 |
9961d90a23d222ec807146d1ba1266cce114eafe | 2,525 | py | Python | PiCN/Layers/PacketEncodingLayer/Encoder/SimpleStringEncoder.py | NikolaiRutz/PiCN | 7775c61caae506a88af2e4ec34349e8bd9098459 | [
"BSD-3-Clause"
] | null | null | null | PiCN/Layers/PacketEncodingLayer/Encoder/SimpleStringEncoder.py | NikolaiRutz/PiCN | 7775c61caae506a88af2e4ec34349e8bd9098459 | [
"BSD-3-Clause"
] | 5 | 2020-07-15T09:01:42.000Z | 2020-09-28T08:45:21.000Z | PiCN/Layers/PacketEncodingLayer/Encoder/SimpleStringEncoder.py | NikolaiRutz/PiCN | 7775c61caae506a88af2e4ec34349e8bd9098459 | [
"BSD-3-Clause"
] | null | null | null | """A extrem simple Packet Encoder for the BasicPacketEncodingLayer"""
from PiCN.Layers.PacketEncodingLayer.Encoder import BasicEncoder
from PiCN.Packets import Packet, Content, Interest, Name, Nack, NackReason, UnknownPacket
| 38.846154 | 89 | 0.573465 |
9962163f869a0d942c76685500a8b2f453af027d | 6,306 | py | Python | dendropy/test/test_dataio_nexml_reader_chars.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | dendropy/test/test_dataio_nexml_reader_chars.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | dendropy/test/test_dataio_nexml_reader_chars.py | EnjoyLifeFund/macHighSierra-py36-pkgs | 5668b5785296b314ea1321057420bcd077dba9ea | [
"BSD-3-Clause",
"BSD-2-Clause",
"MIT"
] | null | null | null | # !/usr/bin/env python
##############################################################################
## DendroPy Phylogenetic Computing Library.
##
## Copyright 2010-2015 Jeet Sukumaran and Mark T. Holder.
## All rights reserved.
##
## See "LICENSE.rst" for terms and conditions of usage.
##
## If you use this wo... | 36.877193 | 78 | 0.599746 |
9963956a80f2a2ce2b40b7aacd8f42223f545db9 | 1,697 | py | Python | tests/test_a2c_pendulum.py | Anidwyd/pandroide-svpg | ef2f9116c5ee8e201eb1ff6f85d7ba2cc5a6ad5c | [
"MIT"
] | 1 | 2022-02-21T18:44:21.000Z | 2022-02-21T18:44:21.000Z | tests/test_a2c_pendulum.py | Anidwyd/pandroide-svpg | ef2f9116c5ee8e201eb1ff6f85d7ba2cc5a6ad5c | [
"MIT"
] | null | null | null | tests/test_a2c_pendulum.py | Anidwyd/pandroide-svpg | ef2f9116c5ee8e201eb1ff6f85d7ba2cc5a6ad5c | [
"MIT"
] | null | null | null | import datetime
import os
from pathlib import Path
import torch
from omegaconf import OmegaConf
from svpg.algos import A2C, SVPG
dtime = datetime.datetime.now().strftime("/%y-%m-%d/%H-%M-%S/")
params = {
"save_run": True,
"logger": {
"classname": "salina.logger.TFLogger",
"log_dir": str(Path(... | 25.712121 | 83 | 0.555097 |
9963d52b125cbb79ea8e80c2e6e5a5188151028c | 369 | py | Python | Executor/Tasks/Run/cli_execute.py | 5genesis/ELCM | 3386c5ca606c1f35990fc2de55df5175d44ef72c | [
"Apache-2.0"
] | 1 | 2020-04-16T17:07:46.000Z | 2020-04-16T17:07:46.000Z | Executor/Tasks/Run/cli_execute.py | 5genesis/ELCM | 3386c5ca606c1f35990fc2de55df5175d44ef72c | [
"Apache-2.0"
] | 3 | 2020-03-06T11:22:09.000Z | 2020-03-06T11:22:10.000Z | Executor/Tasks/Run/cli_execute.py | 5genesis/ELCM | 3386c5ca606c1f35990fc2de55df5175d44ef72c | [
"Apache-2.0"
] | 1 | 2022-02-01T07:56:44.000Z | 2022-02-01T07:56:44.000Z | from Task import Task
from Helper import Cli
| 24.6 | 72 | 0.644986 |
99651aea23fb84d87e70df87369d0f3bd3bf225a | 868 | py | Python | airflow/scheduler.py | pengwei715/ticketAlert | 791498a3ddcf0eae945ccc693a45af80a2c31dd6 | [
"MIT"
] | null | null | null | airflow/scheduler.py | pengwei715/ticketAlert | 791498a3ddcf0eae945ccc693a45af80a2c31dd6 | [
"MIT"
] | null | null | null | airflow/scheduler.py | pengwei715/ticketAlert | 791498a3ddcf0eae945ccc693a45af80a2c31dd6 | [
"MIT"
] | null | null | null | import airflow
from airflow import DAG
from airflow.operators.bash_operator import BashOperator
from datetime import datetime, timedelta
schedule_interval = timedelta(days=2)
default_args = {
'owner': 'Peng Wei',
'depends_on_past': False,
'start_date': datetime.now() - schedule_interval,
'email': ['we... | 22.842105 | 65 | 0.705069 |
9965306cdf64deb2a0ca386ee0f9bc928383c0a6 | 4,496 | py | Python | greenpithumb/pump.py | markselias/GreenPiThumb | aa1aed477249e99da9cbcb17610a9177044f713f | [
"Apache-2.0"
] | 83 | 2017-04-24T00:44:35.000Z | 2021-02-05T08:10:56.000Z | greenpithumb/pump.py | markselias/GreenPiThumb | aa1aed477249e99da9cbcb17610a9177044f713f | [
"Apache-2.0"
] | 144 | 2016-04-16T02:14:21.000Z | 2017-08-31T01:17:35.000Z | greenpithumb/pump.py | markselias/GreenPiThumb | aa1aed477249e99da9cbcb17610a9177044f713f | [
"Apache-2.0"
] | 15 | 2016-04-14T01:21:54.000Z | 2019-04-18T12:08:52.000Z | import logging
logger = logging.getLogger(__name__)
# Pump rate in mL/s (4.3 L/min)
_PUMP_RATE_ML_PER_SEC = 4300.0 / 60.0
# Default amount of water to add to the plant (in mL) when pump manager detects
# low soil moisture.
DEFAULT_PUMP_AMOUNT = 200
| 33.552239 | 80 | 0.615881 |
9966d637d34484011d82a970b82967f225c9276e | 2,067 | py | Python | lib.py | miami-acm/unit-testing | d074c680805f49848991bdfeab43537785238560 | [
"MIT"
] | null | null | null | lib.py | miami-acm/unit-testing | d074c680805f49848991bdfeab43537785238560 | [
"MIT"
] | null | null | null | lib.py | miami-acm/unit-testing | d074c680805f49848991bdfeab43537785238560 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
def sleep_in(weekday, vacation):
"""
The parameter weekday is True if it is a weekday, and the parameter
vacation is True if we are on vacation. We sleep in if it is not a
weekday or we're on vacation. Return True if we sleep in.
sleep_in(False, False) True
sleep_in(Tr... | 23.488636 | 79 | 0.627963 |
9968ab6b834c0b7f00339801637e6217641653ab | 246 | py | Python | gvars.py | MattSkiff/cow_flow | 6354842fbe3ceccc3648d956987b391670476292 | [
"MIT"
] | null | null | null | gvars.py | MattSkiff/cow_flow | 6354842fbe3ceccc3648d956987b391670476292 | [
"MIT"
] | 1 | 2022-03-12T01:03:01.000Z | 2022-03-12T01:03:01.000Z | gvars.py | MattSkiff/cow_flow | 6354842fbe3ceccc3648d956987b391670476292 | [
"MIT"
] | null | null | null | import config as c
FEAT_MOD_DIR = './models/feat_extractors/'
VIZ_DIR = './viz'
WEIGHT_DIR = './weights'
MODEL_DIR = './models'
LOG_DIR = './logs'
C_DIR = './cstates'
DMAP_DIR = './data/precompute/size_{}_sigma_{}/'.format(c.filter_size,c.sigma) | 27.333333 | 78 | 0.695122 |
996b1949e70fc34bc768d1d7c758d44a55cd4930 | 863 | py | Python | Botnets/Exploits/kace.py | 1ucif3r/DDOS-th31ucif3r | b5f6db19ea25ed3ceca71862eaae58c184270fdd | [
"MIT"
] | 1 | 2021-09-22T13:11:00.000Z | 2021-09-22T13:11:00.000Z | Botnets/Exploits/kace.py | 1ucif3r/DDOS-th31ucif3r | b5f6db19ea25ed3ceca71862eaae58c184270fdd | [
"MIT"
] | null | null | null | Botnets/Exploits/kace.py | 1ucif3r/DDOS-th31ucif3r | b5f6db19ea25ed3ceca71862eaae58c184270fdd | [
"MIT"
] | 3 | 2021-06-27T00:20:17.000Z | 2022-02-26T09:11:03.000Z | #!/usr/bin/python
import threading
import sys
import time
import random
import socket
import subprocess
import re
import os
import struct
import array
import requests
from threading import Thread
from time import sleep
from requests.auth import HTTPDigestAuth
from decimal import *
ips = open(sys.argv[1], "r").readli... | 19.613636 | 147 | 0.687138 |
996bd5432ca4d3076b30cd7035a3ff74a9f4d4d5 | 2,220 | py | Python | elationmagic.py | lordjabez/light-maestro | ddc8a6398f818bc531f5c809ab00e69e121e25ad | [
"Apache-2.0"
] | 1 | 2015-08-20T08:05:41.000Z | 2015-08-20T08:05:41.000Z | elationmagic.py | lordjabez/light-maestro | ddc8a6398f818bc531f5c809ab00e69e121e25ad | [
"Apache-2.0"
] | null | null | null | elationmagic.py | lordjabez/light-maestro | ddc8a6398f818bc531f5c809ab00e69e121e25ad | [
"Apache-2.0"
] | null | null | null | """
@copyright: 2013 Single D Software - All Rights Reserved
@summary: Elation Magic 260 MIDI interface for Light Maestro.
"""
# Standard library imports
import logging
# Additional library imports
import rtmidi
import rtmidi.midiconstants
# Application imports
import console
# Named logger for this module
_logge... | 29.6 | 98 | 0.656757 |
99729efd1ed3e15b30cbb89f9e80540b94f9b6f9 | 557 | py | Python | python/setup.py | dune-mirrors/dune-python | e83ac8c8e6eb7c4f6e72a21b1efde8e674a226bd | [
"BSD-3-Clause"
] | null | null | null | python/setup.py | dune-mirrors/dune-python | e83ac8c8e6eb7c4f6e72a21b1efde8e674a226bd | [
"BSD-3-Clause"
] | null | null | null | python/setup.py | dune-mirrors/dune-python | e83ac8c8e6eb7c4f6e72a21b1efde8e674a226bd | [
"BSD-3-Clause"
] | null | null | null | from setuptools import setup, find_packages
setup(name='dune.common',
namespace_packages=['dune'],
version='2.4',
description='Python package accompanying the DUNE project',
url='http://www.dune-project.org',
author='Dominic Kempf',
author_email='dominic.kempf@iwr.uni-heidelberg.de'... | 30.944444 | 65 | 0.572711 |
9974013fdcbac4a0225f07463f97b391b3f62de4 | 3,179 | py | Python | freeTextAnalyse.py | tommyzhu1995/machine_reading | de1d7b5183d779f3ba74202191706e2461b81c9e | [
"Apache-2.0"
] | null | null | null | freeTextAnalyse.py | tommyzhu1995/machine_reading | de1d7b5183d779f3ba74202191706e2461b81c9e | [
"Apache-2.0"
] | null | null | null | freeTextAnalyse.py | tommyzhu1995/machine_reading | de1d7b5183d779f3ba74202191706e2461b81c9e | [
"Apache-2.0"
] | null | null | null | import pandas as pd
import re
import jieba.analyse as analyse
import jieba
from collections import Counter
# Title
excel_path = 'DCoinSurveyETL.xlsx'
# d = pd.read_excel(excel_path, sheet_name=0, usecols=[8,9,11,12,13])
d = pd.read_excel(excel_path, sheet_name=0)
totalRowNumber = d.shape[0]
keywordList14 = ... | 40.240506 | 110 | 0.52312 |
997657151e6c735ccab22a613d02ebc8b14a375d | 548 | py | Python | tests/test_utils.py | Supplyframe/inlinestyler | 3f4ea2642183476d3e26d9733f992422532af893 | [
"BSD-3-Clause"
] | null | null | null | tests/test_utils.py | Supplyframe/inlinestyler | 3f4ea2642183476d3e26d9733f992422532af893 | [
"BSD-3-Clause"
] | 2 | 2021-03-31T19:18:35.000Z | 2021-12-13T20:03:06.000Z | tests/test_utils.py | Supplyframe/inlinestyler | 3f4ea2642183476d3e26d9733f992422532af893 | [
"BSD-3-Clause"
] | null | null | null | from unittest import TestCase
from inlinestyler.utils import inline_css
| 36.533333 | 156 | 0.680657 |
9976756e14307b0b0b925fa9ee178aaa1a981a64 | 2,626 | py | Python | tests/trainer/snorkel/test_utils.py | michael-aloys/knodle | 393e7ba0558036828fb228875511977c40000ed5 | [
"Apache-2.0"
] | 71 | 2021-04-26T10:39:56.000Z | 2022-03-28T14:36:16.000Z | tests/trainer/snorkel/test_utils.py | michael-aloys/knodle | 393e7ba0558036828fb228875511977c40000ed5 | [
"Apache-2.0"
] | 92 | 2021-04-08T12:49:38.000Z | 2022-02-03T14:24:05.000Z | tests/trainer/snorkel/test_utils.py | michael-aloys/knodle | 393e7ba0558036828fb228875511977c40000ed5 | [
"Apache-2.0"
] | 10 | 2021-07-08T06:49:28.000Z | 2022-01-15T23:28:13.000Z | import numpy as np
from scipy import sparse as ss
import torch
from torch.utils.data import TensorDataset
from knodle.trainer.snorkel.utils import (
z_t_matrix_to_snorkel_matrix,
prepare_empty_rule_matches,
add_labels_for_empty_examples
)
| 25.009524 | 111 | 0.590251 |
9976b97102f5a6ba2f92d6f1761ffc63b3af2e6c | 2,329 | py | Python | Chapter03/main.py | waltechel/KaggleStudy20220103 | 75d133c908fff5bcdc3d87dc5d5147934967aa8c | [
"MIT"
] | null | null | null | Chapter03/main.py | waltechel/KaggleStudy20220103 | 75d133c908fff5bcdc3d87dc5d5147934967aa8c | [
"MIT"
] | null | null | null | Chapter03/main.py | waltechel/KaggleStudy20220103 | 75d133c908fff5bcdc3d87dc5d5147934967aa8c | [
"MIT"
] | null | null | null | import cv2
import numpy as np
import time, argparse
parser = argparse.ArgumentParser()
parser.add_argument('--video', help='Input video path')
args = parser.parse_args()
# .
cap = cv2.VideoCapture(args.video if args.video else 0)
# 3 .
time.sleep(3)
# .
# Grap background image from first part of the video
... | 28.753086 | 124 | 0.691284 |
99774baa4c09fd082a5365eac1457ab459f3de73 | 16,226 | py | Python | api/tests/integration/test_record.py | azzamsa/RESTKnot | a776699e678b8a5547b146bc3c636c3cad7e89c0 | [
"MIT"
] | 18 | 2018-09-19T05:51:11.000Z | 2022-01-21T05:18:36.000Z | api/tests/integration/test_record.py | azzamsa/RESTKnot | a776699e678b8a5547b146bc3c636c3cad7e89c0 | [
"MIT"
] | 32 | 2018-10-26T06:03:41.000Z | 2021-10-08T03:13:52.000Z | api/tests/integration/test_record.py | azzamsa/RESTKnot | a776699e678b8a5547b146bc3c636c3cad7e89c0 | [
"MIT"
] | 9 | 2018-09-19T05:51:14.000Z | 2022-01-10T07:57:51.000Z | import datetime
import app.helpers.helpers
from app.controllers.api import record as record_api
from app.helpers import helpers
| 35.818985 | 85 | 0.570442 |
99779d653b74b6ba7a08689edbed4d57a98e1932 | 6,813 | py | Python | trafo.py | Bierbunker/Lab-Tool | cb65fa4b39135708045c0da161e9e5e0c908623c | [
"MIT"
] | 1 | 2022-01-12T21:26:37.000Z | 2022-01-12T21:26:37.000Z | trafo.py | Bierbunker/Lab-Tool | cb65fa4b39135708045c0da161e9e5e0c908623c | [
"MIT"
] | 10 | 2022-01-11T20:02:38.000Z | 2022-01-17T14:18:12.000Z | trafo.py | etschgi1/Lab-Tool | cb65fa4b39135708045c0da161e9e5e0c908623c | [
"MIT"
] | null | null | null | import sympy as simp
from sympy import sin, pi
import pandas as pd
from labtool_ex2 import Project
from uncertainties import ufloat
if __name__ == "__main__":
gm = {
"P1": r"P_1",
"PR": r"P_R",
"theoPR": r"P_R",
"U1": r"U_1",
"U2": r"U_2",
"I1": r"I_1",
"I2":... | 24.774545 | 88 | 0.402172 |
9977dae151697961779ae7c9782fcd3f0e2af45d | 25,720 | py | Python | rdkit/Chem/UnitTestGraphDescriptors.2.py | darkreactions/rdkit | 0c388029c1f9386d832f6c321e59a11589c373d8 | [
"PostgreSQL"
] | null | null | null | rdkit/Chem/UnitTestGraphDescriptors.2.py | darkreactions/rdkit | 0c388029c1f9386d832f6c321e59a11589c373d8 | [
"PostgreSQL"
] | null | null | null | rdkit/Chem/UnitTestGraphDescriptors.2.py | darkreactions/rdkit | 0c388029c1f9386d832f6c321e59a11589c373d8 | [
"PostgreSQL"
] | 2 | 2017-12-04T02:28:18.000Z | 2018-11-29T01:18:46.000Z | # $Id$
#
# Copyright (C) 2003-2006 Rational Discovery LLC
#
# @@ All Rights Reserved @@
# This file is part of the RDKit.
# The contents are covered by the terms of the BSD license
# which is included in the file license.txt, found at the root
# of the RDKit source tree.
#
"""unit testing code for graph-theoret... | 33.489583 | 100 | 0.562014 |
9978a4d232924a1376d91813fe3cd7cbcd283a30 | 5,236 | py | Python | nudging/model/propensity_score.py | UtrechtUniversity/nudging | 9eb1b77749f36059d0c03e60338308ed2e1ebe3d | [
"MIT"
] | 1 | 2021-11-08T15:14:07.000Z | 2021-11-08T15:14:07.000Z | nudging/model/propensity_score.py | UtrechtUniversity/nudging | 9eb1b77749f36059d0c03e60338308ed2e1ebe3d | [
"MIT"
] | 6 | 2021-12-07T11:05:19.000Z | 2022-03-21T09:05:52.000Z | nudging/model/propensity_score.py | UtrechtUniversity/nudging | 9eb1b77749f36059d0c03e60338308ed2e1ebe3d | [
"MIT"
] | null | null | null | """ Reference: https://matheusfacure.github.io/python-causality-handbook/11-Propensity-Score.html#
"""
import numpy as np
import pandas as pd
from sklearn.linear_model import LogisticRegression
from sklearn.neighbors import NearestNeighbors
import seaborn as sns
from matplotlib import pyplot as plt
from causalinference... | 34.447368 | 100 | 0.662338 |
997ad5b828ec5c693ac582854d231b4393d0c3e7 | 69 | py | Python | test.py | geographika/hashtable-swig | 70af890a4be76759da31800d5ccac0edbb1f5e92 | [
"MIT"
] | null | null | null | test.py | geographika/hashtable-swig | 70af890a4be76759da31800d5ccac0edbb1f5e92 | [
"MIT"
] | null | null | null | test.py | geographika/hashtable-swig | 70af890a4be76759da31800d5ccac0edbb1f5e92 | [
"MIT"
] | null | null | null | import mapscript
ht = mapscript.hashTableObj()
ht["key1"] = "value1" | 17.25 | 29 | 0.724638 |
997c4201ebd2e00ec444c8cf211f226fde60f722 | 1,822 | py | Python | day24/register.py | heijp06/AoC-2021 | f6afead5e1fe9a839d608a5792f84e54803742c1 | [
"MIT"
] | null | null | null | day24/register.py | heijp06/AoC-2021 | f6afead5e1fe9a839d608a5792f84e54803742c1 | [
"MIT"
] | null | null | null | day24/register.py | heijp06/AoC-2021 | f6afead5e1fe9a839d608a5792f84e54803742c1 | [
"MIT"
] | null | null | null | from __future__ import annotations
from expressions import InputExpression, BinaryExpression, ValueExpression
import operator
import math
| 30.881356 | 114 | 0.584523 |
997c884cd7981d3d6a7d83bec34bc5676060aac4 | 1,311 | py | Python | code/tools/prepare_instance.py | santomon/taskonomy | 4b22087a2686172b21b61589831061e7a386fe36 | [
"MIT"
] | 789 | 2018-03-21T05:28:38.000Z | 2022-03-29T19:32:47.000Z | code/tools/prepare_instance.py | santomon/taskonomy | 4b22087a2686172b21b61589831061e7a386fe36 | [
"MIT"
] | 46 | 2018-05-03T07:11:10.000Z | 2022-03-11T23:26:03.000Z | code/tools/prepare_instance.py | santomon/taskonomy | 4b22087a2686172b21b61589831061e7a386fe36 | [
"MIT"
] | 152 | 2018-03-24T10:20:44.000Z | 2022-02-09T02:38:10.000Z | import subprocess
import os
list_of_tasks = 'autoencoder curvature denoise edge2d edge3d \
keypoint2d keypoint3d colorization jigsaw \
reshade rgb2depth rgb2mist rgb2sfnorm \
room_layout segment25d segment2d vanishing_point_well_defined \
segmentsemantic_rb class_1000 class_places impainting_whole'
list_of_tasks =... | 48.555556 | 105 | 0.7254 |
997d8639bd8a8bfc58b088df644e2d3dc0795f81 | 15,901 | py | Python | osbot_utils/utils/Misc.py | owasp-sbot/OSBot-Utils | 7269390b8fc42a38b8318a21cb824d63eca88bed | [
"Apache-2.0"
] | null | null | null | osbot_utils/utils/Misc.py | owasp-sbot/OSBot-Utils | 7269390b8fc42a38b8318a21cb824d63eca88bed | [
"Apache-2.0"
] | 2 | 2021-01-23T22:04:30.000Z | 2021-02-10T03:30:32.000Z | osbot_utils/utils/Misc.py | owasp-sbot/OSBot-Utils | 7269390b8fc42a38b8318a21cb824d63eca88bed | [
"Apache-2.0"
] | 2 | 2021-01-24T21:52:12.000Z | 2021-01-25T11:15:25.000Z | import base64
import hashlib
import inspect
import logging
import os
import random
import string
import sys
import textwrap
import re
import uuid
import warnings
from datetime import datetime
from secrets import token_bytes
from time import sleep
from urllib.parse import urlencode, quote_plus, unquote_plus
from d... | 29.610801 | 137 | 0.668574 |
997ebd1b92696efee94ae16c2be8e1ec43d7d71a | 4,147 | py | Python | teamcat_service/docker_build/target/one_step_build/teamcat/doraemon/project/viewmodels/project_left_nav_bar.py | zhangyin2088/Teamcat | be9be8d7c1e58c8d2d22ab78d25783d9aee4de71 | [
"Apache-2.0"
] | 6 | 2018-11-26T08:42:52.000Z | 2020-06-01T08:33:48.000Z | teamcat_service/docker_build/target/one_step_build/teamcat/doraemon/project/viewmodels/project_left_nav_bar.py | zhangyin2088/Teamcat | be9be8d7c1e58c8d2d22ab78d25783d9aee4de71 | [
"Apache-2.0"
] | null | null | null | teamcat_service/docker_build/target/one_step_build/teamcat/doraemon/project/viewmodels/project_left_nav_bar.py | zhangyin2088/Teamcat | be9be8d7c1e58c8d2d22ab78d25783d9aee4de71 | [
"Apache-2.0"
] | 1 | 2019-01-22T06:45:36.000Z | 2019-01-22T06:45:36.000Z | #coding=utf-8
'''
Created on 2015-9-24
@author: Devuser
'''
from doraemon.project.models import Project
| 31.416667 | 93 | 0.677116 |
998087f02dbab8dae6c25cacb1cd710f8eb57923 | 345 | py | Python | plugins/broadcast.py | DeveloperNoob/BAD_LOKI_FACE | 75acea0e9c2403bfd7b732153a0bef284d12b16e | [
"MIT"
] | null | null | null | plugins/broadcast.py | DeveloperNoob/BAD_LOKI_FACE | 75acea0e9c2403bfd7b732153a0bef284d12b16e | [
"MIT"
] | null | null | null | plugins/broadcast.py | DeveloperNoob/BAD_LOKI_FACE | 75acea0e9c2403bfd7b732153a0bef284d12b16e | [
"MIT"
] | null | null | null | #By @Joel_Noob
from pyrogram import Client, filters
from config import Config
| 20.294118 | 69 | 0.715942 |
99816183077905edc8336bb93429867821a7ec88 | 700 | py | Python | tests/unit_tests/test_config.py | sspbft/sspbft-template | 894967f003c42111737b29398935514446d00a42 | [
"MIT"
] | 6 | 2019-11-12T01:45:55.000Z | 2022-03-18T10:57:21.000Z | tests/unit_tests/test_config.py | sspbft/sspbft-template | 894967f003c42111737b29398935514446d00a42 | [
"MIT"
] | 4 | 2019-02-14T10:57:09.000Z | 2019-03-21T15:22:08.000Z | tests/unit_tests/test_config.py | sspbft/BFTList | d73aee5bd0ab05995509f0fcfaf3c0a5944e617a | [
"MIT"
] | 1 | 2019-04-04T15:09:33.000Z | 2019-04-04T15:09:33.000Z | import unittest
import os
from conf import config
if __name__ == '__main__':
unittest.main() | 33.333333 | 70 | 0.63 |
99826cdad59df98eb02c36bfe0c0afb24bef7d0e | 11,169 | py | Python | escalation/utility/wizard_utils.py | twosixlabs/escalation_demo | baeb8677c03bda118ccead93508245b4ff6da26b | [
"Apache-2.0"
] | null | null | null | escalation/utility/wizard_utils.py | twosixlabs/escalation_demo | baeb8677c03bda118ccead93508245b4ff6da26b | [
"Apache-2.0"
] | null | null | null | escalation/utility/wizard_utils.py | twosixlabs/escalation_demo | baeb8677c03bda118ccead93508245b4ff6da26b | [
"Apache-2.0"
] | null | null | null | import copy
import json
import os
import re
from flask import current_app
from utility.constants import *
UI_SCHEMA_PAIRS = {
VISUALIZATION: VISUALIZATION_OPTIONS,
SELECTOR: SELECTABLE_DATA_DICT,
PLOTLY: PLOT_SPECIFIC_INFO,
}
def graphic_dict_to_graphic_component_dict(graphic_dict):
"""
ch... | 33.845455 | 105 | 0.709195 |
9982a190be8f0dd45e1794cf7158b68e8df21dab | 7,127 | py | Python | src/jen/functions.py | VishalShenoy2002/JEN | 51951233683debd30ded54e78490c307ec1ae5c7 | [
"MIT"
] | 1 | 2022-01-13T07:28:45.000Z | 2022-01-13T07:28:45.000Z | src/jen/functions.py | VishalShenoy2002/JEN | 51951233683debd30ded54e78490c307ec1ae5c7 | [
"MIT"
] | null | null | null | src/jen/functions.py | VishalShenoy2002/JEN | 51951233683debd30ded54e78490c307ec1ae5c7 | [
"MIT"
] | null | null | null | import pyautogui
import calendar
import datetime
import random
import subprocess
import time
import os
import webbrowser
import wikipedia
def day_today():
'''
The day_today() function as the name suggests tells you what day is it today.
It sees the system day and tells you.
Example:
Today... | 27.20229 | 104 | 0.648099 |
9983b123d1d4e908ba35051a5d120389e938b84d | 4,993 | py | Python | affine/affine_funcs.py | OSU-slatelab/geometric-embedding-properties | 0436d86303439681ad74aa4d29a53a15953cbb88 | [
"MIT"
] | 3 | 2019-06-06T18:57:22.000Z | 2020-04-03T07:47:14.000Z | affine/affine_funcs.py | OSU-slatelab/geometric-embedding-properties | 0436d86303439681ad74aa4d29a53a15953cbb88 | [
"MIT"
] | null | null | null | affine/affine_funcs.py | OSU-slatelab/geometric-embedding-properties | 0436d86303439681ad74aa4d29a53a15953cbb88 | [
"MIT"
] | 1 | 2019-09-23T20:44:04.000Z | 2019-09-23T20:44:04.000Z | from preprocessing import process_embedding
from preprocessing import check_valid_file
from preprocessing import check_valid_dir
import numpy as np
from progressbar import progressbar
from tqdm import tqdm
import pyemblib
import sympy
import scipy
import time
import sys
import os
#========1========... | 26.278947 | 96 | 0.580613 |
9986b5a5e3d21a2209ac2050e7dbffba4eaa887e | 334 | py | Python | accounts/models.py | Murtuza47/Star-Social | c15aa6e313ffee00d603482f684556c35a6e713e | [
"MIT"
] | null | null | null | accounts/models.py | Murtuza47/Star-Social | c15aa6e313ffee00d603482f684556c35a6e713e | [
"MIT"
] | null | null | null | accounts/models.py | Murtuza47/Star-Social | c15aa6e313ffee00d603482f684556c35a6e713e | [
"MIT"
] | null | null | null | from django.db import models
from django.contrib import auth
# Create your models here.
| 33.4 | 80 | 0.745509 |
9988f7f3a957031b6ee3da98a5c1c5a75fa36186 | 3,033 | py | Python | optimizer/geoetryModel/inner_rect.py | terasakisatoshi/pythonCodes | baee095ecee96f6b5ec6431267cdc6c40512a542 | [
"MIT"
] | null | null | null | optimizer/geoetryModel/inner_rect.py | terasakisatoshi/pythonCodes | baee095ecee96f6b5ec6431267cdc6c40512a542 | [
"MIT"
] | null | null | null | optimizer/geoetryModel/inner_rect.py | terasakisatoshi/pythonCodes | baee095ecee96f6b5ec6431267cdc6c40512a542 | [
"MIT"
] | null | null | null | from matplotlib import pyplot as plt
import z3
from z3 import Real, Optimize, If
from fractions import Fraction
EPS = 1e-2
if __name__ == '__main__':
main()
| 23.330769 | 69 | 0.55061 |
9989805dfd30f3540a38e2c6795e0635e04e6c79 | 6,640 | py | Python | src/genie/libs/parser/dell/os10/tests/ShowIPInterfaceBrief/equal/golden_output_expected.py | DataKnox/genieparser | 267a5d6be86816e0728ca55fb4fc653cd6954799 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/dell/os10/tests/ShowIPInterfaceBrief/equal/golden_output_expected.py | DataKnox/genieparser | 267a5d6be86816e0728ca55fb4fc653cd6954799 | [
"Apache-2.0"
] | null | null | null | src/genie/libs/parser/dell/os10/tests/ShowIPInterfaceBrief/equal/golden_output_expected.py | DataKnox/genieparser | 267a5d6be86816e0728ca55fb4fc653cd6954799 | [
"Apache-2.0"
] | 2 | 2021-10-18T20:13:11.000Z | 2022-02-07T06:05:28.000Z | expected_output = {
'ints': {
'Ethernet 1/1/1': {
'ip_address': 'unassigned',
'ok': True,
'method': 'unset',
'status': 'up',
'protocol': 'up'
},
'Ethernet 1/1/2': {
'ip_address': 'unassigned',
'ok': True,
... | 27.438017 | 43 | 0.356476 |
998f551a05620bbe51cf037cfa0f6b3d026b742d | 486 | py | Python | recipes/migrations/0004_auto_20210308_0628.py | PavelYasukevich/foodgram-project | d03af25d8fd0cbf1eec03467a95620b89993c9fd | [
"MIT"
] | null | null | null | recipes/migrations/0004_auto_20210308_0628.py | PavelYasukevich/foodgram-project | d03af25d8fd0cbf1eec03467a95620b89993c9fd | [
"MIT"
] | null | null | null | recipes/migrations/0004_auto_20210308_0628.py | PavelYasukevich/foodgram-project | d03af25d8fd0cbf1eec03467a95620b89993c9fd | [
"MIT"
] | 1 | 2021-03-27T16:34:07.000Z | 2021-03-27T16:34:07.000Z | # Generated by Django 3.1.7 on 2021-03-08 06:28
from django.db import migrations, models
| 25.578947 | 145 | 0.650206 |
999018d4fb928019ab4b3e39a6e4019e620c8e13 | 78 | py | Python | tests/strategies/__init__.py | lycantropos/bentley_ottmann | 988075aada80e5d5c8d53d513de130004b69c3b9 | [
"MIT"
] | 13 | 2020-04-03T04:43:44.000Z | 2022-01-18T10:40:40.000Z | tests/strategies/__init__.py | lycantropos/bentley_ottmann | 988075aada80e5d5c8d53d513de130004b69c3b9 | [
"MIT"
] | 19 | 2020-01-31T05:25:42.000Z | 2021-04-01T13:20:05.000Z | tests/strategies/__init__.py | lycantropos/bentley_ottmann | 988075aada80e5d5c8d53d513de130004b69c3b9 | [
"MIT"
] | 3 | 2020-06-08T11:15:32.000Z | 2021-02-15T12:37:01.000Z | from .base import (points_strategies,
segments_strategies)
| 26 | 39 | 0.641026 |
999258851722295d4f898a7d347d0aeefb00aaf5 | 32,996 | py | Python | core/models/article.py | agolibroda/PyTorWiki | 678a2ae13d0027c61af36e61b72e4e54493a29ac | [
"Apache-2.0"
] | null | null | null | core/models/article.py | agolibroda/PyTorWiki | 678a2ae13d0027c61af36e61b72e4e54493a29ac | [
"Apache-2.0"
] | null | null | null | core/models/article.py | agolibroda/PyTorWiki | 678a2ae13d0027c61af36e61b72e4e54493a29ac | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3.6
# -*- coding: utf-8 -*-
#
# Copyright 2015 Alec Goliboda
#
# article.py
from __future__ import print_function
import logging
import json
import string # string.Template
import zlib
# import markdown
import tornado.options
# import pymysql
import hashlib
import bas... | 45.574586 | 206 | 0.537004 |
9993ad6982945646f5058571579df16c0d7ea0c7 | 438 | py | Python | board_app/migrations/0004_alter_boardmodel_snsimage.py | OkuboAtsushi/board-project | c73beab6ad9525f1fe31d8e9b987476e4b45fd18 | [
"MIT"
] | null | null | null | board_app/migrations/0004_alter_boardmodel_snsimage.py | OkuboAtsushi/board-project | c73beab6ad9525f1fe31d8e9b987476e4b45fd18 | [
"MIT"
] | null | null | null | board_app/migrations/0004_alter_boardmodel_snsimage.py | OkuboAtsushi/board-project | c73beab6ad9525f1fe31d8e9b987476e4b45fd18 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.3 on 2021-08-01 12:25
from django.db import migrations, models
| 23.052632 | 87 | 0.621005 |
99954d46f2c27b3ddfc166f86f04813f91af3160 | 2,960 | py | Python | model/lstm_layers.py | zhazhangqi/sentence_classification | 5e7332f41ea54e00e35d21e19280d2044d69fcf6 | [
"MIT"
] | 59 | 2016-07-20T15:54:06.000Z | 2022-01-07T10:47:26.000Z | model/lstm_layers.py | LittleStar-Angel/sentence_classification | 5e7332f41ea54e00e35d21e19280d2044d69fcf6 | [
"MIT"
] | 2 | 2017-08-04T07:07:32.000Z | 2017-10-06T18:07:20.000Z | model/lstm_layers.py | LittleStar-Angel/sentence_classification | 5e7332f41ea54e00e35d21e19280d2044d69fcf6 | [
"MIT"
] | 28 | 2016-06-15T00:50:45.000Z | 2019-11-11T19:41:56.000Z |
import numpy as np
import theano
import theano.tensor as tensor
from utils import _p, numpy_floatX
from utils import ortho_weight, uniform_weight, zero_bias
""" Encoder using LSTM Recurrent Neural Network. """
def encoder(tparams, state_below, mask, seq_output=False, prefix='lstm_encoder'):
""" state_be... | 32.888889 | 87 | 0.507095 |
99973a7bbffe4bb4c1ff3021b87bc939e4ebaefd | 434 | py | Python | plugins/auth/crypto/algo_pbkdf2.py | UltrosBot/Ultros | 639efc11f73ebf7e8f47f0554aced00a559d9e2d | [
"Artistic-2.0"
] | 16 | 2015-01-02T00:16:11.000Z | 2019-06-03T06:23:11.000Z | plugins/auth/crypto/algo_pbkdf2.py | UltrosBot/Ultros | 639efc11f73ebf7e8f47f0554aced00a559d9e2d | [
"Artistic-2.0"
] | 31 | 2015-01-18T12:14:53.000Z | 2018-01-07T13:32:29.000Z | plugins/auth/crypto/algo_pbkdf2.py | UltrosBot/Ultros | 639efc11f73ebf7e8f47f0554aced00a559d9e2d | [
"Artistic-2.0"
] | 9 | 2015-02-13T09:38:53.000Z | 2020-11-29T19:59:32.000Z | # coding=utf-8
from plugins.auth.crypto.algo_base import BaseAlgorithm
from pbkdf2 import crypt
__author__ = 'Gareth Coles'
| 20.666667 | 55 | 0.652074 |
9997810102e97852438513beda69ab18958d046b | 6,018 | py | Python | src/recipes/op.py | astromancer/recipes | 8870769b13bab02301b68692515acf373dba50f1 | [
"MIT"
] | null | null | null | src/recipes/op.py | astromancer/recipes | 8870769b13bab02301b68692515acf373dba50f1 | [
"MIT"
] | null | null | null | src/recipes/op.py | astromancer/recipes | 8870769b13bab02301b68692515acf373dba50f1 | [
"MIT"
] | null | null | null | """
Some drop-in replacements for the cool builtin operator classes, but with added
support for default values
"""
# pylint: disable=redefined-builtin
# pylint: disable=invalid-name
# std libs
import builtins
import warnings
import functools as ftl
from operator import *
# local libs
import docsplice as doc
from r... | 28.253521 | 89 | 0.61233 |