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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
99a69b5e813c8f40f57832b85d5bca2d1963a8a0 | 6ed9ae875453898edc101b6aa04445a016221b65 | /source code/226. Invert Binary Tree.py | aadf5de5b8a768ac9a71b11061584a9c3460b139 | [] | no_license | zz-zhang/some_leetcode_question | a5e7f2e8bb6e9881a61c2ea0bbfd457e38eb5be2 | a8b782069b47aa9fcf3c7c45b82d38d5d21b186b | refs/heads/master | 2023-07-20T07:28:10.489776 | 2023-07-20T02:40:06 | 2023-07-20T02:40:06 | 175,113,262 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 614 | py | 226. Invert Binary Tree.py | from utils import TreeNode, drawtree
from typing import List, Optional
class Solution:
def invertTree(self, root: Optional[TreeNode]) -> Optional[TreeNode]:
self.invert(root)
return root
def invert(self, node):
if not node:
return
node.left, node.right = node.right,... |
12bc6c694f2512c857684ac8238bf533a5610c62 | b1be4fc45e0447939e1816af4ff77d110f73799a | /soccer/gameplay/plays/offense/basic_distract.py | 4ab73c3161645b100c575ce176a93ce0aa84f77c | [
"Apache-2.0"
] | permissive | wcn2018/robocup-software | 007a44aff75b7417bd56c7e31cd0493700ad2d73 | 66ce39795cc3ca21f572fb8934d46c8a58a8bfda | refs/heads/master | 2020-03-29T20:58:27.176738 | 2019-01-22T23:52:36 | 2019-01-22T23:52:36 | 150,341,843 | 0 | 0 | null | 2018-09-25T23:38:30 | 2018-09-25T23:38:30 | null | UTF-8 | Python | false | false | 4,876 | py | basic_distract.py | import main
import robocup
import behavior
import constants
import enum
import standard_play
import evaluation.ball
import evaluation
import evaluation.passing_positioning
import tactics.coordinated_pass
import tactics.defensive_forward
import tactics.simple_zone_midfielder
import skills.move
import skills.capture
cl... |
7431a783cd5888e37f7d7313aa8ed57943093ba4 | 528def9844f2ce13e6a358938b0b560945ab2248 | /fm/migrations/0039_event_start_repeat.py | 26da4ac2ac38cc6c57eb5c4e2538b21eec5b4b6f | [
"BSD-3-Clause"
] | permissive | skripkar/noc | 055afbd42ab4c447d05d2cde0a822916f9e0844e | df193b99e478fe39157c8d27ff4098262d9cb734 | refs/heads/master | 2020-04-10T12:53:09.602779 | 2018-12-08T07:50:30 | 2018-12-08T07:50:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 708 | py | 0039_event_start_repeat.py | # -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (C) 2007-2012 The NOC Project
# See LICENSE for details
# ---------------------------------------------------------------------
class Migration:
def forwards(self):
from noc.lib.nosql import get_db
... |
60430c70e0ca84f328854dc257bb565345bf3599 | 1596503a49c42f10b1d8dbf17ff9e079b38f790e | /tests/unit/test_placeholder.py | 5b65497c8dfe1199b3dcddbd1d2debf13b6a6ebd | [
"MIT"
] | permissive | djpugh/docserver | 538f8282f2790a573b9eba50c796d63b1613b057 | 8b272ae8fe75b4773da6111a074a141bcf4698c9 | refs/heads/main | 2023-08-08T08:23:32.016102 | 2021-05-31T12:05:05 | 2021-05-31T12:05:05 | 187,671,608 | 1 | 0 | MIT | 2023-09-04T15:06:21 | 2019-05-20T15:53:52 | JavaScript | UTF-8 | Python | false | false | 117 | py | test_placeholder.py | import unittest
class PlaceholderTestCase(unittest.TestCase):
def test_x(self):
self.assertEqual(1, 1)
|
a23e68ab7e55b439a869dbbab023d2a10be6e520 | e3cc701df74a6374ca7fb6f29b27c0d4d8a7ca15 | /examples/testdrive.py | 2610911aae8431ba30972997bd9e44234e3a3f0e | [
"MIT"
] | permissive | jeremyschulman/netbox-pyswagger | 6e779befe854be44b2ed52d51612f7d2fbc9e9b2 | b5e795e588837eb5fe4ee981e9f969b1fbb79067 | refs/heads/master | 2021-05-09T10:34:55.415053 | 2019-03-13T22:48:12 | 2019-03-13T22:48:12 | 118,967,890 | 19 | 5 | MIT | 2019-03-13T22:48:13 | 2018-01-25T21:08:04 | Python | UTF-8 | Python | false | false | 394 | py | testdrive.py | from __future__ import print_function
import os
import sys
from netbox_pyswagger.client import Client
server_url = os.getenv('NETBOX_SERVER')
if not server_url:
sys.exit('NETBOX_SERVER not found in enviornment')
netbox_token = os.getenv('NETBOX_TOKEN')
if not netbox_token:
sys.exit('NETBOX_TOKEN not foun... |
d29ea096a8010950d399d738a63d6cfb4ae7c838 | 931a3304ea280d0a160acb87e770d353368d7d7d | /vendor/swagger_client/models/get_characters_character_id_ok.py | 35952c154a6223350b5772a5c1553c4d9b47e773 | [] | no_license | LukeS5310/Broadsword | c44786054e1911a96b02bf46fe4bdd0f5ad02f19 | 3ba53d446b382c79253dd3f92c397cca17623155 | refs/heads/master | 2021-09-08T00:05:26.296092 | 2017-10-24T07:01:48 | 2017-10-24T07:01:48 | 105,143,152 | 0 | 1 | null | 2017-11-03T14:29:38 | 2017-09-28T12:03:19 | Python | UTF-8 | Python | false | false | 10,761 | py | get_characters_character_id_ok.py | # coding: utf-8
"""
EVE Swagger Interface
An OpenAPI for EVE Online
OpenAPI spec version: 0.6.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class GetCharactersCharacterIdOk(object):
"""
NOTE: This... |
e1d94fdec5d2310d15062b01cbd048a9f4f4007f | 22f2a7107a66ee93fdd6b53bd93337360c44a9b5 | /strings/buddy_strings.py | f9edf1dbd96641b2176c63a5b5e0cf8e41c3fd34 | [] | no_license | pradeepmaddipatla16/my_problem_solving_approach_leetcode_medium_hard_problems | 2ea0c3f0f7c5b81afb82d59ef467e3fbd4d4f469 | bff7ba03441bba2179acb285f62206fafcb031c5 | refs/heads/master | 2020-04-30T07:57:15.497033 | 2019-03-20T09:37:06 | 2019-03-20T09:37:06 | 176,700,672 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 482 | py | buddy_strings.py | #import itertools
def function1(A,B):
if len(A)!=len(B):return False
if A==B:
seen = set()
for each in A:
if each in seen:return True
seen.add(each)
return False
else:
pairs = []
for a,b in zip(A,B):
if a!=b:
pairs.a... |
a1f34ad6e23d33ab258f6a31b2485b93599f5dda | c73ebefcc11b207d64d800545c5516e24df2cdb3 | /getnunny/accounts/migrations/0001_initial.py | 41c371cde5cec7ced83712f43a8d8fd4cc79c25e | [] | no_license | Dlelo/getnunny | c0077b39c3a9865d8f65a6ff025c2b42b60c264e | c21629a6ea517dccee0e799a0736ad88f221bf65 | refs/heads/master | 2021-07-15T22:54:34.773351 | 2021-05-18T16:29:15 | 2021-05-18T16:29:15 | 248,121,360 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,400 | py | 0001_initial.py | # Generated by Django 3.0.3 on 2020-06-24 02:50
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Nunny',
fields=[
('id', models.AutoField(au... |
419a06f31ab75cf9356f40444fa14e94e5c5f1c2 | 94af8ced6125bb9ab1d74e21703ee72e162a1df8 | /fenics2d_ss.py | 63aeb8152db3d731bf747734aa452c407ac63a87 | [] | no_license | mmasenlle/welding_transfer_functions | cdea156f94caa1d12cae790038b99097defe696d | 73b676cf96e697d571c602ef2c266a3006c36a35 | refs/heads/master | 2023-05-31T05:58:15.594767 | 2021-07-08T09:33:23 | 2021-07-08T09:33:23 | 259,643,292 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,660 | py | fenics2d_ss.py | from dolfin import *
import numpy as np
# Create mesh and function space
mesh = RectangleMesh(Point(0.0, 0.0), Point(.16, .04), 64, 16)
# np.save('mesh_X',mesh.coordinates())
# np.save('mesh_cells',mesh.cells())
V = FunctionSpace(mesh, "CG", 1)
# Sub domain for Dirichlet boundary condition
class DirichletBoundary(Su... |
1de0ff7a2b82e3f2d26e9c58400cdbb4c7b3a33e | fce81b804cae23f525a5ad4370b684bf0dc531a5 | /numpy/lib/_nanfunctions_impl.py | cf55a842a38295f056d23fa193852d1f1566acfc | [
"Zlib",
"BSD-3-Clause",
"MIT",
"Apache-2.0"
] | permissive | numpy/numpy | ba2abcc1d2d46affbb6aabe5aed6407b4b57507e | dc2ff125493777a1084044e6cd6857a42ee323d4 | refs/heads/main | 2023-09-05T10:10:52.767363 | 2023-09-04T18:03:29 | 2023-09-04T18:03:29 | 908,607 | 25,725 | 11,968 | BSD-3-Clause | 2023-09-14T21:26:09 | 2010-09-13T23:02:39 | Python | UTF-8 | Python | false | false | 66,514 | py | _nanfunctions_impl.py | """
Functions that ignore NaN.
Functions
---------
- `nanmin` -- minimum non-NaN value
- `nanmax` -- maximum non-NaN value
- `nanargmin` -- index of minimum non-NaN value
- `nanargmax` -- index of maximum non-NaN value
- `nansum` -- sum of non-NaN values
- `nanprod` -- product of non-NaN values
- `nancumsum` -- cumul... |
b8fe2b5329cad41205ebfa78d752b6d1c994439c | 6679ab23bf4f0100eb07cf13be21a8c1b1ae4c1f | /Programers/Lv_2/b타겟_넘버/타겟_넘버.py | cdc0b481d1c253754c201246b41cd71dcde36ce2 | [] | no_license | gimquokka/problem-solving | 1c77e0ad1828fa93ebba360dcf774e38e157d7b6 | f3c661241d3e41adee330d19db3a66e20d23cf50 | refs/heads/master | 2023-06-28T10:19:07.230366 | 2021-07-29T11:29:26 | 2021-07-29T11:29:26 | 365,461,737 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 475 | py | 타겟_넘버.py | def solution(numbers, target):
global ans
# arr = numbers
# num = target
ans = 0
dfs(numbers, target, 0, 0)
return ans
def dfs(numbers, target, _sum, idx):
global ans
if idx == len(numbers):
if _sum == target:
ans += 1
return
# prin... |
356d9c9685137bfb22f4c339dad6f3bca8d02949 | 156286320523f5b9f34672853dbd4a1502e8f94d | /webmanager/appman/utils/uncompress.py | 6545f757f91089fae7d77f58f3500e96d26cd53a | [] | no_license | nunolourenco/wallmanager | 1fb3c202020b53682a7fd3c2fe4194cfa4ee9f05 | b385a13eeb67140a428777e9a19fa77f939a4917 | refs/heads/master | 2021-01-24T00:31:58.877075 | 2010-04-23T23:02:06 | 2010-04-23T23:03:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,063 | py | uncompress.py | import os
import threading
from django.conf import settings
from appman.utils.unzip import unzip
from appman.signals import extracted_email_signal
class UncompressThread(threading.Thread):
""" Thread that uncompresses a certain zip file."""
def __init__(self, model, instance, path):
self.model = mode... |
76f1c654142c378b4c46f96629cb907677874c1c | 95c3912ab4f0f9064584126268f6d6b7d0220dc8 | /Paths.py | 95fac616b511149177d024dc2b9fa4dd734e2d43 | [] | no_license | joubin/CVE-Parser | e7f1a1f300363aebee0174b4ea8da112efcdce9e | db117bc59716d6ff8a925aff3220853a73ed186c | refs/heads/master | 2021-03-12T21:19:29.972886 | 2018-01-10T05:16:08 | 2018-01-10T05:16:08 | 30,470,699 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 122 | py | Paths.py | import os
data = "data/"
tmp = "tmp"
cvepath = os.path.join("tmp", "text_dump")
imagepath = os.path.join("tmp", "images")
|
8d7292a349be7e49ed3e8ac8e0eb8ea6dd711cc7 | 1047a2361413c97ba1343f9569acb234b5ce8e93 | /day_4/day_4.py | 9a780bb883092f2c821ace57ba0c56f564d20729 | [] | no_license | podsi08/advent-of-code-2015 | 124c18e0993858f062556f2fdcc31a0cbd6015af | 4fd075b7010814e3b4c10701b383257015a696b9 | refs/heads/master | 2021-05-04T04:32:20.558977 | 2018-04-04T20:44:33 | 2018-04-04T20:44:33 | 120,334,091 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 540 | py | day_4.py | from hashlib import md5
def part_1(data):
result = ""
add = 1
while result[:5] != "00000":
text = data + str(add)
result = md5(text.encode()).hexdigest()
add += 1
return add - 1
def part_2(data):
result = ""
add = 1
while result[:6] != "000000":
text = dat... |
8012dfa7c1e3d6029f50d932f9bc333b978e7bba | fefbdbd30e04c21263756f70337a1654d0919875 | /mensanotify/mensa.py | 3d230b72ff002c0d129432c0c68fa9c1657eed15 | [
"MIT"
] | permissive | rmartinjak/mensanotify | 6765a9246f14906073ac91a341fc50800d4788d0 | 983d036897e710dcd13be8cbd99afa09698d36e4 | refs/heads/master | 2021-01-21T00:47:54.854539 | 2013-08-29T19:39:01 | 2013-08-29T19:39:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,231 | py | mensa.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import re
from collections import defaultdict, namedtuple
from urllib import urlencode
from lxml import etree
from itertools import chain
from datetime import datetime
import json
from mensanotify import app
import mensanotify.date
Mensa = na... |
cc5f04fb729f107499e2734e2d072af344eafe9d | 76ac1d153c4e35bb427b8de40f389ef1127c15dd | /test3.py | a0148044560cac544cdec75f9f6b5e1e4bdab6d1 | [] | no_license | bengtapig/anki_vector_ai | 077e8ff2fcd7b398d951f9c44b299bed6beca46d | 067561e8fa87319e79da6f63b2a31d907a969c68 | refs/heads/master | 2020-12-11T08:31:55.401488 | 2019-12-03T06:02:17 | 2019-12-03T06:02:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,070 | py | test3.py | from PIL import Image
import numpy as np
import urllib
import random
import time
import anki_vector
from anki_vector.events import Events
from anki_vector.util import degrees
from keras.applications.xception import Xception, preprocess_input, decode_predictions
from keras.preprocessing import image
model = ... |
c46395b6269833c7443744a284e30b9c6e1f1cfe | e4eafa4c892d69c172b4e4e8361294a077c33ffa | /deploy_analytics_engine.py | 5b4a9881c3ae6dd0c3f41dd70c27e6b6b085b3fc | [] | no_license | selfishhari/hinglish_text_mining | 665924d1ca34884fbaca584bd6a6c5e83d6ebae6 | 3db1137a7621b72425403f2c545661a8c4ee1562 | refs/heads/master | 2023-05-25T09:43:53.522254 | 2020-04-30T06:10:58 | 2020-04-30T06:10:58 | 235,792,823 | 5 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,032 | py | deploy_analytics_engine.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Apr 29 19:49:50 2020
@author: Narahari B M
"""
import time
import asyncio
from src.telegram.run_ingestion import TelegramDataExtracter
from src.text_mining.entity_extraction import EntityExtractor
from argparse import ArgumentParser
parser = ArgumentP... |
7c7fb64a5e9450696164964c9f5df826acfea56e | 4521cc168c4e0316853c6467d6b2a86acf4ecc15 | /dateTree.py | 419d61400b1170ff83e2d799d4b7668bb706fb5d | [
"LicenseRef-scancode-warranty-disclaimer",
"MIT"
] | permissive | scholnicks/scripts | c331e93bf689a6c50b20334438888ff121ea3185 | f77712d365736fa27afa652699adc87b5adbed71 | refs/heads/main | 2023-07-08T21:43:29.600665 | 2023-06-25T16:36:50 | 2023-06-25T16:36:50 | 10,440,787 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,682 | py | dateTree.py | #!/usr/bin/env python -B
# -*- coding: utf-8 -*-
#
# (c) Steven Scholnick <scholnicks@gmail.com>
# The dateTree source code is published under a MIT license.
"""
dateTree: Creates a tree of pictures separated into date directories
All duplicates will be removed.
All filenames will be converted to a... |
751fcb739c3cd86156467a8a0c9c99cacf61144d | ac402e5c1677814dee1c57f9b2a2742075820986 | /ClassificationFund.py | b66dfad81133e766b407c9367a10bbf72b605a9a | [] | no_license | linhainan/StockAnalyser | 862e105380a1034b5348a8ef7f8dbf1299938552 | b16e20e4af84a7504fc1a58332899ac96867c7be | refs/heads/master | 2021-01-22T02:33:58.045070 | 2015-07-16T04:25:01 | 2015-07-16T04:25:01 | 38,912,281 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,107 | py | ClassificationFund.py | from tools.SinaDataCatcher import SinaDataCatcher
from tools.JisiluDataCatcher import JisiluDataCatcher
from tools.FundCodeGenerator import Fundlist
import decimal
import time, threading
classificationfundlist='tools/classificationfund.list'
class fund:
name=''
code=''
parvalue=0
netvalue=0
dc=None... |
ce9beb23f85833accb61f345d62d40f92ce4e52b | 7151ed63eeee68c35cde91c73f0455bc93ff6732 | /otri/filtering/filters/interpolation_filter.py | 04ff15234406ad0e7e83d22757372187e8afe5eb | [] | no_license | OTRI-Unipd/OTRI | e7adc8b795581649299f2a3cae37c1c94bee47d4 | 5d1fce470eeb31f5cc75cadfc06d9d2908736052 | refs/heads/master | 2021-11-29T08:16:19.177633 | 2020-07-15T09:57:35 | 2020-07-15T09:57:35 | 252,655,692 | 0 | 0 | null | 2021-09-11T13:56:57 | 2020-04-03T06:58:26 | Python | UTF-8 | Python | false | false | 4,245 | py | interpolation_filter.py | from ..filter import Filter, Stream, Sequence, Any, Mapping
from typing import Collection
from datetime import timedelta
from ...utils import time_handler as th
TIMEDELTA_DICT: dict = {
"seconds": timedelta(seconds=1),
"minutes": timedelta(minutes=1),
"hours": timedelta(hours=1),
"days": timedelta(days... |
f3c6a1f89363a4c062d2eaf3de050ae282deb57d | 406651554805456664407eb2997cdba996cedee6 | /test_ifCharacter.py | c0c287538211cb2a057f048b3609abd3820e8afb | [] | no_license | UNR-Teaching/class-activity-3-pritzkow-qin3 | 6a59d23f35d29fd27cc23024b6b0c5834f6ec553 | 1b75dfc7c0091857aac746f1fa4e7b36860ac806 | refs/heads/master | 2021-01-03T03:35:13.452863 | 2020-02-12T01:53:11 | 2020-02-12T01:53:11 | 239,904,807 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,092 | py | test_ifCharacter.py | import unittest
from tictactoe import *
class ifCharacter(unittest.TestCase):
tt = tictactoe()
def test_not_chara(self):
"""
Tests a character that should not be entered
:return: Should return false because it is not a valid player
"""
self.assertEqual(self.tt.if_char... |
b551006200c1c76ffeef99e133edcf70a8ca3b1e | a59e9ffd8eece742dd93d75a278ad6793cfec666 | /matplot3.py | aca903950216fd23ae3d1eed86ce52c4f01cd5e0 | [] | no_license | sagynangare/Data-Analysis | c749f02c6e026a0b0b129aeb07585ab4521b0da5 | 260ec38380e2db65011612441a9c5a8f38083f66 | refs/heads/master | 2020-03-30T00:39:29.859264 | 2018-09-27T05:59:38 | 2018-09-27T05:59:38 | 150,535,653 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 159 | py | matplot3.py | import numpy as np
import matplotlib.pyplot as plt
x = np.arange(0, 5, 0.1);
y = np.sin(x)
z=np.cos(x)
plt.plot(y,color='m')
plt.plot(z,color='c')
plt.show()
|
23d8af47c7dc4b358c9a2d219e70a59e9d303763 | 4e76e7615ed432329bd1a66f2c9143acc116d29d | /1 Introdução a Probabilidade/1.2 Teoria de Probabilidade.py | a290cab87cd3a225446481169ec4478d82395930 | [] | no_license | pegadadigital/Probability-and-Statistics-in-Data-Science | 5de7ba466a2159954f00a0f47413b6a0ded9d970 | 22fd01c116951889d70c78f05f597416d2af9f9f | refs/heads/master | 2020-03-28T18:06:49.714999 | 2018-10-02T20:28:07 | 2018-10-02T20:28:07 | 148,854,056 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,691 | py | 1.2 Teoria de Probabilidade.py | import numpy as np
import matplotlib.pyplot as plt
# simulacao de moedas 1 e -1, cara e coroa
def gera_contagens(k=1000,n=100):
X= 2 * (np.random.rand(k,n)>0.5)-1
S= np.sum(X,axis=0)
return S
k=1000
n=100
counts=gera_contagens(k=k,n=n)
plt.figure(figsize=[10,4]);
plt.hist(counts);
plt.xlim([-k,k]);
plt.x... |
c31b5328e8af626040bf20b22f5c885bb460f788 | 878b6174b65c19b8be083c3a705219f7c6a7cc00 | /builder.py | ec4bbd88f3bb59ca38f81a4071170e16467b5693 | [] | no_license | Trietptm-on-Security/moneyshot | 0f0f4e11adbe15e5b0fd346f9ef679c379109ac9 | 0541356cca38e57ec03a30b6dff1d38c0c7dfd00 | refs/heads/master | 2018-04-13T07:15:59.548439 | 2015-06-03T10:24:30 | 2015-06-03T10:24:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,239 | py | builder.py | #!/usr/bin/python
import codelibrary
import codeparameters
import outputter
import sys
def do_build(codename, inparams):
params = { }
# parse user args
for keyval in inparams:
if len(keyval.split("=")) == 2:
(key, val) = keyval.split("=")
params[key] = val
if 'outformat' not in params:
params['outform... |
f9dd757438ff6849768ca7f2724e01f4071dd922 | c967f2cd6ef94fb5bca92730d04afa9ddd0352eb | /rates/tasks.py | 85e2a19edd1645cea8e06fd61e801170047dc054 | [] | no_license | Feduch/ExchangeRate | 5fa8f4a279ee3d13298fa3c3c7835fc414a24222 | 41d6a4af64b8b2b8e243643e532b7a04d57c9c4e | refs/heads/master | 2022-12-17T19:28:39.424853 | 2020-09-24T15:45:23 | 2020-09-24T15:45:23 | 298,270,055 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,089 | py | tasks.py | import requests
from celery.task import periodic_task
from celery.schedules import crontab
from django.conf import settings
from currency.models import Currency
from rates.models import Rate
@periodic_task(ignore_result=True, run_every=crontab(minute='0', hour='18', day_of_week='1-5'))
def celery_update_currency_rate... |
d481bbae778104523cb18cbabdf6de9dbec05e03 | 5388814400c6b07828b082f1d01f49383312b208 | /raspberry/agv_signs.py | aca4c4c3019b49f8b3f7c2f58d28e3644bb01238 | [] | no_license | Atmelfan/Kandidat | 5263bcd6dae1132cbaab1ca1ee15e96f0bf3effb | 8837697ac7943a38c11ebf594ac160588b4930a9 | refs/heads/master | 2021-03-22T03:42:06.891954 | 2017-05-19T17:36:14 | 2017-05-19T17:36:14 | 79,458,256 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,089 | py | agv_signs.py | from enum import Enum
class AGVSigns(Enum):
TYPE_GLOBAL = 0x00
TYPE_CUSTOM_AGV1 = 0x10
TYPE_CUSTOM_AGV2 = 0x20
TYPE_CUSTOM_AGV3 = 0x30
TYPE_CUSTOM_AGV4 = 0x40
TYPE_CUSTOM_AGV5 = 0x50
TYPE_CUSTOM_AGV6 = 0x60
TYPE_STATION_ENTER = 0xA0
TYPE_STATION_STOP = 0xD0
TYPE_STATION_EXIT =... |
be49656ce2239dbbbf61e3fda03cc1513111f804 | b5b92b15f1e031827f91ab5f5f0b235fb7532cf2 | /tests/support/csv_util.py | c6b8e7b8ebfa3d674c125efdf81cd450d4a1563a | [] | no_license | robsonpolicarpo/training-pybdd | b705d983a8ed58217145d0f8a01f706e310d5ed1 | 27c2d88e5b3695ec57cf92ca05a875d302b1f2b4 | refs/heads/master | 2022-11-22T16:37:37.622236 | 2020-07-22T11:26:25 | 2020-07-22T11:26:25 | 279,926,908 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,342 | py | csv_util.py | import csv
import logging
from typing import List
def write_csv(filepath: str, data: List[dict], has_header: bool = True):
header = data[0].keys()
with open(filepath, 'w') as csv_file:
writer = csv.DictWriter(csv_file, header)
if has_header:
writer.writeheader()
writer.writ... |
74fa9f1f448d0630325822a3d9ebdbe8912d502f | 820c53843e5e3974917f839300addc56afd0f15e | /hipercam/scripts/setdefect.py | 5b3ad4fce6a7f5adb9000a32f59c3a45711b62da | [
"LicenseRef-scancode-unknown-license-reference",
"BSD-3-Clause"
] | permissive | gulsumsr/hipercam | 4865b72ba3dd35c9a55f6fea373939bf6c13aab8 | 62319bacbd045cccac4037e6eada42a78d0c4c14 | refs/heads/master | 2020-11-28T22:53:00.221838 | 2019-12-10T16:02:47 | 2019-12-10T16:02:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 25,909 | py | setdefect.py | import sys
import os
import numpy as np
import matplotlib as mpl
# re-configure the cursors: backend specific.
# aim to get rid of irritating 'hand' icon in
# favour of something pointier.
backend = mpl.get_backend()
if backend == 'Qt4Agg' or 'Qt5Agg':
from matplotlib.backends.backend_qt5 import cursord as curs... |
d8b4fa952d766a4a834a6ea264a630d40a215d68 | f4f9d08499b186d2b4d71bef1d8a2237724b4e1d | /src/linear_regression.py | c6893d5faf1ee8ebbba09bc0b72daa4108e17da0 | [] | no_license | tonnamb/learn_ml_numpy | 2ebcec0a79faf8960ac0ba7c25bad4ece9a7d132 | 20c9bed302ae4d604e53b6d7b247d56a30a02404 | refs/heads/main | 2023-02-09T12:04:06.396551 | 2020-12-29T05:19:20 | 2020-12-29T05:19:50 | 315,831,886 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,515 | py | linear_regression.py | """
Linear regression implementation and demo.
Reference:
- Friedman J, Hastie T, Tibshirani R. The elements of statistical learning.
2001. Chapter 3.2
"""
import numpy as np
class LinearRegression:
"""
y = X @ beta
y.shape is (n_samples, 1)
X.shape is (n_samples, n_features)
beta.shape is (n... |
6af18998dfca9fc0ba531e2dd98de001d882c2d6 | 8dda4486d1f6fc0972e194b8fb2d39dd5c2173ac | /apps/solicitar_viaje/views.py | dff97c59e16d5b5559a11e02b76c7538f4cab169 | [] | no_license | luislata/ByCar | e3d6a111787c206c48b884b90a21a20c7c569781 | 8562a0b23884d022fb84c51554b07c9d2a9ade60 | refs/heads/master | 2021-02-18T18:53:48.638536 | 2020-03-11T20:18:47 | 2020-03-11T20:18:47 | 245,224,900 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 201 | py | views.py | from django.shortcuts import render
from django.http import HttpResponse
# Create your views here.
def index_Solicitar(request):
return HttpResponse("Encontra tu proximo viaje Aqui:_ _ _ _ _ _ _") |
6d1d387ef8bd5907b74fafbc6d3e8b6b79aa76eb | d7664ff687575918062ab179e86ab94fd9a1cb94 | /encryptor.py | 728102b9e2a0f35be21277bb5814f653fe86a594 | [] | no_license | vpamula/encryptor-decryptor | 63dd6e3990a586aec51525eb00957c3895c44716 | c71185fac78559f7e5ce0e55c2049b5cb011fbf4 | refs/heads/master | 2020-12-30T16:47:48.639930 | 2017-05-12T02:48:55 | 2017-05-12T02:48:55 | 91,035,340 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,519 | py | encryptor.py | original_alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u' 'v', 'w', 'x', 'y', 'z']
def valid(key):
for i in key:
if i is type(int):
return False
else:
return True
def flatten(data):
return [item for bran... |
35f4dacf4e4b68278c6155865411ddde068f7ef6 | 9e537a6f8925e695ea8f127764f7df7da6b32a14 | /Django/DjangoAPI/EtudiantApp/urls.py | 888b7a0531b37d595d747c26d1e596f8aae7fb3c | [] | no_license | Maryemsamout/pcd-outil--collaboratif | 959b56a78c2b67b98b7dafb1910c5d3b5e3a5f39 | 672936c7fd0f08da1132e3c516d39b7ec20f0c17 | refs/heads/master | 2023-07-03T23:11:41.862350 | 2021-07-27T11:10:33 | 2021-07-27T11:10:33 | 389,924,202 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,161 | py | urls.py | from django.conf.urls import url
from EtudiantApp import views
from django.conf.urls.static import static
from django.conf import settings
urlpatterns=[
url(r'^etudiants/$',views.etudiantApi),
url(r'^etudiants/([0-9]+)$',views.etudiant_detail),
url(r'^enseignants/$',views.enseignantApi),
url(r'^ensei... |
4ddbb48cc3a0e42fd9d3a355882e28065d9ce563 | 0a521a729c73e3e99a4b1d1f583b78e2f336effc | /class_Event.py | e878db04748333993c4fe854d5fadd2a8069bb80 | [] | no_license | dynaryu/source | d4327a8584f0a7c3e1291533f95a52b88a32e424 | 22a7b7723bbe1062face7a736ce8320456b95f86 | refs/heads/master | 2021-01-01T15:44:58.995182 | 2015-03-30T03:57:58 | 2015-03-30T03:57:58 | 32,293,343 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 5,144 | py | class_Event.py | import numpy as np
from scipy.stats import lognorm
import pandas as pd
class Event(object):
"""
class Event
"""
def __init__(self, fid):
self.fid = fid
# to be assigned
self.wind = None # pd.DataFrame
self.pc_wind = None # pd.DataFrame <- cal_pc_wind
self.pc_a... |
14e255e168b7d4bb9f2a04769744607e167dfa51 | 4f6fcd6c6b2504ba1928f061d001072a77b30f05 | /mainapp/migrations/0002_auto_20200530_1102.py | 61a0e0c4b13fdd5d563c72db073d4f158ba259c5 | [] | no_license | walgom4/globhack_deploy | 2c329a2ec5f2178b018a47fa02a07a111872b299 | 69881ec2de34c3c12059f54424ba36724d3efb76 | refs/heads/master | 2022-09-11T20:21:09.482721 | 2020-05-31T16:56:23 | 2020-05-31T16:56:23 | 268,297,089 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,506 | py | 0002_auto_20200530_1102.py | # Generated by Django 3.0.6 on 2020-05-30 16:02
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mainapp', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='area',
fi... |
a07a7379f131892df154301faa38ae7fe98090dc | a1b4b383be625539af4ff7401c778e2c91062a02 | /messagingbot.py | bbf5cd942ef5c883c8555fff564cdaa5bdeb60a9 | [] | no_license | saketora/mine | fad879ab9cd54ed2bb8a66a24df518f801f9da68 | 3103fd9cf3b73e9a0c8be7d36a1f6844754cd01b | refs/heads/master | 2023-04-07T22:16:32.359772 | 2021-04-20T15:25:54 | 2021-04-20T15:25:54 | 286,198,049 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,599 | py | messagingbot.py | from flask import Flask, request, abort,render_template, redirect, url_for
from werkzeug.utils import secure_filename
from linebot import (
LineBotApi, WebhookHandler
)
from linebot.exceptions import (
InvalidSignatureError
)
from linebot.models import (
MessageEvent, TextMessage, TextSendMessage,
)
impo... |
9f46a84298db1d15eb808cd5ea690bc1155fbe24 | 05b43806531494d0c93d85eea489d4702b81a90b | /amazon_onsite/amazon_onsite.py | ed8e332333648bfdaa0eb20dafe4843852b10aeb | [] | no_license | Czhang0727/pythonAlgro | 73e7696f5b2ae57f3de30e387fc60dc0f140d5f4 | 16d699208f3feacd7e27bb05864f8728080eaf83 | refs/heads/master | 2021-01-19T00:40:12.289359 | 2016-12-23T01:55:55 | 2016-12-23T01:55:55 | 73,115,619 | 1 | 1 | null | 2016-12-23T01:55:56 | 2016-11-07T19:59:27 | Python | UTF-8 | Python | false | false | 2,955 | py | amazon_onsite.py | # Round 1 question 1
# a robot can move 1,2 or 3 steps determine how much steps we need to go to not
def ways_of_moving(n):
if n == 0:
return 0
if n == 1:
return 1
if n == 2:
return 2
if n == 3:
return 4
dp = [0] * (n + 1)
dp [0:4] = [0,1,2,4]
for i in xrang... |
cca65a07b5bbfd0c0ffa53f8ea38cd1df1f5e703 | 819960b1484495777902519f3afdb45a9d7d4164 | /svm_classifier.py | cc92bf464e6d6c6907aafc9fa089fb1748585a92 | [] | no_license | mani447/PerceptronAlgorithm_and_SVMClassifier | a624ff0fcc34b097a05040523108cc64be2c3297 | 0c89433f7100e666092b329f93ed30584662bc0d | refs/heads/main | 2023-07-16T10:21:49.456576 | 2021-09-01T16:37:59 | 2021-09-01T16:37:59 | 402,131,770 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,930 | py | svm_classifier.py | #netid:MRM190005
import pandas as pd
import numpy as np
import math
import cvxopt
# read data from file
with open(r"mystery.data",'rb') as file:
data = pd.read_csv(file, sep=',', header=None)
#combinations
def no_of_combinations(n,r):
fact = math.factorial
n_c = fact(n) // fact(r) // fact(n-r)
ret... |
38f0e0921ef55a0f756448704fd9b1a4e16220f1 | 11b22ba54f95d095b2eed22c3d8bd8aa20f380b5 | /30 Days Code Challenge/Day 26- Nested Logic.py | b506ae11a0fc262ff7a5035723b09c21538045df | [] | no_license | CJL89/HackerRank | 19bd90abc853dd0e9296871bab4aa7f833da297d | 640661be90113b6bafedbda357373cbbf88fced3 | refs/heads/main | 2023-03-06T16:59:26.651865 | 2021-02-21T00:51:00 | 2021-02-21T00:51:00 | 317,062,111 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 342 | py | Day 26- Nested Logic.py | n = [1, 1, 2010]
nn = [31, 12, 2009]
#
# n = [31, 12, 2009]
# nn = [1, 1, 2010]
day_diff = n[0] - nn[0]
month_diff = n[1] - nn[1]
year_diff = n[2] - nn[2]
if day_diff > 0 and n[1:] == nn[1:]:
print(day_diff * 15)
elif month_diff > 0 and n[2] == nn[2]:
print(month_diff * 500)
elif year_diff > 0:
print(1000... |
aaa040b34bc08355f84555e205de05d2c056bb70 | 0f6d1c6202868678c164d233f5b76e3f5be9db14 | /daily_calib/daily_calib_daemon.py | 37e506c33a927045768fabb394498979faa7b518 | [] | no_license | madsfredslund/Tenerife-node | f2ac81b7f8eedb3e5ca6b2b906a492298a8c3cdd | c009f2b748c9b62e59745648290a32befb77a584 | refs/heads/master | 2020-05-05T02:18:59.489110 | 2019-04-12T09:26:33 | 2019-04-12T09:26:33 | 179,633,085 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 20,785 | py | daily_calib_daemon.py | #!/usr/bin/python
"""
@brief: This module runs as a daemon.
Created on the 24 Oct, 2011
@author: Mads Fredslund Andersen
"""
import time
from song_daemonize import Daemon
import os
import getopt
import sys
import daily_config
import daily_calib
import song_timeclass
import daily_logging_handler
import song_star_... |
d01c7409886aef6f2273a6c31264d9b746ec696b | 238753ae6b5842b026c4dc756c3c1acc1e97582c | /create_label_map_pbtxt.py | 7c04eb1aa3c7ef66d2d78aa2c64c5b72b8f0cab5 | [
"MIT"
] | permissive | bozcani/tensorflow-object-detection-API-training | 49e1ef9f7cd0edf697f6d3416c4b10433d756557 | 81ef8d5d915600a58a394a731ca91db787d16315 | refs/heads/master | 2022-08-25T08:12:45.982993 | 2020-05-29T13:45:59 | 2020-05-29T13:45:59 | 265,581,999 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 490 | py | create_label_map_pbtxt.py | import sys
sys.path.append("../API")
from alet import ALET
dataset = ALET("../data/ALET/new_train","../data/ALET/new_train.json")
with open('alet_label_map.pbtxt', 'a+') as the_file:
for item in dataset.categories:
the_file.write('item\n')
the_file.write('{\n')
the_file.write('id :{... |
ee1ce3ea4b31246703530478d6550b0c8866197e | 50176ff45671d159196ec35459feeda71d6a9f8e | /codes/chapter-11/eg_11-10.py | 1944ee4e5b6c745f2e78c86f91fbf698276d52dc | [] | no_license | ahddredlover/python_book | e7fe19c4b851906232022ca6838e4f45b8eb1a67 | b997c838fb9db128a9c57f713bf48e86a8f18075 | refs/heads/main | 2023-08-25T05:44:53.112903 | 2021-10-02T13:35:20 | 2021-10-02T13:35:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 521 | py | eg_11-10.py | import http.client
from urllib.parse import urlencode
client = http.client.HTTPConnection("127.0.0.1:9000")
post_data = {
"usertag": "test",
"password": '123456',
'code': "print('Hello Web')"
}
head_dict = {'Content-Type': 'application/x-www-form-urlencoded'}
post_data = urlencode(post_data)
client.request(... |
7badb7c9f1e00dfc379468b7bd73a3f09bffe6de | 7d470df915c4f9046ae6e46686b3671da28b2730 | /migrations/versions/6374505f9e6e_.py | 6e61850424ab26da27569a518e31209d72290326 | [] | no_license | ryncsn/libvirt-dashboard | 95f0f10297a4f6ba6e76521054cea97836360750 | 880adac941886a19a0c3274b32fec92fdbd0ba1e | refs/heads/master | 2020-04-15T12:44:32.856217 | 2017-05-15T07:36:51 | 2017-05-15T07:53:58 | 63,412,381 | 2 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,180 | py | 6374505f9e6e_.py | """empty message
Revision ID: 6374505f9e6e
Revises: 9dc91bb7d2ba
Create Date: 2016-11-14 10:55:08.418923
"""
# revision identifiers, used by Alembic.
revision = '6374505f9e6e'
down_revision = '9dc91bb7d2ba'
from alembic import op
import sqlalchemy as sa
import sqlalchemy.types as ty
def upgrade():
### command... |
be894830bb0dde6bacaea6be823391e0445603c3 | 1e2b95baee85f8e218027745b2080220dbf6ea79 | /listings/urls.py | 4c485fcb302ed5801d5a06a43c19475973655742 | [] | no_license | Mfuon2/btrealestate | 2423145a830d4f37d3dff4fd5f243c1223c13068 | 7eb5602c11c4c45540ad5eb373e335829bdb6de2 | refs/heads/master | 2023-01-03T15:08:27.315452 | 2020-10-30T12:56:48 | 2020-10-30T12:56:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 303 | py | urls.py | # This handle the url for routing
from django.urls import path
from . import views
# Defines views to pass dynamic data to listings page
urlpatterns = [
path('', views.index, name='listings'),
path('<int:listing_id>', views.listing, name='listing'),
path('search', views.search, name='search')
] |
89605ff723d2f78e85cae458d576494718b5d456 | 554b66792fcd9533800f13b22ae2d7371010c829 | /tests/test_inspect.py | 6d562f9a16b2af2103cc5a99d377238e91c083d1 | [
"MIT"
] | permissive | clegaspi/monty | c9a0fc879e92cd19864489fd864be642e04d1f6c | 57b8fb2fb6e40b3b9ecea283f4cfc0ec54274b2a | refs/heads/master | 2020-07-05T19:52:12.940849 | 2019-08-16T20:03:56 | 2019-08-16T20:03:56 | 202,755,230 | 0 | 0 | MIT | 2019-08-16T20:03:57 | 2019-08-16T15:42:35 | Python | UTF-8 | Python | false | false | 626 | py | test_inspect.py | # coding: utf-8
from __future__ import division, unicode_literals
import unittest
from monty.inspect import *
class LittleCatA(object):
pass
class LittleCatB(LittleCatA):
pass
class LittleCatC(object):
pass
class LittleCatD(LittleCatB):
pass
class InspectTest(unittest.TestCase):
def test_fu... |
81573b4a57f540733ff2faaf82bab78381b9dd46 | d94411c48a8b9f667af7bdb3e3f54eb4568e6fec | /argument_parser.py | 544acfb423818377ad5a335a208036fa77299e5e | [] | no_license | steven112163/DLP-project | d2cf354344cb0d86da61234bb89d562065620908 | 015c68aa46eba4e2a3877347d195122ff138b29e | refs/heads/main | 2023-06-09T05:20:30.111275 | 2021-06-29T13:29:38 | 2021-06-29T13:29:38 | 366,313,434 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,846 | py | argument_parser.py | from argparse import ArgumentParser, Namespace
def parse_arguments() -> Namespace:
"""
Parse arguments
:return: Arguments
"""
parser = ArgumentParser(description='DLP project: Stock Prediction using Transformer')
parser.add_argument('-e', '--epochs', default=10, type=int, help='Number of epoc... |
6ebf6bdfc6a4a1fe49f4eed1a2c1802f8adeef08 | 183055076dc4a6302c4e2bfd2cba6206324deda6 | /app/utils/progress_formating.py | 6ba1795f37477fe44d90d712b887035f03c284ce | [
"MIT"
] | permissive | elsargentpepper/Backend | c45d4cc917ca98a16f966bdb7eeafca562018a56 | f88cad4f1b4b45332b450730fcd0c13d19ac3ec0 | refs/heads/main | 2023-06-22T20:21:16.048722 | 2021-07-01T05:43:58 | 2021-07-01T05:43:58 | 382,082,515 | 0 | 0 | MIT | 2021-07-01T15:44:16 | 2021-07-01T15:44:15 | null | UTF-8 | Python | false | false | 697 | py | progress_formating.py | def progress_format(user):
json = dict()
json["progres_id"] = user[0]
json["percentage"] = user[1]
json["user_id"] = user[2]
json["technology"] = user[3]
return json
def progresses_format(users):
json = dict()
json["users_progresses"] = list()
for user in users:
... |
8334478c8b7fc7688477cdb837467e00e857c07c | f713a4e2cc386fff588fe63554c2809ea3409414 | /ducks/views.py | 0a46cd3b8f95b3c48c26bc1166bec06af91e2fd8 | [] | no_license | Koutarouu/Duck-Api | 896f129cd2bea871b536dfca060ab56b6fdf8730 | f402611371fd9c6e33a31cc5e2a0d8bf5a9d1b62 | refs/heads/master | 2020-03-25T00:30:26.140993 | 2018-08-01T17:53:15 | 2018-08-01T17:53:15 | 143,189,521 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 402 | py | views.py | from django.shortcuts import get_object_or_404
from rest_framework import generics
from .models import Duck
from .serializers import Duck_Serializer
class DuckList(generics.ListCreateAPIView):
queryset = Duck.objects.all()
serializer_class = Duck_Serializer
def get_object(self):
queryset = self.get_queryset()
... |
18b73a06c80272aff5c0e4b10473e95bd58466f3 | e90e8eb893ed94ddaec6068985f9ca25e3a6cbf6 | /plagiarism_lib/lsh_experiment.py | 008a3f49d78d82dfef000327fdfbd45dc07836f8 | [] | no_license | hcbravoED/data606-plagiarism-ygardiner | c5653e0f04972fb26dbfe43af192e86c4f6e30b3 | 028d2d80c5d56de01f91d7858be266516f8cdead | refs/heads/master | 2021-05-23T14:03:24.218574 | 2020-05-30T03:47:53 | 2020-05-30T03:47:53 | 253,327,898 | 0 | 1 | null | null | null | null | UTF-8 | Python | false | false | 1,311 | py | lsh_experiment.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Oct 7 07:51:26 2017
@author: hcorrada
"""
from plagiarism_lib.article_db import ArticleDB
from plagiarism_lib.minhash import MinHash
from plagiarism_lib.lsh import LSH
import pandas as pd
import numpy as np
def _read_truthfile(filepath):
with op... |
bdfd941be29a31d6c1bbedd270dadac844f49fc4 | 46d5d6fe769afb9bffe83fcf2d8940bf0757a28e | /GameSequence.py | 63ce37d5ea6ee09ee7536f00f5df876648b7f279 | [] | no_license | KevinFrazier/CitrusHack2018 | 2e2bd8adfd6214d3d70009e64d6a6e5763e2b83c | de9249dec6ed490815c7ec8c7b100095bf6538ac | refs/heads/master | 2020-03-12T08:03:33.756771 | 2018-04-22T18:33:40 | 2018-04-22T18:33:40 | 130,519,306 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,376 | py | GameSequence.py | from Player import Player
class GameSequence:
'''
GameSequence summary: Keeps track of player turn sequence and Game end
Functionalities
-start game
-must start turns
-change turns
-end turns
-end game
'''
def __init__(self, ArrayofPlaye... |
f9edbef46494cc2993c6a633fe35406524dbbf67 | 9b558ff05b1c546398b3b92be72058d62f4d22c4 | /mtots/python/parser.py | b3a13227b6b63c14d245a8c55cf84d097c2801aa | [
"MIT"
] | permissive | zjw0358/mtots | e3f4f29694b1b9ada5e512d0174c3a59a390fdb0 | b670ce6555f77fb29e2b8b1cc0c6425644574ecd | refs/heads/master | 2020-05-02T15:15:26.864441 | 2019-03-27T06:10:31 | 2019-03-27T06:10:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 366 | py | parser.py | from mtots.parser import base
from mtots.parser import combinator
from mtots.parser.combinator import All
from mtots.parser.combinator import Any
from mtots.parser.combinator import AnyTokenBut
from mtots.parser.combinator import Forward
from mtots.parser.combinator import Peek
from mtots.parser.combinator import Requi... |
22bb7f36cf2b7e5ffaa3e0e74c6a603ecb61aa6b | cadd032022add5dad63de22faa0a87e63522e2f5 | /src/mega_web/charts/chart.py | 797f113a047b22b63693919fce9c96637c658418 | [] | no_license | Captian5ye/mega | dea669f67ac4da5a4b4d1f9fc21f8233ff7a795c | 09a2753b2bc06258ebbb782d1e2ff2db606bfe6f | refs/heads/master | 2021-01-18T07:53:23.005551 | 2014-10-23T08:16:33 | 2014-10-23T08:16:33 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,419 | py | chart.py | '''
Created on Aug 19, 2014
@author: xchliu
'''
class Chart(object):
'''
classdocs
'''
def __init__(self):
'''
Constructor
'''
self.slowlog={'xaxis':[],'data':[]}
self.yaxis_name=''
self.data_list=[]
self.type='line'
self.title=''
... |
e45f295dd9ee902bd92c06838ecdd79875b74cd7 | 21b201ebf2ffbbc19fa8d74e5657e12ef597b02d | /research/slim/nets/lenet.py | 144c57a80636ca5ae458aed7b86fc775c8bfcc6e | [] | no_license | alhsnouf/model | fa619691ad9d0afc7ad849a9471e6bb0643a8d47 | 5fe429b115634e642a7469b3f1d4bc0c5cf98782 | refs/heads/master | 2021-04-12T11:16:02.150045 | 2018-03-27T15:19:18 | 2018-03-27T15:19:18 | 126,702,717 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 129 | py | lenet.py | version https://git-lfs.github.com/spec/v1
oid sha256:6cd709a6d5028962edc6dd26fd4820b46e19799691c106cf64e5a426b9f2d559
size 3843
|
066aa6ad82c05c1edf45dde0ece6662f811952c5 | 7827485dd3fbb25b7cf1545069bd017cc23b3fa3 | /gallerie/views.py | 630c87ca0c3c15a850bc07bee96c549d0cf38367 | [] | no_license | Mlapalus/bibiche-coiffure | bacb68be1a091bb4d3c7f3cad90d10e04d303909 | 30c5c2d8d26f5fcce7bc7a6a3ca4827a0c99e714 | refs/heads/master | 2021-01-01T21:39:25.199965 | 2020-02-14T18:47:36 | 2020-02-14T18:47:36 | 239,352,221 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 659 | py | views.py | from django.shortcuts import render
from gallerie.models import MyPhotoModel
from django.core.paginator import Paginator, PageNotAnInteger, EmptyPage
# Create your views here.
def gallerie(request):
photos_list = MyPhotoModel.objects.all()
pagination = Paginator(photos_list, 16)
page = request.GET.get('... |
cb9330dba9b5993799e62cbd8f9bf79ab31fe1ba | 26cbd7ee818605dd84cff4bc160124fbb477a625 | /VinVC/login/views.py | 614223e9a252e4f56bb3d61b8e9fabbfd601dd2d | [] | no_license | AIDEA775/fsociety | 5fe7df03f212bc6fd2e570ca17a4d02d1d0bcfae | c14ed5051831dfe72f49c3534c192b1fccba208d | refs/heads/master | 2021-04-03T21:51:25.326964 | 2016-11-24T13:43:31 | 2016-11-24T13:43:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,073 | py | views.py | from django.shortcuts import render, redirect
from django.contrib.auth import authenticate, login as auth_login
from django.core.validators import validate_email
from django.core.exceptions import ValidationError
from django.db import IntegrityError
from django.views.decorators.csrf import csrf_protect
from django.cont... |
d3f53275d499eb7bc5e7e3bfbfcdc5396d5386e6 | 9d71fcb69b22d873cd97bebb8b8a1d0880e881b1 | /Python 爬虫/Crawler1.0.py | 9821c4a0551f88b287c83d38f00af78722b60ebb | [] | no_license | GeekStudioHIT/PythonHack | 1307492c10e653457c578bca0b903263d1d15b71 | 079d351627325c6008ef177ca4e7ab468099fb84 | refs/heads/master | 2020-05-21T20:11:59.659198 | 2016-10-02T16:05:19 | 2016-10-02T16:05:19 | 61,989,855 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 186 | py | Crawler1.0.py | # coding:utf8
import urllib # 引入urllib库
url = "http://www.baidu.com"
content = urllib.urlopen(url) # 打开URL
html = content.read() # 读取页面内容
print html # 打印内容
|
212727736d1a3c545da03ece3d4c2f38300729ba | 93e1214ff36c8daceb2679ae660fa8992c989e1a | /system100_103/system_1_0_0.py | b5ebef19c71f5ec1983350f9bfdb735bba981c4d | [] | no_license | 1643001598/system | 3e51633d67b1fc68feb7860461e99f0b525aec3b | 2c67b3cd76220f02e6a92690e6befafddb5d7ab1 | refs/heads/main | 2023-02-26T17:07:32.523667 | 2021-01-31T13:26:37 | 2021-01-31T13:26:37 | 334,649,601 | 3 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,093 | py | system_1_0_0.py | # -*- coding: UTF-8 -*-
import start
import random
a5 = ""
a4 = ""
a3 = ""
a2 = ""
c = ''
d = ''
i = ''
f1 = {}
z_m = {1: '1'}
a100 = ['123456']
def 二元():
a1 = eval(input('a1='))
b1 = eval(input('b1='))
c1 = eval(input('c1='))
a9 = eval(input('a2='))
b2 = eval(input('b2='))
... |
53cbd194c2024ac4bd9d0633e948d07df819447c | 82f86004e1942abae609180286192b61a508f4ed | /Placeholder/Content/WinScreenLogic.py | fb3b2d5b0ba5781c2febf7b30c4a87d1673c1e46 | [] | no_license | JGreggorsEduAcc/Castellum | f40dfd72d6096f9e1b4f3291f9e80dbfafb82c77 | d7d80325d13311eb5f9e1db7abcfc2fbfa7ca998 | refs/heads/master | 2021-05-30T05:38:54.760020 | 2013-12-06T20:30:05 | 2013-12-06T20:30:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,976 | py | WinScreenLogic.py | ########################################################################
##All content (c) 2013 DigiPen (USA) Corporation, all rights reserved.##
########################################################################
import Zero
import Events
import Property
import VectorMath
class WinScreenLogic:
#Used to tel... |
6b94cdff0eb146c93256d92e78c1972b1c0c7335 | 295ef0183fa999510bdcc52caeb39c80ef37ce61 | /spider/instances/inst_parse.py | c77026d174116f240762670e57771e44d0c69f0d | [
"BSD-2-Clause"
] | permissive | Zcyd25/PSpider | f159479a2190a256765ccc04cd6e483eb71df0cc | 19c3af7a3ec340137c22b8c27b66673f42feccbd | refs/heads/master | 2022-06-14T00:11:29.243397 | 2022-06-10T02:03:10 | 2022-06-10T02:18:51 | 173,461,404 | 0 | 0 | BSD-2-Clause | 2022-06-10T03:11:01 | 2019-03-02T15:01:25 | Python | UTF-8 | Python | false | false | 880 | py | inst_parse.py | # _*_ coding: utf-8 _*_
"""
inst_parse.py by xianhu
"""
from ..utilities import TaskParse, ResultParse
class Parser(object):
"""
class of Parser, must include function working()
"""
def working(self, task_parse: TaskParse) -> ResultParse:
"""
working function, must "try-except" and ... |
40aec6dd92b24f6208de4a3013af91159244a5ad | 8890c02d049ac5d04a6a7f4f9fdbf3bf0e72e5ed | /python/pythonProject/LR_1_task_2.py | 6e9e569a9975391ad4f8af2387b63f8011d7fea6 | [] | no_license | Olga20-code/projects | 51771bb0de4d2d4e8ed1d45c48e8c9b613495d0c | 889d80514555601d026fb6aca0598f6b4b974dc3 | refs/heads/master | 2023-07-06T13:51:47.040787 | 2023-06-29T20:26:05 | 2023-06-29T20:26:05 | 225,637,239 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,150 | py | LR_1_task_2.py | import numpy as np
from sklearn import preprocessing
input_data = np.array([[1.3, 3.9, 6.2],
[4.9, 2.2, -4.3],
[-2.2, 6.5, 4.1],
[-5.2, -3.4, -5.2]])
data_binarized = preprocessing.Binarizer(threshold=2.0).transform(input_data)
print("\n Binarizad d... |
d45f6438150530e15d72274b040ab3fd03d7fa6f | 16eeaea8e2c299f77ea8ecaf82e6d6490a924ba7 | /test.py | 4e0873b2ea230f64baf6a197e0500b230e39dee1 | [] | no_license | DBegrajka/Calculate-Average-Grades-ACA | fb65022f8b5bfdcdc3e1f88a168bfb9dc1ceaa9d | e5b5b506afc51fa238b45d291f0b0be2520396b5 | refs/heads/master | 2021-02-28T11:15:17.431944 | 2020-03-07T19:21:17 | 2020-03-07T19:21:17 | 245,691,487 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 344 | py | test.py | import csv
def test(str):
f= str
with open(f) as csvfile:
reader = csv.DictReader(csvfile)
for row in reader:
print(row)
print(row["Student Name"], row["Grade"])
if __name__ == "__main__":
test("ClassA.csv")
test("ClassB.csv")
test("ClassC.csv")
... |
66f55ef0157352afb37bd2d0e7247f8cf5db06fb | d3a7e1d48aebda9809f7cd4f811133ba9cbe2372 | /miscellaneous/extract_modified_blend_shapes.py | d7a39f3f225b0dc1655dd1d856a1df875aa2adee | [
"MIT"
] | permissive | Hengle/maya-scripts | d7732d8c27eefd3be16a223756a9a49f9c1f2048 | 80840520924c8e6087cd6e3e1be6e4c5d663297b | refs/heads/master | 2023-07-16T01:31:08.917285 | 2021-08-17T21:27:06 | 2021-08-17T21:27:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 771 | py | extract_modified_blend_shapes.py | """
Extract Blend Shapes After Non-Deformer History
@Guilherme Trevisan - github.com/TrevisanGMW - 2020-12-15
1.0 - 2020-12-15
Initial Release
"""
import maya.cmds as cmds
selection = cmds.ls(selection=True)[0] # Uses first selected object
history = cmds.listHistory(selection)
my_blendshape_node... |
c3209fcb92b7fcde39c1f93ba1917b5d84bdc522 | 9b86e6eb9e88fb772f491deb978b5bfd99c69267 | /CodeDemos/Lab9/program1.py | 49f39421c744b1ed4970408f5c31598f43585ea6 | [] | no_license | AaronLack/C200 | 0e6a324b5f8b645506cf474be5a33755f8a7f483 | ae4d4c7cf8048dd55a04b5d643c68e051b989b00 | refs/heads/main | 2023-05-01T04:43:23.287997 | 2021-05-14T22:06:56 | 2021-05-14T22:06:56 | 367,488,435 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 174 | py | program1.py | lst = [[1, 2], [3, 4], [5, 6], [7, 8]]
def magic(x):
s = 0
for y in x:
z = y[0]
s += z
return s
if __name__ == '__main__':
print(magic(lst)) |
a034470956895aedb7ff7bbe0fbb7b2141fd969c | 320233e5ad0a0849b981cb51e3d2e3433fdd560b | /MovieInfo.py | c3f28ba2aef243a5ceffbcbfc9fd9b4939c553cb | [] | no_license | maxlewis92/StarTracked | 3158a9065724463507e5bb97dbc3c5c0b646aa8a | 712dc15bef5a4f89f4b592a8acfec7af8fe62fed | refs/heads/master | 2021-07-14T20:42:05.901485 | 2017-10-17T01:35:23 | 2017-10-17T01:35:23 | 107,200,166 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,011 | py | MovieInfo.py | import imdb
ia = imdb.IMDb()
movie = raw_input('What movie? ')
print("\nResults:")
result = ia.search_movie(movie)
for item in result:
print(item['long imdb canonical title']+" | ID:"+ item.movieID)
print("\n\tIMDB ID of first result ("+result[0]['long imdb canonical title'] + "): "+result[0].movieID)
print("\n\nCa... |
12aff8a4a611ccd5f161768de2915a11264d4346 | 5591c95b45f814d482eb039b4d92193b30b0f9d8 | /Pipeline/Tools/Tools.py | 754702153789115f7a1c3eec90dcd30b7c110a10 | [] | no_license | johndpope/echo_production_pipeline | 02b34c5f9ff18988801acef40ed5ad2884026960 | 79baba44528abd7e8bacbcdcb383b68dcf639a3e | refs/heads/master | 2021-01-16T01:48:18.875186 | 2020-01-27T15:59:36 | 2020-01-27T15:59:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,297 | py | Tools.py | from Pipeline.Configuration.Configuration import configuration
from datetime import datetime
from time import time
import traceback
import pickle
# Decorator tools:
def monitor_me(
monitor = configuration['monitor_me']['monitor'],
verbose = configuration['monitor_me']['verbose'],
sta... |
ab7d0096ff324c240e4660d6c135bf89d1db13e3 | c09995b1cffe0ee79dd1a8a699483845d206a40a | /prob28.py | 4ea85cd402ee3377bf137e6fbf22336406d974ec | [] | no_license | anshuman2197/Python-Internshala | b0b485aaef711a280aad943d2cf561f29be2ad2f | 85021bf8358a40cde2690ed6f701c68e899ed8a7 | refs/heads/main | 2023-06-13T07:01:11.752478 | 2021-07-09T16:58:02 | 2021-07-09T16:58:02 | 327,234,720 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 373 | py | prob28.py | class Student:
def check(self):
if self.marks>=40:
return True
else:
return False
def __init__(self,name,marks):
self.name=name
self.marks=marks
student1=Student("Harry",85)
student2=Student("Snam",40)
pass_fail=student1.check()
print(pass_... |
5d5a06718121751f4ef8b7a735bac89b732c40e5 | ecdb17e7f4b12e1838880c85fde9ec0ac24fe86e | /wagtail_localize_git/apps.py | c898533eaee6c3e67fc8cc290c2cbc7ea10f6bf4 | [
"BSD-3-Clause"
] | permissive | BackBayRider/wagtail-localize-git | 197dfe7b8935d0271622633622ca282bbd17822e | 1a19a6ea2e859baf723a071dcb5bf2841f828ae7 | refs/heads/main | 2023-08-25T15:27:53.518828 | 2021-09-28T13:50:18 | 2021-09-28T13:50:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 205 | py | apps.py | from django.apps import AppConfig
class WagtailLocalizeGitAppConfig(AppConfig):
label = "wagtail_localize_git"
name = "wagtail_localize_git"
verbose_name = "Wagtail Localize Git integration"
|
0abcb1472830217ac2259e15c6ab2e0ed2d5256e | 1caa72211e69d203707c3b8add5e229a124193c1 | /training/model.py | 285aa1dd11a7c54451d61fa59dce0016bbdfa390 | [] | no_license | herrsechs/multi_modal_net | 18dbc409a71513cec7f59b8b0274cf3194b5e73d | b1ec647b3c593512e7db8604529d89dc09d49b7a | refs/heads/master | 2020-04-16T18:52:06.073277 | 2019-02-22T08:44:33 | 2019-02-22T08:44:33 | 165,837,979 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 15,508 | py | model.py | import tensorflow as tf
LEARNING_RATE = 0.001
AUX_DATA_DIGITS = 125
def merge_alex_net_model_fn(features, labels, mode):
inputs = features['X1']
imgs = features['X2']
num_classes = 90
is_training = mode == tf.estimator.ModeKeys.TRAIN
dropout_keep_prob = 0.5
scope = 'alexnet'
with tf.variabl... |
62754bd5152c15a410579ce081361ff67eea74ad | f2885302190d603bcdfb9d0547500d77b742be10 | /documentaries/views.py | b06306be010345d76adfb6499d51f942a14197d5 | [
"MIT"
] | permissive | MrCrawdaddy/humans | d4692a3315d9ee81e5d25e8646804b689af20f8b | 785f7355d7d3a1de9d76d4715933b18fe12dc2c2 | refs/heads/master | 2020-12-24T19:37:21.640463 | 2016-05-05T01:06:24 | 2016-05-05T02:53:36 | 57,425,184 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,298 | py | views.py | from django.shortcuts import render
from django.views import generic
from django.utils import timezone
from django.core.urlresolvers import reverse, reverse_lazy
from django.contrib.auth.mixins import LoginRequiredMixin
from .models import Documentary
from comments.models import Comment
class IndexView(generic.ListV... |
d34bdc475f763d545e9912986da316ca53a97910 | 129ca7b0568abc6f57c2ccb0660b8f6f25ffa714 | /src/handlers.py | c103c59e3a037be389ee45851ad1004a1b1c73d1 | [
"MIT"
] | permissive | sureshmelvinsigera/goko-coc-bot | 974c2c5e31332eb4881e1c74eee8cdaa3f82e0c4 | c630dc06d44fecc24fb9ed69e6535be7ddb19bbf | refs/heads/master | 2023-04-26T08:58:19.856106 | 2021-05-24T00:01:04 | 2021-05-24T00:01:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,155 | py | handlers.py | import logging, actions, buttons, clash, coc, os
from user import User
API_EMAIL = os.environ["API_EMAIL"]
API_PASSWORD = os.environ["API_PASSWORD"]
LA_TAG = os.environ["LA_TAG"]
client = coc.login(API_EMAIL, API_PASSWORD)
# Enable logging
logging.basicConfig(format='%(name)s - %(levelname)s - %(message)... |
1ed9e588063f6159bad631850b999de6348f17de | f5195c2ad5f7ea79b2f91eb870c059ed233aa653 | /main.py | f4c0a8c981fcd4c24ea39904c797418d4ebb8875 | [] | no_license | sarxyz/kaggle-regression | 67ae4614689af4e8d502160e5cf4aaaa0477adda | 3cc7b81ee4fec1ccdc88571a73aef86469f6a0b0 | refs/heads/master | 2021-12-14T22:29:58.385460 | 2017-06-13T00:05:18 | 2017-06-13T00:05:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 7,620 | py | main.py | """
Project:
File: main.py
Created by: louise
On: 6/8/17
At: 2:09 PM
"""
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from scipy.stats import skew
import keras
from keras.models import Sequential
from keras.layers import Dense
from keras.regularizers import l1
from... |
7e6f1c4c30df4bde129730874f41bf5f45d4185e | d8da4c1987ad7d942c220746e149f40eef08f4ab | /Make_figs.py | f74675096dc8f5fa34471f24f4fcf280aebf7941 | [
"MIT"
] | permissive | creation2/WNMM_probing | 4552c42a0a788a22c03dcf671b0b62162516cbad | 823079a8ab5530f46c27599a83ac1935139fcc0c | refs/heads/master | 2022-11-11T11:23:57.449923 | 2020-06-27T02:19:51 | 2020-06-27T02:19:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 13,237 | py | Make_figs.py | # -*- coding: utf-8 -*-
"""
Created on Mon Dec 2 21:10:28 2019
@author: John
"""
import numpy as np
import matplotlib.pyplot as plt
from statsmodels.stats.multicomp import MultiComparison
from scipy import stats
import pandas as pd
from scipy.ndimage.filters import uniform_filter1d
#from mpl_toolkits.ax... |
0136c51154a9654bededb7940c6233896017b458 | 62d3c0555c100c32e225dae4e71e531dec387543 | /bot/commands/search.py | dd9532542dfbece3bcfe405fea2968b9c656a41a | [
"MIT"
] | permissive | dead-beef/telegram-bot | 413b5716d4002ed7ad2a8ea26cd4e670d0afeffd | 48d551eed320d093f1648156694c23b1e3cc08a4 | refs/heads/master | 2022-05-13T17:53:47.723598 | 2022-04-29T15:14:52 | 2022-04-29T15:14:52 | 132,421,507 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 8,112 | py | search.py | import re
import html
from pony.orm import select, count
from telegram import (
ChatAction,
TelegramError,
InlineKeyboardButton,
InlineKeyboardMarkup,
ParseMode
)
from telegram.error import BadRequest, Unauthorized
from bot.error import SearchError
from bot.models import get_page, SearchQuery #, S... |
2200551fd35b8a956373fdedfb39aa5289d78b1f | 1accda15e2edc0835ad4fac0dfab9d23a7f03e86 | /ls.py | cc5cebdb3d22aea6fdd8e092e516fc779c84fd45 | [] | no_license | sanskarbiswal/cmdProjectControl | 5a27d03f89a5da77dd8a596f6f263af6eb025312 | 7f69257fb789abe6652be25f43642d41cb183135 | refs/heads/master | 2020-06-22T04:54:21.422278 | 2019-07-18T18:54:13 | 2019-07-18T18:54:13 | 197,638,409 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 83 | py | ls.py | import os
for i in os.listdir('.'):
print(" "+str(i))
os.system("pause") |
b413146e6aee8d31fb7259b6efe66975245bbd2d | 971b919a2ffc9ada9834bfa985919c0e492848ba | /report | 337915d7d65c22b237406da505592be5678eaeca | [] | no_license | rath/toys | d0c82f1c877fa759ed8c5171983dd877defd16ac | 56260e0a17d015b0fa587c24948851b208eff158 | refs/heads/master | 2021-01-21T12:39:34.509810 | 2014-06-04T18:56:07 | 2014-06-04T18:56:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,411 | report | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Run this with your long running shell command by pipe,
then it will send a short report by email.
* Usage
$ a-very-long-running-job 2>&1 | report
* Install
$ bash <(curl -s https://raw.github.com/rath/toys/master/install_report.sh)
* Config lookup... | |
c84ce8272e3281f95ec32f24b5f305002a085ff3 | 7cad80770718e655766dd038bc654ebe1ad2ab3e | /network/cannabiscoin.py | c4eb6dae25070282c801d0dba8da8059cbc3764f | [] | no_license | kindanew/clove_bounty | d0e1f917dff5b3a23eae6a05d6449af068fb4dc9 | e707eebde301ac3728a5835d10d927aa83d27ab5 | refs/heads/master | 2021-04-29T00:29:37.698092 | 2018-02-24T02:34:33 | 2018-02-24T02:34:33 | 121,830,043 | 0 | 0 | null | 2018-02-17T05:34:54 | 2018-02-17T05:26:51 | Python | UTF-8 | Python | false | false | 748 | py | cannabiscoin.py |
from clove.network.bitcoin import Bitcoin
class CannabisCoin(Bitcoin):
"""
Class with all the necessary CANN network information based on
http://www.github.com/cannabiscoindev/cannabiscoin420/blob/master/src/net.cpp
(date of access: 02/12/2018)
"""
name = 'cannabiscoin'
symbols = ('CANN',... |
f02db280b1c6b1a2609b8d65c1fa302136d33eb1 | 21802a6cc5a847f5adc756ac0857afad7623e1e1 | /deploy/lambda/initiate_step_functions.py | a3435d13af252781b072716fa65dfad17a5debf3 | [] | no_license | pschluet/python-sagemaker-template | 20861896dfa696f199636a066450e9d3957172e0 | a2d2205bf013ace2e129c8600a04ed4404a03426 | refs/heads/master | 2022-07-18T11:06:14.042319 | 2020-05-20T10:43:56 | 2020-05-20T10:43:56 | 209,356,206 | 0 | 0 | null | 2022-06-21T22:51:51 | 2019-09-18T16:34:00 | Python | UTF-8 | Python | false | false | 18,338 | py | initiate_step_functions.py | import json
import boto3
import uuid
from zipfile import ZipFile
from botocore.exceptions import ClientError
import os
from dateutil.tz import tzlocal
import logging
logger = logging.getLogger()
logger.setLevel(logging.INFO)
DATA_SOURCE_BUCKET_NAME = os.getenv('DATA_SOURCE_BUCKET_NAME')
SOURCE_CODE_BUCKET_NAME = os.g... |
2da562c127eb82a22cefbef072079447812a867e | d0c7e94e076fd08872a1639da851529211557b43 | /edu_server/edu_server/apps/user/serializer.py | cf3967ae6efaef704d1015c76a4885c3ceaa9d4c | [] | no_license | syydhhzwx/drf_vue_course | 7a9412e97afb25d3419d787fcc9fd4bd72c5c0a6 | 09c21521d05b265c921be5f808c11578ecb84bea | refs/heads/master | 2023-02-25T15:13:34.246645 | 2021-02-02T01:03:06 | 2021-02-02T01:03:06 | 333,441,310 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 4,007 | py | serializer.py | import re
from django.contrib.auth.hashers import make_password
from rest_framework import serializers
from rest_framework.serializers import ModelSerializer
from django_redis import get_redis_connection
from user.models import UserInfo
from user.utils import get_user_by_account
class UserModelSerializer(ModelSerial... |
312e423d3818b51e1600764500709094d809d38f | 0ff8847cc8a9f02604d5bc926da1df07ac86486e | /main.py | 017c226ba5de4854bd391b7bee73a0e0b6ef38a0 | [
"BSD-3-Clause"
] | permissive | jsanchezperez/idsem | cb68da422d9e64d84993523da6a157ed683e7a3e | 39fdff940c77310d5c39880fb43453b0d95c4765 | refs/heads/main | 2023-04-18T13:14:38.635348 | 2022-12-01T14:03:23 | 2022-12-01T14:03:23 | 488,132,055 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,416 | py | main.py | """
Invoice generator (Main Program)
"""
import os
import math
import locale
import time
import replace_field
import json_token_generator
import word_generator
from docx2pdf import convert
# ----------------------
def main():
""" ... """
vinit = 0
num_bills = 5000-vinit
ddir =... |
e51abd3a5319f0c03f40d4ecd949b4b719f42538 | 43a090cc46fee798743ffc95fbca86cecb69bfb5 | /django/courseproject/courseapp/models.py | 029e010d97ce002c90a20ec8d9eacc0220257502 | [] | no_license | jasonLaster/CoursePicker | 29df5fb5d1a150df3b32bc4bea21dc0317a70125 | 5b8d93506c791b071c503e984c4bb2c6606cbab0 | refs/heads/master | 2021-01-17T22:02:19.006538 | 2011-05-02T19:41:00 | 2011-05-02T19:41:00 | 1,692,872 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,281 | py | models.py | from django.db import models
from django.contrib import admin
class Profile(models.Model):
key = models.CharField(max_length=60)
favorites = models.ManyToManyField('Course')
class Course(models.Model):
title = models.CharField(max_length=80, blank=True)
dept = models.CharField(max_length=10, blank=Tru... |
2f363a6fcbba2d4009b93d543e2b7850bfc1d9e6 | 916480ae24345193efa95df013f637e0a115653b | /web/transiq/restapi/dynamo/gps_serialiser.py | 7bac2a48dc37ecf6b9879405f18463d167d9c340 | [
"Apache-2.0"
] | permissive | manibhushan05/tms | 50e289c670e1615a067c61a051c498cdc54958df | 763fafb271ce07d13ac8ce575f2fee653cf39343 | refs/heads/master | 2022-12-11T07:59:30.297259 | 2021-09-08T03:24:59 | 2021-09-08T03:24:59 | 210,017,184 | 0 | 0 | Apache-2.0 | 2022-12-08T02:35:01 | 2019-09-21T16:23:57 | Python | UTF-8 | Python | false | false | 5,801 | py | gps_serialiser.py | from rest_framework import serializers
from restapi.dynamo.config import DynamoTablesEnvConfiguration
from restapi.dynamo.utils import DynamoTable
from restapi.helper_api import DATETIME_FORMAT
from datetime import datetime
from restapi.service.validators import MOBILE_NUMBER_REGEX,VEHICLE_NUMBER_REGEX, validate_vehicl... |
dd967039958ed1fa667d41796d3fd4e7436277bc | c51caee1189f258ff4b35b9a205445c844822d78 | /tests/test_large_problems.py | 25e424263533d779591c715ed6d34fb53119d834 | [] | no_license | tbenthompson/tectosaur_fmm_OLD | ee30b012500d276f383ef3dadb4e73e1c04d9f7f | db83e4e72e19de3ff0b04fce07b7628ab674af96 | refs/heads/master | 2020-12-03T02:31:24.389251 | 2017-07-25T15:37:06 | 2017-07-25T15:37:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,556 | py | test_large_problems.py | import numpy as np
from tectosaur.util.test_decorators import slow, kernel
import tectosaur_fmm.fmm_wrapper as fmm
from tectosaur.farfield import farfield_pts_direct
from test_fmm import run_full, rand_pts, check
# test fmm with elastic kernels more, this is confusing...
# i think there are a variety of issues here.
... |
eb658f84eba2191f20cdff57ea9d0e83fa10e8ab | a7789f4b71eed02d25923c25c13c661a7a5006c5 | /NLP/Day2/q2.py | 8cf96d8df5f9859dffbdb472ca9ab4e6dd4caaa1 | [] | no_license | TOM-SKYNET/AL_NIELIT | 50401f11308210131363d480cd0712adf59081a2 | afba4af0ddb6096a6805ac12b51e12fb4f3fa869 | refs/heads/master | 2020-04-06T22:21:35.798542 | 2019-01-15T06:45:04 | 2019-01-15T06:45:04 | 157,833,645 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 102 | py | q2.py |
from textblob import Word
text = Word(raw_input("Enter a Plural Noun:"))
print text.singularize()
|
ef0f86dece63dd2feb01917fd5546510c36ee44a | 93425453d2c554d9e14f20ddce7178fc5deef270 | /cargotrucks/orders/views.py | d556725fda91c77a4e302daf1aec35db04db7a27 | [] | no_license | 132u/viktoririna | 767509b7eae13ec0d707a3ef6039c3785190dcf9 | e36981b192634a6bf3f6f758fd219afb64759d99 | refs/heads/master | 2023-06-04T16:18:53.479451 | 2021-06-22T20:32:10 | 2021-06-22T20:32:10 | 379,393,030 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 731 | py | views.py | from django_filters.rest_framework import DjangoFilterBackend
from rest_framework.filters import SearchFilter, OrderingFilter
from rest_framework.viewsets import ModelViewSet
from orders.models import Order
from orders.serializers import OrderSerializer
from rest_framework import permissions
class OrderViewSet(ModelV... |
c520a72e2d8d4707fd43d7d4df9c8aa35083a009 | e86b3627eb7c3996b3f60a78a45b9d7ab928e2fc | /Section_2/Multigraph/neighbors.py | 4a659338644c764010d372069582283ff3d2fad9 | [] | no_license | vigneshwarsripad/NetworkAnalysis | c715b26863406c122fd771f784761acb92e4e11c | 1424cc14f11fe1487d985e354be9ada6e65c9805 | refs/heads/master | 2020-04-19T06:59:54.527110 | 2019-02-18T21:54:07 | 2019-02-18T21:54:07 | 168,034,404 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 364 | py | neighbors.py | G = nx.path_graph(4) # or DiGraph, MultiGraph, MultiDiGraph, etc
[n for n in G.neighbors(0)]
[1]
#Notes
#It is usually more convenient (and faster) to access the adjacency dictionary as G[n]:
G = nx.Graph() # or DiGraph, MultiGraph, MultiDiGraph, etc
G.add_edge('a', 'b', weight=7)
G['a']
AtlasView({'b': {'weight': 7}})... |
066d2af1c5ab01a95516170455f45b59bd345819 | eea1c66c80784d4aefeb0d5fd2e186f9a3b1ac6e | /atcoder/abc/abc101-200/abc152/e_refact.py | 55bb96d3391c5aca82820655804c847b44b9d90e | [] | no_license | reo11/AtCoder | 4e99d6f40d8befe264761e3b8c33d3a6b7ba0fe9 | 69c6d67f05cb9190d8fb07204488cd7ce4d0bed2 | refs/heads/master | 2023-08-28T10:54:50.859288 | 2023-08-22T18:52:47 | 2023-08-22T18:52:47 | 162,085,118 | 4 | 0 | null | 2023-07-01T14:17:28 | 2018-12-17T06:31:10 | Python | UTF-8 | Python | false | false | 2,527 | py | e_refact.py | from collections import defaultdict
class LCM_mod:
"""
最小公倍数の計算を行う
オーバーフローが発生しないように素因数分解し,
因数の積を逐次余りに置き換えて最小公倍数を導出する.
"""
def __init__(self, max_num, p=10 ** 9 + 7):
self.max_num = max_num + 1
self.p = p
self.prime = [0 for _ in range(self.max_num)]
self.max_ma... |
0d442c6e23e56c0481c55fa84ba74fb223d32b9d | 57598eb29acce1bf0dace4be33b490b883baf528 | /day_15.py | 904da154d08a7b57d6ca67593f41529478ff9366 | [
"MIT"
] | permissive | mullevik/advent-of-code-2020 | 628e419b59c2f093288f1cd1b4a2629fcccff49e | 358f3b1fc42e7ce642928161f70a9785350c79f5 | refs/heads/main | 2023-02-03T17:41:09.555327 | 2020-12-19T09:31:39 | 2020-12-19T09:31:39 | 317,465,691 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 1,262 | py | day_15.py | """
Day Fifteen - Default dict I guess?
"""
from collections import defaultdict
import utils
if __name__ == '__main__':
starting_numbers = [int(x) for x in
utils.read_strings_from_lines("in/day_15.txt")[0].split(",")]
memory = defaultdict(lambda: [])
numbers_spoken = []
fo... |
a82c19b3cf92f6bb9ead1e6d37b3b62ba946f521 | fd7520c6cb38b01e4a3f42a93d2bbf1d5d3b4c62 | /modul_7-4.py | f5eaaf370acd7fab61c908ab84dc294fcd9bfe96 | [] | no_license | harada83/pythonPractice | 8435d1b5f6e2adf7a7ae0979fb2a11ffbdebcd3b | f74199520ddb4e6d0f584fda8a5c1ac7d675dfe0 | refs/heads/master | 2023-04-20T07:34:02.593142 | 2021-05-05T04:53:33 | 2021-05-05T04:53:33 | 364,464,437 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 2,048 | py | modul_7-4.py | import csv
funnel_by_sex = {}
funnel_by_device = {}
funnel_by_month = {} # создаем словарь, где будут храниться словари за каждый месяц
funnel_template = {'1_home_page': 0, '2_search_page': 0, '3_payment_page': 0, '4_payment_confirmation_page': 0}
with open('/home/harada/skillbox/modul_7/click_stream3.csv', mode='r'... |
a0db10c693790e97f831c2da440da73e504693dc | c09b12ec1e56ff679c9795c48d828d832630e49f | /hw5/socialnetwork/profile_views.py | 722e8aa2c3427a89e32ce9696662343a9d028b95 | [] | no_license | justinguo/Web-Application-Development | 9bceda6bb3359eea2f5f03b88b638218d7a51f4f | 23eb79359b0ad3b202b32d55ba33ccd1e40d4d6a | refs/heads/master | 2021-01-21T05:16:55.119537 | 2017-02-25T22:15:51 | 2017-02-25T22:15:51 | 83,166,202 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,867 | py | profile_views.py | import sys
import urllib
import buttons_views
from itertools import chain
from django.core.urlresolvers import reverse
from django.core.exceptions import ObjectDoesNotExist
from django.db import transaction
from django.shortcuts import render, redirect, get_object_or_404
from django.contrib.auth.decorators import log... |
43d82ea3fbbd00236ce7b20c0f770c7f0ac00fdd | a8efb1d35c8bc2332f714f72882e30451087fd3e | /python/disguisedCharacterFinder.py | 0a396ef08a71a5d58dcdba314a204674f6435706 | [] | no_license | villaorlado/wayangnetworks | a408124a03f181a0568b36580d5835022c7cbaec | 7028174043b5ceb8e0b9258d80a0e30b25e4a3b6 | refs/heads/master | 2021-01-20T12:10:37.441246 | 2019-04-04T14:50:18 | 2019-04-04T14:50:18 | 85,447,211 | 2 | 0 | null | 2017-05-23T08:21:22 | 2017-03-19T03:04:32 | HTML | UTF-8 | Python | false | false | 1,086 | py | disguisedCharacterFinder.py | import re
inputFile = "../input/stories.txt"
narratives = open(inputFile).read()
memba = []
membaList = ""
matchObj = re.findall(r'\[(\w*@\w*)\]',narratives)
for match in matchObj:
if not match in memba:
memba.append(match)
for mem in memba:
print mem
membaList += "\n" + str(mem)
with open("../input/listOfDisg... |
519221925c9d194d66fc06ef96ab95cbd4e305da | 6e7f714f31695e80106b0c0fbe12432b9166f39f | /explore_data_neo4j.py | b44eb4988da90390f9caca0bdceec1bec8177d6a | [] | no_license | jusalbari/pycon2020 | 57f9e9ac619fe3161272a203fc39a3be0067ea64 | 3f0bf8f8693a34978b842dff74dcab6186e7b04c | refs/heads/master | 2021-01-01T13:43:01.714259 | 2020-02-10T16:02:39 | 2020-02-10T16:02:39 | 239,304,078 | 4 | 0 | null | null | null | null | UTF-8 | Python | false | false | 3,922 | py | explore_data_neo4j.py | #!/usr/bin/env python
# coding: utf-8
# In[1]:
import pandas as pd
import numpy as np
from py2neo import Graph, Node, Relationship
# In[2]:
graph = Graph(uri='bolt://localhost:7687',user='neo4j', password='Data')
tx = graph.begin()
# In[3]:
graph.delete_all()
# In[4]:
df_temp = pd.read_csv('neo4j-communi... |
ba15516462150aed4b70408c6cd222d53fc374d9 | af6f0e73a3f2fa67ab94e200e94bacd1e75bb7cc | /Linear_cryptanalysis/linear cryptanalysis.py | 3f102826775984c6eeb41620b2f752b4fad3ccf9 | [] | no_license | chyd1k/Program-for-encryption-decryption-and-cryptanalysis | 23c0718d5f270b29df7162953d3c01e222ec1fde | 96a1e8ff9db63597aa81ca54d5e3904e1f6efdeb | refs/heads/master | 2020-06-19T11:13:19.826322 | 2019-07-13T07:44:14 | 2019-07-13T07:44:14 | 196,688,874 | 0 | 2 | null | null | null | null | UTF-8 | Python | false | false | 1,962 | py | linear cryptanalysis.py | def spl_str(str,step):
bits=[]
for i in range (0,len(str),step):
bits.append(str[i:i+step])
return bits
def str2bits(inpstr1):
bits=[]
string1=[]
string2=[]
lista=list(inpstr1)
#Получаем ASCII-код символа, потом преобраозовываем в двоичный код, добавляя нули
for ... |
a50fe5556e3db7291254998356c74993941ae47f | f61ececd18db690a2e3fe4c5990877c6408fad70 | /movSinGrat_tuning.py | d63d1128f90acbf5f8b9f931096d29527a520204 | [] | no_license | AndreanneLavoie/visual_stim_code | 00b2edd616bc5d805b6638118d7d1cac57d9c444 | ecf4e7a1586a3f0a90b812e3577ad822a70d0532 | refs/heads/master | 2020-04-14T21:08:49.769794 | 2019-02-12T21:27:52 | 2019-02-12T21:27:52 | 164,118,867 | 1 | 0 | null | 2019-01-09T01:00:00 | 2019-01-04T14:42:56 | Python | UTF-8 | Python | false | false | 34,920 | py | movSinGrat_tuning.py | def movSinGrat(MovSinGrat_SpatFreqVal, MovSinGrat_tempFreqVal, MovSinGrat_t_before, MovSinGrat_t_During, MovSinGrat_t_after, Synch, MovSinGrat_Motionmode, MovSinGrat_features, MovSinGrat_ledstate):
'''
INPUT: paramterS that are potentially changed by user in front.py by clicking buttons on the UI
... |
30831c7915910d03f6b9ea34085f6b06ec398ff1 | a2d8600dcd5238f08b3c1ce5fe9b7f10976aa0a5 | /src/forms.py | fe10e1220b02c3d23395b6ff178bb9a0e17b3431 | [] | no_license | IbadMukrom/pendataan-pekerja- | 06e3868edb745ecd471caa5c0210feeb27e254ab | f787de881fc06db6baff3e8f172207353e2d4073 | refs/heads/master | 2021-01-16T03:41:42.687133 | 2020-04-17T11:17:58 | 2020-04-17T11:17:58 | 242,965,811 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 529 | py | forms.py | from django import forms
from .models import Pegawai
class PegawaiForm(forms.ModelForm):
class Meta:
model = Pegawai
fields = ('nama','umur', 'nomor_hp', 'posisi')
labels = {
'nama ': 'Nama',
'umur': 'Umur',
'nomor_hp': 'Nomor Hp',
}
... |
b85bc6ef40604639471c5ac1601f4a7c3eac2f42 | 72774f99b1df9edb128e50cba9bfabe27a63ef1e | /max_profit/max_profit.py | 1ed20f44d3e59bc742c63d1433cfe36505756a33 | [] | no_license | ijlassi/codility_training_tasks | df7ddaa4cd31c339fb476e2ca6a188138cd1b088 | 5de7e247064a51c8b020580408eedb773c58d88f | refs/heads/master | 2023-02-02T17:39:46.653675 | 2020-12-19T20:36:34 | 2020-12-19T20:36:34 | 299,586,454 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 256 | py | max_profit.py | def solution(A):
answer = 0
maxi = 0
if len(A) < 2 :
return 0
max_profit = A[len(A) - 1]
for i in range(len(A) - 2, -1, -1):
maxi = max(maxi, max_profit - A[i])
max_profit = max(A[i], max_profit)
return maxi
|
45e6e21f73c0561b1b801f8999eec2e7074e462e | a57978aaa05a80d85ccbe57eec3c437388d0c503 | /downstream/kreport_to_krona.py | 6e5f3c21a31eec1678a8890d66637f8fd6f812d4 | [] | no_license | LU-KPMI/rtu-stag | 738091ff8c23a1c3d5efc1fa14b03605cbe62fe3 | 264a124f0f9a1ccb577b056789a5092dc88eab3c | refs/heads/master | 2023-07-17T08:46:59.175673 | 2021-08-30T16:57:41 | 2021-08-31T09:59:25 | 368,564,841 | 1 | 0 | null | null | null | null | UTF-8 | Python | false | false | 492 | py | kreport_to_krona.py | import sys
full_name = []
level_map = {'D': 0, 'P': 1, 'C': 2, 'O': 3, 'F': 4, 'G': 5}
if __name__ == "__main__":
for line in sys.stdin:
entries = line.rstrip().split('\t')
if entries[3] not in level_map:
continue
level = level_map[entries[3]]
while len(full_name) > le... |
27894189ca351e5c78db958ab57140a43c34d08c | c8d3d46b3da1f3423d07ae2f73614a153298eb9d | /experiments/cnn/cnn_components.py | d874185489e2ab21346c746525a1ada2b0af12b6 | [] | no_license | bertoia/AlphaOpt | 0a965dc8a86cad0f379245d09ff5652727f9518a | b475d27edf43460ee969d5e980e354930e4fed12 | refs/heads/master | 2021-03-22T03:18:52.797596 | 2016-11-12T15:35:30 | 2016-11-12T15:35:30 | 72,901,200 | 3 | 2 | null | null | null | null | UTF-8 | Python | false | false | 5,767 | py | cnn_components.py | from sklearn.datasets import fetch_lfw_people
from sklearn.model_selection import train_test_split
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers.convolutional import Convolution2D, MaxPooling2D
from keras.utils import np_utils
from keras.optimizers import Adam
f... |
ee211a0b774545a7af1bd2589efe5a7766fe4f74 | 9d65171e32327e0730060da7d1200631c6999d9c | /solutions/day01/day01.py | 36d1558ceba37c9074e70c2b142574991b7fed0a | [] | no_license | kna27/advent-of-code-2020 | 7dab3f0731306f44e173aa30f2d3ba2022b62d8e | fe2ab01b7a04fd40121785a4181d130e3a757efa | refs/heads/main | 2023-02-02T13:30:30.338384 | 2020-12-20T17:42:28 | 2020-12-20T17:42:28 | 317,886,257 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 455 | py | day01.py | numbers = open("data_day01.txt").readlines()
from itertools import permutations
for x in range(len(numbers)):
numbers[x] = int(numbers[x])
#Part 1
solutions1 = [pair for pair in permutations(numbers, 2) if sum(pair) == 2020]
p1 = solutions1[0][0]*solutions1[0][1]
#Part 2
solutions2 = [pair for pair in permutatio... |
644c4139f3123c1d7f55c26cbea6b1399ae7a291 | 202e52db47a7a1fa6f2c65e521dc7a6b96addd33 | /deeplearn_ai/02-week1/ai.py | c537aa7d6ca14256e71a3237f941c2e61d030d79 | [] | no_license | 13386030098/deep_learning | 3b5d40e11fb19a34193c7837b9b6fe5d3c9b0695 | bbf7a014f63946c706f5de6281e5fb26b84e1159 | refs/heads/master | 2022-07-17T22:10:48.946072 | 2020-05-08T06:14:29 | 2020-05-08T06:14:29 | 261,196,097 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 11,927 | py | ai.py | # import tensorflow as tf
# from tensorflow import keras
#
#
# import numpy as np
# import matplotlib.pyplot as plt
# import sklearn
# import sklearn.datasets
# from init_utils import sigmoid, relu, compute_loss, forward_propagation, backward_propagation
# from init_utils import update_parameters, predict, load_dataset... |
72a2c21871b2c4812f00129e0dff8268b8fb6dba | 43cc5ac6aec81f4e5ba4771a57379fce5aa285e3 | /lib/timesheet.py | 7874b43aa8fbdd256838946af6be80238a47e8aa | [] | no_license | msaitz/library-timesheet-generator | 5a0ef8e9c32c5f9deafb2b1bd5766c0b4d70d943 | 21b8bc15fcddb5c6bfe6439526e51a981b405211 | refs/heads/master | 2021-08-16T00:43:57.596684 | 2017-11-18T17:44:18 | 2017-11-18T17:44:18 | 105,940,543 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 9,649 | py | timesheet.py | import random
from .symbol import Symbol
from .staff import Staff
from .shift import Shift
class TimeSheet:
def __init__(self, cached_data):
self.staff_num = cached_data.get('staff_number', 0)
self.col = len(Shift.time_slots)
self.table = [[Symbol.blank] * self.col for _ in range(self.staf... |
565d2dca86eda39a8e7f449f4c268f8a096685d9 | 66fff3f23c662ebc474449e6674841e80083021a | /Sim/magnetometer.py | 4b51df41f580e92c915d31a656a9fdee24bfd30c | [] | no_license | alexchonglian/sensor-ipsn2016 | 7fea85ba54754507c7a42eac6f3a7add6daa5a5e | 778044f9e090739b1663ee2253287a941917fd37 | refs/heads/master | 2016-09-10T13:54:27.110181 | 2015-07-11T20:04:59 | 2015-07-11T20:04:59 | 38,938,816 | 0 | 0 | null | null | null | null | UTF-8 | Python | false | false | 456 | py | magnetometer.py | '''
Created on Oct 10, 2013
@author: imaveek
'''
import numpy as np
class Magnetometer(object):
'''
Magnetometer
'''
def __init__(self, sf):
'''
Constructor
'''
self.sf = sf
self.noise = sf.noise_mag
def getDirection(self):
'''
... |