blob_id stringlengths 40 40 | directory_id stringlengths 40 40 | path stringlengths 2 283 | content_id stringlengths 40 40 | detected_licenses listlengths 0 91 | license_type stringclasses 2
values | repo_name stringlengths 3 135 | snapshot_id stringlengths 40 40 | revision_id stringlengths 40 40 | branch_name stringlengths 4 68 | visit_date timestamp[ns]date 2015-07-25 20:53:29 2023-09-06 10:46:05 | revision_date timestamp[ns]date 1970-01-01 00:00:00 2037-05-03 13:00:00 | committer_date timestamp[ns]date 1970-01-01 00:00:00 2036-02-09 17:40:36 | github_id int64 1.61k 691M ⌀ | star_events_count int64 0 209k | fork_events_count int64 0 110k | gha_license_id stringclasses 24
values | gha_event_created_at timestamp[ns]date 2012-06-03 10:21:33 2023-09-14 21:59:50 ⌀ | gha_created_at timestamp[ns]date 2008-03-27 23:40:48 2023-09-13 22:40:33 ⌀ | gha_language stringclasses 250
values | src_encoding stringclasses 27
values | language stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 6 10M | extension stringclasses 289
values | filename stringlengths 1 218 | content stringlengths 6 10M |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
513ea5a1cb2ba6d84464dde9bb824f327595c9b5 | 8b6f8039fb6556085ca35e2f41b2303ab2866357 | /utils/input.py | e2f2df7e422c5929f15528e0804ca02b52698653 | [
"Apache-2.0"
] | permissive | tasotasoso/aoji | 9d70ea75a39703a15fca7aceccaff17000041a11 | 85ebfcaa24d1e6f18477ec15935ff45eaf6a5427 | refs/heads/master | 2022-12-09T16:00:28.438295 | 2020-09-05T11:38:45 | 2020-09-05T11:38:45 | 291,369,937 | 0 | 0 | Apache-2.0 | 2020-09-05T11:38:46 | 2020-08-30T00:13:09 | Python | UTF-8 | Python | false | false | 1,516 | py | input.py | import re
def valid_choice(choice, competition_numbers):
"""Choise competition number.
This function ask you to choose competition number your want to launch project.
-------
Args:
competition_numbers(int): number of competitions you got by kaggle api.
Returns:
result(int): numb... |
4ddb311462f2758b5a45ee5ac0053ad7eeb7eafc | 9211d5913bea91927bd5b97d4f22e8801536ace7 | /Simulation.py | 84c4514ac839bdacf88a7397ca878fa53a7f8682 | [] | no_license | GregLaycock/CPJ-Reactor-Kinetics | 95ffb301a3f45b2b176870a84dd9c3f420c83842 | dfb43e21134545abfc123f31d7d6cece68ee470a | refs/heads/master | 2020-12-25T15:07:52.046121 | 2016-08-20T23:53:03 | 2016-08-20T23:53:03 | 66,168,652 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 2,629 | py | Simulation.py | import Adjust_Kinetics
from PB_isothermal import *
def model_curves(Z):
from numpy import linspace, array, append, squeeze, zeros
from scipy.integrate import odeint
plot_vals = {}
F,components = add_component(Adjust_Kinetics.components)
# Reactions( can be edited and rest will take care of itself... |
335fb8a9fd3580ac04c636f5f770aa36e35e5f6a | 4c74123bfaa6166fc67b541899930eb81e0f0b8b | /Counting_sort.py | 95c2d715a102e36274483ffca90f70a1d05e6816 | [
"MIT"
] | permissive | meh369/sample-workspace | 98e6d2b69e72943c4fc842631d83412fba33aad1 | 4d53e1de477259b9579bb3d9539c723f0e8d35dc | refs/heads/master | 2021-03-18T00:56:01.841214 | 2020-05-11T16:17:26 | 2020-05-11T16:17:26 | 247,032,309 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,400 | py | Counting_sort.py | import time
class CountingSort:
'''Make a count sort algo using input array and variable derived from it
Takes input: An array of elements
Maximum elements in array
Length of Array
'''
def __init__(self):
self.arr = [int(x) for x in input('Enter Comm... |
3ccdf6841fc424567e266c9fae5c0d1d5112665e | c7d3ae6e46a505cceea3cb6193412f4b5983bed3 | /albumentations/augmentations/crops/__init__.py | 9d447f1d7e2a97edbeaf95d461eeb66f7a0bae95 | [
"MIT"
] | permissive | albumentations-team/albumentations | 5f4e969f8185f1070413f5d85fb410cad3c5aa41 | e3b47b3a127f92541cfeb16abbb44a6f8bf79cc8 | refs/heads/master | 2023-09-01T07:32:03.676066 | 2023-06-10T07:12:14 | 2023-06-10T07:12:14 | 136,265,021 | 9,022 | 1,208 | MIT | 2023-06-10T07:12:15 | 2018-06-06T03:10:50 | Python | UTF-8 | Python | false | false | 52 | py | __init__.py | from .functional import *
from .transforms import *
|
6858a078c5b290bc79cacf809e5713c37600939a | b17e6fed2e2d57eea0a452293af6b09f08a10bc6 | /page_objects/MainPage.py | 66580a14f50596e4e79d64ba09cd8330a473a2b6 | [] | no_license | mkile/OTUS_web_test_selenium | b252252e3ae190e284d88efa1f88d15f489ae02e | 5fb51bd1e286c1ea5a10bb21cc85f6f3f008fef6 | refs/heads/main | 2023-06-24T10:28:20.084347 | 2021-07-29T14:56:38 | 2021-07-29T14:56:38 | 363,658,866 | 0 | 0 | null | 2021-07-08T07:31:30 | 2021-05-02T13:34:28 | Python | UTF-8 | Python | false | false | 2,597 | py | MainPage.py | from selenium.webdriver.common.by import By
from .BasePage import BasePage
class MainPage(BasePage):
CATEGORY_PAGE_LI_SELECTOR = (By.CSS_SELECTOR,
"#menu > div.collapse.navbar-collapse.navbar-ex1-collapse > ul > li:nth-child(1) > a")
CATEGORY_PAGE_LINK_SELECTOR = (By.CSS_SELEC... |
b027fdebb025b437136ef87d39893623bb408971 | d2727d682782893beff88675430f3c514ab23417 | /synapse/resourcefile.py | 758a5fef82880d7e7768f2efd50dbdaab0992e5f | [
"MIT"
] | permissive | comodit/synapse-agent | 95c9bfda96613feebf6646b4dee04086856afd24 | ee3c6c2ec07ba34e821529f3e097123326b8b9c5 | refs/heads/master | 2021-01-16T21:02:04.367447 | 2017-04-22T10:13:12 | 2017-04-22T10:13:12 | 5,659,833 | 5 | 3 | null | 2015-09-30T20:08:31 | 2012-09-03T14:16:09 | Python | UTF-8 | Python | false | false | 2,758 | py | resourcefile.py | import time
import json
import urllib2
from pprint import pformat
from synapse.config import config
from synapse.controller import Controller
from synapse.logger import logger
from synapse.synapse_exceptions import ResourceException
@logger
class ResourceFile:
def __init__(self, transport):
opts = confi... |
01ddaae3dd1bd71f0d5db5c13121ca2ee617f064 | 1eb86df4e315d4c5e0649d1086963f7503d1539e | /database.py | 57fb12a37f304551fc723f6e176711960f30648d | [] | no_license | stldsa/data | b69b63bc8cb330b3dde100209aa176cd49e6643a | ce3eafc50542c7a80815a74f84e19b66f20a6406 | refs/heads/master | 2023-03-18T09:11:01.055903 | 2021-03-02T05:04:07 | 2021-03-02T05:04:07 | 322,439,260 | 3 | 3 | null | 2021-03-01T23:08:05 | 2020-12-17T23:42:09 | Python | UTF-8 | Python | false | false | 331 | py | database.py | import os
from sqlalchemy import create_engine
from flask_sqlalchemy import SQLAlchemy
from dotenv import load_dotenv
from dsadata import init_app
load_dotenv()
db = SQLAlchemy()
engine = create_engine(os.getenv("DATABASE_URL"))
def reset():
app = init_app()
db = SQLAlchemy(app)
db.drop_all()
db.r... |
84d22088a0be2d8e0804af972a42d04e433ae99b | 91a8bc6be4a7b7e46eb13eae030490fc72823084 | /scripts/phonons_13_dyn_stable_compounds/restructured.py | c4efed42ade4d46d1075d774acbbe710c0d173e3 | [
"BSD-3-Clause"
] | permissive | JaGeo/Phonons_GAPs_silicon | b92fd841831d9195b176b69ed0a509ec3861a5c7 | be12e0d15e4656b9ea1d4c0a64b103a81892c5b5 | refs/heads/master | 2022-11-12T13:37:16.609348 | 2020-06-30T18:14:41 | 2020-06-30T18:14:41 | 266,754,597 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,821 | py | restructured.py | import os
from PhoGap import PhonopyFiniteDisplacements, PhononsQuippyFiniteDisplacements, ComparePhononBS
# Please adapt the following lines according to your folder structure.
path_to_potential = "/CECI/home/ucl/modl/jgeorge/Potentials"
# This will construct all paths for the potentials, please adapt to the potent... |
af93efc9adce2eaa3114b26f7d15e42216bfe413 | 79ee7221e8ff056f92ee1e6060ffcbfcac207ccd | /sonic_platform_base/sonic_sfp/qsfp_dd.py | 33c9737b0613b1f9c881860b50d8f0a7a37b6141 | [
"LicenseRef-scancode-generic-cla"
] | no_license | Marvell-OpenNOS/sonic-platform-common | ff8269db843fcc100c525b16578e164106675309 | 433dd1ae9d3f9f45b048fbbe402e8fd2944d85e0 | refs/heads/master | 2023-03-05T18:26:54.103090 | 2020-08-11T17:51:12 | 2020-08-11T17:51:12 | 290,123,639 | 0 | 1 | null | 2021-02-18T12:14:59 | 2020-08-25T05:38:47 | Python | UTF-8 | Python | false | false | 23,634 | py | qsfp_dd.py | #! /usr/bin/env python
#----------------------------------------------------------------------------
# QSFP-DD 8X Transceiver (QSFP Double Density)
#----------------------------------------------------------------------------
from __future__ import print_function
try:
from sff8024 import type_of_transceiver # ... |
50db891bf3ee28f7bbbd4f100d35a24d15e05ddf | 72b77f97876983025eb05a5aa1d6f248a1be3074 | /perfect_squares.py | e7b1803ed7376844cca5c32f097383a64b93e40b | [
"Apache-2.0"
] | permissive | erjan/coding_exercises | 4c6bccb2cdac65ccbc3107a482914275ecd157f7 | 68dac358a6d4dabd41d47dbd4addb2ec50e0ca11 | refs/heads/master | 2023-09-02T07:25:30.886175 | 2023-08-27T06:13:06 | 2023-08-27T06:13:06 | 236,281,070 | 5 | 0 | Apache-2.0 | 2020-05-05T15:08:49 | 2020-01-26T07:32:09 | Python | UTF-8 | Python | false | false | 1,825 | py | perfect_squares.py | '''
Given an integer n, return the least number of perfect square numbers that sum to n.
A perfect square is an integer
that is the square of an integer; in other words, it is the product of some integer
with itself. For example, 1, 4, 9, and 16 are perfect squares while 3 and 11 are not.
'''
#BFS
from collections ... |
d6fd311149ac11d1203939b3ab5d0fff1f468803 | 9294057f5b50feb556a186c5b864dc73b13ded10 | /alarme.py | b90f66c5c26ded55945cf7fec7aaeeede2f6ff75 | [] | no_license | Sanjivala/lstime-python | 3691a2d906433b956c9ec700a5a9638a7d1e7a86 | 3f8b71ceff823cdaa15616957237a1b32e85a578 | refs/heads/main | 2023-06-08T03:34:56.145001 | 2021-06-20T02:31:01 | 2021-06-20T02:31:01 | 378,542,170 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,798 | py | alarme.py | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'alarme.ui'
#
# Created by: PyQt5 UI code generator 5.14.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjec... |
0e0bd589524b5136d5b6dabe033674ba959eb7f5 | 1802a6c56544f2537006c799f1e13281888978d4 | /logbook/views.py | b9a6355053a5ee64f1fcac18bcd3e0612c117058 | [] | no_license | ledomone/reading | 07aa84022d2627a279adbc341dcacaa15a2497a8 | 79ec602475542667e3a10aecb72ef68858eb994b | refs/heads/master | 2020-04-18T12:22:59.104163 | 2019-03-26T15:38:29 | 2019-03-26T15:38:29 | 28,834,084 | 0 | 0 | null | 2015-09-30T22:41:43 | 2015-01-05T22:04:55 | Python | UTF-8 | Python | false | false | 2,386 | py | views.py | from django.shortcuts import render
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse, reverse_lazy
from django.views.generic import TemplateView, ListView, DetailView, CreateView, DeleteView
from django.db.models ... |
6b9f928025c1872911103628729b68acb64b4713 | 1cce07dc91494035e4769e54cb05a7c337740865 | /app/schema.py | 713196dae9bc83fa9972023c18a741649586fb80 | [
"MIT"
] | permissive | boerniee/project-mate | 040ded7cf8f10da604176bccc7c11f489ac3312b | b5d66294c7939b007bd040c9a20d5c574641de40 | refs/heads/master | 2023-05-13T09:12:58.688707 | 2023-05-02T07:57:26 | 2023-05-02T07:57:26 | 221,951,711 | 5 | 0 | MIT | 2023-05-02T07:57:28 | 2019-11-15T15:31:18 | Python | UTF-8 | Python | false | false | 887 | py | schema.py | from app import ma
from app.models import Product
from marshmallow import fields
class BookRequestSchema(ma.Schema):
product = fields.Integer()
price = fields.Float()
user = fields.Integer()
amount = fields.Integer()
supplier = fields.Integer()
credit = fields.Boolean()
class SupplierSchema(ma... |
dff75a9ed86de4ba6af168377c86e579b0b1c5e6 | f487532281c1c6a36a5c62a29744d8323584891b | /sdk/python/pulumi_azure/databricks/_inputs.py | 74a17f27966a72b0c6f42334695e17a956c91755 | [
"BSD-3-Clause",
"MPL-2.0",
"Apache-2.0"
] | permissive | pulumi/pulumi-azure | a8f8f21c46c802aecf1397c737662ddcc438a2db | c16962e5c4f5810efec2806b8bb49d0da960d1ea | refs/heads/master | 2023-08-25T00:17:05.290397 | 2023-08-24T06:11:55 | 2023-08-24T06:11:55 | 103,183,737 | 129 | 57 | Apache-2.0 | 2023-09-13T05:44:10 | 2017-09-11T20:19:15 | Java | UTF-8 | Python | false | false | 21,975 | py | _inputs.py | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import copy
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
fr... |
32aa93d538da9e02a32e479ed616b7b9ef30d11d | 5d649900cb8fca2a6cee75f12e87b916c4c86c51 | /code/form.py | 396a5c466fc6c35e4f148eaaae70be9f3c457723 | [] | no_license | MentIin/pixels | 5d89c446e40091ab8d73f2465035f1a372fcd202 | 8f3888d6679a3444b78a0ec73e59770816a0a3a6 | refs/heads/main | 2023-08-27T20:17:03.380257 | 2021-11-08T15:34:00 | 2021-11-08T15:34:00 | 425,888,949 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,025 | py | form.py | from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_EditWindow(object):
def setupUi(self, EditWindow):
EditWindow.setObjectName("EditWindow")
EditWindow.resize(700, 553)
self.centralwidget = QtWidgets.QWidget(EditWindow)
self.centralwidget.setEnabled(True)
self.cen... |
97bab6bc40926fc0b2d4fe513a805575f92da12e | a8008229b53ac2c8906c0c0bda6ab0bee74c9277 | /fundamental/session3/example2.py | 9c0132ef5b186cc204b5ce00d577749e3ebfe594 | [] | no_license | lmthanh2011/luongminhthanh-fundamental-c4e17 | 2baeb8f5950875c944f5c270d6a64fa2e89e4c80 | 85bbce115d4ebee6d93b488d51dc8237ea05a6d5 | refs/heads/master | 2020-03-11T02:12:49.464355 | 2018-04-27T11:10:11 | 2018-04-27T11:10:11 | 129,713,602 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 228 | py | example2.py | names = ["death note", "netflix", "teaching"]
print ("Hi there, here your favorite things so far")
print (*names, sep=",")
#separator
hobby = input ("name on thing you want to add ")
names.append (hobby)
print(*names, sep=",")
|
e352a833e74e912ef963081418301eb8da485c84 | d105bd939bc58930f06c3b9c32392c2d686cb6c3 | /KNN - CarSafety.py | 09229d2424d8b581ee5a963cc183632478ef4578 | [] | no_license | StephenGhool/carsafety | 5c00482cd5d1cef7eca5c42a58e14d0f5b80c546 | 5b8b04e02b963e94be6ae59d3615d53204ef4b28 | refs/heads/master | 2023-06-22T18:42:46.878148 | 2021-07-18T15:07:16 | 2021-07-18T15:07:16 | 387,194,086 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,296 | py | KNN - CarSafety.py | import sklearn as skl
import sklearn.metrics
from sklearn import preprocessing
from sklearn.preprocessing import MinMaxScaler
from sklearn.preprocessing import StandardScaler
from sklearn.preprocessing import PowerTransformer
from sklearn.preprocessing import PolynomialFeatures
from sklearn.preprocessing import LabelEn... |
e138403595be7aa8c8d9ad1828fcddbd8ebe6b0d | d9431403ddb1e566fb707c4a76172878ed042918 | /weeblog/utils/logger.py | f47ca2abaa776afeb90f99b1f305367389f89ce7 | [] | no_license | jhw/weeblog | b45e07c742a2f0c23ddbc51d3645324c58420b6a | df41488c20ef670d2df6bf7614a7cc63655cb84f | refs/heads/master | 2023-03-27T14:53:39.266888 | 2021-04-07T20:27:51 | 2021-04-07T20:27:51 | 231,953,130 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 600 | py | logger.py | from weeblog.utils import *
import logging, sys
# https://stackoverflow.com/questions/14058453/making-python-loggers-output-all-messages-to-stdout-in-addition-to-log-file
def init_logger(level):
root=logging.getLogger()
root.setLevel(level)
handler=logging.StreamHandler(sys.stdout)
handler.setLevel(l... |
3073c30d1f813d86bdcc7c5bf0e2895e662d4216 | 5453907bf929f0c36a5758324d09108ec399e4c4 | /Modulo4/Ejercicios/modulo/.ipynb_checkpoints/datos-checkpoint.py | 355806f31d9ee3cda64a74e0caadee71b52f03c0 | [
"Apache-2.0"
] | permissive | brsosa/PythonFundamentos | e2c1a6f2b54a2bc178bc31e510a3740d72d2799b | b8375319e8b9eed3ffeeaf96814f2d69235a14ee | refs/heads/master | 2023-09-02T00:02:12.099029 | 2021-10-16T18:31:52 | 2021-10-16T18:31:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 427 | py | datos-checkpoint.py | import os
import csv
import pandas as pd
def obtener_dato(path,num):
with open(path) as csv_file:
csv_reader = csv.DictReader(csv_file)
data = [*csv_reader]
return data[num]['text']
def read_pandas(path, inicio, fin):
return pd.read_csv(path)['text'].iloc[inicio:fin]
if __name__ == ... |
77e77b71d779a1f461cbcfa7a9cb8077d8e34601 | 2975c25666e9b48fc6aabca2ac59fbdb1ec5e336 | /src/reconstructor.py | c4d3117884d8531b0313fc7aa320a44e2afa7c5f | [] | no_license | ACMProjectsTeam3/Wakapedia | 932d0a384956156218cb9b2ac0f3ddb0f95e0072 | 652ae215cf57e99dda812579ab956e7942454371 | refs/heads/master | 2021-04-30T18:28:56.135574 | 2017-05-23T17:22:19 | 2017-05-23T17:22:19 | 79,930,770 | 3 | 1 | null | 2017-01-24T23:52:53 | 2017-01-24T16:37:14 | null | UTF-8 | Python | false | false | 235 | py | reconstructor.py | from .Bundle import Bundle
def reconstruct(b):
for key in b.paragraphs.keys():
para = b.paragraphs[key]
start = b.html.find(key)
b.html = b.html[0:start] + para + b.html[start + len(key) : -1]
return b
|
75cbe36507c1e09d50d0e4b21057bc0ab0364c36 | 7112f6946c2ba8476d94678fa821fa346a2c4313 | /services/pdf_gen/pdf_invoice.py | 3f9c5a106fcee75ecdcde87570414ed7e0985376 | [] | no_license | avgustinegorov/willcraftnow-backend | f69162a75e5b04ea60eb4b368557fac7601fcb25 | fe8d4362544da58ec6eda0713dca77345468a63e | refs/heads/master | 2023-06-01T18:40:40.686101 | 2021-06-16T22:00:23 | 2021-06-16T22:00:23 | 377,268,230 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,879 | py | pdf_invoice.py | """
PDF Service dedicated for generating a PDF Invoice
of a predetermined format with the given details
"""
from django.conf import settings
from django.utils import timezone
from datetime import timedelta
from reportlab.lib.pagesizes import letter, A4
from reportlab.lib.units import cm, inch
from reportlab.... |
68f3c1a32eae8406355233133016c5c5079a15c1 | 7ad8216c9d53173d31e2164c7c89f65969fbe398 | /excercise1.py | c1afd1ca0b14cfbe94674d08b334a6a887f9940c | [] | no_license | chessiferjr/LearningPython | dbaa50b677a99dbf7d837d9e09623ca82dc9772f | 589e92cd15b21db760779c6b490a377232841620 | refs/heads/master | 2020-03-31T06:39:28.154245 | 2018-10-07T22:19:57 | 2018-10-07T22:19:57 | 151,990,206 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 949 | py | excercise1.py | # ask the user for a start number and store it
def get_start_stop():
''' obtains start and stop number from the user'''
start_number = int(input("Enter a reasonable number to be used as your start number: "))
stop_number = int(input("Enter another reasonable number to be used as your start number: "))
n... |
afe8654ef87f4907479a5e9036c42512db512f25 | d5ff9689f66b5df022c7d11af1bc08a7f51abfa4 | /plot_generator.py | 3e89463a5fb3353cff7b3d41e123101c0d2f86d8 | [
"MIT"
] | permissive | seanstappas/music-classification | a6bd340cabe7e146ec8ce48d410b0065388c71f3 | 82ab737874f7f52f006b584185f0092f17a65e53 | refs/heads/master | 2021-07-14T17:09:15.247542 | 2017-10-19T03:32:51 | 2017-10-19T03:32:51 | 105,494,458 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,540 | py | plot_generator.py | import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator
from data_extractor import get_one_song_per_genre, get_songs_genre, get_songs_genres
GENRES = ['classical', 'country', 'edm_dance', 'jazz', 'kids', 'latin', 'metal', 'pop', 'rnb', 'rock']
def plot_two_feature_vectors_one_song_per_genre(featur... |
0291d057d1ffe08aee9691c2d225d40196a7c8f0 | d554b1aa8b70fddf81da8988b4aaa43788fede88 | /5 - Notebooks e Data/1 - Análises numéricas/Arquivos David/Atualizados/logDicas-master/data/2019-1/224/users/4432/codes/1577_1327.py | b8863950ce63993b605cb7332803fbfdc6336d4c | [] | no_license | JosephLevinthal/Research-projects | a3bc3ca3b09faad16f5cce5949a2279cf14742ba | 60d5fd6eb864a5181f4321e7a992812f3c2139f9 | refs/heads/master | 2022-07-31T06:43:02.686109 | 2020-05-23T00:24:26 | 2020-05-23T00:24:26 | 266,199,309 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 24 | py | 1577_1327.py | a=90
b=55
c=a-b
print(c) |
6082b8f67950acf6f58bf5df4df26dbd247d15cd | 82aa2afd24f2d8674b7dcddc6d918692ead6ccce | /ASOCTprocess/mat_to_jpg.py | a9a62c4c0ac419b023c5154b2a21095517f9af6f | [] | no_license | qiuzhen8484/all_code | d0c26cf78494f1fbc40b7749b6b20873107f02ba | 7898784b5cdb3f2ca8dc02d36354a5d999fc39be | refs/heads/master | 2022-02-04T10:31:49.639529 | 2019-08-01T08:10:15 | 2019-08-01T08:10:15 | 200,001,635 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 607 | py | mat_to_jpg.py | # coding: utf-8
import scipy.io as scio
import os
from PIL import Image
img_list = []
path = r'/data/zhangshihao/ASOCT-new/data/dataset_16_LGC_final/data'
for root, dirs, files in os.walk(path):
for file in files:
if os.path.splitext(file)[0][-2:] == '_1':
img_list.append(file)
f... |
d05bafc577373cb92103a624d64d63df7e4815c6 | 698c9dd6d805e321602753e4ba8ab7ba1c6c7dcf | /tests/test_util.py | ee4cb58f8fc7c1f336f5e5df3bf8b8cc80ff08ef | [] | no_license | hoangt/ms3 | d6df1d267e056d53bf4b0687b2d0960daec85d3d | 11aad38ec34136b5fc21fd69a6c227ae3af882b6 | refs/heads/master | 2021-01-18T10:49:30.964864 | 2014-12-28T14:58:49 | 2014-12-28T14:58:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 670 | py | test_util.py |
import unittest
from memsim import util
class TestUtil(unittest.TestCase):
def test_log2(self):
self.assertEqual(util.log2(0), 0)
self.assertEqual(util.log2(5), 3)
self.assertEqual(util.log2(7), 3)
self.assertEqual(util.log2(8), 4)
def test_rp2(self):
self.assertEqu... |
3431c58734c8dff3d4771d491741dd9f0384ba5f | d48303e4e9a2957ffd373c09d10561ab4f5d3248 | /selenium_webdriver/coursera_search.py | c8b7dd5a82464f116be61bea4979b5003bbd2f5a | [] | no_license | 2gisprojectT/lanbin-coursera | 1d4f5e33772182cd91c5871b16ed5b631de44ecc | 69cfbe969f23f9772b0c0012edf09a83cee96daa | refs/heads/master | 2016-08-04T16:01:04.578655 | 2014-11-10T17:23:14 | 2014-11-10T17:23:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 927 | py | coursera_search.py | from unittest import TestCase
import unittest
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
__author__ = 'la0rg'
class CourseraSearchTest(TestCase):
def setUp(self):
self.driver = webdriver.Firefox()
self.my_url = "https://www.coursera.org/"
def test_site(se... |
a3a5c310b164060a057706c38a43c16b0cfcd503 | fe8ad0a1f91cebdff86c1215ae0f753745488cc3 | /test/test1.py | 120c6cd8f3cef4e60a4d03b6453fe6c9b936fa71 | [] | no_license | SkullFang/wanfang_spider | 0c0c5ff4e31c73cf30a5d19cd592437c1b9c3a36 | d715b5f551af9f336b26b9c0b2f564453e5d5fa1 | refs/heads/master | 2021-08-08T09:59:48.770595 | 2017-11-10T03:12:01 | 2017-11-10T03:12:01 | 108,807,617 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,017 | py | test1.py | # -*- coding: utf-8 -*-
# @Time : 2017/10/30 下午12:21
# @Author : SkullFang
# @Email : yzhang_wy@163.com
# @File : test1.py
# @Software: PyCharm
from urllib import request
from urllib.error import HTTPError,URLError
from bs4 import BeautifulSoup
import datetime
import re
# print(i)
# url = "http://industry.wa... |
ccc4a613c61175993161ce148a14297c3665defe | c92398a728817578850ecf508ec4197afe91a88f | /DemoListComprehensionSepration.py | a53e0a6c0363dcb1a63b0b54ac4791763bd4ed24 | [] | no_license | HitanshuSoni/Python_practice | 4d0ec0378124da85e364a15a7b94ddbbfe2fc929 | 7a3d0977b218ef76f91517d88518b1c0b68b9528 | refs/heads/main | 2023-04-18T21:55:12.709161 | 2021-05-08T15:39:08 | 2021-05-08T15:39:08 | 365,550,407 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 109 | py | DemoListComprehensionSepration.py | lst=[0,1,0,1,0,1,0,1,0,1,0]
lst1=[num for num in lst if num==0 ]+[num for num in lst if num==1 ]
print(lst1)
|
1189968b6cdaf333b53005d886f28c09dabc9def | fd9be763837eafdb63537239a6e5a9085cddd6ec | /django_tag_parser/django_tag_parser.py | 2fb3f81f5866490262579fdcd1094c5e15b6e054 | [] | no_license | jbzdak/django-tag-parser | da8443414fe2d5a7a74dc823bcc248470b08e294 | 98e085421d793c842559dd4a962b113bcd932457 | refs/heads/master | 2021-09-14T07:22:18.250876 | 2018-05-09T16:07:42 | 2018-05-09T16:07:42 | 103,407,213 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,289 | py | django_tag_parser.py | # coding=utf-8
"""Helper for parsing tags."""
import typing
from django.template.base import FilterExpression, token_kwargs
from django.template.exceptions import TemplateSyntaxError
class ParsedArguments(object):
"""Represents parsed arguments."""
def __init__(self, parameters: typing.Mapping[str, FilterExpr... |
b5376864b920b3c4b8b6f63fb0dbb92ef55059d3 | 6c0ca01c3592f669cf523decf8fd63dbda6e13e3 | /maintain/cleandeletedjob.py | 4961ed888d739dd3c9a497c80f7a87aef5dcbc47 | [] | no_license | linex-cd/phew-go | 446b6016d2a1c0b8d4a41c6d263eb38a82f51e8b | 3947f53f7ea1bb2972cc5feb491f3ea5ebd009b7 | refs/heads/master | 2023-04-08T22:24:26.030969 | 2021-04-25T07:31:33 | 2021-04-25T07:31:33 | 317,867,880 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 717 | py | cleandeletedjob.py | # api for vendor
import redis
#r = redis.Redis(host = '192.168.2.29', port = 2019, db = 0);
r = redis.Redis(host = '127.0.0.1', port = 2019, db = 0);
job_key_pattern = 'job-*'
job_keys = r.keys(job_key_pattern)
for job_key in job_keys:
job_key = job_key.decode()
state = r.hget(job_key, 'state').decode()
if ... |
44b020e68213ecbe2bb2dd6cb40e2008405d5c36 | 72795ee86d27c064f968e08506f60793cbdfd992 | /FactoWidRecurssion.py | f5addfe978b4d56e5f7df8826329de5c401be620 | [] | no_license | pratik-ghag/FirstDemoPyRep | b5267d14275774eb02cbd49895111d7c32882b58 | 7e224c9001777de8de897585cf16cc5a9fafae7e | refs/heads/master | 2023-01-19T13:40:31.856456 | 2020-11-30T07:12:30 | 2020-11-30T07:12:30 | 315,866,287 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 105 | py | FactoWidRecurssion.py | def facto(n):
if n == 0:
return 1
return n * facto(n-1)
result = facto(5)
print(result) |
558fd0d535d3a1b997288b96129f36581247b359 | 5cb4526ac8b8548d0d7195bfa0fad75b06d9049b | /test/test_iperf.py | 8fc532bcb5f4acb15e961e1ac804190460cafd95 | [
"MIT"
] | permissive | uniflex/module_iperf | 0eac86806576735b4b90176bf1c04330af001f98 | bf379e65cf9d4f0f20afaa4e52fc48bfb5e7e53d | refs/heads/master | 2021-01-11T07:51:38.273735 | 2016-11-29T07:30:15 | 2016-11-29T07:30:15 | 72,641,865 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,051 | py | test_iperf.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
import time
import uniflex_module_iperf
'''
Direct module test; without framework.
Req.: Iperf has to be installed: apt-get install gnuradio
'''
if __name__ == '__main__':
startServer = False
startClient = True
iperf = uniflex_module_iperf... |
fe52b23319c415b9e0c22ef43192a9b94aed78a3 | 125a62bbec53d6a1106ea5aa82a8d4bc7fa670ad | /chapter-1/getname.py | 1e9ad2e1c15cd388b3d2508d2ef22cb90480866a | [] | no_license | Jelair/python_network | a1d4abd9d2930b9ea3c81ee25919b6c5e6581b3a | bfe8410c1eab29c4ace6bc3d8aaba618b1a22fe2 | refs/heads/master | 2021-09-05T06:10:58.897682 | 2018-01-24T17:08:18 | 2018-01-24T17:08:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 591 | py | getname.py | # !/usr/bin/env python
# -*- coding:utf-8 -*-
"""
-------------------------------------------------
File Name: getname
Description :
Author : simplefly
date: 2018/1/23
-------------------------------------------------
Change Activity:
2018/1/23:
---------------------... |
084b396669875e897485cdc3e8e369461e2b08dd | b13760cf73d946f9a59ae8856c950fabb99d84e5 | /blog/myblog/migrations/0009_auto_20160613_2214.py | a86e91fd39fddbdd112556334ad3fba62e66408f | [] | no_license | hww1996/ECS | f5a9d181998b1cf83896eae8d5001f42db65f809 | 1525b65ed1b2cdf5c513cd05c82ddcdf43f8cac9 | refs/heads/master | 2021-01-20T20:15:20.276105 | 2019-07-05T08:27:46 | 2019-07-05T08:27:46 | 64,831,469 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 721 | py | 0009_auto_20160613_2214.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.utils.timezone import utc
import datetime
class Migration(migrations.Migration):
dependencies = [
('myblog', '0008_introduce'),
]
operations = [
migrations.AlterModelOpti... |
9e49c3b37e16c287e86400b38952006dbbe25c3c | ddeabc5c16f6cf3a7dcb34c0626cb0a7057ded6c | /triad/test_vectors/triad.py | ace25b18d2c8f2054a6a88fc62fc4d715b8763ca | [] | no_license | qantik/perfect-trees | a93876e12a52c1feae4c2435dd7415b7edb026a5 | 7c6455179d4e25b4ae431ec205caa4612ea68e5c | refs/heads/master | 2023-08-27T21:55:43.032819 | 2021-11-02T14:34:18 | 2021-11-02T14:40:12 | 423,877,941 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,561 | py | triad.py | import sys
sys.path.insert(0, '../../')
from common import *
def setup(k, iv):
s = [0] * 256
s[0:8] = iv[0:8]
s[8:16] = k[32:40]
s[16:24] = [1]*8
s[24:32] = k[24:32]
s[32:40] = [1]*8
s[40:48] = k[16:24]
s[48:56] = [1]*8
s[56:64] = k[8:16]
s[64:72] = [1, 1, 1, 1, 1, 1, 1, 0]
... |
9b3f943f214d47b539890f6667f70678caf8c305 | bc7de1eb755f804de5e3945b0fc61651556f63d3 | /Problem Sets (Coding)/Set 1 - Sol/1.3.3.py | 5cd5b817440d1bb80cbcf7cd3c30e85879072eee | [] | no_license | Gabeesh/MITx.6.00.1x-IntroToC.SandProgramming | f7f29249a98c8e541f9268a8124bd0f4864ebd40 | 84f5534a2328847739aa74d426028c651c64646f | refs/heads/master | 2021-01-18T00:50:39.695641 | 2016-06-28T06:30:03 | 2016-06-28T06:30:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,265 | py | 1.3.3.py | from itertools import groupby
def find_long_cons_sub(s):
class Key(object):
'''
The Key function returns
1: For Increasing Sequence
0: For Decreasing Sequence
'''
def __init__(self):
self.last_char = None
def __call__(self, char):
... |
ae75d1ad731e15a4647093e50fa3b55938556469 | aa0366a8632f334fb35e6bdc78717f3456202eb7 | /bdRigFingersRD.py | f6d5925316bc1a7f2c61e80efb074db7415252f6 | [] | no_license | Mortaciunea/bdScripts | 0891478096f3a5876655896c9649c0a7204d5ee8 | 4f6e9d2b181bb4a90c1ccfcaca64c22ecbe0dd59 | refs/heads/master | 2020-12-24T13:36:57.930038 | 2015-09-03T16:03:46 | 2015-09-03T16:03:46 | 41,869,547 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,536 | py | bdRigFingersRD.py | import bdRigUtils
import pymel.core as pm
reload(bdRigUtils)
def bdAddAllFingerAttr(side):
fingerAnim = pm.ls(side + '_Fingers_CON',type='transform')[0]
fingerList = ['Index','Middle','Ring','Pinky','Thumb']
attrList = ['SpreadMeta','Spread','Curl','Scrunch','Twist','BendMeta','Bend']
for finger in fingerList:
... |
bf621541bd1cd87bfa9db17c28fbedb3cd123bc2 | 77c29b29612c5fe8ffa644591fb11e9c96e51a88 | /paquete_calculos/calculos_generales.py | ef68c898493001b2dae2713e5bbe46223c6ee8e9 | [] | no_license | Fabian-Spec/Ejemplos_Ejercicios_Python_Pildorasinformaticas | d80bf0ce3777427c7c3bd67eb0cad99a2fd73475 | 984994b90ec12f788fa549570920409c2883db29 | refs/heads/master | 2023-04-14T10:07:35.475579 | 2021-04-27T00:39:47 | 2021-04-27T00:39:47 | 349,233,675 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 632 | py | calculos_generales.py | # -*- coding: utf-8 -*-
"""
Created on Mon Feb 1 16:09:21 2021
@author: JARBY II
"""
def sumar(op1, op2):
print('El resultado de la suma es: ', op1+op2)
def restar(op1, op2):
print('El resultado de la resta es: ', op1-op2)
def multiplicar(op1, op2):
print('El resultado de la multiplicación es: ... |
e8905c684a7828f41af514c59227a2f5b0a81754 | e2230f57dd5bb508b5c0f7bf4df6af8ae7b36f83 | /pymaclab/dsge/__init__.py | b3c4ccf5cb020882933fec5f3e16eb7b4d5362fe | [
"Apache-2.0"
] | permissive | wenyifdu/pymaclab | 2fd40192d9dff4fda488f3f9a61e584c1adafd49 | e5100ad4201bdf59c01dd600ac7e8865664075c3 | refs/heads/master | 2021-09-16T11:16:00.680933 | 2018-06-20T07:29:29 | 2018-06-20T07:29:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 361 | py | __init__.py | '''
.. module:: dsge
:platform: Linux
:synopsis: The dsge module is just a package which contains all of the modules required to do DSGE modelling, that is solving
them and then doing further work with the obtained solutions, such as simulating and generating IRFs.
.. moduleauthor:: Eric M. Scheffe... |
85dfb30a380dc73f5a465c8f4be84decccfbcb59 | 3fb00269f32b627ef42360e16c5538ab7d8756c3 | /venv/lib/python3.6/encodings/cp037.py | 9fb50e7f113020d826ebd96a9d100eb9093f5705 | [] | no_license | ThisIsJorgeLima/DashFinance | 6a58987a1930b61358b607a875ec6ee60f717759 | 6b07353d91a386b63e290f17cffd79b8cbfb643c | refs/heads/master | 2021-10-19T18:03:08.846652 | 2019-02-22T21:21:49 | 2019-02-22T21:21:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 65 | py | cp037.py | /Users/sterlingbutters/anaconda3/lib/python3.6/encodings/cp037.py |
6192099bdecffd9ce3576f4034567478145115a0 | b902cad2b14117308706ff0e672f0d1abbd87364 | /maze/maze.py | b9b44afb74fda4517b1f4e2e9ce600901d6aed30 | [] | no_license | jominjimail/python_proj | 43d933029eb0fadcf692f121aeac05f66328cfe7 | 6fb3e7d102a1074ce71084caceedb6f6e95cfe51 | refs/heads/master | 2020-04-07T22:53:09.052145 | 2019-04-03T11:48:58 | 2019-04-03T11:48:58 | 158,788,973 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 14,265 | py | maze.py | import queue
import copy
import heapq
import sys
sys.setrecursionlimit(100000)
dx =[1,0,0,-1]
dy=[0,1,-1,0]
class PriorityQueue:
pq=[]
elements={}
task=0
def insert(self , priority,x_val,y_val):
entry = [priority, self.task,x_val,y_val]
self.elements[self.task]=entry
heapq.hea... |
94d296b5a13bfa59dba5812da31707f9db9080af | e4efbdf7dda2fdd03f2d9109a2b7beac00c98b73 | /main.py | 47b53d31e365997c25251b6b22c58240c0f39c96 | [] | no_license | tristandb/VectorFlux | 23dafa3def1e1007dc70a22808927620a5557dc9 | e667aac4fb898c805f0c7a5b255580b20e0e38a8 | refs/heads/master | 2021-09-05T10:16:31.588329 | 2018-01-26T10:09:01 | 2018-01-26T10:09:01 | 115,024,953 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 831 | py | main.py | """
Implements a Neural Network
"""
from vectorflux import VectorFlux
from mnist import read, show, normalize
from vectorflux.layers import Dense
from vectorflux.layers.Dropout import Dropout
train = list(read('train'))
test = list(read('test'))
print("Train size: {}".format(len(train)))
print("Test size: {}".forma... |
0e337ce21450e0fdb7688183d0542ebf902a9614 | f345dd1ec1e1d5d9fe5d7aa13dd60a679a39eb42 | /Mailman_Downloader.py | 7d30bbb30eee1bb2231d4f31d9126529e79fab77 | [
"Unlicense"
] | permissive | mattallinson/Mailman | 1ead34a19ca166ae23d349428ffd538b19864717 | 8f2307361531a9bb98809a9d4bdfbc6db67ae52b | refs/heads/master | 2020-03-28T11:10:24.184554 | 2018-09-12T10:04:09 | 2018-09-12T10:04:09 | 148,184,294 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,977 | py | Mailman_Downloader.py |
import messages
import os
import requests
from bs4 import BeautifulSoup
URL = "https://mailman.kcl.ac.uk/mailman/"
ADMIN = "admin/"
ROSTER = "roster/"
OUTPUT_FOLDER = "../output/"
def makeoutput(path):
if os.path.exists(path):
pass
else:
os.mkdir(path)
def mailinglist_cookies(mailinglist, password): # this o... |
e6320bc1c344c87818a4063616db0c63b7b8be49 | 5091e7cd8df211c4abc2c8f4c7273a01b35734eb | /calculator.py | fe2f79425a4eb8137463202a0f115f6a52243155 | [] | no_license | mortazavian/calculator-python | f095c9e2ff11d8523292842b2910a85a91ac0932 | d8a7922b20052a2b88951d74f5770b37b1160148 | refs/heads/main | 2023-08-26T16:15:26.160467 | 2021-10-24T12:33:46 | 2021-10-24T12:33:46 | 420,455,717 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,874 | py | calculator.py | from tkinter import *
global math
root = Tk()
root.title("Calculator")
e = Entry(root,width=60,borderwidth=5)
e.grid(columnspan=3)
def button_click(number):
#e.delete(0, END)
current = e.get()
e.delete(0, END)
e.insert(0, str(current) + str(number))
def button_clear():
e.delete(0, END)
... |
13fa650557a4a8827c9fb2e514bed178df19a32c | a30a3d3cf6f5bef3e03558cbb7e5bc04ac35fb01 | /services/check_image.py | 00ff65afaffb04275db28a76aa598f48e5d22773 | [] | no_license | VasuDholakiya2810/chat-application | 83310c5c0df5c02f396e875be87060cb49e9a9b8 | 6477da274db9cc02525be022977ec0d677f2505f | refs/heads/master | 2023-01-11T15:25:31.735778 | 2020-10-22T15:43:08 | 2020-10-22T15:43:08 | 306,316,951 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 623 | py | check_image.py | """ Image Check / Compress Image"""
import re
import os
from PIL import Image
from common.constant import PATH
def check_image(file_type):
match = re.match("image/*", file_type)
return match
def compress_image(data):
with open(PATH.format(data['name']), 'wb+') as file:
file.write(data['binary'... |
927b42326ad62f5e484fd7016c42a44b93609f83 | 6c074f297fe62df6ea853a9611cd74c443e0c7c7 | /example/config.py | 56f5fa4dedd714935d133fc0329958a1496a71f1 | [] | no_license | jeffycf/dAutomation | f7782aa75c79b3c8d15b3e831d9250e71343bcf4 | 33ae12d3743fba03d22fae27feb9072a3a648eae | refs/heads/master | 2021-12-02T10:55:13.340697 | 2013-05-15T15:47:03 | 2013-05-15T15:47:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 870 | py | config.py | #!/usr/bin/python
# coding: utf-8
from os.path import dirname, abspath
PICKITEMSP = True
RAREP = True
REPAIRP = False
ITEMS = {
"legendary": ["#02CE01", # set
"#BF642F"], # legndary
"rare": ["#BBBB00"]
}
current_abpath = abspath(dirname(__file__)) + "/"
# Wi... |
65aa761110877bd93c2d2cb3d097fa3e126f72b1 | ea542b546197453cad228af2550145afbf1ac30f | /encodeHackathon/application/processing_data/azure_analysis.py | 866e0c4ce765e60dab6aaf4002326428b509be99 | [
"MIT"
] | permissive | JeffinWithYa/MicrosoftEncodeHackathon2020 | 35be94b3ab006b16c5070fc102e3ed5dc4442a88 | 18de52f02b2325083689e20c7187d63855afd97d | refs/heads/master | 2022-12-21T20:25:36.107358 | 2020-10-01T13:44:37 | 2020-10-01T13:44:37 | 298,920,287 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,077 | py | azure_analysis.py | from application.processing_data.twitter import TwitterAPIv2
from azure.ai.textanalytics import TextAnalyticsClient
from azure.core.credentials import AzureKeyCredential
from .twitter import TwitterAPIv2
categories={
'Noise Complaints': {
'loud',
'party',
'noisy',
'noise',
'... |
0ee902d59d3d01b6ec8bb4cc8d5e8aa583644397 | f34d210eb1ff089b854f34706c95a562a287315d | /optimal_transport_modules/data_utils.py | 5fae9196df227fd25d45ac52ccc7e305ab8314b8 | [] | no_license | sbyebss/Scalable-Wasserstein-Barycenter | 35d5a46bd1abfccf6413b8050b70071cba303df2 | 5eff13e95b48da72a87740c1e021b00a574bac3d | refs/heads/master | 2023-03-14T07:57:29.036393 | 2021-02-24T05:13:47 | 2021-02-24T05:13:47 | 340,559,408 | 8 | 1 | null | null | null | null | UTF-8 | Python | false | false | 8,767 | py | data_utils.py | from __future__ import print_function
import ot
import torch
import numpy as np
from sklearn.neighbors import KernelDensity
from torch.utils.data import Dataset
import jacinle.io as io
import optimal_transport_modules.pytorch_utils as PTU
import optimal_transport_modules.generate_data as g_data
from optimal_transport_m... |
de0d0588106ab651a8d6141a44cd9e286b0ad3a5 | a74b980fd95d5d810315f181449fc9d1710e6923 | /savecode/threeyears/idownclient/clientstatus/clienttaskstatus.py | 1786a278bcce7b7ca3353296b6e1929a0fe9bde8 | [
"Apache-2.0"
] | permissive | cbbbbbbbb/sspywork | b70f5539203b47b21eec2f0514ddca155affc2b8 | 8f05a6b91fc205960edd57f9076facec04f49a1a | refs/heads/master | 2023-03-22T19:45:13.024076 | 2021-03-08T01:24:21 | 2021-03-08T01:24:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,617 | py | clienttaskstatus.py | """
采集端任务状态统计
直接在数据库查找数据
create by judy 2018/10/22
update by judy 2019/03/05
更改统一输出为output
"""
from datetime import datetime
import time
import traceback
import pytz
from datacontract import ETaskStatus
from datacontract.clientstatus.statustask import StatusTask
from idownclient.clientdbmanager import DbManager
from... |
070830a4c720fa30a234352e575576d94ae84daf | e4ceb59ff8e2d973211ba1e6f0964648f4108061 | /mendeley-example.py | 9069c657aac5a53a85bc3f4f1f68d5d8a5d5b5db | [
"Apache-2.0"
] | permissive | afcarl/mendeley-paper-tagging | 0337d1a5e18c65a7161989cd9bbc57e0925c8364 | c4d2afc4b1a506c3f58325abdd61a0460f9da961 | refs/heads/master | 2020-03-21T09:31:10.588244 | 2017-10-31T17:48:18 | 2017-10-31T17:48:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,260 | py | mendeley-example.py | from flask import Flask, redirect, render_template, request, session
import yaml
from mendeley import Mendeley
from mendeley.session import MendeleySession
from sklearn.linear_model import LogisticRegression
from sklearn.svm import OneClassSVM
from sklearn.svm import SVC
from sklearn.model_selection import Randomized... |
982a3c8c3557829f950a6a5a98db720fd8378a59 | 77c518b87e67e9926d130f856a7edb12302596eb | /Filters/General/Testing/Python/TestCurvatures.py | 4547c37b4a87bea4afc34dfff13dfa5daaa771c9 | [
"BSD-3-Clause"
] | permissive | t3dbrida/VTK | 73e308baa1e779f208421a728a4a15fec5c4f591 | e944bac3ba12295278dcbfa5d1cd7e71d6457bef | refs/heads/master | 2023-08-31T21:01:58.375533 | 2019-09-23T06:43:00 | 2019-09-23T06:43:00 | 139,547,456 | 2 | 0 | NOASSERTION | 2019-11-22T14:46:48 | 2018-07-03T07:49:14 | C++ | UTF-8 | Python | false | false | 2,618 | py | TestCurvatures.py | #!/usr/bin/env python
import vtk
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Create renderer stuff
#
ren1 = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(ren1)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
# Pipeline stuff
#
torus = vtk.vtkSup... |
25721ad308172814363a455819016cbb4002cda0 | 17e9eecd3bd49945ce42933328d1215927bf03a3 | /ForeignKeyTest/ManyToMany/models.py | 6942dcfe2613f552f08a3a049bf38c5f309df025 | [] | no_license | LolitaComplex/PythonDjango | ffcf1332a620dff6fcc23262a599a9a0201df912 | 4ef87e6e9aee301c428f3c444a1b823b633fc15b | refs/heads/master | 2020-04-09T07:49:13.068400 | 2019-02-22T05:27:31 | 2019-02-22T05:27:31 | 160,171,875 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 379 | py | models.py | from django.db import models
# Create your models here.
class New(models.Model):
name = models.CharField(max_length = 50, null = False)
class Meta:
db_table = "news"
class Tag(models.Model):
name = models.CharField(max_length = 50, null = False)
news = models.ManyToManyField("New", related_n... |
69295c130f433e8eeb426c56f965dff9b4760af0 | 166a52bb031c932aa6fed7c3d193b2977f2b4b2b | /product/views.py | e315166f6cb1204c4f3a175a1e1c878774eb47f9 | [] | no_license | harshita23sharma/Github-repo-search-engine | 7fdfbdc75a61fdf30d71fa552105685a2d58db41 | d84c34874630fcc9bbd27ff4943586cde9711ada | refs/heads/master | 2021-01-16T17:49:28.307039 | 2017-08-16T05:59:07 | 2017-08-16T05:59:07 | 100,013,331 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,292 | py | views.py | from django.http import HttpResponse
from django.template import loader
from django.template.loader import get_template
# def index(request):
# latest_question_list = ['a','b','c']
# template = loader.get_template('product/index.html')
# context = {
# 'latest_question_list': 'string',
# }
# ... |
19e2273d582557ae0a0f54cc2317249f690145f6 | b7f7dfc274b669f8a5b651970fc65b4b2132a107 | /tkinterWindow.py | 8d32ea5a019aa16bcb98e613cdf80ec8c0fa5fe7 | [] | no_license | JaehyunAhn/YeragoPersonalColorProto-Py27 | f07d7bcc2c9e412a186b44d1edf1ffd971e03c67 | 52c9dd48dacada060888eacb0a0724050a8a3884 | refs/heads/master | 2020-05-28T06:43:46.708427 | 2015-02-11T04:49:40 | 2015-02-11T04:49:40 | 30,606,366 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,826 | py | tkinterWindow.py | # -*- coding: utf-8 -*-
"""
Sogang University Datamining Laboratory
FileName: tkinterWindow, window view
Author: Sogo
Start Date: 15/02/08
Copyright (c) Sogang University Datamining Lab All right Reserved
"""
import Tkinter as tk
from Tkinter import *
import tkFileDialog as filedialog
#import Image
... |
4de5ddb91de416a81efffd94043c7ad9a35a1825 | 73796e0d309a77a4e54fa84a71ad41c4510e374e | /application/auth/views.py | 549e7cc8c146cdcf36d031e22c74f51004e9768d | [] | no_license | samvancart/fish-catch-forum | a15e605bb6f956d2b8bf78feb12574332e43ec2e | 13394fdc4ed6a6eea7fff42bfe4766ed06e50366 | refs/heads/master | 2021-07-09T12:17:07.602949 | 2020-02-28T15:14:49 | 2020-02-28T15:14:49 | 234,317,303 | 0 | 0 | null | 2021-03-20T02:45:45 | 2020-01-16T12:41:19 | Python | UTF-8 | Python | false | false | 2,993 | py | views.py | from flask import render_template, request, redirect, url_for
from flask_login import login_user, logout_user, login_required, current_user
from application import app, db
from application.auth.models import User,groups
from application.group.models import Group
from application.fish.models import Fish
from applicatio... |
eaa51e850ee2603865525d87829d8f78f06d7c34 | 4a3bf95187335a8d46139b1d7a67586e96eb387f | /ProjectForPython/FTP/ftp_server/core/main.py | 97a38d95b28a23490ac3a44df212e4baf6eb95ec | [] | no_license | ares5221/python-Learning | 6f786b9edf081010cd6f2ad684f505d30da8d4a8 | 4ae77239e2b91bb84b306930af88b5035b897963 | refs/heads/master | 2021-06-04T03:00:17.338022 | 2020-04-13T08:14:06 | 2020-04-13T08:14:06 | 134,068,556 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,237 | py | main.py | import socketserver
import json,os
import hashlib,re
import settings
STATUS_CODE = {
200 : "Task finished",
250 : "Invalid cmd format, e.g: {'action':'get','filename':'test.py','size':344}",
251 : "Invalid cmd ",
252 : "Invalid auth data",
253 : "Wrong username or password",
254 : "... |
379669db1e54b77036862a133d411cec500358ae | e3917d52cf1cc1173e43c816a499a62bbcbc50a0 | /projet/testLight.py | 2629494b5da35ff2fe7bc865eb2b44150ff21c09 | [] | no_license | ioanasimuleac/ProjetFas-LampeMagique | 2e0dac839042e255d5f83c23e2f7cd52be83ba71 | c5cf82f060e3c6bea8e31356673bd01a2953c5e0 | refs/heads/master | 2021-09-03T14:15:47.438342 | 2018-01-09T18:24:42 | 2018-01-09T18:24:42 | 114,113,882 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 476 | py | testLight.py | #!/usr/bin/env python
import time
import grove.grovepi
# Connect the Grove Light Sensor to analog port A0
light_sensor = 0
# Connect the LED to digital port D4
led = 4
# Turn on LED once sensor exceeds threshold resistance
threshold = 10
grove.grovepi.pinMode(light_sensor,"INPUT")
grove.grovepi.pinMode(led,"OUTPUT... |
d7c997d3f3a004698d6c750552dd874f94f4ee94 | 2adca7926c6535e2a75ca69aa18a24565d70f1f2 | /lxml_spider/lxml_xiaohua.py | 7270c4e1ac0c3150960161e13b093ef4ab0f98f1 | [] | no_license | tazhigang/urllib2-parent | 29d0e05ed9a32d2d60f95c5eae649b8f1f3c1baf | 2a362f9ac526d8478bac96a0d781cf46194377be | refs/heads/master | 2020-05-07T09:26:12.608784 | 2019-04-09T13:46:20 | 2019-04-09T13:46:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,935 | py | lxml_xiaohua.py | import urllib.request as urllib2
from lxml import html
import re
import os
# 获取笑话的url:http://xiaohua.zol.com.cn/lengxiaohua/
# 第一页:http://xiaohua.zol.com.cn/lengxiaohua/
# 第二页:http://xiaohua.zol.com.cn/lengxiaohua/2.html
# 获取详情的url:http://xiaohua.zol.com.cn/detail60/59364.html
# 笑话内容链接列表: //span[@... |
5ae3b53381119a2033a2f6d52006d6d2d806aba1 | a9a9880e6ebc707b661dc01e6f68275a2c759507 | /class9/mytest/whatever.py | cdc9dfef68030de7db52b8548e33c6a5186a9fdf | [
"Apache-2.0"
] | permissive | agonzo777/pynet | d4abedd671b8d7c7a524607e1fba1816ffeb4b44 | 8b2c2bbd71ea001ba0dc2acb20a4d46c7ddeaa12 | refs/heads/master | 2021-01-21T04:39:52.554877 | 2016-06-15T14:54:15 | 2016-06-15T14:54:15 | 55,795,900 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 181 | py | whatever.py | #!/usr/bin/env python
def func2():
print "Function 2 in whatever.py module"
def main():
print "Executable Code in Whatever.py"
if __name__ == "__main__": main()
|
c7c1baa96f3715cddb9d647deb5d07cc794550c6 | f3a79fc83061703a90d9f6f78ffa9f3782a58220 | /data/items.py | ecb56b83e8d2ef7b288d2f1250578021818d8beb | [] | no_license | alxfed/work-with | 2e66c459b6a566554c84bc0c2645eec85645eff8 | 456bdb240b021df862f489f871fba9be73bfa844 | refs/heads/master | 2020-09-08T20:59:28.940414 | 2020-01-20T00:08:20 | 2020-01-20T00:08:20 | 221,238,586 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 656 | py | items.py | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# https://docs.scrapy.org/en/latest/topics/items.html
import scrapy
class DataItem(scrapy.Item):
# define the fields for your item here like:
# name = scrapy.Field()
pass
class LicenseTableLine(scrapy.Ite... |
a341d7e7decdb83b4cf2ed338d6ca838a58d4e1c | 2d89250eb931cdd182aace625343ed4992270b23 | /12 times table (Evi).py | a072d119fbf4b8d1a98a9fc001188c292e497d97 | [] | no_license | cabemawiaie/L1-Python-Tasks | 9ec9776e7c3f4f64b6d3668c218e765da5767f3b | 5653b90dadc8ecdfe81d1f63ddfb3e61492d559e | refs/heads/main | 2023-04-07T11:28:43.230182 | 2021-04-14T21:39:55 | 2021-04-14T21:39:55 | 346,482,196 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 87 | py | 12 times table (Evi).py | for i in range(13):
for t in range (13):
print("{}x{}={}".format(i,t,i*t))
|
e0ca5a6e86acc62fc30d1545dd69ea399cd14085 | b79d534b10cc64e63b7a24486528236847dd3340 | /terra/tests/test_logger.py | 321e50502d4be917444a21f73fd0c4c896926787 | [
"MIT"
] | permissive | andyneff/terra | e221090f22890aa36c7b5d99ea8a70b2a6476c41 | 0d40ae0c62f59abd52fa0558f3e8bf34d7d7c91d | refs/heads/master | 2023-06-24T09:40:49.466301 | 2023-04-27T13:51:51 | 2023-04-27T13:51:51 | 217,132,293 | 0 | 0 | MIT | 2019-10-23T18:59:24 | 2019-10-23T18:59:24 | null | UTF-8 | Python | false | false | 10,341 | py | test_logger.py | from unittest import mock
import io
import os
import sys
import logging
import uuid
import platform
import warnings
from terra.core.exceptions import ImproperlyConfigured
from terra import settings
from .utils import TestCase, make_traceback, TestLoggerConfigureCase
from terra import logger
from terra.core.exceptions ... |
8773437f9c7a761efd8b1cefcb8a8c9fb75b75e4 | fffa98a209e706c7a2f3e3bc3b329b9e78fa3705 | /snippets/views.py | 57a959dd6b4df17e60390e32ea0bc58fd1d2c03c | [] | no_license | NicolasMura/REST-com | b504e8eb1a476d7735a62cb6551f5d305ff96654 | 9a9feac6e095d83d04567980914206994dfae98b | refs/heads/master | 2021-01-12T10:07:59.301775 | 2016-12-15T15:19:42 | 2016-12-15T15:19:42 | 76,370,195 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,077 | py | views.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from snippets.models import Snippet
from snippets.serializers import (
SnippetSerializer,
UserSerializer,
SignUpSerializer
)
from rest_framework import generics
from django.contrib.auth.models import User
from rest_framework import permissions... |
309002f624ad269fb0a8ab1c8514e323085cc1f4 | 669a4755128ae11515ad4f0629be10e649bdfd27 | /nxmctree/tests/test_feasibility.py | d83fbace927668eaf5df26fa7855b22c1f8bb969 | [] | no_license | argriffing/nxmctree | 59d129da6c813275d1ad3fcc6a2bdb7880679253 | e53e194671818cb8e6040c42b1cdb80e46f49b76 | refs/heads/master | 2016-09-15T20:09:40.881101 | 2014-06-29T16:52:59 | 2014-06-29T16:52:59 | 16,417,208 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,749 | py | test_feasibility.py | """
Test algorithms that compute NetworkX Markov tree feasibility.
"""
from __future__ import division, print_function, absolute_import
import itertools
import networkx as nx
from numpy.testing import (run_module_suite, TestCase,
decorators, assert_, assert_equal)
import nxmctree
from nxmctree.dynamic_fset_... |
e0d53efebc6bf24483b916c9127ac2a1e96f07d2 | 02357d5217cdf52be284593b9b255770872e6a0f | /src/test/tests.py | deb2fe36f3682d77d844072c8ba55112532b9c4b | [
"MIT"
] | permissive | igordecc/coursework | bfdeb3f298464e298c76d871978e860cc1309592 | 3bf278e7787d7aa4da52cf3788b069861f64d540 | refs/heads/master | 2021-06-26T21:00:59.161677 | 2020-09-29T05:04:04 | 2020-09-29T05:04:04 | 92,428,579 | 0 | 1 | null | 2020-04-09T11:52:09 | 2017-05-25T17:41:50 | Python | UTF-8 | Python | false | false | 247 | py | tests.py | import addict
x = addict.Dict()
x.a.b.c.d = 1
print(x.a.b.c.d)
from PyQt5.QtWidgets import QWidget
class myClass(QWidget):
def __init__(self, x, y):
super(QWidget).__init__()
self.sum = x + y
x = myClass(5,6)
print(x.sum) |
5789f9fed3a6f3d06732925ae7db640650c4650f | b5a836403e20bd0e9d627ff03dfaab07abbd6bf6 | /gui/plots.py | 4ff90aa13e26bc3bb8ed61662468d0472a277de4 | [] | no_license | nathanial/curveeditor | e09d3c9bde7e80ea4e41260a312c5fed1f9209b4 | f3d7e74c8f56babe36eeefcac90820e48d35c1d6 | refs/heads/master | 2021-01-01T06:33:46.758555 | 2009-10-16T03:01:16 | 2009-10-16T03:01:16 | 117,052 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 12,307 | py | plots.py | from PyQt4.QtCore import SIGNAL
from PyQt4.QtGui import QMenu, QWidget, QApplication, QHBoxLayout, QComboBox, QLabel
from matplotlib.backends.backend_agg import FigureCanvasAgg
from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure, SubplotParams
from matpl... |
f9a1091010f3c79109391e91df2f13a7f187df84 | e844457696fcbbe4a78805a46cf2449313908199 | /test.py | 36c6e316591a4fc7f7812a98a5050bab7108cf6e | [] | no_license | Erffa/matplotlib_frame | 6103c515972c0acbb47ddd4fd022edabfa0d61d3 | 08935094705b892965dbfbd7acae786aeefdec72 | refs/heads/master | 2020-04-22T01:32:27.813204 | 2019-02-11T16:52:57 | 2019-02-11T16:52:57 | 170,017,325 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 854 | py | test.py |
from tkinter import Tk
import matplotlib as mpl
import numpy as np
from mywidgets import MatplotFrame
tk = Tk()
mf = MatplotFrame(tk)
mf.pack(expand=True, fill='both')
xx = np.linspace(0,5,1000)
yy = np.sin(xx)
fig = mpl.figure.Figure()
ax = fig.add_subplot(111)
ax.plot(xx,yy)
''' test superpo... |
071048e207c5aabb1eca629c27970f2f5f2eae0a | 76960a7afd384c809e07b99b0823b4a8ca7bca6c | /ML/CNN.py | 4cdac657c12325a89dc9af0fe83468a7fa82ff86 | [
"MIT"
] | permissive | ernestyalumni/MLgrabbag | 4fc40c3519b567243612242b46493ba66cd30518 | 51425938033b99a85df275706313787645588bca | refs/heads/master | 2020-12-24T07:20:12.514093 | 2019-06-17T08:00:57 | 2019-06-17T10:03:48 | 56,995,334 | 7 | 2 | null | null | null | null | UTF-8 | Python | false | false | 33,929 | py | CNN.py | """
@file : CNN.py
@brief : Convolution Neural Network with theano
@author : Ernest Yeung ernestyalumni@gmail.com
@date : 20170802
@ref : cf. https://github.com/ernestyalumni/MLgrabbag/tree/master/ML
If you find this code useful, feel free to donate directly and easily at this direct PayPal link:
... |
58943329cf4a97a4d486005483e95bbe6a314e6d | bab1615ee6a758a3284c4385bca22dd1aba8ac9e | /项目操作/img2/a.py | 27499cef467e9bdee0327d37561b1c090d37af19 | [] | no_license | a1169804597/home | 436b3434057c679d245ffe6e3d61004632841d1e | 9b1e63e3eee6c22a281d0eb54dfa7400f2952a87 | refs/heads/master | 2022-12-01T17:08:56.014555 | 2020-09-17T23:34:12 | 2020-09-17T23:34:12 | 228,879,970 | 2 | 1 | null | 2022-11-22T02:26:05 | 2019-12-18T16:29:29 | HTML | UTF-8 | Python | false | false | 579 | py | a.py | class School:
def __init__(self,name,addr,type):
self.name = name
self.addr = addr
self.type = type
def __repr__(self):
return 'School(%s,%s)' %(self.name,self.addr)
def __str__(self):
return '(%s,%s)' %(self.name,self.addr)
s1=School('小猿圈','北京','私立')
'''
str函数或者pri... |
7fa0d85ee6237f0f6bd0f39ee860fdd139f02f18 | c18f1187f6fd20d93771a3505bf643d15459c49a | /blast_test/parse_multi_fasta.py | fd5a4e4012a75cfa6704c6dc1f71990a52b1a26f | [] | no_license | jt-icr/chimp_human_dna | 09c7bd6e53683b5df75555f136363a97ce674bfa | c91eb335f800002e80f77098c8c57aaab3c92965 | refs/heads/master | 2016-09-06T05:43:37.978216 | 2015-09-30T18:44:14 | 2015-09-30T18:44:14 | 42,610,245 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,235 | py | parse_multi_fasta.py | #!/usr/bin/env python
"""parse_multi_fasta.py
Creator : Jeff Tomkins
Create date : April 27, 2015
Last modified:
Description : Parses a multi fasta file from seqsplit.py into subfiles
Modifications since original:
"""
import sys
from Bio import SeqIO
import random
args = sys.argv[1:]
if len(args) != 2 :... |
12c0c01a8a960f6db44a2e693f87ebaf9be3a2ae | 163bbb4e0920dedd5941e3edfb2d8706ba75627d | /Code/CodeRecords/2167/60870/315095.py | 915c17516650ab7b9d82909281d59ebe8c27b447 | [] | no_license | AdamZhouSE/pythonHomework | a25c120b03a158d60aaa9fdc5fb203b1bb377a19 | ffc5606817a666aa6241cfab27364326f5c066ff | refs/heads/master | 2022-11-24T08:05:22.122011 | 2020-07-28T16:21:24 | 2020-07-28T16:21:24 | 259,576,640 | 2 | 1 | null | null | null | null | UTF-8 | Python | false | false | 404 | py | 315095.py | info_1 = input().split()
info_1 = [int(x) for x in info_1]
info_2 = input().split()
info_2 = [int(x) for x in info_2]
input_list = [info_1, info_2]
for i in range(info_1[1]):
info = input().split()
info = [int(x) for x in info]
input_list.append(info)
if input-list == [[4, 5, 2], [6, 4, 5, 2], [1, 2, 8], [2... |
49e36083ca669c580008ed4dcc3e8df089c1207b | 33af8253d5d97023a11d0df2097de8d72a5821ed | /config.py | 2537089545304646314bf2668b669be7fdaaa375 | [] | no_license | MrcRjs/GobAnalisis | d3e92016e6d0ed571df977c87d2db4f6a56b5cd7 | b659fda9dc925f4940244aaba00caf2e03b62f4c | refs/heads/master | 2021-01-01T03:51:01.205545 | 2016-04-18T04:18:54 | 2016-04-18T04:18:54 | 56,106,727 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 415 | py | config.py | # coding=utf-8
twitter = dict(
consumer_key = 'App consumer key',
consumer_secret = 'App secret',
access_token = 'Account access token',
access_token_secret = 'Account access token secret'
)
candidates = []
"""
Candidates for twitter search
candidates = ['Name Lastname', 'Lastnames', 'twitterUsername']
"""
exclud... |
85abf0af8bd85eb00a1d678b1d292222504829d4 | cc0caac1e88bde406a0cc9a501d7bbe5280da5c6 | /squareroot.py | ec4cb3a5909e4db46acab5eb7cff495311f69889 | [
"MIT"
] | permissive | caroltreacy/pands-problems-2020 | 23633fb81c935d5881fde078990532f28a6388e6 | f5820cea3d24ffc0d38c707470f00436e77ecf14 | refs/heads/master | 2021-01-04T19:36:46.132725 | 2020-04-06T15:43:16 | 2020-04-06T15:43:16 | 240,730,124 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 513 | py | squareroot.py | # Carol Treacy
# write a program that takes a positive floating point number as input and
# outputs an approximation of its square
# python squareroot.py
# please enter a postive number 14.5
# The square root of 14.5 is approx 3.8
import math
number = int(input("positive number to be square rooted :" ))
# postive ... |
516b0b73a7229d59ca49953ade0856c8c033c4a0 | 9b1dd2f90a7c3a3fb837f489c99eb3c5c3a42a55 | /youtube_unofficial/scripts.py | 6917bc7581f3ed1b245a85190a1e8196b29e428d | [
"MIT"
] | permissive | Tatsh/youtube-unofficial | c7b78f693fe84e93c344874bf583c0424a6a339a | 0c183fbaf15a3654b454056b747289378c6db3e4 | refs/heads/master | 2023-07-17T22:06:45.548222 | 2023-06-28T16:13:44 | 2023-06-28T16:13:49 | 61,854,524 | 42 | 9 | MIT | 2021-04-25T16:51:02 | 2016-06-24T03:30:40 | Python | UTF-8 | Python | false | false | 10,444 | py | scripts.py | # pylint: disable=broad-except
from operator import itemgetter
from os.path import expanduser
from typing import Any, Callable, Dict, Mapping, Optional, Sequence
import argparse
import json
import logging
import sys
from . import YouTube
from .constants import (EXTRACTED_THUMBNAIL_KEYS, HISTORY_ENTRY_KEYS_TO_SKIP,
... |
4a66c46f262426e3eae9bc5275437c7b44246f71 | ca7aa979e7059467e158830b76673f5b77a0f5a3 | /Python_codes/p04033/s410317692.py | 4c984e45cdfede2fc5ffa6f0af57bf481476776a | [] | no_license | Aasthaengg/IBMdataset | 7abb6cbcc4fb03ef5ca68ac64ba460c4a64f8901 | f33f1c5c3b16d0ea8d1f5a7d479ad288bb3f48d8 | refs/heads/main | 2023-04-22T10:22:44.763102 | 2021-05-13T17:27:22 | 2021-05-13T17:27:22 | 367,112,348 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 353 | py | s410317692.py | import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
a, b = map(int, read().split())
def f(a, b):
if a <= 0 <= b:
return 0
if a > 0:
return 1
b = min(b, -1)
n = b - a + 1
return (-1) ** n
words = ['Zero', 'Positive', ... |
e8cd862e57e1c9a0b3d44e732f1508badd6252f8 | 9e51044d5e9a93cfdadaf22a12ee7a3012c5e8fe | /python/alien_invasion/alien_invasion.py | 995eae959f8bdefc1577f5b778f7aae8720edd70 | [] | no_license | nelsonripoll/portfolio | 5a708668102a28bed42a3c07ea14c82459945930 | 577d591308250f2cbfb6c62fcd42d96a7f41260d | refs/heads/master | 2021-07-08T08:40:25.875349 | 2021-05-03T14:31:03 | 2021-05-03T14:31:03 | 48,158,300 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 599 | py | alien_invasion.py | import pygame
import time
import game_functions as gf
from game_settings import GameSettings
from ship import Ship
from pygame.sprite import Group
def run_game():
pygame.init()
gs = GameSettings()
screen = gf.create_screen(gs.screen)
ship = Ship(gs.ship, screen)
bullets = Group()... |
c39247b3e33cfd1ab089862e41c1647bc066ca2d | 694d0c6ce3801f583bd487a3571e04b6c3a5da41 | /app/bundles/cats/validations/index.py | 98c6582c33701e528ee9074e7c9cb3413d042078 | [
"Unlicense"
] | permissive | hermanschaaf/catvalidate | 3360ff70222684c36d22b059efd76bc19d4e22a8 | 6de8164f354ac82da536f9d516c9c4a627ee01f8 | refs/heads/master | 2021-01-01T06:54:37.761833 | 2013-09-16T00:52:39 | 2013-09-16T00:52:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,605 | py | index.py | from gettext import gettext as _
_errors = {
'string': {
"type": _("{{name}} must be a string"),
"pattern": _("{{name}} is not in a valid format"),
"default": _("{{name}} has something wrong"),
"minLength": _("{{name}} is too short")
},
'integer': {
"type": _("{{nam... |
f5081c140170eff2f62cfbc624534e47f239ec77 | 1dc840d1cab512cdfc9b27122b0cff7d396106f1 | /google/sendGspread.py | 9708f83dee8b50b33494e99fe7204d407f842e38 | [
"MIT"
] | permissive | cr-rateionn/maya_exploit_SP | 848f94eb6f17bf60f5756fe03d3c6e983efc37e4 | a456a3ad6adae3cf71d6b6d685002238f51f9f61 | refs/heads/master | 2022-11-08T06:47:58.458776 | 2020-06-20T07:11:22 | 2020-06-20T07:11:22 | 272,620,247 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,855 | py | sendGspread.py | import gspread
import json
import os
import pathlib
from oauth2client.service_account import ServiceAccountCredentials
def update_status_sheet(info={}, index_key="", sheet_key="", json_file=""):
scope = [
"https://spreadsheets.google.com/feeds",
"https://www.googleapis.com/auth/drive",
]
... |
b4b04438a0c0372e56a48a6640687eed28840485 | 8afc49e58c9ca802c61a153c3d4e438788134a41 | /TensorArtist/tests/remote_flow/out.py | d1fd69442e5acf05f55b29cb31b884341cc66605 | [
"MIT"
] | permissive | cosmic119/DiscoGAN | 6491e8e5ca0e06f43486927e24dfd9666586efce | 5a86f36f45a3dafdc028fc2100eb477e54dc83cd | refs/heads/master | 2020-03-23T04:35:51.151959 | 2018-07-16T06:54:40 | 2018-07-16T06:54:40 | 141,093,403 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 494 | py | out.py | # -*- coding:utf8 -*-
# File : out.py
# Author : Jiayuan Mao
# Email : maojiayuan@gmail.com
# Date : 3/2/17
#
# This file is part of TensorArtist.
from tartist.data.rflow import control, OutputPipe
import time
import numpy
q = OutputPipe('tart.pipe.test')
with control(pipes=[q]):
while True:
data =... |
4ff78e0ad87f51fa7e42f891f2d8d9e10f346521 | a364e21c7c92e3cbd4e0ec5767cd57e18d2d945b | /black_jack.py | 92b34cf2bf37d96465f75805e4587be5ba2bc394 | [] | no_license | waterblue13/Reinforcment-Learning-Exercise | 9c9b63ae9bfcdc842cc0b4f492cc4ad27e58cb3b | 9fd3b6e2898da6cba8ad12ecd3c6a3561401a05c | refs/heads/master | 2016-09-13T04:11:57.044190 | 2016-04-27T12:00:22 | 2016-04-27T12:00:22 | 57,209,051 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,113 | py | black_jack.py | import random
random.seed( 10 )
def value_function_init():
V = {} # Value Function
for useful_arc in [True, False]:
for Dealer_Card_Index in range(1, 11): #[1,10]
for Player_Sum_Index in range(1, 22): #[12,21]
V[(useful_arc, Dealer_Card_Index, Player_Sum_Index)]... |
8e1f09cac418042e8c9d7f12587491fdde7772a8 | 831b12ee9b556c7c959d384b651c26d0731d2513 | /audio/migrations/0044_auto_20210118_2043.py | 7f2475ef08f62cfbc1cf9a9e6b225ba2612d6dd0 | [] | no_license | LokeshSmartAcademy/IDC | 7d7aee7131edb702a0e574b8efcfaea46b5f29c0 | 88719307c451df6a5f61f89c6abf9d7d64250e62 | refs/heads/main | 2023-02-20T04:24:09.133688 | 2021-01-18T16:23:34 | 2021-01-18T16:23:34 | 327,729,470 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 737 | py | 0044_auto_20210118_2043.py | # Generated by Django 3.1.3 on 2021-01-18 15:13
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('audio', '0043_auto_20210118_2039'),
]
operations = [
migrations.AlterField(
model_name='testmarks',
name='POOT_g1',
... |
e67c3880eff620df7f293312cfc0d9fbc8d4aa76 | 4fbbbde332fbbc04f10cdbcf8dd5b5516b010e56 | /pythoncode.py | ef18fa6adf75a61ce18d22a12f29832debe8984e | [] | no_license | mitushaa/Sentiment-Analysis-using-Python | 5dcefd1f94c94f77ce42be0181c3e08d8f8eed7b | 851221743e1396834eee5de951808dc393327205 | refs/heads/master | 2020-03-13T21:22:06.243099 | 2018-04-27T13:04:48 | 2018-04-27T13:04:48 | 131,294,583 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 36,106 | py | pythoncode.py | import sys
import time
import csv
import pandas as pd
import numpy as np
import itertools
import matplotlib.pyplot as plt
import pyodbc
import sqlalchemy
from sqlalchemy import create_engine
from sqlalchemy import sql
from sqlalchemy.ext.declarative import declarative_base... |
1cd98df5058db8a9805affd4bc20be73f950ebdd | 3d378792ad5b49ff2f6e52a79444682f5ad2b6b4 | /testit/src/testit/junit.py | c14c70c5b6f1864bde40eed5c5a1440411588570 | [
"BSD-3-Clause"
] | permissive | GertKanter/testit | 33ff0b59b28067e1e8c04f63db3a4a49670f15e5 | cf54fa7a7ff7d96d07ad013bfe8dd0f923122850 | refs/heads/master | 2021-04-30T02:07:48.012993 | 2021-03-23T13:54:34 | 2021-03-23T13:54:34 | 121,496,274 | 5 | 1 | BSD-3-Clause | 2021-02-03T14:12:08 | 2018-02-14T10:10:05 | Python | UTF-8 | Python | false | false | 89,730 | py | junit.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Generated Fri Apr 27 14:28:11 2018 by generateDS.py version 2.29.11.
# Python 2.7.12 (default, Dec 4 2017, 14:50:18) [GCC 5.4.0 20160609]
#
# Command line options:
# ('-o', '/home/bot/testit_catkin/src/testit/testit/src/testit/junit.py')
#
# Command line arguments:... |
73c4afba5088490448e6c940c9f1846096ddddce | 54fcce7ab2e8878f2fc7e67be0b1c9dfe0b6f7a0 | /dissect/collection/dynamic/frame_digest.py | a5e4b71808ba826713cb04e1257729e890c2a89f | [] | no_license | qdamian/dissect | 7cb492f6220f2b890964754b1f4072a453173ed1 | b1090219f4d8845fac99d4003603000e80b613a7 | refs/heads/master | 2020-05-24T14:03:32.051218 | 2014-02-04T01:54:39 | 2014-02-04T01:54:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,315 | py | frame_digest.py | #region GPLv3 notice
# Copyright 2014 Damian Quiroga
#
# This file is part of dissect.
#
# dissect is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... |
575ca7ec945669402cfc2ee6f504230120088a87 | 13a2da0167a1a6f81b213831a50442e2b909ba88 | /robocologieimage/P-ima_2016/data/tags/generator.py | f10ac786cac79e0833fe9bf073d83c252a48cd8f | [] | no_license | nekonaute/thymioPYPI | 367acb647288ac4e714f0e96c253a71b1f744bbc | 48a54aeec7acd68e6bc70e9d13df6072620ad19e | refs/heads/master | 2020-04-12T07:35:53.020440 | 2018-06-01T06:12:01 | 2018-06-01T06:12:01 | 29,857,994 | 1 | 3 | null | 2018-06-01T06:12:02 | 2015-01-26T11:25:25 | Jupyter Notebook | UTF-8 | Python | false | false | 3,185 | py | generator.py | from PIL import Image
import itertools
import numpy as np
import json
import os
def generate_all_markers(inner, outer, max_range=100):
''' Returns a PNG Image Marker generated using PIL'''
dim = outer + inner + outer
nb_combi = 2**(inner*inner)
mots = np.array(list(itertools.product((1, 0), repeat=inn... |
420e063b4b4da58ba23a962781e5c06a4ec9fdea | e71554bc745bfc7f2e073bd00c34c06293810ee5 | /clld/tests/test_web_adapters_download.py | 6488351c83de0a3c0f5ec54057436ad6193ea017 | [
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | RichardLitt/clld | a479dded0551cccf6ed643ddb242923a7253b996 | 7f3e9f9e130704f26d5a8c73c425e20b97f566cd | refs/heads/master | 2020-12-25T12:07:47.941005 | 2015-02-13T14:05:31 | 2015-02-13T14:05:31 | 31,149,156 | 0 | 0 | null | 2015-02-22T02:08:58 | 2015-02-22T02:08:58 | null | UTF-8 | Python | false | false | 3,055 | py | test_web_adapters_download.py | from __future__ import unicode_literals, print_function, division, absolute_import
import os
from tempfile import mktemp
import gzip
from contextlib import closing
from xml.etree import cElementTree as et
from mock import Mock, MagicMock, patch
from clld.util import UnicodeMixin
from clld.db.models.common import Lang... |
fa94f62bee667bed62696119bdd410303c565ec9 | fc48d93d585b4fb97a617302f47725cf036821ea | /client/views/__init__.py | 804c4588a76aa68e482df1e50cf21c91adb5f1a5 | [] | no_license | sagallagherstarr/OPURL-SERVER | 85b8f932d3911239557ed72b1b5b46e9b004da53 | 70ee825055652352c50f1075b8a77287f80bbced | refs/heads/master | 2021-01-01T06:51:05.790184 | 2012-08-06T04:49:02 | 2012-08-06T04:49:02 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 559 | py | __init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Name: views.__init__.py
# Purpose: top-level views; imports everything that's needed
#
# Author: scott
#
# Created: 30/07/2012
# Copyright: (c) scott 2012
# Licence: ... |
c01ba9fa1ad51ab4311ffbdc9bf3c20e2d809def | 7acad4e60e99e00ebefe244b19af100b1182f1ba | /python/src/p13_url_mapper/mapper.py | 4c9a4cfb2a9b2df95f172a631d4f3b3b8269a82e | [] | no_license | pasharik/hadoop | 22c6550017a4cf4ae9f178592fc2cd0def3d2203 | 14930f153e5c72e7f4649571e7fdd22dd3689eb5 | refs/heads/master | 2022-12-22T01:18:22.615080 | 2022-12-14T17:31:25 | 2022-12-14T17:31:25 | 157,982,086 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 248 | py | mapper.py | #!/usr/bin/python
import sys
# Output only URL. E.g. can get list of unique URLs after reduce
# cd python/src/p13_url_mapper/
# python3 mapper.py < test_data_for_mapper.txt
for line in sys.stdin:
a = line.split('\t')
print(a[2], end='')
|
ad7e287669a98d85f01a749421f962837116ea91 | a454117a304236eeeca9ba16d91643e63ce3f0ed | /usuarios/models.py | 7b0ebc28741bc8842e72813c145d0b513f97ce51 | [] | no_license | davidprieto94/funnYD | 80cb5648db8b6e1b758dd7e16f0ca26dd515aa11 | 4497642bcd554d820a7a7aa3339bb1ff609a2e9f | refs/heads/master | 2021-01-15T15:46:31.303697 | 2016-09-27T01:57:01 | 2016-09-27T01:57:01 | 41,863,569 | 1 | 1 | null | null | null | null | UTF-8 | Python | false | false | 977 | py | models.py | # coding=utf-8
from __future__ import unicode_literals
import datetime
from django.db import models
from django.contrib.auth.models import User
# Lista "ENUM" para genero
GENEROS = (
('M', 'Masculino'),
('F', 'Femenino'),
)
# Modelo de usuarios del sistema
class usuariosModel(models.Model):
class Meta:
... |
21dde833f7c2648cbaca467df8d9aeb4e007f40e | 955a0400096a36196cf1f7235e22c35d78e2d983 | /Avg Marks Calc.py | 5a24cd4b29ced468eb73cd4592ffdc4c399321c8 | [
"MIT"
] | permissive | Arnaav-Singh/Beginner-code | 0fe6fbd97ce2ff0e39df398be957130a8fa7ce80 | 84063cdc0bafadd86e853fdfeb3eaa0230fa5570 | refs/heads/main | 2023-06-25T18:49:30.232063 | 2021-07-31T05:02:36 | 2021-07-31T05:02:36 | 390,961,756 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 642 | py | Avg Marks Calc.py | # Python Programarks to Calculate Average and Percentage marksarks
# Taking Input for the total subject marks
Name= input("Enter Age: ")
print("Enter marksarks Obtained in 5 Subjects: ")
marksOne= int(input("Enter Englsih : "))
marksTwo= int(input("Enter Math: "))
marksThree= int(input("Enter Hindi: " ))
marksF... |
387d539c7980311314dcc118a8a2e3c8302360ef | 4233c4232bf93de3a5d67e7f0050eaaa6747665d | /chat/routing.py | ca4e36d48c2b1b4b28dd95dc10067916f40cb11b | [
"MIT"
] | permissive | Loniowsky/DjangoManagementSite | a72e59b0f34f3a445eb27f96655935fd744436f5 | 15910f9923a32f408c3bf3f1dc116623418ca697 | refs/heads/master | 2020-07-03T06:01:51.172041 | 2019-02-22T10:45:03 | 2019-02-22T10:45:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 477 | py | routing.py | from channels import route
from .consumers import ws_connect, ws_disconnect, ws_receive, chat_join, chat_leave, chat_send
websocket_routing = [
route("websocket.connect", ws_connect),
route("websocket.receive", ws_receive),
route("websocket.disconnect", ws_disconnect),
]
custom_routing = [
route("cha... |
3924f41639c740ed2957b3f543ac529267e816e7 | c9863fbc5523e93f5b3058506a2467b11937747c | /actors/config.py | e77dd3a35ff0c856cb451cc05b577aa0adc72d39 | [
"BSD-3-Clause"
] | permissive | kwhitley54/abaco | 6e8650f20490c0fa1de476dc70197a898d1a61b1 | 90f8be328bed3c7242e798da384ddb15b1ffa179 | refs/heads/master | 2020-03-21T21:26:31.657721 | 2018-05-10T22:44:59 | 2018-05-10T22:44:59 | 139,063,130 | 0 | 0 | BSD-3-Clause | 2018-06-28T20:03:10 | 2018-06-28T20:03:09 | null | UTF-8 | Python | false | false | 665 | py | config.py | """Read config files from:
- /service.conf (added by user)
- /etc/service.conf (an example is placed here by the Dockerfile)
"""
from configparser import ConfigParser
import os
HERE = os.path.dirname(os.path.abspath(__file__))
def read_config():
parser = ConfigParser()
places = ['/service.conf',
... |
ef2785e22e51c09c86ddfbcabec0a8e984f71db0 | 49787f01f719a58cebb58b574586a84f7e1412e9 | /distint.py | 0be38015b77199ca63dd7081f0cd24bae98fe150 | [] | no_license | Annamalai1995/websitecreated | 2aa40ba8f2f02ca908ab45bc161266299fe98ba0 | 9d41070c73ebaccb81a760597bebb7bc5c349c23 | refs/heads/main | 2023-08-21T04:30:34.041286 | 2021-10-28T05:45:18 | 2021-10-28T05:45:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 288 | py | distint.py |
string="Thisisastring"
for i in range(0,len(string)):
flag=0
for j in range(0,len(string)):
#checking if two charactors are equal
if(string[i]==string[j] and i!=j):
flag=1
break
if(flag==0):
print(string[i],end="") |
defbf4315b8b913d4f72646f41c16d5b2fefab99 | 554e2653b768e5053359c4272eed72cfdbc18802 | /nomadgram/images/urls.py | e6d46203b9dd7c0ce821b2ed1b75a739013f21ea | [
"MIT"
] | permissive | majaeseong/nomadgram | d9b64649ec7c08cd00007bc976fb5ad6fe05bca8 | bea95def96ddc5126567026ec294196dc49862c7 | refs/heads/master | 2022-12-22T19:52:31.408192 | 2018-12-26T08:55:16 | 2018-12-26T08:55:16 | 162,393,768 | 0 | 0 | MIT | 2022-12-10T04:12:13 | 2018-12-19T06:38:46 | Python | UTF-8 | Python | false | false | 1,072 | py | urls.py | from . import views
from django.urls import path
app_name = "images"
urlpatterns = [
path(
"",
view=views.Feed.as_view(),
name='feed'
),
path(
"<int:image_id>/",
view=views.ImageDetail.as_view(),
name='image_detail'
),
path(
"<int:image_id>/li... |
3b4a4ba6da7a92de2361ab01c229120a6eeec81f | 9bb8af24d72562165083e2fee673118b72929250 | /BookPublisher/app01/templatetags/my_tags.py | 7fc930abf6966aa1d14d9a0d138faa65580ea13e | [] | no_license | zhumingmei/Django001 | c18da940f4af1847986ea13168e92431faf64f88 | 0917c1ce2b5c1e3615cea2923603f91aa7775e92 | refs/heads/master | 2020-07-06T17:27:50.691593 | 2019-08-19T04:12:46 | 2019-08-19T04:12:46 | 203,091,064 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 147 | py | my_tags.py | from django import template
register = template.Library()
@register.inclusion_tag('page.html')
def page(num):
return {'num':range(1,num + 1)}
|
4c9d3fa64cb5975770af389265f1a131e464e1c3 | 9372026aec32fa10896225813986346e472f7a7c | /Algorithm/class13/Homework/if/alarm.py | e24e7fa3b5f4fb788c92808b10b8223288cb2373 | [] | no_license | mjsong0712/learn_python | 5809df5b0366b37836633f5fa5e2d96a9cb99798 | 1cc31ca750e76b436596e3a4f6b8f39d7b873624 | refs/heads/master | 2022-05-17T00:54:17.975679 | 2022-05-01T08:07:33 | 2022-05-01T08:07:33 | 235,795,862 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 246 | py | alarm.py | inp = raw_input().split(' ')
a = int(inp[0])
b = int(inp[1])
if 45 <= b:
b -= 45
print str(a)+' '+str(b)
elif 45 > b:
if a==0:
a=24
a -= 1
b = 60-(45-b)
print str(a)+' '+str(b)
else:
a -= 1
b = 60-(45-b)
print str(a)+' '+str(b)
|
6773fa4184614b0d5d3eee0e8777cdcffa59e0f7 | e87104cd79e01cd9a975ecd45228ede949308c52 | /names.py | fd026cfdfd78459235edb751325e762774ebce98 | [] | no_license | ameseric/Env-WorldGenScripts | e3e58e0bf5c2c60a365cf455e4abfcfabda29cc0 | a4a552aeecde420adde9aa99db4d51df8610ec37 | refs/heads/master | 2022-02-24T06:12:03.521144 | 2019-10-14T04:39:39 | 2019-10-14T04:39:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 619 | py | names.py | #List of Names for NPC generation
#author: amesen
MNAMES = {
0:'Ljubisa',
1:'Clay',
2:'Steve',
3:'Antonio',
4:'Aiden',
5:'Jacob',
6:'Mason',
7:'Jayden',
8:'Hunter',
9:'Nathan',
10:'Charles',
11:'???',
12:'Trevor',
13:'Elijah',
14:'Daniel',
15:'Nahum',
16:'Fred',
17:'George',
18:'Max',
19:'John',
20:'Judas'
}
mnumber ... |
fd80ab1172a92e00cdb067ed0c322b8fbdb5647c | 799fd0b8e8a941de29c56d2bf00c98b0de49a02e | /sandbox/reduce_prod.py | 0c6f8ff3a2e085f17278e51e02a9175b4eccff9d | [
"MIT"
] | permissive | agux/faix | d8b083f7f3a4bcc50821f14e4a8dd311a6113b64 | 99fcca313518b57dcde46c2ddcea9896598b64ea | refs/heads/master | 2022-12-14T21:12:30.817503 | 2021-04-19T01:11:14 | 2021-04-19T01:11:14 | 242,360,459 | 0 | 0 | MIT | 2022-12-08T03:58:47 | 2020-02-22T15:01:21 | Python | UTF-8 | Python | false | false | 1,023 | py | reduce_prod.py | import tensorflow as tf
import numpy as np
def reduce_prod(x, axis, name=None):
'''
Uses tf.cumprod and tf.gather_nd as a workaround to the poor performance of calculating tf.reduce_prod's gradient
on CPU.
'''
with tf.name_scope(name or "c_reduce_prod"):
cp=tf.math.cumprod(x, axis, reverse... |
13736c8ae81d4addb09403eb4455c9a00db8351e | 060ea982c6e28ba13983a45f8e40a016a9802084 | /asr/nn/container.py | fb82337747b65cb18869cd39d3130ba8c474b121 | [
"MIT"
] | permissive | lfelipesv/speech2text | 94ae21ad15b32268ede260ded0f17e5ab23c550c | f3718bcb4fb0a3096e386d0d7f2b98b09ec21303 | refs/heads/master | 2023-03-01T22:27:29.136499 | 2021-02-09T14:28:44 | 2021-02-09T14:28:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 777 | py | container.py | import torch
class SequenceWise(torch.nn.Module):
"""
Collapses input of dim (sequences x batch_size x num_features) to
(sequences * batch_size) x num_features, and applies to a module.
Allows handling of variable sequence lengths and minibatch sizes.
Args:
module: Mod... |