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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
09c3c649c7642fa2a90ca4b53da0e0f4c3ef2d1e | b9a7846429e932064e64b9f8afcf131b5e82ae94 | /microsnp/microsnp.py | 0ac0d43d64e8112e2763d91bd06d4d470cb4aeb6 | [
"MIT"
] | permissive | linda5mith/microsnp | 8991bbfb97ae9a5ebb2f2525c671defcfd5740d8 | 780364008903a4c096a01f2b20c800470b0d9555 | refs/heads/master | 2023-07-18T18:28:43.757194 | 2021-09-02T14:04:48 | 2021-09-02T14:04:48 | 348,420,674 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,698 | py | microsnp.py | import microsnp.snptools as snp
import microsnp.mpileup as mp
import sys
import os
import re
import csv
import subprocess
import pandas as pd
import argparse
import textwrap
import time
from collections import defaultdict
def parse_args():
# Top-level parser
parser = argparse.ArgumentParser(description='Varia... |
f8692a00576420168d9621717a795c7779dcb260 | 2d2dcbd4a587d733265a1bdb402cbc66212323da | /Dom_Notes/Whiteboard_03-05-19.py | 2717b9933df5fed47165564e3861d05464ade9aa | [] | no_license | kadojo/Learning-Python | 0c353d504832f2ea1cca51d81d814270232d91d1 | 0f84346606f230c271812f25227038f24957c3d7 | refs/heads/master | 2021-12-07T18:33:50.368068 | 2021-11-05T22:23:26 | 2021-11-05T22:23:26 | 183,805,924 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,166 | py | Whiteboard_03-05-19.py | import random # Module for random number generators
import sys # Module that provides access to variables used and maintained by the interpreter
import os # Module for a portable way of using operating system dependent functionality
# Print to Console
print("DojoDrone")
print('')
# Array
drone_tasks = ['observe', 'an... |
a5e27b0de06324d4a4c46ce67be101b15eb2f11e | 542f898adea1b36d627d4bf437731022f242d2dd | /detectron2/structures/boxes.py | fd396f68645db1d6946056eed868ffcc02cd7a22 | [
"Apache-2.0"
] | permissive | facebookresearch/detectron2 | 24bf508e374a98a5e5d1bd4cc96556d5914215f4 | 80307d2d5e06f06a8a677cc2653f23a4c56402ac | refs/heads/main | 2023-08-30T17:00:01.293772 | 2023-08-25T22:10:24 | 2023-08-25T22:10:24 | 206,660,580 | 27,469 | 8,047 | Apache-2.0 | 2023-09-13T09:25:57 | 2019-09-05T21:30:20 | Python | UTF-8 | Python | false | false | 14,429 | py | boxes.py | # Copyright (c) Facebook, Inc. and its affiliates.
import math
import numpy as np
from enum import IntEnum, unique
from typing import List, Tuple, Union
import torch
from torch import device
_RawBoxType = Union[List[float], Tuple[float, ...], torch.Tensor, np.ndarray]
@unique
class BoxMode(IntEnum):
"""
Enum... |
21afebea3f01cf8eca19cfcb032ced381f8dafac | 2734b77a68f6d7e22e8b823418ad1c59fe1a34af | /opengever/contact/tests/test_contact_tab_helpers.py | ee2f85e5d04bae20c0acb7bfe9a854c04ccf5312 | [] | no_license | 4teamwork/opengever.core | 5963660f5f131bc12fd0a5898f1d7c8f24a5e2b1 | a01bec6c00d203c21a1b0449f8d489d0033c02b7 | refs/heads/master | 2023-08-30T23:11:27.914905 | 2023-08-25T14:27:15 | 2023-08-25T14:27:15 | 9,788,097 | 19 | 8 | null | 2023-09-14T13:28:56 | 2013-05-01T08:28:16 | Python | UTF-8 | Python | false | false | 2,466 | py | test_contact_tab_helpers.py | from mock import Mock
from opengever.contact.browser.contacts_tab import linked
from opengever.contact.browser.contacts_tab import linked_no_icon
from unittest import TestCase
class MockItem(object):
pass
class TestUnitLinked(TestCase):
def test_linked_with_unicode_value(self):
self.assertEqual(
... |
e090e4bfe62c0cd353dc5e7ffbd4f766e2a740b2 | 251ed7e5f679c53368e9b1bf1cb3c77a3ca47470 | /feature-detection/tomasi-corner-detection.py | 3763c4fc5fba03019cec89ca5ed714743d5b60b7 | [] | no_license | Allanflo88/Python-openCV | f1027e959ca8a31b5c076e5cf7983f79830c1f99 | 8c2a820faada4eb94778c2cabae1d5492b36e318 | refs/heads/master | 2020-08-29T14:52:42.719173 | 2019-10-28T14:37:24 | 2019-10-28T14:37:24 | 218,067,566 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 362 | py | tomasi-corner-detection.py | import numpy as np
import cv2 as cv
from matplotlib import pyplot as plt
img = cv.imread('../resources/chessboard.jpg')
gray = cv.cvtColor(img, cv.COLOR_BGR2GRAY)
corners = cv.goodFeaturesToTrack(gray, 25, 0.01, 10)
corners = np.int0(corners)
for i in corners:
x, y = i.ravel()
cv.circle(img, (x, y), ... |
9e01611cad71ab119f5561a63c0b2ac59181699e | 187414dcb264fb49d82507a099fd5fdca6e55e38 | /examples/src/main/python/mllib/word2vec.py | 3e5720b4df4d6f6ec898961c3026a910a1058586 | [
"BSD-3-Clause",
"CC0-1.0",
"CDDL-1.1",
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"BSD-2-Clause",
"LicenseRef-scancode-unknown-license-reference",
"EPL-2.0",
"CDDL-1.0",
"MIT",
"LGPL-2.0-or-later",
"Python-2.0",
"LicenseRef-scancode-generic-cla",
"LicenseRef-scancode-free-unknown",... | permissive | apache/spark | 8aeba2d80465a262acc95781ede105a5b5886f6d | 60d8fc49bec5dae1b8cf39a0670cb640b430f520 | refs/heads/master | 2023-09-04T04:33:36.058199 | 2023-09-04T03:48:52 | 2023-09-04T03:48:52 | 17,165,658 | 39,983 | 32,449 | Apache-2.0 | 2023-09-14T19:46:24 | 2014-02-25T08:00:08 | Scala | UTF-8 | Python | false | false | 1,789 | py | word2vec.py | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
187137238c399d6835fc2c137074032167846079 | cfefa32e4834c91fdf328942cfcf2d9d3669bec4 | /revrand/glm.py | 04d91cd2c44c59760b38b4dcd24327e89983b9f5 | [
"Apache-2.0"
] | permissive | lizhangzhan/revrand | f03723afaf64ebaae898b92be91d52c0419ed495 | 9431a94c7f5cec7ae01836456912f754b905a8c4 | refs/heads/master | 2021-01-19T06:47:53.603967 | 2016-08-25T07:19:17 | 2016-08-25T07:19:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25,298 | py | glm.py | """Bayesian Generalised Linear Model implementation.
Implementation of Bayesian GLMs using a mixture of Gaussians posterior
approximation and auto-encoding variational Bayes inference. See [1]_ for the
posterior mixture idea, and [2]_ for the inference scheme.
.. [1] Gershman, S., Hoffman, M., & Blei, D. "Nonparametr... |
5d4a42b328d764eacd65b3296596f3cf46b75923 | 6126f3f20eda97840a8a08a50a1288def8c530f0 | /controllers/market.py | 5097b630efd88677123b2b45c5866eac010984ad | [] | no_license | feilaoda/kd | 24b12841092e5437b319c02801e63106658672cf | 8b9e748fcfeecbba3a2a9a956f5e414aa4e23b8b | refs/heads/master | 2020-12-24T13:29:13.529071 | 2011-04-22T09:25:18 | 2011-04-22T09:25:18 | 1,636,058 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 623 | py | market.py | import logging
from pylons import request, response, session, tmpl_context as c, url
from pylons.controllers.util import abort, redirect
from kd.lib.base import BaseController, render
log = logging.getLogger(__name__)
class MarketController(BaseController):
def index(self):
# Return a rendered template... |
6335cb2ec1735d839352b8cff22b8bcf65d1916e | aa98138cf9c8e484c9e7f91f5e3f4db93957861c | /profiles/migrations/0007_presentlocation.py | 361fb9c7c872941c2a428dc4045ab769471bdf82 | [
"MIT"
] | permissive | ComputerTutor-12thClass/CentralBank | f99d290f00af127355f4be12dcfe7c4b9ee2f80d | f6cc8f9d3359810f221ddc05eb4927428975bf4e | refs/heads/master | 2022-12-13T11:23:44.168660 | 2020-09-08T09:49:59 | 2020-09-08T09:49:59 | 293,421,964 | 0 | 0 | MIT | 2020-09-07T04:29:48 | 2020-09-07T04:29:47 | null | UTF-8 | Python | false | false | 779 | py | 0007_presentlocation.py | # Generated by Django 2.0.1 on 2018-04-22 13:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('profiles', '0006_basicdetails_user_name'),
]
operations = [
migrations.CreateModel(
name='PresentLocation',
fields=[... |
ee65b0956beee9ce9610110d4264ae11b2e1479c | 9eb671705e57251e3c5b492544135a052009d093 | /Unsuper/UnsupervisedLearning.py | 64c2d5ddf72e03382ec73f290423629d5b092ce2 | [] | no_license | gilandau/Data-Mining | cc6deb4684a8047630c120f325eb67a1b556c3d4 | dfdcdfc3d989944b6c6ade76915c111541da2e7e | refs/heads/master | 2020-04-29T13:47:49.131008 | 2019-03-18T03:19:49 | 2019-03-18T03:19:49 | 176,178,615 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,930 | py | UnsupervisedLearning.py |
# coding: utf-8
# In[1]:
# LEC 19 - 22
import numpy as np
import csv
import random as r
header_mappings = dict([])
x_list = []
with open('yelp.csv', encoding = "utf-8") as csvfile:
yelpreader = csv.reader(csvfile, delimiter=',')
headers = next(yelpreader)
i = 0
for h in headers:
header_mappi... |
740dc07c681e0ffa6336abf88225a93f2ea717c6 | 03c4baa0e35b6f0c9a26a552667e0bb15ddf7bf7 | /4/iloczyn_skalarny.py | 4daf51282696aaa11a1a6c7a9f570c0efeab8b6a | [] | no_license | harvastum/PwJS-PiLB | dc076279fd7563a7a23348e779c0e6e3433a7800 | f905254c01ee6ca0fb1e051ac5ca70638d31ce81 | refs/heads/master | 2023-02-03T12:04:36.183993 | 2020-12-21T06:23:20 | 2020-12-21T06:23:20 | 323,229,826 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 301 | py | iloczyn_skalarny.py | def dot_product(a, b):
if len(a) != len(b):
raise ValueError(f"Vectors must be of the same length. Received {len(a)} and {len(b)}")
result = 0
for x, y in zip(a,b):
result += x*y
return result
if __name__ == "__main__":
print(dot_product([1,2,3,4,5], [1,1,1,1,1])) |
bd2ae4a3e3f4f8319c8955ff7039824ecd75023f | a9e3f3ad54ade49c19973707d2beb49f64490efd | /Part-03-Understanding-Software-Crafting-Your-Own-Tools/models/edx-platform/openedx/core/djangoapps/commerce/__init__.py | 9b06dc24a3d3d96cd487345c19fa29b4431a1bf5 | [
"AGPL-3.0-only",
"AGPL-3.0-or-later",
"MIT"
] | permissive | luque/better-ways-of-thinking-about-software | 8c3dda94e119f0f96edbfe5ba60ca6ec3f5f625d | 5809eaca7079a15ee56b0b7fcfea425337046c97 | refs/heads/master | 2021-11-24T15:10:09.785252 | 2021-11-22T12:14:34 | 2021-11-22T12:14:34 | 163,850,454 | 3 | 1 | MIT | 2021-11-22T12:12:31 | 2019-01-02T14:21:30 | JavaScript | UTF-8 | Python | false | false | 50 | py | __init__.py | """ Thin Client for the Ecommerce API Service """
|
696704823733407af3c72cc6e0ce7b761839acd2 | cbd32919146d0618fba8977b2a804cb95168e13a | /scripts/load_document_into_doc_db.py | aade58fb20eacb24610da3fdfb73c11cb436f478 | [] | no_license | jhajagos/TransformDBtoHDF5ML | 90e1ed91066273a7b34023c31f6ba574bdca22a5 | 5ef61b1f813ff49e6f5fc42047cf8bdea4dc4393 | refs/heads/master | 2021-01-11T18:08:36.664636 | 2018-12-28T18:37:56 | 2018-12-28T18:37:56 | 79,502,881 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 966 | py | load_document_into_doc_db.py | from document import load_document_main
import argparse
import sys
"""
A simple program for loading JSON dicts into a MongoDB collection
"""
if __name__ == "__main__":
# TODO: Add support for GZIP json
argparse_obj = argparse.ArgumentParser(description="Generate a JSON file that specifies which fields to fi... |
931f8111713470f3c0d49de2cfc6fc5aad09ccf2 | bdc7abbcafd76215f08a73ceea044f746421a3df | /the_most_numbers.py | 64f807b08cf845f73de68ced176d906c6de3852c | [] | no_license | deepansh27/checkio | b52a45063d02a3a60d1eb032f7cf0103080719d0 | b041297bc18a8afb589c5db5886ab461bd355b89 | refs/heads/master | 2021-07-08T17:36:10.235709 | 2017-10-02T04:59:41 | 2017-10-02T04:59:41 | 103,851,060 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,177 | py | the_most_numbers.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Sep 20 21:14:51 2017
@author: deepanshparab
"""
'''
Let's work with numbers.
You are given an array of numbers (floats). You should find the difference between the maximum and minimum element. Your function should be able to handle an undefined amount... |
ce1882d19ddaddb9ca71079113ff8e19cec033ed | 07aff4801ca3abf7aaa8ab2f0cd6f617d23c7f61 | /polls/migrations/0004_auto_20210418_1605.py | 61e4aac25b23aae65b71f0716bec1fff953f1537 | [] | no_license | kupuk090/fabrique_test | 8ab96b1619e1de02bce6357e29393c5e5cc8cba2 | 9e6058055a0b1a190fc14daf928fdac6ad1340b6 | refs/heads/master | 2023-04-11T08:40:47.859101 | 2021-04-20T17:13:34 | 2021-04-20T17:13:34 | 359,884,069 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 426 | py | 0004_auto_20210418_1605.py | # Generated by Django 2.2.10 on 2021-04-18 16:05
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('polls', '0003_auto_20210418_1549'),
]
operations = [
migrations.AlterField(
model_name='poll',
name='created',
... |
5e47692e49be287c1503fe77f27acf48891a0f64 | 518d364ce9c2bb867de3c118926198dd3babe855 | /utils.py | 8498f2f146d36a7c1d4b0bee8feba23c2228071f | [] | no_license | nanangqq/ezdxf-utils | 32721eaebc5e8bc629026b2b58ab5cc94220c454 | 1e3fd7a29465c722fa117151b9be5478d5a4ca40 | refs/heads/main | 2023-05-06T08:35:43.655238 | 2021-05-20T10:18:51 | 2021-05-20T10:18:51 | 369,164,601 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,443 | py | utils.py | import ezdxf
import numpy as np
import math
import random
from rtree import index
def filterForms(ents, block_name):
return [ent for ent in ents if 'block' in dir(ent) and ent.block().name==block_name]
def getFormBB(formInsert):
vertices = []
for vent in formInsert.virtual_entities():
if type... |
53e4e92efa1fdecc595b2732c56a4c439750a41b | 759f52976ad2cd9236da561ca254e11e08003487 | /part8/ex47/v2-sorting/test_nameutil.py | ce67ca6bc9a3f128c7fc42f5b9d244de6b18b315 | [] | no_license | mbaeumer/fiftyseven | 57b571c3e09640a2ab0ed41e5d06643c12b48001 | d79b603d5b37bf1f4127d9253f8526ea3897dc08 | refs/heads/master | 2020-06-10T20:52:25.311992 | 2017-11-15T18:28:38 | 2017-11-15T18:28:38 | 75,877,462 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 957 | py | test_nameutil.py | import unittest
from nameutil import handle_name
from astronaut import Astronaut
class NameUtilTest(unittest.TestCase):
def test_handle_single_lastname(self):
name = "Martin Bäumer"
expected_astronaut = Astronaut("Martin", "Bäumer", None)
actual_astronaut = handle_name(name)
self.as... |
680983412b8ab3e916f91b96d463329c2e524fa9 | 6c03a7a86200a8eba56b49818281397f5fb7baef | /my_pygame/image.py | f4fbef5ac65accc91f8b229451b9d24c19f348bf | [] | no_license | francis-clairicia/Traffic_Racing_2D | 772a764c495f0d85052efda4eae3a8f7385a3a66 | 06da45a191fa7ce04c147361d01ddc83fa65561c | refs/heads/master | 2023-01-09T15:38:04.818045 | 2020-11-08T15:10:42 | 2020-11-08T15:10:42 | 269,630,600 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 563 | py | image.py | # -*- coding: Utf-8 -*
import pygame
from .drawable import Drawable
class Image(Drawable):
def __init__(self, surface: pygame.Surface, size=None, width=None, height=None, **kwargs):
Drawable.__init__(self, surface=surface, size=size, width=width, height=height, **kwargs)
@classmethod
def from_fi... |
cd52555f299826c7d5227e8b856f2292950c650a | 50a3796d536455ba6a72571505742cb826834378 | /us/matthey/coco/algorithm/leetcode/remove_duplicates_from_sorted_list_ii.py | 3a15e5fc55d8d33156affda949be2f608b081dbc | [] | no_license | replcloud/interview_py | d7db3c0a8cb3b2453a9708af00a8e601ae29e772 | 774059eab2bf3fa680701c7d2ad6887099f123c2 | refs/heads/main | 2023-03-23T20:37:58.648757 | 2021-03-23T18:55:35 | 2021-03-23T18:55:35 | 319,418,342 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,237 | py | remove_duplicates_from_sorted_list_ii.py | class ListNode:
def __init__(self, val=0, next=None):
self.val = val
self.next = next
def getHead(l: list):
dummmy = ListNode(-1)
curr = dummmy
for x in l:
curr.next = ListNode(x)
curr = curr.next
return dummmy.next
def printLinkedList(head: ListNode):
if head:... |
bfaf85dc557c665ab335765264b953482ff9ad37 | 180dc578d12fff056fce1ef8bd1ba5c227f82afc | /orbit/examples/single_task/single_task_evaluator_test.py | e544dea6c9793e74bc76535dc21c9842dab5cf54 | [
"Apache-2.0"
] | permissive | jianzhnie/models | 6cb96c873d7d251db17afac7144c4dbb84d4f1d6 | d3507b550a3ade40cade60a79eb5b8978b56c7ae | refs/heads/master | 2023-07-12T05:08:23.314636 | 2023-06-27T07:54:20 | 2023-06-27T07:54:20 | 281,858,258 | 2 | 0 | Apache-2.0 | 2022-03-27T12:53:44 | 2020-07-23T05:22:33 | Python | UTF-8 | Python | false | false | 2,088 | py | single_task_evaluator_test.py | # Copyright 2023 The Orbit Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... |
a44b6ad97bbcb35fd3a8e615c6e4c12752fd4139 | 877e5d244956fb33c614096cb284590d350d11df | /15.py | a729dd8f69acb62ba0e8596fe5d944142a7f7678 | [] | no_license | szymek156/project_euler | 5390348e866f114f21ce29c62c821c584589165f | 4f308d0342bbfbbe6b9c25666a374b0567cb081e | refs/heads/master | 2023-03-23T17:14:10.111856 | 2021-03-19T18:00:57 | 2021-03-19T18:00:57 | 167,685,505 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,761 | py | 15.py | import time
width = 5
height = 5
count = 0
map = ""
def go(x, y):
global width
global height
global count
global map
if (x == width and y == height):
count += 1
print map
return
if (x + 1 <= width):
map += "-"
go... |
cb95878de8496ef956f6969b4570dc429277e1c7 | c321810fad4b1cf5e5a3f1595287b2ba292f8aca | /dork.py | bc4be44d97e05ced9b245f8bba5687482b498dcb | [] | no_license | wileyj/public-python | de504f154b23df4314d3eadc21e2693782572394 | 44abcc2993cab29c1e1da57382fcc3cf94a2d465 | refs/heads/master | 2021-01-23T11:03:31.165573 | 2018-01-29T20:05:35 | 2018-01-29T20:05:35 | 93,120,311 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,058 | py | dork.py | #!/usr/bin/env python2.7
import argparse
import sys
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
# Check ... |
bc146436e285867ccdc61a98b1cdd35d855b1538 | cf2726191e971c8eb44f24ba1d24011d861c6209 | /mlcalling.py | cf31e0dffa398f2e1cc2c198b7e43a7e456b5580 | [] | no_license | Palveet/Byte-Karma-HackChennai | 6a058096aa7bf6c1af9f4c5055265f0148446046 | cfaa3597f6b940fd1b5708620a9eeefba973b61e | refs/heads/master | 2022-12-27T06:25:21.111822 | 2020-09-20T05:45:56 | 2020-09-20T05:45:56 | 296,700,906 | 1 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,653 | py | mlcalling.py | import numpy as np
import pandas as pd
#import matplotlib.pyplot as plt
from sklearn.svm import SVC
from sklearn import metrics
from sklearn.model_selection import train_test_split
def mlcall(disarr):
df = pd.read_csv("Training.csv")
X, y = df[['receiving_blood_transfusion', 'red_sore_around_nose',
... |
c36dbf9c3effabeed078700304538d46fa2076b2 | 3ac9d5e48e8f9413e8752259a11e27d7534e2641 | /schoolapp/forms.py | a65b8434cbc37f4dfb4cc3cd938310e9341038f5 | [] | no_license | joshuababy/school-git | 70c583e8cbaa645b0fb0d18b945a9e22d3543000 | 16f225702625eb259a036ab4821725d0a8667d07 | refs/heads/master | 2023-03-17T17:51:14.546649 | 2021-03-05T08:00:46 | 2021-03-05T08:00:46 | 344,737,768 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 297 | py | forms.py | from django.forms import ModelForm
from.models import *
from django import Student
from.models import Teacher
class newstudent(ModelForm):
class Meta:
model=Student
fields='__all__'
class newteacher(ModelForm):
class Meta:
model=Teacher
fields='__all__'
|
c5941870ea8d522b7ddf4f34655bd088d1014c95 | 92a2f182f6f611918be78b5efba4e8bfd631ca5c | /myslideslive/cli.py | 7e2958b2caccbc856de3170316438ffc56b37abc | [
"BSD-3-Clause",
"Python-2.0"
] | permissive | KhaledElTahan/myslideslive | 469e9eb70b7225f01b5adb31dac96b770e575ed6 | 6323bc4bc3a614d36cee56490756da5361cc5859 | refs/heads/master | 2023-06-24T02:41:47.481850 | 2021-07-10T19:29:52 | 2021-07-10T19:29:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,246 | py | cli.py | # AUTOGENERATED! DO NOT EDIT! File to edit: src/cli.ipynb (unless otherwise specified).
__all__ = ['parser', 'main']
# Cell
import argparse
from .slideslive import SlidesLive
# Cell
#export
parser = argparse.ArgumentParser(description='Take care of your SlidesLive slides...')
parser.add_argument('url', type=str, h... |
8248f95e19f839e69e3be929dbbc73538eb8ced6 | c6ed71b237caa51ce38b2297773ab28ba9886dd1 | /py/dataset.py | bd6527d45b4d863168568e70f9a9c56c3b4aecd5 | [
"MIT"
] | permissive | botpress/node-crfsuite-pos | 634f9c45f994d86b4f51d9e74f3807592a860585 | d6990fd2706f978232394bd2d07a97da47ce53d7 | refs/heads/main | 2023-03-30T00:06:32.141570 | 2021-04-02T18:59:55 | 2021-04-02T18:59:55 | 354,106,597 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,093 | py | dataset.py | import re
import numpy as np
def n_alpha(word: str) -> int:
# TODO: support other alphabets
return len(re.findall('[a-zA-Z]', word))
def n_num(word):
return len(re.findall('\d', word))
def pref(word, idx):
return '' if len(word) < idx + 1 else word[:idx + 1]
def suf(word, right_idx):
return ... |
b5343e25e9529051150a060503c6c3e35912a8e4 | 757d3604063724880bd90b239060a03d06517acd | /rl2/buffers/__init__.py | e79aa7c1c746a22693ef4fb7bb9ffa56dde5b934 | [] | no_license | superdiode/fork-kc-ml2_rl2 | 255b569f111682445e6f9d65ff041268a3e2cd72 | ffa17e75530b80d29ee3ae708a1aa4c7b89c3ea3 | refs/heads/main | 2023-07-09T18:40:01.050917 | 2021-07-12T13:48:00 | 2021-07-12T13:48:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 31 | py | __init__.py | from rl2.buffers.base import *
|
fe75802e2cb72bf983cb8cada3badd47dac0ade8 | 7f687897b5bc9bfb01812cb564a8a88100465055 | /root/setIP.py | 0a68d7d62a1b68ecefa073cd75dbbfcf894c528f | [] | no_license | WiggidyW/docker-http-available-storage-controller | e258d546efe61495f801b4be3e5a0e213abb6b7a | 4714430fa36523a94329d6f5c76010074afbcd9d | refs/heads/master | 2020-07-10T08:16:25.852412 | 2019-08-25T06:35:30 | 2019-08-25T06:35:30 | 204,215,592 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,071 | py | setIP.py | #!/usr/bin/env python3
import time
import os
import requests
from kubernetes import client, config
from kubernetes.client.rest import ApiException
config.load_incluster_config()
v1 = client.CoreV1Api()
POD_NAMESPACE = os.environ["POD_NAMESPACE"]
POD_LABELS = os.environ["POD_LABELS"]
POD_PORT = os.environ["POD_PORT"]
... |
6ebacb5aa8c1b39f09f4668b4e5e8f30811206dd | a9fd4da034f713004e09fcb29a95a128c797cca6 | /privkey.py | f105fec848e5a40e0a3857e75702c5f61e86e131 | [] | no_license | halby24/BitcoinZemi2017-Python | ec6f83ef5c3b3a75a56f69da36e4422823843b3a | 3967acbd40bce8a5b82d4b3d1f944ac81d316d8a | refs/heads/master | 2021-05-15T10:54:04.812626 | 2017-10-30T02:17:38 | 2017-10-30T02:17:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 104 | py | privkey.py | import os
import binascii
rand = os.urandom(32)
strand = binascii.hexlify(rand).decode()
print(strand)
|
540445dbe88b838b8305b5928a3dd61926bf8710 | ac1d2e60c6f510caa06eea23ada8722a5efdf774 | /management/urls.py | ea9028e7723c5036f6485e91d7b57c457d786020 | [] | no_license | Athulya-UK/CRUDwithsearchpagination | 9ea2f293f5c8e9c9acb76b527a79015f11d408a3 | 744d44afc73f35ea8f5e8a8025a3165cdf8e6517 | refs/heads/main | 2023-07-05T16:41:17.630004 | 2021-08-15T04:07:16 | 2021-08-15T04:07:16 | 396,209,468 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,151 | py | urls.py | from django.urls import path
from . import views
from django.contrib.auth.views import LoginView,LogoutView
app_name = 'management'
urlpatterns = [
path('',views.home_view,name=''),
path('<int:subect_id>',views.detail_page,name='detail'),
path('adminclick', views.adminclick_view),
path('teacherclick', v... |
d1f11ade50b5fe006539fd734e0959e927515793 | 9db0e9f1877229c86abc36f242cc38a873c05b8d | /generators/generator.py | 0d4a8e77f12670c3271cd745f7fcd9783aa6d193 | [
"LicenseRef-scancode-warranty-disclaimer"
] | no_license | rodolphe-alt/hanastress | 7876a85bc58cc432a870649115f05472380c6bd7 | ade6851f08ce52723e4397d8c7b975415e44ea42 | refs/heads/master | 2023-03-18T18:28:02.799128 | 2021-03-24T09:38:59 | 2021-03-24T09:38:59 | 350,707,921 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,977 | py | generator.py | import util.databaseUtils
import util.printUtil
import util.miscUtils
import random
import sys
#import thread
#import thread6
import threading
import _thread
import time
class Generator:
def __init__(self, options, tables, store_type, rows):
self.options = options
self.printUtil = util.printUtil.P... |
ce4f6240630f82d2a9332271a07e97cc8d3df9ca | dd48aff483e71cd48fbe9252732d2a01d4e09e30 | /Model_related_code/aqi_lightgbm_merge.py | b390a2b95702ea37c91667db4ff040f7cb58a1a5 | [] | no_license | wuyujack/2018-ACM-SIGKDD-CUP-of-Fresh-Air-27th-Place-Solution | 61d0138b76280af5457c0ff9df1ba83dc622aa1e | ee186946451dbac8387cbb31344389b1491434f3 | refs/heads/master | 2021-06-19T08:43:52.819366 | 2020-12-21T00:35:31 | 2020-12-21T00:35:31 | 137,449,889 | 3 | 1 | null | null | null | null | UTF-8 | Python | false | false | 4,027 | py | aqi_lightgbm_merge.py |
import os
import pandas as pd
import random
import numpy as np
import matplotlib.pyplot as plt
import lightgbm as lgb
from sklearn.externals import joblib
%matplotlib inline
p=0.4
num = 6
per = 0.1
Type = 'pm25'
#'temperautre'
#'windspeed'
#pressure
location = 'BJ'
#'LD'
f = open('/hom... |
51ad2152ae9b74ae4f60929d757575a732f3f3c9 | a57cd9ff8aaee2c5ad806e59e5b5c47942abd626 | /app/models.py | 72ede6a4ea2624a709d064f29e27b2c7df38739e | [] | no_license | pranalikambli/django_crud_with_pagination_search | 60a0c1d6a6b0614fc8d699170609b1fcae0db522 | 450a96ac4dbc22ae122d27eedad0f9fec9a179da | refs/heads/main | 2023-01-06T19:56:00.508154 | 2020-10-29T12:21:30 | 2020-10-29T12:21:30 | 308,299,275 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 518 | py | models.py | from django.db import models
from django.utils import timezone
class Employee(models.Model):
class Meta:
db_table = 'employee'
id = models.AutoField(primary_key=True)
firstName = models.CharField(max_length=255)
lastName = models.CharField(max_length=255)
email = models.EmailField()
a... |
ba1f0a305ce1c2820f44952a14f9e9f7022a05f8 | 0e9e4a6fb7e249b68f0d5e3dce1001378413f43b | /news/views.py | da02a627d94a081278fc7a06324d4795cb023c25 | [] | no_license | ndj-no/WitterShoe-Django | d0865fb17f9c9e66925f0e48b13fc344952d6ff6 | 5a6b92d8bb0216514fe74644d67512c7605f657d | refs/heads/master | 2022-10-15T03:23:12.547825 | 2020-06-13T14:33:49 | 2020-06-13T14:33:49 | 260,172,695 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 263 | py | views.py | from django.shortcuts import render
from mainapp.views import MainFrameView
# Create your views here.
class NewsView(MainFrameView):
def get(self, request):
self.update_top_bar(request)
return render(request, 'news/news.html', self.context)
|
8c7a10a6831195509e2484de21c14a407f32b1a3 | e58ae6a1bb761e3a1acfc1cbd3fa63d1e72cfcbb | /tests/test_basemodel.py | 2c60ef45b1c47dcf342ee073a337cf5712e49339 | [
"MIT"
] | permissive | tvdboom/ATOM | b31548f0f40dc591f8737557d518345a6fa40ee1 | 103e86c45cf5d33eb34b99cd1fdf84b9fbe841eb | refs/heads/master | 2023-09-03T06:30:53.838261 | 2023-06-14T12:25:41 | 2023-06-14T12:25:41 | 195,069,958 | 135 | 15 | MIT | 2023-06-14T12:25:42 | 2019-07-03T14:25:20 | Jupyter Notebook | UTF-8 | Python | false | false | 39,388 | py | test_basemodel.py | # -*- coding: utf-8 -*-
"""
Automated Tool for Optimized Modelling (ATOM)
Author: Mavs
Description: Unit tests for basemodel.py
"""
import glob
from unittest.mock import patch
import pandas as pd
import pytest
import requests
from optuna.distributions import IntDistribution
from optuna.pruners import PatientPruner
... |
d68b1be6958ec5cb8d557c1e1c1c093b2c4126a3 | 86a10326b571172bc1c9a5d54dfbfd877ea522a5 | /lists/migrations/0004_auto_20160929_1838.py | 97a6a1f5ffc4884bb8ea3d1526afeb3557db14d8 | [] | no_license | nc415/acronyms | 42ad04f4ccc32d8d25636a9fb37c6b1edb04e12b | fd2c9589fea23974bfe01570a6c1459cfa57e36c | refs/heads/master | 2021-01-12T12:45:48.930828 | 2016-10-01T14:37:35 | 2016-10-01T14:37:35 | 69,668,812 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 408 | py | 0004_auto_20160929_1838.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('lists', '0003_auto_20160929_1556'),
]
operations = [
migrations.RenameField(
model_name='society',
o... |
0df2275856c3bd060a2e61c5566e9552771c3559 | dc3d74e618495926129b16e285930b6c028cce98 | /Flask/main.py | d528ff2979a3c752a26664c75204f0986a8d8fe8 | [
"MIT"
] | permissive | rubenpersicot/orpheus | 4d53611d68a699537a47db8ffbf9734148c03765 | 9e08f1a845dfbfbe793f8152220b81adff7af04d | refs/heads/main | 2023-07-29T11:22:20.797593 | 2021-08-24T06:01:14 | 2021-08-24T06:01:14 | 397,593,897 | 0 | 0 | null | 2021-08-18T13:00:23 | 2021-08-18T12:33:02 | null | UTF-8 | Python | false | false | 2,968 | py | main.py | """
Back-end of the Orpheus website, part of the TDLog project.
Authors: Alice Gribonval
Louis Reine
Ruben Persicot
"""
import os
import multiprocessing as mp
import zipfile
import tempfile
from flask import Flask, request, send_file, jsonify
from flask_cors import CORS
from flask_restful import Api... |
043eecc710fe9ef7f8ee4b90b031578ab69b2b07 | 850adeb9a1ff5798157afc501851a92f94eab8bc | /py/ma/DService/web/Services/predict/Predict_Result_Compare.py | aa1abdd379abb785bc1a5aac80a9cb902e1600e4 | [] | no_license | lashoushusheng/BONC | 82dbca3eb21c53e7e14f3bcf2d5c7959e1feaf39 | cd2cbfda89f7135cc4902c959d035a0dd75682fc | refs/heads/master | 2022-06-26T05:54:37.616532 | 2020-04-07T08:14:42 | 2020-04-07T08:14:42 | 245,826,589 | 0 | 0 | null | 2022-06-21T02:56:46 | 2020-03-08T14:11:37 | Python | UTF-8 | Python | false | false | 2,532 | py | Predict_Result_Compare.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
from DModel.Mysql_MA_Result import Mysql_MA_Result
from DService.web.Services import DataServiceBaseHandler, mylog
from DService.web.Services.Optim_Public import Optim_Public
from DPublic.MysqlDB import Base, db_session, engine
import pandas as pd
import json
class Predict_Co... |
72ed8d8511c0eff52d30ee7356ddd78d6c6ad611 | 9acb0a028be800c8d736617da5e2ea6bff679ded | /tournament.py | f925a764b7547c89a8397b379e3e5362e3087a90 | [] | no_license | embersyc/tournament | 2215e48daddf0b5941ae6d7c1d22ae4909b493e5 | 8d15c30894d36168ffdc02d01b4d03b919787346 | refs/heads/master | 2016-08-11T08:06:35.841085 | 2015-12-13T14:48:32 | 2015-12-13T14:48:32 | 47,593,630 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 6,203 | py | tournament.py | #!/usr/bin/env python
#
# tournament.py -- implementation of a Swiss-system tournament
#
import psycopg2
import bleach
def connect():
"""Connect to the PostgreSQL database. Returns a database connection."""
return psycopg2.connect("dbname=tournament")
def deleteMatches():
"""Remove all the match recor... |
4e193a09044e4350f3e842d39a03c37d07207bc1 | 3a27e6d49ef9a49a598fe10bc4033a5f875ec469 | /Day002_HW.py | fa582371891216c6b267c3a1a829910e2df9b7d2 | [] | no_license | Chen-li-woei/2nd-PyCrawlerMarathon | 83e550b3fb50aa4d4a6b7b6ee9edde4b9a2de7c0 | f0a0fa0339a3eceb6d0992c4db913b1f2f161ee7 | refs/heads/master | 2021-03-06T13:32:14.687817 | 2020-09-14T00:42:20 | 2020-09-14T00:42:20 | 246,203,122 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 329 | py | Day002_HW.py | # -*- coding: utf-8 -*-
"""
Created on Thu Mar 12 18:55:01 2020
@author: chenlw
"""
import csv
# 開啟 CSV 檔案
with open('./data/example.csv', newline='',encoding='utf-8-sig') as csvfile:
# 讀取 CSV 檔案內容
rows = csv.reader(csvfile)
# 以迴圈輸出每一列
for row in rows:
print(row[5]) |
547a8670b2e32f852425e9ccb202b4fc023d8996 | 51c8e090300a01c90b2fcde85aee016deffa96ea | /book/tests/test_views.py | d355f583ffe6b247089f31b1345a4b9b8457711e | [] | no_license | jabellard/bookAPI | d83ff19bf19342ca3688492c23fae68cc5976347 | 17fb89d881496788854f8adaf72c18c4635f6034 | refs/heads/master | 2022-12-11T20:42:38.243438 | 2018-10-22T23:21:47 | 2018-10-22T23:21:47 | 153,196,537 | 0 | 0 | null | 2022-12-08T01:14:57 | 2018-10-15T23:55:13 | Python | UTF-8 | Python | false | false | 22,898 | py | test_views.py | from django.test import TestCase
import base64
from django.urls import reverse
from ..models import Author
from ..models import Publisher
from ..models import Genre
from ..models import Book
from django.contrib.auth.models import User
# Create your tests here.
class Test1(TestCase):
def setUP(self):
print... |
91da4beff446b0788dbb142a504ba1445cb237b2 | e5d25dc067fcbfad22d74b7ebe0f662d1e37074a | /repl.py | aece33afe28a6ce2048a2e2f4ff4e5ecc24dcc85 | [] | no_license | id4thomas/REPL | 314414287cdea8595b014d47d8424b6dd2fbced9 | 35541e2aa6f2388154fa9fd262f5ac2169b1c4ba | refs/heads/master | 2020-07-09T13:44:01.168452 | 2019-12-15T12:29:35 | 2019-12-15T12:29:35 | 203,985,702 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,385 | py | repl.py | #reinforcement planner
#single agent
import numpy as np
# namedtuple 생성
from checker import Checker
from Planner_env import Planner_env
import operator as ops
from collections import namedtuple
Transition = namedtuple(
'Transition', ('state', 'action', 'next_state', 'reward'))
NUM_OPS = {
'>' : ops.gt,
'... |
5517db9c66ff1f0519159ad66a691d906983655e | 5b5c9a286e217340f816901b843281129ad0f596 | /plaso/dependencies.py | c672efbafb3a7a227033959e4d7b7915447d697c | [
"Apache-2.0"
] | permissive | aarontp/plaso | 403c43a47d5833a5ed3540cce907982bebaeac3c | 0ee446ebf03d17c515f76a666bd3795e91a2dd17 | refs/heads/master | 2021-01-20T23:41:01.382721 | 2016-10-11T19:47:21 | 2016-10-11T19:47:21 | 67,898,934 | 1 | 0 | null | 2016-09-10T23:07:53 | 2016-09-10T23:07:53 | null | UTF-8 | Python | false | false | 18,607 | py | dependencies.py | # -*- coding: utf-8 -*-
"""Functionality to check for the availability and version of dependencies."""
from __future__ import print_function
import re
import sys
# pylint: disable=import-error
# pylint: disable=no-name-in-module
if sys.version_info[0] < 3:
# Keep urllib2 here since we this code should be able to be... |
421e5b439433c2a4e3aefc3227cc0516fb37cb49 | 79d8961a21038e2906202d7917717931a613f86c | /app.py | 9a1d53bf3e31b2fe4dd8644c848df0bbe788f864 | [] | no_license | amine7777/docker-python-app | e854d133c68e7232e337b21bc83602a8164e0aff | 91071e3de141b52771e80dfa53073ca5f5b66de7 | refs/heads/master | 2020-09-11T08:55:00.600251 | 2019-11-15T22:25:50 | 2019-11-15T22:25:50 | 222,012,872 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 809 | py | app.py | import os
path = '/opt/code'
code= raw_input("Hello Tass choose your code:")
if code=="CPP":
path_cpp = '/opt/code/CPP'
if not os.path.exists(path_cpp):
os.mkdir(path)
os.mkdir(path_cpp)
f = open("/opt/code/CPP/runme.cpp", "a")
f.write(" Please enter your CPP code. ")
f.close()
print("D... |
88b3751b364eef685cce091c634308a9055afa96 | 3495924441fe54597425346df124ae195527d4b6 | /av/mobile/browser/view.py | 60358ebd5e96870fb3474fafd5ff60ee2dbeeefe | [] | no_license | avoinea/av.mobile | 740a1f4ed0e4e5c672565d3d6883c54af76091ee | a44c36cb9d19d93c9a5bb0c58144597c7da56c41 | refs/heads/master | 2021-01-01T19:29:17.400649 | 2013-05-02T18:27:26 | 2013-05-02T18:27:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,259 | py | view.py | """ Json
"""
import json
from Products.CMFCore.utils import getToolByName
from Products.Five.browser import BrowserView
from eea.facetednavigation.caching import ramcache
from eea.facetednavigation.interfaces import ICriteria
from eea.facetednavigation.caching import cacheKeyFacetedNavigation
from eea.facetednavigation... |
c8571844bc68d63900b543b0e191a29becfeb56b | 286b3ea113b888a318de963964234ff611fc759d | /explore.py | c631e7e5fa59e91ac2c27a0a7e1b29526ad33412 | [] | no_license | rosevoul/movie-recommender | 2a27a247363e3f5fe10b2023633c59576b5d5fba | ac1eac40590b6a3b9716fa8490895ce66b8a89af | refs/heads/main | 2023-05-01T23:00:33.244221 | 2021-05-30T15:10:08 | 2021-05-30T15:10:47 | 371,100,454 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 509 | py | explore.py | # Open with VS Code using Python Jupyter extension
# %%
import pandas as pd
ratings = pd.read_csv('data/ml-20m/ratings.csv')
movies = pd.read_csv('data/ml-20m/movies.csv')
plots = pd.read_csv('data/wikipedia-plots/wiki_movie_plots_deduped.csv')
# %%
print('Total movies rated: ', ratings.movieId.nunique())
print('To... |
b6d1308ddf3e3a5af2cd7492848bfd36201804cf | 1375b68505ccb07fa3fc74f51937e8ccaaa4b570 | /a2_solution.py | f6e9a9ef76aa372748b0bff07b258cce908eed19 | [] | no_license | ElonQuasimodoYoung/DungeonGame | de8ef19260398ef94792472c48a1c8b85da64ca8 | 8c4376267270946d2b402fb26c61d9abd0eca253 | refs/heads/main | 2023-08-13T15:01:05.614298 | 2021-09-18T05:20:39 | 2021-09-18T05:20:39 | 407,760,597 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,988 | py | a2_solution.py | from a2_support import *
class Entity:
""" """
_id = "Entity"
def __init__(self):
"""
Something the player can interact with
"""
self._collidable = True
def get_id(self):
""" """
return self._id
def set_collide(self, collidable):
""" """
... |
66ef184f135272b342eee1b6ed2f4a5def182678 | 2a401f70b0b4beb1c96b12f84dbcb93e74357dd7 | /244-Shortest-Word-Distance-II/solution.py | a89d9b84a8ce7465c20cd6a9ab45d7e123035bc2 | [] | no_license | earl-grey-cucumber/Algorithm | 1321aa94e74afdc84542944cd523b3dacfcdb43f | ae4611f181fe32e6b81a04d6661037f06c0e2008 | refs/heads/master | 2021-06-05T12:16:16.708485 | 2016-10-11T06:21:00 | 2016-10-11T06:21:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,415 | py | solution.py | class WordDistance(object):
def __init__(self, words):
"""
initialize your data structure here.
:type words: List[str]
"""
self.maps = {}
for i, word in enumerate(words):
if word not in self.maps:
self.maps[word] = []
self.maps[... |
4342e17f349a66b57564745a48527beaaf2936f4 | 4aa5665027934713bee2c1f3e6e233c286f37a2e | /shopmanagement/views(1).py | 31b117a9c630ff31e44a2aca4550a3a61942737a | [] | no_license | NikilReddyM/Inventory-Management | b03f14d9a83ac4081fcad23adcaf05181c6033ca | 38f8747a3b7f1f17aec5787fa92ef828af2fe028 | refs/heads/master | 2022-02-14T00:45:50.597547 | 2017-07-26T00:57:28 | 2017-07-26T00:57:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,979 | py | views(1).py | from django.contrib.auth.models import User
from django.contrib.auth.views import login
from django.http import HttpResponseRedirect
from django.shortcuts import render
# Create your views here.
from django.urls import reverse
from django.urls import reverse_lazy
from django.views.generic import CreateView
from django... |
9b9b259442724342e1717754da46124e5829aad8 | b19c9fe62eaa309851dc11f6fd7a05bda463fb58 | /bigfish/apps/shops/urls.py | a66c851fd5d352f3f975827b782edf51a556d5c1 | [] | no_license | hyu9999/bigfish | 3ff3b025982e71bd6dd80f60ad6c70e735e98936 | 4189fdcacc20795a4778b53c9d47d6fdd3e71811 | refs/heads/master | 2022-07-08T13:55:12.908583 | 2019-03-22T09:36:12 | 2019-03-22T09:36:12 | 177,055,829 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 760 | py | urls.py | from rest_framework import routers
from bigfish.apps.shops.views import ShopViewSet, ShopRuleViewSet, GoodsRuleViewSet, ShopGoodsViewSet, GoodsViewSet, \
GoodsTradingReportViewSet, ShopGoodsReportViewSet, MarketingViewSet, MarketingRuleViewSet
router = routers.SimpleRouter()
router.register(r'shop', ShopViewSet)
... |
7943d67377a1b0861315624682b4237316f617cd | 0902dc2e56e9f64a42fccd097e57bc219770acc3 | /reeds.py | f8e87da29568e3fff549a1e9cbf1a931d6e68af7 | [] | no_license | mmowers/bokehpivot | cc8aa682c18c2d5a32be36fb8e36cfcabb041501 | 9231ff7c75321acafa20ac62df9dbe658b5a92de | refs/heads/master | 2021-01-20T00:09:27.577133 | 2020-03-26T15:52:40 | 2020-03-26T15:52:40 | 89,084,488 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 99,114 | py | reeds.py | '''
ReEDS results metadata and preprocess functions.
When adding a new ReEDS result and associated presets, this should be the only file you need to modify.
There are three sections:
1. Preprocess functions: Only needed for a result if the gdx data needs to be manipulated
2. Columns metatdata: This allows column valu... |
8fe05b8dc18584f821299395e7070bcf00c3a140 | e94ed5b09178bcd446c697261b24e68bcfc294b2 | /Log-analysis-master/main.py | fd0c1ba269c752b9999ce596771ccb19d0af2092 | [] | no_license | yihuahuahua/Log-analysis-master | 1811d8c4354fd27128ac49a33bf4bc82ee381b7a | 5eef8b0a5e004eb036e6c5b0909685566b533677 | refs/heads/main | 2023-04-24T06:51:42.973315 | 2021-05-02T11:41:35 | 2021-05-02T11:41:35 | 353,944,123 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,931 | py | main.py | from core.coreApi import *
import shutil
import datetime
def setLabel():
# 开始预处理标签日志
waflog_txt_to_csv("../log/txt_base_attack_label_log/", "../log/csv_base_attack_label_log/")
waflog_csv_to_sortip_csv("../log/csv_base_attack_label_log/", "../log/csv_sortip_attack_label_log/")
def mainFun(time1... |
06b26af12b8b5f5485a870b2ba4a70aae47bb059 | b7e5db3abc0aa2e60972cae662bdb01860ccc2e3 | /models/__init__.py | df0136c62e0088b31fa3fd100f9ebd4caa841752 | [] | no_license | danluzhen/Rapimando | ae5ceef9a33b4ea060cea85fe7bd9f87597b0a21 | 8ff25626c1d467fba542f70d1729078252b786b8 | refs/heads/master | 2016-08-11T13:34:36.178957 | 2015-05-29T17:54:46 | 2015-05-29T17:54:46 | 36,520,281 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 203 | py | __init__.py | # -*- coding: utf-8 -*-
from user import User
from price import Price
from site import Site
from tracker import Tracker
from gift import Gift
from delivery import Delivery
from account import Accounting |
32349d0cd0534d213e81008d1e4578d9c365d211 | 6fe5e6f6f6a7c47f2149231e67037e8a4f4bd254 | /getFiles.py | 0cb567bf4d6cff61cfe6c5e75d972bfe71efd9a9 | [] | no_license | maxwell-schwartz/SubprocessTest | 26eac9f30fd555895853d4c1b3cb04a53b019c30 | dc59db425445fc9d8557466be985f8bb7fb4763f | refs/heads/master | 2021-01-22T21:32:19.021720 | 2017-03-19T00:03:55 | 2017-03-19T00:03:55 | 85,439,792 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 303 | py | getFiles.py | # Find all txt files. Send to readIn.py
from subprocess import check_output
def main():
files = check_output('ls | grep .txt', shell=True).split()
files.remove(b'outfile.txt')
for f in files:
f = f.decode("utf-8")
check_output("python3 readIn.py " + f, shell=True)
main()
|
58d4c8c7dcd661a1d0e2876edf12f7069fee69ea | 50b35bd81996df542e0bafdf0beedf665a6def1e | /3. introduction/python.py | aa78a8ee14fcb454b00b78d4a61fbe5a7d206b7f | [] | no_license | foxsir/python-official-tutorial-code | 86a3f5d86a6e53a2a0986d7aedb39aa95e452e19 | e424faa13ed84ca11ea12c280c8efdb55ce9095b | refs/heads/master | 2023-03-31T21:28:19.385529 | 2021-04-05T10:41:29 | 2021-04-05T10:41:29 | 354,799,884 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 471 | py | python.py | print(1-1)
print(1+1)
print(5 ** 3)
print(len("abc"))
print("s" * 2) # 重复字符串
print('un' + 'ium') # 重复字符串 必须是python3才支持
print('Py' 'thon' 'Py' 'thon')
word = (
'Python'
'Python'
'Python'
'Python'
'Python'
)
print(len(word))
print(word[0])
print(word[-1])
print(word[-2])
print([1, 4, 9, 16, 25][-... |
7766976897766ce79819f5dd5d0e9237e7f9b976 | 2bcc5f8d847f41aa80a8b86153f2a8cabd86821d | /Array/oneweek.py | b451a7899e836bf4f96f5a9ecd89902aa7838aaa | [] | no_license | AmberJing88/algorithm-datastructure | e3395c842315056ceef90250e9183426ec0346b9 | cf2f714586f56890b1fb16e6952c7eb5ca4e4f81 | refs/heads/master | 2021-07-10T05:38:50.018422 | 2020-11-24T19:22:51 | 2020-11-24T19:22:51 | 218,761,965 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,139 | py | oneweek.py | #283
def movezeros(nums):
i = 0
for n in nums:
if n != 0:
nums[i] = n
i += 1
nums[i:] = [0]*(len(nums)-i)
#566
def reshapematrix(matrix, r, c):
temp = []
for n in matrix:
temp += n
reshape = []
if r *c == len(temp):
for j in rang... |
d496aa6ec0fb37df4fa855e978bb0b21bd14f1e7 | 2dd26e031162e75f37ecb1f7dd7f675eeb634c63 | /examples/nlp/spellchecking_asr_customization/create_custom_vocab_index.py | 68c55ff51a4fbb5d8157bd85931bb5ba3867d5b8 | [
"Apache-2.0"
] | permissive | NVIDIA/NeMo | 1b001fa2ae5d14defbfd02f3fe750c5a09e89dd1 | c20a16ea8aa2a9d8e31a98eb22178ddb9d5935e7 | refs/heads/main | 2023-08-21T15:28:04.447838 | 2023-08-21T00:49:36 | 2023-08-21T00:49:36 | 200,722,670 | 7,957 | 1,986 | Apache-2.0 | 2023-09-14T18:49:54 | 2019-08-05T20:16:42 | Python | UTF-8 | Python | false | false | 2,914 | py | create_custom_vocab_index.py | # Copyright (c) 2023, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
68c3996084b78647d38855141cf2f39651b299ed | 7c1badc28768370bca5782e3d540984b80aac3ed | /spider01.py | e073fa037d05fb2d662e9f8eac566706770e6336 | [
"Apache-2.0"
] | permissive | luckyTang168/spider_study | 1b66f712c57e3ddf97d1e08bf5d375f1f79ce469 | d0534c28f784f553924137d98c60c8a0198f8c8d | refs/heads/master | 2021-05-29T22:30:14.525296 | 2015-04-27T16:27:54 | 2015-04-27T16:27:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 558 | py | spider01.py | import urllib2
import random
url = 'http://cn-proxy.com/'
iplist = ['124.88.67.40:80', '183.131.144.204:80', '27.202.2.136:80']
##设置代理
proxy_support = urllib2.ProxyHandler({'http': random.choice(iplist)})
opener = urllib2.build_opener(proxy_support)
opener.addheaders = [('User-Agent', 'Mozilla/5.0 (Windows ... |
9264d639bb0582dca8ace8c09dc18357eccad72f | e26855e26316ddef9d28d3e77a25fdbb87c901e4 | /tutorial/pipelines.py | 66fda597b3780ff1c3087db8d5079dce18c4db50 | [] | no_license | akens/tutorial | b741c9fca324e90bff12a7f27a65752d3cc6da24 | d27d2b857b1867ad707e8399f03b3f3d3c1d919c | refs/heads/master | 2021-09-04T00:34:10.275655 | 2018-01-13T10:53:42 | 2018-01-13T10:53:42 | 115,079,756 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,667 | py | pipelines.py | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import json
import codecs
import os
import random
from pip._vendor import requests
from scrapy import log
import MySQLdb
impor... |
53b41e320b5d1b928e4548a3aad6e4441201afab | 9a760a3d23d5bbf137e99f9199aba90869429bf8 | /src/utils/utils_db.py | 5d624f0044dc5f25cd399f4a4fe4f04e1d29828c | [] | no_license | ngarsot/Face_recongnition_Jitsi | f053b1fd04603c09b53ca0cde37dd1a31f5c7ddf | 53aa96593603768cf3fdb7f76ad6697fe42f61c3 | refs/heads/main | 2023-02-04T23:24:36.590448 | 2020-12-28T18:58:20 | 2020-12-28T18:58:20 | 314,869,021 | 13 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,014 | py | utils_db.py | import io
import os
import sqlite3
import numpy as np
from src.jitsi_app.constants import DB, DB_TABLE_NAME
# GENERIC FUNCTIONS
def adapt_array(arr):
"""
Converts from numpy array to bytes in order to be loaded into the DB.
"""
out = io.BytesIO()
np.save(out, arr)
out.seek(0)
return sql... |
d387a98d32e489b6f82588a2f742b07e58e4bab1 | d2dda11e125068512c5c0db0f24b80bc53c94ce3 | /LeetCode/Ex100/Ex189.py | debf57ba1bd922bcb984adb1227cce06c2c49f2e | [] | no_license | JasonVann/CrackingCodingInterview | f90163bcd37e08f6a41525f9f95663d5f42dd8e6 | 8f9327a1879949f61b462cc6c82e00e7c27b8b07 | refs/heads/master | 2021-09-02T09:28:34.553704 | 2018-01-01T12:05:12 | 2018-01-01T12:05:12 | 110,519,907 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 736 | py | Ex189.py | class Ex189(object):
def rotate(self, nums, k):
"""
:type nums: List[int]
:type k: int
:rtype: void Do not return anything, modify nums in-place instead.
"""
if k > 0:
nums[:k], nums[k:] = nums[len(nums)-k:], nums[:len(nums)-k]
'''
while k ... |
a54ddd30163c57f97741465c2ba0c08f4b51c634 | 0a657ed046ce71e57021ce43d17d7f5f6d913bee | /grades.py | 0ab2b6cfd9584316086f222533ed2641106a22e3 | [] | no_license | if-always/students-marks | 004af259f0e1f0787d80b10b9aeb5e086ff2fde3 | f5b2bef1c49d98f6b0d14573f6d655111074a894 | refs/heads/master | 2020-04-07T02:22:15.436717 | 2018-11-17T10:28:21 | 2018-11-17T10:28:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,659 | py | grades.py | import random
import numpy as np
import pandas as pd
origin_datas = pd.read_csv('origin_grades.csv',encoding="gb2312" )
#print(len(origin_datas))
#print(len(origin_datas["身份证"].unique())) #以身份证来看 查看是否右重复项
drop_datas = origin_datas.drop_duplicates(subset="身份证",keep='first') # 根据身份证一列去重 subset = 某一列 keep=‘first’ 保... |
05690cddea5bc62e4cac81f9491fc9356a33fdd1 | a63188692f6c9bd5a280e1bbe92e8e2d344a8b93 | /other/investing.py | dd6f582045d6ee90ee272a9cc50389753aa0f070 | [] | no_license | CP1401/subject | f4e908addbc3d7de9ed032763856a28eb7cdb850 | 44dc3d9386ed584aa1f3e1abfdc7a1741d9afbd4 | refs/heads/master | 2021-07-07T10:43:29.611485 | 2021-05-14T02:05:46 | 2021-05-14T02:05:46 | 242,705,840 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,057 | py | investing.py | """
CP1401 Do This Now - Live Session 20/10/2020
NOTE: This is not standalone 'good code'.
It's a work-in-progress developed interactively in the live session.
The intention is only as a reference for those at the session,
or for people who watch the session recording.
Simple 'investing'
get starting balance (we chang... |
8b1869c73c8b73502f19ab6abd76e7a8da3ac0e3 | b309a32e93bc2bc9a74512d42c4ceb864bd3af42 | /19/19.py | 82557295e43b2e00175da3405d14012cc15add9d | [] | no_license | pny4711/aoc2020 | 6970cab44741e16f1dc68bfa49da20c362de7692 | f05ee5da9d0c808c4fac86fa15e589498dd68073 | refs/heads/main | 2023-02-03T20:18:51.565889 | 2020-12-19T16:16:35 | 2020-12-19T16:16:35 | 322,553,787 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,332 | py | 19.py |
import re
from enum import Enum
class K(Enum):
stop = 1
single = 2
multi = 3
def create_rule(txt):
m = re.match(r"^\s*\"([ab])\"$", txt)
if m:
return (K.stop, m.group(1))
tl = [[ int(v) for v in re.findall(r"(\b\d+\b)", part)] for part in txt.split('|')]
if len(tl) ==1:
return (K.single, tl[0])
... |
0aadb26db87a6efee7630c4ecf08dd64e50b4662 | 1ace86930a048855d79daef6f9f5dfe8c7b7b05c | /ssh_clone_client.py | a757d27ffa8c8ba4a390abaf57b4e56a69e2788c | [] | no_license | RobertHostler/SSH-Clone | 110f7e212bfc508a780c35ec059e5480e8167a61 | 4fcf7ca66e8e728ac1387b4f5038fdf9579eedd9 | refs/heads/master | 2020-09-15T13:27:06.422564 | 2019-11-22T18:23:45 | 2019-11-22T18:23:45 | 223,459,096 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 525 | py | ssh_clone_client.py | import socket
def main():
host, port = "127.0.0.1", 6000
sock = socket.socket()
sock.connect((host, port))
while True:
message = sock.recv(1024).decode("utf-8")
if message == "q":
break
else:
response = input(message + "\n=> ")
if response =... |
2987dc1c26ea9ca8f78fdf680db7df4903de1a6e | 204fa141a0fc476c03c01ff89f57e98361dd1275 | /sample/wrong_way/add.py | 82b170ab00432314a8fced95abf58b8cef6b1aaa | [] | no_license | MoonTreee/ArtificalInt | 182a23a5dd7501b301607ac28bf02eb6bacf3ddf | 02c04ca4379f689850a1f45253b73d6c0b89e1a8 | refs/heads/master | 2021-01-20T01:45:46.482108 | 2017-10-30T00:45:16 | 2017-10-30T00:45:16 | 101,300,318 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 434 | py | add.py | def longestStr(lists):
length = []
res = ""
for l in lists:
length.append(len(l))
maxLen = max(length)
for l in lists:
if len(l)==maxLen:
res = l
break
return res
file = open("0830_ADD")
resu = []
lists = file.readlines()
for l in lists:
l = l.split(... |
a0149c42ef1eabd8ed0b155f6f1f84253e0064bb | 717558d6a075163294054bd5aea4ef3234df23ad | /models_nonconvex_simple/csched1.py | 0c79cd8411c439d07ad10110539d18ec2896fb3d | [
"MIT"
] | permissive | RomeoV/pyomo-MINLP-benchmarking | 1270766397fbc4e57ea1bd0c2285fb7edf64062d | 996d2c8ee1cb9b03fe00c6246f52294337d8b92c | refs/heads/master | 2021-07-11T17:54:25.284712 | 2020-08-13T23:43:14 | 2020-08-13T23:43:14 | 185,664,992 | 8 | 1 | MIT | 2019-05-10T19:07:05 | 2019-05-08T19:09:05 | Python | UTF-8 | Python | false | false | 7,664 | py | csched1.py | # MINLP written by GAMS Convert at 08/13/20 17:37:59
#
# Equation counts
# Total E G L N X C B
# 23 13 3 7 0 0 0 0
#
# Variable counts
# x b i s1s s2s sc ... |
e1950df1b95e63e2001ff8a95e01fa1f49e6587b | 97bb4cadd2430095c0adb630e54340d40014e387 | /raccoon/extensions/base.py | 74ec360e51f9a7b796272953a5b447c063a83273 | [] | no_license | adbrebs/raccoon | 0580b799487a1a0e8a4d5b6a304cbac844421023 | 2cc1e8ba5e82079a67598ad088b7dd29c94c81fe | refs/heads/master | 2021-01-18T13:00:55.815644 | 2019-06-08T14:20:43 | 2019-06-08T14:20:43 | 44,342,567 | 12 | 8 | null | 2017-08-15T18:48:36 | 2015-10-15T20:09:53 | Python | UTF-8 | Python | false | false | 5,017 | py | base.py |
class Extension(object):
"""
Extensions represent objects that perform various operations during the training process.
They can also interrupt the training process.
Extension instances are provided to a :class:`Trainer` instance. Their method `execute` is
called every `freq` minibatches by the `T... |
1a3836ce1bee2e3947362e1371e41ad5e6bf961d | 2b638ffdf18b1a37321720e919ef243ff38e267c | /rnpy.py | 4062a5ef6eab5dd7b5a303cda43c8efdbe1dfc1d | [] | no_license | iraycd/react-native-remote-component | 9ed3626bc3963faef59fb63e61effc00923841d6 | 23a631aad647d03ee8783b499363c38fe9acc7b0 | refs/heads/master | 2020-12-25T16:02:37.424388 | 2016-09-12T21:28:26 | 2016-09-12T21:28:26 | 67,871,794 | 1 | 0 | null | 2016-09-10T13:11:20 | 2016-09-10T13:11:20 | null | UTF-8 | Python | false | false | 409 | py | rnpy.py | from flask import Flask, Response
from os.path import join, dirname, abspath
from babeljs import transformer
DIR_ROOT = abspath(dirname(__file__))
app = Flask(__name__)
@app.route("/")
def home():
jsx_path = join(DIR_ROOT, 'getComponent.jsx')
javascript = transformer.transform(jsx_path)
return Response(... |
b2488ff13e23cae202a536898df934aeb7b58518 | 4679f788d672fd76d596c9dcc5d43a80de896972 | /Python/Bai_3/tinh_ket_qua_4.py | 92a57ae57cdc38874e4fd2fed2b61b6dce6af75d | [] | no_license | chibao270199/Basic | 5661600c10df602bf479c6a5ac43dfd1d8226340 | ada4de17689c30ebf4d9f9826435d995da22c4e8 | refs/heads/main | 2023-07-15T08:23:32.056553 | 2021-08-21T09:17:58 | 2021-08-21T09:17:58 | 394,172,909 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 201 | py | tinh_ket_qua_4.py | print (('Nguyễn Chí Bảo').center(78,'-'))
x = True
y = False
print ('x and y: ',x and y)
print ('x or y: ',x or y)
print ('not x: ',not x)
print ('x is y: ',x is y)
print ('x is not y',x is not y) |
6072b759600996c58385a1a42d4708804d076ecb | ec9b2072a526cc1600f04c38c358a6509b0f2643 | /food/management/commands/deliver_order.py | b399d5d5fc7124a3828bb7eda0bdb4b61ef8cc43 | [] | no_license | l0n3woof/food_delivery | 3513fcfb6a8fff93a5594c99343285020b36272c | c9f24646060467f8dc67c3497d683ae25e6d1368 | refs/heads/master | 2023-04-29T23:47:30.644995 | 2019-08-17T11:03:02 | 2019-08-17T11:03:02 | 202,865,628 | 0 | 0 | null | 2023-04-21T20:36:41 | 2019-08-17T10:14:18 | Python | UTF-8 | Python | false | false | 337 | py | deliver_order.py | from django.core.management.base import BaseCommand
from food.models import Menu, Customer, Deliver
import sys
class Command(BaseCommand):
help = 'Check current orders'
def handle(self, *args, **kwargs):
orders = Deliver.objects.all()
for order in orders:
print (str(order.id) + '. ... |
c375442f123238bbbe6b63982bad2ca260519622 | afe2998d26d665e832b40d6a84f4a432a5c88557 | /leetcode/leetcode416.py | 2444f6560fa91cfdc352777db73ff91a45e3688b | [] | no_license | Julian-Chu/leetcode_python | f91fbcd8ab2a4d900fdc6f46e46d0e8a080aae15 | 887d76e9daca4ff6d55f6611294ce2b3048acbaa | refs/heads/master | 2022-09-25T22:11:48.568183 | 2022-09-15T07:04:27 | 2022-09-15T07:04:27 | 218,396,498 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 831 | py | leetcode416.py | class Solution:
def canPartition(self, nums: List[int]) -> bool:
if sum(nums) %2 != 0:
return False
_sum = sum(nums) // 2
dp = [[0] * (_sum+1) for _ in range(len(nums))]
for i in range(len(nums)):
for j in range(_sum+1):
if j >= nums[i]:
... |
5ea492c151dd32d83c8de5136ee460b751105d53 | 6b7b332d32db0ca085efbb789ae4d89835d5c30e | /reddit_viewers_analysis.py | a96c8b42a10f65488807ecb9ad290c5d56c26a36 | [] | no_license | zcapozzi/ZackInc | 1a4028e757368aba5ba3fdf34d9ff801a5fd171c | fee804b6d913808f6dacf839f586ebb4b068e2ff | refs/heads/master | 2021-05-01T17:36:57.603762 | 2017-04-22T14:26:20 | 2017-04-22T14:26:20 | 79,524,694 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 6,193 | py | reddit_viewers_analysis.py | import time, datetime, sys, os
from time import strptime
from datetime import date
import calendar
import mysql.connector
import gc
from mysql.connector import errorcode
import requests
from bs4 import BeautifulSoup
import smtplib
import re
import httplib2, httplib, zlib, ssl
from socket import error as socket_error
fr... |
c16c99deae8c536ab243df3efff73e8a9a6c3df7 | 197d281727a261c176fbb56c6026421e9067bf66 | /proj09.py | b6c541682a818b8d337db53082cbfa579a7736e3 | [] | no_license | arthurvico/python-proj09 | 0138c3176b2a2c1592fc85f894360b3a7bff173e | eba16c16b0b38444210c6ffcc2707de712f26530 | refs/heads/master | 2020-04-28T11:40:50.706389 | 2019-03-12T16:11:19 | 2019-03-12T16:11:19 | 175,250,850 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,389 | py | proj09.py | import csv
import string
import pylab
from operator import itemgetter
def open_file(message):
'''This open_file function will have a try and except statement to open a file. It will promt a message so the user knows what file to input'''
#Create a while loop to loop is the file is not valid
while ... |
4ac9ae6c1e8483b34b3a349be7e07b1f9a299807 | 3e520b360cba2f36d853ceb64435913775c12147 | /main.py | 81c2b1557dcde2d8758f6628872f8d0e77731b81 | [] | no_license | fernando-terra/machine-learning | 4d734c904a94bd31fba940ce30af62b9e9fef57e | 0ce56b3eb076fa6c104eb9bc515607f54f80ffa7 | refs/heads/master | 2021-09-27T19:51:27.481889 | 2018-07-28T18:10:01 | 2018-07-28T18:10:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,741 | py | main.py | # Perceptron OCR Project
# Author: Fernando Terra
# Date: 2018 APR 18
import sys
import random
from datetime import datetime
#from helpers import *
class Perceptron:
def __init__(self, patterns, outputs, lr=0.5, epochs=2000, threshold=1):
self.patterns = patterns
self.outputs = outputs
self.lr = lr
self.epoc... |
2ae37138409e7fa0de8e8a8982a4c2c0d3d8b2fa | 2cba45f3fc34454a6cdd8613180ef8dacdbeb9ce | /Archive/sdmay18-31/src/front_end/ctrl_comm.py | 2335a93c9b515f0e7f6e21ba250465c3c5815e22 | [] | no_license | tdemps/CyDAQ | 98a57b2ca4f8b9b635eccb79001338ef3154df58 | 30ac8bb8ad1a6dbfa7c2181949f468213a6ae717 | refs/heads/master | 2023-07-21T12:57:18.937635 | 2020-02-10T16:54:52 | 2020-02-10T16:54:52 | 260,264,540 | 0 | 0 | null | 2023-07-06T21:43:19 | 2020-04-30T16:39:49 | HTML | UTF-8 | Python | false | false | 12,785 | py | ctrl_comm.py | import serial
import serial.tools.list_ports
import struct
import ctrl_crc
from enum import IntEnum
from mdl_firmware import mdl_fw_vals
from mdl_firmware import f_sensors
class sig_cmds(IntEnum):
"""
This class defines a table of commands that are sent between the firmware
and the front-end.
@auth... |
b8a79bc4b6d34e10295fe6b987039e7bd513dccf | fa8685c0d18c06fa2d796570b82c5021150b2371 | /boostpython/class/test/class.py | aa2fe955343adcebfb43a32eddb4057972029959 | [] | no_license | qwv/test-boost | 52407774783c913d7a3dad0498da78319be18e5e | 4300bb830ed6703108c7585d76fc5027a269770e | refs/heads/master | 2021-01-19T14:24:41.195565 | 2017-08-30T11:26:57 | 2017-08-30T11:26:57 | 100,900,246 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 88 | py | class.py | #!/usr/bin/env python
import test
t = test.World()
t.set("bom dia!")
print (t.greet())
|
becd28e98067e31e497c676f2c5945e26629d7c2 | ee56006464e725e087d4b6da8fd9e1df92d24b31 | /ml_project/src/configs/train_params.py | 14cc211cfaf11a2639d0bc2644eb21367a0de8f8 | [
"MIT"
] | permissive | made-ml-in-prod-2021/munraito | 2a5ee34ec01e11bf8a006e554dd181582dec831d | 44bf3adc3d357e8191d0ee5af4f917e71128bfb6 | refs/heads/main | 2023-06-07T12:59:41.973412 | 2021-06-27T12:59:38 | 2021-06-27T12:59:38 | 353,465,849 | 0 | 1 | null | 2021-06-27T12:59:39 | 2021-03-31T19:20:03 | HTML | UTF-8 | Python | false | false | 1,282 | py | train_params.py | from dataclasses import dataclass, field
from typing import List, Union
from marshmallow_dataclass import class_schema
import yaml
@dataclass()
class LRParams:
model_type: str = field(default="LogisticRegression")
penalty: str = field(default="l2")
tol: float = field(default=1e-4)
C: float = field(def... |
c876fcae929ca5801c733f004ac9a8ba3c695530 | 3b75f0c6e8597b5ea5b0b74a71e2812b4cdce9d3 | /freeCodeCamp/2nd/vars.py | ec778e936b96674e57173c572dbf16b5d86ebc9d | [] | no_license | Mniek/pythonLearn | 9e70522a44b36e9fc416bbca5daf51236df49403 | 90e63e922eac77cef1ff72219f8db068360c227d | refs/heads/master | 2020-08-12T17:04:40.601160 | 2019-10-13T11:46:45 | 2019-10-13T11:46:45 | 214,805,630 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 190 | py | vars.py | name = "John Smith"
age = 20
newPatient = True
name = input( "Name and surname? ")
age = input("Whats ur age? ")
newPatient = input("new patient? ")
print(name)
print(age)
print(newPatient) |
e64a6efb1c5794ea8e03d40f88d4eb1274b32dd7 | 0bb7886d11d2da050af50a0ec200f62ec379c931 | /Tic_tac_toe_board.py | 5e34ab6b0163a0c11c88140d96bad9c91ce0cb59 | [] | no_license | RoMurphy/Tic-Tac-Toe-Game | 4e09c35cd879b6f1ef2b2f6857aefe1d6795db68 | 2b9336362419c67626ef305cbe8cb37eb510fca2 | refs/heads/main | 2023-07-15T17:16:08.766752 | 2021-08-24T16:23:02 | 2021-08-24T16:23:02 | 399,532,625 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,420 | py | Tic_tac_toe_board.py | theBoard = {'top-L': '-', 'top-M': '-', 'top-R': '-', 'mid-L': '-', 'mid-M': '-', 'mid-R': '-', 'btm-L': '-', 'btm-M': '-', 'btm-R': '-'}
print("Welcome to Tic Tac Toe or x's and o's:\nYou go first!")
def printBoard(board):
print(board['top-L'] + '|' + board['top-M'] + '|' + board['top-R'])
print('-----')... |
5e9257e5831b1ace779ce29ca32adcc297263bba | b437cdb4a048713b904e9f98cdf5a3d78091354a | /lab7.py | b4922cfc5b313df0de7a5735afbdb98640901300 | [] | no_license | junah20-meet/YL1-201819 | f62c79a02177389fe3cd02fd51a4f134c9b62eaa | 9d56b9f41c54d7ec588dd907be67685b77111a68 | refs/heads/master | 2020-04-11T23:27:33.411095 | 2018-12-17T17:58:57 | 2018-12-17T17:58:57 | 162,167,695 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,979 | py | lab7.py | ##import tkinter as tk
##from tkinter import simpledialog
##
##Then when ever you want to ask the user for input use this code:
##greeting = simpledialog.askstring("Input", "Hello, possible pirate! What's the password?", parent=tk.Tk().withdraw())
##if greeting in ("Arrr!"):
## print("Go away, pirate.")
##else:
## ... |
ef6ce9a1ee64348eeaefa61570d4947f4381e6c0 | 86352f0e1af1881d77163aabce16646496b4d809 | /TestFIle.py | 9e87005c310cff0d0508cf7ad3b3bb178942fc25 | [] | no_license | Nickmcarow/HadoopLearning | 026d632677f5f01cc3ca46b9776a5b932c295500 | 7b394b6951f5adac92256f6f673403caa8b03756 | refs/heads/master | 2022-04-24T07:04:27.681377 | 2020-04-25T07:23:13 | 2020-04-25T07:23:13 | 258,711,382 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 50 | py | TestFIle.py | def test():
print("its a test for github acc") |
9d6196058c501b8c4affdadb2417aae4241b0cb5 | 86bc5ab75047c0605509468450978d1b0cd090fd | /ingestion/tests/unit/workflow_test.py | 1834513366159c10d95ca778a41ad4b674e7e157 | [
"Apache-2.0"
] | permissive | ReyhanPatria/OpenMetadata | 55bc651655c44d5a8bcd24eb632e44df8eeb9824 | 1cdc35d05a41c3572f5ec8e63b087420b8d23478 | refs/heads/main | 2023-08-27T18:15:46.400012 | 2021-11-05T06:24:53 | 2021-11-05T06:24:53 | 424,440,273 | 0 | 0 | Apache-2.0 | 2021-11-04T01:54:47 | 2021-11-04T01:54:46 | null | UTF-8 | Python | false | false | 2,976 | py | workflow_test.py | import importlib
import pathlib
from unittest import TestCase
from metadata.config.common import load_config_file
from metadata.ingestion.api.workflow import Workflow
from metadata.ingestion.ometa.ometa_api import OpenMetadata
from metadata.ingestion.ometa.openmetadata_rest import MetadataServerConfig
class Workflow... |
ddd44a92129fb7c8f8806378e614feebb4963b23 | 464850ba426263b17084fc71363ca14b8278b15e | /problem1.py | 9cbfd62d01a5c4bd63d53194cbbba2d2d0b5b890 | [] | no_license | eng-arvind/python | 8442c30ec10f979f913b354458b4f910539d8728 | 249f5f35f245a3f1742b10310de37ca6c6023af2 | refs/heads/master | 2020-12-23T06:40:16.911269 | 2020-02-02T18:42:01 | 2020-02-02T18:42:01 | 237,069,973 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 197 | py | problem1.py | def gcd(a,b):
if(b==0):
return a
return gcd(b,a%b)
n=int(input())
count=0
for i in range(1,n):
k=gcd(i,n)
if k==1:
count=count+1
print(count)
|
b6b5f10cab1829daf9cb24ea4b438353dcb92adc | ed31d0b264f64f2a816fdaa84b449f881e56873d | /assignments/01Convertidor/src/exercise.py | 1c8354c0144cdced647931bdf407b33512c9d0c1 | [] | no_license | C-MTY-TC1028-037-2113/tarea-programacion-funciones-con-condicionales-LuisDanielMtz | 2df93a75310adaac73392383d4f9d1956d2148a2 | 3fa37b0d8f549e7b9d2435c05d266cd877e90c7f | refs/heads/main | 2023-08-10T19:19:56.710225 | 2021-09-28T23:55:14 | 2021-09-28T23:55:14 | 411,471,988 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 717 | py | exercise.py | # Escribe tus funciones abajo de esta línea
def pies_cm(pies):
return pies * 30.48
def pulgadas_cm(pulgadas):
return pulgadas * 2.54
def yardas_cm(yardas):
return yardas * 91.44
def main():
# Escribe tu código abajo de esta línea
print("1. pies a cm, 2. pulgadas a cm, 3. yardas a cm")
opc = ... |
7ea0bb7494fa5601bbd47abe940bd3d9ab40281c | b48674c479a52a2b169e95565e8963586a91c314 | /models.py | 3922d1b1f2cce560fcbbd7ed38f53d2ef5c3458d | [] | no_license | mgheisar/AggNet | 65f4f7e42d14a616e9c3e6f530ce834330c2d530 | 499c13d34bb8d61d6136a90f98e0c2280e597c3f | refs/heads/master | 2023-08-14T07:46:22.830224 | 2021-09-20T09:28:30 | 2021-09-20T09:28:30 | 327,457,208 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,237 | py | models.py | import torch
import torch.nn as nn
import torchvision.models as models
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
class FeatureExtractor(nn.Module):
"""Constructs a model
Args:
emb_dim (int): Required dimension of the resulting embedding layer that is outputted by the model.... |
f936a52efc359f1f910e37bd28ab7900a5a0ff80 | b1d970bc5a5ed1ffe5a3c97629466234e90e5aca | /cart/apps.py | a3fc93d47a21bfca218b9d5b8307ca8800c73ac4 | [] | no_license | Code-Institute-Submissions/ecommerce-garden-shop | 138fe6a6089c66135565db84cfc526b37d9e0931 | f1c0052f70a9016c581e42c180cbf56d176dfdbf | refs/heads/master | 2022-11-03T17:55:41.782019 | 2020-06-09T01:56:54 | 2020-06-09T01:56:54 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 99 | py | apps.py | from django.apps import AppConfig
# Installed App
class CartConfig(AppConfig):
name = 'cart'
|
faa010a25de6d4f5f34e700adf8ce7a14a66c704 | bec0383f2afd255a72afeb9049a898615e547327 | /contrib/devtools/symbol-check.py | 14783a5bbac5974f4a05343228a6490c823891e3 | [
"MIT",
"LicenseRef-scancode-public-domain"
] | permissive | Bitcoin-ABC/bitcoin-abc | a73024a513be2c9c419f8bece06dbadde2af3fb7 | 57176a00e4d660487c41b92207da4bf27e5c0026 | refs/heads/master | 2023-09-04T11:26:24.295624 | 2023-09-01T14:24:40 | 2023-09-04T05:20:03 | 89,913,655 | 1,359 | 768 | MIT | 2023-07-19T16:41:26 | 2017-05-01T09:58:15 | C++ | UTF-8 | Python | false | false | 10,012 | py | symbol-check.py | #!/usr/bin/env python3
# Copyright (c) 2014 Wladimir J. van der Laan
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
A script to check that release executables only contain certain symbols
and are only linked against allowed li... |
6b4da6392a347f72355f456adddce42df8fa604b | a1afd68b5f69f1759b338101a30172f744e8a37d | /resids.py | f9c29439900839f65beb3e76e8a8523b8168b135 | [] | no_license | svhulse/Fourier-Analysis | 95def6e0b9ffa2a173710b155a8a8a6d303f8bad | 5d31f46ed7cd1ebe739354cb9da6bf76c3f7a04a | refs/heads/master | 2021-07-21T03:00:35.996007 | 2020-05-27T17:25:06 | 2020-05-27T17:25:06 | 175,437,081 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,010 | py | resids.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
Code used to generate figures
'''
import numpy as np
import pandas as pd
import seaborn as sns
import imageio
import os
import cv2
import csv
from scipy import misc, optimize
from matplotlib import pyplot as plt
import matplotlib.patches as patches
from numpy.fft imp... |
7ad1cec103957d2a0bfbe2c37091b6b49e0eee0d | 5625bf101d46e2cc54136cdbaefcd48dfbdbdf65 | /cmpro/apps.py | 9c3bf73a0b4911bfdaf8e44f74f048c0e2b5f933 | [] | no_license | quegai18/CMproject | 8e336365af1725f38e538eca4e231ced745c3c49 | 1a7c979d825d045e9acb6d46c8e98877263a1df3 | refs/heads/master | 2021-03-07T06:39:54.530990 | 2020-03-18T06:53:13 | 2020-03-18T06:53:13 | 245,917,200 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 85 | py | apps.py | from django.apps import AppConfig
class CmproConfig(AppConfig):
name = 'cmpro'
|
6a7320d0e8e6f44317a56266d8d27df9a69d9bad | 4015291afebfd346da3fee4b1d5a775882b5b461 | /api/specs/webserver/scripts/openapi_tags.py | de8740733dfc9679a158839e265997ef6bee6d7e | [
"MIT"
] | permissive | pcrespov/osparc-simcore | 3a8a6b5252038542f515c7e90d983ac6f1fb4de7 | eb5e00bc2cf4acfe81f5dc422a5e50a4646c9596 | refs/heads/master | 2023-08-06T04:33:38.594066 | 2023-07-12T09:47:00 | 2023-07-12T09:47:00 | 130,357,545 | 0 | 1 | MIT | 2023-04-18T08:04:27 | 2018-04-20T12:10:41 | Python | UTF-8 | Python | false | false | 1,279 | py | openapi_tags.py | """ Helper script to generate OAS automatically
"""
# pylint: disable=redefined-outer-name
# pylint: disable=unused-argument
# pylint: disable=unused-variable
# pylint: disable=too-many-arguments
from enum import Enum
from fastapi import FastAPI, status
from models_library.generics import Envelope
from simcore_serv... |
0d1b8fd6558f5f12fe87d6d9565b9da42e890184 | c904a12a6784a1dea5bb5cf20bdc75db32aae564 | /python_web/proyecto_web/documentos/admin.py | 080fde20d0ff85bb9b38675f0629e11c435df7b4 | [] | no_license | heylinc/curso-python | 779f1b267a852d3bda053b3acef19c18bfceb7de | cb4ad6ca751e8743a2cb92cd0dbf109a7af2fbc8 | refs/heads/master | 2021-01-25T06:25:11.440721 | 2017-07-18T23:19:46 | 2017-07-18T23:19:46 | 93,570,506 | 0 | 0 | null | 2017-06-16T15:24:42 | 2017-06-06T22:47:26 | Python | UTF-8 | Python | false | false | 334 | py | admin.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib import admin
#Importar modelo
from documentos.models import Documento
#crear subclase de admin.ModelAdmin
class DocumentoAdmin(admin.ModelAdmin):
model = Documento
#registrar modelAdmin para cada modelo
admin.site.register(Documento,D... |
46a398474a91157f276937ad14160403155dda89 | 1c85bf66042d1598c8734253badf052898177b34 | /compo.py | 68f4067ed6c8399bd71018d7143a514e0d11645f | [] | no_license | Haseenamenda/count | 8d3553515c3dfacfabe060523b39e206412d7b7f | 34b58c8a4494981301e5955b933a36b62433dbf8 | refs/heads/master | 2020-04-01T17:49:13.297710 | 2018-10-22T10:52:22 | 2018-10-22T10:52:22 | 153,452,779 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 112 | py | compo.py | m=int(input())
f=0
for i in range(2,m//2):
if m%i==0:
f=1
break
if f==1:
print('yes')
else :
print('no')
|
b4ea8348ffde4fda27e1578c19269638bcd32024 | dde24f70a4d7eaee810db599c379a4f83f5759d8 | /hello.py | 844cf05b8ff17abdad7da0a209188e022ed9544d | [] | no_license | davcodee/hacktober | 377c17bf6f879dfce69c3d28f6b31593bd61993c | 6114c9b6849ba799834a62de128a9dc08a204d3d | refs/heads/master | 2020-08-11T09:31:27.825266 | 2019-10-11T23:20:23 | 2019-10-11T23:20:23 | 214,540,328 | 0 | 0 | null | 2019-10-11T22:46:58 | 2019-10-11T22:46:58 | null | UTF-8 | Python | false | false | 583 | py | hello.py | def suma(x,y):
"""Esta funcion hace una suma"""
res=x+y
return res
def resta(x,y):
"""Esta funcion hace una resta"""
return x-y
def division(x,y):
"""Esta funcion hace una division"""
div = x/y
return div
def multiplicacion(x,y):
"""Esta funcion hace una multiplicacion"""
m = x*y
return m
def... |
f471d0452b097b3549a044e846ff59e12ab96b3b | ef1f55a5129119f9424a2aca44543cc1fc98fd5b | /Scripts/calc_SIV.py | 7149efcbc1bd10c9049e38fbb73be5e89b4ccea8 | [
"MIT"
] | permissive | zmlabe/SeaIceVariability | 33e99635969601f17fe4cce67e32539dcc5e7b9f | 7e9b2423c52a4d4ff5c2efe7ea80b88dbdd02ed2 | refs/heads/master | 2020-04-16T00:37:02.439234 | 2018-03-26T20:20:42 | 2018-03-26T20:20:42 | 68,020,882 | 11 | 4 | null | 2017-10-22T18:28:03 | 2016-09-12T15:17:30 | Python | UTF-8 | Python | false | false | 12,647 | py | calc_SIV.py | """
Script calculates SIV time series
Notes
-----
Source : http://psc.apl.washington.edu/zhang/IDAO/data_piomas.html
Author : Zachary Labe
Date : 12 September 2016
"""
### Import modules
import numpy as np
import matplotlib.pyplot as plt
import datetime
import read_SeaIceThick_PIOMAS as CT
import read... |
230aa4e21b9a83b43f50e5d15f6dca3adbf050a1 | 7b9c85a331256add7d12b74f30a42d6dc5a4fe01 | /FinTechExchange/Exchange-Dev/DevPy/expit.py | acbb5fece18cf72bed0d60f973fbfad885419c38 | [
"MIT"
] | permissive | HomeworkNJU/Homework3 | 6288fb2c1b6887f5c4fa872e2422a46bbd0883f2 | 718fdbd855f6d0c602a295277da49d0795b187ca | refs/heads/master | 2022-12-10T18:50:29.973206 | 2018-06-04T08:27:30 | 2018-06-04T08:27:30 | 131,717,486 | 0 | 7 | null | 2022-12-08T02:11:56 | 2018-05-01T13:41:25 | CSS | UTF-8 | Python | false | false | 286 | py | expit.py | class Order:
def __init__(oid,tid,otype,):
class Trader:
def __init__(tid,balance,sotcks):
#int tid, int balance, dic stocks
self.tid=tid
self.balance=balnace
self.stocks=stocks
def __str__(self):
print()
def buy(self):
|
24ebe5363e3f4e93bc3a6c1fd9f1b1d9c0d0a6f5 | 1f0d07305d6caac5bd74d291e104487a87f72c98 | /app/controllers/loginPersonasControllers.py | 61dbcbe9eb538052df13c736366d0340cf21fb35 | [] | no_license | deandre5/proyectoFinal2.0 | 06da61469970e116dcd57b936dbc7fe2c06987f5 | dfdb02e089681392c7c8d7ca0b24afe63ac540d7 | refs/heads/master | 2023-03-28T06:54:05.812998 | 2021-03-29T02:36:27 | 2021-03-29T02:36:27 | 349,779,333 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,330 | py | loginPersonasControllers.py | from app.model.PersonasModel import Personas
import bcrypt
personas = Personas()
class LoginPersonas:
def login(self, content):
password = content.get('password')
correo = content.get('correo')
login = personas.select(correo)
diccionarios = {}
print(login,"*/-*/*-/-*/-... |
2e647e3a4a63408b2a4db249beff7e40d9dcffff | 2ddbe0b310dd2ce86277c484844e5a534d3adac5 | /bot/cogs/trivia.py | 631c75ad806040db0d6ff008ad6b0099dc27f548 | [
"MIT"
] | permissive | keerthan0/Friendo_Bot | 862db56f308fa3e31922c4600e462cf2c1aa0772 | 05cf46fe02147b99718a348ced205db32b991064 | refs/heads/master | 2022-12-25T21:46:06.145185 | 2020-10-10T05:45:08 | 2020-10-10T05:45:08 | 302,822,684 | 0 | 0 | MIT | 2020-10-10T05:45:09 | 2020-10-10T05:30:04 | Python | UTF-8 | Python | false | false | 10,968 | py | trivia.py | """Commands for the events module"""
import discord
from discord.ext import commands
import json
import urllib.request
import random
answers = []
tokenID = ""
amounts = {}
userAnswers = {}
class TriviaCog(commands.Cog):
"""
Commands for the Trivia Questions
"""
def __init__(self, bot):
self... |
d34a2a8bb8440ad6a5cd670efbbdc3366328b62f | d85a26d336fd127fd002e661ac6442bd915bf3ea | /bonobo/examples/types/__main__.py | 3d1549fafc4fc947b8b13601b5ffef0254348922 | [
"Apache-2.0"
] | permissive | uduse/bonobo | e2f1addee253fc4798ef854dc89a39c7a4deaa36 | 4247f17d381161dfe26a9d294dfa33594338cf38 | refs/heads/master | 2021-08-28T06:42:10.700541 | 2017-12-11T12:50:36 | 2017-12-11T12:50:36 | 113,858,232 | 1 | 0 | null | 2017-12-11T12:50:37 | 2017-12-11T12:47:37 | Python | UTF-8 | Python | false | false | 73 | py | __main__.py | from bonobo.util.python import require
graph = require('strings').graph
|
e1f29b16383184efbc8fb6aefd5717bcd0f0dbc7 | def5e4e8ec0cdfd60885c2e4c63dd2e0d5101018 | /codes_stitched_cube/sii_line_ratio.py | 32e6d6a519b38ce7db1fbb0e80bc4ee06e4222ea | [] | no_license | bajoshi/taffy | f276c352b16a73212a02b8cf0eea78811f2734e9 | a74a8d0a7ad8a60f5cbf8956b62112d1197a7299 | refs/heads/master | 2021-01-19T21:32:02.967799 | 2019-04-27T21:10:23 | 2019-04-27T21:10:23 | 88,660,345 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,288 | py | sii_line_ratio.py | from __future__ import division
import numpy as np
import numpy.ma as ma
from astropy.io import fits
import os
import sys
import matplotlib.pyplot as plt
home = os.getenv('HOME') # Does not have a trailing slash at the end
taffydir = home + '/Desktop/ipac/taffy/'
taffy_extdir = home + '/Desktop/ipac/taffy_lzifu/'
... |