text
stringlengths
0
1.05M
meta
dict
ALERT_RESP = { "primary_id": 3232, "alert_type": { "id": 1793, "created_at": "2019-05-25T19:40:09.132456Z", "updated_at": "2019-08-12T18:40:12.132456Z", "type_id": "8916-1b5d68c0519f", "category": "Host", "detail_fields": [ "username" ], ...
{ "repo_name": "demisto/content", "path": "Packs/FireEyeHelix/Integrations/FireEyeHelix/test_data/response_constants.py", "copies": "1", "size": "66486", "license": "mit", "hash": 4443847686036751000, "line_mean": 34.9189627229, "line_max": 146, "alpha_frac": 0.3252414042, "autogenerated": false, ...
"""alert slack with any auditor""" import json import requests from security_monkey import app from security_monkey.alerters import custom_alerter class SlackAlerter(object, metaclass=custom_alerter.AlerterType): def __init__(self, cls, name, bases, attrs): super().__init__(cls, name, bases, attrs) ...
{ "repo_name": "Netflix/security_monkey", "path": "security_monkey/alerters/slack_alerter.py", "copies": "1", "size": "1467", "license": "apache-2.0", "hash": -1053776179268034700, "line_mean": 34.7804878049, "line_max": 153, "alpha_frac": 0.5610088616, "autogenerated": false, "ratio": 3.964864864...
'''Alerts module: Triggers a outbound alert to a 3rd party API when a known sound has been detected. ''' import requests import datetime import os import json class AlertSender(object): '''Class to handle the sending of alerts from the audio analysis, via HTTP, to the API.''' def __init__(self, logger, profi...
{ "repo_name": "tanapop/rfcx-worker-analysis", "path": "modules/domain_modules/alerts.py", "copies": "1", "size": "3083", "license": "apache-2.0", "hash": 5662013720085624000, "line_mean": 44.3382352941, "line_max": 140, "alpha_frac": 0.5828738242, "autogenerated": false, "ratio": 3.82506203473945...
"""alert table Revision ID: afe08201dbc8 Revises: b46043443bf2 Create Date: 2017-04-26 18:10:54.562302 """ from alembic import op import sqlalchemy as sa # revision identifiers, used by Alembic. revision = 'afe08201dbc8' down_revision = 'b46043443bf2' branch_labels = None depends_on = None def upgrade(): # ##...
{ "repo_name": "qiubit/luminis", "path": "backend/alembic/versions/afe08201dbc8_alert_table.py", "copies": "1", "size": "1647", "license": "mit", "hash": 7039382028349722000, "line_mean": 39.1707317073, "line_max": 110, "alpha_frac": 0.5701275046, "autogenerated": false, "ratio": 3.978260869565217...
"""Alert when resources are made public.""" import json from policyuniverse.policy import Policy from streamalert.shared.rule import rule @rule(logs=['cloudtrail:events']) def cloudtrail_public_resources(rec): """ author: spiper description: Detect resources being made public. playbook:...
{ "repo_name": "airbnb/streamalert", "path": "rules/community/cloudwatch_events/cloudtrail_public_resources.py", "copies": "1", "size": "2856", "license": "apache-2.0", "hash": 5220971040745723000, "line_mean": 35.6153846154, "line_max": 84, "alpha_frac": 0.6022408964, "autogenerated": false, "rat...
"""Alert when root AWS credentials are used.""" from streamalert.shared.rule import rule @rule( logs=['cloudwatch:events'], req_subkeys={ 'detail': ['userIdentity', 'eventType'] }) def cloudtrail_root_account_usage(rec): """ author: airbnb_csirt description: Root AWS cre...
{ "repo_name": "airbnb/streamalert", "path": "rules/community/cloudwatch_events/cloudtrail_root_account_usage.py", "copies": "1", "size": "1052", "license": "apache-2.0", "hash": -7604687137036976000, "line_mean": 42.8333333333, "line_max": 91, "alpha_frac": 0.6207224335, "autogenerated": false, "...
"""Alexa capabilities.""" from datetime import datetime import logging from homeassistant.const import ( ATTR_SUPPORTED_FEATURES, ATTR_TEMPERATURE, ATTR_UNIT_OF_MEASUREMENT, STATE_LOCKED, STATE_OFF, STATE_ON, STATE_UNAVAILABLE, STATE_UNLOCKED, ) import homeassistant.components.climate.c...
{ "repo_name": "fbradyirl/home-assistant", "path": "homeassistant/components/alexa/capabilities.py", "copies": "1", "size": "18509", "license": "apache-2.0", "hash": -8064290734625911000, "line_mean": 30.1599326599, "line_max": 127, "alpha_frac": 0.6309363013, "autogenerated": false, "ratio": 4.41...
"""Alexa capabilities.""" import logging from typing import List, Optional from homeassistant.components import ( cover, fan, image_processing, input_number, light, timer, vacuum, ) from homeassistant.components.alarm_control_panel import ATTR_CODE_FORMAT, FORMAT_NUMBER from homeassistant.c...
{ "repo_name": "sdague/home-assistant", "path": "homeassistant/components/alexa/capabilities.py", "copies": "3", "size": "61105", "license": "apache-2.0", "hash": 3597684275242113000, "line_mean": 30.3358974359, "line_max": 127, "alpha_frac": 0.5954831847, "autogenerated": false, "ratio": 4.260563...
"""Alexa capabilities.""" import logging from homeassistant.const import ( ATTR_SUPPORTED_FEATURES, ATTR_TEMPERATURE, ATTR_UNIT_OF_MEASUREMENT, STATE_ALARM_ARMED_AWAY, STATE_ALARM_ARMED_CUSTOM_BYPASS, STATE_ALARM_ARMED_HOME, STATE_ALARM_ARMED_NIGHT, STATE_CLOSED, STATE_LOCKED, S...
{ "repo_name": "qedi-r/home-assistant", "path": "homeassistant/components/alexa/capabilities.py", "copies": "1", "size": "41019", "license": "apache-2.0", "hash": -8649807002126222000, "line_mean": 31.736632083, "line_max": 127, "alpha_frac": 0.5964796801, "autogenerated": false, "ratio": 4.559693...
"""Alexa capabilities.""" import logging from homeassistant.const import ( ATTR_SUPPORTED_FEATURES, ATTR_TEMPERATURE, ATTR_UNIT_OF_MEASUREMENT, STATE_LOCKED, STATE_OFF, STATE_ON, STATE_UNAVAILABLE, STATE_UNLOCKED, STATE_UNKNOWN, ) import homeassistant.components.climate.const as cli...
{ "repo_name": "Cinntax/home-assistant", "path": "homeassistant/components/alexa/capabilities.py", "copies": "1", "size": "19019", "license": "apache-2.0", "hash": 5174968461482526000, "line_mean": 30.0261011419, "line_max": 127, "alpha_frac": 0.6276355224, "autogenerated": false, "ratio": 4.40764...
"""Alexa configuration for Home Assistant Cloud.""" import asyncio from contextlib import suppress from datetime import timedelta import logging import aiohttp import async_timeout from hass_nabucasa import Cloud, cloud_api from homeassistant.components.alexa import ( config as alexa_config, entities as alexa...
{ "repo_name": "adrienbrault/home-assistant", "path": "homeassistant/components/cloud/alexa_config.py", "copies": "3", "size": "10583", "license": "mit", "hash": 8145811865807830000, "line_mean": 31.3639143731, "line_max": 91, "alpha_frac": 0.5880185203, "autogenerated": false, "ratio": 4.20795228...
"""Alexa configuration for Home Assistant Cloud.""" import asyncio from datetime import timedelta import logging import aiohttp import async_timeout from hass_nabucasa import cloud_api from homeassistant.const import CLOUD_NEVER_EXPOSED_ENTITIES from homeassistant.helpers import entity_registry from homeassistant.hel...
{ "repo_name": "fbradyirl/home-assistant", "path": "homeassistant/components/cloud/alexa_config.py", "copies": "1", "size": "8884", "license": "apache-2.0", "hash": 2052722925840038000, "line_mean": 31.1884057971, "line_max": 88, "alpha_frac": 0.585434489, "autogenerated": false, "ratio": 4.159176...
"""Alexa entity adapters.""" from __future__ import annotations import logging from typing import TYPE_CHECKING from homeassistant.components import ( alarm_control_panel, alert, automation, binary_sensor, camera, cover, fan, group, image_processing, input_boolean, input_nu...
{ "repo_name": "kennedyshead/home-assistant", "path": "homeassistant/components/alexa/entities.py", "copies": "1", "size": "30471", "license": "apache-2.0", "hash": 8125997992793968000, "line_mean": 32.89432703, "line_max": 116, "alpha_frac": 0.6570509665, "autogenerated": false, "ratio": 4.214522...
"""Alexa entity adapters.""" from typing import List from homeassistant.components import ( alarm_control_panel, alert, automation, binary_sensor, cover, fan, group, image_processing, input_boolean, input_number, light, lock, media_player, scene, script, ...
{ "repo_name": "Teagan42/home-assistant", "path": "homeassistant/components/alexa/entities.py", "copies": "1", "size": "25487", "license": "apache-2.0", "hash": -5503343197778340000, "line_mean": 32.6684280053, "line_max": 115, "alpha_frac": 0.6640640326, "autogenerated": false, "ratio": 4.2274008...
"""Alexa entity adapters.""" from typing import List from homeassistant.core import callback from homeassistant.const import ( ATTR_DEVICE_CLASS, ATTR_SUPPORTED_FEATURES, ATTR_UNIT_OF_MEASUREMENT, CLOUD_NEVER_EXPOSED_ENTITIES, CONF_NAME, TEMP_CELSIUS, TEMP_FAHRENHEIT, ) from homeassistant.u...
{ "repo_name": "joopert/home-assistant", "path": "homeassistant/components/alexa/entities.py", "copies": "1", "size": "19079", "license": "apache-2.0", "hash": 4173983716888928000, "line_mean": 32.3548951049, "line_max": 89, "alpha_frac": 0.6653388542, "autogenerated": false, "ratio": 4.2682326621...
"""Alexa entity adapters.""" import logging from typing import List from homeassistant.components import ( alarm_control_panel, alert, automation, binary_sensor, camera, cover, fan, group, image_processing, input_boolean, input_number, light, lock, media_player, ...
{ "repo_name": "mKeRix/home-assistant", "path": "homeassistant/components/alexa/entities.py", "copies": "3", "size": "27599", "license": "mit", "hash": 1779032652107930000, "line_mean": 32.739608802, "line_max": 115, "alpha_frac": 0.6585021196, "autogenerated": false, "ratio": 4.251232285890326, ...
"""Alexa entity adapters.""" import logging from typing import TYPE_CHECKING, List from homeassistant.components import ( alarm_control_panel, alert, automation, binary_sensor, camera, cover, fan, group, image_processing, input_boolean, input_number, light, lock, ...
{ "repo_name": "partofthething/home-assistant", "path": "homeassistant/components/alexa/entities.py", "copies": "3", "size": "29781", "license": "mit", "hash": -1036778919343009700, "line_mean": 32.7653061224, "line_max": 101, "alpha_frac": 0.6577347974, "autogenerated": false, "ratio": 4.21528662...
"""Alexa HTTP interface.""" import logging from homeassistant import core from homeassistant.components.http.view import HomeAssistantView from .auth import Auth from .config import AbstractConfig from .const import ( CONF_CLIENT_ID, CONF_CLIENT_SECRET, CONF_ENDPOINT, CONF_ENTITY_CONFIG, CONF_FILT...
{ "repo_name": "leppa/home-assistant", "path": "homeassistant/components/alexa/smart_home_http.py", "copies": "1", "size": "3648", "license": "apache-2.0", "hash": 5396199520842676000, "line_mean": 30.1794871795, "line_max": 88, "alpha_frac": 0.6559758772, "autogenerated": false, "ratio": 4.075977...
"""Alexa message handlers.""" import logging import math from homeassistant import core as ha from homeassistant.components import ( camera, cover, fan, group, input_number, light, media_player, timer, vacuum, ) from homeassistant.components.climate import const as climate from home...
{ "repo_name": "turbokongen/home-assistant", "path": "homeassistant/components/alexa/handlers.py", "copies": "3", "size": "50582", "license": "apache-2.0", "hash": 4335843287752829400, "line_mean": 31.3001277139, "line_max": 101, "alpha_frac": 0.6453679174, "autogenerated": false, "ratio": 3.91289...
"""Alexa models.""" import logging from uuid import uuid4 from .const import ( API_CONTEXT, API_DIRECTIVE, API_ENDPOINT, API_EVENT, API_HEADER, API_PAYLOAD, API_SCOPE, ) from .entities import ENTITY_ADAPTERS from .errors import AlexaInvalidEndpointError _LOGGER = logging.getLogger(__name__...
{ "repo_name": "fbradyirl/home-assistant", "path": "homeassistant/components/alexa/messages.py", "copies": "2", "size": "6215", "license": "apache-2.0", "hash": 3833510430703904300, "line_mean": 31.3697916667, "line_max": 88, "alpha_frac": 0.6077232502, "autogenerated": false, "ratio": 4.461593682...
## Alexander Farrell, Defne Surujon ## This program takes an input GBK file and writes a list of noralization genes ## Normalization genes for TnSeq are those that have the product annotation ## "Transposase" or "Mobile element" import os import csv from optparse import OptionParser options = OptionPa...
{ "repo_name": "jsa-aerial/aerobio", "path": "Scripts/get_norm_genes.py", "copies": "1", "size": "2675", "license": "mit", "hash": 5873572569557796000, "line_mean": 26.4574468085, "line_max": 100, "alpha_frac": 0.5757009346, "autogenerated": false, "ratio": 3.1883194278903457, "config_test": fal...
"""alexandria URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
{ "repo_name": "baltzar/alexandria", "path": "alexandria/urls.py", "copies": "1", "size": "1069", "license": "mit", "hash": 2155247259961657900, "line_mean": 38.5925925926, "line_max": 106, "alpha_frac": 0.6875584659, "autogenerated": false, "ratio": 3.470779220779221, "config_test": false, "h...
# Alexa Personal Assistant Companion Program for Raspberry Pi # Modified by Simon Beal and Matthew Timmons-Brown for "The Raspberry Pi Guy" YouTube channel # Built upon the work of Sam Machin, (c)2016 # This is a library that includes all of the web functionality of the Alexa Amazon Echo personal assistant service # Th...
{ "repo_name": "the-raspberry-pi-guy/Artificial-Intelligence-Pi", "path": "alexa_helper.py", "copies": "2", "size": "3404", "license": "mit", "hash": 7310811381330656000, "line_mean": 32.702970297, "line_max": 131, "alpha_frac": 0.6454171563, "autogenerated": false, "ratio": 3.196244131455399, "...
# Alexa Personal Assitant for Raspberry Pi # Coded by Simon Beal and Matthew Timmons-Brown for "The Raspberry Pi Guy" YouTube channel # Built upon the work of Sam Machin, (c)2016 # Feel free to look through the code, try to understand it & modify as you wish! # The installer MUST be run before this code. #!/usr/bin/py...
{ "repo_name": "the-raspberry-pi-guy/Artificial-Intelligence-Pi", "path": "main.py", "copies": "1", "size": "4515", "license": "mit", "hash": -4175548929271900000, "line_mean": 36.625, "line_max": 137, "alpha_frac": 0.6819490587, "autogenerated": false, "ratio": 3.3247422680412373, "config_test"...
"""Alexa related errors.""" from homeassistant.exceptions import HomeAssistantError from .const import API_TEMP_UNITS class UnsupportedInterface(HomeAssistantError): """This entity does not support the requested Smart Home API interface.""" class UnsupportedProperty(HomeAssistantError): """This entity does...
{ "repo_name": "Teagan42/home-assistant", "path": "homeassistant/components/alexa/errors.py", "copies": "26", "size": "3482", "license": "apache-2.0", "hash": 2922607705129670700, "line_mean": 28.0166666667, "line_max": 82, "alpha_frac": 0.6990235497, "autogenerated": false, "ratio": 4.09647058823...
"""Alexa Resources and Assets.""" class AlexaGlobalCatalog: """The Global Alexa catalog. https://developer.amazon.com/docs/device-apis/resources-and-assets.html#global-alexa-catalog You can use the global Alexa catalog for pre-defined names of devices, settings, values, and units. This catalog is lo...
{ "repo_name": "leppa/home-assistant", "path": "homeassistant/components/alexa/resources.py", "copies": "1", "size": "12713", "license": "apache-2.0", "hash": -7156532409524071000, "line_mean": 31.850129199, "line_max": 116, "alpha_frac": 0.6503579014, "autogenerated": false, "ratio": 3.4583786724...
APPLICATION_ID = "amzn1.ask.skill.dd677950-cade-4805-b1f1-ce2e3a3569f0" # Bible API BIBLE_TRANSLATION = "GNBDC" # Can't use NIV - it's still in copyright BIBLE_API_URL = "https://bibles.org/v2/eng-{translation}/passages.js".format( translation=BIBLE_TRANSLATION) # Sermons SERMONS_XML_URL = "http://www.christchur...
{ "repo_name": "mauriceyap/ccm-assistant", "path": "src/config.py", "copies": "1", "size": "1051", "license": "mit", "hash": 7596480830766024000, "line_mean": 41.04, "line_max": 95, "alpha_frac": 0.7164605138, "autogenerated": false, "ratio": 2.6144278606965172, "config_test": false, "has_no_k...
"""Alexa Skills represent the logic used to build JSON responses to events as specified in the Alexa Skills Kit.""" import functools from alexa.response import response_to_dict def intent_callback(intent_name): """Makes the decorated method activate on the correct intent. This crazy black magic works by do...
{ "repo_name": "ianonavy/python-alexa-skills-kit", "path": "alexa/skill.py", "copies": "1", "size": "4286", "license": "mit", "hash": -4089579771239716000, "line_mean": 33.564516129, "line_max": 75, "alpha_frac": 0.629724685, "autogenerated": false, "ratio": 4.821147356580427, "config_test": fal...
"""Alexa Skill to harness the power of the Giant Bomb API.""" import sys import logging from flask import Flask, render_template from flask_ask import Ask, statement, question, session from gb import api app = Flask(__name__) ask = Ask(app, '/') logging.getLogger('flask_ask').setLevel(logging.DEBUG) giant_bomb = a...
{ "repo_name": "jaykwon/giantanswers", "path": "skill.py", "copies": "1", "size": "2063", "license": "mit", "hash": 1407605121719263000, "line_mean": 25.1265822785, "line_max": 94, "alpha_frac": 0.6621425109, "autogenerated": false, "ratio": 3.670818505338078, "config_test": false, "has_no_key...
"""Alexa Skill to look up the flavor forecast for The Diary Godmother.""" import sys import logging import datetime from flask import Flask, render_template from flask_ask import Ask, statement, question, convert_errors, session import api app = Flask(__name__) ask = Ask(app, '/') logging.getLogger('flask_ask').se...
{ "repo_name": "pasharkey/flavorforecast", "path": "src/skill.py", "copies": "1", "size": "6859", "license": "mit", "hash": 2838073168650510300, "line_mean": 30.036199095, "line_max": 91, "alpha_frac": 0.6662778831, "autogenerated": false, "ratio": 3.8105555555555557, "config_test": false, "ha...
"""Alexa state report code.""" import asyncio import json import logging import aiohttp import async_timeout from homeassistant.const import MATCH_ALL from .const import API_CHANGE, Cause from .entities import ENTITY_ADAPTERS from .messages import AlexaResponse _LOGGER = logging.getLogger(__name__) DEFAULT_TIMEOUT ...
{ "repo_name": "Cinntax/home-assistant", "path": "homeassistant/components/alexa/state_report.py", "copies": "1", "size": "5879", "license": "apache-2.0", "hash": 4879994860031726000, "line_mean": 30.6075268817, "line_max": 129, "alpha_frac": 0.6625276408, "autogenerated": false, "ratio": 3.961590...
"""Alexa state report code.""" import asyncio import json import logging import aiohttp import async_timeout from homeassistant.const import MATCH_ALL, STATE_ON import homeassistant.util.dt as dt_util from .const import API_CHANGE, Cause from .entities import ENTITY_ADAPTERS from .messages import AlexaResponse _LOG...
{ "repo_name": "robbiet480/home-assistant", "path": "homeassistant/components/alexa/state_report.py", "copies": "2", "size": "7965", "license": "apache-2.0", "hash": 8588217609352270000, "line_mean": 30.4822134387, "line_max": 129, "alpha_frac": 0.6462021343, "autogenerated": false, "ratio": 3.994...
ALEXA_VERSION_NUMBER = 1 STOP_INTENT = 'AMAZON.StopIntent' CANCEL_INTENT = 'AMAZON.CancelIntent' HELP_INTENT = 'AMAZON.HelpIntent' TYPE_LAUNCH = 'LaunchRequest' ALEXA_DISCOVERY = 'DiscoverAppliancesRequest' ALEXA_DISCOVERY_NAMESPACE = 'Alexa.ConnectedHome.Discovery' ALEXA_CONTROL_NAMESPACE = 'Alexa.ConnectedHome.Contr...
{ "repo_name": "Firefly-Automation/Firefly", "path": "Firefly/services/alexa/alexa_const.py", "copies": "1", "size": "5246", "license": "apache-2.0", "hash": 1948325477456009000, "line_mean": 23.6291079812, "line_max": 117, "alpha_frac": 0.5947388486, "autogenerated": false, "ratio": 3.21249234537...
# Alex Ciaramella and Greg Suner # Abstract Tournament Class # Tournament is observable while players are observers import Message import Observable import Display import ScoreKeeper class Tournament(Observable.Observable): # set up a list of players when tournament is initialized def __init__(self): ...
{ "repo_name": "geebzter/game-framework", "path": "Tournament.py", "copies": "1", "size": "3830", "license": "apache-2.0", "hash": 5956504372984971000, "line_mean": 32.3043478261, "line_max": 100, "alpha_frac": 0.6433420366, "autogenerated": false, "ratio": 4.070138150903294, "config_test": fals...
# Alex Ciaramella and Greg Suner # Abstract Tournament Class # Tournament is observable while players are observers import Message import Observable import Display class Tournament(Observable.Observable): # set up a list of players when tournament is initialized def __init__(self): Observable.Observa...
{ "repo_name": "mccler89/RPS_Player", "path": "Tournament.py", "copies": "3", "size": "3118", "license": "apache-2.0", "hash": -2208371542740168000, "line_mean": 29.568627451, "line_max": 79, "alpha_frac": 0.6423989737, "autogenerated": false, "ratio": 4.075816993464052, "config_test": false, ...
# Alex Ciaramella and Greg Suner # Abstract Tournament Class # Tournament is observable while players are observers import Message import Observable import Display class Tournament(Observable.Observable): # set up a list of players when tournament is initialized def __init__(self): Observable.Observ...
{ "repo_name": "PaulieC/sprint1_Council_a", "path": "Tournament.py", "copies": "2", "size": "3437", "license": "apache-2.0", "hash": 5243066021880614000, "line_mean": 31.7333333333, "line_max": 100, "alpha_frac": 0.6444573756, "autogenerated": false, "ratio": 4.116167664670659, "config_test": fa...
# A lexer in Python # By Anthony Nguyen # MIT Licensed # # Pretty basic; easily extensible import re class Token(): def __init__(self, name, rule, data, start, end): self.name = name self.rule = rule self.data = data self.start = start self.end = end def __str__(self): return "{0}({1}): {2}".format(sel...
{ "repo_name": "anthonynguyen/pylexer", "path": "pylexer.py", "copies": "1", "size": "1796", "license": "mit", "hash": 196452366284821380, "line_mean": 24.6714285714, "line_max": 120, "alpha_frac": 0.6542316258, "autogenerated": false, "ratio": 2.963696369636964, "config_test": false, "has_no_...
# A lexer used by all the parsers # A simple lexer for C like expressions. The major difference with C is that consecutive operators have # to be separated with white spaces. import re class Token: def __init__(self, kind, lexem): self.kind = kind self.lexem = lexem def __repr__(self): ...
{ "repo_name": "bourguet/operator_precedence_parsing", "path": "lexer.py", "copies": "1", "size": "1039", "license": "bsd-2-clause", "hash": -4707189783009254000, "line_mean": 28.6857142857, "line_max": 104, "alpha_frac": 0.5043310876, "autogenerated": false, "ratio": 3.4177631578947367, "config...
'''Alexey is trying to develop a program for a very simple microcontroller. It makes readings from various sensors over time, and these readings must happen at specific regular times. Unfortunately, if two of these readings occur at the same time, the microcontroller freezes and must be reset. There are N different ...
{ "repo_name": "OMEHA/HELLO-WORLD", "path": "PYTHON-CODECHEF_ALEXTASK.py", "copies": "1", "size": "2580", "license": "unlicense", "hash": -8358206587142630000, "line_mean": 29.8518518519, "line_max": 319, "alpha_frac": 0.665503876, "autogenerated": false, "ratio": 3.649222065063649, "config_test...
# Alex Goudine # GEOG 490 - Webscraping and Database Design # Scrapes weather data from forecast.io and returns a dict of the relevant information # Modified by Taylor Denouden # Shortened script and made into a simple function in which geom and date data can be passed # Added more efficient and robust cardinal direct...
{ "repo_name": "SPARLab/BikeMaps", "path": "mapApp/utils/weather.py", "copies": "1", "size": "2587", "license": "mit", "hash": -2301689683614506500, "line_mean": 46.9074074074, "line_max": 132, "alpha_frac": 0.6671820642, "autogenerated": false, "ratio": 3.500676589986468, "config_test": false, ...
# Alex Gould # 9/26/15 # COMP50CP # transform_image.py - Uses multithreading to concurrently alter # sections of an image. # Since the threads never share resources, there's no real need to # coordinate them, apart from making sure they're all done # before continuing with the program from threading import Thread impo...
{ "repo_name": "lyra833/Stufts2", "path": "Concurrent Systems/Homework/HW2/image_transform.py", "copies": "1", "size": "2292", "license": "mit", "hash": -7288887728823608000, "line_mean": 21.6930693069, "line_max": 70, "alpha_frac": 0.6544502618, "autogenerated": false, "ratio": 2.628440366972477,...
#Alex Holcombe alex.holcombe@sydney.edu.au #See the github repository for more information: https://github.com/alexholcombe/twoWords from __future__ import print_function from psychopy import monitors, visual, event, data, logging, core, sound, gui import psychopy.info import numpy as np from math import atan, log, cei...
{ "repo_name": "alexholcombe/twoWords", "path": "specialFieldsStudentCode/twoWordsExperimentInvertedbackMayAlexContinue2.py", "copies": "2", "size": "52750", "license": "mit", "hash": 3622063637666545700, "line_mean": 58.6056497175, "line_max": 209, "alpha_frac": 0.6849478673, "autogenerated": false...
#Alex Holcombe alex.holcombe@sydney.edu.au #See the github repository for more information: https://github.com/alexholcombe/twoWords from __future__ import print_function #use python3 style print from psychopy import monitors, visual, event, data, logging, core, sound, gui import psychopy.info import numpy as np from m...
{ "repo_name": "alexholcombe/twoWords", "path": "specialFieldsStudentCode/twoWordsForJoel.py", "copies": "2", "size": "49800", "license": "mit", "hash": 399086273864182200, "line_mean": 58.0747330961, "line_max": 209, "alpha_frac": 0.6828313253, "autogenerated": false, "ratio": 3.5591766723842198,...
#Alex Holcombe alex.holcombe@sydney.edu.au #Modified by Kim Ransley from the twoWords.py program at the github repository: https://github.com/alexholcombe/twoWords #1. Inverted #2. One word #3. duration #4. trail, trial #5. numCharsInResponse to fit words of diff length? #6. total number of trials? #7. corre...
{ "repo_name": "alexholcombe/twoWords", "path": "RansleySingleshotVersion/Justine/Hubert_18May2015_14-26.py", "copies": "2", "size": "49209", "license": "mit", "hash": 3745289546652181500, "line_mean": 55.0870069606, "line_max": 209, "alpha_frac": 0.6636387653, "autogenerated": false, "ratio": 3.5...
#Alex Holcombe alex.holcombe@sydney.edu.au #See the github repository for more information: https://github.com/alexholcombe/twoWords from __future__ import print_function from psychopy import monitors, visual, event, data, logging, core, sound, gui import psychopy.info import numpy as np from math import atan, lo...
{ "repo_name": "alexholcombe/twoWords", "path": "Charlie/twoWords.py", "copies": "3", "size": "52843", "license": "mit", "hash": -8010308503823285000, "line_mean": 55.9418859649, "line_max": 209, "alpha_frac": 0.6681490453, "autogenerated": false, "ratio": 3.5582115682445625, "config_test": fals...
#Alex Holcombe alex.holcombe@sydney.edu.au #See the github repository for more information: https://github.com/alexholcombe/twoWords from __future__ import print_function #use python3 style print from psychopy import monitors, visual, event, data, logging, core, sound, gui import psychopy.info import numpy as np ...
{ "repo_name": "alexholcombe/twoWords", "path": "twoWordsCherylwithIntro.py", "copies": "1", "size": "64243", "license": "mit", "hash": 5398931645272247000, "line_mean": 57.4861111111, "line_max": 419, "alpha_frac": 0.6738633003, "autogenerated": false, "ratio": 3.602882620155908, "config_test":...
"""A lexical analyzer class for simple shell-like syntaxes.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 # Input stacking and error message cleanup added by ESR, March 2000 import os.path import sys class shlex: "A lexical analyzer class for simple shell-like syntaxes." def __init__(self,...
{ "repo_name": "MalloyPower/parsing-python", "path": "front-end/testsuite-python-lib/Python-2.0/Lib/shlex.py", "copies": "4", "size": "7034", "license": "mit", "hash": -7187342638287929000, "line_mean": 36.0210526316, "line_max": 79, "alpha_frac": 0.4746943418, "autogenerated": false, "ratio": 4.5...
"""A lexical analyzer class for simple shell-like syntaxes.""" # Module and documentation by Eric S. Raymond, 21 Dec 1998 # Input stacking and error message cleanup added by ESR, March 2000 # push_source() and pop_source() made explicit by ESR, January 2001. import os.path import sys __all__ = ["shlex"] class shlex...
{ "repo_name": "jrabbit/ubotu-fr", "path": "src/shlex.py", "copies": "14", "size": "8159", "license": "bsd-3-clause", "hash": 3730988352145723400, "line_mean": 36.4266055046, "line_max": 76, "alpha_frac": 0.4799607795, "autogenerated": false, "ratio": 4.5888638920134985, "config_test": false, ...
# Alex Kim - Minesweeper import atexit as _atexit import random as _random import sys as _sys def render_board(game_board): # 0 1 2 3 4 5 6 # +-------------+ # 0|O O O O O O O| # 1|O O O O O O O| # 2|O O O O O O O| # 3|O O O O O O O| # 4|O O O O O O O| # 5|O O O O O O O| # 6|O O O ...
{ "repo_name": "ajkim141/minesweeper-flask", "path": "minesweeper.py", "copies": "1", "size": "11288", "license": "mit", "hash": -2069639437521127400, "line_mean": 32.8978978979, "line_max": 120, "alpha_frac": 0.5948795181, "autogenerated": false, "ratio": 3.6828711256117455, "config_test": fals...
"""AlexNet cnn model""" import numpy as np import tensorflow as tf from model_utils import * from model import Model class AlexNet(Model): def __init__(self, class_count, input_size_w=28, input_size_h=None, params_path=None, is_training=False): """Constructor. I...
{ "repo_name": "Lazea/TensorFlow", "path": "models/alexnet.py", "copies": "1", "size": "4969", "license": "apache-2.0", "hash": -4367961704092285400, "line_mean": 40.0661157025, "line_max": 83, "alpha_frac": 0.5636949084, "autogenerated": false, "ratio": 3.1251572327044026, "config_test": false,...
'''AlexNet for CIFAR10. FC layers are removed. Paddings are adjusted. Without BN, the start learning rate should be 0.01 (c) YANG, Wei ''' import torch.nn as nn __all__ = ['alexnet'] class AlexNet(nn.Module): def __init__(self, num_classes=10, nchannels=3): super(AlexNet, self).__init__() self...
{ "repo_name": "google-research/understanding-curricula", "path": "third_party/models/alexnet.py", "copies": "1", "size": "1380", "license": "apache-2.0", "hash": 3504049144795640300, "line_mean": 30.3636363636, "line_max": 74, "alpha_frac": 0.5753623188, "autogenerated": false, "ratio": 3.1435079...
"""AlexNet model.""" from athenet import Network from athenet.layers import ConvolutionalLayer, ReLU, LRN, MaxPool, \ FullyConnectedLayer, Dropout, Softmax from athenet.utils import load_data, get_bin_path ALEXNET_FILENAME = 'alexnet_weights.pkl.gz' def alexnet(trained=True, weights_filename=ALEXNET_FILENAME, w...
{ "repo_name": "heurezjusz/Athenet", "path": "athenet/models/alexnet.py", "copies": "2", "size": "2032", "license": "bsd-2-clause", "hash": 6651648401164641000, "line_mean": 28.8823529412, "line_max": 79, "alpha_frac": 0.4970472441, "autogenerated": false, "ratio": 3.89272030651341, "config_test...
""" AlexNet Dataset classification task: 28x28x3 shape (adjusted AlexNet) References: ImageNet Classification with Deep Convolutional Neural Networks. K. Simonyan, A. Zisserman. arXiv technical report, 2014. Links: http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf "...
{ "repo_name": "migueldsw/TL-DA-TF", "path": "NETWORKS/alexnet.py", "copies": "1", "size": "4145", "license": "apache-2.0", "hash": -7972507101517669000, "line_mean": 54.28, "line_max": 113, "alpha_frac": 0.6728588661, "autogenerated": false, "ratio": 3.49789029535865, "config_test": false, "h...
""" Algebraic formalism for hard objects Hard objects are defined as products of ``eta_i`` where ``i`` is the index of a node of the graph on which the hard object is defined. The ``eta`` elements are commuting and nilpotent. They satisfy ``<eta_{i_1} ...eta_{i_k}> = 1`` if ``i_1,..,i_k`` are all different...
{ "repo_name": "pernici/hobj", "path": "src/hobj.py", "copies": "1", "size": "24509", "license": "bsd-3-clause", "hash": 353776980326510900, "line_mean": 26.2322222222, "line_max": 85, "alpha_frac": 0.4682361581, "autogenerated": false, "ratio": 3.4393769295537466, "config_test": false, "has_n...
'''algebric relationship framework using multimethods ''' from __future__ import absolute_import from functools import partial try: from numpy import number as numpy_number_type except ImportError: numpy_number_type = None from jamenson.runtime.multimethod import MultiMethod, defmethod, defboth_wrapper from...
{ "repo_name": "matthagy/physmath", "path": "physmath/algebra.py", "copies": "1", "size": "3665", "license": "apache-2.0", "hash": -4824002952066422000, "line_mean": 25.1785714286, "line_max": 95, "alpha_frac": 0.6054570259, "autogenerated": false, "ratio": 3.31374321880651, "config_test": false...
'''Algebric Type System Supports arbriarty types rules as well as algebric combinations through set joins and complements. Designed to extend the Python type system to incorporate a more robust definition of types. This is espically useful for multimethods. Examples: In[0]: from jamenson.runtim...
{ "repo_name": "matthagy/Jamenson", "path": "jamenson/runtime/atypes/_atypes.py", "copies": "1", "size": "15179", "license": "apache-2.0", "hash": -5570458838699171000, "line_mean": 30.5571725572, "line_max": 103, "alpha_frac": 0.6001712893, "autogenerated": false, "ratio": 3.574894017899199, "c...
"""alge URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.9/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based ...
{ "repo_name": "teknologkoren/Strequelistan", "path": "alge/urls.py", "copies": "1", "size": "1195", "license": "mpl-2.0", "hash": -7276990372810533000, "line_mean": 33.1428571429, "line_max": 83, "alpha_frac": 0.6811715481, "autogenerated": false, "ratio": 3.4941520467836256, "config_test": fal...
alg = 'mf' nu = 480189 nv = 17770 traindata='~/works/data/netflix_protobuf_train_4by500' testdata='~/works/data/netflix_protobuf_valid' #nu = 1000990 #nv = 624961 #traindata='~/works/data/yahoo_protobuf_train_4by500' #testdata='~/works/data/yahoo_protobuf_valid' it=10 fly=4 dim=2048 #mf eta=2.4e-2 lam=4e-2 #dpmf eps...
{ "repo_name": "dmlc/experimental-mf", "path": "src/run.py", "copies": "1", "size": "1303", "license": "apache-2.0", "hash": -5188413155825594000, "line_mean": 30.7804878049, "line_max": 324, "alpha_frac": 0.6185725249, "autogenerated": false, "ratio": 2.3908256880733947, "config_test": true, ...
"""AlgoContest URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Clas...
{ "repo_name": "xudianc/AlgoContest", "path": "AlgoContest/urls.py", "copies": "1", "size": "2654", "license": "mit", "hash": -4128191568891630600, "line_mean": 41.6129032258, "line_max": 79, "alpha_frac": 0.6949280848, "autogenerated": false, "ratio": 3.10093896713615, "config_test": false, "...
"""Algolia is a funny word.""" from algoliasearch import algoliasearch class AlgoliaHelper(object): """Handles the Algolia stuff.""" def __init__(self): self.app_id = 'PBF4ZR3KBT' self.api_key = '9188cd13a0dbf3d0af949802b0e31489' # search-only self.index_name = 'ubuntu_irc_logs' ...
{ "repo_name": "phrawzty/ubunolia", "path": "algoliahelper/algoliahelper.py", "copies": "1", "size": "3275", "license": "mpl-2.0", "hash": -2960955746323192300, "line_mean": 29.3240740741, "line_max": 77, "alpha_frac": 0.546870229, "autogenerated": false, "ratio": 4.166666666666667, "config_test...
ALGOL_STYLE = { 'BACKGROUND_BLACK': '48;5;59', 'BACKGROUND_BLUE': '48;5;59', 'BACKGROUND_CYAN': '48;5;59', 'BACKGROUND_GREEN': '48;5;59', 'BACKGROUND_INTENSE_BLACK': '48;5;59', 'BACKGROUND_INTENSE_BLUE': '48;5;102', 'BACKGROUND_INTENSE_CYAN': '48;5;102', 'BACKGROUND_INTENSE_GREEN': '48;5...
{ "repo_name": "scopatz/xolors", "path": "ansi_colors.py", "copies": "1", "size": "77701", "license": "bsd-2-clause", "hash": -1005166823304271000, "line_mean": 35.5136278195, "line_max": 52, "alpha_frac": 0.5694778703, "autogenerated": false, "ratio": 2.1441264935566653, "config_test": false, ...
# Algorithm-2017-09-11.py # coding: utf-8 # In[ ]: import pandas as pd import numpy as np from pprint import pprint import math from utils import import_net, export_net from time import time # In[ ]: def sort_nodes(t): v = t[1] return -v[0], -v[1] def BFS(graph, start): """ André, please clarify: ...
{ "repo_name": "lucasosouza/graph-competition", "path": "Algorithm-2017-09-11.py", "copies": "1", "size": "3441", "license": "mit", "hash": 261155934437804740, "line_mean": 25.2595419847, "line_max": 89, "alpha_frac": 0.499127907, "autogenerated": false, "ratio": 3.675213675213675, "config_test"...
""" Algorithm evaluators for Rigor """ from __future__ import print_function from collections import defaultdict import sys class ObjectAreaEvaluator(object): """ Compares ground truth to detections using Wolf and Jolion's algorithm. :param scatter_punishment: :math:`f_{sc}(k)` "a parameter function of the evalua...
{ "repo_name": "blindsightcorp/rigor", "path": "lib/evaluator.py", "copies": "1", "size": "11995", "license": "bsd-2-clause", "hash": 2494505943603799600, "line_mean": 48.1598360656, "line_max": 197, "alpha_frac": 0.7323051271, "autogenerated": false, "ratio": 3.319955715471907, "config_test": f...
"""Algorithm for 2048 game.""" import random OFFSETS = {'UP': (1, 0), 'DOWN': (-1, 0), 'LEFT': (0, 1), 'RIGHT': (0, -1)} def openFile(score): try: scoreFile = file("highscore.txt", "r+") scoreList = [0] for line in scoreFile: scoreList.appen...
{ "repo_name": "WillSkywalker/2048_monte_carlo", "path": "_2048.py", "copies": "1", "size": "4116", "license": "apache-2.0", "hash": -5386982993453591000, "line_mean": 27.3862068966, "line_max": 122, "alpha_frac": 0.5160349854, "autogenerated": false, "ratio": 3.6619217081850532, "config_test": ...
"""Algorithm for basic classtering.""" import numpy as np from mutil import p_info from bunch import Bunch L_algorithm = ['alg1'] Default_param = Bunch(name='lr') def example(): comat, l_freq = generate_comat() group_comat(comat, l_freq, n_sample=100) def group_comat(comat, hist, n_sample, th_pmi=0.0, th_j...
{ "repo_name": "belemizz/mimic2_tools", "path": "clinical_db/alg/clustering.py", "copies": "1", "size": "2348", "license": "mit", "hash": 5551519073343978000, "line_mean": 25.9885057471, "line_max": 78, "alpha_frac": 0.5195911414, "autogenerated": false, "ratio": 2.705069124423963, "config_test"...
# Algorithm for determining chord symbols based on frequency spectrum from __future__ import division import math samplingFrequency = 2000 bufferSize = 1024 referenceFrequency = 130.81278265 # C numHarmonics = 2 numOctaves = 4 numBinsToSearch = 2 noteFrequencies = [] chromagram = [0.0000000000000000000]*12 noteNames ...
{ "repo_name": "gmittal/joey-alexander", "path": "util/chords.py", "copies": "1", "size": "10739", "license": "mit", "hash": 7695201018163842000, "line_mean": 30.2180232558, "line_max": 134, "alpha_frac": 0.5735170873, "autogenerated": false, "ratio": 3.0379066478076377, "config_test": false, ...
"""Algorithm for finding strongly connected components from a directed graph. Component is strongly connected when there's a path from every vertex in to every other vertex within the component. Time complexity: O(V + E) """ from collections import defaultdict from algolib.graph.dfs import DFS def __process_vertex_ea...
{ "repo_name": "niemmi/algolib", "path": "algolib/graph/strong_components.py", "copies": "1", "size": "2131", "license": "bsd-3-clause", "hash": 2190603806152446000, "line_mean": 26.3205128205, "line_max": 77, "alpha_frac": 0.6316283435, "autogenerated": false, "ratio": 3.895795246800731, "confi...
# Algorithm for maximum coverage problem import numpy as np def maximum_k_coverage(sets, k): covered = set() selected_sets = [] if k >= len(sets): return sets for i in xrange(k): max_set = max(sets, key=lambda s: len(s - covered)) selected_sets.append(max_set) ...
{ "repo_name": "xiaohan2012/lst", "path": "max_cover.py", "copies": "1", "size": "1054", "license": "mit", "hash": -5074639635083706000, "line_mean": 26.7368421053, "line_max": 63, "alpha_frac": 0.6110056926, "autogenerated": false, "ratio": 3.411003236245955, "config_test": false, "has_no_key...
"""Algorithm for simulating a 2048 game using Monte-Carlo method.""" import random, _2048 SIMULATE_TIMES = 100000 DIRECTIONS = ('UP', 'DOWN', 'LEFT', 'RIGHT') def simulate_to_end(game): while game.get_state(): dircts = list(DIRECTIONS) for i in xrange(3): c = random.choice(dircts) ...
{ "repo_name": "WillSkywalker/2048_monte_carlo", "path": "monte_carlo.py", "copies": "1", "size": "1244", "license": "apache-2.0", "hash": -7812411360253709000, "line_mean": 22.9423076923, "line_max": 68, "alpha_frac": 0.5699356913, "autogenerated": false, "ratio": 3.6374269005847952, "config_te...
algorithm = "fourier" propagator = "chinchen" T = 2 * 4.4 dt = 0.05 dimension = 1 ncomponents = 1 eps = 0.1 potential = "quartic" sigma = 4.0 # The grid of our simulation domain limits = [(-6.283185307179586, 6.283185307179586)] number_nodes = [8192] # The parameter set of the initial wavepacket Q = [[1.0 ]] P = ...
{ "repo_name": "WaveBlocks/WaveBlocksND", "path": "examples/quartic/quartic_1D_f_cc.py", "copies": "1", "size": "1142", "license": "bsd-3-clause", "hash": -6076608341322623000, "line_mean": 19.3928571429, "line_max": 85, "alpha_frac": 0.5323992995, "autogenerated": false, "ratio": 2.97395833333333...
algorithm = 'fourier' propagator = 'fourier' T = 6 dt = 0.01 dimension = 2 ncomponents = 1 eps = 0.05 potential = 'henon_heiles' a = 1 b = 3 limits = [[-1.5707963267948966, 1.5707963267948966], [-1.5707963267948966, 1.5707963267948966]] number_nodes = [2**10, 2**10] # The parameter set of the initial wa...
{ "repo_name": "WaveBlocks/WaveBlocksND", "path": "examples/henon_heiles/henon2_f.py", "copies": "1", "size": "1365", "license": "bsd-3-clause", "hash": -2106431423564026000, "line_mean": 19.0735294118, "line_max": 86, "alpha_frac": 0.5091575092, "autogenerated": false, "ratio": 2.802874743326489,...
algorithm = "fourier" propagator = "fourier" T = 70 dt = 0.005 dimension = 1 ncomponents = 1 # Note: the eps in the paper is our eps**2 eps = 0.1530417681822 potential = "eckart" sigma = 100 * 3.8008 * 10**(-4.0) a = 1.0 / (2.0 * 0.52918) # The grid of our simulation domain limits = [[-9 * 3.141592653589793, 9 * 3...
{ "repo_name": "WaveBlocks/WaveBlocksND", "path": "examples/tunneling_eckart/eckart_phi0_f.py", "copies": "1", "size": "1403", "license": "bsd-3-clause", "hash": 5871295283274520000, "line_mean": 21.2698412698, "line_max": 94, "alpha_frac": 0.5716322167, "autogenerated": false, "ratio": 2.94129979...
algorithm = "hagedorn" propagator = "semiclassical" splitting_method = "Y4" T = 10 dt = 0.01 dimension = 1 ncomponents = 2 eps = 0.2 delta = eps potential = "delta_gap" leading_component = 0 # The parameter set of the initial wavepacket Q = [[1.0 - 5.0j]] P = [[ 1.0j]] q = [[-5.0]] p = [[ 1.0]] S = [[0.0]] ...
{ "repo_name": "WaveBlocks/WaveBlocksND", "path": "examples/single_avoided_crossing/single_crossing_1D_p.py", "copies": "1", "size": "1264", "license": "bsd-3-clause", "hash": -8892399681891240000, "line_mean": 19.3870967742, "line_max": 85, "alpha_frac": 0.5134493671, "autogenerated": false, "rat...
algorithm = "hagedorn" propagator = "semiclassical" splitting_method = "Y4" T = 12 dt = 0.001 dimension = 1 ncomponents = 1 eps = 0.01 potential = "cosh_osc" # The parameter set of the initial wavepacket Q = [[1.0]] P = [[1.0j]] q = [[1.0]] p = [[0.0]] S = [[0.0]] wp0 = { "type": "HagedornWavepacket", "di...
{ "repo_name": "WaveBlocks/WaveBlocksND", "path": "examples/cosh_oscillators/cosh_1D_p_nsd.py", "copies": "1", "size": "1276", "license": "bsd-3-clause", "hash": 2359656071280431600, "line_mean": 17.2285714286, "line_max": 48, "alpha_frac": 0.4420062696, "autogenerated": false, "ratio": 3.17412935...
algorithm = "hagedorn" propagator = "semiclassical" splitting_method = "Y4" T = 12 dt = 0.01 dimension = 1 ncomponents = 1 eps = 0.1 potential = "quadratic" # The parameter set of the initial wavepacket Q = [[1.0]] P = [[1.0j]] q = [[1.0]] p = [[0.0]] S = [[0.0]] # What it takes to specify a wavepacket! wp0 = { ...
{ "repo_name": "WaveBlocks/WaveBlocksND", "path": "examples/harmonic_oscillators/harmonic_1D_p.py", "copies": "1", "size": "1096", "license": "bsd-3-clause", "hash": 3774122229013654500, "line_mean": 18.5714285714, "line_max": 85, "alpha_frac": 0.5319343066, "autogenerated": false, "ratio": 3.0700...
algorithm = "hagedorn" propagator = "semiclassical" splitting_method = "Y4" T = 12 dt = 0.01 dimension = 1 ncomponents = 1 eps = 0.24 potential = "quadratic" sigma = 0.5 # The parameter set of the initial wavepacket # Parameter values computed by 'ComputeGroundstate.py' Q = [[1.18920712 + 0.0j]] P = [[0.0 + 0.8408...
{ "repo_name": "WaveBlocks/WaveBlocksND", "path": "examples/harmonic_oscillators/harmonic_1D_p_stationary_groundstate.py", "copies": "1", "size": "1191", "license": "bsd-3-clause", "hash": 2341553007688635400, "line_mean": 19.5344827586, "line_max": 85, "alpha_frac": 0.5499580185, "autogenerated": f...
algorithm = "hagedorn" propagator = "semiclassical" splitting_method = "Y4" T = 12 dt = 0.01 dimension = 2 ncomponents = 1 eps = 1.0 potential = "quadratic_2d" # The parameter set of the initial wavepacket # Parameter values computed by 'ComputeGroundstate.py' Q = [[1.18920712, 0.00000000], [0.00000000, 1.189...
{ "repo_name": "WaveBlocks/WaveBlocksND", "path": "examples/harmonic_oscillators/harmonic_2D_p_stationary_groundstate.py", "copies": "1", "size": "1395", "license": "bsd-3-clause", "hash": 1173467887595219700, "line_mean": 20.1363636364, "line_max": 85, "alpha_frac": 0.5318996416, "autogenerated": f...
algorithm = "hagedorn" propagator = "semiclassical" splitting_method = "Y4" T = 2 * 4.4 dt = 0.0005 dimension = 1 ncomponents = 1 eps = 0.1 potential = {} potential["variables"] = ["x"] potential["potential"] = "x**4 - x**2" # The parameter set of the initial wavepacket Q = [[1.0]] P = [[1.0j]] q = [[1.0]] p = [[0...
{ "repo_name": "WaveBlocks/WaveBlocksND", "path": "examples/double_well/double_well_1D_p.py", "copies": "1", "size": "1165", "license": "bsd-3-clause", "hash": 267748695122920640, "line_mean": 19.0862068966, "line_max": 85, "alpha_frac": 0.5313304721, "autogenerated": false, "ratio": 3.04973821989...
algorithm = "hagedorn" propagator = "semiclassical" splitting_method = "Y4" T = 70 dt = 0.005 dimension = 1 ncomponents = 1 # Note: the eps in the paper is our eps**2 eps = 0.1530417681822 potential = "eckart" sigma = 100 * 3.8008 * 10**(-4.0) a = 1.0 / (2.0 * 0.52918) # The parameter set of the initial wavepacket...
{ "repo_name": "WaveBlocks/WaveBlocksND", "path": "examples/tunneling_eckart/eckart_phi2_p.py", "copies": "1", "size": "1315", "license": "bsd-3-clause", "hash": 1416442261457415000, "line_mean": 20.9166666667, "line_max": 94, "alpha_frac": 0.5657794677, "autogenerated": false, "ratio": 2.97511312...
algorithm = "hagedorn" propagator = "semiclassical" splitting_method = "Y4" T = dt = dimension = 1 ncomponents = 1 eps = potential = # The parameter set of the initial wavepacket Q = [[1.0]] P = [[1.0j]] q = [[1.0]] p = [[0.0]] S = [[0.0]] leading_component = # How often do we write data to disk write_nth = 1 m...
{ "repo_name": "WaveBlocks/WaveBlocksND", "path": "examples/templates/template_1D_p.py", "copies": "1", "size": "1070", "license": "bsd-3-clause", "hash": -467067753189527230, "line_mean": 18.1071428571, "line_max": 85, "alpha_frac": 0.5289719626, "autogenerated": false, "ratio": 3.101449275362319...
algorithm = "hagedorn" propagator = "semiclassical" splitting_method = "Y4" T = dt = dimension = 2 ncomponents = 1 eps = potential = # The parameter set of the initial wavepacket Q = [[1.0, 0.0], [0.0, 1.0]] P = [[1.0j, 0.0 ], [0.0, 1.0j]] q = [[-1.0], [ 0.0]] p = [[0.0], [0.0]] S = [[0.0]...
{ "repo_name": "WaveBlocks/WaveBlocksND", "path": "examples/templates/template_2D_p.py", "copies": "1", "size": "1237", "license": "bsd-3-clause", "hash": -8330119545310793000, "line_mean": 18.0307692308, "line_max": 86, "alpha_frac": 0.5004042037, "autogenerated": false, "ratio": 2.97355769230769...
algorithm = "hagedorn" propagator = "semiclassical" splitting_method = "Y61" T = 15 dt = 0.01 dimension = 1 ncomponents = 1 eps = 0.1104536 potential = 'morse_zero' D = 0.0572 a = 0.983 x0 = 5.03855 # The parameter set of the initial wavepacket # Sigma = PQ^{-1} = 1.3836 Q = [[1.0]] P = [[1.0j]] q = [[4.53]] p = [...
{ "repo_name": "WaveBlocks/WaveBlocksND", "path": "examples/morse_oscillators/I2_morse.py", "copies": "1", "size": "1126", "license": "bsd-3-clause", "hash": 2561484126955237000, "line_mean": 18.0847457627, "line_max": 85, "alpha_frac": 0.526642984, "autogenerated": false, "ratio": 2.9095607235142...
'Algorithmia Algorithm API Client (python)' import base64 import json import re from Algorithmia.async_response import AsyncResponse from Algorithmia.algo_response import AlgoResponse from Algorithmia.errors import ApiError, ApiInternalError, raiseAlgoApiError from enum import Enum from algorithmia_api_client.rest imp...
{ "repo_name": "algorithmiaio/algorithmia-python", "path": "Algorithmia/algorithm.py", "copies": "1", "size": "8975", "license": "mit", "hash": 3424146257052005000, "line_mean": 42.9950980392, "line_max": 144, "alpha_frac": 0.6338718663, "autogenerated": false, "ratio": 4.2096622889305815, "conf...
'Algorithmia API Client (python)' from Algorithmia.client import Client from Algorithmia.handler import Handler import sys import sys if sys.version_info[0] >= 3: from adk import ADK import os apiKey = None apiAddress = None # Get reference to an algorithm using a default client def algo(algoRef): # Return ...
{ "repo_name": "algorithmiaio/algorithmia-python", "path": "Algorithmia/__init__.py", "copies": "1", "size": "1609", "license": "mit", "hash": -5208113613661092000, "line_mean": 28.2545454545, "line_max": 83, "alpha_frac": 0.7277812306, "autogenerated": false, "ratio": 3.830952380952381, "config...
'Algorithmia Data API Client (python)' import json import re import os import six import tempfile import Algorithmia from Algorithmia.datafile import DataFile from Algorithmia.data import DataObject, DataObjectType from Algorithmia.errors import DataApiError from Algorithmia.util import getParentAndBase, pathJoin fro...
{ "repo_name": "algorithmiaio/algorithmia-python", "path": "Algorithmia/datadirectory.py", "copies": "1", "size": "6003", "license": "mit", "hash": -2204779883851168800, "line_mean": 31.625, "line_max": 102, "alpha_frac": 0.6006996502, "autogenerated": false, "ratio": 4.165857043719639, "config_...
'Algorithmia Data API Client (python)' import re import json import six import tempfile from datetime import datetime import os.path import pkgutil from Algorithmia.util import getParentAndBase from Algorithmia.data import DataObject, DataObjectType from Algorithmia.errors import DataApiError, raiseDataApiError cla...
{ "repo_name": "algorithmiaio/algorithmia-python", "path": "Algorithmia/datafile.py", "copies": "1", "size": "7937", "license": "mit", "hash": -8500454176323640000, "line_mean": 32.4894514768, "line_max": 112, "alpha_frac": 0.5911553484, "autogenerated": false, "ratio": 4.068170169144029, "confi...
'''Algorithmically determine soft selector strings. .. This software is released under an MIT/X11 open source license. Copyright 2012-2014 Diffeo, Inc. Soft selectors ============== .. autofunction:: find_soft_selectors .. autofunction:: make_ngram_corpus ''' from __future__ import absolute_import, division, prin...
{ "repo_name": "dossier/dossier.models", "path": "dossier/models/soft_selectors.py", "copies": "1", "size": "12655", "license": "mit", "hash": 4051342648212833000, "line_mean": 35.1571428571, "line_max": 88, "alpha_frac": 0.6005531411, "autogenerated": false, "ratio": 4.035395408163265, "config_...
# Algorithm information import re, sys, numpy, copy, math from numpy.random import * from xml.dom import minidom #### Regular expression for implemented priors or posterior placeholder############################# re_prior_const=re.compile('constant') re_prior_uni=re.compile('uniform') re_prior_normal=re.compile('n...
{ "repo_name": "MichaelPHStumpf/Peitho", "path": "peitho/errors_and_parsers/ode_parsers/parse_object_info.py", "copies": "1", "size": "44706", "license": "mit", "hash": 6448375392215181000, "line_mean": 36.5365239295, "line_max": 230, "alpha_frac": 0.6750548025, "autogenerated": false, "ratio": 3....
# algorithm: # 0. remove from consideration any QC test that fails to produce TPR / FPR >= some tunable threshold # 1. remove from consideration any bad profile not flagged by any test; put these aside for new qc test design # 2. accept all individual qc tests with 0% fpr; remove these from consideration, along with al...
{ "repo_name": "BillMills/AutoQC", "path": "catchall.py", "copies": "2", "size": "6659", "license": "mit", "hash": -4400967086091814400, "line_mean": 36.2011173184, "line_max": 204, "alpha_frac": 0.6424388046, "autogenerated": false, "ratio": 3.3580433686333837, "config_test": true, "has_no_ke...
# Algorithm # ========= algorithm = "fourier" # Time stepping # ============= # Perform a simulation in the time interval [0, T]. T = 3.0 # Duration of a single time step. dt = 0.02 # Semi-classical parameter # ======================== # The epsilon parameter in the semiclassical scaling eps = 0.2 # Potentia...
{ "repo_name": "WaveBlocks/WaveBlocks", "path": "doc/manual/examples/parameters_01.py", "copies": "1", "size": "1193", "license": "bsd-3-clause", "hash": 3764348063394018000, "line_mean": 17.9365079365, "line_max": 73, "alpha_frac": 0.6135792121, "autogenerated": false, "ratio": 3.0747422680412373...
import csv import path __author__ = "Dan Rugeles" __copyright__ = "Copyright 2013, Accelerometrics" __credits__ = ["Dan Rugeles"] __license__ = "GPL" __version__ = "1.0.1" __maintainer__ = "Dan Rugeles" __email__ = "danrugeles@gmail.com" __status__ = "Production" #1.0.1 "main(): Added Main to easily preprocess sever...
{ "repo_name": "danrugeles/Accelerometrics", "path": "preprocess.py", "copies": "1", "size": "2909", "license": "mit", "hash": -457842479892118400, "line_mean": 26.4433962264, "line_max": 92, "alpha_frac": 0.5623925748, "autogenerated": false, "ratio": 2.9354187689202824, "config_test": false, ...
""" Algorithm predicting a random rating. """ from __future__ import (absolute_import, division, print_function, unicode_literals) import numpy as np from .algo_base import AlgoBase class NormalPredictor(AlgoBase): """Algorithm predicting a random rating based on the distribution of the...
{ "repo_name": "charmoniumQ/Surprise", "path": "surprise/prediction_algorithms/random_pred.py", "copies": "1", "size": "1302", "license": "bsd-3-clause", "hash": 1470354788537799700, "line_mean": 29.2790697674, "line_max": 79, "alpha_frac": 0.5852534562, "autogenerated": false, "ratio": 3.42631578...
"""Algorithms and strategies to play 2048 and collect experience.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import time import math import itertools import numpy as np from qlearning4k.games.twenty48 import Twenty48 def random_strategy(_, actions...
{ "repo_name": "bhillmann/2048-rl", "path": "qlearning4k/agents/agents_twenty48.py", "copies": "1", "size": "5024", "license": "mit", "hash": 1192259145059650000, "line_mean": 31, "line_max": 141, "alpha_frac": 0.5905652866, "autogenerated": false, "ratio": 3.7746055597295265, "config_test": fal...
""" Algorithms for clustering : Meanshift, Affinity propagation and spectral clustering. """ # Author: Alexandre Gramfort alexandre.gramfort@inria.fr # Gael Varoquaux gael.varoquaux@normalesup.org # License: BSD 3 clause import numpy as np from ..base import BaseEstimator, ClusterMixin from ..utils import a...
{ "repo_name": "rseubert/scikit-learn", "path": "sklearn/cluster/affinity_propagation_.py", "copies": "21", "size": "10605", "license": "bsd-3-clause", "hash": 5238808414725888000, "line_mean": 31.9347826087, "line_max": 79, "alpha_frac": 0.597359736, "autogenerated": false, "ratio": 4.02161547212...
""" Algorithms for computing spanning trees of entity graphs. """ __author__ = 'smartschat' def precision_system_output(entity, partitioned_entity): """ Compute a spanning tree from antecedent information. All edges in the spanning tree correspond to anaphor-antecedent pairs. In order to access this an...
{ "repo_name": "Yegor-Budnikov/cort", "path": "cort/analysis/spanning_tree_algorithms.py", "copies": "2", "size": "4937", "license": "mit", "hash": 3987678294780118500, "line_mean": 36.4015151515, "line_max": 80, "alpha_frac": 0.6370265343, "autogenerated": false, "ratio": 4.323117338003502, "co...
"""Algorithms for computing symbolic roots of polynomials. """ from __future__ import print_function, division import math from sympy.core import S, I, pi from sympy.core.compatibility import ordered, range, reduce from sympy.core.exprtools import factor_terms from sympy.core.function import _mexpand from sympy.core...
{ "repo_name": "kaushik94/sympy", "path": "sympy/polys/polyroots.py", "copies": "1", "size": "33045", "license": "bsd-3-clause", "hash": -6635360428513781000, "line_mean": 28.5044642857, "line_max": 104, "alpha_frac": 0.5168709336, "autogenerated": false, "ratio": 3.2566275746526068, "config_tes...
"""Algorithms for computing symbolic roots of polynomials. """ from __future__ import print_function, division import math from sympy.core.symbol import Dummy, Symbol, symbols from sympy.core import S, I, pi from sympy.core.compatibility import ordered from sympy.core.mul import expand_2arg, Mul from sympy.core.powe...
{ "repo_name": "Arafatk/sympy", "path": "sympy/polys/polyroots.py", "copies": "31", "size": "32388", "license": "bsd-3-clause", "hash": 8339600344904056000, "line_mean": 27.969588551, "line_max": 92, "alpha_frac": 0.5136779054, "autogenerated": false, "ratio": 3.233626198083067, "config_test": f...
"""Algorithms for computing symbolic roots of polynomials. """ from sympy.core.symbol import Dummy from sympy.core.add import Add from sympy.core.mul import Mul from sympy.core import S, I, Basic from sympy.core.sympify import sympify from sympy.core.numbers import Rational, igcd from sympy.ntheory import divisors, i...
{ "repo_name": "Cuuuurzel/KiPyCalc", "path": "sympy_old/polys/polyroots.py", "copies": "2", "size": "18242", "license": "mit", "hash": -8679868022038474000, "line_mean": 25.06, "line_max": 91, "alpha_frac": 0.5099769762, "autogenerated": false, "ratio": 3.3781481481481483, "config_test": false, ...
"""Algorithms for computing symbolic roots of polynomials. """ from sympy.core.symbol import Dummy from sympy.core import S, I from sympy.core.sympify import sympify from sympy.core.numbers import Rational, igcd from sympy.ntheory import divisors, isprime, nextprime from sympy.functions import exp, sqrt from sympy.p...
{ "repo_name": "srjoglekar246/sympy", "path": "sympy/polys/polyroots.py", "copies": "3", "size": "18233", "license": "bsd-3-clause", "hash": -5527631685905393000, "line_mean": 24.9729344729, "line_max": 91, "alpha_frac": 0.5080897274, "autogenerated": false, "ratio": 3.385886722376973, "config_t...
"""Algorithms for computing symbolic roots of polynomials. """ from sympy.core.symbol import Dummy, Symbol, symbols from sympy.core import S, I, pi from sympy.core.sympify import sympify from sympy.core.numbers import Rational, igcd from sympy.ntheory import divisors, isprime, nextprime from sympy.functions import ex...
{ "repo_name": "amitjamadagni/sympy", "path": "sympy/polys/polyroots.py", "copies": "1", "size": "23045", "license": "bsd-3-clause", "hash": -3459258910794162000, "line_mean": 25.921728972, "line_max": 91, "alpha_frac": 0.5182035149, "autogenerated": false, "ratio": 3.186091524955067, "config_te...