« first day (304 days earlier)      last day (1884 days later) » 

6:31 AM
I would like to read some bigramized files from a folder I'm working with to computers for productivity... so this is what I'm doing: # -- coding: utf-8 --

import ast
import glob
import os
import codecs

corpus ='/Users/user/Desktop/Train_Samples/'

def load_files(folder,pattern):
path = os.path.join(folder,pattern)
for filename in glob.glob(path):
with open(filename)as file:
yield ast.literal_eval(file.read())


training_corpus =[[' , '.join(x) for x in sample[:-1]]
for sample in load_files(corpus,'*.txt')]
the problem is in one computer this works and in this computer it doesnt work... in this computer it rise this exception: Traceback (most recent call last):
File "/Users/user/PycharmProjects/untitled/SentimentAnalisys_V4.py", line 18, in <module>
for sample in load_files(corpus,'*.txt')]
File "/Users/user/PycharmProjects/untitled/SentimentAnalisys_V4.py", line 14, in load_files
yield ast.literal_eval(file.read())
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ast.py", line 49, in literal_eval
in the other one it works perfectly...
 
3 messages moved from Python
 
6:52 AM
OK , which one?
 
1 message moved from Python
 
7:10 AM
Traceback (most recent call last):
File "/Users/user/PycharmProjects/untitled/SentimentAnalisys_V4.py", line 18, in <module>
for sample in load_files(corpus,'*.txt')]
File "/Users/user/PycharmProjects/untitled/SentimentAnalisys_V4.py", line 14, in load_files
yield ast.literal_eval(file.read())
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ast.py", line 49, in literal_eval
node_or_string = parse(node_or_string, mode='eval')
File "/usr/local/Cellar/python/2.7.8_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/ast.py", line 37, in parse
 
1 message moved from Python
 
 
3 hours later…
10:00 AM
Guys
router.get('/', function itemsGet(request, response) {
    var allItems = mapper.fetchAll();
    allItems.then(function(results) {
        response.json(results);
    });
});
ItemMapper.prototype.fetchAll = function() {
    this.connPromise
        .then(function connected(conn) {
            return {
                msg: "Connected Successfully!"
            };
        })
        .catch(function failure(err) {
            return err;
        });

    return this.connPromise;
};
Why is result === conn?
4 messages moved from [JavaScript ](chat.stackoverflow.com/rooms/17/javascript)
 
10:37 AM
Non-JS-Question alert "What is the best search-term to figure out reason why your skull has a slight bowl on top of it?"
 
@SecondRikudo yesterday, i was working on local, then my blob was like "http://localhost/.." since i cannot read local files with js, i had no access to this blob, and request failed... Then i tried on my webserver, and it worked... and now... idk why... it's not working anymore
 
@EnglishMaster depends on who is "majority"
if you mean the people connected, then we have no idea, since most are anonymous
 
Oooh, it's been a while since I've seen a tiny avatar.
 
@FlorianMargaine cough You are raping me with logic and terminologies. But you have to consider that this is not a ordinary chat place, it is a gathering place of nerdy successful people who typically have no experience with women before.
 
considering that most regulars are married or with a long-term girlfriend...
 
10:42 AM
'typically'?
The supernerd stereotype is pretty exaggerated. I know a few like that, but not many
 
@TomW Nice surname, W. Yes, typically.
 
@TomW I'm a supernerd. Ask my friends/coworkers.
but I'm also married :( :)
 
I was once a nerd too but I outta-nerded since I joined Marine Corps (the most manly military).
 
@FlorianMargaine can I kick him now?
 
10:46 AM
what's wrong?
Sorry if I slightly threatened this community with jokes (not a big-deal though).
 
That smell
That smelly smell
It's a smelly smell that smells.... smelly.
Smells like a troll
 
21 messages moved from [JavaScript ](chat.stackoverflow.com/rooms/17/javascript)
 
Thanks
 
Applause to Florian for smart move against that "smell".
 
2 messages moved from [JavaScript ](chat.stackoverflow.com/rooms/17/javascript)
 
11:45 AM
Which Javascript developer is more attractive to women?
1) less fashion conscious and muscular but has less JS knowledge than 2
2) quite fashion conscious but nerd and skinny
 
1 message moved from [JavaScript ](chat.stackoverflow.com/rooms/17/javascript)
 
 
2 hours later…
1:25 PM
@Unihedro
 
user4202350
@Unihedro
 
2 messages moved from Java
 
user4202350
my valuable comments movedto trash
 
1 message moved from Java
 
 
3 hours later…
4:41 PM
!!rage
 
@easwee That didn't make much sense. Use the !!/help command to learn more.
 
bah
thought it had something relevant
 
!!tableflip
 
@DarkAshelin That didn't make much sense. Use the !!/help command to learn more.
 
4:41 PM
!!flip
 
@easwee That didn't make much sense. Use the !!/help command to learn more.
 
what
all removed?
 
@CapricaSix are you suggesting we RTFM ?
I refuse!
 
!!riot
 
╯°□°)╯┻━┻
 
4:42 PM
!!put...it...back
 
@easwee That didn't make much sense. Use the !!/help command to learn more.
 
!!peace
 
@DarkAshelin That didn't make much sense. Use the !!/help command to learn more.
 
!!put..it..back...ლ(ಠ益ಠ)ლ
 
┬─┬ ノ( ゜-゜ノ)
2
 
4:43 PM
lol
 
!!peace
 
22 messages moved from [HTML / CSS / WebDesign ](chat.stackoverflow.com/rooms/29074/html-css-webdesign)
 
@easwee That didn't make much sense. Use the !!/help command to learn more.
 
2 messages moved from [HTML / CSS / WebDesign ](chat.stackoverflow.com/rooms/29074/html-css-webdesign)
 

 Android Era with Kotlin and Java

Important: Read dos and don'ts here: androidera.github.io . Ma...
Hello. I see you need help with android programming. In this case, why not try speaking in the android room instead. Thanks.

 Android Era with Kotlin and Java

Important: Read dos and don'ts here: androidera.github.io . Ma...
 
4:48 PM
5 messages moved from Teenage Programmers Chatroom
 

« first day (304 days earlier)      last day (1884 days later) »