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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
22f9996e35b6cbbaeea6e8c3929b7498dd603017 | 4,471 | py | Python | ppq/utils/round.py | xiguadong/ppq | 6c71adb3c2a8ca95967f101724b5e4b3e6f761ff | [
"Apache-2.0"
] | null | null | null | ppq/utils/round.py | xiguadong/ppq | 6c71adb3c2a8ca95967f101724b5e4b3e6f761ff | [
"Apache-2.0"
] | null | null | null | ppq/utils/round.py | xiguadong/ppq | 6c71adb3c2a8ca95967f101724b5e4b3e6f761ff | [
"Apache-2.0"
] | null | null | null | from decimal import ROUND_HALF_DOWN, ROUND_HALF_EVEN, ROUND_HALF_UP, Decimal
from math import ceil, floor, log2
from typing import Union
import torch
from ppq.core import RoundingPolicy
def ppq_numerical_round(value: float,
policy: RoundingPolicy=RoundingPolicy.ROUND_HALF_EVEN) -> int:
"""
reference... | 45.622449 | 138 | 0.698054 |
22f9fe832c0a98e82946d0744a46553bfba443ca | 11,944 | py | Python | python/repair/train.py | maropu/scavenger | 03a935968f4aa507d4d98c8ca528195b770757d9 | [
"Apache-2.0"
] | null | null | null | python/repair/train.py | maropu/scavenger | 03a935968f4aa507d4d98c8ca528195b770757d9 | [
"Apache-2.0"
] | 2 | 2019-12-22T13:29:07.000Z | 2020-01-07T11:55:41.000Z | python/repair/train.py | maropu/scavenger | 03a935968f4aa507d4d98c8ca528195b770757d9 | [
"Apache-2.0"
] | 1 | 2020-10-26T20:07:28.000Z | 2020-10-26T20:07:28.000Z | #!/usr/bin/env python3
#
# 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 "L... | 40.62585 | 120 | 0.654638 |
22fa19437d01af6a56a8a1b30127d97248a1bdcd | 519 | py | Python | howl/roomsensor/urls.py | volzotan/django-howl | 3b11c530da95d152844934da09592619b3d4497f | [
"MIT"
] | null | null | null | howl/roomsensor/urls.py | volzotan/django-howl | 3b11c530da95d152844934da09592619b3d4497f | [
"MIT"
] | null | null | null | howl/roomsensor/urls.py | volzotan/django-howl | 3b11c530da95d152844934da09592619b3d4497f | [
"MIT"
] | null | null | null | from django.conf.urls import patterns, url
from roomsensor import views
urlpatterns = patterns('',
url(r'^$', views.index, name='roomsensor'),
# ex: /roomsensor/name/
url(r'^(?P<roomsensor_name>\w+)/$', views.display, name='roomsensor_display'),
url(r'^(?P<roomsensor_name>\w+)/read/$', views.read, na... | 37.071429 | 138 | 0.672447 |
22fadcf738c9cad6b1e0cd6d9126f92326318681 | 1,088 | py | Python | main.py | vu-telab/DAKOTA-moga-post-processing-tool | 2f41561bd8ca44c693e5994f7f68a1edc1a82361 | [
"MIT"
] | null | null | null | main.py | vu-telab/DAKOTA-moga-post-processing-tool | 2f41561bd8ca44c693e5994f7f68a1edc1a82361 | [
"MIT"
] | 4 | 2017-02-06T18:20:25.000Z | 2017-02-06T20:50:34.000Z | main.py | caseynbrock/DAKOTA-moga-post-processing-tool | 2f41561bd8ca44c693e5994f7f68a1edc1a82361 | [
"MIT"
] | null | null | null | # main.py
#
# currently just an example script I use to test my optimization_results module
#
# WARNING: design point numbers 0-indexed in pandas database, but
# eval_id column is the original 1-indexed value given by DAKOTA
import optimization_results as optr
if __name__=='__main__':
main()
| 35.096774 | 97 | 0.596507 |
22fbfb719886ba73384d6d380084bceb6dabf90b | 2,127 | py | Python | Topaz/Core.py | Rhodolite/Gem.py.UnitTest | eaa8b6855bcfbb12f67e7eb146928814543ef9d4 | [
"MIT"
] | null | null | null | Topaz/Core.py | Rhodolite/Gem.py.UnitTest | eaa8b6855bcfbb12f67e7eb146928814543ef9d4 | [
"MIT"
] | null | null | null | Topaz/Core.py | Rhodolite/Gem.py.UnitTest | eaa8b6855bcfbb12f67e7eb146928814543ef9d4 | [
"MIT"
] | null | null | null | #
# Copyright (c) 2017 Joy Diamond. All rights reserved.
#
| 35.45 | 97 | 0.661965 |
22fc97fb3dafaa3d0c68a5549bbe8a39af3d15d4 | 7,031 | py | Python | app.py | kosovojs/wikibooster | 70a9d9d7bf41be9fa5e58d40fba216d9b6df008d | [
"MIT"
] | null | null | null | app.py | kosovojs/wikibooster | 70a9d9d7bf41be9fa5e58d40fba216d9b6df008d | [
"MIT"
] | 17 | 2019-07-08T15:32:18.000Z | 2021-01-03T10:30:55.000Z | app.py | kosovojs/wikibooster | 70a9d9d7bf41be9fa5e58d40fba216d9b6df008d | [
"MIT"
] | 1 | 2019-08-28T21:23:48.000Z | 2019-08-28T21:23:48.000Z | import flask
from flask import Flask
from flask import jsonify
from flask import request
from flask_cors import CORS, cross_origin
from flask import render_template
import mwoauth
import requests_oauthlib
import os
import yaml
import mwapi
from tasks.main import Tasks
from save import Save
from db import DB
from typ... | 29.542017 | 156 | 0.729768 |
22fcb38b78558c9add6900dca954fd92ecf359b7 | 1,483 | py | Python | pre_embed.py | shelleyyyyu/few_shot | 0fe54444e820fe3201927e6363682913b6d61028 | [
"Apache-2.0"
] | 253 | 2018-08-29T18:59:00.000Z | 2022-03-15T04:53:47.000Z | pre_embed.py | shelleyyyyu/few_shot | 0fe54444e820fe3201927e6363682913b6d61028 | [
"Apache-2.0"
] | 18 | 2018-10-24T09:49:44.000Z | 2022-03-31T14:39:37.000Z | pre_embed.py | shelleyyyyu/few_shot | 0fe54444e820fe3201927e6363682913b6d61028 | [
"Apache-2.0"
] | 38 | 2018-10-17T07:43:25.000Z | 2022-03-05T12:20:33.000Z | import numpy as np
from collections import defaultdict, Counter
import random
import json
from tqdm import tqdm
if __name__ == '__main__':
transX('Wiki') | 32.23913 | 95 | 0.55091 |
22fd80b994ca4f5c482661c444d74e7a50232ab0 | 7,673 | py | Python | botc/gamemodes/troublebrewing/FortuneTeller.py | Xinverse/BOTC-Bot | 1932c649c81a5a1eab735d7abdee0761c2853940 | [
"MIT"
] | 1 | 2020-06-21T17:20:17.000Z | 2020-06-21T17:20:17.000Z | botc/gamemodes/troublebrewing/FortuneTeller.py | BlueLenz/Blood-on-the-Clocktower-Storyteller-Discord-Bot | 1932c649c81a5a1eab735d7abdee0761c2853940 | [
"MIT"
] | 1 | 2020-07-07T03:47:44.000Z | 2020-07-07T03:47:44.000Z | botc/gamemodes/troublebrewing/FortuneTeller.py | BlueLenz/Blood-on-the-Clocktower-Storyteller-Discord-Bot | 1932c649c81a5a1eab735d7abdee0761c2853940 | [
"MIT"
] | 1 | 2022-02-18T00:42:19.000Z | 2022-02-18T00:42:19.000Z | """Contains the Fortune Teller Character class"""
import json
import random
import discord
import datetime
from botc import Action, ActionTypes, Townsfolk, Character, Storyteller, RedHerring, \
RecurringAction, Category, StatusList
from botc.BOTCUtils import GameLogic
from ._utils import TroubleBrewing, TBRole
im... | 41.032086 | 115 | 0.644598 |
22fdcdf03da29d4d6e3f5e50e7e03925c3c15cdd | 10,849 | py | Python | src/schmetterling/build/tests/test_maven.py | bjuvensjo/schmetterling | 0cdbfe4f379a081d9d4711dd21866b90983365cf | [
"Apache-2.0"
] | null | null | null | src/schmetterling/build/tests/test_maven.py | bjuvensjo/schmetterling | 0cdbfe4f379a081d9d4711dd21866b90983365cf | [
"Apache-2.0"
] | null | null | null | src/schmetterling/build/tests/test_maven.py | bjuvensjo/schmetterling | 0cdbfe4f379a081d9d4711dd21866b90983365cf | [
"Apache-2.0"
] | null | null | null | from unittest.mock import call, MagicMock, patch
from schmetterling.build.maven import build_multi_modules
from schmetterling.build.maven import create_build_result
from schmetterling.build.maven import create_command
from schmetterling.build.maven import create_multi_modules
from schmetterling.build.maven import crea... | 33.381538 | 107 | 0.461702 |
22fe0847296c50b27120f9c55084e9eba84b2a5a | 1,753 | py | Python | Copados y Clases/Mastermind_DEBUG.py | FdelMazo/7540rw-Algo1 | 8900604873195df9e902ead6bcb67723a8b654c8 | [
"MIT"
] | 1 | 2021-11-20T18:41:34.000Z | 2021-11-20T18:41:34.000Z | Copados y Clases/Mastermind_DEBUG.py | FdelMazo/7540rw-Algo1 | 8900604873195df9e902ead6bcb67723a8b654c8 | [
"MIT"
] | null | null | null | Copados y Clases/Mastermind_DEBUG.py | FdelMazo/7540rw-Algo1 | 8900604873195df9e902ead6bcb67723a8b654c8 | [
"MIT"
] | null | null | null | #Sacar las lineas con DEBUG para que el juego funcione
import random
DIGITOS = 4
def mastermind():
"""Funcion principal del juego Mastermind"""
print("Bienvenido al Mastermind!")
print("Instrucciones: Tenes que adivinar un codigo de {} digitos distintos. Tu cantidad de aciertos son los numeros que estan corr... | 37.297872 | 263 | 0.697091 |
22feb380588bd77256d844c8ff999d4f5568fa43 | 1,499 | py | Python | setup.py | ovnicraft/runa | 4834b7467314c51c3e8e010b47a10bdfae597a5b | [
"MIT"
] | 5 | 2018-02-02T13:12:55.000Z | 2019-12-21T04:21:10.000Z | setup.py | ovnicraft/runa | 4834b7467314c51c3e8e010b47a10bdfae597a5b | [
"MIT"
] | 1 | 2017-12-18T15:49:13.000Z | 2017-12-18T15:49:13.000Z | setup.py | ovnicraft/runa | 4834b7467314c51c3e8e010b47a10bdfae597a5b | [
"MIT"
] | 1 | 2020-03-17T03:50:19.000Z | 2020-03-17T03:50:19.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open("README.rst") as readme_file:
readme = readme_file.read()
with open("HISTORY.rst") as history_file:
history = history_file.read()
requirements = ["Click>=6.0", "suds2==0.7.1"]
setup_... | 28.826923 | 79 | 0.662442 |
22ffabcfd90f7354812821f61ad46409c8d4a120 | 15,233 | py | Python | PyPortal_User_Interface/code.py | RichardA1/Adafruit_Learning_System_Guides | 7d06d8a126f357a431384c3af73339cb46f44c19 | [
"MIT"
] | 1 | 2022-01-31T21:55:48.000Z | 2022-01-31T21:55:48.000Z | PyPortal_User_Interface/code.py | aadisalimani/Adafruit_Learning_System_Guides | 1b18cfcd6d426bf018545fd7b4102a8196c11c16 | [
"MIT"
] | null | null | null | PyPortal_User_Interface/code.py | aadisalimani/Adafruit_Learning_System_Guides | 1b18cfcd6d426bf018545fd7b4102a8196c11c16 | [
"MIT"
] | null | null | null | import time
import board
import displayio
import busio
from analogio import AnalogIn
import neopixel
import adafruit_adt7410
from adafruit_bitmap_font import bitmap_font
from adafruit_display_text.label import Label
from adafruit_button import Button
import adafruit_touchscreen
from adafruit_pyportal import PyPortal
#... | 35.508159 | 89 | 0.594433 |
fe00cf45d1015948865b349bcd27a15e243e3e66 | 7,741 | py | Python | btse_futures/order.py | yottatix/btse-python | 1c5019d0a68dff797afc70c4cc32c1950c28af4e | [
"MIT"
] | null | null | null | btse_futures/order.py | yottatix/btse-python | 1c5019d0a68dff797afc70c4cc32c1950c28af4e | [
"MIT"
] | null | null | null | btse_futures/order.py | yottatix/btse-python | 1c5019d0a68dff797afc70c4cc32c1950c28af4e | [
"MIT"
] | null | null | null | import json
from btse_futures.constants import OrderType, Side, TimeInForce
| 33.510823 | 274 | 0.612324 |
fe00feaeeab5dd9b94bc8b6fc0a0dcbedc801a5d | 2,037 | py | Python | tests/mock_responses.py | md-reddevil/blinkpy | 3c7892385352079227c6251eb88257870bea0bb3 | [
"MIT"
] | null | null | null | tests/mock_responses.py | md-reddevil/blinkpy | 3c7892385352079227c6251eb88257870bea0bb3 | [
"MIT"
] | null | null | null | tests/mock_responses.py | md-reddevil/blinkpy | 3c7892385352079227c6251eb88257870bea0bb3 | [
"MIT"
] | null | null | null | """Simple mock responses definitions."""
from blinkpy.helpers.util import BlinkURLHandler
import blinkpy.helpers.constants as const
LOGIN_RESPONSE = {
'region': {'mock': 'Test'},
'networks': {
'1234': {'name': 'test', 'onboarded': True}
},
'authtoken': {'authtoken': 'foobar123', 'message': 'au... | 28.291667 | 65 | 0.573883 |
fe01b90ce53e119b08e13770e4500dbf262d962f | 2,061 | py | Python | fits_tools.py | steveschulze/Photometry | 3bc4ce457a270962321176d0e3e288b5a96cd34b | [
"BSD-2-Clause"
] | 6 | 2020-03-05T20:58:35.000Z | 2022-02-13T20:18:46.000Z | fits_tools.py | steveschulze/Photometry | 3bc4ce457a270962321176d0e3e288b5a96cd34b | [
"BSD-2-Clause"
] | 1 | 2020-03-10T00:03:46.000Z | 2020-03-10T00:03:46.000Z | fits_tools.py | steveschulze/Photometry | 3bc4ce457a270962321176d0e3e288b5a96cd34b | [
"BSD-2-Clause"
] | 1 | 2020-11-26T10:38:47.000Z | 2020-11-26T10:38:47.000Z | from astropy import coordinates as coord
from astropy import wcs
from astropy.io import fits
from astropy import units as u
from misc import bcolors
import numpy as np
import os
def convert_hms_dd(RA, DEC):
'''
Convert HMS to DD system
'''
if (':' in RA) and (':' in DEC):
Coord_dd = coord.SkyCoord(RA, DEC... | 21.247423 | 111 | 0.622028 |
fe028f3f35a9ad5d36908ec80630b139c6300e3c | 2,155 | py | Python | test_stbp_snn_eval.py | neurom-iot/n3ml | 39c6b50661f293d58b4b37ef613643860724bb24 | [
"MIT"
] | 11 | 2019-03-15T17:20:54.000Z | 2022-03-01T08:25:36.000Z | test_stbp_snn_eval.py | neurom-iot/n3ml | 39c6b50661f293d58b4b37ef613643860724bb24 | [
"MIT"
] | 7 | 2019-03-15T16:02:51.000Z | 2021-12-03T08:17:06.000Z | test_stbp_snn_eval.py | neurom-iot/n3ml | 39c6b50661f293d58b4b37ef613643860724bb24 | [
"MIT"
] | 9 | 2019-10-14T12:38:19.000Z | 2021-12-02T04:49:28.000Z | import argparse
import torch
import torch.nn as nn
import torchvision
import torchvision.transforms as transforms
from n3ml.model import DynamicModel_STBP_SNN
if __name__ == '__main__':
parser = argparse.ArgumentParser()
parser.add_argument('--data', default='data')
parser.add_argument('--batch_size'... | 28.355263 | 86 | 0.647332 |
fe02b43015e3d0762066c7be3eb1af3c04bff4d4 | 2,757 | py | Python | section_07_(files)/read_csv.py | govex/python-lessons | e692f48b6db008a45df0b941dee1e580f5a6c800 | [
"MIT"
] | 5 | 2019-10-25T20:47:22.000Z | 2021-12-07T06:37:22.000Z | section_07_(files)/read_csv.py | govex/python-lessons | e692f48b6db008a45df0b941dee1e580f5a6c800 | [
"MIT"
] | null | null | null | section_07_(files)/read_csv.py | govex/python-lessons | e692f48b6db008a45df0b941dee1e580f5a6c800 | [
"MIT"
] | 1 | 2021-07-20T18:56:15.000Z | 2021-07-20T18:56:15.000Z | # If you're new to file handling, be sure to check out with_open.py first!
# You'll also want to check out read_text.py before this example. This one is a bit more advanced.
with open('read_csv.csv', 'r') as states_file:
# Instead of leaving the file contents as a string, we're splitting the file into a list... | 48.368421 | 158 | 0.692057 |
fe03d9810588ad4d8d061ca21558f5e026141e64 | 2,334 | py | Python | kaggle_melanoma/schedulers.py | tinve/kaggle_melanoma | 6d2d16d62a394fd9cc2498bdf1a19ce60fe047eb | [
"MIT"
] | 8 | 2020-06-01T10:42:40.000Z | 2022-02-17T08:42:49.000Z | kaggle_melanoma/schedulers.py | tinve/kaggle_melanoma | 6d2d16d62a394fd9cc2498bdf1a19ce60fe047eb | [
"MIT"
] | null | null | null | kaggle_melanoma/schedulers.py | tinve/kaggle_melanoma | 6d2d16d62a394fd9cc2498bdf1a19ce60fe047eb | [
"MIT"
] | 2 | 2020-06-08T22:34:38.000Z | 2022-02-24T03:15:59.000Z | import math
from torch.optim.lr_scheduler import _LRScheduler
from torch.optim.optimizer import Optimizer
func_zoo = {
"cosine_decay": lambda epoch, step, len_epoch, total_epoch: 0.5
* (math.cos(step * math.pi / (total_epoch * len_epoch)) + 1)
}
| 35.363636 | 114 | 0.641388 |
fe04e111d5ba3ee739293195694259fc26b56d25 | 30 | py | Python | data/data/__init__.py | PumpkinYing/GAT | 723a20fcd9f915123d46ef4ef03eeadb6910635a | [
"MIT"
] | null | null | null | data/data/__init__.py | PumpkinYing/GAT | 723a20fcd9f915123d46ef4ef03eeadb6910635a | [
"MIT"
] | null | null | null | data/data/__init__.py | PumpkinYing/GAT | 723a20fcd9f915123d46ef4ef03eeadb6910635a | [
"MIT"
] | null | null | null | from .dataset import load_data | 30 | 30 | 0.866667 |
fe056ef418d151035d2b9bd419b580cf756d0fd1 | 1,099 | py | Python | utils.py | federicosapienza/InboxNotionTelegramBot | 031d5e78cd352dfb692b93f3e0b421695f1dc18e | [
"MIT"
] | null | null | null | utils.py | federicosapienza/InboxNotionTelegramBot | 031d5e78cd352dfb692b93f3e0b421695f1dc18e | [
"MIT"
] | null | null | null | utils.py | federicosapienza/InboxNotionTelegramBot | 031d5e78cd352dfb692b93f3e0b421695f1dc18e | [
"MIT"
] | null | null | null | import json
import logging
logger = logging.getLogger(__name__)
with open('configuration.json') as f:
config = json.load(f)
TELEGRAM_TOKEN = config["telegram-bot-token"]
NOTION_TOKEN = config["notion-token"]
NOTION_TABLE_URL = config["inbox_table"]["table_url"]
def check_allowed_user(user_id):
"""
chec... | 27.475 | 107 | 0.674249 |
fe05b5a6d987129895e699ef1d4e1c22d1bf1542 | 472 | py | Python | enaml/core/byteplay/__init__.py | timgates42/enaml | 054efe6a4047d84f2fff718d656a64a2363884dc | [
"BSD-3-Clause-Clear"
] | null | null | null | enaml/core/byteplay/__init__.py | timgates42/enaml | 054efe6a4047d84f2fff718d656a64a2363884dc | [
"BSD-3-Clause-Clear"
] | null | null | null | enaml/core/byteplay/__init__.py | timgates42/enaml | 054efe6a4047d84f2fff718d656a64a2363884dc | [
"BSD-3-Clause-Clear"
] | null | null | null | #------------------------------------------------------------------------------
# Copyright (c) 2013-2018, Nucleic Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#--------------------------------------------... | 33.714286 | 79 | 0.493644 |
fe068879b9f1513a9f5e49e88200ed64c8fa16f1 | 12,623 | py | Python | cassiopeia/datastores/riotapi/match.py | artemigkh/cassiopeia | fa78cb8f86ea21857916a707d04de6a05498033e | [
"MIT"
] | 1 | 2021-09-07T05:26:21.000Z | 2021-09-07T05:26:21.000Z | cassiopeia/datastores/riotapi/match.py | artemigkh/cassiopeia | fa78cb8f86ea21857916a707d04de6a05498033e | [
"MIT"
] | null | null | null | cassiopeia/datastores/riotapi/match.py | artemigkh/cassiopeia | fa78cb8f86ea21857916a707d04de6a05498033e | [
"MIT"
] | 1 | 2016-10-20T11:54:20.000Z | 2016-10-20T11:54:20.000Z | from time import time
from typing import Type, TypeVar, MutableMapping, Any, Iterable, Generator, Union
import arrow
import datetime
import math
from datapipelines import DataSource, PipelineContext, Query, NotFoundError, validate_query
from .common import RiotAPIService, APINotFoundError
from ...data import Platform... | 45.735507 | 178 | 0.614751 |
fe073352dbed399802293822986fcaea27535a33 | 10,374 | py | Python | Lib/site-packages/hackedit/vendor/jedi/cache.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | 1 | 2017-08-19T08:13:28.000Z | 2017-08-19T08:13:28.000Z | node_modules/nuclide/pkg/nuclide-python-rpc/VendorLib/jedi/cache.py | kevingatera/kgatewebapp | f0dbc50b7af2736e1f6c6f96f0a26fc7ff69db20 | [
"Unlicense"
] | 20 | 2021-05-03T18:02:23.000Z | 2022-03-12T12:01:04.000Z | Lib/site-packages/hackedit/vendor/jedi/cache.py | fochoao/cpython | 3dc84b260e5bced65ebc2c45c40c8fa65f9b5aa9 | [
"bzip2-1.0.6",
"0BSD"
] | null | null | null | """
This caching is very important for speed and memory optimizations. There's
nothing really spectacular, just some decorators. The following cache types are
available:
- module caching (`load_parser` and `save_parser`), which uses pickle and is
really important to assure low load times of modules like ``numpy``.
-... | 29.724928 | 88 | 0.618662 |
fe07b0d65355435bfe80638b0233d70fcb2d730a | 6,277 | py | Python | sandia_hand/ros/sandia_hand_teleop/simple_grasp/simple_grasp.py | adarshrs/Drone-Simulator-for-ROS-Kinetic | a44eef1bcaacc55539325bba663f0c8abfd7c75b | [
"MIT"
] | null | null | null | sandia_hand/ros/sandia_hand_teleop/simple_grasp/simple_grasp.py | adarshrs/Drone-Simulator-for-ROS-Kinetic | a44eef1bcaacc55539325bba663f0c8abfd7c75b | [
"MIT"
] | null | null | null | sandia_hand/ros/sandia_hand_teleop/simple_grasp/simple_grasp.py | adarshrs/Drone-Simulator-for-ROS-Kinetic | a44eef1bcaacc55539325bba663f0c8abfd7c75b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#
# Software License Agreement (Apache License)
#
# Copyright 2013 Open Source Robotics Foundation
# Author: Morgan Quigley
#
# 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 ... | 37.142012 | 121 | 0.58563 |
fe07d62ba16713663bde826dc0ce1fe3d2c478fc | 1,680 | py | Python | ui/ui_prestamo_libros.py | edzzn/Manejo_Liberia | c735d35b32fc53839acfc48d4e088e69983edf16 | [
"MIT"
] | null | null | null | ui/ui_prestamo_libros.py | edzzn/Manejo_Liberia | c735d35b32fc53839acfc48d4e088e69983edf16 | [
"MIT"
] | null | null | null | ui/ui_prestamo_libros.py | edzzn/Manejo_Liberia | c735d35b32fc53839acfc48d4e088e69983edf16 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'PrestamoDeLibros.ui'
#
# Created by: PyQt4 UI code generator 4.11.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
try:
_enc... | 31.111111 | 79 | 0.689881 |
fe099e17f120425cb619611e6ff40d2da802127d | 3,572 | py | Python | src/zope/app/content/__init__.py | zopefoundation/zope.app.content | d4c0276ff90bceed2156d808ab6b42b85d7b3810 | [
"ZPL-2.1"
] | null | null | null | src/zope/app/content/__init__.py | zopefoundation/zope.app.content | d4c0276ff90bceed2156d808ab6b42b85d7b3810 | [
"ZPL-2.1"
] | 1 | 2017-04-22T19:53:21.000Z | 2017-04-23T16:44:58.000Z | src/zope/app/content/__init__.py | zopefoundation/zope.app.content | d4c0276ff90bceed2156d808ab6b42b85d7b3810 | [
"ZPL-2.1"
] | 1 | 2015-04-03T07:35:01.000Z | 2015-04-03T07:35:01.000Z | ##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 27.060606 | 78 | 0.606663 |
fe0a261cca22dd0888b296d89b5ce6c47723b470 | 4,569 | py | Python | python-modules/robcoewmrobotconfigurator/robcoewmrobotconfigurator/run.py | yschiebelhut/ewm-cloud-robotics | bdf3a6c13850d266b70168912494300c32d4d803 | [
"Apache-2.0"
] | null | null | null | python-modules/robcoewmrobotconfigurator/robcoewmrobotconfigurator/run.py | yschiebelhut/ewm-cloud-robotics | bdf3a6c13850d266b70168912494300c32d4d803 | [
"Apache-2.0"
] | null | null | null | python-modules/robcoewmrobotconfigurator/robcoewmrobotconfigurator/run.py | yschiebelhut/ewm-cloud-robotics | bdf3a6c13850d266b70168912494300c32d4d803 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# encoding: utf-8
#
# Copyright (c) 2019 SAP SE or an SAP affiliate company. All rights reserved.
#
# This file is part of ewm-cloud-robotics
# (see https://github.com/SAP/ewm-cloud-robotics).
#
# This file is licensed under the Apache Software License, v. 2 except as noted
# otherwise in the LIC... | 33.595588 | 98 | 0.661633 |
fe0a42ffd316cd292e323db6162852aaf54d8093 | 37 | py | Python | website/addons/forward/views/__init__.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 1 | 2015-10-02T18:35:53.000Z | 2015-10-02T18:35:53.000Z | website/addons/forward/views/__init__.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 13 | 2020-03-24T15:29:41.000Z | 2022-03-11T23:15:28.000Z | website/addons/forward/views/__init__.py | DanielSBrown/osf.io | 98dda2ac237377197acacce78274bc0a4ce8f303 | [
"Apache-2.0"
] | 1 | 2019-07-16T00:14:49.000Z | 2019-07-16T00:14:49.000Z | from . import config, widget # noqa
| 18.5 | 36 | 0.702703 |
fe0ae5c8386d6c3d6f937a81ff9888fef7e3e87d | 215 | py | Python | hwtest/automated/usb3_test.py | crvallance/wlanpi-hwtest | 8858ef6e8fa78767238b968b121b4d5ab2155701 | [
"MIT"
] | null | null | null | hwtest/automated/usb3_test.py | crvallance/wlanpi-hwtest | 8858ef6e8fa78767238b968b121b4d5ab2155701 | [
"MIT"
] | null | null | null | hwtest/automated/usb3_test.py | crvallance/wlanpi-hwtest | 8858ef6e8fa78767238b968b121b4d5ab2155701 | [
"MIT"
] | null | null | null | from hwtest.shell_utils import run_command
def test_linux_usb3hub():
"""
Test for Linux Foundation 3.0 root hub in `lsusb` output
"""
resp = run_command(["lsusb"])
assert "1d6b:0003" in resp
| 17.916667 | 60 | 0.665116 |
fe0d4c9278280b1296bb8358bef8f6502e5d0540 | 82,820 | py | Python | ninjabackend.py | tp-m/meson | 2d1aa395e86848ca948d30d83cc5357777e5b490 | [
"Apache-2.0"
] | null | null | null | ninjabackend.py | tp-m/meson | 2d1aa395e86848ca948d30d83cc5357777e5b490 | [
"Apache-2.0"
] | null | null | null | ninjabackend.py | tp-m/meson | 2d1aa395e86848ca948d30d83cc5357777e5b490 | [
"Apache-2.0"
] | null | null | null | # Copyright 2012-2014 The Meson development team
# 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... | 45.630854 | 176 | 0.589942 |
fe0def896199f4c5334b061cf90749e18fdcc0bd | 223 | py | Python | tests/strategies/common/test_cputime.py | y-tetsu/othello | 73eabfe22d6b44bbfa0b436e6287e3e7356620f4 | [
"MIT"
] | 10 | 2020-07-24T22:04:51.000Z | 2022-03-25T06:09:48.000Z | tests/strategies/common/test_cputime.py | y-tetsu/othello | 73eabfe22d6b44bbfa0b436e6287e3e7356620f4 | [
"MIT"
] | 12 | 2021-04-30T09:53:18.000Z | 2022-02-25T04:16:02.000Z | tests/strategies/common/test_cputime.py | y-tetsu/othello | 73eabfe22d6b44bbfa0b436e6287e3e7356620f4 | [
"MIT"
] | 1 | 2021-11-25T13:12:32.000Z | 2021-11-25T13:12:32.000Z | """Tests of cputime.py
"""
import unittest
from reversi.strategies.common import CPU_TIME
| 15.928571 | 46 | 0.690583 |
fe0ede7a40a877fbc5bae0945b61462c0561098f | 5,249 | py | Python | experiments/cifar10_recon.py | coopersigrist/RecurrentNeuralSystem- | bd5bb680ec7f2166547709195f7bb3cd52cca5e8 | [
"MIT"
] | 3 | 2021-03-03T20:08:34.000Z | 2021-03-19T15:27:58.000Z | experiments/cifar10_recon.py | coopersigrist/RecurrentNeuralSystem- | bd5bb680ec7f2166547709195f7bb3cd52cca5e8 | [
"MIT"
] | null | null | null | experiments/cifar10_recon.py | coopersigrist/RecurrentNeuralSystem- | bd5bb680ec7f2166547709195f7bb3cd52cca5e8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""ReNS experiments - CIFAR10
Automatically generated by Colaboratory.
Original file is located at
https://colab.research.google.com/drive/1byZ4xTfCK2x1Rhkxpl-Vv4sqA-bo4bis
# SETUP
"""
#@title Insatlling Pyorch
# !pip install torch
# !pip install torchvision
#@title Import Dependencies... | 29.994286 | 98 | 0.649076 |
fe0f496060ed3aa777376eab607ac140da6babfa | 1,400 | py | Python | horizon/forms/__init__.py | ameoba/horizon | ff9e367c98a8bb79f10914abffaaa04b0a461819 | [
"Apache-2.0"
] | 2 | 2019-12-29T09:20:13.000Z | 2020-01-01T13:12:34.000Z | horizon/forms/__init__.py | yongquanf/horizon | 9aad7fd6f66588fed7c27b720642e47a4a12854b | [
"Apache-2.0"
] | 10 | 2015-02-19T20:27:04.000Z | 2017-05-15T15:04:32.000Z | horizon/forms/__init__.py | yongquanf/horizon | 9aad7fd6f66588fed7c27b720642e47a4a12854b | [
"Apache-2.0"
] | 4 | 2015-05-05T08:17:28.000Z | 2020-02-05T10:47:06.000Z | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, 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
#
# ... | 36.842105 | 78 | 0.784286 |
fe10f333391851cb33d5c6c2715480481922b0d0 | 2,993 | py | Python | heat/tests/test_rpc_listener_client.py | noironetworks/heat | 7cdadf1155f4d94cf8f967635b98e4012a7acfb7 | [
"Apache-2.0"
] | 1 | 2015-12-18T21:46:55.000Z | 2015-12-18T21:46:55.000Z | heat/tests/test_rpc_listener_client.py | noironetworks/heat | 7cdadf1155f4d94cf8f967635b98e4012a7acfb7 | [
"Apache-2.0"
] | 5 | 2019-08-14T06:46:03.000Z | 2021-12-13T20:01:25.000Z | heat/tests/test_rpc_listener_client.py | noironetworks/heat | 7cdadf1155f4d94cf8f967635b98e4012a7acfb7 | [
"Apache-2.0"
] | 3 | 2018-07-19T17:43:37.000Z | 2019-11-15T22:13:30.000Z | # 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
# distributed under the... | 42.15493 | 74 | 0.687604 |
fe116c1174a46647c502098395333cc909588b1c | 684 | py | Python | amadeus/travel/trip_parser_jobs/_status.py | akshitsingla/amadeus-python | d8f3595e556b674998156f98d8a318045bb4c21c | [
"MIT"
] | 125 | 2018-04-09T07:27:24.000Z | 2022-02-22T11:45:20.000Z | amadeus/travel/trip_parser_jobs/_status.py | akshitsingla/amadeus-python | d8f3595e556b674998156f98d8a318045bb4c21c | [
"MIT"
] | 58 | 2018-03-29T14:58:01.000Z | 2022-03-17T10:18:07.000Z | amadeus/travel/trip_parser_jobs/_status.py | akshitsingla/amadeus-python | d8f3595e556b674998156f98d8a318045bb4c21c | [
"MIT"
] | 58 | 2018-04-06T10:56:20.000Z | 2022-03-04T01:23:24.000Z | from amadeus.client.decorator import Decorator
| 28.5 | 76 | 0.627193 |
fe12421e5a8c03bfd1fbb0c021c5255e880a14d5 | 7,737 | py | Python | tools/third_party/iniconfig/testing/test_iniconfig.py | meyerweb/wpt | f04261533819893c71289614c03434c06856c13e | [
"BSD-3-Clause"
] | 2,479 | 2018-05-28T14:51:29.000Z | 2022-03-30T14:41:18.000Z | tools/third_party/iniconfig/testing/test_iniconfig.py | meyerweb/wpt | f04261533819893c71289614c03434c06856c13e | [
"BSD-3-Clause"
] | 7,642 | 2018-05-28T09:38:03.000Z | 2022-03-31T20:55:48.000Z | tools/third_party/iniconfig/testing/test_iniconfig.py | meyerweb/wpt | f04261533819893c71289614c03434c06856c13e | [
"BSD-3-Clause"
] | 1,303 | 2018-05-29T14:50:02.000Z | 2022-03-30T17:30:42.000Z | import py
import pytest
from iniconfig import IniConfig, ParseError, __all__ as ALL
from iniconfig import iscommentline
from textwrap import dedent
check_tokens = {
'section': (
'[section]',
[(0, 'section', None, None)]
),
'value': (
'value = 1',
[(0, None, 'value', '1')]
... | 24.561905 | 73 | 0.586145 |
fe13276650bb177fc42299abc71b473c1a0414dc | 3,586 | py | Python | jskparser/jskparser/util.py | natebragg/java-sketch | f5ac26f2cc46ae4556f9a61c55afd37f55c961ff | [
"MIT"
] | 15 | 2015-12-15T18:33:50.000Z | 2021-09-29T11:48:54.000Z | jskparser/jskparser/util.py | natebragg/java-sketch | f5ac26f2cc46ae4556f9a61c55afd37f55c961ff | [
"MIT"
] | 11 | 2015-11-16T22:14:58.000Z | 2021-09-23T05:28:40.000Z | jskparser/jskparser/util.py | natebragg/java-sketch | f5ac26f2cc46ae4556f9a61c55afd37f55c961ff | [
"MIT"
] | 8 | 2015-11-16T21:50:08.000Z | 2021-03-23T15:15:34.000Z | import os
from subprocess import call
from . import glob2
pwd = os.path.dirname(__file__)
"""
handling javajskparser AST
"""
| 54.333333 | 209 | 0.663971 |
fe133101724c39453da53bbd1a90715fd62fd7e1 | 24,301 | py | Python | fiftyone/core/patches.py | SNeugber/fiftyone | a50be47bbbf189e4bbdcd631b93c4c9cbf41c6b7 | [
"Apache-2.0"
] | null | null | null | fiftyone/core/patches.py | SNeugber/fiftyone | a50be47bbbf189e4bbdcd631b93c4c9cbf41c6b7 | [
"Apache-2.0"
] | null | null | null | fiftyone/core/patches.py | SNeugber/fiftyone | a50be47bbbf189e4bbdcd631b93c4c9cbf41c6b7 | [
"Apache-2.0"
] | null | null | null | """
Patches views.
| Copyright 2017-2021, Voxel51, Inc.
| `voxel51.com <https://voxel51.com/>`_
|
"""
from copy import deepcopy
import eta.core.utils as etau
import fiftyone.core.aggregations as foa
import fiftyone.core.dataset as fod
import fiftyone.core.fields as fof
import fiftyone.core.labels as fol
import fifty... | 32.186755 | 104 | 0.607876 |
fe13f782ba0630659072cb056a27d408b76a7090 | 1,973 | py | Python | {{cookiecutter.repo_name}}/setup.py | ocesaulo/cookiecutter-ocn_sci | d41e826f56ba67cfde878ffc8188d497214a5f5b | [
"MIT"
] | null | null | null | {{cookiecutter.repo_name}}/setup.py | ocesaulo/cookiecutter-ocn_sci | d41e826f56ba67cfde878ffc8188d497214a5f5b | [
"MIT"
] | null | null | null | {{cookiecutter.repo_name}}/setup.py | ocesaulo/cookiecutter-ocn_sci | d41e826f56ba67cfde878ffc8188d497214a5f5b | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""The setup script."""
from setuptools import setup, find_packages
with open('README.rst') as readme_file:
readme = readme_file.read()
{%- set license_classifiers = {
'MIT license': 'License :: OSI Approved :: MIT License',
'BSD license': 'License :: OSI A... | 34.614035 | 103 | 0.667511 |
fe14a23d28223212d47c4b4e15846d9b001de45c | 6,153 | py | Python | src/zope/app/debug/debug.py | zopefoundation/zope.app.debug | 4f31e98f6a633f089bf132dd55cb3ead0270887b | [
"ZPL-2.1"
] | null | null | null | src/zope/app/debug/debug.py | zopefoundation/zope.app.debug | 4f31e98f6a633f089bf132dd55cb3ead0270887b | [
"ZPL-2.1"
] | 2 | 2017-05-08T10:46:20.000Z | 2021-02-02T07:16:49.000Z | src/zope/app/debug/debug.py | zopefoundation/zope.app.debug | 4f31e98f6a633f089bf132dd55cb3ead0270887b | [
"ZPL-2.1"
] | 1 | 2015-04-03T07:36:10.000Z | 2015-04-03T07:36:10.000Z | ##############################################################################
#
# Copyright (c) 2002 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | 29.868932 | 78 | 0.57988 |
fe1507ff94aad4e4172a286172e136314812d8b6 | 1,855 | py | Python | transfer_learning.py | terryli710/SIIM-ACR-Pneumothorax-Classification | 8b278a9885b71c919d7064b2df42863b53f7adf3 | [
"MIT"
] | null | null | null | transfer_learning.py | terryli710/SIIM-ACR-Pneumothorax-Classification | 8b278a9885b71c919d7064b2df42863b53f7adf3 | [
"MIT"
] | null | null | null | transfer_learning.py | terryli710/SIIM-ACR-Pneumothorax-Classification | 8b278a9885b71c919d7064b2df42863b53f7adf3 | [
"MIT"
] | 1 | 2020-05-14T06:16:12.000Z | 2020-05-14T06:16:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Mon May 18 22:42:54 2020
@author: mike
"""
import numpy as np
import tensorflow as tf
from tensorflow import keras
from sklearn.model_selection import train_test_split
from tensorflow.keras.applications import VGG16
from tensorflow.keras import layers
fro... | 26.884058 | 117 | 0.725067 |
fe15525a101c45bc65c1049e9b6ece9e4cd29f69 | 2,158 | py | Python | core/tests/test_polyflow/test_workflows/test_hyperband.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | core/tests/test_polyflow/test_workflows/test_hyperband.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | core/tests/test_polyflow/test_workflows/test_hyperband.py | erexer/polyaxon | be14dae1ed56d568983388736bcdaf27a7baa4a4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
#
# Copyright 2018-2020 Polyaxon, 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 ... | 35.377049 | 79 | 0.672845 |
fe1823b5cc5e17b94ed66896e05441088fc1ee56 | 1,503 | py | Python | Class Work oop.py | fatimatswanya/fatimaCSC102 | cab70bd696d39a9e16bcb57e0180e872be4f49bc | [
"MIT"
] | null | null | null | Class Work oop.py | fatimatswanya/fatimaCSC102 | cab70bd696d39a9e16bcb57e0180e872be4f49bc | [
"MIT"
] | null | null | null | Class Work oop.py | fatimatswanya/fatimaCSC102 | cab70bd696d39a9e16bcb57e0180e872be4f49bc | [
"MIT"
] | null | null | null |
studendt1 = Student('James Kaka', '021074', 'M','Amethyst','16', '49')
print(studendt1.getName())
studendt1.setName('James Gaga')
print(studendt1.getName())
Student.PAUNanthem() | 26.368421 | 93 | 0.632069 |
fe185aaa73619017a36f547b25642264993ebd15 | 1,820 | py | Python | clickhouse_sqlalchemy/drivers/reflection.py | Fozar/clickhouse-sqlalchemy | 88fd630856655cc470430b365dce7e85516abf62 | [
"MIT"
] | null | null | null | clickhouse_sqlalchemy/drivers/reflection.py | Fozar/clickhouse-sqlalchemy | 88fd630856655cc470430b365dce7e85516abf62 | [
"MIT"
] | null | null | null | clickhouse_sqlalchemy/drivers/reflection.py | Fozar/clickhouse-sqlalchemy | 88fd630856655cc470430b365dce7e85516abf62 | [
"MIT"
] | null | null | null | from sqlalchemy.engine import reflection
from clickhouse_sqlalchemy import Table, engines
| 33.703704 | 78 | 0.621978 |
fe18f53bb174876b9174543e0887f93aad3f8c21 | 6,686 | py | Python | tests/test_disque.py | abdul-khalid/pydisque | a9b5caa6dac0621a0174d168f4a04c88d0e2f8b5 | [
"MIT"
] | 1 | 2019-02-28T09:48:22.000Z | 2019-02-28T09:48:22.000Z | tests/test_disque.py | abdul-khalid/pydisque | a9b5caa6dac0621a0174d168f4a04c88d0e2f8b5 | [
"MIT"
] | null | null | null | tests/test_disque.py | abdul-khalid/pydisque | a9b5caa6dac0621a0174d168f4a04c88d0e2f8b5 | [
"MIT"
] | null | null | null | """
Unit Tests for the pydisque module.
Currently, most of these tests require a fresh instance of
Disque to be valid and pass.
"""
import unittest
import json
import time
import random
import six
from pydisque.client import Client
from redis.exceptions import ResponseError
if __name__ == '__main__':
unittest.m... | 28.695279 | 76 | 0.588095 |
fe190819e431106bd53c08a681b3911ad9502e88 | 6,289 | py | Python | src/runner.py | samirsahoo007/Naive-Bayes-and-Decision-Tree-Classifiers | 619c5c0b17438d1014f7ca7e4ce13cc44c45de3c | [
"MIT"
] | 1 | 2020-11-17T16:09:13.000Z | 2020-11-17T16:09:13.000Z | src/runner.py | samirsahoo007/Naive-Bayes-and-Decision-Tree-Classifiers | 619c5c0b17438d1014f7ca7e4ce13cc44c45de3c | [
"MIT"
] | null | null | null | src/runner.py | samirsahoo007/Naive-Bayes-and-Decision-Tree-Classifiers | 619c5c0b17438d1014f7ca7e4ce13cc44c45de3c | [
"MIT"
] | 4 | 2019-07-05T02:03:02.000Z | 2022-01-21T22:12:16.000Z | # -*- coding: utf-8 -*- #
"""*********************************************************************************************"""
# FileName [ runner.py ]
# Synopsis [ main program that runs the 'Naive Bayes' and 'Decision Tree' training / testing ]
# Author [ Ting-Wei Liu (Andi611) ]
# Copyright [... | 38.582822 | 151 | 0.690253 |
fe195c652a959304ac79843bfd7f33439351fd89 | 7,393 | py | Python | igibson/metrics/agent.py | Nick-AhSen/iGibson | c6854f11eec5d935fa3ef3d6d4852c6571beab4b | [
"MIT"
] | null | null | null | igibson/metrics/agent.py | Nick-AhSen/iGibson | c6854f11eec5d935fa3ef3d6d4852c6571beab4b | [
"MIT"
] | null | null | null | igibson/metrics/agent.py | Nick-AhSen/iGibson | c6854f11eec5d935fa3ef3d6d4852c6571beab4b | [
"MIT"
] | null | null | null | import copy
import numpy as np
import pybullet as p
from igibson.metrics.metric_base import MetricBase
| 38.305699 | 116 | 0.581631 |
fe1a8e41b9a6dd96ffc12066b0bee8e9c0b3b6b6 | 438 | py | Python | fontslice/__init__.py | Arahabica/font-subset-css | 393b9a452af49c2168c7a9f84983e4170937ea67 | [
"MIT"
] | null | null | null | fontslice/__init__.py | Arahabica/font-subset-css | 393b9a452af49c2168c7a9f84983e4170937ea67 | [
"MIT"
] | null | null | null | fontslice/__init__.py | Arahabica/font-subset-css | 393b9a452af49c2168c7a9f84983e4170937ea67 | [
"MIT"
] | null | null | null | import sys
from .main import (
_chunk_list,
_get_unicode_range_hash,
convert_unicode_range,
get_120_unicode_ranges,
get_unicode_ranges_from_text,
generate_css,
main,
)
__all__ = [
"_chunk_list",
"_get_unicode_range_hash",
"convert_unicode_range",
"get_120_unicode_ranges",
... | 17.52 | 35 | 0.687215 |
fe1c00d5c2481798d64766027364e0e668d8c7bc | 59,866 | py | Python | src/ttkbootstrap/dialogs/dialogs.py | MrJaatt/ttkbootstrap | 4e837d64859e5a230ef0500faddbb2c384f5b9d4 | [
"MIT"
] | 1 | 2022-01-28T09:37:32.000Z | 2022-01-28T09:37:32.000Z | src/ttkbootstrap/dialogs/dialogs.py | MrJaatt/ttkbootstrap | 4e837d64859e5a230ef0500faddbb2c384f5b9d4 | [
"MIT"
] | null | null | null | src/ttkbootstrap/dialogs/dialogs.py | MrJaatt/ttkbootstrap | 4e837d64859e5a230ef0500faddbb2c384f5b9d4 | [
"MIT"
] | null | null | null | """
This module contains various base dialog base classes that can be
used to create custom dialogs for the end user.
These classes serve as the basis for the pre-defined static helper
methods in the `Messagebox`, and `Querybox` container classes.
"""
import calendar
import textwrap
from datetime im... | 33.65149 | 105 | 0.568219 |
a3a6ae7f4fab920589a878c0b0e9e7fa6a88c26a | 2,504 | py | Python | Google-Play-Store-App-Rating/code.py | venky4121994/ga-learner-dsmp-repo | 1bef03489931eece0d5ecb9ce0501dfeb558dc59 | [
"MIT"
] | null | null | null | Google-Play-Store-App-Rating/code.py | venky4121994/ga-learner-dsmp-repo | 1bef03489931eece0d5ecb9ce0501dfeb558dc59 | [
"MIT"
] | null | null | null | Google-Play-Store-App-Rating/code.py | venky4121994/ga-learner-dsmp-repo | 1bef03489931eece0d5ecb9ce0501dfeb558dc59 | [
"MIT"
] | null | null | null | # --------------
#Importing header files
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
#Code starts here
data = pd.read_csv(path)
data.hist(['Rating'])
data = data[data['Rating']<=5]
data.hist(['Rating'])
#Code ends here
# --------------
# code starts here
total_null = data.isnull().s... | 25.55102 | 89 | 0.680112 |
a3a6e52033cd00d1b8f29b49e45d1f519baff3e9 | 6,597 | py | Python | converters/brat2iob.py | Banguiskode/nerds | 366420b2ec57bf790562de62a79f4973cbd6b3ed | [
"BSD-3-Clause"
] | 15 | 2019-12-05T18:40:22.000Z | 2021-02-20T05:34:50.000Z | converters/brat2iob.py | Banguiskode/nerds | 366420b2ec57bf790562de62a79f4973cbd6b3ed | [
"BSD-3-Clause"
] | null | null | null | converters/brat2iob.py | Banguiskode/nerds | 366420b2ec57bf790562de62a79f4973cbd6b3ed | [
"BSD-3-Clause"
] | 4 | 2019-12-30T13:03:05.000Z | 2021-02-16T13:08:09.000Z | import argparse
import operator
import os
import re
import shutil
import spacy
import tempfile
from nerds.utils import spans_to_tokens, get_logger
def segment_text_to_sentences(text_file, sentence_splitter):
""" Segment text into sentences. Text is provided by BRAT in .txt
file.
Args:
... | 36.854749 | 167 | 0.618463 |
a3a738f0c10019d9229ed8e9b93898831920170d | 2,503 | py | Python | kraken/lib/util.py | zjsteyn/kraken | eaa9f4290db5425ddf80d0aebfa3944713558ab5 | [
"Apache-2.0"
] | 1 | 2022-02-03T14:41:58.000Z | 2022-02-03T14:41:58.000Z | kraken/lib/util.py | ephenum/kraken | 47be8f7ddcb7c7ad63bfc5636df1976a4e84a5f0 | [
"Apache-2.0"
] | null | null | null | kraken/lib/util.py | ephenum/kraken | 47be8f7ddcb7c7ad63bfc5636df1976a4e84a5f0 | [
"Apache-2.0"
] | 1 | 2022-01-19T10:53:20.000Z | 2022-01-19T10:53:20.000Z | """
Ocropus's magic PIL-numpy array conversion routines. They express slightly
different behavior from PIL.Image.toarray().
"""
import unicodedata
import numpy as np
from PIL import Image
__all__ = ['pil2array', 'array2pil']
def is_bitonal(im: Image.Image) -> bool:
"""
Tests a PIL.Image for bitonality.
... | 27.811111 | 77 | 0.582901 |
a3a7f40bcb06653665d3b8d30577d4282cd0f05f | 2,877 | py | Python | analysis/calculate_holding_amount.py | hao44le/ico_top_holder_analysis | aeeab01c90e4446b424c52c33a68ccb814123121 | [
"MIT"
] | 538 | 2018-07-04T21:14:52.000Z | 2022-03-26T15:16:08.000Z | analysis/calculate_holding_amount.py | hao44le/ico_top_holder_analysis | aeeab01c90e4446b424c52c33a68ccb814123121 | [
"MIT"
] | 4 | 2018-07-08T22:11:32.000Z | 2021-12-13T19:48:38.000Z | analysis/calculate_holding_amount.py | hao44le/ico_top_holder_analysis | aeeab01c90e4446b424c52c33a68ccb814123121 | [
"MIT"
] | 52 | 2018-07-05T12:07:37.000Z | 2021-04-05T23:34:20.000Z | import sys
sys.path.insert(0,'..')
from data.whale_data import exchnage_accounts
from data.html_helper import check_if_address_name_exists
from data.whale_eth_tx_data import *
from data.whale_token_tx_data import identify_investor_type_token
holding_account = "holding_account"
deposit_account = 'deposit_account'
withd... | 29.96875 | 91 | 0.642336 |
a3a80291d5fdb7e2a418a7fbbb6542744e0db4d2 | 66,926 | py | Python | textbox/trainer/trainer.py | JBoRu/TextBox-1 | 0dcbaa153acc507e3d55075312d7ca5d23146e03 | [
"MIT"
] | 1 | 2021-08-12T01:08:09.000Z | 2021-08-12T01:08:09.000Z | textbox/trainer/trainer.py | JBoRu/TextBox-1 | 0dcbaa153acc507e3d55075312d7ca5d23146e03 | [
"MIT"
] | null | null | null | textbox/trainer/trainer.py | JBoRu/TextBox-1 | 0dcbaa153acc507e3d55075312d7ca5d23146e03 | [
"MIT"
] | null | null | null | # @Time : 2020/11/14
# @Author : Junyi Li, Gaole He
# @Email : lijunyi@ruc.edu.cn
# UPDATE:
# @Time : 2020/12/2, 2020/11/27, 2020/12/3, 2020/12/26
# @Author : Jinhao Jiang, Xiaoxuan Hu, Tianyi Tang, Jinhao Jiang
# @Email : jiangjinhao@std.uestc.edu.cn, huxiaoxuan@ruc.edu.cn, steventang@ruc.edu.cn, jiangjinhao@st... | 45.997251 | 146 | 0.621836 |
a3a8234ec61d7794c6426793212657ac24a62f4a | 649 | py | Python | rsserpent/plugins/builtin/__init__.py | EurusEurus/RSSerpent | fd7aaf67b80b2b48c14b1a3efe733374b0012338 | [
"MIT"
] | null | null | null | rsserpent/plugins/builtin/__init__.py | EurusEurus/RSSerpent | fd7aaf67b80b2b48c14b1a3efe733374b0012338 | [
"MIT"
] | null | null | null | rsserpent/plugins/builtin/__init__.py | EurusEurus/RSSerpent | fd7aaf67b80b2b48c14b1a3efe733374b0012338 | [
"MIT"
] | null | null | null | from ...models import Persona, Plugin
from . import example, example_cache, example_ratelimit, example_with_args
plugin = Plugin(
name="rsserpent-plugin-builtin",
author=Persona(
name="queensferryme",
link="https://github.com/queensferryme",
email="queensferry.me@gmail.com",
),
... | 28.217391 | 74 | 0.682589 |
a3a86ac522e7ca59c54af2df1492f75fd0ad7b3e | 2,859 | py | Python | data_processing/process_xls.py | luisroel91/libdib_assesment | c969cfecbce1243b457961ffafe5caaea7bb5149 | [
"MIT"
] | null | null | null | data_processing/process_xls.py | luisroel91/libdib_assesment | c969cfecbce1243b457961ffafe5caaea7bb5149 | [
"MIT"
] | null | null | null | data_processing/process_xls.py | luisroel91/libdib_assesment | c969cfecbce1243b457961ffafe5caaea7bb5149 | [
"MIT"
] | null | null | null | import pandas as pd
# Define our header
col_names = [
"year",
"num_males_with_income",
"male_median_income_curr_dollars",
"male_median_income_2019_dollars",
"num_females_with_income",
"female_median_income_curr_dollars",
"female_median_income_2019_dollars",
]
# Load Asian census data XLS, ... | 24.646552 | 82 | 0.671913 |
a3aa7d175c4008d278417caf82ba36b9fb655fda | 520 | py | Python | Section_1/Exercise_16.py | Szymon-Budziak/WDI_exercises_solutions | 51ffc9ec8b3cd6809bd55e98ecb8aed759c2d460 | [
"MIT"
] | null | null | null | Section_1/Exercise_16.py | Szymon-Budziak/WDI_exercises_solutions | 51ffc9ec8b3cd6809bd55e98ecb8aed759c2d460 | [
"MIT"
] | null | null | null | Section_1/Exercise_16.py | Szymon-Budziak/WDI_exercises_solutions | 51ffc9ec8b3cd6809bd55e98ecb8aed759c2d460 | [
"MIT"
] | 1 | 2021-11-21T09:38:33.000Z | 2021-11-21T09:38:33.000Z | """
Dany jest cig okrelony wzorem: A[n+1] = (A[n] % 2) (3 A[n] + 1) + (1 A[n] % 2) A[n] / 2.
Startujc z dowolnej liczby naturalnej > 1 cig ten osiga warto 1. Napisa program, ktry
znajdzie wyraz pocztkowy z przedziau 2-10000 dla ktrego warto 1 jest osigalna po najwikszej
liczbie krokw.
"""
a0 = 2
m = 1
for a0 in ra... | 27.368421 | 98 | 0.542308 |
a3ac4915a74b531c1dc0b8afb60e2d05592076cd | 61,910 | py | Python | SysPy_ver/funcs/_var_declaration.py | evlog/SysPy | d1ee6e2ca60492d20339c0016a9c24d027170553 | [
"CNRI-Python"
] | 4 | 2017-12-28T14:00:16.000Z | 2021-01-21T08:53:14.000Z | SysPy_ver/funcs/_var_declaration.py | evlog/SysPy | d1ee6e2ca60492d20339c0016a9c24d027170553 | [
"CNRI-Python"
] | 1 | 2018-07-31T16:27:00.000Z | 2018-07-31T16:27:37.000Z | SysPy_ver/funcs/_var_declaration.py | evlog/SysPy | d1ee6e2ca60492d20339c0016a9c24d027170553 | [
"CNRI-Python"
] | 2 | 2015-10-12T09:13:13.000Z | 2020-01-06T12:22:55.000Z | """
*****************************************************************************
*
H E A D E R I N F O R M A T I O N *
*
****... | 85.866852 | 356 | 0.37351 |
a3ac7f877a13b1b1d1be58575a8e398e8062fac9 | 190 | py | Python | Giraffe/Functions.py | MaggieIllustrations/softuni-github-programming | f5695cb14602f3d2974359f6d8734332acc650d3 | [
"MIT"
] | null | null | null | Giraffe/Functions.py | MaggieIllustrations/softuni-github-programming | f5695cb14602f3d2974359f6d8734332acc650d3 | [
"MIT"
] | null | null | null | Giraffe/Functions.py | MaggieIllustrations/softuni-github-programming | f5695cb14602f3d2974359f6d8734332acc650d3 | [
"MIT"
] | 1 | 2022-01-14T17:12:44.000Z | 2022-01-14T17:12:44.000Z |
say_hi("Mike", "35")
result = cube(4) # variable
print(result)
| 11.875 | 47 | 0.6 |
a3aceb33684c4eb53e7c078943f4c37d7dd1af91 | 4,321 | py | Python | airspace_surgery.py | wipfli/airspaces | c2e01615fa6a065895ed04b8f342a38732e9196b | [
"Apache-2.0"
] | 1 | 2021-12-28T23:40:51.000Z | 2021-12-28T23:40:51.000Z | airspace_surgery.py | wipfli/airspaces | c2e01615fa6a065895ed04b8f342a38732e9196b | [
"Apache-2.0"
] | 1 | 2021-01-30T13:15:14.000Z | 2021-02-07T14:50:27.000Z | airspace_surgery.py | wipfli/aviation | c2e01615fa6a065895ed04b8f342a38732e9196b | [
"Apache-2.0"
] | null | null | null | import glob
import json
path_in = './airspaces/'
path_out = './airspaces_processed/'
filenames = [path.split('/')[-1] for path in glob.glob(path_in + '*')]
remove = {
'france_fr.geojson': [
314327,
314187,
314360,
314359,
314362,
314361,
314364,
314... | 34.023622 | 125 | 0.532053 |
a3ad80bfdfa53d706abcbf25b9e00b65302a112a | 1,480 | py | Python | AndroidSpider/spider_main.py | lidenghong1/SmallReptileTraining | a1bfb81c9969edfb7554acc50370c0cb036da690 | [
"MIT"
] | 1 | 2018-05-10T01:52:37.000Z | 2018-05-10T01:52:37.000Z | AndroidSpider/spider_main.py | lidenghong1/SmallReptileTraining | a1bfb81c9969edfb7554acc50370c0cb036da690 | [
"MIT"
] | null | null | null | AndroidSpider/spider_main.py | lidenghong1/SmallReptileTraining | a1bfb81c9969edfb7554acc50370c0cb036da690 | [
"MIT"
] | null | null | null | from AndroidSpider import url_manager, html_downloader, html_parser, html_output
'''
Android HTML tab
Extra module:
BeautifulSoup
'''
if __name__ == "__main__":
rootUrl = "http://baike.baidu.com/item/Android"
objSpider = SpiderMain()
objSpider.craw(rootUrl)
| 36.097561 | 141 | 0.597297 |
a3ae0fed36bd78447d3c9b110c995da7eb0ec44e | 517 | py | Python | trompace/mutations/__init__.py | trompamusic/ce-queries-template | cc5ae69d0e76623bfd72e9453f569f6624bf7c3b | [
"Apache-2.0"
] | 1 | 2020-06-18T15:43:18.000Z | 2020-06-18T15:43:18.000Z | trompace/mutations/__init__.py | trompamusic/ce-queries-template | cc5ae69d0e76623bfd72e9453f569f6624bf7c3b | [
"Apache-2.0"
] | 60 | 2019-12-17T11:08:28.000Z | 2021-03-02T16:19:41.000Z | trompace/mutations/__init__.py | trompamusic/trompace-client | cc5ae69d0e76623bfd72e9453f569f6624bf7c3b | [
"Apache-2.0"
] | null | null | null | MUTATION = '''mutation {{
{mutation}
}}'''
def _verify_additional_type(additionaltype):
"""Check that the input to additionaltype is a list of strings.
If it is empty, raise ValueError
If it is a string, convert it to a list of strings."""
if additionaltype is None:
return None
if isins... | 28.722222 | 67 | 0.68472 |
a3ae4f1aada9f0b92aa00f9f17807bd4f8c072c1 | 951 | py | Python | Web_App/infrastructure/infra.py | CapitalOneDevExchangeHackathon/Financial-Fitness | 54a2203d6b3d96687d822247b040613b644874f2 | [
"MIT"
] | null | null | null | Web_App/infrastructure/infra.py | CapitalOneDevExchangeHackathon/Financial-Fitness | 54a2203d6b3d96687d822247b040613b644874f2 | [
"MIT"
] | null | null | null | Web_App/infrastructure/infra.py | CapitalOneDevExchangeHackathon/Financial-Fitness | 54a2203d6b3d96687d822247b040613b644874f2 | [
"MIT"
] | null | null | null | import boto
import boto3
from config import Config
dynamodb = boto3.resource('dynamodb',
aws_access_key_id=Config.AWS_KEY,
aws_secret_access_key=Config.AWS_SECRET_KEY,
region_name=Config.REGION)
table = dynamodb.Table('user_details')
tables... | 22.116279 | 119 | 0.589905 |
a3b0b5f68e1084bc860c329219fb7ebd7ec06dcc | 70 | py | Python | numberTheory/natural.py | ndarwin314/symbolicPy | ce2e48bf1557b5995db6c324ada9fbd4767df1e3 | [
"MIT"
] | null | null | null | numberTheory/natural.py | ndarwin314/symbolicPy | ce2e48bf1557b5995db6c324ada9fbd4767df1e3 | [
"MIT"
] | null | null | null | numberTheory/natural.py | ndarwin314/symbolicPy | ce2e48bf1557b5995db6c324ada9fbd4767df1e3 | [
"MIT"
] | null | null | null | # TODO: implement algorithms in c++ or something to make them fast
| 23.333333 | 67 | 0.728571 |
a3b0debd51a02674a2485fcb5fa43dc82bc97eff | 2,751 | py | Python | SelfTests.py | TeaPackCZ/RobotZed | 7ac8bfb14a6c2e5887f8fed299ad87b384701c54 | [
"MIT"
] | null | null | null | SelfTests.py | TeaPackCZ/RobotZed | 7ac8bfb14a6c2e5887f8fed299ad87b384701c54 | [
"MIT"
] | null | null | null | SelfTests.py | TeaPackCZ/RobotZed | 7ac8bfb14a6c2e5887f8fed299ad87b384701c54 | [
"MIT"
] | null | null | null | import os
import unittest
from Logger import Logger
from gpsNavigation import gpsModule,gpsPoint
if __name__ == '__main__':
unittest.main()
| 31.988372 | 66 | 0.624137 |
a3b19235edf240100e043436d336caa4a2f88321 | 1,986 | py | Python | manga_py/parser.py | Abijithkrishna/manga-py | 03b142ecb944ef37a36e5095ffa580209021e3b0 | [
"MIT"
] | null | null | null | manga_py/parser.py | Abijithkrishna/manga-py | 03b142ecb944ef37a36e5095ffa580209021e3b0 | [
"MIT"
] | null | null | null | manga_py/parser.py | Abijithkrishna/manga-py | 03b142ecb944ef37a36e5095ffa580209021e3b0 | [
"MIT"
] | null | null | null | from logging import warning
from requests import get
from .info import Info
from .provider import Provider
from .providers import get_provider
| 29.205882 | 74 | 0.618832 |
a3b256695d6b1472ade6817590ffa769163e8848 | 487 | py | Python | src/villages/migrations/0008_auto_20161228_2209.py | pwelzel/bornhack-website | af794e6a2fba06e09626259c7768feb30ff394be | [
"BSD-3-Clause"
] | null | null | null | src/villages/migrations/0008_auto_20161228_2209.py | pwelzel/bornhack-website | af794e6a2fba06e09626259c7768feb30ff394be | [
"BSD-3-Clause"
] | null | null | null | src/villages/migrations/0008_auto_20161228_2209.py | pwelzel/bornhack-website | af794e6a2fba06e09626259c7768feb30ff394be | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-28 22:09
from django.db import migrations, models
import django.db.models.deletion
| 22.136364 | 98 | 0.620123 |
a3b29bffdf2e36c45f804f1c4fc3a56bbdcb9b59 | 1,127 | py | Python | customers/views.py | sindhumadhadi09/CustomerMgmt | db8b27ad6ceb8050843dc33509dc2b6c2ed2c1e2 | [
"MIT"
] | null | null | null | customers/views.py | sindhumadhadi09/CustomerMgmt | db8b27ad6ceb8050843dc33509dc2b6c2ed2c1e2 | [
"MIT"
] | null | null | null | customers/views.py | sindhumadhadi09/CustomerMgmt | db8b27ad6ceb8050843dc33509dc2b6c2ed2c1e2 | [
"MIT"
] | null | null | null | from django.shortcuts import get_object_or_404, render
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views import generic
from django.utils import timezone
from .models import Customer
def add_customer(request):
customer = Customer()
customer.customer_firstname = req... | 34.151515 | 59 | 0.759539 |
a3b2f8e0ee7fa10fe388b6e668b6e1e8224ddcfe | 1,531 | py | Python | salt/ext/tornado/test/import_test.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-03-31T22:51:16.000Z | 2020-03-31T22:51:16.000Z | salt/ext/tornado/test/import_test.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | null | null | null | salt/ext/tornado/test/import_test.py | yuriks/salt | d2a5bd8adddb98ec1718d79384aa13b4f37e8028 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-09-30T07:00:01.000Z | 2021-09-30T07:00:01.000Z | # flake8: noqa
# pylint: skip-file
from __future__ import absolute_import, division, print_function
from salt.ext.tornado.test.util import unittest
| 31.244898 | 73 | 0.666884 |
a3b315d5551d6efa8a8b5d2f47e368467747b831 | 3,512 | py | Python | butterfree/configs/db/metastore_config.py | fossabot/butterfree | 8a7da8c540b51c6560b2825cb926c40a351f202b | [
"Apache-2.0"
] | null | null | null | butterfree/configs/db/metastore_config.py | fossabot/butterfree | 8a7da8c540b51c6560b2825cb926c40a351f202b | [
"Apache-2.0"
] | null | null | null | butterfree/configs/db/metastore_config.py | fossabot/butterfree | 8a7da8c540b51c6560b2825cb926c40a351f202b | [
"Apache-2.0"
] | null | null | null | """Holds configurations to read and write with Spark to AWS S3."""
import os
from typing import Any, Dict, List, Optional
from pyspark.sql import DataFrame
from butterfree.configs import environment
from butterfree.configs.db import AbstractWriteConfig
from butterfree.dataframe_service import extract_partition_value... | 29.024793 | 82 | 0.611902 |
a3b384657bc7cd2ab9ee0a1d8b09ee80039ad894 | 2,401 | py | Python | examples/2-objects.py | johanngan/special_relativity | cd372c7460d2c0d4040c81bc1bd0090086dba735 | [
"MIT"
] | 4 | 2020-08-19T04:56:40.000Z | 2022-02-07T22:09:45.000Z | examples/2-objects.py | johanngan/special_relativity | cd372c7460d2c0d4040c81bc1bd0090086dba735 | [
"MIT"
] | null | null | null | examples/2-objects.py | johanngan/special_relativity | cd372c7460d2c0d4040c81bc1bd0090086dba735 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import sys
sys.path.append('..')
import specrel.geom as geom
import specrel.spacetime.physical as phy
import specrel.visualize as vis
# Shared parameters
include_grid = True
include_legend = True
tlim = (0, 2)
xlim = (-2, 2)
# A stationary point object
stationary = phy.MovingObject(0, draw_opt... | 34.797101 | 77 | 0.7197 |
a3b459175d9e5a84e03ca2cd0f4e7e7f14be6f69 | 3,101 | py | Python | firmware/modulator.py | mfkiwl/OpenXcvr | 9bea6efd03cd246f16982f0fadafed684ac5ce1c | [
"MIT"
] | 14 | 2020-02-16T15:36:31.000Z | 2022-03-27T02:24:40.000Z | firmware/modulator.py | mfkiwl/OpenXcvr | 9bea6efd03cd246f16982f0fadafed684ac5ce1c | [
"MIT"
] | 1 | 2020-11-23T16:16:33.000Z | 2020-11-23T16:16:33.000Z | firmware/modulator.py | mfkiwl/OpenXcvr | 9bea6efd03cd246f16982f0fadafed684ac5ce1c | [
"MIT"
] | 4 | 2021-03-29T16:55:03.000Z | 2022-01-23T16:43:59.000Z | from baremetal import *
from math import pi, sin, cos
import sys
from scale import scale
from settings import *
from ssb import ssb_polar
import numpy as np
from matplotlib import pyplot as plt
if __name__ == "__main__" and "sim" in sys.argv:
#mode am stim am
stimulus=(
np.sin(np.arange(1000)*2.... | 29.533333 | 117 | 0.633022 |
a3b4e8143896f099b74b0a3738681f49e357493f | 4,049 | py | Python | tests/sentry/auth/test_helper.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/auth/test_helper.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | tests/sentry/auth/test_helper.py | pierredup/sentry | 0145e4b3bc0e775bf3482fe65f5e1a689d0dbb80 | [
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
from six.moves.urllib.parse import urlencode
from django.test import RequestFactory
from django.contrib.auth.models import AnonymousUser
from sentry.auth.helper import handle_new_user
from sentry.models import AuthProvider, InviteStatus, OrganizationMember
from sentry.testutils ... | 39.31068 | 100 | 0.674241 |
a3b4f00010ceb5e0331d09eb4a19ef587eba8526 | 348 | py | Python | groundstation/broadcast_events/__init__.py | richo/groundstation | 7ed48dd355051ee6b71164fc801e3893c09d11db | [
"MIT"
] | 26 | 2015-06-18T20:17:07.000Z | 2019-09-26T09:55:35.000Z | groundstation/broadcast_events/__init__.py | richo/groundstation | 7ed48dd355051ee6b71164fc801e3893c09d11db | [
"MIT"
] | null | null | null | groundstation/broadcast_events/__init__.py | richo/groundstation | 7ed48dd355051ee6b71164fc801e3893c09d11db | [
"MIT"
] | 5 | 2015-07-20T01:52:47.000Z | 2017-01-08T09:54:07.000Z | from broadcast_ping import BroadcastPing
EVENT_TYPES = {
"PING": BroadcastPing,
}
| 23.2 | 47 | 0.732759 |
a3b55358fffe0e7cc61738673a1b1895170d48c3 | 9,891 | py | Python | mbta_python/__init__.py | dougzor/mbta_python | f277f48f8bf8048cb5c9c6307e672c37292e57f7 | [
"MIT"
] | null | null | null | mbta_python/__init__.py | dougzor/mbta_python | f277f48f8bf8048cb5c9c6307e672c37292e57f7 | [
"MIT"
] | null | null | null | mbta_python/__init__.py | dougzor/mbta_python | f277f48f8bf8048cb5c9c6307e672c37292e57f7 | [
"MIT"
] | null | null | null | import datetime
import requests
from mbta_python.models import Stop, Direction, Schedule, Mode, \
TripSchedule, Alert, StopWithMode, Prediction
HOST = "http://realtime.mbta.com/developer/api/v2"
| 37.324528 | 83 | 0.586897 |
a3b57d8c1a4088165ce4f67e6fb27850615f9653 | 4,583 | py | Python | density_model_torch_custom.py | piotrwinkler/breast_density_classifier | 4d47dd98bb0a839cea8b9aef242f5af5db84f06f | [
"BSD-2-Clause"
] | null | null | null | density_model_torch_custom.py | piotrwinkler/breast_density_classifier | 4d47dd98bb0a839cea8b9aef242f5af5db84f06f | [
"BSD-2-Clause"
] | null | null | null | density_model_torch_custom.py | piotrwinkler/breast_density_classifier | 4d47dd98bb0a839cea8b9aef242f5af5db84f06f | [
"BSD-2-Clause"
] | null | null | null | import argparse
import glob
import os
import numpy as np
import torch
from sklearn.metrics import accuracy_score
import models_torch as models
import utils
EXPERIMENT_DATA_DIR = "/tmp/mgr"
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Run Inference')
parser.add_argument('model... | 37.565574 | 113 | 0.669212 |
a3b664d11a53af7fe489af747c1768858a1613a2 | 4,878 | py | Python | esmvaltool/diag_scripts/ensclus/ens_anom.py | yifatdzigan/ESMValTool | 83320b0e0b24ddde965599961bb80428e180a731 | [
"Apache-2.0"
] | 148 | 2017-02-07T13:16:03.000Z | 2022-03-26T02:21:56.000Z | esmvaltool/diag_scripts/ensclus/ens_anom.py | yifatdzigan/ESMValTool | 83320b0e0b24ddde965599961bb80428e180a731 | [
"Apache-2.0"
] | 2,026 | 2017-02-03T12:57:13.000Z | 2022-03-31T15:11:51.000Z | esmvaltool/diag_scripts/ensclus/ens_anom.py | yifatdzigan/ESMValTool | 83320b0e0b24ddde965599961bb80428e180a731 | [
"Apache-2.0"
] | 113 | 2017-01-27T13:10:19.000Z | 2022-02-03T13:42:11.000Z | """Computation of ensemble anomalies based on a desired value."""
import os
import numpy as np
from scipy import stats
# User-defined packages
from read_netcdf import read_iris, save_n_2d_fields
from sel_season_area import sel_area, sel_season
def ens_anom(filenames, dir_output, name_outputs, varname, numens, seaso... | 40.65 | 79 | 0.630381 |
a3b714ec9b000678e3e81df98484d9da903f0406 | 24,074 | py | Python | pytition/petition/models.py | Te-k/Pytition | 16ebce01b491b72ed387709d9b705f7cb0d5476f | [
"BSD-3-Clause"
] | null | null | null | pytition/petition/models.py | Te-k/Pytition | 16ebce01b491b72ed387709d9b705f7cb0d5476f | [
"BSD-3-Clause"
] | null | null | null | pytition/petition/models.py | Te-k/Pytition | 16ebce01b491b72ed387709d9b705f7cb0d5476f | [
"BSD-3-Clause"
] | null | null | null | from django.db import models
from django.utils.html import mark_safe, strip_tags
from django.utils.text import slugify
from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_lazy
from django.core.exceptions import ValidationError
from django.db.models.signals import post_save, ... | 40.734349 | 124 | 0.662748 |
a3b72847ef50516acce4d8d4114c3432f306c66d | 4,026 | py | Python | bin/socialhistory.py | JohnShullTopDev/generating-traning-data-for-healthcare-machine-learningcare- | d0ffb26e1b99204a796df905b50c8caf01417f69 | [
"Apache-2.0"
] | 1 | 2019-11-11T11:21:08.000Z | 2019-11-11T11:21:08.000Z | bin/socialhistory.py | JohnShullTopDev/generating-traning-data-for-healthcare-machine-learningcare- | d0ffb26e1b99204a796df905b50c8caf01417f69 | [
"Apache-2.0"
] | null | null | null | bin/socialhistory.py | JohnShullTopDev/generating-traning-data-for-healthcare-machine-learningcare- | d0ffb26e1b99204a796df905b50c8caf01417f69 | [
"Apache-2.0"
] | 1 | 2020-01-28T03:48:14.000Z | 2020-01-28T03:48:14.000Z | import csv
from testdata import SOCIALHISTORY_FILE
from testdata import rndDate
from patient import Patient
SMOKINGCODES = {
'428041000124106': 'Current some day smoker',
'266919005' : 'Never smoker',
'449868002' : 'Current every day smoker',
'266927001' : 'Unknown if ever smoked',
'... | 35.946429 | 92 | 0.435171 |
a3b8b5beaa0f8d8ecd98462fe75b978547dc1472 | 4,248 | py | Python | Python X/Dictionaries in python.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/Dictionaries in python.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | Python X/Dictionaries in python.py | nirobio/puzzles | fda8c84d8eefd93b40594636fb9b7f0fde02b014 | [
"MIT"
] | null | null | null | {
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [],
"source": [
"# dictionaries, look-up tables & key-value pairs\n",
"# d = {} OR d = dict()\n",
"#e.g. d = {\"George\": 24, \"Tom\": 32}\n",
"\n",
"d = {}\n",
"\n"
]
},
{
"cell_type... | 18.88 | 354 | 0.439266 |
a3b9cafed89d7582e18fd4f82c78858c2882f5b3 | 1,453 | py | Python | lib/spack/spack/test/cache_fetch.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 2,360 | 2017-11-06T08:47:01.000Z | 2022-03-31T14:45:33.000Z | lib/spack/spack/test/cache_fetch.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 13,838 | 2017-11-04T07:49:45.000Z | 2022-03-31T23:38:39.000Z | lib/spack/spack/test/cache_fetch.py | LiamBindle/spack | e90d5ad6cfff2ba3de7b537d6511adccd9d5fcf1 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | 1,793 | 2017-11-04T07:45:50.000Z | 2022-03-30T14:31:53.000Z | # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import os
import pytest
from llnl.util.filesystem import mkdirp, touch
import spack.config
from spack.fetch_strategy im... | 35.439024 | 76 | 0.705437 |
a3bac2f51025032288427c9fc39e3497207cc25d | 2,201 | py | Python | temp_range_sql.py | hanhanwu/Hanhan-Spark-Python | a04c33100742acffa2ad11d1937ea05c44688427 | [
"MIT"
] | 45 | 2016-03-18T07:57:53.000Z | 2022-03-20T07:14:15.000Z | temp_range_sql.py | hanhanwu/Hanhan-Spark-Python | a04c33100742acffa2ad11d1937ea05c44688427 | [
"MIT"
] | null | null | null | temp_range_sql.py | hanhanwu/Hanhan-Spark-Python | a04c33100742acffa2ad11d1937ea05c44688427 | [
"MIT"
] | 16 | 2016-07-07T16:47:46.000Z | 2020-05-04T17:38:40.000Z | __author__ = 'hanhanw'
import sys
from pyspark import SparkConf, SparkContext
from pyspark.sql.context import SQLContext
from pyspark.sql.types import StructType, StructField, StringType, DoubleType
conf = SparkConf().setAppName("temp range sql")
sc = SparkContext(conf=conf)
sqlContext = SQLContext(sc)
assert sc.ver... | 31.898551 | 117 | 0.698319 |
a3bafb776906d3ce50f018766ee8f4cea08b123b | 1,059 | py | Python | container/pyf/graphqltypes/Event.py | Pompino/react-components-23KB | 3201a417c5160e1b77f29fc1eac74ae9dc10d6ad | [
"MIT"
] | 2 | 2021-10-30T18:18:33.000Z | 2021-12-01T10:21:28.000Z | container/pyf/graphqltypes/Event.py | Pompino/react-components-23KB | 3201a417c5160e1b77f29fc1eac74ae9dc10d6ad | [
"MIT"
] | null | null | null | container/pyf/graphqltypes/Event.py | Pompino/react-components-23KB | 3201a417c5160e1b77f29fc1eac74ae9dc10d6ad | [
"MIT"
] | null | null | null | from typing_extensions import Required
#from sqlalchemy.sql.sqltypes import Boolean
from graphene import ObjectType, String, Field, ID, List, DateTime, Mutation, Boolean, Int
from models.EventsRelated.EventModel import EventModel
from graphqltypes.Utils import extractSession
| 32.090909 | 90 | 0.700661 |
a3bca9436abafd191ec47379ebb1db10a4043237 | 11,326 | py | Python | desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/drawing/shape.py | kokosing/hue | 2307f5379a35aae9be871e836432e6f45138b3d9 | [
"Apache-2.0"
] | 3 | 2018-01-29T14:16:02.000Z | 2019-02-05T21:33:05.000Z | desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/drawing/shape.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 4 | 2021-03-11T04:02:00.000Z | 2022-03-27T08:31:56.000Z | desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/drawing/shape.py | zks888/hue | 93a8c370713e70b216c428caa2f75185ef809deb | [
"Apache-2.0"
] | 2 | 2019-12-05T17:24:36.000Z | 2021-11-22T21:21:32.000Z | from __future__ import absolute_import
# Copyright (c) 2010-2015 openpyxl
from openpyxl.styles.colors import Color, BLACK, WHITE
from openpyxl.utils.units import (
pixels_to_EMU,
EMU_to_pixels,
short_color,
)
from openpyxl.compat import deprecated
from openpyxl.xml.functions import Element, SubElement, t... | 27.160671 | 113 | 0.607099 |
a3bd2daadf5e4d9e5163b4a0fc7578b8fb655779 | 3,118 | py | Python | scripts/VCF/FILTER/subset_vcf.py | elowy01/igsr_analysis | ffea4885227c2299f886a4f41e70b6e1f6bb43da | [
"Apache-2.0"
] | 3 | 2018-04-20T15:04:34.000Z | 2022-03-30T06:36:02.000Z | scripts/VCF/FILTER/subset_vcf.py | elowy01/igsr_analysis | ffea4885227c2299f886a4f41e70b6e1f6bb43da | [
"Apache-2.0"
] | 7 | 2019-06-06T09:22:20.000Z | 2021-11-23T17:41:52.000Z | scripts/VCF/FILTER/subset_vcf.py | elowy01/igsr_analysis | ffea4885227c2299f886a4f41e70b6e1f6bb43da | [
"Apache-2.0"
] | 5 | 2017-11-02T11:17:35.000Z | 2021-12-11T19:34:09.000Z |
from VcfQC import VcfQC
from ReseqTrackDB import File
from ReseqTrackDB import ReseqTrackDB
import argparse
import os
import logging
import datetime
#get command line arguments
parser = argparse.ArgumentParser(description='Script to subset a VCF by excluding the variants within the regions defined by a BED file')
... | 41.026316 | 275 | 0.735407 |
a3bea3b575a46a0bd0557e3e985c4141109eee00 | 266 | py | Python | controllers/restart.py | Acidburn0zzz/helloworld | 9d88357658c55dadf9d4c6f923b63e8cb6207f75 | [
"MIT"
] | null | null | null | controllers/restart.py | Acidburn0zzz/helloworld | 9d88357658c55dadf9d4c6f923b63e8cb6207f75 | [
"MIT"
] | null | null | null | controllers/restart.py | Acidburn0zzz/helloworld | 9d88357658c55dadf9d4c6f923b63e8cb6207f75 | [
"MIT"
] | null | null | null | import os
from base import BaseHandler
| 22.166667 | 67 | 0.725564 |
a3bef41781bb732a7cb06f991f90aba75666a0ca | 4,276 | py | Python | nova/tests/unit/conductor/tasks/test_migrate.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/conductor/tasks/test_migrate.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | nova/tests/unit/conductor/tasks/test_migrate.py | badock/nova-tidb | 4c4591f2cd887fdc22828e12f0c297c051bbd912 | [
"Apache-2.0"
] | null | null | null | # 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
# d... | 47.511111 | 79 | 0.667212 |
a3bf6d02c2f4e332e2c37541b89b9a4e5f82ec94 | 97 | py | Python | CH7_GitCmdAndCtrl/modules/environment.py | maxmac12/BlackHatPython | 60044c65ffc2f1216cbf92c2ec850a4e2e9ca5bf | [
"MIT"
] | null | null | null | CH7_GitCmdAndCtrl/modules/environment.py | maxmac12/BlackHatPython | 60044c65ffc2f1216cbf92c2ec850a4e2e9ca5bf | [
"MIT"
] | null | null | null | CH7_GitCmdAndCtrl/modules/environment.py | maxmac12/BlackHatPython | 60044c65ffc2f1216cbf92c2ec850a4e2e9ca5bf | [
"MIT"
] | null | null | null | import os
| 16.166667 | 39 | 0.639175 |
a3c068d2dc2c438793e5de5d6de56af20454dc8f | 507 | py | Python | diskcatalog/core/views.py | rywjhzd/Cataloging-and-Visualizing-Cradles-of-Planet-Formation | 6d59ea9d9a07630721e19c554651bae2775962ac | [
"MIT"
] | null | null | null | diskcatalog/core/views.py | rywjhzd/Cataloging-and-Visualizing-Cradles-of-Planet-Formation | 6d59ea9d9a07630721e19c554651bae2775962ac | [
"MIT"
] | null | null | null | diskcatalog/core/views.py | rywjhzd/Cataloging-and-Visualizing-Cradles-of-Planet-Formation | 6d59ea9d9a07630721e19c554651bae2775962ac | [
"MIT"
] | null | null | null | from django.shortcuts import render
from .models import Disk
import os
#def index(request):
# module_dir = os.path.dirname(__file__)
# file_path = os.path.join(module_dir, 'data.txt')
# disk_list = open(file_path , 'r')
# data = data_file.read()
# context = {'disk_list': data}
# return render(reque... | 25.35 | 53 | 0.672584 |
a3c17e6746a0528783d5b0c338fdad4e4910e00a | 1,976 | py | Python | misc/python/materialize/checks/insert_select.py | guswynn/materialize | f433173ed71f511d91311769ec58c2d427dd6c3b | [
"MIT"
] | null | null | null | misc/python/materialize/checks/insert_select.py | guswynn/materialize | f433173ed71f511d91311769ec58c2d427dd6c3b | [
"MIT"
] | 157 | 2021-12-28T19:17:45.000Z | 2022-03-31T17:44:27.000Z | misc/python/materialize/checks/insert_select.py | guswynn/materialize | f433173ed71f511d91311769ec58c2d427dd6c3b | [
"MIT"
] | null | null | null | # Copyright Materialize, Inc. and contributors. All rights reserved.
#
# Use of this software is governed by the Business Source License
# included in the LICENSE file at the root of this repository.
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software... | 34.666667 | 119 | 0.598684 |
a3c289b2ddb7ec4ef9412f5ae94e7553200e0202 | 4,668 | py | Python | mojoco trivial/mujocoSim/UR5/simple_example/Mujoco_py_example.py | garlicbutter/Jonathan-Tom | c1696f0a94da46911b3566a3d4f49791e877373f | [
"MIT"
] | 2 | 2021-10-05T04:31:19.000Z | 2021-10-05T04:31:26.000Z | mojoco trivial/mujocoSim/UR5/simple_example/Mujoco_py_example.py | garlicbutter/Tom-Jonathan | c1696f0a94da46911b3566a3d4f49791e877373f | [
"MIT"
] | null | null | null | mojoco trivial/mujocoSim/UR5/simple_example/Mujoco_py_example.py | garlicbutter/Tom-Jonathan | c1696f0a94da46911b3566a3d4f49791e877373f | [
"MIT"
] | null | null | null | import numpy as np
import mujoco_py as mj
from mujoco_py_renderer import SimulationError, XMLError, MujocoPyRenderer
from mujoco_py import (MjSim, load_model_from_xml,functions,
load_model_from_path, MjSimState,
ignore_mujoco_warnings,
load_model_from... | 29.923077 | 105 | 0.610111 |
a3c2ca7e8eeb8a5b7daf690508f0da4c87ebd47d | 3,323 | py | Python | evaluation/wordpress/pull_docker_images_from_private_registry.py | seveirbian/gear-old | 8d3529a9bf42e652a9d7475c9d14e9a6afc69a76 | [
"Apache-2.0"
] | null | null | null | evaluation/wordpress/pull_docker_images_from_private_registry.py | seveirbian/gear-old | 8d3529a9bf42e652a9d7475c9d14e9a6afc69a76 | [
"Apache-2.0"
] | null | null | null | evaluation/wordpress/pull_docker_images_from_private_registry.py | seveirbian/gear-old | 8d3529a9bf42e652a9d7475c9d14e9a6afc69a76 | [
"Apache-2.0"
] | null | null | null | import sys
# package need to be installed, pip install docker
import docker
import time
import yaml
import os
import xlwt
auto = False
private_registry = "202.114.10.146:9999/"
# result
result = [["tag", "finishTime", "size", "data"], ]
def get_net_data():
netCard = "/proc/net/dev"
fd = open(netCard, "r")
... | 27.46281 | 101 | 0.550707 |
a3c4634520b2ba72e01bed684e08b442a5657f9b | 385 | py | Python | jiminy/envs/vnc_wog.py | sibeshkar/jiminy | 7754f86fb0f246e7d039ea0cbfd9950fcae4adfb | [
"MIT"
] | 3 | 2020-03-16T13:50:40.000Z | 2021-06-09T05:26:13.000Z | jiminy/envs/vnc_wog.py | sibeshkar/jiminy | 7754f86fb0f246e7d039ea0cbfd9950fcae4adfb | [
"MIT"
] | null | null | null | jiminy/envs/vnc_wog.py | sibeshkar/jiminy | 7754f86fb0f246e7d039ea0cbfd9950fcae4adfb | [
"MIT"
] | null | null | null | from jiminy.envs import vnc_env
from jiminy.spaces import VNCActionSpace
| 35 | 75 | 0.703896 |
a3c726cfaf4ab3b53d1df8bd6d6c24aef693e3ab | 5,066 | py | Python | fedml_api/standalone/federated_sgan/fedssgan_api.py | arj119/FedML | 5b7c098659f3e61f9e44583965300d8d0829f7a8 | [
"Apache-2.0"
] | null | null | null | fedml_api/standalone/federated_sgan/fedssgan_api.py | arj119/FedML | 5b7c098659f3e61f9e44583965300d8d0829f7a8 | [
"Apache-2.0"
] | null | null | null | fedml_api/standalone/federated_sgan/fedssgan_api.py | arj119/FedML | 5b7c098659f3e61f9e44583965300d8d0829f7a8 | [
"Apache-2.0"
] | null | null | null | import copy
import logging
import random
from typing import List, Tuple
import numpy as np
import torch
import wandb
from torch.utils.data import ConcatDataset
from fedml_api.standalone.fedavg.my_model_trainer import MyModelTrainer
from fedml_api.standalone.federated_sgan.ac_gan_model_trainer import ACGANModelTrainer... | 44.831858 | 129 | 0.627319 |
a3c78b4ed55d10de069695bce6f3d899ee02cc99 | 20,932 | py | Python | pytorch-word2vec-master/csv.py | arjun-sai-krishnan/tamil-morpho-embeddings | a33bcb427d635dba3b1857f26ea7ab287e1a44c5 | [
"MIT"
] | 2 | 2021-04-11T18:25:16.000Z | 2022-03-16T03:48:52.000Z | pytorch-word2vec-master/csv.py | arjun-sai-krishnan/tamil-morpho-embeddings | a33bcb427d635dba3b1857f26ea7ab287e1a44c5 | [
"MIT"
] | null | null | null | pytorch-word2vec-master/csv.py | arjun-sai-krishnan/tamil-morpho-embeddings | a33bcb427d635dba3b1857f26ea7ab287e1a44c5 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
from collections import Counter
import pdb
import pickle
import re
import sys
import time
import numpy as np
import torch
import torch.nn as nn
from torch.autograd import Variable
from torch import optim
import torch.nn.functional as F
import torch.multiprocessing as mp
import ... | 40.487427 | 250 | 0.591821 |
a3c8721ad82d9b0c4f4bbb5e4ea027824401f22d | 339 | py | Python | Ogrenciler/Varol/buyuksayi.py | ProEgitim/Python-Dersleri-BEM | b25e9fdb1fa3026925a46b2fcbcba348726b775c | [
"MIT"
] | 1 | 2021-04-18T17:35:22.000Z | 2021-04-18T17:35:22.000Z | Ogrenciler/Varol/buyuksayi.py | waroi/Python-Dersleri-BEM | b25e9fdb1fa3026925a46b2fcbcba348726b775c | [
"MIT"
] | null | null | null | Ogrenciler/Varol/buyuksayi.py | waroi/Python-Dersleri-BEM | b25e9fdb1fa3026925a46b2fcbcba348726b775c | [
"MIT"
] | 2 | 2021-04-18T18:22:26.000Z | 2021-04-24T17:16:19.000Z | sayi1 = int(input("1. Say: "))
sayi2 = int(input("2. Say: "))
sayi3 = int(input("3. Say: "))
sayi4 = int(input("4. Say: "))
sayi5 = int(input("5. Say: "))
sayilar=[];
sayilar.append(sayi1)
sayilar.append(sayi2)
sayilar.append(sayi3)
sayilar.append(sayi4)
sayilar.append(sayi5)
sayilar.sort()
print("En byk sayimiz..",say... | 21.1875 | 39 | 0.663717 |
a3c959da81854ccd184aefdeb715f7df8413b8b8 | 8,899 | py | Python | baselines/deepq/build_graph_mfec.py | MouseHu/emdqn | ba907e959f21dd0b5a17117accccae9c82a79a3b | [
"MIT"
] | null | null | null | baselines/deepq/build_graph_mfec.py | MouseHu/emdqn | ba907e959f21dd0b5a17117accccae9c82a79a3b | [
"MIT"
] | null | null | null | baselines/deepq/build_graph_mfec.py | MouseHu/emdqn | ba907e959f21dd0b5a17117accccae9c82a79a3b | [
"MIT"
] | 1 | 2021-04-26T13:55:47.000Z | 2021-04-26T13:55:47.000Z | """Deep Q learning graph
The functions in this file can are used to create the following functions:
======= act ========
Function to chose an action given an observation
Parameters
----------
observation: object
Observation that can be feed into the output of make_obs_ph
stochastic: bool... | 42.37619 | 127 | 0.618047 |
a3c978469e28670107c4646aa77b54f6269dda05 | 2,244 | py | Python | tests/test_prior.py | frodre/LMR | 4c00d3f9db96447e69bd3f426d59524f7b5f3ef5 | [
"BSD-3-Clause"
] | 17 | 2018-08-27T18:50:36.000Z | 2021-03-17T22:48:55.000Z | tests/test_prior.py | mingsongli/LMR | 4c00d3f9db96447e69bd3f426d59524f7b5f3ef5 | [
"BSD-3-Clause"
] | 5 | 2018-10-15T22:13:27.000Z | 2019-04-26T11:45:58.000Z | tests/test_prior.py | mingsongli/LMR | 4c00d3f9db96447e69bd3f426d59524f7b5f3ef5 | [
"BSD-3-Clause"
] | 11 | 2018-10-11T19:35:34.000Z | 2021-08-17T12:08:11.000Z | import sys
sys.path.append('../')
import LMR_config as cfg
import LMR_prior
import numpy as np
import pytest
| 24.933333 | 60 | 0.685829 |
a3cadf1c1469dc28d63f965c32ff3b98b7eb9d52 | 8,719 | py | Python | src/salgan_dhf1k/train_bce.py | juanjo3ns/SalGAN2 | ac52af743b94961cdb44c5d89774b72fc8acfd3e | [
"MIT"
] | null | null | null | src/salgan_dhf1k/train_bce.py | juanjo3ns/SalGAN2 | ac52af743b94961cdb44c5d89774b72fc8acfd3e | [
"MIT"
] | null | null | null | src/salgan_dhf1k/train_bce.py | juanjo3ns/SalGAN2 | ac52af743b94961cdb44c5d89774b72fc8acfd3e | [
"MIT"
] | null | null | null | import os
from dataloader.datasetDHF1K import DHF1K
from torch.utils.data import DataLoader
from utils.salgan_utils import save_model, get_lr_optimizer
from utils.sendTelegram import send
from utils.printer import param_print
from utils.salgan_generator import create_model, add_bn
from evaluation.fast_evaluation impor... | 31.139286 | 112 | 0.686661 |
a3cae716974e2bebe27ab17e3253013ab6b42f7b | 782 | py | Python | dragontail/content/models/basicpage.py | tracon/dragontail | aae860acb5fe400015557f659b6d4221b939747a | [
"MIT"
] | null | null | null | dragontail/content/models/basicpage.py | tracon/dragontail | aae860acb5fe400015557f659b6d4221b939747a | [
"MIT"
] | null | null | null | dragontail/content/models/basicpage.py | tracon/dragontail | aae860acb5fe400015557f659b6d4221b939747a | [
"MIT"
] | null | null | null | # encoding: utf-8
from django.db import models
from wagtail.wagtailcore.models import Page
from wagtail.wagtailcore.fields import StreamField
from wagtail.wagtailcore import blocks
from wagtail.wagtailadmin.edit_handlers import FieldPanel, StreamFieldPanel
from wagtail.wagtailimages.blocks import ImageChooserBlock
| 28.962963 | 75 | 0.742967 |