hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 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 972 | max_issues_repo_name stringlengths 6 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 972 | max_forks_repo_name stringlengths 6 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
16ad4b335dd55de9fa7f61ccf7ea24fc5fc88293 | 23,266 | py | Python | main.py | alexandrethm/CycleGT | b7e2947f196b93b8a01cb0e560408e401a861340 | [
"BSD-3-Clause"
] | null | null | null | main.py | alexandrethm/CycleGT | b7e2947f196b93b8a01cb0e560408e401a861340 | [
"BSD-3-Clause"
] | null | null | null | main.py | alexandrethm/CycleGT | b7e2947f196b93b8a01cb0e560408e401a861340 | [
"BSD-3-Clause"
] | null | null | null | import os.path
import tqdm
import random
import yaml
import argparse
import numpy as np
import torch
import torch.nn as nn
import torch.optim
import torch.nn.functional as F
import json
from sklearn.metrics import f1_score
from collections import defaultdict
import copy
from pycocoevalcap.bleu.bleu import Bleu
from py... | 33.964964 | 95 | 0.528883 |
3ad0edaf720136ad9726ddcdf0d470774355a9a2 | 14,130 | py | Python | venv/lib/python3.7/site-packages/twilio/rest/trunking/v1/trunk/ip_access_control_list.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | 3 | 2020-12-14T03:29:02.000Z | 2020-12-24T22:04:48.000Z | venv/lib/python3.7/site-packages/twilio/rest/trunking/v1/trunk/ip_access_control_list.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | 1 | 2020-08-25T15:27:57.000Z | 2020-08-25T15:27:57.000Z | venv/lib/python3.7/site-packages/twilio/rest/trunking/v1/trunk/ip_access_control_list.py | uosorio/heroku_face | 7d6465e71dba17a15d8edaef520adb2fcd09d91e | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base... | 36.89295 | 130 | 0.657679 |
150fe406089b2d3b17170124ee89edfdc47c9ee7 | 759 | py | Python | eelbrain/plot/__init__.py | jpkulasingham/Eelbrain | 1061ce0b781a8e55ec187723b58491a5cde32e08 | [
"BSD-3-Clause"
] | null | null | null | eelbrain/plot/__init__.py | jpkulasingham/Eelbrain | 1061ce0b781a8e55ec187723b58491a5cde32e08 | [
"BSD-3-Clause"
] | null | null | null | eelbrain/plot/__init__.py | jpkulasingham/Eelbrain | 1061ce0b781a8e55ec187723b58491a5cde32e08 | [
"BSD-3-Clause"
] | null | null | null | """Plotting for data-objects"""
# Author: Christian Brodbeck <christianbrodbeck@nyu.edu>
from .._colorspaces import two_step_colormap
from ._base import reset_rc
from ._colors import (
ColorBar, ColorGrid, ColorList,
colors_for_categorial, colors_for_oneway, colors_for_twoway,
single_hue_colormap, soft_th... | 36.142857 | 114 | 0.811594 |
483a068c24aaf0243d29eef8d0517cc605322c23 | 472 | py | Python | src/envs/__init__.py | GoingMyWay/dcg | 91d05d2f39c1013c97eab3fbb2dbfd119a428fa4 | [
"Apache-2.0"
] | 56 | 2020-06-25T15:31:47.000Z | 2022-03-16T02:52:07.000Z | src/envs/__init__.py | GoingMyWay/dcg | 91d05d2f39c1013c97eab3fbb2dbfd119a428fa4 | [
"Apache-2.0"
] | 5 | 2020-07-07T13:18:16.000Z | 2022-03-12T00:39:31.000Z | src/envs/__init__.py | GoingMyWay/dcg | 91d05d2f39c1013c97eab3fbb2dbfd119a428fa4 | [
"Apache-2.0"
] | 14 | 2020-06-24T14:29:58.000Z | 2022-03-31T15:17:56.000Z | from functools import partial
from smac.env import MultiAgentEnv, StarCraft2Env
import sys
import os
def env_fn(env, **kwargs) -> MultiAgentEnv:
return env(**kwargs)
REGISTRY = {}
REGISTRY["sc2"] = partial(env_fn, env=StarCraft2Env)
if sys.platform == "linux":
os.environ.setdefault("SC2PATH",
... | 26.222222 | 79 | 0.697034 |
82df52ffe3ab242b617db9db7c3e52d0e3f93418 | 973 | py | Python | test/extra/babel_test.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | test/extra/babel_test.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | test/extra/babel_test.py | aisk/pyston | ac69cfef0621dbc8901175e84fa2b5cb5781a646 | [
"BSD-2-Clause",
"Apache-2.0"
] | null | null | null | import os, sys, subprocess
sys.path.append(os.path.dirname(__file__) + "/../lib")
from test_helper import create_virtenv, run_test
ENV_NAME = "babel_test_env_" + os.path.basename(sys.executable)
SRC_DIR = os.path.abspath(os.path.join(ENV_NAME, "src"))
PYTHON_EXE = os.path.abspath(os.path.join(ENV_NAME, "bin", "python... | 46.333333 | 107 | 0.728674 |
0e514452702de2d5180a41d9bcb17d5838246545 | 4,019 | py | Python | src/compas_rhino/conversions/mesh.py | ricardoavelino/compas | e3c7f004b8839f96bf01f9f6b21a75786c3f59fa | [
"MIT"
] | null | null | null | src/compas_rhino/conversions/mesh.py | ricardoavelino/compas | e3c7f004b8839f96bf01f9f6b21a75786c3f59fa | [
"MIT"
] | null | null | null | src/compas_rhino/conversions/mesh.py | ricardoavelino/compas | e3c7f004b8839f96bf01f9f6b21a75786c3f59fa | [
"MIT"
] | null | null | null | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import Rhino
from compas.datastructures import Mesh
from ._geometry import RhinoGeometry
class RhinoMesh(RhinoGeometry):
"""Wrapper for Rhino meshes."""
@property
def vertices(self):
if... | 27.909722 | 135 | 0.566061 |
b43ed049504ba8c44c7c05da7e24aff07a1e3055 | 5,144 | py | Python | issue_tracker/github_issues.py | davclark/github-bead | ed19664f7b15c7087562ed3e5588aa95fe6d61f6 | [
"0BSD"
] | null | null | null | issue_tracker/github_issues.py | davclark/github-bead | ed19664f7b15c7087562ed3e5588aa95fe6d61f6 | [
"0BSD"
] | 1 | 2015-05-04T23:02:06.000Z | 2015-05-04T23:02:06.000Z | issue_tracker/github_issues.py | glass-bead-labs/github-bead | ed19664f7b15c7087562ed3e5588aa95fe6d61f6 | [
"0BSD"
] | null | null | null | import requests
import json
import time
from datetime import date
OWNER = 'glass-bead-labs'
REPO = 'sensor-group'
parameters = {'state': 'all', 'per_page': 100}
# request is a list filled with dictionaries that represent each issue
# listed in the order seen on github repo
request = requests.get('https://api.github... | 27.956522 | 88 | 0.628888 |
b55521a0c1c076fbbded7bc04a425ba6e5c128d2 | 309 | py | Python | misago/misago/socialauth/admin/forms/twitter.py | vascoalramos/misago-deployment | 20226072138403108046c0afad9d99eb4163cedc | [
"MIT"
] | 2 | 2021-03-06T21:06:13.000Z | 2021-03-09T15:05:12.000Z | misago/misago/socialauth/admin/forms/twitter.py | vascoalramos/misago-deployment | 20226072138403108046c0afad9d99eb4163cedc | [
"MIT"
] | null | null | null | misago/misago/socialauth/admin/forms/twitter.py | vascoalramos/misago-deployment | 20226072138403108046c0afad9d99eb4163cedc | [
"MIT"
] | null | null | null | from django import forms
from django.utils.translation import gettext_lazy as _
from .base import OAuthProviderForm
class TwitterForm(OAuthProviderForm):
key = forms.CharField(label=_("Consumer API key"), required=False)
secret = forms.CharField(label=_("Consumer API secret key"), required=False)
| 30.9 | 80 | 0.779935 |
e2d47f384808053eda9499e0e0ef747f4e5ab177 | 14,957 | py | Python | pysnmp/entity/rfc3413/cmdrsp.py | edgsousa/pysnmp | 39f8b0b2839a27f45c6e153ec80d336f4ab2055b | [
"BSD-2-Clause"
] | null | null | null | pysnmp/entity/rfc3413/cmdrsp.py | edgsousa/pysnmp | 39f8b0b2839a27f45c6e153ec80d336f4ab2055b | [
"BSD-2-Clause"
] | null | null | null | pysnmp/entity/rfc3413/cmdrsp.py | edgsousa/pysnmp | 39f8b0b2839a27f45c6e153ec80d336f4ab2055b | [
"BSD-2-Clause"
] | null | null | null | #
# This file is part of pysnmp software.
#
# Copyright (c) 2005-2018, Ilya Etingof <etingof@gmail.com>
# License: http://snmplabs.com/pysnmp/license.html
#
import sys
from pysnmp.proto import rfc1902, rfc1905, rfc3411, errind, error
from pysnmp.proto.api import v2c # backend is always SMIv2 compliant
from pysnmp.prot... | 36.659314 | 119 | 0.616567 |
a976d88a8cebab18bcabb646bde1d583abb50540 | 1,140 | py | Python | covid_challenge/utils/cloud_artifacts_hook.py | ImmoNathanael/covid19-challenge | 86abe53ddd4be051a2a282492e23df4e59778193 | [
"MIT"
] | 2 | 2020-07-24T00:45:10.000Z | 2020-09-10T19:58:14.000Z | covid_challenge/utils/cloud_artifacts_hook.py | ImmoNathanael/covid19-challenge | 86abe53ddd4be051a2a282492e23df4e59778193 | [
"MIT"
] | 3 | 2020-09-14T10:23:00.000Z | 2020-09-16T21:36:49.000Z | covid_challenge/utils/cloud_artifacts_hook.py | ImmoNathanael/covid19-challenge | 86abe53ddd4be051a2a282492e23df4e59778193 | [
"MIT"
] | 3 | 2020-08-18T19:47:14.000Z | 2020-10-01T18:59:51.000Z | import shutil
import os
import tempfile
import boto3
from pydispatch import dispatcher
from eisen import EISEN_END_EPOCH_EVENT
from covid_challenge import put_file_on_s3
class SaveCloudArtifactsHook:
def __init__(self, workflow_id, phase, artifacts_dir, s3_save_object, aws_id=None, aws_secret=None,):
dis... | 29.230769 | 105 | 0.707018 |
c585d9e015c382630e63602460d7b131fd22fb16 | 6,100 | py | Python | django_server/application_evaluator_config/settings.py | ForumViriumHelsinki/ApplicationEvaluator | c40f22203160ccc4047b16f0f30278bab3a0d224 | [
"MIT"
] | null | null | null | django_server/application_evaluator_config/settings.py | ForumViriumHelsinki/ApplicationEvaluator | c40f22203160ccc4047b16f0f30278bab3a0d224 | [
"MIT"
] | null | null | null | django_server/application_evaluator_config/settings.py | ForumViriumHelsinki/ApplicationEvaluator | c40f22203160ccc4047b16f0f30278bab3a0d224 | [
"MIT"
] | null | null | null | """
Django settings for FVH Application Evaluator project.
Generated by 'django-admin startproject' using Django 3.0.
For more information on this file, see
https://docs.djangoproject.com/en/3.0/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/3.0/ref/settings/
"... | 29.468599 | 95 | 0.683279 |
93921c60e56aae6f8c3687fd12282a573c830630 | 3,507 | py | Python | alipay/aop/api/domain/ItemDeliveryDetail.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/ItemDeliveryDetail.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | alipay/aop/api/domain/ItemDeliveryDetail.py | articuly/alipay-sdk-python-all | 0259cd28eca0f219b97dac7f41c2458441d5e7a6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import simplejson as json
from alipay.aop.api.constant.ParamConstants import *
class ItemDeliveryDetail(object):
def __init__(self):
self._amount = None
self._assign_item_id = None
self._batch_no = None
self._logistic_code = None
... | 30.232759 | 79 | 0.599658 |
1cc73ed500e441f2380558ec5b676c051c3761a9 | 809 | py | Python | tests/integration_tests/resources/dsl/plugin_tests/plugins/mock-plugin/mock_plugin/__init__.py | TS-at-WS/cloudify-manager | 3e062e8dec16c89d2ab180d0b761cbf76d3f7ddc | [
"Apache-2.0"
] | 124 | 2015-01-22T22:28:37.000Z | 2022-02-26T23:12:06.000Z | tests/integration_tests/resources/dsl/plugin_tests/plugins/mock-plugin/mock_plugin/__init__.py | TS-at-WS/cloudify-manager | 3e062e8dec16c89d2ab180d0b761cbf76d3f7ddc | [
"Apache-2.0"
] | 345 | 2015-01-08T15:49:40.000Z | 2022-03-29T08:33:00.000Z | tests/integration_tests/resources/dsl/plugin_tests/plugins/mock-plugin/mock_plugin/__init__.py | TS-at-WS/cloudify-manager | 3e062e8dec16c89d2ab180d0b761cbf76d3f7ddc | [
"Apache-2.0"
] | 77 | 2015-01-07T14:04:35.000Z | 2022-03-07T22:46:00.000Z | # ***************************************************************************
# * Copyright (c) 2016 GigaSpaces Technologies Ltd. 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 ... | 50.5625 | 79 | 0.583436 |
7cf8fbc60dce565df80997c7ce8fb4a31a14cb75 | 3,593 | py | Python | scroll_test/tests/test_scrollable.py | wwakabobik/python_test | 05de0aab170d5a22dd17d53eb0faded006c210e0 | [
"BSD-2-Clause"
] | null | null | null | scroll_test/tests/test_scrollable.py | wwakabobik/python_test | 05de0aab170d5a22dd17d53eb0faded006c210e0 | [
"BSD-2-Clause"
] | null | null | null | scroll_test/tests/test_scrollable.py | wwakabobik/python_test | 05de0aab170d5a22dd17d53eb0faded006c210e0 | [
"BSD-2-Clause"
] | null | null | null | from os import getcwd
from time import sleep
import pytest
DELAY = 5 # delay to be human-friendly
""" TEST DATA """
elements_under_test = (
{'id': 'Vertical scroll', 'result': True, 'page': 'element_with_vertical_scroll.html'},
{'id': 'Horizontal scroll', 'result': True, 'page': 'element_with_hori... | 34.883495 | 110 | 0.70526 |
b7c94933a39974650a0574bcb8eb12896ce6c736 | 4,644 | py | Python | homeassistant/components/sytadin/sensor.py | kayr7/home-assistant | 5994f82fc5d73822bd0516d7fb340c8a293105e0 | [
"Apache-2.0"
] | 3 | 2020-01-21T18:09:09.000Z | 2022-01-17T08:06:03.000Z | homeassistant/components/sytadin/sensor.py | kayr7/home-assistant | 5994f82fc5d73822bd0516d7fb340c8a293105e0 | [
"Apache-2.0"
] | 39 | 2016-12-16T12:40:34.000Z | 2017-02-13T17:53:42.000Z | homeassistant/components/sytadin/sensor.py | kayr7/home-assistant | 5994f82fc5d73822bd0516d7fb340c8a293105e0 | [
"Apache-2.0"
] | 3 | 2020-01-11T15:44:13.000Z | 2022-01-17T08:06:09.000Z | """Support for Sytadin Traffic, French Traffic Supervision."""
import logging
import re
from datetime import timedelta
import requests
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
LENGTH_... | 30.552632 | 92 | 0.656761 |
47a5def7517a66147447fd139bf18f3eda994bb1 | 1,438 | py | Python | src/front-door/azext_front_door/vendored_sdks/models/check_name_availability_input_py3.py | mayank88mahajan/azure-cli-extensions | 8bd389a1877bffd14052bec5519ce75dc6fc34cf | [
"MIT"
] | 1 | 2019-05-10T19:58:09.000Z | 2019-05-10T19:58:09.000Z | src/front-door/azext_front_door/vendored_sdks/models/check_name_availability_input_py3.py | mayank88mahajan/azure-cli-extensions | 8bd389a1877bffd14052bec5519ce75dc6fc34cf | [
"MIT"
] | 2 | 2019-10-02T23:37:38.000Z | 2020-10-02T01:17:31.000Z | src/front-door/azext_front_door/vendored_sdks/models/check_name_availability_input_py3.py | mayank88mahajan/azure-cli-extensions | 8bd389a1877bffd14052bec5519ce75dc6fc34cf | [
"MIT"
] | 1 | 2019-06-17T22:18:23.000Z | 2019-06-17T22:18:23.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | 34.238095 | 76 | 0.602921 |
d6050ddeedc6f5885aec564a692c1d9e4660bb15 | 14,431 | py | Python | tests/test_packages/test_skills/test_confirmation_aw3/test_handlers.py | bryanchriswhite/agents-aea | d3f177a963eb855d9528555167255bf2b478f4ba | [
"Apache-2.0"
] | 126 | 2019-09-07T09:32:44.000Z | 2022-03-29T14:28:41.000Z | tests/test_packages/test_skills/test_confirmation_aw3/test_handlers.py | salman6049/agents-aea | d3f177a963eb855d9528555167255bf2b478f4ba | [
"Apache-2.0"
] | 1,814 | 2019-08-24T10:08:07.000Z | 2022-03-31T14:28:36.000Z | tests/test_packages/test_skills/test_confirmation_aw3/test_handlers.py | salman6049/agents-aea | d3f177a963eb855d9528555167255bf2b478f4ba | [
"Apache-2.0"
] | 46 | 2019-09-03T22:13:58.000Z | 2022-03-22T01:25:16.000Z | # -*- coding: utf-8 -*-
# ------------------------------------------------------------------------------
#
# Copyright 2018-2019 Fetch.AI Limited
#
# 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 ... | 35.632099 | 166 | 0.617906 |
25e60e36c53a1efec4fc5807335e81aff4f07869 | 103 | py | Python | medInformation/apps.py | MyMedicalAssistant/MyMedicalAssistant | e03758109167cef13efed7ee1d450dbd18a1fed7 | [
"MIT"
] | null | null | null | medInformation/apps.py | MyMedicalAssistant/MyMedicalAssistant | e03758109167cef13efed7ee1d450dbd18a1fed7 | [
"MIT"
] | 1 | 2020-08-05T22:58:28.000Z | 2020-08-05T22:58:28.000Z | medInformation/apps.py | MyMedicalAssistant/MyMedicalAssistant | e03758109167cef13efed7ee1d450dbd18a1fed7 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class MedinformationConfig(AppConfig):
name = 'medInformation'
| 17.166667 | 38 | 0.786408 |
e8e51880b96bbe21d6c2ab0fb6970c0fc7ee16c4 | 3,025 | py | Python | src/view/utils.py | VMoM/Tertris | aefd7927c5362ca85376f92870a2c49b5d00c2bb | [
"MIT"
] | 3 | 2020-10-30T09:10:20.000Z | 2020-11-01T11:26:29.000Z | src/view/utils.py | VMoM/Tertris | aefd7927c5362ca85376f92870a2c49b5d00c2bb | [
"MIT"
] | null | null | null | src/view/utils.py | VMoM/Tertris | aefd7927c5362ca85376f92870a2c49b5d00c2bb | [
"MIT"
] | null | null | null | """
File that contains various utils for the views
"""
import curses
import locale
import common.tetromino_type as m_tetromino_type
import view.color_pair as m_color_pair
def setup_curses() -> None:
"""
Setup curses to we can correctly use it
"""
locale.setlocale(locale.LC_ALL, "")
curses.curs_s... | 42.013889 | 104 | 0.766942 |
8cb1570fe895332d9eea835ee9c988901e29693b | 99,016 | py | Python | nova/network/manager.py | zaina/nova | 181358c172d606b23c9cc14b58d677d911013c02 | [
"Apache-2.0"
] | null | null | null | nova/network/manager.py | zaina/nova | 181358c172d606b23c9cc14b58d677d911013c02 | [
"Apache-2.0"
] | null | null | null | nova/network/manager.py | zaina/nova | 181358c172d606b23c9cc14b58d677d911013c02 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you... | 44.64202 | 89 | 0.576513 |
97bee5e46b15fdf29696d1b070649fff9646612c | 3,344 | py | Python | sympy/physics/units/definitions/__init__.py | giorgosgiapis/sympy | 6128b47aa008657715ce5c70b7c3fdd6bd3f1648 | [
"BSD-3-Clause"
] | 445 | 2019-01-26T13:50:26.000Z | 2022-03-18T05:17:38.000Z | Library/lib/python3.7/site-packages/sympy/physics/units/definitions/__init__.py | gengyong/Carnets | 8930a14f69360d4db115a85ff9e0f6efa80fa2e7 | [
"BSD-3-Clause"
] | 242 | 2019-01-29T15:48:27.000Z | 2022-03-31T22:09:21.000Z | Library/lib/python3.7/site-packages/sympy/physics/units/definitions/__init__.py | gengyong/Carnets | 8930a14f69360d4db115a85ff9e0f6efa80fa2e7 | [
"BSD-3-Clause"
] | 31 | 2019-03-10T09:51:27.000Z | 2022-02-14T23:11:12.000Z | from .unit_definitions import (
percent, percents,
permille,
rad, radian, radians,
deg, degree, degrees,
sr, steradian, steradians,
mil, angular_mil, angular_mils,
m, meter, meters,
kg, kilogram, kilograms,
s, second, seconds,
A, ampere, amperes,
K, kelvin, kelvins,
mol, ... | 25.723077 | 65 | 0.674342 |
2c5ee2ee9995368c2bcf83df01e38893e9c72374 | 7,808 | py | Python | application/MainWindows/CustomerPageWindow.py | StavromularBeta/Cannabase | adb840f8e398e9671d66dd9e4c680f75015cc3a9 | [
"MIT"
] | 1 | 2021-10-18T08:12:13.000Z | 2021-10-18T08:12:13.000Z | application/MainWindows/CustomerPageWindow.py | StavromularBeta/Cannabase | adb840f8e398e9671d66dd9e4c680f75015cc3a9 | [
"MIT"
] | null | null | null | application/MainWindows/CustomerPageWindow.py | StavromularBeta/Cannabase | adb840f8e398e9671d66dd9e4c680f75015cc3a9 | [
"MIT"
] | null | null | null | import tkinter as Tk
import os, sys, inspect
# below 3 lines add the parent directory to the path, so that SQL_functions can be found.
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
parentdir = os.path.dirname(parentdir)
sys.path.insert(0, ... | 51.03268 | 126 | 0.530482 |
132eae4e1f15d129914203bb1bfc8fdb4ba042ca | 9,048 | py | Python | travis_test/travis_settings.py | sunguotao/DjangoMysqlBlog | 136a21007475a302a62341ac6b9ab3fbb1bfafb9 | [
"MIT"
] | null | null | null | travis_test/travis_settings.py | sunguotao/DjangoMysqlBlog | 136a21007475a302a62341ac6b9ab3fbb1bfafb9 | [
"MIT"
] | 11 | 2020-02-11T23:51:47.000Z | 2022-03-11T23:17:21.000Z | travis_test/travis_settings.py | sunguotao/DjangoMysqlBlog | 136a21007475a302a62341ac6b9ab3fbb1bfafb9 | [
"MIT"
] | null | null | null | """
Django settings for DjangoBlog project.
Generated by 'django-admin startproject' using Django 1.10.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import ... | 28.186916 | 116 | 0.653957 |
776d9e78964ebdd3559c69d6d6b451e183c0427b | 8,085 | py | Python | thonny/config.py | shreyas202/thonny | ef894c359200b0591cf98451907243395b817c63 | [
"MIT"
] | null | null | null | thonny/config.py | shreyas202/thonny | ef894c359200b0591cf98451907243395b817c63 | [
"MIT"
] | null | null | null | thonny/config.py | shreyas202/thonny | ef894c359200b0591cf98451907243395b817c63 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import ast
import configparser
import datetime
import os.path
import sys
import tkinter as tk
import traceback
from configparser import ConfigParser
from logging import exception
from thonny import THONNY_USER_DIR
_manager_cache = {}
def try_load_configuration(filename):
if filename in ... | 36.75 | 144 | 0.588868 |
c10326d4eab1fa388d87f73acec3c3c9935cd20f | 1,640 | py | Python | raccoon_annotation.py | WMSaj13/keras-yolo3 | 6a11164677a2ed52f37cc58a5473b8d8ec8ec3df | [
"MIT"
] | 27 | 2018-10-21T20:37:55.000Z | 2021-03-08T13:30:40.000Z | raccoon_annotation.py | HONUBIN/CosmeticDetectionYolo3-version1- | 1cd877741e54ebe29d60282cd3ec1d37d357bb8d | [
"MIT"
] | 7 | 2018-12-02T06:49:12.000Z | 2019-11-23T17:08:50.000Z | raccoon_annotation.py | HONUBIN/CosmeticDetectionYolo3-version1- | 1cd877741e54ebe29d60282cd3ec1d37d357bb8d | [
"MIT"
] | 17 | 2018-11-27T21:18:48.000Z | 2022-03-29T03:34:18.000Z | import xml.etree.ElementTree as ET
from os import getcwd
import random
sets=[('raccoon_train'), ('raccoon_test')]
classes = ["raccoon"]
def convert_annotation(image_id, list_file):
in_file = open('Raccoon_dataset/annotations/raccoon-%s.xml'%(image_id))
tree=ET.parse(in_file)
root = tree.getroot()
... | 30.37037 | 136 | 0.643293 |
39a31befb0600c4b1c3adf585e50b3ce02cb5467 | 6,170 | py | Python | seating_charts/lib.py | rectory-school/rectory-apps | 184021529ac9cadc3b7c0fbf93a023c82fc76b91 | [
"MIT"
] | null | null | null | seating_charts/lib.py | rectory-school/rectory-apps | 184021529ac9cadc3b7c0fbf93a023c82fc76b91 | [
"MIT"
] | 5 | 2020-06-05T17:33:12.000Z | 2021-06-10T19:04:41.000Z | seating_charts/lib.py | rectory-school/rectory-apps | 184021529ac9cadc3b7c0fbf93a023c82fc76b91 | [
"MIT"
] | 1 | 2016-02-08T15:53:28.000Z | 2016-02-08T15:53:28.000Z | from random import choice, random, sample
import time
from seating_charts import models
class GeneratorError(Exception):
def __init__(self, s):
super(GeneratorError, self).__init__()
self.s = s
def __str__(self):
return "Table generation exception: %s" % self.s
class Table(object):
... | 29.951456 | 235 | 0.617828 |
c319446a8a977b6438d8de20383eb967a61aac34 | 135 | py | Python | apps/main/views.py | taras1k/django_template_api | e555153a36d28626f103bb73a3ed9880c045de30 | [
"MIT"
] | null | null | null | apps/main/views.py | taras1k/django_template_api | e555153a36d28626f103bb73a3ed9880c045de30 | [
"MIT"
] | null | null | null | apps/main/views.py | taras1k/django_template_api | e555153a36d28626f103bb73a3ed9880c045de30 | [
"MIT"
] | null | null | null | from django.shortcuts import render
def index_page(request):
context = {}
return render(request, 'main/index.html', context)
| 19.285714 | 54 | 0.718519 |
57ad691337fc6be9b00f0da3ab0adeafc11a4408 | 222 | py | Python | examples/bruteforce.py | abailie3/TravelingIntelligence | 33f77fbfecf5d7fc34dbb3db7230f4e14d4a9469 | [
"MIT"
] | 1 | 2018-03-14T11:28:32.000Z | 2018-03-14T11:28:32.000Z | examples/bruteforce.py | abailie3/TravelingIntelligence | 33f77fbfecf5d7fc34dbb3db7230f4e14d4a9469 | [
"MIT"
] | 1 | 2018-01-28T17:29:33.000Z | 2018-01-28T17:29:33.000Z | examples/bruteforce.py | abailie3/TravelingIntelligence | 33f77fbfecf5d7fc34dbb3db7230f4e14d4a9469 | [
"MIT"
] | null | null | null | from travelingintelligence.bruteforcemethod import BruteForce
from travelingintelligence.tsproblem import TSProblem
from travelingintelligence.tsvisualizer import ProblemVisualizer
# TODO: Add bruteforce method demo here. | 44.4 | 64 | 0.887387 |
2081d598e1ab843e2af3222a63c24ca534b87eb9 | 14,318 | py | Python | travelling/migrations/0002_auto_20181127_2105.py | HerbyDE/jagdreisencheck-webapp | 9af5deda2423b787da88a0c893f3c474d8e4f73f | [
"BSD-3-Clause"
] | null | null | null | travelling/migrations/0002_auto_20181127_2105.py | HerbyDE/jagdreisencheck-webapp | 9af5deda2423b787da88a0c893f3c474d8e4f73f | [
"BSD-3-Clause"
] | null | null | null | travelling/migrations/0002_auto_20181127_2105.py | HerbyDE/jagdreisencheck-webapp | 9af5deda2423b787da88a0c893f3c474d8e4f73f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2018-11-27 20:05
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import djmoney.models.fields
class Migration(migrations.Migration):
dependencies = [
('travelling', '0001_initial'),... | 172.506024 | 5,124 | 0.585836 |
1e1cea12e9ce13ca2d3cc5c33e5b9f10a42caf2f | 7,124 | py | Python | dataProcessing/utils.py | WdBlink/Brats_State_of_the_art_models | f002b612b32229895d4c070df0ab5f09b9b78ce6 | [
"MIT"
] | null | null | null | dataProcessing/utils.py | WdBlink/Brats_State_of_the_art_models | f002b612b32229895d4c070df0ab5f09b9b78ce6 | [
"MIT"
] | null | null | null | dataProcessing/utils.py | WdBlink/Brats_State_of_the_art_models | f002b612b32229895d4c070df0ab5f09b9b78ce6 | [
"MIT"
] | null | null | null | # Authors:
# Christian F. Baumgartner (c.f.baumgartner@gmail.com)
# Lisa M. Koch (lisa.margret.koch@gmail.com)
# Source: https://git.ee.ethz.ch/baumgach/discriminative_learning_toolbox/blob/master/utils.py
import nibabel as nib
import numpy as np
import os
import logging
from unet3d.utils import get_logger
from skimag... | 28.158103 | 131 | 0.654127 |
b26b39ac3792144683b4ae637fcb49a7e2ac2a22 | 17,402 | py | Python | lte/gateway/python/magma/pipelined/app/uplink_bridge.py | srinivas-47/magma | 4524fd31df7eaf12187836e3b3da1dceb79700de | [
"BSD-3-Clause"
] | 1 | 2021-08-08T15:49:05.000Z | 2021-08-08T15:49:05.000Z | lte/gateway/python/magma/pipelined/app/uplink_bridge.py | lisa761/magma | bdf87faaf37eb733e76d407eeffa608192285ca0 | [
"BSD-3-Clause"
] | 143 | 2020-09-08T06:24:23.000Z | 2022-03-29T05:56:53.000Z | lte/gateway/python/magma/pipelined/app/uplink_bridge.py | shanku9/magma_docu | 65465c9bb37aa3c9f4796e609010220c068b86d6 | [
"BSD-3-Clause"
] | 1 | 2020-11-05T15:14:23.000Z | 2020-11-05T15:14:23.000Z | """
Copyright 2020 The Magma Authors.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES O... | 43.614035 | 112 | 0.603896 |
34c42fd3d6d447f1401b763d1fc64e0e8f041b3e | 9,258 | py | Python | quex/input/files/core.py | Liby99/quex | 45f3d21d5df3307376e175cca2d8473e26cb5622 | [
"MIT"
] | null | null | null | quex/input/files/core.py | Liby99/quex | 45f3d21d5df3307376e175cca2d8473e26cb5622 | [
"MIT"
] | 1 | 2022-01-31T18:08:44.000Z | 2022-01-31T18:08:44.000Z | quex/input/files/core.py | raccoonmonk/quex | 20ffe451df9fd49bdc216ce45b8263fa228670e5 | [
"MIT"
] | null | null | null | # Project Quex (http://quex.sourceforge.net); License: MIT;
# (C) 2005-2020 Frank-Rene Schaefer;
import quex.engine.misc.error as error
from quex.engine.misc.file_operations import open_file_or_die
from quex.engine.misc.file_in import EndOfStreamException, \
... | 44.724638 | 112 | 0.597861 |
538b41392fe4066841934872571ad510bfe0d03a | 3,815 | py | Python | examples/07-nsem/plot_fwd_nsem_MTTipper3D.py | JKutt/simpeg | a0d9cf88e4551bfbfda3792521f4c85724686103 | [
"MIT"
] | null | null | null | examples/07-nsem/plot_fwd_nsem_MTTipper3D.py | JKutt/simpeg | a0d9cf88e4551bfbfda3792521f4c85724686103 | [
"MIT"
] | null | null | null | examples/07-nsem/plot_fwd_nsem_MTTipper3D.py | JKutt/simpeg | a0d9cf88e4551bfbfda3792521f4c85724686103 | [
"MIT"
] | null | null | null | """
MT: 3D: Forward
===============
Forward model 3D MT data.
Test script to use SimPEG.NSEM platform to forward model
impedance and tipper synthetic data.
"""
import discretize
from SimPEG.electromagnetics import natural_source as NSEM
from SimPEG import utils
import numpy as np
import matplotlib.pyplot as plt
try... | 30.277778 | 88 | 0.586107 |
8ecf84f6b69f86e94a3a7109e48e74157af48409 | 31,889 | py | Python | tests/test_features.py | phargogh/rasterio | 443ab27841fffb24bc54a3ec31470453a8381fca | [
"BSD-3-Clause"
] | null | null | null | tests/test_features.py | phargogh/rasterio | 443ab27841fffb24bc54a3ec31470453a8381fca | [
"BSD-3-Clause"
] | null | null | null | tests/test_features.py | phargogh/rasterio | 443ab27841fffb24bc54a3ec31470453a8381fca | [
"BSD-3-Clause"
] | 1 | 2021-11-05T10:57:36.000Z | 2021-11-05T10:57:36.000Z | from copy import deepcopy
import logging
import sys
import numpy as np
import pytest
from affine import Affine
import rasterio
from rasterio.enums import MergeAlg
from rasterio.errors import WindowError, RasterioDeprecationWarning
from rasterio.features import (
bounds, geometry_mask, geometry_window, is_valid_ge... | 29.747201 | 80 | 0.643639 |
eb31c17fab77b99762458e55dbf958a9edc724e0 | 6,996 | py | Python | smartva/data_prep.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 4 | 2019-01-23T12:57:47.000Z | 2020-04-18T17:13:08.000Z | smartva/data_prep.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 4 | 2019-01-09T22:10:07.000Z | 2022-02-16T04:57:06.000Z | smartva/data_prep.py | rileyhazard/SmartVA-Analyze-1 | 0573eeff27d03f54e7506db4f1631c0cd9f54bbb | [
"MIT"
] | 11 | 2018-12-11T22:01:13.000Z | 2022-01-07T11:38:02.000Z | import abc
import csv
import os
from smartva.loggers import warning_logger
from smartva.utils.conversion_utils import ConversionError, safe_float, get_cell
from smartva.utils import LdapNotationParser, intermediate_dir_path
class AbortException(Exception):
pass
class Prep(object):
__metaclass__ = abc.ABCMe... | 35.51269 | 113 | 0.58462 |
ee5305d46ce41fdbdd3f7b9a92b83495757299e5 | 12,936 | py | Python | plot_scripts/cloud_diff_plot.py | idunnam/Thesis | a567a25aa037c949de285158804a6ee396fc0e6c | [
"MIT"
] | null | null | null | plot_scripts/cloud_diff_plot.py | idunnam/Thesis | a567a25aa037c949de285158804a6ee396fc0e6c | [
"MIT"
] | 1 | 2022-01-28T13:12:26.000Z | 2022-01-28T13:12:26.000Z | plot_scripts/cloud_diff_plot.py | idunnam/Thesis | a567a25aa037c949de285158804a6ee396fc0e6c | [
"MIT"
] | null | null | null | import xarray as xr
from function_diff_plot import diff_plot
"""
#CMIP5 models
ACCESS = xr.open_dataset('/projects/NS9600K/idunnam/src/1_deg_anomalies/ACCESS_1_deg_anomalies.nc')
#HADGEM = xr.open_dataset('/projects/NS9600K/idunnam/src/1_deg_anomalies/HADGEM_1_deg_anomalies.nc')
HADGEM_cloud = xr.open_dataset('/project... | 36.337079 | 143 | 0.688234 |
571d3f8d79865885feed09e45afc6e5ac85e3c32 | 8,403 | py | Python | example_player.py | chenqh19/game | 0438eb1d2125d99adc734fb95922eed7ec6d2959 | [
"X11"
] | null | null | null | example_player.py | chenqh19/game | 0438eb1d2125d99adc734fb95922eed7ec6d2959 | [
"X11"
] | null | null | null | example_player.py | chenqh19/game | 0438eb1d2125d99adc734fb95922eed7ec6d2959 | [
"X11"
] | null | null | null | import sys
import socket
import random
import calculation
import treys
def eprint(*args, **kwargs):
print(*args, file=sys.stderr, **kwargs)
class GameState:
def __init__(self, match_string):
if match_string[:11] != "MATCHSTATE:":
raise AssertionError("ERROR: message must starts with 'MAT... | 35.0125 | 93 | 0.52517 |
60600e2dd1eecf80dd1797cb1e9e94fa13a934cf | 574 | py | Python | S3-Background.py | mcvenkat/Python-Programs | 2ff66bbd5b07c8e093b11360e1dcac06740a5024 | [
"CC0-1.0",
"MIT"
] | null | null | null | S3-Background.py | mcvenkat/Python-Programs | 2ff66bbd5b07c8e093b11360e1dcac06740a5024 | [
"CC0-1.0",
"MIT"
] | 5 | 2020-05-22T14:10:02.000Z | 2022-03-25T19:13:05.000Z | S3-Background.py | mcvenkat/Python-Programs | 2ff66bbd5b07c8e093b11360e1dcac06740a5024 | [
"CC0-1.0",
"MIT"
] | null | null | null | #Plotting flower species
#Importing libraries
from bokeh.plotting import figure
from bokeh.io import output_file, show
from bokeh.sampledata.iris import flowers
#Define the output file path
output_file("iris.html")
#Create the figure object
f=figure()
#Style the plot area
f.plot_width=1100
f.plot_hei... | 22.076923 | 63 | 0.752613 |
1b5d5bfd20aca9d24b51a87f61d587ff21ea72f6 | 2,576 | py | Python | examples/tuflowgisandbcfiles.py | duncan-r/SHIP | 2c4c22c77f9c18ea545d3bce70a36aebbd18256a | [
"MIT"
] | 6 | 2016-04-10T17:32:44.000Z | 2022-03-13T18:41:21.000Z | examples/tuflowgisandbcfiles.py | duncan-r/SHIP | 2c4c22c77f9c18ea545d3bce70a36aebbd18256a | [
"MIT"
] | 19 | 2017-06-23T08:21:53.000Z | 2017-07-26T08:23:03.000Z | examples/tuflowgisandbcfiles.py | duncan-r/SHIP | 2c4c22c77f9c18ea545d3bce70a36aebbd18256a | [
"MIT"
] | 6 | 2016-10-26T16:04:38.000Z | 2019-04-25T23:55:06.000Z | """
Summary:
Example use of the tuflow package to identify all of the gis files
and boundary condition database files referenced by a tuflow model.
Author:
Duncan Runnacles
Created:
01 Apr 2016
Copyright:
Duncan Runnacles 2016
TODO:
Updates:... | 31.036145 | 88 | 0.64868 |
6330b0cfdab5daf1eda2882c3b3eeb8afd6dff70 | 3,163 | py | Python | Lib/fnmatch.py | inging44/python3 | fcd8d9d2ee54b46b757ecf34f284b4e60a43097a | [
"bzip2-1.0.6"
] | 1,872 | 2015-01-02T18:56:47.000Z | 2022-03-31T07:34:39.000Z | Lib/fnmatch.py | inging44/python3 | fcd8d9d2ee54b46b757ecf34f284b4e60a43097a | [
"bzip2-1.0.6"
] | 675 | 2015-02-27T09:01:01.000Z | 2022-03-31T14:03:25.000Z | Lib/fnmatch.py | inging44/python3 | fcd8d9d2ee54b46b757ecf34f284b4e60a43097a | [
"bzip2-1.0.6"
] | 278 | 2015-01-02T03:48:20.000Z | 2022-03-29T20:40:44.000Z | """Filename matching with shell patterns.
fnmatch(FILENAME, PATTERN) matches according to the local convention.
fnmatchcase(FILENAME, PATTERN) always takes case in account.
The functions operate by translating the pattern into a regular
expression. They cache the compiled regular expressions for speed.
The function... | 28.754545 | 69 | 0.560544 |
f1db94354da3487700d18515f119f16fe08140fd | 663 | py | Python | runs/1000KB/src2-tgt1/par-nobro-iter09000.cfg.py | janpawellek/broeval | 57e31aa6e354d0bba88103b44910483e8d982d00 | [
"MIT"
] | null | null | null | runs/1000KB/src2-tgt1/par-nobro-iter09000.cfg.py | janpawellek/broeval | 57e31aa6e354d0bba88103b44910483e8d982d00 | [
"MIT"
] | null | null | null | runs/1000KB/src2-tgt1/par-nobro-iter09000.cfg.py | janpawellek/broeval | 57e31aa6e354d0bba88103b44910483e8d982d00 | [
"MIT"
] | null | null | null |
# Write results to this file
OUTFILE = 'runs/1000KB/src2-tgt1/par-nobro-iter09000.result.csv'
# Source computers for the requests
SOURCE = ['10.0.0.1', '10.0.0.3']
# Should Bro be enabled on the source machines?
SOURCE_BRO = [False, False]
# Target machines for the requests (aka server)
TARGET = ['10.0.0.2']
# Sho... | 22.862069 | 68 | 0.719457 |
a4c762057fe213c5b01a09f6012d6c91d640a727 | 409 | py | Python | backend/ck_cleaner_28834/wsgi.py | crowdbotics-apps/ck-cleaner-28834 | 14e1d30e6872477da9d7a369ce9e444e546af33b | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/ck_cleaner_28834/wsgi.py | crowdbotics-apps/ck-cleaner-28834 | 14e1d30e6872477da9d7a369ce9e444e546af33b | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | backend/ck_cleaner_28834/wsgi.py | crowdbotics-apps/ck-cleaner-28834 | 14e1d30e6872477da9d7a369ce9e444e546af33b | [
"FTL",
"AML",
"RSA-MD"
] | null | null | null | """
WSGI config for ck_cleaner_28834 project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJA... | 24.058824 | 78 | 0.794621 |
eea186e5c5438fe2bc04c32d1698c407f86f8407 | 396 | py | Python | Straight Quotes/Straight Quotes.py | TheKrush/SublimeText3Package-StraightQuotes | d7eb60b69b1c002d92711e48d9b6793818fd5507 | [
"MIT"
] | null | null | null | Straight Quotes/Straight Quotes.py | TheKrush/SublimeText3Package-StraightQuotes | d7eb60b69b1c002d92711e48d9b6793818fd5507 | [
"MIT"
] | null | null | null | Straight Quotes/Straight Quotes.py | TheKrush/SublimeText3Package-StraightQuotes | d7eb60b69b1c002d92711e48d9b6793818fd5507 | [
"MIT"
] | null | null | null | import sublime, sublime_plugin
class StraightQuotesCommand(sublime_plugin.TextCommand):
def run(self, edit):
for rgn in self.view.find_all("[“”]"):
self.view.replace(edit, rgn, "\"")
for rgn in self.view.find_all("[‘’]"):
self.view.replace(edit, rgn, "\'")
for rg... | 39.6 | 56 | 0.580808 |
7ae3be7c537531ec3c1bc7a0736414ca95ebb987 | 2,128 | py | Python | teleavon/events/messagedeleted.py | GramaBell/Teleavon | 8377399f726dc8cee76accb303b26be669fe3a0a | [
"MIT"
] | null | null | null | teleavon/events/messagedeleted.py | GramaBell/Teleavon | 8377399f726dc8cee76accb303b26be669fe3a0a | [
"MIT"
] | null | null | null | teleavon/events/messagedeleted.py | GramaBell/Teleavon | 8377399f726dc8cee76accb303b26be669fe3a0a | [
"MIT"
] | null | null | null | from .common import EventBuilder, EventCommon, name_inner_event
from ..tl import types
@name_inner_event
class MessageDeleted(EventBuilder):
"""
Occurs whenever a message is deleted. Note that this event isn't 100%
reliable, since Telegram doesn't always notify the clients that a message
was deleted.
... | 36.689655 | 77 | 0.631579 |
28b8eee3b6ab247fbbb1b7b5a5634d59c0d6f386 | 11,369 | py | Python | sympy/calculus/singularities.py | shilpiprd/sympy | 556e9c61b31d0d5f101cd56b43e843fbf3bcf121 | [
"BSD-3-Clause"
] | 8,323 | 2015-01-02T15:51:43.000Z | 2022-03-31T13:13:19.000Z | sympy/calculus/singularities.py | shilpiprd/sympy | 556e9c61b31d0d5f101cd56b43e843fbf3bcf121 | [
"BSD-3-Clause"
] | 15,102 | 2015-01-01T01:33:17.000Z | 2022-03-31T22:53:13.000Z | sympy/calculus/singularities.py | shilpiprd/sympy | 556e9c61b31d0d5f101cd56b43e843fbf3bcf121 | [
"BSD-3-Clause"
] | 4,490 | 2015-01-01T17:48:07.000Z | 2022-03-31T17:24:05.000Z | """
Singularities
=============
This module implements algorithms for finding singularities for a function
and identifying types of functions.
The differential calculus methods in this module include methods to identify
the following function types in the given ``Interval``:
- Increasing
- Strictly Increasing
- Decre... | 29.377261 | 84 | 0.62257 |
ca4103bd656f66ff9db4b30a69006e152b97d738 | 12,897 | py | Python | gs_quant/risk/core.py | TopherD1992/gs-quant | 253ed75519abbbe407e17e39ca5ed7340fa010dc | [
"Apache-2.0"
] | 1 | 2021-01-06T06:25:40.000Z | 2021-01-06T06:25:40.000Z | gs_quant/risk/core.py | TopherD1992/gs-quant | 253ed75519abbbe407e17e39ca5ed7340fa010dc | [
"Apache-2.0"
] | null | null | null | gs_quant/risk/core.py | TopherD1992/gs-quant | 253ed75519abbbe407e17e39ca5ed7340fa010dc | [
"Apache-2.0"
] | null | null | null | """
Copyright 2019 Goldman Sachs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing,
software di... | 31.610294 | 119 | 0.640924 |
c5214e0b3455594b7c9b00e627732a7c1b4cb420 | 367 | py | Python | resource/templates/simple/agent/skills.py | lawRossi/Broca | 7dcb4e1cb7087c4bd38ad01e73eb1fdab4c6d13d | [
"MIT"
] | 3 | 2021-05-10T06:36:21.000Z | 2021-05-10T06:47:31.000Z | resource/templates/simple/agent/skills.py | lawRossi/Broca | 7dcb4e1cb7087c4bd38ad01e73eb1fdab4c6d13d | [
"MIT"
] | null | null | null | resource/templates/simple/agent/skills.py | lawRossi/Broca | 7dcb4e1cb7087c4bd38ad01e73eb1fdab4c6d13d | [
"MIT"
] | null | null | null | from Broca.task_engine.skill import Skill
class HelpSkill(Skill):
def __init__(self):
super().__init__()
self.name = "help_skill"
self.trigger_intent = "help"
self.intent_patterns = []
def _perform(self, tracker):
help_message = ""
self.utter(help_m... | 24.466667 | 52 | 0.59673 |
b6c34bc53b138ebd04cc906c42c0280bda5cdbbf | 863 | py | Python | docsrc/defs/md/PyTorch/o8-dna150-conv8w-fc8.py | gifford-lab/seqgra | 3c7547878ecda4c00572746b8a07e0d614c9dbef | [
"MIT"
] | null | null | null | docsrc/defs/md/PyTorch/o8-dna150-conv8w-fc8.py | gifford-lab/seqgra | 3c7547878ecda4c00572746b8a07e0d614c9dbef | [
"MIT"
] | null | null | null | docsrc/defs/md/PyTorch/o8-dna150-conv8w-fc8.py | gifford-lab/seqgra | 3c7547878ecda4c00572746b8a07e0d614c9dbef | [
"MIT"
] | 2 | 2021-06-14T20:27:40.000Z | 2021-06-14T20:29:29.000Z | import math
import torch
class TorchModel(torch.nn.Module):
def __init__(self):
super().__init__()
INPUT_CHANNELS: int = 4
INPUT_WIDTH: int = 150
CONV_NUM_FILTERS: int = 8
CONV_FILTER_WIDTH: int = 21
FC_NUM_UNITS: int = 8
OUTPUT_UNITS: int = 8
... | 27.83871 | 74 | 0.530707 |
b0c9bd35b4fd1c18eb0340e71d2a5fe843379e85 | 15,309 | py | Python | Cogs/BotAdmin.py | camielverdult/CorpBot.py | 56cf3ee736625525d05f9f447b31e34baf93596d | [
"MIT"
] | null | null | null | Cogs/BotAdmin.py | camielverdult/CorpBot.py | 56cf3ee736625525d05f9f447b31e34baf93596d | [
"MIT"
] | null | null | null | Cogs/BotAdmin.py | camielverdult/CorpBot.py | 56cf3ee736625525d05f9f447b31e34baf93596d | [
"MIT"
] | null | null | null | import asyncio
import discord
import re
import random
from operator import itemgetter
from discord.ext import commands
from Cogs import Utils, DisplayName, Message, PickList
def setup(bot):
# Add the bot and deps
settings = bot.get_cog("Settings")
bot.add_cog(BotAdmin(bot, settings))
clas... | 47.104615 | 210 | 0.573845 |
d20fd8994b12d893fc193584185ba134794eee22 | 7,697 | py | Python | src/cowrie/output/tiot.py | Phype/cowrie | 83f98a35e3f6e8f52fe3046f84e5da65da1093d0 | [
"BSD-3-Clause"
] | 3 | 2019-04-02T09:41:03.000Z | 2021-08-31T10:56:52.000Z | src/cowrie/output/tiot.py | Phype/cowrie | 83f98a35e3f6e8f52fe3046f84e5da65da1093d0 | [
"BSD-3-Clause"
] | null | null | null | src/cowrie/output/tiot.py | Phype/cowrie | 83f98a35e3f6e8f52fe3046f84e5da65da1093d0 | [
"BSD-3-Clause"
] | null | null | null | """
Output plugin for tiot
See: https://github.com/Phype/telnet-iot-honeypot
"""
from __future__ import absolute_import, division
import json
import logging
from twisted.internet import endpoints, reactor, ssl
from twisted.python import log
import cowrie.core.output
from cowrie.core.config import CONFIG
import req... | 30.184314 | 110 | 0.488632 |
9a21a1d0af4bcfe8cea10960465776d0188cfab8 | 482 | py | Python | dashboard/cli.py | shridarpatil/Flask-RestApi | 49aeb09bbee166d726effd713eec1f5495e25d95 | [
"MIT"
] | 2 | 2017-09-18T09:27:55.000Z | 2021-09-20T19:27:56.000Z | dashboard/cli.py | shridarpatil/Flask-RestApi | 49aeb09bbee166d726effd713eec1f5495e25d95 | [
"MIT"
] | 105 | 2017-09-07T03:13:16.000Z | 2021-11-15T17:47:19.000Z | dashboard/cli.py | shridarpatil/Flask-RestApi | 49aeb09bbee166d726effd713eec1f5495e25d95 | [
"MIT"
] | null | null | null | #!/bin/python
# -*- coding: utf-8 -*-
import json
import RestApiz
from flask import Flask, send_file, jsonify
app = Flask(__name__)
@app.route("/admin")
def admin():
return send_file("/home/RestApi/dashboard/public/index.html")
@app.errorhandler(404)
def page_not_found(e):
return jsonify({"error":'404.ht... | 17.214286 | 65 | 0.670124 |
da367c016dee690df8494218acd3179c49f6a194 | 22,404 | py | Python | py_wake/tests/test_deficit_models/test_deficit_models.py | hmharley/PyWake | ab2979d353b9b9e7a0b2b0314e51ed568fcfee56 | [
"MIT"
] | null | null | null | py_wake/tests/test_deficit_models/test_deficit_models.py | hmharley/PyWake | ab2979d353b9b9e7a0b2b0314e51ed568fcfee56 | [
"MIT"
] | null | null | null | py_wake/tests/test_deficit_models/test_deficit_models.py | hmharley/PyWake | ab2979d353b9b9e7a0b2b0314e51ed568fcfee56 | [
"MIT"
] | null | null | null | import pytest
import matplotlib.pyplot as plt
import numpy as np
from py_wake.deficit_models.deficit_model import DeficitModel, WakeDeficitModel, BlockageDeficitModel
from py_wake.deficit_models.fuga import FugaDeficit, Fuga
from py_wake.deficit_models.gaussian import BastankhahGaussianDeficit, IEA37SimpleBastankhahGa... | 50.120805 | 118 | 0.607392 |
143567fa93b874e018b7a01a075689df8b3464ac | 1,014 | bzl | Python | third_party/pypa/sphinxcontrib_jsmath/workspace.bzl | stuarteberg/tensorstore | 2c22a3c9f798b0fbf023031633c58cc7c644235d | [
"Apache-2.0"
] | null | null | null | third_party/pypa/sphinxcontrib_jsmath/workspace.bzl | stuarteberg/tensorstore | 2c22a3c9f798b0fbf023031633c58cc7c644235d | [
"Apache-2.0"
] | null | null | null | third_party/pypa/sphinxcontrib_jsmath/workspace.bzl | stuarteberg/tensorstore | 2c22a3c9f798b0fbf023031633c58cc7c644235d | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 The TensorStore Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 34.965517 | 85 | 0.725838 |
7ee6eae01e7bb9ebf77bd29b05ae1ebe5fa6a8d9 | 695 | py | Python | splunk_otel/environment_variables.py | dsmlaimaestro/splunk-otel-python | 6903279b64a1dc1b04b5f6873cf317e56da45641 | [
"ECL-2.0",
"Apache-2.0"
] | 30 | 2020-10-19T18:34:02.000Z | 2021-11-16T03:29:48.000Z | splunk_otel/environment_variables.py | dsmlaimaestro/splunk-otel-python | 6903279b64a1dc1b04b5f6873cf317e56da45641 | [
"ECL-2.0",
"Apache-2.0"
] | 134 | 2020-10-20T16:46:19.000Z | 2022-03-29T14:48:35.000Z | splunk_otel/environment_variables.py | dsmlaimaestro/splunk-otel-python | 6903279b64a1dc1b04b5f6873cf317e56da45641 | [
"ECL-2.0",
"Apache-2.0"
] | 10 | 2020-10-21T02:38:36.000Z | 2022-03-01T14:57:04.000Z | # Copyright Splunk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | 40.882353 | 78 | 0.785612 |
8c0afe576a2be3d9a99cdc29988eb06baea7362a | 2,341 | py | Python | sidekick-experimental/sidekick/experimental/contrib/builtins.py | fabiommendes/sidekick | 993ae7b8496347ad9720d3ff11e10ab946c3a800 | [
"MIT"
] | 32 | 2017-08-10T09:42:51.000Z | 2022-03-18T17:21:26.000Z | sidekick-experimental/sidekick/experimental/contrib/builtins.py | fabiommendes/sidekick | 993ae7b8496347ad9720d3ff11e10ab946c3a800 | [
"MIT"
] | 1 | 2019-04-10T13:07:45.000Z | 2019-04-18T02:27:47.000Z | sidekick-experimental/sidekick/experimental/contrib/builtins.py | fabiommendes/sidekick | 993ae7b8496347ad9720d3ff11e10ab946c3a800 | [
"MIT"
] | 5 | 2017-10-10T13:43:23.000Z | 2019-06-18T00:09:15.000Z | """
A builtins replacement. Should it be included in sidekick.api?
"""
import builtins as _builtins
from functools import wraps as _wraps
from sidekick.functions import fn
_execute_with = lambda **kwargs: lambda f: f(**kwargs) or f
_flipped = lambda f: _wraps(f)(lambda x, y: f(y, x))
_getattr = getattr
_dir = dir
#... | 23.178218 | 88 | 0.603588 |
ca46b341c80a18d4828c0231b7488a50c2666630 | 23,760 | py | Python | tensorflow_federated/python/core/impl/computation/function_utils.py | vanshhhhh/federated | 20fdca66d01051c55413868310d60c068c84b35d | [
"Apache-2.0"
] | 1,918 | 2019-02-22T21:17:28.000Z | 2022-03-30T14:49:53.000Z | tensorflow_federated/python/core/impl/computation/function_utils.py | vanshhhhh/federated | 20fdca66d01051c55413868310d60c068c84b35d | [
"Apache-2.0"
] | 999 | 2019-02-22T21:47:44.000Z | 2022-03-31T11:06:42.000Z | tensorflow_federated/python/core/impl/computation/function_utils.py | vanshhhhh/federated | 20fdca66d01051c55413868310d60c068c84b35d | [
"Apache-2.0"
] | 498 | 2019-02-22T21:17:56.000Z | 2022-03-29T02:54:15.000Z | # Copyright 2018, The TensorFlow Federated Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | 41.538462 | 91 | 0.71149 |
ddb88ada1120d72a06a238e1415ee9e35a209de8 | 455 | py | Python | gym_pcgrl/__init__.py | SnDehghani/pcgrl_d_m | f065f0f1f9aac96a93bb64df9c6fe225ae84e685 | [
"MIT"
] | 78 | 2020-01-25T18:52:31.000Z | 2022-03-21T14:44:15.000Z | gym_pcgrl/__init__.py | ShirinDehghani/pcgrl_d_m | f065f0f1f9aac96a93bb64df9c6fe225ae84e685 | [
"MIT"
] | 4 | 2020-03-26T13:48:15.000Z | 2022-03-31T18:42:53.000Z | gym_pcgrl/__init__.py | ShirinDehghani/pcgrl_d_m | f065f0f1f9aac96a93bb64df9c6fe225ae84e685 | [
"MIT"
] | 21 | 2020-03-29T03:11:10.000Z | 2022-03-31T19:40:32.000Z | from gym.envs.registration import register
from gym_pcgrl.envs.probs import PROBLEMS
from gym_pcgrl.envs.reps import REPRESENTATIONS
# Register all the problems with every different representation for the OpenAI GYM
for prob in PROBLEMS.keys():
for rep in REPRESENTATIONS.keys():
register(
id='{... | 35 | 82 | 0.679121 |
82b9941f6465629badeae06234a57395ceb28d83 | 686 | py | Python | api/manage.py | d68fbe50/docker-tutorial | e6d0940a7977648ba9da7b8338d8d009e2f14732 | [
"MIT"
] | 1,166 | 2017-10-14T16:11:05.000Z | 2022-03-30T08:39:41.000Z | api/manage.py | d68fbe50/docker-tutorial | e6d0940a7977648ba9da7b8338d8d009e2f14732 | [
"MIT"
] | 13 | 2017-10-18T13:49:26.000Z | 2021-10-09T08:52:15.000Z | api/manage.py | d68fbe50/docker-tutorial | e6d0940a7977648ba9da7b8338d8d009e2f14732 | [
"MIT"
] | 280 | 2017-10-14T17:47:27.000Z | 2022-03-31T01:49:13.000Z | #!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
"""Run administrative tasks."""
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_rest_framework_tutorial.settings')
try:
from django.core.management import execute_from_comma... | 29.826087 | 94 | 0.689504 |
913b3b136d852dee9672717386445abaad6a0056 | 10,112 | py | Python | SSLTester/SSLTester.py | De117/scanner | 077009970ed28b663c22a1abed93d687856546ef | [
"MIT"
] | null | null | null | SSLTester/SSLTester.py | De117/scanner | 077009970ed28b663c22a1abed93d687856546ef | [
"MIT"
] | 9 | 2016-07-15T15:27:39.000Z | 2018-01-15T01:51:50.000Z | SSLTester/SSLTester.py | De117/scanner | 077009970ed28b663c22a1abed93d687856546ef | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
import ssl
import socket
import time
import datetime
import threading
import asn1crypto.x509
import requests
from .manual import *
DETECT_CIPHERS = True
DEFAULT_TIMEOUT = 5.0
def make_ssocket(protocol, ciphers=ssl._DEFAULT_CIPHERS):
"""Creates a TCP socket ... | 32.514469 | 103 | 0.571994 |
cb01ea6f150ece6baaadff38d42c052089e28239 | 5,684 | py | Python | highway-env/highway_env/vehicle/objects.py | DinisMoreira/Dissert | d59a810992a32a0e033a58204afbbc386958dd32 | [
"MIT"
] | null | null | null | highway-env/highway_env/vehicle/objects.py | DinisMoreira/Dissert | d59a810992a32a0e033a58204afbbc386958dd32 | [
"MIT"
] | null | null | null | highway-env/highway_env/vehicle/objects.py | DinisMoreira/Dissert | d59a810992a32a0e033a58204afbbc386958dd32 | [
"MIT"
] | 2 | 2021-09-21T14:53:34.000Z | 2022-01-04T09:39:37.000Z | from abc import ABC
from typing import Sequence, Tuple, TYPE_CHECKING
import numpy as np
if TYPE_CHECKING:
from highway_env.road.lane import AbstractLane
from highway_env.road.road import Road
LaneIndex = Tuple[str, str, int]
class RoadObject(ABC):
"""
Common interface for objects that appear on th... | 34.871166 | 120 | 0.597467 |
7f7d342ba1381a3858f7d31063d056bae87207fc | 20,804 | py | Python | example/sockeye/source/sockeye/rnn.py | rah9eu/p3 | 530628be7b7a8dd3e6199c3bebebdbf104005e5f | [
"Apache-2.0"
] | 22 | 2019-02-20T12:42:20.000Z | 2021-12-25T06:09:46.000Z | example/sockeye/source/sockeye/rnn.py | rah9eu/p3 | 530628be7b7a8dd3e6199c3bebebdbf104005e5f | [
"Apache-2.0"
] | 4 | 2019-04-01T07:36:04.000Z | 2022-03-24T03:11:26.000Z | example/sockeye/source/sockeye/rnn.py | rah9eu/p3 | 530628be7b7a8dd3e6199c3bebebdbf104005e5f | [
"Apache-2.0"
] | 7 | 2019-03-20T16:04:37.000Z | 2021-04-28T18:40:11.000Z | # Copyright 2017 Amazon.com, Inc. or its affiliates. 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. A copy of the License
# is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file acc... | 50.372881 | 120 | 0.558595 |
adfa5fb530a91a6faae7514a9a0c284856b547bb | 13,853 | py | Python | python_pubsub/libkn/timeoutsocket.py | kragen/mod_pubsub | 9abcdb07b02b7979bf4538ac8047783100ecb7bc | [
"BSD-3-Clause-Clear"
] | 1 | 2021-04-05T14:53:29.000Z | 2021-04-05T14:53:29.000Z | python_pubsub/libkn/timeoutsocket.py | kragen/mod_pubsub | 9abcdb07b02b7979bf4538ac8047783100ecb7bc | [
"BSD-3-Clause-Clear"
] | null | null | null | python_pubsub/libkn/timeoutsocket.py | kragen/mod_pubsub | 9abcdb07b02b7979bf4538ac8047783100ecb7bc | [
"BSD-3-Clause-Clear"
] | 1 | 2021-04-05T14:53:41.000Z | 2021-04-05T14:53:41.000Z | ####
# Copyright 2000,2001 by Timothy O'Malley <timo@alum.mit.edu>
#
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software
# and its documentation for any purpose and without fee is hereby
# granted, provided that the above copyright notice appear in all
# copies and t... | 31.130337 | 76 | 0.631127 |
30814d3f9dbea86388bff41acc9175c41c65f857 | 959 | py | Python | auth-api/migrations/versions/cd89e8e61dec_sp_gp_corp_types.py | ozamani9/sbc-auth | c478451074fd8876201e40527b5889045c74e2f4 | [
"Apache-2.0"
] | null | null | null | auth-api/migrations/versions/cd89e8e61dec_sp_gp_corp_types.py | ozamani9/sbc-auth | c478451074fd8876201e40527b5889045c74e2f4 | [
"Apache-2.0"
] | null | null | null | auth-api/migrations/versions/cd89e8e61dec_sp_gp_corp_types.py | ozamani9/sbc-auth | c478451074fd8876201e40527b5889045c74e2f4 | [
"Apache-2.0"
] | null | null | null | """SP&GP corp types
Revision ID: cd89e8e61dec
Revises: 8770c44d3d66
Create Date: 2022-03-03 21:25:30.741161
"""
from alembic import op
from sqlalchemy import Boolean, String
from sqlalchemy.sql import column, table
# revision identifiers, used by Alembic.
revision = 'cd89e8e61dec'
down_revision = '8770c44d3d66'
bran... | 25.918919 | 83 | 0.595412 |
9dd68332a9c5defc8996db9a3fffda5c4ad52288 | 399 | py | Python | pygame/bgx/bgc.py | shilpasayura/python | 8f3b2432f972c9aeb4b04e2141ea4abf2437762c | [
"MIT"
] | 1 | 2021-10-07T15:15:01.000Z | 2021-10-07T15:15:01.000Z | pygame/bgx/bgc.py | shilpasayura/python | 8f3b2432f972c9aeb4b04e2141ea4abf2437762c | [
"MIT"
] | null | null | null | pygame/bgx/bgc.py | shilpasayura/python | 8f3b2432f972c9aeb4b04e2141ea4abf2437762c | [
"MIT"
] | null | null | null | import pygame
pygame.init()
window_width=700
window_height=400
size = (window_width, window_height)
screen = pygame.display.set_mode(size)
background_images=["bg0.jpg", "bg1.jpg", "bg2.jpg", "bg3.jpg"]
bgx=[]
for i in range(4):
bg="bg"+str(i)+ ".jpg"
bgx.append(pygame.image.load("bg0.jpg").convert())
#b... | 18.136364 | 65 | 0.686717 |
53760fc2cedd8cb7ca65ee1efcef537f8369131a | 3,570 | py | Python | common.py | eevans/git-jira-attacher | 36a2be5b328024b85fb42bb67e3c1876d2ab09ff | [
"MIT"
] | 1 | 2016-05-09T11:52:08.000Z | 2016-05-09T11:52:08.000Z | common.py | eevans/git-jira-attacher | 36a2be5b328024b85fb42bb67e3c1876d2ab09ff | [
"MIT"
] | null | null | null | common.py | eevans/git-jira-attacher | 36a2be5b328024b85fb42bb67e3c1876d2ab09ff | [
"MIT"
] | null | null | null | from urllib2 import urlopen
from datetime import datetime
from os.path import join, expanduser, exists
import re, SOAPpy, getpass
USER_CONFIG = join(expanduser('~'), '.git-jira-tools')
class JiraAttachment(object):
fields = ('filename', 'filesize', 'mimetype', 'author', 'created', 'id')
default_base_url ... | 35 | 80 | 0.605882 |
513e61f85bd65c18da626015b01f9d82fe80d30b | 1,084 | py | Python | Weighted_DAG_Link_Prediction/TestModel.py | avlasic2/graph_analytics | e040fef12057e9ba0dfb3db088c006b76da59513 | [
"MIT"
] | null | null | null | Weighted_DAG_Link_Prediction/TestModel.py | avlasic2/graph_analytics | e040fef12057e9ba0dfb3db088c006b76da59513 | [
"MIT"
] | null | null | null | Weighted_DAG_Link_Prediction/TestModel.py | avlasic2/graph_analytics | e040fef12057e9ba0dfb3db088c006b76da59513 | [
"MIT"
] | null | null | null | import pandas as pd
from DataPreparation import ParseData
from model import EmbedClass
rawData = pd.read_csv('soc-sign-bitcoinalpha.csv.gz', compression='gzip', header=None)
columns = ['source','target','weight','time']
rawData.columns = columns
# add a value to ensure all weights are strictly positive
maxValue = 2*... | 29.297297 | 96 | 0.744465 |
4101be48b0e9b3d2bd3b09450419a65978b7b643 | 939 | py | Python | Ex056 - Analisando os Dados.py | MarcusMendes81/Python | 4af6653da324604930d24542a84a530348029d39 | [
"Apache-2.0"
] | null | null | null | Ex056 - Analisando os Dados.py | MarcusMendes81/Python | 4af6653da324604930d24542a84a530348029d39 | [
"Apache-2.0"
] | null | null | null | Ex056 - Analisando os Dados.py | MarcusMendes81/Python | 4af6653da324604930d24542a84a530348029d39 | [
"Apache-2.0"
] | null | null | null | cont_genero = 0
soma_idade = 0
media_idade = 0
maior_idade = 0
nome_atual = ''
for i in range(1, 5):
print('-'*5, '{}ª pessoa'.format(i), '-'*5)
nome = str(input('Insira o nome de uma pessoa: ')).strip().upper()
idade = int(input('Insira a idade: '))
genero = str(input('Qual o gênero? M / F\n')... | 34.777778 | 107 | 0.57295 |
6c7854c8e72cb7adb8cbb0c7f38f11009d5e4f4b | 688 | py | Python | 2019-03-25/anagram.py | asthajn6/archive | 975fc4cf8acb9b0c9dc971f8b31f8905edf6031f | [
"Unlicense"
] | 2 | 2018-10-16T03:17:53.000Z | 2018-10-16T17:49:10.000Z | 2019-03-25/anagram.py | asthajn6/archive | 975fc4cf8acb9b0c9dc971f8b31f8905edf6031f | [
"Unlicense"
] | null | null | null | 2019-03-25/anagram.py | asthajn6/archive | 975fc4cf8acb9b0c9dc971f8b31f8905edf6031f | [
"Unlicense"
] | null | null | null | from collections import defaultdict
def anagram(s, t):
'''Determine if ``s`` is an anagram of ``t``.
Arguments:
s (Sequence): The first sequence.
t (Sequence): The second sequence.
Returns:
bool:
True when ``s`` and ``t`` are anagrams of each other.
'''
# Count... | 26.461538 | 65 | 0.600291 |
7082a7ce1188cfe50b4d51298d15916a5faf6a0b | 4,269 | py | Python | get_together/views/teams.py | whitni/GetTogether | 5b0104ea98e048f368fa830e917210b30143e2b7 | [
"BSD-2-Clause"
] | 1 | 2018-01-31T03:36:57.000Z | 2018-01-31T03:36:57.000Z | get_together/views/teams.py | whitni/GetTogether | 5b0104ea98e048f368fa830e917210b30143e2b7 | [
"BSD-2-Clause"
] | null | null | null | get_together/views/teams.py | whitni/GetTogether | 5b0104ea98e048f368fa830e917210b30143e2b7 | [
"BSD-2-Clause"
] | null | null | null | from django.utils.translation import ugettext_lazy as _
from django.contrib import messages
from django.contrib.auth import logout as logout_user
from django.shortcuts import render, redirect
from django.http import HttpResponse, JsonResponse
from events.models.profiles import Team, UserProfile, Member
from events.fo... | 34.991803 | 110 | 0.63153 |
1e98b5860bc45e05f2cd8a6d43646c850bf795c0 | 1,293 | py | Python | tests/integration_tests/test_shape_printing.py | drahoja9/BI-OOP-CAD | afec7d44b1c5502a6bf94f78759c46337f750ea3 | [
"MIT"
] | null | null | null | tests/integration_tests/test_shape_printing.py | drahoja9/BI-OOP-CAD | afec7d44b1c5502a6bf94f78759c46337f750ea3 | [
"MIT"
] | null | null | null | tests/integration_tests/test_shape_printing.py | drahoja9/BI-OOP-CAD | afec7d44b1c5502a6bf94f78759c46337f750ea3 | [
"MIT"
] | null | null | null | import io
from typing import Dict
from app.controller import Controller
from app.shapes import Shape
def test_shape_printing(controller: Controller, shape_commands, stream: io.StringIO, shapes: Dict[str, Shape]):
for command in shape_commands:
controller.execute_command(command)
assert controller._g... | 35.916667 | 111 | 0.612529 |
190427f94ca842708a47615704f1fe79cac19250 | 2,382 | py | Python | typity/annotate.py | isidentical/Typity | e80b484713fbf294d9fde6eeb54c33f8512af3e3 | [
"MIT"
] | 4 | 2019-05-04T01:09:33.000Z | 2019-11-18T11:59:53.000Z | typity/annotate.py | isidentical/Typity | e80b484713fbf294d9fde6eeb54c33f8512af3e3 | [
"MIT"
] | null | null | null | typity/annotate.py | isidentical/Typity | e80b484713fbf294d9fde6eeb54c33f8512af3e3 | [
"MIT"
] | null | null | null | import typing
from abc import ABC
from collections.abc import *
from functools import wraps
from types import FunctionType
class _Container(Container):
def __subclasscheck__(cls):
return issubclass(cls, Container) and not issubclass(cls, (str, bytes))
class Builtin(ABC):
def __subclasscheck__(cls):
... | 29.407407 | 87 | 0.536524 |
8fed5ecf13018ca42215b3b9191967eeaa2fa9b3 | 58,798 | py | Python | yardstick/tests/unit/common/test_utils.py | upfront710/yardstick | 2c3898f2ca061962cedbfc7435f78b59aa39b097 | [
"Apache-2.0"
] | 28 | 2017-02-07T07:46:42.000Z | 2021-06-30T08:11:06.000Z | yardstick/tests/unit/common/test_utils.py | upfront710/yardstick | 2c3898f2ca061962cedbfc7435f78b59aa39b097 | [
"Apache-2.0"
] | 6 | 2018-01-18T08:00:54.000Z | 2019-04-11T04:51:41.000Z | yardstick/tests/unit/common/test_utils.py | upfront710/yardstick | 2c3898f2ca061962cedbfc7435f78b59aa39b097 | [
"Apache-2.0"
] | 46 | 2016-12-13T10:05:47.000Z | 2021-02-18T07:33:06.000Z | ##############################################################################
# Copyright (c) 2015 Ericsson AB 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 distribution, and is available... | 40.162568 | 690 | 0.654257 |
ae8cbf66cc052bdc07c23da0eac0a458df506fa4 | 815 | py | Python | examples/threathunter/process_tree.py | rathnadeep/cbapi-python | 55375d8796a9d88d00bd16df13d71a2d8d76dd9c | [
"MIT"
] | null | null | null | examples/threathunter/process_tree.py | rathnadeep/cbapi-python | 55375d8796a9d88d00bd16df13d71a2d8d76dd9c | [
"MIT"
] | null | null | null | examples/threathunter/process_tree.py | rathnadeep/cbapi-python | 55375d8796a9d88d00bd16df13d71a2d8d76dd9c | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import sys
from cbapi.example_helpers import build_cli_parser, get_cb_threathunter_object
from cbapi.psc.threathunter import Process
def main():
parser = build_cli_parser("Query processes")
parser.add_argument("-p", type=str, help="process guid", default=None)
args = parser.parse_... | 28.103448 | 78 | 0.682209 |
b84e4671b6de486a897a412029d58dafcd229e43 | 17,071 | py | Python | dsi/infrastructure_provisioning.py | mongodb/dsi | 8cfc845156561d698fb01da93464392caca40644 | [
"Apache-2.0"
] | 9 | 2020-05-19T21:39:44.000Z | 2022-02-11T10:03:36.000Z | dsi/infrastructure_provisioning.py | mongodb/dsi | 8cfc845156561d698fb01da93464392caca40644 | [
"Apache-2.0"
] | 1 | 2021-03-25T23:37:22.000Z | 2021-03-25T23:37:22.000Z | dsi/infrastructure_provisioning.py | mongodb/dsi | 8cfc845156561d698fb01da93464392caca40644 | [
"Apache-2.0"
] | 3 | 2020-03-05T10:49:10.000Z | 2021-03-02T11:15:45.000Z | #!/usr/bin/env python3.7
"""
Provision AWS resources using terraform
"""
import datetime
import glob
import os
import re
import shutil
import subprocess
from functools import partial
import argparse
import structlog
from dsi.common import host_factory
from dsi.common import host_utils
from dsi.common import utils
f... | 40.839713 | 100 | 0.613555 |
f688f8f1a7a7c5c090bd65502052cec0c3b73bf6 | 637 | py | Python | app/__init__.py | Daniel-Muruthi/newsflash | dc12ea8c5a879017d88c7b066975195f3a68a971 | [
"Unlicense"
] | null | null | null | app/__init__.py | Daniel-Muruthi/newsflash | dc12ea8c5a879017d88c7b066975195f3a68a971 | [
"Unlicense"
] | null | null | null | app/__init__.py | Daniel-Muruthi/newsflash | dc12ea8c5a879017d88c7b066975195f3a68a971 | [
"Unlicense"
] | null | null | null | from flask import Flask
from .config import config_options
from flask_bootstrap import Bootstrap
bootstrap = Bootstrap()
def create_app(config_name):
# Initializing application
app = Flask(__name__,template_folder='templates')
# Creating the app configurations
app.config.from_object(config_op... | 19.90625 | 55 | 0.750392 |
e949c8508c2891dc35f9c08403592bae1a3194cf | 77,294 | py | Python | source/NVDAObjects/window/excel.py | zstanecic/nvda | 713cdc0bb34a8ef0a834feb9e3b7232e6bf7aeb6 | [
"bzip2-1.0.6"
] | null | null | null | source/NVDAObjects/window/excel.py | zstanecic/nvda | 713cdc0bb34a8ef0a834feb9e3b7232e6bf7aeb6 | [
"bzip2-1.0.6"
] | null | null | null | source/NVDAObjects/window/excel.py | zstanecic/nvda | 713cdc0bb34a8ef0a834feb9e3b7232e6bf7aeb6 | [
"bzip2-1.0.6"
] | null | null | null | # A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2006-2022 NV Access Limited, Dinesh Kaushal, Siddhartha Gupta, Accessolutions, Julien Cochuyt
# This file is covered by the GNU General Public License.
# See the file COPYING for more details.
import abc
import ctypes
import enum
from typing import (
... | 37.035937 | 343 | 0.754975 |
be9c286b20835d515ec1c5f1dc63cccb2114cd55 | 1,997 | py | Python | modelling/scripts/flatten_mean_annual_flows.py | bcgov-c/wally | 264bc5d40f9b5cf293159f1bc0424cfd9ff8aa06 | [
"Apache-2.0"
] | null | null | null | modelling/scripts/flatten_mean_annual_flows.py | bcgov-c/wally | 264bc5d40f9b5cf293159f1bc0424cfd9ff8aa06 | [
"Apache-2.0"
] | null | null | null | modelling/scripts/flatten_mean_annual_flows.py | bcgov-c/wally | 264bc5d40f9b5cf293159f1bc0424cfd9ff8aa06 | [
"Apache-2.0"
] | null | null | null | import os
import json
import pandas as pd
from matplotlib import pyplot
import math
import itertools
from ast import literal_eval
import matplotlib.pyplot as plt
import seaborn as sns
from pathlib import Path
import matplotlib.backends.backend_pdf
directory = '../data/1_source/'
for filename in sorted(os.listdir(dire... | 39.156863 | 123 | 0.712569 |
cc99b11faddeb2d91da88a0f227eb8c7a8351764 | 6,296 | py | Python | train.py | Belal-abdelnasser/Deploying-a-Sentiment-Analysis-Mode | 6106a642bf273287217258e2ff0939ff114d0302 | [
"MIT"
] | null | null | null | train.py | Belal-abdelnasser/Deploying-a-Sentiment-Analysis-Mode | 6106a642bf273287217258e2ff0939ff114d0302 | [
"MIT"
] | null | null | null | train.py | Belal-abdelnasser/Deploying-a-Sentiment-Analysis-Mode | 6106a642bf273287217258e2ff0939ff114d0302 | [
"MIT"
] | null | null | null | import argparse
import json
import os
import pickle
import sys
import sagemaker_containers
import pandas as pd
import torch
import torch.optim as optim
import torch.utils.data
from model import LSTMClassifier
def model_fn(model_dir):
"""Load the PyTorch model from the `model_dir` directory."""
print("Loading ... | 38.157576 | 107 | 0.660419 |
0cd51ada67e027765185ee0dcef32b0b30087d8f | 322 | py | Python | api/urls.py | Microcore/Quantic | 727234a5e9e58217eb8235b6d0f27fe1b95f5f83 | [
"MIT"
] | null | null | null | api/urls.py | Microcore/Quantic | 727234a5e9e58217eb8235b6d0f27fe1b95f5f83 | [
"MIT"
] | 7 | 2015-04-25T05:04:46.000Z | 2015-04-26T08:24:36.000Z | api/urls.py | Microcore/Quantic | 727234a5e9e58217eb8235b6d0f27fe1b95f5f83 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.conf.urls import patterns, url
# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()
urlpatterns = patterns('',
# Login view
url(r'^$', 'api.views.access_deny'),
url(r'^ip/$', 'api.views.api_ip_info'),
)... | 24.769231 | 52 | 0.639752 |
cef292f8f267eacb0e56150036d0ac5cb8559b6f | 8,298 | py | Python | egohands_dataset_clean.py | kayspark/HandPose | 920ed35d76446db18b504a7530d6c5faf07c3460 | [
"MIT"
] | 1 | 2019-09-05T17:08:22.000Z | 2019-09-05T17:08:22.000Z | egohands_dataset_clean.py | kayspark/HandPose | 920ed35d76446db18b504a7530d6c5faf07c3460 | [
"MIT"
] | null | null | null | egohands_dataset_clean.py | kayspark/HandPose | 920ed35d76446db18b504a7530d6c5faf07c3460 | [
"MIT"
] | null | null | null | import csv
import os
import random
import zipfile
import cv2
import numpy as np
import scipy.io as sio
import six.moves.urllib as urllib
def save_csv(csv_path, csv_content):
with open(csv_path, 'w') as csvfile:
wr = csv.writer(csvfile)
for i in range(len(csv_content)):
wr.writerow(csv... | 36.078261 | 109 | 0.527718 |
7e40ab173bc006e7b8d556795f049c12680fd257 | 53 | py | Python | ppretty/__init__.py | symonsoft/ppretty | 81f504fd45a7eb3e62147b4acb9eefadfa2d0da8 | [
"BSD-3-Clause"
] | 18 | 2016-08-17T20:34:02.000Z | 2021-11-26T19:47:04.000Z | ppretty/__init__.py | symonsoft/ppretty | 81f504fd45a7eb3e62147b4acb9eefadfa2d0da8 | [
"BSD-3-Clause"
] | 3 | 2017-04-02T13:34:01.000Z | 2019-08-24T03:33:36.000Z | ppretty/__init__.py | symonsoft/ppretty | 81f504fd45a7eb3e62147b4acb9eefadfa2d0da8 | [
"BSD-3-Clause"
] | 2 | 2017-08-30T17:24:26.000Z | 2019-07-17T04:59:52.000Z | from .ppretty import ppretty
__all__ = 'ppretty'
| 13.25 | 29 | 0.716981 |
a55b9bb19c84e61f3530f42156717a5f893ead02 | 30,617 | py | Python | PyQuante/hgp.py | globulion/pyq-mod | ee32b6685e9c1e915c5c515ef7ab83adc200fa9b | [
"DOC"
] | 8 | 2016-08-26T14:57:01.000Z | 2019-12-23T07:39:37.000Z | PyQuante/hgp.py | nicodgomez/pyquante | 483571110b83cab406d3d4d8f2eba5cae0a2da58 | [
"DOC"
] | 1 | 2021-06-11T18:51:34.000Z | 2021-06-11T18:56:26.000Z | PyQuante/hgp.py | globulion/pyq-mod | ee32b6685e9c1e915c5c515ef7ab83adc200fa9b | [
"DOC"
] | 8 | 2016-02-23T19:22:11.000Z | 2021-08-28T12:12:59.000Z | """\
Implementation of Head-Gordon & Pople's scheme for electron repulsion
integrals (ref), which, in turn, derives from Saika and Obarra's scheme.
Routines:
hrr performs the horizontal recursion relationships
vrr performs the vertical recursion relationship
The routines in the accompanying chgp module have th... | 45.902549 | 85 | 0.416958 |
b53caf47dd15b2acdf256f37113a386ba521a062 | 32,858 | py | Python | unpythonic/it.py | Technologicat/unpythonic | 7d99d50c5d1c3151fb822491167a7008024d97a5 | [
"BSD-2-Clause"
] | 55 | 2018-07-26T15:52:22.000Z | 2022-01-28T00:53:59.000Z | unpythonic/it.py | Technologicat/unpythonic | 7d99d50c5d1c3151fb822491167a7008024d97a5 | [
"BSD-2-Clause"
] | 85 | 2019-07-24T11:02:45.000Z | 2022-01-31T22:00:23.000Z | unpythonic/it.py | Technologicat/unpythonic | 7d99d50c5d1c3151fb822491167a7008024d97a5 | [
"BSD-2-Clause"
] | 2 | 2020-09-04T21:39:19.000Z | 2022-01-12T03:41:50.000Z | # -*- coding: utf-8 -*-
"""Missing batteries for itertools.
For more batteries for itertools, see also the ``unpythonic.fold`` module.
``flatten`` based on Danny Yoo's version:
http://rightfootin.blogspot.fi/2006/09/more-on-python-flatten.html
``uniqify``, ``uniq``, ``take``, ``drop``, ``partition`` just package
... | 34.955319 | 96 | 0.609197 |
3370ad6f9d6f20f4b828b5b7960e06d10facb966 | 1,842 | py | Python | xlsxwriter/test/comparison/test_types04.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2019-07-25T06:08:09.000Z | 2019-11-01T02:33:56.000Z | xlsxwriter/test/comparison/test_types04.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | 13 | 2019-07-14T00:29:05.000Z | 2019-11-26T06:16:46.000Z | xlsxwriter/test/comparison/test_types04.py | adgear/XlsxWriter | 79bcaad28d57ac29038b1c74bccc6d611b7a385e | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2019, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | 29.238095 | 79 | 0.62215 |
5a0c491e60a3bd85dae16427a5b70498fd3bba47 | 3,362 | py | Python | examples/file_soap_http.py | edustaff/spyne | 27f2061325d29a55803fb47b1b37978ab21ea240 | [
"BSD-3-Clause"
] | 786 | 2015-01-04T10:46:28.000Z | 2022-03-31T19:24:35.000Z | examples/file_soap_http.py | edustaff/spyne | 27f2061325d29a55803fb47b1b37978ab21ea240 | [
"BSD-3-Clause"
] | 248 | 2015-01-01T21:52:47.000Z | 2022-03-09T08:55:04.000Z | examples/file_soap_http.py | edustaff/spyne | 27f2061325d29a55803fb47b1b37978ab21ea240 | [
"BSD-3-Clause"
] | 210 | 2015-01-10T14:20:31.000Z | 2022-03-09T08:38:43.000Z | #!/usr/bin/env python
# encoding: utf8
#
# Copyright © Burak Arslan <burak at arskom dot com dot tr>,
# Arskom Ltd. http://www.arskom.com.tr
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | 38.643678 | 80 | 0.733789 |
ca04e6db9e6d42b37681d7ca8ac14fb426d383ee | 4,137 | py | Python | exchanges/gateio/gateAPI.py | AshWorkshop/Trandash | a96b523fbd171ba2d43a6720ef2e2a496a0cf75a | [
"MIT"
] | 1 | 2018-07-25T03:43:35.000Z | 2018-07-25T03:43:35.000Z | exchanges/gateio/gateAPI.py | AshWorkshop/Trandash | a96b523fbd171ba2d43a6720ef2e2a496a0cf75a | [
"MIT"
] | null | null | null | exchanges/gateio/gateAPI.py | AshWorkshop/Trandash | a96b523fbd171ba2d43a6720ef2e2a496a0cf75a | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
Provide the GateIO class to abstract web interaction
'''
from .HttpUtil import getSign, httpGet, httpPost
class GateIO:
def __init__(self, url, apiKey, secretKey):
self.__url = url
self.__apiKey = apiKey
self.__secretKey = secretKey
## Ge... | 31.823077 | 81 | 0.631134 |
8178421f5fe730622f6209e141cc0f334fb6bfb3 | 4,967 | py | Python | Latest/venv/Lib/site-packages/pyface/tasks/action/task_action.py | adamcvj/SatelliteTracker | 49a8f26804422fdad6f330a5548e9f283d84a55d | [
"Apache-2.0"
] | 1 | 2022-01-09T20:04:31.000Z | 2022-01-09T20:04:31.000Z | Latest/venv/Lib/site-packages/pyface/tasks/action/task_action.py | adamcvj/SatelliteTracker | 49a8f26804422fdad6f330a5548e9f283d84a55d | [
"Apache-2.0"
] | 1 | 2022-02-15T12:01:57.000Z | 2022-03-24T19:48:47.000Z | Latest/venv/Lib/site-packages/pyface/tasks/action/task_action.py | adamcvj/SatelliteTracker | 49a8f26804422fdad6f330a5548e9f283d84a55d | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2010-18, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in enthought/LICENSE.txt and may be redistributed only
# under the conditions described in the aforementioned license. The license
# is also available online at h... | 33.33557 | 80 | 0.526676 |
57548409bb554cbd1b0812413c8654eaddd86248 | 9,863 | py | Python | src/sentry/integrations/vsts/client.py | looker/sentry | af849d1944d296cfcccfb5f163661ade847900dc | [
"BSD-3-Clause"
] | null | null | null | src/sentry/integrations/vsts/client.py | looker/sentry | af849d1944d296cfcccfb5f163661ade847900dc | [
"BSD-3-Clause"
] | null | null | null | src/sentry/integrations/vsts/client.py | looker/sentry | af849d1944d296cfcccfb5f163661ade847900dc | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from sentry.integrations.client import ApiClient, OAuth2RefreshMixin
from sentry.utils.http import absolute_uri
UNSET = object()
FIELD_MAP = {
'title': '/fields/System.Title',
'description': '/fields/System.Description',
'comment': '/fields/System.History',
'lin... | 36.261029 | 133 | 0.53726 |
869e9cea71b2ee07059df293c820d1ef7303477e | 508 | py | Python | Desafios/Desafio 67.py | blopah/python3-curso-em-video-gustavo-guanabara-exercicios | d86c613ea8bb335c4dd888a34bda456055e4d82e | [
"MIT"
] | 2 | 2021-02-06T04:35:44.000Z | 2021-02-08T02:37:33.000Z | Desafios/Desafio 67.py | blopah/python3-curso-em-video-gustavo-guanabara-exercicios | d86c613ea8bb335c4dd888a34bda456055e4d82e | [
"MIT"
] | null | null | null | Desafios/Desafio 67.py | blopah/python3-curso-em-video-gustavo-guanabara-exercicios | d86c613ea8bb335c4dd888a34bda456055e4d82e | [
"MIT"
] | null | null | null | print('''Faça um programa que mostre a tabuada de vários números,
um de cada vez, para cada valor digitado pelo usuário.
O programa será interrompido quando o número solicitado for
negativo.''')
while True:
n = int(input('Quer ver a taboada de qual número? '))
c = 0
if n < 0:
break
for c in ... | 31.75 | 68 | 0.598425 |
9482353f499e665f824a7366c9f00096db6b0d96 | 2,173 | py | Python | test/azure/version-tolerant/AcceptanceTests/test_azure_custom_base_uri.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/azure/version-tolerant/AcceptanceTests/test_azure_custom_base_uri.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | null | null | null | test/azure/version-tolerant/AcceptanceTests/test_azure_custom_base_uri.py | cfculhane/autorest.python | 8cbca95faee88d933a58bbbd17b76834faa8d387 | [
"MIT"
] | 1 | 2022-03-28T08:58:03.000Z | 2022-03-28T08:58:03.000Z | # --------------------------------------------------------------------------
#
# Copyright (c) Microsoft Corporation. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the ""Software""),... | 38.803571 | 78 | 0.721123 |
cc2e6be0d6a58bf26eac8befab75bfdfee245d80 | 12,485 | py | Python | model.py | isaiah-li/FastSRGan | 5527dab9dfe3e44fadc63c9c6bb432ba4e80a80d | [
"MIT"
] | null | null | null | model.py | isaiah-li/FastSRGan | 5527dab9dfe3e44fadc63c9c6bb432ba4e80a80d | [
"MIT"
] | null | null | null | model.py | isaiah-li/FastSRGan | 5527dab9dfe3e44fadc63c9c6bb432ba4e80a80d | [
"MIT"
] | null | null | null | from tensorflow import keras
import tensorflow as tf
class FastSRGAN(object):
"""SRGAN for fast super resolution."""
def __init__(self, args):
"""
Initializes the Mobile SRGAN class.
Args:
args: CLI arguments that dictate how to build the model.
Returns:
... | 41.20462 | 112 | 0.54137 |
ba265085a145007c5e5290e948b27c6de77d3245 | 224 | py | Python | while_break.py | illool/work_note | 04604444d11908177618870a08d4a0d7163787d6 | [
"Apache-2.0"
] | null | null | null | while_break.py | illool/work_note | 04604444d11908177618870a08d4a0d7163787d6 | [
"Apache-2.0"
] | null | null | null | while_break.py | illool/work_note | 04604444d11908177618870a08d4a0d7163787d6 | [
"Apache-2.0"
] | null | null | null | if __name__ == "__main__":
count = 0
while count < 100:
c = 0
while c < 10:
if c > 5:
break
print(c)
c += 1
print(count)
count += 1
| 18.666667 | 26 | 0.357143 |
433d47d34eb49fec8275c1ab10c51bd2fc71828a | 6,625 | py | Python | datadrivenpdes/my-pipelines/euler/runge_kutta_train-5-4-128/train.py | lucianodrozda/data-driven-pdes-google | 199c714f410af998f07315ac62c9a0a933de1113 | [
"Apache-2.0"
] | 4 | 2021-11-15T13:08:49.000Z | 2022-03-11T15:11:51.000Z | datadrivenpdes/my-pipelines/euler/runge_kutta_train-5-4-128/train.py | luciano-drozda/data-driven-pdes-google | 199c714f410af998f07315ac62c9a0a933de1113 | [
"Apache-2.0"
] | null | null | null | datadrivenpdes/my-pipelines/euler/runge_kutta_train-5-4-128/train.py | luciano-drozda/data-driven-pdes-google | 199c714f410af998f07315ac62c9a0a933de1113 | [
"Apache-2.0"
] | null | null | null | # Train neural net model and evaluate performances.
# Requires previous creation of training data
# Author(s): Luciano Drozda
# Date (mm/dd/yyyy): 10/01/2020
import numpy as np
import os, sys
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
from datadrivenpdes.core import grids
from ... | 36.401099 | 99 | 0.653736 |
b6b1b48064b9b9ed6344f8a2a87eac97adfe8fa2 | 2,344 | py | Python | lib/utils/symbol.py | qilei123/fpn_crop_v1_5d | d76fa99b1a0831e59111c287956a1d01b3aca064 | [
"MIT"
] | null | null | null | lib/utils/symbol.py | qilei123/fpn_crop_v1_5d | d76fa99b1a0831e59111c287956a1d01b3aca064 | [
"MIT"
] | null | null | null | lib/utils/symbol.py | qilei123/fpn_crop_v1_5d | d76fa99b1a0831e59111c287956a1d01b3aca064 | [
"MIT"
] | null | null | null | # --------------------------------------------------------
# Deformable Convolutional Networks
# Copyright (c) 2017 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Written by Yuwen Xiong
# --------------------------------------------------------
import numpy as np
import pprint
class Symbol:
... | 39.066667 | 112 | 0.593003 |
3080dd1a7424949463a4721c701ee373bb6d1bd8 | 469 | py | Python | gpytorch/utils/fft.py | orionr/gpytorch | b31a9907223e7b8793cc179b1d5d9e6fb1128a5b | [
"MIT"
] | 1 | 2018-05-30T07:32:29.000Z | 2018-05-30T07:32:29.000Z | gpytorch/utils/fft.py | julieli/gpytorch | 21f08b6067a3733ffd9d729a1ce25487976f927e | [
"MIT"
] | null | null | null | gpytorch/utils/fft.py | julieli/gpytorch | 21f08b6067a3733ffd9d729a1ce25487976f927e | [
"MIT"
] | 1 | 2018-11-15T10:03:40.000Z | 2018-11-15T10:03:40.000Z | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import torch
def fft1(input):
complex_input = torch.stack((input, input.new(input.shape).fill_(0)), dim=-1)
return complex_input.fft(1)
def ifft1(input):
... | 26.055556 | 81 | 0.761194 |
f2bdbb1913b976d882f57911d4ff6779532fe851 | 1,884 | py | Python | pyclub/accounts/migrations/0002_add_social_accounts_fields.py | dvl/pyclub | 05a91053f7a15d50c9363046435a5c8ccad6f2cf | [
"MIT"
] | 1 | 2015-07-17T19:05:00.000Z | 2015-07-17T19:05:00.000Z | pyclub/accounts/migrations/0002_add_social_accounts_fields.py | dvl/pyclub | 05a91053f7a15d50c9363046435a5c8ccad6f2cf | [
"MIT"
] | 2 | 2015-06-17T12:04:18.000Z | 2015-07-03T02:51:35.000Z | pyclub/accounts/migrations/0002_add_social_accounts_fields.py | dvl/pyclub | 05a91053f7a15d50c9363046435a5c8ccad6f2cf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('accounts', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='user',
name='about',
... | 34.254545 | 108 | 0.585987 |
5591cd1bf22eee5c2f185690141aa76c927bd6c4 | 397 | py | Python | fathom/__init__.py | Aetf/fathom | 1f0dafa9fe3b7988708522d93ecda7f282cb2090 | [
"Apache-2.0"
] | 1 | 2021-06-30T04:59:22.000Z | 2021-06-30T04:59:22.000Z | fathom/__init__.py | Aetf/fathom | 1f0dafa9fe3b7988708522d93ecda7f282cb2090 | [
"Apache-2.0"
] | null | null | null | fathom/__init__.py | Aetf/fathom | 1f0dafa9fe3b7988708522d93ecda7f282cb2090 | [
"Apache-2.0"
] | null | null | null | from __future__ import absolute_import, print_function, division
# from .deepq import * # noqa: F401,F403
from .speech import * # noqa: F401,F403
from .seq2seq import * # noqa: F401,F403
from .autoenc import * # noqa: F401,F403
from .memnet import * # noqa: F401,F403
from .alexnet import * # noqa: F401,F403
from... | 36.090909 | 64 | 0.710327 |
65cab5e9be5f6c59c41c3bf6ee0d58ec7493a9d9 | 11,324 | py | Python | tests/crypto/test_account.py | selfcustody/urtypes | 8ff8e6ebe484d7a0f98ad73f4441708704998b43 | [
"MIT"
] | null | null | null | tests/crypto/test_account.py | selfcustody/urtypes | 8ff8e6ebe484d7a0f98ad73f4441708704998b43 | [
"MIT"
] | null | null | null | tests/crypto/test_account.py | selfcustody/urtypes | 8ff8e6ebe484d7a0f98ad73f4441708704998b43 | [
"MIT"
] | null | null | null | # The MIT License (MIT)
# Copyright (c) 2021 Tom J. Sun
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, ... | 53.92381 | 1,228 | 0.410102 |
80b0cf8d5017a5e33bfe3bc3a64311651e9bd768 | 121,003 | py | Python | project.py | screencloud/screenbox-rockchip--git-repo | 50a81de2bc9f2074d56c368f651cf9f50c8d8a87 | [
"Apache-2.0"
] | null | null | null | project.py | screencloud/screenbox-rockchip--git-repo | 50a81de2bc9f2074d56c368f651cf9f50c8d8a87 | [
"Apache-2.0"
] | null | null | null | project.py | screencloud/screenbox-rockchip--git-repo | 50a81de2bc9f2074d56c368f651cf9f50c8d8a87 | [
"Apache-2.0"
] | null | null | null | # -*- coding:utf-8 -*-
#
# Copyright (C) 2008 The Android Open Source Project
#
# 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 re... | 33.124281 | 90 | 0.606968 |
effa740cedd1a4f490e260ca9457237acf82eed1 | 5,565 | py | Python | acr_module/acr/acr_datasets.py | pyalex/chameleon_recsys | d0c2ed04607cba075fc1f6bc8ddf670fb59a5364 | [
"MIT"
] | 1 | 2019-03-07T15:39:10.000Z | 2019-03-07T15:39:10.000Z | acr_module/acr/acr_datasets.py | pyalex/chameleon_recsys | d0c2ed04607cba075fc1f6bc8ddf670fb59a5364 | [
"MIT"
] | null | null | null | acr_module/acr/acr_datasets.py | pyalex/chameleon_recsys | d0c2ed04607cba075fc1f6bc8ddf670fb59a5364 | [
"MIT"
] | null | null | null | import tensorflow as tf
import multiprocessing
from .utils import merge_two_dicts
CONTEXT_FEATURES = ['article_id', 'publisher_id', 'category_id', 'created_at_ts', 'text_length']
def parse_sequence_example(example, truncate_sequence_length=300):
# Define how to parse the example
context_features = {
... | 37.1 | 117 | 0.685535 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.