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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f725e0913b22178375a220d288839fa6706545f3 | 520 | py | Python | backend/utils/management/commands/generate_dummy_skills.py | NumanIbnMazid/numanibnmazid.com | 905e3afab285316d88bafa30dc080dfbb0611731 | [
"MIT"
] | 1 | 2022-01-28T18:20:19.000Z | 2022-01-28T18:20:19.000Z | backend/utils/management/commands/generate_dummy_skills.py | NumanIbnMazid/numanibnmazid.com | 905e3afab285316d88bafa30dc080dfbb0611731 | [
"MIT"
] | null | null | null | backend/utils/management/commands/generate_dummy_skills.py | NumanIbnMazid/numanibnmazid.com | 905e3afab285316d88bafa30dc080dfbb0611731 | [
"MIT"
] | null | null | null | from portfolios.factories.skill_factory import create_skills_with_factory
from django.db import transaction
from django.core.management.base import BaseCommand
| 26 | 73 | 0.698077 |
f726670921d44f21aa09f17d795a742ee0c1fa0c | 8,397 | py | Python | test/bitfinex_test.py | laisee/bitfinex | 6a3e7cd412f186eca0039602d32c65938a392747 | [
"MIT"
] | null | null | null | test/bitfinex_test.py | laisee/bitfinex | 6a3e7cd412f186eca0039602d32c65938a392747 | [
"MIT"
] | null | null | null | test/bitfinex_test.py | laisee/bitfinex | 6a3e7cd412f186eca0039602d32c65938a392747 | [
"MIT"
] | null | null | null | import unittest
import mock
import requests
import httpretty
import settings
from bitfinex.client import Client, TradeClient
API_KEY = settings.API_KEY
API_SECRET = settings.API_SECRET
| 37.995475 | 400 | 0.609265 |
f728ea2eb644fbcc81d1cbb2f7e623c7f87f0380 | 834 | py | Python | src/bokeh_app/graph_view.py | avbatchelor/insight-articles-project | 852b338b786cb5b9c281fcec2e378aed8d3dc617 | [
"MIT"
] | null | null | null | src/bokeh_app/graph_view.py | avbatchelor/insight-articles-project | 852b338b786cb5b9c281fcec2e378aed8d3dc617 | [
"MIT"
] | null | null | null | src/bokeh_app/graph_view.py | avbatchelor/insight-articles-project | 852b338b786cb5b9c281fcec2e378aed8d3dc617 | [
"MIT"
] | null | null | null | import networkx as nx
import pickle
from bokeh.io import show, output_file
from bokeh.plotting import figure
from bokeh.models.graphs import from_networkx
processed_data_folder = 'C:\\Users\\Alex\\Documents\\GitHub\\insight-articles-project\\data\\processed\\'
filename = processed_data_folder + 'graph_and_labels'
wi... | 29.785714 | 105 | 0.758993 |
f72b30581d8ef30df8d3b88fde755c65a6390087 | 15,737 | py | Python | dssm/data_input.py | nlpming/tensorflow-DSMM | dc982cc49bf03f474da2895e4dd4fb37061c0271 | [
"MIT"
] | null | null | null | dssm/data_input.py | nlpming/tensorflow-DSMM | dc982cc49bf03f474da2895e4dd4fb37061c0271 | [
"MIT"
] | null | null | null | dssm/data_input.py | nlpming/tensorflow-DSMM | dc982cc49bf03f474da2895e4dd4fb37061c0271 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# encoding=utf-8
from inspect import getblock
import json
import os
from os import read
from numpy.core.fromnumeric import mean
import numpy as np
import paddlehub as hub
import six
import math
import random
import sys
from util import read_file
from config import Config
#
conf = Config()
def c... | 37.20331 | 129 | 0.599797 |
f72d2d7694c02f9baefa28ab714fa7d648759fe9 | 8,778 | py | Python | groupbunk.py | shine-jayakumar/groupbunk-fb | ddf3d66cd902343e419dd2cf0c86f42850315f08 | [
"MIT"
] | 1 | 2022-02-11T05:31:48.000Z | 2022-02-11T05:31:48.000Z | groupbunk.py | shine-jayakumar/groupbunk-fb | ddf3d66cd902343e419dd2cf0c86f42850315f08 | [
"MIT"
] | null | null | null | groupbunk.py | shine-jayakumar/groupbunk-fb | ddf3d66cd902343e419dd2cf0c86f42850315f08 | [
"MIT"
] | null | null | null | """
GroupBunk v.1.2
Leave your Facebook groups quietly
Author: Shine Jayakumar
Github: https://github.com/shine-jayakumar
LICENSE: MIT
"""
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.chrome.options import Options
from selenium.common.exceptions imp... | 35.97541 | 127 | 0.670084 |
f72d8677c20fa3e3a54169d4eb48cb7ca7458055 | 11,575 | py | Python | OneSpanAnalysis_Mdl.py | Ivanfdezr/CentralSoftware | 8681fedd4814dc60deb527a370411350b40c994c | [
"MIT"
] | null | null | null | OneSpanAnalysis_Mdl.py | Ivanfdezr/CentralSoftware | 8681fedd4814dc60deb527a370411350b40c994c | [
"MIT"
] | 44 | 2021-02-10T23:58:28.000Z | 2021-12-14T02:38:21.000Z | OneSpanAnalysis_Mdl.py | Ivanfdezr/CentralSoftware | 8681fedd4814dc60deb527a370411350b40c994c | [
"MIT"
] | null | null | null | import numpy as np
import numpy.linalg as la
from MdlUtilities import Field, FieldList
import MdlUtilities as mdl
| 35.506135 | 149 | 0.723629 |
f72d949d658d47131c4a502292aadd093d90b245 | 212 | py | Python | test-examples/million_points.py | tlambert03/image-demos | a2974bcc7f040fd4d14e659c4cbfeabcf726c707 | [
"BSD-3-Clause"
] | null | null | null | test-examples/million_points.py | tlambert03/image-demos | a2974bcc7f040fd4d14e659c4cbfeabcf726c707 | [
"BSD-3-Clause"
] | null | null | null | test-examples/million_points.py | tlambert03/image-demos | a2974bcc7f040fd4d14e659c4cbfeabcf726c707 | [
"BSD-3-Clause"
] | null | null | null | """Test converting an image to a pyramid.
"""
import numpy as np
import napari
points = np.random.randint(100, size=(50_000, 2))
with napari.gui_qt():
viewer = napari.view_points(points, face_color='red')
| 19.272727 | 57 | 0.712264 |
f72ddd7241194452b55a3968e1f8f4807cdc48eb | 1,166 | py | Python | pact/test/test_constants.py | dwang7/pact-python | da03551e812508652e062fc4ba6071f1119e5bf2 | [
"MIT"
] | null | null | null | pact/test/test_constants.py | dwang7/pact-python | da03551e812508652e062fc4ba6071f1119e5bf2 | [
"MIT"
] | null | null | null | pact/test/test_constants.py | dwang7/pact-python | da03551e812508652e062fc4ba6071f1119e5bf2 | [
"MIT"
] | null | null | null | from unittest import TestCase
from mock import patch
from .. import constants
| 30.684211 | 79 | 0.679245 |
f72eb585890bafe8941f0c78a9d950477be13230 | 2,555 | py | Python | backtrader/backtrader/indicators/__init__.py | harshabakku/live-back-testing-trader | 1fd69c7598dc15bea740f160eed886f396bcba2c | [
"MIT"
] | 1 | 2021-07-14T22:04:08.000Z | 2021-07-14T22:04:08.000Z | backtrader/backtrader/indicators/__init__.py | ajmal017/LiveBackTestingTrader | 8b4f5804c0aa6046128f6706582f9cde78a0519a | [
"MIT"
] | null | null | null | backtrader/backtrader/indicators/__init__.py | ajmal017/LiveBackTestingTrader | 8b4f5804c0aa6046128f6706582f9cde78a0519a | [
"MIT"
] | 3 | 2021-03-07T16:29:40.000Z | 2022-03-17T21:42:38.000Z | #!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset:4 -*-
###############################################################################
#
# Copyright (C) 2015, 2016, 2017 Daniel Rodriguez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Li... | 28.076923 | 79 | 0.699413 |
f72f3f991d29cfcde8c404665347a2b2067bd01a | 3,145 | py | Python | tests/test_game_map.py | brittleshinpass/mossbread | 6a225e5d11fdf1957d1bfe74c5a76d105561e12e | [
"MIT"
] | 1 | 2020-05-30T19:45:58.000Z | 2020-05-30T19:45:58.000Z | tests/test_game_map.py | brittleshinpass/mossbread | 6a225e5d11fdf1957d1bfe74c5a76d105561e12e | [
"MIT"
] | null | null | null | tests/test_game_map.py | brittleshinpass/mossbread | 6a225e5d11fdf1957d1bfe74c5a76d105561e12e | [
"MIT"
] | null | null | null | import pytest
from array import array
from game_map import GameMap
from tests.conftest import get_relative_path
sample_map_data = tuple(
reversed(
(
array("I", (0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0)),
array("I", (0, 1, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0... | 46.25 | 88 | 0.475994 |
f7300289bf48754135726dad8a8c684a9ab7d495 | 14,855 | py | Python | queryable_properties/managers.py | W1ldPo1nter/django-queryable-properties | 9bb4ecb4fbdd7a9e0f610f937c8101a643027fb1 | [
"BSD-3-Clause"
] | 36 | 2019-10-22T11:44:37.000Z | 2022-03-15T21:27:03.000Z | queryable_properties/managers.py | W1ldPo1nter/django-queryable-properties | 9bb4ecb4fbdd7a9e0f610f937c8101a643027fb1 | [
"BSD-3-Clause"
] | 6 | 2020-10-03T15:13:26.000Z | 2021-09-25T14:05:50.000Z | queryable_properties/managers.py | W1ldPo1nter/django-queryable-properties | 9bb4ecb4fbdd7a9e0f610f937c8101a643027fb1 | [
"BSD-3-Clause"
] | 3 | 2021-04-26T08:30:46.000Z | 2021-08-18T09:04:49.000Z | # encoding: utf-8
from __future__ import unicode_literals
import six
from django.db.models import Manager
from django.db.models.query import QuerySet
from .compat import (ANNOTATION_SELECT_CACHE_NAME, ANNOTATION_TO_AGGREGATE_ATTRIBUTES_MAP, chain_query, chain_queryset,
ModelIterable, ValuesQuery... | 51.401384 | 120 | 0.671289 |
f7309823f58463b82e823f3fd4ecc77467f835fd | 11,759 | py | Python | pml/engineer_tests.py | gatapia/py_ml_utils | 844d8b62a7c5cc0a80f4f62c0bfda092aac57ade | [
"MIT"
] | 183 | 2015-01-11T13:01:01.000Z | 2022-02-08T04:45:33.000Z | pml/engineer_tests.py | gatapia/py_ml_utils | 844d8b62a7c5cc0a80f4f62c0bfda092aac57ade | [
"MIT"
] | 13 | 2015-05-12T17:39:42.000Z | 2018-07-29T18:01:38.000Z | pml/engineer_tests.py | gatapia/py_ml_utils | 844d8b62a7c5cc0a80f4f62c0bfda092aac57ade | [
"MIT"
] | 166 | 2015-01-28T18:05:55.000Z | 2022-02-08T04:45:34.000Z | from __future__ import print_function, absolute_import
import unittest, math
import pandas as pd
import numpy as np
from . import *
| 46.478261 | 133 | 0.541628 |
f730db018b5a100d3b9690cd2c3518425836dcfb | 2,353 | py | Python | setup.py | wdv4758h/rsglob | 342f950c240b5d84c629ecf4fec348401975d2ba | [
"BSD-2-Clause"
] | null | null | null | setup.py | wdv4758h/rsglob | 342f950c240b5d84c629ecf4fec348401975d2ba | [
"BSD-2-Clause"
] | null | null | null | setup.py | wdv4758h/rsglob | 342f950c240b5d84c629ecf4fec348401975d2ba | [
"BSD-2-Clause"
] | null | null | null | import os
import sys
from setuptools import find_packages, setup, Extension
try: # for pip >= 10
from pip._internal.req import parse_requirements
except ImportError:
from pip.req import parse_requirements
try:
from setuptools_rust import RustExtension
except ImportError:
import subprocess
errno... | 30.960526 | 83 | 0.677008 |
f73176b9df2d9d3e6551836091e9a8f8bdc64a68 | 9,041 | py | Python | src/pyrobot/habitat/base.py | cihuang123/pyrobot | fe620097e31d11453b5ea7ac15e40f5f5721b29a | [
"MIT"
] | 2,150 | 2019-06-12T20:55:41.000Z | 2022-03-21T07:14:51.000Z | src/pyrobot/habitat/base.py | cihuang123/pyrobot | fe620097e31d11453b5ea7ac15e40f5f5721b29a | [
"MIT"
] | 124 | 2019-06-22T17:12:27.000Z | 2022-02-26T11:43:13.000Z | src/pyrobot/habitat/base.py | cihuang123/pyrobot | fe620097e31d11453b5ea7ac15e40f5f5721b29a | [
"MIT"
] | 329 | 2019-06-13T03:03:54.000Z | 2022-03-30T07:04:55.000Z | import numpy as np
import math
import pyrobot.utils.util as prutil
import rospy
import habitat_sim.agent as habAgent
import habitat_sim.utils as habUtils
from habitat_sim.agent.controls import ActuationSpec
import habitat_sim.errors
import quaternion
from tf.transformations import euler_from_quaternion, euler_from_mat... | 36.603239 | 93 | 0.623825 |
f731ffc418c409ea5c8ec121e5505721921146e2 | 164 | py | Python | natwork/chats/admin.py | Potisin/Natwork | a42b89f18fdd8f8ac69e56cb7184696d6883a9f7 | [
"BSD-3-Clause"
] | null | null | null | natwork/chats/admin.py | Potisin/Natwork | a42b89f18fdd8f8ac69e56cb7184696d6883a9f7 | [
"BSD-3-Clause"
] | null | null | null | natwork/chats/admin.py | Potisin/Natwork | a42b89f18fdd8f8ac69e56cb7184696d6883a9f7 | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from .models import Chat
admin.site.register(Chat, ChatAdmin)
| 12.615385 | 36 | 0.737805 |
f732fdf1128b31b7b49d386c93aa86199f8cc84f | 109 | py | Python | examples/etcc.py | t-pimpisa/pythainlp17 | cc6bc4991dfffd68953dcdb26fd99c22d60a4c1f | [
"Apache-2.0"
] | null | null | null | examples/etcc.py | t-pimpisa/pythainlp17 | cc6bc4991dfffd68953dcdb26fd99c22d60a4c1f | [
"Apache-2.0"
] | null | null | null | examples/etcc.py | t-pimpisa/pythainlp17 | cc6bc4991dfffd68953dcdb26fd99c22d60a4c1f | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from pythainlp.tokenize import etcc
print(etcc.etcc("")) # //
| 18.166667 | 46 | 0.642202 |
f733fdfd6251a8d71a648d7c85c3dac02509dfc4 | 75 | py | Python | cumulogenesis.py | stelligent/cumulogenesis | f5a3587aebd2592642c98cb4ad93d52a927dceeb | [
"MIT"
] | 1 | 2021-03-22T21:50:10.000Z | 2021-03-22T21:50:10.000Z | cumulogenesis.py | stelligent/cumulogenesis | f5a3587aebd2592642c98cb4ad93d52a927dceeb | [
"MIT"
] | 1 | 2021-03-25T22:23:04.000Z | 2021-03-25T22:23:04.000Z | cumulogenesis.py | stelligent/cumulogenesis | f5a3587aebd2592642c98cb4ad93d52a927dceeb | [
"MIT"
] | 1 | 2019-04-03T19:09:34.000Z | 2019-04-03T19:09:34.000Z | #!/usr/bin/env python
from cumulogenesis.interfaces import cli
cli.run()
| 12.5 | 40 | 0.76 |
f7356fdd90f419efa0300e27fdfd55d90e10cc07 | 2,897 | py | Python | nanpy/bmp180.py | AFTC-1/Arduino-rpi | c46079f937d7e07cc0a930cc7ae278036f50a47d | [
"MIT"
] | 178 | 2015-01-03T11:56:49.000Z | 2021-12-23T14:47:55.000Z | nanpy/bmp180.py | AFTC-1/Arduino-rpi | c46079f937d7e07cc0a930cc7ae278036f50a47d | [
"MIT"
] | 88 | 2015-01-23T09:06:43.000Z | 2021-12-26T19:58:51.000Z | nanpy/bmp180.py | AFTC-1/Arduino-rpi | c46079f937d7e07cc0a930cc7ae278036f50a47d | [
"MIT"
] | 77 | 2015-02-18T17:26:11.000Z | 2021-09-28T02:47:25.000Z | from __future__ import division
import logging
from nanpy.i2c import I2C_Master
from nanpy.memo import memoized
import time
log = logging.getLogger(__name__)
| 24.550847 | 67 | 0.491543 |
f735f8fc14c7fe9404c2a5d90d59491063b15f84 | 1,539 | py | Python | pygna/cli.py | Gee-3/pygna | 61f2128e918e423fef73d810e0c3af5761933096 | [
"MIT"
] | 32 | 2019-07-11T22:58:14.000Z | 2022-03-04T19:34:55.000Z | pygna/cli.py | Gee-3/pygna | 61f2128e918e423fef73d810e0c3af5761933096 | [
"MIT"
] | 3 | 2021-05-24T14:03:13.000Z | 2022-01-07T03:47:32.000Z | pygna/cli.py | Gee-3/pygna | 61f2128e918e423fef73d810e0c3af5761933096 | [
"MIT"
] | 5 | 2019-07-24T09:38:07.000Z | 2021-12-30T09:20:20.000Z | import logging
import argh
import pygna.command as cmd
import pygna.painter as paint
import pygna.utils as utils
import pygna.block_model as bm
import pygna.degree_model as dm
"""
autodoc
"""
logging.basicConfig(level=logging.INFO)
if __name__ == "__main__":
"""
MAIN
"""
main()
| 23.676923 | 43 | 0.654321 |
f7367b85ef33529c5c360e68d214cb8e6a80a38f | 4,752 | py | Python | dist/Platform.app/Contents/Resources/lib/python3.7/wx/lib/colourchooser/canvas.py | njalloul90/Genomics_Oncology_Platform | 9bf6d0edca5df783f4e371fa1bc46b7b1576fe70 | [
"MIT"
] | 6 | 2021-07-26T14:21:25.000Z | 2021-07-26T14:32:01.000Z | dist/Platform.app/Contents/Resources/lib/python3.7/wx/lib/colourchooser/canvas.py | njalloul90/Genomics_Oncology_Platform | 9bf6d0edca5df783f4e371fa1bc46b7b1576fe70 | [
"MIT"
] | 9 | 2021-03-18T23:10:27.000Z | 2022-03-11T23:43:55.000Z | dist/Platform.app/Contents/Resources/lib/python3.7/wx/lib/colourchooser/canvas.py | njalloul90/Genomics_Oncology_Platform | 9bf6d0edca5df783f4e371fa1bc46b7b1576fe70 | [
"MIT"
] | 2 | 2019-03-11T05:06:49.000Z | 2019-03-22T21:48:49.000Z | """
PyColourChooser
Copyright (C) 2002 Michael Gilfix <mgilfix@eecs.tufts.edu>
This file is part of PyColourChooser.
This version of PyColourChooser is open source; you can redistribute it
and/or modify it under the licensed terms.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRA... | 32.547945 | 71 | 0.643729 |
f738260086ccd3653bc2367e7b8083819a301d9b | 1,807 | py | Python | preprocessing/metadata.py | skincare-deep-learning/Skincare-backend | 80ed6b7a735291848be9248035231fbd55c93990 | [
"Apache-2.0"
] | 1 | 2019-11-27T20:56:27.000Z | 2019-11-27T20:56:27.000Z | preprocessing/metadata.py | skincare-deep-learning/Skincare-backend | 80ed6b7a735291848be9248035231fbd55c93990 | [
"Apache-2.0"
] | 10 | 2021-04-02T19:47:15.000Z | 2022-01-13T01:52:53.000Z | preprocessing/metadata.py | skincare-deep-learning/Skincare-backend | 80ed6b7a735291848be9248035231fbd55c93990 | [
"Apache-2.0"
] | null | null | null | import json
import csv
import pandas as pd
from isic_api import ISICApi
from pandas.io.json import json_normalize
# Initialize the API; no login is necessary for public data
api = ISICApi(username="SkinCare", password="unbdeeplearning")
outputFileName = 'imagedata'
imageList = api.getJson('image?limit=25000&offset=0&... | 30.627119 | 110 | 0.672939 |
f7387b7a0fda396aca3fe13d2312bd4427223bec | 1,317 | py | Python | nasbench/scripts/generate-all-graphs.py | bkj/nasbench | a238cf26d843aaffbe037569528ef96d3e37eb04 | [
"Apache-2.0"
] | null | null | null | nasbench/scripts/generate-all-graphs.py | bkj/nasbench | a238cf26d843aaffbe037569528ef96d3e37eb04 | [
"Apache-2.0"
] | null | null | null | nasbench/scripts/generate-all-graphs.py | bkj/nasbench | a238cf26d843aaffbe037569528ef96d3e37eb04 | [
"Apache-2.0"
] | 1 | 2021-07-25T16:36:34.000Z | 2021-07-25T16:36:34.000Z | #!/usr/bin/env python
"""
generate-all-graphs.py
python generate-all-graphs.py | gzip -c > all-graphs.gz
"""
import sys
import json
import itertools
import numpy as np
from tqdm import tqdm
from nasbench.lib import graph_util
from joblib import delayed, Parallel
max_vertices = 7
num_ops = 3
max_edges ... | 24.388889 | 98 | 0.642369 |
f738e084271100fae4934591514291316a9bafdd | 1,500 | py | Python | ui/mext.py | szymonkaliski/nott | fa85e64b570f71733ea199dddbd0bc0f013a613b | [
"MIT"
] | 25 | 2019-07-01T14:58:48.000Z | 2021-11-13T17:00:44.000Z | ui/mext.py | szymonkaliski/nott | fa85e64b570f71733ea199dddbd0bc0f013a613b | [
"MIT"
] | 6 | 2019-12-30T02:50:19.000Z | 2021-05-10T16:41:47.000Z | ui/mext.py | szymonkaliski/nott | fa85e64b570f71733ea199dddbd0bc0f013a613b | [
"MIT"
] | 2 | 2020-01-05T13:02:07.000Z | 2020-05-21T15:54:57.000Z | # FIXME: fix all "happy paths coding" issues
import liblo
from threading import Thread
| 26.315789 | 85 | 0.544 |
f73a4d22041854c5326afaffc36927b22884b07a | 5,370 | py | Python | workers/test/test_exportactionlogsworker.py | kwestpharedhat/quay | a0df895005bcd3e53847046f69f6a7add87c88fd | [
"Apache-2.0"
] | null | null | null | workers/test/test_exportactionlogsworker.py | kwestpharedhat/quay | a0df895005bcd3e53847046f69f6a7add87c88fd | [
"Apache-2.0"
] | null | null | null | workers/test/test_exportactionlogsworker.py | kwestpharedhat/quay | a0df895005bcd3e53847046f69f6a7add87c88fd | [
"Apache-2.0"
] | null | null | null | import json
import os
import pytest
from datetime import datetime, timedelta
import boto3
from httmock import urlmatch, HTTMock
from moto import mock_s3
from app import storage as test_storage
from data import model, database
from data.logs_model import logs_model
from storage import S3Storage, StorageContext, Dist... | 30.338983 | 97 | 0.58324 |
f73c025048313646ffa657c41d4c35ef79bc7325 | 6,699 | py | Python | pageplot/plotmodel.py | JBorrow/pageplot | 8abad574fda476d26a59fc8b7d36da2838f2c11e | [
"MIT"
] | null | null | null | pageplot/plotmodel.py | JBorrow/pageplot | 8abad574fda476d26a59fc8b7d36da2838f2c11e | [
"MIT"
] | null | null | null | pageplot/plotmodel.py | JBorrow/pageplot | 8abad574fda476d26a59fc8b7d36da2838f2c11e | [
"MIT"
] | null | null | null | """
The base top-level plot model class.
From this all data and plotting flow.
"""
from pageplot.exceptions import PagePlotParserError
from pathlib import Path
from typing import Any, Optional, Dict, List, Union
from pageplot.extensionmodel import PlotExtension
from pageplot.extensions import built_in_extensions
fro... | 29.641593 | 86 | 0.618749 |
f73d133f1804d0833d771530b775e1da1e558e30 | 853 | py | Python | src.py | duldiev/Assignment-2-Scrapping | a9dbb4bb14b7fe0a1c5ec6eba73491008ff8da52 | [
"MIT"
] | null | null | null | src.py | duldiev/Assignment-2-Scrapping | a9dbb4bb14b7fe0a1c5ec6eba73491008ff8da52 | [
"MIT"
] | null | null | null | src.py | duldiev/Assignment-2-Scrapping | a9dbb4bb14b7fe0a1c5ec6eba73491008ff8da52 | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup as soup
from selenium import webdriver | 38.772727 | 110 | 0.588511 |
f73dddf470763349a7f01540ff083d75743566dd | 19,409 | py | Python | qsubm.py | mark-caprio/mcscript | 7a5a69667857f27b8f2d2f9387b90301bc321df2 | [
"MIT"
] | 1 | 2017-05-30T20:45:24.000Z | 2017-05-30T20:45:24.000Z | qsubm.py | mark-caprio/mcscript | 7a5a69667857f27b8f2d2f9387b90301bc321df2 | [
"MIT"
] | 3 | 2020-06-15T16:10:23.000Z | 2020-10-15T02:47:21.000Z | qsubm.py | mark-caprio/mcscript | 7a5a69667857f27b8f2d2f9387b90301bc321df2 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""qsubm -- generic queue submission for task-oriented batch scripts
Environment variables:
MCSCRIPT_DIR should specify the directory in which the mcscript package is
installed, i.e., the directory where the file qsubm.py is found. (Note that
qsubm uses this information to locate c... | 40.77521 | 305 | 0.679273 |
f73ea882b3c478b64d849ace9aad77a4fd64c642 | 504 | py | Python | trees.py | dmancevo/trees | a76a8d9c8e11c67042e3d947d58a84fee83ad6b5 | [
"Apache-2.0"
] | null | null | null | trees.py | dmancevo/trees | a76a8d9c8e11c67042e3d947d58a84fee83ad6b5 | [
"Apache-2.0"
] | null | null | null | trees.py | dmancevo/trees | a76a8d9c8e11c67042e3d947d58a84fee83ad6b5 | [
"Apache-2.0"
] | null | null | null | from ctypes import *
Node._fields_ = [
("leaf", c_int),
("g", c_float),
("min_samples", c_int),
("split_ind", c_int),
("split", c_float),
("left", POINTER(Node)),
("right", POINTER(Node))]
trees = CDLL("./trees.so")
trees.get_root.argtypes = (c_int, )
trees.get_root.restype = POINTER(Node)... | 21 | 47 | 0.621032 |
f73eadae4fdc856f5258f55231ef39bc6666f5e3 | 2,657 | py | Python | qf_lib/backtesting/order/order.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 198 | 2019-08-16T15:09:23.000Z | 2022-03-30T12:44:00.000Z | qf_lib/backtesting/order/order.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 13 | 2021-01-07T10:15:19.000Z | 2022-03-29T13:01:47.000Z | qf_lib/backtesting/order/order.py | webclinic017/qf-lib | 96463876719bba8a76c8269cef76addf3a2d836d | [
"Apache-2.0"
] | 29 | 2019-08-16T15:21:28.000Z | 2022-02-23T09:53:49.000Z | # Copyright 2016-present CERN European Organization for Nuclear Research
#
# 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.... | 39.073529 | 113 | 0.640572 |
f73f526fb320491a4e8c361c6ccf86f4cd4462be | 8,080 | py | Python | purity_fb/purity_fb_1dot12/models/multi_protocol_rule.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 5 | 2017-09-08T20:47:22.000Z | 2021-06-29T02:11:05.000Z | purity_fb/purity_fb_1dot12/models/multi_protocol_rule.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 16 | 2017-11-27T20:57:48.000Z | 2021-11-23T18:46:43.000Z | purity_fb/purity_fb_1dot12/models/multi_protocol_rule.py | tlewis-ps/purity_fb_python_client | 652835cbd485c95a86da27f8b661679727ec6ea0 | [
"Apache-2.0"
] | 22 | 2017-10-13T15:33:05.000Z | 2021-11-08T19:56:21.000Z | # coding: utf-8
"""
Pure Storage FlashBlade REST 1.12 Python SDK
Pure Storage FlashBlade REST 1.12 Python SDK. Compatible with REST API versions 1.0 - 1.12. Developed by [Pure Storage, Inc](http://www.purestorage.com/). Documentations can be found at [purity-fb.readthedocs.io](http://purity-fb.readthedocs.io/... | 53.509934 | 1,242 | 0.688738 |
f73f780a7a7ee00c38db35dff1b7df923b5843be | 3,789 | py | Python | webdriver/tests/actions/mouse_dblclick.py | shs96c/web-platform-tests | 61acad6dd9bb99d32340eb41f5146de64f542359 | [
"BSD-3-Clause"
] | null | null | null | webdriver/tests/actions/mouse_dblclick.py | shs96c/web-platform-tests | 61acad6dd9bb99d32340eb41f5146de64f542359 | [
"BSD-3-Clause"
] | null | null | null | webdriver/tests/actions/mouse_dblclick.py | shs96c/web-platform-tests | 61acad6dd9bb99d32340eb41f5146de64f542359 | [
"BSD-3-Clause"
] | null | null | null | import pytest
from tests.actions.support.mouse import assert_move_to_coordinates, get_center
from tests.actions.support.refine import get_events, filter_dict
_DBLCLICK_INTERVAL = 640
# Using local fixtures because we want to start a new session between
# each test, otherwise the clicks in each test interfere with ... | 34.761468 | 92 | 0.594088 |
f741f9a134a29cde4417d89a622f8515e0c9db99 | 2,842 | py | Python | actions.py | ratnasankeerthanreddy/Chatbot-for-Personal-assisatance | 6c584601af4c98a3bebedf7073e0ccf2ad8ecf76 | [
"MIT"
] | 1 | 2020-10-28T15:57:44.000Z | 2020-10-28T15:57:44.000Z | actions.py | ratnasankeerthanreddy/Chatbot-for-Personal-assisatance | 6c584601af4c98a3bebedf7073e0ccf2ad8ecf76 | [
"MIT"
] | null | null | null | actions.py | ratnasankeerthanreddy/Chatbot-for-Personal-assisatance | 6c584601af4c98a3bebedf7073e0ccf2ad8ecf76 | [
"MIT"
] | null | null | null | from typing import Any, Text, Dict, List
from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher
from utils import convert_timestamp
from rasa_sdk.events import AllSlotsReset
import datetime
from datetime import timedelta, date
import dateutil.parser
import boto3
from boto3.dynamodb.cond... | 35.974684 | 363 | 0.678044 |
f7421c61dc4a9f2905083616a76cf5c9a110855b | 4,688 | py | Python | main.py | Davidswinkels/DownloadWalkingRoutes | 9ceaee0b96507149086aef7081790a09ab6b3653 | [
"Apache-2.0"
] | null | null | null | main.py | Davidswinkels/DownloadWalkingRoutes | 9ceaee0b96507149086aef7081790a09ab6b3653 | [
"Apache-2.0"
] | null | null | null | main.py | Davidswinkels/DownloadWalkingRoutes | 9ceaee0b96507149086aef7081790a09ab6b3653 | [
"Apache-2.0"
] | null | null | null | from scripts.downloader import *
import fiona
from shapely.geometry import shape
import geopandas as gpd
import matplotlib.pyplot as plt
from pprint import pprint
import requests
import json
import time
import os
# Constant variables
input_min_lat = 50.751797561
input_min_lon = 5.726110232
input_max_lat = 50.938216069... | 53.272727 | 133 | 0.588097 |
f7441602c73a268dd40291e6397b91ed0f1027f6 | 3,185 | py | Python | seq2seq-chatbot/chat_web.py | rohitkujur1997/chatbot | 76cd460b09f75532a7259d783114d8cf3dda246f | [
"MIT"
] | 104 | 2018-03-28T20:30:25.000Z | 2022-02-18T19:43:21.000Z | seq2seq-chatbot/chat_web.py | rohitkujur1997/chatbot | 76cd460b09f75532a7259d783114d8cf3dda246f | [
"MIT"
] | 37 | 2018-04-16T15:39:17.000Z | 2021-05-29T11:28:26.000Z | seq2seq-chatbot/chat_web.py | rohitkujur1997/chatbot | 76cd460b09f75532a7259d783114d8cf3dda246f | [
"MIT"
] | 63 | 2018-05-18T09:52:20.000Z | 2021-07-26T08:11:17.000Z | """
Script for serving a trained chatbot model over http
"""
import datetime
import click
from os import path
from flask import Flask, request, send_from_directory
from flask_cors import CORS
from flask_restful import Resource, Api
import general_utils
import chat_command_handler
from chat_settings import ChatSettings... | 37.916667 | 141 | 0.661538 |
f744580853ac0dc47dbf987d1497464099a8f500 | 1,907 | py | Python | tests/test-checkbox.py | JonathanRRogers/twill | e1afc10366dcd29b82eeae2d586e49ca7737039a | [
"MIT"
] | null | null | null | tests/test-checkbox.py | JonathanRRogers/twill | e1afc10366dcd29b82eeae2d586e49ca7737039a | [
"MIT"
] | null | null | null | tests/test-checkbox.py | JonathanRRogers/twill | e1afc10366dcd29b82eeae2d586e49ca7737039a | [
"MIT"
] | null | null | null | import twilltestlib
import twill
from twill import namespaces, commands
from twill.errors import TwillAssertionError
from mechanize import BrowserStateError
| 26.859155 | 77 | 0.631358 |
f74471527dea41ff8d2f932ecbb41c7a4779f9c6 | 894 | py | Python | native/release/test.py | ncbray/pystream | 70bba5646d6512adb6803564c22268d3424c66d8 | [
"Apache-2.0"
] | 6 | 2015-09-19T18:22:33.000Z | 2020-11-29T15:21:17.000Z | native/release/test.py | ncbray/pystream | 70bba5646d6512adb6803564c22268d3424c66d8 | [
"Apache-2.0"
] | 1 | 2015-08-04T08:03:46.000Z | 2015-08-04T08:03:46.000Z | native/release/test.py | ncbray/pystream | 70bba5646d6512adb6803564c22268d3424c66d8 | [
"Apache-2.0"
] | 1 | 2019-12-09T08:27:09.000Z | 2019-12-09T08:27:09.000Z | # Copyright 2011 Nicholas Bray
#
# 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... | 22.35 | 74 | 0.710291 |
f7451e04b5509a3b3a1ecacc27d8ca29e4bae31f | 657 | py | Python | 4.py | Andrey543/Prack_10 | 263cae3204ed624b68d5797bd8d8833dd88e4682 | [
"PSF-2.0"
] | null | null | null | 4.py | Andrey543/Prack_10 | 263cae3204ed624b68d5797bd8d8833dd88e4682 | [
"PSF-2.0"
] | null | null | null | 4.py | Andrey543/Prack_10 | 263cae3204ed624b68d5797bd8d8833dd88e4682 | [
"PSF-2.0"
] | null | null | null | enru=open('en-ru.txt','r')
input=open('input.txt','r')
output=open('output.txt','w')
s=enru.read()
x=''
prov={'q','w','e','r','t','y','u','i','o','p','a','s','d','f','g','h','j','k','l','z','x','c','v','b','n','m'}
slovar={}
s=s.replace('\t-\t',' ')
while len(s)>0:
slovar[s[:s.index(' ')]]=s[s.index(' '):s.index('\... | 22.655172 | 110 | 0.438356 |
f74545257d4ee21af8ad7aae2149ad290991f512 | 2,485 | py | Python | examples/siamese_mnist.py | DmitryUlyanov/deeppy | c9644d348e22b78d32ea049fb0ac14bf3b750941 | [
"MIT"
] | 1 | 2015-09-16T08:01:21.000Z | 2015-09-16T08:01:21.000Z | examples/siamese_mnist.py | rajat1994/deeppy | 79cc7cb552f30bc70eeea9ee7ff4976b0899ea66 | [
"MIT"
] | null | null | null | examples/siamese_mnist.py | rajat1994/deeppy | 79cc7cb552f30bc70eeea9ee7ff4976b0899ea66 | [
"MIT"
] | 2 | 2020-04-05T21:41:14.000Z | 2021-09-28T18:05:49.000Z | #!/usr/bin/env python
"""
Siamese networks
================
"""
import random
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import offsetbox
import deeppy as dp
# Fetch MNIST data
dataset = dp.dataset.MNIST()
x_train, y_train, x_test, y_test = dataset.data(flat=True, dp_dtypes=True)
# Normaliz... | 24.60396 | 78 | 0.639437 |
f7455caca893431c335911322deda0eadbce921b | 1,580 | py | Python | py/tests/tests_integ_yarn.py | My-Technical-Architect/sparkling-water | b1381891baefd63fd15f8dc2a73b049828a919bc | [
"Apache-2.0"
] | null | null | null | py/tests/tests_integ_yarn.py | My-Technical-Architect/sparkling-water | b1381891baefd63fd15f8dc2a73b049828a919bc | [
"Apache-2.0"
] | null | null | null | py/tests/tests_integ_yarn.py | My-Technical-Architect/sparkling-water | b1381891baefd63fd15f8dc2a73b049828a919bc | [
"Apache-2.0"
] | null | null | null | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | 39.5 | 97 | 0.725316 |
f747016ef477946806c1d818d38cadb8c27e681e | 12,988 | py | Python | exchanges/virtualExchangeService.py | AshWorkshop/Trandash | a96b523fbd171ba2d43a6720ef2e2a496a0cf75a | [
"MIT"
] | 1 | 2018-07-25T03:43:35.000Z | 2018-07-25T03:43:35.000Z | exchanges/virtualExchangeService.py | AshWorkshop/Trandash | a96b523fbd171ba2d43a6720ef2e2a496a0cf75a | [
"MIT"
] | null | null | null | exchanges/virtualExchangeService.py | AshWorkshop/Trandash | a96b523fbd171ba2d43a6720ef2e2a496a0cf75a | [
"MIT"
] | null | null | null | from twisted.internet import defer, task
from twisted.python.failure import Failure
from exchanges.base import ExchangeService
from exchange import calcVirtualOrderBooks
import copy
import time
if __name__ == '__main__':
from exchanges.bitfinex.BitfinexService import bitfinex
VirtualExchange(bitfinex, ('ETH'... | 34.542553 | 97 | 0.495303 |
f7479f1a05ace202d6234fbd90b428551eb021a1 | 7,989 | py | Python | testplan/testing/cpp/cppunit.py | Morgan-Stanley/Testplan | 9374d6e0da6ae9aa7a1b5e08b42cd21993485837 | [
"Apache-2.0"
] | null | null | null | testplan/testing/cpp/cppunit.py | Morgan-Stanley/Testplan | 9374d6e0da6ae9aa7a1b5e08b42cd21993485837 | [
"Apache-2.0"
] | null | null | null | testplan/testing/cpp/cppunit.py | Morgan-Stanley/Testplan | 9374d6e0da6ae9aa7a1b5e08b42cd21993485837 | [
"Apache-2.0"
] | null | null | null | import os
from schema import Or
from testplan.common.config import ConfigOption
from ..base import ProcessRunnerTest, ProcessRunnerTestConfig
from ...importers.cppunit import CPPUnitResultImporter, CPPUnitImportedResult
| 35.506667 | 80 | 0.620729 |
f747a38fbb26a5157c21b6d60ed98e858e4c0dcd | 8,191 | py | Python | commands/song.py | Princ3x/ddmbot | 088eb6b46447a1ec184b1bc7fea493b66ee35284 | [
"MIT"
] | 8 | 2016-12-13T17:52:51.000Z | 2019-06-23T22:11:42.000Z | commands/song.py | Princ3x/ddmbot | 088eb6b46447a1ec184b1bc7fea493b66ee35284 | [
"MIT"
] | 13 | 2016-12-13T17:35:09.000Z | 2017-07-08T10:53:51.000Z | commands/song.py | Princ3x/ddmbot | 088eb6b46447a1ec184b1bc7fea493b66ee35284 | [
"MIT"
] | 4 | 2016-12-13T17:52:53.000Z | 2019-01-01T17:43:33.000Z | import discord.ext.commands as dec
import database.song
from commands.common import *
| 56.881944 | 120 | 0.652545 |
f747c5f4148789ffa72b834beacbd044a5cb6421 | 2,468 | py | Python | linear_error_analysis/src/main.py | spacesys-finch/Science | 623c9d77de6a52e87571debf7970cea7af591f2a | [
"MIT"
] | null | null | null | linear_error_analysis/src/main.py | spacesys-finch/Science | 623c9d77de6a52e87571debf7970cea7af591f2a | [
"MIT"
] | null | null | null | linear_error_analysis/src/main.py | spacesys-finch/Science | 623c9d77de6a52e87571debf7970cea7af591f2a | [
"MIT"
] | 1 | 2021-10-09T19:35:26.000Z | 2021-10-09T19:35:26.000Z | """
main.py
Main driver for the Linear Error Analysis program.
Can be run using `lea.sh`.
Can choose which plots to see by toggling on/off `show_fig` param.
Author(s): Adyn Miles, Shiqi Xu, Rosie Liang
"""
import os
import matplotlib.pyplot as plt
import numpy as np
import config
import libs.gta_xch4 as gta_xch4
i... | 28.697674 | 87 | 0.687601 |
f74835f3182443e8b2003e77b093fbfc09c67fcf | 7,153 | py | Python | src/anu/constants/amino_acid.py | ankitskvmdam/anu | 699598fb60dcc23f6cccd5abb30a03b294d21598 | [
"MIT"
] | null | null | null | src/anu/constants/amino_acid.py | ankitskvmdam/anu | 699598fb60dcc23f6cccd5abb30a03b294d21598 | [
"MIT"
] | null | null | null | src/anu/constants/amino_acid.py | ankitskvmdam/anu | 699598fb60dcc23f6cccd5abb30a03b294d21598 | [
"MIT"
] | null | null | null | """Enum for amino acid."""
from enum import Enum
from typing import Dict, TypedDict
amino_acid: Dict[str, AminoAcidProperty] = {
"A": {
"code": AminoAcidToInt["A"].value,
"hydropathy": Hydropathy["HB"].value,
"hydropathy_index": 1.8,
"acidity_basicity": AcidityBasicity["U"].v... | 28.612 | 57 | 0.533622 |
f74b1a4debef16881b74152eff013915a6f5da94 | 8,550 | py | Python | user_chainload.py | Phidica/sublime-execline | a3c1b76de0c9a420ae73467c28f445b698f7f508 | [
"MIT"
] | 2 | 2020-08-28T16:04:37.000Z | 2020-08-28T20:06:21.000Z | user_chainload.py | Phidica/sublime-execline | a3c1b76de0c9a420ae73467c28f445b698f7f508 | [
"MIT"
] | null | null | null | user_chainload.py | Phidica/sublime-execline | a3c1b76de0c9a420ae73467c28f445b698f7f508 | [
"MIT"
] | null | null | null | import logging
import os
import re
import sublime
# external dependencies (see dependencies.json)
import jsonschema
import yaml # pyyaml
# This plugin generates a hidden syntax file containing rules for additional
# chainloading commands defined by the user. The syntax is stored in the cache
# directory to avoid the... | 31.090909 | 109 | 0.68 |
f74b23abf6614d599940d2f82ff8df5980edce4e | 378 | py | Python | nmutant_model/retrain_mu_test0.py | asplos2020/DRTest | c3de497142d9b226e518a1a0f95f7350d2f7acd6 | [
"MIT"
] | 1 | 2021-04-01T07:31:17.000Z | 2021-04-01T07:31:17.000Z | nmutant_model/retrain_mu_test0.py | Justobe/DRTest | 85c3c9b2a46cafa7184130f2596c5f9eb3b20bff | [
"MIT"
] | null | null | null | nmutant_model/retrain_mu_test0.py | Justobe/DRTest | 85c3c9b2a46cafa7184130f2596c5f9eb3b20bff | [
"MIT"
] | 1 | 2020-12-24T12:12:54.000Z | 2020-12-24T12:12:54.000Z | import os
import numpy as np
import sys
sys.path.append("../")
for model in ['lenet1', 'lenet4', 'lenet5']:
for attack in ['fgsm', 'cw', 'jsma']:
for mu_var in ['gf', 'nai', 'ns', 'ws']:
os.system('CUDA_VISIBLE_DEVICES=0 python retrain_mu_mnist.py --datasets=mnist --attack=' + attack + ' --mode... | 42 | 178 | 0.600529 |
f74bfae14ea8e361bfd9a147cec9f55e5eecb5a2 | 5,197 | py | Python | characterise_inauthentic_tweets.py | weberdc/socmed_repeatability | 85da18cbffa53f18279844117b2aed226104ce11 | [
"Apache-2.0"
] | 2 | 2021-06-30T07:29:10.000Z | 2022-01-20T15:17:26.000Z | characterise_inauthentic_tweets.py | weberdc/socmed_repeatability | 85da18cbffa53f18279844117b2aed226104ce11 | [
"Apache-2.0"
] | null | null | null | characterise_inauthentic_tweets.py | weberdc/socmed_repeatability | 85da18cbffa53f18279844117b2aed226104ce11 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
from __future__ import print_function
import gzip
import json
import re
import sys
# import time
from argparse import ArgumentParser
# from datetime import datetime
TWITTER_TS_FORMAT = '%a %b %d %H:%M:%S +0000 %Y' #Tue Apr 26 08:57:55 +0000 2011
# def parse_ts(ts_str, fmt=TWITTER_TS_FORMAT... | 31.307229 | 110 | 0.583414 |
f74ca0e4b20b83d509bc3a77fa6331062c311e10 | 3,577 | py | Python | localshop/apps/packages/utils.py | rcoup/localshop | b7d0803afd9335862accfc79dee047a6b0e67ad6 | [
"BSD-3-Clause"
] | null | null | null | localshop/apps/packages/utils.py | rcoup/localshop | b7d0803afd9335862accfc79dee047a6b0e67ad6 | [
"BSD-3-Clause"
] | null | null | null | localshop/apps/packages/utils.py | rcoup/localshop | b7d0803afd9335862accfc79dee047a6b0e67ad6 | [
"BSD-3-Clause"
] | null | null | null | import inspect
import hashlib
import logging
import os
from django.core.files.uploadedfile import TemporaryUploadedFile
from django.db.models import FieldDoesNotExist
from django.db.models.fields.files import FileField
from django.http import QueryDict
from django.utils.datastructures import MultiValueDict
logger = l... | 29.808333 | 78 | 0.559966 |
f74d7b65bf1d537a02c073dba7f2c762c4daaaf9 | 4,228 | py | Python | bika/lims/browser/worksheet/views/analyses_transposed.py | hocinebendou/bika.gsoc | 85bc0c587de7f52073ae0e89bddbc77bf875f295 | [
"MIT"
] | null | null | null | bika/lims/browser/worksheet/views/analyses_transposed.py | hocinebendou/bika.gsoc | 85bc0c587de7f52073ae0e89bddbc77bf875f295 | [
"MIT"
] | null | null | null | bika/lims/browser/worksheet/views/analyses_transposed.py | hocinebendou/bika.gsoc | 85bc0c587de7f52073ae0e89bddbc77bf875f295 | [
"MIT"
] | null | null | null | # coding=utf-8
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from bika.lims.browser.bika_listing import BikaListingTable
from bika.lims.browser.worksheet.views.analyses import AnalysesView
| 41.45098 | 82 | 0.585856 |
f74df4ac592a375e715e992b4854e0bf766ac654 | 865 | py | Python | lab1_rest/project/apps/core/views.py | mratkovic/RZNU-Lab | 2930b249994619c2f17493544db2c0d471ca6cbc | [
"MIT"
] | null | null | null | lab1_rest/project/apps/core/views.py | mratkovic/RZNU-Lab | 2930b249994619c2f17493544db2c0d471ca6cbc | [
"MIT"
] | null | null | null | lab1_rest/project/apps/core/views.py | mratkovic/RZNU-Lab | 2930b249994619c2f17493544db2c0d471ca6cbc | [
"MIT"
] | null | null | null | from rest_framework import viewsets
from .models import User, Photo
from .serializers import UserSerializer, PhotoSerializer
from .mixins import RequestLogViewMixin
from rest_framework.authentication import SessionAuthentication, BasicAuthentication
from rest_framework.permissions import IsAuthenticated, IsAuthenticate... | 41.190476 | 84 | 0.834682 |
f74f0070abe0b831d8cd12d2943b6e264b00e54d | 215 | py | Python | arc/arc009/arc009b.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | 1 | 2019-08-21T00:49:34.000Z | 2019-08-21T00:49:34.000Z | arc/arc009/arc009b.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | null | null | null | arc/arc009/arc009b.py | c-yan/atcoder | 940e49d576e6a2d734288fadaf368e486480a948 | [
"MIT"
] | null | null | null |
b = input().split()
N = int(input())
a = [input() for _ in range(N)]
t = {b[i]: str(i) for i in range(10)}
a.sort(key = lambda x: conv(x))
print(*a, sep='\n')
| 19.545455 | 40 | 0.548837 |
f75197db0d5043fe351ad2be154d400c859209b0 | 965 | py | Python | setup.py | refnode/spartakiade-2021-session-effective-python | 6b1a25c4ec79261de4ed6385a81b6a31a06d6b58 | [
"Apache-2.0"
] | 1 | 2021-06-04T14:05:31.000Z | 2021-06-04T14:05:31.000Z | setup.py | refnode/spartakiade-2021-session-effective-python | 6b1a25c4ec79261de4ed6385a81b6a31a06d6b58 | [
"Apache-2.0"
] | null | null | null | setup.py | refnode/spartakiade-2021-session-effective-python | 6b1a25c4ec79261de4ed6385a81b6a31a06d6b58 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
with open("README.adoc") as fh_readme:
readme = fh_readme.read()
install_reqs = []
setup(
author="Sven Wilhelm",
author_email='refnode@gmail.com',
python_requires='>=3.8',
classifiers=[
'Developmen... | 28.382353 | 79 | 0.675648 |
f75630cbc7b1eef703d5e902537d65487d1b7612 | 4,126 | py | Python | sim/pid.py | jmagine/rf-selection | ba9dcb5ca550916873ce68baa71da983f2dd4be5 | [
"MIT"
] | 1 | 2020-05-06T01:28:06.000Z | 2020-05-06T01:28:06.000Z | sim/pid.py | jmagine/multiuav-rf | ba9dcb5ca550916873ce68baa71da983f2dd4be5 | [
"MIT"
] | null | null | null | sim/pid.py | jmagine/multiuav-rf | ba9dcb5ca550916873ce68baa71da983f2dd4be5 | [
"MIT"
] | null | null | null | '''*-----------------------------------------------------------------------*---
Author: Jason Ma
Date : Oct 18 2018
TODO
File Name : pid.py
Description: TODO
---... | 25.469136 | 127 | 0.537082 |
f756ddf67db85cf74cd46b5e90ed19ef6fd17367 | 32,091 | py | Python | gazoo_device/fire_manager.py | isabella232/gazoo-device | 0e1e276d72333e713b47152815708b9c74c45409 | [
"Apache-2.0"
] | null | null | null | gazoo_device/fire_manager.py | isabella232/gazoo-device | 0e1e276d72333e713b47152815708b9c74c45409 | [
"Apache-2.0"
] | 1 | 2021-06-24T19:20:50.000Z | 2021-06-24T19:20:50.000Z | gazoo_device/fire_manager.py | isabella232/gazoo-device | 0e1e276d72333e713b47152815708b9c74c45409 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | 38.249106 | 109 | 0.675361 |
f7583f3c89da3d4e9ea5d5c4fffa4b29559b7e57 | 4,814 | py | Python | py/desispec/scripts/humidity_corrected_fiberflat.py | echaussidon/desispec | 8a8bd59653861509dd630ffc8e1cd6c67f6cdd51 | [
"BSD-3-Clause"
] | null | null | null | py/desispec/scripts/humidity_corrected_fiberflat.py | echaussidon/desispec | 8a8bd59653861509dd630ffc8e1cd6c67f6cdd51 | [
"BSD-3-Clause"
] | null | null | null | py/desispec/scripts/humidity_corrected_fiberflat.py | echaussidon/desispec | 8a8bd59653861509dd630ffc8e1cd6c67f6cdd51 | [
"BSD-3-Clause"
] | null | null | null |
from __future__ import absolute_import, division
import os
import fitsio
import argparse
import numpy as np
from desiutil.log import get_logger
from desispec.io import read_fiberflat,write_fiberflat,findfile,read_frame
from desispec.io.fiberflat_vs_humidity import get_humidity,read_fiberflat_vs_humidity
from desisp... | 42.60177 | 162 | 0.706689 |
f759437ada91a66b6fb489d96b3bf88ad2d186f2 | 1,856 | py | Python | config.py | jfernan2/PRInspector | c09aad3b49263d3c679fd6cfd307de404425f924 | [
"MIT"
] | null | null | null | config.py | jfernan2/PRInspector | c09aad3b49263d3c679fd6cfd307de404425f924 | [
"MIT"
] | null | null | null | config.py | jfernan2/PRInspector | c09aad3b49263d3c679fd6cfd307de404425f924 | [
"MIT"
] | null | null | null | IS_TEST = True
REPOSITORY = 'cms-sw/cmssw'
CERN_SSO_CERT_FILE = 'private/cert.pem'
CERN_SSO_KEY_FILE = 'private/cert.key'
CERN_SSO_COOKIES_LOCATION = 'private/'
TWIKI_CONTACTS_URL = 'https://ppdcontacts.web.cern.ch/PPDContacts/ppd_contacts'
TWIKI_TAG_COLLECTOR_URL = 'https://twiki.cern.ch/twiki/bin/edit/CMS/DQMP5Tag... | 27.294118 | 98 | 0.581358 |
f75aab6d4d19a6e9c9dca13b0cb77061bc6e8325 | 5,748 | py | Python | trainer/ml/utils.py | Telcrome/ai-trainer | 54bca3252e194c054bdd3af2b94d6dde940a2a86 | [
"MIT"
] | 1 | 2021-05-05T12:57:42.000Z | 2021-05-05T12:57:42.000Z | trainer/ml/utils.py | Telcrome/ai-trainer | 54bca3252e194c054bdd3af2b94d6dde940a2a86 | [
"MIT"
] | null | null | null | trainer/ml/utils.py | Telcrome/ai-trainer | 54bca3252e194c054bdd3af2b94d6dde940a2a86 | [
"MIT"
] | null | null | null | from enum import Enum
from typing import Generator, Tuple, Iterable, Dict, List
import cv2
import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
from scipy.ndimage import label, generate_binary_structure
from scipy.ndimage.morphology import distance_transform_edt as dist_trans
import trainer.lib as... | 35.04878 | 117 | 0.636047 |
f75b61928d5ab139ffa7aac0fa8d2448bbd25e2c | 7,613 | py | Python | widgets/ImageDetailArea.py | JaySon-Huang/SecertPhotos | e741cc26c19a5b249d45cc70959ac6817196cb8a | [
"MIT"
] | null | null | null | widgets/ImageDetailArea.py | JaySon-Huang/SecertPhotos | e741cc26c19a5b249d45cc70959ac6817196cb8a | [
"MIT"
] | 3 | 2015-05-19T08:43:46.000Z | 2015-06-10T17:55:28.000Z | widgets/ImageDetailArea.py | JaySon-Huang/SecertPhotos | e741cc26c19a5b249d45cc70959ac6817196cb8a | [
"MIT"
] | null | null | null | from PyQt5.QtCore import Qt, pyqtSignal, QSize
from PyQt5.QtWidgets import (
QLabel, QWidget, QTreeWidgetItem, QHeaderView,
QVBoxLayout, QHBoxLayout,
)
from .ImageLabel import ImageLabel
from .AdaptiveTreeWidget import AdaptiveTreeWidget
| 38.64467 | 73 | 0.620255 |
f75bd46e6e679f347d07fe04e940962382046dd8 | 3,005 | py | Python | predict.py | zhyq/cws_lstm | 326980e0971482fc712602d3a79069e69a11c8fc | [
"Apache-2.0"
] | 7 | 2018-04-28T02:32:51.000Z | 2020-02-11T07:14:51.000Z | predict.py | zhyq/cws_lstm | 326980e0971482fc712602d3a79069e69a11c8fc | [
"Apache-2.0"
] | null | null | null | predict.py | zhyq/cws_lstm | 326980e0971482fc712602d3a79069e69a11c8fc | [
"Apache-2.0"
] | null | null | null | import argparse
import data_helper
from sklearn.model_selection import train_test_split
import re
import lstm
from lstm import *
import time
from viterbi import Viterbi
xrange = range
def simple_cut(text,dh,lm,viterbi):
"""text"""
if text:
#print("text: %s" %text)
text_len = len(text)
... | 33.388889 | 125 | 0.628619 |
f75c066d3ec31ec2f99d70612e1572ff45c4ae07 | 930 | py | Python | Regression/multiple_linear_regression.py | Rupii/Machine-Learning | 2b00698815efb04346d5cb980b68af76f27a5ca6 | [
"MIT"
] | null | null | null | Regression/multiple_linear_regression.py | Rupii/Machine-Learning | 2b00698815efb04346d5cb980b68af76f27a5ca6 | [
"MIT"
] | null | null | null | Regression/multiple_linear_regression.py | Rupii/Machine-Learning | 2b00698815efb04346d5cb980b68af76f27a5ca6 | [
"MIT"
] | 1 | 2019-09-04T05:43:31.000Z | 2019-09-04T05:43:31.000Z | # -*- coding: utf-8 -*-
"""
Created on Sat Feb 24 23:18:54 2018
@author: Rupesh
"""
# Multiple Linear Regression
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
plt.style.use("ggplot")
# loading dependies
df = pd.read_csv("50_Startups.csv")
df.head()
X = df.iloc[:, :-... | 19.787234 | 74 | 0.731183 |
f75c6aa4c0bc9e6a0583632570a241f0d5700804 | 2,945 | py | Python | 2021/day09/part01/smoke_basin.py | fpmosley/advent-of-code | 507bd89795ff6a0824284c3c8d2123cf19a932a3 | [
"MIT"
] | null | null | null | 2021/day09/part01/smoke_basin.py | fpmosley/advent-of-code | 507bd89795ff6a0824284c3c8d2123cf19a932a3 | [
"MIT"
] | null | null | null | 2021/day09/part01/smoke_basin.py | fpmosley/advent-of-code | 507bd89795ff6a0824284c3c8d2123cf19a932a3 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
'''
Advent of Code 2021 - Day 9: Smoke Basin (Part 1)
https://adventofcode.com/2021/day/9
'''
import numpy as np
if __name__ == "__main__":
main()
| 27.523364 | 94 | 0.55382 |
f75d3544ffa19cc489ce532ee8d14ab4f09c6953 | 3,830 | py | Python | datar/base/trig_hb.py | stjordanis/datar | 4e2b5db026ad35918954576badef9951928c0cb1 | [
"MIT"
] | 110 | 2021-03-09T04:10:40.000Z | 2022-03-13T10:28:20.000Z | datar/base/trig_hb.py | sthagen/datar | 1218a549e2f0547c7b5a824ca6d9adf1bf96ba46 | [
"MIT"
] | 54 | 2021-06-20T18:53:44.000Z | 2022-03-29T22:13:07.000Z | datar/base/trig_hb.py | sthagen/datar | 1218a549e2f0547c7b5a824ca6d9adf1bf96ba46 | [
"MIT"
] | 11 | 2021-06-18T03:03:14.000Z | 2022-02-25T11:48:26.000Z | """Trigonometric and Hyperbolic Functions"""
from typing import Callable
import numpy
from pipda import register_func
from ..core.contexts import Context
from ..core.types import FloatOrIter
from .constants import pi
def _register_trig_hb_func(name: str, np_name: str, doc: str) -> Callable:
"""Register trigono... | 16.228814 | 76 | 0.636031 |
f75e1e987d9f182ed96fa5d1a87db15f1d90fda6 | 1,463 | py | Python | randomised_selection.py | neerajp99/algorithms | 1d6885d2a895821ac511fa8a46913d34db2511ca | [
"MIT"
] | 1 | 2021-06-17T07:59:42.000Z | 2021-06-17T07:59:42.000Z | randomised_selection.py | neerajp99/algorithms | 1d6885d2a895821ac511fa8a46913d34db2511ca | [
"MIT"
] | null | null | null | randomised_selection.py | neerajp99/algorithms | 1d6885d2a895821ac511fa8a46913d34db2511ca | [
"MIT"
] | 1 | 2022-01-13T08:42:31.000Z | 2022-01-13T08:42:31.000Z | # Implementation of Randomised Selection
"""
Naive Approach
---------
Parameters
---------
An arry with n distinct numbers
---------
Returns
---------
i(th) order statistic, i.e: i(th) smallest element of the input array
---------
Time Complexity
---------
O(n.log... | 26.6 | 141 | 0.601504 |
f75e9b9f00f9f84646e14e8f9e1b2be7266630e1 | 365 | py | Python | fate/labeling/txt.py | Mattias1/fate | 10266406336bc4c683ff5b23af32ac3447f7f054 | [
"MIT"
] | null | null | null | fate/labeling/txt.py | Mattias1/fate | 10266406336bc4c683ff5b23af32ac3447f7f054 | [
"MIT"
] | null | null | null | fate/labeling/txt.py | Mattias1/fate | 10266406336bc4c683ff5b23af32ac3447f7f054 | [
"MIT"
] | null | null | null | import re
from .common import regex_labels, re_number, re_string
keywords = ['TODO']
re_keyword = re.compile(r'\b({})\b'.format('|'.join(keywords)))
| 22.8125 | 88 | 0.70137 |
f7603cc1049048de6e8b2c24b0acac1e2d8f0746 | 490 | py | Python | Conteudo das Aulas/146/cgi-bin/cgi4_css_2.py | cerberus707/lab-python | ebba3c9cde873d70d4bb61084f79ce30b7f9e047 | [
"Apache-2.0"
] | null | null | null | Conteudo das Aulas/146/cgi-bin/cgi4_css_2.py | cerberus707/lab-python | ebba3c9cde873d70d4bb61084f79ce30b7f9e047 | [
"Apache-2.0"
] | null | null | null | Conteudo das Aulas/146/cgi-bin/cgi4_css_2.py | cerberus707/lab-python | ebba3c9cde873d70d4bb61084f79ce30b7f9e047 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import cgitb; cgitb.enable()
print('Content-type: text/html\n')
print(
"""<html>
<head>
<title>CGI 4 - CSS</title>
<link rel="stylesheet" type="text/css" href="../css/estilo1.css">
</head>
<body>
<h1>Colocando CSS em um script a parte</h1>
<hr>
<p>Ola imagens CGI!</p>
<di... | 18.846154 | 101 | 0.604082 |
f7610420f3cae75b3b9d0169cdf9f686ba220b80 | 4,769 | py | Python | neural-navigation-with-lstm/MARCO/plastk/examples/gngsom.py | ronaldahmed/SLAM-for-ugv | 52e3241b8b737a0cfe5682c0aa87ec8c27d6a33d | [
"MIT"
] | 14 | 2016-04-03T19:25:13.000Z | 2022-01-05T07:03:07.000Z | neural-navigation-with-lstm/MARCO/plastk/examples/gngsom.py | ronaldahmed/SLAM-for-ugv | 52e3241b8b737a0cfe5682c0aa87ec8c27d6a33d | [
"MIT"
] | null | null | null | neural-navigation-with-lstm/MARCO/plastk/examples/gngsom.py | ronaldahmed/SLAM-for-ugv | 52e3241b8b737a0cfe5682c0aa87ec8c27d6a33d | [
"MIT"
] | 5 | 2018-06-21T12:58:58.000Z | 2020-02-15T05:33:39.000Z | """
GNG vs SOM comparison example for PLASTK.
This script shows how to:
- Train PLASTK vector quantizers (SOM and GNG)
- Set default parameters
- Create a simple agent and environment.
- Run an interaction between the agent and the environment
with a GUI.
$Id: gngsom.py,v 1.3 2006/02/17 19:40:09 jp Exp $
... | 29.257669 | 79 | 0.662403 |
f761849b5a4f4a9a3e0e3b79a8c5c9b1f726ae8e | 3,444 | py | Python | projects/ide/sublime/src/Bolt/api/inspect/highlighting.py | boltjs/bolt | c2666c876b34b1a61486a432eef3141ca8d1e411 | [
"BSD-3-Clause"
] | 11 | 2015-09-29T19:19:34.000Z | 2020-11-20T09:14:46.000Z | projects/ide/sublime/src/Bolt/api/inspect/highlighting.py | boltjs/bolt | c2666c876b34b1a61486a432eef3141ca8d1e411 | [
"BSD-3-Clause"
] | null | null | null | projects/ide/sublime/src/Bolt/api/inspect/highlighting.py | boltjs/bolt | c2666c876b34b1a61486a432eef3141ca8d1e411 | [
"BSD-3-Clause"
] | null | null | null | import sublime
from ui.read import settings as read_settings
from ui.write import write, highlight as write_highlight
from lookup import file_type as lookup_file_type
from ui.read import x as ui_read
from ui.read import spots as read_spots
from ui.read import regions as ui_regions
from core.read import read as core_rea... | 29.689655 | 116 | 0.654472 |
f762be92cbd4d0af01d0dd42ecc1fb37b29c7ade | 3,745 | py | Python | gratipay/models/exchange_route.py | stefb965/gratipay.com | 5f3b5922d6b3a7ff64f51574a1087bab2378cbd8 | [
"CC0-1.0"
] | null | null | null | gratipay/models/exchange_route.py | stefb965/gratipay.com | 5f3b5922d6b3a7ff64f51574a1087bab2378cbd8 | [
"CC0-1.0"
] | null | null | null | gratipay/models/exchange_route.py | stefb965/gratipay.com | 5f3b5922d6b3a7ff64f51574a1087bab2378cbd8 | [
"CC0-1.0"
] | null | null | null | from __future__ import absolute_import, division, print_function, unicode_literals
import braintree
from postgres.orm import Model
| 34.357798 | 94 | 0.594393 |
f763746331e345f22b7c5a33a4edda7eac385dea | 805 | py | Python | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/video_pipeline/forms.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 3 | 2021-12-15T04:58:18.000Z | 2022-02-06T12:15:37.000Z | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/video_pipeline/forms.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | null | null | null | Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/video_pipeline/forms.py | osoco/better-ways-of-thinking-about-software | 83e70d23c873509e22362a09a10d3510e10f6992 | [
"MIT"
] | 1 | 2019-01-02T14:38:50.000Z | 2019-01-02T14:38:50.000Z | """
Defines a form to provide validations for course-specific configuration.
"""
from django import forms
from openedx.core.djangoapps.video_config.forms import CourseSpecificFlagAdminBaseForm
from openedx.core.djangoapps.video_pipeline.models import (
CourseVideoUploadsEnabledByDefault,
VEMPipelineIntegration... | 26.833333 | 86 | 0.756522 |
f76393b04c4eca590f51e2e26126536b11d54d6f | 1,779 | py | Python | tests/integration/test_create_from_full_info.py | superannotateai/superannotate-python-sdk | e2ce848b61efed608265fa64f3781fd5a17c929b | [
"MIT"
] | 26 | 2020-09-25T06:25:06.000Z | 2022-01-30T16:44:07.000Z | tests/integration/test_create_from_full_info.py | superannotateai/superannotate-python-sdk | e2ce848b61efed608265fa64f3781fd5a17c929b | [
"MIT"
] | 12 | 2020-12-21T19:59:48.000Z | 2022-01-21T10:32:07.000Z | tests/integration/test_create_from_full_info.py | superannotateai/superannotate-python-sdk | e2ce848b61efed608265fa64f3781fd5a17c929b | [
"MIT"
] | 11 | 2020-09-17T13:39:19.000Z | 2022-03-02T18:12:29.000Z | import os
from os.path import dirname
from unittest import TestCase
import src.superannotate as sa
| 37.0625 | 109 | 0.720067 |
f7639fdfd1c81876235b0d816ccef91c2a2888bb | 903 | py | Python | spellingcorrector/utils/count.py | NazcaLines/spelling-corrector | ae315a3988e94ee46f60ff4ac7d2ee7609ebc24b | [
"MIT"
] | null | null | null | spellingcorrector/utils/count.py | NazcaLines/spelling-corrector | ae315a3988e94ee46f60ff4ac7d2ee7609ebc24b | [
"MIT"
] | null | null | null | spellingcorrector/utils/count.py | NazcaLines/spelling-corrector | ae315a3988e94ee46f60ff4ac7d2ee7609ebc24b | [
"MIT"
] | null | null | null | import os
import functools
CORPUS_DIR = str(os.getcwd())[:str(os.getcwd()).index('spellingcorrector/')] \
+ 'data/corpus.txt'
NWORD = {}
def getTrain():
"""
simple singleton implement
"""
global NWORD
if len(NWORD) == 0:
train()
return NWORD
if __name__ == "__main__... | 19.630435 | 78 | 0.572536 |
f764d5863df085c67cf462549442d82ef895d117 | 653 | py | Python | rhasspy_weather/parser/nlu_intent.py | arniebarni/rhasspy_weather | 6a9df72adad3e5dafa7962c2be37c824dc04137b | [
"MIT"
] | 5 | 2020-03-29T01:00:30.000Z | 2022-02-06T20:00:00.000Z | rhasspy_weather/parser/nlu_intent.py | arniebarni/rhasspy_weather | 6a9df72adad3e5dafa7962c2be37c824dc04137b | [
"MIT"
] | 12 | 2020-04-02T15:09:05.000Z | 2021-10-11T00:44:21.000Z | rhasspy_weather/parser/nlu_intent.py | arniebarni/rhasspy_weather | 6a9df72adad3e5dafa7962c2be37c824dc04137b | [
"MIT"
] | 5 | 2020-03-25T08:33:02.000Z | 2021-05-18T08:47:41.000Z | import logging
from rhasspy_weather.data_types.request import WeatherRequest
from rhasspy_weather.parser import rhasspy_intent
from rhasspyhermes.nlu import NluIntent
log = logging.getLogger(__name__)
def parse_intent_message(intent_message: NluIntent) -> WeatherRequest:
"""
Parses any of the rhasspy weathe... | 26.12 | 80 | 0.793262 |
f767fc179ce62571eb82287782f1d69c78d494fd | 1,028 | py | Python | 415-add-strings/add_strings.py | cnluocj/leetcode | 5b870a63ba1aab3db1e05421c91f404a9aabc489 | [
"MIT"
] | null | null | null | 415-add-strings/add_strings.py | cnluocj/leetcode | 5b870a63ba1aab3db1e05421c91f404a9aabc489 | [
"MIT"
] | null | null | null | 415-add-strings/add_strings.py | cnluocj/leetcode | 5b870a63ba1aab3db1e05421c91f404a9aabc489 | [
"MIT"
] | null | null | null | """
59.40%
"""
| 23.906977 | 73 | 0.430934 |
f769f929849f6994908fa8a9ca653f7ebe8e0e87 | 2,770 | py | Python | plugins/qdb.py | x89/raziel-irc-bot | 122a5de858a84e018549e0a7fd0be11bb33f2eb3 | [
"MIT"
] | null | null | null | plugins/qdb.py | x89/raziel-irc-bot | 122a5de858a84e018549e0a7fd0be11bb33f2eb3 | [
"MIT"
] | null | null | null | plugins/qdb.py | x89/raziel-irc-bot | 122a5de858a84e018549e0a7fd0be11bb33f2eb3 | [
"MIT"
] | null | null | null | import logging
log = logging.getLogger(__name__)
import json
import requests
import requests.exceptions
import botologist.plugin
BASE_URL = 'https://qdb.lutro.me'
| 23.277311 | 83 | 0.636462 |
f76d62143b8e1fa514207d6381b4adbf58120f1a | 2,889 | py | Python | skos/method.py | edmondchuc/voc-view | 57bd965facacc77f40f218685c88e8b858d4925c | [
"MIT"
] | 3 | 2021-07-31T16:23:26.000Z | 2022-01-24T01:28:17.000Z | skos/method.py | edmondchuc/voc-view | 57bd965facacc77f40f218685c88e8b858d4925c | [
"MIT"
] | null | null | null | skos/method.py | edmondchuc/voc-view | 57bd965facacc77f40f218685c88e8b858d4925c | [
"MIT"
] | 1 | 2019-08-07T06:02:52.000Z | 2019-08-07T06:02:52.000Z | from pyldapi.renderer import Renderer
from pyldapi.view import View
from flask import render_template, Response
from rdflib import Graph, URIRef, BNode
import skos
from skos.common_properties import CommonPropertiesMixin
from config import Config
| 40.125 | 128 | 0.602631 |
f76e35161b8285ae39943d6522c5085c519cc9cf | 22,791 | py | Python | wwt_api_client/communities.py | WorldWideTelescope/wwt_api_client | cfc42728eb2428f17e711f7527fd97150e629296 | [
"BSD-3-Clause"
] | null | null | null | wwt_api_client/communities.py | WorldWideTelescope/wwt_api_client | cfc42728eb2428f17e711f7527fd97150e629296 | [
"BSD-3-Clause"
] | 8 | 2019-04-28T17:27:44.000Z | 2020-11-05T20:24:21.000Z | wwt_api_client/communities.py | WorldWideTelescope/wwt_api_client | cfc42728eb2428f17e711f7527fd97150e629296 | [
"BSD-3-Clause"
] | 1 | 2019-04-28T17:25:06.000Z | 2019-04-28T17:25:06.000Z | # Copyright 2019-2020 the .NET Foundation
# Distributed under the terms of the revised (3-clause) BSD license.
"""Interacting with the WWT Communities APIs."""
import json
import os.path
import requests
import sys
from urllib.parse import parse_qs, urlparse
from . import APIRequest, Client, enums
__all__ = '''
Comm... | 30.966033 | 125 | 0.5833 |
f76f8e181e6635c86576107fa1d30d62af17c114 | 158 | py | Python | FictionTools/amitools/test/suite/vprintf.py | polluks/Puddle-BuildTools | c1762d53a33002b62d8cffe3db129505a387bec3 | [
"BSD-2-Clause"
] | 38 | 2021-06-18T12:56:15.000Z | 2022-03-12T20:38:40.000Z | FictionTools/amitools/test/suite/vprintf.py | polluks/Puddle-BuildTools | c1762d53a33002b62d8cffe3db129505a387bec3 | [
"BSD-2-Clause"
] | 2 | 2021-06-20T16:28:12.000Z | 2021-11-17T21:33:56.000Z | FictionTools/amitools/test/suite/vprintf.py | polluks/Puddle-BuildTools | c1762d53a33002b62d8cffe3db129505a387bec3 | [
"BSD-2-Clause"
] | 6 | 2021-06-18T18:18:36.000Z | 2021-12-22T08:01:32.000Z | import pytest
| 19.75 | 44 | 0.689873 |
f7704b3dce5cd94981cb7391a19b755c0df22b68 | 304 | py | Python | test/socket_client.py | suxb201/Socks5_DNS_Test | a1cb8b5d8d998c6a029dc0b329418ecbb9a2fc72 | [
"MIT"
] | 1 | 2020-11-09T02:08:04.000Z | 2020-11-09T02:08:04.000Z | test/socket_client.py | suxb201/Socks5_DNS_Test | a1cb8b5d8d998c6a029dc0b329418ecbb9a2fc72 | [
"MIT"
] | null | null | null | test/socket_client.py | suxb201/Socks5_DNS_Test | a1cb8b5d8d998c6a029dc0b329418ecbb9a2fc72 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import socket
HOST = '127.0.0.1' # IP
PORT = 10009 #
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
print(s)
s.connect((HOST, PORT))
s.sendall(b'Hello, world')
print(s)
data = s.recv(1024)
print('Received', repr(data))
| 19 | 60 | 0.651316 |
f770883d6109ebd548cc44852ed0b4db7874c963 | 752 | py | Python | util/statuschanger.py | MarkThe/Mark-Tools | c755d2b2e095b9f83fcbaba3ac74ec927bcddf26 | [
"MIT"
] | 1 | 2022-01-04T18:09:50.000Z | 2022-01-04T18:09:50.000Z | util/statuschanger.py | MarkThe/Mark-Tools | c755d2b2e095b9f83fcbaba3ac74ec927bcddf26 | [
"MIT"
] | null | null | null | util/statuschanger.py | MarkThe/Mark-Tools | c755d2b2e095b9f83fcbaba3ac74ec927bcddf26 | [
"MIT"
] | null | null | null | import requests
import Mark
from colorama import Fore
from util.plugins.common import print_slow, getheaders, proxy | 44.235294 | 152 | 0.676862 |
f77168d5a15a1187d94edfc593ed43416e3d8946 | 1,979 | py | Python | recipes/recipe_modules/cloudbuildhelper/test_api.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | recipes/recipe_modules/cloudbuildhelper/test_api.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | recipes/recipe_modules/cloudbuildhelper/test_api.py | allaparthi/monorail | e18645fc1b952a5a6ff5f06e0c740d75f1904473 | [
"BSD-3-Clause"
] | null | null | null | # Copyright 2019 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from hashlib import sha256
from recipe_engine import recipe_test_api
| 30.921875 | 80 | 0.632137 |
f7716d154c4129f506d04590e1524fcb8b2888bb | 7,011 | py | Python | tabbi/gmm.py | Yu-AnChen/tabbi | bf4655905d0f3fc5b7dd49a1cd12c69cb83e5bb5 | [
"MIT"
] | null | null | null | tabbi/gmm.py | Yu-AnChen/tabbi | bf4655905d0f3fc5b7dd49a1cd12c69cb83e5bb5 | [
"MIT"
] | null | null | null | tabbi/gmm.py | Yu-AnChen/tabbi | bf4655905d0f3fc5b7dd49a1cd12c69cb83e5bb5 | [
"MIT"
] | null | null | null | import sklearn.mixture
import matplotlib.pyplot as plt
import numpy as np
from matplotlib import ticker
import matplotlib.patheffects as mpatheffects
| 31.581081 | 97 | 0.601341 |
f7745a348fc7e9affea625ab9bda06298308eebf | 4,627 | py | Python | openGaussBase/testcase/SQL/DML/upsert/Opengauss_Function_DML_Upsert_Case0131.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/SQL/DML/upsert/Opengauss_Function_DML_Upsert_Case0131.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | openGaussBase/testcase/SQL/DML/upsert/Opengauss_Function_DML_Upsert_Case0131.py | opengauss-mirror/Yat | aef107a8304b94e5d99b4f1f36eb46755eb8919e | [
"MulanPSL-1.0"
] | null | null | null | """
Copyright (c) 2022 Huawei Technologies Co.,Ltd.
openGauss is licensed under Mulan PSL v2.
You can use this software according to the terms and conditions of the Mulan PSL v2.
You may obtain a copy of Mulan PSL v2 at:
http://license.coscl.org.cn/MulanPSL2
THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, W... | 39.211864 | 84 | 0.653555 |
f7746001d5f89f7418b92bab28a281a421e0564a | 6,892 | py | Python | multi_traductor.py | Jalagarto/translator | d35cde0934c4ab94204d6dfdf4e7d6c0bcd6291b | [
"Apache-2.0"
] | null | null | null | multi_traductor.py | Jalagarto/translator | d35cde0934c4ab94204d6dfdf4e7d6c0bcd6291b | [
"Apache-2.0"
] | null | null | null | multi_traductor.py | Jalagarto/translator | d35cde0934c4ab94204d6dfdf4e7d6c0bcd6291b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import tkinter as tk
from tkinter import messagebox as msg
from tkinter.ttk import Notebook
from tkinter import ttk
import tkinter.font as font
import requests
if __name__ == "__main__":
translatebook = TranslateBook()
english_tab = LanguageTab(translatebook, "Ingls", "en")
transla... | 43.075 | 130 | 0.642339 |
f775c9f689bfc087dae8bdb25d1cd48072e78520 | 1,138 | py | Python | root/settings/__init__.py | daniel-waruo/e-commerse-api | 6b080039398fb4099a34335317d649dd67783f63 | [
"Apache-2.0"
] | 6 | 2019-11-21T10:09:49.000Z | 2021-06-19T09:52:59.000Z | root/settings/__init__.py | daniel-waruo/e-commerse-api | 6b080039398fb4099a34335317d649dd67783f63 | [
"Apache-2.0"
] | null | null | null | root/settings/__init__.py | daniel-waruo/e-commerse-api | 6b080039398fb4099a34335317d649dd67783f63 | [
"Apache-2.0"
] | null | null | null | """
This is a django-split-settings main file.
For more information read this:
https://github.com/sobolevn/django-split-settings
Default environment is `development`.
To change settings file:
`DJANGO_ENV=production python manage.py runserver`
"""
import django_heroku
from split_settings.tools import include
base_set... | 30.756757 | 62 | 0.745167 |
f776be33a00e9a7a7de35e919a22d945de72c2c3 | 688 | py | Python | testapp/urls.py | danigosa/django-simple-seo | 17610e50148c6672cb34e96654df1d3515b0444f | [
"BSD-3-Clause"
] | 11 | 2015-01-02T15:44:31.000Z | 2021-07-27T06:54:35.000Z | testapp/urls.py | danigosa/django-simple-seo | 17610e50148c6672cb34e96654df1d3515b0444f | [
"BSD-3-Clause"
] | 8 | 2016-02-03T07:07:04.000Z | 2022-01-13T00:42:32.000Z | testapp/urls.py | danigosa/django-simple-seo | 17610e50148c6672cb34e96654df1d3515b0444f | [
"BSD-3-Clause"
] | 8 | 2015-02-20T13:51:51.000Z | 2021-06-24T19:11:30.000Z | from django.conf.urls import patterns, url, include
from django.contrib import admin
from django.conf import settings
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from .views import template_test
urlpatterns = patterns(
'',
url(r'^test/', template_test, name='template_test'),
url(r... | 23.724138 | 85 | 0.713663 |
f7796a989bdd258bec7902dd5290b418ab45666b | 1,645 | py | Python | continual_learning/scenarios/utils.py | jaryP/ContinualAI | 7d9b7614066d219ebd72049692da23ad6ec132b0 | [
"MIT"
] | null | null | null | continual_learning/scenarios/utils.py | jaryP/ContinualAI | 7d9b7614066d219ebd72049692da23ad6ec132b0 | [
"MIT"
] | null | null | null | continual_learning/scenarios/utils.py | jaryP/ContinualAI | 7d9b7614066d219ebd72049692da23ad6ec132b0 | [
"MIT"
] | null | null | null | from typing import Sequence, Union
import numpy as np
from scipy.ndimage.interpolation import rotate as np_rotate
from PIL.Image import Image
from torch import Tensor, tensor
from torchvision.transforms.functional import rotate
| 33.571429 | 73 | 0.612766 |
f77bd48d7ad8370a1142d05db86188aea9cfe2af | 14,355 | py | Python | d_graph.py | MohamedAl-Hussein/pyGraphs | 43346b1f25332dd7ab80cdd9656b3ed7af21d4d2 | [
"MIT"
] | null | null | null | d_graph.py | MohamedAl-Hussein/pyGraphs | 43346b1f25332dd7ab80cdd9656b3ed7af21d4d2 | [
"MIT"
] | null | null | null | d_graph.py | MohamedAl-Hussein/pyGraphs | 43346b1f25332dd7ab80cdd9656b3ed7af21d4d2 | [
"MIT"
] | null | null | null | # Course: CS261 - Data Structures
# Author: Mohamed Al-Hussein
# Assignment: 06
# Description: Directed graph implementation.
from collections import deque
import heapq
| 33.618267 | 117 | 0.585023 |
f77befa83cf2914313d51ff9e7931425c66499dd | 6,847 | py | Python | src/code_submission/2_pasanju/preprocessing/prepredict.py | NehzUx/AutoGraph-KDDCup2020 | d2fc228f4ccc5785db3129cca0445a80b6fef11d | [
"MIT"
] | 1 | 2021-12-06T14:59:55.000Z | 2021-12-06T14:59:55.000Z | src/code_submission/2_pasanju/preprocessing/prepredict.py | NehzUx/AutoGraph-Benchmark | d2fc228f4ccc5785db3129cca0445a80b6fef11d | [
"MIT"
] | null | null | null | src/code_submission/2_pasanju/preprocessing/prepredict.py | NehzUx/AutoGraph-Benchmark | d2fc228f4ccc5785db3129cca0445a80b6fef11d | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time: 2020/5/14 20:41
# @Author: Mecthew
import time
import numpy as np
import pandas as pd
import scipy
from sklearn.svm import LinearSVC
from sklearn.linear_model import logistic
from sklearn.calibration import CalibratedClassifierCV
from sklearn.metrics import ac... | 43.062893 | 117 | 0.676355 |
f77cba016c9db38a8357e9b79839c267bbbde362 | 4,754 | py | Python | disaster_data/sources/noaa_coast/spider.py | cognition-gis/cognition-disaster-data | 5441bd282d36b2d998d1d366d714d38fc5b92c8f | [
"Apache-2.0"
] | null | null | null | disaster_data/sources/noaa_coast/spider.py | cognition-gis/cognition-disaster-data | 5441bd282d36b2d998d1d366d714d38fc5b92c8f | [
"Apache-2.0"
] | 1 | 2022-03-02T14:58:21.000Z | 2022-03-02T14:58:21.000Z | disaster_data/sources/noaa_coast/spider.py | cognition-gis/cognition-disaster-data | 5441bd282d36b2d998d1d366d714d38fc5b92c8f | [
"Apache-2.0"
] | null | null | null | import os
import scrapy
from scrapy.crawler import CrawlerProcess
import requests
from disaster_data.sources.noaa_coast.utils import get_geoinfo, get_fgdcinfo
| 34.955882 | 121 | 0.446782 |
f77cc067eb5667c5dadfdaf7622c60b024ae8bc5 | 2,004 | py | Python | rlo/test/rlo/test_factory.py | tomjaguarpaw/knossos-ksc | 8fa75e67c0db8f632b135379740051cd10ff31f2 | [
"MIT"
] | 31 | 2021-09-09T16:09:55.000Z | 2022-02-20T02:15:19.000Z | rlo/test/rlo/test_factory.py | tomjaguarpaw/knossos-ksc | 8fa75e67c0db8f632b135379740051cd10ff31f2 | [
"MIT"
] | 40 | 2021-08-06T14:30:08.000Z | 2022-01-19T08:49:52.000Z | rlo/test/rlo/test_factory.py | tomjaguarpaw/knossos-ksc | 8fa75e67c0db8f632b135379740051cd10ff31f2 | [
"MIT"
] | 5 | 2021-08-06T11:20:31.000Z | 2022-01-07T19:39:40.000Z | import pytest
from rlo import factory
| 31.809524 | 68 | 0.657685 |
f77db444ca4d359ed2a89460019181e2cac7a2bd | 1,285 | py | Python | src/setup_mac.py | dittert/pyprobe | 1b0d0e403645ed204332c70c8a89e094f860023a | [
"Apache-2.0"
] | null | null | null | src/setup_mac.py | dittert/pyprobe | 1b0d0e403645ed204332c70c8a89e094f860023a | [
"Apache-2.0"
] | null | null | null | src/setup_mac.py | dittert/pyprobe | 1b0d0e403645ed204332c70c8a89e094f860023a | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Dirk Dittert
#
# 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 agree... | 27.340426 | 74 | 0.649805 |
f77db8b6066d045b501403f79c57e6ba8e7db030 | 6,432 | py | Python | src/gui/view_menu/layer_list.py | jeremiahws/DLAE | 5005d1c275279cc283c59f226732f073cf340a52 | [
"Apache-2.0"
] | 2 | 2021-05-25T12:23:23.000Z | 2021-06-20T11:40:40.000Z | src/gui/view_menu/layer_list.py | jeremiahws/DLAE | 5005d1c275279cc283c59f226732f073cf340a52 | [
"Apache-2.0"
] | null | null | null | src/gui/view_menu/layer_list.py | jeremiahws/DLAE | 5005d1c275279cc283c59f226732f073cf340a52 | [
"Apache-2.0"
] | 4 | 2019-10-16T07:52:41.000Z | 2021-11-20T17:28:25.000Z | # Copyright 2019 Jeremiah Sanders.
#
# 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... | 50.25 | 211 | 0.704291 |
f77e315e6c8b0a904e3ca8fb92860fcdc824f09d | 977 | py | Python | preprocessing.py | Prakhar-Bhartiya/SentimentAnalysis | 8fa2664a57b01e7303ef26d1226a81c0e25be4b7 | [
"MIT"
] | null | null | null | preprocessing.py | Prakhar-Bhartiya/SentimentAnalysis | 8fa2664a57b01e7303ef26d1226a81c0e25be4b7 | [
"MIT"
] | null | null | null | preprocessing.py | Prakhar-Bhartiya/SentimentAnalysis | 8fa2664a57b01e7303ef26d1226a81c0e25be4b7 | [
"MIT"
] | null | null | null | """
DATA DESCRIPTION
sentiment140 dataset. It contains 1,600,000 tweets extracted using the twitter api . The tweets have been annotated (0 = negative, 4 = positive) and they can be used to detect sentiment .
It contains the following 6 fields:
target: the polarity of the tweet (0 = negative, 2 = neutral, 4 = positi... | 32.566667 | 187 | 0.721597 |
f77f2fcfbb893554c9dac95eda0dc9991fd25b40 | 1,803 | py | Python | indico/modules/events/static/controllers.py | tobiashuste/indico | c1e6ec0c8c84745988e38c9b1768142a6feb9e0e | [
"MIT"
] | null | null | null | indico/modules/events/static/controllers.py | tobiashuste/indico | c1e6ec0c8c84745988e38c9b1768142a6feb9e0e | [
"MIT"
] | null | null | null | indico/modules/events/static/controllers.py | tobiashuste/indico | c1e6ec0c8c84745988e38c9b1768142a6feb9e0e | [
"MIT"
] | null | null | null | # This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from flask import redirect, request, session
from werkzeug.except... | 31.631579 | 104 | 0.742651 |
f77f91aa533c688d45149adae8643805965bb2c7 | 622 | py | Python | kruptos/csapp/api.py | ashwani762/Kruptos | 9cd04ee6147c2dc14764e45c3481690ae399e664 | [
"Apache-2.0"
] | null | null | null | kruptos/csapp/api.py | ashwani762/Kruptos | 9cd04ee6147c2dc14764e45c3481690ae399e664 | [
"Apache-2.0"
] | null | null | null | kruptos/csapp/api.py | ashwani762/Kruptos | 9cd04ee6147c2dc14764e45c3481690ae399e664 | [
"Apache-2.0"
] | null | null | null | from csapp.models import Kruptos
from rest_framework import viewsets, permissions
from rest_framework.response import Response
from rest_framework import status
from .serializers import KruptosSerializer
| 29.619048 | 59 | 0.726688 |
f7809285eb96f9645d677756834951e018513264 | 7,612 | py | Python | test_autolens/simulators/imaging/instrument_util.py | agarwalutkarsh554/PyAutoLens | 72d2f5c39834446e72879fd119b591e52b36cac4 | [
"MIT"
] | null | null | null | test_autolens/simulators/imaging/instrument_util.py | agarwalutkarsh554/PyAutoLens | 72d2f5c39834446e72879fd119b591e52b36cac4 | [
"MIT"
] | null | null | null | test_autolens/simulators/imaging/instrument_util.py | agarwalutkarsh554/PyAutoLens | 72d2f5c39834446e72879fd119b591e52b36cac4 | [
"MIT"
] | null | null | null | from os import path
import autolens as al
import autolens.plot as aplt
from test_autogalaxy.simulators.imaging import instrument_util
test_path = path.join("{}".format(path.dirname(path.realpath(__file__))), "..", "..")
def pixel_scale_from_instrument(instrument):
"""
Returns the pixel scale from... | 33.982143 | 110 | 0.633605 |
f78287f3fba8bcf7a557dbad608ff12faa053899 | 687 | py | Python | tests/test_gpcontrolset.py | waider/gopro-py-api | b18b5458f5bbe689f468842d6888104317786de8 | [
"MIT"
] | 1 | 2019-05-06T21:48:54.000Z | 2019-05-06T21:48:54.000Z | tests/test_gpcontrolset.py | waider/gopro-py-api | b18b5458f5bbe689f468842d6888104317786de8 | [
"MIT"
] | null | null | null | tests/test_gpcontrolset.py | waider/gopro-py-api | b18b5458f5bbe689f468842d6888104317786de8 | [
"MIT"
] | null | null | null | from .conftest import GoProCameraTest
from socket import timeout
from urllib import error
| 34.35 | 76 | 0.676856 |
f782e665db7375deff9d1e85d757a68033315dd2 | 1,727 | py | Python | ca_bc_abbotsford/people.py | djac/scrapers-ca | 2e16a85ff8a05ea49031a11ede66fa452631f8da | [
"MIT"
] | null | null | null | ca_bc_abbotsford/people.py | djac/scrapers-ca | 2e16a85ff8a05ea49031a11ede66fa452631f8da | [
"MIT"
] | null | null | null | ca_bc_abbotsford/people.py | djac/scrapers-ca | 2e16a85ff8a05ea49031a11ede66fa452631f8da | [
"MIT"
] | null | null | null | from utils import CanadianScraper, CanadianPerson as Person
COUNCIL_PAGE = 'http://www.abbotsford.ca/city_hall/mayor_and_council/city_council.htm'
CONTACT_PAGE = 'http://www.abbotsford.ca/contact_us.htm'
| 43.175 | 130 | 0.609728 |
f783069506127a9b55df9ae0fb7a072477dcbc3b | 32 | py | Python | tests/unit/cli/test_repo.py | tehlingchu/anchore-cli | b0df36337f443749991a49263227c1d40989debb | [
"Apache-2.0"
] | 110 | 2017-09-14T02:15:15.000Z | 2022-03-30T20:14:21.000Z | tests/unit/cli/test_repo.py | tehlingchu/anchore-cli | b0df36337f443749991a49263227c1d40989debb | [
"Apache-2.0"
] | 115 | 2017-09-22T12:15:30.000Z | 2022-01-17T12:31:21.000Z | tests/unit/cli/test_repo.py | tehlingchu/anchore-cli | b0df36337f443749991a49263227c1d40989debb | [
"Apache-2.0"
] | 56 | 2017-09-22T11:26:25.000Z | 2022-03-03T14:14:58.000Z | from anchorecli.cli import repo
| 16 | 31 | 0.84375 |
f7836ff545709d136c298d62a1c6e262234ad38c | 2,692 | py | Python | Python/Activies/Classroom10-1.py | FranciscoMends/Python_Codes | fd0b33443d67b56b092beeea0e778285be6a42a9 | [
"MIT"
] | null | null | null | Python/Activies/Classroom10-1.py | FranciscoMends/Python_Codes | fd0b33443d67b56b092beeea0e778285be6a42a9 | [
"MIT"
] | null | null | null | Python/Activies/Classroom10-1.py | FranciscoMends/Python_Codes | fd0b33443d67b56b092beeea0e778285be6a42a9 | [
"MIT"
] | null | null | null | '''
nome = input('Insira seu nome: ')
if nome == 'Mendes':
print('Que nome lindo voc tem!')
else:
print('Seu nome to normal!')
print('Bom dia {}!'.format(nome))
'''
#DESAFIO_28
'''
from random import randint
from time import sleep
x = randint(0,5)
y = int(input('Digite um nmero de 0 5: '))
print('Loading...')... | 24.697248 | 84 | 0.643759 |